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 The remainder of this chapter contains more detailed information on XHTML
4439 output, its limitations, and ways to work around those limitations.
4442 \begin_layout Section
4443 Math Output in XHTML
4446 \begin_layout Standard
4447 LyX offers four choices for how math is rendered.
4448 These have various advantages and disadvantages:
4451 \begin_layout Itemize
4453 \begin_inset Newline newline
4456 MathML is a dialect of XML designed specifically for mathematics on the
4457 web, and it typically renders very well in browsers that support it.
4458 The disadvantage is that not all browsers support MathML, and support is
4459 not complete even in the Gecko-based browsers, such as Firefox.
4460 \begin_inset Newline newline
4463 If Lyx is unable to render a formula as MathML---for example, if the formula
4465 \begin_inset Flex CharStyle:Code
4468 \begin_layout Plain Layout
4474 package or ERT---then it will instead output the formula as an image.
4478 \begin_layout Itemize
4480 \begin_inset Newline newline
4484 \begin_inset Flex CharStyle:Code
4487 \begin_layout Plain Layout
4493 outputs math as HTML, styled by CSS.
4497 \begin_layout Plain Layout
4498 LyX has borrowed some of the CSS for its HTML output from
4499 \begin_inset Flex CharStyle:Code
4502 \begin_layout Plain Layout
4513 For simple formulae, this can work quite well, though with more complicated
4514 formulae it tends to break down.
4515 Still, this method has the advantage that it is very widely supported and
4516 so it may be appropriate for documents that contain only a little, fairly
4518 \begin_inset Newline newline
4521 If Lyx is unable to render a formula as MathML---for example, if the formula
4523 \begin_inset Flex CharStyle:Code
4526 \begin_layout Plain Layout
4532 package or ERT---then it will instead output the formula as an image.
4536 \begin_layout Itemize
4538 \begin_inset Newline newline
4542 \begin_inset Flex CharStyle:Code
4545 \begin_layout Plain Layout
4551 , LyX will output formulae as images, the very same images, in fact, that
4552 are used for instant preview.
4556 \begin_layout Plain Layout
4557 Instant preview does
4561 have to be on for images to be output, however.
4566 The advantage to this method is that the images are simply generated by
4567 LaTeX, so they are very accurate.
4568 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4569 so they do not scale terribly well, and one cannot copy them, etc.
4570 \begin_inset Newline newline
4573 The size of the images can be controlled by setting the
4574 \begin_inset Quotes eld
4578 \begin_inset Quotes erd
4582 \begin_inset Flex CharStyle:MenuItem
4585 \begin_layout Plain Layout
4586 Document\SpecialChar \menuseparator
4587 Settings\SpecialChar \menuseparator
4597 \begin_layout Plain Layout
4598 For those who want to know, this controls the resolution of the image in
4599 dots per inch and is based upon a default of 75 dpi.
4605 \begin_inset Newline newline
4608 If LyX for some reason fails to create an image for a formula (e.g., if a
4609 required LaTeX package is not installed), then it will fall back to outputing
4613 \begin_layout Itemize
4615 \begin_inset Newline newline
4618 Finally, LyX will happily output math as LaTeX.
4619 As well as being the output of last resort, this method can be used with
4621 \begin_inset CommandInset href
4624 target "http://www.math.union.edu/~dpvc/jsMath/"
4628 , which uses JavaScript to render LaTeX embedded in HTML documents.
4629 LyX wraps the LaTeX in either a
4630 \begin_inset Flex CharStyle:Code
4633 \begin_layout Plain Layout
4639 (for inline formulas) or
4640 \begin_inset Flex CharStyle:Code
4643 \begin_layout Plain Layout
4649 (for displayed formulas) with
4650 \begin_inset Flex CharStyle:Code
4653 \begin_layout Plain Layout
4659 , as is required for jsMath.
4662 \begin_layout Standard
4663 ne of these output methods must be selected under
4664 \begin_inset Flex CharStyle:MenuItem
4667 \begin_layout Plain Layout
4668 Document\SpecialChar \menuseparator
4669 Settings\SpecialChar \menuseparator
4676 By default, LyX outputs MathML.
4677 This is a document-wide setting, therefore.
4680 \begin_layout Standard
4681 Eventually, LyX will offer the user the option to select an alternate output
4682 method for a particular inset, say, one that isn't being rendered very
4687 \begin_layout Plain Layout
4688 That said, since LyX falls back to images if the inset contains ERT, then
4689 one can force output as an image by putting some harmless ERT into the
4691 \begin_inset Formula $a=b\relax$
4702 \begin_layout Section
4703 Bibliography and Citations
4706 \begin_layout Standard
4707 XHTML output fully supports bibliographies and citations.
4711 \begin_layout Standard
4712 Citation labels are generated by the same machinery that generates LyX's
4713 on-screen labels, so the labels will look in the output much as they do
4714 in LyX, though better.
4715 If you are using numerical citations, then LyX will output numerical labels,
4716 such as [1] or [17], rather than simply showing the citation key in square
4717 brackets, as it does on-screen.
4718 If you are using author-year citations, then LyX will add lowercase letters
4719 to the years, just as BibTeX does, if it finds more than one citation for
4720 a given author-year combination.
4721 The labels will be printed with the bibliography entries.
4722 Note that there is, at present, no way to customize the appearance of the
4723 labels, for example, to choose between square brackets and parentheses.
4726 \begin_layout Standard
4727 Bibliography output is handled by the same machinery that handles the presentati
4728 on of reference information in the citation dialog, so you will see in the
4729 XHTML output pretty much what you would see if you were to look at a given
4730 entry in the citation dialog.
4731 The formatting can be customized in your layout file or, preferably, in
4737 manual for the details.
4740 \begin_layout Standard
4741 The main defect at present is that cross-referenced information is printed
4742 with every entry with which it is associated.
4743 So you can see things like this:
4748 \begin_inset Quotes eld
4751 Context and Logical Form
4752 \begin_inset Quotes erd
4757 Language in Context: Selected Essays
4759 (Oxford: Oxford University Press, 2007), pp.
4765 \begin_inset Quotes eld
4768 Semantics in Context
4769 \begin_inset Quotes erd
4774 Language in Context: Selected Essays
4776 (Oxford: Oxford University Press, 2007), pp.
4780 \begin_layout Standard
4781 This should be fixed before long.
4784 \begin_layout Standard
4785 There is no support at present for sectioned bibliographies.
4786 If you have multiple bibliographies, then LyX will print the same bibliography
4790 \begin_layout Section
4794 \begin_layout Standard
4795 LyX will happily export indexes as XHTML, but with certain limitations at
4799 \begin_layout Standard
4800 Index export will be most reliable when you do not attempt to use the fancy
4801 constructs that are described in the section on indexes in the
4809 \begin_layout Plain Layout
4810 The main issue here is that LyX itself does not really handle these.
4811 It just lets you enter what you would have to enter in raw LaTeX.
4816 We'll describe how they are handled using the subsection headings from
4820 \begin_layout Itemize
4821 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4822 these, but the entries must be separated by
4823 \begin_inset Quotes eld
4827 \begin_inset Quotes erd
4830 , that is, there must be spaces around the exclamation point.
4831 This is because it is otherwise too difficult to check for escaped exclamation
4832 points, ones in math, and so forth.
4835 \begin_layout Itemize
4836 Page Ranges: There is no support at all for page ranges, since these make
4837 no sense with XHMTL.
4838 Instead, you will just get two index entries, one at either end.
4841 \begin_layout Itemize
4842 Cross-referencing: There is no support for cross-referencing.
4843 If LyX finds an entry containing the
4844 \begin_inset Quotes eld
4847 |see\SpecialChar \ldots{}
4849 \begin_inset Quotes erd
4852 construct, it is just dropped, and the rest is treated as an ordinary index
4856 \begin_layout Itemize
4857 Index Entry Order: LyX does support attempts to fix the sorting order.
4858 It will take what is before the first `@' it finds and use that for sorting,
4859 taking what follows the first `@' to be the actual entry.
4860 At present, LyX does not check for escaped `@', so do not try to index
4864 \begin_layout Itemize
4865 Index Entry Layout: You can format entries by using the text style dialog,
4866 or by using any other method available within LyX itself.
4867 There is no support for constructs like:
4868 \begin_inset Quotes eld
4872 \begin_inset Quotes erd
4876 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4877 and everything that follows it.
4880 \begin_layout Itemize
4881 Multiple Indexes: There is no support for multiple indexes.
4882 Rather, all index entries will be printed as one large index.
4883 To avoid our printing several versions of the index, we print only the
4884 main index, so make sure you have one.
4887 \begin_layout Section
4888 Nomenclature and Glossary
4891 \begin_layout Standard
4892 There is at present no support for glossaries.
4895 \begin_layout Chapter
4899 \begin_layout Section
4903 \begin_layout Standard
4904 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4905 and retrieve information about the LyX internal state.
4906 This is only intended for advanced users, but they should find it useful.
4907 It is by writing to the LyX server, for example, that bibliography managers,
4908 such as JabRef, are able to
4909 \begin_inset Quotes eld
4913 \begin_inset Quotes erd
4919 \begin_layout Section
4920 Starting the LyX Server
4923 \begin_layout Standard
4924 The LyX server works through the use of a pair of named pipes.
4925 These are usually located in
4926 \begin_inset Flex CharStyle:Code
4929 \begin_layout Plain Layout
4935 , (except on Windows, where
4939 named pipes are special objects located in
4940 \begin_inset Flex CharStyle:Code
4943 \begin_layout Plain Layout
4955 ) and have the names
4956 \begin_inset Quotes eld
4960 \begin_inset Flex CharStyle:Code
4963 \begin_layout Plain Layout
4970 \begin_inset Quotes erd
4974 \begin_inset Quotes eld
4978 \begin_inset Flex CharStyle:Code
4981 \begin_layout Plain Layout
4988 \begin_inset Quotes erd
4992 External programs write into
4993 \begin_inset Flex CharStyle:Code
4996 \begin_layout Plain Layout
5002 and read back data from
5003 \begin_inset Flex CharStyle:Code
5006 \begin_layout Plain Layout
5013 The stem of the pipe names can be defined in the
5014 \begin_inset Flex CharStyle:MenuItem
5017 \begin_layout Plain Layout
5018 Tools\SpecialChar \menuseparator
5025 \begin_inset Flex CharStyle:Code
5028 \begin_layout Plain Layout
5029 "/home/myhome/lyxpipe"
5035 \begin_inset Flex CharStyle:Code
5038 \begin_layout Plain Layout
5057 configure this manually in order for the server to start.
5060 \begin_layout Standard
5062 \begin_inset Flex CharStyle:Code
5065 \begin_layout Plain Layout
5072 \begin_inset Flex CharStyle:Code
5075 \begin_layout Plain Layout
5081 ' to create the pipes.
5082 If one of the pipes already exists, LyX will assume that another LyX process
5083 is already running and will not start the server.
5084 On POSIX (Unix like) systems, if for some other reason, an unused
5085 \begin_inset Quotes eld
5089 \begin_inset Quotes erd
5092 pipe is left in existence when LyX closes, then LyX will try to delete
5094 If this fails for some reason, you will need to delete the pipes manually
5095 and then restart LyX.
5096 On Windows, pipes are deleted by the OS on program termination or crash,
5098 \begin_inset Quotes eld
5102 \begin_inset Quotes erd
5105 pipes should not be possible.
5108 \begin_layout Standard
5109 To have several LyX processes with servers at the same time, you have to
5110 use different configurations, perhaps by using separate user directories,
5112 \begin_inset Flex CharStyle:Code
5115 \begin_layout Plain Layout
5121 file, for each process.
5124 \begin_layout Standard
5125 If you are developing a client program, you might find it useful to enable
5126 debugging information from the LyX server.
5127 Do this by starting LyX as
5128 \begin_inset Flex CharStyle:Code
5131 \begin_layout Plain Layout
5140 \begin_layout Standard
5141 You can find a complete example client written in C in the source distribution
5143 \begin_inset Flex CharStyle:Code
5146 \begin_layout Plain Layout
5147 development/lyxserver/server_monitor.c
5155 \begin_layout Standard
5156 Another useful tool is command-line based client you will find in
5157 \begin_inset Flex CharStyle:Code
5160 \begin_layout Plain Layout
5161 src/client/lyxclient
5169 \begin_layout Section
5170 Normal communication
5173 \begin_layout Standard
5174 To issue a LyX call, the client writes a line of ASCII text into the input
5176 This line has the following format:
5193 \begin_layout Description
5194 clientname is a name that the client can choose arbitrarily.
5195 Its only use is that LyX will echo it if it sends an answer—so a client
5196 can dispatch results from different requesters.
5199 \begin_layout Description
5200 function is the function you want LyX to perform.
5201 It is the same as the commands you'd use in the minibuffer.
5204 \begin_layout Description
5205 argument is an optional argument which is meaningful only to some functions
5207 \begin_inset Quotes eld
5211 \begin_inset Quotes erd
5214 LFUN will insert the argument as text at the cursor position).
5217 \begin_layout Standard
5218 The answer from LyX will arrive in the output pipe and be of the form
5235 \begin_layout Standard
5244 are just echoed from the command request, while
5248 is more or less useful information filled according to how the command
5249 execution worked out.
5250 Some commands, such as
5251 \begin_inset Quotes eld
5255 \begin_inset Quotes erd
5258 , will return information about the internal state of LyX, while other will
5259 return an empty data-response.
5260 This means that the command execution went fine.
5263 \begin_layout Standard
5264 In case of errors, the response from LyX will have this form
5281 \begin_layout Standard
5286 should contain an explanation of why the command failed.
5289 \begin_layout Standard
5293 \begin_layout LyX-Code
5294 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5295 \begin_inset Newline newline
5298 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5299 \begin_inset Newline newline
5302 read a <~/.lyxpipe.out
5303 \begin_inset Newline newline
5309 \begin_layout Section
5313 \begin_layout Standard
5314 LyX can notify clients of events going on asynchronously.
5315 Currently it will only do this if the user binds a key sequence with the
5317 \begin_inset Quotes eld
5321 \begin_inset Quotes erd
5325 The format of the string LyX sends is as follows:
5329 \begin_inset Flex CharStyle:Code
5332 \begin_layout Plain Layout
5343 \begin_layout Standard
5348 is the printed representation of the key sequence that was actually typed
5352 \begin_layout Standard
5353 This mechanism can be used to extend LyX's command set and implement macros.
5354 Bind some key sequence to
5355 \begin_inset Quotes eld
5359 \begin_inset Quotes erd
5363 Then start a client that listens on the output pipe, dispatches the command
5364 according to the sequence, and starts a function that may use LyX calls
5365 and LyX requests to issue a command or a series of commands to LyX.
5368 \begin_layout Section
5369 The simple LyX Server Protocol
5372 \begin_layout Standard
5373 LyX implements a simple protocol that can be used for session management.
5374 All messages are of the form
5387 \begin_layout Standard
5393 \begin_inset Quotes eld
5397 \begin_inset Quotes erd
5401 \begin_inset Quotes eld
5405 \begin_inset Quotes erd
5410 \begin_inset Quotes eld
5414 \begin_inset Quotes erd
5417 is received from a client, LyX will report back to inform the client that
5418 it's listening to it's messages, while
5419 \begin_inset Quotes eld
5423 \begin_inset Quotes erd
5426 sent from LyX will inform clients that LyX is closing.
5429 \begin_layout Section
5430 Reverse DVI/PDF search
5433 \begin_layout Standard
5434 Some DVI/PDF viewers
5438 \begin_layout Plain Layout
5439 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5440 Skim on Mac OSX and SumatraPDF on Windows.
5449 facility (also called
5454 This means that you can tell LyX to put the cursor to a specific line in
5455 the document by clicking at the respective position in the DVI/PDF output.
5456 To achieve this, the viewer must be able to communicate with LyX.
5457 This is done via the LyX server either by using the named pipe (
5461 ), or the UNIX domain socket (
5465 ) that LyX creates in its temporary directory (this is the way the
5466 \begin_inset Flex CharStyle:Code
5469 \begin_layout Plain Layout
5475 program communicates with LyX).
5476 In some cases, you need a helper script that mediates between the viewer
5477 and LyX, in others, the viewer can communicate with LyX directly.
5478 This depends on the selected viewer and on your operating system.
5479 The same applies to the way viewers need to be configured and the way the
5480 reverse search is actually performed.
5481 In what follows, we will thus describe how to setup reverse search for
5483 Before we turn to this, though, we will explain what needs to be done generally
5484 to enable reverse search in the DVI/PDF output.
5487 \begin_layout Subsection
5489 \change_inserted 2 1274788899
5490 \begin_inset CommandInset label
5492 name "sub:rev-search"
5496 Automatical enabling
5499 \begin_layout Standard
5501 \change_inserted 2 1274789582
5502 In most cases LyX will do the work for you by enabling
5503 \begin_inset Flex CharStyle:MenuItem
5506 \begin_layout Plain Layout
5508 \change_inserted 2 1274789026
5509 Document\SpecialChar \menuseparator
5510 Output\SpecialChar \menuseparator
5517 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5518 srcltx package (for DVI) respectively.
5519 This option can be easily reached also on
5520 \begin_inset Flex CharStyle:Code
5523 \begin_layout Plain Layout
5525 \change_inserted 2 1274789582
5536 \begin_layout Standard
5538 \change_inserted 2 1274789534
5539 Plase note that including
5540 \begin_inset Flex CharStyle:Code
5543 \begin_layout Plain Layout
5545 \change_inserted 2 1274789498
5554 \begin_inset Flex CharStyle:Code
5557 \begin_layout Plain Layout
5559 \change_inserted 2 1274789484
5567 sometimes have an impact on the typeset and you should switch them off
5568 for the final typesets.
5573 \begin_layout Standard
5575 \change_inserted 2 1274789340
5576 You can also define custom macro in preferences and in case you need some
5577 special tweaks read the next section about manual enabling.
5583 \begin_layout Subsection
5585 \change_inserted 2 1274788680
5591 \begin_layout Standard
5592 LaTeX provides several different methods for reverse search.
5593 Some are built-in in the
5594 \begin_inset Flex CharStyle:Code
5597 \begin_layout Plain Layout
5603 program, some are provided by external packages.
5604 Your choice depends on whether your LaTeX distribution already provides
5605 a given method (the built-in methods are rather new) and whether your viewer
5607 The available methods are described in the following.
5608 \change_inserted 2 1274788557
5612 \begin_layout Subsubsection*
5613 Built-in DVI-search via src-specials (DVI only)
5616 \begin_layout Standard
5617 This method provides the DVI file with the necessary information for reverse
5619 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5620 distribution should include it), and it works reliably.
5621 To enable it, change the
5622 \begin_inset Flex CharStyle:MenuItem
5625 \begin_layout Plain Layout
5630 \begin_layout Plain Layout
5643 \begin_inset Flex CharStyle:MenuItem
5646 \begin_layout Plain Layout
5651 \begin_layout Plain Layout
5658 eX (plain)->DraftDVI
5664 \begin_inset Flex CharStyle:MenuItem
5667 \begin_layout Plain Layout
5668 Preferences\SpecialChar \menuseparator
5669 File Handling\SpecialChar \menuseparator
5676 \begin_inset Flex CharStyle:Code
5679 \begin_layout Plain Layout
5680 latex -src-specials $$i
5686 If this doesn't work, check if your TeX engine needs different options
5687 (the syntax might differ in some distributions).
5690 \begin_layout Subsubsection*
5691 External Packages (PDFSync and scrltx)
5694 \begin_layout Standard
5703 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5705 In order to enable it, load the packages in the LyX preamble:
5708 \begin_layout Itemize
5709 \begin_inset Flex CharStyle:Code
5712 \begin_layout Plain Layout
5720 for reverse PDF search,
5723 \begin_layout Itemize
5725 \begin_inset Flex CharStyle:Code
5728 \begin_layout Plain Layout
5731 usepackage[active]{srcltx}
5736 for reverse DVI search.
5739 \begin_layout Standard
5740 If you want to be able to perform both DVI and PDF reverse searches, you
5741 can also insert in the preamble the following lines
5744 \begin_layout LyX-Code
5748 \begin_inset Newline newline
5754 \begin_inset Newline newline
5760 \begin_inset Newline newline
5766 \begin_inset Newline newline
5771 usepackage[active]{srcltx}
5772 \begin_inset Newline newline
5780 \begin_layout Standard
5781 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5782 right package will be used.
5785 \begin_layout Standard
5786 Note that PDFSync might affect the output layout of your document.
5787 It is therefore advised to disable PDFsync for final documents.
5790 \begin_layout Subsubsection*
5791 Built-in reverse search via SyncTeX (DVI and PDF)
5794 \begin_layout Standard
5796 \begin_inset Flex CharStyle:Code
5799 \begin_layout Plain Layout
5805 have built-in support for both PDF and DVI reverse search.
5810 facility is basically the result of the integration of the PDFSync package
5811 to the pdftex program and its merge with the
5816 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5818 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5819 already provide SyncTeX support.
5822 \begin_layout Standard
5823 To enable SyncTeX for DVI output, change the
5824 \begin_inset Flex CharStyle:MenuItem
5827 \begin_layout Plain Layout
5832 \begin_layout Plain Layout
5845 \begin_inset Flex CharStyle:MenuItem
5848 \begin_layout Plain Layout
5853 \begin_layout Plain Layout
5860 eX (plain) -> DraftDVI
5866 \begin_inset Flex CharStyle:MenuItem
5869 \begin_layout Plain Layout
5870 Preferences\SpecialChar \menuseparator
5871 File Handling\SpecialChar \menuseparator
5878 \begin_inset Flex CharStyle:Code
5881 \begin_layout Plain Layout
5882 latex -synctex=1 $$i
5887 , and for PDF output, change the
5888 \begin_inset Flex CharStyle:MenuItem
5891 \begin_layout Plain Layout
5896 \begin_layout Plain Layout
5903 eX (pdflatex) -> PDF (pdflatex)
5909 \begin_inset Flex CharStyle:Code
5912 \begin_layout Plain Layout
5913 pdflatex -synctex=1 $$i
5919 Check the documentation of your viewer whether the viewer needs to be configure
5920 d for the use with SyncTeX.
5924 \begin_layout Plain Layout
5926 \begin_inset Flex CharStyle:Code
5929 \begin_layout Plain Layout
5935 option enables gzip compression.
5936 If your viewer does not support it, you should instead use
5937 \begin_inset Flex CharStyle:Code
5940 \begin_layout Plain Layout
5954 \begin_layout Subsection
5955 Configuring and using specific viewers
5958 \begin_layout Subsubsection*
5959 Xdvi (all platforms)
5962 \begin_layout Standard
5964 \begin_inset Flex CharStyle:Code
5967 \begin_layout Plain Layout
5973 , you don't need to do anything else for performing a reverse DVI search,
5974 as LyX already provides the necessary hooks for automatically using the
5976 \begin_inset Flex CharStyle:Code
5979 \begin_layout Plain Layout
5986 Just setup your document as described above (reverse search is triggered
5987 by Ctrl-click or Alt-click on Mac OSX, respectively).
5990 \begin_layout Standard
5991 However, if for whatever reason you want to use the named pipe instead of
5992 the socket for communicating with LyX, simply change the DVI viewer in
5994 \begin_inset Flex CharStyle:MenuItem
5997 \begin_layout Plain Layout
5998 Preferences\SpecialChar \menuseparator
5999 File Handling\SpecialChar \menuseparator
6009 \begin_layout Plain Layout
6010 On Mac OSX you have to use
6011 \begin_inset Flex CharStyle:Code
6014 \begin_layout Plain Layout
6015 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6026 \begin_inset Flex CharStyle:Code
6029 \begin_layout Plain Layout
6030 xdvi -editor 'lyxeditor.sh %f %l'
6036 \begin_inset Flex CharStyle:Code
6039 \begin_layout Plain Layout
6045 is a suitable script.
6046 For example, a minimal shell script is the following one:
6049 \begin_layout LyX-Code
6051 \begin_inset Newline newline
6054 LYXPIPE="/path/to/lyxpipe"
6055 \begin_inset Newline newline
6058 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6059 \begin_inset Newline newline
6062 echo "$COMMAND" > "${LYXPIPE}".in || exit
6063 \begin_inset Newline newline
6066 read < "${LYXPIPE}".out || exit
6069 \begin_layout Standard
6071 \begin_inset Flex CharStyle:Code
6074 \begin_layout Plain Layout
6084 \begin_layout Plain Layout
6091 XServer pipe path specified in
6092 \begin_inset Flex CharStyle:MenuItem
6095 \begin_layout Plain Layout
6096 Preferences\SpecialChar \menuseparator
6106 \begin_layout Plain Layout
6108 \begin_inset Flex CharStyle:Code
6111 \begin_layout Plain Layout
6117 folder of a source distribution you can find a
6118 \begin_inset Flex CharStyle:Code
6121 \begin_layout Plain Layout
6127 script which is able to locate the
6131 based on your preferences.
6139 \begin_layout Subsubsection*
6143 \begin_layout Standard
6145 \begin_inset Flex CharStyle:Code
6148 \begin_layout Plain Layout
6149 /Applications/MacDviX_Folder/calleditor.script
6154 , add the following lines:
6157 \begin_layout LyX-Code
6162 \begin_layout Plain Layout
6169 X.app/Contents/MacOS/lyxeditor "$2" $1
6170 \begin_inset Newline newline
6176 \begin_layout Standard
6177 Modify the lines accordingly if you install LyX somewhere else than in the
6178 Applications folder.
6181 \begin_layout Standard
6182 Reverse search is triggered by Alt-click (OPTION-click).
6185 \begin_layout Subsubsection*
6189 \begin_layout Standard
6191 \begin_inset Flex CharStyle:Code
6194 \begin_layout Plain Layout
6195 open -a Skim.app $$i
6200 to the viewer setting in
6201 \begin_inset Flex CharStyle:MenuItem
6204 \begin_layout Plain Layout
6205 Preferences\SpecialChar \menuseparator
6206 File Handling\SpecialChar \menuseparator
6207 File formats\SpecialChar \menuseparator
6214 \begin_inset Flex CharStyle:MenuItem
6217 \begin_layout Plain Layout
6218 Skim\SpecialChar \menuseparator
6219 Preferences\SpecialChar \menuseparator
6229 \begin_layout Plain Layout
6239 \begin_layout Standard
6240 Reverse search is triggered by COMMAND-SHIFT-click
6243 \begin_layout Subsubsection*
6247 \begin_layout Standard
6249 \begin_inset Flex CharStyle:MenuItem
6252 \begin_layout Plain Layout
6253 Settings\SpecialChar \menuseparator
6254 Configure Okular\SpecialChar \ldots{}
6255 \SpecialChar \menuseparator
6262 \begin_inset Quotes eld
6266 \begin_inset Quotes erd
6270 \begin_inset Flex CharStyle:Code
6273 \begin_layout Plain Layout
6282 \begin_layout Standard
6283 Reverse search is triggered by SHIFT-click.
6286 \begin_layout Subsubsection*
6290 \begin_layout Standard
6291 Launch yap, choose its
6292 \begin_inset Flex CharStyle:MenuItem
6295 \begin_layout Plain Layout
6296 View\SpecialChar \menuseparator
6303 \begin_inset Quotes eld
6307 \begin_inset Quotes erd
6312 \begin_inset Quotes eld
6315 New\SpecialChar \ldots{}
6317 \begin_inset Quotes erd
6320 button and, in the window that opens, enter
6321 \begin_inset Quotes eld
6325 \begin_inset Quotes erd
6328 (or any other name you like) in the
6329 \begin_inset Quotes eld
6333 \begin_inset Quotes erd
6337 Now click on the button labeled
6338 \begin_inset Quotes eld
6341 \SpecialChar \ldots{}
6343 \begin_inset Quotes erd
6346 to open a file dialog and navigate to the directory containing the batch
6348 \begin_inset Flex CharStyle:Code
6351 \begin_layout Plain Layout
6359 \begin_inset Flex CharStyle:Code
6362 \begin_layout Plain Layout
6368 and then specify the program arguments as
6369 \begin_inset Flex CharStyle:Code
6372 \begin_layout Plain Layout
6380 \begin_inset Flex CharStyle:Code
6383 \begin_layout Plain Layout
6389 wrapper is used for communicating with LyX through the
6396 \begin_layout LyX-Code
6398 \begin_inset Newline newline
6401 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6410 \begin_inset Newline newline
6424 \begin_layout Standard
6425 Make sure that the LyXServer pipe path you specified in LyX is
6426 \begin_inset Flex CharStyle:Code
6429 \begin_layout Plain Layout
6443 , otherwise change the
6444 \begin_inset Flex CharStyle:Code
6447 \begin_layout Plain Layout
6453 wrapper accordingly.
6456 \begin_layout Standard
6457 In yap, reverse search is triggered by double-click.
6460 \begin_layout Subsubsection*
6461 SumatraPDF (Windows)
6464 \begin_layout Standard
6465 In order to use SumatraPDF for inverse search, enter
6466 \begin_inset Flex CharStyle:Code
6469 \begin_layout Plain Layout
6470 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6475 in the viewer setting in
6476 \begin_inset Flex CharStyle:MenuItem
6479 \begin_layout Plain Layout
6480 Preferences\SpecialChar \menuseparator
6481 File Handling\SpecialChar \menuseparator
6482 File formats\SpecialChar \menuseparator
6489 \begin_inset Flex CharStyle:Code
6492 \begin_layout Plain Layout
6498 is the previous wrapper.
6499 If SumatraPDF.exe is not in your command PATH, use its full file name.
6502 \begin_layout Standard
6503 Reverse search is triggered by double-click.
6506 \begin_layout Subsubsection*
6510 \begin_layout Standard
6511 First of all, make sure that yap is your default DVI viewer in the Windows
6512 environment, then launch it, choose its
6513 \begin_inset Flex CharStyle:MenuItem
6516 \begin_layout Plain Layout
6517 View\SpecialChar \menuseparator
6524 \begin_inset Quotes eld
6528 \begin_inset Quotes erd
6533 \begin_inset Quotes eld
6536 New\SpecialChar \ldots{}
6538 \begin_inset Quotes erd
6541 button and, in the window that opens, enter
6542 \begin_inset Quotes eld
6546 \begin_inset Quotes erd
6549 (or any other name you like) in the
6550 \begin_inset Quotes eld
6554 \begin_inset Quotes erd
6558 Now click on the button labeled
6559 \begin_inset Quotes eld
6562 \SpecialChar \ldots{}
6564 \begin_inset Quotes erd
6567 to open a file dialog and navigate to the directory containing the
6568 \begin_inset Flex CharStyle:Code
6571 \begin_layout Plain Layout
6577 program (which is installed by default on Cygwin along with the LyX executable).
6579 \begin_inset Flex CharStyle:Code
6582 \begin_layout Plain Layout
6588 and then specify the program arguments as
6589 \begin_inset Flex CharStyle:Code
6592 \begin_layout Plain Layout
6599 In this way, you will be using the
6603 for communicating with LyX.
6604 If, for whatever reason, you want to use the
6609 \begin_inset Flex CharStyle:Code
6612 \begin_layout Plain Layout
6618 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6621 \begin_layout Standard
6622 In yap, reverse search is triggered by double-click.
6625 \begin_layout Subsubsection*
6629 \begin_layout Standard
6630 In order to use SumatraPDF for inverse search, enter
6631 \begin_inset Flex CharStyle:Code
6634 \begin_layout Plain Layout
6640 in the viewer setting in
6641 \begin_inset Flex CharStyle:MenuItem
6644 \begin_layout Plain Layout
6645 Preferences\SpecialChar \menuseparator
6646 File Handling\SpecialChar \menuseparator
6647 File formats\SpecialChar \menuseparator
6654 \begin_inset Flex CharStyle:Code
6657 \begin_layout Plain Layout
6663 is the following script (to be placed in your command PATH,
6664 \begin_inset Flex CharStyle:Code
6667 \begin_layout Plain Layout
6673 being the best choice):
6676 \begin_layout LyX-Code
6678 \begin_inset Newline newline
6682 \begin_inset Newline newline
6685 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6688 \begin_layout Standard
6689 This wrapper script is needed because SumatraPDF is a native Windows application
6690 and does not understand the posix paths used by the Cygwin version of LyX.
6691 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6694 \begin_inset Flex CharStyle:Code
6697 \begin_layout Plain Layout
6703 enables communication via the
6709 \begin_inset Flex CharStyle:Code
6712 \begin_layout Plain Layout
6718 option if you want to use the
6722 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6725 \begin_layout Standard
6726 Reverse search is triggered by double-click.
6727 \change_inserted 1 1271453423
6731 \begin_layout Section
6733 \change_inserted 1 1271453442
6737 \begin_layout Standard
6739 \change_inserted 1 1271454338
6740 To make forward search possible you need to provide generated output PDF/DVI
6741 file with additional information about TeX sources.
6742 This can be done via the methods described in the section
6743 \begin_inset CommandInset ref
6745 reference "sub:rev-search"
6752 \begin_layout Standard
6754 \change_inserted 1 1271454479
6755 Secondly you need to configure LyX for using your viewers in
6756 \begin_inset Flex CharStyle:MenuItem
6759 \begin_layout Plain Layout
6761 \change_inserted 1 1271453866
6762 Preferences\SpecialChar \menuseparator
6763 Output\SpecialChar \menuseparator
6770 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6775 \begin_layout Plain Layout
6777 \change_inserted 1 1271454273
6778 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6787 Some other viewers allow at least reloading and positioning to particular
6788 page of the file --- Evince or xpdf --- for these cases you can use external
6790 Please study the prepared examples in the Preferences dialog.
6795 \begin_layout Chapter
6796 Special Document Classes
6799 \begin_layout Section
6803 \begin_layout Standard
6809 \begin_layout Subsection
6813 \begin_layout Standard
6814 This section describes how LyX can be used to write articles for submission
6815 to the scientific journal
6817 Astronomy and Astrophysics
6819 (www.edpsciences.fr/aa/
6820 \begin_inset Flex URL
6823 \begin_layout Plain Layout
6825 http://www.edpsciences.fr/aa/
6830 ) using Version 5.01 of the document class
6835 This package can be downloaded from the ftp site
6838 \begin_layout Standard
6839 \begin_inset VSpace medskip
6845 \begin_layout Standard
6847 \begin_inset Flex URL
6850 \begin_layout Plain Layout
6852 ftp://ftp.edpsciences.org/pub/aa/readme.html
6860 \begin_layout Standard
6861 \begin_inset VSpace medskip
6867 \begin_layout Standard
6868 A manual comes together with that package, and this text is not meant to
6869 replace the original manual but merely a short guide how to realize the
6870 correct form of your paper.
6874 \begin_layout Standard
6875 Please note that the publisher of the journal was changed from Springer
6876 to EDP Sciences starting January 1, 2001.
6877 That change implicated also some slight changes of the style files, namely
6878 the removal of the thesaurus command.
6879 The LyX class aa supports the newest version of these style files, V 5.01.
6880 If you have an older version installed, please upgrade.
6881 For compatibility, the old (version 4) layout has been kept as
6886 Please refer to the comments in
6888 LyXDir/layouts/aapaper.layout
6893 \begin_layout Subsection
6897 \begin_layout Standard
6898 It is recommended you start from the example template distributed with LyX.
6899 If you are not using a template, note the following settings:
6902 \begin_layout Itemize
6909 Document\SpecialChar \menuseparator
6912 dialog (OK, that one was obvious).
6915 \begin_layout Itemize
6916 Don't change the option
6919 \begin_inset space ~
6929 The whole layout is done by the macros, you shouldn't change anything.
6932 \begin_layout Subsection
6936 \begin_layout Standard
6937 First thing to enter is the header information.
6938 It consists of seven entries, of which some are optional.
6942 \begin_layout Itemize
6950 \begin_layout Itemize
6958 \begin_layout Itemize
6966 \begin_layout Itemize
6974 \begin_layout Itemize
6979 : [optional] if more than one author: whom to contact for offprint requests.
6982 \begin_layout Itemize
6987 : [optional] mail address for contacts.
6990 \begin_layout Itemize
6998 Received: <date>; Accepted <date>
7001 \begin_layout Standard
7002 There is no need to issue the
7008 command, this is done automatically by LyX when the header is finished.
7009 Although the order of the single header entries doesn't matter it is advised
7010 to keep the above sequence, just to get the best optics and meets the layout
7011 of the real document.
7014 \begin_layout Standard
7015 If you want to place footnotes in the header block, e.
7016 \begin_inset space \thinspace{}
7020 \begin_inset space \space{}
7023 to state your present address, just use the standard footnote via the menu
7026 Insert\SpecialChar \menuseparator
7030 LyX will automagically use the term
7039 \begin_layout Standard
7040 In addition to these topics, the macros use three additional LaTeX commands
7041 that have no counterpart in LyX:
7044 \begin_layout Itemize
7051 to separate different names for more than one author and institute, respectivel
7055 \begin_layout Itemize
7062 to mark corresponding author/institute pairs.
7063 The institutes are numbered sequentially as they appear in the
7067 field, so you have to put a marker to each author.
7070 \begin_layout Itemize
7077 to supply an email address for fast contact.
7080 \begin_layout Standard
7081 In all cases, the appropriate command has to be entered in LyX and marked
7087 \begin_layout Subsection
7091 \begin_layout Standard
7092 The abstract should immediately follow the header block.
7093 With version 5 the abstract environment was changed to a command, and there
7094 is now a resctriction to only one paragraph.
7095 In addition, it should contain an entry with the keywords.
7096 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7103 by hand and mark it as LaTeX code.
7104 Refer to the example paper.
7107 \begin_layout Subsection
7108 Supported environments
7111 \begin_layout Standard
7112 The A&A paper layout supports the following environments for structuring
7116 \begin_layout Itemize
7122 \begin_layout Itemize
7128 \begin_layout Itemize
7134 \begin_layout Itemize
7140 \begin_layout Itemize
7146 \begin_layout Itemize
7152 \begin_layout Itemize
7158 \begin_layout Itemize
7164 \begin_layout Itemize
7170 \begin_layout Itemize
7176 \begin_layout Itemize
7182 \begin_layout Itemize
7188 \begin_layout Subsection
7189 Commands not supported by LyX
7192 \begin_layout Standard
7193 Some commands are not yet supported by the
7198 Some have already been mentioned.
7199 For the sake of completeness, they are listed all together here:
7202 \begin_layout Itemize
7210 \begin_layout Itemize
7218 \begin_layout Itemize
7226 \begin_layout Itemize
7234 \begin_layout Itemize
7242 \begin_layout Itemize
7250 \begin_layout Itemize
7258 \begin_layout Itemize
7266 \begin_layout Standard
7267 If you want to use any of these commands, you have to enter them yourself.
7270 Do not forget to mark them as LaTeX code!
7273 \begin_layout Subsection
7274 Figure and Table Floats
7277 \begin_layout Standard
7278 LyX provides support for the necessary float environments
7280 figure, figure*, table
7286 , therefore we won't tell much about it here.
7290 \begin_inset space ~
7296 Just remember that tables should be left-aligned.
7297 For that, select the table and change the alignment in
7299 Edit\SpecialChar \menuseparator
7301 \begin_inset space ~
7307 \begin_layout Standard
7308 There is only one special thing: the figures with caption besides the figure.
7309 To create such a figure, you have to do the following:
7312 \begin_layout Enumerate
7313 Create a wide figure float:
7315 Insert\SpecialChar \menuseparator
7316 Float\SpecialChar \menuseparator
7319 , then right click in the figure and select
7325 \begin_inset space ~
7333 \begin_layout Enumerate
7334 Enter your caption text.
7337 \begin_layout Enumerate
7342 to move the cursor above the caption.
7345 \begin_layout Enumerate
7349 \begin_layout Enumerate
7350 Position the cursor behind the figure and insert a horizontal fill:
7352 Insert\SpecialChar \menuseparator
7354 \begin_inset space ~
7357 Character\SpecialChar \menuseparator
7359 \begin_inset space ~
7367 \begin_layout Enumerate
7368 Switch to LaTeX mode:
7371 \begin_inset space ~
7379 \begin_layout Enumerate
7389 Do not close the brace!
7392 \begin_layout Enumerate
7393 Position the cursor behind the caption text, switch to LaTeX mode and insert
7397 \begin_inset space ~
7409 \begin_layout Standard
7410 Also, refer to the figures in the example paper.
7413 \begin_layout Subsection
7417 \begin_layout Standard
7418 For submission, the paper has to be formated in a special double-spacing
7420 For this purpose, you have to give the option
7424 to the documentclass.
7425 This must be done using the extra class options field in the
7427 Document\SpecialChar \menuseparator
7431 Just enter the string
7438 \begin_layout Subsection
7442 \begin_layout Standard
7447 directory contains an example paper written with LyX.
7448 It is the example paper from the original macro package, translated to
7450 Use it for inspiration, and compare the original LaTeX code with LyX way
7454 \begin_layout Section
7458 \begin_layout Standard
7464 \begin_layout Subsection
7468 \begin_layout Standard
7469 AASTeX is a set of macros produced by the American Astronomical Society
7470 to facilitate electronic manuscript submission to the three journals they
7471 publish: the Astrophysical Journal (including the Letters and Supplement),
7472 the Astronomical Journal, and the Publications of the Astronomical Society
7474 LyX has proven to be an excellent tool for generating these documents,
7475 especially given its equation, citation, and figure handling capabilities.
7476 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7477 is the version described here, or higher.
7478 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7479 incompatible with LyX.
7480 The AASTeX package may be downloaded from the AASTeX Web site
7483 \begin_layout Standard
7484 \begin_inset VSpace medskip
7490 \begin_layout Standard
7492 \begin_inset Flex URL
7495 \begin_layout Plain Layout
7497 http://www.journals.uchicago.edu/AAS/AASTeX
7505 \begin_layout Standard
7506 \begin_inset VSpace medskip
7512 \begin_layout Standard
7513 A complete user guide is contained in that package and you should familiarize
7514 yourself with it thoroughly before embarking on writing a paper in LyX.
7515 LyX will not reduce the need to figure out all the AASTeX commands, it
7516 will only reduce the drudgery of typing everything in.
7517 It is your responsibility to ensure that the final exported LaTeX document
7518 conforms completely to the requirements of the journal to which you are
7519 submitting your paper.
7522 \begin_layout Subsection
7523 Starting a New Paper
7526 \begin_layout Standard
7527 I strongly suggest that you start with the AASTeX template file.
7530 File\SpecialChar \menuseparator
7537 , enter the new file name, then choose the
7542 This will show the most common fields found in a manuscript.
7543 Simply overwrite the existing text (including the brackets,
7547 ) with the correct information.
7548 Many of the AASTeX commands and environments can be implemented directly
7549 in LyX, but some cannot: most noticeably
7561 , which should stick out like a sore thumb if you actually just opened the
7563 For commands such as these, the LaTeX code must be entered directly and
7565 Such commands are referred to as TeX code, or Evil Red Text.
7566 I tried to minimize the amount of TeX code needed in an AASTeX document,
7567 but there is still a bit more required than any of us would like.
7570 \begin_layout Subsection
7571 Finishing Your Paper
7574 \begin_layout Standard
7575 When the paper is finished to your satisfaction and previews/prints correctly,
7577 \begin_inset Quotes eld
7581 \begin_inset Quotes erd
7584 actions which need to be done before you submit it to the journals.
7588 \begin_layout Enumerate
7589 Export your paper as a LaTeX file (
7591 File\SpecialChar \menuseparator
7592 Export\SpecialChar \menuseparator
7599 \begin_layout Enumerate
7604 file with your favorite text editor
7608 \begin_layout Enumerate
7609 remove the comment lines before the
7618 \begin_layout Enumerate
7623 usepackage...{fontenc}
7625 line if it appears (usually just after
7640 \begin_layout Enumerate
7641 remove everything between (and including) the
7653 commands, except for any commands you specifically put into the LaTeX preamble
7654 (which should appear immediately after the
7655 \begin_inset Quotes eld
7658 User specified LaTeX commands
7659 \begin_inset Quotes erd
7670 \begin_layout Enumerate
7671 Run the resulting file through LaTeX to make sure it still processes correctly.
7674 \begin_layout Enumerate
7675 Reread the journal requirements to make sure your filenames and formats
7679 \begin_layout Enumerate
7683 \begin_layout Subsection
7684 Comments On Specific Commands
7687 \begin_layout Standard
7688 I will not describe the detailed usage of the individual AASTeX commands:
7689 the AASTeX User Guide (
7693 ) gives a good description of each.
7694 Thus it's probably easiest for me to go down the list as found in the guide
7695 and offer comments where necessary.
7696 So let's begin \SpecialChar \ldots{}
7700 \begin_layout Subsubsection
7701 Things that work as expected
7704 \begin_layout Standard
7708 \begin_layout Plain Layout
7720 \begin_layout Standard
7721 Because they work as you might expect, I simply list them and the section
7822 begin{thebibliography}
7830 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7831 graphicx figure commands (2.14.1),
7855 (2.15.4, amongst other places),
7882 \begin_layout Standard
7883 The following style options also work correctly:
7904 Simply put them in the
7910 Layout\SpecialChar \menuseparator
7916 \begin_layout Standard
7920 \begin_layout Plain Layout
7932 \begin_layout Subsubsection
7933 Things that work, but require more comment
7936 \begin_layout Standard
7937 The following items work, but require a little more discussion:
7940 \begin_layout Itemize
7941 These items are reserved for use by the journal editors, but you can put
7942 them into the LaTeX preamble if you feel compelled to do so:
7975 \begin_layout Itemize
7976 These items may be placed in the LaTeX preamble, and are included as blanks
7977 in the template file:
7998 \begin_layout Itemize
8005 (2.3) – can only be used
8006 \begin_inset Quotes eld
8010 \begin_inset Quotes erd
8013 , not in the middle of a paragraph.
8014 Use TeX code if you need to embed it.
8017 \begin_layout Itemize
8024 (2.3) – will have extra {} after it.
8025 This should not cause an error.
8028 \begin_layout Itemize
8035 (2.6) – can only be used
8036 \begin_inset Quotes eld
8040 \begin_inset Quotes erd
8043 , not in the middle of a paragraph.
8044 Use TeX code if you need to embed it.
8047 \begin_layout Itemize
8054 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8058 \begin_layout Itemize
8072 \begin_layout Itemize
8079 (2.9) – will have extra {} after it.
8080 This should not cause an error.
8083 \begin_layout Itemize
8090 (2.11) – will have extra {} after it.
8091 This should not cause an error.
8094 \begin_layout Itemize
8101 (2.14.2) – you can insert an optional filename argument by placing the cursor
8102 at the beginning of the text and selecting
8104 Insert\SpecialChar \menuseparator
8109 \begin_inset Quotes eld
8113 \begin_inset Quotes erd
8116 inserts an optional argument of the type needed by
8123 Hopefully it will be renamed someday.
8126 \begin_layout Itemize
8139 for the catalog ID optional parameter
8142 \begin_layout Itemize
8155 for the catalog ID optional parameter
8158 \begin_layout Subsubsection
8159 Things not implemented, use TeX code
8162 \begin_layout Standard
8166 \begin_layout Plain Layout
8178 \begin_layout Standard
8201 setcounter{equation}
8203 (2.12), Journal name abbreviations (2.13.4),
8239 (2.15.4, insert it as the first element in the lefthand cell after where
8241 Don't use any of LyX's rules in the table),
8253 (2.15.5), much of Misc (2.17, except
8304 \begin_layout Standard
8308 \begin_layout Plain Layout
8320 \begin_layout Subsubsection
8321 Things that cannot be implemented
8324 \begin_layout Standard
8325 \SpecialChar \ldots{}
8326 at least in any meaningful sort of way, so I suggest ignoring them.
8327 They are the references environment (2.13.3), and the deluxetable environment
8329 If you really, really need to use deluxetable, I suggest editing it in
8330 a separate file with a text editor, then using
8332 Insert\SpecialChar \menuseparator
8334 \begin_inset space ~
8339 to include it in your LyX document.
8344 file to see an example of this.
8347 \begin_layout Subsection
8348 FAQs, Tips, Tricks, and Other Ruminations
8351 \begin_layout Subsubsection
8352 Getting LyX and AASTeX to cooperate
8355 \begin_layout Standard
8356 It can be a bit tricky to get LyX to recognize a new layout and document
8358 When all else fails, do this:
8361 \begin_layout Enumerate
8362 Make certain that LaTeX can find AASTeX.
8363 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8364 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8371 \begin_layout Enumerate
8383 \begin_layout Enumerate
8386 Tools\SpecialChar \menuseparator
8389 in LyX, then restart LyX.
8392 \begin_layout Enumerate
8393 Open a regular new file, not from a template.
8394 Does AASTeX appear in the class list in
8396 Document\SpecialChar \menuseparator
8402 \begin_layout Standard
8403 If you get a warning from an existing AASTeX document about not being able
8404 to find the AASTeX layout or a message about
8405 \begin_inset Quotes eld
8408 You should not mix title layouts with normal ones
8409 \begin_inset Quotes erd
8412 , things haven't been installed correctly.
8415 \begin_layout Subsubsection
8416 LaTeX error processing a table
8419 \begin_layout Standard
8420 LyX, by default, attempts to center the table caption/title.
8421 This seems to produce a bad interaction in AASTeX so you should click somewhere
8422 in the caption/title, then select
8424 Edit\SpecialChar \menuseparator
8426 \begin_inset space ~
8440 This took care of it for me.
8443 \begin_layout Subsubsection
8447 \begin_layout Standard
8448 A couple of things: 1) I have noticed some funny spacing in the reference
8449 entries in the text.
8450 When you enter the bibliography item data, make sure their is
8454 space between the last author and the parenthesis setting off the year;
8458 \begin_inset space \thinspace{}
8462 \begin_inset space \space{}
8476 2) Entering the references at all is not obvious.
8477 The easiest thing is to start typing your first reference at the end of
8478 the document, then mark it as type
8483 That will put a small gray box in front of what you just typed.
8484 Click on the box to fill in the rest of the information.
8485 For new references, go to the end of an existing reference and press return.
8486 That will create a new line with its own box, etc.
8489 \begin_layout Subsubsection
8493 \begin_layout Standard
8494 Even though AASTeX provides its own figure commands (
8500 , for example), I much prefer LaTeX's standard figure commands (with the
8509 \begin_inset space ~
8512 commands as TeX code into a Figure Float box if you desire, but I never
8513 have much luck getting the layout right.
8514 With the standard graphics, LyX will insert a
8518 usepackage{graphicx}
8520 command into the LaTeX preamble and handle the figures in the standard
8521 LaTeX2e way, interspersing the figures in the text.
8522 I believe ApJ accepts figures exactly this way now; AJ might still use
8524 \begin_inset Quotes eld
8527 stack everything at the end
8528 \begin_inset Quotes erd
8534 \begin_layout Subsubsection
8535 Things I could have done, but didn't
8538 \begin_layout Standard
8540 \begin_inset Quotes eld
8544 \begin_inset Quotes erd
8547 things I could have implemented, but chose not to.
8548 For instance, I saw no point in double-spacing the text in the LyX window,
8549 even though it is double-spaced in the paper manuscript.
8550 Also, I chose not to make separate layouts for the preprint and preprint2
8552 Since I assume you will spend most of your time in the plain manuscript
8553 mode anyway, I decided not to chew up more disk space with this.
8557 \begin_layout Subsection
8561 \begin_layout Standard
8562 Your mileage may vary.
8563 I've now had papers published by both ApJ and AJ that have had 98% of the
8564 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8566 I have had no trouble with the submission process, and I'm sure the journals
8567 were never aware that there might be a difference.
8568 So, go forth and publish!
8571 \begin_layout Section
8575 \begin_layout Standard
8578 David Johnson; updated by Richard Heck
8581 \begin_layout Standard
8582 \begin_inset VSpace bigskip
8588 \begin_layout Standard
8590 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8591 papers to be submitted to American Mathematical Society publications.
8592 The layouts are not tailored to a specific journal, but easily can be.
8593 You should refer to the AMS documentation for specific instructions for
8594 each journal (usually it will entail only changing a single line in the
8596 That documentation is available on the Web at
8597 \begin_inset Flex URL
8600 \begin_layout Plain Layout
8608 \begin_inset Flex URL
8611 \begin_layout Plain Layout
8613 ftp://ftp.ams.org/pub/tex/amslatex/
8619 These layouts are appropriate, and useful, for any mathematical writing.
8623 \begin_layout Standard
8624 There are two basic AMS LaTeX layouts:
8627 \begin_layout Itemize
8628 amsart: The standard AMS article format.
8631 \begin_layout Itemize
8632 amsbook: the standard AMS book (really, monograph) format.
8636 \begin_layout Standard
8637 The layouts themselves contain only the minimum necessary to use the AMS
8639 They do not, in particular, contain any of the `theorem' environments used
8640 for setting theorems, lemmas, and the like.
8641 These are contained, instead, in the
8642 \begin_inset Flex CharStyle:Code
8645 \begin_layout Plain Layout
8651 module, which is loaded by default when when you select one of the AMS
8653 (It can also be used with other classes and can be removed, if you would
8654 rather use something else.) Less commonly used environments are in the
8655 \begin_inset Flex CharStyle:Code
8658 \begin_layout Plain Layout
8659 Theorems (AMS-Extended)
8664 module, which must be loaded manually.
8667 \begin_layout Standard
8668 By default, theorems and the like are numbered consecutively throughout
8669 the document, but this may be modified by loading the module
8670 \begin_inset Flex CharStyle:Code
8673 \begin_layout Plain Layout
8674 Theorems (Order by Section)
8679 or, if you are using
8680 \begin_inset Flex CharStyle:Code
8683 \begin_layout Plain Layout
8690 \begin_inset Flex CharStyle:Code
8693 \begin_layout Plain Layout
8694 Theorems (Order by Chapter)
8700 These will number the results as
8701 \begin_inset Formula $n.m$
8704 , where the first number refers to the section (or chapter) and the second
8705 refers to the total number of results so far in that section (or chapter).
8706 Many environments are also available unnumbered.
8707 These are indicated by an asterisk at the end.
8708 If you happen to want
8712 unnumbered results, the module
8713 \begin_inset Flex CharStyle:Code
8716 \begin_layout Plain Layout
8722 provides that option.
8725 \begin_layout Standard
8726 Note that these modules do not
8730 to be used with the AMS classes.
8731 It is perfectly possible to use the
8732 \begin_inset Flex CharStyle:Code
8735 \begin_layout Plain Layout
8741 module, and the others mentioned, with other classes, such as
8742 \begin_inset Flex CharStyle:Code
8745 \begin_layout Plain Layout
8752 \begin_inset Flex CharStyle:Code
8755 \begin_layout Plain Layout
8762 \begin_inset Flex CharStyle:Code
8765 \begin_layout Plain Layout
8774 \begin_layout Subsection
8775 What these layouts provide
8778 \begin_layout Standard
8779 There is a long list of included environments provided by these layouts.
8780 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8781 variety of `theorem' environments.
8782 However, the AMS recommends the environments that are available in LyX.
8786 \begin_layout Standard
8787 The following environments—as well as the standard environments, such as
8789 \begin_inset Flex CharStyle:Noun
8792 \begin_layout Plain Layout
8799 \begin_inset Flex CharStyle:Noun
8802 \begin_layout Plain Layout
8809 \begin_inset Flex CharStyle:Noun
8812 \begin_layout Plain Layout
8819 \begin_inset Flex CharStyle:Noun
8822 \begin_layout Plain Layout
8829 \begin_inset Flex CharStyle:Noun
8832 \begin_layout Plain Layout
8839 \begin_inset Flex CharStyle:Code
8842 \begin_layout Plain Layout
8849 \begin_inset Flex CharStyle:Code
8852 \begin_layout Plain Layout
8861 \begin_layout Description
8862 Address This should be the author's permanent address.
8865 \begin_layout Description
8867 \begin_inset space ~
8870 Address This should be the author's temporary address at the time of submission,
8871 if different from the Address.
8874 \begin_layout Description
8875 Email Author's e-mail address
8878 \begin_layout Description
8879 URL Author's Web address, if desired.
8882 \begin_layout Description
8883 Keywords Key words or phrases used to identify specific topics discussed
8887 \begin_layout Description
8888 Subjectclass These refer to the AMS Subject Classifications, published and
8891 Mathematical Reviews
8894 These are also available online at the AMS cites listed above.
8897 \begin_layout Description
8901 \begin_layout Description
8905 \begin_layout Description
8909 \begin_layout Standard
8910 The following environments are provided by both the
8911 \begin_inset Flex CharStyle:Code
8914 \begin_layout Plain Layout
8921 \begin_inset Flex CharStyle:Code
8924 \begin_layout Plain Layout
8930 modules, in the latter case in both starred (unnumbered) and unstarred
8931 (numbered) versions.
8932 These same environments are provided only in the starred versions by the
8934 \begin_inset Flex CharStyle:Code
8937 \begin_layout Plain Layout
8946 \begin_layout Theorem
8947 This is typically used for the statements of major results.
8951 \begin_layout Corollary*
8952 This is used for statements which follow fairly directly from previous statement
8954 Again, these can be major results.
8959 These are smaller results needed to prove other statements.
8962 \begin_layout Proposition
8963 These are less major results which (hopefully) add to the general theory
8967 \begin_layout Conjecture
8968 These are statements provided without justification, which the author does
8969 not know how to prove, but which seem to be true (to the author, at least).
8972 \begin_layout Definition*
8973 Guess what this is for.
8974 The font is different for this environment than for the previous ones.
8978 \begin_layout Example*
8979 Used for examples illustrating proven results.
8982 \begin_layout Problem
8983 It's not really known what this is for.
8984 You should figure it out.
8987 \begin_layout Exercise*
8988 Write a description for this one.
8991 \begin_layout Remark
8992 This environment is also a type of theorem, usually a lesser sort of observation.
8995 \begin_layout Claim*
8996 Often used in the course of giving a proof of a larger result.
9000 Generally, these are used to break up long arguments, using specific instances
9006 The numbering scheme for cases is on its own, not together with other numbered
9012 At the end of this environment, a QED symbol (usually a square, but it can
9013 vary with different styles) is placed.
9014 If you want to have other environments within this one—for example, Case
9015 environments—and have the QED symbol appear only after them, then the other
9016 environments need to be nested within the proof environment.
9019 Nesting Environments
9025 for information on nesting.
9028 \begin_layout Standard
9029 And these environments are provided by
9030 \begin_inset Flex CharStyle:Code
9033 \begin_layout Plain Layout
9034 Theorems (AMS-Extended)
9042 \begin_layout Criterion*
9043 A required condition.
9046 \begin_layout Algorithm*
9047 A general procedure to be used.
9050 \begin_layout Axiom*
9051 This is a property or statement taken as true within the system being discussed.
9054 \begin_layout Condition*
9055 Sometimes used to state a condition assumed within the present context of
9060 Similar to a Remark.
9063 \begin_layout Notation*
9064 Used for the explanation of, yes, notation.
9067 \begin_layout Summary
9068 Do we really need to tell you?
9071 \begin_layout Acknowledgement*
9075 \begin_layout Conclusion*
9076 Sometimes used at the end of a long train of argument.
9080 Used in a way similar to Proposition, though perhaps lower on the scale.
9083 \begin_layout Standard
9084 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9086 They need to be available on your system in order to use these environments.
9089 \begin_layout Section
9097 \begin_layout Standard
9103 \begin_layout Subsection
9107 \begin_layout Standard
9108 These are the layout files for some of the journals of the American Geophysical
9110 It is assumed that you have both the AGU's own class files and AGUplus
9111 installed (everything to be found at
9112 \begin_inset Flex URL
9115 \begin_layout Plain Layout
9117 ftp://ftp.agu.org/journals/latex/journals
9125 \begin_layout Subsection
9129 \begin_layout Standard
9139 They are still called this in the LyX GUI, though their LaTeX equivalents
9140 in the AGU classes are
9151 \begin_layout Standard
9152 Newly defined styles are
9189 These are mostly manuscript attributes and defined in the AGU class documentati
9193 \begin_layout Standard
9194 I suspect this is still badly incomplete.
9197 \begin_layout Subsection
9201 \begin_layout Standard
9218 \begin_layout Subsection
9222 \begin_layout Itemize
9225 Journal of Geophysical Research
9234 \begin_layout Standard
9235 Add your own, it isn't so hard! Look at the
9246 \begin_layout Subsection
9247 Bugs and things to remember
9250 \begin_layout Standard
9251 In order to use the new layouts, you must remember to do the following for
9255 \begin_layout Enumerate
9261 This can be done in the
9263 Layout\SpecialChar \menuseparator
9268 Document\SpecialChar \menuseparator
9272 (AGU articles are always in English, right? So
9279 \begin_layout Enumerate
9289 (Yes, this is a bug.)
9292 \begin_layout Enumerate
9293 Make sure you use the
9297 bibliography style, by entering
9301 into the second field of the BibTeX inset.
9302 None of the standard styles will do.
9305 \begin_layout Section
9309 \begin_layout Standard
9315 \begin_layout Subsection
9319 \begin_layout Standard
9320 Broadway is for writing plays.
9321 The format is more decorative than Hollywood, and much less standardized.
9322 This format should be suitable for workshops.
9325 \begin_layout Subsection
9329 \begin_layout Standard
9330 The same as in Hollywood.
9333 \begin_layout Subsection
9337 \begin_layout Standard
9342 names as labels then cross-reference the label to insert the name.
9343 The cross-reference dialog will show the current cast of characters.
9346 \begin_layout Subsection
9347 Paper size and Margins
9350 \begin_layout Standard
9351 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9354 \begin_layout Subsection
9358 \begin_layout Standard
9359 The following environments are available.
9360 You can use broadway.bind to get the bind keys shown at the right.
9363 \begin_layout Itemize
9367 \begin_inset Newline newline
9372 You should not have to use this, but it is here for anything that does not
9376 \begin_layout Itemize
9380 \begin_inset space \hfill{}
9384 \begin_inset Newline newline
9389 Used to describe stage setting and the action.
9390 First use of speaker names in all CAPs.
9393 \begin_layout Itemize
9397 \begin_inset space \hfill{}
9401 \begin_inset Newline newline
9406 Automatically numbered.
9407 On screen it will be arabic, but will print as Roman.
9410 \begin_layout Itemize
9414 \begin_inset space \hfill{}
9418 \begin_inset Newline newline
9428 It is just centered text.
9431 \begin_layout Itemize
9435 \begin_inset space \hfill{}
9439 \begin_inset Newline newline
9444 Not automatically numbered.
9445 You supply the number.
9446 This is because I couldn't figure out how.
9449 \begin_layout Itemize
9453 \begin_inset space \hfill{}
9457 \begin_inset Newline newline
9462 A special case of Narrative to describe the setting and action as the curtain
9466 \begin_layout Itemize
9470 \begin_inset space \hfill{}
9474 \begin_inset Newline newline
9479 The speaker's (actor's) title, centered in all CAPS.
9482 \begin_layout Itemize
9486 \begin_inset space \hfill{}
9490 \begin_inset Newline newline
9495 Instructions to the speaker.
9496 The parentheses are automatically inserted.
9497 The ( will appear on screen, but both will be in the printed play.
9498 This environment is only used within
9505 \begin_layout Itemize
9509 \begin_inset space \hfill{}
9513 \begin_inset Newline newline
9518 What the Speaker says.
9521 \begin_layout Itemize
9525 \begin_inset space \hfill{}
9529 \begin_inset Newline newline
9534 The curtain comes down.
9537 \begin_layout Itemize
9541 \begin_inset space \hfill{}
9547 \begin_layout Itemize
9551 \begin_inset space \hfill{}
9557 \begin_layout Itemize
9561 \begin_inset space \hfill{}
9567 \begin_layout Standard
9571 \begin_layout Section
9575 \begin_layout Standard
9580 can be used to type letters according to German conventions.
9581 A template file is included in
9583 .../lyx/share/templates
9585 for you to use as a starting point.
9588 \begin_layout Section
9596 \begin_layout Standard
9602 \begin_layout Subsection
9606 \begin_layout Standard
9607 This is the layout file for the European Geophysical Society journals.
9612 can be downloaded from the web site of the EGS under
9613 \begin_inset Flex URL
9616 \begin_layout Plain Layout
9626 \begin_layout Subsection
9630 \begin_layout Standard
9633 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9641 The current layout file is unfortunately very unmodular and would benefit
9642 from using the various
9649 \begin_layout Section
9653 \begin_layout Standard
9659 \begin_layout Standard
9660 Elsevier Science Publishers B.V.
9661 provides a standard LaTeX document class (
9665 ) for submitting articles to their various journals.
9666 The style file can be downloaded directly from their web site:
9667 \begin_inset Flex URL
9670 \begin_layout Plain Layout
9672 http://authors.elsevier.com/
9678 Instructions are supplied along with the class file, which details the
9679 requirements of the publishers.
9680 LyX includes package that allows for the use of this class, by a layout
9681 and a template file.
9682 Installation of the class file is the same as for any other LaTeX package;
9683 instructions are provided in the Elsevier documentation.
9686 \begin_layout Standard
9696 As the Elsevier class file is based mainly on the standard article class,
9697 most of the normal functionality is provided.
9698 The Elsevier class defines a number of mathematical environments, which
9699 are similar to the AMS environments.
9700 These commands are all described in the Elsevier documentation, and are
9704 \begin_layout Standard
9705 The easiest way to use the Elsevier style is to base documents on the included
9707 It is best not to use options such as fancy headings or the geometry package,
9708 as elements such as these are defined by Elsevier in their style file.
9709 Ideally, no extra packages except those mentioned in the Elsevier documentation
9711 Essentially, Elsevier require as
9712 \begin_inset Quotes eld
9716 \begin_inset Quotes erd
9719 a LaTeX file as possible, as their intention is to take the supplied file
9720 and replace the class file with one for the particular journal to which
9721 the paper has been submitted.
9722 This also means that not too much time should be spent on the formating
9724 When it comes to be published, this will change anyway.
9725 The rest of the usage for this layout is substantially the same as for
9726 the normal article class.
9727 For details of what Elsevier do and don't allow, refer to their documentation.
9730 \begin_layout Section
9736 \begin_inset CommandInset label
9745 \begin_layout Standard
9751 \begin_layout Subsection
9755 \begin_layout Standard
9756 This section describes how to use LyX to make slides for overhead projectors.
9757 There are two document classes that can do this: the default slides class
9763 This section documents the latter.
9766 \begin_layout Standard
9767 I'm going to say this again, nice and clear, so that there's no misunderstanding
9771 \begin_layout Standard
9772 \begin_inset VSpace bigskip
9778 \begin_layout Standard
9782 This section documents the class
9783 \begin_inset Quotes eld
9791 \begin_inset Quotes erd
9799 \begin_layout Standard
9800 \begin_inset VSpace bigskip
9806 \begin_layout Standard
9807 If you're looking for the documentation for
9808 \begin_inset Quotes eld
9816 \begin_inset Quotes erd
9820 \begin_inset space ~
9824 \begin_inset CommandInset ref
9826 reference "sec:slitex"
9831 If your machine doesn't have the
9836 \begin_inset Quotes eld
9844 \begin_inset Quotes erd
9847 ] installed, you'll probably have to use the default
9851 class, which isn't quite as good as
9856 \begin_layout Standard
9861 class is designed for use with version 2.1 of the
9865 LaTeX class file which is now an integral part of LaTeX2e.
9868 \begin_layout Subsection
9872 \begin_layout Standard
9873 Obviously, to use this document class, you need to select
9874 \begin_inset Quotes eld
9882 \begin_inset Quotes erd
9892 \begin_inset space ~
9898 There are some settings in the
9901 \begin_inset space ~
9906 dialog that you should know about that are specific to this class:
9909 \begin_layout Itemize
9910 Don't change the options
9921 \begin_inset space ~
9927 They're ignored by the
9934 \begin_layout Itemize
9935 The default font size is 20
9936 \begin_inset space \thinspace{}
9939 pt with the other options being 17
9940 \begin_inset space \thinspace{}
9944 \begin_inset space \thinspace{}
9948 \begin_inset space \thinspace{}
9954 \begin_layout Itemize
9963 but all math equations are still typeset in the usual roman font.
9966 \begin_layout Itemize
9971 supports A4 and Letter paper sizes as well as a special size for working
9973 \begin_inset space \thinspace{}
9977 It doesn't support A5, B5, legal or executive paper sizes.
9980 \begin_layout Itemize
9981 Don't bother changing the
9985 settings because they are ignored anyway.
9986 All floats appear where they are defined in the text.
9989 \begin_layout Itemize
9994 setting behaves a bit differently for this class.
9999 provides extensive footer and header capabilities including a user-defined
10002 \begin_inset space ~
10006 \begin_inset CommandInset ref
10008 reference "sec:foilfoot"
10013 The title page is treated differently to all other pages in the document
10022 has the logo centered at the bottom of the page (if one is defined).
10023 The possible page style choices and what they do are as follows:
10027 \begin_layout Labeling
10028 \labelwidthstring MMMMMMM
10035 The final output contains no page numbers, or other headers or footers
10036 (except footnotes of course).
10040 \begin_layout Labeling
10041 \labelwidthstring MMMMMMM
10048 The final output contains page numbers centered at the bottom of the page.
10049 No other headings or footers (other than footnotes).
10052 \begin_layout Labeling
10053 \labelwidthstring MMMMMMM
10058 Page numbers in lower right corner.
10059 Additional headers and footers are also shown.
10060 This is also the default.
10063 \begin_layout Labeling
10064 \labelwidthstring MMMMMMM
10069 Gives you access to the
10073 package although its use with
10077 is discouraged by the writer of the
10081 package because of some potential page layout clashes.
10085 \begin_layout Subsubsection
10089 \begin_layout Standard
10090 The following options may be used in the extra class options in the
10092 Document\SpecialChar \menuseparator
10098 \begin_layout Labeling
10099 \labelwidthstring MMMMMMx
10104 This sets up the page layout for 7.33
10105 \begin_inset space \thinspace{}
10109 \begin_inset space \thinspace{}
10112 in paper, which is about the same aspect ratio as a 35
10113 \begin_inset space \thinspace{}
10116 mm slide, making it a bit easier to work with this medium.
10119 \begin_layout Labeling
10120 \labelwidthstring MMMMMMx
10125 Places a rule across the page below the header on every page except the
10129 \begin_layout Labeling
10130 \labelwidthstring MMMMMMx
10135 Places a rule across the page above the footer on every page except the
10139 \begin_layout Labeling
10140 \labelwidthstring MMMMMMx
10145 This is automatically set each time you create a new
10154 to use the dvips driver to rotate those pages that are set as landscape
10158 \begin_layout Labeling
10159 \labelwidthstring MMMMMMx
10164 Simply changes the page dimensions to those of a landscape page but doesn't
10166 Thus if you use this option you need to use an external program to rotate
10167 each page or feed your paper through your printer as landscape.
10168 Note that this option effectively reverses the roles of the
10176 environments (don't worry these are described in the next section).
10179 \begin_layout Labeling
10180 \labelwidthstring MMMMMMx
10185 Equation numbers on the left.
10188 \begin_layout Labeling
10189 \labelwidthstring MMMMMMx
10194 Flush-left equations.
10197 \begin_layout Subsection
10198 Supported Environments
10201 \begin_layout Standard
10202 Most of the environments commonly supported in other classes are also supported
10208 There are several additional environments provided by
10212 as well as a couple added by LyX.
10213 The following environments are shared with other classes:
10216 \begin_layout Standard
10220 \begin_layout Plain Layout
10224 begin{multicols}{2}
10232 \begin_layout Itemize
10238 \begin_layout Itemize
10244 \begin_layout Itemize
10250 \begin_layout Itemize
10256 \begin_layout Itemize
10262 \begin_layout Itemize
10268 \begin_layout Itemize
10274 \begin_layout Itemize
10280 \begin_layout Itemize
10286 \begin_layout Itemize
10292 \begin_layout Itemize
10298 \begin_layout Itemize
10304 \begin_layout Itemize
10310 \begin_layout Itemize
10316 \begin_layout Itemize
10322 \begin_layout Itemize
10328 \begin_layout Itemize
10334 \begin_layout Itemize
10340 \begin_layout Standard
10344 \begin_layout Plain Layout
10356 \begin_layout Standard
10357 That is, all the major environments apart from the sectioning environments.
10358 Since foils are essentially self-contained sections, with a title and body,
10363 provides specific commands for starting new foils and these are:
10366 \begin_layout Itemize
10372 \begin_layout Itemize
10378 \begin_layout Standard
10379 LyX also provides slightly modified versions of these two environments called:
10382 \begin_layout Itemize
10388 \begin_layout Itemize
10391 ShortRotatefoilhead
10394 \begin_layout Standard
10395 and the differences will be explained in the next section.
10398 \begin_layout Standard
10399 Since foils are often used in presenting ideas or new theorems and such
10404 also provides a comprehensive box of goodies for presenting them:
10407 \begin_layout Standard
10411 \begin_layout Plain Layout
10415 begin{multicols}{2}
10423 \begin_layout Itemize
10429 \begin_layout Itemize
10435 \begin_layout Itemize
10441 \begin_layout Itemize
10447 \begin_layout Itemize
10453 \begin_layout Itemize
10459 \begin_layout Itemize
10465 \begin_layout Itemize
10471 \begin_layout Itemize
10477 \begin_layout Itemize
10483 \begin_layout Itemize
10489 \begin_layout Standard
10493 \begin_layout Plain Layout
10505 \begin_layout Standard
10506 The starred versions are unnumbered while the unstarred versions are numbered.
10507 There are also two list environments added by LyX and these are:
10510 \begin_layout Itemize
10516 \begin_layout Itemize
10522 \begin_layout Standard
10527 provides some powerful header and footer capabilities that are best set
10528 in the preamble although they may be set at any point in a document.
10529 If you want to change these settings in your document the best place to
10530 do so is at the very top of a foil, i.
10531 \begin_inset space \thinspace{}
10537 \begin_inset space \space{}
10542 straight after the foilhead.
10545 \begin_layout Standard
10546 For this purpose, the following command styles are provided [
10553 \begin_layout Standard
10557 \begin_layout Plain Layout
10561 begin{multicols}{2}
10569 \begin_layout Itemize
10573 \begin_inset space ~
10579 \begin_layout Itemize
10585 \begin_layout Itemize
10589 \begin_inset space ~
10595 \begin_layout Itemize
10599 \begin_inset space ~
10605 \begin_layout Itemize
10609 \begin_inset space ~
10616 \begin_layout Standard
10617 \begin_inset space ~
10624 \begin_layout Standard
10628 \begin_layout Plain Layout
10640 \begin_layout Standard
10641 There are also a few commands provided by
10645 that aren't directly supported by LyX but I'll tell you what they do and
10646 how to use them in section
10647 \begin_inset space ~
10651 \begin_inset CommandInset ref
10653 reference "sec:unsuppfoils"
10660 \begin_layout Subsection
10661 Building a Set of Foils
10664 \begin_layout Standard
10665 This section will give a simple introduction to using the different environments
10666 to build a set of foils.
10667 If you want to see an example set of foils, take a look at the
10671 file you find in LyX's
10678 \begin_layout Subsubsection
10679 Give It a Title Page
10682 \begin_layout Standard
10683 Unlike other classes that provide
10703 creates the title on a page of its own.
10704 If you leave out the
10708 environment LaTeX will substitute the current date (every time you regenerate
10712 \begin_layout Subsubsection
10716 \begin_layout Standard
10717 As I mentioned earlier, there are four ways of starting a new foil.
10718 For portrait foils you should use
10727 The difference between these two environments is the amount of space between
10728 the title of the foil (the foilhead) and the body of the foil.
10731 \begin_layout Standard
10732 Landscape foils are generated using the
10738 ShortRotatefoilhead
10741 Again the only difference is the spacing between foilhead and body.
10742 Both of the short versions have 0.5 inches less separation between the foilhead
10747 \begin_layout Standard
10748 One problem with the support for landscape foils is the requirement that
10749 you have to use the
10753 driver to generate the PostScript output otherwise the foils won't be rotated.
10754 It is possible to get landscape foils even if you haven't got the
10758 driver provided you can feed your foils sideways through your printer ;-)
10761 \begin_layout Subsubsection
10762 Theorems, Lemmas, Proofs and more
10765 \begin_layout Standard
10766 Due to a small bug in LyX you can't have two of the same type of these environme
10767 nts directly following each other.
10768 They must be separated by something.
10769 If you try, you will just be extending the previous environment as if you
10770 had merged the two environments together.
10771 So, how do you get around this problem? The simplest option is to insert
10772 some text between the two environments or add a
10776 environment between the two with just a
10777 \begin_inset Quotes eld
10785 \begin_inset Quotes erd
10789 This will force LyX to produce two separate environments and hence the
10790 correct LaTeX output.
10791 An example is provided in the example file included with the LyX distribution.
10792 Remember, this problem only occurs if you are trying to place two of the
10793 same type of theorem-like environments one directly after the other.
10796 \begin_layout Subsubsection
10800 \begin_layout Standard
10801 You get all the commonly supported list styles found in other classes as
10802 well as two new ones.
10803 I'll only describe the new ones here.
10804 If you want to find out more about the other list environments check out
10810 If you intend to use itemized lists you might also want to read about the
10814 \begin_inset space ~
10818 \begin_inset space ~
10823 dialog described above in section
10824 \begin_inset space ~
10828 \begin_inset CommandInset ref
10830 reference "sec:bullet"
10837 \begin_layout Standard
10838 The two new list styles,
10846 , are designed to make it easier for you to create lists of do's and don'ts
10847 or right and wrong by providing dedicated environments that use a tick
10848 or a cross as the label of the list.
10849 These lists are in fact dedicated variants of the
10854 They do however require that you have the
10858 packages installed.
10861 \begin_layout Subsubsection
10865 \begin_layout Standard
10870 redefines the floating tables and figures so that they appear exactly where
10871 they are in the text rather than pushing them to the top of the page or
10872 to some user specified location.
10873 In fact if you change the float placement settings they are simply ignored.
10876 \begin_layout Subsubsection
10877 Page Headers and Footers
10878 \begin_inset CommandInset label
10880 name "sec:foilfoot"
10887 \begin_layout Standard
10891 \begin_inset space ~
10900 are two commands used to control the left-footer text string.
10901 The first is meant to allow you to include a graphic logo on your foils
10903 \begin_inset Quotes eld
10911 \begin_inset Quotes erd
10915 While the second is meant to provide a classification for the audience,
10919 \begin_inset space \thinspace{}
10925 \begin_inset space \space{}
10929 It is empty by default.
10932 \begin_layout Standard
10933 The remaining page corners can be filled by
10936 \begin_inset space ~
10941 (which defaults to page numbers),
10944 \begin_inset space ~
10952 \begin_inset space ~
10960 \begin_layout Subsection
10966 \begin_inset CommandInset label
10968 name "sec:unsuppfoils"
10975 \begin_layout Standard
10976 All the commands mentioned below need to be set in a
10984 within another environment.
10987 \begin_layout Subsubsection
10991 \begin_layout Standard
10992 All lengths are adjusted using the
11015 should be replaced by the name given to the length you want to change and
11020 is the length value.
11021 All lengths should be specified in units of length such as inches (
11033 ) or relative to some document or font-based length such as
11043 \begin_layout Standard
11044 It's possible to change the spacing between a foilhead and the body of the
11045 foil by adjusting the length specified by
11052 For example, to make
11057 \begin_inset space \space{}
11060 in closer to their bodies put the following in the preamble:
11066 foilheadskip}{-0.5in}
11069 \begin_layout Standard
11070 The spacings around floats can be adjusted by setting these lengths:
11073 \begin_layout Labeling
11074 \labelwidthstring MMMMMMMMMMM
11081 Separation between the text and the top of the float
11084 \begin_layout Labeling
11085 \labelwidthstring MMMMMMMMMMM
11092 Separation between the float and the caption
11095 \begin_layout Labeling
11096 \labelwidthstring MMMMMMMMMMM
11103 Separation between the caption and the following text
11106 \begin_layout Labeling
11107 \labelwidthstring MMMMMMMMMMM
11114 You can make the captions narrower than the surrounding text by adjusting
11116 Best done relative to
11125 \begin_layout Standard
11126 There are also several title page related lengths that you may find useful
11127 if you have a long title or several authors:
11130 \begin_layout Labeling
11131 \labelwidthstring MMMMMMMMMMM
11138 Separation from headers to
11143 \begin_layout Labeling
11144 \labelwidthstring MMMMMMMMMMM
11162 \begin_layout Labeling
11163 \labelwidthstring MMMMMMMMMMM
11177 \begin_layout Labeling
11178 \labelwidthstring MMMMMMMMMMM
11194 \begin_layout Labeling
11195 \labelwidthstring MMMMMMMMMMM
11211 \begin_layout Standard
11212 The last length related command affects all the list environments.
11223 a list environment then all the vertical spacing between the list items
11225 Note that this is a command not a length so it doesn't require
11231 like the stuff mentioned above.
11234 \begin_layout Subsubsection
11235 Headers and Footers
11238 \begin_layout Standard
11251 commands control whether the logo in the
11255 definition appear on a given page.
11262 in the preamble then none of the foils will have the logo on them.
11263 If you don't want the logo on a particular page place the
11269 directly after the foilhead of that page and the
11275 directly after the next foilhead.
11278 \begin_layout Standard
11279 If you decide to use the
11283 page style setting in the
11286 \begin_inset space ~
11291 dialog you should probably add
11301 to your preamble so headers and footers on landscape pages are correctly
11302 placed when rotated.
11303 This is due to some clashes between the page layouts provided by the
11314 \begin_layout Section
11315 Hollywood (Hollywood spec scripts)
11318 \begin_layout Standard
11324 \begin_layout Subsection
11328 \begin_layout Standard
11329 Getting the format of a Hollywood script right is a
11330 \begin_inset Quotes eld
11334 \begin_inset Quotes erd
11337 It is designed to make the readers focus on content and to be easy and
11338 familiar for the actors to read.
11339 Each page of a script should be one minute of film.
11340 Nothing goes in a script that you cannot see or hear on screen.
11341 The courier 12 pt font should be used throughout.
11345 \begin_layout Subsection
11349 \begin_layout Standard
11350 Speakers' lines should NEVER break in mid-sentence.
11351 If a speaker's lines continue over a page break, repeat the
11355 title followed by (Cont'd).
11358 \begin_layout Subsection
11362 \begin_layout Standard
11367 names as labels then cross-reference the label to insert the name.
11368 The cross-reference dialog will show the current cast of characters.
11369 You can use this to insert the speaker name in narratives also.
11372 \begin_layout Subsection
11373 Paper size and Margins
11376 \begin_layout Standard
11377 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11380 \begin_layout Subsection
11384 \begin_layout Standard
11385 The following environments are available.
11386 You can use hollywood.bind to get the bind keys shown at the right.
11389 \begin_layout Itemize
11393 \begin_inset Newline newline
11398 Used where nothing else works.
11402 \begin_layout Itemize
11408 \begin_inset space \hfill{}
11416 \begin_inset Newline newline
11419 Usually followed by something like
11420 \begin_inset Quotes eld
11423 on Sally waking up.
11424 \begin_inset Quotes erd
11430 \begin_layout Itemize
11434 \begin_inset space \hfill{}
11438 \begin_inset Newline newline
11443 Introduces a new INTERIOR camera set-up.
11444 Always followed by DAY or NIGHT, or something similar to define the lighting
11446 Everthing on this line in CAPS.
11449 \begin_layout Itemize
11453 \begin_inset space \hfill{}
11457 \begin_inset Newline newline
11462 Introduces a new EXTERIOR camera set-up.
11463 Everthing on this line in CAPS.
11466 \begin_layout Itemize
11470 \begin_inset space \hfill{}
11474 \begin_inset Newline newline
11479 The character speaking.
11482 \begin_layout Itemize
11486 \begin_inset space \hfill{}
11490 \begin_inset Newline newline
11495 Instructions to the speaker.
11496 The () are automatically inserted, but only the ( will show in LyX.
11497 Both will be printed.
11500 \begin_layout Itemize
11504 \begin_inset space \hfill{}
11508 \begin_inset Newline newline
11520 \begin_layout Itemize
11524 \begin_inset space \hfill{}
11528 \begin_inset Newline newline
11533 Camera movement instruction.
11535 \begin_inset space \thinspace{}
11539 \begin_inset space \space{}
11545 \begin_layout Itemize
11549 \begin_inset space \hfill{}
11555 \begin_layout Itemize
11559 \begin_inset space \hfill{}
11565 \begin_layout Itemize
11569 \begin_inset space \hfill{}
11575 \begin_layout Itemize
11579 \begin_inset space \hfill{}
11585 \begin_layout Subsection
11589 \begin_layout Itemize
11593 \begin_layout Itemize
11597 \begin_layout Itemize
11599 \begin_inset space \thinspace{}
11606 \begin_layout Itemize
11611 \begin_layout Itemize
11612 PAN — camera movement
11615 \begin_layout Itemize
11616 INSERT — cut to close-up of
11619 \begin_layout Section
11623 \begin_layout Standard
11626 Panayotis Papasotiriou
11629 \begin_layout Subsection
11633 \begin_layout Standard
11634 The ijmpc package is a set of macros that facilitates electronic manuscript
11637 International Journal of Modern Physics C
11640 Similarly, the ijmpd package is for creating manuscripts to be submitted
11643 International Journal of Modern Physics D
11646 Both journals are published by World Scientific.
11647 The corresponding document classes are named
11656 These files, together with instructions for the authors, can be downloaded
11658 \begin_inset Flex URL
11661 \begin_layout Plain Layout
11663 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11669 \begin_inset Flex URL
11672 \begin_layout Plain Layout
11674 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11680 Both packages are modified versions of the standard
11681 \begin_inset Quotes eld
11685 \begin_inset Quotes erd
11688 package, and they are almost (but not exactly) identical.
11689 Most of their features are supported by LyX.
11690 I have used LyX successfully to write articles submitted to both journals
11691 without any problem.
11694 \begin_layout Subsection
11698 \begin_layout Standard
11699 As usual, the easiest way to write a paper is to start with a template.
11702 File\SpecialChar \menuseparator
11721 This will give an (almost) empty document that includes the most common
11722 fields found in a manuscript.
11723 Simply overwrite the existing text (including the brackets,
11728 You should keep in mind the following remarks.
11731 \begin_layout Enumerate
11732 LyX won't let you change the font size and the page style of the document,
11733 because such modifications are not allowed by both packages.
11736 \begin_layout Enumerate
11737 The language of the document should not be changed.
11738 Before previewing your paper, be sure that the babel package is not used.
11739 To do this, click on
11741 Tools\SpecialChar \menuseparator
11752 checkbox in the language settings, and click on
11760 , if you wish to make this change permanent).
11763 \begin_layout Enumerate
11765 \begin_inset Quotes eld
11769 \begin_inset Quotes erd
11772 style must be used to define keywords.
11775 \begin_layout Enumerate
11776 The ijmpc package provides a style named
11777 \begin_inset Quotes eld
11780 Classification Codes
11781 \begin_inset Quotes erd
11784 , which can be used to define classification codes, such as PACS numbers.
11785 Note that this facility is not supported by the ijmpd package.
11788 \begin_layout Enumerate
11789 Several new environments are available:
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11798 \begin_inset Quotes eld
11802 \begin_inset Quotes erd
11806 \begin_inset Quotes eld
11810 \begin_inset Quotes erd
11814 \begin_inset Quotes eld
11818 \begin_inset Quotes erd
11822 \begin_inset Quotes eld
11826 \begin_inset Quotes erd
11830 \begin_inset Quotes eld
11834 \begin_inset Quotes erd
11838 \begin_inset Quotes eld
11842 \begin_inset Quotes erd
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 \begin_inset Quotes eld
11858 \begin_inset Quotes erd
11862 \begin_inset Quotes eld
11866 \begin_inset Quotes erd
11870 \begin_inset Quotes eld
11874 \begin_inset Quotes erd
11878 \begin_inset Quotes eld
11882 \begin_inset Quotes erd
11886 \begin_inset Quotes eld
11890 \begin_inset Quotes erd
11894 \begin_inset Quotes eld
11898 \begin_inset Quotes erd
11902 Their use is more or less obvious.
11903 LyX supports all these environments; it will use the proper label, text
11904 style, and numbering scheme for each of them.
11907 \begin_layout Enumerate
11908 Both packages use basic citations; the natbib package should not be used.
11909 In LyX, citation references are shown as usual; in the output, citations
11910 are shown as superscripts.
11911 If you want to use a citation as normal text, you should use the
11916 \begin_inset space \thinspace{}
11920 \begin_inset space \space{}
11924 \begin_inset Quotes eld
11928 \begin_inset space \space{}
11938 \begin_inset Quotes erd
11944 \begin_layout Enumerate
11946 \begin_inset Quotes eld
11950 \begin_inset Quotes erd
11953 section in both packages.
11954 To put acknowledgments, just use the
11955 \begin_inset Quotes eld
11959 \begin_inset Quotes erd
11965 \begin_layout Enumerate
11966 Appendices may be added to the paper,
11970 the Acknowledgments and
11975 LyX provides a special environment, called
11976 \begin_inset Quotes eld
11980 \begin_inset Quotes erd
11983 which marks the beginning of the appendices.
11984 This environment should be left blank; it just sends a LaTeX command, but
11985 nothing is really printed.
11987 \begin_inset Quotes eld
11991 \begin_inset Quotes erd
11994 is printed with blue letters, as a signal that all sections after that
11995 point are appendices.
11996 To write an appendix, use the
11997 \begin_inset Quotes eld
12001 \begin_inset Quotes erd
12005 LyX will number each appendix with capital letters, as required by both
12008 \begin_inset Quotes eld
12012 \begin_inset Quotes erd
12019 be present before the first appendix; if not, all appendices will be numbered
12020 as normal sections in the output.
12023 \begin_layout Enumerate
12024 The ijmpc and the ijmpd packages use the
12028 command to implement table captions.
12029 As a result, a table created by LyX is printed correctly, but its caption
12031 However, you can use some TeX code to overpass this problem, so that captions
12032 are printed as expected.
12033 To do so, create a float table as usual, remove the caption, and replace
12034 it with the TeX code
12044 (sic); you must also the TeX code
12048 immediately after the tabular material.
12049 Study the example table included in the template files to see how this
12050 trick is implemented.
12051 Alternatively, If you need table captions, you should implement the whole
12056 file, then include this file to the LyX document (
12058 Insert\SpecialChar \menuseparator
12059 File\SpecialChar \menuseparator
12061 \begin_inset space ~
12067 Details on how to create a table float can be found in the files
12075 , included in the corresponding packages.
12078 \begin_layout Subsection
12079 Preparing a paper for submission
12082 \begin_layout Standard
12083 Before you submit your paper you must export the LyX document as a LaTeX
12086 File\SpecialChar \menuseparator
12087 Export\SpecialChar \menuseparator
12094 \begin_layout Plain Layout
12095 Actually you have the choice between LaTeX (plain) and pdflatex.
12096 If you intend to use pdflatex to prepare the paper, you should use the
12097 pdflatex option so that included graphics are converted to PDF format,
12098 ready for use by pdflatex.
12103 , then make the following changes to the resulting
12110 \begin_layout Enumerate
12111 Remove the comment lines before the
12120 \begin_layout Enumerate
12121 Remove everything between (and including) the
12133 commands, except for any commands you specifically put into the LaTeX preamble.
12136 \begin_layout Standard
12141 file should be saved and processed through LaTeX as many times as necessary.
12142 You may also want to check the resulting
12149 \begin_layout Subsection
12153 \begin_layout Standard
12154 The use of TeX code is reduced to two commands, which must be placed at
12155 the top of the document.
12156 If you started writing your paper by using the
12164 template, the TeX code needed is already in its place; you usually don't
12166 You may only modify the first TeX code to specify the information printed
12167 to the top of odd and even pages (authors' names and short paper's title,
12169 This TeX code must have the form
12173 markboth{Authors' Names}{Short Paper's Title}
12178 \begin_layout Section
12182 \begin_layout Standard
12188 \begin_layout Subsection
12192 \begin_layout Standard
12193 The iopart package provides a document class to create electronic manuscript
12194 submission to the journals published by the Institute of Physics.
12195 Instructions for the authors how to create a paper using the iopart class
12196 can be downloaded together with the iopart package from the site
12197 \begin_inset Flex URL
12200 \begin_layout Plain Layout
12202 ftp://ftp.iop.org/pub/journals/latex2e
12210 \begin_layout Subsection
12214 \begin_layout Standard
12215 The easiest way to write a paper is to start with the file
12219 that is available in LyX's examples files folder.
12220 Open this file, save it under a new name, and start writing.
12221 The example file explains how to use the special text environments.
12222 Here are the most important advices:
12225 \begin_layout Itemize
12226 To be able to compile your document to a PDF, PS, or DVI, assure that the
12229 Use AMS math package
12231 in the document settings under
12238 \begin_layout Itemize
12241 The title environment defines the kind of your paper.
12242 So use one of the following environments for the title:
12246 \begin_layout Itemize
12255 \begin_layout Itemize
12264 \begin_layout Itemize
12270 for a Topical review
12273 \begin_layout Itemize
12282 \begin_layout Itemize
12291 \begin_layout Itemize
12297 for a Paper (same as Title)
12300 \begin_layout Itemize
12306 for a Preliminary communication
12309 \begin_layout Itemize
12315 for a Rapid communication
12318 \begin_layout Itemize
12324 for a Letter to the editor
12328 \begin_layout Itemize
12331 All title environments except of
12335 can have an optional short title.
12338 \begin_layout Itemize
12339 There is a general title environment
12343 which is not directly supported by the LyX.
12344 This can be used as TeX code when your document doesn't fit into one of
12345 the other title types.
12348 \begin_layout Standard
12349 For more informations like hints for special table and formula formatting,
12350 look at the IOP author guidelines.
12353 \begin_layout Section
12357 \begin_layout Standard
12360 Panayotis Papasotiriou
12363 \begin_layout Subsection
12367 \begin_layout Standard
12368 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12369 that facilitates electronic manuscript submission to the journals they
12371 Most known of them (at least in my domain of interest) are
12373 Astrophysics and Space Science
12379 , but there are many others (see a complete list at
12380 \begin_inset Flex URL
12383 \begin_layout Plain Layout
12385 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12391 The Kluwer package may be downloaded from the site
12392 \begin_inset Flex URL
12395 \begin_layout Plain Layout
12397 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12403 A complete user guide is contained in that package (but it can also be
12404 downloaded separately).
12407 \begin_layout Standard
12408 LyX supports many features of the package but not everything.
12409 However, the TeX code needed is reduced to some
12410 \begin_inset Quotes eld
12414 \begin_inset Quotes erd
12417 commands of the package (see
12418 \begin_inset space ~
12422 \begin_inset CommandInset ref
12424 reference "subsec:kluwer_peculiarities"
12429 I have recently used LyX to write an article submitted to the
12431 Astrophysics and Space Science
12433 without any problem.
12436 \begin_layout Subsection
12440 \begin_layout Standard
12441 The easiest way to write a paper is to start with the Kluwer template file.
12444 File\SpecialChar \menuseparator
12456 This will give an (almost) empty document that includes the most common
12457 fields found in a manuscript and a short description of their use.
12458 As in most templates, simply overwrite the existing text (including the
12463 ) with the correct information.
12466 \begin_layout Subsection
12467 Preparing a paper for submission
12470 \begin_layout Standard
12471 As in the AASTeX package, before you submit your paper to a journal you
12473 \begin_inset Quotes eld
12477 \begin_inset Quotes erd
12483 \begin_layout Enumerate
12484 Export your paper as a LaTeX file.
12485 To do this, click on
12487 File\SpecialChar \menuseparator
12488 Export\SpecialChar \menuseparator
12495 \begin_layout Enumerate
12500 file with a text editor and make the following changes
12504 \begin_layout Enumerate
12505 remove the comment lines before the
12514 \begin_layout Enumerate
12515 remove everything between (and including) the
12527 commands, except for any commands you specifically put into the LaTeX preamble.
12530 \begin_layout Standard
12539 \begin_layout Enumerate
12544 file through LaTeX as many times as necessary (usually up to three).
12547 \begin_layout Enumerate
12553 \begin_inset space \thinspace{}
12557 \begin_inset space \space{}
12564 , and check if everything is OK (it should, if you didn't make any mistake).
12567 \begin_layout Subsection
12568 \begin_inset Quotes eld
12572 \begin_inset Quotes erd
12575 of the Kluwer package
12576 \begin_inset CommandInset label
12578 name "subsec:kluwer_peculiarities"
12585 \begin_layout Standard
12586 The Kluwer package has the following
12587 \begin_inset Quotes eld
12591 \begin_inset Quotes erd
12597 \begin_layout Enumerate
12598 It is possible to write multiple articles in the same LaTeX file
12602 \begin_layout Plain Layout
12603 I can't imagine any good reason to do this.
12609 Each article must be included in the environment
12610 \begin_inset Quotes eld
12614 \begin_inset Quotes erd
12618 Unfortunately, this environment cannot be omitted, even if you write just
12620 Therefore, each article starts with the command
12626 and, obviously, ends with the command
12633 Although this can be implemented in LyX, I didn't included it, since it
12634 looks ugly and can confuse the novice user.
12635 Therefore, you need to enter them directly and mark them as LaTeX code
12637 \begin_inset Quotes eld
12641 \begin_inset Quotes erd
12647 \begin_layout Enumerate
12648 Information given at the beginning of the article (i.
12649 \begin_inset space \thinspace{}
12653 \begin_inset space \space{}
12656 title, subtitle, author, institution, running title, running author, abstract
12657 and keywords) must be included in an environment called
12658 \begin_inset Quotes eld
12662 \begin_inset Quotes erd
12666 This is not implemented in LyX, so you must enter title, subtitle etc.
12667 \begin_inset space ~
12670 between two TeX code lines (
12685 \begin_layout Enumerate
12686 According to the user manual, the label of each bibliography item must be
12710 \begin_layout Standard
12715 template takes care of all these
12716 \begin_inset Quotes eld
12720 \begin_inset Quotes erd
12724 If you start a new paper using this template you don't need to do anything
12729 \begin_layout Enumerate
12730 don't delete the TeX code included in the template, and
12733 \begin_layout Enumerate
12734 copy the example bibliography item included in the template and modify it
12735 as necessary to enter new bibliography items.
12738 \begin_layout Section
12742 \begin_layout Standard
12748 \begin_layout Subsection
12752 \begin_layout Standard
12753 The LyX document classes
12755 article (koma-script)
12759 report (koma-script)
12777 correspond to the LaTeX document classes
12794 \begin_inset space ~
12797 of the Koma-Script family.
12798 They are replacements for the standard document classes
12814 , resp., and fit better to European typography conventions in a number of
12818 \begin_layout Itemize
12819 Standard character size is 11pt in
12821 article (koma-script)
12825 report (koma-script)
12833 letter (koma-script)
12838 \begin_layout Itemize
12839 Headings, labels of the description environment, and a number of elements
12842 letter (koma-script)
12844 document class are set in a bold sans serif font.
12848 \begin_layout Plain Layout
12849 There is a big difference between the bold sans serif old cm fonts and new
12850 ec fonts, especially in the appearance of headings.
12851 In comparison, the ec bold sans serif fonts look a bit thin.
12852 Here the LaTeX package
12860 helps to produce the
12861 \begin_inset Quotes eld
12865 \begin_inset Quotes erd
12868 appearance when using the ec fonts.
12873 The numbering of chapter headings is made in the same way as the numbering
12874 of section headings, that is without the extra line
12875 \begin_inset Quotes eld
12878 Chapter\SpecialChar \ldots{}
12880 \begin_inset Quotes erd
12884 In addition, the appearance of the headings can be modified by using a
12885 number of options (in LyX to be entered in the field
12888 \begin_inset space ~
12895 Layout\SpecialChar \menuseparator
12899 A detailed German description of these options can be found in the Koma-Script
12907 \begin_layout Itemize
12908 The main means in the Koma-Script document classes to design the type area
12917 (in LyX to be entered in the extra class options field in the dialog
12919 Document\SpecialChar \menuseparator
12923 They make a clearer modification of page margins possible as do the options
12926 Document\SpecialChar \menuseparator
12930 A detailed German description of these and other type area options can
12931 be found in the Koma-Script documentation
12938 \begin_layout Itemize
12939 The LaTeX document classes of the Koma-Script family define a number of
12940 additional commands.
12941 Those part of it which makes sense in LyX is implemented in corresponding
12945 \begin_layout Standard
12946 A detailed German description of the LaTeX document classes of the Koma-Script
12947 family can be found in the Koma-Script documentation
12955 \begin_layout Plain Layout
12956 There is an English translation
12960 , but it is not a complete one.
12965 The following sections describe only those aspects, which are relevant
12969 \begin_layout Subsection
12970 article (koma-script), report (koma-script), and book (koma-script)
12973 \begin_layout Standard
12974 The document classes
12976 article (koma-script)
12980 report (koma-script)
12990 are implemented in the layout files
13003 They contain all the paragraph types of the corresponding standard document
13016 , resp., partly modified, with the exception of the LyX specific
13020 -type, which is replaced by the new
13024 -type having the same functionality.
13029 -Type there is a number of new paragraph types added.
13036 letter (koma-script)
13041 \begin_layout Itemize
13050 : are equivalents to
13058 , resp., additionally inserting an entry in the table of contents.
13067 are not contained in
13069 article (koma-script)
13074 \begin_layout Itemize
13083 : behave exactly as
13091 , resp., additionally clearing running heads.
13096 is not contained in
13098 article (koma-script)
13104 \begin_layout Plain Layout
13117 report (koma-script)
13119 , but since this is identical to
13123 , is has not been implemented in LyX.
13131 \begin_layout Itemize
13136 : generates a heading directly above the following paragraph in the standard
13137 character size without affecting the structure of the document.
13140 \begin_layout Itemize
13149 are special captions which respect the different space settings needed
13150 for captions placed above or below an element (if you follow strict typographic
13151 rules, you might want to place table captions always above the table).
13152 You can also use the class option
13156 , which will switch
13169 You need at least Koma-Script version 2.8q to use this.
13172 \begin_layout Itemize
13177 : can be used to set a bonmot, e.
13178 \begin_inset space \thinspace{}
13182 \begin_inset space \space{}
13185 at the beginning of a chapter.
13186 If you use the optional argument (
13188 Insert\SpecialChar \menuseparator
13190 \begin_inset space ~
13195 ), you can insert the dictum's author there.
13196 Dictum and author are separated by a line.
13197 You need at least Koma-Script version 2.8q to use this.
13202 is not contained in
13204 article (koma-script)
13209 \begin_layout Standard
13210 The following types, together with the standard types
13222 , form the title area of the document.
13223 They must be entered ahead of the first
13224 \begin_inset Quotes eld
13228 \begin_inset Quotes erd
13235 \begin_layout Plain Layout
13236 The corresponding LaTeX commands must appear before the
13247 When such a type is used more than once, the latter usage overwrites the
13248 former one, that means, for every type only the latest usage is valid.
13249 The order of the different types however has, like
13261 , no effect on the appearance of the produced document.
13264 \begin_layout Itemize
13269 : produces a centered paragraph above the ordinary title (
13281 ) for the subject of the document.
13284 \begin_layout Itemize
13289 : produces a centered paragraph below the ordinary title (
13301 ) for the publishers' name.
13304 \begin_layout Itemize
13311 report (koma-script)
13317 produces a centered paragraph on its own page behind the title page, or
13320 article (koma-script)
13322 produces a centered paragraph below the ordinary title (
13338 ) for a dedication.
13341 \begin_layout Itemize
13346 : produces a left aligned paragraph above the ordinary title (
13362 ) for a document`s head.
13365 \begin_layout Itemize
13370 : produces in a double-sided print in
13372 report (koma-script)
13378 a left-aligned paragraph at the top of the title page`s back or has no
13379 effect in a single-sided print or in
13381 article (koma-script)
13386 \begin_layout Itemize
13391 : produces in a double-sided print in
13393 report (koma-script)
13399 a left-aligned paragraph at the bottom of the title page`s back or has
13400 no effect in a single-sided print or in
13402 article (koma-script)
13407 \begin_layout Itemize
13412 : produces a special
13413 \begin_inset Quotes eld
13417 \begin_inset Quotes erd
13420 page ahead of the actual document containing a paragraph without special
13424 \begin_layout Standard
13425 The layout files for the document classes
13427 article (koma-script)
13431 report (koma-script)
13437 do include the file
13442 This is thought of as a place to define your own types.
13447 in your personal layout directory and edit the file!
13450 \begin_layout Subsection
13451 letter (koma-script)
13454 \begin_layout Standard
13458 \begin_layout Plain Layout
13470 \begin_layout Standard
13474 letter (koma-script)
13476 is implemented in the layout file
13481 It contains all the paragraph types of the corresponding standard document
13486 , partly modified, with the exception of the LyX specific types
13498 type, which is replaced by the new
13503 In addition, it contains, in contrast to the standard document class, the
13521 Furthermore, there are a number of new letter specific types.
13524 \begin_layout Standard
13528 \begin_layout Plain Layout
13540 \begin_layout Standard
13541 The appearance of the letter produced by this document class can be controlled
13542 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13546 \begin_layout Plain Layout
13547 For example, the standard appearance of the letter`s heading, consisting
13548 of name and address, is quite self-willed.
13550 \begin_inset Quotes eld
13554 \begin_inset Quotes erd
13557 heading is produced by the following LaTeX commands in the preamble:
13560 \begin_layout LyX-Code
13570 \begin_layout LyX-Code
13586 \begin_layout LyX-Code
13596 \begin_layout LyX-Code
13616 A detailed German description of such LaTeX commands can be found in the
13617 Koma-Script documentation
13622 With it, the letter's author can produce his personal letter layout.
13625 \begin_layout Standard
13634 define the beginning of the letter and must be used in every letter.
13635 To emphasize them in the LyX document class, they are marked with the letter
13645 \begin_inset space ~
13648 in the left margin.
13649 It is possible to write any number of letters in one file.
13654 type produces a new letter using the same addressee and a
13658 type produces a new addressee.
13675 are ordinary paragraph types and can also be used several times in one
13676 and the same letter.
13679 \begin_layout Itemize
13684 : produces a paragraph for the addressee and implicitly defines the beginning
13688 \begin_layout Itemize
13693 : produces a paragraph for the form of address and implicitly produces a
13697 \begin_layout Itemize
13702 : produces a paragraph for a close.
13705 \begin_layout Itemize
13710 : produces a paragraph for a postscript.
13713 \begin_layout Itemize
13718 : produces a paragraph for a distribution list.
13721 \begin_layout Itemize
13726 : produces a paragraph for enclosures.
13729 \begin_layout Standard
13770 are input types provided with a label to enter information, which will
13771 be processed by the document class.
13775 \begin_layout Plain Layout
13776 It could be seen as a matter of inconsequence, that the types
13784 described above are not such input types as well.
13785 Because of the special meaning of those types, however, I have implemented
13786 them as ordinary paragraph types with a one letter mark in the left margin.
13787 Moreover, it would affect my feeling of symmetry, if the
13795 type had such a serious different appearance.
13800 The types must be used ahead of the corresponding
13807 \begin_layout Standard
13808 An implementation of these types in a WYSIWYG fashion does not seem to make
13809 sense, because the real appearance of the produced letter does not only
13810 depend on the usage of the particular type, but also on other factors.
13811 For example, a signature entered in the
13815 type will in the standard behavior appear in the produced letter only,
13816 when in the same letter also a
13821 The entered value of the
13825 type will in the standard behavior not appear in the produced letter at
13827 The possibility to design the letter`s heading freely is already indicated
13828 in a footnote above.
13831 \begin_layout Standard
13832 The input types can also be used as empty paragraphs.
13833 This makes sense e.
13834 \begin_inset space \thinspace{}
13838 \begin_inset space \space{}
13850 type is not used at all, in the standard behavior the value of the
13854 type is used as signature, whereas if an empty
13858 type is used, no signature value is defined.
13861 \begin_layout Standard
13862 By using the input types it is possible to write a letter template, containing
13863 filled input types with your personal dates (name, address, etc.) and empty
13864 input types for other dates you want to enter.
13867 \begin_layout Itemize
13872 : sender's name, in the standard behavior appears as a centered paragraph
13873 in small caps in the letter`s heading.
13876 \begin_layout Itemize
13881 : sender's signature, in the standard behavior appears below the
13890 type is used, the value of the
13894 type appears instead.
13897 \begin_layout Itemize
13902 : sender's address, in the standard behavior appears in a centered paragraph
13903 in the letter`s heading below the sender's name.
13906 \begin_layout Itemize
13911 : sender's telephone number, in the standard behavior only sets the LaTeX
13921 \begin_layout Itemize
13926 : place of the letter`s making.
13929 \begin_layout Itemize
13934 : date of the letter`s making.
13943 , in the standard behavior, produce the place and the date in a right-aligned
13944 line below the addressee's field.
13949 type is used, neither place nor date appear, independent of the value of
13959 type is used, the date of the letter `s production is used.
13962 \begin_layout Itemize
13967 : sender`s back address, in the standard behavior appears above the addressee's
13968 field in a small sans serif font.
13971 \begin_layout Itemize
13976 : special mail information, in the standard behavior appears underlined
13977 above the addressee's field below the back address.
13980 \begin_layout Itemize
13985 : additional information, in the standard behavior appears on right side
13986 below the addressee`s field.
13989 \begin_layout Itemize
13994 : the letter's title, in the standard behavior appears in a big, bold, sans
13995 serif font above the subject.
13998 \begin_layout Itemize
14003 : the letter's subject, in the standard behavior appears in a bold font
14011 \begin_layout Standard
14032 produce a business letter like line above the
14036 line containing the fields
14037 \begin_inset Quotes eld
14041 \begin_inset Quotes erd
14045 \begin_inset Quotes eld
14049 \begin_inset Quotes erd
14053 \begin_inset Quotes eld
14057 \begin_inset Quotes erd
14061 \begin_inset Quotes eld
14065 \begin_inset Quotes erd
14069 \begin_inset Quotes eld
14073 \begin_inset Quotes erd
14077 \begin_inset Quotes eld
14081 \begin_inset Quotes erd
14085 For the date field, the value of the
14091 \begin_inset Quotes eld
14094 business letter types
14095 \begin_inset Quotes erd
14098 is used, the value of the
14102 type however does not appear, but only the LaTeX variable
14109 The ordinary output of place and date in a right-aligned line below the
14110 addressee`s field is suppressed.
14111 The types are implemented as input types provided with a label and must
14112 be used ahead of the corresponding
14119 \begin_layout Itemize
14127 \begin_layout Itemize
14135 \begin_layout Itemize
14143 \begin_layout Itemize
14151 \begin_layout Itemize
14159 \begin_layout Subsection
14160 The new letter class: letter (koma-script v.2)
14163 \begin_layout Standard
14169 \begin_layout Standard
14170 \begin_inset VSpace medskip
14176 \begin_layout Standard
14178 Koma-Script version 2.8 has introduced a new letter class
14182 which supersedes the now unsupported
14187 It has — on the LaTeX side — a completely new interface and is not compatible
14188 with the old class.
14189 Therefore, LyX supports both, though it is recommended to use the new class.
14192 \begin_layout Standard
14193 This class covers the same functionality as
14195 letter (koma-script),
14198 The basic items are
14202 (receiver's address, same as
14206 in the old layout),
14219 will start a new letter (i.
14220 \begin_inset space \thinspace{}
14224 \begin_inset space \space{}
14227 you can write several letters per document).
14228 New elements are sender's
14244 and the possibility to use a
14250 Insert\SpecialChar \menuseparator
14256 \begin_layout Standard
14257 The biggest improvement is, though, that the letter's layout is configurable
14258 at almost any needs.
14259 This can be done via the preamble or with a special style file (Letter
14260 Class Option, extension
14264 ), that will be read in as a class option.
14268 \begin_layout Plain Layout
14269 The KOMA package comes with some default
14274 There is, for instance, a
14278 file that follows german typesetting rules, or a
14282 that provides the default layout of the old
14287 The latter can be loaded with the class option
14296 ayout\SpecialChar \menuseparator
14301 ocument\SpecialChar \menuseparator
14313 template that is included in LyX for examples.
14314 A detailed description is to be found in the Koma-Script documentation
14322 \begin_layout Subsection
14326 \begin_layout Standard
14327 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14331 \begin_layout Itemize
14332 The chapter number of a
14336 type appears on a line of its own above the chapter heading instead of
14337 appearing in the same line ahead of it.
14338 The cause for that is the LyX internal behavior for the labeltype
14342 in the layout file.
14345 \begin_layout Itemize
14346 The headings of the types
14354 are only put in the
14355 \begin_inset Quotes eld
14359 \begin_inset Quotes erd
14362 LaTeX table of contents, but not in the LyX table of contents (
14364 Document\SpecialChar \menuseparator
14366 \begin_inset space ~
14370 \begin_inset space ~
14378 \begin_layout Itemize
14379 The paragraphs in a
14383 document class appear in a skip separation mode, not indented.
14384 This is the standard behavior, no special LaTeX commands are needed for
14388 Document\SpecialChar \menuseparator
14391 dialog the corresponding radio button indicates
14400 value always has the effect that extra LaTeX commands are inserted in the
14401 document to produce the gap, which is not what is wanted in this case.
14404 \begin_layout Section
14405 Latex8 (IEEE Conference Papers)
14408 \begin_layout Standard
14414 \begin_layout Subsection
14418 \begin_layout Standard
14419 Since this class is specifically for writing submissions to IEEE sponsored
14420 conferences I strongly recommend that you get a copy of their Authors Kit.
14425 package and associated bibliography style file is included in the kit.
14426 The Authors Kit is usually sent out by email once your initial submission
14428 There is a lot of useful information in the Authors Kit explaining formatting
14429 restrictions and so on and I will assume you have read this since that
14430 means I don't have to repeat it all here.
14433 \begin_layout Subsection
14437 \begin_layout Standard
14438 [AR\SpecialChar \@.
14442 \begin_layout Subsection
14443 Supported Environments
14446 \begin_layout Itemize
14452 \begin_layout Itemize
14458 \begin_layout Itemize
14464 \begin_layout Itemize
14470 \begin_layout Itemize
14476 \begin_layout Itemize
14482 \begin_layout Itemize
14488 \begin_layout Itemize
14494 \begin_layout Itemize
14500 \begin_layout Subsection
14501 Differences Between Screen and Paper
14504 \begin_layout Standard
14505 There are slight differences in appearance mainly with the presentation
14506 of section counters.
14507 On screen the trailing period of the section counter is missing but it
14508 will appear in the output so don't let this worry you.
14511 \begin_layout Section
14515 \begin_layout Standard
14521 \begin_layout Subsection
14525 \begin_layout Standard
14526 Memoir is a very powerful and constantly evolving class.
14527 It has been designed with regard to fictional and non-fictional literature.
14528 Its aim is to let the user have maximum control over the typesetting of
14530 Memoir is based on the standard book class, but it can also emulate the
14531 article class (see below).
14534 \begin_layout Standard
14535 Peter Wilson, the developer of Memoir, is known as the author of lots of
14536 useful packages in the LaTeX world.
14537 Most of them have been merged with Memoir.
14538 Therefore, it is much easier to layout the table of contents, appendices,
14539 chapter designs and such.
14540 LyX, though, does not support all of these goodies natively.
14541 Some of them might be added to forthcoming releases
14545 \begin_layout Plain Layout
14546 You are invited to send suggestions to
14547 \begin_inset Flex URL
14550 \begin_layout Plain Layout
14552 lyx-devel@lists.lyx.org
14562 , lots will probably never, due to the limitations of LyX's framework.
14563 Of course you can still use all features with the help of some native LaTeX
14568 \begin_layout Plain Layout
14573 \begin_layout Plain Layout
14583 \begin_inset space ~
14587 \begin_inset CommandInset ref
14589 reference "sec:Inserting-TeX-Code"
14599 In this section, we can only list those features which are natively supported
14601 For detailed descriptions (and for the rest of features) we are recommending
14602 to have a look at the detailed manual of the Memoir class
14606 \begin_layout Plain Layout
14611 \begin_layout Plain Layout
14621 \begin_inset Flex URL
14624 \begin_layout Plain Layout
14626 CTAN:/macros/latex/memoir/memman.pdf
14636 , which is not only a user guide for the class, but also both a comprehensive
14637 description on good typesetting and a superb example for good typesetting
14641 \begin_layout Subsection
14642 Basic features and restrictions
14645 \begin_layout Standard
14646 Memoir supports basically all features of the standard book classes.
14647 There are, however, some differences, as follows:
14650 \begin_layout Description
14652 \begin_inset space ~
14655 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14658 \begin_layout Description
14660 \begin_inset space ~
14663 style: The fancy page style is not supported, due to a command clash between
14664 Memoir and the fancyhdr package (they are both defining a command with
14665 the same name, which confuses LaTeX).
14666 Instead, Memoir comes with a bunch of own page styles (see
14668 Layout\SpecialChar \menuseparator
14669 Document\SpecialChar \menuseparator
14671 \begin_inset space ~
14677 If you want to use these for the chapter pages, you have to use the command
14684 in the main text or in preamble (e.
14685 \begin_inset space \thinspace{}
14689 \begin_inset space \space{}
14696 chapterstyle{companion}
14701 \begin_layout Description
14702 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14703 an optional argument in the standard classes.
14704 With this, you can specify an alternative version of the title for the
14705 table of contents and the headers (for instance, if the title is too long).
14706 In LyX, you can do this via
14708 Insert\SpecialChar \menuseparator
14710 \begin_inset space ~
14715 at the beginning of a chapter/section.
14716 Memoir features a second optional argument and thus separates the table
14717 of contents from the header.
14718 You can define three variants of a title with this: one for the main text,
14719 one for the table of contents, and one for the headers.
14720 Simply insert two optional arguments if you need this feature, the first
14721 one containing the short title for the Table of Contents, the second one
14722 containing an alternative short title for the headers.
14725 \begin_layout Description
14726 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14727 of contents, the list of figures and the list of table start a new page
14729 Memoir does not follow this route.
14730 You have to insert a page break yourself, if you want to have one.
14733 \begin_layout Description
14734 Titlepage: For some unknown reason, Memoir uses pagination on the title
14735 page (in the standard classes, title pages are
14736 \begin_inset Quotes eld
14740 \begin_inset Quotes erd
14744 \begin_inset space \thinspace{}
14748 \begin_inset space \space{}
14752 If you want an empty title page, type
14756 aliaspagestyle{title}{empty}
14761 \begin_layout Description
14762 Article: With the class option
14768 Layout\SpecialChar \menuseparator
14769 Document\SpecialChar \menuseparator
14771 \begin_inset space ~
14776 ), you can emulate article style.
14777 That is, counters (footnotes, figures, tables etc.) will not be reset on
14778 new chapters, chapters don't start a new page (but are—in contrary to
14779 \begin_inset Quotes eld
14783 \begin_inset Quotes erd
14786 article classes—still allowed), parts, though, use their own page, as in
14790 \begin_layout Description
14791 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14792 font commands, which have been used in the old LaTeX version 2.09 (e.
14793 \begin_inset space \thinspace{}
14797 \begin_inset space \space{}
14813 It produces an error and stops LaTeX whenever such a command appears.
14818 reallows the commands and spits out warnings instead (which does at least
14820 Since a lot of packages and particularly BibTeX style files are still using
14821 those commands, we have decided to use this option by default.
14824 \begin_layout Subsection
14828 \begin_layout Standard
14829 We will only describe the features supported by LyX (which is not much currently
14831 Please consult the Memoir manual
14835 \begin_layout Plain Layout
14840 \begin_layout Plain Layout
14850 \begin_inset Flex URL
14853 \begin_layout Plain Layout
14855 CTAN:/macros/latex/memoir/memman.pdf
14868 \begin_layout Description
14869 Abstract: You may wonder why an abstract is an extra feature.
14870 Well, it is in book class.
14871 Usually books don't have abstracts.
14872 Memoir, however, has.
14873 You can use it wherever and how often you like.
14876 \begin_layout Description
14877 Chapterprecis: You may know this from belletristic: The contents of a chapter
14878 is shortly described below the title and also in the table of contents
14880 \begin_inset space \thinspace{}
14884 \begin_inset space \space{}
14889 Our hero arrives in Troia; he loses some friends; he finds others
14892 Chapterprecis does exactly this.
14893 It is therefore only sensible below a chapter.
14896 \begin_layout Description
14897 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14898 The epigraph environment provides an elegant way of typesetting such a
14900 The motto itself (text) and its author (source) are divided by a short
14902 Unfortunately, we have to fool LyX a bit here again, since the environment
14903 needs two arguments (text and source).
14904 In this case, we have to use curly brackets (in TeX mode) between the two
14915 <author of the slogan>.
14918 \begin_layout Description
14919 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14920 complex figurative poems).
14921 LyX can only support a few of them.
14922 One is poemtitle, which is a centered title for poems, which will also
14923 be added to the table of contents (verse is the standard environment for
14925 Memoir has some enhanced versions of verse, but you need to use TeX code,
14926 because they have to be nested inside regular verse environments, which
14927 is not possible with LyX).
14930 \begin_layout Description
14931 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14934 \begin_layout Section
14935 Article (mwart), book (mwbk) and report (mwrep)
14936 \begin_inset Argument
14939 \begin_layout Plain Layout
14952 \begin_layout Standard
14958 \begin_layout Standard
14959 The LyX document classes
14975 correspond to the LaTeX document classes
14988 They are replacements for the standard document classes
15000 , resp., and fit better to Polish typography conventions in a number of points.
15004 \begin_layout Standard
15008 \begin_layout Itemize
15009 Unnumbered titles (with star, e.
15010 \begin_inset space \thinspace{}
15014 \begin_inset space \space{}
15021 ) are added into table of contents,
15024 \begin_layout Itemize
15025 Additional page styles:
15029 \begin_layout Description
15030 uheadings header with separated lines,
15033 \begin_layout Description
15034 myheadings custom header, contents headers via commands:
15049 \begin_layout Description
15050 myuheadings custom header with separated lines,
15053 \begin_layout Description
15054 outer page number is placed on outer side of page
15058 \begin_layout Itemize
15063 \begin_layout Description
15064 rmheadings serif titles — default,
15067 \begin_layout Description
15068 sfheadings sansserif titles,
15071 \begin_layout Description
15072 authortitle on title page first placed is author next title — default,
15075 \begin_layout Description
15076 titleauthor on title page first placed is title next author,
15079 \begin_layout Description
15080 withmarginpar reserve place on page for margins.
15084 \begin_layout Section
15088 \begin_layout Standard
15093 provides an alternative to the standard
15098 It provides similar functionality, but you might prefer this layout with
15099 sans serif sections, headings, and more.
15102 \begin_layout Section
15106 \begin_layout Standard
15112 \begin_layout Standard
15113 \begin_inset VSpace bigskip
15119 \begin_layout Standard
15124 \begin_inset space ~
15129 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15130 \begin_inset Formula $\beta$
15133 release of May, 1999) class.
15136 \begin_layout Standard
15141 textclass, which works with RevTeX 3.1.
15142 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15143 That means that it doesn't interact very well with LyX, which requires
15144 LaTeX2e, although it has been kludged to work.
15145 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15149 \begin_inset space ~
15154 textclass should also be pretty easy to use.
15157 \begin_layout Standard
15158 These documents are supposed to be used in
15162 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15163 macros, and assume you'll know what to put in the preamble if necessary.
15166 \begin_layout Subsection
15170 \begin_layout Standard
15171 All you need to do is install RevTeX 4, as described in the package's README
15173 The package can be found at The RevTeX 4 Web Site
15174 \begin_inset Flex URL
15177 \begin_layout Plain Layout
15179 http://publish.aps.org/revtex4/
15185 Install it somewhere that LaTeX can see it.
15186 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15188 \begin_inset space \thinspace{}
15192 \begin_inset space \space{}
15195 not the directory where you installed the class file.) Then, if you reconfigure
15196 LyX, it will find the class file and let you use the RevTeX4 textclass.
15199 \begin_layout Standard
15200 Probably the easiest way to get started is either to import a RevTeX 4 document
15208 \begin_inset space ~
15213 template, found in the templates directory.
15216 \begin_layout Subsection
15220 \begin_layout Standard
15221 Optional arguments to
15228 \begin_inset Quotes eld
15232 \begin_inset Quotes erd
15236 \begin_inset Quotes eld
15240 \begin_inset Quotes erd
15250 \begin_inset space ~
15258 \begin_inset space ~
15264 Remember that in RevTeX, at least one optional argument is required!
15267 \begin_layout Standard
15268 Other preamble matter, like
15275 \begin_inset space ~
15281 \begin_inset space ~
15286 dialog, also as usual.
15289 \begin_layout Subsection
15293 \begin_layout Standard
15294 The layouts basically correspond to the commands in RevTeX4.0.
15295 For example, the Email layout corresponds to
15302 Note that (at least as of RevTeX 4.0 Beta), the
15310 layouts are exactly equivalent, so you shouldn't need to use both.
15314 \begin_layout Plain Layout
15315 In case you're curious, both were included so that
15319 would be able to translate both
15339 \begin_layout Subsection
15343 \begin_layout Standard
15344 There are a couple of important unique aspects of RevTeX 4 which might cause
15345 bugs that will be even more confusing in LyX.
15348 \begin_layout Standard
15366 The LyX equivalent is that there is a separate Thanks layout.
15371 write footnotes in the
15375 layout, or weird things may happen.
15376 See the RevTeX 4 documentation for more details.
15379 \begin_layout Standard
15383 \begin_inset space ~
15391 \begin_inset space ~
15400 layouts must be placed
15408 layout and the corresponding
15425 , the LaTeX won't compile.
15428 \begin_layout Subsection
15432 \begin_layout Standard
15433 The main problem with this layout is that you can't use the optional arguments
15434 to layouts like Email and Title.
15435 (The problem is not unique to this layout; you can't use optional arguments
15436 to the Section layouts either.) This means that after you export that file
15437 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15438 need to edit the LaTeX file with a text editor to add the optional arguments
15440 \begin_inset space \thinspace{}
15444 \begin_inset space \space{}
15447 the running title for the page headers.
15448 Lacking these layouts makes the
15454 (and the equivalent
15460 ) useless, so the corresponding layouts don't exist, and will have to be
15465 \begin_layout Plain Layout
15470 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15471 has not been updated yet to take advantage of it.
15479 \begin_layout Section
15480 Springer Journals (
15487 \begin_layout Standard
15493 \begin_layout Subsection
15497 \begin_layout Standard
15498 These are the layout files for some of the journal formats used by Springer
15499 Verlag and listed on
15500 \begin_inset Flex URL
15503 \begin_layout Plain Layout
15505 http://www.springer.de/author/tex/help-journals.html
15510 , where you should also go to fetch the class files (yes, these are LaTeX2e
15512 It is a modular system: the things common to all journals are implemented
15517 , which journal-specific layout files (such as, e.
15518 \begin_inset space \thinspace{}
15522 \begin_inset space \space{}
15529 for Journal of Geodesy) can include.
15532 \begin_layout Standard
15533 This means that implementing support for any other Springer journal on this
15534 list is as simple as writing your own
15542 file following the outline given in
15550 \begin_layout Standard
15551 It is reasonably well tested only for the Journal of Geodesy.
15560 come with the standard LyX distribution.
15561 Install the relevant class file (downloaded from Springer) in a proper
15562 directory, reconfigure LaTeX (in the teTeX case by running
15566 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15567 and it should work.
15570 \begin_layout Subsection
15574 \begin_layout Standard
15575 A large number of theorem-like styles —
15581 \SpecialChar \ldots{}
15587 \begin_layout Standard
15590 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15591 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15594 See the Springer class file documentation for details.
15597 \begin_layout Subsection
15601 \begin_layout Itemize
15613 \begin_layout Itemize
15616 Probability Theory and Related Fields
15622 — Jean-Marc Lasgouttes
15625 \begin_layout Standard
15626 Add your own, it isn't so hard!
15629 \begin_layout Subsection
15633 \begin_layout Standard
15634 These files are partly based on the older
15638 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15639 file from Springer.
15644 layout, are now defunct.
15645 Jean-Marc Lasgouttes helped out big in making me find my way around the
15646 LyX layout file mechanism.
15649 \begin_layout Subsection
15653 \begin_layout Standard
15655 But probably less than in the old hacked-LaTeX
15662 \begin_layout Standard
15664 \begin_inset space \thinspace{}
15667 g.: does not display the number for theorem-like layouts, just #.
15670 \begin_layout Section
15676 \begin_inset CommandInset label
15685 \begin_layout Standard
15693 \begin_layout Subsection
15697 \begin_layout Standard
15698 This section describes how to use LyX to make slides for overhead projectors.
15699 There are two document classes that can do this: the default slides class
15705 This section documents the former.
15708 \begin_layout Standard
15709 I'm going to say this again, nice and clear, so that there's no misunderstanding
15713 \begin_layout Standard
15714 \begin_inset VSpace bigskip
15720 \begin_layout Standard
15724 This section documents the class
15725 \begin_inset Quotes eld
15733 \begin_inset Quotes erd
15741 \begin_layout Standard
15742 \begin_inset VSpace bigskip
15748 \begin_layout Standard
15749 If you're looking for the documentation for
15750 \begin_inset Quotes eld
15758 \begin_inset Quotes erd
15761 , check out section
15762 \begin_inset space ~
15766 \begin_inset CommandInset ref
15768 reference "sec:foiltex"
15778 \begin_inset Quotes eld
15786 \begin_inset Quotes erd
15789 ] is actually somewhat better than the default
15797 \begin_layout Plain Layout
15798 \SpecialChar \ldots{}
15799 or so I've been told repeatedly by its advocates.
15800 Having never used it, I have no idea if this claim is true or not.
15805 which this section documents.
15808 \begin_layout Standard
15809 This class is the LaTeX2e improvement of the old
15814 Every LaTeX2e distribution includes this class [which I'll just refer to
15816 \begin_inset Quotes eld
15824 \begin_inset Quotes erd
15827 from now on], so you're bound to have it.
15828 As I noted earlier, there are other classes, such as
15832 , which also produce slides for overhead projectors and do a better job
15834 However, there are some things which
15838 can do which the others can't, such as generate overlays.
15839 Read on to learn more!
15842 \begin_layout Subsection
15844 \begin_inset CommandInset label
15846 name "sec:slidesetup"
15853 \begin_layout Standard
15854 Obviously, to use this document class, you need to select
15855 \begin_inset Quotes eld
15863 \begin_inset Quotes erd
15866 from the class list in the
15868 Document\SpecialChar \menuseparator
15872 There are some other special things you should know about this class:
15875 \begin_layout Itemize
15876 Don't bother changing the options
15881 They're not supported by the
15888 \begin_layout Itemize
15892 \begin_inset space ~
15897 behaves a bit differently for this class.
15898 The possible choices and what they do are as follows:
15902 \begin_layout Description
15907 The final output contains page numbers in the lower right corner.
15910 \begin_layout Description
15919 , but also prints out any time markers you've put in.
15920 This is the default.
15923 \begin_layout Description
15928 The final output contains no page numbers, time markers, or alignment markers.
15932 \begin_layout Itemize
15937 class has an extra option:
15943 \begin_inset Quotes eld
15951 \begin_inset Quotes erd
15954 in the extra class options.
15958 \begin_layout Standard
15959 Using this options allows you to add time markers to
15965 \begin_inset space ~
15969 \begin_inset CommandInset ref
15971 reference "sec:slideNote"
15979 \begin_layout Standard
15980 You can also use the template file
15981 \begin_inset Quotes eld
15989 \begin_inset Quotes erd
15992 to automatically set up a document to use the
15998 File\SpecialChar \menuseparator
16000 \begin_inset space ~
16004 \begin_inset space ~
16009 to open your new document].
16010 The template file also contains some examples of the special paragraph
16011 environments used by this class.
16012 I'll describe those next.
16015 \begin_layout Subsection
16016 Paragraph Environments
16019 \begin_layout Subsubsection
16020 Supported Environments
16023 \begin_layout Standard
16024 The first thing you'll notice when you start up a new
16028 document is the font size and type: it's the equivalent of the size
16029 \begin_inset Quotes eld
16037 \begin_inset Quotes erd
16043 \begin_inset space ~
16049 This is also what's used in the output.
16051 \begin_inset Quotes eld
16055 \begin_inset Quotes erd
16058 to remind you that this is a slide.
16059 Your final slides will use a larger font; ergo, you'll have less space.
16060 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16063 \begin_layout Standard
16064 The next thing that becomes obvious is the changes to the paragraph environment
16065 pull-down box [at the far-left end of the toolbar].
16066 Most of the paragraph environments you're used to seeing are missing.
16067 There are also five new ones.
16072 class itself only supports certain paragraph environments:
16075 \begin_layout Itemize
16081 \begin_layout Itemize
16087 \begin_layout Itemize
16093 \begin_layout Itemize
16099 \begin_layout Itemize
16105 \begin_layout Itemize
16111 \begin_layout Itemize
16117 \begin_layout Itemize
16123 \begin_layout Itemize
16129 \begin_layout Itemize
16135 \begin_layout Itemize
16141 \begin_layout Standard
16142 All of the other standard environments, including the section-heading environmen
16143 ts, aren't used in the
16150 \begin_layout Standard
16151 On the other hand, you'll notice the following new environments:
16154 \begin_layout Itemize
16160 \begin_layout Itemize
16166 \begin_layout Itemize
16172 \begin_layout Itemize
16178 \begin_layout Itemize
16184 \begin_layout Standard
16185 These five are kind of quirky, due to a
16186 \begin_inset Quotes eld
16190 \begin_inset Quotes erd
16194 You see, LyX doesn't permit you to nest any other paragraph environment
16195 into an empty environment.
16196 Now, that's fine and dandy, but it means that you wouldn't be able to start
16197 a slide with anything except plain text.
16198 To deal with this, I've performed a little
16199 \begin_inset Quotes eld
16203 \begin_inset Quotes erd
16209 \begin_layout Subsubsection
16210 Quirks of the New Environments
16211 \begin_inset CommandInset label
16213 name "sec:slideQuirk"
16220 \begin_layout Standard
16221 All five of the new paragraph environments are somewhat quirky due to inherent
16222 limitiations in the current version of LyX.
16223 As I just mentioned, LyX forbids environments that begin with another environme
16225 To get around this, the
16229 environment isn't a paragraph environment as described in the
16237 \begin_layout Standard
16238 You should consider
16251 \begin_inset Quotes eld
16254 pseudo-environments.
16255 \begin_inset Quotes erd
16258 They look like a section heading or a
16259 \begin_inset Quotes eld
16267 \begin_inset Quotes erd
16270 but really begin a [and, if necessary, end the previous] paragraph environment.
16280 \begin_inset Quotes eld
16284 \begin_inset Quotes erd
16287 These two perform some action.
16290 \begin_layout Standard
16291 A common feature of all five environments,
16311 , is a rather long-ish label.
16312 The text following this label — ordinarily the contents of the paragraph
16313 environment — is utterly irrelevant for
16334 LyX completely ignores it.
16335 In fact, you can leave these five environments completely empty.
16339 \begin_layout Standard
16344 to put any text after the rather long-ish label, you might want to.
16345 This could be a short description of the contents of the
16350 In that case, enter in your descriptive comment and hit
16354 as you normally would.
16357 \begin_layout Standard
16358 If, on the other hand, you don't want to enter in any descriptive text,
16359 you'll hit another LyX quirk.
16360 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16361 environment until you put something in the old one.
16365 \begin_layout Itemize
16366 Start entering the text that will
16394 \begin_layout Itemize
16395 Now move to the beginning of that paragraph.
16399 \begin_layout Itemize
16408 \begin_layout Itemize
16409 Finally, change this new, empty paragraph to a
16433 \begin_layout Standard
16434 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16438 \begin_layout Subsection
16439 Making a Presentation with
16452 \begin_layout Subsubsection
16460 \begin_layout Standard
16461 If you're expecting this section to teach you how to actually make a presentatio
16462 n, you'll be sorely disappointed.
16463 Naturally, I'll describe all of the ways the
16467 class can assist you in preparing the materials for a presentation.
16468 Filling in the contents, however, is up to you.
16473 the LyX philosophy.]
16476 \begin_layout Standard
16481 environment [in the manner described in section
16482 \begin_inset space ~
16486 \begin_inset CommandInset ref
16488 reference "sec:slideQuirk"
16492 ] tells LyX to begin a new slide [duh].
16493 The label for this environment/
16494 \begin_inset Quotes erd
16498 \begin_inset Quotes erd
16502 \begin_inset Quotes eld
16506 \begin_inset Quotes erd
16509 in cool blue, followed by the label,
16510 \begin_inset Quotes eld
16514 \begin_inset Quotes erd
16518 Any text or paragraph environments that follow this one go on the new slide.
16522 \begin_layout Standard
16523 Slides are probably the only time you'll need to forcibly end pages in LyX
16524 (this can be specified in the
16529 In fact, you'll want to, once you finish entering the contents of one slide.
16530 If you've entered more text than can physically fit on a slide, the extra
16531 overflows onto a new slide.
16532 I don't recommend doing this, however, since the overflow slide won't have
16533 any page number on it.
16534 Furthermore, it may interfere with any
16538 you've made to accompany the oversized
16545 \begin_layout Standard
16554 environments work the same way as the
16559 They both create an
16560 \begin_inset Quotes eld
16564 \begin_inset Quotes erd
16567 followed by a label [
16568 \begin_inset Quotes eld
16572 \begin_inset Quotes erd
16576 \begin_inset Quotes eld
16580 \begin_inset Quotes erd
16584 The color is a stunning magenta instead of blue, and the
16585 \begin_inset Quotes eld
16589 \begin_inset Quotes erd
16592 will look different, in style and in length.
16593 The label fonts of all three also differ from one another.
16596 \begin_layout Standard
16601 , if the contents of a
16609 exceed the physical size of a slide or sheet of paper, the extra will overflow
16611 Again, you should avoid this.
16612 It defeats the whole purpose of
16623 \begin_layout Subsubsection
16633 \begin_layout Standard
16638 is a slide that sits atop another slide.
16639 Perhaps you wish to discuss a figure on the main
16643 before displaying the text associated with it.
16644 One way to accomplish this is tape a flap of dark paper over the part of
16649 you want to display later.
16650 This method fails, however, if you wish to overlap one graph with another,
16652 You would then have to fumble while speaking to align the two separate,
16657 s to align the two graphs.
16662 environment in both cases makes life much easier.
16665 \begin_layout Standard
16670 receives the page number of its
16671 \begin_inset Quotes eld
16675 \begin_inset Quotes erd
16683 \begin_inset Quotes eld
16691 \begin_inset Quotes erd
16698 \begin_layout Plain Layout
16699 Presumably, mutliple
16704 \begin_inset Quotes eld
16712 \begin_inset Quotes erd
16716 \begin_inset Quotes eld
16724 \begin_inset Quotes erd
16728 \begin_inset Quotes eld
16736 \begin_inset Quotes erd
16740 \begin_inset space ~
16743 appended to the page number of the parent
16753 Clearly, you want the contents of both the
16761 to each fit on a single physical slide! You should probably consider an
16767 \begin_inset Quotes eld
16771 \begin_inset Quotes erd
16783 class provides a visual cue for this: the label at the start of an
16787 is shorter than that at the start of a
16792 Lastly, when you generate printable output, you'll find alignment markers
16793 in all four corners of both the
16797 page and its parent
16802 These will assist you in lining up the two physical slides.
16805 \begin_layout Standard
16806 The major problem in overlaying two slides is aligning the contents of the
16807 two transparencies.
16808 How much space should you leave for that graph on the second slide? Worse
16809 still, what if you want a graph and a sentence on second slide, but there
16810 is text on the main transparency that goes in between them? You could try
16811 and insert vertical space of the right size.
16812 The better way is to use
16823 \begin_layout Standard
16824 As their names imply,
16832 are two command-like paragraph environments that make all subsequent text
16833 invisible and visible, respectively.
16835 \begin_inset space ~
16839 \begin_inset CommandInset ref
16841 reference "sec:slideQuirk"
16845 that you don't place anything
16849 these two environments, however.
16854 , it inserts a centered, sky-blue label into the page reading
16855 \begin_inset Quotes eld
16858 <Invisible Text Follows>
16859 \begin_inset Quotes erd
16863 For paragraphs following this label, the parts of the
16871 ; it doesn't matter which] where they would be contain instead blank space.
16875 \begin_layout Standard
16880 , the corresponding centered label is
16881 \begin_inset Quotes eld
16884 <Visible Text Follows>
16885 \begin_inset Quotes erd
16889 Paragraphs following this label behave normally.
16890 Note that the beginning of a new
16902 automatically shuts off an
16907 It's therefore not necessary to use
16918 \begin_layout Standard
16919 By now, it should be obvious how to create overlay transparencies using
16920 the proper combination of
16939 \begin_layout Enumerate
16944 , including everything that will appear on it, whether on the main slide
16952 \begin_layout Enumerate
16953 Before each figure or paragraph that will appear only on the
16962 If necessary, insert a
16966 environment after the
16973 \begin_layout Enumerate
16978 immediately following the
16985 \begin_layout Enumerate
16986 Copy the contents of this
16997 \begin_layout Enumerate
17002 , change all of the
17013 \begin_layout Standard
17015 You've just made an
17022 \begin_layout Standard
17023 There's one problem with the way I've designed the LyX
17027 class: you can't make text in the middle of a paragraph invisible, nor
17028 make text in the middle of an invisible paragraph visible again.
17029 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17033 \begin_layout Plain Layout
17034 The commands of interest are:
17037 \begin_layout Itemize
17042 invisible \SpecialChar \ldots{}
17046 \begin_layout Itemize
17051 visible \SpecialChar \ldots{}
17055 \begin_layout Plain Layout
17056 \SpecialChar \ldots{}
17057 and need to be marked as TeX.
17059 \begin_inset Quotes eld
17063 \begin_inset Quotes erd
17066 you wish to change goes in between the brackets [and after the
17079 If you don't know how to mark text as TeX, see the appropriate section
17092 \begin_layout Subsubsection
17102 \begin_inset CommandInset label
17104 name "sec:slideNote"
17111 \begin_layout Standard
17120 is associated with a
17121 \begin_inset Quotes eld
17125 \begin_inset Quotes erd
17137 class provides visual cues.
17142 is shorter than that of a
17146 [yet longer than that of an
17150 ] and, like the label of an
17154 is shockingly magenta.
17155 Additionally, the printed
17159 has the page number of its
17160 \begin_inset Quotes eld
17164 \begin_inset Quotes erd
17172 \begin_inset Quotes eld
17180 \begin_inset Quotes erd
17184 \begin_inset Quotes eld
17192 \begin_inset Quotes erd
17196 \begin_inset Quotes eld
17204 \begin_inset Quotes erd
17208 You can have multiple
17212 s associated with a single
17224 , you'll probably want to break up long
17228 s so that they fit on a single sheet of paper.
17231 \begin_layout Standard
17236 is obvious: it contains anything additional you might want to say about
17242 It could also be used as a sheet of reminders for a particular
17247 In the case of the latter, you might want to make use of time markers.
17253 \begin_inset Quotes eld
17257 \begin_inset Quotes erd
17260 support for time markers, a
17265 So, you'll have to resort to using the LaTeX codes.
17268 \begin_layout Standard
17269 To use time markers, you'll need to specify the extra class option
17270 \begin_inset Quotes eld
17278 \begin_inset Quotes erd
17282 \begin_inset space ~
17286 \begin_inset CommandInset ref
17288 reference "sec:slidesetup"
17293 This option turns on timing marks, which will appear in the lower-left-hand
17299 To set what appears in the time marker, you use the LaTeX commands
17300 \begin_inset Quotes eld
17310 \begin_inset Quotes erd
17314 \begin_inset Quotes eld
17324 \begin_inset Quotes erd
17328 The arguments of both commands are time measured in seconds.
17330 \begin_inset Quotes eld
17340 \begin_inset Quotes erd
17343 sets the time marker to a given time.
17345 \begin_inset Quotes eld
17355 \begin_inset Quotes erd
17358 increments the time marker by the specified amount.
17359 Using time markers and
17363 s in this fashion, you can remind yourself how much time to spend on a particula
17371 \begin_layout Standard
17372 There's one last feature to describe.
17373 Clearly, you'd like to print out all of your
17381 s on transparencies while printing all of your
17398 with which it is associated.
17399 What's a person to do?
17402 \begin_layout Standard
17403 Luckily, there are two LaTeX commands that allow you to select what to print
17405 Both must be placed into the preamble of your document.
17407 \begin_inset Quotes eld
17419 \begin_inset Quotes erd
17422 will cause the output to contain only the
17431 Correspondingly, the command
17432 \begin_inset Quotes eld
17444 \begin_inset Quotes erd
17447 prevents the output of anything but
17452 I'd advise placing both commands in the preamble and initially comment
17454 You can then preview your entire presentation as you write.
17455 When you're done writing, you can then uncomment one of the two to select
17456 what you want to print.
17457 I like to uncomment
17458 \begin_inset Quotes eld
17470 \begin_inset Quotes erd
17473 , print to a file with
17474 \begin_inset Quotes eld
17482 \begin_inset Quotes erd
17485 in its name, comment it back out, then uncomment
17486 \begin_inset Quotes eld
17498 \begin_inset Quotes erd
17502 \begin_inset Quotes eld
17510 \begin_inset Quotes erd
17514 I can then send either file to a printer, loading transparencies or plain
17515 paper as appropriate.
17518 \begin_layout Standard
17519 You can also provide other arguments to the
17520 \begin_inset Quotes eld
17530 \begin_inset Quotes erd
17534 \begin_inset Quotes eld
17544 \begin_inset Quotes erd
17548 See a good LaTeX book for details.
17551 \begin_layout Subsection
17556 Class Template File
17559 \begin_layout Standard
17560 I have also provided a template file,
17561 \begin_inset Quotes eld
17569 \begin_inset Quotes erd
17577 To use it, begin your new presentation with
17582 ile\SpecialChar \menuseparator
17584 \begin_inset space ~
17588 \begin_inset space ~
17598 Your new LyX presentation file will contain an example
17619 additionally contain an example of the use of
17628 Lastly, the preamble will contain:
17631 \begin_layout LyX-Code
17632 % Uncomment to print out only slides and overlays
17635 \begin_layout LyX-Code
17639 \begin_layout LyX-Code
17645 \begin_inset Newline newline
17651 \begin_layout LyX-Code
17652 % Uncomment to print out only notes
17655 \begin_layout LyX-Code
17659 \begin_layout LyX-Code
17667 \begin_layout Standard
17668 One final thing: I created this class to support the LaTeX2e
17669 \begin_inset Quotes eld
17677 \begin_inset Quotes erd
17680 class, one of the built-in LaTeX2e classes.
17681 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17682 built-in slide class.
17683 It's here if you want it or need it.
17684 There exist other LaTeX2e classes for creating presentations, such as the
17690 \begin_inset space ~
17694 \begin_inset CommandInset ref
17696 reference "sec:foiltex"
17701 \begin_inset Quotes eld
17709 \begin_inset Quotes erd
17712 package [present on some TeX distributions].
17713 The latter is not yet supported under LyX.
17717 \begin_layout Plain Layout
17718 Perhaps you can take on the task\SpecialChar \ldots{}
17724 I know nothing about these other classes.
17725 Try them out to see what sort of alternative they provide.
17728 \begin_layout Chapter
17729 LyX Features needing Extra Software
17732 \begin_layout Section
17736 \begin_layout Standard
17742 \begin_layout Subsection
17746 \begin_layout Standard
17755 \begin_layout Plain Layout
17760 is not yet available when you are using the LaTeX distribution MiKTeX.
17765 , you'll find in the
17772 \begin_inset space ~
17783 \begin_inset CommandInset href
17785 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17792 \begin_layout Standard
17797 package is a program that was written by
17798 \begin_inset Flex CharStyle:Noun
17801 \begin_layout Plain Layout
17803 \begin_inset space ~
17811 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17812 and easy to forget.
17813 The program runs over your LaTeX file, checks the integrity of the file,
17814 and flags some common errors.
17815 In other technical words, it is
17822 \begin_layout Standard
17823 Well, what is a syntax checker doing in LyX which is supposed to produce
17824 correct LaTeX anyways? The answer is simple: Just as
17828 not only checks the
17832 of C programs, but also does
17836 checks for type-errors,
17840 catches some common
17844 errors, in addition to the syntactical ones.
17849 is capable of detecting several common errors, such as
17852 \begin_layout Itemize
17853 Ellipsis detection:
17854 \begin_inset Newline newline
17857 Use \SpecialChar \ldots{}
17861 \begin_layout Itemize
17862 No space in front of/after parenthesis:
17863 \begin_inset Newline newline
17869 \begin_layout Itemize
17870 Enforcement of normal space after common abbreviations:
17871 \begin_inset Newline newline
17875 \begin_inset space \thinspace{}
17879 \begin_inset space \space{}
17882 is too wide spacing.
17885 \begin_layout Itemize
17886 Enforcement of end-of-sentence space when the last sentence ends with a
17888 \begin_inset Newline newline
17892 And this is wrong spacing.
17895 \begin_layout Itemize
17896 Space in front of labels and similar commands:
17897 \begin_inset Newline newline
17900 The label should stick right up to the text to avoid falling to a wrong
17903 \begin_inset CommandInset label
17913 \begin_layout Plain Layout
17914 This footnote is in danger of falling off to a wrong page
17919 The label is separated too much.
17922 \begin_layout Itemize
17923 Space in front of references, instead of hard spaces:
17924 \begin_inset Newline newline
17927 In you are in bad luck, the text will break right between the referenced
17928 text and reference number, and that's a pity.
17930 \begin_inset CommandInset ref
17932 reference "sec:chktex"
17939 \begin_layout Itemize
17941 \begin_inset Quotes eld
17945 \begin_inset Quotes erd
17949 \begin_inset Formula $\times$
17953 \begin_inset Newline newline
17956 2x2 looks cheap compared to
17957 \begin_inset Formula $2\times2$
17963 \begin_layout Standard
17964 and more \SpecialChar \ldots{}
17965 It is an invaluable tool when you are
17966 \begin_inset Quotes eld
17970 \begin_inset Quotes erd
17973 your document before printing, and you should run it right after the obligatory
17974 spelling check, and before you go fine tuning the typesetting.
17977 \begin_layout Subsection
17981 \begin_layout Standard
17982 If you have the program installed, usage is as simple as choosing
17984 Tools\SpecialChar \menuseparator
17986 \begin_inset space ~
17992 This will make LyX generate a LaTeX file of your document, start
17996 to check it, and then make LyX insert
17997 \begin_inset Quotes eld
18001 \begin_inset Quotes erd
18004 with the warnings from
18008 , if there were any.
18009 The warnings will be placed close to the point of the mistake, and you
18010 can quickly find them by using the
18012 Navigate\SpecialChar \menuseparator
18015 menu item, or the shortcut key
18024 Open the error boxes by clicking on them with the mouse, or use the shortcut
18033 bindings, or the corresponding
18042 Read the warning and correct the mistake, if it is a mistake.
18043 If you have trouble understanding what the warning is about, you can safely
18045 Remember that there is a hidden layer between the document on screen and
18046 the technical details in invoking
18050 , and this gap can make some warnings seem arcane or just right down plain
18054 \begin_layout Standard
18055 This document is an excellent testing bed for the feature, and it should
18056 provide quite a few warnings for you to fiddle with.
18057 Since computers are only so smart, expect most of the warnings to be false
18061 \begin_layout Subsection
18062 How to fine tune it
18065 \begin_layout Standard
18066 Sometimes, you'll find that
18070 makes more noise than suits your mood.
18071 Then you can choose not to use it, wait until your mood changes, or try
18076 to get better along with you.
18077 Another choice in the most desperate situations is to use
18079 View\SpecialChar \menuseparator
18081 \begin_inset space ~
18085 \begin_inset space ~
18089 \begin_inset space ~
18094 , which will get rid of all warnings instantly.
18097 \begin_layout Standard
18106 very configurable and extensible, you shouldn't expect to solve all problems
18112 Since LyX has to generate a somewhat special LaTeX file to be able to match
18113 the line numbers from the
18121 \begin_layout Plain Layout
18122 You can inspect the specific output from
18128 Edit\SpecialChar \menuseparator
18130 \begin_inset space ~
18134 \begin_inset space ~
18148 to the internal document structure, some of the warnings will not seen
18149 to appear correctly.
18150 There are two things you can do about this:
18153 \begin_layout Itemize
18158 invocation command line in
18174 installation configuration file (usually with the file
18179 See below to learn what warnings can be enabled and disabled on the command
18184 \begin_layout Itemize
18185 Export your document as a raw LaTeX file using
18187 File\SpecialChar \menuseparator
18188 Export\SpecialChar \menuseparator
18196 Invoked in this way, it can be a hassle to find the corresponding place
18197 in the document inside LyX, but with a little patience, you should be able
18201 \begin_layout Standard
18202 Here follows the warning messages that can be enabled and disabled in
18211 to disable a warning, and
18215 to enable a warning.
18216 The emphasized entries are disabled by default, because the default is
18219 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18224 \begin_layout Standard
18225 Notice that you should only use the options that enable and disable warnings,
18226 because LyX relies on some of the other command line parameters to be set
18227 in a specific way to have a chance to communicate with
18234 \begin_layout Enumerate
18238 Command terminated with space.
18241 \begin_layout Enumerate
18244 Non-breaking space (
18245 \begin_inset Quotes eld
18253 \begin_inset Quotes erd
18256 ) should have been used.
18259 \begin_layout Enumerate
18263 You should enclose the previous parenthesis with
18264 \begin_inset Quotes eld
18272 \begin_inset Quotes erd
18278 \begin_layout Enumerate
18281 Italic correction (
18282 \begin_inset Quotes eld
18292 \begin_inset Quotes erd
18295 ) found in non-italic buffer.
18298 \begin_layout Enumerate
18301 Italic correction (
18302 \begin_inset Quotes eld
18312 \begin_inset Quotes erd
18315 ) found more than once.
18318 \begin_layout Enumerate
18322 No italic correction (
18323 \begin_inset Quotes eld
18333 \begin_inset Quotes erd
18339 \begin_layout Enumerate
18343 \begin_inset Quotes eld
18351 \begin_inset Quotes erd
18355 \begin_inset Quotes eld
18363 \begin_inset Quotes erd
18369 \begin_layout Enumerate
18372 Wrong length of dash may have been used.
18375 \begin_layout Enumerate
18379 \begin_inset Quotes eld
18387 \begin_inset Quotes erd
18391 \begin_inset Quotes eld
18399 \begin_inset Quotes erd
18405 \begin_layout Enumerate
18409 \begin_inset Quotes eld
18417 \begin_inset Quotes erd
18423 \begin_layout Enumerate
18427 \begin_inset Quotes eld
18435 \begin_inset Quotes erd
18438 to achieve an ellipsis.
18441 \begin_layout Enumerate
18444 Inter-word spacing (
18445 \begin_inset Quotes eld
18455 \begin_inset Quotes eld
18458 ) should perhaps be used.
18461 \begin_layout Enumerate
18464 Inter-sentence spacing (
18465 \begin_inset Quotes eld
18475 \begin_inset Quotes erd
18478 ) should perhaps be used.
18481 \begin_layout Enumerate
18484 Could not find argument for command.
18487 \begin_layout Enumerate
18491 \begin_inset Quotes eld
18499 \begin_inset Quotes erd
18505 \begin_layout Enumerate
18508 Math mode still on at end of LaTeX file.
18511 \begin_layout Enumerate
18515 \begin_inset Quotes eld
18523 \begin_inset Quotes erd
18526 doesn't match the number of
18527 \begin_inset Quotes eld
18535 \begin_inset Quotes erd
18541 \begin_layout Enumerate
18544 You should use either
18547 \begin_inset Quotes eld
18555 \begin_inset Quotes erd
18560 as an alternative to
18561 \begin_inset Quotes eld
18569 \begin_inset Quotes erd
18575 \begin_layout Enumerate
18582 " (ASCII 39) instead of "
18589 \begin_layout Enumerate
18592 User-specified pattern found.
18595 \begin_layout Enumerate
18598 This command might not be intended.
18601 \begin_layout Enumerate
18608 \begin_layout Enumerate
18626 \begin_layout Enumerate
18629 Delete this space to maintain correct page references.
18632 \begin_layout Enumerate
18636 You might wish to put this between a pair of
18637 \begin_inset Quotes eld
18645 \begin_inset Quotes erd
18651 \begin_layout Enumerate
18654 You ought to remove spaces in front of punctuation.
18657 \begin_layout Enumerate
18660 Could not execute LaTeX command.
18663 \begin_layout Enumerate
18672 in front of small punctuation.
18675 \begin_layout Enumerate
18683 may look prettier here.
18686 \begin_layout Enumerate
18690 Multiple spaces detected in output.
18693 \begin_layout Enumerate
18696 This text may be ignored.
18699 \begin_layout Enumerate
18705 \begin_inset Quotes eld
18710 to begin quotation, not
18717 \begin_layout Enumerate
18724 to end quotation, not
18727 \begin_inset Quotes eld
18735 \begin_layout Enumerate
18741 \begin_layout Enumerate
18744 You should perhaps use
18745 \begin_inset Quotes eld
18753 \begin_inset Quotes erd
18759 \begin_layout Enumerate
18762 You should put a space in front of/after parenthesis.
18765 \begin_layout Enumerate
18768 You should avoid spaces in front of/after parenthesis.
18771 \begin_layout Enumerate
18775 You should not use punctuation in front of/after quotes.
18778 \begin_layout Enumerate
18781 Double space found.
18784 \begin_layout Enumerate
18787 You should put punctuation outside inner/inside display math mode.
18790 \begin_layout Enumerate
18793 You ought to not use primitive TeX in LaTeX code.
18796 \begin_layout Enumerate
18799 You should remove spaces in front of
18800 \begin_inset Quotes eld
18808 \begin_inset Quotes erd
18814 \begin_layout Enumerate
18817 \begin_inset Quotes eld
18825 \begin_inset Quotes erd
18828 is normally not followed by
18829 \begin_inset Quotes eld
18837 \begin_inset Quotes erd
18843 \begin_layout Standard
18844 In later versions of LyX, we hope to provide a more complete interface to
18845 this tool (and it's smaller cousin
18849 ) to exploit the full power of it.
18850 But it's not exactly useless as it is now: go try it on one of your existing
18851 documents of a certain length and be surprised.
18854 \begin_layout Section
18855 Version Control in LyX
18858 \begin_layout Standard
18861 Lars Gullik Bjønnes
18868 \begin_layout Subsection
18872 \begin_layout Standard
18873 A friend of mine wanted to try LyX for a group project.
18874 When he didn't find support for version control or file locking, he dropped
18876 This angered me a bit, so I thought that I should at least make support
18877 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18878 This has now been done.
18879 LyX now supports some of the most basic RCS commands.
18880 If you need to something a bit more sophisticated you will have to do that
18881 manually in a terminal.
18884 \begin_layout Standard
18885 Before you begin to use the version control features in LyX, you should
18887 \begin_inset Quotes eld
18891 \begin_inset Quotes erd
18894 (a man file, read it with
18899 This file describes all the basic features of RCS.
18900 You should especially notice the comment about a RCS directory, and the
18901 notion of a master RCS file (the file ending in
18908 \begin_layout Standard
18909 Later basic CVS/SVN support was added.
18910 You should be familiar with CVS/SVN usage before start using it under LyX.
18911 Most of the log messages are not currently displayed after operations -
18912 you can check them in Messages pane if unsure.
18915 \begin_layout Standard
18916 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18917 package—no guarantees are made for older versions.
18920 \begin_layout Standard
18921 For introducing your own external commands consult vc-command in the manual
18925 \begin_layout Subsection
18926 RCS commands in LyX
18929 \begin_layout Standard
18930 The following sections describe the RCS commands supported by LyX.
18931 You can find them in the
18933 File\SpecialChar \menuseparator
18935 \begin_inset space ~
18941 LyX was tested against RCS 5.7.
18944 \begin_layout Subsubsection
18950 \begin_layout Standard
18951 If your document is not under revision control, this is the only item shown
18953 And if it is under revision control, the
18957 item is not visible.
18961 \begin_layout Standard
18962 This command registers your document with RCS (unless you are under the
18963 directory managed by CVS)\SpecialChar \@.
18964 You are asked interactively to supply an initial
18965 description of the document.
18966 The document is now set in Read-Only mode and you have to
18969 \begin_inset space ~
18973 \begin_inset space ~
18977 \begin_inset space ~
18982 , before making any changes to it.
18983 A document under revision control has a
18984 \begin_inset Quotes eld
18987 [RCS:<version> <locker>]
18988 \begin_inset Quotes erd
18991 item tagged to the filename in the minibuffer.
18994 \begin_layout Standard
18995 RCS command that is run:
18997 ci -q -u -i -t-"<initial description>" <file-name>
19000 \begin_layout Standard
19005 to understand the switches.
19009 \begin_layout Subsubsection
19015 \begin_layout Standard
19016 When you are finished editing a file, you check in your changes.
19017 When you do this, you are asked for a description of the changes.
19018 This is stored in the history log.
19019 The version number is bumped, your changes are applied to the master RCS
19020 file, the document is unlocked and set to Read-Only mode.
19024 \begin_layout Standard
19027 ci -q -u -m"<description>" <file-name>
19030 \begin_layout Subsubsection
19036 \begin_layout Standard
19037 By doing this you lock the document so that only you can edit it.
19038 This will also make the document Read-Write only for you.
19039 You will usually continue editing for a while and when you are finished
19040 you check in your changes.
19041 The status line is changed to reflect that you have locked the file.
19045 \begin_layout Standard
19048 co -q -l <file-name>
19051 \begin_layout Subsubsection
19054 Revert To Repository Version
19057 \begin_layout Standard
19058 This will discard all changes made to the document since the last check
19060 You get a warning before changes are discarded.
19063 \begin_layout Standard
19066 co -f -u<version> <file-name>
19069 \begin_layout Subsubsection
19075 \begin_layout Standard
19076 This makes as if the last check in never happened.
19077 No changes are made to the document loaded into LyX, but the last version
19078 is removed from the master RCS file.
19082 \begin_layout Standard
19085 rcs -o<version> <file-name>
19088 \begin_layout Subsubsection
19094 \begin_layout Standard
19095 This show the complete history of the RCS document.
19100 is shown in a browser.
19108 \begin_layout Subsubsection
19112 \begin_layout Standard
19113 LyX supports RCS version number information (only), see
19114 \begin_inset CommandInset ref
19116 reference "sub:VCS-Revision-Information"
19123 \begin_layout Subsection
19124 CVS commands in LyX
19127 \begin_layout Standard
19128 CVS is now partially supported by LyX.
19129 You can find the commands in the
19131 File\SpecialChar \menuseparator
19133 \begin_inset space ~
19139 Focus of the development moved to SVN support, so please use it instead
19140 of CVS if possible.
19143 \begin_layout Subsubsection
19149 \begin_layout Standard
19150 If your document is not under revision control, this is the only item shown
19152 And if it is under revision control, the
19159 item is not visible.
19163 \begin_layout Standard
19164 This command registers in CVS your document ONLY in case you have already
19165 the documents directory under CVS control (in particular
19170 This means you have to checkout the archive by yourself.
19174 \begin_layout Standard
19175 Then you are asked interactively to supply an initial description of the
19177 Don't forget that registered file is not yet commited.
19180 \begin_layout Standard
19181 CVS command that is run:
19184 \begin_inset Quotes erd
19188 \begin_inset Quotes eld
19192 \begin_inset Quotes erd
19198 \begin_layout Standard
19203 to understand the switches.
19207 \begin_layout Subsubsection
19213 \begin_layout Standard
19214 When you are finished editing a file, you commit your changes.
19215 When you do this, you are asked for a description of the changes.
19216 After that changes are commited.
19219 \begin_layout Standard
19222 cvs -q commit -m"<description>" "<file-name>"
19225 \begin_layout Subsubsection
19228 Revert To Repository Version
19231 \begin_layout Standard
19232 This will discard all changes made to the document since the last check
19234 You get a warning before changes are discarded.
19235 Firstly the file is deleted, secondly CVS update command is run.
19238 \begin_layout Standard
19242 \begin_inset Quotes eld
19246 \begin_inset Quotes erd
19252 \begin_layout Subsubsection
19258 \begin_layout Standard
19259 This show the complete history of the CVS document.
19263 \begin_inset Quotes eld
19267 \begin_inset Quotes erd
19272 is shown in a browser.
19275 \begin_layout Subsection
19276 SVN commands in LyX
19279 \begin_layout Standard
19280 SVN is now partially supported by LyX.
19281 You can find the commands in the
19283 File\SpecialChar \menuseparator
19285 \begin_inset space ~
19291 Please note that if you use password protected access to repository via
19292 ssh, you will be asked in terminal window.
19293 LyX was tested against SVN 1.5 and 1.6
19297 \begin_layout Plain Layout
19298 Most of the commands will work with 1.4 too, see
19299 \begin_inset CommandInset ref
19301 reference "sub:SVN-Repo-Update"
19313 \begin_layout Subsubsection
19319 \begin_layout Standard
19320 If your document is not under revision control, this is the only item shown
19322 And if it is under revision control, the
19329 item is not visible.
19333 \begin_layout Standard
19334 This command registers in SVN your document ONLY in case you have already
19335 the documents directory under SVN control (in particular
19340 This means you have to checkout the archive by yourself.
19344 \begin_layout Standard
19345 Then you are asked interactively to supply an initial description of the
19347 Don't forget that registered file is not yet commited.
19350 \begin_layout Standard
19351 SVN command that is run:
19354 \begin_inset Quotes eld
19358 \begin_inset Quotes erd
19364 \begin_layout Standard
19369 to understand the switches.
19373 \begin_layout Subsubsection
19379 \begin_layout Standard
19380 When you are finished editing a file, you commit your changes.
19381 When you do this, you are asked for a description of the changes.
19382 After that changes are commited.
19385 \begin_layout Standard
19390 \begin_layout Plain Layout
19391 In case locking is not enabled.
19393 \begin_inset CommandInset ref
19395 reference "subsec:SVN-File-Locking"
19406 svn commit -q -m"<description>" <file-name>
19409 \begin_layout Subsubsection
19415 \begin_layout Standard
19416 Updates the changes of this file from the repository.
19417 Be sure you understand SVN merging and conflicts resolving before using
19418 this function, because all conflicts has to be resolved manually by you!
19421 \begin_layout Standard
19426 \begin_layout Plain Layout
19434 svn update --non-interactive
19435 \begin_inset Quotes eld
19439 \begin_inset Quotes erd
19445 \begin_layout Subsubsection
19448 Revert To Repository Version
19451 \begin_layout Standard
19452 This will discard all changes made to the document since the last check
19454 You get a warning before changes are discarded.
19458 \begin_layout Standard
19462 \begin_inset Quotes eld
19466 \begin_inset Quotes erd
19472 \begin_layout Subsubsection
19473 \begin_inset CommandInset label
19475 name "sub:SVN-Repo-Update"
19479 Update of the local directory checkout from repository
19483 \begin_layout Plain Layout
19484 Note that this command will work only with subversion
19485 \begin_inset Formula $\geqq1.5$
19496 \begin_layout Standard
19497 All the commands above have one shortcomming - they deal with the current
19499 Once your document contains pictures, includes external
19500 \begin_inset Flex CharStyle:Code
19503 \begin_layout Plain Layout
19509 files and so on administration becomes more complicated.
19510 LyX now supports updating the whole tree in which resides the document
19514 \begin_layout Plain Layout
19515 One need to organize the files structure so that all external files are
19516 in the same directory or subdirectories of the document.
19523 This become especially useful once you cooperate with people which neither
19524 know about subversion management nor they have ambition to commit additional
19525 material to the repository.
19529 \begin_layout Standard
19530 \begin_inset Flex CharStyle:Code
19533 \begin_layout Plain Layout
19534 Update local directory from repository
19539 command updates the whole directory and in case of merge conflicts local
19540 version of the files are left, so no unintended data loss occurs.
19541 If local changes are detected user is warned before update starts.
19544 \begin_layout Labeling
19545 \labelwidthstring 00.00.0000
19547 \begin_inset space ~
19551 \begin_inset space ~
19555 \begin_inset Newline newline
19559 \begin_inset Flex CharStyle:Code
19562 \begin_layout Plain Layout
19568 (Ask if changes are detected.)
19569 \begin_inset Newline newline
19573 \begin_inset Flex CharStyle:Code
19576 \begin_layout Plain Layout
19577 svn update --accept mine-full $path
19585 \begin_layout Standard
19587 \begin_inset Flex CharStyle:Code
19590 \begin_layout Plain Layout
19596 stands for the path to the document.
19599 \begin_layout Subsubsection
19605 \begin_layout Standard
19606 This show the complete history of the SVN document.
19610 \begin_inset Quotes eld
19614 \begin_inset Quotes erd
19619 is shown in a browser.
19622 \begin_layout Subsubsection
19624 \begin_inset CommandInset label
19626 name "subsec:SVN-File-Locking"
19633 \begin_layout Standard
19634 The file exchange through various revision control systems brings the problem
19635 of merge conflicts in case two different users try to edit the same (parts
19637 When such conflict happens it needs manual resolving and one reasonable
19638 alternative is to provide some kind of locking mechanism, which guarantees
19639 that only one user is allowed to edit file at the given time.
19642 \begin_layout Standard
19643 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19644 access - locks and automatical setting of write permissions (see sec.
19646 \begin_inset CommandInset ref
19648 reference "subsec:Automatical-Locking-Property"
19653 \begin_inset Flex CharStyle:Code
19656 \begin_layout Plain Layout
19666 \begin_layout Plain Layout
19667 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19673 In a case this property is detected for a given document LyX starts to
19674 use SVN locks for document editing automatically and the whole check-in/out
19675 mechanism switches to the same regimen as for RCS.
19676 This in particular means there are two different modes how file is used
19680 \begin_layout Itemize
19682 The loaded file is in the read-only mode.
19683 For editation on needs to check-out.
19688 consists of update from repository and gaining write lock.
19689 If the lock is not possible to obtain, we remain in unlocked state.
19692 \begin_layout Itemize
19694 The loaded file is in the 'normal' edit mode.
19695 No other user is allowed to edit the file.
19700 consists of commiting changes and releasing write-lock.
19701 If no changes have been made to the document, no commit will be produced
19705 \begin_layout Plain Layout
19706 Don't be puzzled by the fact that you will be asked for commit message anyway.
19711 and only the write-lock will be released.
19714 \begin_layout Standard
19718 \begin_layout Labeling
19719 \labelwidthstring 00.00.0000
19722 svn commit -q -m"<description>" "<file-name>"
19723 \begin_inset Newline newline
19726 svn unlock "<file-name>"
19729 \begin_layout Labeling
19730 \labelwidthstring 00.00.0000
19733 svn update "<file-name>"
19734 \begin_inset Newline newline
19737 svn lock "<file-name>"
19740 \begin_layout Subsubsection
19743 \begin_inset CommandInset label
19745 name "subsec:Automatical-Locking-Property"
19751 Automatical Locking Property
19754 \begin_layout Standard
19755 The above mentioned automatical setting of write permissions of the .lyx
19756 file can be set through
19761 ile\SpecialChar \menuseparator
19767 \begin_inset space ~
19770 Control\SpecialChar \menuseparator
19775 oggle locking property
19778 This command is active only when the file is not locked on the svn server
19780 you need to check-out before proceeding).
19783 \begin_layout Labeling
19784 \labelwidthstring 00.00.0000
19786 \begin_inset space ~
19792 \begin_layout Labeling
19793 \labelwidthstring 00.00.0000
19796 svn propset svn:needs-lock ON "<file-name>"
19799 \begin_layout Labeling
19800 \labelwidthstring 00.00.0000
19803 svn propdel svn:needs-lock "<file-name>"
19806 \begin_layout Subsubsection
19807 \begin_inset CommandInset label
19809 name "sub:VCS-Revision-Information"
19813 Revision Information in Documents
19816 \begin_layout Standard
19817 There are more possibilities how to activate revision information in our
19821 \begin_layout Itemize
19822 LyX supports directly:
19826 \begin_layout Itemize
19827 tree revision information (
19828 \begin_inset Flex CharStyle:Code
19831 \begin_layout Plain Layout
19838 The result is the output of the
19839 \begin_inset Flex CharStyle:Code
19842 \begin_layout Plain Layout
19848 command, the following table gives you an idea, how to read the results.
19851 \begin_layout Standard
19853 \begin_inset Tabular
19854 <lyxtabular version="3" rows="6" columns="2">
19855 <features tabularvalignment="middle">
19856 <column alignment="center" valignment="top" width="0">
19857 <column alignment="center" valignment="top" width="0">
19859 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19862 \begin_layout Plain Layout
19868 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19871 \begin_layout Plain Layout
19879 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19882 \begin_layout Plain Layout
19888 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19891 \begin_layout Plain Layout
19892 mixed revision working copy
19899 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19902 \begin_layout Plain Layout
19908 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19911 \begin_layout Plain Layout
19912 modified working copy
19919 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19922 \begin_layout Plain Layout
19928 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19931 \begin_layout Plain Layout
19932 switched working copy
19939 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19942 \begin_layout Plain Layout
19948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19951 \begin_layout Plain Layout
19952 partial working copy, from a sparse checkout
19959 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19962 \begin_layout Plain Layout
19968 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19971 \begin_layout Plain Layout
19972 mixed revision, modified, switched working copy
19985 \begin_layout Itemize
19986 file revision information.
19987 The result comes from parsing the output of
19988 \begin_inset Flex CharStyle:Code
19991 \begin_layout Plain Layout
19993 \begin_inset space ~
19997 \begin_inset space ~
20001 \begin_inset space ~
20010 Supported flags are:
20014 \begin_layout Itemize
20015 version number of the last commit (
20016 \begin_inset Flex CharStyle:Code
20019 \begin_layout Plain Layout
20028 \begin_layout Itemize
20029 author of the last commit (
20030 \begin_inset Flex CharStyle:Code
20033 \begin_layout Plain Layout
20042 \begin_layout Itemize
20043 date of the last commit (
20044 \begin_inset Flex CharStyle:Code
20047 \begin_layout Plain Layout
20056 \begin_layout Itemize
20057 time of the last commit (
20058 \begin_inset Flex CharStyle:Code
20061 \begin_layout Plain Layout
20071 \begin_layout Standard
20072 You can obtain this info via InsetInfo (e.g.
20074 \begin_inset Flex CharStyle:Code
20077 \begin_layout Plain Layout
20078 info-insert buffer vcs-date
20084 The information will be available only when you have the file stored under
20085 svn managment (i.e.
20087 \begin_inset Flex CharStyle:Code
20090 \begin_layout Plain Layout
20096 directory is available with your document).
20100 \begin_layout Itemize
20101 Another---a hacking one---possibility is to use svn keywords
20105 \begin_layout Plain Layout
20106 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20112 In short -- you set file keywords property (e.g.
20115 svn propset svn:keywords 'Rev' file.lyx
20117 ) and then paste keyword ERT
20121 \begin_layout Plain Layout
20122 This is an easy way how to ensure that LyX won't break the line in the middle
20128 tag in your document (e.g.
20133 \begin_layout Plain Layout
20141 This way svn client will automatically substitute revision number (e.g.
20146 \begin_layout Plain Layout
20153 ) after each update and commit.
20154 There are more problems with this approach.
20155 Firstly, the '$' character is used in TeX world for math equations, so
20156 any occurence of math formula
20157 \begin_inset Formula $Rev$
20161 \begin_inset Formula $Rev:59$
20164 in your LyX document.
20165 Similarly for other keywords like Id, Date, Author, etc.
20166 Secondly svn output is dependent on your locales, so its very easy that
20167 svn would produce some problematic strings once Date is used.
20168 Thirdly you get the whole 'Rev: 59' string in your document instead of
20170 Until subversion implements user's custom keywords it will be hard to use
20171 this approach reliably or let LyX to support it directly.
20174 \begin_layout Subsection
20175 SVN and Windows Environment
20178 \begin_layout Quote
20179 My inclination is to say that if the user cannot figure out the command
20180 line operations on their own fairly quickly, they would be well advised
20181 to use TortoiseSVN.
20187 \begin_layout Subsubsection
20191 \begin_layout Standard
20192 In addition to installing LyX, and having access to a Subversion repository,
20193 the user will need to install the Subversion client program.
20194 A Windows installer for the client program is available from
20195 \begin_inset CommandInset href
20198 target "http://www.collab.net/nonav/downloads/subversion/"
20203 The user may also want to install
20204 \begin_inset CommandInset href
20207 target "http://tortoisesvn.tigris.org/"
20211 , which integrates Subversion operations into the context (rightclick) menu
20212 of Windows Explorer.
20213 Operations done outside LyX will typically be more convenient using the
20214 Explorer context menu.
20215 Note that TortoiseSVN is not a replacement for the client program, which
20216 is what LyX itself will use.
20219 \begin_layout Subsubsection
20220 Bringing a document under Subversion control
20223 \begin_layout Standard
20224 Before a LyX document can be brought under version control in Subversion,
20225 its parent directory needs to be under version control.
20226 If the document is being added to a project already in the repository,
20227 this is accomplished by checking the project out to the directory where
20228 the new document will be placed.
20229 If the project itself is not yet under version control (for instance, if
20230 this document starts a new project), the directory must be imported into
20232 This is done outside LyX.
20233 Both import and checkout are easily accomplished from the Explorer context
20234 menu using TortoiseSVN, or alternatively can be done using the command
20235 line client at a DOS prompt.
20236 The procedure for importing the project using TortoiseSVN is described
20237 below, assuming an existing repository and a new project being started
20245 For information on using the Subversion client program, run
20252 \begin_layout Enumerate
20259 in Windows Explorer, right click it, and select
20261 TortoiseSVN > Repo-browser
20264 If necessary, adjust the URL for the repository, then click OK.
20267 \begin_layout Enumerate
20268 Right click the level of the repository under which you want to place the
20269 new project folder (typically the top level) and click
20271 Create folder\SpecialChar \ldots{}
20274 Supply a name for the project folder and click OK.
20275 Add a message for the log file if desired, then click OK again.
20276 The new project folder should appear in the repository.
20277 Finally, click OK again to exit the repository browser.
20280 \begin_layout Enumerate
20281 Once again right click
20287 , this time selecting SVN Checkout\SpecialChar \ldots{}
20288 Select the URL of the project folder
20289 you just created in the repository, and set the checkout directory to
20297 You will be warned about a non-empty folder; click OK to proceed.
20298 You should now have a
20309 \begin_layout Enumerate
20310 Create or open your document in LyX and click
20315 ile\SpecialChar \menuseparator
20321 \begin_inset space ~
20324 Control\SpecialChar \menuseparator
20332 Add a log message and click OK to commit the document to version control.
20335 \begin_layout Standard
20336 From this point onward, you should have full functionality in the
20341 ile\SpecialChar \menuseparator
20347 \begin_inset space ~
20353 You also have the option of checking the document in and out, viewing its
20355 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20356 client program from a command prompt.
20359 \begin_layout Subsubsection
20360 SSH tunel used with SVN under Windows
20363 \begin_layout Standard
20364 Compared to linux setting svn client to communicate over ssh under Windows
20365 is rather troublesome task.
20366 We will at least make some hints how to setup client side but former knowledge
20367 about ssh and Windows command line is needed, also be prepared for a great
20368 deal of frustration...
20371 \begin_layout Enumerate
20372 Get svn client for windows, as described in previous sections.
20373 When it is fresh install run some svn command (e.g.
20375 \begin_inset Flex CharStyle:Code
20378 \begin_layout Plain Layout
20384 ) to have created config files, which you will need to change later on.
20387 \begin_layout Enumerate
20388 Choose ssh client for Windows.
20389 There are more possibilities, we will use the one from Putty tools
20393 \begin_layout Plain Layout
20394 \begin_inset Flex URL
20397 \begin_layout Plain Layout
20399 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20410 You will need to automatize connection, so client doesn't ask for any password
20412 To keep things easy we will use only keys without any additional password
20417 \begin_layout Enumerate
20419 \begin_inset Flex CharStyle:Code
20422 \begin_layout Plain Layout
20429 Save your private .ppk key file and put the public one on the server side.
20430 In case the SVN server runs on linux, note that the format of the public
20431 key is not compatible with linux openssh and you will need to direcly copy-past
20432 e the key from the “
20434 Public key for pasting into OpenSSH authorized_keys file
20436 :” edit field into the server's
20437 \begin_inset Flex CharStyle:Code
20440 \begin_layout Plain Layout
20441 ~/.ssh/authorized_keys
20447 \begin_inset Flex CharStyle:Code
20450 \begin_layout Plain Layout
20459 \begin_layout Enumerate
20461 \begin_inset Flex CharStyle:Code
20464 \begin_layout Plain Layout
20471 In the SVN config file
20475 \begin_layout Plain Layout
20476 Exact path depends on Windows version, usually somewhere around
20477 \begin_inset Flex CharStyle:Code
20480 \begin_layout Plain Layout
20483 Documents and Settings
20497 \begin_inset Flex CharStyle:Code
20500 \begin_layout Plain Layout
20515 , section [tunnels], setup ssh command, e.g.
20517 \begin_inset Flex CharStyle:Code
20520 \begin_layout Plain Layout
20521 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20530 \begin_layout Plain Layout
20531 It will usually take a lot of time to get exact command right and it depends
20533 For example do not have some remote server saved as a default session in
20535 If things fail, try to connect via plink without SVN first.
20544 \begin_layout Enumerate
20545 Checkout the SVN archive, e.g.
20547 \begin_inset Flex CharStyle:Code
20550 \begin_layout Plain Layout
20551 svn co svn+ssh://user@server/repository_path
20559 \begin_layout Subsubsection
20561 \change_inserted 1 1274738367
20562 End-of-Line Conversions
20565 \begin_layout Standard
20567 \change_inserted 1 1274738433
20568 When the collsraborators are mixing Linux and Windows environments, LyX
20569 will use different line endings inside the .lyx files.
20570 This is not problem as far as LyX functionality is concerned, but the commit
20571 diffs will be huge and merge-conflicts prone.
20572 Fortunately SVN itself knows
20576 \begin_layout Plain Layout
20578 \change_inserted 1 1274738731
20579 \begin_inset Flex URL
20582 \begin_layout Plain Layout
20584 \change_inserted 1 1274738731
20586 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20600 how to deal with CR/LF problems when switching .lyx files to the
20601 \begin_inset Flex CharStyle:Code
20604 \begin_layout Plain Layout
20606 \change_inserted 1 1274738399
20618 \begin_layout Plain Layout
20620 \change_inserted 1 1274738457
20622 \begin_inset Flex CharStyle:Code
20625 \begin_layout Plain Layout
20627 \change_inserted 1 1274738457
20628 svn propset svn:eol-style native FILE_NAME
20645 \begin_layout Subsection
20649 \begin_layout Standard
20650 With the recent addition of the vc-command function LyX power users are
20651 allowed to create their own commands for revision control.
20654 \begin_layout Standard
20655 As an example you can see how two TortoiseSVN commands could be integrated
20659 \begin_layout Description
20661 \begin_inset Flex CharStyle:Code
20664 \begin_layout Plain Layout
20665 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20673 \begin_layout Description
20675 \begin_inset Flex CharStyle:Code
20678 \begin_layout Plain Layout
20679 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20687 \begin_layout Section
20688 Literate Programming
20691 \begin_layout Standard
20696 (kayvan@sylvan.com)
20700 original documentation written by
20702 Edmar Wienskoski Jr.
20705 (edmar-w-jr@technologist.com)
20708 \begin_layout Subsection
20712 \begin_layout Standard
20713 The main purpose of this documentation is to show you how to use LyX for
20714 literate programming.
20715 Where it is assumed that you are familiar with this programming technique,
20717 \begin_inset Quotes eld
20721 \begin_inset Quotes erd
20725 \begin_inset Quotes eld
20729 \begin_inset Quotes erd
20733 If that is not the case, please follow the web links provided in the following
20735 There is a lot of good documentation out there covering old development
20736 history to the latest tools tips.
20739 \begin_layout Standard
20740 It is also assumed that you are familiar with LyX itself to a point that
20741 you are comfortable changing your LyX preferences, and X resources file.
20742 If that is not the case please refer to other LyX documentation to cover
20743 your specific needs.
20746 \begin_layout Subsection
20747 Literate Programming
20750 \begin_layout Standard
20751 From the Literate Programming FAQ:
20754 \begin_layout Quotation
20755 Literate programming is the combination of documentation and source together
20756 in a fashion suited for reading by human beings.
20757 In fact, literate programs should be enjoyable reading, even inviting!
20758 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20759 and documentation in a single file.
20760 Literate programming tools then parse the file to produce either readable
20761 documentation or compilable source.
20762 The WEB style of literate programming was created by D.
20763 \begin_inset space \thinspace{}
20767 Knuth during the development of his TeX typesetting software.
20771 \begin_layout Standard
20772 Another excerpt says:
20775 \begin_layout Quotation
20778 How is literate programming different from verbose commenting?
20781 \begin_layout Quotation
20782 There are three distinguishing characteristics.
20783 In order of importance, they are:
20787 \begin_layout Itemize
20788 flexible order of elaboration
20791 \begin_layout Itemize
20792 automatic support for browsing
20795 \begin_layout Itemize
20796 typeset documentation, especially diagrams and mathematics
20800 \begin_layout Standard
20801 Now that I sparked your curiosity, take a look in the references.
20804 \begin_layout Subsubsection
20808 \begin_layout Standard
20809 The complete Literate Programming FAQ can be found at:
20812 \begin_layout Quote
20813 Literate Programming FAQ
20814 \begin_inset Flex URL
20817 \begin_layout Plain Layout
20819 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20827 \begin_layout Standard
20828 The FAQ lists 23 (twenty three!) different literate programming tools.
20829 Where some are specialized or
20830 \begin_inset Quotes eld
20834 \begin_inset Quotes erd
20837 for particular programming languages, while other have general scope.
20842 for my own use for several reasons:
20845 \begin_layout Itemize
20846 It can generate the documentation either in LaTeX or HTML.
20849 \begin_layout Itemize
20850 It has a open architecture, i.
20851 \begin_inset space \thinspace{}
20855 \begin_inset space \space{}
20858 it is easy to plug in new filters and to perform special processing that
20863 \begin_layout Itemize
20864 There is a good selection of filters available already (the HTML is one
20868 \begin_layout Itemize
20872 \begin_layout Standard
20873 The Noweb web page can be found at:
20876 \begin_layout Quote
20878 \begin_inset Flex URL
20881 \begin_layout Plain Layout
20883 http://www.cs.virginia.edu/~nr/noweb/
20891 \begin_layout Standard
20892 Starting from there you can reach many other interesting links and even
20893 some literate program examples.
20896 \begin_layout Subsection
20897 LyX and Literate Programming
20900 \begin_layout Standard
20901 The LyX support for Literate Programming is provided by using the generic
20902 LyX converters mechanism.
20903 This support is provided in a
20904 \begin_inset Quotes eld
20908 \begin_inset Quotes erd
20912 \begin_inset space \thinspace{}
20916 \begin_inset space \space{}
20919 you will be able to use this new LyX feature with some other literate programmin
20920 g tool of your choice by just changing your LyX preferences.
20923 \begin_layout Subsubsection
20924 Generating documents and code (weaving and tangling)
20927 \begin_layout Paragraph
20928 Selecting the document class
20931 \begin_layout Standard
20932 If you have installed Noweb and LyX successfully, whenever you open a new
20933 document or try to change the document class of an existing one, you will
20934 find that there are three new document classes available:
20937 \begin_layout Itemize
20941 \begin_layout Itemize
20945 \begin_layout Itemize
20949 \begin_layout Standard
20950 You must select one of them to create your literate documents from.
20954 \begin_layout Standard
20955 Note that literate documents are not limited to these three classes.
20956 New classes can be generated from other styles like letter or in combination
20957 with other class variations like Article (AMS).
20958 If you have special needs that cannot be covered by one of the existing
20959 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20960 will arrange to insert a new entry, or teach you how to do it.
20964 \begin_layout Plain Layout
20965 It is very simple, it involves the creation of a file with four lines, and
20966 re-running of the auto configuration.
20971 Moreover, if you use a literate tool other than Noweb you may need to create
20972 a new set of document classes for it.
20975 \begin_layout Paragraph
20979 \begin_layout Standard
20980 LyX enables you to write code with a layout named
20988 \begin_layout Plain Layout
20989 The equivalent Noweb term is
20990 \begin_inset Quotes eld
20994 \begin_inset Quotes erd
20998 For historical reasons, I got used to the term
20999 \begin_inset Quotes eld
21003 \begin_inset Quotes erd
21006 introduced by other literate tool named Nuweb, which I used for many years
21007 before rendering myself to Noweb.
21012 Noweb delimits scraps like this:
21015 \begin_layout LyX-Code
21019 \begin_layout LyX-Code
21023 \begin_layout LyX-Code
21027 \begin_layout LyX-Code
21031 \begin_layout LyX-Code
21035 \begin_layout Standard
21036 The problem is that whatever is written in between the << and the
21040 must be taken literally, i.
21041 \begin_inset space \thinspace{}
21045 \begin_inset space \space{}
21048 LyX should be prevented from making any special interpretation of what has
21050 This is handled by a special layout named Scrap, that works like a normal
21051 paragraph but has a free spacing capability.
21054 \begin_layout Standard
21055 The down side of the Scrap paragraph layout is that consecutive paragraphs
21056 of code will be spaced with one empty line in the source code and also
21057 in the printed documentation.
21058 The work around is to enter each line of code within a single Scrap, with
21059 a newline (ctrl-return).
21060 The example above will look like this:
21064 \begin_layout Plain Layout
21065 If you have a printed version of this document you will not see any difference
21066 between the previous example and this one.
21074 \begin_layout LyX-Code
21076 \begin_inset Newline newline
21080 \begin_inset Newline newline
21084 \begin_inset Newline newline
21088 \begin_inset Newline newline
21094 \begin_layout Standard
21095 This layout works fine.
21096 The only real inconvenience is that you have to type ctrl-return instead
21101 \begin_layout Plain Layout
21102 It is in my list of
21103 \begin_inset Quotes eld
21107 \begin_inset Quotes erd
21118 \begin_layout Standard
21119 As a special note, you can also use the
21120 \begin_inset Quotes eld
21124 \begin_inset Quotes erd
21127 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21131 \begin_layout LyX-Code
21133 \begin_inset Newline newline
21136 def some_function(args):
21137 \begin_inset Newline newline
21140 "This is the doc string for this function."
21141 \begin_inset Newline newline
21144 print "My args: ", args
21147 \begin_layout LyX-Code
21148 @ %def some_function
21151 \begin_layout Standard
21152 For an example of this usage and the resulting cross-reference output, look
21153 at the Literate python program in
21155 LIBDIR/examples/listerrors.lyx
21157 which should make this all clear.
21160 \begin_layout Paragraph
21161 Generating the documentation
21164 \begin_layout Standard
21165 At this point you already have a new document file with a proper document
21166 class, and with some code and text on it.
21167 How do I print it? The answer is simple, you select
21169 View\SpecialChar \menuseparator
21173 Just like you would do for a plain document.
21174 No special procedure is required.
21177 \begin_layout Standard
21178 To help orientate you, I will now explain what happens inside LyX:
21181 \begin_layout Enumerate
21184 Update\SpecialChar \menuseparator
21187 menu option is chosen, a LaTeX file is generated.
21192 \begin_layout Standard
21193 If the document is of any literate class the generated file will be named
21194 with an extension name defined by the
21195 \begin_inset Quotes eld
21199 \begin_inset Quotes erd
21202 format (defined in the Preferences panel), otherwise the file will have
21211 \begin_layout Enumerate
21212 Note that the only difference so far is in the name of the file, no special
21213 processing is required by LyX.
21214 Given that you formatted the code using the Scrap layout that, by itself,
21215 takes care of the business.
21218 \begin_layout Enumerate
21219 If the document is of any literate class LyX will then use the internal
21220 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21224 \begin_layout Plain Layout
21225 The converters are defined in the
21227 Tools\SpecialChar \menuseparator
21231 \begin_inset Quotes eld
21235 \begin_inset Quotes erd
21247 manual for general information about converters.
21252 to generate the LaTeX file.
21256 \begin_layout Standard
21257 Otherwise it will just skip this step.
21261 \begin_layout Enumerate
21262 Finally, LaTeX is invoked and the regular post processing continues as in
21266 \begin_layout Standard
21267 Independence from a particular
21268 \begin_inset Quotes eld
21272 \begin_inset Quotes erd
21275 is easily achieved by changing the commands that are run by the various
21279 \begin_layout Paragraph
21280 Generating the code
21283 \begin_layout Standard
21284 When the build menu option is chosen or the corresponding button in the
21285 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21286 Next, LyX invokes the
21291 This converter needs to be defined by the user and is not installed by
21292 default, though the Program format is.
21293 This converter (like any other converter) will have two parts:
21296 \begin_layout Enumerate
21297 The converter program itself.
21298 This program performs the conversion from the one format to the other (in
21299 this case, from the Noweb format to the Program pseudo-format).
21302 \begin_layout Enumerate
21303 The error log parser.
21304 This is a program whose sole purpose is to rewrite error messages in a
21305 format that LyX understands.
21306 This makes it possible for LyX to place error boxes in the right places
21307 in the file buffer.
21310 \begin_layout Standard
21311 The first part, the
21312 \begin_inset Quotes eld
21316 \begin_inset Quotes erd
21319 setting, should be set to
21320 \begin_inset Quotes eld
21328 \begin_inset Quotes erd
21332 This basically means that LyX will call
21333 \begin_inset Quotes eld
21337 \begin_inset Quotes erd
21340 (a program or script) with the name of the Noweb file (normally a file
21341 in the LyX temp directory).
21345 \begin_layout Standard
21346 This is an implementation of
21347 \begin_inset Quotes eld
21351 \begin_inset Quotes erd
21354 that you can place in a directory on your path:
21357 \begin_layout LyX-Code
21361 \begin_layout LyX-Code
21365 \begin_layout LyX-Code
21366 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21369 \begin_layout Standard
21370 The next part of the converter setting is the
21371 \begin_inset Quotes eld
21375 \begin_inset Quotes erd
21378 which is to be set to
21379 \begin_inset Quotes eld
21384 parselog=listerrors
21387 \begin_inset Quotes erd
21391 This will run any errors that are generated by the
21392 \begin_inset Quotes eld
21396 \begin_inset Quotes erd
21399 process through the
21400 \begin_inset Quotes eld
21404 \begin_inset Quotes erd
21410 \begin_layout Standard
21411 The converter code looks in
21419 then on the path for the
21420 \begin_inset Quotes eld
21424 \begin_inset Quotes erd
21430 \begin_layout Standard
21431 The build will normally take place in LyX's temporary directory, so the
21432 files produced by the conversion will be in that directory.
21433 LyX will copy out what it regards as the `main' file, but the
21437 conversion may produce several files, and so most of these would then be
21438 deleted when LyX was closed.
21439 The present solution is to use a `copier',
21443 \begin_layout Plain Layout
21452 manual for information on these.
21461 script in its default mode, so that the entire contents of the temporary
21462 directory is copied.
21463 More will get copied than is needed, to be sure, but nothing will be lost.
21464 If, however, you know what extensions the generated files will have, this
21465 can be improved by using the
21474 This option takes a comma-separated list of extensions to copy.
21475 So, for example, if the conversion will generate only files with the extensions
21484 , then the correct definition would be:
21487 \begin_layout LyX-Code
21488 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21491 \begin_layout Standard
21492 The result will be that only files with these two extensions will be copied
21496 \begin_layout Paragraph
21497 Build instructions in the document
21500 \begin_layout Standard
21501 The last piece of the integration between LyX and noweb is the
21502 \begin_inset Quotes eld
21506 \begin_inset Quotes erd
21510 Generally, the instructions for building your program should be embedded
21511 in a scrap of its own.
21513 \begin_inset Quotes eld
21517 \begin_inset Quotes erd
21520 above uses the notangle command to look for this scrap (called
21521 \begin_inset Quotes eld
21525 \begin_inset Quotes erd
21528 ) and runs its contents through
21529 \begin_inset Quotes eld
21533 \begin_inset Quotes erd
21539 \begin_layout Standard
21540 Typically, such a scrap would look something like this:
21543 \begin_layout LyX-Code
21545 \begin_inset Newline newline
21549 \begin_inset Newline newline
21553 \begin_inset Newline newline
21556 if [ -z "${NOWEB_SOURCE}" ]
21557 \begin_inset Newline newline
21561 \begin_inset Newline newline
21564 NOWEB_SOURCE=myfile.nw
21565 \begin_inset Newline newline
21569 \begin_inset Newline newline
21573 code to extract files ...]
21574 \begin_inset Newline newline
21578 code to compile files ...]
21579 \begin_inset Newline newline
21585 \begin_layout Standard
21588 LIBDIR/examples/listerrors.lyx
21592 LIBDIR/examples/Literate.lyx
21594 which implement two versions of the
21595 \begin_inset Quotes eld
21599 \begin_inset Quotes erd
21602 program for some illustrations of how all of these pieces go together or
21605 LIBDIR/examples/noweb2lyx.lyx.
21608 Interestingly, these three files show off the language-indepence of the
21609 LyX literate programming support since they are written in Python, C and
21613 \begin_layout Subsubsection
21617 \begin_layout Standard
21618 All the Literate Programming support is configured by the
21620 Tools\SpecialChar \menuseparator
21624 \begin_inset Quotes eld
21628 \begin_inset Quotes erd
21632 The important parts are:
21635 \begin_layout Description
21637 \begin_inset space ~
21641 \begin_inset Quotes eld
21645 \begin_inset Quotes erd
21649 \begin_inset space ~
21652 format Set up via the Formats tab, this is where the Noweb-specific pieces
21662 , the file extension is set to
21667 This tells LyX to create a file with a
21671 extension in the first step of the conversion process.
21674 \begin_layout Description
21676 \begin_inset space ~
21684 \begin_inset space ~
21687 format This is an empty format whose sole purpose is to be the endpoint
21688 of a conversion (which then allows us to set up a converter for it).
21691 \begin_layout Description
21700 This converter performs the
21701 \begin_inset Quotes eld
21705 \begin_inset Quotes erd
21708 of the literate document.
21709 For Noweb, it is set to
21710 \begin_inset Quotes eld
21715 noweave -delay -index $$i > $$o
21718 \begin_inset Quotes erd
21724 \begin_layout Description
21734 \begin_inset Quotes eld
21738 \begin_inset Quotes erd
21742 As stated above, the Converter is set to
21743 \begin_inset Quotes eld
21751 \begin_inset Quotes erd
21754 , with Flags set to
21755 \begin_inset Quotes eld
21760 originaldir,parselog=listerrors
21763 \begin_inset Quotes erd
21769 \begin_layout Subsubsection
21773 \begin_layout Standard
21774 There is also a new function implemented in the LyX server, the
21775 \begin_inset Quotes eld
21778 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21782 \begin_layout Standard
21783 When debugging code with ddd/gdb, it is possible to invoke a text editor
21784 at the current execution position with a single key stroke.
21785 The default ddd configuration for that is shift-ctrl-V.
21786 It happens that you can define the editor command line invocation in ddd
21789 Edit\SpecialChar \menuseparator
21790 Preferences\SpecialChar \menuseparator
21793 dialog and changing the "Edit Sources" entry.
21796 \begin_layout Standard
21797 I take advantage of the new created LyX server function and this ddd feature,
21799 \begin_inset Quotes eld
21803 \begin_inset Quotes erd
21809 \begin_layout LyX-Code
21810 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21813 \begin_layout Standard
21814 With this, whenever you are using ddd and find a point in the program that
21815 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21816 ddd you forward this information to LyX through the LyX server and then
21817 the LyX window will show the same file with the cursor at the same position
21818 ddd was pointing to.
21819 No more guessing or long scrolling to locate a point in the program back
21823 \begin_layout Standard
21824 Note however that you must enable the LyX server to get this feature working
21825 (it is disabled by default).
21826 You can enable it in
21838 ) by entering in the
21843 \begin_inset Quotes eld
21848 /home/<your-home-directory>/.lyx/lyxpipe
21851 \begin_inset Quotes erd
21857 \begin_layout Standard
21858 Read the LyX server documentation in the
21860 Customization Manual
21862 for further information.
21865 \begin_layout Subsubsection
21869 \begin_layout Standard
21870 There are six new buttons that can be added to your LyX toolbar.
21871 Five of these buttons are short cuts to layout styles:
21892 The last one is a short cut to the
21893 \begin_inset Quotes eld
21897 \begin_inset Quotes erd
21904 \begin_layout Standard
21905 LyX has a range of buttons that are available for tool bar customization.
21906 In my toolbar I like to combine the six short cuts above with two more:
21911 \SpecialChar \menuseparator
21916 \SpecialChar \menuseparator
21923 View\SpecialChar \menuseparator
21927 Here is how it looks like:
21930 \begin_layout LyX-Code
21934 \begin_layout LyX-Code
21938 \begin_layout LyX-Code
21939 Icon "layout Standard"
21942 \begin_layout LyX-Code
21943 Icon "layout Section"
21946 \begin_layout LyX-Code
21947 Icon "layout LaTeX"
21950 \begin_layout LyX-Code
21951 Icon "layout LyX-Code"
21954 \begin_layout LyX-Code
21955 Icon "layout Scrap"
21958 \begin_layout LyX-Code
21962 \begin_layout LyX-Code
21966 \begin_layout LyX-Code
21967 Icon "buffer-typeset"
21970 \begin_layout LyX-Code
21971 Icon "build-program"
21974 \begin_layout LyX-Code
21978 \begin_layout LyX-Code
21982 \begin_layout LyX-Code
21986 \begin_layout LyX-Code
21990 \begin_layout LyX-Code
21994 \begin_layout Subsubsection
21995 Colors customization
21998 \begin_layout Standard
21999 There are a number of colors in LyX that can be customized in
22004 One of the things that bothers people is the LaTeX font color.
22005 The default color is red, since the scraps uses LaTeX font, and there is
22006 a lot of scraps in literate documents, you may get tired of seeing everything
22008 You can change it by going to the tabs
22017 \begin_layout Standard
22018 The next thing is the visible presence of the newline character in the screen.
22019 You can choose the color of this particular character and make it blend
22021 I recommend you choosing a color that is close to the background but not
22022 equal, that way you still can see it is there, but it is not bothering
22027 \begin_layout Chapter
22028 Secrets of the LaTeX Masters
22029 \begin_inset CommandInset label
22038 \begin_layout Standard
22039 Though LyX is a powerful tool, it cannot hope to support everything that
22040 can be done with pure TeX/LaTeX.
22041 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22042 as long as you are not afraid to use that
22043 \begin_inset Quotes eld
22047 \begin_inset Quotes erd
22050 button on the toolbar or add things to the LaTeX preamble.
22051 This section lists some tips, tricks, and otherwise cool ideas to give
22052 your document that extra little flair.
22055 Do try this at home
22057 , just start with something a little smaller and less important than your
22061 \begin_layout Standard
22062 Most ideas in this section require less common files in your LaTeX installation.
22063 If you have a system like teTeX, most will already be available.
22064 A few, however, will need to be downloaded from one of the CTAN archives.
22065 Often, there are several ways to do something, or several LaTeX style files
22066 which do the same thing.
22067 We do not endorse one choice over another, we simply claim that we have
22068 done a particular task with a particular file.
22069 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22072 \begin_layout Section
22076 \begin_layout Standard
22079 Lars Gullik Bjønnes
22082 \begin_layout Subsection
22086 \begin_layout Standard
22087 The aim for this chapter
22091 \begin_layout Plain Layout
22092 Editor's note: Lars' original chapter was a masterful description of how
22098 However, it was too long to flow smoothly in this document.
22099 I have therefore chosen to excerpt the most important sections here (sorry,
22100 Lars); you can read the original chapter (and more of the story!) in the
22103 examples/multicol.lyx
22111 is to show how the LaTeX package
22115 can be used in a LyX document.
22116 As LyX doesn't support the
22120 package natively yet, we have to use some small hacks.
22121 By reading this section it should be obvious how to do this.
22124 \begin_layout Subsection
22128 \begin_layout Standard
22133 package allows switching between one and multicolumn format on the same
22135 Footnotes are handled correctly (for the most part), but will be placed
22136 at the bottom of the page and not under each column.
22137 LaTeX's float mechanism, however, is partly disabled in the current implementat
22139 At the moment only page-wide floats can be used within the scope of the
22143 \begin_layout Subsection
22147 \begin_layout Subsubsection
22151 \begin_layout Standard
22152 If you want to have two columns in your text, you have use LaTeX mode to
22157 begin{multicols}{2}
22159 at the point where you want the two column layout to start, and then
22165 where you want it to end.
22169 \begin_layout Standard
22173 \begin_layout Plain Layout
22177 begin{multicols}{2}
22185 \begin_layout Standard
22190 The Adventure of the Empty House
22193 \begin_inset Newline newline
22198 Sir Arthur Conan Doyle
22201 \begin_layout Standard
22204 It was in the spring of the year 1894 that all London was interested, and
22205 the fashionable world dismayed, by the murder of the Honourable Ronald
22206 Adair under most unusual and inexplicable circumstances.
22207 The public has already learned those particulars of the crime which came
22208 out in the police investigation, but a good deal was suppressed upon that
22209 occasion, since the case for the prosecution was so overwhelmingly strong
22210 that it was not necessary to bring forward all the facts.
22211 Only now, at the end of nearly ten years, am I allowed to supply those
22212 missing links which make up the whole of that remarkable chain.
22213 The crime was of interest in itself, but that interest was as nothing to
22214 me compared to the inconceivable sequel, which afforded me the greatest
22215 shock and surprise of any event in my adventurous life.
22216 Even now, after this long interval, I find myself thrilling as I think
22217 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22218 ty which utterly submerged my mind.
22219 Let me say to that public, which has shown some interest in those glimpses
22220 which I have occasionally given them of the thoughts and actions of a very
22221 remarkable man, that they are not to blame me if I have not shared my knowledge
22222 with them, for I should have considered it my first duty to do so, had
22223 I not been barred by a positive prohibition from his own lips, which was
22224 only withdrawn upon the third of last month.
22227 \begin_layout Standard
22231 \begin_layout Plain Layout
22243 \begin_layout Subsubsection
22247 \begin_layout Standard
22248 The same pattern is used when you want more than two columns:
22251 \begin_layout Standard
22255 \begin_layout Plain Layout
22259 begin{multicols}{3}
22267 \begin_layout Standard
22270 It can be imagined that my close intimacy with Sherlock Holmes had interested
22271 me deeply in crime, and that after his disappearance I never failed to
22272 read with care the various problems which came before the public.
22273 And I even attempted, more than once, for my own private satisfaction,
22274 to employ his methods in their solution, though with indifferent success.
22275 There was none, however, which appealed to me like this tragedy of Ronald
22277 As I read the evidence at the inquest, which led up to a verdict of willful
22278 murder against some person or persons unknown, I realized more clearly
22279 than I had ever done the loss which the community had sustained by the
22280 death of Sherlock Holmes.
22281 There were points about this strange business which would, I was sure,
22282 have specially appealed to him, and the efforts of the police would have
22283 been supplemented, or more probably anticipated, by the trained observation
22284 and the alert mind of the first criminal agent in Europe.
22285 All day, as I drove upon my round, I turned over the case in my mind and
22286 found no explanation which appeared to me to be adequate.
22287 At the risk of telling a twice-told tale, I will recapitulate the facts
22288 as they were known to the public at the conclusion of the inquest.
22291 \begin_layout Standard
22295 \begin_layout Plain Layout
22307 \begin_layout Standard
22308 You can have more than 3 columns if you want to, but that might not be very
22309 pleasant for the eye.
22312 \begin_layout Subsubsection
22313 Columns inside columns
22316 \begin_layout Standard
22317 You can even have columns inside columns:
22320 \begin_layout Standard
22324 \begin_layout Plain Layout
22328 begin{multicols}{2}
22336 \begin_layout Standard
22339 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22340 at that time governor of one of the Australian colonies.
22341 Adair's mother had returned from Australia to undergo the operation for
22342 cataract, and she, her son Ronald, and her daughter Hilda were living together
22346 \begin_layout Standard
22350 \begin_layout Plain Layout
22354 begin{multicols}{2}
22362 \begin_layout Standard
22365 The youth moved in the best society–had, so far as was known, no enemies
22366 and no particular vices.
22367 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22368 had been broken off by mutual consent some months before, and there was
22369 no sign that it had left any very profound feeling behind it.
22370 For the rest {sic} the man's life moved in a narrow and conventional circle,
22371 for his habits were quiet and his nature unemotional.
22372 Yet it was upon this easy-going young aristocrat that death came, in most
22373 strange and unexpected form, between the hours of ten and eleven-twenty
22374 on the night of March 30, 1894.
22377 \begin_layout Standard
22381 \begin_layout Plain Layout
22393 \begin_layout Standard
22396 Ronald Adair was fond of cards–playing continually, but never for such stakes
22398 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22399 It was shown that, after dinner on the day of his death, he had played
22400 a rubber of whist at the latter club.
22401 He had also played there in the afternoon.
22406 The evidence of those who had played with him– Mr.
22407 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22408 and that there was a fairly equal fall of the cards.
22409 Adair might have lost five pounds, but not more.
22410 His fortune was a considerable one, and such a loss could not in any way
22412 He had played nearly every day at one club or other, but he was a cautious
22413 player, and usually rose a winner.
22414 It came out in evidence that, in partnership with Colonel Moran, he had
22415 actually won as much as four hundred and twenty pounds in a sitting, some
22416 weeks before, from Godfrey Milner and Lord Balmoral.
22417 So much for his recent history as it came out at the inquest.
22420 \begin_layout Standard
22424 \begin_layout Plain Layout
22436 \begin_layout Standard
22437 Please do read the file
22439 examples/multicol.lyx
22441 for more advanced examples including column and header spacing, vertical
22442 separator lines, and more.
22445 \begin_layout Section
22450 Paragraph Environment
22451 \begin_inset Argument
22454 \begin_layout Plain Layout
22455 Numbering in Enumerate
22463 \begin_layout Standard
22469 \begin_layout Standard
22470 \begin_inset VSpace bigskip
22476 \begin_layout Standard
22478 The default numbering for the
22482 paragraph environment begins with Arabic numbers and ends with uppercase
22484 Suppose, however, you wanted a different type of numbering scheme.
22485 Here's a quickie example of how to change the numbering scheme:
22488 \begin_layout LyX-Code
22498 \begin_layout LyX-Code
22508 \begin_layout LyX-Code
22518 \begin_layout LyX-Code
22528 \begin_layout Standard
22529 \SpecialChar \ldots{}
22530 which changes the numbering scheme to uppercase Roman numerals, uppercase
22531 letters, Arabic numbers, and lowercase letter.
22534 \begin_layout Standard
22535 Additionally, the previous example also adds a little bit extra to the numbering
22537 For example, the first level label actually looks like:
22538 \begin_inset Quotes eld
22542 \begin_inset Quotes erd
22546 For ease of reading, we'll describe what the numbering schemes look like
22547 using a notation something like this: <
22548 \begin_inset Quotes eld
22552 \begin_inset Quotes erd
22556 \begin_inset space ~
22560 \begin_inset Quotes erd
22564 \begin_inset Quotes erd
22568 \begin_inset space ~
22572 \begin_inset Quotes erd
22576 \begin_inset Quotes erd
22580 \begin_inset space ~
22584 \begin_inset Quotes eld
22588 \begin_inset Quotes erd
22595 \begin_layout Standard
22596 As you can see in the example, there is a label command for each nesting
22603 \SpecialChar \ldots{}
22610 , as well as a counter,
22614 \SpecialChar \ldots{}
22620 There are also five
22621 \begin_inset Quotes eld
22625 \begin_inset Quotes erd
22658 , each of which take one counter as an argument.
22659 You can add characters before or after these, but there's no need to add
22663 \begin_layout Standard
22664 You can get really fancy with these.
22668 \begin_layout LyX-Code
22682 \begin_layout LyX-Code
22694 \begin_layout LyX-Code
22704 \begin_layout LyX-Code
22714 \begin_layout Standard
22715 produces the somewhat out of hand numbering scheme: <
22716 \begin_inset Quotes eld
22720 \begin_inset Quotes erd
22724 \begin_inset space ~
22728 \begin_inset Quotes erd
22732 \begin_inset Quotes erd
22736 \begin_inset space ~
22740 \begin_inset Quotes erd
22744 \begin_inset Quotes erd
22748 \begin_inset space ~
22752 \begin_inset Quotes eld
22756 \begin_inset Quotes erd
22763 \begin_layout Standard
22767 \begin_layout Section
22771 \begin_layout Standard
22777 \begin_layout Standard
22778 \begin_inset VSpace bigskip
22784 \begin_layout Standard
22789 \begin_layout Plain Layout
22795 tmpfont}{cmr17 scaled 2500}{
22807 \begin_layout Standard
22812 \begin_layout Plain Layout
22823 hose of you who like the style of old books probably also like
22824 \begin_inset Quotes eld
22828 \begin_inset Quotes erd
22831 —those large capital letters which begin each new chapter or section.
22832 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22833 know some plain TeX!) but does require a lot of work and many iterations,
22834 as you can see by all the ugly TeX-mode stuff at the beginning of this
22838 \begin_layout Standard
22842 \begin_layout Plain Layout
22848 bigdrop{-1em}{3}{ptmri}{T}+
22853 here is a much easier way of doing this, of course.
22862 ) package from CTAN allows a simple way to add such letters to your documents.
22863 Since this package is not a standard part of teTeX, I can't demonstrate
22864 it within this document, but if you copy this paragraph to a new document,
22866 \begin_inset Quotes eld
22876 \begin_inset Quotes erd
22879 and the pluses from the TeX code at the beginning of the paragraph, and
22884 usepackage{dropcaps}
22886 to your LaTeX preamble, you will get a nice Times Roman Italic
22887 \begin_inset Quotes eld
22891 \begin_inset Quotes erd
22894 , whose height is three lines of text and which protrudes 1 em into the
22896 (Make certain you have copied
22897 \begin_inset Quotes eld
22905 \begin_inset Quotes erd
22908 into a directory where TeX can see it.) The first argument is the amount
22909 of indentation; in this case the negative sign moves it into the margin.
22910 The second argument is the height of the letter in number of lines of text.
22911 The third argument is the font name: virtually anything which has a tfm
22912 file should work (wade through the
22914 .../texmf/fonts/tfm
22916 directory for possibilities).
22917 My personal favorite is
22918 \begin_inset Quotes eld
22926 \begin_inset Quotes erd
22929 , a fancy German font specifically designed for dropped capitals.
22930 The fourth argument is the letter (or letters) to be dropped.
22935 package also offers the
22941 command, as well as a slightly simplified
22950 \begin_layout Section
22951 Non-standard Paragraph Shapes
22954 \begin_layout Standard
22960 \begin_layout Standard
22961 \begin_inset VSpace bigskip
22967 \begin_layout Standard
22971 \begin_layout Plain Layout
22983 \begin_layout Standard
22987 \begin_layout Plain Layout
22996 \begin_layout Plain Layout
23010 \begin_layout Standard
23015 \begin_layout Plain Layout
23026 \begin_layout Plain Layout
23035 \begin_layout Plain Layout
23044 \begin_layout Plain Layout
23053 \begin_layout Plain Layout
23062 \begin_layout Plain Layout
23071 \begin_layout Plain Layout
23080 \begin_layout Plain Layout
23089 \begin_layout Plain Layout
23098 \begin_layout Plain Layout
23107 \begin_layout Plain Layout
23116 \begin_layout Plain Layout
23125 \begin_layout Plain Layout
23134 \begin_layout Plain Layout
23143 \begin_layout Plain Layout
23152 \begin_layout Plain Layout
23161 \begin_layout Plain Layout
23170 \begin_layout Plain Layout
23179 \begin_layout Plain Layout
23188 \begin_layout Plain Layout
23194 There are times when the tyranny of rectangular paragraphs must be overthrown.
23195 In such situations, a call to the delightful plain TeX command
23202 As you can see, completely arbitrary shapes can be laid out with a suitable
23203 set of linelength definitions.
23204 While this parshape may look a bit silly and useless, one could conceive
23205 of situations such as finely tuned dropped capitals, word wrapping around
23206 non-rectangular graphics, etc.
23207 which will benefit from such handcrafting.
23210 \begin_layout Standard
23211 \begin_inset VSpace bigskip
23217 \begin_layout Standard
23222 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23229 is the number of lines of text which define the paragraph.
23230 If there turn out to be fewer lines, the shape is truncated; if there are
23231 more, the excess lines have the same dimensions as the last line of the
23241 entries specify the indentation of the line from the left margin, and the
23242 length of the line as measured from that point.
23243 The shape applies only to the current paragraph; everything is reset to
23244 normal for the next paragraph.
23247 \begin_layout Standard
23251 \begin_layout Plain Layout
23263 \begin_layout Section
23267 \begin_layout Standard
23268 As you can see, the examples in this section range from the useful to the
23270 While I don't expect that anyone will ever need the paragraph shape demonstrate
23271 d in the last section, the important point is that you can do almost anything
23272 you want in LyX if you are willing to figure out how to do it in TeX and
23274 TeX is a fantastically powerful typesetting system and all that power is
23275 available to you since LyX uses it as its backend.