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 exactly the same machinery that generates
4681 LyX's on-screen labels, so the labels will look in the output much as they
4682 do 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
4702 \begin_inset CommandInset ref
4704 reference "sub:Citation-format-description"
4712 manual for the details.
4715 \begin_layout Standard
4716 The other significant defect is that cross-referenced information is printed
4717 with every entry with which it is associated.
4718 So you can see things like this:
4723 \begin_inset Quotes eld
4726 Context and Logical Form
4727 \begin_inset Quotes erd
4732 Language in Context: Selected Essays
4734 (Oxford: Oxford University Press, 2007), pp.
4740 \begin_inset Quotes eld
4743 Semantics in Context
4744 \begin_inset Quotes erd
4749 Language in Context: Selected Essays
4751 (Oxford: Oxford University Press, 2007), pp.
4755 \begin_layout Standard
4756 This should be fixed before long.
4759 \begin_layout Standard
4760 There is no support at present for sectioned bibliographies.
4761 If you have multiple bibliographies, then LyX will print the same bibliography
4765 \begin_layout Section
4769 \begin_layout Standard
4770 LyX will happily export indexes as XHTML, but with certain limitations at
4774 \begin_layout Standard
4775 Index export will be most reliable when you do not attempt to use the fancy
4776 constructs that are described in the section on indexes in the
4784 \begin_layout Plain Layout
4785 The main issue here is that LyX itself does not really handle these.
4786 It just lets you enter what you would have to enter in raw LaTeX.
4791 We'll describe how they are handled using the subsection headings from
4795 \begin_layout Itemize
4796 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4797 these, but the entries must be separated by
4798 \begin_inset Quotes eld
4802 \begin_inset Quotes erd
4805 , that is, there must be spaces around the exclamation point.
4806 This is because it is otherwise too difficult to check for escaped exclamation
4807 points, ones in math, and so forth.
4810 \begin_layout Itemize
4811 Page Ranges: There is no support at all for page ranges, since these make
4812 no sense with XHMTL.
4813 Instead, you will just get two index entries, one at either end.
4816 \begin_layout Itemize
4817 Cross-referencing: There is no support for cross-referencing.
4818 If LyX finds an entry containing the
4819 \begin_inset Quotes eld
4822 |see\SpecialChar \ldots{}
4824 \begin_inset Quotes erd
4827 construct, it is just dropped, and the rest is treated as an ordinary index
4831 \begin_layout Itemize
4832 Index Entry Order: LyX does support attempts to fix the sorting order.
4833 It will take what is before the first `@' it finds and use that for sorting,
4834 taking what follows the first `@' to be the actual entry.
4835 At present, LyX does not check for escaped `@', so do not try to index
4839 \begin_layout Itemize
4840 Index Entry Layout: You can format entries by using the text style dialog,
4841 or by using any other method available within LyX itself.
4842 There is no support for constructs like:
4843 \begin_inset Quotes eld
4847 \begin_inset Quotes erd
4851 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4852 and everything that follows it.
4855 \begin_layout Itemize
4856 Multiple Indexes: There is no support for multiple indexes.
4857 Rather, all index entries will be printed as one large index.
4858 To avoid our printing several versions of the index, we print only the
4859 main index, so make sure you have one.
4862 \begin_layout Section
4863 Nomenclature and Glossary
4866 \begin_layout Standard
4867 There is at present no support for glossaries.
4870 \begin_layout Chapter
4874 \begin_layout Section
4878 \begin_layout Standard
4879 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4880 and retrieve information about the LyX internal state.
4881 This is only intended for advanced users, but they should find it useful.
4882 It is by writing to the LyX server, for example, that bibliography managers,
4883 such as JabRef, are able to
4884 \begin_inset Quotes eld
4888 \begin_inset Quotes erd
4894 \begin_layout Section
4895 Starting the LyX Server
4898 \begin_layout Standard
4899 The LyX server works through the use of a pair of named pipes.
4900 These are usually located in
4901 \begin_inset Flex CharStyle:Code
4904 \begin_layout Plain Layout
4910 , (except on Windows, where
4914 named pipes are special objects located in
4915 \begin_inset Flex CharStyle:Code
4918 \begin_layout Plain Layout
4930 ) and have the names
4931 \begin_inset Quotes eld
4935 \begin_inset Flex CharStyle:Code
4938 \begin_layout Plain Layout
4945 \begin_inset Quotes erd
4949 \begin_inset Quotes eld
4953 \begin_inset Flex CharStyle:Code
4956 \begin_layout Plain Layout
4963 \begin_inset Quotes erd
4967 External programs write into
4968 \begin_inset Flex CharStyle:Code
4971 \begin_layout Plain Layout
4977 and read back data from
4978 \begin_inset Flex CharStyle:Code
4981 \begin_layout Plain Layout
4988 The stem of the pipe names can be defined in the
4989 \begin_inset Flex CharStyle:MenuItem
4992 \begin_layout Plain Layout
4993 Tools\SpecialChar \menuseparator
5000 \begin_inset Flex CharStyle:Code
5003 \begin_layout Plain Layout
5004 "/home/myhome/lyxpipe"
5010 \begin_inset Flex CharStyle:Code
5013 \begin_layout Plain Layout
5032 configure this manually in order for the server to start.
5035 \begin_layout Standard
5037 \begin_inset Flex CharStyle:Code
5040 \begin_layout Plain Layout
5047 \begin_inset Flex CharStyle:Code
5050 \begin_layout Plain Layout
5056 ' to create the pipes.
5057 If one of the pipes already exists, LyX will assume that another LyX process
5058 is already running and will not start the server.
5059 On POSIX (Unix like) systems, if for some other reason, an unused
5060 \begin_inset Quotes eld
5064 \begin_inset Quotes erd
5067 pipe is left in existence when LyX closes, then LyX will try to delete
5069 If this fails for some reason, you will need to delete the pipes manually
5070 and then restart LyX.
5071 On Windows, pipes are deleted by the OS on program termination or crash,
5073 \begin_inset Quotes eld
5077 \begin_inset Quotes erd
5080 pipes should not be possible.
5083 \begin_layout Standard
5084 To have several LyX processes with servers at the same time, you have to
5085 use different configurations, perhaps by using separate user directories,
5087 \begin_inset Flex CharStyle:Code
5090 \begin_layout Plain Layout
5096 file, for each process.
5099 \begin_layout Standard
5100 If you are developing a client program, you might find it useful to enable
5101 debugging information from the LyX server.
5102 Do this by starting LyX as
5103 \begin_inset Flex CharStyle:Code
5106 \begin_layout Plain Layout
5115 \begin_layout Standard
5116 You can find a complete example client written in C in the source distribution
5118 \begin_inset Flex CharStyle:Code
5121 \begin_layout Plain Layout
5122 development/lyxserver/server_monitor.c
5130 \begin_layout Standard
5131 Another useful tool is command-line based client you will find in
5132 \begin_inset Flex CharStyle:Code
5135 \begin_layout Plain Layout
5136 src/client/lyxclient
5144 \begin_layout Section
5145 Normal communication
5148 \begin_layout Standard
5149 To issue a LyX call, the client writes a line of ASCII text into the input
5151 This line has the following format:
5168 \begin_layout Description
5169 clientname is a name that the client can choose arbitrarily.
5170 Its only use is that LyX will echo it if it sends an answer—so a client
5171 can dispatch results from different requesters.
5174 \begin_layout Description
5175 function is the function you want LyX to perform.
5176 It is the same as the commands you'd use in the minibuffer.
5179 \begin_layout Description
5180 argument is an optional argument which is meaningful only to some functions
5182 \begin_inset Quotes eld
5186 \begin_inset Quotes erd
5189 LFUN will insert the argument as text at the cursor position).
5192 \begin_layout Standard
5193 The answer from LyX will arrive in the output pipe and be of the form
5210 \begin_layout Standard
5219 are just echoed from the command request, while
5223 is more or less useful information filled according to how the command
5224 execution worked out.
5225 Some commands, such as
5226 \begin_inset Quotes eld
5230 \begin_inset Quotes erd
5233 , will return information about the internal state of LyX, while other will
5234 return an empty data-response.
5235 This means that the command execution went fine.
5238 \begin_layout Standard
5239 In case of errors, the response from LyX will have this form
5256 \begin_layout Standard
5261 should contain an explanation of why the command failed.
5264 \begin_layout Standard
5268 \begin_layout LyX-Code
5269 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5270 \begin_inset Newline newline
5273 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5274 \begin_inset Newline newline
5277 read a <~/.lyxpipe.out
5278 \begin_inset Newline newline
5284 \begin_layout Section
5288 \begin_layout Standard
5289 LyX can notify clients of events going on asynchronously.
5290 Currently it will only do this if the user binds a key sequence with the
5292 \begin_inset Quotes eld
5296 \begin_inset Quotes erd
5300 The format of the string LyX sends is as follows:
5304 \begin_inset Flex CharStyle:Code
5307 \begin_layout Plain Layout
5318 \begin_layout Standard
5323 is the printed representation of the key sequence that was actually typed
5327 \begin_layout Standard
5328 This mechanism can be used to extend LyX's command set and implement macros.
5329 Bind some key sequence to
5330 \begin_inset Quotes eld
5334 \begin_inset Quotes erd
5338 Then start a client that listens on the output pipe, dispatches the command
5339 according to the sequence, and starts a function that may use LyX calls
5340 and LyX requests to issue a command or a series of commands to LyX.
5343 \begin_layout Section
5344 The simple LyX Server Protocol
5347 \begin_layout Standard
5348 LyX implements a simple protocol that can be used for session management.
5349 All messages are of the form
5362 \begin_layout Standard
5368 \begin_inset Quotes eld
5372 \begin_inset Quotes erd
5376 \begin_inset Quotes eld
5380 \begin_inset Quotes erd
5385 \begin_inset Quotes eld
5389 \begin_inset Quotes erd
5392 is received from a client, LyX will report back to inform the client that
5393 it's listening to it's messages, while
5394 \begin_inset Quotes eld
5398 \begin_inset Quotes erd
5401 sent from LyX will inform clients that LyX is closing.
5404 \begin_layout Section
5405 Reverse DVI/PDF search
5408 \begin_layout Standard
5409 Some DVI/PDF viewers
5413 \begin_layout Plain Layout
5414 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5415 Skim on Mac OSX and SumatraPDF on Windows.
5424 facility (also called
5429 This means that you can tell LyX to put the cursor to a specific line in
5430 the document by clicking at the respective position in the DVI/PDF output.
5431 To achieve this, the viewer must be able to communicate with LyX.
5432 This is done via the LyX server either by using the named pipe (
5436 ), or the UNIX domain socket (
5440 ) that LyX creates in its temporary directory (this is the way the
5441 \begin_inset Flex CharStyle:Code
5444 \begin_layout Plain Layout
5450 program communicates with LyX).
5451 In some cases, you need a helper script that mediates between the viewer
5452 and LyX, in others, the viewer can communicate with LyX directly.
5453 This depends on the selected viewer and on your operating system.
5454 The same applies to the way viewers need to be configured and the way the
5455 reverse search is actually performed.
5456 In what follows, we will thus describe how to setup reverse search for
5458 Before we turn to this, though, we will explain what needs to be done generally
5459 to enable reverse search in the DVI/PDF output.
5462 \begin_layout Subsection
5464 \change_inserted 2 1274788899
5465 \begin_inset CommandInset label
5467 name "sub:rev-search"
5471 Automatical enabling
5474 \begin_layout Standard
5476 \change_inserted 2 1274789582
5477 In most cases LyX will do the work for you by enabling
5478 \begin_inset Flex CharStyle:MenuItem
5481 \begin_layout Plain Layout
5483 \change_inserted 2 1274789026
5484 Document\SpecialChar \menuseparator
5485 Output\SpecialChar \menuseparator
5492 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5493 srcltx package (for DVI) respectively.
5494 This option can be easily reached also on
5495 \begin_inset Flex CharStyle:Code
5498 \begin_layout Plain Layout
5500 \change_inserted 2 1274789582
5511 \begin_layout Standard
5513 \change_inserted 2 1274789534
5514 Plase note that including
5515 \begin_inset Flex CharStyle:Code
5518 \begin_layout Plain Layout
5520 \change_inserted 2 1274789498
5529 \begin_inset Flex CharStyle:Code
5532 \begin_layout Plain Layout
5534 \change_inserted 2 1274789484
5542 sometimes have an impact on the typeset and you should switch them off
5543 for the final typesets.
5548 \begin_layout Standard
5550 \change_inserted 2 1274789340
5551 You can also define custom macro in preferences and in case you need some
5552 special tweaks read the next section about manual enabling.
5558 \begin_layout Subsection
5560 \change_inserted 2 1274788680
5566 \begin_layout Standard
5567 LaTeX provides several different methods for reverse search.
5568 Some are built-in in the
5569 \begin_inset Flex CharStyle:Code
5572 \begin_layout Plain Layout
5578 program, some are provided by external packages.
5579 Your choice depends on whether your LaTeX distribution already provides
5580 a given method (the built-in methods are rather new) and whether your viewer
5582 The available methods are described in the following.
5583 \change_inserted 2 1274788557
5587 \begin_layout Subsubsection*
5588 Built-in DVI-search via src-specials (DVI only)
5591 \begin_layout Standard
5592 This method provides the DVI file with the necessary information for reverse
5594 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5595 distribution should include it), and it works reliably.
5596 To enable it, change the
5597 \begin_inset Flex CharStyle:MenuItem
5600 \begin_layout Plain Layout
5605 \begin_layout Plain Layout
5618 \begin_inset Flex CharStyle:MenuItem
5621 \begin_layout Plain Layout
5626 \begin_layout Plain Layout
5633 eX (plain)->DraftDVI
5639 \begin_inset Flex CharStyle:MenuItem
5642 \begin_layout Plain Layout
5643 Preferences\SpecialChar \menuseparator
5644 File Handling\SpecialChar \menuseparator
5651 \begin_inset Flex CharStyle:Code
5654 \begin_layout Plain Layout
5655 latex -src-specials $$i
5661 If this doesn't work, check if your TeX engine needs different options
5662 (the syntax might differ in some distributions).
5665 \begin_layout Subsubsection*
5666 External Packages (PDFSync and scrltx)
5669 \begin_layout Standard
5678 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5680 In order to enable it, load the packages in the LyX preamble:
5683 \begin_layout Itemize
5684 \begin_inset Flex CharStyle:Code
5687 \begin_layout Plain Layout
5695 for reverse PDF search,
5698 \begin_layout Itemize
5700 \begin_inset Flex CharStyle:Code
5703 \begin_layout Plain Layout
5706 usepackage[active]{srcltx}
5711 for reverse DVI search.
5714 \begin_layout Standard
5715 If you want to be able to perform both DVI and PDF reverse searches, you
5716 can also insert in the preamble the following lines
5719 \begin_layout LyX-Code
5723 \begin_inset Newline newline
5729 \begin_inset Newline newline
5735 \begin_inset Newline newline
5741 \begin_inset Newline newline
5746 usepackage[active]{srcltx}
5747 \begin_inset Newline newline
5755 \begin_layout Standard
5756 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5757 right package will be used.
5760 \begin_layout Standard
5761 Note that PDFSync might affect the output layout of your document.
5762 It is therefore advised to disable PDFsync for final documents.
5765 \begin_layout Subsubsection*
5766 Built-in reverse search via SyncTeX (DVI and PDF)
5769 \begin_layout Standard
5771 \begin_inset Flex CharStyle:Code
5774 \begin_layout Plain Layout
5780 have built-in support for both PDF and DVI reverse search.
5785 facility is basically the result of the integration of the PDFSync package
5786 to the pdftex program and its merge with the
5791 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5793 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5794 already provide SyncTeX support.
5797 \begin_layout Standard
5798 To enable SyncTeX for DVI output, change the
5799 \begin_inset Flex CharStyle:MenuItem
5802 \begin_layout Plain Layout
5807 \begin_layout Plain Layout
5820 \begin_inset Flex CharStyle:MenuItem
5823 \begin_layout Plain Layout
5828 \begin_layout Plain Layout
5835 eX (plain) -> DraftDVI
5841 \begin_inset Flex CharStyle:MenuItem
5844 \begin_layout Plain Layout
5845 Preferences\SpecialChar \menuseparator
5846 File Handling\SpecialChar \menuseparator
5853 \begin_inset Flex CharStyle:Code
5856 \begin_layout Plain Layout
5857 latex -synctex=1 $$i
5862 , and for PDF output, change the
5863 \begin_inset Flex CharStyle:MenuItem
5866 \begin_layout Plain Layout
5871 \begin_layout Plain Layout
5878 eX (pdflatex) -> PDF (pdflatex)
5884 \begin_inset Flex CharStyle:Code
5887 \begin_layout Plain Layout
5888 pdflatex -synctex=1 $$i
5894 Check the documentation of your viewer whether the viewer needs to be configure
5895 d for the use with SyncTeX.
5899 \begin_layout Plain Layout
5901 \begin_inset Flex CharStyle:Code
5904 \begin_layout Plain Layout
5910 option enables gzip compression.
5911 If your viewer does not support it, you should instead use
5912 \begin_inset Flex CharStyle:Code
5915 \begin_layout Plain Layout
5929 \begin_layout Subsection
5930 Configuring and using specific viewers
5933 \begin_layout Subsubsection*
5934 Xdvi (all platforms)
5937 \begin_layout Standard
5939 \begin_inset Flex CharStyle:Code
5942 \begin_layout Plain Layout
5948 , you don't need to do anything else for performing a reverse DVI search,
5949 as LyX already provides the necessary hooks for automatically using the
5951 \begin_inset Flex CharStyle:Code
5954 \begin_layout Plain Layout
5961 Just setup your document as described above (reverse search is triggered
5962 by Ctrl-click or Alt-click on Mac OSX, respectively).
5965 \begin_layout Standard
5966 However, if for whatever reason you want to use the named pipe instead of
5967 the socket for communicating with LyX, simply change the DVI viewer in
5969 \begin_inset Flex CharStyle:MenuItem
5972 \begin_layout Plain Layout
5973 Preferences\SpecialChar \menuseparator
5974 File Handling\SpecialChar \menuseparator
5984 \begin_layout Plain Layout
5985 On Mac OSX you have to use
5986 \begin_inset Flex CharStyle:Code
5989 \begin_layout Plain Layout
5990 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6001 \begin_inset Flex CharStyle:Code
6004 \begin_layout Plain Layout
6005 xdvi -editor 'lyxeditor.sh %f %l'
6011 \begin_inset Flex CharStyle:Code
6014 \begin_layout Plain Layout
6020 is a suitable script.
6021 For example, a minimal shell script is the following one:
6024 \begin_layout LyX-Code
6026 \begin_inset Newline newline
6029 LYXPIPE="/path/to/lyxpipe"
6030 \begin_inset Newline newline
6033 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6034 \begin_inset Newline newline
6037 echo "$COMMAND" > "${LYXPIPE}".in || exit
6038 \begin_inset Newline newline
6041 read < "${LYXPIPE}".out || exit
6044 \begin_layout Standard
6046 \begin_inset Flex CharStyle:Code
6049 \begin_layout Plain Layout
6059 \begin_layout Plain Layout
6066 XServer pipe path specified in
6067 \begin_inset Flex CharStyle:MenuItem
6070 \begin_layout Plain Layout
6071 Preferences\SpecialChar \menuseparator
6081 \begin_layout Plain Layout
6083 \begin_inset Flex CharStyle:Code
6086 \begin_layout Plain Layout
6092 folder of a source distribution you can find a
6093 \begin_inset Flex CharStyle:Code
6096 \begin_layout Plain Layout
6102 script which is able to locate the
6106 based on your preferences.
6114 \begin_layout Subsubsection*
6118 \begin_layout Standard
6120 \begin_inset Flex CharStyle:Code
6123 \begin_layout Plain Layout
6124 /Applications/MacDviX_Folder/calleditor.script
6129 , add the following lines:
6132 \begin_layout LyX-Code
6137 \begin_layout Plain Layout
6144 X.app/Contents/MacOS/lyxeditor "$2" $1
6145 \begin_inset Newline newline
6151 \begin_layout Standard
6152 Modify the lines accordingly if you install LyX somewhere else than in the
6153 Applications folder.
6156 \begin_layout Standard
6157 Reverse search is triggered by Alt-click (OPTION-click).
6160 \begin_layout Subsubsection*
6164 \begin_layout Standard
6166 \begin_inset Flex CharStyle:Code
6169 \begin_layout Plain Layout
6170 open -a Skim.app $$i
6175 to the viewer setting in
6176 \begin_inset Flex CharStyle:MenuItem
6179 \begin_layout Plain Layout
6180 Preferences\SpecialChar \menuseparator
6181 File Handling\SpecialChar \menuseparator
6182 File formats\SpecialChar \menuseparator
6189 \begin_inset Flex CharStyle:MenuItem
6192 \begin_layout Plain Layout
6193 Skim\SpecialChar \menuseparator
6194 Preferences\SpecialChar \menuseparator
6204 \begin_layout Plain Layout
6214 \begin_layout Standard
6215 Reverse search is triggered by COMMAND-SHIFT-click
6218 \begin_layout Subsubsection*
6222 \begin_layout Standard
6224 \begin_inset Flex CharStyle:MenuItem
6227 \begin_layout Plain Layout
6228 Settings\SpecialChar \menuseparator
6229 Configure Okular\SpecialChar \ldots{}
6230 \SpecialChar \menuseparator
6237 \begin_inset Quotes eld
6241 \begin_inset Quotes erd
6245 \begin_inset Flex CharStyle:Code
6248 \begin_layout Plain Layout
6257 \begin_layout Standard
6258 Reverse search is triggered by SHIFT-click.
6261 \begin_layout Subsubsection*
6265 \begin_layout Standard
6266 Launch yap, choose its
6267 \begin_inset Flex CharStyle:MenuItem
6270 \begin_layout Plain Layout
6271 View\SpecialChar \menuseparator
6278 \begin_inset Quotes eld
6282 \begin_inset Quotes erd
6287 \begin_inset Quotes eld
6290 New\SpecialChar \ldots{}
6292 \begin_inset Quotes erd
6295 button and, in the window that opens, enter
6296 \begin_inset Quotes eld
6300 \begin_inset Quotes erd
6303 (or any other name you like) in the
6304 \begin_inset Quotes eld
6308 \begin_inset Quotes erd
6312 Now click on the button labeled
6313 \begin_inset Quotes eld
6316 \SpecialChar \ldots{}
6318 \begin_inset Quotes erd
6321 to open a file dialog and navigate to the directory containing the batch
6323 \begin_inset Flex CharStyle:Code
6326 \begin_layout Plain Layout
6334 \begin_inset Flex CharStyle:Code
6337 \begin_layout Plain Layout
6343 and then specify the program arguments as
6344 \begin_inset Flex CharStyle:Code
6347 \begin_layout Plain Layout
6355 \begin_inset Flex CharStyle:Code
6358 \begin_layout Plain Layout
6364 wrapper is used for communicating with LyX through the
6371 \begin_layout LyX-Code
6373 \begin_inset Newline newline
6376 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6385 \begin_inset Newline newline
6399 \begin_layout Standard
6400 Make sure that the LyXServer pipe path you specified in LyX is
6401 \begin_inset Flex CharStyle:Code
6404 \begin_layout Plain Layout
6418 , otherwise change the
6419 \begin_inset Flex CharStyle:Code
6422 \begin_layout Plain Layout
6428 wrapper accordingly.
6431 \begin_layout Standard
6432 In yap, reverse search is triggered by double-click.
6435 \begin_layout Subsubsection*
6436 SumatraPDF (Windows)
6439 \begin_layout Standard
6440 In order to use SumatraPDF for inverse search, enter
6441 \begin_inset Flex CharStyle:Code
6444 \begin_layout Plain Layout
6445 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6450 in the viewer setting in
6451 \begin_inset Flex CharStyle:MenuItem
6454 \begin_layout Plain Layout
6455 Preferences\SpecialChar \menuseparator
6456 File Handling\SpecialChar \menuseparator
6457 File formats\SpecialChar \menuseparator
6464 \begin_inset Flex CharStyle:Code
6467 \begin_layout Plain Layout
6473 is the previous wrapper.
6474 If SumatraPDF.exe is not in your command PATH, use its full file name.
6477 \begin_layout Standard
6478 Reverse search is triggered by double-click.
6481 \begin_layout Subsubsection*
6485 \begin_layout Standard
6486 First of all, make sure that yap is your default DVI viewer in the Windows
6487 environment, then launch it, choose its
6488 \begin_inset Flex CharStyle:MenuItem
6491 \begin_layout Plain Layout
6492 View\SpecialChar \menuseparator
6499 \begin_inset Quotes eld
6503 \begin_inset Quotes erd
6508 \begin_inset Quotes eld
6511 New\SpecialChar \ldots{}
6513 \begin_inset Quotes erd
6516 button and, in the window that opens, enter
6517 \begin_inset Quotes eld
6521 \begin_inset Quotes erd
6524 (or any other name you like) in the
6525 \begin_inset Quotes eld
6529 \begin_inset Quotes erd
6533 Now click on the button labeled
6534 \begin_inset Quotes eld
6537 \SpecialChar \ldots{}
6539 \begin_inset Quotes erd
6542 to open a file dialog and navigate to the directory containing the
6543 \begin_inset Flex CharStyle:Code
6546 \begin_layout Plain Layout
6552 program (which is installed by default on Cygwin along with the LyX executable).
6554 \begin_inset Flex CharStyle:Code
6557 \begin_layout Plain Layout
6563 and then specify the program arguments as
6564 \begin_inset Flex CharStyle:Code
6567 \begin_layout Plain Layout
6574 In this way, you will be using the
6578 for communicating with LyX.
6579 If, for whatever reason, you want to use the
6584 \begin_inset Flex CharStyle:Code
6587 \begin_layout Plain Layout
6593 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6596 \begin_layout Standard
6597 In yap, reverse search is triggered by double-click.
6600 \begin_layout Subsubsection*
6604 \begin_layout Standard
6605 In order to use SumatraPDF for inverse search, enter
6606 \begin_inset Flex CharStyle:Code
6609 \begin_layout Plain Layout
6615 in the viewer setting in
6616 \begin_inset Flex CharStyle:MenuItem
6619 \begin_layout Plain Layout
6620 Preferences\SpecialChar \menuseparator
6621 File Handling\SpecialChar \menuseparator
6622 File formats\SpecialChar \menuseparator
6629 \begin_inset Flex CharStyle:Code
6632 \begin_layout Plain Layout
6638 is the following script (to be placed in your command PATH,
6639 \begin_inset Flex CharStyle:Code
6642 \begin_layout Plain Layout
6648 being the best choice):
6651 \begin_layout LyX-Code
6653 \begin_inset Newline newline
6657 \begin_inset Newline newline
6660 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6663 \begin_layout Standard
6664 This wrapper script is needed because SumatraPDF is a native Windows application
6665 and does not understand the posix paths used by the Cygwin version of LyX.
6666 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6669 \begin_inset Flex CharStyle:Code
6672 \begin_layout Plain Layout
6678 enables communication via the
6684 \begin_inset Flex CharStyle:Code
6687 \begin_layout Plain Layout
6693 option if you want to use the
6697 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6700 \begin_layout Standard
6701 Reverse search is triggered by double-click.
6702 \change_inserted 1 1271453423
6706 \begin_layout Section
6708 \change_inserted 1 1271453442
6712 \begin_layout Standard
6714 \change_inserted 1 1271454338
6715 To make forward search possible you need to provide generated output PDF/DVI
6716 file with additional information about TeX sources.
6717 This can be done via the methods described in the section
6718 \begin_inset CommandInset ref
6720 reference "sub:rev-search"
6727 \begin_layout Standard
6729 \change_inserted 1 1271454479
6730 Secondly you need to configure LyX for using your viewers in
6731 \begin_inset Flex CharStyle:MenuItem
6734 \begin_layout Plain Layout
6736 \change_inserted 1 1271453866
6737 Preferences\SpecialChar \menuseparator
6738 Output\SpecialChar \menuseparator
6745 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6750 \begin_layout Plain Layout
6752 \change_inserted 1 1271454273
6753 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6762 Some other viewers allow at least reloading and positioning to particular
6763 page of the file --- Evince or xpdf --- for these cases you can use external
6765 Please study the prepared examples in the Preferences dialog.
6770 \begin_layout Chapter
6771 Special Document Classes
6774 \begin_layout Section
6778 \begin_layout Standard
6784 \begin_layout Subsection
6788 \begin_layout Standard
6789 This section describes how LyX can be used to write articles for submission
6790 to the scientific journal
6792 Astronomy and Astrophysics
6794 (www.edpsciences.fr/aa/
6795 \begin_inset Flex URL
6798 \begin_layout Plain Layout
6800 http://www.edpsciences.fr/aa/
6805 ) using Version 5.01 of the document class
6810 This package can be downloaded from the ftp site
6813 \begin_layout Standard
6814 \begin_inset VSpace medskip
6820 \begin_layout Standard
6822 \begin_inset Flex URL
6825 \begin_layout Plain Layout
6827 ftp://ftp.edpsciences.org/pub/aa/readme.html
6835 \begin_layout Standard
6836 \begin_inset VSpace medskip
6842 \begin_layout Standard
6843 A manual comes together with that package, and this text is not meant to
6844 replace the original manual but merely a short guide how to realize the
6845 correct form of your paper.
6849 \begin_layout Standard
6850 Please note that the publisher of the journal was changed from Springer
6851 to EDP Sciences starting January 1, 2001.
6852 That change implicated also some slight changes of the style files, namely
6853 the removal of the thesaurus command.
6854 The LyX class aa supports the newest version of these style files, V 5.01.
6855 If you have an older version installed, please upgrade.
6856 For compatibility, the old (version 4) layout has been kept as
6861 Please refer to the comments in
6863 LyXDir/layouts/aapaper.layout
6868 \begin_layout Subsection
6872 \begin_layout Standard
6873 It is recommended you start from the example template distributed with LyX.
6874 If you are not using a template, note the following settings:
6877 \begin_layout Itemize
6884 Document\SpecialChar \menuseparator
6887 dialog (OK, that one was obvious).
6890 \begin_layout Itemize
6891 Don't change the option
6894 \begin_inset space ~
6904 The whole layout is done by the macros, you shouldn't change anything.
6907 \begin_layout Subsection
6911 \begin_layout Standard
6912 First thing to enter is the header information.
6913 It consists of seven entries, of which some are optional.
6917 \begin_layout Itemize
6925 \begin_layout Itemize
6933 \begin_layout Itemize
6941 \begin_layout Itemize
6949 \begin_layout Itemize
6954 : [optional] if more than one author: whom to contact for offprint requests.
6957 \begin_layout Itemize
6962 : [optional] mail address for contacts.
6965 \begin_layout Itemize
6973 Received: <date>; Accepted <date>
6976 \begin_layout Standard
6977 There is no need to issue the
6983 command, this is done automatically by LyX when the header is finished.
6984 Although the order of the single header entries doesn't matter it is advised
6985 to keep the above sequence, just to get the best optics and meets the layout
6986 of the real document.
6989 \begin_layout Standard
6990 If you want to place footnotes in the header block, e.
6991 \begin_inset space \thinspace{}
6995 \begin_inset space \space{}
6998 to state your present address, just use the standard footnote via the menu
7001 Insert\SpecialChar \menuseparator
7005 LyX will automagically use the term
7014 \begin_layout Standard
7015 In addition to these topics, the macros use three additional LaTeX commands
7016 that have no counterpart in LyX:
7019 \begin_layout Itemize
7026 to separate different names for more than one author and institute, respectivel
7030 \begin_layout Itemize
7037 to mark corresponding author/institute pairs.
7038 The institutes are numbered sequentially as they appear in the
7042 field, so you have to put a marker to each author.
7045 \begin_layout Itemize
7052 to supply an email address for fast contact.
7055 \begin_layout Standard
7056 In all cases, the appropriate command has to be entered in LyX and marked
7062 \begin_layout Subsection
7066 \begin_layout Standard
7067 The abstract should immediately follow the header block.
7068 With version 5 the abstract environment was changed to a command, and there
7069 is now a resctriction to only one paragraph.
7070 In addition, it should contain an entry with the keywords.
7071 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7078 by hand and mark it as LaTeX code.
7079 Refer to the example paper.
7082 \begin_layout Subsection
7083 Supported environments
7086 \begin_layout Standard
7087 The A&A paper layout supports the following environments for structuring
7091 \begin_layout Itemize
7097 \begin_layout Itemize
7103 \begin_layout Itemize
7109 \begin_layout Itemize
7115 \begin_layout Itemize
7121 \begin_layout Itemize
7127 \begin_layout Itemize
7133 \begin_layout Itemize
7139 \begin_layout Itemize
7145 \begin_layout Itemize
7151 \begin_layout Itemize
7157 \begin_layout Itemize
7163 \begin_layout Subsection
7164 Commands not supported by LyX
7167 \begin_layout Standard
7168 Some commands are not yet supported by the
7173 Some have already been mentioned.
7174 For the sake of completeness, they are listed all together here:
7177 \begin_layout Itemize
7185 \begin_layout Itemize
7193 \begin_layout Itemize
7201 \begin_layout Itemize
7209 \begin_layout Itemize
7217 \begin_layout Itemize
7225 \begin_layout Itemize
7233 \begin_layout Itemize
7241 \begin_layout Standard
7242 If you want to use any of these commands, you have to enter them yourself.
7245 Do not forget to mark them as LaTeX code!
7248 \begin_layout Subsection
7249 Figure and Table Floats
7252 \begin_layout Standard
7253 LyX provides support for the necessary float environments
7255 figure, figure*, table
7261 , therefore we won't tell much about it here.
7265 \begin_inset space ~
7271 Just remember that tables should be left-aligned.
7272 For that, select the table and change the alignment in
7274 Edit\SpecialChar \menuseparator
7276 \begin_inset space ~
7282 \begin_layout Standard
7283 There is only one special thing: the figures with caption besides the figure.
7284 To create such a figure, you have to do the following:
7287 \begin_layout Enumerate
7288 Create a wide figure float:
7290 Insert\SpecialChar \menuseparator
7291 Float\SpecialChar \menuseparator
7294 , then right click in the figure and select
7300 \begin_inset space ~
7308 \begin_layout Enumerate
7309 Enter your caption text.
7312 \begin_layout Enumerate
7317 to move the cursor above the caption.
7320 \begin_layout Enumerate
7324 \begin_layout Enumerate
7325 Position the cursor behind the figure and insert a horizontal fill:
7327 Insert\SpecialChar \menuseparator
7329 \begin_inset space ~
7332 Character\SpecialChar \menuseparator
7334 \begin_inset space ~
7342 \begin_layout Enumerate
7343 Switch to LaTeX mode:
7346 \begin_inset space ~
7354 \begin_layout Enumerate
7364 Do not close the brace!
7367 \begin_layout Enumerate
7368 Position the cursor behind the caption text, switch to LaTeX mode and insert
7372 \begin_inset space ~
7384 \begin_layout Standard
7385 Also, refer to the figures in the example paper.
7388 \begin_layout Subsection
7392 \begin_layout Standard
7393 For submission, the paper has to be formated in a special double-spacing
7395 For this purpose, you have to give the option
7399 to the documentclass.
7400 This must be done using the extra class options field in the
7402 Document\SpecialChar \menuseparator
7406 Just enter the string
7413 \begin_layout Subsection
7417 \begin_layout Standard
7422 directory contains an example paper written with LyX.
7423 It is the example paper from the original macro package, translated to
7425 Use it for inspiration, and compare the original LaTeX code with LyX way
7429 \begin_layout Section
7433 \begin_layout Standard
7439 \begin_layout Subsection
7443 \begin_layout Standard
7444 AASTeX is a set of macros produced by the American Astronomical Society
7445 to facilitate electronic manuscript submission to the three journals they
7446 publish: the Astrophysical Journal (including the Letters and Supplement),
7447 the Astronomical Journal, and the Publications of the Astronomical Society
7449 LyX has proven to be an excellent tool for generating these documents,
7450 especially given its equation, citation, and figure handling capabilities.
7451 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7452 is the version described here, or higher.
7453 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7454 incompatible with LyX.
7455 The AASTeX package may be downloaded from the AASTeX Web site
7458 \begin_layout Standard
7459 \begin_inset VSpace medskip
7465 \begin_layout Standard
7467 \begin_inset Flex URL
7470 \begin_layout Plain Layout
7472 http://www.journals.uchicago.edu/AAS/AASTeX
7480 \begin_layout Standard
7481 \begin_inset VSpace medskip
7487 \begin_layout Standard
7488 A complete user guide is contained in that package and you should familiarize
7489 yourself with it thoroughly before embarking on writing a paper in LyX.
7490 LyX will not reduce the need to figure out all the AASTeX commands, it
7491 will only reduce the drudgery of typing everything in.
7492 It is your responsibility to ensure that the final exported LaTeX document
7493 conforms completely to the requirements of the journal to which you are
7494 submitting your paper.
7497 \begin_layout Subsection
7498 Starting a New Paper
7501 \begin_layout Standard
7502 I strongly suggest that you start with the AASTeX template file.
7505 File\SpecialChar \menuseparator
7512 , enter the new file name, then choose the
7517 This will show the most common fields found in a manuscript.
7518 Simply overwrite the existing text (including the brackets,
7522 ) with the correct information.
7523 Many of the AASTeX commands and environments can be implemented directly
7524 in LyX, but some cannot: most noticeably
7536 , which should stick out like a sore thumb if you actually just opened the
7538 For commands such as these, the LaTeX code must be entered directly and
7540 Such commands are referred to as TeX code, or Evil Red Text.
7541 I tried to minimize the amount of TeX code needed in an AASTeX document,
7542 but there is still a bit more required than any of us would like.
7545 \begin_layout Subsection
7546 Finishing Your Paper
7549 \begin_layout Standard
7550 When the paper is finished to your satisfaction and previews/prints correctly,
7552 \begin_inset Quotes eld
7556 \begin_inset Quotes erd
7559 actions which need to be done before you submit it to the journals.
7563 \begin_layout Enumerate
7564 Export your paper as a LaTeX file (
7566 File\SpecialChar \menuseparator
7567 Export\SpecialChar \menuseparator
7574 \begin_layout Enumerate
7579 file with your favorite text editor
7583 \begin_layout Enumerate
7584 remove the comment lines before the
7593 \begin_layout Enumerate
7598 usepackage...{fontenc}
7600 line if it appears (usually just after
7615 \begin_layout Enumerate
7616 remove everything between (and including) the
7628 commands, except for any commands you specifically put into the LaTeX preamble
7629 (which should appear immediately after the
7630 \begin_inset Quotes eld
7633 User specified LaTeX commands
7634 \begin_inset Quotes erd
7645 \begin_layout Enumerate
7646 Run the resulting file through LaTeX to make sure it still processes correctly.
7649 \begin_layout Enumerate
7650 Reread the journal requirements to make sure your filenames and formats
7654 \begin_layout Enumerate
7658 \begin_layout Subsection
7659 Comments On Specific Commands
7662 \begin_layout Standard
7663 I will not describe the detailed usage of the individual AASTeX commands:
7664 the AASTeX User Guide (
7668 ) gives a good description of each.
7669 Thus it's probably easiest for me to go down the list as found in the guide
7670 and offer comments where necessary.
7671 So let's begin \SpecialChar \ldots{}
7675 \begin_layout Subsubsection
7676 Things that work as expected
7679 \begin_layout Standard
7683 \begin_layout Plain Layout
7695 \begin_layout Standard
7696 Because they work as you might expect, I simply list them and the section
7797 begin{thebibliography}
7805 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7806 graphicx figure commands (2.14.1),
7830 (2.15.4, amongst other places),
7857 \begin_layout Standard
7858 The following style options also work correctly:
7879 Simply put them in the
7885 Layout\SpecialChar \menuseparator
7891 \begin_layout Standard
7895 \begin_layout Plain Layout
7907 \begin_layout Subsubsection
7908 Things that work, but require more comment
7911 \begin_layout Standard
7912 The following items work, but require a little more discussion:
7915 \begin_layout Itemize
7916 These items are reserved for use by the journal editors, but you can put
7917 them into the LaTeX preamble if you feel compelled to do so:
7950 \begin_layout Itemize
7951 These items may be placed in the LaTeX preamble, and are included as blanks
7952 in the template file:
7973 \begin_layout Itemize
7980 (2.3) – can only be used
7981 \begin_inset Quotes eld
7985 \begin_inset Quotes erd
7988 , not in the middle of a paragraph.
7989 Use TeX code if you need to embed it.
7992 \begin_layout Itemize
7999 (2.3) – will have extra {} after it.
8000 This should not cause an error.
8003 \begin_layout Itemize
8010 (2.6) – can only be used
8011 \begin_inset Quotes eld
8015 \begin_inset Quotes erd
8018 , not in the middle of a paragraph.
8019 Use TeX code if you need to embed it.
8022 \begin_layout Itemize
8029 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8033 \begin_layout Itemize
8047 \begin_layout Itemize
8054 (2.9) – will have extra {} after it.
8055 This should not cause an error.
8058 \begin_layout Itemize
8065 (2.11) – will have extra {} after it.
8066 This should not cause an error.
8069 \begin_layout Itemize
8076 (2.14.2) – you can insert an optional filename argument by placing the cursor
8077 at the beginning of the text and selecting
8079 Insert\SpecialChar \menuseparator
8084 \begin_inset Quotes eld
8088 \begin_inset Quotes erd
8091 inserts an optional argument of the type needed by
8098 Hopefully it will be renamed someday.
8101 \begin_layout Itemize
8114 for the catalog ID optional parameter
8117 \begin_layout Itemize
8130 for the catalog ID optional parameter
8133 \begin_layout Subsubsection
8134 Things not implemented, use TeX code
8137 \begin_layout Standard
8141 \begin_layout Plain Layout
8153 \begin_layout Standard
8176 setcounter{equation}
8178 (2.12), Journal name abbreviations (2.13.4),
8214 (2.15.4, insert it as the first element in the lefthand cell after where
8216 Don't use any of LyX's rules in the table),
8228 (2.15.5), much of Misc (2.17, except
8279 \begin_layout Standard
8283 \begin_layout Plain Layout
8295 \begin_layout Subsubsection
8296 Things that cannot be implemented
8299 \begin_layout Standard
8300 \SpecialChar \ldots{}
8301 at least in any meaningful sort of way, so I suggest ignoring them.
8302 They are the references environment (2.13.3), and the deluxetable environment
8304 If you really, really need to use deluxetable, I suggest editing it in
8305 a separate file with a text editor, then using
8307 Insert\SpecialChar \menuseparator
8309 \begin_inset space ~
8314 to include it in your LyX document.
8319 file to see an example of this.
8322 \begin_layout Subsection
8323 FAQs, Tips, Tricks, and Other Ruminations
8326 \begin_layout Subsubsection
8327 Getting LyX and AASTeX to cooperate
8330 \begin_layout Standard
8331 It can be a bit tricky to get LyX to recognize a new layout and document
8333 When all else fails, do this:
8336 \begin_layout Enumerate
8337 Make certain that LaTeX can find AASTeX.
8338 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8339 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8346 \begin_layout Enumerate
8358 \begin_layout Enumerate
8361 Tools\SpecialChar \menuseparator
8364 in LyX, then restart LyX.
8367 \begin_layout Enumerate
8368 Open a regular new file, not from a template.
8369 Does AASTeX appear in the class list in
8371 Document\SpecialChar \menuseparator
8377 \begin_layout Standard
8378 If you get a warning from an existing AASTeX document about not being able
8379 to find the AASTeX layout or a message about
8380 \begin_inset Quotes eld
8383 You should not mix title layouts with normal ones
8384 \begin_inset Quotes erd
8387 , things haven't been installed correctly.
8390 \begin_layout Subsubsection
8391 LaTeX error processing a table
8394 \begin_layout Standard
8395 LyX, by default, attempts to center the table caption/title.
8396 This seems to produce a bad interaction in AASTeX so you should click somewhere
8397 in the caption/title, then select
8399 Edit\SpecialChar \menuseparator
8401 \begin_inset space ~
8415 This took care of it for me.
8418 \begin_layout Subsubsection
8422 \begin_layout Standard
8423 A couple of things: 1) I have noticed some funny spacing in the reference
8424 entries in the text.
8425 When you enter the bibliography item data, make sure their is
8429 space between the last author and the parenthesis setting off the year;
8433 \begin_inset space \thinspace{}
8437 \begin_inset space \space{}
8451 2) Entering the references at all is not obvious.
8452 The easiest thing is to start typing your first reference at the end of
8453 the document, then mark it as type
8458 That will put a small gray box in front of what you just typed.
8459 Click on the box to fill in the rest of the information.
8460 For new references, go to the end of an existing reference and press return.
8461 That will create a new line with its own box, etc.
8464 \begin_layout Subsubsection
8468 \begin_layout Standard
8469 Even though AASTeX provides its own figure commands (
8475 , for example), I much prefer LaTeX's standard figure commands (with the
8484 \begin_inset space ~
8487 commands as TeX code into a Figure Float box if you desire, but I never
8488 have much luck getting the layout right.
8489 With the standard graphics, LyX will insert a
8493 usepackage{graphicx}
8495 command into the LaTeX preamble and handle the figures in the standard
8496 LaTeX2e way, interspersing the figures in the text.
8497 I believe ApJ accepts figures exactly this way now; AJ might still use
8499 \begin_inset Quotes eld
8502 stack everything at the end
8503 \begin_inset Quotes erd
8509 \begin_layout Subsubsection
8510 Things I could have done, but didn't
8513 \begin_layout Standard
8515 \begin_inset Quotes eld
8519 \begin_inset Quotes erd
8522 things I could have implemented, but chose not to.
8523 For instance, I saw no point in double-spacing the text in the LyX window,
8524 even though it is double-spaced in the paper manuscript.
8525 Also, I chose not to make separate layouts for the preprint and preprint2
8527 Since I assume you will spend most of your time in the plain manuscript
8528 mode anyway, I decided not to chew up more disk space with this.
8532 \begin_layout Subsection
8536 \begin_layout Standard
8537 Your mileage may vary.
8538 I've now had papers published by both ApJ and AJ that have had 98% of the
8539 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8541 I have had no trouble with the submission process, and I'm sure the journals
8542 were never aware that there might be a difference.
8543 So, go forth and publish!
8546 \begin_layout Section
8550 \begin_layout Standard
8553 David Johnson; updated by Richard Heck
8556 \begin_layout Standard
8557 \begin_inset VSpace bigskip
8563 \begin_layout Standard
8565 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8566 papers to be submitted to American Mathematical Society publications.
8567 The layouts are not tailored to a specific journal, but easily can be.
8568 You should refer to the AMS documentation for specific instructions for
8569 each journal (usually it will entail only changing a single line in the
8571 That documentation is available on the Web at
8572 \begin_inset Flex URL
8575 \begin_layout Plain Layout
8583 \begin_inset Flex URL
8586 \begin_layout Plain Layout
8588 ftp://ftp.ams.org/pub/tex/amslatex/
8594 These layouts are appropriate, and useful, for any mathematical writing.
8598 \begin_layout Standard
8599 There are two basic AMS LaTeX layouts:
8602 \begin_layout Itemize
8603 amsart: The standard AMS article format.
8606 \begin_layout Itemize
8607 amsbook: the standard AMS book (really, monograph) format.
8611 \begin_layout Standard
8612 The layouts themselves contain only the minimum necessary to use the AMS
8614 They do not, in particular, contain any of the `theorem' environments used
8615 for setting theorems, lemmas, and the like.
8616 These are contained, instead, in the
8617 \begin_inset Flex CharStyle:Code
8620 \begin_layout Plain Layout
8626 module, which is loaded by default when when you select one of the AMS
8628 (It can also be used with other classes and can be removed, if you would
8629 rather use something else.) Less commonly used environments are in the
8630 \begin_inset Flex CharStyle:Code
8633 \begin_layout Plain Layout
8634 Theorems (AMS-Extended)
8639 module, which must be loaded manually.
8642 \begin_layout Standard
8643 By default, theorems and the like are numbered consecutively throughout
8644 the document, but this may be modified by loading the module
8645 \begin_inset Flex CharStyle:Code
8648 \begin_layout Plain Layout
8649 Theorems (Order by Section)
8654 or, if you are using
8655 \begin_inset Flex CharStyle:Code
8658 \begin_layout Plain Layout
8665 \begin_inset Flex CharStyle:Code
8668 \begin_layout Plain Layout
8669 Theorems (Order by Chapter)
8675 These will number the results as
8676 \begin_inset Formula $n.m$
8679 , where the first number refers to the section (or chapter) and the second
8680 refers to the total number of results so far in that section (or chapter).
8681 Many environments are also available unnumbered.
8682 These are indicated by an asterisk at the end.
8683 If you happen to want
8687 unnumbered results, the module
8688 \begin_inset Flex CharStyle:Code
8691 \begin_layout Plain Layout
8697 provides that option.
8700 \begin_layout Standard
8701 Note that these modules do not
8705 to be used with the AMS classes.
8706 It is perfectly possible to use the
8707 \begin_inset Flex CharStyle:Code
8710 \begin_layout Plain Layout
8716 module, and the others mentioned, with other classes, such as
8717 \begin_inset Flex CharStyle:Code
8720 \begin_layout Plain Layout
8727 \begin_inset Flex CharStyle:Code
8730 \begin_layout Plain Layout
8737 \begin_inset Flex CharStyle:Code
8740 \begin_layout Plain Layout
8749 \begin_layout Subsection
8750 What these layouts provide
8753 \begin_layout Standard
8754 There is a long list of included environments provided by these layouts.
8755 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8756 variety of `theorem' environments.
8757 However, the AMS recommends the environments that are available in LyX.
8761 \begin_layout Standard
8762 The following environments—as well as the standard environments, such as
8764 \begin_inset Flex CharStyle:Noun
8767 \begin_layout Plain Layout
8774 \begin_inset Flex CharStyle:Noun
8777 \begin_layout Plain Layout
8784 \begin_inset Flex CharStyle:Noun
8787 \begin_layout Plain Layout
8794 \begin_inset Flex CharStyle:Noun
8797 \begin_layout Plain Layout
8804 \begin_inset Flex CharStyle:Noun
8807 \begin_layout Plain Layout
8814 \begin_inset Flex CharStyle:Code
8817 \begin_layout Plain Layout
8824 \begin_inset Flex CharStyle:Code
8827 \begin_layout Plain Layout
8836 \begin_layout Description
8837 Address This should be the author's permanent address.
8840 \begin_layout Description
8842 \begin_inset space ~
8845 Address This should be the author's temporary address at the time of submission,
8846 if different from the Address.
8849 \begin_layout Description
8850 Email Author's e-mail address
8853 \begin_layout Description
8854 URL Author's Web address, if desired.
8857 \begin_layout Description
8858 Keywords Key words or phrases used to identify specific topics discussed
8862 \begin_layout Description
8863 Subjectclass These refer to the AMS Subject Classifications, published and
8866 Mathematical Reviews
8869 These are also available online at the AMS cites listed above.
8872 \begin_layout Description
8876 \begin_layout Description
8880 \begin_layout Description
8884 \begin_layout Standard
8885 The following environments are provided by both the
8886 \begin_inset Flex CharStyle:Code
8889 \begin_layout Plain Layout
8896 \begin_inset Flex CharStyle:Code
8899 \begin_layout Plain Layout
8905 modules, in the latter case in both starred (unnumbered) and unstarred
8906 (numbered) versions.
8907 These same environments are provided only in the starred versions by the
8909 \begin_inset Flex CharStyle:Code
8912 \begin_layout Plain Layout
8921 \begin_layout Theorem
8922 This is typically used for the statements of major results.
8926 \begin_layout Corollary*
8927 This is used for statements which follow fairly directly from previous statement
8929 Again, these can be major results.
8934 These are smaller results needed to prove other statements.
8937 \begin_layout Proposition
8938 These are less major results which (hopefully) add to the general theory
8942 \begin_layout Conjecture
8943 These are statements provided without justification, which the author does
8944 not know how to prove, but which seem to be true (to the author, at least).
8947 \begin_layout Definition*
8948 Guess what this is for.
8949 The font is different for this environment than for the previous ones.
8953 \begin_layout Example*
8954 Used for examples illustrating proven results.
8957 \begin_layout Problem
8958 It's not really known what this is for.
8959 You should figure it out.
8962 \begin_layout Exercise*
8963 Write a description for this one.
8966 \begin_layout Remark
8967 This environment is also a type of theorem, usually a lesser sort of observation.
8970 \begin_layout Claim*
8971 Often used in the course of giving a proof of a larger result.
8975 Generally, these are used to break up long arguments, using specific instances
8981 The numbering scheme for cases is on its own, not together with other numbered
8987 At the end of this environment, a QED symbol (usually a square, but it can
8988 vary with different styles) is placed.
8989 If you want to have other environments within this one—for example, Case
8990 environments—and have the QED symbol appear only after them, then the other
8991 environments need to be nested within the proof environment.
8994 Nesting Environments
9000 for information on nesting.
9003 \begin_layout Standard
9004 And these environments are provided by
9005 \begin_inset Flex CharStyle:Code
9008 \begin_layout Plain Layout
9009 Theorems (AMS-Extended)
9017 \begin_layout Criterion*
9018 A required condition.
9021 \begin_layout Algorithm*
9022 A general procedure to be used.
9025 \begin_layout Axiom*
9026 This is a property or statement taken as true within the system being discussed.
9029 \begin_layout Condition*
9030 Sometimes used to state a condition assumed within the present context of
9035 Similar to a Remark.
9038 \begin_layout Notation*
9039 Used for the explanation of, yes, notation.
9042 \begin_layout Summary
9043 Do we really need to tell you?
9046 \begin_layout Acknowledgement*
9050 \begin_layout Conclusion*
9051 Sometimes used at the end of a long train of argument.
9055 Used in a way similar to Proposition, though perhaps lower on the scale.
9058 \begin_layout Standard
9059 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9061 They need to be available on your system in order to use these environments.
9064 \begin_layout Section
9072 \begin_layout Standard
9078 \begin_layout Subsection
9082 \begin_layout Standard
9083 These are the layout files for some of the journals of the American Geophysical
9085 It is assumed that you have both the AGU's own class files and AGUplus
9086 installed (everything to be found at
9087 \begin_inset Flex URL
9090 \begin_layout Plain Layout
9092 ftp://ftp.agu.org/journals/latex/journals
9100 \begin_layout Subsection
9104 \begin_layout Standard
9114 They are still called this in the LyX GUI, though their LaTeX equivalents
9115 in the AGU classes are
9126 \begin_layout Standard
9127 Newly defined styles are
9164 These are mostly manuscript attributes and defined in the AGU class documentati
9168 \begin_layout Standard
9169 I suspect this is still badly incomplete.
9172 \begin_layout Subsection
9176 \begin_layout Standard
9193 \begin_layout Subsection
9197 \begin_layout Itemize
9200 Journal of Geophysical Research
9209 \begin_layout Standard
9210 Add your own, it isn't so hard! Look at the
9221 \begin_layout Subsection
9222 Bugs and things to remember
9225 \begin_layout Standard
9226 In order to use the new layouts, you must remember to do the following for
9230 \begin_layout Enumerate
9236 This can be done in the
9238 Layout\SpecialChar \menuseparator
9243 Document\SpecialChar \menuseparator
9247 (AGU articles are always in English, right? So
9254 \begin_layout Enumerate
9264 (Yes, this is a bug.)
9267 \begin_layout Enumerate
9268 Make sure you use the
9272 bibliography style, by entering
9276 into the second field of the BibTeX inset.
9277 None of the standard styles will do.
9280 \begin_layout Section
9284 \begin_layout Standard
9290 \begin_layout Subsection
9294 \begin_layout Standard
9295 Broadway is for writing plays.
9296 The format is more decorative than Hollywood, and much less standardized.
9297 This format should be suitable for workshops.
9300 \begin_layout Subsection
9304 \begin_layout Standard
9305 The same as in Hollywood.
9308 \begin_layout Subsection
9312 \begin_layout Standard
9317 names as labels then cross-reference the label to insert the name.
9318 The cross-reference dialog will show the current cast of characters.
9321 \begin_layout Subsection
9322 Paper size and Margins
9325 \begin_layout Standard
9326 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9329 \begin_layout Subsection
9333 \begin_layout Standard
9334 The following environments are available.
9335 You can use broadway.bind to get the bind keys shown at the right.
9338 \begin_layout Itemize
9342 \begin_inset Newline newline
9347 You should not have to use this, but it is here for anything that does not
9351 \begin_layout Itemize
9355 \begin_inset space \hfill{}
9359 \begin_inset Newline newline
9364 Used to describe stage setting and the action.
9365 First use of speaker names in all CAPs.
9368 \begin_layout Itemize
9372 \begin_inset space \hfill{}
9376 \begin_inset Newline newline
9381 Automatically numbered.
9382 On screen it will be arabic, but will print as Roman.
9385 \begin_layout Itemize
9389 \begin_inset space \hfill{}
9393 \begin_inset Newline newline
9403 It is just centered text.
9406 \begin_layout Itemize
9410 \begin_inset space \hfill{}
9414 \begin_inset Newline newline
9419 Not automatically numbered.
9420 You supply the number.
9421 This is because I couldn't figure out how.
9424 \begin_layout Itemize
9428 \begin_inset space \hfill{}
9432 \begin_inset Newline newline
9437 A special case of Narrative to describe the setting and action as the curtain
9441 \begin_layout Itemize
9445 \begin_inset space \hfill{}
9449 \begin_inset Newline newline
9454 The speaker's (actor's) title, centered in all CAPS.
9457 \begin_layout Itemize
9461 \begin_inset space \hfill{}
9465 \begin_inset Newline newline
9470 Instructions to the speaker.
9471 The parentheses are automatically inserted.
9472 The ( will appear on screen, but both will be in the printed play.
9473 This environment is only used within
9480 \begin_layout Itemize
9484 \begin_inset space \hfill{}
9488 \begin_inset Newline newline
9493 What the Speaker says.
9496 \begin_layout Itemize
9500 \begin_inset space \hfill{}
9504 \begin_inset Newline newline
9509 The curtain comes down.
9512 \begin_layout Itemize
9516 \begin_inset space \hfill{}
9522 \begin_layout Itemize
9526 \begin_inset space \hfill{}
9532 \begin_layout Itemize
9536 \begin_inset space \hfill{}
9542 \begin_layout Standard
9546 \begin_layout Section
9550 \begin_layout Standard
9555 can be used to type letters according to German conventions.
9556 A template file is included in
9558 .../lyx/share/templates
9560 for you to use as a starting point.
9563 \begin_layout Section
9571 \begin_layout Standard
9577 \begin_layout Subsection
9581 \begin_layout Standard
9582 This is the layout file for the European Geophysical Society journals.
9587 can be downloaded from the web site of the EGS under
9588 \begin_inset Flex URL
9591 \begin_layout Plain Layout
9601 \begin_layout Subsection
9605 \begin_layout Standard
9608 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9616 The current layout file is unfortunately very unmodular and would benefit
9617 from using the various
9624 \begin_layout Section
9628 \begin_layout Standard
9634 \begin_layout Standard
9635 Elsevier Science Publishers B.V.
9636 provides a standard LaTeX document class (
9640 ) for submitting articles to their various journals.
9641 The style file can be downloaded directly from their web site:
9642 \begin_inset Flex URL
9645 \begin_layout Plain Layout
9647 http://authors.elsevier.com/
9653 Instructions are supplied along with the class file, which details the
9654 requirements of the publishers.
9655 LyX includes package that allows for the use of this class, by a layout
9656 and a template file.
9657 Installation of the class file is the same as for any other LaTeX package;
9658 instructions are provided in the Elsevier documentation.
9661 \begin_layout Standard
9671 As the Elsevier class file is based mainly on the standard article class,
9672 most of the normal functionality is provided.
9673 The Elsevier class defines a number of mathematical environments, which
9674 are similar to the AMS environments.
9675 These commands are all described in the Elsevier documentation, and are
9679 \begin_layout Standard
9680 The easiest way to use the Elsevier style is to base documents on the included
9682 It is best not to use options such as fancy headings or the geometry package,
9683 as elements such as these are defined by Elsevier in their style file.
9684 Ideally, no extra packages except those mentioned in the Elsevier documentation
9686 Essentially, Elsevier require as
9687 \begin_inset Quotes eld
9691 \begin_inset Quotes erd
9694 a LaTeX file as possible, as their intention is to take the supplied file
9695 and replace the class file with one for the particular journal to which
9696 the paper has been submitted.
9697 This also means that not too much time should be spent on the formating
9699 When it comes to be published, this will change anyway.
9700 The rest of the usage for this layout is substantially the same as for
9701 the normal article class.
9702 For details of what Elsevier do and don't allow, refer to their documentation.
9705 \begin_layout Section
9711 \begin_inset CommandInset label
9720 \begin_layout Standard
9726 \begin_layout Subsection
9730 \begin_layout Standard
9731 This section describes how to use LyX to make slides for overhead projectors.
9732 There are two document classes that can do this: the default slides class
9738 This section documents the latter.
9741 \begin_layout Standard
9742 I'm going to say this again, nice and clear, so that there's no misunderstanding
9746 \begin_layout Standard
9747 \begin_inset VSpace bigskip
9753 \begin_layout Standard
9757 This section documents the class
9758 \begin_inset Quotes eld
9766 \begin_inset Quotes erd
9774 \begin_layout Standard
9775 \begin_inset VSpace bigskip
9781 \begin_layout Standard
9782 If you're looking for the documentation for
9783 \begin_inset Quotes eld
9791 \begin_inset Quotes erd
9795 \begin_inset space ~
9799 \begin_inset CommandInset ref
9801 reference "sec:slitex"
9806 If your machine doesn't have the
9811 \begin_inset Quotes eld
9819 \begin_inset Quotes erd
9822 ] installed, you'll probably have to use the default
9826 class, which isn't quite as good as
9831 \begin_layout Standard
9836 class is designed for use with version 2.1 of the
9840 LaTeX class file which is now an integral part of LaTeX2e.
9843 \begin_layout Subsection
9847 \begin_layout Standard
9848 Obviously, to use this document class, you need to select
9849 \begin_inset Quotes eld
9857 \begin_inset Quotes erd
9867 \begin_inset space ~
9873 There are some settings in the
9876 \begin_inset space ~
9881 dialog that you should know about that are specific to this class:
9884 \begin_layout Itemize
9885 Don't change the options
9896 \begin_inset space ~
9902 They're ignored by the
9909 \begin_layout Itemize
9910 The default font size is 20
9911 \begin_inset space \thinspace{}
9914 pt with the other options being 17
9915 \begin_inset space \thinspace{}
9919 \begin_inset space \thinspace{}
9923 \begin_inset space \thinspace{}
9929 \begin_layout Itemize
9938 but all math equations are still typeset in the usual roman font.
9941 \begin_layout Itemize
9946 supports A4 and Letter paper sizes as well as a special size for working
9948 \begin_inset space \thinspace{}
9952 It doesn't support A5, B5, legal or executive paper sizes.
9955 \begin_layout Itemize
9956 Don't bother changing the
9960 settings because they are ignored anyway.
9961 All floats appear where they are defined in the text.
9964 \begin_layout Itemize
9969 setting behaves a bit differently for this class.
9974 provides extensive footer and header capabilities including a user-defined
9977 \begin_inset space ~
9981 \begin_inset CommandInset ref
9983 reference "sec:foilfoot"
9988 The title page is treated differently to all other pages in the document
9997 has the logo centered at the bottom of the page (if one is defined).
9998 The possible page style choices and what they do are as follows:
10002 \begin_layout Labeling
10003 \labelwidthstring MMMMMMM
10010 The final output contains no page numbers, or other headers or footers
10011 (except footnotes of course).
10015 \begin_layout Labeling
10016 \labelwidthstring MMMMMMM
10023 The final output contains page numbers centered at the bottom of the page.
10024 No other headings or footers (other than footnotes).
10027 \begin_layout Labeling
10028 \labelwidthstring MMMMMMM
10033 Page numbers in lower right corner.
10034 Additional headers and footers are also shown.
10035 This is also the default.
10038 \begin_layout Labeling
10039 \labelwidthstring MMMMMMM
10044 Gives you access to the
10048 package although its use with
10052 is discouraged by the writer of the
10056 package because of some potential page layout clashes.
10060 \begin_layout Subsubsection
10064 \begin_layout Standard
10065 The following options may be used in the extra class options in the
10067 Document\SpecialChar \menuseparator
10073 \begin_layout Labeling
10074 \labelwidthstring MMMMMMx
10079 This sets up the page layout for 7.33
10080 \begin_inset space \thinspace{}
10084 \begin_inset space \thinspace{}
10087 in paper, which is about the same aspect ratio as a 35
10088 \begin_inset space \thinspace{}
10091 mm slide, making it a bit easier to work with this medium.
10094 \begin_layout Labeling
10095 \labelwidthstring MMMMMMx
10100 Places a rule across the page below the header on every page except the
10104 \begin_layout Labeling
10105 \labelwidthstring MMMMMMx
10110 Places a rule across the page above the footer on every page except the
10114 \begin_layout Labeling
10115 \labelwidthstring MMMMMMx
10120 This is automatically set each time you create a new
10129 to use the dvips driver to rotate those pages that are set as landscape
10133 \begin_layout Labeling
10134 \labelwidthstring MMMMMMx
10139 Simply changes the page dimensions to those of a landscape page but doesn't
10141 Thus if you use this option you need to use an external program to rotate
10142 each page or feed your paper through your printer as landscape.
10143 Note that this option effectively reverses the roles of the
10151 environments (don't worry these are described in the next section).
10154 \begin_layout Labeling
10155 \labelwidthstring MMMMMMx
10160 Equation numbers on the left.
10163 \begin_layout Labeling
10164 \labelwidthstring MMMMMMx
10169 Flush-left equations.
10172 \begin_layout Subsection
10173 Supported Environments
10176 \begin_layout Standard
10177 Most of the environments commonly supported in other classes are also supported
10183 There are several additional environments provided by
10187 as well as a couple added by LyX.
10188 The following environments are shared with other classes:
10191 \begin_layout Standard
10195 \begin_layout Plain Layout
10199 begin{multicols}{2}
10207 \begin_layout Itemize
10213 \begin_layout Itemize
10219 \begin_layout Itemize
10225 \begin_layout Itemize
10231 \begin_layout Itemize
10237 \begin_layout Itemize
10243 \begin_layout Itemize
10249 \begin_layout Itemize
10255 \begin_layout Itemize
10261 \begin_layout Itemize
10267 \begin_layout Itemize
10273 \begin_layout Itemize
10279 \begin_layout Itemize
10285 \begin_layout Itemize
10291 \begin_layout Itemize
10297 \begin_layout Itemize
10303 \begin_layout Itemize
10309 \begin_layout Itemize
10315 \begin_layout Standard
10319 \begin_layout Plain Layout
10331 \begin_layout Standard
10332 That is, all the major environments apart from the sectioning environments.
10333 Since foils are essentially self-contained sections, with a title and body,
10338 provides specific commands for starting new foils and these are:
10341 \begin_layout Itemize
10347 \begin_layout Itemize
10353 \begin_layout Standard
10354 LyX also provides slightly modified versions of these two environments called:
10357 \begin_layout Itemize
10363 \begin_layout Itemize
10366 ShortRotatefoilhead
10369 \begin_layout Standard
10370 and the differences will be explained in the next section.
10373 \begin_layout Standard
10374 Since foils are often used in presenting ideas or new theorems and such
10379 also provides a comprehensive box of goodies for presenting them:
10382 \begin_layout Standard
10386 \begin_layout Plain Layout
10390 begin{multicols}{2}
10398 \begin_layout Itemize
10404 \begin_layout Itemize
10410 \begin_layout Itemize
10416 \begin_layout Itemize
10422 \begin_layout Itemize
10428 \begin_layout Itemize
10434 \begin_layout Itemize
10440 \begin_layout Itemize
10446 \begin_layout Itemize
10452 \begin_layout Itemize
10458 \begin_layout Itemize
10464 \begin_layout Standard
10468 \begin_layout Plain Layout
10480 \begin_layout Standard
10481 The starred versions are unnumbered while the unstarred versions are numbered.
10482 There are also two list environments added by LyX and these are:
10485 \begin_layout Itemize
10491 \begin_layout Itemize
10497 \begin_layout Standard
10502 provides some powerful header and footer capabilities that are best set
10503 in the preamble although they may be set at any point in a document.
10504 If you want to change these settings in your document the best place to
10505 do so is at the very top of a foil, i.
10506 \begin_inset space \thinspace{}
10512 \begin_inset space \space{}
10517 straight after the foilhead.
10520 \begin_layout Standard
10521 For this purpose, the following command styles are provided [
10528 \begin_layout Standard
10532 \begin_layout Plain Layout
10536 begin{multicols}{2}
10544 \begin_layout Itemize
10548 \begin_inset space ~
10554 \begin_layout Itemize
10560 \begin_layout Itemize
10564 \begin_inset space ~
10570 \begin_layout Itemize
10574 \begin_inset space ~
10580 \begin_layout Itemize
10584 \begin_inset space ~
10591 \begin_layout Standard
10592 \begin_inset space ~
10599 \begin_layout Standard
10603 \begin_layout Plain Layout
10615 \begin_layout Standard
10616 There are also a few commands provided by
10620 that aren't directly supported by LyX but I'll tell you what they do and
10621 how to use them in section
10622 \begin_inset space ~
10626 \begin_inset CommandInset ref
10628 reference "sec:unsuppfoils"
10635 \begin_layout Subsection
10636 Building a Set of Foils
10639 \begin_layout Standard
10640 This section will give a simple introduction to using the different environments
10641 to build a set of foils.
10642 If you want to see an example set of foils, take a look at the
10646 file you find in LyX's
10653 \begin_layout Subsubsection
10654 Give It a Title Page
10657 \begin_layout Standard
10658 Unlike other classes that provide
10678 creates the title on a page of its own.
10679 If you leave out the
10683 environment LaTeX will substitute the current date (every time you regenerate
10687 \begin_layout Subsubsection
10691 \begin_layout Standard
10692 As I mentioned earlier, there are four ways of starting a new foil.
10693 For portrait foils you should use
10702 The difference between these two environments is the amount of space between
10703 the title of the foil (the foilhead) and the body of the foil.
10706 \begin_layout Standard
10707 Landscape foils are generated using the
10713 ShortRotatefoilhead
10716 Again the only difference is the spacing between foilhead and body.
10717 Both of the short versions have 0.5 inches less separation between the foilhead
10722 \begin_layout Standard
10723 One problem with the support for landscape foils is the requirement that
10724 you have to use the
10728 driver to generate the PostScript output otherwise the foils won't be rotated.
10729 It is possible to get landscape foils even if you haven't got the
10733 driver provided you can feed your foils sideways through your printer ;-)
10736 \begin_layout Subsubsection
10737 Theorems, Lemmas, Proofs and more
10740 \begin_layout Standard
10741 Due to a small bug in LyX you can't have two of the same type of these environme
10742 nts directly following each other.
10743 They must be separated by something.
10744 If you try, you will just be extending the previous environment as if you
10745 had merged the two environments together.
10746 So, how do you get around this problem? The simplest option is to insert
10747 some text between the two environments or add a
10751 environment between the two with just a
10752 \begin_inset Quotes eld
10760 \begin_inset Quotes erd
10764 This will force LyX to produce two separate environments and hence the
10765 correct LaTeX output.
10766 An example is provided in the example file included with the LyX distribution.
10767 Remember, this problem only occurs if you are trying to place two of the
10768 same type of theorem-like environments one directly after the other.
10771 \begin_layout Subsubsection
10775 \begin_layout Standard
10776 You get all the commonly supported list styles found in other classes as
10777 well as two new ones.
10778 I'll only describe the new ones here.
10779 If you want to find out more about the other list environments check out
10785 If you intend to use itemized lists you might also want to read about the
10789 \begin_inset space ~
10793 \begin_inset space ~
10798 dialog described above in section
10799 \begin_inset space ~
10803 \begin_inset CommandInset ref
10805 reference "sec:bullet"
10812 \begin_layout Standard
10813 The two new list styles,
10821 , are designed to make it easier for you to create lists of do's and don'ts
10822 or right and wrong by providing dedicated environments that use a tick
10823 or a cross as the label of the list.
10824 These lists are in fact dedicated variants of the
10829 They do however require that you have the
10833 packages installed.
10836 \begin_layout Subsubsection
10840 \begin_layout Standard
10845 redefines the floating tables and figures so that they appear exactly where
10846 they are in the text rather than pushing them to the top of the page or
10847 to some user specified location.
10848 In fact if you change the float placement settings they are simply ignored.
10851 \begin_layout Subsubsection
10852 Page Headers and Footers
10853 \begin_inset CommandInset label
10855 name "sec:foilfoot"
10862 \begin_layout Standard
10866 \begin_inset space ~
10875 are two commands used to control the left-footer text string.
10876 The first is meant to allow you to include a graphic logo on your foils
10878 \begin_inset Quotes eld
10886 \begin_inset Quotes erd
10890 While the second is meant to provide a classification for the audience,
10894 \begin_inset space \thinspace{}
10900 \begin_inset space \space{}
10904 It is empty by default.
10907 \begin_layout Standard
10908 The remaining page corners can be filled by
10911 \begin_inset space ~
10916 (which defaults to page numbers),
10919 \begin_inset space ~
10927 \begin_inset space ~
10935 \begin_layout Subsection
10941 \begin_inset CommandInset label
10943 name "sec:unsuppfoils"
10950 \begin_layout Standard
10951 All the commands mentioned below need to be set in a
10959 within another environment.
10962 \begin_layout Subsubsection
10966 \begin_layout Standard
10967 All lengths are adjusted using the
10990 should be replaced by the name given to the length you want to change and
10995 is the length value.
10996 All lengths should be specified in units of length such as inches (
11008 ) or relative to some document or font-based length such as
11018 \begin_layout Standard
11019 It's possible to change the spacing between a foilhead and the body of the
11020 foil by adjusting the length specified by
11027 For example, to make
11032 \begin_inset space \space{}
11035 in closer to their bodies put the following in the preamble:
11041 foilheadskip}{-0.5in}
11044 \begin_layout Standard
11045 The spacings around floats can be adjusted by setting these lengths:
11048 \begin_layout Labeling
11049 \labelwidthstring MMMMMMMMMMM
11056 Separation between the text and the top of the float
11059 \begin_layout Labeling
11060 \labelwidthstring MMMMMMMMMMM
11067 Separation between the float and the caption
11070 \begin_layout Labeling
11071 \labelwidthstring MMMMMMMMMMM
11078 Separation between the caption and the following text
11081 \begin_layout Labeling
11082 \labelwidthstring MMMMMMMMMMM
11089 You can make the captions narrower than the surrounding text by adjusting
11091 Best done relative to
11100 \begin_layout Standard
11101 There are also several title page related lengths that you may find useful
11102 if you have a long title or several authors:
11105 \begin_layout Labeling
11106 \labelwidthstring MMMMMMMMMMM
11113 Separation from headers to
11118 \begin_layout Labeling
11119 \labelwidthstring MMMMMMMMMMM
11137 \begin_layout Labeling
11138 \labelwidthstring MMMMMMMMMMM
11152 \begin_layout Labeling
11153 \labelwidthstring MMMMMMMMMMM
11169 \begin_layout Labeling
11170 \labelwidthstring MMMMMMMMMMM
11186 \begin_layout Standard
11187 The last length related command affects all the list environments.
11198 a list environment then all the vertical spacing between the list items
11200 Note that this is a command not a length so it doesn't require
11206 like the stuff mentioned above.
11209 \begin_layout Subsubsection
11210 Headers and Footers
11213 \begin_layout Standard
11226 commands control whether the logo in the
11230 definition appear on a given page.
11237 in the preamble then none of the foils will have the logo on them.
11238 If you don't want the logo on a particular page place the
11244 directly after the foilhead of that page and the
11250 directly after the next foilhead.
11253 \begin_layout Standard
11254 If you decide to use the
11258 page style setting in the
11261 \begin_inset space ~
11266 dialog you should probably add
11276 to your preamble so headers and footers on landscape pages are correctly
11277 placed when rotated.
11278 This is due to some clashes between the page layouts provided by the
11289 \begin_layout Section
11290 Hollywood (Hollywood spec scripts)
11293 \begin_layout Standard
11299 \begin_layout Subsection
11303 \begin_layout Standard
11304 Getting the format of a Hollywood script right is a
11305 \begin_inset Quotes eld
11309 \begin_inset Quotes erd
11312 It is designed to make the readers focus on content and to be easy and
11313 familiar for the actors to read.
11314 Each page of a script should be one minute of film.
11315 Nothing goes in a script that you cannot see or hear on screen.
11316 The courier 12 pt font should be used throughout.
11320 \begin_layout Subsection
11324 \begin_layout Standard
11325 Speakers' lines should NEVER break in mid-sentence.
11326 If a speaker's lines continue over a page break, repeat the
11330 title followed by (Cont'd).
11333 \begin_layout Subsection
11337 \begin_layout Standard
11342 names as labels then cross-reference the label to insert the name.
11343 The cross-reference dialog will show the current cast of characters.
11344 You can use this to insert the speaker name in narratives also.
11347 \begin_layout Subsection
11348 Paper size and Margins
11351 \begin_layout Standard
11352 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11355 \begin_layout Subsection
11359 \begin_layout Standard
11360 The following environments are available.
11361 You can use hollywood.bind to get the bind keys shown at the right.
11364 \begin_layout Itemize
11368 \begin_inset Newline newline
11373 Used where nothing else works.
11377 \begin_layout Itemize
11383 \begin_inset space \hfill{}
11391 \begin_inset Newline newline
11394 Usually followed by something like
11395 \begin_inset Quotes eld
11398 on Sally waking up.
11399 \begin_inset Quotes erd
11405 \begin_layout Itemize
11409 \begin_inset space \hfill{}
11413 \begin_inset Newline newline
11418 Introduces a new INTERIOR camera set-up.
11419 Always followed by DAY or NIGHT, or something similar to define the lighting
11421 Everthing on this line in CAPS.
11424 \begin_layout Itemize
11428 \begin_inset space \hfill{}
11432 \begin_inset Newline newline
11437 Introduces a new EXTERIOR camera set-up.
11438 Everthing on this line in CAPS.
11441 \begin_layout Itemize
11445 \begin_inset space \hfill{}
11449 \begin_inset Newline newline
11454 The character speaking.
11457 \begin_layout Itemize
11461 \begin_inset space \hfill{}
11465 \begin_inset Newline newline
11470 Instructions to the speaker.
11471 The () are automatically inserted, but only the ( will show in LyX.
11472 Both will be printed.
11475 \begin_layout Itemize
11479 \begin_inset space \hfill{}
11483 \begin_inset Newline newline
11495 \begin_layout Itemize
11499 \begin_inset space \hfill{}
11503 \begin_inset Newline newline
11508 Camera movement instruction.
11510 \begin_inset space \thinspace{}
11514 \begin_inset space \space{}
11520 \begin_layout Itemize
11524 \begin_inset space \hfill{}
11530 \begin_layout Itemize
11534 \begin_inset space \hfill{}
11540 \begin_layout Itemize
11544 \begin_inset space \hfill{}
11550 \begin_layout Itemize
11554 \begin_inset space \hfill{}
11560 \begin_layout Subsection
11564 \begin_layout Itemize
11568 \begin_layout Itemize
11572 \begin_layout Itemize
11574 \begin_inset space \thinspace{}
11581 \begin_layout Itemize
11586 \begin_layout Itemize
11587 PAN — camera movement
11590 \begin_layout Itemize
11591 INSERT — cut to close-up of
11594 \begin_layout Section
11598 \begin_layout Standard
11601 Panayotis Papasotiriou
11604 \begin_layout Subsection
11608 \begin_layout Standard
11609 The ijmpc package is a set of macros that facilitates electronic manuscript
11612 International Journal of Modern Physics C
11615 Similarly, the ijmpd package is for creating manuscripts to be submitted
11618 International Journal of Modern Physics D
11621 Both journals are published by World Scientific.
11622 The corresponding document classes are named
11631 These files, together with instructions for the authors, can be downloaded
11633 \begin_inset Flex URL
11636 \begin_layout Plain Layout
11638 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11644 \begin_inset Flex URL
11647 \begin_layout Plain Layout
11649 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11655 Both packages are modified versions of the standard
11656 \begin_inset Quotes eld
11660 \begin_inset Quotes erd
11663 package, and they are almost (but not exactly) identical.
11664 Most of their features are supported by LyX.
11665 I have used LyX successfully to write articles submitted to both journals
11666 without any problem.
11669 \begin_layout Subsection
11673 \begin_layout Standard
11674 As usual, the easiest way to write a paper is to start with a template.
11677 File\SpecialChar \menuseparator
11696 This will give an (almost) empty document that includes the most common
11697 fields found in a manuscript.
11698 Simply overwrite the existing text (including the brackets,
11703 You should keep in mind the following remarks.
11706 \begin_layout Enumerate
11707 LyX won't let you change the font size and the page style of the document,
11708 because such modifications are not allowed by both packages.
11711 \begin_layout Enumerate
11712 The language of the document should not be changed.
11713 Before previewing your paper, be sure that the babel package is not used.
11714 To do this, click on
11716 Tools\SpecialChar \menuseparator
11727 checkbox in the language settings, and click on
11735 , if you wish to make this change permanent).
11738 \begin_layout Enumerate
11740 \begin_inset Quotes eld
11744 \begin_inset Quotes erd
11747 style must be used to define keywords.
11750 \begin_layout Enumerate
11751 The ijmpc package provides a style named
11752 \begin_inset Quotes eld
11755 Classification Codes
11756 \begin_inset Quotes erd
11759 , which can be used to define classification codes, such as PACS numbers.
11760 Note that this facility is not supported by the ijmpd package.
11763 \begin_layout Enumerate
11764 Several new environments are available:
11765 \begin_inset Quotes eld
11769 \begin_inset Quotes erd
11773 \begin_inset Quotes eld
11777 \begin_inset Quotes erd
11781 \begin_inset Quotes eld
11785 \begin_inset Quotes erd
11789 \begin_inset Quotes eld
11793 \begin_inset Quotes erd
11797 \begin_inset Quotes eld
11801 \begin_inset Quotes erd
11805 \begin_inset Quotes eld
11809 \begin_inset Quotes erd
11813 \begin_inset Quotes eld
11817 \begin_inset Quotes erd
11821 \begin_inset Quotes eld
11825 \begin_inset Quotes erd
11829 \begin_inset Quotes eld
11833 \begin_inset Quotes erd
11837 \begin_inset Quotes eld
11841 \begin_inset Quotes erd
11845 \begin_inset Quotes eld
11849 \begin_inset Quotes erd
11853 \begin_inset Quotes eld
11857 \begin_inset Quotes erd
11861 \begin_inset Quotes eld
11865 \begin_inset Quotes erd
11869 \begin_inset Quotes eld
11873 \begin_inset Quotes erd
11877 Their use is more or less obvious.
11878 LyX supports all these environments; it will use the proper label, text
11879 style, and numbering scheme for each of them.
11882 \begin_layout Enumerate
11883 Both packages use basic citations; the natbib package should not be used.
11884 In LyX, citation references are shown as usual; in the output, citations
11885 are shown as superscripts.
11886 If you want to use a citation as normal text, you should use the
11891 \begin_inset space \thinspace{}
11895 \begin_inset space \space{}
11899 \begin_inset Quotes eld
11903 \begin_inset space \space{}
11913 \begin_inset Quotes erd
11919 \begin_layout Enumerate
11921 \begin_inset Quotes eld
11925 \begin_inset Quotes erd
11928 section in both packages.
11929 To put acknowledgments, just use the
11930 \begin_inset Quotes eld
11934 \begin_inset Quotes erd
11940 \begin_layout Enumerate
11941 Appendices may be added to the paper,
11945 the Acknowledgments and
11950 LyX provides a special environment, called
11951 \begin_inset Quotes eld
11955 \begin_inset Quotes erd
11958 which marks the beginning of the appendices.
11959 This environment should be left blank; it just sends a LaTeX command, but
11960 nothing is really printed.
11962 \begin_inset Quotes eld
11966 \begin_inset Quotes erd
11969 is printed with blue letters, as a signal that all sections after that
11970 point are appendices.
11971 To write an appendix, use the
11972 \begin_inset Quotes eld
11976 \begin_inset Quotes erd
11980 LyX will number each appendix with capital letters, as required by both
11983 \begin_inset Quotes eld
11987 \begin_inset Quotes erd
11994 be present before the first appendix; if not, all appendices will be numbered
11995 as normal sections in the output.
11998 \begin_layout Enumerate
11999 The ijmpc and the ijmpd packages use the
12003 command to implement table captions.
12004 As a result, a table created by LyX is printed correctly, but its caption
12006 However, you can use some TeX code to overpass this problem, so that captions
12007 are printed as expected.
12008 To do so, create a float table as usual, remove the caption, and replace
12009 it with the TeX code
12019 (sic); you must also the TeX code
12023 immediately after the tabular material.
12024 Study the example table included in the template files to see how this
12025 trick is implemented.
12026 Alternatively, If you need table captions, you should implement the whole
12031 file, then include this file to the LyX document (
12033 Insert\SpecialChar \menuseparator
12034 File\SpecialChar \menuseparator
12036 \begin_inset space ~
12042 Details on how to create a table float can be found in the files
12050 , included in the corresponding packages.
12053 \begin_layout Subsection
12054 Preparing a paper for submission
12057 \begin_layout Standard
12058 Before you submit your paper you must export the LyX document as a LaTeX
12061 File\SpecialChar \menuseparator
12062 Export\SpecialChar \menuseparator
12069 \begin_layout Plain Layout
12070 Actually you have the choice between LaTeX (plain) and pdflatex.
12071 If you intend to use pdflatex to prepare the paper, you should use the
12072 pdflatex option so that included graphics are converted to PDF format,
12073 ready for use by pdflatex.
12078 , then make the following changes to the resulting
12085 \begin_layout Enumerate
12086 Remove the comment lines before the
12095 \begin_layout Enumerate
12096 Remove everything between (and including) the
12108 commands, except for any commands you specifically put into the LaTeX preamble.
12111 \begin_layout Standard
12116 file should be saved and processed through LaTeX as many times as necessary.
12117 You may also want to check the resulting
12124 \begin_layout Subsection
12128 \begin_layout Standard
12129 The use of TeX code is reduced to two commands, which must be placed at
12130 the top of the document.
12131 If you started writing your paper by using the
12139 template, the TeX code needed is already in its place; you usually don't
12141 You may only modify the first TeX code to specify the information printed
12142 to the top of odd and even pages (authors' names and short paper's title,
12144 This TeX code must have the form
12148 markboth{Authors' Names}{Short Paper's Title}
12153 \begin_layout Section
12157 \begin_layout Standard
12163 \begin_layout Subsection
12167 \begin_layout Standard
12168 The iopart package provides a document class to create electronic manuscript
12169 submission to the journals published by the Institute of Physics.
12170 Instructions for the authors how to create a paper using the iopart class
12171 can be downloaded together with the iopart package from the site
12172 \begin_inset Flex URL
12175 \begin_layout Plain Layout
12177 ftp://ftp.iop.org/pub/journals/latex2e
12185 \begin_layout Subsection
12189 \begin_layout Standard
12190 The easiest way to write a paper is to start with the file
12194 that is available in LyX's examples files folder.
12195 Open this file, save it under a new name, and start writing.
12196 The example file explains how to use the special text environments.
12197 Here are the most important advices:
12200 \begin_layout Itemize
12201 To be able to compile your document to a PDF, PS, or DVI, assure that the
12204 Use AMS math package
12206 in the document settings under
12213 \begin_layout Itemize
12216 The title environment defines the kind of your paper.
12217 So use one of the following environments for the title:
12221 \begin_layout Itemize
12230 \begin_layout Itemize
12239 \begin_layout Itemize
12245 for a Topical review
12248 \begin_layout Itemize
12257 \begin_layout Itemize
12266 \begin_layout Itemize
12272 for a Paper (same as Title)
12275 \begin_layout Itemize
12281 for a Preliminary communication
12284 \begin_layout Itemize
12290 for a Rapid communication
12293 \begin_layout Itemize
12299 for a Letter to the editor
12303 \begin_layout Itemize
12306 All title environments except of
12310 can have an optional short title.
12313 \begin_layout Itemize
12314 There is a general title environment
12318 which is not directly supported by the LyX.
12319 This can be used as TeX code when your document doesn't fit into one of
12320 the other title types.
12323 \begin_layout Standard
12324 For more informations like hints for special table and formula formatting,
12325 look at the IOP author guidelines.
12328 \begin_layout Section
12332 \begin_layout Standard
12335 Panayotis Papasotiriou
12338 \begin_layout Subsection
12342 \begin_layout Standard
12343 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12344 that facilitates electronic manuscript submission to the journals they
12346 Most known of them (at least in my domain of interest) are
12348 Astrophysics and Space Science
12354 , but there are many others (see a complete list at
12355 \begin_inset Flex URL
12358 \begin_layout Plain Layout
12360 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12366 The Kluwer package may be downloaded from the site
12367 \begin_inset Flex URL
12370 \begin_layout Plain Layout
12372 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12378 A complete user guide is contained in that package (but it can also be
12379 downloaded separately).
12382 \begin_layout Standard
12383 LyX supports many features of the package but not everything.
12384 However, the TeX code needed is reduced to some
12385 \begin_inset Quotes eld
12389 \begin_inset Quotes erd
12392 commands of the package (see
12393 \begin_inset space ~
12397 \begin_inset CommandInset ref
12399 reference "subsec:kluwer_peculiarities"
12404 I have recently used LyX to write an article submitted to the
12406 Astrophysics and Space Science
12408 without any problem.
12411 \begin_layout Subsection
12415 \begin_layout Standard
12416 The easiest way to write a paper is to start with the Kluwer template file.
12419 File\SpecialChar \menuseparator
12431 This will give an (almost) empty document that includes the most common
12432 fields found in a manuscript and a short description of their use.
12433 As in most templates, simply overwrite the existing text (including the
12438 ) with the correct information.
12441 \begin_layout Subsection
12442 Preparing a paper for submission
12445 \begin_layout Standard
12446 As in the AASTeX package, before you submit your paper to a journal you
12448 \begin_inset Quotes eld
12452 \begin_inset Quotes erd
12458 \begin_layout Enumerate
12459 Export your paper as a LaTeX file.
12460 To do this, click on
12462 File\SpecialChar \menuseparator
12463 Export\SpecialChar \menuseparator
12470 \begin_layout Enumerate
12475 file with a text editor and make the following changes
12479 \begin_layout Enumerate
12480 remove the comment lines before the
12489 \begin_layout Enumerate
12490 remove everything between (and including) the
12502 commands, except for any commands you specifically put into the LaTeX preamble.
12505 \begin_layout Standard
12514 \begin_layout Enumerate
12519 file through LaTeX as many times as necessary (usually up to three).
12522 \begin_layout Enumerate
12528 \begin_inset space \thinspace{}
12532 \begin_inset space \space{}
12539 , and check if everything is OK (it should, if you didn't make any mistake).
12542 \begin_layout Subsection
12543 \begin_inset Quotes eld
12547 \begin_inset Quotes erd
12550 of the Kluwer package
12551 \begin_inset CommandInset label
12553 name "subsec:kluwer_peculiarities"
12560 \begin_layout Standard
12561 The Kluwer package has the following
12562 \begin_inset Quotes eld
12566 \begin_inset Quotes erd
12572 \begin_layout Enumerate
12573 It is possible to write multiple articles in the same LaTeX file
12577 \begin_layout Plain Layout
12578 I can't imagine any good reason to do this.
12584 Each article must be included in the environment
12585 \begin_inset Quotes eld
12589 \begin_inset Quotes erd
12593 Unfortunately, this environment cannot be omitted, even if you write just
12595 Therefore, each article starts with the command
12601 and, obviously, ends with the command
12608 Although this can be implemented in LyX, I didn't included it, since it
12609 looks ugly and can confuse the novice user.
12610 Therefore, you need to enter them directly and mark them as LaTeX code
12612 \begin_inset Quotes eld
12616 \begin_inset Quotes erd
12622 \begin_layout Enumerate
12623 Information given at the beginning of the article (i.
12624 \begin_inset space \thinspace{}
12628 \begin_inset space \space{}
12631 title, subtitle, author, institution, running title, running author, abstract
12632 and keywords) must be included in an environment called
12633 \begin_inset Quotes eld
12637 \begin_inset Quotes erd
12641 This is not implemented in LyX, so you must enter title, subtitle etc.
12642 \begin_inset space ~
12645 between two TeX code lines (
12660 \begin_layout Enumerate
12661 According to the user manual, the label of each bibliography item must be
12685 \begin_layout Standard
12690 template takes care of all these
12691 \begin_inset Quotes eld
12695 \begin_inset Quotes erd
12699 If you start a new paper using this template you don't need to do anything
12704 \begin_layout Enumerate
12705 don't delete the TeX code included in the template, and
12708 \begin_layout Enumerate
12709 copy the example bibliography item included in the template and modify it
12710 as necessary to enter new bibliography items.
12713 \begin_layout Section
12717 \begin_layout Standard
12723 \begin_layout Subsection
12727 \begin_layout Standard
12728 The LyX document classes
12730 article (koma-script)
12734 report (koma-script)
12752 correspond to the LaTeX document classes
12769 \begin_inset space ~
12772 of the Koma-Script family.
12773 They are replacements for the standard document classes
12789 , resp., and fit better to European typography conventions in a number of
12793 \begin_layout Itemize
12794 Standard character size is 11pt in
12796 article (koma-script)
12800 report (koma-script)
12808 letter (koma-script)
12813 \begin_layout Itemize
12814 Headings, labels of the description environment, and a number of elements
12817 letter (koma-script)
12819 document class are set in a bold sans serif font.
12823 \begin_layout Plain Layout
12824 There is a big difference between the bold sans serif old cm fonts and new
12825 ec fonts, especially in the appearance of headings.
12826 In comparison, the ec bold sans serif fonts look a bit thin.
12827 Here the LaTeX package
12835 helps to produce the
12836 \begin_inset Quotes eld
12840 \begin_inset Quotes erd
12843 appearance when using the ec fonts.
12848 The numbering of chapter headings is made in the same way as the numbering
12849 of section headings, that is without the extra line
12850 \begin_inset Quotes eld
12853 Chapter\SpecialChar \ldots{}
12855 \begin_inset Quotes erd
12859 In addition, the appearance of the headings can be modified by using a
12860 number of options (in LyX to be entered in the field
12863 \begin_inset space ~
12870 Layout\SpecialChar \menuseparator
12874 A detailed German description of these options can be found in the Koma-Script
12882 \begin_layout Itemize
12883 The main means in the Koma-Script document classes to design the type area
12892 (in LyX to be entered in the extra class options field in the dialog
12894 Document\SpecialChar \menuseparator
12898 They make a clearer modification of page margins possible as do the options
12901 Document\SpecialChar \menuseparator
12905 A detailed German description of these and other type area options can
12906 be found in the Koma-Script documentation
12913 \begin_layout Itemize
12914 The LaTeX document classes of the Koma-Script family define a number of
12915 additional commands.
12916 Those part of it which makes sense in LyX is implemented in corresponding
12920 \begin_layout Standard
12921 A detailed German description of the LaTeX document classes of the Koma-Script
12922 family can be found in the Koma-Script documentation
12930 \begin_layout Plain Layout
12931 There is an English translation
12935 , but it is not a complete one.
12940 The following sections describe only those aspects, which are relevant
12944 \begin_layout Subsection
12945 article (koma-script), report (koma-script), and book (koma-script)
12948 \begin_layout Standard
12949 The document classes
12951 article (koma-script)
12955 report (koma-script)
12965 are implemented in the layout files
12978 They contain all the paragraph types of the corresponding standard document
12991 , resp., partly modified, with the exception of the LyX specific
12995 -type, which is replaced by the new
12999 -type having the same functionality.
13004 -Type there is a number of new paragraph types added.
13011 letter (koma-script)
13016 \begin_layout Itemize
13025 : are equivalents to
13033 , resp., additionally inserting an entry in the table of contents.
13042 are not contained in
13044 article (koma-script)
13049 \begin_layout Itemize
13058 : behave exactly as
13066 , resp., additionally clearing running heads.
13071 is not contained in
13073 article (koma-script)
13079 \begin_layout Plain Layout
13092 report (koma-script)
13094 , but since this is identical to
13098 , is has not been implemented in LyX.
13106 \begin_layout Itemize
13111 : generates a heading directly above the following paragraph in the standard
13112 character size without affecting the structure of the document.
13115 \begin_layout Itemize
13124 are special captions which respect the different space settings needed
13125 for captions placed above or below an element (if you follow strict typographic
13126 rules, you might want to place table captions always above the table).
13127 You can also use the class option
13131 , which will switch
13144 You need at least Koma-Script version 2.8q to use this.
13147 \begin_layout Itemize
13152 : can be used to set a bonmot, e.
13153 \begin_inset space \thinspace{}
13157 \begin_inset space \space{}
13160 at the beginning of a chapter.
13161 If you use the optional argument (
13163 Insert\SpecialChar \menuseparator
13165 \begin_inset space ~
13170 ), you can insert the dictum's author there.
13171 Dictum and author are separated by a line.
13172 You need at least Koma-Script version 2.8q to use this.
13177 is not contained in
13179 article (koma-script)
13184 \begin_layout Standard
13185 The following types, together with the standard types
13197 , form the title area of the document.
13198 They must be entered ahead of the first
13199 \begin_inset Quotes eld
13203 \begin_inset Quotes erd
13210 \begin_layout Plain Layout
13211 The corresponding LaTeX commands must appear before the
13222 When such a type is used more than once, the latter usage overwrites the
13223 former one, that means, for every type only the latest usage is valid.
13224 The order of the different types however has, like
13236 , no effect on the appearance of the produced document.
13239 \begin_layout Itemize
13244 : produces a centered paragraph above the ordinary title (
13256 ) for the subject of the document.
13259 \begin_layout Itemize
13264 : produces a centered paragraph below the ordinary title (
13276 ) for the publishers' name.
13279 \begin_layout Itemize
13286 report (koma-script)
13292 produces a centered paragraph on its own page behind the title page, or
13295 article (koma-script)
13297 produces a centered paragraph below the ordinary title (
13313 ) for a dedication.
13316 \begin_layout Itemize
13321 : produces a left aligned paragraph above the ordinary title (
13337 ) for a document`s head.
13340 \begin_layout Itemize
13345 : produces in a double-sided print in
13347 report (koma-script)
13353 a left-aligned paragraph at the top of the title page`s back or has no
13354 effect in a single-sided print or in
13356 article (koma-script)
13361 \begin_layout Itemize
13366 : produces in a double-sided print in
13368 report (koma-script)
13374 a left-aligned paragraph at the bottom of the title page`s back or has
13375 no effect in a single-sided print or in
13377 article (koma-script)
13382 \begin_layout Itemize
13387 : produces a special
13388 \begin_inset Quotes eld
13392 \begin_inset Quotes erd
13395 page ahead of the actual document containing a paragraph without special
13399 \begin_layout Standard
13400 The layout files for the document classes
13402 article (koma-script)
13406 report (koma-script)
13412 do include the file
13417 This is thought of as a place to define your own types.
13422 in your personal layout directory and edit the file!
13425 \begin_layout Subsection
13426 letter (koma-script)
13429 \begin_layout Standard
13433 \begin_layout Plain Layout
13445 \begin_layout Standard
13449 letter (koma-script)
13451 is implemented in the layout file
13456 It contains all the paragraph types of the corresponding standard document
13461 , partly modified, with the exception of the LyX specific types
13473 type, which is replaced by the new
13478 In addition, it contains, in contrast to the standard document class, the
13496 Furthermore, there are a number of new letter specific types.
13499 \begin_layout Standard
13503 \begin_layout Plain Layout
13515 \begin_layout Standard
13516 The appearance of the letter produced by this document class can be controlled
13517 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13521 \begin_layout Plain Layout
13522 For example, the standard appearance of the letter`s heading, consisting
13523 of name and address, is quite self-willed.
13525 \begin_inset Quotes eld
13529 \begin_inset Quotes erd
13532 heading is produced by the following LaTeX commands in the preamble:
13535 \begin_layout LyX-Code
13545 \begin_layout LyX-Code
13561 \begin_layout LyX-Code
13571 \begin_layout LyX-Code
13591 A detailed German description of such LaTeX commands can be found in the
13592 Koma-Script documentation
13597 With it, the letter's author can produce his personal letter layout.
13600 \begin_layout Standard
13609 define the beginning of the letter and must be used in every letter.
13610 To emphasize them in the LyX document class, they are marked with the letter
13620 \begin_inset space ~
13623 in the left margin.
13624 It is possible to write any number of letters in one file.
13629 type produces a new letter using the same addressee and a
13633 type produces a new addressee.
13650 are ordinary paragraph types and can also be used several times in one
13651 and the same letter.
13654 \begin_layout Itemize
13659 : produces a paragraph for the addressee and implicitly defines the beginning
13663 \begin_layout Itemize
13668 : produces a paragraph for the form of address and implicitly produces a
13672 \begin_layout Itemize
13677 : produces a paragraph for a close.
13680 \begin_layout Itemize
13685 : produces a paragraph for a postscript.
13688 \begin_layout Itemize
13693 : produces a paragraph for a distribution list.
13696 \begin_layout Itemize
13701 : produces a paragraph for enclosures.
13704 \begin_layout Standard
13745 are input types provided with a label to enter information, which will
13746 be processed by the document class.
13750 \begin_layout Plain Layout
13751 It could be seen as a matter of inconsequence, that the types
13759 described above are not such input types as well.
13760 Because of the special meaning of those types, however, I have implemented
13761 them as ordinary paragraph types with a one letter mark in the left margin.
13762 Moreover, it would affect my feeling of symmetry, if the
13770 type had such a serious different appearance.
13775 The types must be used ahead of the corresponding
13782 \begin_layout Standard
13783 An implementation of these types in a WYSIWYG fashion does not seem to make
13784 sense, because the real appearance of the produced letter does not only
13785 depend on the usage of the particular type, but also on other factors.
13786 For example, a signature entered in the
13790 type will in the standard behavior appear in the produced letter only,
13791 when in the same letter also a
13796 The entered value of the
13800 type will in the standard behavior not appear in the produced letter at
13802 The possibility to design the letter`s heading freely is already indicated
13803 in a footnote above.
13806 \begin_layout Standard
13807 The input types can also be used as empty paragraphs.
13808 This makes sense e.
13809 \begin_inset space \thinspace{}
13813 \begin_inset space \space{}
13825 type is not used at all, in the standard behavior the value of the
13829 type is used as signature, whereas if an empty
13833 type is used, no signature value is defined.
13836 \begin_layout Standard
13837 By using the input types it is possible to write a letter template, containing
13838 filled input types with your personal dates (name, address, etc.) and empty
13839 input types for other dates you want to enter.
13842 \begin_layout Itemize
13847 : sender's name, in the standard behavior appears as a centered paragraph
13848 in small caps in the letter`s heading.
13851 \begin_layout Itemize
13856 : sender's signature, in the standard behavior appears below the
13865 type is used, the value of the
13869 type appears instead.
13872 \begin_layout Itemize
13877 : sender's address, in the standard behavior appears in a centered paragraph
13878 in the letter`s heading below the sender's name.
13881 \begin_layout Itemize
13886 : sender's telephone number, in the standard behavior only sets the LaTeX
13896 \begin_layout Itemize
13901 : place of the letter`s making.
13904 \begin_layout Itemize
13909 : date of the letter`s making.
13918 , in the standard behavior, produce the place and the date in a right-aligned
13919 line below the addressee's field.
13924 type is used, neither place nor date appear, independent of the value of
13934 type is used, the date of the letter `s production is used.
13937 \begin_layout Itemize
13942 : sender`s back address, in the standard behavior appears above the addressee's
13943 field in a small sans serif font.
13946 \begin_layout Itemize
13951 : special mail information, in the standard behavior appears underlined
13952 above the addressee's field below the back address.
13955 \begin_layout Itemize
13960 : additional information, in the standard behavior appears on right side
13961 below the addressee`s field.
13964 \begin_layout Itemize
13969 : the letter's title, in the standard behavior appears in a big, bold, sans
13970 serif font above the subject.
13973 \begin_layout Itemize
13978 : the letter's subject, in the standard behavior appears in a bold font
13986 \begin_layout Standard
14007 produce a business letter like line above the
14011 line containing the fields
14012 \begin_inset Quotes eld
14016 \begin_inset Quotes erd
14020 \begin_inset Quotes eld
14024 \begin_inset Quotes erd
14028 \begin_inset Quotes eld
14032 \begin_inset Quotes erd
14036 \begin_inset Quotes eld
14040 \begin_inset Quotes erd
14044 \begin_inset Quotes eld
14048 \begin_inset Quotes erd
14052 \begin_inset Quotes eld
14056 \begin_inset Quotes erd
14060 For the date field, the value of the
14066 \begin_inset Quotes eld
14069 business letter types
14070 \begin_inset Quotes erd
14073 is used, the value of the
14077 type however does not appear, but only the LaTeX variable
14084 The ordinary output of place and date in a right-aligned line below the
14085 addressee`s field is suppressed.
14086 The types are implemented as input types provided with a label and must
14087 be used ahead of the corresponding
14094 \begin_layout Itemize
14102 \begin_layout Itemize
14110 \begin_layout Itemize
14118 \begin_layout Itemize
14126 \begin_layout Itemize
14134 \begin_layout Subsection
14135 The new letter class: letter (koma-script v.2)
14138 \begin_layout Standard
14144 \begin_layout Standard
14145 \begin_inset VSpace medskip
14151 \begin_layout Standard
14153 Koma-Script version 2.8 has introduced a new letter class
14157 which supersedes the now unsupported
14162 It has — on the LaTeX side — a completely new interface and is not compatible
14163 with the old class.
14164 Therefore, LyX supports both, though it is recommended to use the new class.
14167 \begin_layout Standard
14168 This class covers the same functionality as
14170 letter (koma-script),
14173 The basic items are
14177 (receiver's address, same as
14181 in the old layout),
14194 will start a new letter (i.
14195 \begin_inset space \thinspace{}
14199 \begin_inset space \space{}
14202 you can write several letters per document).
14203 New elements are sender's
14219 and the possibility to use a
14225 Insert\SpecialChar \menuseparator
14231 \begin_layout Standard
14232 The biggest improvement is, though, that the letter's layout is configurable
14233 at almost any needs.
14234 This can be done via the preamble or with a special style file (Letter
14235 Class Option, extension
14239 ), that will be read in as a class option.
14243 \begin_layout Plain Layout
14244 The KOMA package comes with some default
14249 There is, for instance, a
14253 file that follows german typesetting rules, or a
14257 that provides the default layout of the old
14262 The latter can be loaded with the class option
14271 ayout\SpecialChar \menuseparator
14276 ocument\SpecialChar \menuseparator
14288 template that is included in LyX for examples.
14289 A detailed description is to be found in the Koma-Script documentation
14297 \begin_layout Subsection
14301 \begin_layout Standard
14302 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14306 \begin_layout Itemize
14307 The chapter number of a
14311 type appears on a line of its own above the chapter heading instead of
14312 appearing in the same line ahead of it.
14313 The cause for that is the LyX internal behavior for the labeltype
14317 in the layout file.
14320 \begin_layout Itemize
14321 The headings of the types
14329 are only put in the
14330 \begin_inset Quotes eld
14334 \begin_inset Quotes erd
14337 LaTeX table of contents, but not in the LyX table of contents (
14339 Document\SpecialChar \menuseparator
14341 \begin_inset space ~
14345 \begin_inset space ~
14353 \begin_layout Itemize
14354 The paragraphs in a
14358 document class appear in a skip separation mode, not indented.
14359 This is the standard behavior, no special LaTeX commands are needed for
14363 Document\SpecialChar \menuseparator
14366 dialog the corresponding radio button indicates
14375 value always has the effect that extra LaTeX commands are inserted in the
14376 document to produce the gap, which is not what is wanted in this case.
14379 \begin_layout Section
14380 Latex8 (IEEE Conference Papers)
14383 \begin_layout Standard
14389 \begin_layout Subsection
14393 \begin_layout Standard
14394 Since this class is specifically for writing submissions to IEEE sponsored
14395 conferences I strongly recommend that you get a copy of their Authors Kit.
14400 package and associated bibliography style file is included in the kit.
14401 The Authors Kit is usually sent out by email once your initial submission
14403 There is a lot of useful information in the Authors Kit explaining formatting
14404 restrictions and so on and I will assume you have read this since that
14405 means I don't have to repeat it all here.
14408 \begin_layout Subsection
14412 \begin_layout Standard
14413 [AR\SpecialChar \@.
14417 \begin_layout Subsection
14418 Supported Environments
14421 \begin_layout Itemize
14427 \begin_layout Itemize
14433 \begin_layout Itemize
14439 \begin_layout Itemize
14445 \begin_layout Itemize
14451 \begin_layout Itemize
14457 \begin_layout Itemize
14463 \begin_layout Itemize
14469 \begin_layout Itemize
14475 \begin_layout Subsection
14476 Differences Between Screen and Paper
14479 \begin_layout Standard
14480 There are slight differences in appearance mainly with the presentation
14481 of section counters.
14482 On screen the trailing period of the section counter is missing but it
14483 will appear in the output so don't let this worry you.
14486 \begin_layout Section
14490 \begin_layout Standard
14496 \begin_layout Subsection
14500 \begin_layout Standard
14501 Memoir is a very powerful and constantly evolving class.
14502 It has been designed with regard to fictional and non-fictional literature.
14503 Its aim is to let the user have maximum control over the typesetting of
14505 Memoir is based on the standard book class, but it can also emulate the
14506 article class (see below).
14509 \begin_layout Standard
14510 Peter Wilson, the developer of Memoir, is known as the author of lots of
14511 useful packages in the LaTeX world.
14512 Most of them have been merged with Memoir.
14513 Therefore, it is much easier to layout the table of contents, appendices,
14514 chapter designs and such.
14515 LyX, though, does not support all of these goodies natively.
14516 Some of them might be added to forthcoming releases
14520 \begin_layout Plain Layout
14521 You are invited to send suggestions to
14522 \begin_inset Flex URL
14525 \begin_layout Plain Layout
14527 lyx-devel@lists.lyx.org
14537 , lots will probably never, due to the limitations of LyX's framework.
14538 Of course you can still use all features with the help of some native LaTeX
14543 \begin_layout Plain Layout
14548 \begin_layout Plain Layout
14558 \begin_inset space ~
14562 \begin_inset CommandInset ref
14564 reference "sec:Inserting-TeX-Code"
14574 In this section, we can only list those features which are natively supported
14576 For detailed descriptions (and for the rest of features) we are recommending
14577 to have a look at the detailed manual of the Memoir class
14581 \begin_layout Plain Layout
14586 \begin_layout Plain Layout
14596 \begin_inset Flex URL
14599 \begin_layout Plain Layout
14601 CTAN:/macros/latex/memoir/memman.pdf
14611 , which is not only a user guide for the class, but also both a comprehensive
14612 description on good typesetting and a superb example for good typesetting
14616 \begin_layout Subsection
14617 Basic features and restrictions
14620 \begin_layout Standard
14621 Memoir supports basically all features of the standard book classes.
14622 There are, however, some differences, as follows:
14625 \begin_layout Description
14627 \begin_inset space ~
14630 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14633 \begin_layout Description
14635 \begin_inset space ~
14638 style: The fancy page style is not supported, due to a command clash between
14639 Memoir and the fancyhdr package (they are both defining a command with
14640 the same name, which confuses LaTeX).
14641 Instead, Memoir comes with a bunch of own page styles (see
14643 Layout\SpecialChar \menuseparator
14644 Document\SpecialChar \menuseparator
14646 \begin_inset space ~
14652 If you want to use these for the chapter pages, you have to use the command
14659 in the main text or in preamble (e.
14660 \begin_inset space \thinspace{}
14664 \begin_inset space \space{}
14671 chapterstyle{companion}
14676 \begin_layout Description
14677 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14678 an optional argument in the standard classes.
14679 With this, you can specify an alternative version of the title for the
14680 table of contents and the headers (for instance, if the title is too long).
14681 In LyX, you can do this via
14683 Insert\SpecialChar \menuseparator
14685 \begin_inset space ~
14690 at the beginning of a chapter/section.
14691 Memoir features a second optional argument and thus separates the table
14692 of contents from the header.
14693 You can define three variants of a title with this: one for the main text,
14694 one for the table of contents, and one for the headers.
14695 Simply insert two optional arguments if you need this feature, the first
14696 one containing the short title for the Table of Contents, the second one
14697 containing an alternative short title for the headers.
14700 \begin_layout Description
14701 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14702 of contents, the list of figures and the list of table start a new page
14704 Memoir does not follow this route.
14705 You have to insert a page break yourself, if you want to have one.
14708 \begin_layout Description
14709 Titlepage: For some unknown reason, Memoir uses pagination on the title
14710 page (in the standard classes, title pages are
14711 \begin_inset Quotes eld
14715 \begin_inset Quotes erd
14719 \begin_inset space \thinspace{}
14723 \begin_inset space \space{}
14727 If you want an empty title page, type
14731 aliaspagestyle{title}{empty}
14736 \begin_layout Description
14737 Article: With the class option
14743 Layout\SpecialChar \menuseparator
14744 Document\SpecialChar \menuseparator
14746 \begin_inset space ~
14751 ), you can emulate article style.
14752 That is, counters (footnotes, figures, tables etc.) will not be reset on
14753 new chapters, chapters don't start a new page (but are—in contrary to
14754 \begin_inset Quotes eld
14758 \begin_inset Quotes erd
14761 article classes—still allowed), parts, though, use their own page, as in
14765 \begin_layout Description
14766 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14767 font commands, which have been used in the old LaTeX version 2.09 (e.
14768 \begin_inset space \thinspace{}
14772 \begin_inset space \space{}
14788 It produces an error and stops LaTeX whenever such a command appears.
14793 reallows the commands and spits out warnings instead (which does at least
14795 Since a lot of packages and particularly BibTeX style files are still using
14796 those commands, we have decided to use this option by default.
14799 \begin_layout Subsection
14803 \begin_layout Standard
14804 We will only describe the features supported by LyX (which is not much currently
14806 Please consult the Memoir manual
14810 \begin_layout Plain Layout
14815 \begin_layout Plain Layout
14825 \begin_inset Flex URL
14828 \begin_layout Plain Layout
14830 CTAN:/macros/latex/memoir/memman.pdf
14843 \begin_layout Description
14844 Abstract: You may wonder why an abstract is an extra feature.
14845 Well, it is in book class.
14846 Usually books don't have abstracts.
14847 Memoir, however, has.
14848 You can use it wherever and how often you like.
14851 \begin_layout Description
14852 Chapterprecis: You may know this from belletristic: The contents of a chapter
14853 is shortly described below the title and also in the table of contents
14855 \begin_inset space \thinspace{}
14859 \begin_inset space \space{}
14864 Our hero arrives in Troia; he loses some friends; he finds others
14867 Chapterprecis does exactly this.
14868 It is therefore only sensible below a chapter.
14871 \begin_layout Description
14872 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14873 The epigraph environment provides an elegant way of typesetting such a
14875 The motto itself (text) and its author (source) are divided by a short
14877 Unfortunately, we have to fool LyX a bit here again, since the environment
14878 needs two arguments (text and source).
14879 In this case, we have to use curly brackets (in TeX mode) between the two
14890 <author of the slogan>.
14893 \begin_layout Description
14894 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14895 complex figurative poems).
14896 LyX can only support a few of them.
14897 One is poemtitle, which is a centered title for poems, which will also
14898 be added to the table of contents (verse is the standard environment for
14900 Memoir has some enhanced versions of verse, but you need to use TeX code,
14901 because they have to be nested inside regular verse environments, which
14902 is not possible with LyX).
14905 \begin_layout Description
14906 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14909 \begin_layout Section
14910 Article (mwart), book (mwbk) and report (mwrep)
14911 \begin_inset Argument
14914 \begin_layout Plain Layout
14927 \begin_layout Standard
14933 \begin_layout Standard
14934 The LyX document classes
14950 correspond to the LaTeX document classes
14963 They are replacements for the standard document classes
14975 , resp., and fit better to Polish typography conventions in a number of points.
14979 \begin_layout Standard
14983 \begin_layout Itemize
14984 Unnumbered titles (with star, e.
14985 \begin_inset space \thinspace{}
14989 \begin_inset space \space{}
14996 ) are added into table of contents,
14999 \begin_layout Itemize
15000 Additional page styles:
15004 \begin_layout Description
15005 uheadings header with separated lines,
15008 \begin_layout Description
15009 myheadings custom header, contents headers via commands:
15024 \begin_layout Description
15025 myuheadings custom header with separated lines,
15028 \begin_layout Description
15029 outer page number is placed on outer side of page
15033 \begin_layout Itemize
15038 \begin_layout Description
15039 rmheadings serif titles — default,
15042 \begin_layout Description
15043 sfheadings sansserif titles,
15046 \begin_layout Description
15047 authortitle on title page first placed is author next title — default,
15050 \begin_layout Description
15051 titleauthor on title page first placed is title next author,
15054 \begin_layout Description
15055 withmarginpar reserve place on page for margins.
15059 \begin_layout Section
15063 \begin_layout Standard
15068 provides an alternative to the standard
15073 It provides similar functionality, but you might prefer this layout with
15074 sans serif sections, headings, and more.
15077 \begin_layout Section
15081 \begin_layout Standard
15087 \begin_layout Standard
15088 \begin_inset VSpace bigskip
15094 \begin_layout Standard
15099 \begin_inset space ~
15104 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15105 \begin_inset Formula $\beta$
15108 release of May, 1999) class.
15111 \begin_layout Standard
15116 textclass, which works with RevTeX 3.1.
15117 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15118 That means that it doesn't interact very well with LyX, which requires
15119 LaTeX2e, although it has been kludged to work.
15120 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15124 \begin_inset space ~
15129 textclass should also be pretty easy to use.
15132 \begin_layout Standard
15133 These documents are supposed to be used in
15137 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15138 macros, and assume you'll know what to put in the preamble if necessary.
15141 \begin_layout Subsection
15145 \begin_layout Standard
15146 All you need to do is install RevTeX 4, as described in the package's README
15148 The package can be found at The RevTeX 4 Web Site
15149 \begin_inset Flex URL
15152 \begin_layout Plain Layout
15154 http://publish.aps.org/revtex4/
15160 Install it somewhere that LaTeX can see it.
15161 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15163 \begin_inset space \thinspace{}
15167 \begin_inset space \space{}
15170 not the directory where you installed the class file.) Then, if you reconfigure
15171 LyX, it will find the class file and let you use the RevTeX4 textclass.
15174 \begin_layout Standard
15175 Probably the easiest way to get started is either to import a RevTeX 4 document
15183 \begin_inset space ~
15188 template, found in the templates directory.
15191 \begin_layout Subsection
15195 \begin_layout Standard
15196 Optional arguments to
15203 \begin_inset Quotes eld
15207 \begin_inset Quotes erd
15211 \begin_inset Quotes eld
15215 \begin_inset Quotes erd
15225 \begin_inset space ~
15233 \begin_inset space ~
15239 Remember that in RevTeX, at least one optional argument is required!
15242 \begin_layout Standard
15243 Other preamble matter, like
15250 \begin_inset space ~
15256 \begin_inset space ~
15261 dialog, also as usual.
15264 \begin_layout Subsection
15268 \begin_layout Standard
15269 The layouts basically correspond to the commands in RevTeX4.0.
15270 For example, the Email layout corresponds to
15277 Note that (at least as of RevTeX 4.0 Beta), the
15285 layouts are exactly equivalent, so you shouldn't need to use both.
15289 \begin_layout Plain Layout
15290 In case you're curious, both were included so that
15294 would be able to translate both
15314 \begin_layout Subsection
15318 \begin_layout Standard
15319 There are a couple of important unique aspects of RevTeX 4 which might cause
15320 bugs that will be even more confusing in LyX.
15323 \begin_layout Standard
15341 The LyX equivalent is that there is a separate Thanks layout.
15346 write footnotes in the
15350 layout, or weird things may happen.
15351 See the RevTeX 4 documentation for more details.
15354 \begin_layout Standard
15358 \begin_inset space ~
15366 \begin_inset space ~
15375 layouts must be placed
15383 layout and the corresponding
15400 , the LaTeX won't compile.
15403 \begin_layout Subsection
15407 \begin_layout Standard
15408 The main problem with this layout is that you can't use the optional arguments
15409 to layouts like Email and Title.
15410 (The problem is not unique to this layout; you can't use optional arguments
15411 to the Section layouts either.) This means that after you export that file
15412 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15413 need to edit the LaTeX file with a text editor to add the optional arguments
15415 \begin_inset space \thinspace{}
15419 \begin_inset space \space{}
15422 the running title for the page headers.
15423 Lacking these layouts makes the
15429 (and the equivalent
15435 ) useless, so the corresponding layouts don't exist, and will have to be
15440 \begin_layout Plain Layout
15445 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15446 has not been updated yet to take advantage of it.
15454 \begin_layout Section
15455 Springer Journals (
15462 \begin_layout Standard
15468 \begin_layout Subsection
15472 \begin_layout Standard
15473 These are the layout files for some of the journal formats used by Springer
15474 Verlag and listed on
15475 \begin_inset Flex URL
15478 \begin_layout Plain Layout
15480 http://www.springer.de/author/tex/help-journals.html
15485 , where you should also go to fetch the class files (yes, these are LaTeX2e
15487 It is a modular system: the things common to all journals are implemented
15492 , which journal-specific layout files (such as, e.
15493 \begin_inset space \thinspace{}
15497 \begin_inset space \space{}
15504 for Journal of Geodesy) can include.
15507 \begin_layout Standard
15508 This means that implementing support for any other Springer journal on this
15509 list is as simple as writing your own
15517 file following the outline given in
15525 \begin_layout Standard
15526 It is reasonably well tested only for the Journal of Geodesy.
15535 come with the standard LyX distribution.
15536 Install the relevant class file (downloaded from Springer) in a proper
15537 directory, reconfigure LaTeX (in the teTeX case by running
15541 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15542 and it should work.
15545 \begin_layout Subsection
15549 \begin_layout Standard
15550 A large number of theorem-like styles —
15556 \SpecialChar \ldots{}
15562 \begin_layout Standard
15565 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15566 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15569 See the Springer class file documentation for details.
15572 \begin_layout Subsection
15576 \begin_layout Itemize
15588 \begin_layout Itemize
15591 Probability Theory and Related Fields
15597 — Jean-Marc Lasgouttes
15600 \begin_layout Standard
15601 Add your own, it isn't so hard!
15604 \begin_layout Subsection
15608 \begin_layout Standard
15609 These files are partly based on the older
15613 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15614 file from Springer.
15619 layout, are now defunct.
15620 Jean-Marc Lasgouttes helped out big in making me find my way around the
15621 LyX layout file mechanism.
15624 \begin_layout Subsection
15628 \begin_layout Standard
15630 But probably less than in the old hacked-LaTeX
15637 \begin_layout Standard
15639 \begin_inset space \thinspace{}
15642 g.: does not display the number for theorem-like layouts, just #.
15645 \begin_layout Section
15651 \begin_inset CommandInset label
15660 \begin_layout Standard
15668 \begin_layout Subsection
15672 \begin_layout Standard
15673 This section describes how to use LyX to make slides for overhead projectors.
15674 There are two document classes that can do this: the default slides class
15680 This section documents the former.
15683 \begin_layout Standard
15684 I'm going to say this again, nice and clear, so that there's no misunderstanding
15688 \begin_layout Standard
15689 \begin_inset VSpace bigskip
15695 \begin_layout Standard
15699 This section documents the class
15700 \begin_inset Quotes eld
15708 \begin_inset Quotes erd
15716 \begin_layout Standard
15717 \begin_inset VSpace bigskip
15723 \begin_layout Standard
15724 If you're looking for the documentation for
15725 \begin_inset Quotes eld
15733 \begin_inset Quotes erd
15736 , check out section
15737 \begin_inset space ~
15741 \begin_inset CommandInset ref
15743 reference "sec:foiltex"
15753 \begin_inset Quotes eld
15761 \begin_inset Quotes erd
15764 ] is actually somewhat better than the default
15772 \begin_layout Plain Layout
15773 \SpecialChar \ldots{}
15774 or so I've been told repeatedly by its advocates.
15775 Having never used it, I have no idea if this claim is true or not.
15780 which this section documents.
15783 \begin_layout Standard
15784 This class is the LaTeX2e improvement of the old
15789 Every LaTeX2e distribution includes this class [which I'll just refer to
15791 \begin_inset Quotes eld
15799 \begin_inset Quotes erd
15802 from now on], so you're bound to have it.
15803 As I noted earlier, there are other classes, such as
15807 , which also produce slides for overhead projectors and do a better job
15809 However, there are some things which
15813 can do which the others can't, such as generate overlays.
15814 Read on to learn more!
15817 \begin_layout Subsection
15819 \begin_inset CommandInset label
15821 name "sec:slidesetup"
15828 \begin_layout Standard
15829 Obviously, to use this document class, you need to select
15830 \begin_inset Quotes eld
15838 \begin_inset Quotes erd
15841 from the class list in the
15843 Document\SpecialChar \menuseparator
15847 There are some other special things you should know about this class:
15850 \begin_layout Itemize
15851 Don't bother changing the options
15856 They're not supported by the
15863 \begin_layout Itemize
15867 \begin_inset space ~
15872 behaves a bit differently for this class.
15873 The possible choices and what they do are as follows:
15877 \begin_layout Description
15882 The final output contains page numbers in the lower right corner.
15885 \begin_layout Description
15894 , but also prints out any time markers you've put in.
15895 This is the default.
15898 \begin_layout Description
15903 The final output contains no page numbers, time markers, or alignment markers.
15907 \begin_layout Itemize
15912 class has an extra option:
15918 \begin_inset Quotes eld
15926 \begin_inset Quotes erd
15929 in the extra class options.
15933 \begin_layout Standard
15934 Using this options allows you to add time markers to
15940 \begin_inset space ~
15944 \begin_inset CommandInset ref
15946 reference "sec:slideNote"
15954 \begin_layout Standard
15955 You can also use the template file
15956 \begin_inset Quotes eld
15964 \begin_inset Quotes erd
15967 to automatically set up a document to use the
15973 File\SpecialChar \menuseparator
15975 \begin_inset space ~
15979 \begin_inset space ~
15984 to open your new document].
15985 The template file also contains some examples of the special paragraph
15986 environments used by this class.
15987 I'll describe those next.
15990 \begin_layout Subsection
15991 Paragraph Environments
15994 \begin_layout Subsubsection
15995 Supported Environments
15998 \begin_layout Standard
15999 The first thing you'll notice when you start up a new
16003 document is the font size and type: it's the equivalent of the size
16004 \begin_inset Quotes eld
16012 \begin_inset Quotes erd
16018 \begin_inset space ~
16024 This is also what's used in the output.
16026 \begin_inset Quotes eld
16030 \begin_inset Quotes erd
16033 to remind you that this is a slide.
16034 Your final slides will use a larger font; ergo, you'll have less space.
16035 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16038 \begin_layout Standard
16039 The next thing that becomes obvious is the changes to the paragraph environment
16040 pull-down box [at the far-left end of the toolbar].
16041 Most of the paragraph environments you're used to seeing are missing.
16042 There are also five new ones.
16047 class itself only supports certain paragraph environments:
16050 \begin_layout Itemize
16056 \begin_layout Itemize
16062 \begin_layout Itemize
16068 \begin_layout Itemize
16074 \begin_layout Itemize
16080 \begin_layout Itemize
16086 \begin_layout Itemize
16092 \begin_layout Itemize
16098 \begin_layout Itemize
16104 \begin_layout Itemize
16110 \begin_layout Itemize
16116 \begin_layout Standard
16117 All of the other standard environments, including the section-heading environmen
16118 ts, aren't used in the
16125 \begin_layout Standard
16126 On the other hand, you'll notice the following new environments:
16129 \begin_layout Itemize
16135 \begin_layout Itemize
16141 \begin_layout Itemize
16147 \begin_layout Itemize
16153 \begin_layout Itemize
16159 \begin_layout Standard
16160 These five are kind of quirky, due to a
16161 \begin_inset Quotes eld
16165 \begin_inset Quotes erd
16169 You see, LyX doesn't permit you to nest any other paragraph environment
16170 into an empty environment.
16171 Now, that's fine and dandy, but it means that you wouldn't be able to start
16172 a slide with anything except plain text.
16173 To deal with this, I've performed a little
16174 \begin_inset Quotes eld
16178 \begin_inset Quotes erd
16184 \begin_layout Subsubsection
16185 Quirks of the New Environments
16186 \begin_inset CommandInset label
16188 name "sec:slideQuirk"
16195 \begin_layout Standard
16196 All five of the new paragraph environments are somewhat quirky due to inherent
16197 limitiations in the current version of LyX.
16198 As I just mentioned, LyX forbids environments that begin with another environme
16200 To get around this, the
16204 environment isn't a paragraph environment as described in the
16212 \begin_layout Standard
16213 You should consider
16226 \begin_inset Quotes eld
16229 pseudo-environments.
16230 \begin_inset Quotes erd
16233 They look like a section heading or a
16234 \begin_inset Quotes eld
16242 \begin_inset Quotes erd
16245 but really begin a [and, if necessary, end the previous] paragraph environment.
16255 \begin_inset Quotes eld
16259 \begin_inset Quotes erd
16262 These two perform some action.
16265 \begin_layout Standard
16266 A common feature of all five environments,
16286 , is a rather long-ish label.
16287 The text following this label — ordinarily the contents of the paragraph
16288 environment — is utterly irrelevant for
16309 LyX completely ignores it.
16310 In fact, you can leave these five environments completely empty.
16314 \begin_layout Standard
16319 to put any text after the rather long-ish label, you might want to.
16320 This could be a short description of the contents of the
16325 In that case, enter in your descriptive comment and hit
16329 as you normally would.
16332 \begin_layout Standard
16333 If, on the other hand, you don't want to enter in any descriptive text,
16334 you'll hit another LyX quirk.
16335 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16336 environment until you put something in the old one.
16340 \begin_layout Itemize
16341 Start entering the text that will
16369 \begin_layout Itemize
16370 Now move to the beginning of that paragraph.
16374 \begin_layout Itemize
16383 \begin_layout Itemize
16384 Finally, change this new, empty paragraph to a
16408 \begin_layout Standard
16409 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16413 \begin_layout Subsection
16414 Making a Presentation with
16427 \begin_layout Subsubsection
16435 \begin_layout Standard
16436 If you're expecting this section to teach you how to actually make a presentatio
16437 n, you'll be sorely disappointed.
16438 Naturally, I'll describe all of the ways the
16442 class can assist you in preparing the materials for a presentation.
16443 Filling in the contents, however, is up to you.
16448 the LyX philosophy.]
16451 \begin_layout Standard
16456 environment [in the manner described in section
16457 \begin_inset space ~
16461 \begin_inset CommandInset ref
16463 reference "sec:slideQuirk"
16467 ] tells LyX to begin a new slide [duh].
16468 The label for this environment/
16469 \begin_inset Quotes erd
16473 \begin_inset Quotes erd
16477 \begin_inset Quotes eld
16481 \begin_inset Quotes erd
16484 in cool blue, followed by the label,
16485 \begin_inset Quotes eld
16489 \begin_inset Quotes erd
16493 Any text or paragraph environments that follow this one go on the new slide.
16497 \begin_layout Standard
16498 Slides are probably the only time you'll need to forcibly end pages in LyX
16499 (this can be specified in the
16504 In fact, you'll want to, once you finish entering the contents of one slide.
16505 If you've entered more text than can physically fit on a slide, the extra
16506 overflows onto a new slide.
16507 I don't recommend doing this, however, since the overflow slide won't have
16508 any page number on it.
16509 Furthermore, it may interfere with any
16513 you've made to accompany the oversized
16520 \begin_layout Standard
16529 environments work the same way as the
16534 They both create an
16535 \begin_inset Quotes eld
16539 \begin_inset Quotes erd
16542 followed by a label [
16543 \begin_inset Quotes eld
16547 \begin_inset Quotes erd
16551 \begin_inset Quotes eld
16555 \begin_inset Quotes erd
16559 The color is a stunning magenta instead of blue, and the
16560 \begin_inset Quotes eld
16564 \begin_inset Quotes erd
16567 will look different, in style and in length.
16568 The label fonts of all three also differ from one another.
16571 \begin_layout Standard
16576 , if the contents of a
16584 exceed the physical size of a slide or sheet of paper, the extra will overflow
16586 Again, you should avoid this.
16587 It defeats the whole purpose of
16598 \begin_layout Subsubsection
16608 \begin_layout Standard
16613 is a slide that sits atop another slide.
16614 Perhaps you wish to discuss a figure on the main
16618 before displaying the text associated with it.
16619 One way to accomplish this is tape a flap of dark paper over the part of
16624 you want to display later.
16625 This method fails, however, if you wish to overlap one graph with another,
16627 You would then have to fumble while speaking to align the two separate,
16632 s to align the two graphs.
16637 environment in both cases makes life much easier.
16640 \begin_layout Standard
16645 receives the page number of its
16646 \begin_inset Quotes eld
16650 \begin_inset Quotes erd
16658 \begin_inset Quotes eld
16666 \begin_inset Quotes erd
16673 \begin_layout Plain Layout
16674 Presumably, mutliple
16679 \begin_inset Quotes eld
16687 \begin_inset Quotes erd
16691 \begin_inset Quotes eld
16699 \begin_inset Quotes erd
16703 \begin_inset Quotes eld
16711 \begin_inset Quotes erd
16715 \begin_inset space ~
16718 appended to the page number of the parent
16728 Clearly, you want the contents of both the
16736 to each fit on a single physical slide! You should probably consider an
16742 \begin_inset Quotes eld
16746 \begin_inset Quotes erd
16758 class provides a visual cue for this: the label at the start of an
16762 is shorter than that at the start of a
16767 Lastly, when you generate printable output, you'll find alignment markers
16768 in all four corners of both the
16772 page and its parent
16777 These will assist you in lining up the two physical slides.
16780 \begin_layout Standard
16781 The major problem in overlaying two slides is aligning the contents of the
16782 two transparencies.
16783 How much space should you leave for that graph on the second slide? Worse
16784 still, what if you want a graph and a sentence on second slide, but there
16785 is text on the main transparency that goes in between them? You could try
16786 and insert vertical space of the right size.
16787 The better way is to use
16798 \begin_layout Standard
16799 As their names imply,
16807 are two command-like paragraph environments that make all subsequent text
16808 invisible and visible, respectively.
16810 \begin_inset space ~
16814 \begin_inset CommandInset ref
16816 reference "sec:slideQuirk"
16820 that you don't place anything
16824 these two environments, however.
16829 , it inserts a centered, sky-blue label into the page reading
16830 \begin_inset Quotes eld
16833 <Invisible Text Follows>
16834 \begin_inset Quotes erd
16838 For paragraphs following this label, the parts of the
16846 ; it doesn't matter which] where they would be contain instead blank space.
16850 \begin_layout Standard
16855 , the corresponding centered label is
16856 \begin_inset Quotes eld
16859 <Visible Text Follows>
16860 \begin_inset Quotes erd
16864 Paragraphs following this label behave normally.
16865 Note that the beginning of a new
16877 automatically shuts off an
16882 It's therefore not necessary to use
16893 \begin_layout Standard
16894 By now, it should be obvious how to create overlay transparencies using
16895 the proper combination of
16914 \begin_layout Enumerate
16919 , including everything that will appear on it, whether on the main slide
16927 \begin_layout Enumerate
16928 Before each figure or paragraph that will appear only on the
16937 If necessary, insert a
16941 environment after the
16948 \begin_layout Enumerate
16953 immediately following the
16960 \begin_layout Enumerate
16961 Copy the contents of this
16972 \begin_layout Enumerate
16977 , change all of the
16988 \begin_layout Standard
16990 You've just made an
16997 \begin_layout Standard
16998 There's one problem with the way I've designed the LyX
17002 class: you can't make text in the middle of a paragraph invisible, nor
17003 make text in the middle of an invisible paragraph visible again.
17004 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17008 \begin_layout Plain Layout
17009 The commands of interest are:
17012 \begin_layout Itemize
17017 invisible \SpecialChar \ldots{}
17021 \begin_layout Itemize
17026 visible \SpecialChar \ldots{}
17030 \begin_layout Plain Layout
17031 \SpecialChar \ldots{}
17032 and need to be marked as TeX.
17034 \begin_inset Quotes eld
17038 \begin_inset Quotes erd
17041 you wish to change goes in between the brackets [and after the
17054 If you don't know how to mark text as TeX, see the appropriate section
17067 \begin_layout Subsubsection
17077 \begin_inset CommandInset label
17079 name "sec:slideNote"
17086 \begin_layout Standard
17095 is associated with a
17096 \begin_inset Quotes eld
17100 \begin_inset Quotes erd
17112 class provides visual cues.
17117 is shorter than that of a
17121 [yet longer than that of an
17125 ] and, like the label of an
17129 is shockingly magenta.
17130 Additionally, the printed
17134 has the page number of its
17135 \begin_inset Quotes eld
17139 \begin_inset Quotes erd
17147 \begin_inset Quotes eld
17155 \begin_inset Quotes erd
17159 \begin_inset Quotes eld
17167 \begin_inset Quotes erd
17171 \begin_inset Quotes eld
17179 \begin_inset Quotes erd
17183 You can have multiple
17187 s associated with a single
17199 , you'll probably want to break up long
17203 s so that they fit on a single sheet of paper.
17206 \begin_layout Standard
17211 is obvious: it contains anything additional you might want to say about
17217 It could also be used as a sheet of reminders for a particular
17222 In the case of the latter, you might want to make use of time markers.
17228 \begin_inset Quotes eld
17232 \begin_inset Quotes erd
17235 support for time markers, a
17240 So, you'll have to resort to using the LaTeX codes.
17243 \begin_layout Standard
17244 To use time markers, you'll need to specify the extra class option
17245 \begin_inset Quotes eld
17253 \begin_inset Quotes erd
17257 \begin_inset space ~
17261 \begin_inset CommandInset ref
17263 reference "sec:slidesetup"
17268 This option turns on timing marks, which will appear in the lower-left-hand
17274 To set what appears in the time marker, you use the LaTeX commands
17275 \begin_inset Quotes eld
17285 \begin_inset Quotes erd
17289 \begin_inset Quotes eld
17299 \begin_inset Quotes erd
17303 The arguments of both commands are time measured in seconds.
17305 \begin_inset Quotes eld
17315 \begin_inset Quotes erd
17318 sets the time marker to a given time.
17320 \begin_inset Quotes eld
17330 \begin_inset Quotes erd
17333 increments the time marker by the specified amount.
17334 Using time markers and
17338 s in this fashion, you can remind yourself how much time to spend on a particula
17346 \begin_layout Standard
17347 There's one last feature to describe.
17348 Clearly, you'd like to print out all of your
17356 s on transparencies while printing all of your
17373 with which it is associated.
17374 What's a person to do?
17377 \begin_layout Standard
17378 Luckily, there are two LaTeX commands that allow you to select what to print
17380 Both must be placed into the preamble of your document.
17382 \begin_inset Quotes eld
17394 \begin_inset Quotes erd
17397 will cause the output to contain only the
17406 Correspondingly, the command
17407 \begin_inset Quotes eld
17419 \begin_inset Quotes erd
17422 prevents the output of anything but
17427 I'd advise placing both commands in the preamble and initially comment
17429 You can then preview your entire presentation as you write.
17430 When you're done writing, you can then uncomment one of the two to select
17431 what you want to print.
17432 I like to uncomment
17433 \begin_inset Quotes eld
17445 \begin_inset Quotes erd
17448 , print to a file with
17449 \begin_inset Quotes eld
17457 \begin_inset Quotes erd
17460 in its name, comment it back out, then uncomment
17461 \begin_inset Quotes eld
17473 \begin_inset Quotes erd
17477 \begin_inset Quotes eld
17485 \begin_inset Quotes erd
17489 I can then send either file to a printer, loading transparencies or plain
17490 paper as appropriate.
17493 \begin_layout Standard
17494 You can also provide other arguments to the
17495 \begin_inset Quotes eld
17505 \begin_inset Quotes erd
17509 \begin_inset Quotes eld
17519 \begin_inset Quotes erd
17523 See a good LaTeX book for details.
17526 \begin_layout Subsection
17531 Class Template File
17534 \begin_layout Standard
17535 I have also provided a template file,
17536 \begin_inset Quotes eld
17544 \begin_inset Quotes erd
17552 To use it, begin your new presentation with
17557 ile\SpecialChar \menuseparator
17559 \begin_inset space ~
17563 \begin_inset space ~
17573 Your new LyX presentation file will contain an example
17594 additionally contain an example of the use of
17603 Lastly, the preamble will contain:
17606 \begin_layout LyX-Code
17607 % Uncomment to print out only slides and overlays
17610 \begin_layout LyX-Code
17614 \begin_layout LyX-Code
17620 \begin_inset Newline newline
17626 \begin_layout LyX-Code
17627 % Uncomment to print out only notes
17630 \begin_layout LyX-Code
17634 \begin_layout LyX-Code
17642 \begin_layout Standard
17643 One final thing: I created this class to support the LaTeX2e
17644 \begin_inset Quotes eld
17652 \begin_inset Quotes erd
17655 class, one of the built-in LaTeX2e classes.
17656 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17657 built-in slide class.
17658 It's here if you want it or need it.
17659 There exist other LaTeX2e classes for creating presentations, such as the
17665 \begin_inset space ~
17669 \begin_inset CommandInset ref
17671 reference "sec:foiltex"
17676 \begin_inset Quotes eld
17684 \begin_inset Quotes erd
17687 package [present on some TeX distributions].
17688 The latter is not yet supported under LyX.
17692 \begin_layout Plain Layout
17693 Perhaps you can take on the task\SpecialChar \ldots{}
17699 I know nothing about these other classes.
17700 Try them out to see what sort of alternative they provide.
17703 \begin_layout Chapter
17704 LyX Features needing Extra Software
17707 \begin_layout Section
17711 \begin_layout Standard
17717 \begin_layout Subsection
17721 \begin_layout Standard
17730 \begin_layout Plain Layout
17735 is not yet available when you are using the LaTeX distribution MiKTeX.
17740 , you'll find in the
17747 \begin_inset space ~
17758 \begin_inset CommandInset href
17760 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17767 \begin_layout Standard
17772 package is a program that was written by
17773 \begin_inset Flex CharStyle:Noun
17776 \begin_layout Plain Layout
17778 \begin_inset space ~
17786 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17787 and easy to forget.
17788 The program runs over your LaTeX file, checks the integrity of the file,
17789 and flags some common errors.
17790 In other technical words, it is
17797 \begin_layout Standard
17798 Well, what is a syntax checker doing in LyX which is supposed to produce
17799 correct LaTeX anyways? The answer is simple: Just as
17803 not only checks the
17807 of C programs, but also does
17811 checks for type-errors,
17815 catches some common
17819 errors, in addition to the syntactical ones.
17824 is capable of detecting several common errors, such as
17827 \begin_layout Itemize
17828 Ellipsis detection:
17829 \begin_inset Newline newline
17832 Use \SpecialChar \ldots{}
17836 \begin_layout Itemize
17837 No space in front of/after parenthesis:
17838 \begin_inset Newline newline
17844 \begin_layout Itemize
17845 Enforcement of normal space after common abbreviations:
17846 \begin_inset Newline newline
17850 \begin_inset space \thinspace{}
17854 \begin_inset space \space{}
17857 is too wide spacing.
17860 \begin_layout Itemize
17861 Enforcement of end-of-sentence space when the last sentence ends with a
17863 \begin_inset Newline newline
17867 And this is wrong spacing.
17870 \begin_layout Itemize
17871 Space in front of labels and similar commands:
17872 \begin_inset Newline newline
17875 The label should stick right up to the text to avoid falling to a wrong
17878 \begin_inset CommandInset label
17888 \begin_layout Plain Layout
17889 This footnote is in danger of falling off to a wrong page
17894 The label is separated too much.
17897 \begin_layout Itemize
17898 Space in front of references, instead of hard spaces:
17899 \begin_inset Newline newline
17902 In you are in bad luck, the text will break right between the referenced
17903 text and reference number, and that's a pity.
17905 \begin_inset CommandInset ref
17907 reference "sec:chktex"
17914 \begin_layout Itemize
17916 \begin_inset Quotes eld
17920 \begin_inset Quotes erd
17924 \begin_inset Formula $\times$
17928 \begin_inset Newline newline
17931 2x2 looks cheap compared to
17932 \begin_inset Formula $2\times2$
17938 \begin_layout Standard
17939 and more \SpecialChar \ldots{}
17940 It is an invaluable tool when you are
17941 \begin_inset Quotes eld
17945 \begin_inset Quotes erd
17948 your document before printing, and you should run it right after the obligatory
17949 spelling check, and before you go fine tuning the typesetting.
17952 \begin_layout Subsection
17956 \begin_layout Standard
17957 If you have the program installed, usage is as simple as choosing
17959 Tools\SpecialChar \menuseparator
17961 \begin_inset space ~
17967 This will make LyX generate a LaTeX file of your document, start
17971 to check it, and then make LyX insert
17972 \begin_inset Quotes eld
17976 \begin_inset Quotes erd
17979 with the warnings from
17983 , if there were any.
17984 The warnings will be placed close to the point of the mistake, and you
17985 can quickly find them by using the
17987 Navigate\SpecialChar \menuseparator
17990 menu item, or the shortcut key
17999 Open the error boxes by clicking on them with the mouse, or use the shortcut
18008 bindings, or the corresponding
18017 Read the warning and correct the mistake, if it is a mistake.
18018 If you have trouble understanding what the warning is about, you can safely
18020 Remember that there is a hidden layer between the document on screen and
18021 the technical details in invoking
18025 , and this gap can make some warnings seem arcane or just right down plain
18029 \begin_layout Standard
18030 This document is an excellent testing bed for the feature, and it should
18031 provide quite a few warnings for you to fiddle with.
18032 Since computers are only so smart, expect most of the warnings to be false
18036 \begin_layout Subsection
18037 How to fine tune it
18040 \begin_layout Standard
18041 Sometimes, you'll find that
18045 makes more noise than suits your mood.
18046 Then you can choose not to use it, wait until your mood changes, or try
18051 to get better along with you.
18052 Another choice in the most desperate situations is to use
18054 View\SpecialChar \menuseparator
18056 \begin_inset space ~
18060 \begin_inset space ~
18064 \begin_inset space ~
18069 , which will get rid of all warnings instantly.
18072 \begin_layout Standard
18081 very configurable and extensible, you shouldn't expect to solve all problems
18087 Since LyX has to generate a somewhat special LaTeX file to be able to match
18088 the line numbers from the
18096 \begin_layout Plain Layout
18097 You can inspect the specific output from
18103 Edit\SpecialChar \menuseparator
18105 \begin_inset space ~
18109 \begin_inset space ~
18123 to the internal document structure, some of the warnings will not seen
18124 to appear correctly.
18125 There are two things you can do about this:
18128 \begin_layout Itemize
18133 invocation command line in
18149 installation configuration file (usually with the file
18154 See below to learn what warnings can be enabled and disabled on the command
18159 \begin_layout Itemize
18160 Export your document as a raw LaTeX file using
18162 File\SpecialChar \menuseparator
18163 Export\SpecialChar \menuseparator
18171 Invoked in this way, it can be a hassle to find the corresponding place
18172 in the document inside LyX, but with a little patience, you should be able
18176 \begin_layout Standard
18177 Here follows the warning messages that can be enabled and disabled in
18186 to disable a warning, and
18190 to enable a warning.
18191 The emphasized entries are disabled by default, because the default is
18194 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18199 \begin_layout Standard
18200 Notice that you should only use the options that enable and disable warnings,
18201 because LyX relies on some of the other command line parameters to be set
18202 in a specific way to have a chance to communicate with
18209 \begin_layout Enumerate
18213 Command terminated with space.
18216 \begin_layout Enumerate
18219 Non-breaking space (
18220 \begin_inset Quotes eld
18228 \begin_inset Quotes erd
18231 ) should have been used.
18234 \begin_layout Enumerate
18238 You should enclose the previous parenthesis with
18239 \begin_inset Quotes eld
18247 \begin_inset Quotes erd
18253 \begin_layout Enumerate
18256 Italic correction (
18257 \begin_inset Quotes eld
18267 \begin_inset Quotes erd
18270 ) found in non-italic buffer.
18273 \begin_layout Enumerate
18276 Italic correction (
18277 \begin_inset Quotes eld
18287 \begin_inset Quotes erd
18290 ) found more than once.
18293 \begin_layout Enumerate
18297 No italic correction (
18298 \begin_inset Quotes eld
18308 \begin_inset Quotes erd
18314 \begin_layout Enumerate
18318 \begin_inset Quotes eld
18326 \begin_inset Quotes erd
18330 \begin_inset Quotes eld
18338 \begin_inset Quotes erd
18344 \begin_layout Enumerate
18347 Wrong length of dash may have been used.
18350 \begin_layout Enumerate
18354 \begin_inset Quotes eld
18362 \begin_inset Quotes erd
18366 \begin_inset Quotes eld
18374 \begin_inset Quotes erd
18380 \begin_layout Enumerate
18384 \begin_inset Quotes eld
18392 \begin_inset Quotes erd
18398 \begin_layout Enumerate
18402 \begin_inset Quotes eld
18410 \begin_inset Quotes erd
18413 to achieve an ellipsis.
18416 \begin_layout Enumerate
18419 Inter-word spacing (
18420 \begin_inset Quotes eld
18430 \begin_inset Quotes eld
18433 ) should perhaps be used.
18436 \begin_layout Enumerate
18439 Inter-sentence spacing (
18440 \begin_inset Quotes eld
18450 \begin_inset Quotes erd
18453 ) should perhaps be used.
18456 \begin_layout Enumerate
18459 Could not find argument for command.
18462 \begin_layout Enumerate
18466 \begin_inset Quotes eld
18474 \begin_inset Quotes erd
18480 \begin_layout Enumerate
18483 Math mode still on at end of LaTeX file.
18486 \begin_layout Enumerate
18490 \begin_inset Quotes eld
18498 \begin_inset Quotes erd
18501 doesn't match the number of
18502 \begin_inset Quotes eld
18510 \begin_inset Quotes erd
18516 \begin_layout Enumerate
18519 You should use either
18522 \begin_inset Quotes eld
18530 \begin_inset Quotes erd
18535 as an alternative to
18536 \begin_inset Quotes eld
18544 \begin_inset Quotes erd
18550 \begin_layout Enumerate
18557 " (ASCII 39) instead of "
18564 \begin_layout Enumerate
18567 User-specified pattern found.
18570 \begin_layout Enumerate
18573 This command might not be intended.
18576 \begin_layout Enumerate
18583 \begin_layout Enumerate
18601 \begin_layout Enumerate
18604 Delete this space to maintain correct page references.
18607 \begin_layout Enumerate
18611 You might wish to put this between a pair of
18612 \begin_inset Quotes eld
18620 \begin_inset Quotes erd
18626 \begin_layout Enumerate
18629 You ought to remove spaces in front of punctuation.
18632 \begin_layout Enumerate
18635 Could not execute LaTeX command.
18638 \begin_layout Enumerate
18647 in front of small punctuation.
18650 \begin_layout Enumerate
18658 may look prettier here.
18661 \begin_layout Enumerate
18665 Multiple spaces detected in output.
18668 \begin_layout Enumerate
18671 This text may be ignored.
18674 \begin_layout Enumerate
18680 \begin_inset Quotes eld
18685 to begin quotation, not
18692 \begin_layout Enumerate
18699 to end quotation, not
18702 \begin_inset Quotes eld
18710 \begin_layout Enumerate
18716 \begin_layout Enumerate
18719 You should perhaps use
18720 \begin_inset Quotes eld
18728 \begin_inset Quotes erd
18734 \begin_layout Enumerate
18737 You should put a space in front of/after parenthesis.
18740 \begin_layout Enumerate
18743 You should avoid spaces in front of/after parenthesis.
18746 \begin_layout Enumerate
18750 You should not use punctuation in front of/after quotes.
18753 \begin_layout Enumerate
18756 Double space found.
18759 \begin_layout Enumerate
18762 You should put punctuation outside inner/inside display math mode.
18765 \begin_layout Enumerate
18768 You ought to not use primitive TeX in LaTeX code.
18771 \begin_layout Enumerate
18774 You should remove spaces in front of
18775 \begin_inset Quotes eld
18783 \begin_inset Quotes erd
18789 \begin_layout Enumerate
18792 \begin_inset Quotes eld
18800 \begin_inset Quotes erd
18803 is normally not followed by
18804 \begin_inset Quotes eld
18812 \begin_inset Quotes erd
18818 \begin_layout Standard
18819 In later versions of LyX, we hope to provide a more complete interface to
18820 this tool (and it's smaller cousin
18824 ) to exploit the full power of it.
18825 But it's not exactly useless as it is now: go try it on one of your existing
18826 documents of a certain length and be surprised.
18829 \begin_layout Section
18830 Version Control in LyX
18833 \begin_layout Standard
18836 Lars Gullik Bjønnes
18843 \begin_layout Subsection
18847 \begin_layout Standard
18848 A friend of mine wanted to try LyX for a group project.
18849 When he didn't find support for version control or file locking, he dropped
18851 This angered me a bit, so I thought that I should at least make support
18852 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18853 This has now been done.
18854 LyX now supports some of the most basic RCS commands.
18855 If you need to something a bit more sophisticated you will have to do that
18856 manually in a terminal.
18859 \begin_layout Standard
18860 Before you begin to use the version control features in LyX, you should
18862 \begin_inset Quotes eld
18866 \begin_inset Quotes erd
18869 (a man file, read it with
18874 This file describes all the basic features of RCS.
18875 You should especially notice the comment about a RCS directory, and the
18876 notion of a master RCS file (the file ending in
18883 \begin_layout Standard
18884 Later basic CVS/SVN support was added.
18885 You should be familiar with CVS/SVN usage before start using it under LyX.
18886 Most of the log messages are not currently displayed after operations -
18887 you can check them in Messages pane if unsure.
18890 \begin_layout Standard
18891 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18892 package—no guarantees are made for older versions.
18895 \begin_layout Standard
18896 For introducing your own external commands consult vc-command in the manual
18900 \begin_layout Subsection
18901 RCS commands in LyX
18904 \begin_layout Standard
18905 The following sections describe the RCS commands supported by LyX.
18906 You can find them in the
18908 File\SpecialChar \menuseparator
18910 \begin_inset space ~
18916 LyX was tested against RCS 5.7.
18919 \begin_layout Subsubsection
18925 \begin_layout Standard
18926 If your document is not under revision control, this is the only item shown
18928 And if it is under revision control, the
18932 item is not visible.
18936 \begin_layout Standard
18937 This command registers your document with RCS (unless you are under the
18938 directory managed by CVS)\SpecialChar \@.
18939 You are asked interactively to supply an initial
18940 description of the document.
18941 The document is now set in Read-Only mode and you have to
18944 \begin_inset space ~
18948 \begin_inset space ~
18952 \begin_inset space ~
18957 , before making any changes to it.
18958 A document under revision control has a
18959 \begin_inset Quotes eld
18962 [RCS:<version> <locker>]
18963 \begin_inset Quotes erd
18966 item tagged to the filename in the minibuffer.
18969 \begin_layout Standard
18970 RCS command that is run:
18972 ci -q -u -i -t-"<initial description>" <file-name>
18975 \begin_layout Standard
18980 to understand the switches.
18984 \begin_layout Subsubsection
18990 \begin_layout Standard
18991 When you are finished editing a file, you check in your changes.
18992 When you do this, you are asked for a description of the changes.
18993 This is stored in the history log.
18994 The version number is bumped, your changes are applied to the master RCS
18995 file, the document is unlocked and set to Read-Only mode.
18999 \begin_layout Standard
19002 ci -q -u -m"<description>" <file-name>
19005 \begin_layout Subsubsection
19011 \begin_layout Standard
19012 By doing this you lock the document so that only you can edit it.
19013 This will also make the document Read-Write only for you.
19014 You will usually continue editing for a while and when you are finished
19015 you check in your changes.
19016 The status line is changed to reflect that you have locked the file.
19020 \begin_layout Standard
19023 co -q -l <file-name>
19026 \begin_layout Subsubsection
19029 Revert To Repository Version
19032 \begin_layout Standard
19033 This will discard all changes made to the document since the last check
19035 You get a warning before changes are discarded.
19038 \begin_layout Standard
19041 co -f -u<version> <file-name>
19044 \begin_layout Subsubsection
19050 \begin_layout Standard
19051 This makes as if the last check in never happened.
19052 No changes are made to the document loaded into LyX, but the last version
19053 is removed from the master RCS file.
19057 \begin_layout Standard
19060 rcs -o<version> <file-name>
19063 \begin_layout Subsubsection
19069 \begin_layout Standard
19070 This show the complete history of the RCS document.
19075 is shown in a browser.
19083 \begin_layout Subsubsection
19087 \begin_layout Standard
19088 LyX supports RCS version number information (only), see
19089 \begin_inset CommandInset ref
19091 reference "sub:VCS-Revision-Information"
19098 \begin_layout Subsection
19099 CVS commands in LyX
19102 \begin_layout Standard
19103 CVS is now partially supported by LyX.
19104 You can find the commands in the
19106 File\SpecialChar \menuseparator
19108 \begin_inset space ~
19114 Focus of the development moved to SVN support, so please use it instead
19115 of CVS if possible.
19118 \begin_layout Subsubsection
19124 \begin_layout Standard
19125 If your document is not under revision control, this is the only item shown
19127 And if it is under revision control, the
19134 item is not visible.
19138 \begin_layout Standard
19139 This command registers in CVS your document ONLY in case you have already
19140 the documents directory under CVS control (in particular
19145 This means you have to checkout the archive by yourself.
19149 \begin_layout Standard
19150 Then you are asked interactively to supply an initial description of the
19152 Don't forget that registered file is not yet commited.
19155 \begin_layout Standard
19156 CVS command that is run:
19159 \begin_inset Quotes erd
19163 \begin_inset Quotes eld
19167 \begin_inset Quotes erd
19173 \begin_layout Standard
19178 to understand the switches.
19182 \begin_layout Subsubsection
19188 \begin_layout Standard
19189 When you are finished editing a file, you commit your changes.
19190 When you do this, you are asked for a description of the changes.
19191 After that changes are commited.
19194 \begin_layout Standard
19197 cvs -q commit -m"<description>" "<file-name>"
19200 \begin_layout Subsubsection
19203 Revert To Repository Version
19206 \begin_layout Standard
19207 This will discard all changes made to the document since the last check
19209 You get a warning before changes are discarded.
19210 Firstly the file is deleted, secondly CVS update command is run.
19213 \begin_layout Standard
19217 \begin_inset Quotes eld
19221 \begin_inset Quotes erd
19227 \begin_layout Subsubsection
19233 \begin_layout Standard
19234 This show the complete history of the CVS document.
19238 \begin_inset Quotes eld
19242 \begin_inset Quotes erd
19247 is shown in a browser.
19250 \begin_layout Subsection
19251 SVN commands in LyX
19254 \begin_layout Standard
19255 SVN is now partially supported by LyX.
19256 You can find the commands in the
19258 File\SpecialChar \menuseparator
19260 \begin_inset space ~
19266 Please note that if you use password protected access to repository via
19267 ssh, you will be asked in terminal window.
19268 LyX was tested against SVN 1.5 and 1.6
19272 \begin_layout Plain Layout
19273 Most of the commands will work with 1.4 too, see
19274 \begin_inset CommandInset ref
19276 reference "sub:SVN-Repo-Update"
19288 \begin_layout Subsubsection
19294 \begin_layout Standard
19295 If your document is not under revision control, this is the only item shown
19297 And if it is under revision control, the
19304 item is not visible.
19308 \begin_layout Standard
19309 This command registers in SVN your document ONLY in case you have already
19310 the documents directory under SVN control (in particular
19315 This means you have to checkout the archive by yourself.
19319 \begin_layout Standard
19320 Then you are asked interactively to supply an initial description of the
19322 Don't forget that registered file is not yet commited.
19325 \begin_layout Standard
19326 SVN command that is run:
19329 \begin_inset Quotes eld
19333 \begin_inset Quotes erd
19339 \begin_layout Standard
19344 to understand the switches.
19348 \begin_layout Subsubsection
19354 \begin_layout Standard
19355 When you are finished editing a file, you commit your changes.
19356 When you do this, you are asked for a description of the changes.
19357 After that changes are commited.
19360 \begin_layout Standard
19365 \begin_layout Plain Layout
19366 In case locking is not enabled.
19368 \begin_inset CommandInset ref
19370 reference "subsec:SVN-File-Locking"
19381 svn commit -q -m"<description>" <file-name>
19384 \begin_layout Subsubsection
19390 \begin_layout Standard
19391 Updates the changes of this file from the repository.
19392 Be sure you understand SVN merging and conflicts resolving before using
19393 this function, because all conflicts has to be resolved manually by you!
19396 \begin_layout Standard
19401 \begin_layout Plain Layout
19409 svn update --non-interactive
19410 \begin_inset Quotes eld
19414 \begin_inset Quotes erd
19420 \begin_layout Subsubsection
19423 Revert To Repository Version
19426 \begin_layout Standard
19427 This will discard all changes made to the document since the last check
19429 You get a warning before changes are discarded.
19433 \begin_layout Standard
19437 \begin_inset Quotes eld
19441 \begin_inset Quotes erd
19447 \begin_layout Subsubsection
19448 \begin_inset CommandInset label
19450 name "sub:SVN-Repo-Update"
19454 Update of the local directory checkout from repository
19458 \begin_layout Plain Layout
19459 Note that this command will work only with subversion
19460 \begin_inset Formula $\geqq1.5$
19471 \begin_layout Standard
19472 All the commands above have one shortcomming - they deal with the current
19474 Once your document contains pictures, includes external
19475 \begin_inset Flex CharStyle:Code
19478 \begin_layout Plain Layout
19484 files and so on administration becomes more complicated.
19485 LyX now supports updating the whole tree in which resides the document
19489 \begin_layout Plain Layout
19490 One need to organize the files structure so that all external files are
19491 in the same directory or subdirectories of the document.
19498 This become especially useful once you cooperate with people which neither
19499 know about subversion management nor they have ambition to commit additional
19500 material to the repository.
19504 \begin_layout Standard
19505 \begin_inset Flex CharStyle:Code
19508 \begin_layout Plain Layout
19509 Update local directory from repository
19514 command updates the whole directory and in case of merge conflicts local
19515 version of the files are left, so no unintended data loss occurs.
19516 If local changes are detected user is warned before update starts.
19519 \begin_layout Labeling
19520 \labelwidthstring 00.00.0000
19522 \begin_inset space ~
19526 \begin_inset space ~
19530 \begin_inset Newline newline
19534 \begin_inset Flex CharStyle:Code
19537 \begin_layout Plain Layout
19543 (Ask if changes are detected.)
19544 \begin_inset Newline newline
19548 \begin_inset Flex CharStyle:Code
19551 \begin_layout Plain Layout
19552 svn update --accept mine-full $path
19560 \begin_layout Standard
19562 \begin_inset Flex CharStyle:Code
19565 \begin_layout Plain Layout
19571 stands for the path to the document.
19574 \begin_layout Subsubsection
19580 \begin_layout Standard
19581 This show the complete history of the SVN document.
19585 \begin_inset Quotes eld
19589 \begin_inset Quotes erd
19594 is shown in a browser.
19597 \begin_layout Subsubsection
19599 \begin_inset CommandInset label
19601 name "subsec:SVN-File-Locking"
19608 \begin_layout Standard
19609 The file exchange through various revision control systems brings the problem
19610 of merge conflicts in case two different users try to edit the same (parts
19612 When such conflict happens it needs manual resolving and one reasonable
19613 alternative is to provide some kind of locking mechanism, which guarantees
19614 that only one user is allowed to edit file at the given time.
19617 \begin_layout Standard
19618 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19619 access - locks and automatical setting of write permissions (see sec.
19621 \begin_inset CommandInset ref
19623 reference "subsec:Automatical-Locking-Property"
19628 \begin_inset Flex CharStyle:Code
19631 \begin_layout Plain Layout
19641 \begin_layout Plain Layout
19642 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19648 In a case this property is detected for a given document LyX starts to
19649 use SVN locks for document editing automatically and the whole check-in/out
19650 mechanism switches to the same regimen as for RCS.
19651 This in particular means there are two different modes how file is used
19655 \begin_layout Itemize
19657 The loaded file is in the read-only mode.
19658 For editation on needs to check-out.
19663 consists of update from repository and gaining write lock.
19664 If the lock is not possible to obtain, we remain in unlocked state.
19667 \begin_layout Itemize
19669 The loaded file is in the 'normal' edit mode.
19670 No other user is allowed to edit the file.
19675 consists of commiting changes and releasing write-lock.
19676 If no changes have been made to the document, no commit will be produced
19680 \begin_layout Plain Layout
19681 Don't be puzzled by the fact that you will be asked for commit message anyway.
19686 and only the write-lock will be released.
19689 \begin_layout Standard
19693 \begin_layout Labeling
19694 \labelwidthstring 00.00.0000
19697 svn commit -q -m"<description>" "<file-name>"
19698 \begin_inset Newline newline
19701 svn unlock "<file-name>"
19704 \begin_layout Labeling
19705 \labelwidthstring 00.00.0000
19708 svn update "<file-name>"
19709 \begin_inset Newline newline
19712 svn lock "<file-name>"
19715 \begin_layout Subsubsection
19718 \begin_inset CommandInset label
19720 name "subsec:Automatical-Locking-Property"
19726 Automatical Locking Property
19729 \begin_layout Standard
19730 The above mentioned automatical setting of write permissions of the .lyx
19731 file can be set through
19736 ile\SpecialChar \menuseparator
19742 \begin_inset space ~
19745 Control\SpecialChar \menuseparator
19750 oggle locking property
19753 This command is active only when the file is not locked on the svn server
19755 you need to check-out before proceeding).
19758 \begin_layout Labeling
19759 \labelwidthstring 00.00.0000
19761 \begin_inset space ~
19767 \begin_layout Labeling
19768 \labelwidthstring 00.00.0000
19771 svn propset svn:needs-lock ON "<file-name>"
19774 \begin_layout Labeling
19775 \labelwidthstring 00.00.0000
19778 svn propdel svn:needs-lock "<file-name>"
19781 \begin_layout Subsubsection
19782 \begin_inset CommandInset label
19784 name "sub:VCS-Revision-Information"
19788 Revision Information in Documents
19791 \begin_layout Standard
19792 There are more possibilities how to activate revision information in our
19796 \begin_layout Itemize
19797 LyX supports directly:
19801 \begin_layout Itemize
19802 tree revision information (
19803 \begin_inset Flex CharStyle:Code
19806 \begin_layout Plain Layout
19813 The result is the output of the
19814 \begin_inset Flex CharStyle:Code
19817 \begin_layout Plain Layout
19823 command, the following table gives you an idea, how to read the results.
19826 \begin_layout Standard
19828 \begin_inset Tabular
19829 <lyxtabular version="3" rows="6" columns="2">
19830 <features tabularvalignment="middle">
19831 <column alignment="center" valignment="top" width="0">
19832 <column alignment="center" valignment="top" width="0">
19834 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19837 \begin_layout Plain Layout
19843 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19846 \begin_layout Plain Layout
19854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19857 \begin_layout Plain Layout
19863 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19866 \begin_layout Plain Layout
19867 mixed revision working copy
19874 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19877 \begin_layout Plain Layout
19883 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19886 \begin_layout Plain Layout
19887 modified working copy
19894 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19897 \begin_layout Plain Layout
19903 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19906 \begin_layout Plain Layout
19907 switched working copy
19914 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19917 \begin_layout Plain Layout
19923 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19926 \begin_layout Plain Layout
19927 partial working copy, from a sparse checkout
19934 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19937 \begin_layout Plain Layout
19943 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19946 \begin_layout Plain Layout
19947 mixed revision, modified, switched working copy
19960 \begin_layout Itemize
19961 file revision information.
19962 The result comes from parsing the output of
19963 \begin_inset Flex CharStyle:Code
19966 \begin_layout Plain Layout
19968 \begin_inset space ~
19972 \begin_inset space ~
19976 \begin_inset space ~
19985 Supported flags are:
19989 \begin_layout Itemize
19990 version number of the last commit (
19991 \begin_inset Flex CharStyle:Code
19994 \begin_layout Plain Layout
20003 \begin_layout Itemize
20004 author of the last commit (
20005 \begin_inset Flex CharStyle:Code
20008 \begin_layout Plain Layout
20017 \begin_layout Itemize
20018 date of the last commit (
20019 \begin_inset Flex CharStyle:Code
20022 \begin_layout Plain Layout
20031 \begin_layout Itemize
20032 time of the last commit (
20033 \begin_inset Flex CharStyle:Code
20036 \begin_layout Plain Layout
20046 \begin_layout Standard
20047 You can obtain this info via InsetInfo (e.g.
20049 \begin_inset Flex CharStyle:Code
20052 \begin_layout Plain Layout
20053 info-insert buffer vcs-date
20059 The information will be available only when you have the file stored under
20060 svn managment (i.e.
20062 \begin_inset Flex CharStyle:Code
20065 \begin_layout Plain Layout
20071 directory is available with your document).
20075 \begin_layout Itemize
20076 Another---a hacking one---possibility is to use svn keywords
20080 \begin_layout Plain Layout
20081 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20087 In short -- you set file keywords property (e.g.
20090 svn propset svn:keywords 'Rev' file.lyx
20092 ) and then paste keyword ERT
20096 \begin_layout Plain Layout
20097 This is an easy way how to ensure that LyX won't break the line in the middle
20103 tag in your document (e.g.
20108 \begin_layout Plain Layout
20116 This way svn client will automatically substitute revision number (e.g.
20121 \begin_layout Plain Layout
20128 ) after each update and commit.
20129 There are more problems with this approach.
20130 Firstly, the '$' character is used in TeX world for math equations, so
20131 any occurence of math formula
20132 \begin_inset Formula $Rev$
20136 \begin_inset Formula $Rev:59$
20139 in your LyX document.
20140 Similarly for other keywords like Id, Date, Author, etc.
20141 Secondly svn output is dependent on your locales, so its very easy that
20142 svn would produce some problematic strings once Date is used.
20143 Thirdly you get the whole 'Rev: 59' string in your document instead of
20145 Until subversion implements user's custom keywords it will be hard to use
20146 this approach reliably or let LyX to support it directly.
20149 \begin_layout Subsection
20150 SVN and Windows Environment
20153 \begin_layout Quote
20154 My inclination is to say that if the user cannot figure out the command
20155 line operations on their own fairly quickly, they would be well advised
20156 to use TortoiseSVN.
20162 \begin_layout Subsubsection
20166 \begin_layout Standard
20167 In addition to installing LyX, and having access to a Subversion repository,
20168 the user will need to install the Subversion client program.
20169 A Windows installer for the client program is available from
20170 \begin_inset CommandInset href
20173 target "http://www.collab.net/nonav/downloads/subversion/"
20178 The user may also want to install
20179 \begin_inset CommandInset href
20182 target "http://tortoisesvn.tigris.org/"
20186 , which integrates Subversion operations into the context (rightclick) menu
20187 of Windows Explorer.
20188 Operations done outside LyX will typically be more convenient using the
20189 Explorer context menu.
20190 Note that TortoiseSVN is not a replacement for the client program, which
20191 is what LyX itself will use.
20194 \begin_layout Subsubsection
20195 Bringing a document under Subversion control
20198 \begin_layout Standard
20199 Before a LyX document can be brought under version control in Subversion,
20200 its parent directory needs to be under version control.
20201 If the document is being added to a project already in the repository,
20202 this is accomplished by checking the project out to the directory where
20203 the new document will be placed.
20204 If the project itself is not yet under version control (for instance, if
20205 this document starts a new project), the directory must be imported into
20207 This is done outside LyX.
20208 Both import and checkout are easily accomplished from the Explorer context
20209 menu using TortoiseSVN, or alternatively can be done using the command
20210 line client at a DOS prompt.
20211 The procedure for importing the project using TortoiseSVN is described
20212 below, assuming an existing repository and a new project being started
20220 For information on using the Subversion client program, run
20227 \begin_layout Enumerate
20234 in Windows Explorer, right click it, and select
20236 TortoiseSVN > Repo-browser
20239 If necessary, adjust the URL for the repository, then click OK.
20242 \begin_layout Enumerate
20243 Right click the level of the repository under which you want to place the
20244 new project folder (typically the top level) and click
20246 Create folder\SpecialChar \ldots{}
20249 Supply a name for the project folder and click OK.
20250 Add a message for the log file if desired, then click OK again.
20251 The new project folder should appear in the repository.
20252 Finally, click OK again to exit the repository browser.
20255 \begin_layout Enumerate
20256 Once again right click
20262 , this time selecting SVN Checkout\SpecialChar \ldots{}
20263 Select the URL of the project folder
20264 you just created in the repository, and set the checkout directory to
20272 You will be warned about a non-empty folder; click OK to proceed.
20273 You should now have a
20284 \begin_layout Enumerate
20285 Create or open your document in LyX and click
20290 ile\SpecialChar \menuseparator
20296 \begin_inset space ~
20299 Control\SpecialChar \menuseparator
20307 Add a log message and click OK to commit the document to version control.
20310 \begin_layout Standard
20311 From this point onward, you should have full functionality in the
20316 ile\SpecialChar \menuseparator
20322 \begin_inset space ~
20328 You also have the option of checking the document in and out, viewing its
20330 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20331 client program from a command prompt.
20334 \begin_layout Subsubsection
20335 SSH tunel used with SVN under Windows
20338 \begin_layout Standard
20339 Compared to linux setting svn client to communicate over ssh under Windows
20340 is rather troublesome task.
20341 We will at least make some hints how to setup client side but former knowledge
20342 about ssh and Windows command line is needed, also be prepared for a great
20343 deal of frustration...
20346 \begin_layout Enumerate
20347 Get svn client for windows, as described in previous sections.
20348 When it is fresh install run some svn command (e.g.
20350 \begin_inset Flex CharStyle:Code
20353 \begin_layout Plain Layout
20359 ) to have created config files, which you will need to change later on.
20362 \begin_layout Enumerate
20363 Choose ssh client for Windows.
20364 There are more possibilities, we will use the one from Putty tools
20368 \begin_layout Plain Layout
20369 \begin_inset Flex URL
20372 \begin_layout Plain Layout
20374 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20385 You will need to automatize connection, so client doesn't ask for any password
20387 To keep things easy we will use only keys without any additional password
20392 \begin_layout Enumerate
20394 \begin_inset Flex CharStyle:Code
20397 \begin_layout Plain Layout
20404 Save your private .ppk key file and put the public one on the server side.
20405 In case the SVN server runs on linux, note that the format of the public
20406 key is not compatible with linux openssh and you will need to direcly copy-past
20407 e the key from the “
20409 Public key for pasting into OpenSSH authorized_keys file
20411 :” edit field into the server's
20412 \begin_inset Flex CharStyle:Code
20415 \begin_layout Plain Layout
20416 ~/.ssh/authorized_keys
20422 \begin_inset Flex CharStyle:Code
20425 \begin_layout Plain Layout
20434 \begin_layout Enumerate
20436 \begin_inset Flex CharStyle:Code
20439 \begin_layout Plain Layout
20446 In the SVN config file
20450 \begin_layout Plain Layout
20451 Exact path depends on Windows version, usually somewhere around
20452 \begin_inset Flex CharStyle:Code
20455 \begin_layout Plain Layout
20458 Documents and Settings
20472 \begin_inset Flex CharStyle:Code
20475 \begin_layout Plain Layout
20490 , section [tunnels], setup ssh command, e.g.
20492 \begin_inset Flex CharStyle:Code
20495 \begin_layout Plain Layout
20496 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20505 \begin_layout Plain Layout
20506 It will usually take a lot of time to get exact command right and it depends
20508 For example do not have some remote server saved as a default session in
20510 If things fail, try to connect via plink without SVN first.
20519 \begin_layout Enumerate
20520 Checkout the SVN archive, e.g.
20522 \begin_inset Flex CharStyle:Code
20525 \begin_layout Plain Layout
20526 svn co svn+ssh://user@server/repository_path
20534 \begin_layout Subsubsection
20536 \change_inserted 1 1274738367
20537 End-of-Line Conversions
20540 \begin_layout Standard
20542 \change_inserted 1 1274738433
20543 When the collsraborators are mixing Linux and Windows environments, LyX
20544 will use different line endings inside the .lyx files.
20545 This is not problem as far as LyX functionality is concerned, but the commit
20546 diffs will be huge and merge-conflicts prone.
20547 Fortunately SVN itself knows
20551 \begin_layout Plain Layout
20553 \change_inserted 1 1274738731
20554 \begin_inset Flex URL
20557 \begin_layout Plain Layout
20559 \change_inserted 1 1274738731
20561 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20575 how to deal with CR/LF problems when switching .lyx files to the
20576 \begin_inset Flex CharStyle:Code
20579 \begin_layout Plain Layout
20581 \change_inserted 1 1274738399
20593 \begin_layout Plain Layout
20595 \change_inserted 1 1274738457
20597 \begin_inset Flex CharStyle:Code
20600 \begin_layout Plain Layout
20602 \change_inserted 1 1274738457
20603 svn propset svn:eol-style native FILE_NAME
20620 \begin_layout Subsection
20624 \begin_layout Standard
20625 With the recent addition of the vc-command function LyX power users are
20626 allowed to create their own commands for revision control.
20629 \begin_layout Standard
20630 As an example you can see how two TortoiseSVN commands could be integrated
20634 \begin_layout Description
20636 \begin_inset Flex CharStyle:Code
20639 \begin_layout Plain Layout
20640 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20648 \begin_layout Description
20650 \begin_inset Flex CharStyle:Code
20653 \begin_layout Plain Layout
20654 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20662 \begin_layout Section
20663 Literate Programming
20666 \begin_layout Standard
20671 (kayvan@sylvan.com)
20675 original documentation written by
20677 Edmar Wienskoski Jr.
20680 (edmar-w-jr@technologist.com)
20683 \begin_layout Subsection
20687 \begin_layout Standard
20688 The main purpose of this documentation is to show you how to use LyX for
20689 literate programming.
20690 Where it is assumed that you are familiar with this programming technique,
20692 \begin_inset Quotes eld
20696 \begin_inset Quotes erd
20700 \begin_inset Quotes eld
20704 \begin_inset Quotes erd
20708 If that is not the case, please follow the web links provided in the following
20710 There is a lot of good documentation out there covering old development
20711 history to the latest tools tips.
20714 \begin_layout Standard
20715 It is also assumed that you are familiar with LyX itself to a point that
20716 you are comfortable changing your LyX preferences, and X resources file.
20717 If that is not the case please refer to other LyX documentation to cover
20718 your specific needs.
20721 \begin_layout Subsection
20722 Literate Programming
20725 \begin_layout Standard
20726 From the Literate Programming FAQ:
20729 \begin_layout Quotation
20730 Literate programming is the combination of documentation and source together
20731 in a fashion suited for reading by human beings.
20732 In fact, literate programs should be enjoyable reading, even inviting!
20733 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20734 and documentation in a single file.
20735 Literate programming tools then parse the file to produce either readable
20736 documentation or compilable source.
20737 The WEB style of literate programming was created by D.
20738 \begin_inset space \thinspace{}
20742 Knuth during the development of his TeX typesetting software.
20746 \begin_layout Standard
20747 Another excerpt says:
20750 \begin_layout Quotation
20753 How is literate programming different from verbose commenting?
20756 \begin_layout Quotation
20757 There are three distinguishing characteristics.
20758 In order of importance, they are:
20762 \begin_layout Itemize
20763 flexible order of elaboration
20766 \begin_layout Itemize
20767 automatic support for browsing
20770 \begin_layout Itemize
20771 typeset documentation, especially diagrams and mathematics
20775 \begin_layout Standard
20776 Now that I sparked your curiosity, take a look in the references.
20779 \begin_layout Subsubsection
20783 \begin_layout Standard
20784 The complete Literate Programming FAQ can be found at:
20787 \begin_layout Quote
20788 Literate Programming FAQ
20789 \begin_inset Flex URL
20792 \begin_layout Plain Layout
20794 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20802 \begin_layout Standard
20803 The FAQ lists 23 (twenty three!) different literate programming tools.
20804 Where some are specialized or
20805 \begin_inset Quotes eld
20809 \begin_inset Quotes erd
20812 for particular programming languages, while other have general scope.
20817 for my own use for several reasons:
20820 \begin_layout Itemize
20821 It can generate the documentation either in LaTeX or HTML.
20824 \begin_layout Itemize
20825 It has a open architecture, i.
20826 \begin_inset space \thinspace{}
20830 \begin_inset space \space{}
20833 it is easy to plug in new filters and to perform special processing that
20838 \begin_layout Itemize
20839 There is a good selection of filters available already (the HTML is one
20843 \begin_layout Itemize
20847 \begin_layout Standard
20848 The Noweb web page can be found at:
20851 \begin_layout Quote
20853 \begin_inset Flex URL
20856 \begin_layout Plain Layout
20858 http://www.cs.virginia.edu/~nr/noweb/
20866 \begin_layout Standard
20867 Starting from there you can reach many other interesting links and even
20868 some literate program examples.
20871 \begin_layout Subsection
20872 LyX and Literate Programming
20875 \begin_layout Standard
20876 The LyX support for Literate Programming is provided by using the generic
20877 LyX converters mechanism.
20878 This support is provided in a
20879 \begin_inset Quotes eld
20883 \begin_inset Quotes erd
20887 \begin_inset space \thinspace{}
20891 \begin_inset space \space{}
20894 you will be able to use this new LyX feature with some other literate programmin
20895 g tool of your choice by just changing your LyX preferences.
20898 \begin_layout Subsubsection
20899 Generating documents and code (weaving and tangling)
20902 \begin_layout Paragraph
20903 Selecting the document class
20906 \begin_layout Standard
20907 If you have installed Noweb and LyX successfully, whenever you open a new
20908 document or try to change the document class of an existing one, you will
20909 find that there are three new document classes available:
20912 \begin_layout Itemize
20916 \begin_layout Itemize
20920 \begin_layout Itemize
20924 \begin_layout Standard
20925 You must select one of them to create your literate documents from.
20929 \begin_layout Standard
20930 Note that literate documents are not limited to these three classes.
20931 New classes can be generated from other styles like letter or in combination
20932 with other class variations like Article (AMS).
20933 If you have special needs that cannot be covered by one of the existing
20934 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20935 will arrange to insert a new entry, or teach you how to do it.
20939 \begin_layout Plain Layout
20940 It is very simple, it involves the creation of a file with four lines, and
20941 re-running of the auto configuration.
20946 Moreover, if you use a literate tool other than Noweb you may need to create
20947 a new set of document classes for it.
20950 \begin_layout Paragraph
20954 \begin_layout Standard
20955 LyX enables you to write code with a layout named
20963 \begin_layout Plain Layout
20964 The equivalent Noweb term is
20965 \begin_inset Quotes eld
20969 \begin_inset Quotes erd
20973 For historical reasons, I got used to the term
20974 \begin_inset Quotes eld
20978 \begin_inset Quotes erd
20981 introduced by other literate tool named Nuweb, which I used for many years
20982 before rendering myself to Noweb.
20987 Noweb delimits scraps like this:
20990 \begin_layout LyX-Code
20994 \begin_layout LyX-Code
20998 \begin_layout LyX-Code
21002 \begin_layout LyX-Code
21006 \begin_layout LyX-Code
21010 \begin_layout Standard
21011 The problem is that whatever is written in between the << and the
21015 must be taken literally, i.
21016 \begin_inset space \thinspace{}
21020 \begin_inset space \space{}
21023 LyX should be prevented from making any special interpretation of what has
21025 This is handled by a special layout named Scrap, that works like a normal
21026 paragraph but has a free spacing capability.
21029 \begin_layout Standard
21030 The down side of the Scrap paragraph layout is that consecutive paragraphs
21031 of code will be spaced with one empty line in the source code and also
21032 in the printed documentation.
21033 The work around is to enter each line of code within a single Scrap, with
21034 a newline (ctrl-return).
21035 The example above will look like this:
21039 \begin_layout Plain Layout
21040 If you have a printed version of this document you will not see any difference
21041 between the previous example and this one.
21049 \begin_layout LyX-Code
21051 \begin_inset Newline newline
21055 \begin_inset Newline newline
21059 \begin_inset Newline newline
21063 \begin_inset Newline newline
21069 \begin_layout Standard
21070 This layout works fine.
21071 The only real inconvenience is that you have to type ctrl-return instead
21076 \begin_layout Plain Layout
21077 It is in my list of
21078 \begin_inset Quotes eld
21082 \begin_inset Quotes erd
21093 \begin_layout Standard
21094 As a special note, you can also use the
21095 \begin_inset Quotes eld
21099 \begin_inset Quotes erd
21102 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21106 \begin_layout LyX-Code
21108 \begin_inset Newline newline
21111 def some_function(args):
21112 \begin_inset Newline newline
21115 "This is the doc string for this function."
21116 \begin_inset Newline newline
21119 print "My args: ", args
21122 \begin_layout LyX-Code
21123 @ %def some_function
21126 \begin_layout Standard
21127 For an example of this usage and the resulting cross-reference output, look
21128 at the Literate python program in
21130 LIBDIR/examples/listerrors.lyx
21132 which should make this all clear.
21135 \begin_layout Paragraph
21136 Generating the documentation
21139 \begin_layout Standard
21140 At this point you already have a new document file with a proper document
21141 class, and with some code and text on it.
21142 How do I print it? The answer is simple, you select
21144 View\SpecialChar \menuseparator
21148 Just like you would do for a plain document.
21149 No special procedure is required.
21152 \begin_layout Standard
21153 To help orientate you, I will now explain what happens inside LyX:
21156 \begin_layout Enumerate
21159 Update\SpecialChar \menuseparator
21162 menu option is chosen, a LaTeX file is generated.
21167 \begin_layout Standard
21168 If the document is of any literate class the generated file will be named
21169 with an extension name defined by the
21170 \begin_inset Quotes eld
21174 \begin_inset Quotes erd
21177 format (defined in the Preferences panel), otherwise the file will have
21186 \begin_layout Enumerate
21187 Note that the only difference so far is in the name of the file, no special
21188 processing is required by LyX.
21189 Given that you formatted the code using the Scrap layout that, by itself,
21190 takes care of the business.
21193 \begin_layout Enumerate
21194 If the document is of any literate class LyX will then use the internal
21195 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21199 \begin_layout Plain Layout
21200 The converters are defined in the
21202 Tools\SpecialChar \menuseparator
21206 \begin_inset Quotes eld
21210 \begin_inset Quotes erd
21222 manual for general information about converters.
21227 to generate the LaTeX file.
21231 \begin_layout Standard
21232 Otherwise it will just skip this step.
21236 \begin_layout Enumerate
21237 Finally, LaTeX is invoked and the regular post processing continues as in
21241 \begin_layout Standard
21242 Independence from a particular
21243 \begin_inset Quotes eld
21247 \begin_inset Quotes erd
21250 is easily achieved by changing the commands that are run by the various
21254 \begin_layout Paragraph
21255 Generating the code
21258 \begin_layout Standard
21259 When the build menu option is chosen or the corresponding button in the
21260 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21261 Next, LyX invokes the
21266 This converter needs to be defined by the user and is not installed by
21267 default, though the Program format is.
21268 This converter (like any other converter) will have two parts:
21271 \begin_layout Enumerate
21272 The converter program itself.
21273 This program performs the conversion from the one format to the other (in
21274 this case, from the Noweb format to the Program pseudo-format).
21277 \begin_layout Enumerate
21278 The error log parser.
21279 This is a program whose sole purpose is to rewrite error messages in a
21280 format that LyX understands.
21281 This makes it possible for LyX to place error boxes in the right places
21282 in the file buffer.
21285 \begin_layout Standard
21286 The first part, the
21287 \begin_inset Quotes eld
21291 \begin_inset Quotes erd
21294 setting, should be set to
21295 \begin_inset Quotes eld
21303 \begin_inset Quotes erd
21307 This basically means that LyX will call
21308 \begin_inset Quotes eld
21312 \begin_inset Quotes erd
21315 (a program or script) with the name of the Noweb file (normally a file
21316 in the LyX temp directory).
21320 \begin_layout Standard
21321 This is an implementation of
21322 \begin_inset Quotes eld
21326 \begin_inset Quotes erd
21329 that you can place in a directory on your path:
21332 \begin_layout LyX-Code
21336 \begin_layout LyX-Code
21340 \begin_layout LyX-Code
21341 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21344 \begin_layout Standard
21345 The next part of the converter setting is the
21346 \begin_inset Quotes eld
21350 \begin_inset Quotes erd
21353 which is to be set to
21354 \begin_inset Quotes eld
21359 parselog=listerrors
21362 \begin_inset Quotes erd
21366 This will run any errors that are generated by the
21367 \begin_inset Quotes eld
21371 \begin_inset Quotes erd
21374 process through the
21375 \begin_inset Quotes eld
21379 \begin_inset Quotes erd
21385 \begin_layout Standard
21386 The converter code looks in
21394 then on the path for the
21395 \begin_inset Quotes eld
21399 \begin_inset Quotes erd
21405 \begin_layout Standard
21406 The build will normally take place in LyX's temporary directory, so the
21407 files produced by the conversion will be in that directory.
21408 LyX will copy out what it regards as the `main' file, but the
21412 conversion may produce several files, and so most of these would then be
21413 deleted when LyX was closed.
21414 The present solution is to use a `copier',
21418 \begin_layout Plain Layout
21427 manual for information on these.
21436 script in its default mode, so that the entire contents of the temporary
21437 directory is copied.
21438 More will get copied than is needed, to be sure, but nothing will be lost.
21439 If, however, you know what extensions the generated files will have, this
21440 can be improved by using the
21449 This option takes a comma-separated list of extensions to copy.
21450 So, for example, if the conversion will generate only files with the extensions
21459 , then the correct definition would be:
21462 \begin_layout LyX-Code
21463 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21466 \begin_layout Standard
21467 The result will be that only files with these two extensions will be copied
21471 \begin_layout Paragraph
21472 Build instructions in the document
21475 \begin_layout Standard
21476 The last piece of the integration between LyX and noweb is the
21477 \begin_inset Quotes eld
21481 \begin_inset Quotes erd
21485 Generally, the instructions for building your program should be embedded
21486 in a scrap of its own.
21488 \begin_inset Quotes eld
21492 \begin_inset Quotes erd
21495 above uses the notangle command to look for this scrap (called
21496 \begin_inset Quotes eld
21500 \begin_inset Quotes erd
21503 ) and runs its contents through
21504 \begin_inset Quotes eld
21508 \begin_inset Quotes erd
21514 \begin_layout Standard
21515 Typically, such a scrap would look something like this:
21518 \begin_layout LyX-Code
21520 \begin_inset Newline newline
21524 \begin_inset Newline newline
21528 \begin_inset Newline newline
21531 if [ -z "${NOWEB_SOURCE}" ]
21532 \begin_inset Newline newline
21536 \begin_inset Newline newline
21539 NOWEB_SOURCE=myfile.nw
21540 \begin_inset Newline newline
21544 \begin_inset Newline newline
21548 code to extract files ...]
21549 \begin_inset Newline newline
21553 code to compile files ...]
21554 \begin_inset Newline newline
21560 \begin_layout Standard
21563 LIBDIR/examples/listerrors.lyx
21567 LIBDIR/examples/Literate.lyx
21569 which implement two versions of the
21570 \begin_inset Quotes eld
21574 \begin_inset Quotes erd
21577 program for some illustrations of how all of these pieces go together or
21580 LIBDIR/examples/noweb2lyx.lyx.
21583 Interestingly, these three files show off the language-indepence of the
21584 LyX literate programming support since they are written in Python, C and
21588 \begin_layout Subsubsection
21592 \begin_layout Standard
21593 All the Literate Programming support is configured by the
21595 Tools\SpecialChar \menuseparator
21599 \begin_inset Quotes eld
21603 \begin_inset Quotes erd
21607 The important parts are:
21610 \begin_layout Description
21612 \begin_inset space ~
21616 \begin_inset Quotes eld
21620 \begin_inset Quotes erd
21624 \begin_inset space ~
21627 format Set up via the Formats tab, this is where the Noweb-specific pieces
21637 , the file extension is set to
21642 This tells LyX to create a file with a
21646 extension in the first step of the conversion process.
21649 \begin_layout Description
21651 \begin_inset space ~
21659 \begin_inset space ~
21662 format This is an empty format whose sole purpose is to be the endpoint
21663 of a conversion (which then allows us to set up a converter for it).
21666 \begin_layout Description
21675 This converter performs the
21676 \begin_inset Quotes eld
21680 \begin_inset Quotes erd
21683 of the literate document.
21684 For Noweb, it is set to
21685 \begin_inset Quotes eld
21690 noweave -delay -index $$i > $$o
21693 \begin_inset Quotes erd
21699 \begin_layout Description
21709 \begin_inset Quotes eld
21713 \begin_inset Quotes erd
21717 As stated above, the Converter is set to
21718 \begin_inset Quotes eld
21726 \begin_inset Quotes erd
21729 , with Flags set to
21730 \begin_inset Quotes eld
21735 originaldir,parselog=listerrors
21738 \begin_inset Quotes erd
21744 \begin_layout Subsubsection
21748 \begin_layout Standard
21749 There is also a new function implemented in the LyX server, the
21750 \begin_inset Quotes eld
21753 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21757 \begin_layout Standard
21758 When debugging code with ddd/gdb, it is possible to invoke a text editor
21759 at the current execution position with a single key stroke.
21760 The default ddd configuration for that is shift-ctrl-V.
21761 It happens that you can define the editor command line invocation in ddd
21764 Edit\SpecialChar \menuseparator
21765 Preferences\SpecialChar \menuseparator
21768 dialog and changing the "Edit Sources" entry.
21771 \begin_layout Standard
21772 I take advantage of the new created LyX server function and this ddd feature,
21774 \begin_inset Quotes eld
21778 \begin_inset Quotes erd
21784 \begin_layout LyX-Code
21785 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21788 \begin_layout Standard
21789 With this, whenever you are using ddd and find a point in the program that
21790 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21791 ddd you forward this information to LyX through the LyX server and then
21792 the LyX window will show the same file with the cursor at the same position
21793 ddd was pointing to.
21794 No more guessing or long scrolling to locate a point in the program back
21798 \begin_layout Standard
21799 Note however that you must enable the LyX server to get this feature working
21800 (it is disabled by default).
21801 You can enable it in
21813 ) by entering in the
21818 \begin_inset Quotes eld
21823 /home/<your-home-directory>/.lyx/lyxpipe
21826 \begin_inset Quotes erd
21832 \begin_layout Standard
21833 Read the LyX server documentation in the
21835 Customization Manual
21837 for further information.
21840 \begin_layout Subsubsection
21844 \begin_layout Standard
21845 There are six new buttons that can be added to your LyX toolbar.
21846 Five of these buttons are short cuts to layout styles:
21867 The last one is a short cut to the
21868 \begin_inset Quotes eld
21872 \begin_inset Quotes erd
21879 \begin_layout Standard
21880 LyX has a range of buttons that are available for tool bar customization.
21881 In my toolbar I like to combine the six short cuts above with two more:
21886 \SpecialChar \menuseparator
21891 \SpecialChar \menuseparator
21898 View\SpecialChar \menuseparator
21902 Here is how it looks like:
21905 \begin_layout LyX-Code
21909 \begin_layout LyX-Code
21913 \begin_layout LyX-Code
21914 Icon "layout Standard"
21917 \begin_layout LyX-Code
21918 Icon "layout Section"
21921 \begin_layout LyX-Code
21922 Icon "layout LaTeX"
21925 \begin_layout LyX-Code
21926 Icon "layout LyX-Code"
21929 \begin_layout LyX-Code
21930 Icon "layout Scrap"
21933 \begin_layout LyX-Code
21937 \begin_layout LyX-Code
21941 \begin_layout LyX-Code
21942 Icon "buffer-typeset"
21945 \begin_layout LyX-Code
21946 Icon "build-program"
21949 \begin_layout LyX-Code
21953 \begin_layout LyX-Code
21957 \begin_layout LyX-Code
21961 \begin_layout LyX-Code
21965 \begin_layout LyX-Code
21969 \begin_layout Subsubsection
21970 Colors customization
21973 \begin_layout Standard
21974 There are a number of colors in LyX that can be customized in
21979 One of the things that bothers people is the LaTeX font color.
21980 The default color is red, since the scraps uses LaTeX font, and there is
21981 a lot of scraps in literate documents, you may get tired of seeing everything
21983 You can change it by going to the tabs
21992 \begin_layout Standard
21993 The next thing is the visible presence of the newline character in the screen.
21994 You can choose the color of this particular character and make it blend
21996 I recommend you choosing a color that is close to the background but not
21997 equal, that way you still can see it is there, but it is not bothering
22002 \begin_layout Chapter
22003 Secrets of the LaTeX Masters
22004 \begin_inset CommandInset label
22013 \begin_layout Standard
22014 Though LyX is a powerful tool, it cannot hope to support everything that
22015 can be done with pure TeX/LaTeX.
22016 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22017 as long as you are not afraid to use that
22018 \begin_inset Quotes eld
22022 \begin_inset Quotes erd
22025 button on the toolbar or add things to the LaTeX preamble.
22026 This section lists some tips, tricks, and otherwise cool ideas to give
22027 your document that extra little flair.
22030 Do try this at home
22032 , just start with something a little smaller and less important than your
22036 \begin_layout Standard
22037 Most ideas in this section require less common files in your LaTeX installation.
22038 If you have a system like teTeX, most will already be available.
22039 A few, however, will need to be downloaded from one of the CTAN archives.
22040 Often, there are several ways to do something, or several LaTeX style files
22041 which do the same thing.
22042 We do not endorse one choice over another, we simply claim that we have
22043 done a particular task with a particular file.
22044 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22047 \begin_layout Section
22051 \begin_layout Standard
22054 Lars Gullik Bjønnes
22057 \begin_layout Subsection
22061 \begin_layout Standard
22062 The aim for this chapter
22066 \begin_layout Plain Layout
22067 Editor's note: Lars' original chapter was a masterful description of how
22073 However, it was too long to flow smoothly in this document.
22074 I have therefore chosen to excerpt the most important sections here (sorry,
22075 Lars); you can read the original chapter (and more of the story!) in the
22078 examples/multicol.lyx
22086 is to show how the LaTeX package
22090 can be used in a LyX document.
22091 As LyX doesn't support the
22095 package natively yet, we have to use some small hacks.
22096 By reading this section it should be obvious how to do this.
22099 \begin_layout Subsection
22103 \begin_layout Standard
22108 package allows switching between one and multicolumn format on the same
22110 Footnotes are handled correctly (for the most part), but will be placed
22111 at the bottom of the page and not under each column.
22112 LaTeX's float mechanism, however, is partly disabled in the current implementat
22114 At the moment only page-wide floats can be used within the scope of the
22118 \begin_layout Subsection
22122 \begin_layout Subsubsection
22126 \begin_layout Standard
22127 If you want to have two columns in your text, you have use LaTeX mode to
22132 begin{multicols}{2}
22134 at the point where you want the two column layout to start, and then
22140 where you want it to end.
22144 \begin_layout Standard
22148 \begin_layout Plain Layout
22152 begin{multicols}{2}
22160 \begin_layout Standard
22165 The Adventure of the Empty House
22168 \begin_inset Newline newline
22173 Sir Arthur Conan Doyle
22176 \begin_layout Standard
22179 It was in the spring of the year 1894 that all London was interested, and
22180 the fashionable world dismayed, by the murder of the Honourable Ronald
22181 Adair under most unusual and inexplicable circumstances.
22182 The public has already learned those particulars of the crime which came
22183 out in the police investigation, but a good deal was suppressed upon that
22184 occasion, since the case for the prosecution was so overwhelmingly strong
22185 that it was not necessary to bring forward all the facts.
22186 Only now, at the end of nearly ten years, am I allowed to supply those
22187 missing links which make up the whole of that remarkable chain.
22188 The crime was of interest in itself, but that interest was as nothing to
22189 me compared to the inconceivable sequel, which afforded me the greatest
22190 shock and surprise of any event in my adventurous life.
22191 Even now, after this long interval, I find myself thrilling as I think
22192 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22193 ty which utterly submerged my mind.
22194 Let me say to that public, which has shown some interest in those glimpses
22195 which I have occasionally given them of the thoughts and actions of a very
22196 remarkable man, that they are not to blame me if I have not shared my knowledge
22197 with them, for I should have considered it my first duty to do so, had
22198 I not been barred by a positive prohibition from his own lips, which was
22199 only withdrawn upon the third of last month.
22202 \begin_layout Standard
22206 \begin_layout Plain Layout
22218 \begin_layout Subsubsection
22222 \begin_layout Standard
22223 The same pattern is used when you want more than two columns:
22226 \begin_layout Standard
22230 \begin_layout Plain Layout
22234 begin{multicols}{3}
22242 \begin_layout Standard
22245 It can be imagined that my close intimacy with Sherlock Holmes had interested
22246 me deeply in crime, and that after his disappearance I never failed to
22247 read with care the various problems which came before the public.
22248 And I even attempted, more than once, for my own private satisfaction,
22249 to employ his methods in their solution, though with indifferent success.
22250 There was none, however, which appealed to me like this tragedy of Ronald
22252 As I read the evidence at the inquest, which led up to a verdict of willful
22253 murder against some person or persons unknown, I realized more clearly
22254 than I had ever done the loss which the community had sustained by the
22255 death of Sherlock Holmes.
22256 There were points about this strange business which would, I was sure,
22257 have specially appealed to him, and the efforts of the police would have
22258 been supplemented, or more probably anticipated, by the trained observation
22259 and the alert mind of the first criminal agent in Europe.
22260 All day, as I drove upon my round, I turned over the case in my mind and
22261 found no explanation which appeared to me to be adequate.
22262 At the risk of telling a twice-told tale, I will recapitulate the facts
22263 as they were known to the public at the conclusion of the inquest.
22266 \begin_layout Standard
22270 \begin_layout Plain Layout
22282 \begin_layout Standard
22283 You can have more than 3 columns if you want to, but that might not be very
22284 pleasant for the eye.
22287 \begin_layout Subsubsection
22288 Columns inside columns
22291 \begin_layout Standard
22292 You can even have columns inside columns:
22295 \begin_layout Standard
22299 \begin_layout Plain Layout
22303 begin{multicols}{2}
22311 \begin_layout Standard
22314 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22315 at that time governor of one of the Australian colonies.
22316 Adair's mother had returned from Australia to undergo the operation for
22317 cataract, and she, her son Ronald, and her daughter Hilda were living together
22321 \begin_layout Standard
22325 \begin_layout Plain Layout
22329 begin{multicols}{2}
22337 \begin_layout Standard
22340 The youth moved in the best society–had, so far as was known, no enemies
22341 and no particular vices.
22342 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22343 had been broken off by mutual consent some months before, and there was
22344 no sign that it had left any very profound feeling behind it.
22345 For the rest {sic} the man's life moved in a narrow and conventional circle,
22346 for his habits were quiet and his nature unemotional.
22347 Yet it was upon this easy-going young aristocrat that death came, in most
22348 strange and unexpected form, between the hours of ten and eleven-twenty
22349 on the night of March 30, 1894.
22352 \begin_layout Standard
22356 \begin_layout Plain Layout
22368 \begin_layout Standard
22371 Ronald Adair was fond of cards–playing continually, but never for such stakes
22373 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22374 It was shown that, after dinner on the day of his death, he had played
22375 a rubber of whist at the latter club.
22376 He had also played there in the afternoon.
22381 The evidence of those who had played with him– Mr.
22382 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22383 and that there was a fairly equal fall of the cards.
22384 Adair might have lost five pounds, but not more.
22385 His fortune was a considerable one, and such a loss could not in any way
22387 He had played nearly every day at one club or other, but he was a cautious
22388 player, and usually rose a winner.
22389 It came out in evidence that, in partnership with Colonel Moran, he had
22390 actually won as much as four hundred and twenty pounds in a sitting, some
22391 weeks before, from Godfrey Milner and Lord Balmoral.
22392 So much for his recent history as it came out at the inquest.
22395 \begin_layout Standard
22399 \begin_layout Plain Layout
22411 \begin_layout Standard
22412 Please do read the file
22414 examples/multicol.lyx
22416 for more advanced examples including column and header spacing, vertical
22417 separator lines, and more.
22420 \begin_layout Section
22425 Paragraph Environment
22426 \begin_inset Argument
22429 \begin_layout Plain Layout
22430 Numbering in Enumerate
22438 \begin_layout Standard
22444 \begin_layout Standard
22445 \begin_inset VSpace bigskip
22451 \begin_layout Standard
22453 The default numbering for the
22457 paragraph environment begins with Arabic numbers and ends with uppercase
22459 Suppose, however, you wanted a different type of numbering scheme.
22460 Here's a quickie example of how to change the numbering scheme:
22463 \begin_layout LyX-Code
22473 \begin_layout LyX-Code
22483 \begin_layout LyX-Code
22493 \begin_layout LyX-Code
22503 \begin_layout Standard
22504 \SpecialChar \ldots{}
22505 which changes the numbering scheme to uppercase Roman numerals, uppercase
22506 letters, Arabic numbers, and lowercase letter.
22509 \begin_layout Standard
22510 Additionally, the previous example also adds a little bit extra to the numbering
22512 For example, the first level label actually looks like:
22513 \begin_inset Quotes eld
22517 \begin_inset Quotes erd
22521 For ease of reading, we'll describe what the numbering schemes look like
22522 using a notation something like this: <
22523 \begin_inset Quotes eld
22527 \begin_inset Quotes erd
22531 \begin_inset space ~
22535 \begin_inset Quotes erd
22539 \begin_inset Quotes erd
22543 \begin_inset space ~
22547 \begin_inset Quotes erd
22551 \begin_inset Quotes erd
22555 \begin_inset space ~
22559 \begin_inset Quotes eld
22563 \begin_inset Quotes erd
22570 \begin_layout Standard
22571 As you can see in the example, there is a label command for each nesting
22578 \SpecialChar \ldots{}
22585 , as well as a counter,
22589 \SpecialChar \ldots{}
22595 There are also five
22596 \begin_inset Quotes eld
22600 \begin_inset Quotes erd
22633 , each of which take one counter as an argument.
22634 You can add characters before or after these, but there's no need to add
22638 \begin_layout Standard
22639 You can get really fancy with these.
22643 \begin_layout LyX-Code
22657 \begin_layout LyX-Code
22669 \begin_layout LyX-Code
22679 \begin_layout LyX-Code
22689 \begin_layout Standard
22690 produces the somewhat out of hand numbering scheme: <
22691 \begin_inset Quotes eld
22695 \begin_inset Quotes erd
22699 \begin_inset space ~
22703 \begin_inset Quotes erd
22707 \begin_inset Quotes erd
22711 \begin_inset space ~
22715 \begin_inset Quotes erd
22719 \begin_inset Quotes erd
22723 \begin_inset space ~
22727 \begin_inset Quotes eld
22731 \begin_inset Quotes erd
22738 \begin_layout Standard
22742 \begin_layout Section
22746 \begin_layout Standard
22752 \begin_layout Standard
22753 \begin_inset VSpace bigskip
22759 \begin_layout Standard
22764 \begin_layout Plain Layout
22770 tmpfont}{cmr17 scaled 2500}{
22782 \begin_layout Standard
22787 \begin_layout Plain Layout
22798 hose of you who like the style of old books probably also like
22799 \begin_inset Quotes eld
22803 \begin_inset Quotes erd
22806 —those large capital letters which begin each new chapter or section.
22807 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22808 know some plain TeX!) but does require a lot of work and many iterations,
22809 as you can see by all the ugly TeX-mode stuff at the beginning of this
22813 \begin_layout Standard
22817 \begin_layout Plain Layout
22823 bigdrop{-1em}{3}{ptmri}{T}+
22828 here is a much easier way of doing this, of course.
22837 ) package from CTAN allows a simple way to add such letters to your documents.
22838 Since this package is not a standard part of teTeX, I can't demonstrate
22839 it within this document, but if you copy this paragraph to a new document,
22841 \begin_inset Quotes eld
22851 \begin_inset Quotes erd
22854 and the pluses from the TeX code at the beginning of the paragraph, and
22859 usepackage{dropcaps}
22861 to your LaTeX preamble, you will get a nice Times Roman Italic
22862 \begin_inset Quotes eld
22866 \begin_inset Quotes erd
22869 , whose height is three lines of text and which protrudes 1 em into the
22871 (Make certain you have copied
22872 \begin_inset Quotes eld
22880 \begin_inset Quotes erd
22883 into a directory where TeX can see it.) The first argument is the amount
22884 of indentation; in this case the negative sign moves it into the margin.
22885 The second argument is the height of the letter in number of lines of text.
22886 The third argument is the font name: virtually anything which has a tfm
22887 file should work (wade through the
22889 .../texmf/fonts/tfm
22891 directory for possibilities).
22892 My personal favorite is
22893 \begin_inset Quotes eld
22901 \begin_inset Quotes erd
22904 , a fancy German font specifically designed for dropped capitals.
22905 The fourth argument is the letter (or letters) to be dropped.
22910 package also offers the
22916 command, as well as a slightly simplified
22925 \begin_layout Section
22926 Non-standard Paragraph Shapes
22929 \begin_layout Standard
22935 \begin_layout Standard
22936 \begin_inset VSpace bigskip
22942 \begin_layout Standard
22946 \begin_layout Plain Layout
22958 \begin_layout Standard
22962 \begin_layout Plain Layout
22971 \begin_layout Plain Layout
22985 \begin_layout Standard
22990 \begin_layout Plain Layout
23001 \begin_layout Plain Layout
23010 \begin_layout Plain Layout
23019 \begin_layout Plain Layout
23028 \begin_layout Plain Layout
23037 \begin_layout Plain Layout
23046 \begin_layout Plain Layout
23055 \begin_layout Plain Layout
23064 \begin_layout Plain Layout
23073 \begin_layout Plain Layout
23082 \begin_layout Plain Layout
23091 \begin_layout Plain Layout
23100 \begin_layout Plain Layout
23109 \begin_layout Plain Layout
23118 \begin_layout Plain Layout
23127 \begin_layout Plain Layout
23136 \begin_layout Plain Layout
23145 \begin_layout Plain Layout
23154 \begin_layout Plain Layout
23163 \begin_layout Plain Layout
23169 There are times when the tyranny of rectangular paragraphs must be overthrown.
23170 In such situations, a call to the delightful plain TeX command
23177 As you can see, completely arbitrary shapes can be laid out with a suitable
23178 set of linelength definitions.
23179 While this parshape may look a bit silly and useless, one could conceive
23180 of situations such as finely tuned dropped capitals, word wrapping around
23181 non-rectangular graphics, etc.
23182 which will benefit from such handcrafting.
23185 \begin_layout Standard
23186 \begin_inset VSpace bigskip
23192 \begin_layout Standard
23197 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23204 is the number of lines of text which define the paragraph.
23205 If there turn out to be fewer lines, the shape is truncated; if there are
23206 more, the excess lines have the same dimensions as the last line of the
23216 entries specify the indentation of the line from the left margin, and the
23217 length of the line as measured from that point.
23218 The shape applies only to the current paragraph; everything is reset to
23219 normal for the next paragraph.
23222 \begin_layout Standard
23226 \begin_layout Plain Layout
23238 \begin_layout Section
23242 \begin_layout Standard
23243 As you can see, the examples in this section range from the useful to the
23245 While I don't expect that anyone will ever need the paragraph shape demonstrate
23246 d in the last section, the important point is that you can do almost anything
23247 you want in LyX if you are willing to figure out how to do it in TeX and
23249 TeX is a fantastically powerful typesetting system and all that power is
23250 available to you since LyX uses it as its backend.