1 #LyX 2.0.0svn 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}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
122 \paragraph_separation indent
123 \paragraph_indentation default
124 \quotes_language english
127 \paperpagestyle headings
128 \tracking_changes false
129 \output_changes false
139 Additional LyX Features
147 \begin_layout Plain Layout
149 Principal maintainer of this file is
154 If you have comments or error corrections, please send them to the LyX
155 Documentation mailing list,
156 \begin_inset Flex CharStyle:Code
159 \begin_layout Plain Layout
161 <lyx-docs@lists.lyx.org>
174 \begin_layout Standard
175 \begin_inset CommandInset toc
176 LatexCommand tableofcontents
183 \begin_layout Chapter
187 \begin_layout Standard
188 This manual is essentially Part II of the
190 User's Guide\SpecialChar \@.
193 The reason for separating this document out is simple: the
197 is already quite lengthy, and it contains information on all of the basic
198 features one needs to know in order to prepare most documents.
199 However, the LyX Team has worked to make LyX extensible through various
200 configuration files and external packages.
201 That means that if you want to support the Fizzwizzle LaTeX package, you
202 can create a layout file (or module) for it without having to alter LyX
204 We've already had contributions of several new features this way, and some
205 of them are documented here.
206 There are also some more `advanced' features, such as how to control the
207 presentation of bibliographies and how to work with multi-part documents,
208 that are not covered in the
212 and are discussed here.
215 \begin_layout Standard
216 This manual also documents some special features, like fax support, version
217 control, and SGML support, which require additional software to work properly.
218 There is also a chapter on LyX's support for HTML.
219 And lastly, there's a chapter of LaTeX tools and tips, things you can use
220 to spruce up your documents by directly using the powerful features of
226 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \begin_layout Standard
230 If you haven't read the
234 yet, you are definitely in the wrong manual.
239 is the first place to go, since it describes the notation and format of
241 You should also be thoroughly familiar with the
245 and all of the basic features of LyX before attempting to read this one.
248 \begin_layout Standard
249 Since many of the topics in this manual depend heavily on LyX's interaction
250 with LaTeX, this first chapter covers the inner workings of LyX and how
251 to direct LyX to generate exactly the LaTeX code you want.
252 It is obviously for more seasoned LyX users.
255 \begin_layout Chapter
259 \begin_layout Section
263 \begin_layout Standard
264 This chapter is for both TeX-nicians and the LaTeX-curious.
265 In it, we'll explain how LyX and LaTeX work together to produce printable
267 This is the only place in any of the manuals where we assume you know something
271 \begin_layout Standard
272 At one time, LyX was called a
273 \begin_inset Quotes eld
276 WYSIWYM frontend to LaTeX,
277 \begin_inset Quotes erd
280 but that's no longer true.
281 There are frontends to LaTeX out there.
285 \begin_layout Plain Layout
286 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
287 There are also the LaTeX modes for vi and emacs, of course.
292 These are basically text editors with the ability to run LaTeX and mark
293 any errors in the file you're editing.
302 run LaTeX, and it also indicates errors in the file, it also does much,
304 For one thing, you don't need to know LaTeX to use LyX effectively.
305 And LyX has added its own extensions to LaTeX.
306 Try the following sometime: select
307 \begin_inset Flex CharStyle:MenuItem
310 \begin_layout Plain Layout
311 Export\SpecialChar \menuseparator
318 \begin_inset Flex CharStyle:MenuItem
321 \begin_layout Plain Layout
328 \begin_inset Flex CharStyle:MenuItem
331 \begin_layout Plain Layout
332 View\SpecialChar \menuseparator
338 ), then look at the preamble of the resulting
339 \begin_inset Flex CharStyle:Code
342 \begin_layout Plain Layout
349 You'll notice a variety of new macros defined specifically by LyX.
350 These macros are defined automatically, according to the features you use
354 \begin_layout Standard
355 There are several commands that automatically invoke LaTeX.
359 \begin_layout Itemize
360 \begin_inset Flex CharStyle:MenuItem
363 \begin_layout Plain Layout
364 View\SpecialChar \menuseparator
373 \begin_layout Itemize
374 \begin_inset Flex CharStyle:MenuItem
377 \begin_layout Plain Layout
378 View\SpecialChar \menuseparator
379 Update\SpecialChar \menuseparator
388 \begin_layout Itemize
389 \begin_inset Flex CharStyle:MenuItem
392 \begin_layout Plain Layout
393 File\SpecialChar \menuseparator
402 \begin_layout Itemize
403 \begin_inset Flex CharStyle:MenuItem
406 \begin_layout Plain Layout
407 File\SpecialChar \menuseparator
416 \begin_layout Standard
417 They will only invoke LaTeX if the file has changed since the last time
422 \begin_layout Standard
423 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \begin_layout Enumerate
427 Convert the document to LaTeX and save to a file with the extension
428 \begin_inset Flex CharStyle:Code
431 \begin_layout Plain Layout
438 \begin_inset Flex CharStyle:Code
441 \begin_layout Plain Layout
450 \begin_layout Enumerate
452 \begin_inset Flex CharStyle:Code
455 \begin_layout Plain Layout
461 file (maybe several times), and run any other commands (such as
462 \begin_inset Flex CharStyle:Code
465 \begin_layout Plain Layout
472 \begin_inset Flex CharStyle:Code
475 \begin_layout Plain Layout
481 ) needed to compile the LaTeX file.
484 \begin_layout Enumerate
485 If there are any errors, show the error log.
488 \begin_layout Standard
489 If you've run LaTeX using
490 \begin_inset Flex CharStyle:MenuItem
493 \begin_layout Plain Layout
496 \SpecialChar \menuseparator
504 , LyX then runs a DVI viewer to display the DVI-file.
506 \begin_inset Flex CharStyle:MenuItem
509 \begin_layout Plain Layout
512 \SpecialChar \menuseparator
520 , LyX performs further steps:
523 \begin_layout Itemize
525 \begin_inset Flex CharStyle:Code
528 \begin_layout Plain Layout
534 to convert the DVI file to PostScript.
537 \begin_layout Itemize
538 Run a PostScript viewer, such as
539 \begin_inset Flex CharStyle:Code
542 \begin_layout Plain Layout
548 , to display the PostScript file.
551 \begin_layout Standard
552 LyX does similar things when viewing, or exporting, other formats.
555 \begin_layout Section
556 Translating LaTeX files into LyX
559 \begin_layout Standard
560 You can import a LaTeX file into LyX by using the
561 \begin_inset Flex CharStyle:MenuItem
564 \begin_layout Plain Layout
565 File\SpecialChar \menuseparator
566 Import\SpecialChar \menuseparator
573 This will call a program named
574 \begin_inset Flex CharStyle:Code
577 \begin_layout Plain Layout
583 which will create a file
584 \begin_inset Flex CharStyle:Code
587 \begin_layout Plain Layout
594 \begin_inset Flex CharStyle:Code
597 \begin_layout Plain Layout
604 LyX will then open that file.
608 \begin_layout Plain Layout
609 \begin_inset Flex CharStyle:Code
612 \begin_layout Plain Layout
618 can also be run from the command line, of course.
626 \begin_layout Standard
627 \begin_inset Flex CharStyle:Code
630 \begin_layout Plain Layout
636 will translate most legal LaTeX, but not everything.
637 It will put things it doesn't understand into TeX code, so after translating
639 \begin_inset Flex CharStyle:Code
642 \begin_layout Plain Layout
648 , you can look for TeX code and hand-edit it until it looks right.
651 \begin_layout Standard
652 If you don't know what TeX code is, read the next section.
655 \begin_layout Section
656 \begin_inset CommandInset label
658 name "sec:Inserting-TeX-Code"
662 Inserting TeX Code into LyX Documents
665 \begin_layout Standard
666 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
667 You can always insert TeX code into any LyX document.
668 LyX cannot, and will never be able to, display every possible LaTeX construct.
669 If ever you need to insert LaTeX commands into your LyX document, you can
671 \begin_inset Flex CharStyle:Code
674 \begin_layout Plain Layout
680 box, which you can insert into your document with
681 \begin_inset Flex CharStyle:MenuItem
684 \begin_layout Plain Layout
685 Insert\SpecialChar \menuseparator
694 \begin_layout Standard
695 Here's an example of inserting LaTeX commands in a LyX document.
696 The code looks like this:
699 \begin_layout LyX-Code
703 \begin_inset Newline newline
709 \begin_inset Newline newline
712 This is an example for a minipage environment.
714 \begin_inset Newline newline
717 can put nearly everything in it, even (non-floating)
718 \begin_inset Newline newline
723 \begin_inset Newline newline
729 \begin_inset Newline newline
733 \begin_inset Newline newline
739 \begin_inset Newline newline
745 \begin_inset Newline newline
751 \begin_inset Newline newline
756 \begin_inset Newline newline
762 \begin_inset Newline newline
768 \begin_inset Newline newline
774 \begin_inset Newline newline
782 \begin_layout LyX-Code
786 \begin_layout Standard
788 \begin_inset Flex CharStyle:Code
791 \begin_layout Plain Layout
797 box containing this text is directly after this paragraph.
798 Those of you reading the manual in LyX will only see the TeX code inset.
799 Those reading a printed version of the manuals will see the actual results:
802 \begin_layout Standard
806 \begin_layout Plain Layout
813 \begin_layout Plain Layout
820 \begin_layout Plain Layout
822 This is an example for a minipage environment.
823 You can put nearly everything in it, even (non-floating) figures and tables.
827 \begin_layout Plain Layout
834 \begin_layout Plain Layout
839 \begin_layout Plain Layout
846 \begin_layout Plain Layout
853 \begin_layout Plain Layout
860 \begin_layout Plain Layout
866 \begin_layout Plain Layout
873 \begin_layout Plain Layout
880 \begin_layout Plain Layout
887 \begin_layout Plain Layout
899 \begin_layout Standard
900 In addition to using TeX code, you can also create a separate file containing
901 some complex LaTeX structure and then use
902 \begin_inset Flex CharStyle:MenuItem
905 \begin_layout Plain Layout
906 Insert\SpecialChar \menuseparator
916 to include your file (you should select the type
917 \begin_inset Flex CharStyle:Code
920 \begin_layout Plain Layout
927 We recommend that you only do this if you have a
928 \begin_inset Flex CharStyle:Code
931 \begin_layout Plain Layout
942 Otherwise, you'll have a big job tracking down LaTeX errors.
945 \begin_layout Standard
946 There are a few last points to emphasize:
949 \begin_layout Itemize
954 check if your LaTeX code is correct.
957 \begin_layout Itemize
958 Beware reinventing the wheel.
961 \begin_layout Standard
962 On that last point, LyX does have quite a few features tucked into it, and
964 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
965 feature before you decide you have to do it by hand.
966 Moreover, there are numerous LaTeX packages out there to do all sorts of
967 things, from labels to envelopes to fancy multipage tables.
969 \begin_inset CommandInset href
972 target "http://www.ctan.org/"
976 for details, and see chapter
977 \begin_inset CommandInset ref
979 reference "cha:secrets"
986 \begin_layout Standard
987 If you do need to do some wild and fancy things within your document, be
988 sure to check out a good LaTeX book for assistance.
989 There are a number of them listed in the bibliography of the
996 \begin_layout Section
997 LyX and the LaTeX Preamble
1000 \begin_layout Subsection
1001 About the LaTeX Preamble
1004 \begin_layout Standard
1005 If you already know LaTeX, there is no need to explain here what the preamble
1007 If you don't, the following will give you some ideas—we recommend again
1008 that you consult a LaTeX book for further information.
1009 In any case, you should read the points below, because they explain what
1010 you can do and what you don't need to do in the LaTeX preamble of a LyX
1014 \begin_layout Standard
1015 The LaTeX preamble comes at the very beginning of a document,
1023 \begin_layout Itemize
1024 Declare the document class.
1026 \begin_inset Newline newline
1029 LyX already does this for you.
1030 If you're a seasoned LaTeX-nician, and you have a custom document class
1031 you want to use, check out the
1033 Customization Manual
1035 for information on how to make LyX interface to it.
1038 \begin_layout Itemize
1039 Declare the usage of packages.
1041 \begin_inset Newline newline
1044 LaTeX packages provide special commands, which are only available within
1045 a document when the package has been declared in the preamble.
1046 For example, the package
1047 \begin_inset Flex CharStyle:Code
1050 \begin_layout Plain Layout
1056 forces all paragraphs to be indented.
1057 There are other packages for labels, envelopes, margins, etc.
1061 \begin_layout Itemize
1062 Set counters, variables, lengths and widths.
1064 \begin_inset Newline newline
1067 There are several LaTeX counters and variables which
1071 be set globally from within the preamble in order to have the desired effect.
1072 (There are variables which you can set and reset inside the document, too.)
1073 Margins are a good example of something which must be set in the preamble.
1074 Another example is the label format for lists.
1075 You can actually set these just about anywhere, but it's best to do it
1076 just once, inside the preamble.
1079 \begin_layout Itemize
1080 Declare user defined commands (with
1081 \begin_inset Flex CharStyle:Code
1084 \begin_layout Plain Layout
1093 \begin_inset Flex CharStyle:Code
1096 \begin_layout Plain Layout
1105 \begin_inset Newline newline
1108 These are abbreviations for LaTeX commands which appear very often inside
1110 Although the preamble is a good place to declare such commands, they
1114 be declared anywhere (before they are used for the first time, of course).
1115 This can be useful if there is a lot of raw LaTeX code in your document,
1116 which normally should not be the case.
1119 \begin_layout Standard
1120 LyX adds its own set of definitions to the preamble of the
1121 \begin_inset Flex CharStyle:Code
1124 \begin_layout Plain Layout
1131 This makes LaTeX files generated by LyX portable.
1134 \begin_layout Subsection
1135 Changing the Preamble
1138 \begin_layout Standard
1139 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1140 can't change them without patching LyX itself.
1141 You can, however, add your own stuff to the preamble by selecting
1142 \begin_inset Flex CharStyle:MenuItem
1145 \begin_layout Plain Layout
1147 \begin_inset space ~
1156 \begin_inset Flex CharStyle:MenuItem
1159 \begin_layout Plain Layout
1160 Document\SpecialChar \menuseparator
1167 LyX adds anything in the
1168 \begin_inset Flex CharStyle:MenuItem
1171 \begin_layout Plain Layout
1177 dialog to its own built-in preamble.
1178 Before adding your own declarations in the preamble, you should make sure
1179 that LyX doesn't already support what you want to do.
1180 (Remember what we said about reinventing the wheel?) Also,
1182 make sure your preamble code is correct
1185 LyX doesn't check it for you.
1186 If there is an error, you're likely to get an error like
1187 \begin_inset Quotes eld
1191 \begin_inset Flex CharStyle:Code
1194 \begin_layout Plain Layout
1203 \begin_inset Quotes erd
1207 If you see this error, check your preamble.
1210 \begin_layout Subsection
1214 \begin_layout Standard
1215 Here are some examples of what you can add to a preamble, and what they
1219 \begin_layout Subsubsection
1223 \begin_layout Standard
1224 There are two variables under LaTeX that control page position:
1225 \begin_inset Flex CharStyle:Code
1228 \begin_layout Plain Layout
1237 \begin_inset Flex CharStyle:Code
1240 \begin_layout Plain Layout
1249 Their names should be self-explanatory.
1250 These variables are useful if you think for a moment about computer labels.
1251 Sometimes, the size of a print medium and the area of the medium that you
1252 can actually print on aren't the same.
1254 \begin_inset Flex CharStyle:Code
1257 \begin_layout Plain Layout
1266 \begin_inset Flex CharStyle:Code
1269 \begin_layout Plain Layout
1280 \begin_layout Standard
1281 The default values for
1282 \begin_inset Flex CharStyle:Code
1285 \begin_layout Plain Layout
1294 \begin_inset Flex CharStyle:Code
1297 \begin_layout Plain Layout
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \thinspace{}
1314 \begin_inset space \space{}
1317 the page isn't shifted.
1318 Unfortunately, some DVI drivers always seem to shift the page.
1319 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1320 If you're using LyX on a system that you don't personally maintain, and
1321 your sysadmin is a doofus,
1322 \begin_inset Flex CharStyle:Code
1325 \begin_layout Plain Layout
1334 \begin_inset Flex CharStyle:Code
1337 \begin_layout Plain Layout
1346 Suppose you're left and top margins are always 0.5
1347 \begin_inset space \thinspace{}
1351 You can add this to the preamble:
1354 \begin_layout LyX-Code
1362 \begin_layout LyX-Code
1370 \begin_layout Standard
1371 and your margins should now be correct.
1374 \begin_layout Subsubsection
1378 \begin_layout Standard
1379 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1380 There's a rather nice package, available at your nearest CTAN archive,
1381 for printing sheets of labels:
1382 \begin_inset Flex CharStyle:Code
1385 \begin_layout Plain Layout
1392 Now, your system may not have this package installed by default.
1393 We leave that up to you to check.
1394 You'll also want to read the documentation for it; we're not going to do
1396 Since this is an example, however, we'll give you an example of how you
1400 \begin_layout Standard
1401 First, make sure you're using the
1402 \begin_inset Flex CharStyle:Code
1405 \begin_layout Plain Layout
1412 Next, you need to put the following in your preamble:
1415 \begin_layout LyX-Code
1421 \begin_layout LyX-Code
1427 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1439 \begin_layout LyX-Code
1445 \begin_layout LyX-Code
1451 \begin_layout LyX-Code
1457 \begin_layout Standard
1458 This sets things up for Avery label sheets, stock #5360.
1459 You're now ready to print labels, but you'll need to insert LaTeX code,
1460 placing the commands
1461 \begin_inset Flex CharStyle:Code
1464 \begin_layout Plain Layout
1473 \begin_inset Flex CharStyle:Code
1476 \begin_layout Plain Layout
1484 around each label text.
1485 This and other special features of
1486 \begin_inset Flex CharStyle:Code
1489 \begin_layout Plain Layout
1495 are explained in its documentation.
1498 \begin_layout Standard
1499 Someday, someone may write a LyX layout file to support this package directly.
1500 Maybe that someone is you.
1503 \begin_layout Subsubsection
1504 Example #3: Paragraph Indentation
1507 \begin_layout Standard
1508 Americans are trained to indent the first line of
1513 As with all of their other weird quirks, most Americans will whine and
1514 moan until they can have their way and indent the first line of all paragraphs.
1523 \begin_layout Standard
1524 Of course, this behavior isn't standard typography.
1525 In books, you typically only indent the first line of a paragraph
1529 it follows another one.
1530 The idea behind indenting the first line of a paragraph is to distinguish
1531 neighboring paragraphs from one another.
1532 If there is no previous paragraph—for example, if it follows a figure or
1533 is the first paragraph in a section—then there is no need for indentation.
1537 \begin_layout Standard
1538 If you're a typical American (we're still joking!), though, you don't care
1539 about such esoteric things; you want your indentation! Add this to the
1543 \begin_layout LyX-Code
1546 usepackage{indentfirst}
1549 \begin_layout Standard
1550 If your TeX distribution isn't braindead, you'll have this package, and
1551 all of your paragraphs will get the indentation the Founding Fathers intended
1555 \begin_layout Subsubsection
1556 Example #4: This Document
1559 \begin_layout Standard
1560 You can also check out the preamble of this document to get an idea of some
1561 of the advanced things you can do.
1562 Also, there are more examples and an assortment of LaTeX
1563 \begin_inset Quotes eld
1567 \begin_inset Quotes erd
1571 \begin_inset space ~
1575 \begin_inset CommandInset ref
1577 reference "cha:secrets"
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592 It then uses the logfile from the LaTeX run to do a post-mortem.
1593 After analyzing the logfile,LyX displays a dialog listing the errors.
1594 Clicking on any one of them will take you to the position in your LyX file
1595 where the error occurred.
1599 \begin_layout Plain Layout
1601 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603 There are also cases where LaTeX reports the error on one line, but the
1604 actual error is earlier.
1605 This is not unlike forgetting a closing brace in a program: You'll get
1606 an error, but only later.
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1617 \begin_inset Flex CharStyle:MenuItem
1620 \begin_layout Plain Layout
1623 \SpecialChar \menuseparator
1627 \begin_inset space ~
1636 There are some fairly common error messages and warnings.
1637 We'll cover those here.
1638 You should look at a good LaTeX book for a complete listing.
1641 \begin_layout Itemize
1642 \begin_inset Flex CharStyle:Code
1645 \begin_layout Plain Layout
1652 \begin_inset Newline newline
1655 Anything beginning with these words is a warning message for the purpose
1657 \begin_inset Quotes eld
1661 \begin_inset Quotes erd
1664 the LaTeX code itself.
1665 You'll get messages like this if you added or changed cross-references
1666 or bibliography entries, in which case, LaTeX is trying to tell you that
1667 you need to make another run.
1668 You can by-and-large ignore these.
1671 \begin_layout Itemize
1672 \begin_inset Flex CharStyle:Code
1675 \begin_layout Plain Layout
1682 \begin_inset Newline newline
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686 The rest of the message will often say something about a replacement font
1688 You can safely ignore these, too.
1691 \begin_layout Itemize
1692 \begin_inset Flex CharStyle:Code
1695 \begin_layout Plain Layout
1704 \begin_inset Newline newline
1712 They are warnings about lines that were too long and run past the right
1714 Almost always, this is unnoticeable in the final output.
1715 (It can be just a point or two.) Or, only one or two characters extend past
1717 LaTeX seems to generate at least one of these messages for just about any
1719 \begin_inset Newline newline
1722 You can ignore these messages.
1723 Your eyes will tell you if there's a problem with something that's too
1724 wide; just look at the output.
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in
1730 \begin_inset Flex CharStyle:MenuItem
1733 \begin_layout Plain Layout
1736 \SpecialChar \menuseparator
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1752 \begin_layout Itemize
1753 \begin_inset Flex CharStyle:Code
1756 \begin_layout Plain Layout
1765 \begin_inset Newline newline
1768 Not quite as common as its cousin.
1769 LaTeX seems to like to print lines that are a bit too wide as opposed to
1770 ones that are a bit too narrow.
1771 We have no idea why.
1774 \begin_layout Itemize
1775 \begin_inset Flex CharStyle:Code
1778 \begin_layout Plain Layout
1787 \begin_inset Flex CharStyle:Code
1790 \begin_layout Plain Layout
1799 \begin_inset Newline newline
1802 Warnings about troubles breaking the page.
1803 Once again, just look at the output.
1804 Your eyes will tell you where something has gone wrong.
1807 \begin_layout Itemize
1808 \begin_inset Flex CharStyle:Code
1811 \begin_layout Plain Layout
1813 \begin_inset Quotes els
1817 \begin_inset Quotes ers
1826 \begin_inset Newline newline
1830 \begin_inset Quotes eld
1834 \begin_inset Quotes erd
1837 isn't installed on this system.
1838 This usually appears because some package your document needs isn't installed.
1839 If you didn't touch the preamble or didn't use the
1840 \begin_inset Flex CharStyle:Code
1843 \begin_layout Plain Layout
1851 command, then one of the packages LyX tried to load is missing.
1853 \begin_inset Flex CharStyle:MenuItem
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1863 to get a list of packages that LyX knows about.
1864 This file is updated whenever you reconfigure LyX (using
1865 \begin_inset Flex CharStyle:MenuItem
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1880 \begin_inset Flex CharStyle:Code
1883 \begin_layout Plain Layout
1891 command and the package in question isn't installed, then you'll need to
1892 install it yourself.
1895 \begin_layout Itemize
1896 \begin_inset Flex CharStyle:Code
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1906 \begin_inset Newline newline
1909 Error messages beginning with this are trying to tell you that you specified
1910 a bad or undefined option to a package.
1911 Check the package's documentation.
1914 \begin_layout Itemize
1915 \begin_inset Flex CharStyle:Code
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1925 \begin_inset Newline newline
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1930 You may have forgotten to load a package.
1931 In any case, this error message usually means that you used an undefined
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938 Some are self-explanatory.
1939 These are usually LaTeX messages.
1940 Others are downright cryptic.
1941 These are usually TeX error messages, and we really have
1945 what they mean or how to decipher them.
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963 especially if you see a
1964 \begin_inset Quotes eld
1968 \begin_inset Flex CharStyle:Code
1971 \begin_layout Plain Layout
1980 \begin_inset Quotes erd
1983 error—it means that there are errors in the preamble.
1984 Start debugging your preamble.
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989 to the document, the first suspect is your LaTeX distribution itself.
1990 Check for missing packages and install them.
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995 Did you use any of the fine-tuning options in LyX? Specifically, did you
2000 any of them, like trying to manually insert lots of
2001 \begin_inset Flex CharStyle:Code
2004 \begin_layout Plain Layout
2006 \begin_inset space ~
2015 \begin_inset Flex CharStyle:Code
2018 \begin_layout Plain Layout
2025 \begin_inset Flex CharStyle:Code
2028 \begin_layout Plain Layout
2034 ? Did you try to kludge something together with these instead of using the
2035 appropriate paragraph environment?
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2041 Did you try to pull a fancy maneuver? Did you do something funky inside
2042 a table or an equation, like inserting a graphic into a table cell?
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047 a line? By default, LaTeX is rather strict about how much extra inter-word
2048 spacing it will add in order to break a line.
2049 Preferably, you should rework the paragraph to avoid the problem.
2050 If this isn't an option, you can wrap your text in
2051 \begin_inset Flex CharStyle:Code
2054 \begin_layout Plain Layout
2062 to make LaTeX's line breaking more, well, sloppy.
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067 make sure you're in the limits for nesting environments.
2068 If you nested a bunch of environments to the
2069 \begin_inset Formula $17^{\mathrm{th}}$
2072 level, that's the problem.
2073 (The limit in LaTeX is five.)
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078 If you have a table or figure that's too wide or long for the page, you
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \begin_layout Standard
2098 If all this doesn't help—well, then
2102 you might have found a bug in LyX\SpecialChar \ldots{}
2106 \begin_layout Chapter
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2118 Bibliography databases (BibTeX)
2125 The following subsections explain special bibliography features supported
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2139 \begin_inset space \space{}
2143 \begin_inset Quotes eld
2147 \begin_inset Quotes erd
2150 ) to refer to a cited work.
2151 However, in many scientific disciplines, other citation styles are in use.
2152 The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2157 \begin_inset space \space{}
2161 \begin_inset Quotes eld
2165 \begin_inset Quotes erd
2169 LyX supports two packages that provide this style,
2170 \begin_inset Flex CharStyle:Code
2173 \begin_layout Plain Layout
2180 \begin_inset Flex CharStyle:Code
2183 \begin_layout Plain Layout
2190 Both packages have their pros and cons, which cannot be listed in detail.
2191 If you only want to have simple author-year (or author-numerical) style,
2192 or if you want to use one of the countless style files for
2193 \begin_inset Flex CharStyle:Code
2196 \begin_layout Plain Layout
2202 , than the established
2203 \begin_inset Flex CharStyle:Code
2206 \begin_layout Plain Layout
2212 package is probably your choice.
2213 If you need special features like short title references, ibidem etc., you
2215 \begin_inset Flex CharStyle:Code
2218 \begin_layout Plain Layout
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2230 \begin_inset Flex CharStyle:MenuItem
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2241 \begin_inset Flex CharStyle:MenuItem
2244 \begin_layout Plain Layout
2251 \begin_inset Flex CharStyle:MenuItem
2254 \begin_layout Plain Layout
2261 \begin_inset Flex CharStyle:MenuItem
2264 \begin_layout Plain Layout
2271 With both packages, you will get some extra features in the citation dialog
2272 and you can select the style of the reference (
2273 \begin_inset Quotes eld
2277 \begin_inset Quotes erd
2281 \begin_inset Quotes eld
2285 \begin_inset Quotes erd
2289 \begin_inset Quotes eld
2293 \begin_inset Quotes erd
2297 \begin_inset Quotes eld
2301 \begin_inset Quotes erd
2305 Note that both packages need specifically designed style files.
2306 They both ship their own, but there are lots of additional style files,
2307 and there is even an interactive style file builder
2311 \begin_layout Plain Layout
2313 \begin_inset Flex URL
2316 \begin_layout Plain Layout
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2329 \begin_inset Flex CharStyle:Code
2332 \begin_layout Plain Layout
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347 If you are for instance a historian, the possibility to separate sources
2348 and scientific works is most likely a
2349 \begin_inset Quotes eld
2353 \begin_inset Quotes erd
2357 Unfortunately, BibTeX itself does not allow you to do this.
2358 But with the help of some LaTeX packages, BibTeX can be extended to fit
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages,
2371 \begin_layout Plain Layout
2373 \begin_inset Flex URL
2376 \begin_layout Plain Layout
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2388 The advantage of this package (compared to other packages like
2392 ) is that you don't need to define new citation commands.
2393 Instead, you need to prepare different bibliographic databases which include
2394 the entries for the different sections of the bibliography.
2395 For example: If you want to divide your bibliography into the sections
2397 \begin_inset Quotes eld
2401 \begin_inset Quotes erd
2405 \begin_inset Quotes eld
2409 \begin_inset Quotes erd
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2417 \begin_inset space \space{}
2421 \begin_inset Flex CharStyle:Code
2424 \begin_layout Plain Layout
2431 \begin_inset Flex CharStyle:Code
2434 \begin_layout Plain Layout
2444 \begin_layout Standard
2446 \begin_inset Flex CharStyle:MenuItem
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2457 \begin_inset Flex CharStyle:MenuItem
2460 \begin_layout Plain Layout
2467 \begin_inset Flex CharStyle:MenuItem
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2477 Now you can insert multiple BibTeX bibliographies, one for each section
2478 of your bibliography.
2479 Returning to our example: Insert the BibTeX bibliography
2480 \begin_inset Flex CharStyle:Code
2483 \begin_layout Plain Layout
2489 and a second one for the database
2490 \begin_inset Flex CharStyle:Code
2493 \begin_layout Plain Layout
2500 You are free to use the same or different styles for each section.
2501 Additionally, you can chose if the bibliography section should contain
2503 \begin_inset Quotes eld
2506 all cited references
2507 \begin_inset Quotes erd
2510 of the specified database(s) (which is the default),
2511 \begin_inset Quotes eld
2514 all uncited references
2515 \begin_inset Quotes erd
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 This might be useful if you would like to separate your bibliography into
2529 \begin_inset Quotes eld
2533 \begin_inset Quotes erd
2537 \begin_inset Quotes eld
2541 \begin_inset Quotes erd
2545 \begin_inset Quotes eld
2549 \begin_inset Quotes erd
2553 The titles for the sections can be added as ordinary sections or subsections.
2555 \begin_inset Flex CharStyle:Code
2558 \begin_layout Plain Layout
2564 removes the bibliography title, you have manually re-add that, too (as
2565 a chapter* or section*, for instance).
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2578 \begin_inset space \space{}
2581 a bibliography for each section or chapter of the document, are not supported
2584 \begin_inset Flex CharStyle:Code
2587 \begin_layout Plain Layout
2593 package, which is used for the creation of sectioned bibliographies in
2594 LyX (see the previous section), provides an easy way to solve this task,
2595 if you are willing to use some
2596 \begin_inset Flex CharStyle:MenuItem
2599 \begin_layout Plain Layout
2606 \begin_inset space ~
2610 \begin_inset CommandInset ref
2612 reference "sec:Inserting-TeX-Code"
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the
2622 \begin_inset Flex CharStyle:Code
2625 \begin_layout Plain Layout
2632 \begin_inset Flex CharStyle:Code
2635 \begin_layout Plain Layout
2641 package, respectively.
2649 \begin_layout Standard
2651 \begin_inset Flex CharStyle:MenuItem
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2662 \begin_inset Flex CharStyle:MenuItem
2665 \begin_layout Plain Layout
2672 \begin_inset Flex CharStyle:MenuItem
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2682 In the document, you have to enclose the sections, which shall contain
2683 their own bibliography (including the BibTeX bibliography itself), between
2685 \begin_inset Flex CharStyle:Code
2688 \begin_layout Plain Layout
2697 \begin_inset Flex CharStyle:Code
2700 \begin_layout Plain Layout
2708 (those commands have to be inserted as TeX code).
2709 The bibliography will contain all references which have been cited in the
2711 \begin_inset Flex CharStyle:Code
2714 \begin_layout Plain Layout
2725 If you are using this approach, then every citation reference has to be
2727 \begin_inset Flex CharStyle:Code
2730 \begin_layout Plain Layout
2738 \begin_inset Flex CharStyle:Code
2741 \begin_layout Plain Layout
2750 \begin_layout Section
2754 \begin_layout Subsection
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760 to break up the document into several files, or perhaps you have something
2761 where a table may change from time to time, but the preceding text does
2763 In these cases, you should seriously consider using multipart documents.
2764 For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766 Each of these could be its own separate LyX file, with one
2767 \begin_inset Quotes eld
2771 \begin_inset Quotes erd
2774 file which contains the title, authors, abstract, references, etc., plus
2775 the five included files.
2776 It is important to note that each of these files is a full LyX file which
2777 can be formatted and printed on its own, as well as included in a master
2779 Each of these files must have the same document class, however—don't attempt
2780 to mix book classes with article classes.
2781 You may also include LaTeX files; however, these files must not have their
2783 \begin_inset space \thinspace{}
2787 \begin_inset space \space{}
2790 everything up to and including the
2791 \begin_inset Flex CharStyle:Code
2794 \begin_layout Plain Layout
2803 \begin_inset Flex CharStyle:Code
2806 \begin_layout Plain Layout
2814 line must be deleted) or else errors will be generated when you try to
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with
2820 \begin_inset Flex CharStyle:MenuItem
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2826 \begin_inset space ~
2835 When you click on this selection a small box is inserted into the file
2836 at the current cursor location.
2837 Clicking on the box raises a dialog which allows you to select the file
2838 to be included, and the method of its inclusion.
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844 The three inclusion methods are
2845 \begin_inset Quotes eld
2849 \begin_inset Quotes erd
2853 \begin_inset Quotes eld
2857 \begin_inset Quotes erd
2861 \begin_inset Quotes eld
2865 \begin_inset Quotes erd
2869 The difference between
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2885 is really only meaningful to LaTeXperts, but the practical difference is
2886 that files which are
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 are typeset beginning on a new page, while files which are
2895 \begin_inset Quotes eld
2899 \begin_inset Quotes erd
2902 are typeset starting on the current page.
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files which do not have
2908 all the preamble information.
2911 \begin_layout Standard
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2920 included file allows you to include a file typeset exactly as it appears
2922 \begin_inset space \thinspace{}
2926 \begin_inset space \space{}
2930 \begin_inset Flex CharStyle:Code
2933 \begin_layout Plain Layout
2939 mode, with the characters set in a fixed-width typewriter font.
2940 Normally, spaces in this file are invisible, though two consecutive spaces
2941 are conserved, unlike LyX's normal treatment of spaces.
2942 However, setting the
2943 \begin_inset Flex CharStyle:MenuItem
2946 \begin_layout Plain Layout
2948 \begin_inset space ~
2952 \begin_inset space ~
2956 \begin_inset space ~
2964 checkbox typesets a mark to unambiguously define the presence of a space.
2968 \begin_layout Subsection
2969 Cross-References Between Files
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2983 height_special "totalheight"
2986 \begin_layout Plain Layout
2987 This section is somewhat out of date.
2988 Need to describe default master documents and how children are opened when
2998 \begin_layout Standard
2999 It is possible to set up cross-references between the different files.
3000 First, open all the files in question: let's call them A and B in a two
3001 file example, where B is included in A.
3002 Let's say you insert a label in A, then want to reference it in B.
3003 Open the cross-reference dialog in whilst in document B, and you can select
3005 \begin_inset Quotes eld
3009 \begin_inset Quotes erd
3015 \begin_layout Subsection
3016 Bibliography Lists in all Subdocuments
3019 \begin_layout Standard
3020 \begin_inset Box Frameless
3030 height_special "totalheight"
3033 \begin_layout Plain Layout
3034 This section also needs updating.
3035 There is now material about this on the wiki, and it could be copied here.
3043 \begin_layout Standard
3044 Copy the bibliography list with all entries to all subdocuments and transform
3046 This way LyX will find the
3047 \begin_inset Flex CharStyle:Code
3050 \begin_layout Plain Layout
3056 -files and you can easily insert references without making the bibliography
3060 \begin_layout Standard
3061 As the bibliography list is in a comment, LaTeX won't use use it and the
3062 references will look like this: [?], instead of like this: [1].
3063 One solution is to use the LaTeX-package
3064 \begin_inset Flex CharStyle:Code
3067 \begin_layout Plain Layout
3073 that will only include comments by processing the files separately.
3074 To do this, add in the LaTeX preamble of every subdocument the following:
3077 \begin_layout LyX-Code
3083 \begin_layout LyX-Code
3086 includecomment{comment}
3089 \begin_layout Standard
3091 \begin_inset Flex URL
3094 \begin_layout Plain Layout
3096 http://wiki.lyx.org/FAQ/Unsorted#toc31
3104 \begin_layout Section
3105 Fancy Headers and Footers
3108 \begin_layout Standard
3109 The default page layout is rather plain; for an
3110 \begin_inset Flex CharStyle:Code
3113 \begin_layout Plain Layout
3119 document class, all you get is a centered page number at the bottom of
3121 This document uses KOMA-script's book class, so it appears to be a bit
3123 But to really put on a show, you need to set the document page style to
3125 \begin_inset Quotes eld
3129 \begin_inset Quotes erd
3132 , as mentioned in the
3137 This section describes the LaTeX code you need to insert in your LaTeX
3138 preamble in order to get the desired effects.
3141 \begin_layout Standard
3142 For more information on fancy headers, see the
3143 \begin_inset Flex CharStyle:Code
3146 \begin_layout Plain Layout
3152 package documentation.
3154 \begin_inset Flex URL
3157 \begin_layout Plain Layout
3159 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3167 \begin_layout Standard
3168 The page header is divided into three fields, not surprisingly labeled
3169 \begin_inset Quotes eld
3173 \begin_inset Quotes erd
3177 \begin_inset Quotes eld
3181 \begin_inset Quotes erd
3185 \begin_inset Quotes eld
3189 \begin_inset Quotes erd
3193 The footer is also divided into these three fields.
3194 The LaTeX commands to set these fields in the simplest manner are
3195 \begin_inset Flex CharStyle:Code
3198 \begin_layout Plain Layout
3207 \begin_inset Flex CharStyle:Code
3210 \begin_layout Plain Layout
3219 \begin_inset Flex CharStyle:Code
3222 \begin_layout Plain Layout
3231 \begin_inset Flex CharStyle:Code
3234 \begin_layout Plain Layout
3243 Suppose you wish to put your name in the upper left hand corner of each
3245 Simply insert the following command in the preamble:
3248 \begin_layout Standard
3257 \begin_layout Standard
3258 You will now see your name in the upper left.
3259 If a field has a default entry that you would like to get rid of (often
3260 the page number appears in the central footer, simply include a command
3261 with a blank argument, e.
3262 \begin_inset space \thinspace{}
3268 \begin_layout Standard
3276 \begin_layout Standard
3277 Let's get really fancy: lets put the section number with the word
3278 \begin_inset Quotes eld
3282 \begin_inset Quotes erd
3286 \begin_inset space \thinspace{}
3290 \begin_inset space \space{}
3293 Section 3) in the upper left, the page number (e.
3294 \begin_inset space \thinspace{}
3298 \begin_inset space \space{}
3301 Page 4) in the upper right, your name in the lower left, and the date in
3303 The following commands should now appear in the preamble:
3306 \begin_layout Standard
3316 \begin_layout Standard
3324 \begin_layout Standard
3334 \begin_layout Standard
3343 \begin_layout Standard
3351 \begin_layout Standard
3361 \begin_layout Standard
3363 \begin_inset Flex CharStyle:Code
3366 \begin_layout Plain Layout
3375 \begin_inset Flex CharStyle:Code
3378 \begin_layout Plain Layout
3386 access LaTeX's section and page counters, and so print out the current
3387 section and page numbers.
3389 \begin_inset Flex CharStyle:Code
3392 \begin_layout Plain Layout
3400 simply prints out today's date.
3403 \begin_layout Standard
3404 The thicknesses of the horizontal rules drawn beneath the header and above
3405 the footer can also be modified.
3406 If you don't want one of the rules, set its thickness to 0.
3407 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3413 \begin_inset Flex CharStyle:Code
3416 \begin_layout Plain Layout
3421 headrulewidth}{0.4pt}
3427 \begin_inset Flex CharStyle:Code
3430 \begin_layout Plain Layout
3435 footrulewidth}{0.4pt}
3440 to set the thicknesses.
3443 \begin_layout Standard
3444 You can switch the header/footer settings on and off for individual pages
3446 \begin_inset Flex CharStyle:Code
3449 \begin_layout Plain Layout
3452 thispagestyle{empty}
3458 \begin_inset Flex CharStyle:Code
3461 \begin_layout Plain Layout
3464 thispagestyle{plain}
3470 \begin_inset Flex CharStyle:Code
3473 \begin_layout Plain Layout
3476 thispagestyle{fancy}
3482 Simply insert them in the text on the page you want changed and mark them
3484 In fact, title pages are marked as plain by default, while following pages
3485 are marked fancy when using the global fancy setting.
3488 \begin_layout Standard
3489 As a final example, it is possible to include an image in the header or
3491 Suppose you want to put a company logo in the upper lefthand corner.
3492 You might try something like
3495 \begin_layout Standard
3504 includegraphics{logo.eps}}}
3507 \begin_layout Standard
3509 (you may need to preface this with
3510 \begin_inset Flex CharStyle:Code
3513 \begin_layout Plain Layout
3517 usepackage{graphics}
3522 if you don't include graphics elsewhere in your document).
3525 \begin_layout Section
3526 Itemize Bullet Selection
3527 \begin_inset CommandInset label
3536 \begin_layout Standard
3542 \begin_layout Subsection
3546 \begin_layout Standard
3547 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3548 Using this dialog you can easily specify what bullet shape to use at each
3549 level of an itemized list.
3550 These settings are document-wide so you won't be able to specify different
3551 sets of bullets for different paragraphs.
3555 \begin_layout Plain Layout
3556 Well, actually you can but you'll have to do it by hand.
3564 \begin_layout Subsection
3568 \begin_layout Standard
3569 Open the dialog by selecting the
3570 \begin_inset Flex CharStyle:MenuItem
3573 \begin_layout Plain Layout
3574 Document\SpecialChar \menuseparator
3580 menu item and then select the
3581 \begin_inset Flex CharStyle:MenuItem
3584 \begin_layout Plain Layout
3593 \begin_layout Standard
3594 The dialog provides you with a table of bullet shapes.
3595 A column of buttons on the left of the table provides access to the six
3596 different panels of bullet shapes.
3597 The row of buttons across the top is used to select which bullet depth
3599 A text entry under the table shows the currently selected bullet shape's
3600 LaTeX equivalent and this can be edited if desired.
3601 If you do modify the text you will also need to specify any needed packages
3602 in the LaTeX preamble.
3605 \begin_layout Standard
3606 The six panels are divided up by the packages they require.
3607 The following table shows the mappings from button name to LaTeX packages.
3610 \begin_layout Standard
3612 \begin_inset Tabular
3613 <lyxtabular version="3" rows="7" columns="2">
3614 <features tabularvalignment="middle">
3615 <column alignment="center" valignment="top" width="0pt">
3616 <column alignment="center" valignment="top" width="0pt">
3618 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3621 \begin_layout Plain Layout
3636 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3639 \begin_layout Plain Layout
3656 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3659 \begin_layout Plain Layout
3674 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3677 \begin_layout Plain Layout
3693 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3696 \begin_layout Plain Layout
3711 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3714 \begin_layout Plain Layout
3731 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3734 \begin_layout Plain Layout
3749 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3752 \begin_layout Plain Layout
3769 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3772 \begin_layout Plain Layout
3787 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3790 \begin_layout Plain Layout
3807 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3810 \begin_layout Plain Layout
3825 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3828 \begin_layout Plain Layout
3845 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3848 \begin_layout Plain Layout
3863 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3866 \begin_layout Plain Layout
3889 \begin_layout Standard
3890 LyX doesn't stop you using bullets from packages you don't have.
3891 If you get errors from LaTeX when you try to view or print the file, then
3892 it is likely you are missing a package.
3896 \begin_layout Plain Layout
3897 LyX doesn't restrict your use since you may be editing locally and exporting
3906 \begin_layout Subsection
3910 \begin_layout Standard
3911 Select which bullet depth you want to change then select the bullet shape
3913 Any changes will not be visible in LyX, but are visible when viewing the
3917 \begin_layout Standard
3918 You can reset a bullet shape to the default simply by clicking your right
3919 mouse button on the appropriate bullet depth button.
3923 \begin_layout Plain Layout
3928 want to have multiple sets of paragraphs with different sets of bullets
3929 in each, then you're going to have to get your hands dirty with TeX code.
3930 The bullet selection dialog can help though because it provides you with
3931 the LaTeX code for a wide range of bullet shapes.
3932 To make your own custom paragraphs you have the following options:
3935 \begin_layout Plain Layout
3939 \begin_layout Plain Layout
3955 \begin_layout Plain Layout
3959 \begin_layout Plain Layout
3981 \begin_layout Itemize
3982 Use the LaTeX command
3983 \begin_inset Flex CharStyle:Code
3986 \begin_layout Plain Layout
3994 to specify a new bullet shape for a given depth.
3995 You'll also need to save the current bullet shape so you can restore it
3997 In this itemized list the following LaTeX code was used to change the bullet
3998 used for the first depth.
4002 \begin_layout LyX-Code
4012 \begin_layout LyX-Code
4029 \begin_layout Itemize
4030 Note that the itemize depth is specified in Roman numerals as part of the
4040 \begin_layout Itemize
4044 \begin_layout Plain Layout
4057 Specify each individual entry by starting each item with the bullet shape
4058 enclosed in square brackets and set as
4059 \begin_inset Flex CharStyle:MenuItem
4062 \begin_layout Plain Layout
4069 For example, this item was started with
4070 \begin_inset Flex CharStyle:Code
4073 \begin_layout Plain Layout
4088 \begin_layout Plain Layout
4092 \begin_layout Plain Layout
4108 \begin_layout Plain Layout
4109 You'll also need to revert the labelitem back to its previous setting for
4110 the global bullet shape settings to remain in effect.
4111 The way used here was:
4114 \begin_layout LyX-Code
4129 \begin_layout Chapter
4130 LyX and the World Wide Web
4133 \begin_layout Standard
4134 LyX has long supported the export of documents to various web-friendly formats,
4136 Before verson 2.0, however, HTML export was always accomplished by the use
4137 of external converters.
4141 \begin_layout Plain Layout
4142 For details on the use of external converters with LyX, see the
4146 section of the Customization manual.
4151 These fall into two large groups: there are converters that use LaTeX as
4152 an intermediate format, such as
4153 \begin_inset Flex CharStyle:Code
4156 \begin_layout Plain Layout
4163 \begin_inset Flex CharStyle:Code
4166 \begin_layout Plain Layout
4173 \begin_inset Flex CharStyle:Code
4176 \begin_layout Plain Layout
4182 , relying upon LyX to produce the LaTeX; and there is a converter that works
4183 directly on LyX files,
4184 \begin_inset Flex CharStyle:Code
4187 \begin_layout Plain Layout
4194 All of these have different advantages and disadvantages.
4198 \begin_layout Standard
4199 The LaTeX-based converters have the advantage that, in principle, they know
4200 everything about the exported document that LaTeX does.
4201 Such converters do not care, for example, if a certain block of code was
4202 produced by LyX or was Evil Red Text.
4203 These converters know about
4204 \begin_inset Flex CharStyle:Code
4207 \begin_layout Plain Layout
4213 files, counters, and references, and can often make use of the
4214 \begin_inset Flex CharStyle:Code
4217 \begin_layout Plain Layout
4223 files generated by BibTeX.
4224 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4225 said that only TeX itself understands TeX---and LaTeX-based converters
4226 will often choke on what seem to be quite simple constructs; complex ones
4227 can throw them completely, and as of this writing, for example, the
4231 manual will not export with
4232 \begin_inset Flex CharStyle:Code
4235 \begin_layout Plain Layout
4241 , though the others will.
4242 The other issue concerns how math is handled.
4243 These converters typically convert the formulae into little pictures that
4244 are then linked from the HTML document.
4245 Since these are actually generated by LaTeX, they are accurate.
4246 But they do not scale well, and just getting them to look as if they are
4247 actually meant to be in your document---so that the font sizes seem to
4248 be roughly the same---can be a challenge.
4251 \begin_layout Standard
4253 \begin_inset Flex CharStyle:Code
4256 \begin_layout Plain Layout
4262 solves some of these problems.
4263 In particular, its rendering of math tends to look better than
4264 \begin_inset Flex CharStyle:Code
4267 \begin_layout Plain Layout
4273 's, at least in simpler cases, since it renders math using a combination
4274 of HTML and CSS rather than converting the formulae to images.
4275 But more complex formula tend to be rendered less well than with
4276 \begin_inset Flex CharStyle:Code
4279 \begin_layout Plain Layout
4285 , since there is no reasonable way of scaling parentheses in HTML, for example.
4286 More importantly (as of version 0.39, at least),
4287 \begin_inset Flex CharStyle:Code
4290 \begin_layout Plain Layout
4296 has no support for math macros, for user-defined paragraph or character
4297 styles, or for tables of contents and figures, and its treatment of cross-refer
4299 These limitations make
4300 \begin_inset Flex CharStyle:Code
4303 \begin_layout Plain Layout
4309 unsuitable for many of the documents more advanced LyX users would produce.
4310 In principle, of course, all of these problems could be solved, but the
4311 LyX developers have decided to follow a different path and have made LyX
4312 itself capable of writing XHTML, just as it is capable of writing LaTeX,
4313 DocBook, and plaintext.
4316 \begin_layout Standard
4317 As of this writing, XHTML output remains under development and should probably
4319 \begin_inset Quotes eld
4323 \begin_inset Quotes erd
4330 \begin_layout Plain Layout
4332 \begin_inset Flex CharStyle:Code
4335 \begin_layout Plain Layout
4336 development/HTML.notes
4341 , which can be found in the LyX source tree or
4342 \begin_inset CommandInset href
4344 name "accessed online"
4345 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4349 , usually contains up-to-date information about the state of XHTML output.
4354 Still, the developers have chosen this approach because it has several
4355 potential advantages over the other two.
4358 \begin_layout Standard
4359 These advantages are primarily due to the fact that the XHTML output routines,
4360 since they are part of LyX, know everything LyX knows about the document
4365 \begin_layout Plain Layout
4366 Another advantege is that, since these routines are internal to LyX, they
4367 are immune to changes in LyX's file format, or to changes in the semantics
4373 So they know about the table of contents (as displayed in the outline),
4374 about the counters associated with different paragraph styles, and about
4375 user-defined styles.
4376 The XHTML output routines know what LyX knows about internationalization,
4377 too, so they will output
4378 \begin_inset Quotes eld
4382 \begin_inset Quotes erd
4386 \begin_inset Quotes eld
4394 \begin_inset Quotes erd
4397 , depending upon the language in effect at the time.
4401 \begin_layout Standard
4402 Quite generally, the output routines know everything LyX knows about document
4403 layout, that is, about how the document is to be rendered on screen.
4404 We use this information when we output the document as XHTML.
4409 generates CSS style information corresponding to the layout information
4410 it uses to render the document on screen: if section headings are supposed
4411 to be sans-serif and bold as seen in LyX, then (by default) they will be
4412 sans-serif and bold when viewed in a web browser, too.
4413 And this is true not just for pre-defined styles, like Section, but for
4414 any style, including user-defined styles.
4415 Indeed, the XHTML output routines make no distinction between user-defined
4416 paragraph and character styles and LyX's own pre-defined styles: in each
4417 case, everything LyX knows about the styles is contained in the layout
4419 And much the same is true as regards pre-defined textual insets, such as
4420 footnotes, and various custom insets.
4424 \begin_layout Standard
4425 The result is that XHTML output can be customized and extended in
4429 the same way LaTeX output can be customized and extended: through layout
4431 See chapter five of the
4435 manual for the details.
4438 \begin_layout Standard
4439 The remainder of this chapter contains more detailed information on XHTML
4440 output, its limitations, and ways to work around those limitations.
4443 \begin_layout Section
4444 Math Output in XHTML
4447 \begin_layout Standard
4448 LyX offers four choices for how math is rendered.
4449 These have various advantages and disadvantages:
4452 \begin_layout Itemize
4454 \begin_inset Newline newline
4457 MathML is a dialect of XML designed specifically for mathematics on the
4458 web, and it typically renders very well in browsers that support it.
4459 The disadvantage is that not all browsers support MathML, and support is
4460 not complete even in the Gecko-based browsers, such as Firefox.
4461 \begin_inset Newline newline
4464 If Lyx is unable to render a formula as MathML---for example, if the formula
4466 \begin_inset Flex CharStyle:Code
4469 \begin_layout Plain Layout
4475 package or ERT---then it will instead output the formula as an image.
4479 \begin_layout Itemize
4481 \begin_inset Newline newline
4485 \begin_inset Flex CharStyle:Code
4488 \begin_layout Plain Layout
4494 outputs math as HTML, styled by CSS.
4498 \begin_layout Plain Layout
4499 LyX has borrowed some of the CSS for its HTML output from
4500 \begin_inset Flex CharStyle:Code
4503 \begin_layout Plain Layout
4514 For simple formulae, this can work quite well, though with more complicated
4515 formulae it tends to break down.
4516 Still, this method has the advantage that it is very widely supported and
4517 so it may be appropriate for documents that contain only a little, fairly
4519 \begin_inset Newline newline
4522 If Lyx is unable to render a formula as MathML---for example, if the formula
4524 \begin_inset Flex CharStyle:Code
4527 \begin_layout Plain Layout
4533 package or ERT---then it will instead output the formula as an image.
4537 \begin_layout Itemize
4539 \begin_inset Newline newline
4543 \begin_inset Flex CharStyle:Code
4546 \begin_layout Plain Layout
4552 , LyX will output formulae as images, the very same images, in fact, that
4553 are used for instant preview.
4557 \begin_layout Plain Layout
4558 Instant preview does
4562 have to be on for images to be output, however.
4567 The advantage to this method is that the images are simply generated by
4568 LaTeX, so they are very accurate.
4569 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4570 so they do not scale terribly well, and one cannot copy them, etc.
4571 \begin_inset Newline newline
4574 The size of the images can be controlled by setting the
4575 \begin_inset Quotes eld
4579 \begin_inset Quotes erd
4583 \begin_inset Flex CharStyle:MenuItem
4586 \begin_layout Plain Layout
4587 Document\SpecialChar \menuseparator
4588 Settings\SpecialChar \menuseparator
4598 \begin_layout Plain Layout
4599 For those who want to know, this controls the resolution of the image in
4600 dots per inch and is based upon a default of 75 dpi.
4606 \begin_inset Newline newline
4609 If LyX for some reason fails to create an image for a formula (e.g., if a
4610 required LaTeX package is not installed), then it will fall back to outputing
4614 \begin_layout Itemize
4616 \begin_inset Newline newline
4619 Finally, LyX will happily output math as LaTeX.
4620 As well as being the output of last resort, this method can be used with
4622 \begin_inset CommandInset href
4625 target "http://www.math.union.edu/~dpvc/jsMath/"
4629 , which uses JavaScript to render LaTeX embedded in HTML documents.
4630 LyX wraps the LaTeX in either a
4631 \begin_inset Flex CharStyle:Code
4634 \begin_layout Plain Layout
4640 (for inline formulas) or
4641 \begin_inset Flex CharStyle:Code
4644 \begin_layout Plain Layout
4650 (for displayed formulas) with
4651 \begin_inset Flex CharStyle:Code
4654 \begin_layout Plain Layout
4660 , as is required for jsMath.
4663 \begin_layout Standard
4664 One of these output methods must be selected under
4665 \begin_inset Flex CharStyle:MenuItem
4668 \begin_layout Plain Layout
4669 Document\SpecialChar \menuseparator
4670 Settings\SpecialChar \menuseparator
4677 By default, LyX outputs MathML.
4678 This is a document-wide setting, therefore.
4681 \begin_layout Standard
4682 Eventually, LyX will offer the user the option to select an alternate output
4683 method for a particular inset, say, one that isn't being rendered very
4688 \begin_layout Plain Layout
4689 That said, since LyX falls back to images if the inset contains ERT, then
4690 one can force output as an image by putting some harmless ERT into the
4692 \begin_inset Formula $a=b\relax$
4703 \begin_layout Section
4704 Bibliography and Citations
4707 \begin_layout Standard
4708 XHTML output fully supports bibliographies and citations.
4712 \begin_layout Standard
4713 Citation labels are generated by the same machinery that generates LyX's
4714 on-screen labels, so the labels will look in the output much as they do
4715 in LyX, though better.
4716 If you are using numerical citations, then LyX will output numerical labels,
4717 such as [1] or [17], rather than simply showing the citation key in square
4718 brackets, as it does on-screen.
4719 If you are using author-year citations, then LyX will add lowercase letters
4720 to the years, just as BibTeX does, if it finds more than one citation for
4721 a given author-year combination.
4722 The labels will be printed with the bibliography entries.
4723 Note that there is, at present, no way to customize the appearance of the
4724 labels, for example, to choose between square brackets and parentheses.
4727 \begin_layout Standard
4728 Bibliography output is handled by the same machinery that handles the presentati
4729 on of reference information in the citation dialog, so you will see in the
4730 XHTML output pretty much what you would see if you were to look at a given
4731 entry in the citation dialog.
4732 The formatting can be customized in your layout file or, preferably, in
4738 manual for the details.
4741 \begin_layout Standard
4742 The main defect at present is that cross-referenced information is printed
4743 with every entry with which it is associated.
4744 So you can see things like this:
4749 \begin_inset Quotes eld
4752 Context and Logical Form
4753 \begin_inset Quotes erd
4758 Language in Context: Selected Essays
4760 (Oxford: Oxford University Press, 2007), pp.
4766 \begin_inset Quotes eld
4769 Semantics in Context
4770 \begin_inset Quotes erd
4775 Language in Context: Selected Essays
4777 (Oxford: Oxford University Press, 2007), pp.
4781 \begin_layout Standard
4782 This should be fixed before long.
4785 \begin_layout Standard
4786 There is no support at present for sectioned bibliographies.
4787 If you have multiple bibliographies, then LyX will print the same bibliography
4791 \begin_layout Section
4795 \begin_layout Standard
4796 LyX will happily export indexes as XHTML, but with certain limitations at
4800 \begin_layout Standard
4801 Index export will be most reliable when you do not attempt to use the fancy
4802 constructs that are described in the section on indexes in the
4810 \begin_layout Plain Layout
4811 The main issue here is that LyX itself does not really handle these.
4812 It just lets you enter what you would have to enter in raw LaTeX.
4817 We'll describe how they are handled using the subsection headings from
4821 \begin_layout Itemize
4822 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4823 these, but the entries must be separated by
4824 \begin_inset Quotes eld
4828 \begin_inset Quotes erd
4831 , that is, there must be spaces around the exclamation point.
4832 This is because it is otherwise too difficult to check for escaped exclamation
4833 points, ones in math, and so forth.
4836 \begin_layout Itemize
4837 Page Ranges: There is no support at all for page ranges, since these make
4838 no sense with XHMTL.
4839 Instead, you will just get two index entries, one at either end.
4842 \begin_layout Itemize
4843 Cross-referencing: There is no support for cross-referencing.
4844 If LyX finds an entry containing the
4845 \begin_inset Quotes eld
4848 |see\SpecialChar \ldots{}
4850 \begin_inset Quotes erd
4853 construct, it is just dropped, and the rest is treated as an ordinary index
4857 \begin_layout Itemize
4858 Index Entry Order: LyX does support attempts to fix the sorting order.
4859 It will take what is before the first `@' it finds and use that for sorting,
4860 taking what follows the first `@' to be the actual entry.
4861 At present, LyX does not check for escaped `@', so do not try to index
4865 \begin_layout Itemize
4866 Index Entry Layout: You can format entries by using the text style dialog,
4867 or by using any other method available within LyX itself.
4868 There is no support for constructs like:
4869 \begin_inset Quotes eld
4873 \begin_inset Quotes erd
4877 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4878 and everything that follows it.
4881 \begin_layout Itemize
4882 Multiple Indexes: There is no support for multiple indexes.
4883 Rather, all index entries will be printed as one large index.
4884 To avoid our printing several versions of the index, we print only the
4885 main index, so make sure you have one.
4888 \begin_layout Section
4889 Nomenclature and Glossary
4892 \begin_layout Standard
4893 There is at present no support for glossaries.
4896 \begin_layout Chapter
4900 \begin_layout Section
4904 \begin_layout Standard
4905 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4906 and retrieve information about the LyX internal state.
4907 This is only intended for advanced users, but they should find it useful.
4908 It is by writing to the LyX server, for example, that bibliography managers,
4909 such as JabRef, are able to
4910 \begin_inset Quotes eld
4914 \begin_inset Quotes erd
4920 \begin_layout Section
4921 Starting the LyX Server
4924 \begin_layout Standard
4925 The LyX server works through the use of a pair of named pipes.
4926 These are usually located in
4927 \begin_inset Flex CharStyle:Code
4930 \begin_layout Plain Layout
4936 , (except on Windows, where
4940 named pipes are special objects located in
4941 \begin_inset Flex CharStyle:Code
4944 \begin_layout Plain Layout
4956 ) and have the names
4957 \begin_inset Quotes eld
4961 \begin_inset Flex CharStyle:Code
4964 \begin_layout Plain Layout
4971 \begin_inset Quotes erd
4975 \begin_inset Quotes eld
4979 \begin_inset Flex CharStyle:Code
4982 \begin_layout Plain Layout
4989 \begin_inset Quotes erd
4993 External programs write into
4994 \begin_inset Flex CharStyle:Code
4997 \begin_layout Plain Layout
5003 and read back data from
5004 \begin_inset Flex CharStyle:Code
5007 \begin_layout Plain Layout
5014 The stem of the pipe names can be defined in the
5015 \begin_inset Flex CharStyle:MenuItem
5018 \begin_layout Plain Layout
5019 Tools\SpecialChar \menuseparator
5026 \begin_inset Flex CharStyle:Code
5029 \begin_layout Plain Layout
5030 "/home/myhome/lyxpipe"
5036 \begin_inset Flex CharStyle:Code
5039 \begin_layout Plain Layout
5058 configure this manually in order for the server to start.
5061 \begin_layout Standard
5063 \begin_inset Flex CharStyle:Code
5066 \begin_layout Plain Layout
5073 \begin_inset Flex CharStyle:Code
5076 \begin_layout Plain Layout
5082 ' to create the pipes.
5083 If one of the pipes already exists, LyX will assume that another LyX process
5084 is already running and will not start the server.
5085 On POSIX (Unix like) systems, if for some other reason, an unused
5086 \begin_inset Quotes eld
5090 \begin_inset Quotes erd
5093 pipe is left in existence when LyX closes, then LyX will try to delete
5095 If this fails for some reason, you will need to delete the pipes manually
5096 and then restart LyX.
5097 On Windows, pipes are deleted by the OS on program termination or crash,
5099 \begin_inset Quotes eld
5103 \begin_inset Quotes erd
5106 pipes should not be possible.
5109 \begin_layout Standard
5110 To have several LyX processes with servers at the same time, you have to
5111 use different configurations, perhaps by using separate user directories,
5113 \begin_inset Flex CharStyle:Code
5116 \begin_layout Plain Layout
5122 file, for each process.
5125 \begin_layout Standard
5126 If you are developing a client program, you might find it useful to enable
5127 debugging information from the LyX server.
5128 Do this by starting LyX as
5129 \begin_inset Flex CharStyle:Code
5132 \begin_layout Plain Layout
5141 \begin_layout Standard
5142 You can find a complete example client written in C in the source distribution
5144 \begin_inset Flex CharStyle:Code
5147 \begin_layout Plain Layout
5148 development/lyxserver/server_monitor.c
5156 \begin_layout Standard
5157 Another useful tool is command-line based client you will find in
5158 \begin_inset Flex CharStyle:Code
5161 \begin_layout Plain Layout
5162 src/client/lyxclient
5170 \begin_layout Section
5171 Normal communication
5174 \begin_layout Standard
5175 To issue a LyX call, the client writes a line of ASCII text into the input
5177 This line has the following format:
5194 \begin_layout Description
5195 clientname is a name that the client can choose arbitrarily.
5196 Its only use is that LyX will echo it if it sends an answer—so a client
5197 can dispatch results from different requesters.
5200 \begin_layout Description
5201 function is the function you want LyX to perform.
5202 It is the same as the commands you'd use in the minibuffer.
5205 \begin_layout Description
5206 argument is an optional argument which is meaningful only to some functions
5208 \begin_inset Quotes eld
5212 \begin_inset Quotes erd
5215 LFUN will insert the argument as text at the cursor position).
5218 \begin_layout Standard
5219 The answer from LyX will arrive in the output pipe and be of the form
5236 \begin_layout Standard
5245 are just echoed from the command request, while
5249 is more or less useful information filled according to how the command
5250 execution worked out.
5251 Some commands, such as
5252 \begin_inset Quotes eld
5256 \begin_inset Quotes erd
5259 , will return information about the internal state of LyX, while other will
5260 return an empty data-response.
5261 This means that the command execution went fine.
5264 \begin_layout Standard
5265 In case of errors, the response from LyX will have this form
5282 \begin_layout Standard
5287 should contain an explanation of why the command failed.
5290 \begin_layout Standard
5294 \begin_layout LyX-Code
5295 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5296 \begin_inset Newline newline
5299 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5300 \begin_inset Newline newline
5303 read a <~/.lyxpipe.out
5304 \begin_inset Newline newline
5310 \begin_layout Section
5314 \begin_layout Standard
5315 LyX can notify clients of events going on asynchronously.
5316 Currently it will only do this if the user binds a key sequence with the
5318 \begin_inset Quotes eld
5322 \begin_inset Quotes erd
5326 The format of the string LyX sends is as follows:
5330 \begin_inset Flex CharStyle:Code
5333 \begin_layout Plain Layout
5344 \begin_layout Standard
5349 is the printed representation of the key sequence that was actually typed
5353 \begin_layout Standard
5354 This mechanism can be used to extend LyX's command set and implement macros.
5355 Bind some key sequence to
5356 \begin_inset Quotes eld
5360 \begin_inset Quotes erd
5364 Then start a client that listens on the output pipe, dispatches the command
5365 according to the sequence, and starts a function that may use LyX calls
5366 and LyX requests to issue a command or a series of commands to LyX.
5369 \begin_layout Section
5370 The simple LyX Server Protocol
5373 \begin_layout Standard
5374 LyX implements a simple protocol that can be used for session management.
5375 All messages are of the form
5388 \begin_layout Standard
5394 \begin_inset Quotes eld
5398 \begin_inset Quotes erd
5402 \begin_inset Quotes eld
5406 \begin_inset Quotes erd
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 is received from a client, LyX will report back to inform the client that
5419 it's listening to it's messages, while
5420 \begin_inset Quotes eld
5424 \begin_inset Quotes erd
5427 sent from LyX will inform clients that LyX is closing.
5430 \begin_layout Section
5431 Reverse DVI/PDF search
5434 \begin_layout Standard
5435 Some DVI/PDF viewers
5439 \begin_layout Plain Layout
5440 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5441 Skim on Mac OSX and SumatraPDF on Windows.
5450 facility (also called
5455 This means that you can tell LyX to put the cursor to a specific line in
5456 the document by clicking at the respective position in the DVI/PDF output.
5457 To achieve this, the viewer must be able to communicate with LyX.
5458 This is done via the LyX server either by using the named pipe (
5462 ), or the UNIX domain socket (
5466 ) that LyX creates in its temporary directory (this is the way the
5467 \begin_inset Flex CharStyle:Code
5470 \begin_layout Plain Layout
5476 program communicates with LyX).
5477 In some cases, you need a helper script that mediates between the viewer
5478 and LyX, in others, the viewer can communicate with LyX directly.
5479 This depends on the selected viewer and on your operating system.
5480 The same applies to the way viewers need to be configured and the way the
5481 reverse search is actually performed.
5482 In what follows, we will thus describe how to setup reverse search for
5484 Before we turn to this, though, we will explain what needs to be done generally
5485 to enable reverse search in the DVI/PDF output.
5488 \begin_layout Subsection
5490 \change_inserted 2 1274788899
5491 \begin_inset CommandInset label
5493 name "sub:rev-search"
5497 Automatical enabling
5500 \begin_layout Standard
5502 \change_inserted 2 1274789582
5503 In most cases LyX will do the work for you by enabling
5504 \begin_inset Flex CharStyle:MenuItem
5507 \begin_layout Plain Layout
5509 \change_inserted 2 1274789026
5510 Document\SpecialChar \menuseparator
5511 Output\SpecialChar \menuseparator
5518 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5519 srcltx package (for DVI) respectively.
5520 This option can be easily reached also on
5521 \begin_inset Flex CharStyle:Code
5524 \begin_layout Plain Layout
5526 \change_inserted 2 1274789582
5537 \begin_layout Standard
5539 \change_inserted 2 1274789534
5540 Plase note that including
5541 \begin_inset Flex CharStyle:Code
5544 \begin_layout Plain Layout
5546 \change_inserted 2 1274789498
5555 \begin_inset Flex CharStyle:Code
5558 \begin_layout Plain Layout
5560 \change_inserted 2 1274789484
5568 sometimes have an impact on the typeset and you should switch them off
5569 for the final typesets.
5574 \begin_layout Standard
5576 \change_inserted 2 1274789340
5577 You can also define custom macro in preferences and in case you need some
5578 special tweaks read the next section about manual enabling.
5584 \begin_layout Subsection
5586 \change_inserted 2 1274788680
5592 \begin_layout Standard
5593 LaTeX provides several different methods for reverse search.
5594 Some are built-in in the
5595 \begin_inset Flex CharStyle:Code
5598 \begin_layout Plain Layout
5604 program, some are provided by external packages.
5605 Your choice depends on whether your LaTeX distribution already provides
5606 a given method (the built-in methods are rather new) and whether your viewer
5608 The available methods are described in the following.
5609 \change_inserted 2 1274788557
5613 \begin_layout Subsubsection*
5614 Built-in DVI-search via src-specials (DVI only)
5617 \begin_layout Standard
5618 This method provides the DVI file with the necessary information for reverse
5620 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5621 distribution should include it), and it works reliably.
5622 To enable it, change the
5623 \begin_inset Flex CharStyle:MenuItem
5626 \begin_layout Plain Layout
5631 \begin_layout Plain Layout
5644 \begin_inset Flex CharStyle:MenuItem
5647 \begin_layout Plain Layout
5652 \begin_layout Plain Layout
5659 eX (plain)->DraftDVI
5665 \begin_inset Flex CharStyle:MenuItem
5668 \begin_layout Plain Layout
5669 Preferences\SpecialChar \menuseparator
5670 File Handling\SpecialChar \menuseparator
5677 \begin_inset Flex CharStyle:Code
5680 \begin_layout Plain Layout
5681 latex -src-specials $$i
5687 If this doesn't work, check if your TeX engine needs different options
5688 (the syntax might differ in some distributions).
5691 \begin_layout Subsubsection*
5692 External Packages (PDFSync and scrltx)
5695 \begin_layout Standard
5704 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5706 In order to enable it, load the packages in the LyX preamble:
5709 \begin_layout Itemize
5710 \begin_inset Flex CharStyle:Code
5713 \begin_layout Plain Layout
5721 for reverse PDF search,
5724 \begin_layout Itemize
5726 \begin_inset Flex CharStyle:Code
5729 \begin_layout Plain Layout
5732 usepackage[active]{srcltx}
5737 for reverse DVI search.
5740 \begin_layout Standard
5741 If you want to be able to perform both DVI and PDF reverse searches, you
5742 can also insert in the preamble the following lines
5745 \begin_layout LyX-Code
5749 \begin_inset Newline newline
5755 \begin_inset Newline newline
5761 \begin_inset Newline newline
5767 \begin_inset Newline newline
5772 usepackage[active]{srcltx}
5773 \begin_inset Newline newline
5781 \begin_layout Standard
5782 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5783 right package will be used.
5786 \begin_layout Standard
5787 Note that PDFSync might affect the output layout of your document.
5788 It is therefore advised to disable PDFsync for final documents.
5791 \begin_layout Subsubsection*
5792 Built-in reverse search via SyncTeX (DVI and PDF)
5795 \begin_layout Standard
5797 \begin_inset Flex CharStyle:Code
5800 \begin_layout Plain Layout
5806 have built-in support for both PDF and DVI reverse search.
5811 facility is basically the result of the integration of the PDFSync package
5812 to the pdftex program and its merge with the
5817 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5819 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5820 already provide SyncTeX support.
5823 \begin_layout Standard
5824 To enable SyncTeX for DVI output, change the
5825 \begin_inset Flex CharStyle:MenuItem
5828 \begin_layout Plain Layout
5833 \begin_layout Plain Layout
5846 \begin_inset Flex CharStyle:MenuItem
5849 \begin_layout Plain Layout
5854 \begin_layout Plain Layout
5861 eX (plain) -> DraftDVI
5867 \begin_inset Flex CharStyle:MenuItem
5870 \begin_layout Plain Layout
5871 Preferences\SpecialChar \menuseparator
5872 File Handling\SpecialChar \menuseparator
5879 \begin_inset Flex CharStyle:Code
5882 \begin_layout Plain Layout
5883 latex -synctex=1 $$i
5888 , and for PDF output, change the
5889 \begin_inset Flex CharStyle:MenuItem
5892 \begin_layout Plain Layout
5897 \begin_layout Plain Layout
5904 eX (pdflatex) -> PDF (pdflatex)
5910 \begin_inset Flex CharStyle:Code
5913 \begin_layout Plain Layout
5914 pdflatex -synctex=1 $$i
5920 Check the documentation of your viewer whether the viewer needs to be configure
5921 d for the use with SyncTeX.
5925 \begin_layout Plain Layout
5927 \begin_inset Flex CharStyle:Code
5930 \begin_layout Plain Layout
5936 option enables gzip compression.
5937 If your viewer does not support it, you should instead use
5938 \begin_inset Flex CharStyle:Code
5941 \begin_layout Plain Layout
5955 \begin_layout Subsection
5956 Configuring and using specific viewers
5959 \begin_layout Subsubsection*
5960 Xdvi (all platforms)
5963 \begin_layout Standard
5965 \begin_inset Flex CharStyle:Code
5968 \begin_layout Plain Layout
5974 , you don't need to do anything else for performing a reverse DVI search,
5975 as LyX already provides the necessary hooks for automatically using the
5977 \begin_inset Flex CharStyle:Code
5980 \begin_layout Plain Layout
5987 Just setup your document as described above (reverse search is triggered
5988 by Ctrl-click or Alt-click on Mac OSX, respectively).
5991 \begin_layout Standard
5992 However, if for whatever reason you want to use the named pipe instead of
5993 the socket for communicating with LyX, simply change the DVI viewer in
5995 \begin_inset Flex CharStyle:MenuItem
5998 \begin_layout Plain Layout
5999 Preferences\SpecialChar \menuseparator
6000 File Handling\SpecialChar \menuseparator
6010 \begin_layout Plain Layout
6011 On Mac OSX you have to use
6012 \begin_inset Flex CharStyle:Code
6015 \begin_layout Plain Layout
6016 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6027 \begin_inset Flex CharStyle:Code
6030 \begin_layout Plain Layout
6031 xdvi -editor 'lyxeditor.sh %f %l'
6037 \begin_inset Flex CharStyle:Code
6040 \begin_layout Plain Layout
6046 is a suitable script.
6047 For example, a minimal shell script is the following one:
6050 \begin_layout LyX-Code
6052 \begin_inset Newline newline
6055 LYXPIPE="/path/to/lyxpipe"
6056 \begin_inset Newline newline
6059 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6060 \begin_inset Newline newline
6063 echo "$COMMAND" > "${LYXPIPE}".in || exit
6064 \begin_inset Newline newline
6067 read < "${LYXPIPE}".out || exit
6070 \begin_layout Standard
6072 \begin_inset Flex CharStyle:Code
6075 \begin_layout Plain Layout
6085 \begin_layout Plain Layout
6092 XServer pipe path specified in
6093 \begin_inset Flex CharStyle:MenuItem
6096 \begin_layout Plain Layout
6097 Preferences\SpecialChar \menuseparator
6107 \begin_layout Plain Layout
6109 \begin_inset Flex CharStyle:Code
6112 \begin_layout Plain Layout
6118 folder of a source distribution you can find a
6119 \begin_inset Flex CharStyle:Code
6122 \begin_layout Plain Layout
6128 script which is able to locate the
6132 based on your preferences.
6140 \begin_layout Subsubsection*
6144 \begin_layout Standard
6146 \begin_inset Flex CharStyle:Code
6149 \begin_layout Plain Layout
6150 /Applications/MacDviX_Folder/calleditor.script
6155 , add the following lines:
6158 \begin_layout LyX-Code
6163 \begin_layout Plain Layout
6170 X.app/Contents/MacOS/lyxeditor "$2" $1
6171 \begin_inset Newline newline
6177 \begin_layout Standard
6178 Modify the lines accordingly if you install LyX somewhere else than in the
6179 Applications folder.
6182 \begin_layout Standard
6183 Reverse search is triggered by Alt-click (OPTION-click).
6186 \begin_layout Subsubsection*
6190 \begin_layout Standard
6192 \begin_inset Flex CharStyle:Code
6195 \begin_layout Plain Layout
6196 open -a Skim.app $$i
6201 to the viewer setting in
6202 \begin_inset Flex CharStyle:MenuItem
6205 \begin_layout Plain Layout
6206 Preferences\SpecialChar \menuseparator
6207 File Handling\SpecialChar \menuseparator
6208 File formats\SpecialChar \menuseparator
6215 \begin_inset Flex CharStyle:MenuItem
6218 \begin_layout Plain Layout
6219 Skim\SpecialChar \menuseparator
6220 Preferences\SpecialChar \menuseparator
6230 \begin_layout Plain Layout
6240 \begin_layout Standard
6241 Reverse search is triggered by COMMAND-SHIFT-click
6244 \begin_layout Subsubsection*
6248 \begin_layout Standard
6250 \begin_inset Flex CharStyle:MenuItem
6253 \begin_layout Plain Layout
6254 Settings\SpecialChar \menuseparator
6255 Configure Okular\SpecialChar \ldots{}
6256 \SpecialChar \menuseparator
6263 \begin_inset Quotes eld
6267 \begin_inset Quotes erd
6271 \begin_inset Flex CharStyle:Code
6274 \begin_layout Plain Layout
6283 \begin_layout Standard
6284 Reverse search is triggered by SHIFT-click.
6287 \begin_layout Subsubsection*
6291 \begin_layout Standard
6292 Launch yap, choose its
6293 \begin_inset Flex CharStyle:MenuItem
6296 \begin_layout Plain Layout
6297 View\SpecialChar \menuseparator
6304 \begin_inset Quotes eld
6308 \begin_inset Quotes erd
6313 \begin_inset Quotes eld
6316 New\SpecialChar \ldots{}
6318 \begin_inset Quotes erd
6321 button and, in the window that opens, enter
6322 \begin_inset Quotes eld
6326 \begin_inset Quotes erd
6329 (or any other name you like) in the
6330 \begin_inset Quotes eld
6334 \begin_inset Quotes erd
6338 Now click on the button labeled
6339 \begin_inset Quotes eld
6342 \SpecialChar \ldots{}
6344 \begin_inset Quotes erd
6347 to open a file dialog and navigate to the directory containing the batch
6349 \begin_inset Flex CharStyle:Code
6352 \begin_layout Plain Layout
6360 \begin_inset Flex CharStyle:Code
6363 \begin_layout Plain Layout
6369 and then specify the program arguments as
6370 \begin_inset Flex CharStyle:Code
6373 \begin_layout Plain Layout
6381 \begin_inset Flex CharStyle:Code
6384 \begin_layout Plain Layout
6390 wrapper is used for communicating with LyX through the
6397 \begin_layout LyX-Code
6399 \begin_inset Newline newline
6402 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6411 \begin_inset Newline newline
6425 \begin_layout Standard
6426 Make sure that the LyXServer pipe path you specified in LyX is
6427 \begin_inset Flex CharStyle:Code
6430 \begin_layout Plain Layout
6444 , otherwise change the
6445 \begin_inset Flex CharStyle:Code
6448 \begin_layout Plain Layout
6454 wrapper accordingly.
6457 \begin_layout Standard
6458 In yap, reverse search is triggered by double-click.
6461 \begin_layout Subsubsection*
6462 SumatraPDF (Windows)
6465 \begin_layout Standard
6466 In order to use SumatraPDF for inverse search, enter
6467 \begin_inset Flex CharStyle:Code
6470 \begin_layout Plain Layout
6471 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6476 in the viewer setting in
6477 \begin_inset Flex CharStyle:MenuItem
6480 \begin_layout Plain Layout
6481 Preferences\SpecialChar \menuseparator
6482 File Handling\SpecialChar \menuseparator
6483 File formats\SpecialChar \menuseparator
6490 \begin_inset Flex CharStyle:Code
6493 \begin_layout Plain Layout
6499 is the previous wrapper.
6500 If SumatraPDF.exe is not in your command PATH, use its full file name.
6503 \begin_layout Standard
6504 Reverse search is triggered by double-click.
6507 \begin_layout Subsubsection*
6511 \begin_layout Standard
6512 First of all, make sure that yap is your default DVI viewer in the Windows
6513 environment, then launch it, choose its
6514 \begin_inset Flex CharStyle:MenuItem
6517 \begin_layout Plain Layout
6518 View\SpecialChar \menuseparator
6525 \begin_inset Quotes eld
6529 \begin_inset Quotes erd
6534 \begin_inset Quotes eld
6537 New\SpecialChar \ldots{}
6539 \begin_inset Quotes erd
6542 button and, in the window that opens, enter
6543 \begin_inset Quotes eld
6547 \begin_inset Quotes erd
6550 (or any other name you like) in the
6551 \begin_inset Quotes eld
6555 \begin_inset Quotes erd
6559 Now click on the button labeled
6560 \begin_inset Quotes eld
6563 \SpecialChar \ldots{}
6565 \begin_inset Quotes erd
6568 to open a file dialog and navigate to the directory containing the
6569 \begin_inset Flex CharStyle:Code
6572 \begin_layout Plain Layout
6578 program (which is installed by default on Cygwin along with the LyX executable).
6580 \begin_inset Flex CharStyle:Code
6583 \begin_layout Plain Layout
6589 and then specify the program arguments as
6590 \begin_inset Flex CharStyle:Code
6593 \begin_layout Plain Layout
6600 In this way, you will be using the
6604 for communicating with LyX.
6605 If, for whatever reason, you want to use the
6610 \begin_inset Flex CharStyle:Code
6613 \begin_layout Plain Layout
6619 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6622 \begin_layout Standard
6623 In yap, reverse search is triggered by double-click.
6626 \begin_layout Subsubsection*
6630 \begin_layout Standard
6631 In order to use SumatraPDF for inverse search, enter
6632 \begin_inset Flex CharStyle:Code
6635 \begin_layout Plain Layout
6641 in the viewer setting in
6642 \begin_inset Flex CharStyle:MenuItem
6645 \begin_layout Plain Layout
6646 Preferences\SpecialChar \menuseparator
6647 File Handling\SpecialChar \menuseparator
6648 File formats\SpecialChar \menuseparator
6655 \begin_inset Flex CharStyle:Code
6658 \begin_layout Plain Layout
6664 is the following script (to be placed in your command PATH,
6665 \begin_inset Flex CharStyle:Code
6668 \begin_layout Plain Layout
6674 being the best choice):
6677 \begin_layout LyX-Code
6679 \begin_inset Newline newline
6683 \begin_inset Newline newline
6686 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6689 \begin_layout Standard
6690 This wrapper script is needed because SumatraPDF is a native Windows application
6691 and does not understand the posix paths used by the Cygwin version of LyX.
6692 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6695 \begin_inset Flex CharStyle:Code
6698 \begin_layout Plain Layout
6704 enables communication via the
6710 \begin_inset Flex CharStyle:Code
6713 \begin_layout Plain Layout
6719 option if you want to use the
6723 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6726 \begin_layout Standard
6727 Reverse search is triggered by double-click.
6728 \change_inserted 1 1271453423
6732 \begin_layout Section
6734 \change_inserted 1 1271453442
6738 \begin_layout Standard
6740 \change_inserted 1 1271454338
6741 To make forward search possible you need to provide generated output PDF/DVI
6742 file with additional information about TeX sources.
6743 This can be done via the methods described in the section
6744 \begin_inset CommandInset ref
6746 reference "sub:rev-search"
6753 \begin_layout Standard
6755 \change_inserted 1 1271454479
6756 Secondly you need to configure LyX for using your viewers in
6757 \begin_inset Flex CharStyle:MenuItem
6760 \begin_layout Plain Layout
6762 \change_inserted 1 1271453866
6763 Preferences\SpecialChar \menuseparator
6764 Output\SpecialChar \menuseparator
6771 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6776 \begin_layout Plain Layout
6778 \change_inserted 1 1271454273
6779 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6788 Some other viewers allow at least reloading and positioning to particular
6789 page of the file --- Evince or xpdf --- for these cases you can use external
6791 Please study the prepared examples in the Preferences dialog.
6796 \begin_layout Chapter
6797 Special Document Classes
6800 \begin_layout Section
6804 \begin_layout Standard
6810 \begin_layout Subsection
6814 \begin_layout Standard
6815 This section describes how LyX can be used to write articles for submission
6816 to the scientific journal
6818 Astronomy and Astrophysics
6820 (www.edpsciences.fr/aa/
6821 \begin_inset Flex URL
6824 \begin_layout Plain Layout
6826 http://www.edpsciences.fr/aa/
6831 ) using Version 5.01 of the document class
6836 This package can be downloaded from the ftp site
6839 \begin_layout Standard
6840 \begin_inset VSpace medskip
6846 \begin_layout Standard
6848 \begin_inset Flex URL
6851 \begin_layout Plain Layout
6853 ftp://ftp.edpsciences.org/pub/aa/readme.html
6861 \begin_layout Standard
6862 \begin_inset VSpace medskip
6868 \begin_layout Standard
6869 A manual comes together with that package, and this text is not meant to
6870 replace the original manual but merely a short guide how to realize the
6871 correct form of your paper.
6875 \begin_layout Standard
6876 Please note that the publisher of the journal was changed from Springer
6877 to EDP Sciences starting January 1, 2001.
6878 That change implicated also some slight changes of the style files, namely
6879 the removal of the thesaurus command.
6880 The LyX class aa supports the newest version of these style files, V 5.01.
6881 If you have an older version installed, please upgrade.
6882 For compatibility, the old (version 4) layout has been kept as
6887 Please refer to the comments in
6889 LyXDir/layouts/aapaper.layout
6894 \begin_layout Subsection
6898 \begin_layout Standard
6899 It is recommended you start from the example template distributed with LyX.
6900 If you are not using a template, note the following settings:
6903 \begin_layout Itemize
6910 Document\SpecialChar \menuseparator
6913 dialog (OK, that one was obvious).
6916 \begin_layout Itemize
6917 Don't change the option
6920 \begin_inset space ~
6930 The whole layout is done by the macros, you shouldn't change anything.
6933 \begin_layout Subsection
6937 \begin_layout Standard
6938 First thing to enter is the header information.
6939 It consists of seven entries, of which some are optional.
6943 \begin_layout Itemize
6951 \begin_layout Itemize
6959 \begin_layout Itemize
6967 \begin_layout Itemize
6975 \begin_layout Itemize
6980 : [optional] if more than one author: whom to contact for offprint requests.
6983 \begin_layout Itemize
6988 : [optional] mail address for contacts.
6991 \begin_layout Itemize
6999 Received: <date>; Accepted <date>
7002 \begin_layout Standard
7003 There is no need to issue the
7009 command, this is done automatically by LyX when the header is finished.
7010 Although the order of the single header entries doesn't matter it is advised
7011 to keep the above sequence, just to get the best optics and meets the layout
7012 of the real document.
7015 \begin_layout Standard
7016 If you want to place footnotes in the header block, e.
7017 \begin_inset space \thinspace{}
7021 \begin_inset space \space{}
7024 to state your present address, just use the standard footnote via the menu
7027 Insert\SpecialChar \menuseparator
7031 LyX will automagically use the term
7040 \begin_layout Standard
7041 In addition to these topics, the macros use three additional LaTeX commands
7042 that have no counterpart in LyX:
7045 \begin_layout Itemize
7052 to separate different names for more than one author and institute, respectivel
7056 \begin_layout Itemize
7063 to mark corresponding author/institute pairs.
7064 The institutes are numbered sequentially as they appear in the
7068 field, so you have to put a marker to each author.
7071 \begin_layout Itemize
7078 to supply an email address for fast contact.
7081 \begin_layout Standard
7082 In all cases, the appropriate command has to be entered in LyX and marked
7088 \begin_layout Subsection
7092 \begin_layout Standard
7093 The abstract should immediately follow the header block.
7094 With version 5 the abstract environment was changed to a command, and there
7095 is now a resctriction to only one paragraph.
7096 In addition, it should contain an entry with the keywords.
7097 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7104 by hand and mark it as LaTeX code.
7105 Refer to the example paper.
7108 \begin_layout Subsection
7109 Supported environments
7112 \begin_layout Standard
7113 The A&A paper layout supports the following environments for structuring
7117 \begin_layout Itemize
7123 \begin_layout Itemize
7129 \begin_layout Itemize
7135 \begin_layout Itemize
7141 \begin_layout Itemize
7147 \begin_layout Itemize
7153 \begin_layout Itemize
7159 \begin_layout Itemize
7165 \begin_layout Itemize
7171 \begin_layout Itemize
7177 \begin_layout Itemize
7183 \begin_layout Itemize
7189 \begin_layout Subsection
7190 Commands not supported by LyX
7193 \begin_layout Standard
7194 Some commands are not yet supported by the
7199 Some have already been mentioned.
7200 For the sake of completeness, they are listed all together here:
7203 \begin_layout Itemize
7211 \begin_layout Itemize
7219 \begin_layout Itemize
7227 \begin_layout Itemize
7235 \begin_layout Itemize
7243 \begin_layout Itemize
7251 \begin_layout Itemize
7259 \begin_layout Itemize
7267 \begin_layout Standard
7268 If you want to use any of these commands, you have to enter them yourself.
7271 Do not forget to mark them as LaTeX code!
7274 \begin_layout Subsection
7275 Figure and Table Floats
7278 \begin_layout Standard
7279 LyX provides support for the necessary float environments
7281 figure, figure*, table
7287 , therefore we won't tell much about it here.
7291 \begin_inset space ~
7297 Just remember that tables should be left-aligned.
7298 For that, select the table and change the alignment in
7300 Edit\SpecialChar \menuseparator
7302 \begin_inset space ~
7308 \begin_layout Standard
7309 There is only one special thing: the figures with caption besides the figure.
7310 To create such a figure, you have to do the following:
7313 \begin_layout Enumerate
7314 Create a wide figure float:
7316 Insert\SpecialChar \menuseparator
7317 Float\SpecialChar \menuseparator
7320 , then right click in the figure and select
7326 \begin_inset space ~
7334 \begin_layout Enumerate
7335 Enter your caption text.
7338 \begin_layout Enumerate
7343 to move the cursor above the caption.
7346 \begin_layout Enumerate
7350 \begin_layout Enumerate
7351 Position the cursor behind the figure and insert a horizontal fill:
7353 Insert\SpecialChar \menuseparator
7355 \begin_inset space ~
7358 Character\SpecialChar \menuseparator
7360 \begin_inset space ~
7368 \begin_layout Enumerate
7369 Switch to LaTeX mode:
7372 \begin_inset space ~
7380 \begin_layout Enumerate
7390 Do not close the brace!
7393 \begin_layout Enumerate
7394 Position the cursor behind the caption text, switch to LaTeX mode and insert
7398 \begin_inset space ~
7410 \begin_layout Standard
7411 Also, refer to the figures in the example paper.
7414 \begin_layout Subsection
7418 \begin_layout Standard
7419 For submission, the paper has to be formated in a special double-spacing
7421 For this purpose, you have to give the option
7425 to the documentclass.
7426 This must be done using the extra class options field in the
7428 Document\SpecialChar \menuseparator
7432 Just enter the string
7439 \begin_layout Subsection
7443 \begin_layout Standard
7448 directory contains an example paper written with LyX.
7449 It is the example paper from the original macro package, translated to
7451 Use it for inspiration, and compare the original LaTeX code with LyX way
7455 \begin_layout Section
7459 \begin_layout Standard
7465 \begin_layout Subsection
7469 \begin_layout Standard
7470 AASTeX is a set of macros produced by the American Astronomical Society
7471 to facilitate electronic manuscript submission to the three journals they
7472 publish: the Astrophysical Journal (including the Letters and Supplement),
7473 the Astronomical Journal, and the Publications of the Astronomical Society
7475 LyX has proven to be an excellent tool for generating these documents,
7476 especially given its equation, citation, and figure handling capabilities.
7477 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7478 is the version described here, or higher.
7479 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7480 incompatible with LyX.
7481 The AASTeX package may be downloaded from the AASTeX Web site
7484 \begin_layout Standard
7485 \begin_inset VSpace medskip
7491 \begin_layout Standard
7493 \begin_inset Flex URL
7496 \begin_layout Plain Layout
7498 http://www.journals.uchicago.edu/AAS/AASTeX
7506 \begin_layout Standard
7507 \begin_inset VSpace medskip
7513 \begin_layout Standard
7514 A complete user guide is contained in that package and you should familiarize
7515 yourself with it thoroughly before embarking on writing a paper in LyX.
7516 LyX will not reduce the need to figure out all the AASTeX commands, it
7517 will only reduce the drudgery of typing everything in.
7518 It is your responsibility to ensure that the final exported LaTeX document
7519 conforms completely to the requirements of the journal to which you are
7520 submitting your paper.
7523 \begin_layout Subsection
7524 Starting a New Paper
7527 \begin_layout Standard
7528 I strongly suggest that you start with the AASTeX template file.
7531 File\SpecialChar \menuseparator
7538 , enter the new file name, then choose the
7543 This will show the most common fields found in a manuscript.
7544 Simply overwrite the existing text (including the brackets,
7548 ) with the correct information.
7549 Many of the AASTeX commands and environments can be implemented directly
7550 in LyX, but some cannot: most noticeably
7562 , which should stick out like a sore thumb if you actually just opened the
7564 For commands such as these, the LaTeX code must be entered directly and
7566 Such commands are referred to as TeX code, or Evil Red Text.
7567 I tried to minimize the amount of TeX code needed in an AASTeX document,
7568 but there is still a bit more required than any of us would like.
7571 \begin_layout Subsection
7572 Finishing Your Paper
7575 \begin_layout Standard
7576 When the paper is finished to your satisfaction and previews/prints correctly,
7578 \begin_inset Quotes eld
7582 \begin_inset Quotes erd
7585 actions which need to be done before you submit it to the journals.
7589 \begin_layout Enumerate
7590 Export your paper as a LaTeX file (
7592 File\SpecialChar \menuseparator
7593 Export\SpecialChar \menuseparator
7600 \begin_layout Enumerate
7605 file with your favorite text editor
7609 \begin_layout Enumerate
7610 remove the comment lines before the
7619 \begin_layout Enumerate
7624 usepackage...{fontenc}
7626 line if it appears (usually just after
7641 \begin_layout Enumerate
7642 remove everything between (and including) the
7654 commands, except for any commands you specifically put into the LaTeX preamble
7655 (which should appear immediately after the
7656 \begin_inset Quotes eld
7659 User specified LaTeX commands
7660 \begin_inset Quotes erd
7671 \begin_layout Enumerate
7672 Run the resulting file through LaTeX to make sure it still processes correctly.
7675 \begin_layout Enumerate
7676 Reread the journal requirements to make sure your filenames and formats
7680 \begin_layout Enumerate
7684 \begin_layout Subsection
7685 Comments On Specific Commands
7688 \begin_layout Standard
7689 I will not describe the detailed usage of the individual AASTeX commands:
7690 the AASTeX User Guide (
7694 ) gives a good description of each.
7695 Thus it's probably easiest for me to go down the list as found in the guide
7696 and offer comments where necessary.
7697 So let's begin \SpecialChar \ldots{}
7701 \begin_layout Subsubsection
7702 Things that work as expected
7705 \begin_layout Standard
7709 \begin_layout Plain Layout
7721 \begin_layout Standard
7722 Because they work as you might expect, I simply list them and the section
7823 begin{thebibliography}
7831 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7832 graphicx figure commands (2.14.1),
7856 (2.15.4, amongst other places),
7883 \begin_layout Standard
7884 The following style options also work correctly:
7905 Simply put them in the
7911 Layout\SpecialChar \menuseparator
7917 \begin_layout Standard
7921 \begin_layout Plain Layout
7933 \begin_layout Subsubsection
7934 Things that work, but require more comment
7937 \begin_layout Standard
7938 The following items work, but require a little more discussion:
7941 \begin_layout Itemize
7942 These items are reserved for use by the journal editors, but you can put
7943 them into the LaTeX preamble if you feel compelled to do so:
7976 \begin_layout Itemize
7977 These items may be placed in the LaTeX preamble, and are included as blanks
7978 in the template file:
7999 \begin_layout Itemize
8006 (2.3) – can only be used
8007 \begin_inset Quotes eld
8011 \begin_inset Quotes erd
8014 , not in the middle of a paragraph.
8015 Use TeX code if you need to embed it.
8018 \begin_layout Itemize
8025 (2.3) – will have extra {} after it.
8026 This should not cause an error.
8029 \begin_layout Itemize
8036 (2.6) – can only be used
8037 \begin_inset Quotes eld
8041 \begin_inset Quotes erd
8044 , not in the middle of a paragraph.
8045 Use TeX code if you need to embed it.
8048 \begin_layout Itemize
8055 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8059 \begin_layout Itemize
8073 \begin_layout Itemize
8080 (2.9) – will have extra {} after it.
8081 This should not cause an error.
8084 \begin_layout Itemize
8091 (2.11) – will have extra {} after it.
8092 This should not cause an error.
8095 \begin_layout Itemize
8102 (2.14.2) – you can insert an optional filename argument by placing the cursor
8103 at the beginning of the text and selecting
8105 Insert\SpecialChar \menuseparator
8110 \begin_inset Quotes eld
8114 \begin_inset Quotes erd
8117 inserts an optional argument of the type needed by
8124 Hopefully it will be renamed someday.
8127 \begin_layout Itemize
8140 for the catalog ID optional parameter
8143 \begin_layout Itemize
8156 for the catalog ID optional parameter
8159 \begin_layout Subsubsection
8160 Things not implemented, use TeX code
8163 \begin_layout Standard
8167 \begin_layout Plain Layout
8179 \begin_layout Standard
8202 setcounter{equation}
8204 (2.12), Journal name abbreviations (2.13.4),
8240 (2.15.4, insert it as the first element in the lefthand cell after where
8242 Don't use any of LyX's rules in the table),
8254 (2.15.5), much of Misc (2.17, except
8305 \begin_layout Standard
8309 \begin_layout Plain Layout
8321 \begin_layout Subsubsection
8322 Things that cannot be implemented
8325 \begin_layout Standard
8326 \SpecialChar \ldots{}
8327 at least in any meaningful sort of way, so I suggest ignoring them.
8328 They are the references environment (2.13.3), and the deluxetable environment
8330 If you really, really need to use deluxetable, I suggest editing it in
8331 a separate file with a text editor, then using
8333 Insert\SpecialChar \menuseparator
8335 \begin_inset space ~
8340 to include it in your LyX document.
8345 file to see an example of this.
8348 \begin_layout Subsection
8349 FAQs, Tips, Tricks, and Other Ruminations
8352 \begin_layout Subsubsection
8353 Getting LyX and AASTeX to cooperate
8356 \begin_layout Standard
8357 It can be a bit tricky to get LyX to recognize a new layout and document
8359 When all else fails, do this:
8362 \begin_layout Enumerate
8363 Make certain that LaTeX can find AASTeX.
8364 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8365 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8372 \begin_layout Enumerate
8384 \begin_layout Enumerate
8387 Tools\SpecialChar \menuseparator
8390 in LyX, then restart LyX.
8393 \begin_layout Enumerate
8394 Open a regular new file, not from a template.
8395 Does AASTeX appear in the class list in
8397 Document\SpecialChar \menuseparator
8403 \begin_layout Standard
8404 If you get a warning from an existing AASTeX document about not being able
8405 to find the AASTeX layout or a message about
8406 \begin_inset Quotes eld
8409 You should not mix title layouts with normal ones
8410 \begin_inset Quotes erd
8413 , things haven't been installed correctly.
8416 \begin_layout Subsubsection
8417 LaTeX error processing a table
8420 \begin_layout Standard
8421 LyX, by default, attempts to center the table caption/title.
8422 This seems to produce a bad interaction in AASTeX so you should click somewhere
8423 in the caption/title, then select
8425 Edit\SpecialChar \menuseparator
8427 \begin_inset space ~
8441 This took care of it for me.
8444 \begin_layout Subsubsection
8448 \begin_layout Standard
8449 A couple of things: 1) I have noticed some funny spacing in the reference
8450 entries in the text.
8451 When you enter the bibliography item data, make sure their is
8455 space between the last author and the parenthesis setting off the year;
8459 \begin_inset space \thinspace{}
8463 \begin_inset space \space{}
8477 2) Entering the references at all is not obvious.
8478 The easiest thing is to start typing your first reference at the end of
8479 the document, then mark it as type
8484 That will put a small gray box in front of what you just typed.
8485 Click on the box to fill in the rest of the information.
8486 For new references, go to the end of an existing reference and press return.
8487 That will create a new line with its own box, etc.
8490 \begin_layout Subsubsection
8494 \begin_layout Standard
8495 Even though AASTeX provides its own figure commands (
8501 , for example), I much prefer LaTeX's standard figure commands (with the
8510 \begin_inset space ~
8513 commands as TeX code into a Figure Float box if you desire, but I never
8514 have much luck getting the layout right.
8515 With the standard graphics, LyX will insert a
8519 usepackage{graphicx}
8521 command into the LaTeX preamble and handle the figures in the standard
8522 LaTeX2e way, interspersing the figures in the text.
8523 I believe ApJ accepts figures exactly this way now; AJ might still use
8525 \begin_inset Quotes eld
8528 stack everything at the end
8529 \begin_inset Quotes erd
8535 \begin_layout Subsubsection
8536 Things I could have done, but didn't
8539 \begin_layout Standard
8541 \begin_inset Quotes eld
8545 \begin_inset Quotes erd
8548 things I could have implemented, but chose not to.
8549 For instance, I saw no point in double-spacing the text in the LyX window,
8550 even though it is double-spaced in the paper manuscript.
8551 Also, I chose not to make separate layouts for the preprint and preprint2
8553 Since I assume you will spend most of your time in the plain manuscript
8554 mode anyway, I decided not to chew up more disk space with this.
8558 \begin_layout Subsection
8562 \begin_layout Standard
8563 Your mileage may vary.
8564 I've now had papers published by both ApJ and AJ that have had 98% of the
8565 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8567 I have had no trouble with the submission process, and I'm sure the journals
8568 were never aware that there might be a difference.
8569 So, go forth and publish!
8572 \begin_layout Section
8576 \begin_layout Standard
8579 David Johnson; updated by Richard Heck
8582 \begin_layout Standard
8583 \begin_inset VSpace bigskip
8589 \begin_layout Standard
8591 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8592 papers to be submitted to American Mathematical Society publications.
8593 The layouts are not tailored to a specific journal, but easily can be.
8594 You should refer to the AMS documentation for specific instructions for
8595 each journal (usually it will entail only changing a single line in the
8597 That documentation is available on the Web at
8598 \begin_inset Flex URL
8601 \begin_layout Plain Layout
8609 \begin_inset Flex URL
8612 \begin_layout Plain Layout
8614 ftp://ftp.ams.org/pub/tex/amslatex/
8620 These layouts are appropriate, and useful, for any mathematical writing.
8624 \begin_layout Standard
8625 There are two basic AMS LaTeX layouts:
8628 \begin_layout Itemize
8629 amsart: The standard AMS article format.
8632 \begin_layout Itemize
8633 amsbook: the standard AMS book (really, monograph) format.
8637 \begin_layout Standard
8638 The layouts themselves contain only the minimum necessary to use the AMS
8640 They do not, in particular, contain any of the `theorem' environments used
8641 for setting theorems, lemmas, and the like.
8642 These are contained, instead, in the
8643 \begin_inset Flex CharStyle:Code
8646 \begin_layout Plain Layout
8652 module, which is loaded by default when when you select one of the AMS
8654 (It can also be used with other classes and can be removed, if you would
8655 rather use something else.) Less commonly used environments are in the
8656 \begin_inset Flex CharStyle:Code
8659 \begin_layout Plain Layout
8660 Theorems (AMS-Extended)
8665 module, which must be loaded manually.
8668 \begin_layout Standard
8669 By default, theorems and the like are numbered consecutively throughout
8670 the document, but this may be modified by loading the module
8671 \begin_inset Flex CharStyle:Code
8674 \begin_layout Plain Layout
8675 Theorems (Order by Section)
8680 or, if you are using
8681 \begin_inset Flex CharStyle:Code
8684 \begin_layout Plain Layout
8691 \begin_inset Flex CharStyle:Code
8694 \begin_layout Plain Layout
8695 Theorems (Order by Chapter)
8701 These will number the results as
8702 \begin_inset Formula $n.m$
8705 , where the first number refers to the section (or chapter) and the second
8706 refers to the total number of results so far in that section (or chapter).
8707 Many environments are also available unnumbered.
8708 These are indicated by an asterisk at the end.
8709 If you happen to want
8713 unnumbered results, the module
8714 \begin_inset Flex CharStyle:Code
8717 \begin_layout Plain Layout
8723 provides that option.
8726 \begin_layout Standard
8727 Note that these modules do not
8731 to be used with the AMS classes.
8732 It is perfectly possible to use the
8733 \begin_inset Flex CharStyle:Code
8736 \begin_layout Plain Layout
8742 module, and the others mentioned, with other classes, such as
8743 \begin_inset Flex CharStyle:Code
8746 \begin_layout Plain Layout
8753 \begin_inset Flex CharStyle:Code
8756 \begin_layout Plain Layout
8763 \begin_inset Flex CharStyle:Code
8766 \begin_layout Plain Layout
8775 \begin_layout Subsection
8776 What these layouts provide
8779 \begin_layout Standard
8780 There is a long list of included environments provided by these layouts.
8781 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8782 variety of `theorem' environments.
8783 However, the AMS recommends the environments that are available in LyX.
8787 \begin_layout Standard
8788 The following environments—as well as the standard environments, such as
8790 \begin_inset Flex CharStyle:Noun
8793 \begin_layout Plain Layout
8800 \begin_inset Flex CharStyle:Noun
8803 \begin_layout Plain Layout
8810 \begin_inset Flex CharStyle:Noun
8813 \begin_layout Plain Layout
8820 \begin_inset Flex CharStyle:Noun
8823 \begin_layout Plain Layout
8830 \begin_inset Flex CharStyle:Noun
8833 \begin_layout Plain Layout
8840 \begin_inset Flex CharStyle:Code
8843 \begin_layout Plain Layout
8850 \begin_inset Flex CharStyle:Code
8853 \begin_layout Plain Layout
8862 \begin_layout Description
8863 Address This should be the author's permanent address.
8866 \begin_layout Description
8868 \begin_inset space ~
8871 Address This should be the author's temporary address at the time of submission,
8872 if different from the Address.
8875 \begin_layout Description
8876 Email Author's e-mail address
8879 \begin_layout Description
8880 URL Author's Web address, if desired.
8883 \begin_layout Description
8884 Keywords Key words or phrases used to identify specific topics discussed
8888 \begin_layout Description
8889 Subjectclass These refer to the AMS Subject Classifications, published and
8892 Mathematical Reviews
8895 These are also available online at the AMS cites listed above.
8898 \begin_layout Description
8902 \begin_layout Description
8906 \begin_layout Description
8910 \begin_layout Standard
8911 The following environments are provided by both the
8912 \begin_inset Flex CharStyle:Code
8915 \begin_layout Plain Layout
8922 \begin_inset Flex CharStyle:Code
8925 \begin_layout Plain Layout
8931 modules, in the latter case in both starred (unnumbered) and unstarred
8932 (numbered) versions.
8933 These same environments are provided only in the starred versions by the
8935 \begin_inset Flex CharStyle:Code
8938 \begin_layout Plain Layout
8947 \begin_layout Theorem
8948 This is typically used for the statements of major results.
8952 \begin_layout Corollary*
8953 This is used for statements which follow fairly directly from previous statement
8955 Again, these can be major results.
8960 These are smaller results needed to prove other statements.
8963 \begin_layout Proposition
8964 These are less major results which (hopefully) add to the general theory
8968 \begin_layout Conjecture
8969 These are statements provided without justification, which the author does
8970 not know how to prove, but which seem to be true (to the author, at least).
8973 \begin_layout Definition*
8974 Guess what this is for.
8975 The font is different for this environment than for the previous ones.
8979 \begin_layout Example*
8980 Used for examples illustrating proven results.
8983 \begin_layout Problem
8984 It's not really known what this is for.
8985 You should figure it out.
8988 \begin_layout Exercise*
8989 Write a description for this one.
8992 \begin_layout Remark
8993 This environment is also a type of theorem, usually a lesser sort of observation.
8996 \begin_layout Claim*
8997 Often used in the course of giving a proof of a larger result.
9001 Generally, these are used to break up long arguments, using specific instances
9007 The numbering scheme for cases is on its own, not together with other numbered
9013 At the end of this environment, a QED symbol (usually a square, but it can
9014 vary with different styles) is placed.
9015 If you want to have other environments within this one—for example, Case
9016 environments—and have the QED symbol appear only after them, then the other
9017 environments need to be nested within the proof environment.
9020 Nesting Environments
9026 for information on nesting.
9029 \begin_layout Standard
9030 And these environments are provided by
9031 \begin_inset Flex CharStyle:Code
9034 \begin_layout Plain Layout
9035 Theorems (AMS-Extended)
9043 \begin_layout Criterion*
9044 A required condition.
9047 \begin_layout Algorithm*
9048 A general procedure to be used.
9051 \begin_layout Axiom*
9052 This is a property or statement taken as true within the system being discussed.
9055 \begin_layout Condition*
9056 Sometimes used to state a condition assumed within the present context of
9061 Similar to a Remark.
9064 \begin_layout Notation*
9065 Used for the explanation of, yes, notation.
9068 \begin_layout Summary
9069 Do we really need to tell you?
9072 \begin_layout Acknowledgement*
9076 \begin_layout Conclusion*
9077 Sometimes used at the end of a long train of argument.
9081 Used in a way similar to Proposition, though perhaps lower on the scale.
9084 \begin_layout Standard
9085 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9087 They need to be available on your system in order to use these environments.
9090 \begin_layout Section
9098 \begin_layout Standard
9104 \begin_layout Subsection
9108 \begin_layout Standard
9109 These are the layout files for some of the journals of the American Geophysical
9111 It is assumed that you have both the AGU's own class files and AGUplus
9112 installed (everything to be found at
9113 \begin_inset Flex URL
9116 \begin_layout Plain Layout
9118 ftp://ftp.agu.org/journals/latex/journals
9126 \begin_layout Subsection
9130 \begin_layout Standard
9140 They are still called this in the LyX GUI, though their LaTeX equivalents
9141 in the AGU classes are
9152 \begin_layout Standard
9153 Newly defined styles are
9190 These are mostly manuscript attributes and defined in the AGU class documentati
9194 \begin_layout Standard
9195 I suspect this is still badly incomplete.
9198 \begin_layout Subsection
9202 \begin_layout Standard
9219 \begin_layout Subsection
9223 \begin_layout Itemize
9226 Journal of Geophysical Research
9235 \begin_layout Standard
9236 Add your own, it isn't so hard! Look at the
9247 \begin_layout Subsection
9248 Bugs and things to remember
9251 \begin_layout Standard
9252 In order to use the new layouts, you must remember to do the following for
9256 \begin_layout Enumerate
9262 This can be done in the
9264 Layout\SpecialChar \menuseparator
9269 Document\SpecialChar \menuseparator
9273 (AGU articles are always in English, right? So
9280 \begin_layout Enumerate
9290 (Yes, this is a bug.)
9293 \begin_layout Enumerate
9294 Make sure you use the
9298 bibliography style, by entering
9302 into the second field of the BibTeX inset.
9303 None of the standard styles will do.
9306 \begin_layout Section
9310 \begin_layout Standard
9316 \begin_layout Subsection
9320 \begin_layout Standard
9321 Broadway is for writing plays.
9322 The format is more decorative than Hollywood, and much less standardized.
9323 This format should be suitable for workshops.
9326 \begin_layout Subsection
9330 \begin_layout Standard
9331 The same as in Hollywood.
9334 \begin_layout Subsection
9338 \begin_layout Standard
9343 names as labels then cross-reference the label to insert the name.
9344 The cross-reference dialog will show the current cast of characters.
9347 \begin_layout Subsection
9348 Paper size and Margins
9351 \begin_layout Standard
9352 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9355 \begin_layout Subsection
9359 \begin_layout Standard
9360 The following environments are available.
9361 You can use broadway.bind to get the bind keys shown at the right.
9364 \begin_layout Itemize
9368 \begin_inset Newline newline
9373 You should not have to use this, but it is here for anything that does not
9377 \begin_layout Itemize
9381 \begin_inset space \hfill{}
9385 \begin_inset Newline newline
9390 Used to describe stage setting and the action.
9391 First use of speaker names in all CAPs.
9394 \begin_layout Itemize
9398 \begin_inset space \hfill{}
9402 \begin_inset Newline newline
9407 Automatically numbered.
9408 On screen it will be arabic, but will print as Roman.
9411 \begin_layout Itemize
9415 \begin_inset space \hfill{}
9419 \begin_inset Newline newline
9429 It is just centered text.
9432 \begin_layout Itemize
9436 \begin_inset space \hfill{}
9440 \begin_inset Newline newline
9445 Not automatically numbered.
9446 You supply the number.
9447 This is because I couldn't figure out how.
9450 \begin_layout Itemize
9454 \begin_inset space \hfill{}
9458 \begin_inset Newline newline
9463 A special case of Narrative to describe the setting and action as the curtain
9467 \begin_layout Itemize
9471 \begin_inset space \hfill{}
9475 \begin_inset Newline newline
9480 The speaker's (actor's) title, centered in all CAPS.
9483 \begin_layout Itemize
9487 \begin_inset space \hfill{}
9491 \begin_inset Newline newline
9496 Instructions to the speaker.
9497 The parentheses are automatically inserted.
9498 The ( will appear on screen, but both will be in the printed play.
9499 This environment is only used within
9506 \begin_layout Itemize
9510 \begin_inset space \hfill{}
9514 \begin_inset Newline newline
9519 What the Speaker says.
9522 \begin_layout Itemize
9526 \begin_inset space \hfill{}
9530 \begin_inset Newline newline
9535 The curtain comes down.
9538 \begin_layout Itemize
9542 \begin_inset space \hfill{}
9548 \begin_layout Itemize
9552 \begin_inset space \hfill{}
9558 \begin_layout Itemize
9562 \begin_inset space \hfill{}
9568 \begin_layout Standard
9572 \begin_layout Section
9576 \begin_layout Standard
9581 can be used to type letters according to German conventions.
9582 A template file is included in
9584 .../lyx/share/templates
9586 for you to use as a starting point.
9589 \begin_layout Section
9597 \begin_layout Standard
9603 \begin_layout Subsection
9607 \begin_layout Standard
9608 This is the layout file for the European Geophysical Society journals.
9613 can be downloaded from the web site of the EGS under
9614 \begin_inset Flex URL
9617 \begin_layout Plain Layout
9627 \begin_layout Subsection
9631 \begin_layout Standard
9634 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9642 The current layout file is unfortunately very unmodular and would benefit
9643 from using the various
9650 \begin_layout Section
9654 \begin_layout Standard
9660 \begin_layout Standard
9661 Elsevier Science Publishers B.V.
9662 provides a standard LaTeX document class (
9666 ) for submitting articles to their various journals.
9667 The style file can be downloaded directly from their web site:
9668 \begin_inset Flex URL
9671 \begin_layout Plain Layout
9673 http://authors.elsevier.com/
9679 Instructions are supplied along with the class file, which details the
9680 requirements of the publishers.
9681 LyX includes package that allows for the use of this class, by a layout
9682 and a template file.
9683 Installation of the class file is the same as for any other LaTeX package;
9684 instructions are provided in the Elsevier documentation.
9687 \begin_layout Standard
9697 As the Elsevier class file is based mainly on the standard article class,
9698 most of the normal functionality is provided.
9699 The Elsevier class defines a number of mathematical environments, which
9700 are similar to the AMS environments.
9701 These commands are all described in the Elsevier documentation, and are
9705 \begin_layout Standard
9706 The easiest way to use the Elsevier style is to base documents on the included
9708 It is best not to use options such as fancy headings or the geometry package,
9709 as elements such as these are defined by Elsevier in their style file.
9710 Ideally, no extra packages except those mentioned in the Elsevier documentation
9712 Essentially, Elsevier require as
9713 \begin_inset Quotes eld
9717 \begin_inset Quotes erd
9720 a LaTeX file as possible, as their intention is to take the supplied file
9721 and replace the class file with one for the particular journal to which
9722 the paper has been submitted.
9723 This also means that not too much time should be spent on the formating
9725 When it comes to be published, this will change anyway.
9726 The rest of the usage for this layout is substantially the same as for
9727 the normal article class.
9728 For details of what Elsevier do and don't allow, refer to their documentation.
9731 \begin_layout Section
9737 \begin_inset CommandInset label
9746 \begin_layout Standard
9752 \begin_layout Subsection
9756 \begin_layout Standard
9757 This section describes how to use LyX to make slides for overhead projectors.
9758 There are two document classes that can do this: the default slides class
9764 This section documents the latter.
9767 \begin_layout Standard
9768 I'm going to say this again, nice and clear, so that there's no misunderstanding
9772 \begin_layout Standard
9773 \begin_inset VSpace bigskip
9779 \begin_layout Standard
9783 This section documents the class
9784 \begin_inset Quotes eld
9792 \begin_inset Quotes erd
9800 \begin_layout Standard
9801 \begin_inset VSpace bigskip
9807 \begin_layout Standard
9808 If you're looking for the documentation for
9809 \begin_inset Quotes eld
9817 \begin_inset Quotes erd
9821 \begin_inset space ~
9825 \begin_inset CommandInset ref
9827 reference "sec:slitex"
9832 If your machine doesn't have the
9837 \begin_inset Quotes eld
9845 \begin_inset Quotes erd
9848 ] installed, you'll probably have to use the default
9852 class, which isn't quite as good as
9857 \begin_layout Standard
9862 class is designed for use with version 2.1 of the
9866 LaTeX class file which is now an integral part of LaTeX2e.
9869 \begin_layout Subsection
9873 \begin_layout Standard
9874 Obviously, to use this document class, you need to select
9875 \begin_inset Quotes eld
9883 \begin_inset Quotes erd
9893 \begin_inset space ~
9899 There are some settings in the
9902 \begin_inset space ~
9907 dialog that you should know about that are specific to this class:
9910 \begin_layout Itemize
9911 Don't change the options
9922 \begin_inset space ~
9928 They're ignored by the
9935 \begin_layout Itemize
9936 The default font size is 20
9937 \begin_inset space \thinspace{}
9940 pt with the other options being 17
9941 \begin_inset space \thinspace{}
9945 \begin_inset space \thinspace{}
9949 \begin_inset space \thinspace{}
9955 \begin_layout Itemize
9964 but all math equations are still typeset in the usual roman font.
9967 \begin_layout Itemize
9972 supports A4 and Letter paper sizes as well as a special size for working
9974 \begin_inset space \thinspace{}
9978 It doesn't support A5, B5, legal or executive paper sizes.
9981 \begin_layout Itemize
9982 Don't bother changing the
9986 settings because they are ignored anyway.
9987 All floats appear where they are defined in the text.
9990 \begin_layout Itemize
9995 setting behaves a bit differently for this class.
10000 provides extensive footer and header capabilities including a user-defined
10003 \begin_inset space ~
10007 \begin_inset CommandInset ref
10009 reference "sec:foilfoot"
10014 The title page is treated differently to all other pages in the document
10023 has the logo centered at the bottom of the page (if one is defined).
10024 The possible page style choices and what they do are as follows:
10028 \begin_layout Labeling
10029 \labelwidthstring MMMMMMM
10036 The final output contains no page numbers, or other headers or footers
10037 (except footnotes of course).
10041 \begin_layout Labeling
10042 \labelwidthstring MMMMMMM
10049 The final output contains page numbers centered at the bottom of the page.
10050 No other headings or footers (other than footnotes).
10053 \begin_layout Labeling
10054 \labelwidthstring MMMMMMM
10059 Page numbers in lower right corner.
10060 Additional headers and footers are also shown.
10061 This is also the default.
10064 \begin_layout Labeling
10065 \labelwidthstring MMMMMMM
10070 Gives you access to the
10074 package although its use with
10078 is discouraged by the writer of the
10082 package because of some potential page layout clashes.
10086 \begin_layout Subsubsection
10090 \begin_layout Standard
10091 The following options may be used in the extra class options in the
10093 Document\SpecialChar \menuseparator
10099 \begin_layout Labeling
10100 \labelwidthstring MMMMMMx
10105 This sets up the page layout for 7.33
10106 \begin_inset space \thinspace{}
10110 \begin_inset space \thinspace{}
10113 in paper, which is about the same aspect ratio as a 35
10114 \begin_inset space \thinspace{}
10117 mm slide, making it a bit easier to work with this medium.
10120 \begin_layout Labeling
10121 \labelwidthstring MMMMMMx
10126 Places a rule across the page below the header on every page except the
10130 \begin_layout Labeling
10131 \labelwidthstring MMMMMMx
10136 Places a rule across the page above the footer on every page except the
10140 \begin_layout Labeling
10141 \labelwidthstring MMMMMMx
10146 This is automatically set each time you create a new
10155 to use the dvips driver to rotate those pages that are set as landscape
10159 \begin_layout Labeling
10160 \labelwidthstring MMMMMMx
10165 Simply changes the page dimensions to those of a landscape page but doesn't
10167 Thus if you use this option you need to use an external program to rotate
10168 each page or feed your paper through your printer as landscape.
10169 Note that this option effectively reverses the roles of the
10177 environments (don't worry these are described in the next section).
10180 \begin_layout Labeling
10181 \labelwidthstring MMMMMMx
10186 Equation numbers on the left.
10189 \begin_layout Labeling
10190 \labelwidthstring MMMMMMx
10195 Flush-left equations.
10198 \begin_layout Subsection
10199 Supported Environments
10202 \begin_layout Standard
10203 Most of the environments commonly supported in other classes are also supported
10209 There are several additional environments provided by
10213 as well as a couple added by LyX.
10214 The following environments are shared with other classes:
10217 \begin_layout Standard
10221 \begin_layout Plain Layout
10225 begin{multicols}{2}
10233 \begin_layout Itemize
10239 \begin_layout Itemize
10245 \begin_layout Itemize
10251 \begin_layout Itemize
10257 \begin_layout Itemize
10263 \begin_layout Itemize
10269 \begin_layout Itemize
10275 \begin_layout Itemize
10281 \begin_layout Itemize
10287 \begin_layout Itemize
10293 \begin_layout Itemize
10299 \begin_layout Itemize
10305 \begin_layout Itemize
10311 \begin_layout Itemize
10317 \begin_layout Itemize
10323 \begin_layout Itemize
10329 \begin_layout Itemize
10335 \begin_layout Itemize
10341 \begin_layout Standard
10345 \begin_layout Plain Layout
10357 \begin_layout Standard
10358 That is, all the major environments apart from the sectioning environments.
10359 Since foils are essentially self-contained sections, with a title and body,
10364 provides specific commands for starting new foils and these are:
10367 \begin_layout Itemize
10373 \begin_layout Itemize
10379 \begin_layout Standard
10380 LyX also provides slightly modified versions of these two environments called:
10383 \begin_layout Itemize
10389 \begin_layout Itemize
10392 ShortRotatefoilhead
10395 \begin_layout Standard
10396 and the differences will be explained in the next section.
10399 \begin_layout Standard
10400 Since foils are often used in presenting ideas or new theorems and such
10405 also provides a comprehensive box of goodies for presenting them:
10408 \begin_layout Standard
10412 \begin_layout Plain Layout
10416 begin{multicols}{2}
10424 \begin_layout Itemize
10430 \begin_layout Itemize
10436 \begin_layout Itemize
10442 \begin_layout Itemize
10448 \begin_layout Itemize
10454 \begin_layout Itemize
10460 \begin_layout Itemize
10466 \begin_layout Itemize
10472 \begin_layout Itemize
10478 \begin_layout Itemize
10484 \begin_layout Itemize
10490 \begin_layout Standard
10494 \begin_layout Plain Layout
10506 \begin_layout Standard
10507 The starred versions are unnumbered while the unstarred versions are numbered.
10508 There are also two list environments added by LyX and these are:
10511 \begin_layout Itemize
10517 \begin_layout Itemize
10523 \begin_layout Standard
10528 provides some powerful header and footer capabilities that are best set
10529 in the preamble although they may be set at any point in a document.
10530 If you want to change these settings in your document the best place to
10531 do so is at the very top of a foil, i.
10532 \begin_inset space \thinspace{}
10538 \begin_inset space \space{}
10543 straight after the foilhead.
10546 \begin_layout Standard
10547 For this purpose, the following command styles are provided [
10554 \begin_layout Standard
10558 \begin_layout Plain Layout
10562 begin{multicols}{2}
10570 \begin_layout Itemize
10574 \begin_inset space ~
10580 \begin_layout Itemize
10586 \begin_layout Itemize
10590 \begin_inset space ~
10596 \begin_layout Itemize
10600 \begin_inset space ~
10606 \begin_layout Itemize
10610 \begin_inset space ~
10617 \begin_layout Standard
10618 \begin_inset space ~
10625 \begin_layout Standard
10629 \begin_layout Plain Layout
10641 \begin_layout Standard
10642 There are also a few commands provided by
10646 that aren't directly supported by LyX but I'll tell you what they do and
10647 how to use them in section
10648 \begin_inset space ~
10652 \begin_inset CommandInset ref
10654 reference "sec:unsuppfoils"
10661 \begin_layout Subsection
10662 Building a Set of Foils
10665 \begin_layout Standard
10666 This section will give a simple introduction to using the different environments
10667 to build a set of foils.
10668 If you want to see an example set of foils, take a look at the
10672 file you find in LyX's
10679 \begin_layout Subsubsection
10680 Give It a Title Page
10683 \begin_layout Standard
10684 Unlike other classes that provide
10704 creates the title on a page of its own.
10705 If you leave out the
10709 environment LaTeX will substitute the current date (every time you regenerate
10713 \begin_layout Subsubsection
10717 \begin_layout Standard
10718 As I mentioned earlier, there are four ways of starting a new foil.
10719 For portrait foils you should use
10728 The difference between these two environments is the amount of space between
10729 the title of the foil (the foilhead) and the body of the foil.
10732 \begin_layout Standard
10733 Landscape foils are generated using the
10739 ShortRotatefoilhead
10742 Again the only difference is the spacing between foilhead and body.
10743 Both of the short versions have 0.5 inches less separation between the foilhead
10748 \begin_layout Standard
10749 One problem with the support for landscape foils is the requirement that
10750 you have to use the
10754 driver to generate the PostScript output otherwise the foils won't be rotated.
10755 It is possible to get landscape foils even if you haven't got the
10759 driver provided you can feed your foils sideways through your printer ;-)
10762 \begin_layout Subsubsection
10763 Theorems, Lemmas, Proofs and more
10766 \begin_layout Standard
10767 Due to a small bug in LyX you can't have two of the same type of these environme
10768 nts directly following each other.
10769 They must be separated by something.
10770 If you try, you will just be extending the previous environment as if you
10771 had merged the two environments together.
10772 So, how do you get around this problem? The simplest option is to insert
10773 some text between the two environments or add a
10777 environment between the two with just a
10778 \begin_inset Quotes eld
10786 \begin_inset Quotes erd
10790 This will force LyX to produce two separate environments and hence the
10791 correct LaTeX output.
10792 An example is provided in the example file included with the LyX distribution.
10793 Remember, this problem only occurs if you are trying to place two of the
10794 same type of theorem-like environments one directly after the other.
10797 \begin_layout Subsubsection
10801 \begin_layout Standard
10802 You get all the commonly supported list styles found in other classes as
10803 well as two new ones.
10804 I'll only describe the new ones here.
10805 If you want to find out more about the other list environments check out
10811 If you intend to use itemized lists you might also want to read about the
10815 \begin_inset space ~
10819 \begin_inset space ~
10824 dialog described above in section
10825 \begin_inset space ~
10829 \begin_inset CommandInset ref
10831 reference "sec:bullet"
10838 \begin_layout Standard
10839 The two new list styles,
10847 , are designed to make it easier for you to create lists of do's and don'ts
10848 or right and wrong by providing dedicated environments that use a tick
10849 or a cross as the label of the list.
10850 These lists are in fact dedicated variants of the
10855 They do however require that you have the
10859 packages installed.
10862 \begin_layout Subsubsection
10866 \begin_layout Standard
10871 redefines the floating tables and figures so that they appear exactly where
10872 they are in the text rather than pushing them to the top of the page or
10873 to some user specified location.
10874 In fact if you change the float placement settings they are simply ignored.
10877 \begin_layout Subsubsection
10878 Page Headers and Footers
10879 \begin_inset CommandInset label
10881 name "sec:foilfoot"
10888 \begin_layout Standard
10892 \begin_inset space ~
10901 are two commands used to control the left-footer text string.
10902 The first is meant to allow you to include a graphic logo on your foils
10904 \begin_inset Quotes eld
10912 \begin_inset Quotes erd
10916 While the second is meant to provide a classification for the audience,
10920 \begin_inset space \thinspace{}
10926 \begin_inset space \space{}
10930 It is empty by default.
10933 \begin_layout Standard
10934 The remaining page corners can be filled by
10937 \begin_inset space ~
10942 (which defaults to page numbers),
10945 \begin_inset space ~
10953 \begin_inset space ~
10961 \begin_layout Subsection
10967 \begin_inset CommandInset label
10969 name "sec:unsuppfoils"
10976 \begin_layout Standard
10977 All the commands mentioned below need to be set in a
10985 within another environment.
10988 \begin_layout Subsubsection
10992 \begin_layout Standard
10993 All lengths are adjusted using the
11016 should be replaced by the name given to the length you want to change and
11021 is the length value.
11022 All lengths should be specified in units of length such as inches (
11034 ) or relative to some document or font-based length such as
11044 \begin_layout Standard
11045 It's possible to change the spacing between a foilhead and the body of the
11046 foil by adjusting the length specified by
11053 For example, to make
11058 \begin_inset space \space{}
11061 in closer to their bodies put the following in the preamble:
11067 foilheadskip}{-0.5in}
11070 \begin_layout Standard
11071 The spacings around floats can be adjusted by setting these lengths:
11074 \begin_layout Labeling
11075 \labelwidthstring MMMMMMMMMMM
11082 Separation between the text and the top of the float
11085 \begin_layout Labeling
11086 \labelwidthstring MMMMMMMMMMM
11093 Separation between the float and the caption
11096 \begin_layout Labeling
11097 \labelwidthstring MMMMMMMMMMM
11104 Separation between the caption and the following text
11107 \begin_layout Labeling
11108 \labelwidthstring MMMMMMMMMMM
11115 You can make the captions narrower than the surrounding text by adjusting
11117 Best done relative to
11126 \begin_layout Standard
11127 There are also several title page related lengths that you may find useful
11128 if you have a long title or several authors:
11131 \begin_layout Labeling
11132 \labelwidthstring MMMMMMMMMMM
11139 Separation from headers to
11144 \begin_layout Labeling
11145 \labelwidthstring MMMMMMMMMMM
11163 \begin_layout Labeling
11164 \labelwidthstring MMMMMMMMMMM
11178 \begin_layout Labeling
11179 \labelwidthstring MMMMMMMMMMM
11195 \begin_layout Labeling
11196 \labelwidthstring MMMMMMMMMMM
11212 \begin_layout Standard
11213 The last length related command affects all the list environments.
11224 a list environment then all the vertical spacing between the list items
11226 Note that this is a command not a length so it doesn't require
11232 like the stuff mentioned above.
11235 \begin_layout Subsubsection
11236 Headers and Footers
11239 \begin_layout Standard
11252 commands control whether the logo in the
11256 definition appear on a given page.
11263 in the preamble then none of the foils will have the logo on them.
11264 If you don't want the logo on a particular page place the
11270 directly after the foilhead of that page and the
11276 directly after the next foilhead.
11279 \begin_layout Standard
11280 If you decide to use the
11284 page style setting in the
11287 \begin_inset space ~
11292 dialog you should probably add
11302 to your preamble so headers and footers on landscape pages are correctly
11303 placed when rotated.
11304 This is due to some clashes between the page layouts provided by the
11315 \begin_layout Section
11316 Hollywood (Hollywood spec scripts)
11319 \begin_layout Standard
11325 \begin_layout Subsection
11329 \begin_layout Standard
11330 Getting the format of a Hollywood script right is a
11331 \begin_inset Quotes eld
11335 \begin_inset Quotes erd
11338 It is designed to make the readers focus on content and to be easy and
11339 familiar for the actors to read.
11340 Each page of a script should be one minute of film.
11341 Nothing goes in a script that you cannot see or hear on screen.
11342 The courier 12 pt font should be used throughout.
11346 \begin_layout Subsection
11350 \begin_layout Standard
11351 Speakers' lines should NEVER break in mid-sentence.
11352 If a speaker's lines continue over a page break, repeat the
11356 title followed by (Cont'd).
11359 \begin_layout Subsection
11363 \begin_layout Standard
11368 names as labels then cross-reference the label to insert the name.
11369 The cross-reference dialog will show the current cast of characters.
11370 You can use this to insert the speaker name in narratives also.
11373 \begin_layout Subsection
11374 Paper size and Margins
11377 \begin_layout Standard
11378 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11381 \begin_layout Subsection
11385 \begin_layout Standard
11386 The following environments are available.
11387 You can use hollywood.bind to get the bind keys shown at the right.
11390 \begin_layout Itemize
11394 \begin_inset Newline newline
11399 Used where nothing else works.
11403 \begin_layout Itemize
11409 \begin_inset space \hfill{}
11417 \begin_inset Newline newline
11420 Usually followed by something like
11421 \begin_inset Quotes eld
11424 on Sally waking up.
11425 \begin_inset Quotes erd
11431 \begin_layout Itemize
11435 \begin_inset space \hfill{}
11439 \begin_inset Newline newline
11444 Introduces a new INTERIOR camera set-up.
11445 Always followed by DAY or NIGHT, or something similar to define the lighting
11447 Everthing on this line in CAPS.
11450 \begin_layout Itemize
11454 \begin_inset space \hfill{}
11458 \begin_inset Newline newline
11463 Introduces a new EXTERIOR camera set-up.
11464 Everthing on this line in CAPS.
11467 \begin_layout Itemize
11471 \begin_inset space \hfill{}
11475 \begin_inset Newline newline
11480 The character speaking.
11483 \begin_layout Itemize
11487 \begin_inset space \hfill{}
11491 \begin_inset Newline newline
11496 Instructions to the speaker.
11497 The () are automatically inserted, but only the ( will show in LyX.
11498 Both will be printed.
11501 \begin_layout Itemize
11505 \begin_inset space \hfill{}
11509 \begin_inset Newline newline
11521 \begin_layout Itemize
11525 \begin_inset space \hfill{}
11529 \begin_inset Newline newline
11534 Camera movement instruction.
11536 \begin_inset space \thinspace{}
11540 \begin_inset space \space{}
11546 \begin_layout Itemize
11550 \begin_inset space \hfill{}
11556 \begin_layout Itemize
11560 \begin_inset space \hfill{}
11566 \begin_layout Itemize
11570 \begin_inset space \hfill{}
11576 \begin_layout Itemize
11580 \begin_inset space \hfill{}
11586 \begin_layout Subsection
11590 \begin_layout Itemize
11594 \begin_layout Itemize
11598 \begin_layout Itemize
11600 \begin_inset space \thinspace{}
11607 \begin_layout Itemize
11612 \begin_layout Itemize
11613 PAN — camera movement
11616 \begin_layout Itemize
11617 INSERT — cut to close-up of
11620 \begin_layout Section
11624 \begin_layout Standard
11627 Panayotis Papasotiriou
11630 \begin_layout Subsection
11634 \begin_layout Standard
11635 The ijmpc package is a set of macros that facilitates electronic manuscript
11638 International Journal of Modern Physics C
11641 Similarly, the ijmpd package is for creating manuscripts to be submitted
11644 International Journal of Modern Physics D
11647 Both journals are published by World Scientific.
11648 The corresponding document classes are named
11657 These files, together with instructions for the authors, can be downloaded
11659 \begin_inset Flex URL
11662 \begin_layout Plain Layout
11664 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11670 \begin_inset Flex URL
11673 \begin_layout Plain Layout
11675 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11681 Both packages are modified versions of the standard
11682 \begin_inset Quotes eld
11686 \begin_inset Quotes erd
11689 package, and they are almost (but not exactly) identical.
11690 Most of their features are supported by LyX.
11691 I have used LyX successfully to write articles submitted to both journals
11692 without any problem.
11695 \begin_layout Subsection
11699 \begin_layout Standard
11700 As usual, the easiest way to write a paper is to start with a template.
11703 File\SpecialChar \menuseparator
11722 This will give an (almost) empty document that includes the most common
11723 fields found in a manuscript.
11724 Simply overwrite the existing text (including the brackets,
11729 You should keep in mind the following remarks.
11732 \begin_layout Enumerate
11733 LyX won't let you change the font size and the page style of the document,
11734 because such modifications are not allowed by both packages.
11737 \begin_layout Enumerate
11738 The language of the document should not be changed.
11739 Before previewing your paper, be sure that the babel package is not used.
11740 To do this, click on
11742 Tools\SpecialChar \menuseparator
11753 checkbox in the language settings, and click on
11761 , if you wish to make this change permanent).
11764 \begin_layout Enumerate
11766 \begin_inset Quotes eld
11770 \begin_inset Quotes erd
11773 style must be used to define keywords.
11776 \begin_layout Enumerate
11777 The ijmpc package provides a style named
11778 \begin_inset Quotes eld
11781 Classification Codes
11782 \begin_inset Quotes erd
11785 , which can be used to define classification codes, such as PACS numbers.
11786 Note that this facility is not supported by the ijmpd package.
11789 \begin_layout Enumerate
11790 Several new environments are available:
11791 \begin_inset Quotes eld
11795 \begin_inset Quotes erd
11799 \begin_inset Quotes eld
11803 \begin_inset Quotes erd
11807 \begin_inset Quotes eld
11811 \begin_inset Quotes erd
11815 \begin_inset Quotes eld
11819 \begin_inset Quotes erd
11823 \begin_inset Quotes eld
11827 \begin_inset Quotes erd
11831 \begin_inset Quotes eld
11835 \begin_inset Quotes erd
11839 \begin_inset Quotes eld
11843 \begin_inset Quotes erd
11847 \begin_inset Quotes eld
11851 \begin_inset Quotes erd
11855 \begin_inset Quotes eld
11859 \begin_inset Quotes erd
11863 \begin_inset Quotes eld
11867 \begin_inset Quotes erd
11871 \begin_inset Quotes eld
11875 \begin_inset Quotes erd
11879 \begin_inset Quotes eld
11883 \begin_inset Quotes erd
11887 \begin_inset Quotes eld
11891 \begin_inset Quotes erd
11895 \begin_inset Quotes eld
11899 \begin_inset Quotes erd
11903 Their use is more or less obvious.
11904 LyX supports all these environments; it will use the proper label, text
11905 style, and numbering scheme for each of them.
11908 \begin_layout Enumerate
11909 Both packages use basic citations; the natbib package should not be used.
11910 In LyX, citation references are shown as usual; in the output, citations
11911 are shown as superscripts.
11912 If you want to use a citation as normal text, you should use the
11917 \begin_inset space \thinspace{}
11921 \begin_inset space \space{}
11925 \begin_inset Quotes eld
11929 \begin_inset space \space{}
11939 \begin_inset Quotes erd
11945 \begin_layout Enumerate
11947 \begin_inset Quotes eld
11951 \begin_inset Quotes erd
11954 section in both packages.
11955 To put acknowledgments, just use the
11956 \begin_inset Quotes eld
11960 \begin_inset Quotes erd
11966 \begin_layout Enumerate
11967 Appendices may be added to the paper,
11971 the Acknowledgments and
11976 LyX provides a special environment, called
11977 \begin_inset Quotes eld
11981 \begin_inset Quotes erd
11984 which marks the beginning of the appendices.
11985 This environment should be left blank; it just sends a LaTeX command, but
11986 nothing is really printed.
11988 \begin_inset Quotes eld
11992 \begin_inset Quotes erd
11995 is printed with blue letters, as a signal that all sections after that
11996 point are appendices.
11997 To write an appendix, use the
11998 \begin_inset Quotes eld
12002 \begin_inset Quotes erd
12006 LyX will number each appendix with capital letters, as required by both
12009 \begin_inset Quotes eld
12013 \begin_inset Quotes erd
12020 be present before the first appendix; if not, all appendices will be numbered
12021 as normal sections in the output.
12024 \begin_layout Enumerate
12025 The ijmpc and the ijmpd packages use the
12029 command to implement table captions.
12030 As a result, a table created by LyX is printed correctly, but its caption
12032 However, you can use some TeX code to overpass this problem, so that captions
12033 are printed as expected.
12034 To do so, create a float table as usual, remove the caption, and replace
12035 it with the TeX code
12045 (sic); you must also the TeX code
12049 immediately after the tabular material.
12050 Study the example table included in the template files to see how this
12051 trick is implemented.
12052 Alternatively, If you need table captions, you should implement the whole
12057 file, then include this file to the LyX document (
12059 Insert\SpecialChar \menuseparator
12060 File\SpecialChar \menuseparator
12062 \begin_inset space ~
12068 Details on how to create a table float can be found in the files
12076 , included in the corresponding packages.
12079 \begin_layout Subsection
12080 Preparing a paper for submission
12083 \begin_layout Standard
12084 Before you submit your paper you must export the LyX document as a LaTeX
12087 File\SpecialChar \menuseparator
12088 Export\SpecialChar \menuseparator
12095 \begin_layout Plain Layout
12096 Actually you have the choice between LaTeX (plain) and pdflatex.
12097 If you intend to use pdflatex to prepare the paper, you should use the
12098 pdflatex option so that included graphics are converted to PDF format,
12099 ready for use by pdflatex.
12104 , then make the following changes to the resulting
12111 \begin_layout Enumerate
12112 Remove the comment lines before the
12121 \begin_layout Enumerate
12122 Remove everything between (and including) the
12134 commands, except for any commands you specifically put into the LaTeX preamble.
12137 \begin_layout Standard
12142 file should be saved and processed through LaTeX as many times as necessary.
12143 You may also want to check the resulting
12150 \begin_layout Subsection
12154 \begin_layout Standard
12155 The use of TeX code is reduced to two commands, which must be placed at
12156 the top of the document.
12157 If you started writing your paper by using the
12165 template, the TeX code needed is already in its place; you usually don't
12167 You may only modify the first TeX code to specify the information printed
12168 to the top of odd and even pages (authors' names and short paper's title,
12170 This TeX code must have the form
12174 markboth{Authors' Names}{Short Paper's Title}
12179 \begin_layout Section
12183 \begin_layout Standard
12189 \begin_layout Subsection
12193 \begin_layout Standard
12194 The iopart package provides a document class to create electronic manuscript
12195 submission to the journals published by the Institute of Physics.
12196 Instructions for the authors how to create a paper using the iopart class
12197 can be downloaded together with the iopart package from the site
12198 \begin_inset Flex URL
12201 \begin_layout Plain Layout
12203 ftp://ftp.iop.org/pub/journals/latex2e
12211 \begin_layout Subsection
12215 \begin_layout Standard
12216 The easiest way to write a paper is to start with the file
12220 that is available in LyX's examples files folder.
12221 Open this file, save it under a new name, and start writing.
12222 The example file explains how to use the special text environments.
12223 Here are the most important advices:
12226 \begin_layout Itemize
12227 To be able to compile your document to a PDF, PS, or DVI, assure that the
12230 Use AMS math package
12232 in the document settings under
12239 \begin_layout Itemize
12242 The title environment defines the kind of your paper.
12243 So use one of the following environments for the title:
12247 \begin_layout Itemize
12256 \begin_layout Itemize
12265 \begin_layout Itemize
12271 for a Topical review
12274 \begin_layout Itemize
12283 \begin_layout Itemize
12292 \begin_layout Itemize
12298 for a Paper (same as Title)
12301 \begin_layout Itemize
12307 for a Preliminary communication
12310 \begin_layout Itemize
12316 for a Rapid communication
12319 \begin_layout Itemize
12325 for a Letter to the editor
12329 \begin_layout Itemize
12332 All title environments except of
12336 can have an optional short title.
12339 \begin_layout Itemize
12340 There is a general title environment
12344 which is not directly supported by the LyX.
12345 This can be used as TeX code when your document doesn't fit into one of
12346 the other title types.
12349 \begin_layout Standard
12350 For more informations like hints for special table and formula formatting,
12351 look at the IOP author guidelines.
12354 \begin_layout Section
12358 \begin_layout Standard
12361 Panayotis Papasotiriou
12364 \begin_layout Subsection
12368 \begin_layout Standard
12369 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12370 that facilitates electronic manuscript submission to the journals they
12372 Most known of them (at least in my domain of interest) are
12374 Astrophysics and Space Science
12380 , but there are many others (see a complete list at
12381 \begin_inset Flex URL
12384 \begin_layout Plain Layout
12386 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12392 The Kluwer package may be downloaded from the site
12393 \begin_inset Flex URL
12396 \begin_layout Plain Layout
12398 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12404 A complete user guide is contained in that package (but it can also be
12405 downloaded separately).
12408 \begin_layout Standard
12409 LyX supports many features of the package but not everything.
12410 However, the TeX code needed is reduced to some
12411 \begin_inset Quotes eld
12415 \begin_inset Quotes erd
12418 commands of the package (see
12419 \begin_inset space ~
12423 \begin_inset CommandInset ref
12425 reference "subsec:kluwer_peculiarities"
12430 I have recently used LyX to write an article submitted to the
12432 Astrophysics and Space Science
12434 without any problem.
12437 \begin_layout Subsection
12441 \begin_layout Standard
12442 The easiest way to write a paper is to start with the Kluwer template file.
12445 File\SpecialChar \menuseparator
12457 This will give an (almost) empty document that includes the most common
12458 fields found in a manuscript and a short description of their use.
12459 As in most templates, simply overwrite the existing text (including the
12464 ) with the correct information.
12467 \begin_layout Subsection
12468 Preparing a paper for submission
12471 \begin_layout Standard
12472 As in the AASTeX package, before you submit your paper to a journal you
12474 \begin_inset Quotes eld
12478 \begin_inset Quotes erd
12484 \begin_layout Enumerate
12485 Export your paper as a LaTeX file.
12486 To do this, click on
12488 File\SpecialChar \menuseparator
12489 Export\SpecialChar \menuseparator
12496 \begin_layout Enumerate
12501 file with a text editor and make the following changes
12505 \begin_layout Enumerate
12506 remove the comment lines before the
12515 \begin_layout Enumerate
12516 remove everything between (and including) the
12528 commands, except for any commands you specifically put into the LaTeX preamble.
12531 \begin_layout Standard
12540 \begin_layout Enumerate
12545 file through LaTeX as many times as necessary (usually up to three).
12548 \begin_layout Enumerate
12554 \begin_inset space \thinspace{}
12558 \begin_inset space \space{}
12565 , and check if everything is OK (it should, if you didn't make any mistake).
12568 \begin_layout Subsection
12569 \begin_inset Quotes eld
12573 \begin_inset Quotes erd
12576 of the Kluwer package
12577 \begin_inset CommandInset label
12579 name "subsec:kluwer_peculiarities"
12586 \begin_layout Standard
12587 The Kluwer package has the following
12588 \begin_inset Quotes eld
12592 \begin_inset Quotes erd
12598 \begin_layout Enumerate
12599 It is possible to write multiple articles in the same LaTeX file
12603 \begin_layout Plain Layout
12604 I can't imagine any good reason to do this.
12610 Each article must be included in the environment
12611 \begin_inset Quotes eld
12615 \begin_inset Quotes erd
12619 Unfortunately, this environment cannot be omitted, even if you write just
12621 Therefore, each article starts with the command
12627 and, obviously, ends with the command
12634 Although this can be implemented in LyX, I didn't included it, since it
12635 looks ugly and can confuse the novice user.
12636 Therefore, you need to enter them directly and mark them as LaTeX code
12638 \begin_inset Quotes eld
12642 \begin_inset Quotes erd
12648 \begin_layout Enumerate
12649 Information given at the beginning of the article (i.
12650 \begin_inset space \thinspace{}
12654 \begin_inset space \space{}
12657 title, subtitle, author, institution, running title, running author, abstract
12658 and keywords) must be included in an environment called
12659 \begin_inset Quotes eld
12663 \begin_inset Quotes erd
12667 This is not implemented in LyX, so you must enter title, subtitle etc.
12668 \begin_inset space ~
12671 between two TeX code lines (
12686 \begin_layout Enumerate
12687 According to the user manual, the label of each bibliography item must be
12711 \begin_layout Standard
12716 template takes care of all these
12717 \begin_inset Quotes eld
12721 \begin_inset Quotes erd
12725 If you start a new paper using this template you don't need to do anything
12730 \begin_layout Enumerate
12731 don't delete the TeX code included in the template, and
12734 \begin_layout Enumerate
12735 copy the example bibliography item included in the template and modify it
12736 as necessary to enter new bibliography items.
12739 \begin_layout Section
12743 \begin_layout Standard
12749 \begin_layout Subsection
12753 \begin_layout Standard
12754 The LyX document classes
12756 article (koma-script)
12760 report (koma-script)
12778 correspond to the LaTeX document classes
12795 \begin_inset space ~
12798 of the Koma-Script family.
12799 They are replacements for the standard document classes
12815 , resp., and fit better to European typography conventions in a number of
12819 \begin_layout Itemize
12820 Standard character size is 11pt in
12822 article (koma-script)
12826 report (koma-script)
12834 letter (koma-script)
12839 \begin_layout Itemize
12840 Headings, labels of the description environment, and a number of elements
12843 letter (koma-script)
12845 document class are set in a bold sans serif font.
12849 \begin_layout Plain Layout
12850 There is a big difference between the bold sans serif old cm fonts and new
12851 ec fonts, especially in the appearance of headings.
12852 In comparison, the ec bold sans serif fonts look a bit thin.
12853 Here the LaTeX package
12861 helps to produce the
12862 \begin_inset Quotes eld
12866 \begin_inset Quotes erd
12869 appearance when using the ec fonts.
12874 The numbering of chapter headings is made in the same way as the numbering
12875 of section headings, that is without the extra line
12876 \begin_inset Quotes eld
12879 Chapter\SpecialChar \ldots{}
12881 \begin_inset Quotes erd
12885 In addition, the appearance of the headings can be modified by using a
12886 number of options (in LyX to be entered in the field
12889 \begin_inset space ~
12896 Layout\SpecialChar \menuseparator
12900 A detailed German description of these options can be found in the Koma-Script
12908 \begin_layout Itemize
12909 The main means in the Koma-Script document classes to design the type area
12918 (in LyX to be entered in the extra class options field in the dialog
12920 Document\SpecialChar \menuseparator
12924 They make a clearer modification of page margins possible as do the options
12927 Document\SpecialChar \menuseparator
12931 A detailed German description of these and other type area options can
12932 be found in the Koma-Script documentation
12939 \begin_layout Itemize
12940 The LaTeX document classes of the Koma-Script family define a number of
12941 additional commands.
12942 Those part of it which makes sense in LyX is implemented in corresponding
12946 \begin_layout Standard
12947 A detailed German description of the LaTeX document classes of the Koma-Script
12948 family can be found in the Koma-Script documentation
12956 \begin_layout Plain Layout
12957 There is an English translation
12961 , but it is not a complete one.
12966 The following sections describe only those aspects, which are relevant
12970 \begin_layout Subsection
12971 article (koma-script), report (koma-script), and book (koma-script)
12974 \begin_layout Standard
12975 The document classes
12977 article (koma-script)
12981 report (koma-script)
12991 are implemented in the layout files
13004 They contain all the paragraph types of the corresponding standard document
13017 , resp., partly modified, with the exception of the LyX specific
13021 -type, which is replaced by the new
13025 -type having the same functionality.
13030 -Type there is a number of new paragraph types added.
13037 letter (koma-script)
13042 \begin_layout Itemize
13051 : are equivalents to
13059 , resp., additionally inserting an entry in the table of contents.
13068 are not contained in
13070 article (koma-script)
13075 \begin_layout Itemize
13084 : behave exactly as
13092 , resp., additionally clearing running heads.
13097 is not contained in
13099 article (koma-script)
13105 \begin_layout Plain Layout
13118 report (koma-script)
13120 , but since this is identical to
13124 , is has not been implemented in LyX.
13132 \begin_layout Itemize
13137 : generates a heading directly above the following paragraph in the standard
13138 character size without affecting the structure of the document.
13141 \begin_layout Itemize
13150 are special captions which respect the different space settings needed
13151 for captions placed above or below an element (if you follow strict typographic
13152 rules, you might want to place table captions always above the table).
13153 You can also use the class option
13157 , which will switch
13170 You need at least Koma-Script version 2.8q to use this.
13173 \begin_layout Itemize
13178 : can be used to set a bonmot, e.
13179 \begin_inset space \thinspace{}
13183 \begin_inset space \space{}
13186 at the beginning of a chapter.
13187 If you use the optional argument (
13189 Insert\SpecialChar \menuseparator
13191 \begin_inset space ~
13196 ), you can insert the dictum's author there.
13197 Dictum and author are separated by a line.
13198 You need at least Koma-Script version 2.8q to use this.
13203 is not contained in
13205 article (koma-script)
13210 \begin_layout Standard
13211 The following types, together with the standard types
13223 , form the title area of the document.
13224 They must be entered ahead of the first
13225 \begin_inset Quotes eld
13229 \begin_inset Quotes erd
13236 \begin_layout Plain Layout
13237 The corresponding LaTeX commands must appear before the
13248 When such a type is used more than once, the latter usage overwrites the
13249 former one, that means, for every type only the latest usage is valid.
13250 The order of the different types however has, like
13262 , no effect on the appearance of the produced document.
13265 \begin_layout Itemize
13270 : produces a centered paragraph above the ordinary title (
13282 ) for the subject of the document.
13285 \begin_layout Itemize
13290 : produces a centered paragraph below the ordinary title (
13302 ) for the publishers' name.
13305 \begin_layout Itemize
13312 report (koma-script)
13318 produces a centered paragraph on its own page behind the title page, or
13321 article (koma-script)
13323 produces a centered paragraph below the ordinary title (
13339 ) for a dedication.
13342 \begin_layout Itemize
13347 : produces a left aligned paragraph above the ordinary title (
13363 ) for a document`s head.
13366 \begin_layout Itemize
13371 : produces in a double-sided print in
13373 report (koma-script)
13379 a left-aligned paragraph at the top of the title page`s back or has no
13380 effect in a single-sided print or in
13382 article (koma-script)
13387 \begin_layout Itemize
13392 : produces in a double-sided print in
13394 report (koma-script)
13400 a left-aligned paragraph at the bottom of the title page`s back or has
13401 no effect in a single-sided print or in
13403 article (koma-script)
13408 \begin_layout Itemize
13413 : produces a special
13414 \begin_inset Quotes eld
13418 \begin_inset Quotes erd
13421 page ahead of the actual document containing a paragraph without special
13425 \begin_layout Standard
13426 The layout files for the document classes
13428 article (koma-script)
13432 report (koma-script)
13438 do include the file
13443 This is thought of as a place to define your own types.
13448 in your personal layout directory and edit the file!
13451 \begin_layout Subsection
13452 letter (koma-script)
13455 \begin_layout Standard
13459 \begin_layout Plain Layout
13471 \begin_layout Standard
13475 letter (koma-script)
13477 is implemented in the layout file
13482 It contains all the paragraph types of the corresponding standard document
13487 , partly modified, with the exception of the LyX specific types
13499 type, which is replaced by the new
13504 In addition, it contains, in contrast to the standard document class, the
13522 Furthermore, there are a number of new letter specific types.
13525 \begin_layout Standard
13529 \begin_layout Plain Layout
13541 \begin_layout Standard
13542 The appearance of the letter produced by this document class can be controlled
13543 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13547 \begin_layout Plain Layout
13548 For example, the standard appearance of the letter`s heading, consisting
13549 of name and address, is quite self-willed.
13551 \begin_inset Quotes eld
13555 \begin_inset Quotes erd
13558 heading is produced by the following LaTeX commands in the preamble:
13561 \begin_layout LyX-Code
13571 \begin_layout LyX-Code
13587 \begin_layout LyX-Code
13597 \begin_layout LyX-Code
13617 A detailed German description of such LaTeX commands can be found in the
13618 Koma-Script documentation
13623 With it, the letter's author can produce his personal letter layout.
13626 \begin_layout Standard
13635 define the beginning of the letter and must be used in every letter.
13636 To emphasize them in the LyX document class, they are marked with the letter
13646 \begin_inset space ~
13649 in the left margin.
13650 It is possible to write any number of letters in one file.
13655 type produces a new letter using the same addressee and a
13659 type produces a new addressee.
13676 are ordinary paragraph types and can also be used several times in one
13677 and the same letter.
13680 \begin_layout Itemize
13685 : produces a paragraph for the addressee and implicitly defines the beginning
13689 \begin_layout Itemize
13694 : produces a paragraph for the form of address and implicitly produces a
13698 \begin_layout Itemize
13703 : produces a paragraph for a close.
13706 \begin_layout Itemize
13711 : produces a paragraph for a postscript.
13714 \begin_layout Itemize
13719 : produces a paragraph for a distribution list.
13722 \begin_layout Itemize
13727 : produces a paragraph for enclosures.
13730 \begin_layout Standard
13771 are input types provided with a label to enter information, which will
13772 be processed by the document class.
13776 \begin_layout Plain Layout
13777 It could be seen as a matter of inconsequence, that the types
13785 described above are not such input types as well.
13786 Because of the special meaning of those types, however, I have implemented
13787 them as ordinary paragraph types with a one letter mark in the left margin.
13788 Moreover, it would affect my feeling of symmetry, if the
13796 type had such a serious different appearance.
13801 The types must be used ahead of the corresponding
13808 \begin_layout Standard
13809 An implementation of these types in a WYSIWYG fashion does not seem to make
13810 sense, because the real appearance of the produced letter does not only
13811 depend on the usage of the particular type, but also on other factors.
13812 For example, a signature entered in the
13816 type will in the standard behavior appear in the produced letter only,
13817 when in the same letter also a
13822 The entered value of the
13826 type will in the standard behavior not appear in the produced letter at
13828 The possibility to design the letter`s heading freely is already indicated
13829 in a footnote above.
13832 \begin_layout Standard
13833 The input types can also be used as empty paragraphs.
13834 This makes sense e.
13835 \begin_inset space \thinspace{}
13839 \begin_inset space \space{}
13851 type is not used at all, in the standard behavior the value of the
13855 type is used as signature, whereas if an empty
13859 type is used, no signature value is defined.
13862 \begin_layout Standard
13863 By using the input types it is possible to write a letter template, containing
13864 filled input types with your personal dates (name, address, etc.) and empty
13865 input types for other dates you want to enter.
13868 \begin_layout Itemize
13873 : sender's name, in the standard behavior appears as a centered paragraph
13874 in small caps in the letter`s heading.
13877 \begin_layout Itemize
13882 : sender's signature, in the standard behavior appears below the
13891 type is used, the value of the
13895 type appears instead.
13898 \begin_layout Itemize
13903 : sender's address, in the standard behavior appears in a centered paragraph
13904 in the letter`s heading below the sender's name.
13907 \begin_layout Itemize
13912 : sender's telephone number, in the standard behavior only sets the LaTeX
13922 \begin_layout Itemize
13927 : place of the letter`s making.
13930 \begin_layout Itemize
13935 : date of the letter`s making.
13944 , in the standard behavior, produce the place and the date in a right-aligned
13945 line below the addressee's field.
13950 type is used, neither place nor date appear, independent of the value of
13960 type is used, the date of the letter `s production is used.
13963 \begin_layout Itemize
13968 : sender`s back address, in the standard behavior appears above the addressee's
13969 field in a small sans serif font.
13972 \begin_layout Itemize
13977 : special mail information, in the standard behavior appears underlined
13978 above the addressee's field below the back address.
13981 \begin_layout Itemize
13986 : additional information, in the standard behavior appears on right side
13987 below the addressee`s field.
13990 \begin_layout Itemize
13995 : the letter's title, in the standard behavior appears in a big, bold, sans
13996 serif font above the subject.
13999 \begin_layout Itemize
14004 : the letter's subject, in the standard behavior appears in a bold font
14012 \begin_layout Standard
14033 produce a business letter like line above the
14037 line containing the fields
14038 \begin_inset Quotes eld
14042 \begin_inset Quotes erd
14046 \begin_inset Quotes eld
14050 \begin_inset Quotes erd
14054 \begin_inset Quotes eld
14058 \begin_inset Quotes erd
14062 \begin_inset Quotes eld
14066 \begin_inset Quotes erd
14070 \begin_inset Quotes eld
14074 \begin_inset Quotes erd
14078 \begin_inset Quotes eld
14082 \begin_inset Quotes erd
14086 For the date field, the value of the
14092 \begin_inset Quotes eld
14095 business letter types
14096 \begin_inset Quotes erd
14099 is used, the value of the
14103 type however does not appear, but only the LaTeX variable
14110 The ordinary output of place and date in a right-aligned line below the
14111 addressee`s field is suppressed.
14112 The types are implemented as input types provided with a label and must
14113 be used ahead of the corresponding
14120 \begin_layout Itemize
14128 \begin_layout Itemize
14136 \begin_layout Itemize
14144 \begin_layout Itemize
14152 \begin_layout Itemize
14160 \begin_layout Subsection
14161 The new letter class: letter (koma-script v.2)
14164 \begin_layout Standard
14170 \begin_layout Standard
14171 \begin_inset VSpace medskip
14177 \begin_layout Standard
14179 Koma-Script version 2.8 has introduced a new letter class
14183 which supersedes the now unsupported
14188 It has — on the LaTeX side — a completely new interface and is not compatible
14189 with the old class.
14190 Therefore, LyX supports both, though it is recommended to use the new class.
14193 \begin_layout Standard
14194 This class covers the same functionality as
14196 letter (koma-script),
14199 The basic items are
14203 (receiver's address, same as
14207 in the old layout),
14220 will start a new letter (i.
14221 \begin_inset space \thinspace{}
14225 \begin_inset space \space{}
14228 you can write several letters per document).
14229 New elements are sender's
14245 and the possibility to use a
14251 Insert\SpecialChar \menuseparator
14257 \begin_layout Standard
14258 The biggest improvement is, though, that the letter's layout is configurable
14259 at almost any needs.
14260 This can be done via the preamble or with a special style file (Letter
14261 Class Option, extension
14265 ), that will be read in as a class option.
14269 \begin_layout Plain Layout
14270 The KOMA package comes with some default
14275 There is, for instance, a
14279 file that follows german typesetting rules, or a
14283 that provides the default layout of the old
14288 The latter can be loaded with the class option
14297 ayout\SpecialChar \menuseparator
14302 ocument\SpecialChar \menuseparator
14314 template that is included in LyX for examples.
14315 A detailed description is to be found in the Koma-Script documentation
14323 \begin_layout Subsection
14327 \begin_layout Standard
14328 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14332 \begin_layout Itemize
14333 The chapter number of a
14337 type appears on a line of its own above the chapter heading instead of
14338 appearing in the same line ahead of it.
14339 The cause for that is the LyX internal behavior for the labeltype
14343 in the layout file.
14346 \begin_layout Itemize
14347 The headings of the types
14355 are only put in the
14356 \begin_inset Quotes eld
14360 \begin_inset Quotes erd
14363 LaTeX table of contents, but not in the LyX table of contents (
14365 Document\SpecialChar \menuseparator
14367 \begin_inset space ~
14371 \begin_inset space ~
14379 \begin_layout Itemize
14380 The paragraphs in a
14384 document class appear in a skip separation mode, not indented.
14385 This is the standard behavior, no special LaTeX commands are needed for
14389 Document\SpecialChar \menuseparator
14392 dialog the corresponding radio button indicates
14401 value always has the effect that extra LaTeX commands are inserted in the
14402 document to produce the gap, which is not what is wanted in this case.
14405 \begin_layout Section
14406 Latex8 (IEEE Conference Papers)
14409 \begin_layout Standard
14415 \begin_layout Subsection
14419 \begin_layout Standard
14420 Since this class is specifically for writing submissions to IEEE sponsored
14421 conferences I strongly recommend that you get a copy of their Authors Kit.
14426 package and associated bibliography style file is included in the kit.
14427 The Authors Kit is usually sent out by email once your initial submission
14429 There is a lot of useful information in the Authors Kit explaining formatting
14430 restrictions and so on and I will assume you have read this since that
14431 means I don't have to repeat it all here.
14434 \begin_layout Subsection
14438 \begin_layout Standard
14439 [AR\SpecialChar \@.
14443 \begin_layout Subsection
14444 Supported Environments
14447 \begin_layout Itemize
14453 \begin_layout Itemize
14459 \begin_layout Itemize
14465 \begin_layout Itemize
14471 \begin_layout Itemize
14477 \begin_layout Itemize
14483 \begin_layout Itemize
14489 \begin_layout Itemize
14495 \begin_layout Itemize
14501 \begin_layout Subsection
14502 Differences Between Screen and Paper
14505 \begin_layout Standard
14506 There are slight differences in appearance mainly with the presentation
14507 of section counters.
14508 On screen the trailing period of the section counter is missing but it
14509 will appear in the output so don't let this worry you.
14512 \begin_layout Section
14516 \begin_layout Standard
14522 \begin_layout Subsection
14526 \begin_layout Standard
14527 Memoir is a very powerful and constantly evolving class.
14528 It has been designed with regard to fictional and non-fictional literature.
14529 Its aim is to let the user have maximum control over the typesetting of
14531 Memoir is based on the standard book class, but it can also emulate the
14532 article class (see below).
14535 \begin_layout Standard
14536 Peter Wilson, the developer of Memoir, is known as the author of lots of
14537 useful packages in the LaTeX world.
14538 Most of them have been merged with Memoir.
14539 Therefore, it is much easier to layout the table of contents, appendices,
14540 chapter designs and such.
14541 LyX, though, does not support all of these goodies natively.
14542 Some of them might be added to forthcoming releases
14546 \begin_layout Plain Layout
14547 You are invited to send suggestions to
14548 \begin_inset Flex URL
14551 \begin_layout Plain Layout
14553 lyx-devel@lists.lyx.org
14563 , lots will probably never, due to the limitations of LyX's framework.
14564 Of course you can still use all features with the help of some native LaTeX
14569 \begin_layout Plain Layout
14574 \begin_layout Plain Layout
14584 \begin_inset space ~
14588 \begin_inset CommandInset ref
14590 reference "sec:Inserting-TeX-Code"
14600 In this section, we can only list those features which are natively supported
14602 For detailed descriptions (and for the rest of features) we are recommending
14603 to have a look at the detailed manual of the Memoir class
14607 \begin_layout Plain Layout
14612 \begin_layout Plain Layout
14622 \begin_inset Flex URL
14625 \begin_layout Plain Layout
14627 CTAN:/macros/latex/memoir/memman.pdf
14637 , which is not only a user guide for the class, but also both a comprehensive
14638 description on good typesetting and a superb example for good typesetting
14642 \begin_layout Subsection
14643 Basic features and restrictions
14646 \begin_layout Standard
14647 Memoir supports basically all features of the standard book classes.
14648 There are, however, some differences, as follows:
14651 \begin_layout Description
14653 \begin_inset space ~
14656 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14659 \begin_layout Description
14661 \begin_inset space ~
14664 style: The fancy page style is not supported, due to a command clash between
14665 Memoir and the fancyhdr package (they are both defining a command with
14666 the same name, which confuses LaTeX).
14667 Instead, Memoir comes with a bunch of own page styles (see
14669 Layout\SpecialChar \menuseparator
14670 Document\SpecialChar \menuseparator
14672 \begin_inset space ~
14678 If you want to use these for the chapter pages, you have to use the command
14685 in the main text or in preamble (e.
14686 \begin_inset space \thinspace{}
14690 \begin_inset space \space{}
14697 chapterstyle{companion}
14702 \begin_layout Description
14703 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14704 an optional argument in the standard classes.
14705 With this, you can specify an alternative version of the title for the
14706 table of contents and the headers (for instance, if the title is too long).
14707 In LyX, you can do this via
14709 Insert\SpecialChar \menuseparator
14711 \begin_inset space ~
14716 at the beginning of a chapter/section.
14717 Memoir features a second optional argument and thus separates the table
14718 of contents from the header.
14719 You can define three variants of a title with this: one for the main text,
14720 one for the table of contents, and one for the headers.
14721 Simply insert two optional arguments if you need this feature, the first
14722 one containing the short title for the Table of Contents, the second one
14723 containing an alternative short title for the headers.
14726 \begin_layout Description
14727 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14728 of contents, the list of figures and the list of table start a new page
14730 Memoir does not follow this route.
14731 You have to insert a page break yourself, if you want to have one.
14734 \begin_layout Description
14735 Titlepage: For some unknown reason, Memoir uses pagination on the title
14736 page (in the standard classes, title pages are
14737 \begin_inset Quotes eld
14741 \begin_inset Quotes erd
14745 \begin_inset space \thinspace{}
14749 \begin_inset space \space{}
14753 If you want an empty title page, type
14757 aliaspagestyle{title}{empty}
14762 \begin_layout Description
14763 Article: With the class option
14769 Layout\SpecialChar \menuseparator
14770 Document\SpecialChar \menuseparator
14772 \begin_inset space ~
14777 ), you can emulate article style.
14778 That is, counters (footnotes, figures, tables etc.) will not be reset on
14779 new chapters, chapters don't start a new page (but are—in contrary to
14780 \begin_inset Quotes eld
14784 \begin_inset Quotes erd
14787 article classes—still allowed), parts, though, use their own page, as in
14791 \begin_layout Description
14792 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14793 font commands, which have been used in the old LaTeX version 2.09 (e.
14794 \begin_inset space \thinspace{}
14798 \begin_inset space \space{}
14814 It produces an error and stops LaTeX whenever such a command appears.
14819 reallows the commands and spits out warnings instead (which does at least
14821 Since a lot of packages and particularly BibTeX style files are still using
14822 those commands, we have decided to use this option by default.
14825 \begin_layout Subsection
14829 \begin_layout Standard
14830 We will only describe the features supported by LyX (which is not much currently
14832 Please consult the Memoir manual
14836 \begin_layout Plain Layout
14841 \begin_layout Plain Layout
14851 \begin_inset Flex URL
14854 \begin_layout Plain Layout
14856 CTAN:/macros/latex/memoir/memman.pdf
14869 \begin_layout Description
14870 Abstract: You may wonder why an abstract is an extra feature.
14871 Well, it is in book class.
14872 Usually books don't have abstracts.
14873 Memoir, however, has.
14874 You can use it wherever and how often you like.
14877 \begin_layout Description
14878 Chapterprecis: You may know this from belletristic: The contents of a chapter
14879 is shortly described below the title and also in the table of contents
14881 \begin_inset space \thinspace{}
14885 \begin_inset space \space{}
14890 Our hero arrives in Troia; he loses some friends; he finds others
14893 Chapterprecis does exactly this.
14894 It is therefore only sensible below a chapter.
14897 \begin_layout Description
14898 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14899 The epigraph environment provides an elegant way of typesetting such a
14901 The motto itself (text) and its author (source) are divided by a short
14903 Unfortunately, we have to fool LyX a bit here again, since the environment
14904 needs two arguments (text and source).
14905 In this case, we have to use curly brackets (in TeX mode) between the two
14916 <author of the slogan>.
14919 \begin_layout Description
14920 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14921 complex figurative poems).
14922 LyX can only support a few of them.
14923 One is poemtitle, which is a centered title for poems, which will also
14924 be added to the table of contents (verse is the standard environment for
14926 Memoir has some enhanced versions of verse, but you need to use TeX code,
14927 because they have to be nested inside regular verse environments, which
14928 is not possible with LyX).
14931 \begin_layout Description
14932 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14935 \begin_layout Section
14936 Article (mwart), book (mwbk) and report (mwrep)
14937 \begin_inset Argument
14940 \begin_layout Plain Layout
14953 \begin_layout Standard
14959 \begin_layout Standard
14960 The LyX document classes
14976 correspond to the LaTeX document classes
14989 They are replacements for the standard document classes
15001 , resp., and fit better to Polish typography conventions in a number of points.
15005 \begin_layout Standard
15009 \begin_layout Itemize
15010 Unnumbered titles (with star, e.
15011 \begin_inset space \thinspace{}
15015 \begin_inset space \space{}
15022 ) are added into table of contents,
15025 \begin_layout Itemize
15026 Additional page styles:
15030 \begin_layout Description
15031 uheadings header with separated lines,
15034 \begin_layout Description
15035 myheadings custom header, contents headers via commands:
15050 \begin_layout Description
15051 myuheadings custom header with separated lines,
15054 \begin_layout Description
15055 outer page number is placed on outer side of page
15059 \begin_layout Itemize
15064 \begin_layout Description
15065 rmheadings serif titles — default,
15068 \begin_layout Description
15069 sfheadings sansserif titles,
15072 \begin_layout Description
15073 authortitle on title page first placed is author next title — default,
15076 \begin_layout Description
15077 titleauthor on title page first placed is title next author,
15080 \begin_layout Description
15081 withmarginpar reserve place on page for margins.
15085 \begin_layout Section
15089 \begin_layout Standard
15094 provides an alternative to the standard
15099 It provides similar functionality, but you might prefer this layout with
15100 sans serif sections, headings, and more.
15103 \begin_layout Section
15107 \begin_layout Standard
15113 \begin_layout Standard
15114 \begin_inset VSpace bigskip
15120 \begin_layout Standard
15125 \begin_inset space ~
15130 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15131 \begin_inset Formula $\beta$
15134 release of May, 1999) class.
15137 \begin_layout Standard
15142 textclass, which works with RevTeX 3.1.
15143 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15144 That means that it doesn't interact very well with LyX, which requires
15145 LaTeX2e, although it has been kludged to work.
15146 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15150 \begin_inset space ~
15155 textclass should also be pretty easy to use.
15158 \begin_layout Standard
15159 These documents are supposed to be used in
15163 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15164 macros, and assume you'll know what to put in the preamble if necessary.
15167 \begin_layout Subsection
15171 \begin_layout Standard
15172 All you need to do is install RevTeX 4, as described in the package's README
15174 The package can be found at The RevTeX 4 Web Site
15175 \begin_inset Flex URL
15178 \begin_layout Plain Layout
15180 http://publish.aps.org/revtex4/
15186 Install it somewhere that LaTeX can see it.
15187 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15189 \begin_inset space \thinspace{}
15193 \begin_inset space \space{}
15196 not the directory where you installed the class file.) Then, if you reconfigure
15197 LyX, it will find the class file and let you use the RevTeX4 textclass.
15200 \begin_layout Standard
15201 Probably the easiest way to get started is either to import a RevTeX 4 document
15209 \begin_inset space ~
15214 template, found in the templates directory.
15217 \begin_layout Subsection
15221 \begin_layout Standard
15222 Optional arguments to
15229 \begin_inset Quotes eld
15233 \begin_inset Quotes erd
15237 \begin_inset Quotes eld
15241 \begin_inset Quotes erd
15251 \begin_inset space ~
15259 \begin_inset space ~
15265 Remember that in RevTeX, at least one optional argument is required!
15268 \begin_layout Standard
15269 Other preamble matter, like
15276 \begin_inset space ~
15282 \begin_inset space ~
15287 dialog, also as usual.
15290 \begin_layout Subsection
15294 \begin_layout Standard
15295 The layouts basically correspond to the commands in RevTeX4.0.
15296 For example, the Email layout corresponds to
15303 Note that (at least as of RevTeX 4.0 Beta), the
15311 layouts are exactly equivalent, so you shouldn't need to use both.
15315 \begin_layout Plain Layout
15316 In case you're curious, both were included so that
15320 would be able to translate both
15340 \begin_layout Subsection
15344 \begin_layout Standard
15345 There are a couple of important unique aspects of RevTeX 4 which might cause
15346 bugs that will be even more confusing in LyX.
15349 \begin_layout Standard
15367 The LyX equivalent is that there is a separate Thanks layout.
15372 write footnotes in the
15376 layout, or weird things may happen.
15377 See the RevTeX 4 documentation for more details.
15380 \begin_layout Standard
15384 \begin_inset space ~
15392 \begin_inset space ~
15401 layouts must be placed
15409 layout and the corresponding
15426 , the LaTeX won't compile.
15429 \begin_layout Subsection
15433 \begin_layout Standard
15434 The main problem with this layout is that you can't use the optional arguments
15435 to layouts like Email and Title.
15436 (The problem is not unique to this layout; you can't use optional arguments
15437 to the Section layouts either.) This means that after you export that file
15438 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15439 need to edit the LaTeX file with a text editor to add the optional arguments
15441 \begin_inset space \thinspace{}
15445 \begin_inset space \space{}
15448 the running title for the page headers.
15449 Lacking these layouts makes the
15455 (and the equivalent
15461 ) useless, so the corresponding layouts don't exist, and will have to be
15466 \begin_layout Plain Layout
15471 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15472 has not been updated yet to take advantage of it.
15480 \begin_layout Section
15481 Springer Journals (
15488 \begin_layout Standard
15494 \begin_layout Subsection
15498 \begin_layout Standard
15499 These are the layout files for some of the journal formats used by Springer
15500 Verlag and listed on
15501 \begin_inset Flex URL
15504 \begin_layout Plain Layout
15506 http://www.springer.de/author/tex/help-journals.html
15511 , where you should also go to fetch the class files (yes, these are LaTeX2e
15513 It is a modular system: the things common to all journals are implemented
15518 , which journal-specific layout files (such as, e.
15519 \begin_inset space \thinspace{}
15523 \begin_inset space \space{}
15530 for Journal of Geodesy) can include.
15533 \begin_layout Standard
15534 This means that implementing support for any other Springer journal on this
15535 list is as simple as writing your own
15543 file following the outline given in
15551 \begin_layout Standard
15552 It is reasonably well tested only for the Journal of Geodesy.
15561 come with the standard LyX distribution.
15562 Install the relevant class file (downloaded from Springer) in a proper
15563 directory, reconfigure LaTeX (in the teTeX case by running
15567 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15568 and it should work.
15571 \begin_layout Subsection
15575 \begin_layout Standard
15576 A large number of theorem-like styles —
15582 \SpecialChar \ldots{}
15588 \begin_layout Standard
15591 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15592 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15595 See the Springer class file documentation for details.
15598 \begin_layout Subsection
15602 \begin_layout Itemize
15614 \begin_layout Itemize
15617 Probability Theory and Related Fields
15623 — Jean-Marc Lasgouttes
15626 \begin_layout Standard
15627 Add your own, it isn't so hard!
15630 \begin_layout Subsection
15634 \begin_layout Standard
15635 These files are partly based on the older
15639 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15640 file from Springer.
15645 layout, are now defunct.
15646 Jean-Marc Lasgouttes helped out big in making me find my way around the
15647 LyX layout file mechanism.
15650 \begin_layout Subsection
15654 \begin_layout Standard
15656 But probably less than in the old hacked-LaTeX
15663 \begin_layout Standard
15665 \begin_inset space \thinspace{}
15668 g.: does not display the number for theorem-like layouts, just #.
15671 \begin_layout Section
15677 \begin_inset CommandInset label
15686 \begin_layout Standard
15694 \begin_layout Subsection
15698 \begin_layout Standard
15699 This section describes how to use LyX to make slides for overhead projectors.
15700 There are two document classes that can do this: the default slides class
15706 This section documents the former.
15709 \begin_layout Standard
15710 I'm going to say this again, nice and clear, so that there's no misunderstanding
15714 \begin_layout Standard
15715 \begin_inset VSpace bigskip
15721 \begin_layout Standard
15725 This section documents the class
15726 \begin_inset Quotes eld
15734 \begin_inset Quotes erd
15742 \begin_layout Standard
15743 \begin_inset VSpace bigskip
15749 \begin_layout Standard
15750 If you're looking for the documentation for
15751 \begin_inset Quotes eld
15759 \begin_inset Quotes erd
15762 , check out section
15763 \begin_inset space ~
15767 \begin_inset CommandInset ref
15769 reference "sec:foiltex"
15779 \begin_inset Quotes eld
15787 \begin_inset Quotes erd
15790 ] is actually somewhat better than the default
15798 \begin_layout Plain Layout
15799 \SpecialChar \ldots{}
15800 or so I've been told repeatedly by its advocates.
15801 Having never used it, I have no idea if this claim is true or not.
15806 which this section documents.
15809 \begin_layout Standard
15810 This class is the LaTeX2e improvement of the old
15815 Every LaTeX2e distribution includes this class [which I'll just refer to
15817 \begin_inset Quotes eld
15825 \begin_inset Quotes erd
15828 from now on], so you're bound to have it.
15829 As I noted earlier, there are other classes, such as
15833 , which also produce slides for overhead projectors and do a better job
15835 However, there are some things which
15839 can do which the others can't, such as generate overlays.
15840 Read on to learn more!
15843 \begin_layout Subsection
15845 \begin_inset CommandInset label
15847 name "sec:slidesetup"
15854 \begin_layout Standard
15855 Obviously, to use this document class, you need to select
15856 \begin_inset Quotes eld
15864 \begin_inset Quotes erd
15867 from the class list in the
15869 Document\SpecialChar \menuseparator
15873 There are some other special things you should know about this class:
15876 \begin_layout Itemize
15877 Don't bother changing the options
15882 They're not supported by the
15889 \begin_layout Itemize
15893 \begin_inset space ~
15898 behaves a bit differently for this class.
15899 The possible choices and what they do are as follows:
15903 \begin_layout Description
15908 The final output contains page numbers in the lower right corner.
15911 \begin_layout Description
15920 , but also prints out any time markers you've put in.
15921 This is the default.
15924 \begin_layout Description
15929 The final output contains no page numbers, time markers, or alignment markers.
15933 \begin_layout Itemize
15938 class has an extra option:
15944 \begin_inset Quotes eld
15952 \begin_inset Quotes erd
15955 in the extra class options.
15959 \begin_layout Standard
15960 Using this options allows you to add time markers to
15966 \begin_inset space ~
15970 \begin_inset CommandInset ref
15972 reference "sec:slideNote"
15980 \begin_layout Standard
15981 You can also use the template file
15982 \begin_inset Quotes eld
15990 \begin_inset Quotes erd
15993 to automatically set up a document to use the
15999 File\SpecialChar \menuseparator
16001 \begin_inset space ~
16005 \begin_inset space ~
16010 to open your new document].
16011 The template file also contains some examples of the special paragraph
16012 environments used by this class.
16013 I'll describe those next.
16016 \begin_layout Subsection
16017 Paragraph Environments
16020 \begin_layout Subsubsection
16021 Supported Environments
16024 \begin_layout Standard
16025 The first thing you'll notice when you start up a new
16029 document is the font size and type: it's the equivalent of the size
16030 \begin_inset Quotes eld
16038 \begin_inset Quotes erd
16044 \begin_inset space ~
16050 This is also what's used in the output.
16052 \begin_inset Quotes eld
16056 \begin_inset Quotes erd
16059 to remind you that this is a slide.
16060 Your final slides will use a larger font; ergo, you'll have less space.
16061 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16064 \begin_layout Standard
16065 The next thing that becomes obvious is the changes to the paragraph environment
16066 pull-down box [at the far-left end of the toolbar].
16067 Most of the paragraph environments you're used to seeing are missing.
16068 There are also five new ones.
16073 class itself only supports certain paragraph environments:
16076 \begin_layout Itemize
16082 \begin_layout Itemize
16088 \begin_layout Itemize
16094 \begin_layout Itemize
16100 \begin_layout Itemize
16106 \begin_layout Itemize
16112 \begin_layout Itemize
16118 \begin_layout Itemize
16124 \begin_layout Itemize
16130 \begin_layout Itemize
16136 \begin_layout Itemize
16142 \begin_layout Standard
16143 All of the other standard environments, including the section-heading environmen
16144 ts, aren't used in the
16151 \begin_layout Standard
16152 On the other hand, you'll notice the following new environments:
16155 \begin_layout Itemize
16161 \begin_layout Itemize
16167 \begin_layout Itemize
16173 \begin_layout Itemize
16179 \begin_layout Itemize
16185 \begin_layout Standard
16186 These five are kind of quirky, due to a
16187 \begin_inset Quotes eld
16191 \begin_inset Quotes erd
16195 You see, LyX doesn't permit you to nest any other paragraph environment
16196 into an empty environment.
16197 Now, that's fine and dandy, but it means that you wouldn't be able to start
16198 a slide with anything except plain text.
16199 To deal with this, I've performed a little
16200 \begin_inset Quotes eld
16204 \begin_inset Quotes erd
16210 \begin_layout Subsubsection
16211 Quirks of the New Environments
16212 \begin_inset CommandInset label
16214 name "sec:slideQuirk"
16221 \begin_layout Standard
16222 All five of the new paragraph environments are somewhat quirky due to inherent
16223 limitiations in the current version of LyX.
16224 As I just mentioned, LyX forbids environments that begin with another environme
16226 To get around this, the
16230 environment isn't a paragraph environment as described in the
16238 \begin_layout Standard
16239 You should consider
16252 \begin_inset Quotes eld
16255 pseudo-environments.
16256 \begin_inset Quotes erd
16259 They look like a section heading or a
16260 \begin_inset Quotes eld
16268 \begin_inset Quotes erd
16271 but really begin a [and, if necessary, end the previous] paragraph environment.
16281 \begin_inset Quotes eld
16285 \begin_inset Quotes erd
16288 These two perform some action.
16291 \begin_layout Standard
16292 A common feature of all five environments,
16312 , is a rather long-ish label.
16313 The text following this label — ordinarily the contents of the paragraph
16314 environment — is utterly irrelevant for
16335 LyX completely ignores it.
16336 In fact, you can leave these five environments completely empty.
16340 \begin_layout Standard
16345 to put any text after the rather long-ish label, you might want to.
16346 This could be a short description of the contents of the
16351 In that case, enter in your descriptive comment and hit
16355 as you normally would.
16358 \begin_layout Standard
16359 If, on the other hand, you don't want to enter in any descriptive text,
16360 you'll hit another LyX quirk.
16361 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16362 environment until you put something in the old one.
16366 \begin_layout Itemize
16367 Start entering the text that will
16395 \begin_layout Itemize
16396 Now move to the beginning of that paragraph.
16400 \begin_layout Itemize
16409 \begin_layout Itemize
16410 Finally, change this new, empty paragraph to a
16434 \begin_layout Standard
16435 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16439 \begin_layout Subsection
16440 Making a Presentation with
16453 \begin_layout Subsubsection
16461 \begin_layout Standard
16462 If you're expecting this section to teach you how to actually make a presentatio
16463 n, you'll be sorely disappointed.
16464 Naturally, I'll describe all of the ways the
16468 class can assist you in preparing the materials for a presentation.
16469 Filling in the contents, however, is up to you.
16474 the LyX philosophy.]
16477 \begin_layout Standard
16482 environment [in the manner described in section
16483 \begin_inset space ~
16487 \begin_inset CommandInset ref
16489 reference "sec:slideQuirk"
16493 ] tells LyX to begin a new slide [duh].
16494 The label for this environment/
16495 \begin_inset Quotes erd
16499 \begin_inset Quotes erd
16503 \begin_inset Quotes eld
16507 \begin_inset Quotes erd
16510 in cool blue, followed by the label,
16511 \begin_inset Quotes eld
16515 \begin_inset Quotes erd
16519 Any text or paragraph environments that follow this one go on the new slide.
16523 \begin_layout Standard
16524 Slides are probably the only time you'll need to forcibly end pages in LyX
16525 (this can be specified in the
16530 In fact, you'll want to, once you finish entering the contents of one slide.
16531 If you've entered more text than can physically fit on a slide, the extra
16532 overflows onto a new slide.
16533 I don't recommend doing this, however, since the overflow slide won't have
16534 any page number on it.
16535 Furthermore, it may interfere with any
16539 you've made to accompany the oversized
16546 \begin_layout Standard
16555 environments work the same way as the
16560 They both create an
16561 \begin_inset Quotes eld
16565 \begin_inset Quotes erd
16568 followed by a label [
16569 \begin_inset Quotes eld
16573 \begin_inset Quotes erd
16577 \begin_inset Quotes eld
16581 \begin_inset Quotes erd
16585 The color is a stunning magenta instead of blue, and the
16586 \begin_inset Quotes eld
16590 \begin_inset Quotes erd
16593 will look different, in style and in length.
16594 The label fonts of all three also differ from one another.
16597 \begin_layout Standard
16602 , if the contents of a
16610 exceed the physical size of a slide or sheet of paper, the extra will overflow
16612 Again, you should avoid this.
16613 It defeats the whole purpose of
16624 \begin_layout Subsubsection
16634 \begin_layout Standard
16639 is a slide that sits atop another slide.
16640 Perhaps you wish to discuss a figure on the main
16644 before displaying the text associated with it.
16645 One way to accomplish this is tape a flap of dark paper over the part of
16650 you want to display later.
16651 This method fails, however, if you wish to overlap one graph with another,
16653 You would then have to fumble while speaking to align the two separate,
16658 s to align the two graphs.
16663 environment in both cases makes life much easier.
16666 \begin_layout Standard
16671 receives the page number of its
16672 \begin_inset Quotes eld
16676 \begin_inset Quotes erd
16684 \begin_inset Quotes eld
16692 \begin_inset Quotes erd
16699 \begin_layout Plain Layout
16700 Presumably, mutliple
16705 \begin_inset Quotes eld
16713 \begin_inset Quotes erd
16717 \begin_inset Quotes eld
16725 \begin_inset Quotes erd
16729 \begin_inset Quotes eld
16737 \begin_inset Quotes erd
16741 \begin_inset space ~
16744 appended to the page number of the parent
16754 Clearly, you want the contents of both the
16762 to each fit on a single physical slide! You should probably consider an
16768 \begin_inset Quotes eld
16772 \begin_inset Quotes erd
16784 class provides a visual cue for this: the label at the start of an
16788 is shorter than that at the start of a
16793 Lastly, when you generate printable output, you'll find alignment markers
16794 in all four corners of both the
16798 page and its parent
16803 These will assist you in lining up the two physical slides.
16806 \begin_layout Standard
16807 The major problem in overlaying two slides is aligning the contents of the
16808 two transparencies.
16809 How much space should you leave for that graph on the second slide? Worse
16810 still, what if you want a graph and a sentence on second slide, but there
16811 is text on the main transparency that goes in between them? You could try
16812 and insert vertical space of the right size.
16813 The better way is to use
16824 \begin_layout Standard
16825 As their names imply,
16833 are two command-like paragraph environments that make all subsequent text
16834 invisible and visible, respectively.
16836 \begin_inset space ~
16840 \begin_inset CommandInset ref
16842 reference "sec:slideQuirk"
16846 that you don't place anything
16850 these two environments, however.
16855 , it inserts a centered, sky-blue label into the page reading
16856 \begin_inset Quotes eld
16859 <Invisible Text Follows>
16860 \begin_inset Quotes erd
16864 For paragraphs following this label, the parts of the
16872 ; it doesn't matter which] where they would be contain instead blank space.
16876 \begin_layout Standard
16881 , the corresponding centered label is
16882 \begin_inset Quotes eld
16885 <Visible Text Follows>
16886 \begin_inset Quotes erd
16890 Paragraphs following this label behave normally.
16891 Note that the beginning of a new
16903 automatically shuts off an
16908 It's therefore not necessary to use
16919 \begin_layout Standard
16920 By now, it should be obvious how to create overlay transparencies using
16921 the proper combination of
16940 \begin_layout Enumerate
16945 , including everything that will appear on it, whether on the main slide
16953 \begin_layout Enumerate
16954 Before each figure or paragraph that will appear only on the
16963 If necessary, insert a
16967 environment after the
16974 \begin_layout Enumerate
16979 immediately following the
16986 \begin_layout Enumerate
16987 Copy the contents of this
16998 \begin_layout Enumerate
17003 , change all of the
17014 \begin_layout Standard
17016 You've just made an
17023 \begin_layout Standard
17024 There's one problem with the way I've designed the LyX
17028 class: you can't make text in the middle of a paragraph invisible, nor
17029 make text in the middle of an invisible paragraph visible again.
17030 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17034 \begin_layout Plain Layout
17035 The commands of interest are:
17038 \begin_layout Itemize
17043 invisible \SpecialChar \ldots{}
17047 \begin_layout Itemize
17052 visible \SpecialChar \ldots{}
17056 \begin_layout Plain Layout
17057 \SpecialChar \ldots{}
17058 and need to be marked as TeX.
17060 \begin_inset Quotes eld
17064 \begin_inset Quotes erd
17067 you wish to change goes in between the brackets [and after the
17080 If you don't know how to mark text as TeX, see the appropriate section
17093 \begin_layout Subsubsection
17103 \begin_inset CommandInset label
17105 name "sec:slideNote"
17112 \begin_layout Standard
17121 is associated with a
17122 \begin_inset Quotes eld
17126 \begin_inset Quotes erd
17138 class provides visual cues.
17143 is shorter than that of a
17147 [yet longer than that of an
17151 ] and, like the label of an
17155 is shockingly magenta.
17156 Additionally, the printed
17160 has the page number of its
17161 \begin_inset Quotes eld
17165 \begin_inset Quotes erd
17173 \begin_inset Quotes eld
17181 \begin_inset Quotes erd
17185 \begin_inset Quotes eld
17193 \begin_inset Quotes erd
17197 \begin_inset Quotes eld
17205 \begin_inset Quotes erd
17209 You can have multiple
17213 s associated with a single
17225 , you'll probably want to break up long
17229 s so that they fit on a single sheet of paper.
17232 \begin_layout Standard
17237 is obvious: it contains anything additional you might want to say about
17243 It could also be used as a sheet of reminders for a particular
17248 In the case of the latter, you might want to make use of time markers.
17254 \begin_inset Quotes eld
17258 \begin_inset Quotes erd
17261 support for time markers, a
17266 So, you'll have to resort to using the LaTeX codes.
17269 \begin_layout Standard
17270 To use time markers, you'll need to specify the extra class option
17271 \begin_inset Quotes eld
17279 \begin_inset Quotes erd
17283 \begin_inset space ~
17287 \begin_inset CommandInset ref
17289 reference "sec:slidesetup"
17294 This option turns on timing marks, which will appear in the lower-left-hand
17300 To set what appears in the time marker, you use the LaTeX commands
17301 \begin_inset Quotes eld
17311 \begin_inset Quotes erd
17315 \begin_inset Quotes eld
17325 \begin_inset Quotes erd
17329 The arguments of both commands are time measured in seconds.
17331 \begin_inset Quotes eld
17341 \begin_inset Quotes erd
17344 sets the time marker to a given time.
17346 \begin_inset Quotes eld
17356 \begin_inset Quotes erd
17359 increments the time marker by the specified amount.
17360 Using time markers and
17364 s in this fashion, you can remind yourself how much time to spend on a particula
17372 \begin_layout Standard
17373 There's one last feature to describe.
17374 Clearly, you'd like to print out all of your
17382 s on transparencies while printing all of your
17399 with which it is associated.
17400 What's a person to do?
17403 \begin_layout Standard
17404 Luckily, there are two LaTeX commands that allow you to select what to print
17406 Both must be placed into the preamble of your document.
17408 \begin_inset Quotes eld
17420 \begin_inset Quotes erd
17423 will cause the output to contain only the
17432 Correspondingly, the command
17433 \begin_inset Quotes eld
17445 \begin_inset Quotes erd
17448 prevents the output of anything but
17453 I'd advise placing both commands in the preamble and initially comment
17455 You can then preview your entire presentation as you write.
17456 When you're done writing, you can then uncomment one of the two to select
17457 what you want to print.
17458 I like to uncomment
17459 \begin_inset Quotes eld
17471 \begin_inset Quotes erd
17474 , print to a file with
17475 \begin_inset Quotes eld
17483 \begin_inset Quotes erd
17486 in its name, comment it back out, then uncomment
17487 \begin_inset Quotes eld
17499 \begin_inset Quotes erd
17503 \begin_inset Quotes eld
17511 \begin_inset Quotes erd
17515 I can then send either file to a printer, loading transparencies or plain
17516 paper as appropriate.
17519 \begin_layout Standard
17520 You can also provide other arguments to the
17521 \begin_inset Quotes eld
17531 \begin_inset Quotes erd
17535 \begin_inset Quotes eld
17545 \begin_inset Quotes erd
17549 See a good LaTeX book for details.
17552 \begin_layout Subsection
17557 Class Template File
17560 \begin_layout Standard
17561 I have also provided a template file,
17562 \begin_inset Quotes eld
17570 \begin_inset Quotes erd
17578 To use it, begin your new presentation with
17583 ile\SpecialChar \menuseparator
17585 \begin_inset space ~
17589 \begin_inset space ~
17599 Your new LyX presentation file will contain an example
17620 additionally contain an example of the use of
17629 Lastly, the preamble will contain:
17632 \begin_layout LyX-Code
17633 % Uncomment to print out only slides and overlays
17636 \begin_layout LyX-Code
17640 \begin_layout LyX-Code
17646 \begin_inset Newline newline
17652 \begin_layout LyX-Code
17653 % Uncomment to print out only notes
17656 \begin_layout LyX-Code
17660 \begin_layout LyX-Code
17668 \begin_layout Standard
17669 One final thing: I created this class to support the LaTeX2e
17670 \begin_inset Quotes eld
17678 \begin_inset Quotes erd
17681 class, one of the built-in LaTeX2e classes.
17682 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17683 built-in slide class.
17684 It's here if you want it or need it.
17685 There exist other LaTeX2e classes for creating presentations, such as the
17691 \begin_inset space ~
17695 \begin_inset CommandInset ref
17697 reference "sec:foiltex"
17702 \begin_inset Quotes eld
17710 \begin_inset Quotes erd
17713 package [present on some TeX distributions].
17714 The latter is not yet supported under LyX.
17718 \begin_layout Plain Layout
17719 Perhaps you can take on the task\SpecialChar \ldots{}
17725 I know nothing about these other classes.
17726 Try them out to see what sort of alternative they provide.
17729 \begin_layout Chapter
17730 LyX Features needing Extra Software
17733 \begin_layout Section
17737 \begin_layout Standard
17743 \begin_layout Subsection
17747 \begin_layout Standard
17756 \begin_layout Plain Layout
17761 is not yet available when you are using the LaTeX distribution MiKTeX.
17766 , you'll find in the
17773 \begin_inset space ~
17784 \begin_inset CommandInset href
17786 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17793 \begin_layout Standard
17798 package is a program that was written by
17799 \begin_inset Flex CharStyle:Noun
17802 \begin_layout Plain Layout
17804 \begin_inset space ~
17812 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17813 and easy to forget.
17814 The program runs over your LaTeX file, checks the integrity of the file,
17815 and flags some common errors.
17816 In other technical words, it is
17823 \begin_layout Standard
17824 Well, what is a syntax checker doing in LyX which is supposed to produce
17825 correct LaTeX anyways? The answer is simple: Just as
17829 not only checks the
17833 of C programs, but also does
17837 checks for type-errors,
17841 catches some common
17845 errors, in addition to the syntactical ones.
17850 is capable of detecting several common errors, such as
17853 \begin_layout Itemize
17854 Ellipsis detection:
17855 \begin_inset Newline newline
17858 Use \SpecialChar \ldots{}
17862 \begin_layout Itemize
17863 No space in front of/after parenthesis:
17864 \begin_inset Newline newline
17870 \begin_layout Itemize
17871 Enforcement of normal space after common abbreviations:
17872 \begin_inset Newline newline
17876 \begin_inset space \thinspace{}
17880 \begin_inset space \space{}
17883 is too wide spacing.
17886 \begin_layout Itemize
17887 Enforcement of end-of-sentence space when the last sentence ends with a
17889 \begin_inset Newline newline
17893 And this is wrong spacing.
17896 \begin_layout Itemize
17897 Space in front of labels and similar commands:
17898 \begin_inset Newline newline
17901 The label should stick right up to the text to avoid falling to a wrong
17904 \begin_inset CommandInset label
17914 \begin_layout Plain Layout
17915 This footnote is in danger of falling off to a wrong page
17920 The label is separated too much.
17923 \begin_layout Itemize
17924 Space in front of references, instead of hard spaces:
17925 \begin_inset Newline newline
17928 In you are in bad luck, the text will break right between the referenced
17929 text and reference number, and that's a pity.
17931 \begin_inset CommandInset ref
17933 reference "sec:chktex"
17940 \begin_layout Itemize
17942 \begin_inset Quotes eld
17946 \begin_inset Quotes erd
17950 \begin_inset Formula $\times$
17954 \begin_inset Newline newline
17957 2x2 looks cheap compared to
17958 \begin_inset Formula $2\times2$
17964 \begin_layout Standard
17965 and more \SpecialChar \ldots{}
17966 It is an invaluable tool when you are
17967 \begin_inset Quotes eld
17971 \begin_inset Quotes erd
17974 your document before printing, and you should run it right after the obligatory
17975 spelling check, and before you go fine tuning the typesetting.
17978 \begin_layout Subsection
17982 \begin_layout Standard
17983 If you have the program installed, usage is as simple as choosing
17985 Tools\SpecialChar \menuseparator
17987 \begin_inset space ~
17993 This will make LyX generate a LaTeX file of your document, start
17997 to check it, and then make LyX insert
17998 \begin_inset Quotes eld
18002 \begin_inset Quotes erd
18005 with the warnings from
18009 , if there were any.
18010 The warnings will be placed close to the point of the mistake, and you
18011 can quickly find them by using the
18013 Navigate\SpecialChar \menuseparator
18016 menu item, or the shortcut key
18025 Open the error boxes by clicking on them with the mouse, or use the shortcut
18034 bindings, or the corresponding
18043 Read the warning and correct the mistake, if it is a mistake.
18044 If you have trouble understanding what the warning is about, you can safely
18046 Remember that there is a hidden layer between the document on screen and
18047 the technical details in invoking
18051 , and this gap can make some warnings seem arcane or just right down plain
18055 \begin_layout Standard
18056 This document is an excellent testing bed for the feature, and it should
18057 provide quite a few warnings for you to fiddle with.
18058 Since computers are only so smart, expect most of the warnings to be false
18062 \begin_layout Subsection
18063 How to fine tune it
18066 \begin_layout Standard
18067 Sometimes, you'll find that
18071 makes more noise than suits your mood.
18072 Then you can choose not to use it, wait until your mood changes, or try
18077 to get better along with you.
18078 Another choice in the most desperate situations is to use
18080 View\SpecialChar \menuseparator
18082 \begin_inset space ~
18086 \begin_inset space ~
18090 \begin_inset space ~
18095 , which will get rid of all warnings instantly.
18098 \begin_layout Standard
18107 very configurable and extensible, you shouldn't expect to solve all problems
18113 Since LyX has to generate a somewhat special LaTeX file to be able to match
18114 the line numbers from the
18122 \begin_layout Plain Layout
18123 You can inspect the specific output from
18129 Edit\SpecialChar \menuseparator
18131 \begin_inset space ~
18135 \begin_inset space ~
18149 to the internal document structure, some of the warnings will not seen
18150 to appear correctly.
18151 There are two things you can do about this:
18154 \begin_layout Itemize
18159 invocation command line in
18175 installation configuration file (usually with the file
18180 See below to learn what warnings can be enabled and disabled on the command
18185 \begin_layout Itemize
18186 Export your document as a raw LaTeX file using
18188 File\SpecialChar \menuseparator
18189 Export\SpecialChar \menuseparator
18197 Invoked in this way, it can be a hassle to find the corresponding place
18198 in the document inside LyX, but with a little patience, you should be able
18202 \begin_layout Standard
18203 Here follows the warning messages that can be enabled and disabled in
18212 to disable a warning, and
18216 to enable a warning.
18217 The emphasized entries are disabled by default, because the default is
18220 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18225 \begin_layout Standard
18226 Notice that you should only use the options that enable and disable warnings,
18227 because LyX relies on some of the other command line parameters to be set
18228 in a specific way to have a chance to communicate with
18235 \begin_layout Enumerate
18239 Command terminated with space.
18242 \begin_layout Enumerate
18245 Non-breaking space (
18246 \begin_inset Quotes eld
18254 \begin_inset Quotes erd
18257 ) should have been used.
18260 \begin_layout Enumerate
18264 You should enclose the previous parenthesis with
18265 \begin_inset Quotes eld
18273 \begin_inset Quotes erd
18279 \begin_layout Enumerate
18282 Italic correction (
18283 \begin_inset Quotes eld
18293 \begin_inset Quotes erd
18296 ) found in non-italic buffer.
18299 \begin_layout Enumerate
18302 Italic correction (
18303 \begin_inset Quotes eld
18313 \begin_inset Quotes erd
18316 ) found more than once.
18319 \begin_layout Enumerate
18323 No italic correction (
18324 \begin_inset Quotes eld
18334 \begin_inset Quotes erd
18340 \begin_layout Enumerate
18344 \begin_inset Quotes eld
18352 \begin_inset Quotes erd
18356 \begin_inset Quotes eld
18364 \begin_inset Quotes erd
18370 \begin_layout Enumerate
18373 Wrong length of dash may have been used.
18376 \begin_layout Enumerate
18380 \begin_inset Quotes eld
18388 \begin_inset Quotes erd
18392 \begin_inset Quotes eld
18400 \begin_inset Quotes erd
18406 \begin_layout Enumerate
18410 \begin_inset Quotes eld
18418 \begin_inset Quotes erd
18424 \begin_layout Enumerate
18428 \begin_inset Quotes eld
18436 \begin_inset Quotes erd
18439 to achieve an ellipsis.
18442 \begin_layout Enumerate
18445 Inter-word spacing (
18446 \begin_inset Quotes eld
18456 \begin_inset Quotes eld
18459 ) should perhaps be used.
18462 \begin_layout Enumerate
18465 Inter-sentence spacing (
18466 \begin_inset Quotes eld
18476 \begin_inset Quotes erd
18479 ) should perhaps be used.
18482 \begin_layout Enumerate
18485 Could not find argument for command.
18488 \begin_layout Enumerate
18492 \begin_inset Quotes eld
18500 \begin_inset Quotes erd
18506 \begin_layout Enumerate
18509 Math mode still on at end of LaTeX file.
18512 \begin_layout Enumerate
18516 \begin_inset Quotes eld
18524 \begin_inset Quotes erd
18527 doesn't match the number of
18528 \begin_inset Quotes eld
18536 \begin_inset Quotes erd
18542 \begin_layout Enumerate
18545 You should use either
18548 \begin_inset Quotes eld
18556 \begin_inset Quotes erd
18561 as an alternative to
18562 \begin_inset Quotes eld
18570 \begin_inset Quotes erd
18576 \begin_layout Enumerate
18583 " (ASCII 39) instead of "
18590 \begin_layout Enumerate
18593 User-specified pattern found.
18596 \begin_layout Enumerate
18599 This command might not be intended.
18602 \begin_layout Enumerate
18609 \begin_layout Enumerate
18627 \begin_layout Enumerate
18630 Delete this space to maintain correct page references.
18633 \begin_layout Enumerate
18637 You might wish to put this between a pair of
18638 \begin_inset Quotes eld
18646 \begin_inset Quotes erd
18652 \begin_layout Enumerate
18655 You ought to remove spaces in front of punctuation.
18658 \begin_layout Enumerate
18661 Could not execute LaTeX command.
18664 \begin_layout Enumerate
18673 in front of small punctuation.
18676 \begin_layout Enumerate
18684 may look prettier here.
18687 \begin_layout Enumerate
18691 Multiple spaces detected in output.
18694 \begin_layout Enumerate
18697 This text may be ignored.
18700 \begin_layout Enumerate
18706 \begin_inset Quotes eld
18711 to begin quotation, not
18718 \begin_layout Enumerate
18725 to end quotation, not
18728 \begin_inset Quotes eld
18736 \begin_layout Enumerate
18742 \begin_layout Enumerate
18745 You should perhaps use
18746 \begin_inset Quotes eld
18754 \begin_inset Quotes erd
18760 \begin_layout Enumerate
18763 You should put a space in front of/after parenthesis.
18766 \begin_layout Enumerate
18769 You should avoid spaces in front of/after parenthesis.
18772 \begin_layout Enumerate
18776 You should not use punctuation in front of/after quotes.
18779 \begin_layout Enumerate
18782 Double space found.
18785 \begin_layout Enumerate
18788 You should put punctuation outside inner/inside display math mode.
18791 \begin_layout Enumerate
18794 You ought to not use primitive TeX in LaTeX code.
18797 \begin_layout Enumerate
18800 You should remove spaces in front of
18801 \begin_inset Quotes eld
18809 \begin_inset Quotes erd
18815 \begin_layout Enumerate
18818 \begin_inset Quotes eld
18826 \begin_inset Quotes erd
18829 is normally not followed by
18830 \begin_inset Quotes eld
18838 \begin_inset Quotes erd
18844 \begin_layout Standard
18845 In later versions of LyX, we hope to provide a more complete interface to
18846 this tool (and it's smaller cousin
18850 ) to exploit the full power of it.
18851 But it's not exactly useless as it is now: go try it on one of your existing
18852 documents of a certain length and be surprised.
18855 \begin_layout Section
18856 Version Control in LyX
18859 \begin_layout Standard
18862 Lars Gullik Bjønnes
18869 \begin_layout Subsection
18873 \begin_layout Standard
18874 A friend of mine wanted to try LyX for a group project.
18875 When he didn't find support for version control or file locking, he dropped
18877 This angered me a bit, so I thought that I should at least make support
18878 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18879 This has been done.
18880 LyX now supports some of the most basic RCS/CVS/SVN commands.
18881 If you need something a bit more sophisticated you will have to do that
18882 manually in a terminal.
18885 \begin_layout Standard
18886 Before you begin to use the version control features in LyX, you should
18887 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18888 Also note that CVS support was obsoloted by introducing subversion support
18889 so we advice using SVN instead.
18890 Good place to start with Subversion is SVN Book
18894 \begin_layout Plain Layout
18895 \begin_inset CommandInset href
18897 target "http://svnbook.red-bean.com/"
18907 In case of RCS you should read
18908 \begin_inset Quotes eld
18912 \begin_inset Quotes erd
18915 (a man file, read it with
18920 This file describes all the basic features of RCS.
18921 You should especially notice the comment about a RCS directory, and the
18922 notion of a master RCS file (the file ending in
18929 \begin_layout Standard
18930 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18931 package—no guarantees are made for older versions.
18932 Most of the log messages are not currently displayed after operations -
18933 you can check them in Messages pane if unsure.
18936 \begin_layout Standard
18937 For introducing your own external commands consult vc-command in the manual
18941 \begin_layout Subsection
18942 RCS commands in LyX
18945 \begin_layout Standard
18946 The following sections describe the RCS commands supported by LyX.
18947 You can find them in the
18949 File\SpecialChar \menuseparator
18951 \begin_inset space ~
18957 LyX was tested against RCS 5.7.
18960 \begin_layout Subsubsection
18966 \begin_layout Standard
18967 If your document is not under revision control, this is the only item shown
18969 And if it is under revision control, the
18973 item is not visible.
18977 \begin_layout Standard
18978 This command registers your document with RCS (unless you are under the
18979 directory managed by CVS)\SpecialChar \@.
18980 You are asked interactively to supply an initial
18981 description of the document.
18982 The document is now set in Read-Only mode and you have to
18985 \begin_inset space ~
18989 \begin_inset space ~
18993 \begin_inset space ~
18998 , before making any changes to it.
18999 A document under revision control has a
19000 \begin_inset Quotes eld
19003 [RCS:<version> <locker>]
19004 \begin_inset Quotes erd
19007 item tagged to the filename in the minibuffer.
19010 \begin_layout Standard
19011 RCS command that is run:
19013 ci -q -u -i -t-"<initial description>" <file-name>
19016 \begin_layout Standard
19021 to understand the switches.
19025 \begin_layout Subsubsection
19031 \begin_layout Standard
19032 When you are finished editing a file, you check in your changes.
19033 When you do this, you are asked for a description of the changes.
19034 This is stored in the history log.
19035 The version number is bumped, your changes are applied to the master RCS
19036 file, the document is unlocked and set to Read-Only mode.
19040 \begin_layout Standard
19043 ci -q -u -m"<description>" <file-name>
19046 \begin_layout Subsubsection
19052 \begin_layout Standard
19053 By doing this you lock the document so that only you can edit it.
19054 This will also make the document Read-Write only for you.
19055 You will usually continue editing for a while and when you are finished
19056 you check in your changes.
19057 The status line is changed to reflect that you have locked the file.
19061 \begin_layout Standard
19064 co -q -l <file-name>
19067 \begin_layout Subsubsection
19070 Revert To Repository Version
19073 \begin_layout Standard
19074 This will discard all changes made to the document since the last check
19076 You get a warning before changes are discarded.
19079 \begin_layout Standard
19082 co -f -u<version> <file-name>
19085 \begin_layout Subsubsection
19091 \begin_layout Standard
19092 This makes as if the last check in never happened.
19093 No changes are made to the document loaded into LyX, but the last version
19094 is removed from the master RCS file.
19098 \begin_layout Standard
19101 rcs -o<version> <file-name>
19104 \begin_layout Subsubsection
19110 \begin_layout Standard
19111 This show the complete history of the RCS document.
19116 is shown in a browser.
19124 \begin_layout Subsubsection
19128 \begin_layout Standard
19129 LyX supports RCS version number information (only), see
19130 \begin_inset CommandInset ref
19132 reference "sub:VCS-Revision-Information"
19139 \begin_layout Subsection
19140 CVS commands in LyX
19143 \begin_layout Standard
19144 CVS is now partially supported by LyX.
19145 You can find the commands in the
19147 File\SpecialChar \menuseparator
19149 \begin_inset space ~
19155 Focus of the development moved to SVN support, so please use it instead
19156 of CVS if possible.
19159 \begin_layout Subsubsection
19165 \begin_layout Standard
19166 If your document is not under revision control, this is the only item shown
19168 And if it is under revision control, the
19175 item is not visible.
19179 \begin_layout Standard
19180 This command registers in CVS your document ONLY in case you have already
19181 the documents directory under CVS control (in particular
19186 This means you have to checkout the archive by yourself.
19190 \begin_layout Standard
19191 Then you are asked interactively to supply an initial description of the
19193 Don't forget that registered file is not yet commited.
19196 \begin_layout Standard
19197 CVS command that is run:
19200 \begin_inset Quotes erd
19204 \begin_inset Quotes eld
19208 \begin_inset Quotes erd
19214 \begin_layout Standard
19219 to understand the switches.
19223 \begin_layout Subsubsection
19229 \begin_layout Standard
19230 When you are finished editing a file, you commit your changes.
19231 When you do this, you are asked for a description of the changes.
19232 After that changes are commited.
19235 \begin_layout Standard
19238 cvs -q commit -m"<description>" "<file-name>"
19241 \begin_layout Subsubsection
19244 Revert To Repository Version
19247 \begin_layout Standard
19248 This will discard all changes made to the document since the last check
19250 You get a warning before changes are discarded.
19251 Firstly the file is deleted, secondly CVS update command is run.
19254 \begin_layout Standard
19258 \begin_inset Quotes eld
19262 \begin_inset Quotes erd
19268 \begin_layout Subsubsection
19274 \begin_layout Standard
19275 This show the complete history of the CVS document.
19279 \begin_inset Quotes eld
19283 \begin_inset Quotes erd
19288 is shown in a browser.
19291 \begin_layout Subsection
19292 SVN commands in LyX
19295 \begin_layout Standard
19296 SVN is now partially supported by LyX.
19297 You can find the commands in the
19299 File\SpecialChar \menuseparator
19301 \begin_inset space ~
19307 Please note that if you use password protected access to repository via
19308 ssh, you will be asked in terminal window.
19309 LyX was tested against SVN 1.5 and 1.6
19313 \begin_layout Plain Layout
19314 Most of the commands will work with 1.4 too, see
19315 \begin_inset CommandInset ref
19317 reference "sub:SVN-Repo-Update"
19329 \begin_layout Subsubsection
19335 \begin_layout Standard
19336 If your document is not under revision control, this is the only item shown
19338 And if it is under revision control, the
19345 item is not visible.
19349 \begin_layout Standard
19350 This command registers in SVN your document ONLY in case you have already
19351 the documents directory under SVN control (in particular
19356 This means you have to checkout the archive by yourself.
19360 \begin_layout Standard
19361 Then you are asked interactively to supply an initial description of the
19363 Don't forget that registered file is not yet commited.
19366 \begin_layout Standard
19367 SVN command that is run:
19370 \begin_inset Quotes eld
19374 \begin_inset Quotes erd
19380 \begin_layout Standard
19385 to understand the switches.
19389 \begin_layout Subsubsection
19395 \begin_layout Standard
19396 When you are finished editing a file, you commit your changes.
19397 When you do this, you are asked for a description of the changes.
19398 After that changes are commited.
19401 \begin_layout Standard
19406 \begin_layout Plain Layout
19407 In case locking is not enabled.
19409 \begin_inset CommandInset ref
19411 reference "subsec:SVN-File-Locking"
19422 svn commit -q -m"<description>" <file-name>
19425 \begin_layout Subsubsection
19431 \begin_layout Standard
19432 Updates the changes of this file from the repository.
19433 Be sure you understand SVN merging and conflicts resolving before using
19434 this function, because all conflicts has to be resolved manually by you!
19437 \begin_layout Standard
19442 \begin_layout Plain Layout
19450 svn update --non-interactive
19451 \begin_inset Quotes eld
19455 \begin_inset Quotes erd
19461 \begin_layout Subsubsection
19464 Revert To Repository Version
19467 \begin_layout Standard
19468 This will discard all changes made to the document since the last check
19470 You get a warning before changes are discarded.
19474 \begin_layout Standard
19478 \begin_inset Quotes eld
19482 \begin_inset Quotes erd
19488 \begin_layout Subsubsection
19489 \begin_inset CommandInset label
19491 name "sub:SVN-Repo-Update"
19495 Update of the local directory checkout from repository
19499 \begin_layout Plain Layout
19500 Note that this command will work only with subversion
19501 \begin_inset Formula $\geqq1.5$
19512 \begin_layout Standard
19513 All the commands above have one shortcomming - they deal with the current
19515 Once your document contains pictures, includes external
19516 \begin_inset Flex CharStyle:Code
19519 \begin_layout Plain Layout
19525 files and so on administration becomes more complicated.
19526 LyX now supports updating the whole tree in which resides the document
19530 \begin_layout Plain Layout
19531 One need to organize the files structure so that all external files are
19532 in the same directory or subdirectories of the document.
19539 This become especially useful once you cooperate with people which neither
19540 know about subversion management nor they have ambition to commit additional
19541 material to the repository.
19545 \begin_layout Standard
19546 \begin_inset Flex CharStyle:Code
19549 \begin_layout Plain Layout
19550 Update local directory from repository
19555 command updates the whole directory and in case of merge conflicts local
19556 version of the files are left, so no unintended data loss occurs.
19557 If local changes are detected user is warned before update starts.
19560 \begin_layout Labeling
19561 \labelwidthstring 00.00.0000
19563 \begin_inset space ~
19567 \begin_inset space ~
19571 \begin_inset Newline newline
19575 \begin_inset Flex CharStyle:Code
19578 \begin_layout Plain Layout
19584 (Ask if changes are detected.)
19585 \begin_inset Newline newline
19589 \begin_inset Flex CharStyle:Code
19592 \begin_layout Plain Layout
19593 svn update --accept mine-full $path
19601 \begin_layout Standard
19603 \begin_inset Flex CharStyle:Code
19606 \begin_layout Plain Layout
19612 stands for the path to the document.
19615 \begin_layout Subsubsection
19621 \begin_layout Standard
19622 This show the complete history of the SVN document.
19626 \begin_inset Quotes eld
19630 \begin_inset Quotes erd
19635 is shown in a browser.
19638 \begin_layout Subsubsection
19640 \begin_inset CommandInset label
19642 name "subsec:SVN-File-Locking"
19649 \begin_layout Standard
19650 The file exchange through various revision control systems brings the problem
19651 of merge conflicts in case two different users try to edit the same (parts
19653 When such conflict happens it needs manual resolving and one reasonable
19654 alternative is to provide some kind of locking mechanism, which guarantees
19655 that only one user is allowed to edit file at the given time.
19658 \begin_layout Standard
19659 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19660 access - locks and automatical setting of write permissions (see sec.
19662 \begin_inset CommandInset ref
19664 reference "subsec:Automatical-Locking-Property"
19669 \begin_inset Flex CharStyle:Code
19672 \begin_layout Plain Layout
19682 \begin_layout Plain Layout
19683 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19689 In a case this property is detected for a given document LyX starts to
19690 use SVN locks for document editing automatically and the whole check-in/out
19691 mechanism switches to the same regimen as for RCS.
19692 This in particular means there are two different modes how file is used
19696 \begin_layout Itemize
19698 The loaded file is in the read-only mode.
19699 For editation on needs to check-out.
19704 consists of update from repository and gaining write lock.
19705 If the lock is not possible to obtain, we remain in unlocked state.
19708 \begin_layout Itemize
19710 The loaded file is in the 'normal' edit mode.
19711 No other user is allowed to edit the file.
19716 consists of commiting changes and releasing write-lock.
19717 If no changes have been made to the document, no commit will be produced
19721 \begin_layout Plain Layout
19722 Don't be puzzled by the fact that you will be asked for commit message anyway.
19727 and only the write-lock will be released.
19730 \begin_layout Standard
19734 \begin_layout Labeling
19735 \labelwidthstring 00.00.0000
19738 svn commit -q -m"<description>" "<file-name>"
19739 \begin_inset Newline newline
19742 svn unlock "<file-name>"
19745 \begin_layout Labeling
19746 \labelwidthstring 00.00.0000
19749 svn update "<file-name>"
19750 \begin_inset Newline newline
19753 svn lock "<file-name>"
19756 \begin_layout Subsubsection
19759 \begin_inset CommandInset label
19761 name "subsec:Automatical-Locking-Property"
19767 Automatical Locking Property
19770 \begin_layout Standard
19771 The above mentioned automatical setting of write permissions of the .lyx
19772 file can be set through
19777 ile\SpecialChar \menuseparator
19783 \begin_inset space ~
19786 Control\SpecialChar \menuseparator
19791 oggle locking property
19794 This command is active only when the file is not locked on the svn server
19796 you need to check-out before proceeding).
19799 \begin_layout Labeling
19800 \labelwidthstring 00.00.0000
19802 \begin_inset space ~
19808 \begin_layout Labeling
19809 \labelwidthstring 00.00.0000
19812 svn propset svn:needs-lock ON "<file-name>"
19815 \begin_layout Labeling
19816 \labelwidthstring 00.00.0000
19819 svn propdel svn:needs-lock "<file-name>"
19822 \begin_layout Subsubsection
19823 \begin_inset CommandInset label
19825 name "sub:VCS-Revision-Information"
19829 Revision Information in Documents
19832 \begin_layout Standard
19833 There are more possibilities how to activate revision information in our
19837 \begin_layout Itemize
19838 LyX supports directly:
19842 \begin_layout Itemize
19843 tree revision information (
19844 \begin_inset Flex CharStyle:Code
19847 \begin_layout Plain Layout
19854 The result is the output of the
19855 \begin_inset Flex CharStyle:Code
19858 \begin_layout Plain Layout
19864 command, the following table gives you an idea, how to read the results.
19867 \begin_layout Standard
19869 \begin_inset Tabular
19870 <lyxtabular version="3" rows="6" columns="2">
19871 <features tabularvalignment="middle">
19872 <column alignment="center" valignment="top" width="0">
19873 <column alignment="center" valignment="top" width="0">
19875 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19878 \begin_layout Plain Layout
19884 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19887 \begin_layout Plain Layout
19895 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19898 \begin_layout Plain Layout
19904 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19907 \begin_layout Plain Layout
19908 mixed revision working copy
19915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19918 \begin_layout Plain Layout
19924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19927 \begin_layout Plain Layout
19928 modified working copy
19935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19938 \begin_layout Plain Layout
19944 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19947 \begin_layout Plain Layout
19948 switched working copy
19955 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19958 \begin_layout Plain Layout
19964 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19967 \begin_layout Plain Layout
19968 partial working copy, from a sparse checkout
19975 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19978 \begin_layout Plain Layout
19984 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19987 \begin_layout Plain Layout
19988 mixed revision, modified, switched working copy
20001 \begin_layout Itemize
20002 file revision information.
20003 The result comes from parsing the output of
20004 \begin_inset Flex CharStyle:Code
20007 \begin_layout Plain Layout
20009 \begin_inset space ~
20013 \begin_inset space ~
20017 \begin_inset space ~
20026 Supported flags are:
20030 \begin_layout Itemize
20031 version number of the last commit (
20032 \begin_inset Flex CharStyle:Code
20035 \begin_layout Plain Layout
20044 \begin_layout Itemize
20045 author of the last commit (
20046 \begin_inset Flex CharStyle:Code
20049 \begin_layout Plain Layout
20058 \begin_layout Itemize
20059 date of the last commit (
20060 \begin_inset Flex CharStyle:Code
20063 \begin_layout Plain Layout
20072 \begin_layout Itemize
20073 time of the last commit (
20074 \begin_inset Flex CharStyle:Code
20077 \begin_layout Plain Layout
20087 \begin_layout Standard
20088 You can obtain this info via InsetInfo (e.g.
20090 \begin_inset Flex CharStyle:Code
20093 \begin_layout Plain Layout
20094 info-insert buffer vcs-date
20100 The information will be available only when you have the file stored under
20101 svn managment (i.e.
20103 \begin_inset Flex CharStyle:Code
20106 \begin_layout Plain Layout
20112 directory is available with your document).
20116 \begin_layout Itemize
20117 Another---a hacking one---possibility is to use svn keywords
20121 \begin_layout Plain Layout
20122 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20128 In short -- you set file keywords property (e.g.
20131 svn propset svn:keywords 'Rev' file.lyx
20133 ) and then paste keyword ERT
20137 \begin_layout Plain Layout
20138 This is an easy way how to ensure that LyX won't break the line in the middle
20144 tag in your document (e.g.
20149 \begin_layout Plain Layout
20157 This way svn client will automatically substitute revision number (e.g.
20162 \begin_layout Plain Layout
20169 ) after each update and commit.
20170 There are more problems with this approach.
20171 Firstly, the '$' character is used in TeX world for math equations, so
20172 any occurence of math formula
20173 \begin_inset Formula $Rev$
20177 \begin_inset Formula $Rev:59$
20180 in your LyX document.
20181 Similarly for other keywords like Id, Date, Author, etc.
20182 Secondly svn output is dependent on your locales, so its very easy that
20183 svn would produce some problematic strings once Date is used.
20184 Thirdly you get the whole 'Rev: 59' string in your document instead of
20186 Until subversion implements user's custom keywords it will be hard to use
20187 this approach reliably or let LyX to support it directly.
20190 \begin_layout Subsection
20191 SVN and Windows Environment
20194 \begin_layout Quote
20195 My inclination is to say that if the user cannot figure out the command
20196 line operations on their own fairly quickly, they would be well advised
20197 to use TortoiseSVN.
20203 \begin_layout Subsubsection
20207 \begin_layout Standard
20208 In addition to installing LyX, and having access to a Subversion repository,
20209 the user will need to install the Subversion client program.
20210 A Windows installer for the client program is available from
20211 \begin_inset CommandInset href
20214 target "http://www.collab.net/nonav/downloads/subversion/"
20219 The user may also want to install
20220 \begin_inset CommandInset href
20223 target "http://tortoisesvn.tigris.org/"
20227 , which integrates Subversion operations into the context (rightclick) menu
20228 of Windows Explorer.
20229 Operations done outside LyX will typically be more convenient using the
20230 Explorer context menu.
20231 Note that TortoiseSVN is not a replacement for the client program, which
20232 is what LyX itself will use.
20235 \begin_layout Subsubsection
20236 Bringing a document under Subversion control
20239 \begin_layout Standard
20240 Before a LyX document can be brought under version control in Subversion,
20241 its parent directory needs to be under version control.
20242 If the document is being added to a project already in the repository,
20243 this is accomplished by checking the project out to the directory where
20244 the new document will be placed.
20245 If the project itself is not yet under version control (for instance, if
20246 this document starts a new project), the directory must be imported into
20248 This is done outside LyX.
20249 Both import and checkout are easily accomplished from the Explorer context
20250 menu using TortoiseSVN, or alternatively can be done using the command
20251 line client at a DOS prompt.
20252 The procedure for importing the project using TortoiseSVN is described
20253 below, assuming an existing repository and a new project being started
20261 For information on using the Subversion client program, run
20268 \begin_layout Enumerate
20275 in Windows Explorer, right click it, and select
20277 TortoiseSVN > Repo-browser
20280 If necessary, adjust the URL for the repository, then click OK.
20283 \begin_layout Enumerate
20284 Right click the level of the repository under which you want to place the
20285 new project folder (typically the top level) and click
20287 Create folder\SpecialChar \ldots{}
20290 Supply a name for the project folder and click OK.
20291 Add a message for the log file if desired, then click OK again.
20292 The new project folder should appear in the repository.
20293 Finally, click OK again to exit the repository browser.
20296 \begin_layout Enumerate
20297 Once again right click
20303 , this time selecting SVN Checkout\SpecialChar \ldots{}
20304 Select the URL of the project folder
20305 you just created in the repository, and set the checkout directory to
20313 You will be warned about a non-empty folder; click OK to proceed.
20314 You should now have a
20325 \begin_layout Enumerate
20326 Create or open your document in LyX and click
20331 ile\SpecialChar \menuseparator
20337 \begin_inset space ~
20340 Control\SpecialChar \menuseparator
20348 Add a log message and click OK to commit the document to version control.
20351 \begin_layout Standard
20352 From this point onward, you should have full functionality in the
20357 ile\SpecialChar \menuseparator
20363 \begin_inset space ~
20369 You also have the option of checking the document in and out, viewing its
20371 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20372 client program from a command prompt.
20375 \begin_layout Subsubsection
20376 SSH tunel used with SVN under Windows
20379 \begin_layout Standard
20380 Compared to linux setting svn client to communicate over ssh under Windows
20381 is rather troublesome task.
20382 We will at least make some hints how to setup client side but former knowledge
20383 about ssh and Windows command line is needed, also be prepared for a great
20384 deal of frustration...
20387 \begin_layout Enumerate
20388 Get svn client for windows, as described in previous sections.
20389 When it is fresh install run some svn command (e.g.
20391 \begin_inset Flex CharStyle:Code
20394 \begin_layout Plain Layout
20400 ) to have created config files, which you will need to change later on.
20403 \begin_layout Enumerate
20404 Choose ssh client for Windows.
20405 There are more possibilities, we will use the one from Putty tools
20409 \begin_layout Plain Layout
20410 \begin_inset Flex URL
20413 \begin_layout Plain Layout
20415 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20426 You will need to automatize connection, so client doesn't ask for any password
20428 To keep things easy we will use only keys without any additional password
20433 \begin_layout Enumerate
20435 \begin_inset Flex CharStyle:Code
20438 \begin_layout Plain Layout
20445 Save your private .ppk key file and put the public one on the server side.
20446 In case the SVN server runs on linux, note that the format of the public
20447 key is not compatible with linux openssh and you will need to direcly copy-past
20448 e the key from the “
20450 Public key for pasting into OpenSSH authorized_keys file
20452 :” edit field into the server's
20453 \begin_inset Flex CharStyle:Code
20456 \begin_layout Plain Layout
20457 ~/.ssh/authorized_keys
20463 \begin_inset Flex CharStyle:Code
20466 \begin_layout Plain Layout
20475 \begin_layout Enumerate
20477 \begin_inset Flex CharStyle:Code
20480 \begin_layout Plain Layout
20487 In the SVN config file
20491 \begin_layout Plain Layout
20492 Exact path depends on Windows version, usually somewhere around
20493 \begin_inset Flex CharStyle:Code
20496 \begin_layout Plain Layout
20499 Documents and Settings
20513 \begin_inset Flex CharStyle:Code
20516 \begin_layout Plain Layout
20531 , section [tunnels], setup ssh command, e.g.
20533 \begin_inset Flex CharStyle:Code
20536 \begin_layout Plain Layout
20537 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20546 \begin_layout Plain Layout
20547 It will usually take a lot of time to get exact command right and it depends
20549 For example do not have some remote server saved as a default session in
20551 If things fail, try to connect via plink without SVN first.
20560 \begin_layout Enumerate
20561 Checkout the SVN archive, e.g.
20563 \begin_inset Flex CharStyle:Code
20566 \begin_layout Plain Layout
20567 svn co svn+ssh://user@server/repository_path
20575 \begin_layout Subsubsection
20576 End-of-Line Conversions
20579 \begin_layout Standard
20580 When the collsraborators are mixing Linux and Windows environments, LyX
20581 will use different line endings inside the .lyx files.
20582 This is not problem as far as LyX functionality is concerned, but the commit
20583 diffs will be huge and merge-conflicts prone.
20584 Fortunately SVN itself knows
20588 \begin_layout Plain Layout
20589 \begin_inset Flex URL
20592 \begin_layout Plain Layout
20594 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20604 how to deal with CR/LF problems when switching .lyx files to the
20605 \begin_inset Flex CharStyle:Code
20608 \begin_layout Plain Layout
20618 \begin_layout Plain Layout
20620 \begin_inset Flex CharStyle:Code
20623 \begin_layout Plain Layout
20624 svn propset svn:eol-style native FILE_NAME
20637 \begin_layout Subsection
20641 \begin_layout Standard
20642 With the recent addition of the vc-command function LyX power users are
20643 allowed to create their own commands for revision control.
20646 \begin_layout Standard
20647 As an example you can see how two TortoiseSVN commands could be integrated
20651 \begin_layout Description
20653 \begin_inset Flex CharStyle:Code
20656 \begin_layout Plain Layout
20657 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20665 \begin_layout Description
20667 \begin_inset Flex CharStyle:Code
20670 \begin_layout Plain Layout
20671 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20679 \begin_layout Subsection
20680 Version control and Document comparison
20683 \begin_layout Standard
20684 One of the typical uses of version control is to inspect the changes between
20685 revisions, usually by creating
20686 \begin_inset Flex CharStyle:Code
20689 \begin_layout Plain Layout
20696 While this is useful for plain text files, it is much less useful in the
20697 case of LyX files, which have more complicated structure.
20698 Hence we provide binding to the Document comparison feature.
20699 They are two ways of calling this feature - either by direct call of
20700 \begin_inset Flex CharStyle:Code
20703 \begin_layout Plain Layout
20709 LyX function (for details see LyX functions manual) or by icon/menu item
20711 \begin_inset Flex CharStyle:MenuItem
20714 \begin_layout Plain Layout
20715 Compare with older revision...
20721 One can either compare two chosen revisions of the document or he can simply
20722 compare the current version of edited text with older revisions (where
20724 \begin_inset Flex CharStyle:MenuItem
20727 \begin_layout Plain Layout
20733 ' revisions back means comparison of the edited file with last commited
20738 \begin_layout Standard
20739 This feature is supported for SVN and RCS though due to the more complicated
20740 versioning scheme of RCS there is a constraint -- when addressing the revisions
20741 in dialog, numbers always point to the last number in RCS revision number,
20746 \begin_layout Section
20747 Literate Programming
20750 \begin_layout Standard
20755 (kayvan@sylvan.com)
20759 original documentation written by
20761 Edmar Wienskoski Jr.
20764 (edmar-w-jr@technologist.com)
20767 \begin_layout Subsection
20771 \begin_layout Standard
20772 The main purpose of this documentation is to show you how to use LyX for
20773 literate programming.
20774 Where it is assumed that you are familiar with this programming technique,
20776 \begin_inset Quotes eld
20780 \begin_inset Quotes erd
20784 \begin_inset Quotes eld
20788 \begin_inset Quotes erd
20792 If that is not the case, please follow the web links provided in the following
20794 There is a lot of good documentation out there covering old development
20795 history to the latest tools tips.
20798 \begin_layout Standard
20799 It is also assumed that you are familiar with LyX itself to a point that
20800 you are comfortable changing your LyX preferences, and X resources file.
20801 If that is not the case please refer to other LyX documentation to cover
20802 your specific needs.
20805 \begin_layout Subsection
20806 Literate Programming
20809 \begin_layout Standard
20810 From the Literate Programming FAQ:
20813 \begin_layout Quotation
20814 Literate programming is the combination of documentation and source together
20815 in a fashion suited for reading by human beings.
20816 In fact, literate programs should be enjoyable reading, even inviting!
20817 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20818 and documentation in a single file.
20819 Literate programming tools then parse the file to produce either readable
20820 documentation or compilable source.
20821 The WEB style of literate programming was created by D.
20822 \begin_inset space \thinspace{}
20826 Knuth during the development of his TeX typesetting software.
20830 \begin_layout Standard
20831 Another excerpt says:
20834 \begin_layout Quotation
20837 How is literate programming different from verbose commenting?
20840 \begin_layout Quotation
20841 There are three distinguishing characteristics.
20842 In order of importance, they are:
20846 \begin_layout Itemize
20847 flexible order of elaboration
20850 \begin_layout Itemize
20851 automatic support for browsing
20854 \begin_layout Itemize
20855 typeset documentation, especially diagrams and mathematics
20859 \begin_layout Standard
20860 Now that I sparked your curiosity, take a look in the references.
20863 \begin_layout Subsubsection
20867 \begin_layout Standard
20868 The complete Literate Programming FAQ can be found at:
20871 \begin_layout Quote
20872 Literate Programming FAQ
20873 \begin_inset Flex URL
20876 \begin_layout Plain Layout
20878 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20886 \begin_layout Standard
20887 The FAQ lists 23 (twenty three!) different literate programming tools.
20888 Where some are specialized or
20889 \begin_inset Quotes eld
20893 \begin_inset Quotes erd
20896 for particular programming languages, while other have general scope.
20901 for my own use for several reasons:
20904 \begin_layout Itemize
20905 It can generate the documentation either in LaTeX or HTML.
20908 \begin_layout Itemize
20909 It has a open architecture, i.
20910 \begin_inset space \thinspace{}
20914 \begin_inset space \space{}
20917 it is easy to plug in new filters and to perform special processing that
20922 \begin_layout Itemize
20923 There is a good selection of filters available already (the HTML is one
20927 \begin_layout Itemize
20931 \begin_layout Standard
20932 The Noweb web page can be found at:
20935 \begin_layout Quote
20937 \begin_inset Flex URL
20940 \begin_layout Plain Layout
20942 http://www.cs.virginia.edu/~nr/noweb/
20950 \begin_layout Standard
20951 Starting from there you can reach many other interesting links and even
20952 some literate program examples.
20955 \begin_layout Subsection
20956 LyX and Literate Programming
20959 \begin_layout Standard
20960 The LyX support for Literate Programming is provided by using the generic
20961 LyX converters mechanism.
20962 This support is provided in a
20963 \begin_inset Quotes eld
20967 \begin_inset Quotes erd
20971 \begin_inset space \thinspace{}
20975 \begin_inset space \space{}
20978 you will be able to use this new LyX feature with some other literate programmin
20979 g tool of your choice by just changing your LyX preferences.
20982 \begin_layout Subsubsection
20983 Generating documents and code (weaving and tangling)
20986 \begin_layout Paragraph
20987 Selecting the document class
20990 \begin_layout Standard
20991 If you have installed Noweb and LyX successfully, whenever you open a new
20992 document or try to change the document class of an existing one, you will
20993 find that there are three new document classes available:
20996 \begin_layout Itemize
21000 \begin_layout Itemize
21004 \begin_layout Itemize
21008 \begin_layout Standard
21009 You must select one of them to create your literate documents from.
21013 \begin_layout Standard
21014 Note that literate documents are not limited to these three classes.
21015 New classes can be generated from other styles like letter or in combination
21016 with other class variations like Article (AMS).
21017 If you have special needs that cannot be covered by one of the existing
21018 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21019 will arrange to insert a new entry, or teach you how to do it.
21023 \begin_layout Plain Layout
21024 It is very simple, it involves the creation of a file with four lines, and
21025 re-running of the auto configuration.
21030 Moreover, if you use a literate tool other than Noweb you may need to create
21031 a new set of document classes for it.
21034 \begin_layout Paragraph
21038 \begin_layout Standard
21039 LyX enables you to write code with a layout named
21047 \begin_layout Plain Layout
21048 The equivalent Noweb term is
21049 \begin_inset Quotes eld
21053 \begin_inset Quotes erd
21057 For historical reasons, I got used to the term
21058 \begin_inset Quotes eld
21062 \begin_inset Quotes erd
21065 introduced by other literate tool named Nuweb, which I used for many years
21066 before rendering myself to Noweb.
21071 Noweb delimits scraps like this:
21074 \begin_layout LyX-Code
21078 \begin_layout LyX-Code
21082 \begin_layout LyX-Code
21086 \begin_layout LyX-Code
21090 \begin_layout LyX-Code
21094 \begin_layout Standard
21095 The problem is that whatever is written in between the << and the
21099 must be taken literally, i.
21100 \begin_inset space \thinspace{}
21104 \begin_inset space \space{}
21107 LyX should be prevented from making any special interpretation of what has
21109 This is handled by a special layout named Scrap, that works like a normal
21110 paragraph but has a free spacing capability.
21113 \begin_layout Standard
21114 The down side of the Scrap paragraph layout is that consecutive paragraphs
21115 of code will be spaced with one empty line in the source code and also
21116 in the printed documentation.
21117 The work around is to enter each line of code within a single Scrap, with
21118 a newline (ctrl-return).
21119 The example above will look like this:
21123 \begin_layout Plain Layout
21124 If you have a printed version of this document you will not see any difference
21125 between the previous example and this one.
21133 \begin_layout LyX-Code
21135 \begin_inset Newline newline
21139 \begin_inset Newline newline
21143 \begin_inset Newline newline
21147 \begin_inset Newline newline
21153 \begin_layout Standard
21154 This layout works fine.
21155 The only real inconvenience is that you have to type ctrl-return instead
21160 \begin_layout Plain Layout
21161 It is in my list of
21162 \begin_inset Quotes eld
21166 \begin_inset Quotes erd
21177 \begin_layout Standard
21178 As a special note, you can also use the
21179 \begin_inset Quotes eld
21183 \begin_inset Quotes erd
21186 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21190 \begin_layout LyX-Code
21192 \begin_inset Newline newline
21195 def some_function(args):
21196 \begin_inset Newline newline
21199 "This is the doc string for this function."
21200 \begin_inset Newline newline
21203 print "My args: ", args
21206 \begin_layout LyX-Code
21207 @ %def some_function
21210 \begin_layout Standard
21211 For an example of this usage and the resulting cross-reference output, look
21212 at the Literate python program in
21214 LIBDIR/examples/listerrors.lyx
21216 which should make this all clear.
21219 \begin_layout Paragraph
21220 Generating the documentation
21223 \begin_layout Standard
21224 At this point you already have a new document file with a proper document
21225 class, and with some code and text on it.
21226 How do I print it? The answer is simple, you select
21228 View\SpecialChar \menuseparator
21232 Just like you would do for a plain document.
21233 No special procedure is required.
21236 \begin_layout Standard
21237 To help orientate you, I will now explain what happens inside LyX:
21240 \begin_layout Enumerate
21243 Update\SpecialChar \menuseparator
21246 menu option is chosen, a LaTeX file is generated.
21251 \begin_layout Standard
21252 If the document is of any literate class the generated file will be named
21253 with an extension name defined by the
21254 \begin_inset Quotes eld
21258 \begin_inset Quotes erd
21261 format (defined in the Preferences panel), otherwise the file will have
21270 \begin_layout Enumerate
21271 Note that the only difference so far is in the name of the file, no special
21272 processing is required by LyX.
21273 Given that you formatted the code using the Scrap layout that, by itself,
21274 takes care of the business.
21277 \begin_layout Enumerate
21278 If the document is of any literate class LyX will then use the internal
21279 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21283 \begin_layout Plain Layout
21284 The converters are defined in the
21286 Tools\SpecialChar \menuseparator
21290 \begin_inset Quotes eld
21294 \begin_inset Quotes erd
21306 manual for general information about converters.
21311 to generate the LaTeX file.
21315 \begin_layout Standard
21316 Otherwise it will just skip this step.
21320 \begin_layout Enumerate
21321 Finally, LaTeX is invoked and the regular post processing continues as in
21325 \begin_layout Standard
21326 Independence from a particular
21327 \begin_inset Quotes eld
21331 \begin_inset Quotes erd
21334 is easily achieved by changing the commands that are run by the various
21338 \begin_layout Paragraph
21339 Generating the code
21342 \begin_layout Standard
21343 When the build menu option is chosen or the corresponding button in the
21344 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21345 Next, LyX invokes the
21350 This converter needs to be defined by the user and is not installed by
21351 default, though the Program format is.
21352 This converter (like any other converter) will have two parts:
21355 \begin_layout Enumerate
21356 The converter program itself.
21357 This program performs the conversion from the one format to the other (in
21358 this case, from the Noweb format to the Program pseudo-format).
21361 \begin_layout Enumerate
21362 The error log parser.
21363 This is a program whose sole purpose is to rewrite error messages in a
21364 format that LyX understands.
21365 This makes it possible for LyX to place error boxes in the right places
21366 in the file buffer.
21369 \begin_layout Standard
21370 The first part, the
21371 \begin_inset Quotes eld
21375 \begin_inset Quotes erd
21378 setting, should be set to
21379 \begin_inset Quotes eld
21387 \begin_inset Quotes erd
21391 This basically means that LyX will call
21392 \begin_inset Quotes eld
21396 \begin_inset Quotes erd
21399 (a program or script) with the name of the Noweb file (normally a file
21400 in the LyX temp directory).
21404 \begin_layout Standard
21405 This is an implementation of
21406 \begin_inset Quotes eld
21410 \begin_inset Quotes erd
21413 that you can place in a directory on your path:
21416 \begin_layout LyX-Code
21420 \begin_layout LyX-Code
21424 \begin_layout LyX-Code
21425 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21428 \begin_layout Standard
21429 The next part of the converter setting is the
21430 \begin_inset Quotes eld
21434 \begin_inset Quotes erd
21437 which is to be set to
21438 \begin_inset Quotes eld
21443 parselog=listerrors
21446 \begin_inset Quotes erd
21450 This will run any errors that are generated by the
21451 \begin_inset Quotes eld
21455 \begin_inset Quotes erd
21458 process through the
21459 \begin_inset Quotes eld
21463 \begin_inset Quotes erd
21469 \begin_layout Standard
21470 The converter code looks in
21478 then on the path for the
21479 \begin_inset Quotes eld
21483 \begin_inset Quotes erd
21489 \begin_layout Standard
21490 The build will normally take place in LyX's temporary directory, so the
21491 files produced by the conversion will be in that directory.
21492 LyX will copy out what it regards as the `main' file, but the
21496 conversion may produce several files, and so most of these would then be
21497 deleted when LyX was closed.
21498 The present solution is to use a `copier',
21502 \begin_layout Plain Layout
21511 manual for information on these.
21520 script in its default mode, so that the entire contents of the temporary
21521 directory is copied.
21522 More will get copied than is needed, to be sure, but nothing will be lost.
21523 If, however, you know what extensions the generated files will have, this
21524 can be improved by using the
21533 This option takes a comma-separated list of extensions to copy.
21534 So, for example, if the conversion will generate only files with the extensions
21543 , then the correct definition would be:
21546 \begin_layout LyX-Code
21547 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21550 \begin_layout Standard
21551 The result will be that only files with these two extensions will be copied
21555 \begin_layout Paragraph
21556 Build instructions in the document
21559 \begin_layout Standard
21560 The last piece of the integration between LyX and noweb is the
21561 \begin_inset Quotes eld
21565 \begin_inset Quotes erd
21569 Generally, the instructions for building your program should be embedded
21570 in a scrap of its own.
21572 \begin_inset Quotes eld
21576 \begin_inset Quotes erd
21579 above uses the notangle command to look for this scrap (called
21580 \begin_inset Quotes eld
21584 \begin_inset Quotes erd
21587 ) and runs its contents through
21588 \begin_inset Quotes eld
21592 \begin_inset Quotes erd
21598 \begin_layout Standard
21599 Typically, such a scrap would look something like this:
21602 \begin_layout LyX-Code
21604 \begin_inset Newline newline
21608 \begin_inset Newline newline
21612 \begin_inset Newline newline
21615 if [ -z "${NOWEB_SOURCE}" ]
21616 \begin_inset Newline newline
21620 \begin_inset Newline newline
21623 NOWEB_SOURCE=myfile.nw
21624 \begin_inset Newline newline
21628 \begin_inset Newline newline
21632 code to extract files ...]
21633 \begin_inset Newline newline
21637 code to compile files ...]
21638 \begin_inset Newline newline
21644 \begin_layout Standard
21647 LIBDIR/examples/listerrors.lyx
21651 LIBDIR/examples/Literate.lyx
21653 which implement two versions of the
21654 \begin_inset Quotes eld
21658 \begin_inset Quotes erd
21661 program for some illustrations of how all of these pieces go together or
21664 LIBDIR/examples/noweb2lyx.lyx.
21667 Interestingly, these three files show off the language-indepence of the
21668 LyX literate programming support since they are written in Python, C and
21672 \begin_layout Subsubsection
21676 \begin_layout Standard
21677 All the Literate Programming support is configured by the
21679 Tools\SpecialChar \menuseparator
21683 \begin_inset Quotes eld
21687 \begin_inset Quotes erd
21691 The important parts are:
21694 \begin_layout Description
21696 \begin_inset space ~
21700 \begin_inset Quotes eld
21704 \begin_inset Quotes erd
21708 \begin_inset space ~
21711 format Set up via the Formats tab, this is where the Noweb-specific pieces
21721 , the file extension is set to
21726 This tells LyX to create a file with a
21730 extension in the first step of the conversion process.
21733 \begin_layout Description
21735 \begin_inset space ~
21743 \begin_inset space ~
21746 format This is an empty format whose sole purpose is to be the endpoint
21747 of a conversion (which then allows us to set up a converter for it).
21750 \begin_layout Description
21759 This converter performs the
21760 \begin_inset Quotes eld
21764 \begin_inset Quotes erd
21767 of the literate document.
21768 For Noweb, it is set to
21769 \begin_inset Quotes eld
21774 noweave -delay -index $$i > $$o
21777 \begin_inset Quotes erd
21783 \begin_layout Description
21793 \begin_inset Quotes eld
21797 \begin_inset Quotes erd
21801 As stated above, the Converter is set to
21802 \begin_inset Quotes eld
21810 \begin_inset Quotes erd
21813 , with Flags set to
21814 \begin_inset Quotes eld
21819 originaldir,parselog=listerrors
21822 \begin_inset Quotes erd
21828 \begin_layout Subsubsection
21832 \begin_layout Standard
21833 There is also a new function implemented in the LyX server, the
21834 \begin_inset Quotes eld
21837 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21841 \begin_layout Standard
21842 When debugging code with ddd/gdb, it is possible to invoke a text editor
21843 at the current execution position with a single key stroke.
21844 The default ddd configuration for that is shift-ctrl-V.
21845 It happens that you can define the editor command line invocation in ddd
21848 Edit\SpecialChar \menuseparator
21849 Preferences\SpecialChar \menuseparator
21852 dialog and changing the "Edit Sources" entry.
21855 \begin_layout Standard
21856 I take advantage of the new created LyX server function and this ddd feature,
21858 \begin_inset Quotes eld
21862 \begin_inset Quotes erd
21868 \begin_layout LyX-Code
21869 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21872 \begin_layout Standard
21873 With this, whenever you are using ddd and find a point in the program that
21874 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21875 ddd you forward this information to LyX through the LyX server and then
21876 the LyX window will show the same file with the cursor at the same position
21877 ddd was pointing to.
21878 No more guessing or long scrolling to locate a point in the program back
21882 \begin_layout Standard
21883 Note however that you must enable the LyX server to get this feature working
21884 (it is disabled by default).
21885 You can enable it in
21897 ) by entering in the
21902 \begin_inset Quotes eld
21907 /home/<your-home-directory>/.lyx/lyxpipe
21910 \begin_inset Quotes erd
21916 \begin_layout Standard
21917 Read the LyX server documentation in the
21919 Customization Manual
21921 for further information.
21924 \begin_layout Subsubsection
21928 \begin_layout Standard
21929 There are six new buttons that can be added to your LyX toolbar.
21930 Five of these buttons are short cuts to layout styles:
21951 The last one is a short cut to the
21952 \begin_inset Quotes eld
21956 \begin_inset Quotes erd
21963 \begin_layout Standard
21964 LyX has a range of buttons that are available for tool bar customization.
21965 In my toolbar I like to combine the six short cuts above with two more:
21970 \SpecialChar \menuseparator
21975 \SpecialChar \menuseparator
21982 View\SpecialChar \menuseparator
21986 Here is how it looks like:
21989 \begin_layout LyX-Code
21993 \begin_layout LyX-Code
21997 \begin_layout LyX-Code
21998 Icon "layout Standard"
22001 \begin_layout LyX-Code
22002 Icon "layout Section"
22005 \begin_layout LyX-Code
22006 Icon "layout LaTeX"
22009 \begin_layout LyX-Code
22010 Icon "layout LyX-Code"
22013 \begin_layout LyX-Code
22014 Icon "layout Scrap"
22017 \begin_layout LyX-Code
22021 \begin_layout LyX-Code
22025 \begin_layout LyX-Code
22026 Icon "buffer-typeset"
22029 \begin_layout LyX-Code
22030 Icon "build-program"
22033 \begin_layout LyX-Code
22037 \begin_layout LyX-Code
22041 \begin_layout LyX-Code
22045 \begin_layout LyX-Code
22049 \begin_layout LyX-Code
22053 \begin_layout Subsubsection
22054 Colors customization
22057 \begin_layout Standard
22058 There are a number of colors in LyX that can be customized in
22063 One of the things that bothers people is the LaTeX font color.
22064 The default color is red, since the scraps uses LaTeX font, and there is
22065 a lot of scraps in literate documents, you may get tired of seeing everything
22067 You can change it by going to the tabs
22076 \begin_layout Standard
22077 The next thing is the visible presence of the newline character in the screen.
22078 You can choose the color of this particular character and make it blend
22080 I recommend you choosing a color that is close to the background but not
22081 equal, that way you still can see it is there, but it is not bothering
22086 \begin_layout Chapter
22087 Secrets of the LaTeX Masters
22088 \begin_inset CommandInset label
22097 \begin_layout Standard
22098 Though LyX is a powerful tool, it cannot hope to support everything that
22099 can be done with pure TeX/LaTeX.
22100 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22101 as long as you are not afraid to use that
22102 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22109 button on the toolbar or add things to the LaTeX preamble.
22110 This section lists some tips, tricks, and otherwise cool ideas to give
22111 your document that extra little flair.
22114 Do try this at home
22116 , just start with something a little smaller and less important than your
22120 \begin_layout Standard
22121 Most ideas in this section require less common files in your LaTeX installation.
22122 If you have a system like teTeX, most will already be available.
22123 A few, however, will need to be downloaded from one of the CTAN archives.
22124 Often, there are several ways to do something, or several LaTeX style files
22125 which do the same thing.
22126 We do not endorse one choice over another, we simply claim that we have
22127 done a particular task with a particular file.
22128 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22131 \begin_layout Section
22135 \begin_layout Standard
22138 Lars Gullik Bjønnes
22141 \begin_layout Subsection
22145 \begin_layout Standard
22146 The aim for this chapter
22150 \begin_layout Plain Layout
22151 Editor's note: Lars' original chapter was a masterful description of how
22157 However, it was too long to flow smoothly in this document.
22158 I have therefore chosen to excerpt the most important sections here (sorry,
22159 Lars); you can read the original chapter (and more of the story!) in the
22162 examples/multicol.lyx
22170 is to show how the LaTeX package
22174 can be used in a LyX document.
22175 As LyX doesn't support the
22179 package natively yet, we have to use some small hacks.
22180 By reading this section it should be obvious how to do this.
22183 \begin_layout Subsection
22187 \begin_layout Standard
22192 package allows switching between one and multicolumn format on the same
22194 Footnotes are handled correctly (for the most part), but will be placed
22195 at the bottom of the page and not under each column.
22196 LaTeX's float mechanism, however, is partly disabled in the current implementat
22198 At the moment only page-wide floats can be used within the scope of the
22202 \begin_layout Subsection
22206 \begin_layout Subsubsection
22210 \begin_layout Standard
22211 If you want to have two columns in your text, you have use LaTeX mode to
22216 begin{multicols}{2}
22218 at the point where you want the two column layout to start, and then
22224 where you want it to end.
22228 \begin_layout Standard
22232 \begin_layout Plain Layout
22236 begin{multicols}{2}
22244 \begin_layout Standard
22249 The Adventure of the Empty House
22252 \begin_inset Newline newline
22257 Sir Arthur Conan Doyle
22260 \begin_layout Standard
22263 It was in the spring of the year 1894 that all London was interested, and
22264 the fashionable world dismayed, by the murder of the Honourable Ronald
22265 Adair under most unusual and inexplicable circumstances.
22266 The public has already learned those particulars of the crime which came
22267 out in the police investigation, but a good deal was suppressed upon that
22268 occasion, since the case for the prosecution was so overwhelmingly strong
22269 that it was not necessary to bring forward all the facts.
22270 Only now, at the end of nearly ten years, am I allowed to supply those
22271 missing links which make up the whole of that remarkable chain.
22272 The crime was of interest in itself, but that interest was as nothing to
22273 me compared to the inconceivable sequel, which afforded me the greatest
22274 shock and surprise of any event in my adventurous life.
22275 Even now, after this long interval, I find myself thrilling as I think
22276 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22277 ty which utterly submerged my mind.
22278 Let me say to that public, which has shown some interest in those glimpses
22279 which I have occasionally given them of the thoughts and actions of a very
22280 remarkable man, that they are not to blame me if I have not shared my knowledge
22281 with them, for I should have considered it my first duty to do so, had
22282 I not been barred by a positive prohibition from his own lips, which was
22283 only withdrawn upon the third of last month.
22286 \begin_layout Standard
22290 \begin_layout Plain Layout
22302 \begin_layout Subsubsection
22306 \begin_layout Standard
22307 The same pattern is used when you want more than two columns:
22310 \begin_layout Standard
22314 \begin_layout Plain Layout
22318 begin{multicols}{3}
22326 \begin_layout Standard
22329 It can be imagined that my close intimacy with Sherlock Holmes had interested
22330 me deeply in crime, and that after his disappearance I never failed to
22331 read with care the various problems which came before the public.
22332 And I even attempted, more than once, for my own private satisfaction,
22333 to employ his methods in their solution, though with indifferent success.
22334 There was none, however, which appealed to me like this tragedy of Ronald
22336 As I read the evidence at the inquest, which led up to a verdict of willful
22337 murder against some person or persons unknown, I realized more clearly
22338 than I had ever done the loss which the community had sustained by the
22339 death of Sherlock Holmes.
22340 There were points about this strange business which would, I was sure,
22341 have specially appealed to him, and the efforts of the police would have
22342 been supplemented, or more probably anticipated, by the trained observation
22343 and the alert mind of the first criminal agent in Europe.
22344 All day, as I drove upon my round, I turned over the case in my mind and
22345 found no explanation which appeared to me to be adequate.
22346 At the risk of telling a twice-told tale, I will recapitulate the facts
22347 as they were known to the public at the conclusion of the inquest.
22350 \begin_layout Standard
22354 \begin_layout Plain Layout
22366 \begin_layout Standard
22367 You can have more than 3 columns if you want to, but that might not be very
22368 pleasant for the eye.
22371 \begin_layout Subsubsection
22372 Columns inside columns
22375 \begin_layout Standard
22376 You can even have columns inside columns:
22379 \begin_layout Standard
22383 \begin_layout Plain Layout
22387 begin{multicols}{2}
22395 \begin_layout Standard
22398 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22399 at that time governor of one of the Australian colonies.
22400 Adair's mother had returned from Australia to undergo the operation for
22401 cataract, and she, her son Ronald, and her daughter Hilda were living together
22405 \begin_layout Standard
22409 \begin_layout Plain Layout
22413 begin{multicols}{2}
22421 \begin_layout Standard
22424 The youth moved in the best society–had, so far as was known, no enemies
22425 and no particular vices.
22426 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22427 had been broken off by mutual consent some months before, and there was
22428 no sign that it had left any very profound feeling behind it.
22429 For the rest {sic} the man's life moved in a narrow and conventional circle,
22430 for his habits were quiet and his nature unemotional.
22431 Yet it was upon this easy-going young aristocrat that death came, in most
22432 strange and unexpected form, between the hours of ten and eleven-twenty
22433 on the night of March 30, 1894.
22436 \begin_layout Standard
22440 \begin_layout Plain Layout
22452 \begin_layout Standard
22455 Ronald Adair was fond of cards–playing continually, but never for such stakes
22457 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22458 It was shown that, after dinner on the day of his death, he had played
22459 a rubber of whist at the latter club.
22460 He had also played there in the afternoon.
22465 The evidence of those who had played with him– Mr.
22466 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22467 and that there was a fairly equal fall of the cards.
22468 Adair might have lost five pounds, but not more.
22469 His fortune was a considerable one, and such a loss could not in any way
22471 He had played nearly every day at one club or other, but he was a cautious
22472 player, and usually rose a winner.
22473 It came out in evidence that, in partnership with Colonel Moran, he had
22474 actually won as much as four hundred and twenty pounds in a sitting, some
22475 weeks before, from Godfrey Milner and Lord Balmoral.
22476 So much for his recent history as it came out at the inquest.
22479 \begin_layout Standard
22483 \begin_layout Plain Layout
22495 \begin_layout Standard
22496 Please do read the file
22498 examples/multicol.lyx
22500 for more advanced examples including column and header spacing, vertical
22501 separator lines, and more.
22504 \begin_layout Section
22509 Paragraph Environment
22510 \begin_inset Argument
22513 \begin_layout Plain Layout
22514 Numbering in Enumerate
22522 \begin_layout Standard
22528 \begin_layout Standard
22529 \begin_inset VSpace bigskip
22535 \begin_layout Standard
22537 The default numbering for the
22541 paragraph environment begins with Arabic numbers and ends with uppercase
22543 Suppose, however, you wanted a different type of numbering scheme.
22544 Here's a quickie example of how to change the numbering scheme:
22547 \begin_layout LyX-Code
22557 \begin_layout LyX-Code
22567 \begin_layout LyX-Code
22577 \begin_layout LyX-Code
22587 \begin_layout Standard
22588 \SpecialChar \ldots{}
22589 which changes the numbering scheme to uppercase Roman numerals, uppercase
22590 letters, Arabic numbers, and lowercase letter.
22593 \begin_layout Standard
22594 Additionally, the previous example also adds a little bit extra to the numbering
22596 For example, the first level label actually looks like:
22597 \begin_inset Quotes eld
22601 \begin_inset Quotes erd
22605 For ease of reading, we'll describe what the numbering schemes look like
22606 using a notation something like this: <
22607 \begin_inset Quotes eld
22611 \begin_inset Quotes erd
22615 \begin_inset space ~
22619 \begin_inset Quotes erd
22623 \begin_inset Quotes erd
22627 \begin_inset space ~
22631 \begin_inset Quotes erd
22635 \begin_inset Quotes erd
22639 \begin_inset space ~
22643 \begin_inset Quotes eld
22647 \begin_inset Quotes erd
22654 \begin_layout Standard
22655 As you can see in the example, there is a label command for each nesting
22662 \SpecialChar \ldots{}
22669 , as well as a counter,
22673 \SpecialChar \ldots{}
22679 There are also five
22680 \begin_inset Quotes eld
22684 \begin_inset Quotes erd
22717 , each of which take one counter as an argument.
22718 You can add characters before or after these, but there's no need to add
22722 \begin_layout Standard
22723 You can get really fancy with these.
22727 \begin_layout LyX-Code
22741 \begin_layout LyX-Code
22753 \begin_layout LyX-Code
22763 \begin_layout LyX-Code
22773 \begin_layout Standard
22774 produces the somewhat out of hand numbering scheme: <
22775 \begin_inset Quotes eld
22779 \begin_inset Quotes erd
22783 \begin_inset space ~
22787 \begin_inset Quotes erd
22791 \begin_inset Quotes erd
22795 \begin_inset space ~
22799 \begin_inset Quotes erd
22803 \begin_inset Quotes erd
22807 \begin_inset space ~
22811 \begin_inset Quotes eld
22815 \begin_inset Quotes erd
22822 \begin_layout Standard
22826 \begin_layout Section
22830 \begin_layout Standard
22836 \begin_layout Standard
22837 \begin_inset VSpace bigskip
22843 \begin_layout Standard
22848 \begin_layout Plain Layout
22854 tmpfont}{cmr17 scaled 2500}{
22866 \begin_layout Standard
22871 \begin_layout Plain Layout
22882 hose of you who like the style of old books probably also like
22883 \begin_inset Quotes eld
22887 \begin_inset Quotes erd
22890 —those large capital letters which begin each new chapter or section.
22891 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22892 know some plain TeX!) but does require a lot of work and many iterations,
22893 as you can see by all the ugly TeX-mode stuff at the beginning of this
22897 \begin_layout Standard
22901 \begin_layout Plain Layout
22907 bigdrop{-1em}{3}{ptmri}{T}+
22912 here is a much easier way of doing this, of course.
22921 ) package from CTAN allows a simple way to add such letters to your documents.
22922 Since this package is not a standard part of teTeX, I can't demonstrate
22923 it within this document, but if you copy this paragraph to a new document,
22925 \begin_inset Quotes eld
22935 \begin_inset Quotes erd
22938 and the pluses from the TeX code at the beginning of the paragraph, and
22943 usepackage{dropcaps}
22945 to your LaTeX preamble, you will get a nice Times Roman Italic
22946 \begin_inset Quotes eld
22950 \begin_inset Quotes erd
22953 , whose height is three lines of text and which protrudes 1 em into the
22955 (Make certain you have copied
22956 \begin_inset Quotes eld
22964 \begin_inset Quotes erd
22967 into a directory where TeX can see it.) The first argument is the amount
22968 of indentation; in this case the negative sign moves it into the margin.
22969 The second argument is the height of the letter in number of lines of text.
22970 The third argument is the font name: virtually anything which has a tfm
22971 file should work (wade through the
22973 .../texmf/fonts/tfm
22975 directory for possibilities).
22976 My personal favorite is
22977 \begin_inset Quotes eld
22985 \begin_inset Quotes erd
22988 , a fancy German font specifically designed for dropped capitals.
22989 The fourth argument is the letter (or letters) to be dropped.
22994 package also offers the
23000 command, as well as a slightly simplified
23009 \begin_layout Section
23010 Non-standard Paragraph Shapes
23013 \begin_layout Standard
23019 \begin_layout Standard
23020 \begin_inset VSpace bigskip
23026 \begin_layout Standard
23030 \begin_layout Plain Layout
23042 \begin_layout Standard
23046 \begin_layout Plain Layout
23055 \begin_layout Plain Layout
23069 \begin_layout Standard
23074 \begin_layout Plain Layout
23085 \begin_layout Plain Layout
23094 \begin_layout Plain Layout
23103 \begin_layout Plain Layout
23112 \begin_layout Plain Layout
23121 \begin_layout Plain Layout
23130 \begin_layout Plain Layout
23139 \begin_layout Plain Layout
23148 \begin_layout Plain Layout
23157 \begin_layout Plain Layout
23166 \begin_layout Plain Layout
23175 \begin_layout Plain Layout
23184 \begin_layout Plain Layout
23193 \begin_layout Plain Layout
23202 \begin_layout Plain Layout
23211 \begin_layout Plain Layout
23220 \begin_layout Plain Layout
23229 \begin_layout Plain Layout
23238 \begin_layout Plain Layout
23247 \begin_layout Plain Layout
23253 There are times when the tyranny of rectangular paragraphs must be overthrown.
23254 In such situations, a call to the delightful plain TeX command
23261 As you can see, completely arbitrary shapes can be laid out with a suitable
23262 set of linelength definitions.
23263 While this parshape may look a bit silly and useless, one could conceive
23264 of situations such as finely tuned dropped capitals, word wrapping around
23265 non-rectangular graphics, etc.
23266 which will benefit from such handcrafting.
23269 \begin_layout Standard
23270 \begin_inset VSpace bigskip
23276 \begin_layout Standard
23281 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23288 is the number of lines of text which define the paragraph.
23289 If there turn out to be fewer lines, the shape is truncated; if there are
23290 more, the excess lines have the same dimensions as the last line of the
23300 entries specify the indentation of the line from the left margin, and the
23301 length of the line as measured from that point.
23302 The shape applies only to the current paragraph; everything is reset to
23303 normal for the next paragraph.
23306 \begin_layout Standard
23310 \begin_layout Plain Layout
23322 \begin_layout Section
23326 \begin_layout Standard
23327 As you can see, the examples in this section range from the useful to the
23329 While I don't expect that anyone will ever need the paragraph shape demonstrate
23330 d in the last section, the important point is that you can do almost anything
23331 you want in LyX if you are willing to figure out how to do it in TeX and
23333 TeX is a fantastically powerful typesetting system and all that power is
23334 available to you since LyX uses it as its backend.