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"
113 \paperorientation portrait
121 \paragraph_separation indent
122 \paragraph_indentation default
123 \quotes_language english
126 \paperpagestyle headings
127 \tracking_changes false
128 \output_changes false
138 Additional LyX Features
146 \begin_layout Plain Layout
148 Principal maintainer of this file is
153 If you have comments or error corrections, please send them to the LyX
154 Documentation mailing list,
155 \begin_inset Flex CharStyle:Code
158 \begin_layout Plain Layout
160 <lyx-docs@lists.lyx.org>
173 \begin_layout Standard
174 \begin_inset CommandInset toc
175 LatexCommand tableofcontents
182 \begin_layout Chapter
186 \begin_layout Standard
187 This manual is essentially Part II of the
189 User's Guide\SpecialChar \@.
192 The reason for separating this document out is simple: the
196 is already quite lengthy, and it contains information on all of the basic
197 features one needs to know in order to prepare most documents.
198 However, the LyX Team has worked to make LyX extensible through various
199 configuration files and external packages.
200 That means that if you want to support the Fizzwizzle LaTeX package, you
201 can create a layout file (or module) for it without having to alter LyX
203 We've already had contributions of several new features this way, and some
204 of them are documented here.
205 There are also some more `advanced' features, such as how to control the
206 presentation of bibliographies and how to work with multi-part documents,
207 that are not covered in the
211 and are discussed here.
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216 control, and SGML support, which require additional software to work properly.
217 There is also a chapter on LyX's support for HTML.
218 And lastly, there's a chapter of LaTeX tools and tips, things you can use
219 to spruce up your documents by directly using the powerful features of
225 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \begin_layout Standard
229 If you haven't read the
233 yet, you are definitely in the wrong manual.
238 is the first place to go, since it describes the notation and format of
240 You should also be thoroughly familiar with the
244 and all of the basic features of LyX before attempting to read this one.
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on LyX's interaction
249 with LaTeX, this first chapter covers the inner workings of LyX and how
250 to direct LyX to generate exactly the LaTeX code you want.
251 It is obviously for more seasoned LyX users.
254 \begin_layout Chapter
258 \begin_layout Section
262 \begin_layout Standard
263 This chapter is for both TeX-nicians and the LaTeX-curious.
264 In it, we'll explain how LyX and LaTeX work together to produce printable
266 This is the only place in any of the manuals where we assume you know something
270 \begin_layout Standard
271 At one time, LyX was called a
272 \begin_inset Quotes eld
275 WYSIWYM frontend to LaTeX,
276 \begin_inset Quotes erd
279 but that's no longer true.
280 There are frontends to LaTeX out there.
284 \begin_layout Plain Layout
285 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
286 There are also the LaTeX modes for vi and emacs, of course.
291 These are basically text editors with the ability to run LaTeX and mark
292 any errors in the file you're editing.
301 run LaTeX, and it also indicates errors in the file, it also does much,
303 For one thing, you don't need to know LaTeX to use LyX effectively.
304 And LyX has added its own extensions to LaTeX.
305 Try the following sometime: select
306 \begin_inset Flex CharStyle:MenuItem
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
317 \begin_inset Flex CharStyle:MenuItem
320 \begin_layout Plain Layout
327 \begin_inset Flex CharStyle:MenuItem
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
337 ), then look at the preamble of the resulting
338 \begin_inset Flex CharStyle:Code
341 \begin_layout Plain Layout
348 You'll notice a variety of new macros defined specifically by LyX.
349 These macros are defined automatically, according to the features you use
353 \begin_layout Standard
354 There are several commands that automatically invoke LaTeX.
358 \begin_layout Itemize
359 \begin_inset Flex CharStyle:MenuItem
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
372 \begin_layout Itemize
373 \begin_inset Flex CharStyle:MenuItem
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
387 \begin_layout Itemize
388 \begin_inset Flex CharStyle:MenuItem
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
401 \begin_layout Itemize
402 \begin_inset Flex CharStyle:MenuItem
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
415 \begin_layout Standard
416 They will only invoke LaTeX if the file has changed since the last time
421 \begin_layout Standard
422 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \begin_layout Enumerate
426 Convert the document to LaTeX and save to a file with the extension
427 \begin_inset Flex CharStyle:Code
430 \begin_layout Plain Layout
437 \begin_inset Flex CharStyle:Code
440 \begin_layout Plain Layout
449 \begin_layout Enumerate
451 \begin_inset Flex CharStyle:Code
454 \begin_layout Plain Layout
460 file (maybe several times), and run any other commands (such as
461 \begin_inset Flex CharStyle:Code
464 \begin_layout Plain Layout
471 \begin_inset Flex CharStyle:Code
474 \begin_layout Plain Layout
480 ) needed to compile the LaTeX file.
483 \begin_layout Enumerate
484 If there are any errors, show the error log.
487 \begin_layout Standard
488 If you've run LaTeX using
489 \begin_inset Flex CharStyle:MenuItem
492 \begin_layout Plain Layout
495 \SpecialChar \menuseparator
503 , LyX then runs a DVI viewer to display the DVI-file.
505 \begin_inset Flex CharStyle:MenuItem
508 \begin_layout Plain Layout
511 \SpecialChar \menuseparator
519 , LyX performs further steps:
522 \begin_layout Itemize
524 \begin_inset Flex CharStyle:Code
527 \begin_layout Plain Layout
533 to convert the DVI file to PostScript.
536 \begin_layout Itemize
537 Run a PostScript viewer, such as
538 \begin_inset Flex CharStyle:Code
541 \begin_layout Plain Layout
547 , to display the PostScript file.
550 \begin_layout Standard
551 LyX does similar things when viewing, or exporting, other formats.
554 \begin_layout Section
555 Translating LaTeX files into LyX
558 \begin_layout Standard
559 You can import a LaTeX file into LyX by using the
560 \begin_inset Flex CharStyle:MenuItem
563 \begin_layout Plain Layout
564 File\SpecialChar \menuseparator
565 Import\SpecialChar \menuseparator
572 This will call a program named
573 \begin_inset Flex CharStyle:Code
576 \begin_layout Plain Layout
582 which will create a file
583 \begin_inset Flex CharStyle:Code
586 \begin_layout Plain Layout
593 \begin_inset Flex CharStyle:Code
596 \begin_layout Plain Layout
603 LyX will then open that file.
607 \begin_layout Plain Layout
608 \begin_inset Flex CharStyle:Code
611 \begin_layout Plain Layout
617 can also be run from the command line, of course.
625 \begin_layout Standard
626 \begin_inset Flex CharStyle:Code
629 \begin_layout Plain Layout
635 will translate most legal LaTeX, but not everything.
636 It will put things it doesn't understand into TeX code, so after translating
638 \begin_inset Flex CharStyle:Code
641 \begin_layout Plain Layout
647 , you can look for TeX code and hand-edit it until it looks right.
650 \begin_layout Standard
651 If you don't know what TeX code is, read the next section.
654 \begin_layout Section
655 \begin_inset CommandInset label
657 name "sec:Inserting-TeX-Code"
661 Inserting TeX Code into LyX Documents
664 \begin_layout Standard
665 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
666 You can always insert TeX code into any LyX document.
667 LyX cannot, and will never be able to, display every possible LaTeX construct.
668 If ever you need to insert LaTeX commands into your LyX document, you can
670 \begin_inset Flex CharStyle:Code
673 \begin_layout Plain Layout
679 box, which you can insert into your document with
680 \begin_inset Flex CharStyle:MenuItem
683 \begin_layout Plain Layout
684 Insert\SpecialChar \menuseparator
693 \begin_layout Standard
694 Here's an example of inserting LaTeX commands in a LyX document.
695 The code looks like this:
698 \begin_layout LyX-Code
702 \begin_inset Newline newline
708 \begin_inset Newline newline
711 This is an example for a minipage environment.
713 \begin_inset Newline newline
716 can put nearly everything in it, even (non-floating)
717 \begin_inset Newline newline
722 \begin_inset Newline newline
728 \begin_inset Newline newline
732 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
755 \begin_inset Newline newline
761 \begin_inset Newline newline
767 \begin_inset Newline newline
773 \begin_inset Newline newline
781 \begin_layout LyX-Code
785 \begin_layout Standard
787 \begin_inset Flex CharStyle:Code
790 \begin_layout Plain Layout
796 box containing this text is directly after this paragraph.
797 Those of you reading the manual in LyX will only see the TeX code inset.
798 Those reading a printed version of the manuals will see the actual results:
801 \begin_layout Standard
805 \begin_layout Plain Layout
812 \begin_layout Plain Layout
819 \begin_layout Plain Layout
821 This is an example for a minipage environment.
822 You can put nearly everything in it, even (non-floating) figures and tables.
826 \begin_layout Plain Layout
833 \begin_layout Plain Layout
838 \begin_layout Plain Layout
845 \begin_layout Plain Layout
852 \begin_layout Plain Layout
859 \begin_layout Plain Layout
865 \begin_layout Plain Layout
872 \begin_layout Plain Layout
879 \begin_layout Plain Layout
886 \begin_layout Plain Layout
898 \begin_layout Standard
899 In addition to using TeX code, you can also create a separate file containing
900 some complex LaTeX structure and then use
901 \begin_inset Flex CharStyle:MenuItem
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
915 to include your file (you should select the type
916 \begin_inset Flex CharStyle:Code
919 \begin_layout Plain Layout
926 We recommend that you only do this if you have a
927 \begin_inset Flex CharStyle:Code
930 \begin_layout Plain Layout
941 Otherwise, you'll have a big job tracking down LaTeX errors.
944 \begin_layout Standard
945 There are a few last points to emphasize:
948 \begin_layout Itemize
953 check if your LaTeX code is correct.
956 \begin_layout Itemize
957 Beware reinventing the wheel.
960 \begin_layout Standard
961 On that last point, LyX does have quite a few features tucked into it, and
963 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
964 feature before you decide you have to do it by hand.
965 Moreover, there are numerous LaTeX packages out there to do all sorts of
966 things, from labels to envelopes to fancy multipage tables.
968 \begin_inset CommandInset href
971 target "http://www.ctan.org/"
975 for details, and see chapter
976 \begin_inset CommandInset ref
978 reference "cha:secrets"
985 \begin_layout Standard
986 If you do need to do some wild and fancy things within your document, be
987 sure to check out a good LaTeX book for assistance.
988 There are a number of them listed in the bibliography of the
995 \begin_layout Section
996 LyX and the LaTeX Preamble
999 \begin_layout Subsection
1000 About the LaTeX Preamble
1003 \begin_layout Standard
1004 If you already know LaTeX, there is no need to explain here what the preamble
1006 If you don't, the following will give you some ideas—we recommend again
1007 that you consult a LaTeX book for further information.
1008 In any case, you should read the points below, because they explain what
1009 you can do and what you don't need to do in the LaTeX preamble of a LyX
1013 \begin_layout Standard
1014 The LaTeX preamble comes at the very beginning of a document,
1022 \begin_layout Itemize
1023 Declare the document class.
1025 \begin_inset Newline newline
1028 LyX already does this for you.
1029 If you're a seasoned LaTeX-nician, and you have a custom document class
1030 you want to use, check out the
1032 Customization Manual
1034 for information on how to make LyX interface to it.
1037 \begin_layout Itemize
1038 Declare the usage of packages.
1040 \begin_inset Newline newline
1043 LaTeX packages provide special commands, which are only available within
1044 a document when the package has been declared in the preamble.
1045 For example, the package
1046 \begin_inset Flex CharStyle:Code
1049 \begin_layout Plain Layout
1055 forces all paragraphs to be indented.
1056 There are other packages for labels, envelopes, margins, etc.
1060 \begin_layout Itemize
1061 Set counters, variables, lengths and widths.
1063 \begin_inset Newline newline
1066 There are several LaTeX counters and variables which
1070 be set globally from within the preamble in order to have the desired effect.
1071 (There are variables which you can set and reset inside the document, too.)
1072 Margins are a good example of something which must be set in the preamble.
1073 Another example is the label format for lists.
1074 You can actually set these just about anywhere, but it's best to do it
1075 just once, inside the preamble.
1078 \begin_layout Itemize
1079 Declare user defined commands (with
1080 \begin_inset Flex CharStyle:Code
1083 \begin_layout Plain Layout
1092 \begin_inset Flex CharStyle:Code
1095 \begin_layout Plain Layout
1104 \begin_inset Newline newline
1107 These are abbreviations for LaTeX commands which appear very often inside
1109 Although the preamble is a good place to declare such commands, they
1113 be declared anywhere (before they are used for the first time, of course).
1114 This can be useful if there is a lot of raw LaTeX code in your document,
1115 which normally should not be the case.
1118 \begin_layout Standard
1119 LyX adds its own set of definitions to the preamble of the
1120 \begin_inset Flex CharStyle:Code
1123 \begin_layout Plain Layout
1130 This makes LaTeX files generated by LyX portable.
1133 \begin_layout Subsection
1134 Changing the Preamble
1137 \begin_layout Standard
1138 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1139 can't change them without patching LyX itself.
1140 You can, however, add your own stuff to the preamble by selecting
1141 \begin_inset Flex CharStyle:MenuItem
1144 \begin_layout Plain Layout
1146 \begin_inset space ~
1155 \begin_inset Flex CharStyle:MenuItem
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1166 LyX adds anything in the
1167 \begin_inset Flex CharStyle:MenuItem
1170 \begin_layout Plain Layout
1176 dialog to its own built-in preamble.
1177 Before adding your own declarations in the preamble, you should make sure
1178 that LyX doesn't already support what you want to do.
1179 (Remember what we said about reinventing the wheel?) Also,
1181 make sure your preamble code is correct
1184 LyX doesn't check it for you.
1185 If there is an error, you're likely to get an error like
1186 \begin_inset Quotes eld
1190 \begin_inset Flex CharStyle:Code
1193 \begin_layout Plain Layout
1202 \begin_inset Quotes erd
1206 If you see this error, check your preamble.
1209 \begin_layout Subsection
1213 \begin_layout Standard
1214 Here are some examples of what you can add to a preamble, and what they
1218 \begin_layout Subsubsection
1222 \begin_layout Standard
1223 There are two variables under LaTeX that control page position:
1224 \begin_inset Flex CharStyle:Code
1227 \begin_layout Plain Layout
1236 \begin_inset Flex CharStyle:Code
1239 \begin_layout Plain Layout
1248 Their names should be self-explanatory.
1249 These variables are useful if you think for a moment about computer labels.
1250 Sometimes, the size of a print medium and the area of the medium that you
1251 can actually print on aren't the same.
1253 \begin_inset Flex CharStyle:Code
1256 \begin_layout Plain Layout
1265 \begin_inset Flex CharStyle:Code
1268 \begin_layout Plain Layout
1279 \begin_layout Standard
1280 The default values for
1281 \begin_inset Flex CharStyle:Code
1284 \begin_layout Plain Layout
1293 \begin_inset Flex CharStyle:Code
1296 \begin_layout Plain Layout
1305 \begin_inset space \thinspace{}
1309 \begin_inset space \thinspace{}
1313 \begin_inset space \space{}
1316 the page isn't shifted.
1317 Unfortunately, some DVI drivers always seem to shift the page.
1318 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1319 If you're using LyX on a system that you don't personally maintain, and
1320 your sysadmin is a doofus,
1321 \begin_inset Flex CharStyle:Code
1324 \begin_layout Plain Layout
1333 \begin_inset Flex CharStyle:Code
1336 \begin_layout Plain Layout
1345 Suppose you're left and top margins are always 0.5
1346 \begin_inset space \thinspace{}
1350 You can add this to the preamble:
1353 \begin_layout LyX-Code
1361 \begin_layout LyX-Code
1369 \begin_layout Standard
1370 and your margins should now be correct.
1373 \begin_layout Subsubsection
1377 \begin_layout Standard
1378 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1379 There's a rather nice package, available at your nearest CTAN archive,
1380 for printing sheets of labels:
1381 \begin_inset Flex CharStyle:Code
1384 \begin_layout Plain Layout
1391 Now, your system may not have this package installed by default.
1392 We leave that up to you to check.
1393 You'll also want to read the documentation for it; we're not going to do
1395 Since this is an example, however, we'll give you an example of how you
1399 \begin_layout Standard
1400 First, make sure you're using the
1401 \begin_inset Flex CharStyle:Code
1404 \begin_layout Plain Layout
1411 Next, you need to put the following in your preamble:
1414 \begin_layout LyX-Code
1420 \begin_layout LyX-Code
1426 \begin_layout LyX-Code
1432 \begin_layout LyX-Code
1438 \begin_layout LyX-Code
1444 \begin_layout LyX-Code
1450 \begin_layout LyX-Code
1456 \begin_layout Standard
1457 This sets things up for Avery label sheets, stock #5360.
1458 You're now ready to print labels, but you'll need to insert LaTeX code,
1459 placing the commands
1460 \begin_inset Flex CharStyle:Code
1463 \begin_layout Plain Layout
1472 \begin_inset Flex CharStyle:Code
1475 \begin_layout Plain Layout
1483 around each label text.
1484 This and other special features of
1485 \begin_inset Flex CharStyle:Code
1488 \begin_layout Plain Layout
1494 are explained in its documentation.
1497 \begin_layout Standard
1498 Someday, someone may write a LyX layout file to support this package directly.
1499 Maybe that someone is you.
1502 \begin_layout Subsubsection
1503 Example #3: Paragraph Indentation
1506 \begin_layout Standard
1507 Americans are trained to indent the first line of
1512 As with all of their other weird quirks, most Americans will whine and
1513 moan until they can have their way and indent the first line of all paragraphs.
1522 \begin_layout Standard
1523 Of course, this behavior isn't standard typography.
1524 In books, you typically only indent the first line of a paragraph
1528 it follows another one.
1529 The idea behind indenting the first line of a paragraph is to distinguish
1530 neighboring paragraphs from one another.
1531 If there is no previous paragraph—for example, if it follows a figure or
1532 is the first paragraph in a section—then there is no need for indentation.
1536 \begin_layout Standard
1537 If you're a typical American (we're still joking!), though, you don't care
1538 about such esoteric things; you want your indentation! Add this to the
1542 \begin_layout LyX-Code
1545 usepackage{indentfirst}
1548 \begin_layout Standard
1549 If your TeX distribution isn't braindead, you'll have this package, and
1550 all of your paragraphs will get the indentation the Founding Fathers intended
1554 \begin_layout Subsubsection
1555 Example #4: This Document
1558 \begin_layout Standard
1559 You can also check out the preamble of this document to get an idea of some
1560 of the advanced things you can do.
1561 Also, there are more examples and an assortment of LaTeX
1562 \begin_inset Quotes eld
1566 \begin_inset Quotes erd
1570 \begin_inset space ~
1574 \begin_inset CommandInset ref
1576 reference "cha:secrets"
1584 \begin_layout Section
1585 LyX and LaTeX Errors
1588 \begin_layout Standard
1589 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1591 It then uses the logfile from the LaTeX run to do a post-mortem.
1592 After analyzing the logfile,LyX displays a dialog listing the errors.
1593 Clicking on any one of them will take you to the position in your LyX file
1594 where the error occurred.
1598 \begin_layout Plain Layout
1600 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1602 There are also cases where LaTeX reports the error on one line, but the
1603 actual error is earlier.
1604 This is not unlike forgetting a closing brace in a program: You'll get
1605 an error, but only later.
1613 \begin_layout Standard
1614 Some folks also like to look at the log file directly: It is available from
1616 \begin_inset Flex CharStyle:MenuItem
1619 \begin_layout Plain Layout
1622 \SpecialChar \menuseparator
1626 \begin_inset space ~
1635 There are some fairly common error messages and warnings.
1636 We'll cover those here.
1637 You should look at a good LaTeX book for a complete listing.
1640 \begin_layout Itemize
1641 \begin_inset Flex CharStyle:Code
1644 \begin_layout Plain Layout
1651 \begin_inset Newline newline
1654 Anything beginning with these words is a warning message for the purpose
1656 \begin_inset Quotes eld
1660 \begin_inset Quotes erd
1663 the LaTeX code itself.
1664 You'll get messages like this if you added or changed cross-references
1665 or bibliography entries, in which case, LaTeX is trying to tell you that
1666 you need to make another run.
1667 You can by-and-large ignore these.
1670 \begin_layout Itemize
1671 \begin_inset Flex CharStyle:Code
1674 \begin_layout Plain Layout
1681 \begin_inset Newline newline
1684 Another warning message, this time about fonts which LaTeX couldn't find.
1685 The rest of the message will often say something about a replacement font
1687 You can safely ignore these, too.
1690 \begin_layout Itemize
1691 \begin_inset Flex CharStyle:Code
1694 \begin_layout Plain Layout
1703 \begin_inset Newline newline
1711 They are warnings about lines that were too long and run past the right
1713 Almost always, this is unnoticeable in the final output.
1714 (It can be just a point or two.) Or, only one or two characters extend past
1716 LaTeX seems to generate at least one of these messages for just about any
1718 \begin_inset Newline newline
1721 You can ignore these messages.
1722 Your eyes will tell you if there's a problem with something that's too
1723 wide; just look at the output.
1727 \begin_layout Plain Layout
1728 You can also enable the `draft' option in
1729 \begin_inset Flex CharStyle:MenuItem
1732 \begin_layout Plain Layout
1735 \SpecialChar \menuseparator
1743 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1751 \begin_layout Itemize
1752 \begin_inset Flex CharStyle:Code
1755 \begin_layout Plain Layout
1764 \begin_inset Newline newline
1767 Not quite as common as its cousin.
1768 LaTeX seems to like to print lines that are a bit too wide as opposed to
1769 ones that are a bit too narrow.
1770 We have no idea why.
1773 \begin_layout Itemize
1774 \begin_inset Flex CharStyle:Code
1777 \begin_layout Plain Layout
1786 \begin_inset Flex CharStyle:Code
1789 \begin_layout Plain Layout
1798 \begin_inset Newline newline
1801 Warnings about troubles breaking the page.
1802 Once again, just look at the output.
1803 Your eyes will tell you where something has gone wrong.
1806 \begin_layout Itemize
1807 \begin_inset Flex CharStyle:Code
1810 \begin_layout Plain Layout
1812 \begin_inset Quotes els
1816 \begin_inset Quotes ers
1825 \begin_inset Newline newline
1829 \begin_inset Quotes eld
1833 \begin_inset Quotes erd
1836 isn't installed on this system.
1837 This usually appears because some package your document needs isn't installed.
1838 If you didn't touch the preamble or didn't use the
1839 \begin_inset Flex CharStyle:Code
1842 \begin_layout Plain Layout
1850 command, then one of the packages LyX tried to load is missing.
1852 \begin_inset Flex CharStyle:MenuItem
1855 \begin_layout Plain Layout
1856 Help\SpecialChar \menuseparator
1862 to get a list of packages that LyX knows about.
1863 This file is updated whenever you reconfigure LyX (using
1864 \begin_inset Flex CharStyle:MenuItem
1867 \begin_layout Plain Layout
1868 Tools\SpecialChar \menuseparator
1874 ) and tells you which packages have been detected and what they do.
1875 \begin_inset Newline newline
1879 \begin_inset Flex CharStyle:Code
1882 \begin_layout Plain Layout
1890 command and the package in question isn't installed, then you'll need to
1891 install it yourself.
1894 \begin_layout Itemize
1895 \begin_inset Flex CharStyle:Code
1898 \begin_layout Plain Layout
1899 LaTeX Error: Unknown option
1905 \begin_inset Newline newline
1908 Error messages beginning with this are trying to tell you that you specified
1909 a bad or undefined option to a package.
1910 Check the package's documentation.
1913 \begin_layout Itemize
1914 \begin_inset Flex CharStyle:Code
1917 \begin_layout Plain Layout
1918 Undefined control sequence
1924 \begin_inset Newline newline
1927 If you've inserted LaTeX code into your document, but made a typo, you'll
1929 You may have forgotten to load a package.
1930 In any case, this error message usually means that you used an undefined
1935 \begin_layout Standard
1936 There are other error and warning messages.
1937 Some are self-explanatory.
1938 These are usually LaTeX messages.
1939 Others are downright cryptic.
1940 These are usually TeX error messages, and we really have
1944 what they mean or how to decipher them.
1948 \begin_layout Standard
1949 There's a general sequence you should follow if you get error messages:
1952 \begin_layout Enumerate
1953 Look at the LaTeX code you inserted for typos.
1956 \begin_layout Enumerate
1957 If there are no typos, check that you used the command(s) correctly.
1960 \begin_layout Enumerate
1961 If you get a bunch of error boxes piled up at the very top of the document—and
1962 especially if you see a
1963 \begin_inset Quotes eld
1967 \begin_inset Flex CharStyle:Code
1970 \begin_layout Plain Layout
1979 \begin_inset Quotes erd
1982 error—it means that there are errors in the preamble.
1983 Start debugging your preamble.
1986 \begin_layout Enumerate
1987 If you didn't add anything to the preamble and didn't add any LaTeX code
1988 to the document, the first suspect is your LaTeX distribution itself.
1989 Check for missing packages and install them.
1992 \begin_layout Enumerate
1993 Okay, so there are no missing packages.
1994 Did you use any of the fine-tuning options in LyX? Specifically, did you
1999 any of them, like trying to manually insert lots of
2000 \begin_inset Flex CharStyle:Code
2003 \begin_layout Plain Layout
2005 \begin_inset space ~
2014 \begin_inset Flex CharStyle:Code
2017 \begin_layout Plain Layout
2024 \begin_inset Flex CharStyle:Code
2027 \begin_layout Plain Layout
2033 ? Did you try to kludge something together with these instead of using the
2034 appropriate paragraph environment?
2037 \begin_layout Enumerate
2038 All right, you didn't use any of the fine-tuning options, you played by
2040 Did you try to pull a fancy maneuver? Did you do something funky inside
2041 a table or an equation, like inserting a graphic into a table cell?
2044 \begin_layout Enumerate
2045 Do you have long sections of text where LaTeX cannot find a place to break
2046 a line? By default, LaTeX is rather strict about how much extra inter-word
2047 spacing it will add in order to break a line.
2048 Preferably, you should rework the paragraph to avoid the problem.
2049 If this isn't an option, you can wrap your text in
2050 \begin_inset Flex CharStyle:Code
2053 \begin_layout Plain Layout
2061 to make LaTeX's line breaking more, well, sloppy.
2064 \begin_layout Enumerate
2065 Did you go overboard with the nesting? LyX (currently) doesn't check to
2066 make sure you're in the limits for nesting environments.
2067 If you nested a bunch of environments to the
2068 \begin_inset Formula $17^{\mathrm{th}}$
2071 level, that's the problem.
2072 (The limit in LaTeX is five.)
2075 \begin_layout Enumerate
2076 Okay, you didn't get any error messages, but your output looks awful.
2077 If you have a table or figure that's too wide or long for the page, you
2082 \begin_layout Enumerate
2083 rescale the figure so it fits.
2086 \begin_layout Enumerate
2087 trim down the table so it fits.
2091 \begin_layout Enumerate
2092 If something else is wrong with the output, and you didn't try to pull anything
2093 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \begin_layout Standard
2097 If all this doesn't help—well, then
2101 you might have found a bug in LyX\SpecialChar \ldots{}
2105 \begin_layout Chapter
2109 \begin_layout Section
2110 Customizing Bibliographies with BibTeX
2113 \begin_layout Standard
2114 The most basic information about how to use BibTeX with LyX is contained
2117 Bibliography databases (BibTeX)
2124 The following subsections explain special bibliography features supported
2128 \begin_layout Subsection
2129 Alternative Citation Styles
2132 \begin_layout Standard
2133 Standard BibTeX uses numbers (e.
2134 \begin_inset space \thinspace{}
2138 \begin_inset space \space{}
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2149 ) to refer to a cited work.
2150 However, in many scientific disciplines, other citation styles are in use.
2151 The most common one is the author-year style (e.
2152 \begin_inset space \thinspace{}
2156 \begin_inset space \space{}
2160 \begin_inset Quotes eld
2164 \begin_inset Quotes erd
2168 LyX supports two packages that provide this style,
2169 \begin_inset Flex CharStyle:Code
2172 \begin_layout Plain Layout
2179 \begin_inset Flex CharStyle:Code
2182 \begin_layout Plain Layout
2189 Both packages have their pros and cons, which cannot be listed in detail.
2190 If you only want to have simple author-year (or author-numerical) style,
2191 or if you want to use one of the countless style files for
2192 \begin_inset Flex CharStyle:Code
2195 \begin_layout Plain Layout
2201 , than the established
2202 \begin_inset Flex CharStyle:Code
2205 \begin_layout Plain Layout
2211 package is probably your choice.
2212 If you need special features like short title references, ibidem etc., you
2214 \begin_inset Flex CharStyle:Code
2217 \begin_layout Plain Layout
2226 \begin_layout Standard
2227 The handling of both packages in LyX is basically the same.
2229 \begin_inset Flex CharStyle:MenuItem
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2240 \begin_inset Flex CharStyle:MenuItem
2243 \begin_layout Plain Layout
2250 \begin_inset Flex CharStyle:MenuItem
2253 \begin_layout Plain Layout
2260 \begin_inset Flex CharStyle:MenuItem
2263 \begin_layout Plain Layout
2270 With both packages, you will get some extra features in the citation dialog
2271 and you can select the style of the reference (
2272 \begin_inset Quotes eld
2276 \begin_inset Quotes erd
2280 \begin_inset Quotes eld
2284 \begin_inset Quotes erd
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2296 \begin_inset Quotes eld
2300 \begin_inset Quotes erd
2304 Note that both packages need specifically designed style files.
2305 They both ship their own, but there are lots of additional style files,
2306 and there is even an interactive style file builder
2310 \begin_layout Plain Layout
2312 \begin_inset Flex URL
2315 \begin_layout Plain Layout
2317 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2328 \begin_inset Flex CharStyle:Code
2331 \begin_layout Plain Layout
2340 \begin_layout Subsection
2341 Sectioned Bibliographies
2344 \begin_layout Standard
2345 Sometimes you might need to divide your bibliography into several sections.
2346 If you are for instance a historian, the possibility to separate sources
2347 and scientific works is most likely a
2348 \begin_inset Quotes eld
2352 \begin_inset Quotes erd
2356 Unfortunately, BibTeX itself does not allow you to do this.
2357 But with the help of some LaTeX packages, BibTeX can be extended to fit
2361 \begin_layout Standard
2362 LyX provides native support for one of these packages,
2370 \begin_layout Plain Layout
2372 \begin_inset Flex URL
2375 \begin_layout Plain Layout
2377 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2387 The advantage of this package (compared to other packages like
2391 ) is that you don't need to define new citation commands.
2392 Instead, you need to prepare different bibliographic databases which include
2393 the entries for the different sections of the bibliography.
2394 For example: If you want to divide your bibliography into the sections
2396 \begin_inset Quotes eld
2400 \begin_inset Quotes erd
2404 \begin_inset Quotes eld
2408 \begin_inset Quotes erd
2411 , you first need to create two bibliographic databases, e.
2412 \begin_inset space \thinspace{}
2416 \begin_inset space \space{}
2420 \begin_inset Flex CharStyle:Code
2423 \begin_layout Plain Layout
2430 \begin_inset Flex CharStyle:Code
2433 \begin_layout Plain Layout
2443 \begin_layout Standard
2445 \begin_inset Flex CharStyle:MenuItem
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2456 \begin_inset Flex CharStyle:MenuItem
2459 \begin_layout Plain Layout
2466 \begin_inset Flex CharStyle:MenuItem
2469 \begin_layout Plain Layout
2470 Sectioned bibliography
2476 Now you can insert multiple BibTeX bibliographies, one for each section
2477 of your bibliography.
2478 Returning to our example: Insert the BibTeX bibliography
2479 \begin_inset Flex CharStyle:Code
2482 \begin_layout Plain Layout
2488 and a second one for the database
2489 \begin_inset Flex CharStyle:Code
2492 \begin_layout Plain Layout
2499 You are free to use the same or different styles for each section.
2500 Additionally, you can chose if the bibliography section should contain
2502 \begin_inset Quotes eld
2505 all cited references
2506 \begin_inset Quotes erd
2509 of the specified database(s) (which is the default),
2510 \begin_inset Quotes eld
2513 all uncited references
2514 \begin_inset Quotes erd
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 This might be useful if you would like to separate your bibliography into
2528 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2536 \begin_inset Quotes eld
2540 \begin_inset Quotes erd
2544 \begin_inset Quotes eld
2548 \begin_inset Quotes erd
2552 The titles for the sections can be added as ordinary sections or subsections.
2554 \begin_inset Flex CharStyle:Code
2557 \begin_layout Plain Layout
2563 removes the bibliography title, you have manually re-add that, too (as
2564 a chapter* or section*, for instance).
2567 \begin_layout Subsection
2568 Multiple Bibliographies
2571 \begin_layout Standard
2572 Multiple bibliographies, e.
2573 \begin_inset space \thinspace{}
2577 \begin_inset space \space{}
2580 a bibliography for each section or chapter of the document, are not supported
2583 \begin_inset Flex CharStyle:Code
2586 \begin_layout Plain Layout
2592 package, which is used for the creation of sectioned bibliographies in
2593 LyX (see the previous section), provides an easy way to solve this task,
2594 if you are willing to use some
2595 \begin_inset Flex CharStyle:MenuItem
2598 \begin_layout Plain Layout
2605 \begin_inset space ~
2609 \begin_inset CommandInset ref
2611 reference "sec:Inserting-TeX-Code"
2619 \begin_layout Plain Layout
2620 An alternative approach is to use the
2621 \begin_inset Flex CharStyle:Code
2624 \begin_layout Plain Layout
2631 \begin_inset Flex CharStyle:Code
2634 \begin_layout Plain Layout
2640 package, respectively.
2648 \begin_layout Standard
2650 \begin_inset Flex CharStyle:MenuItem
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2661 \begin_inset Flex CharStyle:MenuItem
2664 \begin_layout Plain Layout
2671 \begin_inset Flex CharStyle:MenuItem
2674 \begin_layout Plain Layout
2675 Sectioned bibliography
2681 In the document, you have to enclose the sections, which shall contain
2682 their own bibliography (including the BibTeX bibliography itself), between
2684 \begin_inset Flex CharStyle:Code
2687 \begin_layout Plain Layout
2696 \begin_inset Flex CharStyle:Code
2699 \begin_layout Plain Layout
2707 (those commands have to be inserted as TeX code).
2708 The bibliography will contain all references which have been cited in the
2710 \begin_inset Flex CharStyle:Code
2713 \begin_layout Plain Layout
2724 If you are using this approach, then every citation reference has to be
2726 \begin_inset Flex CharStyle:Code
2729 \begin_layout Plain Layout
2737 \begin_inset Flex CharStyle:Code
2740 \begin_layout Plain Layout
2749 \begin_layout Section
2753 \begin_layout Subsection
2757 \begin_layout Standard
2758 When you are working on a large file with many sections, it is often convenient
2759 to break up the document into several files, or perhaps you have something
2760 where a table may change from time to time, but the preceding text does
2762 In these cases, you should seriously consider using multipart documents.
2763 For example, scientific papers often have five major sections: the introduction
2764 , observations, results, discussion, and conclusion.
2765 Each of these could be its own separate LyX file, with one
2766 \begin_inset Quotes eld
2770 \begin_inset Quotes erd
2773 file which contains the title, authors, abstract, references, etc., plus
2774 the five included files.
2775 It is important to note that each of these files is a full LyX file which
2776 can be formatted and printed on its own, as well as included in a master
2778 Each of these files must have the same document class, however—don't attempt
2779 to mix book classes with article classes.
2780 You may also include LaTeX files; however, these files must not have their
2782 \begin_inset space \thinspace{}
2786 \begin_inset space \space{}
2789 everything up to and including the
2790 \begin_inset Flex CharStyle:Code
2793 \begin_layout Plain Layout
2802 \begin_inset Flex CharStyle:Code
2805 \begin_layout Plain Layout
2813 line must be deleted) or else errors will be generated when you try to
2817 \begin_layout Standard
2818 LyX allows you to include files quite easily with
2819 \begin_inset Flex CharStyle:MenuItem
2822 \begin_layout Plain Layout
2823 Insert\SpecialChar \menuseparator
2825 \begin_inset space ~
2834 When you click on this selection a small box is inserted into the file
2835 at the current cursor location.
2836 Clicking on the box raises a dialog which allows you to select the file
2837 to be included, and the method of its inclusion.
2841 \begin_layout Standard
2842 The file selection box should by now be obvious.
2843 The three inclusion methods are
2844 \begin_inset Quotes eld
2848 \begin_inset Quotes erd
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2860 \begin_inset Quotes eld
2864 \begin_inset Quotes erd
2868 The difference between
2869 \begin_inset Quotes eld
2873 \begin_inset Quotes erd
2877 \begin_inset Quotes eld
2881 \begin_inset Quotes erd
2884 is really only meaningful to LaTeXperts, but the practical difference is
2885 that files which are
2886 \begin_inset Quotes eld
2890 \begin_inset Quotes erd
2893 are typeset beginning on a new page, while files which are
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2901 are typeset starting on the current page.
2904 \begin_layout Standard
2905 Generally, the master file is converted into a full LaTeX file before typesettin
2906 g, while the included files are converted to LaTeX files which do not have
2907 all the preamble information.
2910 \begin_layout Standard
2912 \begin_inset Quotes eld
2916 \begin_inset Quotes erd
2919 included file allows you to include a file typeset exactly as it appears
2921 \begin_inset space \thinspace{}
2925 \begin_inset space \space{}
2929 \begin_inset Flex CharStyle:Code
2932 \begin_layout Plain Layout
2938 mode, with the characters set in a fixed-width typewriter font.
2939 Normally, spaces in this file are invisible, though two consecutive spaces
2940 are conserved, unlike LyX's normal treatment of spaces.
2941 However, setting the
2942 \begin_inset Flex CharStyle:MenuItem
2945 \begin_layout Plain Layout
2947 \begin_inset space ~
2951 \begin_inset space ~
2955 \begin_inset space ~
2963 checkbox typesets a mark to unambiguously define the presence of a space.
2967 \begin_layout Subsection
2968 Cross-References Between Files
2971 \begin_layout Standard
2972 \begin_inset Box Shadowbox
2982 height_special "totalheight"
2985 \begin_layout Plain Layout
2986 This section is somewhat out of date.
2987 Need to describe default master documents and how children are opened when
2997 \begin_layout Standard
2998 It is possible to set up cross-references between the different files.
2999 First, open all the files in question: let's call them A and B in a two
3000 file example, where B is included in A.
3001 Let's say you insert a label in A, then want to reference it in B.
3002 Open the cross-reference dialog in whilst in document B, and you can select
3004 \begin_inset Quotes eld
3008 \begin_inset Quotes erd
3014 \begin_layout Subsection
3015 Bibliography Lists in all Subdocuments
3018 \begin_layout Standard
3019 \begin_inset Box Frameless
3029 height_special "totalheight"
3032 \begin_layout Plain Layout
3033 This section also needs updating.
3034 There is now material about this on the wiki, and it could be copied here.
3042 \begin_layout Standard
3043 Copy the bibliography list with all entries to all subdocuments and transform
3045 This way LyX will find the
3046 \begin_inset Flex CharStyle:Code
3049 \begin_layout Plain Layout
3055 -files and you can easily insert references without making the bibliography
3059 \begin_layout Standard
3060 As the bibliography list is in a comment, LaTeX won't use use it and the
3061 references will look like this: [?], instead of like this: [1].
3062 One solution is to use the LaTeX-package
3063 \begin_inset Flex CharStyle:Code
3066 \begin_layout Plain Layout
3072 that will only include comments by processing the files separately.
3073 To do this, add in the LaTeX preamble of every subdocument the following:
3076 \begin_layout LyX-Code
3082 \begin_layout LyX-Code
3085 includecomment{comment}
3088 \begin_layout Standard
3090 \begin_inset Flex URL
3093 \begin_layout Plain Layout
3095 http://wiki.lyx.org/FAQ/Unsorted#toc31
3103 \begin_layout Section
3104 Fancy Headers and Footers
3107 \begin_layout Standard
3108 The default page layout is rather plain; for an
3109 \begin_inset Flex CharStyle:Code
3112 \begin_layout Plain Layout
3118 document class, all you get is a centered page number at the bottom of
3120 This document uses KOMA-script's book class, so it appears to be a bit
3122 But to really put on a show, you need to set the document page style to
3124 \begin_inset Quotes eld
3128 \begin_inset Quotes erd
3131 , as mentioned in the
3136 This section describes the LaTeX code you need to insert in your LaTeX
3137 preamble in order to get the desired effects.
3140 \begin_layout Standard
3141 For more information on fancy headers, see the
3142 \begin_inset Flex CharStyle:Code
3145 \begin_layout Plain Layout
3151 package documentation.
3153 \begin_inset Flex URL
3156 \begin_layout Plain Layout
3158 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3166 \begin_layout Standard
3167 The page header is divided into three fields, not surprisingly labeled
3168 \begin_inset Quotes eld
3172 \begin_inset Quotes erd
3176 \begin_inset Quotes eld
3180 \begin_inset Quotes erd
3184 \begin_inset Quotes eld
3188 \begin_inset Quotes erd
3192 The footer is also divided into these three fields.
3193 The LaTeX commands to set these fields in the simplest manner are
3194 \begin_inset Flex CharStyle:Code
3197 \begin_layout Plain Layout
3206 \begin_inset Flex CharStyle:Code
3209 \begin_layout Plain Layout
3218 \begin_inset Flex CharStyle:Code
3221 \begin_layout Plain Layout
3230 \begin_inset Flex CharStyle:Code
3233 \begin_layout Plain Layout
3242 Suppose you wish to put your name in the upper left hand corner of each
3244 Simply insert the following command in the preamble:
3247 \begin_layout Standard
3256 \begin_layout Standard
3257 You will now see your name in the upper left.
3258 If a field has a default entry that you would like to get rid of (often
3259 the page number appears in the central footer, simply include a command
3260 with a blank argument, e.
3261 \begin_inset space \thinspace{}
3267 \begin_layout Standard
3275 \begin_layout Standard
3276 Let's get really fancy: lets put the section number with the word
3277 \begin_inset Quotes eld
3281 \begin_inset Quotes erd
3285 \begin_inset space \thinspace{}
3289 \begin_inset space \space{}
3292 Section 3) in the upper left, the page number (e.
3293 \begin_inset space \thinspace{}
3297 \begin_inset space \space{}
3300 Page 4) in the upper right, your name in the lower left, and the date in
3302 The following commands should now appear in the preamble:
3305 \begin_layout Standard
3315 \begin_layout Standard
3323 \begin_layout Standard
3333 \begin_layout Standard
3342 \begin_layout Standard
3350 \begin_layout Standard
3360 \begin_layout Standard
3362 \begin_inset Flex CharStyle:Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex CharStyle:Code
3377 \begin_layout Plain Layout
3385 access LaTeX's section and page counters, and so print out the current
3386 section and page numbers.
3388 \begin_inset Flex CharStyle:Code
3391 \begin_layout Plain Layout
3399 simply prints out today's date.
3402 \begin_layout Standard
3403 The thicknesses of the horizontal rules drawn beneath the header and above
3404 the footer can also be modified.
3405 If you don't want one of the rules, set its thickness to 0.
3406 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3412 \begin_inset Flex CharStyle:Code
3415 \begin_layout Plain Layout
3420 headrulewidth}{0.4pt}
3426 \begin_inset Flex CharStyle:Code
3429 \begin_layout Plain Layout
3434 footrulewidth}{0.4pt}
3439 to set the thicknesses.
3442 \begin_layout Standard
3443 You can switch the header/footer settings on and off for individual pages
3445 \begin_inset Flex CharStyle:Code
3448 \begin_layout Plain Layout
3451 thispagestyle{empty}
3457 \begin_inset Flex CharStyle:Code
3460 \begin_layout Plain Layout
3463 thispagestyle{plain}
3469 \begin_inset Flex CharStyle:Code
3472 \begin_layout Plain Layout
3475 thispagestyle{fancy}
3481 Simply insert them in the text on the page you want changed and mark them
3483 In fact, title pages are marked as plain by default, while following pages
3484 are marked fancy when using the global fancy setting.
3487 \begin_layout Standard
3488 As a final example, it is possible to include an image in the header or
3490 Suppose you want to put a company logo in the upper lefthand corner.
3491 You might try something like
3494 \begin_layout Standard
3503 includegraphics{logo.eps}}}
3506 \begin_layout Standard
3508 (you may need to preface this with
3509 \begin_inset Flex CharStyle:Code
3512 \begin_layout Plain Layout
3516 usepackage{graphics}
3521 if you don't include graphics elsewhere in your document).
3524 \begin_layout Section
3525 Itemize Bullet Selection
3526 \begin_inset CommandInset label
3535 \begin_layout Standard
3541 \begin_layout Subsection
3545 \begin_layout Standard
3546 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3547 Using this dialog you can easily specify what bullet shape to use at each
3548 level of an itemized list.
3549 These settings are document-wide so you won't be able to specify different
3550 sets of bullets for different paragraphs.
3554 \begin_layout Plain Layout
3555 Well, actually you can but you'll have to do it by hand.
3563 \begin_layout Subsection
3567 \begin_layout Standard
3568 Open the dialog by selecting the
3569 \begin_inset Flex CharStyle:MenuItem
3572 \begin_layout Plain Layout
3573 Document\SpecialChar \menuseparator
3579 menu item and then select the
3580 \begin_inset Flex CharStyle:MenuItem
3583 \begin_layout Plain Layout
3592 \begin_layout Standard
3593 The dialog provides you with a table of bullet shapes.
3594 A column of buttons on the left of the table provides access to the six
3595 different panels of bullet shapes.
3596 The row of buttons across the top is used to select which bullet depth
3598 A text entry under the table shows the currently selected bullet shape's
3599 LaTeX equivalent and this can be edited if desired.
3600 If you do modify the text you will also need to specify any needed packages
3601 in the LaTeX preamble.
3604 \begin_layout Standard
3605 The six panels are divided up by the packages they require.
3606 The following table shows the mappings from button name to LaTeX packages.
3609 \begin_layout Standard
3611 \begin_inset Tabular
3612 <lyxtabular version="3" rows="7" columns="2">
3613 <features tabularvalignment="middle">
3614 <column alignment="center" valignment="top" width="0pt">
3615 <column alignment="center" valignment="top" width="0pt">
3617 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3620 \begin_layout Plain Layout
3635 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3638 \begin_layout Plain Layout
3655 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3658 \begin_layout Plain Layout
3673 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3676 \begin_layout Plain Layout
3692 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3695 \begin_layout Plain Layout
3710 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3713 \begin_layout Plain Layout
3730 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3733 \begin_layout Plain Layout
3748 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3751 \begin_layout Plain Layout
3768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3771 \begin_layout Plain Layout
3786 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3789 \begin_layout Plain Layout
3806 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3809 \begin_layout Plain Layout
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3827 \begin_layout Plain Layout
3844 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3847 \begin_layout Plain Layout
3862 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3865 \begin_layout Plain Layout
3888 \begin_layout Standard
3889 LyX doesn't stop you using bullets from packages you don't have.
3890 If you get errors from LaTeX when you try to view or print the file, then
3891 it is likely you are missing a package.
3895 \begin_layout Plain Layout
3896 LyX doesn't restrict your use since you may be editing locally and exporting
3905 \begin_layout Subsection
3909 \begin_layout Standard
3910 Select which bullet depth you want to change then select the bullet shape
3912 Any changes will not be visible in LyX, but are visible when viewing the
3916 \begin_layout Standard
3917 You can reset a bullet shape to the default simply by clicking your right
3918 mouse button on the appropriate bullet depth button.
3922 \begin_layout Plain Layout
3927 want to have multiple sets of paragraphs with different sets of bullets
3928 in each, then you're going to have to get your hands dirty with TeX code.
3929 The bullet selection dialog can help though because it provides you with
3930 the LaTeX code for a wide range of bullet shapes.
3931 To make your own custom paragraphs you have the following options:
3934 \begin_layout Plain Layout
3938 \begin_layout Plain Layout
3954 \begin_layout Plain Layout
3958 \begin_layout Plain Layout
3980 \begin_layout Itemize
3981 Use the LaTeX command
3982 \begin_inset Flex CharStyle:Code
3985 \begin_layout Plain Layout
3993 to specify a new bullet shape for a given depth.
3994 You'll also need to save the current bullet shape so you can restore it
3996 In this itemized list the following LaTeX code was used to change the bullet
3997 used for the first depth.
4001 \begin_layout LyX-Code
4011 \begin_layout LyX-Code
4028 \begin_layout Itemize
4029 Note that the itemize depth is specified in Roman numerals as part of the
4039 \begin_layout Itemize
4043 \begin_layout Plain Layout
4056 Specify each individual entry by starting each item with the bullet shape
4057 enclosed in square brackets and set as
4058 \begin_inset Flex CharStyle:MenuItem
4061 \begin_layout Plain Layout
4068 For example, this item was started with
4069 \begin_inset Flex CharStyle:Code
4072 \begin_layout Plain Layout
4087 \begin_layout Plain Layout
4091 \begin_layout Plain Layout
4107 \begin_layout Plain Layout
4108 You'll also need to revert the labelitem back to its previous setting for
4109 the global bullet shape settings to remain in effect.
4110 The way used here was:
4113 \begin_layout LyX-Code
4128 \begin_layout Chapter
4129 LyX and the World Wide Web
4132 \begin_layout Standard
4133 LyX has long supported the export of documents to various web-friendly formats,
4135 Before verson 2.0, however, HTML export was always accomplished by the use
4136 of external converters.
4140 \begin_layout Plain Layout
4141 For details on the use of external converters with LyX, see the
4145 section of the Customization manual.
4150 These fall into two large groups: there are converters that use LaTeX as
4151 an intermediate format, such as
4152 \begin_inset Flex CharStyle:Code
4155 \begin_layout Plain Layout
4162 \begin_inset Flex CharStyle:Code
4165 \begin_layout Plain Layout
4172 \begin_inset Flex CharStyle:Code
4175 \begin_layout Plain Layout
4181 , relying upon LyX to produce the LaTeX; and there is a converter that works
4182 directly on LyX files,
4183 \begin_inset Flex CharStyle:Code
4186 \begin_layout Plain Layout
4193 All of these have different advantages and disadvantages.
4197 \begin_layout Standard
4198 The LaTeX-based converters have the advantage that, in principle, they know
4199 everything about the exported document that LaTeX does.
4200 Such converters do not care, for example, if a certain block of code was
4201 produced by LyX or was Evil Red Text.
4202 These converters know about
4203 \begin_inset Flex CharStyle:Code
4206 \begin_layout Plain Layout
4212 files, counters, and references, and can often make use of the
4213 \begin_inset Flex CharStyle:Code
4216 \begin_layout Plain Layout
4222 files generated by BibTeX.
4223 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4224 said that only TeX itself understands TeX---and LaTeX-based converters
4225 will often choke on what seem to be quite simple constructs; complex ones
4226 can throw them completely, and as of this writing, for example, the
4230 manual will not export with
4231 \begin_inset Flex CharStyle:Code
4234 \begin_layout Plain Layout
4240 , though the others will.
4241 The other issue concerns how math is handled.
4242 These converters typically convert the formulae into little pictures that
4243 are then linked from the HTML document.
4244 Since these are actually generated by LaTeX, they are accurate.
4245 But they do not scale well, and just getting them to look as if they are
4246 actually meant to be in your document---so that the font sizes seem to
4247 be roughly the same---can be a challenge.
4250 \begin_layout Standard
4252 \begin_inset Flex CharStyle:Code
4255 \begin_layout Plain Layout
4261 solves some of these problems.
4262 In particular, its rendering of math tends to look better than
4263 \begin_inset Flex CharStyle:Code
4266 \begin_layout Plain Layout
4272 's, at least in simpler cases, since it renders math using a combination
4273 of HTML and CSS rather than converting the formulae to images.
4274 But more complex formula tend to be rendered less well than with
4275 \begin_inset Flex CharStyle:Code
4278 \begin_layout Plain Layout
4284 , since there is no reasonable way of scaling parentheses in HTML, for example.
4285 More importantly (as of version 0.39, at least),
4286 \begin_inset Flex CharStyle:Code
4289 \begin_layout Plain Layout
4295 has no support for math macros, for user-defined paragraph or character
4296 styles, or for tables of contents and figures, and its treatment of cross-refer
4298 These limitations make
4299 \begin_inset Flex CharStyle:Code
4302 \begin_layout Plain Layout
4308 unsuitable for many of the documents more advanced LyX users would produce.
4309 In principle, of course, all of these problems could be solved, but the
4310 LyX developers have decided to follow a different path and have made LyX
4311 itself capable of writing XHTML, just as it is capable of writing LaTeX,
4312 DocBook, and plaintext.
4315 \begin_layout Standard
4316 As of this writing, XHTML output remains under development and should probably
4318 \begin_inset Quotes eld
4322 \begin_inset Quotes erd
4329 \begin_layout Plain Layout
4331 \begin_inset Flex CharStyle:Code
4334 \begin_layout Plain Layout
4335 development/HTML.notes
4340 , which can be found in the LyX source tree or
4341 \begin_inset CommandInset href
4343 name "accessed online"
4344 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4348 , usually contains up-to-date information about the state of XHTML output.
4353 Still, the developers have chosen this approach because it has several
4354 potential advantages over the other two.
4357 \begin_layout Standard
4358 These advantages are primarily due to the fact that the XHTML output routines,
4359 since they are part of LyX, know everything LyX knows about the document
4364 \begin_layout Plain Layout
4365 Another advantege is that, since these routines are internal to LyX, they
4366 are immune to changes in LyX's file format, or to changes in the semantics
4372 So they know about the table of contents (as displayed in the Outline),
4373 about the counters associated with different paragraph styles, and about
4374 user-defined styles.
4375 The XHTML output routines know what LyX knows about internationalization,
4376 too, so they will output
4377 \begin_inset Quotes eld
4381 \begin_inset Quotes erd
4385 \begin_inset Quotes eld
4393 \begin_inset Quotes erd
4396 , depending upon the language in effect at the time.
4400 \begin_layout Standard
4401 Quite generally, the output routines know everything LyX knows about document
4402 layout, that is, about how the document is to be rendered on screen.
4403 We use this information when we output the document as XHTML.
4408 generates CSS style information corresponding to the layout information
4409 it uses to render the document on screen: if section headings are supposed
4410 to be sans-serif and bold as seen in LyX, then (by default) they will be
4411 sans-serif and bold when viewed in a web browser, too.
4412 And this is true not just for pre-defined styles, like Section, but for
4413 any style, including user-defined styles.
4414 Indeed, the XHTML output routines make no distinction between user-defined
4415 paragraph and character styles and LyX's own pre-defined styles: in each
4416 case, everything LyX knows about the styles is contained in the layout
4418 And much the same is true as regards pre-defined textual insets, such as
4419 footnotes, and various custom insets.
4423 \begin_layout Standard
4424 The result is that XHTML output can be customized and extended in
4428 the same way LaTeX output can be customized and extended: through layout
4430 See chapter five of the
4434 manual for the details.
4437 \begin_layout Standard
4438 As for math, LyX offers four choices for how math is rendered.
4439 These have various advantages and disadvantages, so the user can select
4440 a preferred format under Document\SpecialChar \menuseparator
4441 Settings\SpecialChar \menuseparator
4445 \begin_layout Itemize
4447 \begin_inset Newline newline
4450 MathML is a dialect of XML designed specifically for mathematics on the
4451 web, and it typically renders very well in browsers that support it.
4452 The disadvantage is that not all browsers support MathML, and support is
4453 not complete even in the Gecko-based browsers, such as Firefox.
4454 \begin_inset Newline newline
4457 If Lyx is unable to render a formula as MathML---for example, if the formula
4459 \begin_inset Flex CharStyle:Code
4462 \begin_layout Plain Layout
4468 package or ERT---then it will instead output the formula as an image.
4472 \begin_layout Itemize
4474 \begin_inset Newline newline
4478 \begin_inset Flex CharStyle:Code
4481 \begin_layout Plain Layout
4487 outputs math as HTML, styled by CSS.
4491 \begin_layout Plain Layout
4492 LyX has borrowed some of the CSS for its HTML output from
4493 \begin_inset Flex CharStyle:Code
4496 \begin_layout Plain Layout
4507 For simple formulae, this can work quite well, though with more complicated
4508 formulae it tends to break down.
4509 Still, this method has the advantage that it is very widely supported and
4510 so it may be appropriate for documents that contain only a little, fairly
4512 \begin_inset Newline newline
4515 If Lyx is unable to render a formula as MathML---for example, if the formula
4517 \begin_inset Flex CharStyle:Code
4520 \begin_layout Plain Layout
4526 package or ERT---then it will instead output the formula as an image.
4530 \begin_layout Itemize
4532 \begin_inset Newline newline
4536 \begin_inset Flex CharStyle:Code
4539 \begin_layout Plain Layout
4545 , LyX will output formulae as images, the very same images, in fact, that
4546 are used for instant preview.
4550 \begin_layout Plain Layout
4551 Instant preview does
4555 have to be on for images to be output, however.
4560 The advantage to this method is that the images are simply generated by
4561 LaTeX, so they are very accurate.
4562 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4563 so they do not scale terribly well, and one cannot copy them, etc.
4564 \begin_inset Newline newline
4567 If LyX for some reason fails to create an image for a formula (e.g., if a
4568 required LaTeX package is not installed), then it will fall back to outputing
4572 \begin_layout Itemize
4574 \begin_inset Newline newline
4577 Finally, LyX will happily output math as LaTeX.
4578 As well as being the output of last resort, this method can be used with
4580 \begin_inset CommandInset href
4583 target "http://www.math.union.edu/~dpvc/jsMath/"
4587 , which uses JavaScript to render LaTeX embedded in HTML documents.
4588 LyX wraps the LaTeX in either a
4589 \begin_inset Flex CharStyle:Code
4592 \begin_layout Plain Layout
4598 (for inline formulas) or
4599 \begin_inset Flex CharStyle:Code
4602 \begin_layout Plain Layout
4608 (for displayed formulas) with
4609 \begin_inset Flex CharStyle:Code
4612 \begin_layout Plain Layout
4618 , as is required for jsMath.
4621 \begin_layout Standard
4622 Again, one of these output methods must be selected under Document\SpecialChar \menuseparator
4623 Settings\SpecialChar \menuseparator
4625 By default, LyX outputs MathML.
4626 This is a document-wide setting, therefore.
4629 \begin_layout Standard
4630 Eventually, LyX will offer the user the option to select an alternate output
4631 method for a particular inset, say, one that isn't being rendered very
4633 But this is not yet supported.
4637 \begin_layout Plain Layout
4638 That said, since LyX falls back to images if the inset contains ERT, then
4639 one can force output as an image by putting some harmless ERT into the
4641 \begin_inset Formula $a=b\relax$
4652 \begin_layout Standard
4653 The remainder of this chapter contains more detailed information on XHTML
4654 output, its limitations, and ways around those limitations.
4657 \begin_layout Standard
4658 \begin_inset Note Note
4661 \begin_layout Plain Layout
4662 This is very incomplete at this point!
4670 \begin_layout Section
4671 Bibliography and Citations
4674 \begin_layout Standard
4675 XHTML output fully supports bibliographies and citations.
4679 \begin_layout Standard
4680 Citation labels are generated by the same machinery that generates LyX's
4681 on-screen labels, so the labels will look in the output much as they do
4682 in LyX, though better.
4683 If you are using numerical citations, then LyX will output numerical labels,
4684 such as [1] or [17], rather than simply showing the citation key in square
4685 brackets, as it does on-screen.
4686 If you are using author-year citations, then LyX will add lowercase letters
4687 to the years, just as BibTeX does, if it finds more than one citation for
4688 a given author-year combination.
4689 The labels will be printed with the bibliography entries.
4690 Note that there is, at present, no way to customize the appearance of the
4691 labels, for example, to choose between square brackets and parentheses.
4694 \begin_layout Standard
4695 Bibliography output is handled by the same machinery that handles the presentati
4696 on of reference information in the citation dialog, so you will see in the
4697 XHTML output pretty much what you would see if you were to look at a given
4698 entry in the citation dialog.
4699 The formatting can be customized in your layout file or, preferably, in
4705 manual for the details.
4708 \begin_layout Standard
4709 The main defect at present is that cross-referenced information is printed
4710 with every entry with which it is associated.
4711 So you can see things like this:
4716 \begin_inset Quotes eld
4719 Context and Logical Form
4720 \begin_inset Quotes erd
4725 Language in Context: Selected Essays
4727 (Oxford: Oxford University Press, 2007), pp.
4733 \begin_inset Quotes eld
4736 Semantics in Context
4737 \begin_inset Quotes erd
4742 Language in Context: Selected Essays
4744 (Oxford: Oxford University Press, 2007), pp.
4748 \begin_layout Standard
4749 This should be fixed before long.
4752 \begin_layout Standard
4753 There is no support at present for sectioned bibliographies.
4754 If you have multiple bibliographies, then LyX will print the same bibliography
4758 \begin_layout Section
4762 \begin_layout Standard
4763 LyX will happily export indexes as XHTML, but with certain limitations at
4767 \begin_layout Standard
4768 Index export will be most reliable when you do not attempt to use the fancy
4769 constructs that are described in the section on indexes in the
4777 \begin_layout Plain Layout
4778 The main issue here is that LyX itself does not really handle these.
4779 It just lets you enter what you would have to enter in raw LaTeX.
4784 We'll describe how they are handled using the subsection headings from
4788 \begin_layout Itemize
4789 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4790 these, but the entries must be separated by
4791 \begin_inset Quotes eld
4795 \begin_inset Quotes erd
4798 , that is, there must be spaces around the exclamation point.
4799 This is because it is otherwise too difficult to check for escaped exclamation
4800 points, ones in math, and so forth.
4803 \begin_layout Itemize
4804 Page Ranges: There is no support at all for page ranges, since these make
4805 no sense with XHMTL.
4806 Instead, you will just get two index entries, one at either end.
4809 \begin_layout Itemize
4810 Cross-referencing: There is no support for cross-referencing.
4811 If LyX finds an entry containing the
4812 \begin_inset Quotes eld
4815 |see\SpecialChar \ldots{}
4817 \begin_inset Quotes erd
4820 construct, it is just dropped, and the rest is treated as an ordinary index
4824 \begin_layout Itemize
4825 Index Entry Order: LyX does support attempts to fix the sorting order.
4826 It will take what is before the first `@' it finds and use that for sorting,
4827 taking what follows the first `@' to be the actual entry.
4828 At present, LyX does not check for escaped `@', so do not try to index
4832 \begin_layout Itemize
4833 Index Entry Layout: You can format entries by using the text style dialog,
4834 or by using any other method available within LyX itself.
4835 There is no support for constructs like:
4836 \begin_inset Quotes eld
4840 \begin_inset Quotes erd
4844 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4845 and everything that follows it.
4848 \begin_layout Itemize
4849 Multiple Indexes: There is no support for multiple indexes.
4850 Rather, all index entries will be printed as one large index.
4851 To avoid our printing several versions of the index, we print only the
4852 main index, so make sure you have one.
4855 \begin_layout Section
4856 Nomenclature and Glossary
4859 \begin_layout Standard
4860 There is at present no support for glossaries.
4863 \begin_layout Chapter
4867 \begin_layout Section
4871 \begin_layout Standard
4872 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4873 and retrieve information about the LyX internal state.
4874 This is only intended for advanced users, but they should find it useful.
4875 It is by writing to the LyX server, for example, that bibliography managers,
4876 such as JabRef, are able to
4877 \begin_inset Quotes eld
4881 \begin_inset Quotes erd
4887 \begin_layout Section
4888 Starting the LyX Server
4891 \begin_layout Standard
4892 The LyX server works through the use of a pair of named pipes.
4893 These are usually located in
4894 \begin_inset Flex CharStyle:Code
4897 \begin_layout Plain Layout
4903 , (except on Windows, where
4907 named pipes are special objects located in
4908 \begin_inset Flex CharStyle:Code
4911 \begin_layout Plain Layout
4923 ) and have the names
4924 \begin_inset Quotes eld
4928 \begin_inset Flex CharStyle:Code
4931 \begin_layout Plain Layout
4938 \begin_inset Quotes erd
4942 \begin_inset Quotes eld
4946 \begin_inset Flex CharStyle:Code
4949 \begin_layout Plain Layout
4956 \begin_inset Quotes erd
4960 External programs write into
4961 \begin_inset Flex CharStyle:Code
4964 \begin_layout Plain Layout
4970 and read back data from
4971 \begin_inset Flex CharStyle:Code
4974 \begin_layout Plain Layout
4981 The stem of the pipe names can be defined in the
4982 \begin_inset Flex CharStyle:MenuItem
4985 \begin_layout Plain Layout
4986 Tools\SpecialChar \menuseparator
4993 \begin_inset Flex CharStyle:Code
4996 \begin_layout Plain Layout
4997 "/home/myhome/lyxpipe"
5003 \begin_inset Flex CharStyle:Code
5006 \begin_layout Plain Layout
5025 configure this manually in order for the server to start.
5028 \begin_layout Standard
5030 \begin_inset Flex CharStyle:Code
5033 \begin_layout Plain Layout
5040 \begin_inset Flex CharStyle:Code
5043 \begin_layout Plain Layout
5049 ' to create the pipes.
5050 If one of the pipes already exists, LyX will assume that another LyX process
5051 is already running and will not start the server.
5052 On POSIX (Unix like) systems, if for some other reason, an unused
5053 \begin_inset Quotes eld
5057 \begin_inset Quotes erd
5060 pipe is left in existence when LyX closes, then LyX will try to delete
5062 If this fails for some reason, you will need to delete the pipes manually
5063 and then restart LyX.
5064 On Windows, pipes are deleted by the OS on program termination or crash,
5066 \begin_inset Quotes eld
5070 \begin_inset Quotes erd
5073 pipes should not be possible.
5076 \begin_layout Standard
5077 To have several LyX processes with servers at the same time, you have to
5078 use different configurations, perhaps by using separate user directories,
5080 \begin_inset Flex CharStyle:Code
5083 \begin_layout Plain Layout
5089 file, for each process.
5092 \begin_layout Standard
5093 If you are developing a client program, you might find it useful to enable
5094 debugging information from the LyX server.
5095 Do this by starting LyX as
5096 \begin_inset Flex CharStyle:Code
5099 \begin_layout Plain Layout
5108 \begin_layout Standard
5109 You can find a complete example client written in C in the source distribution
5111 \begin_inset Flex CharStyle:Code
5114 \begin_layout Plain Layout
5115 development/lyxserver/server_monitor.c
5123 \begin_layout Standard
5124 Another useful tool is command-line based client you will find in
5125 \begin_inset Flex CharStyle:Code
5128 \begin_layout Plain Layout
5129 src/client/lyxclient
5137 \begin_layout Section
5138 Normal communication
5141 \begin_layout Standard
5142 To issue a LyX call, the client writes a line of ASCII text into the input
5144 This line has the following format:
5161 \begin_layout Description
5162 clientname is a name that the client can choose arbitrarily.
5163 Its only use is that LyX will echo it if it sends an answer—so a client
5164 can dispatch results from different requesters.
5167 \begin_layout Description
5168 function is the function you want LyX to perform.
5169 It is the same as the commands you'd use in the minibuffer.
5172 \begin_layout Description
5173 argument is an optional argument which is meaningful only to some functions
5175 \begin_inset Quotes eld
5179 \begin_inset Quotes erd
5182 LFUN will insert the argument as text at the cursor position).
5185 \begin_layout Standard
5186 The answer from LyX will arrive in the output pipe and be of the form
5203 \begin_layout Standard
5212 are just echoed from the command request, while
5216 is more or less useful information filled according to how the command
5217 execution worked out.
5218 Some commands, such as
5219 \begin_inset Quotes eld
5223 \begin_inset Quotes erd
5226 , will return information about the internal state of LyX, while other will
5227 return an empty data-response.
5228 This means that the command execution went fine.
5231 \begin_layout Standard
5232 In case of errors, the response from LyX will have this form
5249 \begin_layout Standard
5254 should contain an explanation of why the command failed.
5257 \begin_layout Standard
5261 \begin_layout LyX-Code
5262 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5263 \begin_inset Newline newline
5266 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5267 \begin_inset Newline newline
5270 read a <~/.lyxpipe.out
5271 \begin_inset Newline newline
5277 \begin_layout Section
5281 \begin_layout Standard
5282 LyX can notify clients of events going on asynchronously.
5283 Currently it will only do this if the user binds a key sequence with the
5285 \begin_inset Quotes eld
5289 \begin_inset Quotes erd
5293 The format of the string LyX sends is as follows:
5297 \begin_inset Flex CharStyle:Code
5300 \begin_layout Plain Layout
5311 \begin_layout Standard
5316 is the printed representation of the key sequence that was actually typed
5320 \begin_layout Standard
5321 This mechanism can be used to extend LyX's command set and implement macros.
5322 Bind some key sequence to
5323 \begin_inset Quotes eld
5327 \begin_inset Quotes erd
5331 Then start a client that listens on the output pipe, dispatches the command
5332 according to the sequence, and starts a function that may use LyX calls
5333 and LyX requests to issue a command or a series of commands to LyX.
5336 \begin_layout Section
5337 The simple LyX Server Protocol
5340 \begin_layout Standard
5341 LyX implements a simple protocol that can be used for session management.
5342 All messages are of the form
5355 \begin_layout Standard
5361 \begin_inset Quotes eld
5365 \begin_inset Quotes erd
5369 \begin_inset Quotes eld
5373 \begin_inset Quotes erd
5378 \begin_inset Quotes eld
5382 \begin_inset Quotes erd
5385 is received from a client, LyX will report back to inform the client that
5386 it's listening to it's messages, while
5387 \begin_inset Quotes eld
5391 \begin_inset Quotes erd
5394 sent from LyX will inform clients that LyX is closing.
5397 \begin_layout Section
5398 Reverse DVI/PDF search
5401 \begin_layout Standard
5402 Some DVI/PDF viewers
5406 \begin_layout Plain Layout
5407 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5408 Skim on Mac OSX and SumatraPDF on Windows.
5417 facility (also called
5422 This means that you can tell LyX to put the cursor to a specific line in
5423 the document by clicking at the respective position in the DVI/PDF output.
5424 To achieve this, the viewer must be able to communicate with LyX.
5425 This is done via the LyX server either by using the named pipe (
5429 ), or the UNIX domain socket (
5433 ) that LyX creates in its temporary directory (this is the way the
5434 \begin_inset Flex CharStyle:Code
5437 \begin_layout Plain Layout
5443 program communicates with LyX).
5444 In some cases, you need a helper script that mediates between the viewer
5445 and LyX, in others, the viewer can communicate with LyX directly.
5446 This depends on the selected viewer and on your operating system.
5447 The same applies to the way viewers need to be configured and the way the
5448 reverse search is actually performed.
5449 In what follows, we will thus describe how to setup reverse search for
5451 Before we turn to this, though, we will explain what needs to be done generally
5452 to enable reverse search in the DVI/PDF output.
5455 \begin_layout Subsection
5457 \change_inserted 2 1274788899
5458 \begin_inset CommandInset label
5460 name "sub:rev-search"
5464 Automatical enabling
5467 \begin_layout Standard
5469 \change_inserted 2 1274789582
5470 In most cases LyX will do the work for you by enabling
5471 \begin_inset Flex CharStyle:MenuItem
5474 \begin_layout Plain Layout
5476 \change_inserted 2 1274789026
5477 Document\SpecialChar \menuseparator
5478 Output\SpecialChar \menuseparator
5485 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5486 srcltx package (for DVI) respectively.
5487 This option can be easily reached also on
5488 \begin_inset Flex CharStyle:Code
5491 \begin_layout Plain Layout
5493 \change_inserted 2 1274789582
5504 \begin_layout Standard
5506 \change_inserted 2 1274789534
5507 Plase note that including
5508 \begin_inset Flex CharStyle:Code
5511 \begin_layout Plain Layout
5513 \change_inserted 2 1274789498
5522 \begin_inset Flex CharStyle:Code
5525 \begin_layout Plain Layout
5527 \change_inserted 2 1274789484
5535 sometimes have an impact on the typeset and you should switch them off
5536 for the final typesets.
5541 \begin_layout Standard
5543 \change_inserted 2 1274789340
5544 You can also define custom macro in preferences and in case you need some
5545 special tweaks read the next section about manual enabling.
5551 \begin_layout Subsection
5553 \change_inserted 2 1274788680
5559 \begin_layout Standard
5560 LaTeX provides several different methods for reverse search.
5561 Some are built-in in the
5562 \begin_inset Flex CharStyle:Code
5565 \begin_layout Plain Layout
5571 program, some are provided by external packages.
5572 Your choice depends on whether your LaTeX distribution already provides
5573 a given method (the built-in methods are rather new) and whether your viewer
5575 The available methods are described in the following.
5576 \change_inserted 2 1274788557
5580 \begin_layout Subsubsection*
5581 Built-in DVI-search via src-specials (DVI only)
5584 \begin_layout Standard
5585 This method provides the DVI file with the necessary information for reverse
5587 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5588 distribution should include it), and it works reliably.
5589 To enable it, change the
5590 \begin_inset Flex CharStyle:MenuItem
5593 \begin_layout Plain Layout
5598 \begin_layout Plain Layout
5611 \begin_inset Flex CharStyle:MenuItem
5614 \begin_layout Plain Layout
5619 \begin_layout Plain Layout
5626 eX (plain)->DraftDVI
5632 \begin_inset Flex CharStyle:MenuItem
5635 \begin_layout Plain Layout
5636 Preferences\SpecialChar \menuseparator
5637 File Handling\SpecialChar \menuseparator
5644 \begin_inset Flex CharStyle:Code
5647 \begin_layout Plain Layout
5648 latex -src-specials $$i
5654 If this doesn't work, check if your TeX engine needs different options
5655 (the syntax might differ in some distributions).
5658 \begin_layout Subsubsection*
5659 External Packages (PDFSync and scrltx)
5662 \begin_layout Standard
5671 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5673 In order to enable it, load the packages in the LyX preamble:
5676 \begin_layout Itemize
5677 \begin_inset Flex CharStyle:Code
5680 \begin_layout Plain Layout
5688 for reverse PDF search,
5691 \begin_layout Itemize
5693 \begin_inset Flex CharStyle:Code
5696 \begin_layout Plain Layout
5699 usepackage[active]{srcltx}
5704 for reverse DVI search.
5707 \begin_layout Standard
5708 If you want to be able to perform both DVI and PDF reverse searches, you
5709 can also insert in the preamble the following lines
5712 \begin_layout LyX-Code
5716 \begin_inset Newline newline
5722 \begin_inset Newline newline
5728 \begin_inset Newline newline
5734 \begin_inset Newline newline
5739 usepackage[active]{srcltx}
5740 \begin_inset Newline newline
5748 \begin_layout Standard
5749 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5750 right package will be used.
5753 \begin_layout Standard
5754 Note that PDFSync might affect the output layout of your document.
5755 It is therefore advised to disable PDFsync for final documents.
5758 \begin_layout Subsubsection*
5759 Built-in reverse search via SyncTeX (DVI and PDF)
5762 \begin_layout Standard
5764 \begin_inset Flex CharStyle:Code
5767 \begin_layout Plain Layout
5773 have built-in support for both PDF and DVI reverse search.
5778 facility is basically the result of the integration of the PDFSync package
5779 to the pdftex program and its merge with the
5784 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5786 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5787 already provide SyncTeX support.
5790 \begin_layout Standard
5791 To enable SyncTeX for DVI output, change the
5792 \begin_inset Flex CharStyle:MenuItem
5795 \begin_layout Plain Layout
5800 \begin_layout Plain Layout
5813 \begin_inset Flex CharStyle:MenuItem
5816 \begin_layout Plain Layout
5821 \begin_layout Plain Layout
5828 eX (plain) -> DraftDVI
5834 \begin_inset Flex CharStyle:MenuItem
5837 \begin_layout Plain Layout
5838 Preferences\SpecialChar \menuseparator
5839 File Handling\SpecialChar \menuseparator
5846 \begin_inset Flex CharStyle:Code
5849 \begin_layout Plain Layout
5850 latex -synctex=1 $$i
5855 , and for PDF output, change the
5856 \begin_inset Flex CharStyle:MenuItem
5859 \begin_layout Plain Layout
5864 \begin_layout Plain Layout
5871 eX (pdflatex) -> PDF (pdflatex)
5877 \begin_inset Flex CharStyle:Code
5880 \begin_layout Plain Layout
5881 pdflatex -synctex=1 $$i
5887 Check the documentation of your viewer whether the viewer needs to be configure
5888 d for the use with SyncTeX.
5892 \begin_layout Plain Layout
5894 \begin_inset Flex CharStyle:Code
5897 \begin_layout Plain Layout
5903 option enables gzip compression.
5904 If your viewer does not support it, you should instead use
5905 \begin_inset Flex CharStyle:Code
5908 \begin_layout Plain Layout
5922 \begin_layout Subsection
5923 Configuring and using specific viewers
5926 \begin_layout Subsubsection*
5927 Xdvi (all platforms)
5930 \begin_layout Standard
5932 \begin_inset Flex CharStyle:Code
5935 \begin_layout Plain Layout
5941 , you don't need to do anything else for performing a reverse DVI search,
5942 as LyX already provides the necessary hooks for automatically using the
5944 \begin_inset Flex CharStyle:Code
5947 \begin_layout Plain Layout
5954 Just setup your document as described above (reverse search is triggered
5955 by Ctrl-click or Alt-click on Mac OSX, respectively).
5958 \begin_layout Standard
5959 However, if for whatever reason you want to use the named pipe instead of
5960 the socket for communicating with LyX, simply change the DVI viewer in
5962 \begin_inset Flex CharStyle:MenuItem
5965 \begin_layout Plain Layout
5966 Preferences\SpecialChar \menuseparator
5967 File Handling\SpecialChar \menuseparator
5977 \begin_layout Plain Layout
5978 On Mac OSX you have to use
5979 \begin_inset Flex CharStyle:Code
5982 \begin_layout Plain Layout
5983 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5994 \begin_inset Flex CharStyle:Code
5997 \begin_layout Plain Layout
5998 xdvi -editor 'lyxeditor.sh %f %l'
6004 \begin_inset Flex CharStyle:Code
6007 \begin_layout Plain Layout
6013 is a suitable script.
6014 For example, a minimal shell script is the following one:
6017 \begin_layout LyX-Code
6019 \begin_inset Newline newline
6022 LYXPIPE="/path/to/lyxpipe"
6023 \begin_inset Newline newline
6026 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6027 \begin_inset Newline newline
6030 echo "$COMMAND" > "${LYXPIPE}".in || exit
6031 \begin_inset Newline newline
6034 read < "${LYXPIPE}".out || exit
6037 \begin_layout Standard
6039 \begin_inset Flex CharStyle:Code
6042 \begin_layout Plain Layout
6052 \begin_layout Plain Layout
6059 XServer pipe path specified in
6060 \begin_inset Flex CharStyle:MenuItem
6063 \begin_layout Plain Layout
6064 Preferences\SpecialChar \menuseparator
6074 \begin_layout Plain Layout
6076 \begin_inset Flex CharStyle:Code
6079 \begin_layout Plain Layout
6085 folder of a source distribution you can find a
6086 \begin_inset Flex CharStyle:Code
6089 \begin_layout Plain Layout
6095 script which is able to locate the
6099 based on your preferences.
6107 \begin_layout Subsubsection*
6111 \begin_layout Standard
6113 \begin_inset Flex CharStyle:Code
6116 \begin_layout Plain Layout
6117 /Applications/MacDviX_Folder/calleditor.script
6122 , add the following lines:
6125 \begin_layout LyX-Code
6130 \begin_layout Plain Layout
6137 X.app/Contents/MacOS/lyxeditor "$2" $1
6138 \begin_inset Newline newline
6144 \begin_layout Standard
6145 Modify the lines accordingly if you install LyX somewhere else than in the
6146 Applications folder.
6149 \begin_layout Standard
6150 Reverse search is triggered by Alt-click (OPTION-click).
6153 \begin_layout Subsubsection*
6157 \begin_layout Standard
6159 \begin_inset Flex CharStyle:Code
6162 \begin_layout Plain Layout
6163 open -a Skim.app $$i
6168 to the viewer setting in
6169 \begin_inset Flex CharStyle:MenuItem
6172 \begin_layout Plain Layout
6173 Preferences\SpecialChar \menuseparator
6174 File Handling\SpecialChar \menuseparator
6175 File formats\SpecialChar \menuseparator
6182 \begin_inset Flex CharStyle:MenuItem
6185 \begin_layout Plain Layout
6186 Skim\SpecialChar \menuseparator
6187 Preferences\SpecialChar \menuseparator
6197 \begin_layout Plain Layout
6207 \begin_layout Standard
6208 Reverse search is triggered by COMMAND-SHIFT-click
6211 \begin_layout Subsubsection*
6215 \begin_layout Standard
6217 \begin_inset Flex CharStyle:MenuItem
6220 \begin_layout Plain Layout
6221 Settings\SpecialChar \menuseparator
6222 Configure Okular\SpecialChar \ldots{}
6223 \SpecialChar \menuseparator
6230 \begin_inset Quotes eld
6234 \begin_inset Quotes erd
6238 \begin_inset Flex CharStyle:Code
6241 \begin_layout Plain Layout
6250 \begin_layout Standard
6251 Reverse search is triggered by SHIFT-click.
6254 \begin_layout Subsubsection*
6258 \begin_layout Standard
6259 Launch yap, choose its
6260 \begin_inset Flex CharStyle:MenuItem
6263 \begin_layout Plain Layout
6264 View\SpecialChar \menuseparator
6271 \begin_inset Quotes eld
6275 \begin_inset Quotes erd
6280 \begin_inset Quotes eld
6283 New\SpecialChar \ldots{}
6285 \begin_inset Quotes erd
6288 button and, in the window that opens, enter
6289 \begin_inset Quotes eld
6293 \begin_inset Quotes erd
6296 (or any other name you like) in the
6297 \begin_inset Quotes eld
6301 \begin_inset Quotes erd
6305 Now click on the button labeled
6306 \begin_inset Quotes eld
6309 \SpecialChar \ldots{}
6311 \begin_inset Quotes erd
6314 to open a file dialog and navigate to the directory containing the batch
6316 \begin_inset Flex CharStyle:Code
6319 \begin_layout Plain Layout
6327 \begin_inset Flex CharStyle:Code
6330 \begin_layout Plain Layout
6336 and then specify the program arguments as
6337 \begin_inset Flex CharStyle:Code
6340 \begin_layout Plain Layout
6348 \begin_inset Flex CharStyle:Code
6351 \begin_layout Plain Layout
6357 wrapper is used for communicating with LyX through the
6364 \begin_layout LyX-Code
6366 \begin_inset Newline newline
6369 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6378 \begin_inset Newline newline
6392 \begin_layout Standard
6393 Make sure that the LyXServer pipe path you specified in LyX is
6394 \begin_inset Flex CharStyle:Code
6397 \begin_layout Plain Layout
6411 , otherwise change the
6412 \begin_inset Flex CharStyle:Code
6415 \begin_layout Plain Layout
6421 wrapper accordingly.
6424 \begin_layout Standard
6425 In yap, reverse search is triggered by double-click.
6428 \begin_layout Subsubsection*
6429 SumatraPDF (Windows)
6432 \begin_layout Standard
6433 In order to use SumatraPDF for inverse search, enter
6434 \begin_inset Flex CharStyle:Code
6437 \begin_layout Plain Layout
6438 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6443 in the viewer setting in
6444 \begin_inset Flex CharStyle:MenuItem
6447 \begin_layout Plain Layout
6448 Preferences\SpecialChar \menuseparator
6449 File Handling\SpecialChar \menuseparator
6450 File formats\SpecialChar \menuseparator
6457 \begin_inset Flex CharStyle:Code
6460 \begin_layout Plain Layout
6466 is the previous wrapper.
6467 If SumatraPDF.exe is not in your command PATH, use its full file name.
6470 \begin_layout Standard
6471 Reverse search is triggered by double-click.
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6479 First of all, make sure that yap is your default DVI viewer in the Windows
6480 environment, then launch it, choose its
6481 \begin_inset Flex CharStyle:MenuItem
6484 \begin_layout Plain Layout
6485 View\SpecialChar \menuseparator
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6501 \begin_inset Quotes eld
6504 New\SpecialChar \ldots{}
6506 \begin_inset Quotes erd
6509 button and, in the window that opens, enter
6510 \begin_inset Quotes eld
6514 \begin_inset Quotes erd
6517 (or any other name you like) in the
6518 \begin_inset Quotes eld
6522 \begin_inset Quotes erd
6526 Now click on the button labeled
6527 \begin_inset Quotes eld
6530 \SpecialChar \ldots{}
6532 \begin_inset Quotes erd
6535 to open a file dialog and navigate to the directory containing the
6536 \begin_inset Flex CharStyle:Code
6539 \begin_layout Plain Layout
6545 program (which is installed by default on Cygwin along with the LyX executable).
6547 \begin_inset Flex CharStyle:Code
6550 \begin_layout Plain Layout
6556 and then specify the program arguments as
6557 \begin_inset Flex CharStyle:Code
6560 \begin_layout Plain Layout
6567 In this way, you will be using the
6571 for communicating with LyX.
6572 If, for whatever reason, you want to use the
6577 \begin_inset Flex CharStyle:Code
6580 \begin_layout Plain Layout
6586 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6589 \begin_layout Standard
6590 In yap, reverse search is triggered by double-click.
6593 \begin_layout Subsubsection*
6597 \begin_layout Standard
6598 In order to use SumatraPDF for inverse search, enter
6599 \begin_inset Flex CharStyle:Code
6602 \begin_layout Plain Layout
6608 in the viewer setting in
6609 \begin_inset Flex CharStyle:MenuItem
6612 \begin_layout Plain Layout
6613 Preferences\SpecialChar \menuseparator
6614 File Handling\SpecialChar \menuseparator
6615 File formats\SpecialChar \menuseparator
6622 \begin_inset Flex CharStyle:Code
6625 \begin_layout Plain Layout
6631 is the following script (to be placed in your command PATH,
6632 \begin_inset Flex CharStyle:Code
6635 \begin_layout Plain Layout
6641 being the best choice):
6644 \begin_layout LyX-Code
6646 \begin_inset Newline newline
6650 \begin_inset Newline newline
6653 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6656 \begin_layout Standard
6657 This wrapper script is needed because SumatraPDF is a native Windows application
6658 and does not understand the posix paths used by the Cygwin version of LyX.
6659 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6662 \begin_inset Flex CharStyle:Code
6665 \begin_layout Plain Layout
6671 enables communication via the
6677 \begin_inset Flex CharStyle:Code
6680 \begin_layout Plain Layout
6686 option if you want to use the
6690 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6693 \begin_layout Standard
6694 Reverse search is triggered by double-click.
6695 \change_inserted 1 1271453423
6699 \begin_layout Section
6701 \change_inserted 1 1271453442
6705 \begin_layout Standard
6707 \change_inserted 1 1271454338
6708 To make forward search possible you need to provide generated output PDF/DVI
6709 file with additional information about TeX sources.
6710 This can be done via the methods described in the section
6711 \begin_inset CommandInset ref
6713 reference "sub:rev-search"
6720 \begin_layout Standard
6722 \change_inserted 1 1271454479
6723 Secondly you need to configure LyX for using your viewers in
6724 \begin_inset Flex CharStyle:MenuItem
6727 \begin_layout Plain Layout
6729 \change_inserted 1 1271453866
6730 Preferences\SpecialChar \menuseparator
6731 Output\SpecialChar \menuseparator
6738 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6743 \begin_layout Plain Layout
6745 \change_inserted 1 1271454273
6746 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6755 Some other viewers allow at least reloading and positioning to particular
6756 page of the file --- Evince or xpdf --- for these cases you can use external
6758 Please study the prepared examples in the Preferences dialog.
6763 \begin_layout Chapter
6764 Special Document Classes
6767 \begin_layout Section
6771 \begin_layout Standard
6777 \begin_layout Subsection
6781 \begin_layout Standard
6782 This section describes how LyX can be used to write articles for submission
6783 to the scientific journal
6785 Astronomy and Astrophysics
6787 (www.edpsciences.fr/aa/
6788 \begin_inset Flex URL
6791 \begin_layout Plain Layout
6793 http://www.edpsciences.fr/aa/
6798 ) using Version 5.01 of the document class
6803 This package can be downloaded from the ftp site
6806 \begin_layout Standard
6807 \begin_inset VSpace medskip
6813 \begin_layout Standard
6815 \begin_inset Flex URL
6818 \begin_layout Plain Layout
6820 ftp://ftp.edpsciences.org/pub/aa/readme.html
6828 \begin_layout Standard
6829 \begin_inset VSpace medskip
6835 \begin_layout Standard
6836 A manual comes together with that package, and this text is not meant to
6837 replace the original manual but merely a short guide how to realize the
6838 correct form of your paper.
6842 \begin_layout Standard
6843 Please note that the publisher of the journal was changed from Springer
6844 to EDP Sciences starting January 1, 2001.
6845 That change implicated also some slight changes of the style files, namely
6846 the removal of the thesaurus command.
6847 The LyX class aa supports the newest version of these style files, V 5.01.
6848 If you have an older version installed, please upgrade.
6849 For compatibility, the old (version 4) layout has been kept as
6854 Please refer to the comments in
6856 LyXDir/layouts/aapaper.layout
6861 \begin_layout Subsection
6865 \begin_layout Standard
6866 It is recommended you start from the example template distributed with LyX.
6867 If you are not using a template, note the following settings:
6870 \begin_layout Itemize
6877 Document\SpecialChar \menuseparator
6880 dialog (OK, that one was obvious).
6883 \begin_layout Itemize
6884 Don't change the option
6887 \begin_inset space ~
6897 The whole layout is done by the macros, you shouldn't change anything.
6900 \begin_layout Subsection
6904 \begin_layout Standard
6905 First thing to enter is the header information.
6906 It consists of seven entries, of which some are optional.
6910 \begin_layout Itemize
6918 \begin_layout Itemize
6926 \begin_layout Itemize
6934 \begin_layout Itemize
6942 \begin_layout Itemize
6947 : [optional] if more than one author: whom to contact for offprint requests.
6950 \begin_layout Itemize
6955 : [optional] mail address for contacts.
6958 \begin_layout Itemize
6966 Received: <date>; Accepted <date>
6969 \begin_layout Standard
6970 There is no need to issue the
6976 command, this is done automatically by LyX when the header is finished.
6977 Although the order of the single header entries doesn't matter it is advised
6978 to keep the above sequence, just to get the best optics and meets the layout
6979 of the real document.
6982 \begin_layout Standard
6983 If you want to place footnotes in the header block, e.
6984 \begin_inset space \thinspace{}
6988 \begin_inset space \space{}
6991 to state your present address, just use the standard footnote via the menu
6994 Insert\SpecialChar \menuseparator
6998 LyX will automagically use the term
7007 \begin_layout Standard
7008 In addition to these topics, the macros use three additional LaTeX commands
7009 that have no counterpart in LyX:
7012 \begin_layout Itemize
7019 to separate different names for more than one author and institute, respectivel
7023 \begin_layout Itemize
7030 to mark corresponding author/institute pairs.
7031 The institutes are numbered sequentially as they appear in the
7035 field, so you have to put a marker to each author.
7038 \begin_layout Itemize
7045 to supply an email address for fast contact.
7048 \begin_layout Standard
7049 In all cases, the appropriate command has to be entered in LyX and marked
7055 \begin_layout Subsection
7059 \begin_layout Standard
7060 The abstract should immediately follow the header block.
7061 With version 5 the abstract environment was changed to a command, and there
7062 is now a resctriction to only one paragraph.
7063 In addition, it should contain an entry with the keywords.
7064 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7071 by hand and mark it as LaTeX code.
7072 Refer to the example paper.
7075 \begin_layout Subsection
7076 Supported environments
7079 \begin_layout Standard
7080 The A&A paper layout supports the following environments for structuring
7084 \begin_layout Itemize
7090 \begin_layout Itemize
7096 \begin_layout Itemize
7102 \begin_layout Itemize
7108 \begin_layout Itemize
7114 \begin_layout Itemize
7120 \begin_layout Itemize
7126 \begin_layout Itemize
7132 \begin_layout Itemize
7138 \begin_layout Itemize
7144 \begin_layout Itemize
7150 \begin_layout Itemize
7156 \begin_layout Subsection
7157 Commands not supported by LyX
7160 \begin_layout Standard
7161 Some commands are not yet supported by the
7166 Some have already been mentioned.
7167 For the sake of completeness, they are listed all together here:
7170 \begin_layout Itemize
7178 \begin_layout Itemize
7186 \begin_layout Itemize
7194 \begin_layout Itemize
7202 \begin_layout Itemize
7210 \begin_layout Itemize
7218 \begin_layout Itemize
7226 \begin_layout Itemize
7234 \begin_layout Standard
7235 If you want to use any of these commands, you have to enter them yourself.
7238 Do not forget to mark them as LaTeX code!
7241 \begin_layout Subsection
7242 Figure and Table Floats
7245 \begin_layout Standard
7246 LyX provides support for the necessary float environments
7248 figure, figure*, table
7254 , therefore we won't tell much about it here.
7258 \begin_inset space ~
7264 Just remember that tables should be left-aligned.
7265 For that, select the table and change the alignment in
7267 Edit\SpecialChar \menuseparator
7269 \begin_inset space ~
7275 \begin_layout Standard
7276 There is only one special thing: the figures with caption besides the figure.
7277 To create such a figure, you have to do the following:
7280 \begin_layout Enumerate
7281 Create a wide figure float:
7283 Insert\SpecialChar \menuseparator
7284 Float\SpecialChar \menuseparator
7287 , then right click in the figure and select
7293 \begin_inset space ~
7301 \begin_layout Enumerate
7302 Enter your caption text.
7305 \begin_layout Enumerate
7310 to move the cursor above the caption.
7313 \begin_layout Enumerate
7317 \begin_layout Enumerate
7318 Position the cursor behind the figure and insert a horizontal fill:
7320 Insert\SpecialChar \menuseparator
7322 \begin_inset space ~
7325 Character\SpecialChar \menuseparator
7327 \begin_inset space ~
7335 \begin_layout Enumerate
7336 Switch to LaTeX mode:
7339 \begin_inset space ~
7347 \begin_layout Enumerate
7357 Do not close the brace!
7360 \begin_layout Enumerate
7361 Position the cursor behind the caption text, switch to LaTeX mode and insert
7365 \begin_inset space ~
7377 \begin_layout Standard
7378 Also, refer to the figures in the example paper.
7381 \begin_layout Subsection
7385 \begin_layout Standard
7386 For submission, the paper has to be formated in a special double-spacing
7388 For this purpose, you have to give the option
7392 to the documentclass.
7393 This must be done using the extra class options field in the
7395 Document\SpecialChar \menuseparator
7399 Just enter the string
7406 \begin_layout Subsection
7410 \begin_layout Standard
7415 directory contains an example paper written with LyX.
7416 It is the example paper from the original macro package, translated to
7418 Use it for inspiration, and compare the original LaTeX code with LyX way
7422 \begin_layout Section
7426 \begin_layout Standard
7432 \begin_layout Subsection
7436 \begin_layout Standard
7437 AASTeX is a set of macros produced by the American Astronomical Society
7438 to facilitate electronic manuscript submission to the three journals they
7439 publish: the Astrophysical Journal (including the Letters and Supplement),
7440 the Astronomical Journal, and the Publications of the Astronomical Society
7442 LyX has proven to be an excellent tool for generating these documents,
7443 especially given its equation, citation, and figure handling capabilities.
7444 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7445 is the version described here, or higher.
7446 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7447 incompatible with LyX.
7448 The AASTeX package may be downloaded from the AASTeX Web site
7451 \begin_layout Standard
7452 \begin_inset VSpace medskip
7458 \begin_layout Standard
7460 \begin_inset Flex URL
7463 \begin_layout Plain Layout
7465 http://www.journals.uchicago.edu/AAS/AASTeX
7473 \begin_layout Standard
7474 \begin_inset VSpace medskip
7480 \begin_layout Standard
7481 A complete user guide is contained in that package and you should familiarize
7482 yourself with it thoroughly before embarking on writing a paper in LyX.
7483 LyX will not reduce the need to figure out all the AASTeX commands, it
7484 will only reduce the drudgery of typing everything in.
7485 It is your responsibility to ensure that the final exported LaTeX document
7486 conforms completely to the requirements of the journal to which you are
7487 submitting your paper.
7490 \begin_layout Subsection
7491 Starting a New Paper
7494 \begin_layout Standard
7495 I strongly suggest that you start with the AASTeX template file.
7498 File\SpecialChar \menuseparator
7505 , enter the new file name, then choose the
7510 This will show the most common fields found in a manuscript.
7511 Simply overwrite the existing text (including the brackets,
7515 ) with the correct information.
7516 Many of the AASTeX commands and environments can be implemented directly
7517 in LyX, but some cannot: most noticeably
7529 , which should stick out like a sore thumb if you actually just opened the
7531 For commands such as these, the LaTeX code must be entered directly and
7533 Such commands are referred to as TeX code, or Evil Red Text.
7534 I tried to minimize the amount of TeX code needed in an AASTeX document,
7535 but there is still a bit more required than any of us would like.
7538 \begin_layout Subsection
7539 Finishing Your Paper
7542 \begin_layout Standard
7543 When the paper is finished to your satisfaction and previews/prints correctly,
7545 \begin_inset Quotes eld
7549 \begin_inset Quotes erd
7552 actions which need to be done before you submit it to the journals.
7556 \begin_layout Enumerate
7557 Export your paper as a LaTeX file (
7559 File\SpecialChar \menuseparator
7560 Export\SpecialChar \menuseparator
7567 \begin_layout Enumerate
7572 file with your favorite text editor
7576 \begin_layout Enumerate
7577 remove the comment lines before the
7586 \begin_layout Enumerate
7591 usepackage...{fontenc}
7593 line if it appears (usually just after
7608 \begin_layout Enumerate
7609 remove everything between (and including) the
7621 commands, except for any commands you specifically put into the LaTeX preamble
7622 (which should appear immediately after the
7623 \begin_inset Quotes eld
7626 User specified LaTeX commands
7627 \begin_inset Quotes erd
7638 \begin_layout Enumerate
7639 Run the resulting file through LaTeX to make sure it still processes correctly.
7642 \begin_layout Enumerate
7643 Reread the journal requirements to make sure your filenames and formats
7647 \begin_layout Enumerate
7651 \begin_layout Subsection
7652 Comments On Specific Commands
7655 \begin_layout Standard
7656 I will not describe the detailed usage of the individual AASTeX commands:
7657 the AASTeX User Guide (
7661 ) gives a good description of each.
7662 Thus it's probably easiest for me to go down the list as found in the guide
7663 and offer comments where necessary.
7664 So let's begin \SpecialChar \ldots{}
7668 \begin_layout Subsubsection
7669 Things that work as expected
7672 \begin_layout Standard
7676 \begin_layout Plain Layout
7688 \begin_layout Standard
7689 Because they work as you might expect, I simply list them and the section
7790 begin{thebibliography}
7798 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7799 graphicx figure commands (2.14.1),
7823 (2.15.4, amongst other places),
7850 \begin_layout Standard
7851 The following style options also work correctly:
7872 Simply put them in the
7878 Layout\SpecialChar \menuseparator
7884 \begin_layout Standard
7888 \begin_layout Plain Layout
7900 \begin_layout Subsubsection
7901 Things that work, but require more comment
7904 \begin_layout Standard
7905 The following items work, but require a little more discussion:
7908 \begin_layout Itemize
7909 These items are reserved for use by the journal editors, but you can put
7910 them into the LaTeX preamble if you feel compelled to do so:
7943 \begin_layout Itemize
7944 These items may be placed in the LaTeX preamble, and are included as blanks
7945 in the template file:
7966 \begin_layout Itemize
7973 (2.3) – can only be used
7974 \begin_inset Quotes eld
7978 \begin_inset Quotes erd
7981 , not in the middle of a paragraph.
7982 Use TeX code if you need to embed it.
7985 \begin_layout Itemize
7992 (2.3) – will have extra {} after it.
7993 This should not cause an error.
7996 \begin_layout Itemize
8003 (2.6) – can only be used
8004 \begin_inset Quotes eld
8008 \begin_inset Quotes erd
8011 , not in the middle of a paragraph.
8012 Use TeX code if you need to embed it.
8015 \begin_layout Itemize
8022 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8026 \begin_layout Itemize
8040 \begin_layout Itemize
8047 (2.9) – will have extra {} after it.
8048 This should not cause an error.
8051 \begin_layout Itemize
8058 (2.11) – will have extra {} after it.
8059 This should not cause an error.
8062 \begin_layout Itemize
8069 (2.14.2) – you can insert an optional filename argument by placing the cursor
8070 at the beginning of the text and selecting
8072 Insert\SpecialChar \menuseparator
8077 \begin_inset Quotes eld
8081 \begin_inset Quotes erd
8084 inserts an optional argument of the type needed by
8091 Hopefully it will be renamed someday.
8094 \begin_layout Itemize
8107 for the catalog ID optional parameter
8110 \begin_layout Itemize
8123 for the catalog ID optional parameter
8126 \begin_layout Subsubsection
8127 Things not implemented, use TeX code
8130 \begin_layout Standard
8134 \begin_layout Plain Layout
8146 \begin_layout Standard
8169 setcounter{equation}
8171 (2.12), Journal name abbreviations (2.13.4),
8207 (2.15.4, insert it as the first element in the lefthand cell after where
8209 Don't use any of LyX's rules in the table),
8221 (2.15.5), much of Misc (2.17, except
8272 \begin_layout Standard
8276 \begin_layout Plain Layout
8288 \begin_layout Subsubsection
8289 Things that cannot be implemented
8292 \begin_layout Standard
8293 \SpecialChar \ldots{}
8294 at least in any meaningful sort of way, so I suggest ignoring them.
8295 They are the references environment (2.13.3), and the deluxetable environment
8297 If you really, really need to use deluxetable, I suggest editing it in
8298 a separate file with a text editor, then using
8300 Insert\SpecialChar \menuseparator
8302 \begin_inset space ~
8307 to include it in your LyX document.
8312 file to see an example of this.
8315 \begin_layout Subsection
8316 FAQs, Tips, Tricks, and Other Ruminations
8319 \begin_layout Subsubsection
8320 Getting LyX and AASTeX to cooperate
8323 \begin_layout Standard
8324 It can be a bit tricky to get LyX to recognize a new layout and document
8326 When all else fails, do this:
8329 \begin_layout Enumerate
8330 Make certain that LaTeX can find AASTeX.
8331 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8332 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8339 \begin_layout Enumerate
8351 \begin_layout Enumerate
8354 Tools\SpecialChar \menuseparator
8357 in LyX, then restart LyX.
8360 \begin_layout Enumerate
8361 Open a regular new file, not from a template.
8362 Does AASTeX appear in the class list in
8364 Document\SpecialChar \menuseparator
8370 \begin_layout Standard
8371 If you get a warning from an existing AASTeX document about not being able
8372 to find the AASTeX layout or a message about
8373 \begin_inset Quotes eld
8376 You should not mix title layouts with normal ones
8377 \begin_inset Quotes erd
8380 , things haven't been installed correctly.
8383 \begin_layout Subsubsection
8384 LaTeX error processing a table
8387 \begin_layout Standard
8388 LyX, by default, attempts to center the table caption/title.
8389 This seems to produce a bad interaction in AASTeX so you should click somewhere
8390 in the caption/title, then select
8392 Edit\SpecialChar \menuseparator
8394 \begin_inset space ~
8408 This took care of it for me.
8411 \begin_layout Subsubsection
8415 \begin_layout Standard
8416 A couple of things: 1) I have noticed some funny spacing in the reference
8417 entries in the text.
8418 When you enter the bibliography item data, make sure their is
8422 space between the last author and the parenthesis setting off the year;
8426 \begin_inset space \thinspace{}
8430 \begin_inset space \space{}
8444 2) Entering the references at all is not obvious.
8445 The easiest thing is to start typing your first reference at the end of
8446 the document, then mark it as type
8451 That will put a small gray box in front of what you just typed.
8452 Click on the box to fill in the rest of the information.
8453 For new references, go to the end of an existing reference and press return.
8454 That will create a new line with its own box, etc.
8457 \begin_layout Subsubsection
8461 \begin_layout Standard
8462 Even though AASTeX provides its own figure commands (
8468 , for example), I much prefer LaTeX's standard figure commands (with the
8477 \begin_inset space ~
8480 commands as TeX code into a Figure Float box if you desire, but I never
8481 have much luck getting the layout right.
8482 With the standard graphics, LyX will insert a
8486 usepackage{graphicx}
8488 command into the LaTeX preamble and handle the figures in the standard
8489 LaTeX2e way, interspersing the figures in the text.
8490 I believe ApJ accepts figures exactly this way now; AJ might still use
8492 \begin_inset Quotes eld
8495 stack everything at the end
8496 \begin_inset Quotes erd
8502 \begin_layout Subsubsection
8503 Things I could have done, but didn't
8506 \begin_layout Standard
8508 \begin_inset Quotes eld
8512 \begin_inset Quotes erd
8515 things I could have implemented, but chose not to.
8516 For instance, I saw no point in double-spacing the text in the LyX window,
8517 even though it is double-spaced in the paper manuscript.
8518 Also, I chose not to make separate layouts for the preprint and preprint2
8520 Since I assume you will spend most of your time in the plain manuscript
8521 mode anyway, I decided not to chew up more disk space with this.
8525 \begin_layout Subsection
8529 \begin_layout Standard
8530 Your mileage may vary.
8531 I've now had papers published by both ApJ and AJ that have had 98% of the
8532 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8534 I have had no trouble with the submission process, and I'm sure the journals
8535 were never aware that there might be a difference.
8536 So, go forth and publish!
8539 \begin_layout Section
8543 \begin_layout Standard
8546 David Johnson; updated by Richard Heck
8549 \begin_layout Standard
8550 \begin_inset VSpace bigskip
8556 \begin_layout Standard
8558 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8559 papers to be submitted to American Mathematical Society publications.
8560 The layouts are not tailored to a specific journal, but easily can be.
8561 You should refer to the AMS documentation for specific instructions for
8562 each journal (usually it will entail only changing a single line in the
8564 That documentation is available on the Web at
8565 \begin_inset Flex URL
8568 \begin_layout Plain Layout
8576 \begin_inset Flex URL
8579 \begin_layout Plain Layout
8581 ftp://ftp.ams.org/pub/tex/amslatex/
8587 These layouts are appropriate, and useful, for any mathematical writing.
8591 \begin_layout Standard
8592 There are two basic AMS LaTeX layouts:
8595 \begin_layout Itemize
8596 amsart: The standard AMS article format.
8599 \begin_layout Itemize
8600 amsbook: the standard AMS book (really, monograph) format.
8604 \begin_layout Standard
8605 The layouts themselves contain only the minimum necessary to use the AMS
8607 They do not, in particular, contain any of the `theorem' environments used
8608 for setting theorems, lemmas, and the like.
8609 These are contained, instead, in the
8610 \begin_inset Flex CharStyle:Code
8613 \begin_layout Plain Layout
8619 module, which is loaded by default when when you select one of the AMS
8621 (It can also be used with other classes and can be removed, if you would
8622 rather use something else.) Less commonly used environments are in the
8623 \begin_inset Flex CharStyle:Code
8626 \begin_layout Plain Layout
8627 Theorems (AMS-Extended)
8632 module, which must be loaded manually.
8635 \begin_layout Standard
8636 By default, theorems and the like are numbered consecutively throughout
8637 the document, but this may be modified by loading the module
8638 \begin_inset Flex CharStyle:Code
8641 \begin_layout Plain Layout
8642 Theorems (Order by Section)
8647 or, if you are using
8648 \begin_inset Flex CharStyle:Code
8651 \begin_layout Plain Layout
8658 \begin_inset Flex CharStyle:Code
8661 \begin_layout Plain Layout
8662 Theorems (Order by Chapter)
8668 These will number the results as
8669 \begin_inset Formula $n.m$
8672 , where the first number refers to the section (or chapter) and the second
8673 refers to the total number of results so far in that section (or chapter).
8674 Many environments are also available unnumbered.
8675 These are indicated by an asterisk at the end.
8676 If you happen to want
8680 unnumbered results, the module
8681 \begin_inset Flex CharStyle:Code
8684 \begin_layout Plain Layout
8690 provides that option.
8693 \begin_layout Standard
8694 Note that these modules do not
8698 to be used with the AMS classes.
8699 It is perfectly possible to use the
8700 \begin_inset Flex CharStyle:Code
8703 \begin_layout Plain Layout
8709 module, and the others mentioned, with other classes, such as
8710 \begin_inset Flex CharStyle:Code
8713 \begin_layout Plain Layout
8720 \begin_inset Flex CharStyle:Code
8723 \begin_layout Plain Layout
8730 \begin_inset Flex CharStyle:Code
8733 \begin_layout Plain Layout
8742 \begin_layout Subsection
8743 What these layouts provide
8746 \begin_layout Standard
8747 There is a long list of included environments provided by these layouts.
8748 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8749 variety of `theorem' environments.
8750 However, the AMS recommends the environments that are available in LyX.
8754 \begin_layout Standard
8755 The following environments—as well as the standard environments, such as
8757 \begin_inset Flex CharStyle:Noun
8760 \begin_layout Plain Layout
8767 \begin_inset Flex CharStyle:Noun
8770 \begin_layout Plain Layout
8777 \begin_inset Flex CharStyle:Noun
8780 \begin_layout Plain Layout
8787 \begin_inset Flex CharStyle:Noun
8790 \begin_layout Plain Layout
8797 \begin_inset Flex CharStyle:Noun
8800 \begin_layout Plain Layout
8807 \begin_inset Flex CharStyle:Code
8810 \begin_layout Plain Layout
8817 \begin_inset Flex CharStyle:Code
8820 \begin_layout Plain Layout
8829 \begin_layout Description
8830 Address This should be the author's permanent address.
8833 \begin_layout Description
8835 \begin_inset space ~
8838 Address This should be the author's temporary address at the time of submission,
8839 if different from the Address.
8842 \begin_layout Description
8843 Email Author's e-mail address
8846 \begin_layout Description
8847 URL Author's Web address, if desired.
8850 \begin_layout Description
8851 Keywords Key words or phrases used to identify specific topics discussed
8855 \begin_layout Description
8856 Subjectclass These refer to the AMS Subject Classifications, published and
8859 Mathematical Reviews
8862 These are also available online at the AMS cites listed above.
8865 \begin_layout Description
8869 \begin_layout Description
8873 \begin_layout Description
8877 \begin_layout Standard
8878 The following environments are provided by both the
8879 \begin_inset Flex CharStyle:Code
8882 \begin_layout Plain Layout
8889 \begin_inset Flex CharStyle:Code
8892 \begin_layout Plain Layout
8898 modules, in the latter case in both starred (unnumbered) and unstarred
8899 (numbered) versions.
8900 These same environments are provided only in the starred versions by the
8902 \begin_inset Flex CharStyle:Code
8905 \begin_layout Plain Layout
8914 \begin_layout Theorem
8915 This is typically used for the statements of major results.
8919 \begin_layout Corollary*
8920 This is used for statements which follow fairly directly from previous statement
8922 Again, these can be major results.
8927 These are smaller results needed to prove other statements.
8930 \begin_layout Proposition
8931 These are less major results which (hopefully) add to the general theory
8935 \begin_layout Conjecture
8936 These are statements provided without justification, which the author does
8937 not know how to prove, but which seem to be true (to the author, at least).
8940 \begin_layout Definition*
8941 Guess what this is for.
8942 The font is different for this environment than for the previous ones.
8946 \begin_layout Example*
8947 Used for examples illustrating proven results.
8950 \begin_layout Problem
8951 It's not really known what this is for.
8952 You should figure it out.
8955 \begin_layout Exercise*
8956 Write a description for this one.
8959 \begin_layout Remark
8960 This environment is also a type of theorem, usually a lesser sort of observation.
8963 \begin_layout Claim*
8964 Often used in the course of giving a proof of a larger result.
8968 Generally, these are used to break up long arguments, using specific instances
8974 The numbering scheme for cases is on its own, not together with other numbered
8980 At the end of this environment, a QED symbol (usually a square, but it can
8981 vary with different styles) is placed.
8982 If you want to have other environments within this one—for example, Case
8983 environments—and have the QED symbol appear only after them, then the other
8984 environments need to be nested within the proof environment.
8987 Nesting Environments
8993 for information on nesting.
8996 \begin_layout Standard
8997 And these environments are provided by
8998 \begin_inset Flex CharStyle:Code
9001 \begin_layout Plain Layout
9002 Theorems (AMS-Extended)
9010 \begin_layout Criterion*
9011 A required condition.
9014 \begin_layout Algorithm*
9015 A general procedure to be used.
9018 \begin_layout Axiom*
9019 This is a property or statement taken as true within the system being discussed.
9022 \begin_layout Condition*
9023 Sometimes used to state a condition assumed within the present context of
9028 Similar to a Remark.
9031 \begin_layout Notation*
9032 Used for the explanation of, yes, notation.
9035 \begin_layout Summary
9036 Do we really need to tell you?
9039 \begin_layout Acknowledgement*
9043 \begin_layout Conclusion*
9044 Sometimes used at the end of a long train of argument.
9048 Used in a way similar to Proposition, though perhaps lower on the scale.
9051 \begin_layout Standard
9052 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9054 They need to be available on your system in order to use these environments.
9057 \begin_layout Section
9065 \begin_layout Standard
9071 \begin_layout Subsection
9075 \begin_layout Standard
9076 These are the layout files for some of the journals of the American Geophysical
9078 It is assumed that you have both the AGU's own class files and AGUplus
9079 installed (everything to be found at
9080 \begin_inset Flex URL
9083 \begin_layout Plain Layout
9085 ftp://ftp.agu.org/journals/latex/journals
9093 \begin_layout Subsection
9097 \begin_layout Standard
9107 They are still called this in the LyX GUI, though their LaTeX equivalents
9108 in the AGU classes are
9119 \begin_layout Standard
9120 Newly defined styles are
9157 These are mostly manuscript attributes and defined in the AGU class documentati
9161 \begin_layout Standard
9162 I suspect this is still badly incomplete.
9165 \begin_layout Subsection
9169 \begin_layout Standard
9186 \begin_layout Subsection
9190 \begin_layout Itemize
9193 Journal of Geophysical Research
9202 \begin_layout Standard
9203 Add your own, it isn't so hard! Look at the
9214 \begin_layout Subsection
9215 Bugs and things to remember
9218 \begin_layout Standard
9219 In order to use the new layouts, you must remember to do the following for
9223 \begin_layout Enumerate
9229 This can be done in the
9231 Layout\SpecialChar \menuseparator
9236 Document\SpecialChar \menuseparator
9240 (AGU articles are always in English, right? So
9247 \begin_layout Enumerate
9257 (Yes, this is a bug.)
9260 \begin_layout Enumerate
9261 Make sure you use the
9265 bibliography style, by entering
9269 into the second field of the BibTeX inset.
9270 None of the standard styles will do.
9273 \begin_layout Section
9277 \begin_layout Standard
9283 \begin_layout Subsection
9287 \begin_layout Standard
9288 Broadway is for writing plays.
9289 The format is more decorative than Hollywood, and much less standardized.
9290 This format should be suitable for workshops.
9293 \begin_layout Subsection
9297 \begin_layout Standard
9298 The same as in Hollywood.
9301 \begin_layout Subsection
9305 \begin_layout Standard
9310 names as labels then cross-reference the label to insert the name.
9311 The cross-reference dialog will show the current cast of characters.
9314 \begin_layout Subsection
9315 Paper size and Margins
9318 \begin_layout Standard
9319 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9322 \begin_layout Subsection
9326 \begin_layout Standard
9327 The following environments are available.
9328 You can use broadway.bind to get the bind keys shown at the right.
9331 \begin_layout Itemize
9335 \begin_inset Newline newline
9340 You should not have to use this, but it is here for anything that does not
9344 \begin_layout Itemize
9348 \begin_inset space \hfill{}
9352 \begin_inset Newline newline
9357 Used to describe stage setting and the action.
9358 First use of speaker names in all CAPs.
9361 \begin_layout Itemize
9365 \begin_inset space \hfill{}
9369 \begin_inset Newline newline
9374 Automatically numbered.
9375 On screen it will be arabic, but will print as Roman.
9378 \begin_layout Itemize
9382 \begin_inset space \hfill{}
9386 \begin_inset Newline newline
9396 It is just centered text.
9399 \begin_layout Itemize
9403 \begin_inset space \hfill{}
9407 \begin_inset Newline newline
9412 Not automatically numbered.
9413 You supply the number.
9414 This is because I couldn't figure out how.
9417 \begin_layout Itemize
9421 \begin_inset space \hfill{}
9425 \begin_inset Newline newline
9430 A special case of Narrative to describe the setting and action as the curtain
9434 \begin_layout Itemize
9438 \begin_inset space \hfill{}
9442 \begin_inset Newline newline
9447 The speaker's (actor's) title, centered in all CAPS.
9450 \begin_layout Itemize
9454 \begin_inset space \hfill{}
9458 \begin_inset Newline newline
9463 Instructions to the speaker.
9464 The parentheses are automatically inserted.
9465 The ( will appear on screen, but both will be in the printed play.
9466 This environment is only used within
9473 \begin_layout Itemize
9477 \begin_inset space \hfill{}
9481 \begin_inset Newline newline
9486 What the Speaker says.
9489 \begin_layout Itemize
9493 \begin_inset space \hfill{}
9497 \begin_inset Newline newline
9502 The curtain comes down.
9505 \begin_layout Itemize
9509 \begin_inset space \hfill{}
9515 \begin_layout Itemize
9519 \begin_inset space \hfill{}
9525 \begin_layout Itemize
9529 \begin_inset space \hfill{}
9535 \begin_layout Standard
9539 \begin_layout Section
9543 \begin_layout Standard
9548 can be used to type letters according to German conventions.
9549 A template file is included in
9551 .../lyx/share/templates
9553 for you to use as a starting point.
9556 \begin_layout Section
9564 \begin_layout Standard
9570 \begin_layout Subsection
9574 \begin_layout Standard
9575 This is the layout file for the European Geophysical Society journals.
9580 can be downloaded from the web site of the EGS under
9581 \begin_inset Flex URL
9584 \begin_layout Plain Layout
9594 \begin_layout Subsection
9598 \begin_layout Standard
9601 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9609 The current layout file is unfortunately very unmodular and would benefit
9610 from using the various
9617 \begin_layout Section
9621 \begin_layout Standard
9627 \begin_layout Standard
9628 Elsevier Science Publishers B.V.
9629 provides a standard LaTeX document class (
9633 ) for submitting articles to their various journals.
9634 The style file can be downloaded directly from their web site:
9635 \begin_inset Flex URL
9638 \begin_layout Plain Layout
9640 http://authors.elsevier.com/
9646 Instructions are supplied along with the class file, which details the
9647 requirements of the publishers.
9648 LyX includes package that allows for the use of this class, by a layout
9649 and a template file.
9650 Installation of the class file is the same as for any other LaTeX package;
9651 instructions are provided in the Elsevier documentation.
9654 \begin_layout Standard
9664 As the Elsevier class file is based mainly on the standard article class,
9665 most of the normal functionality is provided.
9666 The Elsevier class defines a number of mathematical environments, which
9667 are similar to the AMS environments.
9668 These commands are all described in the Elsevier documentation, and are
9672 \begin_layout Standard
9673 The easiest way to use the Elsevier style is to base documents on the included
9675 It is best not to use options such as fancy headings or the geometry package,
9676 as elements such as these are defined by Elsevier in their style file.
9677 Ideally, no extra packages except those mentioned in the Elsevier documentation
9679 Essentially, Elsevier require as
9680 \begin_inset Quotes eld
9684 \begin_inset Quotes erd
9687 a LaTeX file as possible, as their intention is to take the supplied file
9688 and replace the class file with one for the particular journal to which
9689 the paper has been submitted.
9690 This also means that not too much time should be spent on the formating
9692 When it comes to be published, this will change anyway.
9693 The rest of the usage for this layout is substantially the same as for
9694 the normal article class.
9695 For details of what Elsevier do and don't allow, refer to their documentation.
9698 \begin_layout Section
9704 \begin_inset CommandInset label
9713 \begin_layout Standard
9719 \begin_layout Subsection
9723 \begin_layout Standard
9724 This section describes how to use LyX to make slides for overhead projectors.
9725 There are two document classes that can do this: the default slides class
9731 This section documents the latter.
9734 \begin_layout Standard
9735 I'm going to say this again, nice and clear, so that there's no misunderstanding
9739 \begin_layout Standard
9740 \begin_inset VSpace bigskip
9746 \begin_layout Standard
9750 This section documents the class
9751 \begin_inset Quotes eld
9759 \begin_inset Quotes erd
9767 \begin_layout Standard
9768 \begin_inset VSpace bigskip
9774 \begin_layout Standard
9775 If you're looking for the documentation for
9776 \begin_inset Quotes eld
9784 \begin_inset Quotes erd
9788 \begin_inset space ~
9792 \begin_inset CommandInset ref
9794 reference "sec:slitex"
9799 If your machine doesn't have the
9804 \begin_inset Quotes eld
9812 \begin_inset Quotes erd
9815 ] installed, you'll probably have to use the default
9819 class, which isn't quite as good as
9824 \begin_layout Standard
9829 class is designed for use with version 2.1 of the
9833 LaTeX class file which is now an integral part of LaTeX2e.
9836 \begin_layout Subsection
9840 \begin_layout Standard
9841 Obviously, to use this document class, you need to select
9842 \begin_inset Quotes eld
9850 \begin_inset Quotes erd
9860 \begin_inset space ~
9866 There are some settings in the
9869 \begin_inset space ~
9874 dialog that you should know about that are specific to this class:
9877 \begin_layout Itemize
9878 Don't change the options
9889 \begin_inset space ~
9895 They're ignored by the
9902 \begin_layout Itemize
9903 The default font size is 20
9904 \begin_inset space \thinspace{}
9907 pt with the other options being 17
9908 \begin_inset space \thinspace{}
9912 \begin_inset space \thinspace{}
9916 \begin_inset space \thinspace{}
9922 \begin_layout Itemize
9931 but all math equations are still typeset in the usual roman font.
9934 \begin_layout Itemize
9939 supports A4 and Letter paper sizes as well as a special size for working
9941 \begin_inset space \thinspace{}
9945 It doesn't support A5, B5, legal or executive paper sizes.
9948 \begin_layout Itemize
9949 Don't bother changing the
9953 settings because they are ignored anyway.
9954 All floats appear where they are defined in the text.
9957 \begin_layout Itemize
9962 setting behaves a bit differently for this class.
9967 provides extensive footer and header capabilities including a user-defined
9970 \begin_inset space ~
9974 \begin_inset CommandInset ref
9976 reference "sec:foilfoot"
9981 The title page is treated differently to all other pages in the document
9990 has the logo centered at the bottom of the page (if one is defined).
9991 The possible page style choices and what they do are as follows:
9995 \begin_layout Labeling
9996 \labelwidthstring MMMMMMM
10003 The final output contains no page numbers, or other headers or footers
10004 (except footnotes of course).
10008 \begin_layout Labeling
10009 \labelwidthstring MMMMMMM
10016 The final output contains page numbers centered at the bottom of the page.
10017 No other headings or footers (other than footnotes).
10020 \begin_layout Labeling
10021 \labelwidthstring MMMMMMM
10026 Page numbers in lower right corner.
10027 Additional headers and footers are also shown.
10028 This is also the default.
10031 \begin_layout Labeling
10032 \labelwidthstring MMMMMMM
10037 Gives you access to the
10041 package although its use with
10045 is discouraged by the writer of the
10049 package because of some potential page layout clashes.
10053 \begin_layout Subsubsection
10057 \begin_layout Standard
10058 The following options may be used in the extra class options in the
10060 Document\SpecialChar \menuseparator
10066 \begin_layout Labeling
10067 \labelwidthstring MMMMMMx
10072 This sets up the page layout for 7.33
10073 \begin_inset space \thinspace{}
10077 \begin_inset space \thinspace{}
10080 in paper, which is about the same aspect ratio as a 35
10081 \begin_inset space \thinspace{}
10084 mm slide, making it a bit easier to work with this medium.
10087 \begin_layout Labeling
10088 \labelwidthstring MMMMMMx
10093 Places a rule across the page below the header on every page except the
10097 \begin_layout Labeling
10098 \labelwidthstring MMMMMMx
10103 Places a rule across the page above the footer on every page except the
10107 \begin_layout Labeling
10108 \labelwidthstring MMMMMMx
10113 This is automatically set each time you create a new
10122 to use the dvips driver to rotate those pages that are set as landscape
10126 \begin_layout Labeling
10127 \labelwidthstring MMMMMMx
10132 Simply changes the page dimensions to those of a landscape page but doesn't
10134 Thus if you use this option you need to use an external program to rotate
10135 each page or feed your paper through your printer as landscape.
10136 Note that this option effectively reverses the roles of the
10144 environments (don't worry these are described in the next section).
10147 \begin_layout Labeling
10148 \labelwidthstring MMMMMMx
10153 Equation numbers on the left.
10156 \begin_layout Labeling
10157 \labelwidthstring MMMMMMx
10162 Flush-left equations.
10165 \begin_layout Subsection
10166 Supported Environments
10169 \begin_layout Standard
10170 Most of the environments commonly supported in other classes are also supported
10176 There are several additional environments provided by
10180 as well as a couple added by LyX.
10181 The following environments are shared with other classes:
10184 \begin_layout Standard
10188 \begin_layout Plain Layout
10192 begin{multicols}{2}
10200 \begin_layout Itemize
10206 \begin_layout Itemize
10212 \begin_layout Itemize
10218 \begin_layout Itemize
10224 \begin_layout Itemize
10230 \begin_layout Itemize
10236 \begin_layout Itemize
10242 \begin_layout Itemize
10248 \begin_layout Itemize
10254 \begin_layout Itemize
10260 \begin_layout Itemize
10266 \begin_layout Itemize
10272 \begin_layout Itemize
10278 \begin_layout Itemize
10284 \begin_layout Itemize
10290 \begin_layout Itemize
10296 \begin_layout Itemize
10302 \begin_layout Itemize
10308 \begin_layout Standard
10312 \begin_layout Plain Layout
10324 \begin_layout Standard
10325 That is, all the major environments apart from the sectioning environments.
10326 Since foils are essentially self-contained sections, with a title and body,
10331 provides specific commands for starting new foils and these are:
10334 \begin_layout Itemize
10340 \begin_layout Itemize
10346 \begin_layout Standard
10347 LyX also provides slightly modified versions of these two environments called:
10350 \begin_layout Itemize
10356 \begin_layout Itemize
10359 ShortRotatefoilhead
10362 \begin_layout Standard
10363 and the differences will be explained in the next section.
10366 \begin_layout Standard
10367 Since foils are often used in presenting ideas or new theorems and such
10372 also provides a comprehensive box of goodies for presenting them:
10375 \begin_layout Standard
10379 \begin_layout Plain Layout
10383 begin{multicols}{2}
10391 \begin_layout Itemize
10397 \begin_layout Itemize
10403 \begin_layout Itemize
10409 \begin_layout Itemize
10415 \begin_layout Itemize
10421 \begin_layout Itemize
10427 \begin_layout Itemize
10433 \begin_layout Itemize
10439 \begin_layout Itemize
10445 \begin_layout Itemize
10451 \begin_layout Itemize
10457 \begin_layout Standard
10461 \begin_layout Plain Layout
10473 \begin_layout Standard
10474 The starred versions are unnumbered while the unstarred versions are numbered.
10475 There are also two list environments added by LyX and these are:
10478 \begin_layout Itemize
10484 \begin_layout Itemize
10490 \begin_layout Standard
10495 provides some powerful header and footer capabilities that are best set
10496 in the preamble although they may be set at any point in a document.
10497 If you want to change these settings in your document the best place to
10498 do so is at the very top of a foil, i.
10499 \begin_inset space \thinspace{}
10505 \begin_inset space \space{}
10510 straight after the foilhead.
10513 \begin_layout Standard
10514 For this purpose, the following command styles are provided [
10521 \begin_layout Standard
10525 \begin_layout Plain Layout
10529 begin{multicols}{2}
10537 \begin_layout Itemize
10541 \begin_inset space ~
10547 \begin_layout Itemize
10553 \begin_layout Itemize
10557 \begin_inset space ~
10563 \begin_layout Itemize
10567 \begin_inset space ~
10573 \begin_layout Itemize
10577 \begin_inset space ~
10584 \begin_layout Standard
10585 \begin_inset space ~
10592 \begin_layout Standard
10596 \begin_layout Plain Layout
10608 \begin_layout Standard
10609 There are also a few commands provided by
10613 that aren't directly supported by LyX but I'll tell you what they do and
10614 how to use them in section
10615 \begin_inset space ~
10619 \begin_inset CommandInset ref
10621 reference "sec:unsuppfoils"
10628 \begin_layout Subsection
10629 Building a Set of Foils
10632 \begin_layout Standard
10633 This section will give a simple introduction to using the different environments
10634 to build a set of foils.
10635 If you want to see an example set of foils, take a look at the
10639 file you find in LyX's
10646 \begin_layout Subsubsection
10647 Give It a Title Page
10650 \begin_layout Standard
10651 Unlike other classes that provide
10671 creates the title on a page of its own.
10672 If you leave out the
10676 environment LaTeX will substitute the current date (every time you regenerate
10680 \begin_layout Subsubsection
10684 \begin_layout Standard
10685 As I mentioned earlier, there are four ways of starting a new foil.
10686 For portrait foils you should use
10695 The difference between these two environments is the amount of space between
10696 the title of the foil (the foilhead) and the body of the foil.
10699 \begin_layout Standard
10700 Landscape foils are generated using the
10706 ShortRotatefoilhead
10709 Again the only difference is the spacing between foilhead and body.
10710 Both of the short versions have 0.5 inches less separation between the foilhead
10715 \begin_layout Standard
10716 One problem with the support for landscape foils is the requirement that
10717 you have to use the
10721 driver to generate the PostScript output otherwise the foils won't be rotated.
10722 It is possible to get landscape foils even if you haven't got the
10726 driver provided you can feed your foils sideways through your printer ;-)
10729 \begin_layout Subsubsection
10730 Theorems, Lemmas, Proofs and more
10733 \begin_layout Standard
10734 Due to a small bug in LyX you can't have two of the same type of these environme
10735 nts directly following each other.
10736 They must be separated by something.
10737 If you try, you will just be extending the previous environment as if you
10738 had merged the two environments together.
10739 So, how do you get around this problem? The simplest option is to insert
10740 some text between the two environments or add a
10744 environment between the two with just a
10745 \begin_inset Quotes eld
10753 \begin_inset Quotes erd
10757 This will force LyX to produce two separate environments and hence the
10758 correct LaTeX output.
10759 An example is provided in the example file included with the LyX distribution.
10760 Remember, this problem only occurs if you are trying to place two of the
10761 same type of theorem-like environments one directly after the other.
10764 \begin_layout Subsubsection
10768 \begin_layout Standard
10769 You get all the commonly supported list styles found in other classes as
10770 well as two new ones.
10771 I'll only describe the new ones here.
10772 If you want to find out more about the other list environments check out
10778 If you intend to use itemized lists you might also want to read about the
10782 \begin_inset space ~
10786 \begin_inset space ~
10791 dialog described above in section
10792 \begin_inset space ~
10796 \begin_inset CommandInset ref
10798 reference "sec:bullet"
10805 \begin_layout Standard
10806 The two new list styles,
10814 , are designed to make it easier for you to create lists of do's and don'ts
10815 or right and wrong by providing dedicated environments that use a tick
10816 or a cross as the label of the list.
10817 These lists are in fact dedicated variants of the
10822 They do however require that you have the
10826 packages installed.
10829 \begin_layout Subsubsection
10833 \begin_layout Standard
10838 redefines the floating tables and figures so that they appear exactly where
10839 they are in the text rather than pushing them to the top of the page or
10840 to some user specified location.
10841 In fact if you change the float placement settings they are simply ignored.
10844 \begin_layout Subsubsection
10845 Page Headers and Footers
10846 \begin_inset CommandInset label
10848 name "sec:foilfoot"
10855 \begin_layout Standard
10859 \begin_inset space ~
10868 are two commands used to control the left-footer text string.
10869 The first is meant to allow you to include a graphic logo on your foils
10871 \begin_inset Quotes eld
10879 \begin_inset Quotes erd
10883 While the second is meant to provide a classification for the audience,
10887 \begin_inset space \thinspace{}
10893 \begin_inset space \space{}
10897 It is empty by default.
10900 \begin_layout Standard
10901 The remaining page corners can be filled by
10904 \begin_inset space ~
10909 (which defaults to page numbers),
10912 \begin_inset space ~
10920 \begin_inset space ~
10928 \begin_layout Subsection
10934 \begin_inset CommandInset label
10936 name "sec:unsuppfoils"
10943 \begin_layout Standard
10944 All the commands mentioned below need to be set in a
10952 within another environment.
10955 \begin_layout Subsubsection
10959 \begin_layout Standard
10960 All lengths are adjusted using the
10983 should be replaced by the name given to the length you want to change and
10988 is the length value.
10989 All lengths should be specified in units of length such as inches (
11001 ) or relative to some document or font-based length such as
11011 \begin_layout Standard
11012 It's possible to change the spacing between a foilhead and the body of the
11013 foil by adjusting the length specified by
11020 For example, to make
11025 \begin_inset space \space{}
11028 in closer to their bodies put the following in the preamble:
11034 foilheadskip}{-0.5in}
11037 \begin_layout Standard
11038 The spacings around floats can be adjusted by setting these lengths:
11041 \begin_layout Labeling
11042 \labelwidthstring MMMMMMMMMMM
11049 Separation between the text and the top of the float
11052 \begin_layout Labeling
11053 \labelwidthstring MMMMMMMMMMM
11060 Separation between the float and the caption
11063 \begin_layout Labeling
11064 \labelwidthstring MMMMMMMMMMM
11071 Separation between the caption and the following text
11074 \begin_layout Labeling
11075 \labelwidthstring MMMMMMMMMMM
11082 You can make the captions narrower than the surrounding text by adjusting
11084 Best done relative to
11093 \begin_layout Standard
11094 There are also several title page related lengths that you may find useful
11095 if you have a long title or several authors:
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11106 Separation from headers to
11111 \begin_layout Labeling
11112 \labelwidthstring MMMMMMMMMMM
11130 \begin_layout Labeling
11131 \labelwidthstring MMMMMMMMMMM
11145 \begin_layout Labeling
11146 \labelwidthstring MMMMMMMMMMM
11162 \begin_layout Labeling
11163 \labelwidthstring MMMMMMMMMMM
11179 \begin_layout Standard
11180 The last length related command affects all the list environments.
11191 a list environment then all the vertical spacing between the list items
11193 Note that this is a command not a length so it doesn't require
11199 like the stuff mentioned above.
11202 \begin_layout Subsubsection
11203 Headers and Footers
11206 \begin_layout Standard
11219 commands control whether the logo in the
11223 definition appear on a given page.
11230 in the preamble then none of the foils will have the logo on them.
11231 If you don't want the logo on a particular page place the
11237 directly after the foilhead of that page and the
11243 directly after the next foilhead.
11246 \begin_layout Standard
11247 If you decide to use the
11251 page style setting in the
11254 \begin_inset space ~
11259 dialog you should probably add
11269 to your preamble so headers and footers on landscape pages are correctly
11270 placed when rotated.
11271 This is due to some clashes between the page layouts provided by the
11282 \begin_layout Section
11283 Hollywood (Hollywood spec scripts)
11286 \begin_layout Standard
11292 \begin_layout Subsection
11296 \begin_layout Standard
11297 Getting the format of a Hollywood script right is a
11298 \begin_inset Quotes eld
11302 \begin_inset Quotes erd
11305 It is designed to make the readers focus on content and to be easy and
11306 familiar for the actors to read.
11307 Each page of a script should be one minute of film.
11308 Nothing goes in a script that you cannot see or hear on screen.
11309 The courier 12 pt font should be used throughout.
11313 \begin_layout Subsection
11317 \begin_layout Standard
11318 Speakers' lines should NEVER break in mid-sentence.
11319 If a speaker's lines continue over a page break, repeat the
11323 title followed by (Cont'd).
11326 \begin_layout Subsection
11330 \begin_layout Standard
11335 names as labels then cross-reference the label to insert the name.
11336 The cross-reference dialog will show the current cast of characters.
11337 You can use this to insert the speaker name in narratives also.
11340 \begin_layout Subsection
11341 Paper size and Margins
11344 \begin_layout Standard
11345 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11348 \begin_layout Subsection
11352 \begin_layout Standard
11353 The following environments are available.
11354 You can use hollywood.bind to get the bind keys shown at the right.
11357 \begin_layout Itemize
11361 \begin_inset Newline newline
11366 Used where nothing else works.
11370 \begin_layout Itemize
11376 \begin_inset space \hfill{}
11384 \begin_inset Newline newline
11387 Usually followed by something like
11388 \begin_inset Quotes eld
11391 on Sally waking up.
11392 \begin_inset Quotes erd
11398 \begin_layout Itemize
11402 \begin_inset space \hfill{}
11406 \begin_inset Newline newline
11411 Introduces a new INTERIOR camera set-up.
11412 Always followed by DAY or NIGHT, or something similar to define the lighting
11414 Everthing on this line in CAPS.
11417 \begin_layout Itemize
11421 \begin_inset space \hfill{}
11425 \begin_inset Newline newline
11430 Introduces a new EXTERIOR camera set-up.
11431 Everthing on this line in CAPS.
11434 \begin_layout Itemize
11438 \begin_inset space \hfill{}
11442 \begin_inset Newline newline
11447 The character speaking.
11450 \begin_layout Itemize
11454 \begin_inset space \hfill{}
11458 \begin_inset Newline newline
11463 Instructions to the speaker.
11464 The () are automatically inserted, but only the ( will show in LyX.
11465 Both will be printed.
11468 \begin_layout Itemize
11472 \begin_inset space \hfill{}
11476 \begin_inset Newline newline
11488 \begin_layout Itemize
11492 \begin_inset space \hfill{}
11496 \begin_inset Newline newline
11501 Camera movement instruction.
11503 \begin_inset space \thinspace{}
11507 \begin_inset space \space{}
11513 \begin_layout Itemize
11517 \begin_inset space \hfill{}
11523 \begin_layout Itemize
11527 \begin_inset space \hfill{}
11533 \begin_layout Itemize
11537 \begin_inset space \hfill{}
11543 \begin_layout Itemize
11547 \begin_inset space \hfill{}
11553 \begin_layout Subsection
11557 \begin_layout Itemize
11561 \begin_layout Itemize
11565 \begin_layout Itemize
11567 \begin_inset space \thinspace{}
11574 \begin_layout Itemize
11579 \begin_layout Itemize
11580 PAN — camera movement
11583 \begin_layout Itemize
11584 INSERT — cut to close-up of
11587 \begin_layout Section
11591 \begin_layout Standard
11594 Panayotis Papasotiriou
11597 \begin_layout Subsection
11601 \begin_layout Standard
11602 The ijmpc package is a set of macros that facilitates electronic manuscript
11605 International Journal of Modern Physics C
11608 Similarly, the ijmpd package is for creating manuscripts to be submitted
11611 International Journal of Modern Physics D
11614 Both journals are published by World Scientific.
11615 The corresponding document classes are named
11624 These files, together with instructions for the authors, can be downloaded
11626 \begin_inset Flex URL
11629 \begin_layout Plain Layout
11631 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11637 \begin_inset Flex URL
11640 \begin_layout Plain Layout
11642 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11648 Both packages are modified versions of the standard
11649 \begin_inset Quotes eld
11653 \begin_inset Quotes erd
11656 package, and they are almost (but not exactly) identical.
11657 Most of their features are supported by LyX.
11658 I have used LyX successfully to write articles submitted to both journals
11659 without any problem.
11662 \begin_layout Subsection
11666 \begin_layout Standard
11667 As usual, the easiest way to write a paper is to start with a template.
11670 File\SpecialChar \menuseparator
11689 This will give an (almost) empty document that includes the most common
11690 fields found in a manuscript.
11691 Simply overwrite the existing text (including the brackets,
11696 You should keep in mind the following remarks.
11699 \begin_layout Enumerate
11700 LyX won't let you change the font size and the page style of the document,
11701 because such modifications are not allowed by both packages.
11704 \begin_layout Enumerate
11705 The language of the document should not be changed.
11706 Before previewing your paper, be sure that the babel package is not used.
11707 To do this, click on
11709 Tools\SpecialChar \menuseparator
11720 checkbox in the language settings, and click on
11728 , if you wish to make this change permanent).
11731 \begin_layout Enumerate
11733 \begin_inset Quotes eld
11737 \begin_inset Quotes erd
11740 style must be used to define keywords.
11743 \begin_layout Enumerate
11744 The ijmpc package provides a style named
11745 \begin_inset Quotes eld
11748 Classification Codes
11749 \begin_inset Quotes erd
11752 , which can be used to define classification codes, such as PACS numbers.
11753 Note that this facility is not supported by the ijmpd package.
11756 \begin_layout Enumerate
11757 Several new environments are available:
11758 \begin_inset Quotes eld
11762 \begin_inset Quotes erd
11766 \begin_inset Quotes eld
11770 \begin_inset Quotes erd
11774 \begin_inset Quotes eld
11778 \begin_inset Quotes erd
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11798 \begin_inset Quotes eld
11802 \begin_inset Quotes erd
11806 \begin_inset Quotes eld
11810 \begin_inset Quotes erd
11814 \begin_inset Quotes eld
11818 \begin_inset Quotes erd
11822 \begin_inset Quotes eld
11826 \begin_inset Quotes erd
11830 \begin_inset Quotes eld
11834 \begin_inset Quotes erd
11838 \begin_inset Quotes eld
11842 \begin_inset Quotes erd
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 \begin_inset Quotes eld
11858 \begin_inset Quotes erd
11862 \begin_inset Quotes eld
11866 \begin_inset Quotes erd
11870 Their use is more or less obvious.
11871 LyX supports all these environments; it will use the proper label, text
11872 style, and numbering scheme for each of them.
11875 \begin_layout Enumerate
11876 Both packages use basic citations; the natbib package should not be used.
11877 In LyX, citation references are shown as usual; in the output, citations
11878 are shown as superscripts.
11879 If you want to use a citation as normal text, you should use the
11884 \begin_inset space \thinspace{}
11888 \begin_inset space \space{}
11892 \begin_inset Quotes eld
11896 \begin_inset space \space{}
11906 \begin_inset Quotes erd
11912 \begin_layout Enumerate
11914 \begin_inset Quotes eld
11918 \begin_inset Quotes erd
11921 section in both packages.
11922 To put acknowledgments, just use the
11923 \begin_inset Quotes eld
11927 \begin_inset Quotes erd
11933 \begin_layout Enumerate
11934 Appendices may be added to the paper,
11938 the Acknowledgments and
11943 LyX provides a special environment, called
11944 \begin_inset Quotes eld
11948 \begin_inset Quotes erd
11951 which marks the beginning of the appendices.
11952 This environment should be left blank; it just sends a LaTeX command, but
11953 nothing is really printed.
11955 \begin_inset Quotes eld
11959 \begin_inset Quotes erd
11962 is printed with blue letters, as a signal that all sections after that
11963 point are appendices.
11964 To write an appendix, use the
11965 \begin_inset Quotes eld
11969 \begin_inset Quotes erd
11973 LyX will number each appendix with capital letters, as required by both
11976 \begin_inset Quotes eld
11980 \begin_inset Quotes erd
11987 be present before the first appendix; if not, all appendices will be numbered
11988 as normal sections in the output.
11991 \begin_layout Enumerate
11992 The ijmpc and the ijmpd packages use the
11996 command to implement table captions.
11997 As a result, a table created by LyX is printed correctly, but its caption
11999 However, you can use some TeX code to overpass this problem, so that captions
12000 are printed as expected.
12001 To do so, create a float table as usual, remove the caption, and replace
12002 it with the TeX code
12012 (sic); you must also the TeX code
12016 immediately after the tabular material.
12017 Study the example table included in the template files to see how this
12018 trick is implemented.
12019 Alternatively, If you need table captions, you should implement the whole
12024 file, then include this file to the LyX document (
12026 Insert\SpecialChar \menuseparator
12027 File\SpecialChar \menuseparator
12029 \begin_inset space ~
12035 Details on how to create a table float can be found in the files
12043 , included in the corresponding packages.
12046 \begin_layout Subsection
12047 Preparing a paper for submission
12050 \begin_layout Standard
12051 Before you submit your paper you must export the LyX document as a LaTeX
12054 File\SpecialChar \menuseparator
12055 Export\SpecialChar \menuseparator
12062 \begin_layout Plain Layout
12063 Actually you have the choice between LaTeX (plain) and pdflatex.
12064 If you intend to use pdflatex to prepare the paper, you should use the
12065 pdflatex option so that included graphics are converted to PDF format,
12066 ready for use by pdflatex.
12071 , then make the following changes to the resulting
12078 \begin_layout Enumerate
12079 Remove the comment lines before the
12088 \begin_layout Enumerate
12089 Remove everything between (and including) the
12101 commands, except for any commands you specifically put into the LaTeX preamble.
12104 \begin_layout Standard
12109 file should be saved and processed through LaTeX as many times as necessary.
12110 You may also want to check the resulting
12117 \begin_layout Subsection
12121 \begin_layout Standard
12122 The use of TeX code is reduced to two commands, which must be placed at
12123 the top of the document.
12124 If you started writing your paper by using the
12132 template, the TeX code needed is already in its place; you usually don't
12134 You may only modify the first TeX code to specify the information printed
12135 to the top of odd and even pages (authors' names and short paper's title,
12137 This TeX code must have the form
12141 markboth{Authors' Names}{Short Paper's Title}
12146 \begin_layout Section
12150 \begin_layout Standard
12156 \begin_layout Subsection
12160 \begin_layout Standard
12161 The iopart package provides a document class to create electronic manuscript
12162 submission to the journals published by the Institute of Physics.
12163 Instructions for the authors how to create a paper using the iopart class
12164 can be downloaded together with the iopart package from the site
12165 \begin_inset Flex URL
12168 \begin_layout Plain Layout
12170 ftp://ftp.iop.org/pub/journals/latex2e
12178 \begin_layout Subsection
12182 \begin_layout Standard
12183 The easiest way to write a paper is to start with the file
12187 that is available in LyX's examples files folder.
12188 Open this file, save it under a new name, and start writing.
12189 The example file explains how to use the special text environments.
12190 Here are the most important advices:
12193 \begin_layout Itemize
12194 To be able to compile your document to a PDF, PS, or DVI, assure that the
12197 Use AMS math package
12199 in the document settings under
12206 \begin_layout Itemize
12209 The title environment defines the kind of your paper.
12210 So use one of the following environments for the title:
12214 \begin_layout Itemize
12223 \begin_layout Itemize
12232 \begin_layout Itemize
12238 for a Topical review
12241 \begin_layout Itemize
12250 \begin_layout Itemize
12259 \begin_layout Itemize
12265 for a Paper (same as Title)
12268 \begin_layout Itemize
12274 for a Preliminary communication
12277 \begin_layout Itemize
12283 for a Rapid communication
12286 \begin_layout Itemize
12292 for a Letter to the editor
12296 \begin_layout Itemize
12299 All title environments except of
12303 can have an optional short title.
12306 \begin_layout Itemize
12307 There is a general title environment
12311 which is not directly supported by the LyX.
12312 This can be used as TeX code when your document doesn't fit into one of
12313 the other title types.
12316 \begin_layout Standard
12317 For more informations like hints for special table and formula formatting,
12318 look at the IOP author guidelines.
12321 \begin_layout Section
12325 \begin_layout Standard
12328 Panayotis Papasotiriou
12331 \begin_layout Subsection
12335 \begin_layout Standard
12336 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12337 that facilitates electronic manuscript submission to the journals they
12339 Most known of them (at least in my domain of interest) are
12341 Astrophysics and Space Science
12347 , but there are many others (see a complete list at
12348 \begin_inset Flex URL
12351 \begin_layout Plain Layout
12353 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12359 The Kluwer package may be downloaded from the site
12360 \begin_inset Flex URL
12363 \begin_layout Plain Layout
12365 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12371 A complete user guide is contained in that package (but it can also be
12372 downloaded separately).
12375 \begin_layout Standard
12376 LyX supports many features of the package but not everything.
12377 However, the TeX code needed is reduced to some
12378 \begin_inset Quotes eld
12382 \begin_inset Quotes erd
12385 commands of the package (see
12386 \begin_inset space ~
12390 \begin_inset CommandInset ref
12392 reference "subsec:kluwer_peculiarities"
12397 I have recently used LyX to write an article submitted to the
12399 Astrophysics and Space Science
12401 without any problem.
12404 \begin_layout Subsection
12408 \begin_layout Standard
12409 The easiest way to write a paper is to start with the Kluwer template file.
12412 File\SpecialChar \menuseparator
12424 This will give an (almost) empty document that includes the most common
12425 fields found in a manuscript and a short description of their use.
12426 As in most templates, simply overwrite the existing text (including the
12431 ) with the correct information.
12434 \begin_layout Subsection
12435 Preparing a paper for submission
12438 \begin_layout Standard
12439 As in the AASTeX package, before you submit your paper to a journal you
12441 \begin_inset Quotes eld
12445 \begin_inset Quotes erd
12451 \begin_layout Enumerate
12452 Export your paper as a LaTeX file.
12453 To do this, click on
12455 File\SpecialChar \menuseparator
12456 Export\SpecialChar \menuseparator
12463 \begin_layout Enumerate
12468 file with a text editor and make the following changes
12472 \begin_layout Enumerate
12473 remove the comment lines before the
12482 \begin_layout Enumerate
12483 remove everything between (and including) the
12495 commands, except for any commands you specifically put into the LaTeX preamble.
12498 \begin_layout Standard
12507 \begin_layout Enumerate
12512 file through LaTeX as many times as necessary (usually up to three).
12515 \begin_layout Enumerate
12521 \begin_inset space \thinspace{}
12525 \begin_inset space \space{}
12532 , and check if everything is OK (it should, if you didn't make any mistake).
12535 \begin_layout Subsection
12536 \begin_inset Quotes eld
12540 \begin_inset Quotes erd
12543 of the Kluwer package
12544 \begin_inset CommandInset label
12546 name "subsec:kluwer_peculiarities"
12553 \begin_layout Standard
12554 The Kluwer package has the following
12555 \begin_inset Quotes eld
12559 \begin_inset Quotes erd
12565 \begin_layout Enumerate
12566 It is possible to write multiple articles in the same LaTeX file
12570 \begin_layout Plain Layout
12571 I can't imagine any good reason to do this.
12577 Each article must be included in the environment
12578 \begin_inset Quotes eld
12582 \begin_inset Quotes erd
12586 Unfortunately, this environment cannot be omitted, even if you write just
12588 Therefore, each article starts with the command
12594 and, obviously, ends with the command
12601 Although this can be implemented in LyX, I didn't included it, since it
12602 looks ugly and can confuse the novice user.
12603 Therefore, you need to enter them directly and mark them as LaTeX code
12605 \begin_inset Quotes eld
12609 \begin_inset Quotes erd
12615 \begin_layout Enumerate
12616 Information given at the beginning of the article (i.
12617 \begin_inset space \thinspace{}
12621 \begin_inset space \space{}
12624 title, subtitle, author, institution, running title, running author, abstract
12625 and keywords) must be included in an environment called
12626 \begin_inset Quotes eld
12630 \begin_inset Quotes erd
12634 This is not implemented in LyX, so you must enter title, subtitle etc.
12635 \begin_inset space ~
12638 between two TeX code lines (
12653 \begin_layout Enumerate
12654 According to the user manual, the label of each bibliography item must be
12678 \begin_layout Standard
12683 template takes care of all these
12684 \begin_inset Quotes eld
12688 \begin_inset Quotes erd
12692 If you start a new paper using this template you don't need to do anything
12697 \begin_layout Enumerate
12698 don't delete the TeX code included in the template, and
12701 \begin_layout Enumerate
12702 copy the example bibliography item included in the template and modify it
12703 as necessary to enter new bibliography items.
12706 \begin_layout Section
12710 \begin_layout Standard
12716 \begin_layout Subsection
12720 \begin_layout Standard
12721 The LyX document classes
12723 article (koma-script)
12727 report (koma-script)
12745 correspond to the LaTeX document classes
12762 \begin_inset space ~
12765 of the Koma-Script family.
12766 They are replacements for the standard document classes
12782 , resp., and fit better to European typography conventions in a number of
12786 \begin_layout Itemize
12787 Standard character size is 11pt in
12789 article (koma-script)
12793 report (koma-script)
12801 letter (koma-script)
12806 \begin_layout Itemize
12807 Headings, labels of the description environment, and a number of elements
12810 letter (koma-script)
12812 document class are set in a bold sans serif font.
12816 \begin_layout Plain Layout
12817 There is a big difference between the bold sans serif old cm fonts and new
12818 ec fonts, especially in the appearance of headings.
12819 In comparison, the ec bold sans serif fonts look a bit thin.
12820 Here the LaTeX package
12828 helps to produce the
12829 \begin_inset Quotes eld
12833 \begin_inset Quotes erd
12836 appearance when using the ec fonts.
12841 The numbering of chapter headings is made in the same way as the numbering
12842 of section headings, that is without the extra line
12843 \begin_inset Quotes eld
12846 Chapter\SpecialChar \ldots{}
12848 \begin_inset Quotes erd
12852 In addition, the appearance of the headings can be modified by using a
12853 number of options (in LyX to be entered in the field
12856 \begin_inset space ~
12863 Layout\SpecialChar \menuseparator
12867 A detailed German description of these options can be found in the Koma-Script
12875 \begin_layout Itemize
12876 The main means in the Koma-Script document classes to design the type area
12885 (in LyX to be entered in the extra class options field in the dialog
12887 Document\SpecialChar \menuseparator
12891 They make a clearer modification of page margins possible as do the options
12894 Document\SpecialChar \menuseparator
12898 A detailed German description of these and other type area options can
12899 be found in the Koma-Script documentation
12906 \begin_layout Itemize
12907 The LaTeX document classes of the Koma-Script family define a number of
12908 additional commands.
12909 Those part of it which makes sense in LyX is implemented in corresponding
12913 \begin_layout Standard
12914 A detailed German description of the LaTeX document classes of the Koma-Script
12915 family can be found in the Koma-Script documentation
12923 \begin_layout Plain Layout
12924 There is an English translation
12928 , but it is not a complete one.
12933 The following sections describe only those aspects, which are relevant
12937 \begin_layout Subsection
12938 article (koma-script), report (koma-script), and book (koma-script)
12941 \begin_layout Standard
12942 The document classes
12944 article (koma-script)
12948 report (koma-script)
12958 are implemented in the layout files
12971 They contain all the paragraph types of the corresponding standard document
12984 , resp., partly modified, with the exception of the LyX specific
12988 -type, which is replaced by the new
12992 -type having the same functionality.
12997 -Type there is a number of new paragraph types added.
13004 letter (koma-script)
13009 \begin_layout Itemize
13018 : are equivalents to
13026 , resp., additionally inserting an entry in the table of contents.
13035 are not contained in
13037 article (koma-script)
13042 \begin_layout Itemize
13051 : behave exactly as
13059 , resp., additionally clearing running heads.
13064 is not contained in
13066 article (koma-script)
13072 \begin_layout Plain Layout
13085 report (koma-script)
13087 , but since this is identical to
13091 , is has not been implemented in LyX.
13099 \begin_layout Itemize
13104 : generates a heading directly above the following paragraph in the standard
13105 character size without affecting the structure of the document.
13108 \begin_layout Itemize
13117 are special captions which respect the different space settings needed
13118 for captions placed above or below an element (if you follow strict typographic
13119 rules, you might want to place table captions always above the table).
13120 You can also use the class option
13124 , which will switch
13137 You need at least Koma-Script version 2.8q to use this.
13140 \begin_layout Itemize
13145 : can be used to set a bonmot, e.
13146 \begin_inset space \thinspace{}
13150 \begin_inset space \space{}
13153 at the beginning of a chapter.
13154 If you use the optional argument (
13156 Insert\SpecialChar \menuseparator
13158 \begin_inset space ~
13163 ), you can insert the dictum's author there.
13164 Dictum and author are separated by a line.
13165 You need at least Koma-Script version 2.8q to use this.
13170 is not contained in
13172 article (koma-script)
13177 \begin_layout Standard
13178 The following types, together with the standard types
13190 , form the title area of the document.
13191 They must be entered ahead of the first
13192 \begin_inset Quotes eld
13196 \begin_inset Quotes erd
13203 \begin_layout Plain Layout
13204 The corresponding LaTeX commands must appear before the
13215 When such a type is used more than once, the latter usage overwrites the
13216 former one, that means, for every type only the latest usage is valid.
13217 The order of the different types however has, like
13229 , no effect on the appearance of the produced document.
13232 \begin_layout Itemize
13237 : produces a centered paragraph above the ordinary title (
13249 ) for the subject of the document.
13252 \begin_layout Itemize
13257 : produces a centered paragraph below the ordinary title (
13269 ) for the publishers' name.
13272 \begin_layout Itemize
13279 report (koma-script)
13285 produces a centered paragraph on its own page behind the title page, or
13288 article (koma-script)
13290 produces a centered paragraph below the ordinary title (
13306 ) for a dedication.
13309 \begin_layout Itemize
13314 : produces a left aligned paragraph above the ordinary title (
13330 ) for a document`s head.
13333 \begin_layout Itemize
13338 : produces in a double-sided print in
13340 report (koma-script)
13346 a left-aligned paragraph at the top of the title page`s back or has no
13347 effect in a single-sided print or in
13349 article (koma-script)
13354 \begin_layout Itemize
13359 : produces in a double-sided print in
13361 report (koma-script)
13367 a left-aligned paragraph at the bottom of the title page`s back or has
13368 no effect in a single-sided print or in
13370 article (koma-script)
13375 \begin_layout Itemize
13380 : produces a special
13381 \begin_inset Quotes eld
13385 \begin_inset Quotes erd
13388 page ahead of the actual document containing a paragraph without special
13392 \begin_layout Standard
13393 The layout files for the document classes
13395 article (koma-script)
13399 report (koma-script)
13405 do include the file
13410 This is thought of as a place to define your own types.
13415 in your personal layout directory and edit the file!
13418 \begin_layout Subsection
13419 letter (koma-script)
13422 \begin_layout Standard
13426 \begin_layout Plain Layout
13438 \begin_layout Standard
13442 letter (koma-script)
13444 is implemented in the layout file
13449 It contains all the paragraph types of the corresponding standard document
13454 , partly modified, with the exception of the LyX specific types
13466 type, which is replaced by the new
13471 In addition, it contains, in contrast to the standard document class, the
13489 Furthermore, there are a number of new letter specific types.
13492 \begin_layout Standard
13496 \begin_layout Plain Layout
13508 \begin_layout Standard
13509 The appearance of the letter produced by this document class can be controlled
13510 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13514 \begin_layout Plain Layout
13515 For example, the standard appearance of the letter`s heading, consisting
13516 of name and address, is quite self-willed.
13518 \begin_inset Quotes eld
13522 \begin_inset Quotes erd
13525 heading is produced by the following LaTeX commands in the preamble:
13528 \begin_layout LyX-Code
13538 \begin_layout LyX-Code
13554 \begin_layout LyX-Code
13564 \begin_layout LyX-Code
13584 A detailed German description of such LaTeX commands can be found in the
13585 Koma-Script documentation
13590 With it, the letter's author can produce his personal letter layout.
13593 \begin_layout Standard
13602 define the beginning of the letter and must be used in every letter.
13603 To emphasize them in the LyX document class, they are marked with the letter
13613 \begin_inset space ~
13616 in the left margin.
13617 It is possible to write any number of letters in one file.
13622 type produces a new letter using the same addressee and a
13626 type produces a new addressee.
13643 are ordinary paragraph types and can also be used several times in one
13644 and the same letter.
13647 \begin_layout Itemize
13652 : produces a paragraph for the addressee and implicitly defines the beginning
13656 \begin_layout Itemize
13661 : produces a paragraph for the form of address and implicitly produces a
13665 \begin_layout Itemize
13670 : produces a paragraph for a close.
13673 \begin_layout Itemize
13678 : produces a paragraph for a postscript.
13681 \begin_layout Itemize
13686 : produces a paragraph for a distribution list.
13689 \begin_layout Itemize
13694 : produces a paragraph for enclosures.
13697 \begin_layout Standard
13738 are input types provided with a label to enter information, which will
13739 be processed by the document class.
13743 \begin_layout Plain Layout
13744 It could be seen as a matter of inconsequence, that the types
13752 described above are not such input types as well.
13753 Because of the special meaning of those types, however, I have implemented
13754 them as ordinary paragraph types with a one letter mark in the left margin.
13755 Moreover, it would affect my feeling of symmetry, if the
13763 type had such a serious different appearance.
13768 The types must be used ahead of the corresponding
13775 \begin_layout Standard
13776 An implementation of these types in a WYSIWYG fashion does not seem to make
13777 sense, because the real appearance of the produced letter does not only
13778 depend on the usage of the particular type, but also on other factors.
13779 For example, a signature entered in the
13783 type will in the standard behavior appear in the produced letter only,
13784 when in the same letter also a
13789 The entered value of the
13793 type will in the standard behavior not appear in the produced letter at
13795 The possibility to design the letter`s heading freely is already indicated
13796 in a footnote above.
13799 \begin_layout Standard
13800 The input types can also be used as empty paragraphs.
13801 This makes sense e.
13802 \begin_inset space \thinspace{}
13806 \begin_inset space \space{}
13818 type is not used at all, in the standard behavior the value of the
13822 type is used as signature, whereas if an empty
13826 type is used, no signature value is defined.
13829 \begin_layout Standard
13830 By using the input types it is possible to write a letter template, containing
13831 filled input types with your personal dates (name, address, etc.) and empty
13832 input types for other dates you want to enter.
13835 \begin_layout Itemize
13840 : sender's name, in the standard behavior appears as a centered paragraph
13841 in small caps in the letter`s heading.
13844 \begin_layout Itemize
13849 : sender's signature, in the standard behavior appears below the
13858 type is used, the value of the
13862 type appears instead.
13865 \begin_layout Itemize
13870 : sender's address, in the standard behavior appears in a centered paragraph
13871 in the letter`s heading below the sender's name.
13874 \begin_layout Itemize
13879 : sender's telephone number, in the standard behavior only sets the LaTeX
13889 \begin_layout Itemize
13894 : place of the letter`s making.
13897 \begin_layout Itemize
13902 : date of the letter`s making.
13911 , in the standard behavior, produce the place and the date in a right-aligned
13912 line below the addressee's field.
13917 type is used, neither place nor date appear, independent of the value of
13927 type is used, the date of the letter `s production is used.
13930 \begin_layout Itemize
13935 : sender`s back address, in the standard behavior appears above the addressee's
13936 field in a small sans serif font.
13939 \begin_layout Itemize
13944 : special mail information, in the standard behavior appears underlined
13945 above the addressee's field below the back address.
13948 \begin_layout Itemize
13953 : additional information, in the standard behavior appears on right side
13954 below the addressee`s field.
13957 \begin_layout Itemize
13962 : the letter's title, in the standard behavior appears in a big, bold, sans
13963 serif font above the subject.
13966 \begin_layout Itemize
13971 : the letter's subject, in the standard behavior appears in a bold font
13979 \begin_layout Standard
14000 produce a business letter like line above the
14004 line containing the fields
14005 \begin_inset Quotes eld
14009 \begin_inset Quotes erd
14013 \begin_inset Quotes eld
14017 \begin_inset Quotes erd
14021 \begin_inset Quotes eld
14025 \begin_inset Quotes erd
14029 \begin_inset Quotes eld
14033 \begin_inset Quotes erd
14037 \begin_inset Quotes eld
14041 \begin_inset Quotes erd
14045 \begin_inset Quotes eld
14049 \begin_inset Quotes erd
14053 For the date field, the value of the
14059 \begin_inset Quotes eld
14062 business letter types
14063 \begin_inset Quotes erd
14066 is used, the value of the
14070 type however does not appear, but only the LaTeX variable
14077 The ordinary output of place and date in a right-aligned line below the
14078 addressee`s field is suppressed.
14079 The types are implemented as input types provided with a label and must
14080 be used ahead of the corresponding
14087 \begin_layout Itemize
14095 \begin_layout Itemize
14103 \begin_layout Itemize
14111 \begin_layout Itemize
14119 \begin_layout Itemize
14127 \begin_layout Subsection
14128 The new letter class: letter (koma-script v.2)
14131 \begin_layout Standard
14137 \begin_layout Standard
14138 \begin_inset VSpace medskip
14144 \begin_layout Standard
14146 Koma-Script version 2.8 has introduced a new letter class
14150 which supersedes the now unsupported
14155 It has — on the LaTeX side — a completely new interface and is not compatible
14156 with the old class.
14157 Therefore, LyX supports both, though it is recommended to use the new class.
14160 \begin_layout Standard
14161 This class covers the same functionality as
14163 letter (koma-script),
14166 The basic items are
14170 (receiver's address, same as
14174 in the old layout),
14187 will start a new letter (i.
14188 \begin_inset space \thinspace{}
14192 \begin_inset space \space{}
14195 you can write several letters per document).
14196 New elements are sender's
14212 and the possibility to use a
14218 Insert\SpecialChar \menuseparator
14224 \begin_layout Standard
14225 The biggest improvement is, though, that the letter's layout is configurable
14226 at almost any needs.
14227 This can be done via the preamble or with a special style file (Letter
14228 Class Option, extension
14232 ), that will be read in as a class option.
14236 \begin_layout Plain Layout
14237 The KOMA package comes with some default
14242 There is, for instance, a
14246 file that follows german typesetting rules, or a
14250 that provides the default layout of the old
14255 The latter can be loaded with the class option
14264 ayout\SpecialChar \menuseparator
14269 ocument\SpecialChar \menuseparator
14281 template that is included in LyX for examples.
14282 A detailed description is to be found in the Koma-Script documentation
14290 \begin_layout Subsection
14294 \begin_layout Standard
14295 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14299 \begin_layout Itemize
14300 The chapter number of a
14304 type appears on a line of its own above the chapter heading instead of
14305 appearing in the same line ahead of it.
14306 The cause for that is the LyX internal behavior for the labeltype
14310 in the layout file.
14313 \begin_layout Itemize
14314 The headings of the types
14322 are only put in the
14323 \begin_inset Quotes eld
14327 \begin_inset Quotes erd
14330 LaTeX table of contents, but not in the LyX table of contents (
14332 Document\SpecialChar \menuseparator
14334 \begin_inset space ~
14338 \begin_inset space ~
14346 \begin_layout Itemize
14347 The paragraphs in a
14351 document class appear in a skip separation mode, not indented.
14352 This is the standard behavior, no special LaTeX commands are needed for
14356 Document\SpecialChar \menuseparator
14359 dialog the corresponding radio button indicates
14368 value always has the effect that extra LaTeX commands are inserted in the
14369 document to produce the gap, which is not what is wanted in this case.
14372 \begin_layout Section
14373 Latex8 (IEEE Conference Papers)
14376 \begin_layout Standard
14382 \begin_layout Subsection
14386 \begin_layout Standard
14387 Since this class is specifically for writing submissions to IEEE sponsored
14388 conferences I strongly recommend that you get a copy of their Authors Kit.
14393 package and associated bibliography style file is included in the kit.
14394 The Authors Kit is usually sent out by email once your initial submission
14396 There is a lot of useful information in the Authors Kit explaining formatting
14397 restrictions and so on and I will assume you have read this since that
14398 means I don't have to repeat it all here.
14401 \begin_layout Subsection
14405 \begin_layout Standard
14406 [AR\SpecialChar \@.
14410 \begin_layout Subsection
14411 Supported Environments
14414 \begin_layout Itemize
14420 \begin_layout Itemize
14426 \begin_layout Itemize
14432 \begin_layout Itemize
14438 \begin_layout Itemize
14444 \begin_layout Itemize
14450 \begin_layout Itemize
14456 \begin_layout Itemize
14462 \begin_layout Itemize
14468 \begin_layout Subsection
14469 Differences Between Screen and Paper
14472 \begin_layout Standard
14473 There are slight differences in appearance mainly with the presentation
14474 of section counters.
14475 On screen the trailing period of the section counter is missing but it
14476 will appear in the output so don't let this worry you.
14479 \begin_layout Section
14483 \begin_layout Standard
14489 \begin_layout Subsection
14493 \begin_layout Standard
14494 Memoir is a very powerful and constantly evolving class.
14495 It has been designed with regard to fictional and non-fictional literature.
14496 Its aim is to let the user have maximum control over the typesetting of
14498 Memoir is based on the standard book class, but it can also emulate the
14499 article class (see below).
14502 \begin_layout Standard
14503 Peter Wilson, the developer of Memoir, is known as the author of lots of
14504 useful packages in the LaTeX world.
14505 Most of them have been merged with Memoir.
14506 Therefore, it is much easier to layout the table of contents, appendices,
14507 chapter designs and such.
14508 LyX, though, does not support all of these goodies natively.
14509 Some of them might be added to forthcoming releases
14513 \begin_layout Plain Layout
14514 You are invited to send suggestions to
14515 \begin_inset Flex URL
14518 \begin_layout Plain Layout
14520 lyx-devel@lists.lyx.org
14530 , lots will probably never, due to the limitations of LyX's framework.
14531 Of course you can still use all features with the help of some native LaTeX
14536 \begin_layout Plain Layout
14541 \begin_layout Plain Layout
14551 \begin_inset space ~
14555 \begin_inset CommandInset ref
14557 reference "sec:Inserting-TeX-Code"
14567 In this section, we can only list those features which are natively supported
14569 For detailed descriptions (and for the rest of features) we are recommending
14570 to have a look at the detailed manual of the Memoir class
14574 \begin_layout Plain Layout
14579 \begin_layout Plain Layout
14589 \begin_inset Flex URL
14592 \begin_layout Plain Layout
14594 CTAN:/macros/latex/memoir/memman.pdf
14604 , which is not only a user guide for the class, but also both a comprehensive
14605 description on good typesetting and a superb example for good typesetting
14609 \begin_layout Subsection
14610 Basic features and restrictions
14613 \begin_layout Standard
14614 Memoir supports basically all features of the standard book classes.
14615 There are, however, some differences, as follows:
14618 \begin_layout Description
14620 \begin_inset space ~
14623 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14626 \begin_layout Description
14628 \begin_inset space ~
14631 style: The fancy page style is not supported, due to a command clash between
14632 Memoir and the fancyhdr package (they are both defining a command with
14633 the same name, which confuses LaTeX).
14634 Instead, Memoir comes with a bunch of own page styles (see
14636 Layout\SpecialChar \menuseparator
14637 Document\SpecialChar \menuseparator
14639 \begin_inset space ~
14645 If you want to use these for the chapter pages, you have to use the command
14652 in the main text or in preamble (e.
14653 \begin_inset space \thinspace{}
14657 \begin_inset space \space{}
14664 chapterstyle{companion}
14669 \begin_layout Description
14670 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14671 an optional argument in the standard classes.
14672 With this, you can specify an alternative version of the title for the
14673 table of contents and the headers (for instance, if the title is too long).
14674 In LyX, you can do this via
14676 Insert\SpecialChar \menuseparator
14678 \begin_inset space ~
14683 at the beginning of a chapter/section.
14684 Memoir features a second optional argument and thus separates the table
14685 of contents from the header.
14686 You can define three variants of a title with this: one for the main text,
14687 one for the table of contents, and one for the headers.
14688 Simply insert two optional arguments if you need this feature, the first
14689 one containing the short title for the Table of Contents, the second one
14690 containing an alternative short title for the headers.
14693 \begin_layout Description
14694 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14695 of contents, the list of figures and the list of table start a new page
14697 Memoir does not follow this route.
14698 You have to insert a page break yourself, if you want to have one.
14701 \begin_layout Description
14702 Titlepage: For some unknown reason, Memoir uses pagination on the title
14703 page (in the standard classes, title pages are
14704 \begin_inset Quotes eld
14708 \begin_inset Quotes erd
14712 \begin_inset space \thinspace{}
14716 \begin_inset space \space{}
14720 If you want an empty title page, type
14724 aliaspagestyle{title}{empty}
14729 \begin_layout Description
14730 Article: With the class option
14736 Layout\SpecialChar \menuseparator
14737 Document\SpecialChar \menuseparator
14739 \begin_inset space ~
14744 ), you can emulate article style.
14745 That is, counters (footnotes, figures, tables etc.) will not be reset on
14746 new chapters, chapters don't start a new page (but are—in contrary to
14747 \begin_inset Quotes eld
14751 \begin_inset Quotes erd
14754 article classes—still allowed), parts, though, use their own page, as in
14758 \begin_layout Description
14759 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14760 font commands, which have been used in the old LaTeX version 2.09 (e.
14761 \begin_inset space \thinspace{}
14765 \begin_inset space \space{}
14781 It produces an error and stops LaTeX whenever such a command appears.
14786 reallows the commands and spits out warnings instead (which does at least
14788 Since a lot of packages and particularly BibTeX style files are still using
14789 those commands, we have decided to use this option by default.
14792 \begin_layout Subsection
14796 \begin_layout Standard
14797 We will only describe the features supported by LyX (which is not much currently
14799 Please consult the Memoir manual
14803 \begin_layout Plain Layout
14808 \begin_layout Plain Layout
14818 \begin_inset Flex URL
14821 \begin_layout Plain Layout
14823 CTAN:/macros/latex/memoir/memman.pdf
14836 \begin_layout Description
14837 Abstract: You may wonder why an abstract is an extra feature.
14838 Well, it is in book class.
14839 Usually books don't have abstracts.
14840 Memoir, however, has.
14841 You can use it wherever and how often you like.
14844 \begin_layout Description
14845 Chapterprecis: You may know this from belletristic: The contents of a chapter
14846 is shortly described below the title and also in the table of contents
14848 \begin_inset space \thinspace{}
14852 \begin_inset space \space{}
14857 Our hero arrives in Troia; he loses some friends; he finds others
14860 Chapterprecis does exactly this.
14861 It is therefore only sensible below a chapter.
14864 \begin_layout Description
14865 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14866 The epigraph environment provides an elegant way of typesetting such a
14868 The motto itself (text) and its author (source) are divided by a short
14870 Unfortunately, we have to fool LyX a bit here again, since the environment
14871 needs two arguments (text and source).
14872 In this case, we have to use curly brackets (in TeX mode) between the two
14883 <author of the slogan>.
14886 \begin_layout Description
14887 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14888 complex figurative poems).
14889 LyX can only support a few of them.
14890 One is poemtitle, which is a centered title for poems, which will also
14891 be added to the table of contents (verse is the standard environment for
14893 Memoir has some enhanced versions of verse, but you need to use TeX code,
14894 because they have to be nested inside regular verse environments, which
14895 is not possible with LyX).
14898 \begin_layout Description
14899 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14902 \begin_layout Section
14903 Article (mwart), book (mwbk) and report (mwrep)
14904 \begin_inset Argument
14907 \begin_layout Plain Layout
14920 \begin_layout Standard
14926 \begin_layout Standard
14927 The LyX document classes
14943 correspond to the LaTeX document classes
14956 They are replacements for the standard document classes
14968 , resp., and fit better to Polish typography conventions in a number of points.
14972 \begin_layout Standard
14976 \begin_layout Itemize
14977 Unnumbered titles (with star, e.
14978 \begin_inset space \thinspace{}
14982 \begin_inset space \space{}
14989 ) are added into table of contents,
14992 \begin_layout Itemize
14993 Additional page styles:
14997 \begin_layout Description
14998 uheadings header with separated lines,
15001 \begin_layout Description
15002 myheadings custom header, contents headers via commands:
15017 \begin_layout Description
15018 myuheadings custom header with separated lines,
15021 \begin_layout Description
15022 outer page number is placed on outer side of page
15026 \begin_layout Itemize
15031 \begin_layout Description
15032 rmheadings serif titles — default,
15035 \begin_layout Description
15036 sfheadings sansserif titles,
15039 \begin_layout Description
15040 authortitle on title page first placed is author next title — default,
15043 \begin_layout Description
15044 titleauthor on title page first placed is title next author,
15047 \begin_layout Description
15048 withmarginpar reserve place on page for margins.
15052 \begin_layout Section
15056 \begin_layout Standard
15061 provides an alternative to the standard
15066 It provides similar functionality, but you might prefer this layout with
15067 sans serif sections, headings, and more.
15070 \begin_layout Section
15074 \begin_layout Standard
15080 \begin_layout Standard
15081 \begin_inset VSpace bigskip
15087 \begin_layout Standard
15092 \begin_inset space ~
15097 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15098 \begin_inset Formula $\beta$
15101 release of May, 1999) class.
15104 \begin_layout Standard
15109 textclass, which works with RevTeX 3.1.
15110 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15111 That means that it doesn't interact very well with LyX, which requires
15112 LaTeX2e, although it has been kludged to work.
15113 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15117 \begin_inset space ~
15122 textclass should also be pretty easy to use.
15125 \begin_layout Standard
15126 These documents are supposed to be used in
15130 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15131 macros, and assume you'll know what to put in the preamble if necessary.
15134 \begin_layout Subsection
15138 \begin_layout Standard
15139 All you need to do is install RevTeX 4, as described in the package's README
15141 The package can be found at The RevTeX 4 Web Site
15142 \begin_inset Flex URL
15145 \begin_layout Plain Layout
15147 http://publish.aps.org/revtex4/
15153 Install it somewhere that LaTeX can see it.
15154 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15156 \begin_inset space \thinspace{}
15160 \begin_inset space \space{}
15163 not the directory where you installed the class file.) Then, if you reconfigure
15164 LyX, it will find the class file and let you use the RevTeX4 textclass.
15167 \begin_layout Standard
15168 Probably the easiest way to get started is either to import a RevTeX 4 document
15176 \begin_inset space ~
15181 template, found in the templates directory.
15184 \begin_layout Subsection
15188 \begin_layout Standard
15189 Optional arguments to
15196 \begin_inset Quotes eld
15200 \begin_inset Quotes erd
15204 \begin_inset Quotes eld
15208 \begin_inset Quotes erd
15218 \begin_inset space ~
15226 \begin_inset space ~
15232 Remember that in RevTeX, at least one optional argument is required!
15235 \begin_layout Standard
15236 Other preamble matter, like
15243 \begin_inset space ~
15249 \begin_inset space ~
15254 dialog, also as usual.
15257 \begin_layout Subsection
15261 \begin_layout Standard
15262 The layouts basically correspond to the commands in RevTeX4.0.
15263 For example, the Email layout corresponds to
15270 Note that (at least as of RevTeX 4.0 Beta), the
15278 layouts are exactly equivalent, so you shouldn't need to use both.
15282 \begin_layout Plain Layout
15283 In case you're curious, both were included so that
15287 would be able to translate both
15307 \begin_layout Subsection
15311 \begin_layout Standard
15312 There are a couple of important unique aspects of RevTeX 4 which might cause
15313 bugs that will be even more confusing in LyX.
15316 \begin_layout Standard
15334 The LyX equivalent is that there is a separate Thanks layout.
15339 write footnotes in the
15343 layout, or weird things may happen.
15344 See the RevTeX 4 documentation for more details.
15347 \begin_layout Standard
15351 \begin_inset space ~
15359 \begin_inset space ~
15368 layouts must be placed
15376 layout and the corresponding
15393 , the LaTeX won't compile.
15396 \begin_layout Subsection
15400 \begin_layout Standard
15401 The main problem with this layout is that you can't use the optional arguments
15402 to layouts like Email and Title.
15403 (The problem is not unique to this layout; you can't use optional arguments
15404 to the Section layouts either.) This means that after you export that file
15405 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15406 need to edit the LaTeX file with a text editor to add the optional arguments
15408 \begin_inset space \thinspace{}
15412 \begin_inset space \space{}
15415 the running title for the page headers.
15416 Lacking these layouts makes the
15422 (and the equivalent
15428 ) useless, so the corresponding layouts don't exist, and will have to be
15433 \begin_layout Plain Layout
15438 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15439 has not been updated yet to take advantage of it.
15447 \begin_layout Section
15448 Springer Journals (
15455 \begin_layout Standard
15461 \begin_layout Subsection
15465 \begin_layout Standard
15466 These are the layout files for some of the journal formats used by Springer
15467 Verlag and listed on
15468 \begin_inset Flex URL
15471 \begin_layout Plain Layout
15473 http://www.springer.de/author/tex/help-journals.html
15478 , where you should also go to fetch the class files (yes, these are LaTeX2e
15480 It is a modular system: the things common to all journals are implemented
15485 , which journal-specific layout files (such as, e.
15486 \begin_inset space \thinspace{}
15490 \begin_inset space \space{}
15497 for Journal of Geodesy) can include.
15500 \begin_layout Standard
15501 This means that implementing support for any other Springer journal on this
15502 list is as simple as writing your own
15510 file following the outline given in
15518 \begin_layout Standard
15519 It is reasonably well tested only for the Journal of Geodesy.
15528 come with the standard LyX distribution.
15529 Install the relevant class file (downloaded from Springer) in a proper
15530 directory, reconfigure LaTeX (in the teTeX case by running
15534 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15535 and it should work.
15538 \begin_layout Subsection
15542 \begin_layout Standard
15543 A large number of theorem-like styles —
15549 \SpecialChar \ldots{}
15555 \begin_layout Standard
15558 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15559 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15562 See the Springer class file documentation for details.
15565 \begin_layout Subsection
15569 \begin_layout Itemize
15581 \begin_layout Itemize
15584 Probability Theory and Related Fields
15590 — Jean-Marc Lasgouttes
15593 \begin_layout Standard
15594 Add your own, it isn't so hard!
15597 \begin_layout Subsection
15601 \begin_layout Standard
15602 These files are partly based on the older
15606 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15607 file from Springer.
15612 layout, are now defunct.
15613 Jean-Marc Lasgouttes helped out big in making me find my way around the
15614 LyX layout file mechanism.
15617 \begin_layout Subsection
15621 \begin_layout Standard
15623 But probably less than in the old hacked-LaTeX
15630 \begin_layout Standard
15632 \begin_inset space \thinspace{}
15635 g.: does not display the number for theorem-like layouts, just #.
15638 \begin_layout Section
15644 \begin_inset CommandInset label
15653 \begin_layout Standard
15661 \begin_layout Subsection
15665 \begin_layout Standard
15666 This section describes how to use LyX to make slides for overhead projectors.
15667 There are two document classes that can do this: the default slides class
15673 This section documents the former.
15676 \begin_layout Standard
15677 I'm going to say this again, nice and clear, so that there's no misunderstanding
15681 \begin_layout Standard
15682 \begin_inset VSpace bigskip
15688 \begin_layout Standard
15692 This section documents the class
15693 \begin_inset Quotes eld
15701 \begin_inset Quotes erd
15709 \begin_layout Standard
15710 \begin_inset VSpace bigskip
15716 \begin_layout Standard
15717 If you're looking for the documentation for
15718 \begin_inset Quotes eld
15726 \begin_inset Quotes erd
15729 , check out section
15730 \begin_inset space ~
15734 \begin_inset CommandInset ref
15736 reference "sec:foiltex"
15746 \begin_inset Quotes eld
15754 \begin_inset Quotes erd
15757 ] is actually somewhat better than the default
15765 \begin_layout Plain Layout
15766 \SpecialChar \ldots{}
15767 or so I've been told repeatedly by its advocates.
15768 Having never used it, I have no idea if this claim is true or not.
15773 which this section documents.
15776 \begin_layout Standard
15777 This class is the LaTeX2e improvement of the old
15782 Every LaTeX2e distribution includes this class [which I'll just refer to
15784 \begin_inset Quotes eld
15792 \begin_inset Quotes erd
15795 from now on], so you're bound to have it.
15796 As I noted earlier, there are other classes, such as
15800 , which also produce slides for overhead projectors and do a better job
15802 However, there are some things which
15806 can do which the others can't, such as generate overlays.
15807 Read on to learn more!
15810 \begin_layout Subsection
15812 \begin_inset CommandInset label
15814 name "sec:slidesetup"
15821 \begin_layout Standard
15822 Obviously, to use this document class, you need to select
15823 \begin_inset Quotes eld
15831 \begin_inset Quotes erd
15834 from the class list in the
15836 Document\SpecialChar \menuseparator
15840 There are some other special things you should know about this class:
15843 \begin_layout Itemize
15844 Don't bother changing the options
15849 They're not supported by the
15856 \begin_layout Itemize
15860 \begin_inset space ~
15865 behaves a bit differently for this class.
15866 The possible choices and what they do are as follows:
15870 \begin_layout Description
15875 The final output contains page numbers in the lower right corner.
15878 \begin_layout Description
15887 , but also prints out any time markers you've put in.
15888 This is the default.
15891 \begin_layout Description
15896 The final output contains no page numbers, time markers, or alignment markers.
15900 \begin_layout Itemize
15905 class has an extra option:
15911 \begin_inset Quotes eld
15919 \begin_inset Quotes erd
15922 in the extra class options.
15926 \begin_layout Standard
15927 Using this options allows you to add time markers to
15933 \begin_inset space ~
15937 \begin_inset CommandInset ref
15939 reference "sec:slideNote"
15947 \begin_layout Standard
15948 You can also use the template file
15949 \begin_inset Quotes eld
15957 \begin_inset Quotes erd
15960 to automatically set up a document to use the
15966 File\SpecialChar \menuseparator
15968 \begin_inset space ~
15972 \begin_inset space ~
15977 to open your new document].
15978 The template file also contains some examples of the special paragraph
15979 environments used by this class.
15980 I'll describe those next.
15983 \begin_layout Subsection
15984 Paragraph Environments
15987 \begin_layout Subsubsection
15988 Supported Environments
15991 \begin_layout Standard
15992 The first thing you'll notice when you start up a new
15996 document is the font size and type: it's the equivalent of the size
15997 \begin_inset Quotes eld
16005 \begin_inset Quotes erd
16011 \begin_inset space ~
16017 This is also what's used in the output.
16019 \begin_inset Quotes eld
16023 \begin_inset Quotes erd
16026 to remind you that this is a slide.
16027 Your final slides will use a larger font; ergo, you'll have less space.
16028 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16031 \begin_layout Standard
16032 The next thing that becomes obvious is the changes to the paragraph environment
16033 pull-down box [at the far-left end of the toolbar].
16034 Most of the paragraph environments you're used to seeing are missing.
16035 There are also five new ones.
16040 class itself only supports certain paragraph environments:
16043 \begin_layout Itemize
16049 \begin_layout Itemize
16055 \begin_layout Itemize
16061 \begin_layout Itemize
16067 \begin_layout Itemize
16073 \begin_layout Itemize
16079 \begin_layout Itemize
16085 \begin_layout Itemize
16091 \begin_layout Itemize
16097 \begin_layout Itemize
16103 \begin_layout Itemize
16109 \begin_layout Standard
16110 All of the other standard environments, including the section-heading environmen
16111 ts, aren't used in the
16118 \begin_layout Standard
16119 On the other hand, you'll notice the following new environments:
16122 \begin_layout Itemize
16128 \begin_layout Itemize
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Itemize
16152 \begin_layout Standard
16153 These five are kind of quirky, due to a
16154 \begin_inset Quotes eld
16158 \begin_inset Quotes erd
16162 You see, LyX doesn't permit you to nest any other paragraph environment
16163 into an empty environment.
16164 Now, that's fine and dandy, but it means that you wouldn't be able to start
16165 a slide with anything except plain text.
16166 To deal with this, I've performed a little
16167 \begin_inset Quotes eld
16171 \begin_inset Quotes erd
16177 \begin_layout Subsubsection
16178 Quirks of the New Environments
16179 \begin_inset CommandInset label
16181 name "sec:slideQuirk"
16188 \begin_layout Standard
16189 All five of the new paragraph environments are somewhat quirky due to inherent
16190 limitiations in the current version of LyX.
16191 As I just mentioned, LyX forbids environments that begin with another environme
16193 To get around this, the
16197 environment isn't a paragraph environment as described in the
16205 \begin_layout Standard
16206 You should consider
16219 \begin_inset Quotes eld
16222 pseudo-environments.
16223 \begin_inset Quotes erd
16226 They look like a section heading or a
16227 \begin_inset Quotes eld
16235 \begin_inset Quotes erd
16238 but really begin a [and, if necessary, end the previous] paragraph environment.
16248 \begin_inset Quotes eld
16252 \begin_inset Quotes erd
16255 These two perform some action.
16258 \begin_layout Standard
16259 A common feature of all five environments,
16279 , is a rather long-ish label.
16280 The text following this label — ordinarily the contents of the paragraph
16281 environment — is utterly irrelevant for
16302 LyX completely ignores it.
16303 In fact, you can leave these five environments completely empty.
16307 \begin_layout Standard
16312 to put any text after the rather long-ish label, you might want to.
16313 This could be a short description of the contents of the
16318 In that case, enter in your descriptive comment and hit
16322 as you normally would.
16325 \begin_layout Standard
16326 If, on the other hand, you don't want to enter in any descriptive text,
16327 you'll hit another LyX quirk.
16328 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16329 environment until you put something in the old one.
16333 \begin_layout Itemize
16334 Start entering the text that will
16362 \begin_layout Itemize
16363 Now move to the beginning of that paragraph.
16367 \begin_layout Itemize
16376 \begin_layout Itemize
16377 Finally, change this new, empty paragraph to a
16401 \begin_layout Standard
16402 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16406 \begin_layout Subsection
16407 Making a Presentation with
16420 \begin_layout Subsubsection
16428 \begin_layout Standard
16429 If you're expecting this section to teach you how to actually make a presentatio
16430 n, you'll be sorely disappointed.
16431 Naturally, I'll describe all of the ways the
16435 class can assist you in preparing the materials for a presentation.
16436 Filling in the contents, however, is up to you.
16441 the LyX philosophy.]
16444 \begin_layout Standard
16449 environment [in the manner described in section
16450 \begin_inset space ~
16454 \begin_inset CommandInset ref
16456 reference "sec:slideQuirk"
16460 ] tells LyX to begin a new slide [duh].
16461 The label for this environment/
16462 \begin_inset Quotes erd
16466 \begin_inset Quotes erd
16470 \begin_inset Quotes eld
16474 \begin_inset Quotes erd
16477 in cool blue, followed by the label,
16478 \begin_inset Quotes eld
16482 \begin_inset Quotes erd
16486 Any text or paragraph environments that follow this one go on the new slide.
16490 \begin_layout Standard
16491 Slides are probably the only time you'll need to forcibly end pages in LyX
16492 (this can be specified in the
16497 In fact, you'll want to, once you finish entering the contents of one slide.
16498 If you've entered more text than can physically fit on a slide, the extra
16499 overflows onto a new slide.
16500 I don't recommend doing this, however, since the overflow slide won't have
16501 any page number on it.
16502 Furthermore, it may interfere with any
16506 you've made to accompany the oversized
16513 \begin_layout Standard
16522 environments work the same way as the
16527 They both create an
16528 \begin_inset Quotes eld
16532 \begin_inset Quotes erd
16535 followed by a label [
16536 \begin_inset Quotes eld
16540 \begin_inset Quotes erd
16544 \begin_inset Quotes eld
16548 \begin_inset Quotes erd
16552 The color is a stunning magenta instead of blue, and the
16553 \begin_inset Quotes eld
16557 \begin_inset Quotes erd
16560 will look different, in style and in length.
16561 The label fonts of all three also differ from one another.
16564 \begin_layout Standard
16569 , if the contents of a
16577 exceed the physical size of a slide or sheet of paper, the extra will overflow
16579 Again, you should avoid this.
16580 It defeats the whole purpose of
16591 \begin_layout Subsubsection
16601 \begin_layout Standard
16606 is a slide that sits atop another slide.
16607 Perhaps you wish to discuss a figure on the main
16611 before displaying the text associated with it.
16612 One way to accomplish this is tape a flap of dark paper over the part of
16617 you want to display later.
16618 This method fails, however, if you wish to overlap one graph with another,
16620 You would then have to fumble while speaking to align the two separate,
16625 s to align the two graphs.
16630 environment in both cases makes life much easier.
16633 \begin_layout Standard
16638 receives the page number of its
16639 \begin_inset Quotes eld
16643 \begin_inset Quotes erd
16651 \begin_inset Quotes eld
16659 \begin_inset Quotes erd
16666 \begin_layout Plain Layout
16667 Presumably, mutliple
16672 \begin_inset Quotes eld
16680 \begin_inset Quotes erd
16684 \begin_inset Quotes eld
16692 \begin_inset Quotes erd
16696 \begin_inset Quotes eld
16704 \begin_inset Quotes erd
16708 \begin_inset space ~
16711 appended to the page number of the parent
16721 Clearly, you want the contents of both the
16729 to each fit on a single physical slide! You should probably consider an
16735 \begin_inset Quotes eld
16739 \begin_inset Quotes erd
16751 class provides a visual cue for this: the label at the start of an
16755 is shorter than that at the start of a
16760 Lastly, when you generate printable output, you'll find alignment markers
16761 in all four corners of both the
16765 page and its parent
16770 These will assist you in lining up the two physical slides.
16773 \begin_layout Standard
16774 The major problem in overlaying two slides is aligning the contents of the
16775 two transparencies.
16776 How much space should you leave for that graph on the second slide? Worse
16777 still, what if you want a graph and a sentence on second slide, but there
16778 is text on the main transparency that goes in between them? You could try
16779 and insert vertical space of the right size.
16780 The better way is to use
16791 \begin_layout Standard
16792 As their names imply,
16800 are two command-like paragraph environments that make all subsequent text
16801 invisible and visible, respectively.
16803 \begin_inset space ~
16807 \begin_inset CommandInset ref
16809 reference "sec:slideQuirk"
16813 that you don't place anything
16817 these two environments, however.
16822 , it inserts a centered, sky-blue label into the page reading
16823 \begin_inset Quotes eld
16826 <Invisible Text Follows>
16827 \begin_inset Quotes erd
16831 For paragraphs following this label, the parts of the
16839 ; it doesn't matter which] where they would be contain instead blank space.
16843 \begin_layout Standard
16848 , the corresponding centered label is
16849 \begin_inset Quotes eld
16852 <Visible Text Follows>
16853 \begin_inset Quotes erd
16857 Paragraphs following this label behave normally.
16858 Note that the beginning of a new
16870 automatically shuts off an
16875 It's therefore not necessary to use
16886 \begin_layout Standard
16887 By now, it should be obvious how to create overlay transparencies using
16888 the proper combination of
16907 \begin_layout Enumerate
16912 , including everything that will appear on it, whether on the main slide
16920 \begin_layout Enumerate
16921 Before each figure or paragraph that will appear only on the
16930 If necessary, insert a
16934 environment after the
16941 \begin_layout Enumerate
16946 immediately following the
16953 \begin_layout Enumerate
16954 Copy the contents of this
16965 \begin_layout Enumerate
16970 , change all of the
16981 \begin_layout Standard
16983 You've just made an
16990 \begin_layout Standard
16991 There's one problem with the way I've designed the LyX
16995 class: you can't make text in the middle of a paragraph invisible, nor
16996 make text in the middle of an invisible paragraph visible again.
16997 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17001 \begin_layout Plain Layout
17002 The commands of interest are:
17005 \begin_layout Itemize
17010 invisible \SpecialChar \ldots{}
17014 \begin_layout Itemize
17019 visible \SpecialChar \ldots{}
17023 \begin_layout Plain Layout
17024 \SpecialChar \ldots{}
17025 and need to be marked as TeX.
17027 \begin_inset Quotes eld
17031 \begin_inset Quotes erd
17034 you wish to change goes in between the brackets [and after the
17047 If you don't know how to mark text as TeX, see the appropriate section
17060 \begin_layout Subsubsection
17070 \begin_inset CommandInset label
17072 name "sec:slideNote"
17079 \begin_layout Standard
17088 is associated with a
17089 \begin_inset Quotes eld
17093 \begin_inset Quotes erd
17105 class provides visual cues.
17110 is shorter than that of a
17114 [yet longer than that of an
17118 ] and, like the label of an
17122 is shockingly magenta.
17123 Additionally, the printed
17127 has the page number of its
17128 \begin_inset Quotes eld
17132 \begin_inset Quotes erd
17140 \begin_inset Quotes eld
17148 \begin_inset Quotes erd
17152 \begin_inset Quotes eld
17160 \begin_inset Quotes erd
17164 \begin_inset Quotes eld
17172 \begin_inset Quotes erd
17176 You can have multiple
17180 s associated with a single
17192 , you'll probably want to break up long
17196 s so that they fit on a single sheet of paper.
17199 \begin_layout Standard
17204 is obvious: it contains anything additional you might want to say about
17210 It could also be used as a sheet of reminders for a particular
17215 In the case of the latter, you might want to make use of time markers.
17221 \begin_inset Quotes eld
17225 \begin_inset Quotes erd
17228 support for time markers, a
17233 So, you'll have to resort to using the LaTeX codes.
17236 \begin_layout Standard
17237 To use time markers, you'll need to specify the extra class option
17238 \begin_inset Quotes eld
17246 \begin_inset Quotes erd
17250 \begin_inset space ~
17254 \begin_inset CommandInset ref
17256 reference "sec:slidesetup"
17261 This option turns on timing marks, which will appear in the lower-left-hand
17267 To set what appears in the time marker, you use the LaTeX commands
17268 \begin_inset Quotes eld
17278 \begin_inset Quotes erd
17282 \begin_inset Quotes eld
17292 \begin_inset Quotes erd
17296 The arguments of both commands are time measured in seconds.
17298 \begin_inset Quotes eld
17308 \begin_inset Quotes erd
17311 sets the time marker to a given time.
17313 \begin_inset Quotes eld
17323 \begin_inset Quotes erd
17326 increments the time marker by the specified amount.
17327 Using time markers and
17331 s in this fashion, you can remind yourself how much time to spend on a particula
17339 \begin_layout Standard
17340 There's one last feature to describe.
17341 Clearly, you'd like to print out all of your
17349 s on transparencies while printing all of your
17366 with which it is associated.
17367 What's a person to do?
17370 \begin_layout Standard
17371 Luckily, there are two LaTeX commands that allow you to select what to print
17373 Both must be placed into the preamble of your document.
17375 \begin_inset Quotes eld
17387 \begin_inset Quotes erd
17390 will cause the output to contain only the
17399 Correspondingly, the command
17400 \begin_inset Quotes eld
17412 \begin_inset Quotes erd
17415 prevents the output of anything but
17420 I'd advise placing both commands in the preamble and initially comment
17422 You can then preview your entire presentation as you write.
17423 When you're done writing, you can then uncomment one of the two to select
17424 what you want to print.
17425 I like to uncomment
17426 \begin_inset Quotes eld
17438 \begin_inset Quotes erd
17441 , print to a file with
17442 \begin_inset Quotes eld
17450 \begin_inset Quotes erd
17453 in its name, comment it back out, then uncomment
17454 \begin_inset Quotes eld
17466 \begin_inset Quotes erd
17470 \begin_inset Quotes eld
17478 \begin_inset Quotes erd
17482 I can then send either file to a printer, loading transparencies or plain
17483 paper as appropriate.
17486 \begin_layout Standard
17487 You can also provide other arguments to the
17488 \begin_inset Quotes eld
17498 \begin_inset Quotes erd
17502 \begin_inset Quotes eld
17512 \begin_inset Quotes erd
17516 See a good LaTeX book for details.
17519 \begin_layout Subsection
17524 Class Template File
17527 \begin_layout Standard
17528 I have also provided a template file,
17529 \begin_inset Quotes eld
17537 \begin_inset Quotes erd
17545 To use it, begin your new presentation with
17550 ile\SpecialChar \menuseparator
17552 \begin_inset space ~
17556 \begin_inset space ~
17566 Your new LyX presentation file will contain an example
17587 additionally contain an example of the use of
17596 Lastly, the preamble will contain:
17599 \begin_layout LyX-Code
17600 % Uncomment to print out only slides and overlays
17603 \begin_layout LyX-Code
17607 \begin_layout LyX-Code
17613 \begin_inset Newline newline
17619 \begin_layout LyX-Code
17620 % Uncomment to print out only notes
17623 \begin_layout LyX-Code
17627 \begin_layout LyX-Code
17635 \begin_layout Standard
17636 One final thing: I created this class to support the LaTeX2e
17637 \begin_inset Quotes eld
17645 \begin_inset Quotes erd
17648 class, one of the built-in LaTeX2e classes.
17649 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17650 built-in slide class.
17651 It's here if you want it or need it.
17652 There exist other LaTeX2e classes for creating presentations, such as the
17658 \begin_inset space ~
17662 \begin_inset CommandInset ref
17664 reference "sec:foiltex"
17669 \begin_inset Quotes eld
17677 \begin_inset Quotes erd
17680 package [present on some TeX distributions].
17681 The latter is not yet supported under LyX.
17685 \begin_layout Plain Layout
17686 Perhaps you can take on the task\SpecialChar \ldots{}
17692 I know nothing about these other classes.
17693 Try them out to see what sort of alternative they provide.
17696 \begin_layout Chapter
17697 LyX Features needing Extra Software
17700 \begin_layout Section
17704 \begin_layout Standard
17710 \begin_layout Subsection
17714 \begin_layout Standard
17723 \begin_layout Plain Layout
17728 is not yet available when you are using the LaTeX distribution MiKTeX.
17733 , you'll find in the
17740 \begin_inset space ~
17751 \begin_inset CommandInset href
17753 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17760 \begin_layout Standard
17765 package is a program that was written by
17766 \begin_inset Flex CharStyle:Noun
17769 \begin_layout Plain Layout
17771 \begin_inset space ~
17779 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17780 and easy to forget.
17781 The program runs over your LaTeX file, checks the integrity of the file,
17782 and flags some common errors.
17783 In other technical words, it is
17790 \begin_layout Standard
17791 Well, what is a syntax checker doing in LyX which is supposed to produce
17792 correct LaTeX anyways? The answer is simple: Just as
17796 not only checks the
17800 of C programs, but also does
17804 checks for type-errors,
17808 catches some common
17812 errors, in addition to the syntactical ones.
17817 is capable of detecting several common errors, such as
17820 \begin_layout Itemize
17821 Ellipsis detection:
17822 \begin_inset Newline newline
17825 Use \SpecialChar \ldots{}
17829 \begin_layout Itemize
17830 No space in front of/after parenthesis:
17831 \begin_inset Newline newline
17837 \begin_layout Itemize
17838 Enforcement of normal space after common abbreviations:
17839 \begin_inset Newline newline
17843 \begin_inset space \thinspace{}
17847 \begin_inset space \space{}
17850 is too wide spacing.
17853 \begin_layout Itemize
17854 Enforcement of end-of-sentence space when the last sentence ends with a
17856 \begin_inset Newline newline
17860 And this is wrong spacing.
17863 \begin_layout Itemize
17864 Space in front of labels and similar commands:
17865 \begin_inset Newline newline
17868 The label should stick right up to the text to avoid falling to a wrong
17871 \begin_inset CommandInset label
17881 \begin_layout Plain Layout
17882 This footnote is in danger of falling off to a wrong page
17887 The label is separated too much.
17890 \begin_layout Itemize
17891 Space in front of references, instead of hard spaces:
17892 \begin_inset Newline newline
17895 In you are in bad luck, the text will break right between the referenced
17896 text and reference number, and that's a pity.
17898 \begin_inset CommandInset ref
17900 reference "sec:chktex"
17907 \begin_layout Itemize
17909 \begin_inset Quotes eld
17913 \begin_inset Quotes erd
17917 \begin_inset Formula $\times$
17921 \begin_inset Newline newline
17924 2x2 looks cheap compared to
17925 \begin_inset Formula $2\times2$
17931 \begin_layout Standard
17932 and more \SpecialChar \ldots{}
17933 It is an invaluable tool when you are
17934 \begin_inset Quotes eld
17938 \begin_inset Quotes erd
17941 your document before printing, and you should run it right after the obligatory
17942 spelling check, and before you go fine tuning the typesetting.
17945 \begin_layout Subsection
17949 \begin_layout Standard
17950 If you have the program installed, usage is as simple as choosing
17952 Tools\SpecialChar \menuseparator
17954 \begin_inset space ~
17960 This will make LyX generate a LaTeX file of your document, start
17964 to check it, and then make LyX insert
17965 \begin_inset Quotes eld
17969 \begin_inset Quotes erd
17972 with the warnings from
17976 , if there were any.
17977 The warnings will be placed close to the point of the mistake, and you
17978 can quickly find them by using the
17980 Navigate\SpecialChar \menuseparator
17983 menu item, or the shortcut key
17992 Open the error boxes by clicking on them with the mouse, or use the shortcut
18001 bindings, or the corresponding
18010 Read the warning and correct the mistake, if it is a mistake.
18011 If you have trouble understanding what the warning is about, you can safely
18013 Remember that there is a hidden layer between the document on screen and
18014 the technical details in invoking
18018 , and this gap can make some warnings seem arcane or just right down plain
18022 \begin_layout Standard
18023 This document is an excellent testing bed for the feature, and it should
18024 provide quite a few warnings for you to fiddle with.
18025 Since computers are only so smart, expect most of the warnings to be false
18029 \begin_layout Subsection
18030 How to fine tune it
18033 \begin_layout Standard
18034 Sometimes, you'll find that
18038 makes more noise than suits your mood.
18039 Then you can choose not to use it, wait until your mood changes, or try
18044 to get better along with you.
18045 Another choice in the most desperate situations is to use
18047 View\SpecialChar \menuseparator
18049 \begin_inset space ~
18053 \begin_inset space ~
18057 \begin_inset space ~
18062 , which will get rid of all warnings instantly.
18065 \begin_layout Standard
18074 very configurable and extensible, you shouldn't expect to solve all problems
18080 Since LyX has to generate a somewhat special LaTeX file to be able to match
18081 the line numbers from the
18089 \begin_layout Plain Layout
18090 You can inspect the specific output from
18096 Edit\SpecialChar \menuseparator
18098 \begin_inset space ~
18102 \begin_inset space ~
18116 to the internal document structure, some of the warnings will not seen
18117 to appear correctly.
18118 There are two things you can do about this:
18121 \begin_layout Itemize
18126 invocation command line in
18142 installation configuration file (usually with the file
18147 See below to learn what warnings can be enabled and disabled on the command
18152 \begin_layout Itemize
18153 Export your document as a raw LaTeX file using
18155 File\SpecialChar \menuseparator
18156 Export\SpecialChar \menuseparator
18164 Invoked in this way, it can be a hassle to find the corresponding place
18165 in the document inside LyX, but with a little patience, you should be able
18169 \begin_layout Standard
18170 Here follows the warning messages that can be enabled and disabled in
18179 to disable a warning, and
18183 to enable a warning.
18184 The emphasized entries are disabled by default, because the default is
18187 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18192 \begin_layout Standard
18193 Notice that you should only use the options that enable and disable warnings,
18194 because LyX relies on some of the other command line parameters to be set
18195 in a specific way to have a chance to communicate with
18202 \begin_layout Enumerate
18206 Command terminated with space.
18209 \begin_layout Enumerate
18212 Non-breaking space (
18213 \begin_inset Quotes eld
18221 \begin_inset Quotes erd
18224 ) should have been used.
18227 \begin_layout Enumerate
18231 You should enclose the previous parenthesis with
18232 \begin_inset Quotes eld
18240 \begin_inset Quotes erd
18246 \begin_layout Enumerate
18249 Italic correction (
18250 \begin_inset Quotes eld
18260 \begin_inset Quotes erd
18263 ) found in non-italic buffer.
18266 \begin_layout Enumerate
18269 Italic correction (
18270 \begin_inset Quotes eld
18280 \begin_inset Quotes erd
18283 ) found more than once.
18286 \begin_layout Enumerate
18290 No italic correction (
18291 \begin_inset Quotes eld
18301 \begin_inset Quotes erd
18307 \begin_layout Enumerate
18311 \begin_inset Quotes eld
18319 \begin_inset Quotes erd
18323 \begin_inset Quotes eld
18331 \begin_inset Quotes erd
18337 \begin_layout Enumerate
18340 Wrong length of dash may have been used.
18343 \begin_layout Enumerate
18347 \begin_inset Quotes eld
18355 \begin_inset Quotes erd
18359 \begin_inset Quotes eld
18367 \begin_inset Quotes erd
18373 \begin_layout Enumerate
18377 \begin_inset Quotes eld
18385 \begin_inset Quotes erd
18391 \begin_layout Enumerate
18395 \begin_inset Quotes eld
18403 \begin_inset Quotes erd
18406 to achieve an ellipsis.
18409 \begin_layout Enumerate
18412 Inter-word spacing (
18413 \begin_inset Quotes eld
18423 \begin_inset Quotes eld
18426 ) should perhaps be used.
18429 \begin_layout Enumerate
18432 Inter-sentence spacing (
18433 \begin_inset Quotes eld
18443 \begin_inset Quotes erd
18446 ) should perhaps be used.
18449 \begin_layout Enumerate
18452 Could not find argument for command.
18455 \begin_layout Enumerate
18459 \begin_inset Quotes eld
18467 \begin_inset Quotes erd
18473 \begin_layout Enumerate
18476 Math mode still on at end of LaTeX file.
18479 \begin_layout Enumerate
18483 \begin_inset Quotes eld
18491 \begin_inset Quotes erd
18494 doesn't match the number of
18495 \begin_inset Quotes eld
18503 \begin_inset Quotes erd
18509 \begin_layout Enumerate
18512 You should use either
18515 \begin_inset Quotes eld
18523 \begin_inset Quotes erd
18528 as an alternative to
18529 \begin_inset Quotes eld
18537 \begin_inset Quotes erd
18543 \begin_layout Enumerate
18550 " (ASCII 39) instead of "
18557 \begin_layout Enumerate
18560 User-specified pattern found.
18563 \begin_layout Enumerate
18566 This command might not be intended.
18569 \begin_layout Enumerate
18576 \begin_layout Enumerate
18594 \begin_layout Enumerate
18597 Delete this space to maintain correct page references.
18600 \begin_layout Enumerate
18604 You might wish to put this between a pair of
18605 \begin_inset Quotes eld
18613 \begin_inset Quotes erd
18619 \begin_layout Enumerate
18622 You ought to remove spaces in front of punctuation.
18625 \begin_layout Enumerate
18628 Could not execute LaTeX command.
18631 \begin_layout Enumerate
18640 in front of small punctuation.
18643 \begin_layout Enumerate
18651 may look prettier here.
18654 \begin_layout Enumerate
18658 Multiple spaces detected in output.
18661 \begin_layout Enumerate
18664 This text may be ignored.
18667 \begin_layout Enumerate
18673 \begin_inset Quotes eld
18678 to begin quotation, not
18685 \begin_layout Enumerate
18692 to end quotation, not
18695 \begin_inset Quotes eld
18703 \begin_layout Enumerate
18709 \begin_layout Enumerate
18712 You should perhaps use
18713 \begin_inset Quotes eld
18721 \begin_inset Quotes erd
18727 \begin_layout Enumerate
18730 You should put a space in front of/after parenthesis.
18733 \begin_layout Enumerate
18736 You should avoid spaces in front of/after parenthesis.
18739 \begin_layout Enumerate
18743 You should not use punctuation in front of/after quotes.
18746 \begin_layout Enumerate
18749 Double space found.
18752 \begin_layout Enumerate
18755 You should put punctuation outside inner/inside display math mode.
18758 \begin_layout Enumerate
18761 You ought to not use primitive TeX in LaTeX code.
18764 \begin_layout Enumerate
18767 You should remove spaces in front of
18768 \begin_inset Quotes eld
18776 \begin_inset Quotes erd
18782 \begin_layout Enumerate
18785 \begin_inset Quotes eld
18793 \begin_inset Quotes erd
18796 is normally not followed by
18797 \begin_inset Quotes eld
18805 \begin_inset Quotes erd
18811 \begin_layout Standard
18812 In later versions of LyX, we hope to provide a more complete interface to
18813 this tool (and it's smaller cousin
18817 ) to exploit the full power of it.
18818 But it's not exactly useless as it is now: go try it on one of your existing
18819 documents of a certain length and be surprised.
18822 \begin_layout Section
18823 Version Control in LyX
18826 \begin_layout Standard
18829 Lars Gullik Bjønnes
18836 \begin_layout Subsection
18840 \begin_layout Standard
18841 A friend of mine wanted to try LyX for a group project.
18842 When he didn't find support for version control or file locking, he dropped
18844 This angered me a bit, so I thought that I should at least make support
18845 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18846 This has now been done.
18847 LyX now supports some of the most basic RCS commands.
18848 If you need to something a bit more sophisticated you will have to do that
18849 manually in a terminal.
18852 \begin_layout Standard
18853 Before you begin to use the version control features in LyX, you should
18855 \begin_inset Quotes eld
18859 \begin_inset Quotes erd
18862 (a man file, read it with
18867 This file describes all the basic features of RCS.
18868 You should especially notice the comment about a RCS directory, and the
18869 notion of a master RCS file (the file ending in
18876 \begin_layout Standard
18877 Later basic CVS/SVN support was added.
18878 You should be familiar with CVS/SVN usage before start using it under LyX.
18879 Most of the log messages are not currently displayed after operations -
18880 you can check them in Messages pane if unsure.
18883 \begin_layout Standard
18884 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18885 package—no guarantees are made for older versions.
18888 \begin_layout Standard
18889 For introducing your own external commands consult vc-command in the manual
18893 \begin_layout Subsection
18894 RCS commands in LyX
18897 \begin_layout Standard
18898 The following sections describe the RCS commands supported by LyX.
18899 You can find them in the
18901 File\SpecialChar \menuseparator
18903 \begin_inset space ~
18909 LyX was tested against RCS 5.7.
18912 \begin_layout Subsubsection
18918 \begin_layout Standard
18919 If your document is not under revision control, this is the only item shown
18921 And if it is under revision control, the
18925 item is not visible.
18929 \begin_layout Standard
18930 This command registers your document with RCS (unless you are under the
18931 directory managed by CVS)\SpecialChar \@.
18932 You are asked interactively to supply an initial
18933 description of the document.
18934 The document is now set in Read-Only mode and you have to
18937 \begin_inset space ~
18941 \begin_inset space ~
18945 \begin_inset space ~
18950 , before making any changes to it.
18951 A document under revision control has a
18952 \begin_inset Quotes eld
18955 [RCS:<version> <locker>]
18956 \begin_inset Quotes erd
18959 item tagged to the filename in the minibuffer.
18962 \begin_layout Standard
18963 RCS command that is run:
18965 ci -q -u -i -t-"<initial description>" <file-name>
18968 \begin_layout Standard
18973 to understand the switches.
18977 \begin_layout Subsubsection
18983 \begin_layout Standard
18984 When you are finished editing a file, you check in your changes.
18985 When you do this, you are asked for a description of the changes.
18986 This is stored in the history log.
18987 The version number is bumped, your changes are applied to the master RCS
18988 file, the document is unlocked and set to Read-Only mode.
18992 \begin_layout Standard
18995 ci -q -u -m"<description>" <file-name>
18998 \begin_layout Subsubsection
19004 \begin_layout Standard
19005 By doing this you lock the document so that only you can edit it.
19006 This will also make the document Read-Write only for you.
19007 You will usually continue editing for a while and when you are finished
19008 you check in your changes.
19009 The status line is changed to reflect that you have locked the file.
19013 \begin_layout Standard
19016 co -q -l <file-name>
19019 \begin_layout Subsubsection
19022 Revert To Repository Version
19025 \begin_layout Standard
19026 This will discard all changes made to the document since the last check
19028 You get a warning before changes are discarded.
19031 \begin_layout Standard
19034 co -f -u<version> <file-name>
19037 \begin_layout Subsubsection
19043 \begin_layout Standard
19044 This makes as if the last check in never happened.
19045 No changes are made to the document loaded into LyX, but the last version
19046 is removed from the master RCS file.
19050 \begin_layout Standard
19053 rcs -o<version> <file-name>
19056 \begin_layout Subsubsection
19062 \begin_layout Standard
19063 This show the complete history of the RCS document.
19068 is shown in a browser.
19076 \begin_layout Subsubsection
19080 \begin_layout Standard
19081 LyX supports RCS version number information (only), see
19082 \begin_inset CommandInset ref
19084 reference "sub:VCS-Revision-Information"
19091 \begin_layout Subsection
19092 CVS commands in LyX
19095 \begin_layout Standard
19096 CVS is now partially supported by LyX.
19097 You can find the commands in the
19099 File\SpecialChar \menuseparator
19101 \begin_inset space ~
19107 Focus of the development moved to SVN support, so please use it instead
19108 of CVS if possible.
19111 \begin_layout Subsubsection
19117 \begin_layout Standard
19118 If your document is not under revision control, this is the only item shown
19120 And if it is under revision control, the
19127 item is not visible.
19131 \begin_layout Standard
19132 This command registers in CVS your document ONLY in case you have already
19133 the documents directory under CVS control (in particular
19138 This means you have to checkout the archive by yourself.
19142 \begin_layout Standard
19143 Then you are asked interactively to supply an initial description of the
19145 Don't forget that registered file is not yet commited.
19148 \begin_layout Standard
19149 CVS command that is run:
19152 \begin_inset Quotes erd
19156 \begin_inset Quotes eld
19160 \begin_inset Quotes erd
19166 \begin_layout Standard
19171 to understand the switches.
19175 \begin_layout Subsubsection
19181 \begin_layout Standard
19182 When you are finished editing a file, you commit your changes.
19183 When you do this, you are asked for a description of the changes.
19184 After that changes are commited.
19187 \begin_layout Standard
19190 cvs -q commit -m"<description>" "<file-name>"
19193 \begin_layout Subsubsection
19196 Revert To Repository Version
19199 \begin_layout Standard
19200 This will discard all changes made to the document since the last check
19202 You get a warning before changes are discarded.
19203 Firstly the file is deleted, secondly CVS update command is run.
19206 \begin_layout Standard
19210 \begin_inset Quotes eld
19214 \begin_inset Quotes erd
19220 \begin_layout Subsubsection
19226 \begin_layout Standard
19227 This show the complete history of the CVS document.
19231 \begin_inset Quotes eld
19235 \begin_inset Quotes erd
19240 is shown in a browser.
19243 \begin_layout Subsection
19244 SVN commands in LyX
19247 \begin_layout Standard
19248 SVN is now partially supported by LyX.
19249 You can find the commands in the
19251 File\SpecialChar \menuseparator
19253 \begin_inset space ~
19259 Please note that if you use password protected access to repository via
19260 ssh, you will be asked in terminal window.
19261 LyX was tested against SVN 1.5 and 1.6
19265 \begin_layout Plain Layout
19266 Most of the commands will work with 1.4 too, see
19267 \begin_inset CommandInset ref
19269 reference "sub:SVN-Repo-Update"
19281 \begin_layout Subsubsection
19287 \begin_layout Standard
19288 If your document is not under revision control, this is the only item shown
19290 And if it is under revision control, the
19297 item is not visible.
19301 \begin_layout Standard
19302 This command registers in SVN your document ONLY in case you have already
19303 the documents directory under SVN control (in particular
19308 This means you have to checkout the archive by yourself.
19312 \begin_layout Standard
19313 Then you are asked interactively to supply an initial description of the
19315 Don't forget that registered file is not yet commited.
19318 \begin_layout Standard
19319 SVN command that is run:
19322 \begin_inset Quotes eld
19326 \begin_inset Quotes erd
19332 \begin_layout Standard
19337 to understand the switches.
19341 \begin_layout Subsubsection
19347 \begin_layout Standard
19348 When you are finished editing a file, you commit your changes.
19349 When you do this, you are asked for a description of the changes.
19350 After that changes are commited.
19353 \begin_layout Standard
19358 \begin_layout Plain Layout
19359 In case locking is not enabled.
19361 \begin_inset CommandInset ref
19363 reference "subsec:SVN-File-Locking"
19374 svn commit -q -m"<description>" <file-name>
19377 \begin_layout Subsubsection
19383 \begin_layout Standard
19384 Updates the changes of this file from the repository.
19385 Be sure you understand SVN merging and conflicts resolving before using
19386 this function, because all conflicts has to be resolved manually by you!
19389 \begin_layout Standard
19394 \begin_layout Plain Layout
19402 svn update --non-interactive
19403 \begin_inset Quotes eld
19407 \begin_inset Quotes erd
19413 \begin_layout Subsubsection
19416 Revert To Repository Version
19419 \begin_layout Standard
19420 This will discard all changes made to the document since the last check
19422 You get a warning before changes are discarded.
19426 \begin_layout Standard
19430 \begin_inset Quotes eld
19434 \begin_inset Quotes erd
19440 \begin_layout Subsubsection
19441 \begin_inset CommandInset label
19443 name "sub:SVN-Repo-Update"
19447 Update of the local directory checkout from repository
19451 \begin_layout Plain Layout
19452 Note that this command will work only with subversion
19453 \begin_inset Formula $\geqq1.5$
19464 \begin_layout Standard
19465 All the commands above have one shortcomming - they deal with the current
19467 Once your document contains pictures, includes external
19468 \begin_inset Flex CharStyle:Code
19471 \begin_layout Plain Layout
19477 files and so on administration becomes more complicated.
19478 LyX now supports updating the whole tree in which resides the document
19482 \begin_layout Plain Layout
19483 One need to organize the files structure so that all external files are
19484 in the same directory or subdirectories of the document.
19491 This become especially useful once you cooperate with people which neither
19492 know about subversion management nor they have ambition to commit additional
19493 material to the repository.
19497 \begin_layout Standard
19498 \begin_inset Flex CharStyle:Code
19501 \begin_layout Plain Layout
19502 Update local directory from repository
19507 command updates the whole directory and in case of merge conflicts local
19508 version of the files are left, so no unintended data loss occurs.
19509 If local changes are detected user is warned before update starts.
19512 \begin_layout Labeling
19513 \labelwidthstring 00.00.0000
19515 \begin_inset space ~
19519 \begin_inset space ~
19523 \begin_inset Newline newline
19527 \begin_inset Flex CharStyle:Code
19530 \begin_layout Plain Layout
19536 (Ask if changes are detected.)
19537 \begin_inset Newline newline
19541 \begin_inset Flex CharStyle:Code
19544 \begin_layout Plain Layout
19545 svn update --accept mine-full $path
19553 \begin_layout Standard
19555 \begin_inset Flex CharStyle:Code
19558 \begin_layout Plain Layout
19564 stands for the path to the document.
19567 \begin_layout Subsubsection
19573 \begin_layout Standard
19574 This show the complete history of the SVN document.
19578 \begin_inset Quotes eld
19582 \begin_inset Quotes erd
19587 is shown in a browser.
19590 \begin_layout Subsubsection
19592 \begin_inset CommandInset label
19594 name "subsec:SVN-File-Locking"
19601 \begin_layout Standard
19602 The file exchange through various revision control systems brings the problem
19603 of merge conflicts in case two different users try to edit the same (parts
19605 When such conflict happens it needs manual resolving and one reasonable
19606 alternative is to provide some kind of locking mechanism, which guarantees
19607 that only one user is allowed to edit file at the given time.
19610 \begin_layout Standard
19611 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19612 access - locks and automatical setting of write permissions (see sec.
19614 \begin_inset CommandInset ref
19616 reference "subsec:Automatical-Locking-Property"
19621 \begin_inset Flex CharStyle:Code
19624 \begin_layout Plain Layout
19634 \begin_layout Plain Layout
19635 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19641 In a case this property is detected for a given document LyX starts to
19642 use SVN locks for document editing automatically and the whole check-in/out
19643 mechanism switches to the same regimen as for RCS.
19644 This in particular means there are two different modes how file is used
19648 \begin_layout Itemize
19650 The loaded file is in the read-only mode.
19651 For editation on needs to check-out.
19656 consists of update from repository and gaining write lock.
19657 If the lock is not possible to obtain, we remain in unlocked state.
19660 \begin_layout Itemize
19662 The loaded file is in the 'normal' edit mode.
19663 No other user is allowed to edit the file.
19668 consists of commiting changes and releasing write-lock.
19669 If no changes have been made to the document, no commit will be produced
19673 \begin_layout Plain Layout
19674 Don't be puzzled by the fact that you will be asked for commit message anyway.
19679 and only the write-lock will be released.
19682 \begin_layout Standard
19686 \begin_layout Labeling
19687 \labelwidthstring 00.00.0000
19690 svn commit -q -m"<description>" "<file-name>"
19691 \begin_inset Newline newline
19694 svn unlock "<file-name>"
19697 \begin_layout Labeling
19698 \labelwidthstring 00.00.0000
19701 svn update "<file-name>"
19702 \begin_inset Newline newline
19705 svn lock "<file-name>"
19708 \begin_layout Subsubsection
19711 \begin_inset CommandInset label
19713 name "subsec:Automatical-Locking-Property"
19719 Automatical Locking Property
19722 \begin_layout Standard
19723 The above mentioned automatical setting of write permissions of the .lyx
19724 file can be set through
19729 ile\SpecialChar \menuseparator
19735 \begin_inset space ~
19738 Control\SpecialChar \menuseparator
19743 oggle locking property
19746 This command is active only when the file is not locked on the svn server
19748 you need to check-out before proceeding).
19751 \begin_layout Labeling
19752 \labelwidthstring 00.00.0000
19754 \begin_inset space ~
19760 \begin_layout Labeling
19761 \labelwidthstring 00.00.0000
19764 svn propset svn:needs-lock ON "<file-name>"
19767 \begin_layout Labeling
19768 \labelwidthstring 00.00.0000
19771 svn propdel svn:needs-lock "<file-name>"
19774 \begin_layout Subsubsection
19775 \begin_inset CommandInset label
19777 name "sub:VCS-Revision-Information"
19781 Revision Information in Documents
19784 \begin_layout Standard
19785 There are more possibilities how to activate revision information in our
19789 \begin_layout Itemize
19790 LyX supports directly:
19794 \begin_layout Itemize
19795 tree revision information (
19796 \begin_inset Flex CharStyle:Code
19799 \begin_layout Plain Layout
19806 The result is the output of the
19807 \begin_inset Flex CharStyle:Code
19810 \begin_layout Plain Layout
19816 command, the following table gives you an idea, how to read the results.
19819 \begin_layout Standard
19821 \begin_inset Tabular
19822 <lyxtabular version="3" rows="6" columns="2">
19823 <features tabularvalignment="middle">
19824 <column alignment="center" valignment="top" width="0">
19825 <column alignment="center" valignment="top" width="0">
19827 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19830 \begin_layout Plain Layout
19836 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19839 \begin_layout Plain Layout
19847 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19850 \begin_layout Plain Layout
19856 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19859 \begin_layout Plain Layout
19860 mixed revision working copy
19867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19870 \begin_layout Plain Layout
19876 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19879 \begin_layout Plain Layout
19880 modified working copy
19887 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19890 \begin_layout Plain Layout
19896 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19899 \begin_layout Plain Layout
19900 switched working copy
19907 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19910 \begin_layout Plain Layout
19916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19919 \begin_layout Plain Layout
19920 partial working copy, from a sparse checkout
19927 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19930 \begin_layout Plain Layout
19936 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19939 \begin_layout Plain Layout
19940 mixed revision, modified, switched working copy
19953 \begin_layout Itemize
19954 file revision information.
19955 The result comes from parsing the output of
19956 \begin_inset Flex CharStyle:Code
19959 \begin_layout Plain Layout
19961 \begin_inset space ~
19965 \begin_inset space ~
19969 \begin_inset space ~
19978 Supported flags are:
19982 \begin_layout Itemize
19983 version number of the last commit (
19984 \begin_inset Flex CharStyle:Code
19987 \begin_layout Plain Layout
19996 \begin_layout Itemize
19997 author of the last commit (
19998 \begin_inset Flex CharStyle:Code
20001 \begin_layout Plain Layout
20010 \begin_layout Itemize
20011 date of the last commit (
20012 \begin_inset Flex CharStyle:Code
20015 \begin_layout Plain Layout
20024 \begin_layout Itemize
20025 time of the last commit (
20026 \begin_inset Flex CharStyle:Code
20029 \begin_layout Plain Layout
20039 \begin_layout Standard
20040 You can obtain this info via InsetInfo (e.g.
20042 \begin_inset Flex CharStyle:Code
20045 \begin_layout Plain Layout
20046 info-insert buffer vcs-date
20052 The information will be available only when you have the file stored under
20053 svn managment (i.e.
20055 \begin_inset Flex CharStyle:Code
20058 \begin_layout Plain Layout
20064 directory is available with your document).
20068 \begin_layout Itemize
20069 Another---a hacking one---possibility is to use svn keywords
20073 \begin_layout Plain Layout
20074 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20080 In short -- you set file keywords property (e.g.
20083 svn propset svn:keywords 'Rev' file.lyx
20085 ) and then paste keyword ERT
20089 \begin_layout Plain Layout
20090 This is an easy way how to ensure that LyX won't break the line in the middle
20096 tag in your document (e.g.
20101 \begin_layout Plain Layout
20109 This way svn client will automatically substitute revision number (e.g.
20114 \begin_layout Plain Layout
20121 ) after each update and commit.
20122 There are more problems with this approach.
20123 Firstly, the '$' character is used in TeX world for math equations, so
20124 any occurence of math formula
20125 \begin_inset Formula $Rev$
20129 \begin_inset Formula $Rev:59$
20132 in your LyX document.
20133 Similarly for other keywords like Id, Date, Author, etc.
20134 Secondly svn output is dependent on your locales, so its very easy that
20135 svn would produce some problematic strings once Date is used.
20136 Thirdly you get the whole 'Rev: 59' string in your document instead of
20138 Until subversion implements user's custom keywords it will be hard to use
20139 this approach reliably or let LyX to support it directly.
20142 \begin_layout Subsection
20143 SVN and Windows Environment
20146 \begin_layout Quote
20147 My inclination is to say that if the user cannot figure out the command
20148 line operations on their own fairly quickly, they would be well advised
20149 to use TortoiseSVN.
20155 \begin_layout Subsubsection
20159 \begin_layout Standard
20160 In addition to installing LyX, and having access to a Subversion repository,
20161 the user will need to install the Subversion client program.
20162 A Windows installer for the client program is available from
20163 \begin_inset CommandInset href
20166 target "http://www.collab.net/nonav/downloads/subversion/"
20171 The user may also want to install
20172 \begin_inset CommandInset href
20175 target "http://tortoisesvn.tigris.org/"
20179 , which integrates Subversion operations into the context (rightclick) menu
20180 of Windows Explorer.
20181 Operations done outside LyX will typically be more convenient using the
20182 Explorer context menu.
20183 Note that TortoiseSVN is not a replacement for the client program, which
20184 is what LyX itself will use.
20187 \begin_layout Subsubsection
20188 Bringing a document under Subversion control
20191 \begin_layout Standard
20192 Before a LyX document can be brought under version control in Subversion,
20193 its parent directory needs to be under version control.
20194 If the document is being added to a project already in the repository,
20195 this is accomplished by checking the project out to the directory where
20196 the new document will be placed.
20197 If the project itself is not yet under version control (for instance, if
20198 this document starts a new project), the directory must be imported into
20200 This is done outside LyX.
20201 Both import and checkout are easily accomplished from the Explorer context
20202 menu using TortoiseSVN, or alternatively can be done using the command
20203 line client at a DOS prompt.
20204 The procedure for importing the project using TortoiseSVN is described
20205 below, assuming an existing repository and a new project being started
20213 For information on using the Subversion client program, run
20220 \begin_layout Enumerate
20227 in Windows Explorer, right click it, and select
20229 TortoiseSVN > Repo-browser
20232 If necessary, adjust the URL for the repository, then click OK.
20235 \begin_layout Enumerate
20236 Right click the level of the repository under which you want to place the
20237 new project folder (typically the top level) and click
20239 Create folder\SpecialChar \ldots{}
20242 Supply a name for the project folder and click OK.
20243 Add a message for the log file if desired, then click OK again.
20244 The new project folder should appear in the repository.
20245 Finally, click OK again to exit the repository browser.
20248 \begin_layout Enumerate
20249 Once again right click
20255 , this time selecting SVN Checkout\SpecialChar \ldots{}
20256 Select the URL of the project folder
20257 you just created in the repository, and set the checkout directory to
20265 You will be warned about a non-empty folder; click OK to proceed.
20266 You should now have a
20277 \begin_layout Enumerate
20278 Create or open your document in LyX and click
20283 ile\SpecialChar \menuseparator
20289 \begin_inset space ~
20292 Control\SpecialChar \menuseparator
20300 Add a log message and click OK to commit the document to version control.
20303 \begin_layout Standard
20304 From this point onward, you should have full functionality in the
20309 ile\SpecialChar \menuseparator
20315 \begin_inset space ~
20321 You also have the option of checking the document in and out, viewing its
20323 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20324 client program from a command prompt.
20327 \begin_layout Subsubsection
20328 SSH tunel used with SVN under Windows
20331 \begin_layout Standard
20332 Compared to linux setting svn client to communicate over ssh under Windows
20333 is rather troublesome task.
20334 We will at least make some hints how to setup client side but former knowledge
20335 about ssh and Windows command line is needed, also be prepared for a great
20336 deal of frustration...
20339 \begin_layout Enumerate
20340 Get svn client for windows, as described in previous sections.
20341 When it is fresh install run some svn command (e.g.
20343 \begin_inset Flex CharStyle:Code
20346 \begin_layout Plain Layout
20352 ) to have created config files, which you will need to change later on.
20355 \begin_layout Enumerate
20356 Choose ssh client for Windows.
20357 There are more possibilities, we will use the one from Putty tools
20361 \begin_layout Plain Layout
20362 \begin_inset Flex URL
20365 \begin_layout Plain Layout
20367 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20378 You will need to automatize connection, so client doesn't ask for any password
20380 To keep things easy we will use only keys without any additional password
20385 \begin_layout Enumerate
20387 \begin_inset Flex CharStyle:Code
20390 \begin_layout Plain Layout
20397 Save your private .ppk key file and put the public one on the server side.
20398 In case the SVN server runs on linux, note that the format of the public
20399 key is not compatible with linux openssh and you will need to direcly copy-past
20400 e the key from the “
20402 Public key for pasting into OpenSSH authorized_keys file
20404 :” edit field into the server's
20405 \begin_inset Flex CharStyle:Code
20408 \begin_layout Plain Layout
20409 ~/.ssh/authorized_keys
20415 \begin_inset Flex CharStyle:Code
20418 \begin_layout Plain Layout
20427 \begin_layout Enumerate
20429 \begin_inset Flex CharStyle:Code
20432 \begin_layout Plain Layout
20439 In the SVN config file
20443 \begin_layout Plain Layout
20444 Exact path depends on Windows version, usually somewhere around
20445 \begin_inset Flex CharStyle:Code
20448 \begin_layout Plain Layout
20451 Documents and Settings
20465 \begin_inset Flex CharStyle:Code
20468 \begin_layout Plain Layout
20483 , section [tunnels], setup ssh command, e.g.
20485 \begin_inset Flex CharStyle:Code
20488 \begin_layout Plain Layout
20489 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20498 \begin_layout Plain Layout
20499 It will usually take a lot of time to get exact command right and it depends
20501 For example do not have some remote server saved as a default session in
20503 If things fail, try to connect via plink without SVN first.
20512 \begin_layout Enumerate
20513 Checkout the SVN archive, e.g.
20515 \begin_inset Flex CharStyle:Code
20518 \begin_layout Plain Layout
20519 svn co svn+ssh://user@server/repository_path
20527 \begin_layout Subsubsection
20529 \change_inserted 1 1274738367
20530 End-of-Line Conversions
20533 \begin_layout Standard
20535 \change_inserted 1 1274738433
20536 When the collsraborators are mixing Linux and Windows environments, LyX
20537 will use different line endings inside the .lyx files.
20538 This is not problem as far as LyX functionality is concerned, but the commit
20539 diffs will be huge and merge-conflicts prone.
20540 Fortunately SVN itself knows
20544 \begin_layout Plain Layout
20546 \change_inserted 1 1274738731
20547 \begin_inset Flex URL
20550 \begin_layout Plain Layout
20552 \change_inserted 1 1274738731
20554 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20568 how to deal with CR/LF problems when switching .lyx files to the
20569 \begin_inset Flex CharStyle:Code
20572 \begin_layout Plain Layout
20574 \change_inserted 1 1274738399
20586 \begin_layout Plain Layout
20588 \change_inserted 1 1274738457
20590 \begin_inset Flex CharStyle:Code
20593 \begin_layout Plain Layout
20595 \change_inserted 1 1274738457
20596 svn propset svn:eol-style native FILE_NAME
20613 \begin_layout Subsection
20617 \begin_layout Standard
20618 With the recent addition of the vc-command function LyX power users are
20619 allowed to create their own commands for revision control.
20622 \begin_layout Standard
20623 As an example you can see how two TortoiseSVN commands could be integrated
20627 \begin_layout Description
20629 \begin_inset Flex CharStyle:Code
20632 \begin_layout Plain Layout
20633 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20641 \begin_layout Description
20643 \begin_inset Flex CharStyle:Code
20646 \begin_layout Plain Layout
20647 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20655 \begin_layout Section
20656 Literate Programming
20659 \begin_layout Standard
20664 (kayvan@sylvan.com)
20668 original documentation written by
20670 Edmar Wienskoski Jr.
20673 (edmar-w-jr@technologist.com)
20676 \begin_layout Subsection
20680 \begin_layout Standard
20681 The main purpose of this documentation is to show you how to use LyX for
20682 literate programming.
20683 Where it is assumed that you are familiar with this programming technique,
20685 \begin_inset Quotes eld
20689 \begin_inset Quotes erd
20693 \begin_inset Quotes eld
20697 \begin_inset Quotes erd
20701 If that is not the case, please follow the web links provided in the following
20703 There is a lot of good documentation out there covering old development
20704 history to the latest tools tips.
20707 \begin_layout Standard
20708 It is also assumed that you are familiar with LyX itself to a point that
20709 you are comfortable changing your LyX preferences, and X resources file.
20710 If that is not the case please refer to other LyX documentation to cover
20711 your specific needs.
20714 \begin_layout Subsection
20715 Literate Programming
20718 \begin_layout Standard
20719 From the Literate Programming FAQ:
20722 \begin_layout Quotation
20723 Literate programming is the combination of documentation and source together
20724 in a fashion suited for reading by human beings.
20725 In fact, literate programs should be enjoyable reading, even inviting!
20726 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20727 and documentation in a single file.
20728 Literate programming tools then parse the file to produce either readable
20729 documentation or compilable source.
20730 The WEB style of literate programming was created by D.
20731 \begin_inset space \thinspace{}
20735 Knuth during the development of his TeX typesetting software.
20739 \begin_layout Standard
20740 Another excerpt says:
20743 \begin_layout Quotation
20746 How is literate programming different from verbose commenting?
20749 \begin_layout Quotation
20750 There are three distinguishing characteristics.
20751 In order of importance, they are:
20755 \begin_layout Itemize
20756 flexible order of elaboration
20759 \begin_layout Itemize
20760 automatic support for browsing
20763 \begin_layout Itemize
20764 typeset documentation, especially diagrams and mathematics
20768 \begin_layout Standard
20769 Now that I sparked your curiosity, take a look in the references.
20772 \begin_layout Subsubsection
20776 \begin_layout Standard
20777 The complete Literate Programming FAQ can be found at:
20780 \begin_layout Quote
20781 Literate Programming FAQ
20782 \begin_inset Flex URL
20785 \begin_layout Plain Layout
20787 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20795 \begin_layout Standard
20796 The FAQ lists 23 (twenty three!) different literate programming tools.
20797 Where some are specialized or
20798 \begin_inset Quotes eld
20802 \begin_inset Quotes erd
20805 for particular programming languages, while other have general scope.
20810 for my own use for several reasons:
20813 \begin_layout Itemize
20814 It can generate the documentation either in LaTeX or HTML.
20817 \begin_layout Itemize
20818 It has a open architecture, i.
20819 \begin_inset space \thinspace{}
20823 \begin_inset space \space{}
20826 it is easy to plug in new filters and to perform special processing that
20831 \begin_layout Itemize
20832 There is a good selection of filters available already (the HTML is one
20836 \begin_layout Itemize
20840 \begin_layout Standard
20841 The Noweb web page can be found at:
20844 \begin_layout Quote
20846 \begin_inset Flex URL
20849 \begin_layout Plain Layout
20851 http://www.cs.virginia.edu/~nr/noweb/
20859 \begin_layout Standard
20860 Starting from there you can reach many other interesting links and even
20861 some literate program examples.
20864 \begin_layout Subsection
20865 LyX and Literate Programming
20868 \begin_layout Standard
20869 The LyX support for Literate Programming is provided by using the generic
20870 LyX converters mechanism.
20871 This support is provided in a
20872 \begin_inset Quotes eld
20876 \begin_inset Quotes erd
20880 \begin_inset space \thinspace{}
20884 \begin_inset space \space{}
20887 you will be able to use this new LyX feature with some other literate programmin
20888 g tool of your choice by just changing your LyX preferences.
20891 \begin_layout Subsubsection
20892 Generating documents and code (weaving and tangling)
20895 \begin_layout Paragraph
20896 Selecting the document class
20899 \begin_layout Standard
20900 If you have installed Noweb and LyX successfully, whenever you open a new
20901 document or try to change the document class of an existing one, you will
20902 find that there are three new document classes available:
20905 \begin_layout Itemize
20909 \begin_layout Itemize
20913 \begin_layout Itemize
20917 \begin_layout Standard
20918 You must select one of them to create your literate documents from.
20922 \begin_layout Standard
20923 Note that literate documents are not limited to these three classes.
20924 New classes can be generated from other styles like letter or in combination
20925 with other class variations like Article (AMS).
20926 If you have special needs that cannot be covered by one of the existing
20927 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20928 will arrange to insert a new entry, or teach you how to do it.
20932 \begin_layout Plain Layout
20933 It is very simple, it involves the creation of a file with four lines, and
20934 re-running of the auto configuration.
20939 Moreover, if you use a literate tool other than Noweb you may need to create
20940 a new set of document classes for it.
20943 \begin_layout Paragraph
20947 \begin_layout Standard
20948 LyX enables you to write code with a layout named
20956 \begin_layout Plain Layout
20957 The equivalent Noweb term is
20958 \begin_inset Quotes eld
20962 \begin_inset Quotes erd
20966 For historical reasons, I got used to the term
20967 \begin_inset Quotes eld
20971 \begin_inset Quotes erd
20974 introduced by other literate tool named Nuweb, which I used for many years
20975 before rendering myself to Noweb.
20980 Noweb delimits scraps like this:
20983 \begin_layout LyX-Code
20987 \begin_layout LyX-Code
20991 \begin_layout LyX-Code
20995 \begin_layout LyX-Code
20999 \begin_layout LyX-Code
21003 \begin_layout Standard
21004 The problem is that whatever is written in between the << and the
21008 must be taken literally, i.
21009 \begin_inset space \thinspace{}
21013 \begin_inset space \space{}
21016 LyX should be prevented from making any special interpretation of what has
21018 This is handled by a special layout named Scrap, that works like a normal
21019 paragraph but has a free spacing capability.
21022 \begin_layout Standard
21023 The down side of the Scrap paragraph layout is that consecutive paragraphs
21024 of code will be spaced with one empty line in the source code and also
21025 in the printed documentation.
21026 The work around is to enter each line of code within a single Scrap, with
21027 a newline (ctrl-return).
21028 The example above will look like this:
21032 \begin_layout Plain Layout
21033 If you have a printed version of this document you will not see any difference
21034 between the previous example and this one.
21042 \begin_layout LyX-Code
21044 \begin_inset Newline newline
21048 \begin_inset Newline newline
21052 \begin_inset Newline newline
21056 \begin_inset Newline newline
21062 \begin_layout Standard
21063 This layout works fine.
21064 The only real inconvenience is that you have to type ctrl-return instead
21069 \begin_layout Plain Layout
21070 It is in my list of
21071 \begin_inset Quotes eld
21075 \begin_inset Quotes erd
21086 \begin_layout Standard
21087 As a special note, you can also use the
21088 \begin_inset Quotes eld
21092 \begin_inset Quotes erd
21095 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21099 \begin_layout LyX-Code
21101 \begin_inset Newline newline
21104 def some_function(args):
21105 \begin_inset Newline newline
21108 "This is the doc string for this function."
21109 \begin_inset Newline newline
21112 print "My args: ", args
21115 \begin_layout LyX-Code
21116 @ %def some_function
21119 \begin_layout Standard
21120 For an example of this usage and the resulting cross-reference output, look
21121 at the Literate python program in
21123 LIBDIR/examples/listerrors.lyx
21125 which should make this all clear.
21128 \begin_layout Paragraph
21129 Generating the documentation
21132 \begin_layout Standard
21133 At this point you already have a new document file with a proper document
21134 class, and with some code and text on it.
21135 How do I print it? The answer is simple, you select
21137 View\SpecialChar \menuseparator
21141 Just like you would do for a plain document.
21142 No special procedure is required.
21145 \begin_layout Standard
21146 To help orientate you, I will now explain what happens inside LyX:
21149 \begin_layout Enumerate
21152 Update\SpecialChar \menuseparator
21155 menu option is chosen, a LaTeX file is generated.
21160 \begin_layout Standard
21161 If the document is of any literate class the generated file will be named
21162 with an extension name defined by the
21163 \begin_inset Quotes eld
21167 \begin_inset Quotes erd
21170 format (defined in the Preferences panel), otherwise the file will have
21179 \begin_layout Enumerate
21180 Note that the only difference so far is in the name of the file, no special
21181 processing is required by LyX.
21182 Given that you formatted the code using the Scrap layout that, by itself,
21183 takes care of the business.
21186 \begin_layout Enumerate
21187 If the document is of any literate class LyX will then use the internal
21188 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21192 \begin_layout Plain Layout
21193 The converters are defined in the
21195 Tools\SpecialChar \menuseparator
21199 \begin_inset Quotes eld
21203 \begin_inset Quotes erd
21215 manual for general information about converters.
21220 to generate the LaTeX file.
21224 \begin_layout Standard
21225 Otherwise it will just skip this step.
21229 \begin_layout Enumerate
21230 Finally, LaTeX is invoked and the regular post processing continues as in
21234 \begin_layout Standard
21235 Independence from a particular
21236 \begin_inset Quotes eld
21240 \begin_inset Quotes erd
21243 is easily achieved by changing the commands that are run by the various
21247 \begin_layout Paragraph
21248 Generating the code
21251 \begin_layout Standard
21252 When the build menu option is chosen or the corresponding button in the
21253 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21254 Next, LyX invokes the
21259 This converter needs to be defined by the user and is not installed by
21260 default, though the Program format is.
21261 This converter (like any other converter) will have two parts:
21264 \begin_layout Enumerate
21265 The converter program itself.
21266 This program performs the conversion from the one format to the other (in
21267 this case, from the Noweb format to the Program pseudo-format).
21270 \begin_layout Enumerate
21271 The error log parser.
21272 This is a program whose sole purpose is to rewrite error messages in a
21273 format that LyX understands.
21274 This makes it possible for LyX to place error boxes in the right places
21275 in the file buffer.
21278 \begin_layout Standard
21279 The first part, the
21280 \begin_inset Quotes eld
21284 \begin_inset Quotes erd
21287 setting, should be set to
21288 \begin_inset Quotes eld
21296 \begin_inset Quotes erd
21300 This basically means that LyX will call
21301 \begin_inset Quotes eld
21305 \begin_inset Quotes erd
21308 (a program or script) with the name of the Noweb file (normally a file
21309 in the LyX temp directory).
21313 \begin_layout Standard
21314 This is an implementation of
21315 \begin_inset Quotes eld
21319 \begin_inset Quotes erd
21322 that you can place in a directory on your path:
21325 \begin_layout LyX-Code
21329 \begin_layout LyX-Code
21333 \begin_layout LyX-Code
21334 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21337 \begin_layout Standard
21338 The next part of the converter setting is the
21339 \begin_inset Quotes eld
21343 \begin_inset Quotes erd
21346 which is to be set to
21347 \begin_inset Quotes eld
21352 parselog=listerrors
21355 \begin_inset Quotes erd
21359 This will run any errors that are generated by the
21360 \begin_inset Quotes eld
21364 \begin_inset Quotes erd
21367 process through the
21368 \begin_inset Quotes eld
21372 \begin_inset Quotes erd
21378 \begin_layout Standard
21379 The converter code looks in
21387 then on the path for the
21388 \begin_inset Quotes eld
21392 \begin_inset Quotes erd
21398 \begin_layout Standard
21399 The build will normally take place in LyX's temporary directory, so the
21400 files produced by the conversion will be in that directory.
21401 LyX will copy out what it regards as the `main' file, but the
21405 conversion may produce several files, and so most of these would then be
21406 deleted when LyX was closed.
21407 The present solution is to use a `copier',
21411 \begin_layout Plain Layout
21420 manual for information on these.
21429 script in its default mode, so that the entire contents of the temporary
21430 directory is copied.
21431 More will get copied than is needed, to be sure, but nothing will be lost.
21432 If, however, you know what extensions the generated files will have, this
21433 can be improved by using the
21442 This option takes a comma-separated list of extensions to copy.
21443 So, for example, if the conversion will generate only files with the extensions
21452 , then the correct definition would be:
21455 \begin_layout LyX-Code
21456 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21459 \begin_layout Standard
21460 The result will be that only files with these two extensions will be copied
21464 \begin_layout Paragraph
21465 Build instructions in the document
21468 \begin_layout Standard
21469 The last piece of the integration between LyX and noweb is the
21470 \begin_inset Quotes eld
21474 \begin_inset Quotes erd
21478 Generally, the instructions for building your program should be embedded
21479 in a scrap of its own.
21481 \begin_inset Quotes eld
21485 \begin_inset Quotes erd
21488 above uses the notangle command to look for this scrap (called
21489 \begin_inset Quotes eld
21493 \begin_inset Quotes erd
21496 ) and runs its contents through
21497 \begin_inset Quotes eld
21501 \begin_inset Quotes erd
21507 \begin_layout Standard
21508 Typically, such a scrap would look something like this:
21511 \begin_layout LyX-Code
21513 \begin_inset Newline newline
21517 \begin_inset Newline newline
21521 \begin_inset Newline newline
21524 if [ -z "${NOWEB_SOURCE}" ]
21525 \begin_inset Newline newline
21529 \begin_inset Newline newline
21532 NOWEB_SOURCE=myfile.nw
21533 \begin_inset Newline newline
21537 \begin_inset Newline newline
21541 code to extract files ...]
21542 \begin_inset Newline newline
21546 code to compile files ...]
21547 \begin_inset Newline newline
21553 \begin_layout Standard
21556 LIBDIR/examples/listerrors.lyx
21560 LIBDIR/examples/Literate.lyx
21562 which implement two versions of the
21563 \begin_inset Quotes eld
21567 \begin_inset Quotes erd
21570 program for some illustrations of how all of these pieces go together or
21573 LIBDIR/examples/noweb2lyx.lyx.
21576 Interestingly, these three files show off the language-indepence of the
21577 LyX literate programming support since they are written in Python, C and
21581 \begin_layout Subsubsection
21585 \begin_layout Standard
21586 All the Literate Programming support is configured by the
21588 Tools\SpecialChar \menuseparator
21592 \begin_inset Quotes eld
21596 \begin_inset Quotes erd
21600 The important parts are:
21603 \begin_layout Description
21605 \begin_inset space ~
21609 \begin_inset Quotes eld
21613 \begin_inset Quotes erd
21617 \begin_inset space ~
21620 format Set up via the Formats tab, this is where the Noweb-specific pieces
21630 , the file extension is set to
21635 This tells LyX to create a file with a
21639 extension in the first step of the conversion process.
21642 \begin_layout Description
21644 \begin_inset space ~
21652 \begin_inset space ~
21655 format This is an empty format whose sole purpose is to be the endpoint
21656 of a conversion (which then allows us to set up a converter for it).
21659 \begin_layout Description
21668 This converter performs the
21669 \begin_inset Quotes eld
21673 \begin_inset Quotes erd
21676 of the literate document.
21677 For Noweb, it is set to
21678 \begin_inset Quotes eld
21683 noweave -delay -index $$i > $$o
21686 \begin_inset Quotes erd
21692 \begin_layout Description
21702 \begin_inset Quotes eld
21706 \begin_inset Quotes erd
21710 As stated above, the Converter is set to
21711 \begin_inset Quotes eld
21719 \begin_inset Quotes erd
21722 , with Flags set to
21723 \begin_inset Quotes eld
21728 originaldir,parselog=listerrors
21731 \begin_inset Quotes erd
21737 \begin_layout Subsubsection
21741 \begin_layout Standard
21742 There is also a new function implemented in the LyX server, the
21743 \begin_inset Quotes eld
21746 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21750 \begin_layout Standard
21751 When debugging code with ddd/gdb, it is possible to invoke a text editor
21752 at the current execution position with a single key stroke.
21753 The default ddd configuration for that is shift-ctrl-V.
21754 It happens that you can define the editor command line invocation in ddd
21757 Edit\SpecialChar \menuseparator
21758 Preferences\SpecialChar \menuseparator
21761 dialog and changing the "Edit Sources" entry.
21764 \begin_layout Standard
21765 I take advantage of the new created LyX server function and this ddd feature,
21767 \begin_inset Quotes eld
21771 \begin_inset Quotes erd
21777 \begin_layout LyX-Code
21778 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21781 \begin_layout Standard
21782 With this, whenever you are using ddd and find a point in the program that
21783 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21784 ddd you forward this information to LyX through the LyX server and then
21785 the LyX window will show the same file with the cursor at the same position
21786 ddd was pointing to.
21787 No more guessing or long scrolling to locate a point in the program back
21791 \begin_layout Standard
21792 Note however that you must enable the LyX server to get this feature working
21793 (it is disabled by default).
21794 You can enable it in
21806 ) by entering in the
21811 \begin_inset Quotes eld
21816 /home/<your-home-directory>/.lyx/lyxpipe
21819 \begin_inset Quotes erd
21825 \begin_layout Standard
21826 Read the LyX server documentation in the
21828 Customization Manual
21830 for further information.
21833 \begin_layout Subsubsection
21837 \begin_layout Standard
21838 There are six new buttons that can be added to your LyX toolbar.
21839 Five of these buttons are short cuts to layout styles:
21860 The last one is a short cut to the
21861 \begin_inset Quotes eld
21865 \begin_inset Quotes erd
21872 \begin_layout Standard
21873 LyX has a range of buttons that are available for tool bar customization.
21874 In my toolbar I like to combine the six short cuts above with two more:
21879 \SpecialChar \menuseparator
21884 \SpecialChar \menuseparator
21891 View\SpecialChar \menuseparator
21895 Here is how it looks like:
21898 \begin_layout LyX-Code
21902 \begin_layout LyX-Code
21906 \begin_layout LyX-Code
21907 Icon "layout Standard"
21910 \begin_layout LyX-Code
21911 Icon "layout Section"
21914 \begin_layout LyX-Code
21915 Icon "layout LaTeX"
21918 \begin_layout LyX-Code
21919 Icon "layout LyX-Code"
21922 \begin_layout LyX-Code
21923 Icon "layout Scrap"
21926 \begin_layout LyX-Code
21930 \begin_layout LyX-Code
21934 \begin_layout LyX-Code
21935 Icon "buffer-typeset"
21938 \begin_layout LyX-Code
21939 Icon "build-program"
21942 \begin_layout LyX-Code
21946 \begin_layout LyX-Code
21950 \begin_layout LyX-Code
21954 \begin_layout LyX-Code
21958 \begin_layout LyX-Code
21962 \begin_layout Subsubsection
21963 Colors customization
21966 \begin_layout Standard
21967 There are a number of colors in LyX that can be customized in
21972 One of the things that bothers people is the LaTeX font color.
21973 The default color is red, since the scraps uses LaTeX font, and there is
21974 a lot of scraps in literate documents, you may get tired of seeing everything
21976 You can change it by going to the tabs
21985 \begin_layout Standard
21986 The next thing is the visible presence of the newline character in the screen.
21987 You can choose the color of this particular character and make it blend
21989 I recommend you choosing a color that is close to the background but not
21990 equal, that way you still can see it is there, but it is not bothering
21995 \begin_layout Chapter
21996 Secrets of the LaTeX Masters
21997 \begin_inset CommandInset label
22006 \begin_layout Standard
22007 Though LyX is a powerful tool, it cannot hope to support everything that
22008 can be done with pure TeX/LaTeX.
22009 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22010 as long as you are not afraid to use that
22011 \begin_inset Quotes eld
22015 \begin_inset Quotes erd
22018 button on the toolbar or add things to the LaTeX preamble.
22019 This section lists some tips, tricks, and otherwise cool ideas to give
22020 your document that extra little flair.
22023 Do try this at home
22025 , just start with something a little smaller and less important than your
22029 \begin_layout Standard
22030 Most ideas in this section require less common files in your LaTeX installation.
22031 If you have a system like teTeX, most will already be available.
22032 A few, however, will need to be downloaded from one of the CTAN archives.
22033 Often, there are several ways to do something, or several LaTeX style files
22034 which do the same thing.
22035 We do not endorse one choice over another, we simply claim that we have
22036 done a particular task with a particular file.
22037 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22040 \begin_layout Section
22044 \begin_layout Standard
22047 Lars Gullik Bjønnes
22050 \begin_layout Subsection
22054 \begin_layout Standard
22055 The aim for this chapter
22059 \begin_layout Plain Layout
22060 Editor's note: Lars' original chapter was a masterful description of how
22066 However, it was too long to flow smoothly in this document.
22067 I have therefore chosen to excerpt the most important sections here (sorry,
22068 Lars); you can read the original chapter (and more of the story!) in the
22071 examples/multicol.lyx
22079 is to show how the LaTeX package
22083 can be used in a LyX document.
22084 As LyX doesn't support the
22088 package natively yet, we have to use some small hacks.
22089 By reading this section it should be obvious how to do this.
22092 \begin_layout Subsection
22096 \begin_layout Standard
22101 package allows switching between one and multicolumn format on the same
22103 Footnotes are handled correctly (for the most part), but will be placed
22104 at the bottom of the page and not under each column.
22105 LaTeX's float mechanism, however, is partly disabled in the current implementat
22107 At the moment only page-wide floats can be used within the scope of the
22111 \begin_layout Subsection
22115 \begin_layout Subsubsection
22119 \begin_layout Standard
22120 If you want to have two columns in your text, you have use LaTeX mode to
22125 begin{multicols}{2}
22127 at the point where you want the two column layout to start, and then
22133 where you want it to end.
22137 \begin_layout Standard
22141 \begin_layout Plain Layout
22145 begin{multicols}{2}
22153 \begin_layout Standard
22158 The Adventure of the Empty House
22161 \begin_inset Newline newline
22166 Sir Arthur Conan Doyle
22169 \begin_layout Standard
22172 It was in the spring of the year 1894 that all London was interested, and
22173 the fashionable world dismayed, by the murder of the Honourable Ronald
22174 Adair under most unusual and inexplicable circumstances.
22175 The public has already learned those particulars of the crime which came
22176 out in the police investigation, but a good deal was suppressed upon that
22177 occasion, since the case for the prosecution was so overwhelmingly strong
22178 that it was not necessary to bring forward all the facts.
22179 Only now, at the end of nearly ten years, am I allowed to supply those
22180 missing links which make up the whole of that remarkable chain.
22181 The crime was of interest in itself, but that interest was as nothing to
22182 me compared to the inconceivable sequel, which afforded me the greatest
22183 shock and surprise of any event in my adventurous life.
22184 Even now, after this long interval, I find myself thrilling as I think
22185 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22186 ty which utterly submerged my mind.
22187 Let me say to that public, which has shown some interest in those glimpses
22188 which I have occasionally given them of the thoughts and actions of a very
22189 remarkable man, that they are not to blame me if I have not shared my knowledge
22190 with them, for I should have considered it my first duty to do so, had
22191 I not been barred by a positive prohibition from his own lips, which was
22192 only withdrawn upon the third of last month.
22195 \begin_layout Standard
22199 \begin_layout Plain Layout
22211 \begin_layout Subsubsection
22215 \begin_layout Standard
22216 The same pattern is used when you want more than two columns:
22219 \begin_layout Standard
22223 \begin_layout Plain Layout
22227 begin{multicols}{3}
22235 \begin_layout Standard
22238 It can be imagined that my close intimacy with Sherlock Holmes had interested
22239 me deeply in crime, and that after his disappearance I never failed to
22240 read with care the various problems which came before the public.
22241 And I even attempted, more than once, for my own private satisfaction,
22242 to employ his methods in their solution, though with indifferent success.
22243 There was none, however, which appealed to me like this tragedy of Ronald
22245 As I read the evidence at the inquest, which led up to a verdict of willful
22246 murder against some person or persons unknown, I realized more clearly
22247 than I had ever done the loss which the community had sustained by the
22248 death of Sherlock Holmes.
22249 There were points about this strange business which would, I was sure,
22250 have specially appealed to him, and the efforts of the police would have
22251 been supplemented, or more probably anticipated, by the trained observation
22252 and the alert mind of the first criminal agent in Europe.
22253 All day, as I drove upon my round, I turned over the case in my mind and
22254 found no explanation which appeared to me to be adequate.
22255 At the risk of telling a twice-told tale, I will recapitulate the facts
22256 as they were known to the public at the conclusion of the inquest.
22259 \begin_layout Standard
22263 \begin_layout Plain Layout
22275 \begin_layout Standard
22276 You can have more than 3 columns if you want to, but that might not be very
22277 pleasant for the eye.
22280 \begin_layout Subsubsection
22281 Columns inside columns
22284 \begin_layout Standard
22285 You can even have columns inside columns:
22288 \begin_layout Standard
22292 \begin_layout Plain Layout
22296 begin{multicols}{2}
22304 \begin_layout Standard
22307 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22308 at that time governor of one of the Australian colonies.
22309 Adair's mother had returned from Australia to undergo the operation for
22310 cataract, and she, her son Ronald, and her daughter Hilda were living together
22314 \begin_layout Standard
22318 \begin_layout Plain Layout
22322 begin{multicols}{2}
22330 \begin_layout Standard
22333 The youth moved in the best society–had, so far as was known, no enemies
22334 and no particular vices.
22335 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22336 had been broken off by mutual consent some months before, and there was
22337 no sign that it had left any very profound feeling behind it.
22338 For the rest {sic} the man's life moved in a narrow and conventional circle,
22339 for his habits were quiet and his nature unemotional.
22340 Yet it was upon this easy-going young aristocrat that death came, in most
22341 strange and unexpected form, between the hours of ten and eleven-twenty
22342 on the night of March 30, 1894.
22345 \begin_layout Standard
22349 \begin_layout Plain Layout
22361 \begin_layout Standard
22364 Ronald Adair was fond of cards–playing continually, but never for such stakes
22366 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22367 It was shown that, after dinner on the day of his death, he had played
22368 a rubber of whist at the latter club.
22369 He had also played there in the afternoon.
22374 The evidence of those who had played with him– Mr.
22375 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22376 and that there was a fairly equal fall of the cards.
22377 Adair might have lost five pounds, but not more.
22378 His fortune was a considerable one, and such a loss could not in any way
22380 He had played nearly every day at one club or other, but he was a cautious
22381 player, and usually rose a winner.
22382 It came out in evidence that, in partnership with Colonel Moran, he had
22383 actually won as much as four hundred and twenty pounds in a sitting, some
22384 weeks before, from Godfrey Milner and Lord Balmoral.
22385 So much for his recent history as it came out at the inquest.
22388 \begin_layout Standard
22392 \begin_layout Plain Layout
22404 \begin_layout Standard
22405 Please do read the file
22407 examples/multicol.lyx
22409 for more advanced examples including column and header spacing, vertical
22410 separator lines, and more.
22413 \begin_layout Section
22418 Paragraph Environment
22419 \begin_inset Argument
22422 \begin_layout Plain Layout
22423 Numbering in Enumerate
22431 \begin_layout Standard
22437 \begin_layout Standard
22438 \begin_inset VSpace bigskip
22444 \begin_layout Standard
22446 The default numbering for the
22450 paragraph environment begins with Arabic numbers and ends with uppercase
22452 Suppose, however, you wanted a different type of numbering scheme.
22453 Here's a quickie example of how to change the numbering scheme:
22456 \begin_layout LyX-Code
22466 \begin_layout LyX-Code
22476 \begin_layout LyX-Code
22486 \begin_layout LyX-Code
22496 \begin_layout Standard
22497 \SpecialChar \ldots{}
22498 which changes the numbering scheme to uppercase Roman numerals, uppercase
22499 letters, Arabic numbers, and lowercase letter.
22502 \begin_layout Standard
22503 Additionally, the previous example also adds a little bit extra to the numbering
22505 For example, the first level label actually looks like:
22506 \begin_inset Quotes eld
22510 \begin_inset Quotes erd
22514 For ease of reading, we'll describe what the numbering schemes look like
22515 using a notation something like this: <
22516 \begin_inset Quotes eld
22520 \begin_inset Quotes erd
22524 \begin_inset space ~
22528 \begin_inset Quotes erd
22532 \begin_inset Quotes erd
22536 \begin_inset space ~
22540 \begin_inset Quotes erd
22544 \begin_inset Quotes erd
22548 \begin_inset space ~
22552 \begin_inset Quotes eld
22556 \begin_inset Quotes erd
22563 \begin_layout Standard
22564 As you can see in the example, there is a label command for each nesting
22571 \SpecialChar \ldots{}
22578 , as well as a counter,
22582 \SpecialChar \ldots{}
22588 There are also five
22589 \begin_inset Quotes eld
22593 \begin_inset Quotes erd
22626 , each of which take one counter as an argument.
22627 You can add characters before or after these, but there's no need to add
22631 \begin_layout Standard
22632 You can get really fancy with these.
22636 \begin_layout LyX-Code
22650 \begin_layout LyX-Code
22662 \begin_layout LyX-Code
22672 \begin_layout LyX-Code
22682 \begin_layout Standard
22683 produces the somewhat out of hand numbering scheme: <
22684 \begin_inset Quotes eld
22688 \begin_inset Quotes erd
22692 \begin_inset space ~
22696 \begin_inset Quotes erd
22700 \begin_inset Quotes erd
22704 \begin_inset space ~
22708 \begin_inset Quotes erd
22712 \begin_inset Quotes erd
22716 \begin_inset space ~
22720 \begin_inset Quotes eld
22724 \begin_inset Quotes erd
22731 \begin_layout Standard
22735 \begin_layout Section
22739 \begin_layout Standard
22745 \begin_layout Standard
22746 \begin_inset VSpace bigskip
22752 \begin_layout Standard
22757 \begin_layout Plain Layout
22763 tmpfont}{cmr17 scaled 2500}{
22775 \begin_layout Standard
22780 \begin_layout Plain Layout
22791 hose of you who like the style of old books probably also like
22792 \begin_inset Quotes eld
22796 \begin_inset Quotes erd
22799 —those large capital letters which begin each new chapter or section.
22800 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22801 know some plain TeX!) but does require a lot of work and many iterations,
22802 as you can see by all the ugly TeX-mode stuff at the beginning of this
22806 \begin_layout Standard
22810 \begin_layout Plain Layout
22816 bigdrop{-1em}{3}{ptmri}{T}+
22821 here is a much easier way of doing this, of course.
22830 ) package from CTAN allows a simple way to add such letters to your documents.
22831 Since this package is not a standard part of teTeX, I can't demonstrate
22832 it within this document, but if you copy this paragraph to a new document,
22834 \begin_inset Quotes eld
22844 \begin_inset Quotes erd
22847 and the pluses from the TeX code at the beginning of the paragraph, and
22852 usepackage{dropcaps}
22854 to your LaTeX preamble, you will get a nice Times Roman Italic
22855 \begin_inset Quotes eld
22859 \begin_inset Quotes erd
22862 , whose height is three lines of text and which protrudes 1 em into the
22864 (Make certain you have copied
22865 \begin_inset Quotes eld
22873 \begin_inset Quotes erd
22876 into a directory where TeX can see it.) The first argument is the amount
22877 of indentation; in this case the negative sign moves it into the margin.
22878 The second argument is the height of the letter in number of lines of text.
22879 The third argument is the font name: virtually anything which has a tfm
22880 file should work (wade through the
22882 .../texmf/fonts/tfm
22884 directory for possibilities).
22885 My personal favorite is
22886 \begin_inset Quotes eld
22894 \begin_inset Quotes erd
22897 , a fancy German font specifically designed for dropped capitals.
22898 The fourth argument is the letter (or letters) to be dropped.
22903 package also offers the
22909 command, as well as a slightly simplified
22918 \begin_layout Section
22919 Non-standard Paragraph Shapes
22922 \begin_layout Standard
22928 \begin_layout Standard
22929 \begin_inset VSpace bigskip
22935 \begin_layout Standard
22939 \begin_layout Plain Layout
22951 \begin_layout Standard
22955 \begin_layout Plain Layout
22964 \begin_layout Plain Layout
22978 \begin_layout Standard
22983 \begin_layout Plain Layout
22994 \begin_layout Plain Layout
23003 \begin_layout Plain Layout
23012 \begin_layout Plain Layout
23021 \begin_layout Plain Layout
23030 \begin_layout Plain Layout
23039 \begin_layout Plain Layout
23048 \begin_layout Plain Layout
23057 \begin_layout Plain Layout
23066 \begin_layout Plain Layout
23075 \begin_layout Plain Layout
23084 \begin_layout Plain Layout
23093 \begin_layout Plain Layout
23102 \begin_layout Plain Layout
23111 \begin_layout Plain Layout
23120 \begin_layout Plain Layout
23129 \begin_layout Plain Layout
23138 \begin_layout Plain Layout
23147 \begin_layout Plain Layout
23156 \begin_layout Plain Layout
23162 There are times when the tyranny of rectangular paragraphs must be overthrown.
23163 In such situations, a call to the delightful plain TeX command
23170 As you can see, completely arbitrary shapes can be laid out with a suitable
23171 set of linelength definitions.
23172 While this parshape may look a bit silly and useless, one could conceive
23173 of situations such as finely tuned dropped capitals, word wrapping around
23174 non-rectangular graphics, etc.
23175 which will benefit from such handcrafting.
23178 \begin_layout Standard
23179 \begin_inset VSpace bigskip
23185 \begin_layout Standard
23190 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23197 is the number of lines of text which define the paragraph.
23198 If there turn out to be fewer lines, the shape is truncated; if there are
23199 more, the excess lines have the same dimensions as the last line of the
23209 entries specify the indentation of the line from the left margin, and the
23210 length of the line as measured from that point.
23211 The shape applies only to the current paragraph; everything is reset to
23212 normal for the next paragraph.
23215 \begin_layout Standard
23219 \begin_layout Plain Layout
23231 \begin_layout Section
23235 \begin_layout Standard
23236 As you can see, the examples in this section range from the useful to the
23238 While I don't expect that anyone will ever need the paragraph shape demonstrate
23239 d in the last section, the important point is that you can do almost anything
23240 you want in LyX if you are willing to figure out how to do it in TeX and
23242 TeX is a fantastically powerful typesetting system and all that power is
23243 available to you since LyX uses it as its backend.