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, so the user can select
4449 a preferred format under Document\SpecialChar \menuseparator
4450 Settings\SpecialChar \menuseparator
4454 \begin_layout Itemize
4456 \begin_inset Newline newline
4459 MathML is a dialect of XML designed specifically for mathematics on the
4460 web, and it typically renders very well in browsers that support it.
4461 The disadvantage is that not all browsers support MathML, and support is
4462 not complete even in the Gecko-based browsers, such as Firefox.
4463 \begin_inset Newline newline
4466 If Lyx is unable to render a formula as MathML---for example, if the formula
4468 \begin_inset Flex CharStyle:Code
4471 \begin_layout Plain Layout
4477 package or ERT---then it will instead output the formula as an image.
4481 \begin_layout Itemize
4483 \begin_inset Newline newline
4487 \begin_inset Flex CharStyle:Code
4490 \begin_layout Plain Layout
4496 outputs math as HTML, styled by CSS.
4500 \begin_layout Plain Layout
4501 LyX has borrowed some of the CSS for its HTML output from
4502 \begin_inset Flex CharStyle:Code
4505 \begin_layout Plain Layout
4516 For simple formulae, this can work quite well, though with more complicated
4517 formulae it tends to break down.
4518 Still, this method has the advantage that it is very widely supported and
4519 so it may be appropriate for documents that contain only a little, fairly
4521 \begin_inset Newline newline
4524 If Lyx is unable to render a formula as MathML---for example, if the formula
4526 \begin_inset Flex CharStyle:Code
4529 \begin_layout Plain Layout
4535 package or ERT---then it will instead output the formula as an image.
4539 \begin_layout Itemize
4541 \begin_inset Newline newline
4545 \begin_inset Flex CharStyle:Code
4548 \begin_layout Plain Layout
4554 , LyX will output formulae as images, the very same images, in fact, that
4555 are used for instant preview.
4559 \begin_layout Plain Layout
4560 Instant preview does
4564 have to be on for images to be output, however.
4569 The advantage to this method is that the images are simply generated by
4570 LaTeX, so they are very accurate.
4571 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4572 so they do not scale terribly well, and one cannot copy them, etc.
4573 \begin_inset Newline newline
4576 If LyX for some reason fails to create an image for a formula (e.g., if a
4577 required LaTeX package is not installed), then it will fall back to outputing
4581 \begin_layout Itemize
4583 \begin_inset Newline newline
4586 Finally, LyX will happily output math as LaTeX.
4587 As well as being the output of last resort, this method can be used with
4589 \begin_inset CommandInset href
4592 target "http://www.math.union.edu/~dpvc/jsMath/"
4596 , which uses JavaScript to render LaTeX embedded in HTML documents.
4597 LyX wraps the LaTeX in either a
4598 \begin_inset Flex CharStyle:Code
4601 \begin_layout Plain Layout
4607 (for inline formulas) or
4608 \begin_inset Flex CharStyle:Code
4611 \begin_layout Plain Layout
4617 (for displayed formulas) with
4618 \begin_inset Flex CharStyle:Code
4621 \begin_layout Plain Layout
4627 , as is required for jsMath.
4630 \begin_layout Standard
4631 Again, one of these output methods must be selected under Document\SpecialChar \menuseparator
4632 Settings\SpecialChar \menuseparator
4634 By default, LyX outputs MathML.
4635 This is a document-wide setting, therefore.
4638 \begin_layout Standard
4639 Eventually, LyX will offer the user the option to select an alternate output
4640 method for a particular inset, say, one that isn't being rendered very
4642 But this is not yet supported.
4646 \begin_layout Plain Layout
4647 That said, since LyX falls back to images if the inset contains ERT, then
4648 one can force output as an image by putting some harmless ERT into the
4650 \begin_inset Formula $a=b\relax$
4661 \begin_layout Section
4662 Bibliography and Citations
4665 \begin_layout Standard
4666 XHTML output fully supports bibliographies and citations.
4670 \begin_layout Standard
4671 Citation labels are generated by the same machinery that generates LyX's
4672 on-screen labels, so the labels will look in the output much as they do
4673 in LyX, though better.
4674 If you are using numerical citations, then LyX will output numerical labels,
4675 such as [1] or [17], rather than simply showing the citation key in square
4676 brackets, as it does on-screen.
4677 If you are using author-year citations, then LyX will add lowercase letters
4678 to the years, just as BibTeX does, if it finds more than one citation for
4679 a given author-year combination.
4680 The labels will be printed with the bibliography entries.
4681 Note that there is, at present, no way to customize the appearance of the
4682 labels, for example, to choose between square brackets and parentheses.
4685 \begin_layout Standard
4686 Bibliography output is handled by the same machinery that handles the presentati
4687 on of reference information in the citation dialog, so you will see in the
4688 XHTML output pretty much what you would see if you were to look at a given
4689 entry in the citation dialog.
4690 The formatting can be customized in your layout file or, preferably, in
4696 manual for the details.
4699 \begin_layout Standard
4700 The main defect at present is that cross-referenced information is printed
4701 with every entry with which it is associated.
4702 So you can see things like this:
4707 \begin_inset Quotes eld
4710 Context and Logical Form
4711 \begin_inset Quotes erd
4716 Language in Context: Selected Essays
4718 (Oxford: Oxford University Press, 2007), pp.
4724 \begin_inset Quotes eld
4727 Semantics in Context
4728 \begin_inset Quotes erd
4733 Language in Context: Selected Essays
4735 (Oxford: Oxford University Press, 2007), pp.
4739 \begin_layout Standard
4740 This should be fixed before long.
4743 \begin_layout Standard
4744 There is no support at present for sectioned bibliographies.
4745 If you have multiple bibliographies, then LyX will print the same bibliography
4749 \begin_layout Section
4753 \begin_layout Standard
4754 LyX will happily export indexes as XHTML, but with certain limitations at
4758 \begin_layout Standard
4759 Index export will be most reliable when you do not attempt to use the fancy
4760 constructs that are described in the section on indexes in the
4768 \begin_layout Plain Layout
4769 The main issue here is that LyX itself does not really handle these.
4770 It just lets you enter what you would have to enter in raw LaTeX.
4775 We'll describe how they are handled using the subsection headings from
4779 \begin_layout Itemize
4780 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4781 these, but the entries must be separated by
4782 \begin_inset Quotes eld
4786 \begin_inset Quotes erd
4789 , that is, there must be spaces around the exclamation point.
4790 This is because it is otherwise too difficult to check for escaped exclamation
4791 points, ones in math, and so forth.
4794 \begin_layout Itemize
4795 Page Ranges: There is no support at all for page ranges, since these make
4796 no sense with XHMTL.
4797 Instead, you will just get two index entries, one at either end.
4800 \begin_layout Itemize
4801 Cross-referencing: There is no support for cross-referencing.
4802 If LyX finds an entry containing the
4803 \begin_inset Quotes eld
4806 |see\SpecialChar \ldots{}
4808 \begin_inset Quotes erd
4811 construct, it is just dropped, and the rest is treated as an ordinary index
4815 \begin_layout Itemize
4816 Index Entry Order: LyX does support attempts to fix the sorting order.
4817 It will take what is before the first `@' it finds and use that for sorting,
4818 taking what follows the first `@' to be the actual entry.
4819 At present, LyX does not check for escaped `@', so do not try to index
4823 \begin_layout Itemize
4824 Index Entry Layout: You can format entries by using the text style dialog,
4825 or by using any other method available within LyX itself.
4826 There is no support for constructs like:
4827 \begin_inset Quotes eld
4831 \begin_inset Quotes erd
4835 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4836 and everything that follows it.
4839 \begin_layout Itemize
4840 Multiple Indexes: There is no support for multiple indexes.
4841 Rather, all index entries will be printed as one large index.
4842 To avoid our printing several versions of the index, we print only the
4843 main index, so make sure you have one.
4846 \begin_layout Section
4847 Nomenclature and Glossary
4850 \begin_layout Standard
4851 There is at present no support for glossaries.
4854 \begin_layout Chapter
4858 \begin_layout Section
4862 \begin_layout Standard
4863 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4864 and retrieve information about the LyX internal state.
4865 This is only intended for advanced users, but they should find it useful.
4866 It is by writing to the LyX server, for example, that bibliography managers,
4867 such as JabRef, are able to
4868 \begin_inset Quotes eld
4872 \begin_inset Quotes erd
4878 \begin_layout Section
4879 Starting the LyX Server
4882 \begin_layout Standard
4883 The LyX server works through the use of a pair of named pipes.
4884 These are usually located in
4885 \begin_inset Flex CharStyle:Code
4888 \begin_layout Plain Layout
4894 , (except on Windows, where
4898 named pipes are special objects located in
4899 \begin_inset Flex CharStyle:Code
4902 \begin_layout Plain Layout
4914 ) and have the names
4915 \begin_inset Quotes eld
4919 \begin_inset Flex CharStyle:Code
4922 \begin_layout Plain Layout
4929 \begin_inset Quotes erd
4933 \begin_inset Quotes eld
4937 \begin_inset Flex CharStyle:Code
4940 \begin_layout Plain Layout
4947 \begin_inset Quotes erd
4951 External programs write into
4952 \begin_inset Flex CharStyle:Code
4955 \begin_layout Plain Layout
4961 and read back data from
4962 \begin_inset Flex CharStyle:Code
4965 \begin_layout Plain Layout
4972 The stem of the pipe names can be defined in the
4973 \begin_inset Flex CharStyle:MenuItem
4976 \begin_layout Plain Layout
4977 Tools\SpecialChar \menuseparator
4984 \begin_inset Flex CharStyle:Code
4987 \begin_layout Plain Layout
4988 "/home/myhome/lyxpipe"
4994 \begin_inset Flex CharStyle:Code
4997 \begin_layout Plain Layout
5016 configure this manually in order for the server to start.
5019 \begin_layout Standard
5021 \begin_inset Flex CharStyle:Code
5024 \begin_layout Plain Layout
5031 \begin_inset Flex CharStyle:Code
5034 \begin_layout Plain Layout
5040 ' to create the pipes.
5041 If one of the pipes already exists, LyX will assume that another LyX process
5042 is already running and will not start the server.
5043 On POSIX (Unix like) systems, if for some other reason, an unused
5044 \begin_inset Quotes eld
5048 \begin_inset Quotes erd
5051 pipe is left in existence when LyX closes, then LyX will try to delete
5053 If this fails for some reason, you will need to delete the pipes manually
5054 and then restart LyX.
5055 On Windows, pipes are deleted by the OS on program termination or crash,
5057 \begin_inset Quotes eld
5061 \begin_inset Quotes erd
5064 pipes should not be possible.
5067 \begin_layout Standard
5068 To have several LyX processes with servers at the same time, you have to
5069 use different configurations, perhaps by using separate user directories,
5071 \begin_inset Flex CharStyle:Code
5074 \begin_layout Plain Layout
5080 file, for each process.
5083 \begin_layout Standard
5084 If you are developing a client program, you might find it useful to enable
5085 debugging information from the LyX server.
5086 Do this by starting LyX as
5087 \begin_inset Flex CharStyle:Code
5090 \begin_layout Plain Layout
5099 \begin_layout Standard
5100 You can find a complete example client written in C in the source distribution
5102 \begin_inset Flex CharStyle:Code
5105 \begin_layout Plain Layout
5106 development/lyxserver/server_monitor.c
5114 \begin_layout Standard
5115 Another useful tool is command-line based client you will find in
5116 \begin_inset Flex CharStyle:Code
5119 \begin_layout Plain Layout
5120 src/client/lyxclient
5128 \begin_layout Section
5129 Normal communication
5132 \begin_layout Standard
5133 To issue a LyX call, the client writes a line of ASCII text into the input
5135 This line has the following format:
5152 \begin_layout Description
5153 clientname is a name that the client can choose arbitrarily.
5154 Its only use is that LyX will echo it if it sends an answer—so a client
5155 can dispatch results from different requesters.
5158 \begin_layout Description
5159 function is the function you want LyX to perform.
5160 It is the same as the commands you'd use in the minibuffer.
5163 \begin_layout Description
5164 argument is an optional argument which is meaningful only to some functions
5166 \begin_inset Quotes eld
5170 \begin_inset Quotes erd
5173 LFUN will insert the argument as text at the cursor position).
5176 \begin_layout Standard
5177 The answer from LyX will arrive in the output pipe and be of the form
5194 \begin_layout Standard
5203 are just echoed from the command request, while
5207 is more or less useful information filled according to how the command
5208 execution worked out.
5209 Some commands, such as
5210 \begin_inset Quotes eld
5214 \begin_inset Quotes erd
5217 , will return information about the internal state of LyX, while other will
5218 return an empty data-response.
5219 This means that the command execution went fine.
5222 \begin_layout Standard
5223 In case of errors, the response from LyX will have this form
5240 \begin_layout Standard
5245 should contain an explanation of why the command failed.
5248 \begin_layout Standard
5252 \begin_layout LyX-Code
5253 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5254 \begin_inset Newline newline
5257 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5258 \begin_inset Newline newline
5261 read a <~/.lyxpipe.out
5262 \begin_inset Newline newline
5268 \begin_layout Section
5272 \begin_layout Standard
5273 LyX can notify clients of events going on asynchronously.
5274 Currently it will only do this if the user binds a key sequence with the
5276 \begin_inset Quotes eld
5280 \begin_inset Quotes erd
5284 The format of the string LyX sends is as follows:
5288 \begin_inset Flex CharStyle:Code
5291 \begin_layout Plain Layout
5302 \begin_layout Standard
5307 is the printed representation of the key sequence that was actually typed
5311 \begin_layout Standard
5312 This mechanism can be used to extend LyX's command set and implement macros.
5313 Bind some key sequence to
5314 \begin_inset Quotes eld
5318 \begin_inset Quotes erd
5322 Then start a client that listens on the output pipe, dispatches the command
5323 according to the sequence, and starts a function that may use LyX calls
5324 and LyX requests to issue a command or a series of commands to LyX.
5327 \begin_layout Section
5328 The simple LyX Server Protocol
5331 \begin_layout Standard
5332 LyX implements a simple protocol that can be used for session management.
5333 All messages are of the form
5346 \begin_layout Standard
5352 \begin_inset Quotes eld
5356 \begin_inset Quotes erd
5360 \begin_inset Quotes eld
5364 \begin_inset Quotes erd
5369 \begin_inset Quotes eld
5373 \begin_inset Quotes erd
5376 is received from a client, LyX will report back to inform the client that
5377 it's listening to it's messages, while
5378 \begin_inset Quotes eld
5382 \begin_inset Quotes erd
5385 sent from LyX will inform clients that LyX is closing.
5388 \begin_layout Section
5389 Reverse DVI/PDF search
5392 \begin_layout Standard
5393 Some DVI/PDF viewers
5397 \begin_layout Plain Layout
5398 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5399 Skim on Mac OSX and SumatraPDF on Windows.
5408 facility (also called
5413 This means that you can tell LyX to put the cursor to a specific line in
5414 the document by clicking at the respective position in the DVI/PDF output.
5415 To achieve this, the viewer must be able to communicate with LyX.
5416 This is done via the LyX server either by using the named pipe (
5420 ), or the UNIX domain socket (
5424 ) that LyX creates in its temporary directory (this is the way the
5425 \begin_inset Flex CharStyle:Code
5428 \begin_layout Plain Layout
5434 program communicates with LyX).
5435 In some cases, you need a helper script that mediates between the viewer
5436 and LyX, in others, the viewer can communicate with LyX directly.
5437 This depends on the selected viewer and on your operating system.
5438 The same applies to the way viewers need to be configured and the way the
5439 reverse search is actually performed.
5440 In what follows, we will thus describe how to setup reverse search for
5442 Before we turn to this, though, we will explain what needs to be done generally
5443 to enable reverse search in the DVI/PDF output.
5446 \begin_layout Subsection
5448 \change_inserted 2 1274788899
5449 \begin_inset CommandInset label
5451 name "sub:rev-search"
5455 Automatical enabling
5458 \begin_layout Standard
5460 \change_inserted 2 1274789582
5461 In most cases LyX will do the work for you by enabling
5462 \begin_inset Flex CharStyle:MenuItem
5465 \begin_layout Plain Layout
5467 \change_inserted 2 1274789026
5468 Document\SpecialChar \menuseparator
5469 Output\SpecialChar \menuseparator
5476 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5477 srcltx package (for DVI) respectively.
5478 This option can be easily reached also on
5479 \begin_inset Flex CharStyle:Code
5482 \begin_layout Plain Layout
5484 \change_inserted 2 1274789582
5495 \begin_layout Standard
5497 \change_inserted 2 1274789534
5498 Plase note that including
5499 \begin_inset Flex CharStyle:Code
5502 \begin_layout Plain Layout
5504 \change_inserted 2 1274789498
5513 \begin_inset Flex CharStyle:Code
5516 \begin_layout Plain Layout
5518 \change_inserted 2 1274789484
5526 sometimes have an impact on the typeset and you should switch them off
5527 for the final typesets.
5532 \begin_layout Standard
5534 \change_inserted 2 1274789340
5535 You can also define custom macro in preferences and in case you need some
5536 special tweaks read the next section about manual enabling.
5542 \begin_layout Subsection
5544 \change_inserted 2 1274788680
5550 \begin_layout Standard
5551 LaTeX provides several different methods for reverse search.
5552 Some are built-in in the
5553 \begin_inset Flex CharStyle:Code
5556 \begin_layout Plain Layout
5562 program, some are provided by external packages.
5563 Your choice depends on whether your LaTeX distribution already provides
5564 a given method (the built-in methods are rather new) and whether your viewer
5566 The available methods are described in the following.
5567 \change_inserted 2 1274788557
5571 \begin_layout Subsubsection*
5572 Built-in DVI-search via src-specials (DVI only)
5575 \begin_layout Standard
5576 This method provides the DVI file with the necessary information for reverse
5578 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5579 distribution should include it), and it works reliably.
5580 To enable it, change the
5581 \begin_inset Flex CharStyle:MenuItem
5584 \begin_layout Plain Layout
5589 \begin_layout Plain Layout
5602 \begin_inset Flex CharStyle:MenuItem
5605 \begin_layout Plain Layout
5610 \begin_layout Plain Layout
5617 eX (plain)->DraftDVI
5623 \begin_inset Flex CharStyle:MenuItem
5626 \begin_layout Plain Layout
5627 Preferences\SpecialChar \menuseparator
5628 File Handling\SpecialChar \menuseparator
5635 \begin_inset Flex CharStyle:Code
5638 \begin_layout Plain Layout
5639 latex -src-specials $$i
5645 If this doesn't work, check if your TeX engine needs different options
5646 (the syntax might differ in some distributions).
5649 \begin_layout Subsubsection*
5650 External Packages (PDFSync and scrltx)
5653 \begin_layout Standard
5662 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5664 In order to enable it, load the packages in the LyX preamble:
5667 \begin_layout Itemize
5668 \begin_inset Flex CharStyle:Code
5671 \begin_layout Plain Layout
5679 for reverse PDF search,
5682 \begin_layout Itemize
5684 \begin_inset Flex CharStyle:Code
5687 \begin_layout Plain Layout
5690 usepackage[active]{srcltx}
5695 for reverse DVI search.
5698 \begin_layout Standard
5699 If you want to be able to perform both DVI and PDF reverse searches, you
5700 can also insert in the preamble the following lines
5703 \begin_layout LyX-Code
5707 \begin_inset Newline newline
5713 \begin_inset Newline newline
5719 \begin_inset Newline newline
5725 \begin_inset Newline newline
5730 usepackage[active]{srcltx}
5731 \begin_inset Newline newline
5739 \begin_layout Standard
5740 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5741 right package will be used.
5744 \begin_layout Standard
5745 Note that PDFSync might affect the output layout of your document.
5746 It is therefore advised to disable PDFsync for final documents.
5749 \begin_layout Subsubsection*
5750 Built-in reverse search via SyncTeX (DVI and PDF)
5753 \begin_layout Standard
5755 \begin_inset Flex CharStyle:Code
5758 \begin_layout Plain Layout
5764 have built-in support for both PDF and DVI reverse search.
5769 facility is basically the result of the integration of the PDFSync package
5770 to the pdftex program and its merge with the
5775 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5777 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5778 already provide SyncTeX support.
5781 \begin_layout Standard
5782 To enable SyncTeX for DVI output, change the
5783 \begin_inset Flex CharStyle:MenuItem
5786 \begin_layout Plain Layout
5791 \begin_layout Plain Layout
5804 \begin_inset Flex CharStyle:MenuItem
5807 \begin_layout Plain Layout
5812 \begin_layout Plain Layout
5819 eX (plain) -> DraftDVI
5825 \begin_inset Flex CharStyle:MenuItem
5828 \begin_layout Plain Layout
5829 Preferences\SpecialChar \menuseparator
5830 File Handling\SpecialChar \menuseparator
5837 \begin_inset Flex CharStyle:Code
5840 \begin_layout Plain Layout
5841 latex -synctex=1 $$i
5846 , and for PDF output, change the
5847 \begin_inset Flex CharStyle:MenuItem
5850 \begin_layout Plain Layout
5855 \begin_layout Plain Layout
5862 eX (pdflatex) -> PDF (pdflatex)
5868 \begin_inset Flex CharStyle:Code
5871 \begin_layout Plain Layout
5872 pdflatex -synctex=1 $$i
5878 Check the documentation of your viewer whether the viewer needs to be configure
5879 d for the use with SyncTeX.
5883 \begin_layout Plain Layout
5885 \begin_inset Flex CharStyle:Code
5888 \begin_layout Plain Layout
5894 option enables gzip compression.
5895 If your viewer does not support it, you should instead use
5896 \begin_inset Flex CharStyle:Code
5899 \begin_layout Plain Layout
5913 \begin_layout Subsection
5914 Configuring and using specific viewers
5917 \begin_layout Subsubsection*
5918 Xdvi (all platforms)
5921 \begin_layout Standard
5923 \begin_inset Flex CharStyle:Code
5926 \begin_layout Plain Layout
5932 , you don't need to do anything else for performing a reverse DVI search,
5933 as LyX already provides the necessary hooks for automatically using the
5935 \begin_inset Flex CharStyle:Code
5938 \begin_layout Plain Layout
5945 Just setup your document as described above (reverse search is triggered
5946 by Ctrl-click or Alt-click on Mac OSX, respectively).
5949 \begin_layout Standard
5950 However, if for whatever reason you want to use the named pipe instead of
5951 the socket for communicating with LyX, simply change the DVI viewer in
5953 \begin_inset Flex CharStyle:MenuItem
5956 \begin_layout Plain Layout
5957 Preferences\SpecialChar \menuseparator
5958 File Handling\SpecialChar \menuseparator
5968 \begin_layout Plain Layout
5969 On Mac OSX you have to use
5970 \begin_inset Flex CharStyle:Code
5973 \begin_layout Plain Layout
5974 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5985 \begin_inset Flex CharStyle:Code
5988 \begin_layout Plain Layout
5989 xdvi -editor 'lyxeditor.sh %f %l'
5995 \begin_inset Flex CharStyle:Code
5998 \begin_layout Plain Layout
6004 is a suitable script.
6005 For example, a minimal shell script is the following one:
6008 \begin_layout LyX-Code
6010 \begin_inset Newline newline
6013 LYXPIPE="/path/to/lyxpipe"
6014 \begin_inset Newline newline
6017 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6018 \begin_inset Newline newline
6021 echo "$COMMAND" > "${LYXPIPE}".in || exit
6022 \begin_inset Newline newline
6025 read < "${LYXPIPE}".out || exit
6028 \begin_layout Standard
6030 \begin_inset Flex CharStyle:Code
6033 \begin_layout Plain Layout
6043 \begin_layout Plain Layout
6050 XServer pipe path specified in
6051 \begin_inset Flex CharStyle:MenuItem
6054 \begin_layout Plain Layout
6055 Preferences\SpecialChar \menuseparator
6065 \begin_layout Plain Layout
6067 \begin_inset Flex CharStyle:Code
6070 \begin_layout Plain Layout
6076 folder of a source distribution you can find a
6077 \begin_inset Flex CharStyle:Code
6080 \begin_layout Plain Layout
6086 script which is able to locate the
6090 based on your preferences.
6098 \begin_layout Subsubsection*
6102 \begin_layout Standard
6104 \begin_inset Flex CharStyle:Code
6107 \begin_layout Plain Layout
6108 /Applications/MacDviX_Folder/calleditor.script
6113 , add the following lines:
6116 \begin_layout LyX-Code
6121 \begin_layout Plain Layout
6128 X.app/Contents/MacOS/lyxeditor "$2" $1
6129 \begin_inset Newline newline
6135 \begin_layout Standard
6136 Modify the lines accordingly if you install LyX somewhere else than in the
6137 Applications folder.
6140 \begin_layout Standard
6141 Reverse search is triggered by Alt-click (OPTION-click).
6144 \begin_layout Subsubsection*
6148 \begin_layout Standard
6150 \begin_inset Flex CharStyle:Code
6153 \begin_layout Plain Layout
6154 open -a Skim.app $$i
6159 to the viewer setting in
6160 \begin_inset Flex CharStyle:MenuItem
6163 \begin_layout Plain Layout
6164 Preferences\SpecialChar \menuseparator
6165 File Handling\SpecialChar \menuseparator
6166 File formats\SpecialChar \menuseparator
6173 \begin_inset Flex CharStyle:MenuItem
6176 \begin_layout Plain Layout
6177 Skim\SpecialChar \menuseparator
6178 Preferences\SpecialChar \menuseparator
6188 \begin_layout Plain Layout
6198 \begin_layout Standard
6199 Reverse search is triggered by COMMAND-SHIFT-click
6202 \begin_layout Subsubsection*
6206 \begin_layout Standard
6208 \begin_inset Flex CharStyle:MenuItem
6211 \begin_layout Plain Layout
6212 Settings\SpecialChar \menuseparator
6213 Configure Okular\SpecialChar \ldots{}
6214 \SpecialChar \menuseparator
6221 \begin_inset Quotes eld
6225 \begin_inset Quotes erd
6229 \begin_inset Flex CharStyle:Code
6232 \begin_layout Plain Layout
6241 \begin_layout Standard
6242 Reverse search is triggered by SHIFT-click.
6245 \begin_layout Subsubsection*
6249 \begin_layout Standard
6250 Launch yap, choose its
6251 \begin_inset Flex CharStyle:MenuItem
6254 \begin_layout Plain Layout
6255 View\SpecialChar \menuseparator
6262 \begin_inset Quotes eld
6266 \begin_inset Quotes erd
6271 \begin_inset Quotes eld
6274 New\SpecialChar \ldots{}
6276 \begin_inset Quotes erd
6279 button and, in the window that opens, enter
6280 \begin_inset Quotes eld
6284 \begin_inset Quotes erd
6287 (or any other name you like) in the
6288 \begin_inset Quotes eld
6292 \begin_inset Quotes erd
6296 Now click on the button labeled
6297 \begin_inset Quotes eld
6300 \SpecialChar \ldots{}
6302 \begin_inset Quotes erd
6305 to open a file dialog and navigate to the directory containing the batch
6307 \begin_inset Flex CharStyle:Code
6310 \begin_layout Plain Layout
6318 \begin_inset Flex CharStyle:Code
6321 \begin_layout Plain Layout
6327 and then specify the program arguments as
6328 \begin_inset Flex CharStyle:Code
6331 \begin_layout Plain Layout
6339 \begin_inset Flex CharStyle:Code
6342 \begin_layout Plain Layout
6348 wrapper is used for communicating with LyX through the
6355 \begin_layout LyX-Code
6357 \begin_inset Newline newline
6360 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6369 \begin_inset Newline newline
6383 \begin_layout Standard
6384 Make sure that the LyXServer pipe path you specified in LyX is
6385 \begin_inset Flex CharStyle:Code
6388 \begin_layout Plain Layout
6402 , otherwise change the
6403 \begin_inset Flex CharStyle:Code
6406 \begin_layout Plain Layout
6412 wrapper accordingly.
6415 \begin_layout Standard
6416 In yap, reverse search is triggered by double-click.
6419 \begin_layout Subsubsection*
6420 SumatraPDF (Windows)
6423 \begin_layout Standard
6424 In order to use SumatraPDF for inverse search, enter
6425 \begin_inset Flex CharStyle:Code
6428 \begin_layout Plain Layout
6429 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6434 in the viewer setting in
6435 \begin_inset Flex CharStyle:MenuItem
6438 \begin_layout Plain Layout
6439 Preferences\SpecialChar \menuseparator
6440 File Handling\SpecialChar \menuseparator
6441 File formats\SpecialChar \menuseparator
6448 \begin_inset Flex CharStyle:Code
6451 \begin_layout Plain Layout
6457 is the previous wrapper.
6458 If SumatraPDF.exe is not in your command PATH, use its full file name.
6461 \begin_layout Standard
6462 Reverse search is triggered by double-click.
6465 \begin_layout Subsubsection*
6469 \begin_layout Standard
6470 First of all, make sure that yap is your default DVI viewer in the Windows
6471 environment, then launch it, choose its
6472 \begin_inset Flex CharStyle:MenuItem
6475 \begin_layout Plain Layout
6476 View\SpecialChar \menuseparator
6483 \begin_inset Quotes eld
6487 \begin_inset Quotes erd
6492 \begin_inset Quotes eld
6495 New\SpecialChar \ldots{}
6497 \begin_inset Quotes erd
6500 button and, in the window that opens, enter
6501 \begin_inset Quotes eld
6505 \begin_inset Quotes erd
6508 (or any other name you like) in the
6509 \begin_inset Quotes eld
6513 \begin_inset Quotes erd
6517 Now click on the button labeled
6518 \begin_inset Quotes eld
6521 \SpecialChar \ldots{}
6523 \begin_inset Quotes erd
6526 to open a file dialog and navigate to the directory containing the
6527 \begin_inset Flex CharStyle:Code
6530 \begin_layout Plain Layout
6536 program (which is installed by default on Cygwin along with the LyX executable).
6538 \begin_inset Flex CharStyle:Code
6541 \begin_layout Plain Layout
6547 and then specify the program arguments as
6548 \begin_inset Flex CharStyle:Code
6551 \begin_layout Plain Layout
6558 In this way, you will be using the
6562 for communicating with LyX.
6563 If, for whatever reason, you want to use the
6568 \begin_inset Flex CharStyle:Code
6571 \begin_layout Plain Layout
6577 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6580 \begin_layout Standard
6581 In yap, reverse search is triggered by double-click.
6584 \begin_layout Subsubsection*
6588 \begin_layout Standard
6589 In order to use SumatraPDF for inverse search, enter
6590 \begin_inset Flex CharStyle:Code
6593 \begin_layout Plain Layout
6599 in the viewer setting in
6600 \begin_inset Flex CharStyle:MenuItem
6603 \begin_layout Plain Layout
6604 Preferences\SpecialChar \menuseparator
6605 File Handling\SpecialChar \menuseparator
6606 File formats\SpecialChar \menuseparator
6613 \begin_inset Flex CharStyle:Code
6616 \begin_layout Plain Layout
6622 is the following script (to be placed in your command PATH,
6623 \begin_inset Flex CharStyle:Code
6626 \begin_layout Plain Layout
6632 being the best choice):
6635 \begin_layout LyX-Code
6637 \begin_inset Newline newline
6641 \begin_inset Newline newline
6644 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6647 \begin_layout Standard
6648 This wrapper script is needed because SumatraPDF is a native Windows application
6649 and does not understand the posix paths used by the Cygwin version of LyX.
6650 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6653 \begin_inset Flex CharStyle:Code
6656 \begin_layout Plain Layout
6662 enables communication via the
6668 \begin_inset Flex CharStyle:Code
6671 \begin_layout Plain Layout
6677 option if you want to use the
6681 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6684 \begin_layout Standard
6685 Reverse search is triggered by double-click.
6686 \change_inserted 1 1271453423
6690 \begin_layout Section
6692 \change_inserted 1 1271453442
6696 \begin_layout Standard
6698 \change_inserted 1 1271454338
6699 To make forward search possible you need to provide generated output PDF/DVI
6700 file with additional information about TeX sources.
6701 This can be done via the methods described in the section
6702 \begin_inset CommandInset ref
6704 reference "sub:rev-search"
6711 \begin_layout Standard
6713 \change_inserted 1 1271454479
6714 Secondly you need to configure LyX for using your viewers in
6715 \begin_inset Flex CharStyle:MenuItem
6718 \begin_layout Plain Layout
6720 \change_inserted 1 1271453866
6721 Preferences\SpecialChar \menuseparator
6722 Output\SpecialChar \menuseparator
6729 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6734 \begin_layout Plain Layout
6736 \change_inserted 1 1271454273
6737 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6746 Some other viewers allow at least reloading and positioning to particular
6747 page of the file --- Evince or xpdf --- for these cases you can use external
6749 Please study the prepared examples in the Preferences dialog.
6754 \begin_layout Chapter
6755 Special Document Classes
6758 \begin_layout Section
6762 \begin_layout Standard
6768 \begin_layout Subsection
6772 \begin_layout Standard
6773 This section describes how LyX can be used to write articles for submission
6774 to the scientific journal
6776 Astronomy and Astrophysics
6778 (www.edpsciences.fr/aa/
6779 \begin_inset Flex URL
6782 \begin_layout Plain Layout
6784 http://www.edpsciences.fr/aa/
6789 ) using Version 5.01 of the document class
6794 This package can be downloaded from the ftp site
6797 \begin_layout Standard
6798 \begin_inset VSpace medskip
6804 \begin_layout Standard
6806 \begin_inset Flex URL
6809 \begin_layout Plain Layout
6811 ftp://ftp.edpsciences.org/pub/aa/readme.html
6819 \begin_layout Standard
6820 \begin_inset VSpace medskip
6826 \begin_layout Standard
6827 A manual comes together with that package, and this text is not meant to
6828 replace the original manual but merely a short guide how to realize the
6829 correct form of your paper.
6833 \begin_layout Standard
6834 Please note that the publisher of the journal was changed from Springer
6835 to EDP Sciences starting January 1, 2001.
6836 That change implicated also some slight changes of the style files, namely
6837 the removal of the thesaurus command.
6838 The LyX class aa supports the newest version of these style files, V 5.01.
6839 If you have an older version installed, please upgrade.
6840 For compatibility, the old (version 4) layout has been kept as
6845 Please refer to the comments in
6847 LyXDir/layouts/aapaper.layout
6852 \begin_layout Subsection
6856 \begin_layout Standard
6857 It is recommended you start from the example template distributed with LyX.
6858 If you are not using a template, note the following settings:
6861 \begin_layout Itemize
6868 Document\SpecialChar \menuseparator
6871 dialog (OK, that one was obvious).
6874 \begin_layout Itemize
6875 Don't change the option
6878 \begin_inset space ~
6888 The whole layout is done by the macros, you shouldn't change anything.
6891 \begin_layout Subsection
6895 \begin_layout Standard
6896 First thing to enter is the header information.
6897 It consists of seven entries, of which some are optional.
6901 \begin_layout Itemize
6909 \begin_layout Itemize
6917 \begin_layout Itemize
6925 \begin_layout Itemize
6933 \begin_layout Itemize
6938 : [optional] if more than one author: whom to contact for offprint requests.
6941 \begin_layout Itemize
6946 : [optional] mail address for contacts.
6949 \begin_layout Itemize
6957 Received: <date>; Accepted <date>
6960 \begin_layout Standard
6961 There is no need to issue the
6967 command, this is done automatically by LyX when the header is finished.
6968 Although the order of the single header entries doesn't matter it is advised
6969 to keep the above sequence, just to get the best optics and meets the layout
6970 of the real document.
6973 \begin_layout Standard
6974 If you want to place footnotes in the header block, e.
6975 \begin_inset space \thinspace{}
6979 \begin_inset space \space{}
6982 to state your present address, just use the standard footnote via the menu
6985 Insert\SpecialChar \menuseparator
6989 LyX will automagically use the term
6998 \begin_layout Standard
6999 In addition to these topics, the macros use three additional LaTeX commands
7000 that have no counterpart in LyX:
7003 \begin_layout Itemize
7010 to separate different names for more than one author and institute, respectivel
7014 \begin_layout Itemize
7021 to mark corresponding author/institute pairs.
7022 The institutes are numbered sequentially as they appear in the
7026 field, so you have to put a marker to each author.
7029 \begin_layout Itemize
7036 to supply an email address for fast contact.
7039 \begin_layout Standard
7040 In all cases, the appropriate command has to be entered in LyX and marked
7046 \begin_layout Subsection
7050 \begin_layout Standard
7051 The abstract should immediately follow the header block.
7052 With version 5 the abstract environment was changed to a command, and there
7053 is now a resctriction to only one paragraph.
7054 In addition, it should contain an entry with the keywords.
7055 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7062 by hand and mark it as LaTeX code.
7063 Refer to the example paper.
7066 \begin_layout Subsection
7067 Supported environments
7070 \begin_layout Standard
7071 The A&A paper layout supports the following environments for structuring
7075 \begin_layout Itemize
7081 \begin_layout Itemize
7087 \begin_layout Itemize
7093 \begin_layout Itemize
7099 \begin_layout Itemize
7105 \begin_layout Itemize
7111 \begin_layout Itemize
7117 \begin_layout Itemize
7123 \begin_layout Itemize
7129 \begin_layout Itemize
7135 \begin_layout Itemize
7141 \begin_layout Itemize
7147 \begin_layout Subsection
7148 Commands not supported by LyX
7151 \begin_layout Standard
7152 Some commands are not yet supported by the
7157 Some have already been mentioned.
7158 For the sake of completeness, they are listed all together here:
7161 \begin_layout Itemize
7169 \begin_layout Itemize
7177 \begin_layout Itemize
7185 \begin_layout Itemize
7193 \begin_layout Itemize
7201 \begin_layout Itemize
7209 \begin_layout Itemize
7217 \begin_layout Itemize
7225 \begin_layout Standard
7226 If you want to use any of these commands, you have to enter them yourself.
7229 Do not forget to mark them as LaTeX code!
7232 \begin_layout Subsection
7233 Figure and Table Floats
7236 \begin_layout Standard
7237 LyX provides support for the necessary float environments
7239 figure, figure*, table
7245 , therefore we won't tell much about it here.
7249 \begin_inset space ~
7255 Just remember that tables should be left-aligned.
7256 For that, select the table and change the alignment in
7258 Edit\SpecialChar \menuseparator
7260 \begin_inset space ~
7266 \begin_layout Standard
7267 There is only one special thing: the figures with caption besides the figure.
7268 To create such a figure, you have to do the following:
7271 \begin_layout Enumerate
7272 Create a wide figure float:
7274 Insert\SpecialChar \menuseparator
7275 Float\SpecialChar \menuseparator
7278 , then right click in the figure and select
7284 \begin_inset space ~
7292 \begin_layout Enumerate
7293 Enter your caption text.
7296 \begin_layout Enumerate
7301 to move the cursor above the caption.
7304 \begin_layout Enumerate
7308 \begin_layout Enumerate
7309 Position the cursor behind the figure and insert a horizontal fill:
7311 Insert\SpecialChar \menuseparator
7313 \begin_inset space ~
7316 Character\SpecialChar \menuseparator
7318 \begin_inset space ~
7326 \begin_layout Enumerate
7327 Switch to LaTeX mode:
7330 \begin_inset space ~
7338 \begin_layout Enumerate
7348 Do not close the brace!
7351 \begin_layout Enumerate
7352 Position the cursor behind the caption text, switch to LaTeX mode and insert
7356 \begin_inset space ~
7368 \begin_layout Standard
7369 Also, refer to the figures in the example paper.
7372 \begin_layout Subsection
7376 \begin_layout Standard
7377 For submission, the paper has to be formated in a special double-spacing
7379 For this purpose, you have to give the option
7383 to the documentclass.
7384 This must be done using the extra class options field in the
7386 Document\SpecialChar \menuseparator
7390 Just enter the string
7397 \begin_layout Subsection
7401 \begin_layout Standard
7406 directory contains an example paper written with LyX.
7407 It is the example paper from the original macro package, translated to
7409 Use it for inspiration, and compare the original LaTeX code with LyX way
7413 \begin_layout Section
7417 \begin_layout Standard
7423 \begin_layout Subsection
7427 \begin_layout Standard
7428 AASTeX is a set of macros produced by the American Astronomical Society
7429 to facilitate electronic manuscript submission to the three journals they
7430 publish: the Astrophysical Journal (including the Letters and Supplement),
7431 the Astronomical Journal, and the Publications of the Astronomical Society
7433 LyX has proven to be an excellent tool for generating these documents,
7434 especially given its equation, citation, and figure handling capabilities.
7435 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7436 is the version described here, or higher.
7437 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7438 incompatible with LyX.
7439 The AASTeX package may be downloaded from the AASTeX Web site
7442 \begin_layout Standard
7443 \begin_inset VSpace medskip
7449 \begin_layout Standard
7451 \begin_inset Flex URL
7454 \begin_layout Plain Layout
7456 http://www.journals.uchicago.edu/AAS/AASTeX
7464 \begin_layout Standard
7465 \begin_inset VSpace medskip
7471 \begin_layout Standard
7472 A complete user guide is contained in that package and you should familiarize
7473 yourself with it thoroughly before embarking on writing a paper in LyX.
7474 LyX will not reduce the need to figure out all the AASTeX commands, it
7475 will only reduce the drudgery of typing everything in.
7476 It is your responsibility to ensure that the final exported LaTeX document
7477 conforms completely to the requirements of the journal to which you are
7478 submitting your paper.
7481 \begin_layout Subsection
7482 Starting a New Paper
7485 \begin_layout Standard
7486 I strongly suggest that you start with the AASTeX template file.
7489 File\SpecialChar \menuseparator
7496 , enter the new file name, then choose the
7501 This will show the most common fields found in a manuscript.
7502 Simply overwrite the existing text (including the brackets,
7506 ) with the correct information.
7507 Many of the AASTeX commands and environments can be implemented directly
7508 in LyX, but some cannot: most noticeably
7520 , which should stick out like a sore thumb if you actually just opened the
7522 For commands such as these, the LaTeX code must be entered directly and
7524 Such commands are referred to as TeX code, or Evil Red Text.
7525 I tried to minimize the amount of TeX code needed in an AASTeX document,
7526 but there is still a bit more required than any of us would like.
7529 \begin_layout Subsection
7530 Finishing Your Paper
7533 \begin_layout Standard
7534 When the paper is finished to your satisfaction and previews/prints correctly,
7536 \begin_inset Quotes eld
7540 \begin_inset Quotes erd
7543 actions which need to be done before you submit it to the journals.
7547 \begin_layout Enumerate
7548 Export your paper as a LaTeX file (
7550 File\SpecialChar \menuseparator
7551 Export\SpecialChar \menuseparator
7558 \begin_layout Enumerate
7563 file with your favorite text editor
7567 \begin_layout Enumerate
7568 remove the comment lines before the
7577 \begin_layout Enumerate
7582 usepackage...{fontenc}
7584 line if it appears (usually just after
7599 \begin_layout Enumerate
7600 remove everything between (and including) the
7612 commands, except for any commands you specifically put into the LaTeX preamble
7613 (which should appear immediately after the
7614 \begin_inset Quotes eld
7617 User specified LaTeX commands
7618 \begin_inset Quotes erd
7629 \begin_layout Enumerate
7630 Run the resulting file through LaTeX to make sure it still processes correctly.
7633 \begin_layout Enumerate
7634 Reread the journal requirements to make sure your filenames and formats
7638 \begin_layout Enumerate
7642 \begin_layout Subsection
7643 Comments On Specific Commands
7646 \begin_layout Standard
7647 I will not describe the detailed usage of the individual AASTeX commands:
7648 the AASTeX User Guide (
7652 ) gives a good description of each.
7653 Thus it's probably easiest for me to go down the list as found in the guide
7654 and offer comments where necessary.
7655 So let's begin \SpecialChar \ldots{}
7659 \begin_layout Subsubsection
7660 Things that work as expected
7663 \begin_layout Standard
7667 \begin_layout Plain Layout
7679 \begin_layout Standard
7680 Because they work as you might expect, I simply list them and the section
7781 begin{thebibliography}
7789 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7790 graphicx figure commands (2.14.1),
7814 (2.15.4, amongst other places),
7841 \begin_layout Standard
7842 The following style options also work correctly:
7863 Simply put them in the
7869 Layout\SpecialChar \menuseparator
7875 \begin_layout Standard
7879 \begin_layout Plain Layout
7891 \begin_layout Subsubsection
7892 Things that work, but require more comment
7895 \begin_layout Standard
7896 The following items work, but require a little more discussion:
7899 \begin_layout Itemize
7900 These items are reserved for use by the journal editors, but you can put
7901 them into the LaTeX preamble if you feel compelled to do so:
7934 \begin_layout Itemize
7935 These items may be placed in the LaTeX preamble, and are included as blanks
7936 in the template file:
7957 \begin_layout Itemize
7964 (2.3) – can only be used
7965 \begin_inset Quotes eld
7969 \begin_inset Quotes erd
7972 , not in the middle of a paragraph.
7973 Use TeX code if you need to embed it.
7976 \begin_layout Itemize
7983 (2.3) – will have extra {} after it.
7984 This should not cause an error.
7987 \begin_layout Itemize
7994 (2.6) – can only be used
7995 \begin_inset Quotes eld
7999 \begin_inset Quotes erd
8002 , not in the middle of a paragraph.
8003 Use TeX code if you need to embed it.
8006 \begin_layout Itemize
8013 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8017 \begin_layout Itemize
8031 \begin_layout Itemize
8038 (2.9) – will have extra {} after it.
8039 This should not cause an error.
8042 \begin_layout Itemize
8049 (2.11) – will have extra {} after it.
8050 This should not cause an error.
8053 \begin_layout Itemize
8060 (2.14.2) – you can insert an optional filename argument by placing the cursor
8061 at the beginning of the text and selecting
8063 Insert\SpecialChar \menuseparator
8068 \begin_inset Quotes eld
8072 \begin_inset Quotes erd
8075 inserts an optional argument of the type needed by
8082 Hopefully it will be renamed someday.
8085 \begin_layout Itemize
8098 for the catalog ID optional parameter
8101 \begin_layout Itemize
8114 for the catalog ID optional parameter
8117 \begin_layout Subsubsection
8118 Things not implemented, use TeX code
8121 \begin_layout Standard
8125 \begin_layout Plain Layout
8137 \begin_layout Standard
8160 setcounter{equation}
8162 (2.12), Journal name abbreviations (2.13.4),
8198 (2.15.4, insert it as the first element in the lefthand cell after where
8200 Don't use any of LyX's rules in the table),
8212 (2.15.5), much of Misc (2.17, except
8263 \begin_layout Standard
8267 \begin_layout Plain Layout
8279 \begin_layout Subsubsection
8280 Things that cannot be implemented
8283 \begin_layout Standard
8284 \SpecialChar \ldots{}
8285 at least in any meaningful sort of way, so I suggest ignoring them.
8286 They are the references environment (2.13.3), and the deluxetable environment
8288 If you really, really need to use deluxetable, I suggest editing it in
8289 a separate file with a text editor, then using
8291 Insert\SpecialChar \menuseparator
8293 \begin_inset space ~
8298 to include it in your LyX document.
8303 file to see an example of this.
8306 \begin_layout Subsection
8307 FAQs, Tips, Tricks, and Other Ruminations
8310 \begin_layout Subsubsection
8311 Getting LyX and AASTeX to cooperate
8314 \begin_layout Standard
8315 It can be a bit tricky to get LyX to recognize a new layout and document
8317 When all else fails, do this:
8320 \begin_layout Enumerate
8321 Make certain that LaTeX can find AASTeX.
8322 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8323 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8330 \begin_layout Enumerate
8342 \begin_layout Enumerate
8345 Tools\SpecialChar \menuseparator
8348 in LyX, then restart LyX.
8351 \begin_layout Enumerate
8352 Open a regular new file, not from a template.
8353 Does AASTeX appear in the class list in
8355 Document\SpecialChar \menuseparator
8361 \begin_layout Standard
8362 If you get a warning from an existing AASTeX document about not being able
8363 to find the AASTeX layout or a message about
8364 \begin_inset Quotes eld
8367 You should not mix title layouts with normal ones
8368 \begin_inset Quotes erd
8371 , things haven't been installed correctly.
8374 \begin_layout Subsubsection
8375 LaTeX error processing a table
8378 \begin_layout Standard
8379 LyX, by default, attempts to center the table caption/title.
8380 This seems to produce a bad interaction in AASTeX so you should click somewhere
8381 in the caption/title, then select
8383 Edit\SpecialChar \menuseparator
8385 \begin_inset space ~
8399 This took care of it for me.
8402 \begin_layout Subsubsection
8406 \begin_layout Standard
8407 A couple of things: 1) I have noticed some funny spacing in the reference
8408 entries in the text.
8409 When you enter the bibliography item data, make sure their is
8413 space between the last author and the parenthesis setting off the year;
8417 \begin_inset space \thinspace{}
8421 \begin_inset space \space{}
8435 2) Entering the references at all is not obvious.
8436 The easiest thing is to start typing your first reference at the end of
8437 the document, then mark it as type
8442 That will put a small gray box in front of what you just typed.
8443 Click on the box to fill in the rest of the information.
8444 For new references, go to the end of an existing reference and press return.
8445 That will create a new line with its own box, etc.
8448 \begin_layout Subsubsection
8452 \begin_layout Standard
8453 Even though AASTeX provides its own figure commands (
8459 , for example), I much prefer LaTeX's standard figure commands (with the
8468 \begin_inset space ~
8471 commands as TeX code into a Figure Float box if you desire, but I never
8472 have much luck getting the layout right.
8473 With the standard graphics, LyX will insert a
8477 usepackage{graphicx}
8479 command into the LaTeX preamble and handle the figures in the standard
8480 LaTeX2e way, interspersing the figures in the text.
8481 I believe ApJ accepts figures exactly this way now; AJ might still use
8483 \begin_inset Quotes eld
8486 stack everything at the end
8487 \begin_inset Quotes erd
8493 \begin_layout Subsubsection
8494 Things I could have done, but didn't
8497 \begin_layout Standard
8499 \begin_inset Quotes eld
8503 \begin_inset Quotes erd
8506 things I could have implemented, but chose not to.
8507 For instance, I saw no point in double-spacing the text in the LyX window,
8508 even though it is double-spaced in the paper manuscript.
8509 Also, I chose not to make separate layouts for the preprint and preprint2
8511 Since I assume you will spend most of your time in the plain manuscript
8512 mode anyway, I decided not to chew up more disk space with this.
8516 \begin_layout Subsection
8520 \begin_layout Standard
8521 Your mileage may vary.
8522 I've now had papers published by both ApJ and AJ that have had 98% of the
8523 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8525 I have had no trouble with the submission process, and I'm sure the journals
8526 were never aware that there might be a difference.
8527 So, go forth and publish!
8530 \begin_layout Section
8534 \begin_layout Standard
8537 David Johnson; updated by Richard Heck
8540 \begin_layout Standard
8541 \begin_inset VSpace bigskip
8547 \begin_layout Standard
8549 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8550 papers to be submitted to American Mathematical Society publications.
8551 The layouts are not tailored to a specific journal, but easily can be.
8552 You should refer to the AMS documentation for specific instructions for
8553 each journal (usually it will entail only changing a single line in the
8555 That documentation is available on the Web at
8556 \begin_inset Flex URL
8559 \begin_layout Plain Layout
8567 \begin_inset Flex URL
8570 \begin_layout Plain Layout
8572 ftp://ftp.ams.org/pub/tex/amslatex/
8578 These layouts are appropriate, and useful, for any mathematical writing.
8582 \begin_layout Standard
8583 There are two basic AMS LaTeX layouts:
8586 \begin_layout Itemize
8587 amsart: The standard AMS article format.
8590 \begin_layout Itemize
8591 amsbook: the standard AMS book (really, monograph) format.
8595 \begin_layout Standard
8596 The layouts themselves contain only the minimum necessary to use the AMS
8598 They do not, in particular, contain any of the `theorem' environments used
8599 for setting theorems, lemmas, and the like.
8600 These are contained, instead, in the
8601 \begin_inset Flex CharStyle:Code
8604 \begin_layout Plain Layout
8610 module, which is loaded by default when when you select one of the AMS
8612 (It can also be used with other classes and can be removed, if you would
8613 rather use something else.) Less commonly used environments are in the
8614 \begin_inset Flex CharStyle:Code
8617 \begin_layout Plain Layout
8618 Theorems (AMS-Extended)
8623 module, which must be loaded manually.
8626 \begin_layout Standard
8627 By default, theorems and the like are numbered consecutively throughout
8628 the document, but this may be modified by loading the module
8629 \begin_inset Flex CharStyle:Code
8632 \begin_layout Plain Layout
8633 Theorems (Order by Section)
8638 or, if you are using
8639 \begin_inset Flex CharStyle:Code
8642 \begin_layout Plain Layout
8649 \begin_inset Flex CharStyle:Code
8652 \begin_layout Plain Layout
8653 Theorems (Order by Chapter)
8659 These will number the results as
8660 \begin_inset Formula $n.m$
8663 , where the first number refers to the section (or chapter) and the second
8664 refers to the total number of results so far in that section (or chapter).
8665 Many environments are also available unnumbered.
8666 These are indicated by an asterisk at the end.
8667 If you happen to want
8671 unnumbered results, the module
8672 \begin_inset Flex CharStyle:Code
8675 \begin_layout Plain Layout
8681 provides that option.
8684 \begin_layout Standard
8685 Note that these modules do not
8689 to be used with the AMS classes.
8690 It is perfectly possible to use the
8691 \begin_inset Flex CharStyle:Code
8694 \begin_layout Plain Layout
8700 module, and the others mentioned, with other classes, such as
8701 \begin_inset Flex CharStyle:Code
8704 \begin_layout Plain Layout
8711 \begin_inset Flex CharStyle:Code
8714 \begin_layout Plain Layout
8721 \begin_inset Flex CharStyle:Code
8724 \begin_layout Plain Layout
8733 \begin_layout Subsection
8734 What these layouts provide
8737 \begin_layout Standard
8738 There is a long list of included environments provided by these layouts.
8739 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8740 variety of `theorem' environments.
8741 However, the AMS recommends the environments that are available in LyX.
8745 \begin_layout Standard
8746 The following environments—as well as the standard environments, such as
8748 \begin_inset Flex CharStyle:Noun
8751 \begin_layout Plain Layout
8758 \begin_inset Flex CharStyle:Noun
8761 \begin_layout Plain Layout
8768 \begin_inset Flex CharStyle:Noun
8771 \begin_layout Plain Layout
8778 \begin_inset Flex CharStyle:Noun
8781 \begin_layout Plain Layout
8788 \begin_inset Flex CharStyle:Noun
8791 \begin_layout Plain Layout
8798 \begin_inset Flex CharStyle:Code
8801 \begin_layout Plain Layout
8808 \begin_inset Flex CharStyle:Code
8811 \begin_layout Plain Layout
8820 \begin_layout Description
8821 Address This should be the author's permanent address.
8824 \begin_layout Description
8826 \begin_inset space ~
8829 Address This should be the author's temporary address at the time of submission,
8830 if different from the Address.
8833 \begin_layout Description
8834 Email Author's e-mail address
8837 \begin_layout Description
8838 URL Author's Web address, if desired.
8841 \begin_layout Description
8842 Keywords Key words or phrases used to identify specific topics discussed
8846 \begin_layout Description
8847 Subjectclass These refer to the AMS Subject Classifications, published and
8850 Mathematical Reviews
8853 These are also available online at the AMS cites listed above.
8856 \begin_layout Description
8860 \begin_layout Description
8864 \begin_layout Description
8868 \begin_layout Standard
8869 The following environments are provided by both the
8870 \begin_inset Flex CharStyle:Code
8873 \begin_layout Plain Layout
8880 \begin_inset Flex CharStyle:Code
8883 \begin_layout Plain Layout
8889 modules, in the latter case in both starred (unnumbered) and unstarred
8890 (numbered) versions.
8891 These same environments are provided only in the starred versions by the
8893 \begin_inset Flex CharStyle:Code
8896 \begin_layout Plain Layout
8905 \begin_layout Theorem
8906 This is typically used for the statements of major results.
8910 \begin_layout Corollary*
8911 This is used for statements which follow fairly directly from previous statement
8913 Again, these can be major results.
8918 These are smaller results needed to prove other statements.
8921 \begin_layout Proposition
8922 These are less major results which (hopefully) add to the general theory
8926 \begin_layout Conjecture
8927 These are statements provided without justification, which the author does
8928 not know how to prove, but which seem to be true (to the author, at least).
8931 \begin_layout Definition*
8932 Guess what this is for.
8933 The font is different for this environment than for the previous ones.
8937 \begin_layout Example*
8938 Used for examples illustrating proven results.
8941 \begin_layout Problem
8942 It's not really known what this is for.
8943 You should figure it out.
8946 \begin_layout Exercise*
8947 Write a description for this one.
8950 \begin_layout Remark
8951 This environment is also a type of theorem, usually a lesser sort of observation.
8954 \begin_layout Claim*
8955 Often used in the course of giving a proof of a larger result.
8959 Generally, these are used to break up long arguments, using specific instances
8965 The numbering scheme for cases is on its own, not together with other numbered
8971 At the end of this environment, a QED symbol (usually a square, but it can
8972 vary with different styles) is placed.
8973 If you want to have other environments within this one—for example, Case
8974 environments—and have the QED symbol appear only after them, then the other
8975 environments need to be nested within the proof environment.
8978 Nesting Environments
8984 for information on nesting.
8987 \begin_layout Standard
8988 And these environments are provided by
8989 \begin_inset Flex CharStyle:Code
8992 \begin_layout Plain Layout
8993 Theorems (AMS-Extended)
9001 \begin_layout Criterion*
9002 A required condition.
9005 \begin_layout Algorithm*
9006 A general procedure to be used.
9009 \begin_layout Axiom*
9010 This is a property or statement taken as true within the system being discussed.
9013 \begin_layout Condition*
9014 Sometimes used to state a condition assumed within the present context of
9019 Similar to a Remark.
9022 \begin_layout Notation*
9023 Used for the explanation of, yes, notation.
9026 \begin_layout Summary
9027 Do we really need to tell you?
9030 \begin_layout Acknowledgement*
9034 \begin_layout Conclusion*
9035 Sometimes used at the end of a long train of argument.
9039 Used in a way similar to Proposition, though perhaps lower on the scale.
9042 \begin_layout Standard
9043 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9045 They need to be available on your system in order to use these environments.
9048 \begin_layout Section
9056 \begin_layout Standard
9062 \begin_layout Subsection
9066 \begin_layout Standard
9067 These are the layout files for some of the journals of the American Geophysical
9069 It is assumed that you have both the AGU's own class files and AGUplus
9070 installed (everything to be found at
9071 \begin_inset Flex URL
9074 \begin_layout Plain Layout
9076 ftp://ftp.agu.org/journals/latex/journals
9084 \begin_layout Subsection
9088 \begin_layout Standard
9098 They are still called this in the LyX GUI, though their LaTeX equivalents
9099 in the AGU classes are
9110 \begin_layout Standard
9111 Newly defined styles are
9148 These are mostly manuscript attributes and defined in the AGU class documentati
9152 \begin_layout Standard
9153 I suspect this is still badly incomplete.
9156 \begin_layout Subsection
9160 \begin_layout Standard
9177 \begin_layout Subsection
9181 \begin_layout Itemize
9184 Journal of Geophysical Research
9193 \begin_layout Standard
9194 Add your own, it isn't so hard! Look at the
9205 \begin_layout Subsection
9206 Bugs and things to remember
9209 \begin_layout Standard
9210 In order to use the new layouts, you must remember to do the following for
9214 \begin_layout Enumerate
9220 This can be done in the
9222 Layout\SpecialChar \menuseparator
9227 Document\SpecialChar \menuseparator
9231 (AGU articles are always in English, right? So
9238 \begin_layout Enumerate
9248 (Yes, this is a bug.)
9251 \begin_layout Enumerate
9252 Make sure you use the
9256 bibliography style, by entering
9260 into the second field of the BibTeX inset.
9261 None of the standard styles will do.
9264 \begin_layout Section
9268 \begin_layout Standard
9274 \begin_layout Subsection
9278 \begin_layout Standard
9279 Broadway is for writing plays.
9280 The format is more decorative than Hollywood, and much less standardized.
9281 This format should be suitable for workshops.
9284 \begin_layout Subsection
9288 \begin_layout Standard
9289 The same as in Hollywood.
9292 \begin_layout Subsection
9296 \begin_layout Standard
9301 names as labels then cross-reference the label to insert the name.
9302 The cross-reference dialog will show the current cast of characters.
9305 \begin_layout Subsection
9306 Paper size and Margins
9309 \begin_layout Standard
9310 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9313 \begin_layout Subsection
9317 \begin_layout Standard
9318 The following environments are available.
9319 You can use broadway.bind to get the bind keys shown at the right.
9322 \begin_layout Itemize
9326 \begin_inset Newline newline
9331 You should not have to use this, but it is here for anything that does not
9335 \begin_layout Itemize
9339 \begin_inset space \hfill{}
9343 \begin_inset Newline newline
9348 Used to describe stage setting and the action.
9349 First use of speaker names in all CAPs.
9352 \begin_layout Itemize
9356 \begin_inset space \hfill{}
9360 \begin_inset Newline newline
9365 Automatically numbered.
9366 On screen it will be arabic, but will print as Roman.
9369 \begin_layout Itemize
9373 \begin_inset space \hfill{}
9377 \begin_inset Newline newline
9387 It is just centered text.
9390 \begin_layout Itemize
9394 \begin_inset space \hfill{}
9398 \begin_inset Newline newline
9403 Not automatically numbered.
9404 You supply the number.
9405 This is because I couldn't figure out how.
9408 \begin_layout Itemize
9412 \begin_inset space \hfill{}
9416 \begin_inset Newline newline
9421 A special case of Narrative to describe the setting and action as the curtain
9425 \begin_layout Itemize
9429 \begin_inset space \hfill{}
9433 \begin_inset Newline newline
9438 The speaker's (actor's) title, centered in all CAPS.
9441 \begin_layout Itemize
9445 \begin_inset space \hfill{}
9449 \begin_inset Newline newline
9454 Instructions to the speaker.
9455 The parentheses are automatically inserted.
9456 The ( will appear on screen, but both will be in the printed play.
9457 This environment is only used within
9464 \begin_layout Itemize
9468 \begin_inset space \hfill{}
9472 \begin_inset Newline newline
9477 What the Speaker says.
9480 \begin_layout Itemize
9484 \begin_inset space \hfill{}
9488 \begin_inset Newline newline
9493 The curtain comes down.
9496 \begin_layout Itemize
9500 \begin_inset space \hfill{}
9506 \begin_layout Itemize
9510 \begin_inset space \hfill{}
9516 \begin_layout Itemize
9520 \begin_inset space \hfill{}
9526 \begin_layout Standard
9530 \begin_layout Section
9534 \begin_layout Standard
9539 can be used to type letters according to German conventions.
9540 A template file is included in
9542 .../lyx/share/templates
9544 for you to use as a starting point.
9547 \begin_layout Section
9555 \begin_layout Standard
9561 \begin_layout Subsection
9565 \begin_layout Standard
9566 This is the layout file for the European Geophysical Society journals.
9571 can be downloaded from the web site of the EGS under
9572 \begin_inset Flex URL
9575 \begin_layout Plain Layout
9585 \begin_layout Subsection
9589 \begin_layout Standard
9592 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9600 The current layout file is unfortunately very unmodular and would benefit
9601 from using the various
9608 \begin_layout Section
9612 \begin_layout Standard
9618 \begin_layout Standard
9619 Elsevier Science Publishers B.V.
9620 provides a standard LaTeX document class (
9624 ) for submitting articles to their various journals.
9625 The style file can be downloaded directly from their web site:
9626 \begin_inset Flex URL
9629 \begin_layout Plain Layout
9631 http://authors.elsevier.com/
9637 Instructions are supplied along with the class file, which details the
9638 requirements of the publishers.
9639 LyX includes package that allows for the use of this class, by a layout
9640 and a template file.
9641 Installation of the class file is the same as for any other LaTeX package;
9642 instructions are provided in the Elsevier documentation.
9645 \begin_layout Standard
9655 As the Elsevier class file is based mainly on the standard article class,
9656 most of the normal functionality is provided.
9657 The Elsevier class defines a number of mathematical environments, which
9658 are similar to the AMS environments.
9659 These commands are all described in the Elsevier documentation, and are
9663 \begin_layout Standard
9664 The easiest way to use the Elsevier style is to base documents on the included
9666 It is best not to use options such as fancy headings or the geometry package,
9667 as elements such as these are defined by Elsevier in their style file.
9668 Ideally, no extra packages except those mentioned in the Elsevier documentation
9670 Essentially, Elsevier require as
9671 \begin_inset Quotes eld
9675 \begin_inset Quotes erd
9678 a LaTeX file as possible, as their intention is to take the supplied file
9679 and replace the class file with one for the particular journal to which
9680 the paper has been submitted.
9681 This also means that not too much time should be spent on the formating
9683 When it comes to be published, this will change anyway.
9684 The rest of the usage for this layout is substantially the same as for
9685 the normal article class.
9686 For details of what Elsevier do and don't allow, refer to their documentation.
9689 \begin_layout Section
9695 \begin_inset CommandInset label
9704 \begin_layout Standard
9710 \begin_layout Subsection
9714 \begin_layout Standard
9715 This section describes how to use LyX to make slides for overhead projectors.
9716 There are two document classes that can do this: the default slides class
9722 This section documents the latter.
9725 \begin_layout Standard
9726 I'm going to say this again, nice and clear, so that there's no misunderstanding
9730 \begin_layout Standard
9731 \begin_inset VSpace bigskip
9737 \begin_layout Standard
9741 This section documents the class
9742 \begin_inset Quotes eld
9750 \begin_inset Quotes erd
9758 \begin_layout Standard
9759 \begin_inset VSpace bigskip
9765 \begin_layout Standard
9766 If you're looking for the documentation for
9767 \begin_inset Quotes eld
9775 \begin_inset Quotes erd
9779 \begin_inset space ~
9783 \begin_inset CommandInset ref
9785 reference "sec:slitex"
9790 If your machine doesn't have the
9795 \begin_inset Quotes eld
9803 \begin_inset Quotes erd
9806 ] installed, you'll probably have to use the default
9810 class, which isn't quite as good as
9815 \begin_layout Standard
9820 class is designed for use with version 2.1 of the
9824 LaTeX class file which is now an integral part of LaTeX2e.
9827 \begin_layout Subsection
9831 \begin_layout Standard
9832 Obviously, to use this document class, you need to select
9833 \begin_inset Quotes eld
9841 \begin_inset Quotes erd
9851 \begin_inset space ~
9857 There are some settings in the
9860 \begin_inset space ~
9865 dialog that you should know about that are specific to this class:
9868 \begin_layout Itemize
9869 Don't change the options
9880 \begin_inset space ~
9886 They're ignored by the
9893 \begin_layout Itemize
9894 The default font size is 20
9895 \begin_inset space \thinspace{}
9898 pt with the other options being 17
9899 \begin_inset space \thinspace{}
9903 \begin_inset space \thinspace{}
9907 \begin_inset space \thinspace{}
9913 \begin_layout Itemize
9922 but all math equations are still typeset in the usual roman font.
9925 \begin_layout Itemize
9930 supports A4 and Letter paper sizes as well as a special size for working
9932 \begin_inset space \thinspace{}
9936 It doesn't support A5, B5, legal or executive paper sizes.
9939 \begin_layout Itemize
9940 Don't bother changing the
9944 settings because they are ignored anyway.
9945 All floats appear where they are defined in the text.
9948 \begin_layout Itemize
9953 setting behaves a bit differently for this class.
9958 provides extensive footer and header capabilities including a user-defined
9961 \begin_inset space ~
9965 \begin_inset CommandInset ref
9967 reference "sec:foilfoot"
9972 The title page is treated differently to all other pages in the document
9981 has the logo centered at the bottom of the page (if one is defined).
9982 The possible page style choices and what they do are as follows:
9986 \begin_layout Labeling
9987 \labelwidthstring MMMMMMM
9994 The final output contains no page numbers, or other headers or footers
9995 (except footnotes of course).
9999 \begin_layout Labeling
10000 \labelwidthstring MMMMMMM
10007 The final output contains page numbers centered at the bottom of the page.
10008 No other headings or footers (other than footnotes).
10011 \begin_layout Labeling
10012 \labelwidthstring MMMMMMM
10017 Page numbers in lower right corner.
10018 Additional headers and footers are also shown.
10019 This is also the default.
10022 \begin_layout Labeling
10023 \labelwidthstring MMMMMMM
10028 Gives you access to the
10032 package although its use with
10036 is discouraged by the writer of the
10040 package because of some potential page layout clashes.
10044 \begin_layout Subsubsection
10048 \begin_layout Standard
10049 The following options may be used in the extra class options in the
10051 Document\SpecialChar \menuseparator
10057 \begin_layout Labeling
10058 \labelwidthstring MMMMMMx
10063 This sets up the page layout for 7.33
10064 \begin_inset space \thinspace{}
10068 \begin_inset space \thinspace{}
10071 in paper, which is about the same aspect ratio as a 35
10072 \begin_inset space \thinspace{}
10075 mm slide, making it a bit easier to work with this medium.
10078 \begin_layout Labeling
10079 \labelwidthstring MMMMMMx
10084 Places a rule across the page below the header on every page except the
10088 \begin_layout Labeling
10089 \labelwidthstring MMMMMMx
10094 Places a rule across the page above the footer on every page except the
10098 \begin_layout Labeling
10099 \labelwidthstring MMMMMMx
10104 This is automatically set each time you create a new
10113 to use the dvips driver to rotate those pages that are set as landscape
10117 \begin_layout Labeling
10118 \labelwidthstring MMMMMMx
10123 Simply changes the page dimensions to those of a landscape page but doesn't
10125 Thus if you use this option you need to use an external program to rotate
10126 each page or feed your paper through your printer as landscape.
10127 Note that this option effectively reverses the roles of the
10135 environments (don't worry these are described in the next section).
10138 \begin_layout Labeling
10139 \labelwidthstring MMMMMMx
10144 Equation numbers on the left.
10147 \begin_layout Labeling
10148 \labelwidthstring MMMMMMx
10153 Flush-left equations.
10156 \begin_layout Subsection
10157 Supported Environments
10160 \begin_layout Standard
10161 Most of the environments commonly supported in other classes are also supported
10167 There are several additional environments provided by
10171 as well as a couple added by LyX.
10172 The following environments are shared with other classes:
10175 \begin_layout Standard
10179 \begin_layout Plain Layout
10183 begin{multicols}{2}
10191 \begin_layout Itemize
10197 \begin_layout Itemize
10203 \begin_layout Itemize
10209 \begin_layout Itemize
10215 \begin_layout Itemize
10221 \begin_layout Itemize
10227 \begin_layout Itemize
10233 \begin_layout Itemize
10239 \begin_layout Itemize
10245 \begin_layout Itemize
10251 \begin_layout Itemize
10257 \begin_layout Itemize
10263 \begin_layout Itemize
10269 \begin_layout Itemize
10275 \begin_layout Itemize
10281 \begin_layout Itemize
10287 \begin_layout Itemize
10293 \begin_layout Itemize
10299 \begin_layout Standard
10303 \begin_layout Plain Layout
10315 \begin_layout Standard
10316 That is, all the major environments apart from the sectioning environments.
10317 Since foils are essentially self-contained sections, with a title and body,
10322 provides specific commands for starting new foils and these are:
10325 \begin_layout Itemize
10331 \begin_layout Itemize
10337 \begin_layout Standard
10338 LyX also provides slightly modified versions of these two environments called:
10341 \begin_layout Itemize
10347 \begin_layout Itemize
10350 ShortRotatefoilhead
10353 \begin_layout Standard
10354 and the differences will be explained in the next section.
10357 \begin_layout Standard
10358 Since foils are often used in presenting ideas or new theorems and such
10363 also provides a comprehensive box of goodies for presenting them:
10366 \begin_layout Standard
10370 \begin_layout Plain Layout
10374 begin{multicols}{2}
10382 \begin_layout Itemize
10388 \begin_layout Itemize
10394 \begin_layout Itemize
10400 \begin_layout Itemize
10406 \begin_layout Itemize
10412 \begin_layout Itemize
10418 \begin_layout Itemize
10424 \begin_layout Itemize
10430 \begin_layout Itemize
10436 \begin_layout Itemize
10442 \begin_layout Itemize
10448 \begin_layout Standard
10452 \begin_layout Plain Layout
10464 \begin_layout Standard
10465 The starred versions are unnumbered while the unstarred versions are numbered.
10466 There are also two list environments added by LyX and these are:
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Standard
10486 provides some powerful header and footer capabilities that are best set
10487 in the preamble although they may be set at any point in a document.
10488 If you want to change these settings in your document the best place to
10489 do so is at the very top of a foil, i.
10490 \begin_inset space \thinspace{}
10496 \begin_inset space \space{}
10501 straight after the foilhead.
10504 \begin_layout Standard
10505 For this purpose, the following command styles are provided [
10512 \begin_layout Standard
10516 \begin_layout Plain Layout
10520 begin{multicols}{2}
10528 \begin_layout Itemize
10532 \begin_inset space ~
10538 \begin_layout Itemize
10544 \begin_layout Itemize
10548 \begin_inset space ~
10554 \begin_layout Itemize
10558 \begin_inset space ~
10564 \begin_layout Itemize
10568 \begin_inset space ~
10575 \begin_layout Standard
10576 \begin_inset space ~
10583 \begin_layout Standard
10587 \begin_layout Plain Layout
10599 \begin_layout Standard
10600 There are also a few commands provided by
10604 that aren't directly supported by LyX but I'll tell you what they do and
10605 how to use them in section
10606 \begin_inset space ~
10610 \begin_inset CommandInset ref
10612 reference "sec:unsuppfoils"
10619 \begin_layout Subsection
10620 Building a Set of Foils
10623 \begin_layout Standard
10624 This section will give a simple introduction to using the different environments
10625 to build a set of foils.
10626 If you want to see an example set of foils, take a look at the
10630 file you find in LyX's
10637 \begin_layout Subsubsection
10638 Give It a Title Page
10641 \begin_layout Standard
10642 Unlike other classes that provide
10662 creates the title on a page of its own.
10663 If you leave out the
10667 environment LaTeX will substitute the current date (every time you regenerate
10671 \begin_layout Subsubsection
10675 \begin_layout Standard
10676 As I mentioned earlier, there are four ways of starting a new foil.
10677 For portrait foils you should use
10686 The difference between these two environments is the amount of space between
10687 the title of the foil (the foilhead) and the body of the foil.
10690 \begin_layout Standard
10691 Landscape foils are generated using the
10697 ShortRotatefoilhead
10700 Again the only difference is the spacing between foilhead and body.
10701 Both of the short versions have 0.5 inches less separation between the foilhead
10706 \begin_layout Standard
10707 One problem with the support for landscape foils is the requirement that
10708 you have to use the
10712 driver to generate the PostScript output otherwise the foils won't be rotated.
10713 It is possible to get landscape foils even if you haven't got the
10717 driver provided you can feed your foils sideways through your printer ;-)
10720 \begin_layout Subsubsection
10721 Theorems, Lemmas, Proofs and more
10724 \begin_layout Standard
10725 Due to a small bug in LyX you can't have two of the same type of these environme
10726 nts directly following each other.
10727 They must be separated by something.
10728 If you try, you will just be extending the previous environment as if you
10729 had merged the two environments together.
10730 So, how do you get around this problem? The simplest option is to insert
10731 some text between the two environments or add a
10735 environment between the two with just a
10736 \begin_inset Quotes eld
10744 \begin_inset Quotes erd
10748 This will force LyX to produce two separate environments and hence the
10749 correct LaTeX output.
10750 An example is provided in the example file included with the LyX distribution.
10751 Remember, this problem only occurs if you are trying to place two of the
10752 same type of theorem-like environments one directly after the other.
10755 \begin_layout Subsubsection
10759 \begin_layout Standard
10760 You get all the commonly supported list styles found in other classes as
10761 well as two new ones.
10762 I'll only describe the new ones here.
10763 If you want to find out more about the other list environments check out
10769 If you intend to use itemized lists you might also want to read about the
10773 \begin_inset space ~
10777 \begin_inset space ~
10782 dialog described above in section
10783 \begin_inset space ~
10787 \begin_inset CommandInset ref
10789 reference "sec:bullet"
10796 \begin_layout Standard
10797 The two new list styles,
10805 , are designed to make it easier for you to create lists of do's and don'ts
10806 or right and wrong by providing dedicated environments that use a tick
10807 or a cross as the label of the list.
10808 These lists are in fact dedicated variants of the
10813 They do however require that you have the
10817 packages installed.
10820 \begin_layout Subsubsection
10824 \begin_layout Standard
10829 redefines the floating tables and figures so that they appear exactly where
10830 they are in the text rather than pushing them to the top of the page or
10831 to some user specified location.
10832 In fact if you change the float placement settings they are simply ignored.
10835 \begin_layout Subsubsection
10836 Page Headers and Footers
10837 \begin_inset CommandInset label
10839 name "sec:foilfoot"
10846 \begin_layout Standard
10850 \begin_inset space ~
10859 are two commands used to control the left-footer text string.
10860 The first is meant to allow you to include a graphic logo on your foils
10862 \begin_inset Quotes eld
10870 \begin_inset Quotes erd
10874 While the second is meant to provide a classification for the audience,
10878 \begin_inset space \thinspace{}
10884 \begin_inset space \space{}
10888 It is empty by default.
10891 \begin_layout Standard
10892 The remaining page corners can be filled by
10895 \begin_inset space ~
10900 (which defaults to page numbers),
10903 \begin_inset space ~
10911 \begin_inset space ~
10919 \begin_layout Subsection
10925 \begin_inset CommandInset label
10927 name "sec:unsuppfoils"
10934 \begin_layout Standard
10935 All the commands mentioned below need to be set in a
10943 within another environment.
10946 \begin_layout Subsubsection
10950 \begin_layout Standard
10951 All lengths are adjusted using the
10974 should be replaced by the name given to the length you want to change and
10979 is the length value.
10980 All lengths should be specified in units of length such as inches (
10992 ) or relative to some document or font-based length such as
11002 \begin_layout Standard
11003 It's possible to change the spacing between a foilhead and the body of the
11004 foil by adjusting the length specified by
11011 For example, to make
11016 \begin_inset space \space{}
11019 in closer to their bodies put the following in the preamble:
11025 foilheadskip}{-0.5in}
11028 \begin_layout Standard
11029 The spacings around floats can be adjusted by setting these lengths:
11032 \begin_layout Labeling
11033 \labelwidthstring MMMMMMMMMMM
11040 Separation between the text and the top of the float
11043 \begin_layout Labeling
11044 \labelwidthstring MMMMMMMMMMM
11051 Separation between the float and the caption
11054 \begin_layout Labeling
11055 \labelwidthstring MMMMMMMMMMM
11062 Separation between the caption and the following text
11065 \begin_layout Labeling
11066 \labelwidthstring MMMMMMMMMMM
11073 You can make the captions narrower than the surrounding text by adjusting
11075 Best done relative to
11084 \begin_layout Standard
11085 There are also several title page related lengths that you may find useful
11086 if you have a long title or several authors:
11089 \begin_layout Labeling
11090 \labelwidthstring MMMMMMMMMMM
11097 Separation from headers to
11102 \begin_layout Labeling
11103 \labelwidthstring MMMMMMMMMMM
11121 \begin_layout Labeling
11122 \labelwidthstring MMMMMMMMMMM
11136 \begin_layout Labeling
11137 \labelwidthstring MMMMMMMMMMM
11153 \begin_layout Labeling
11154 \labelwidthstring MMMMMMMMMMM
11170 \begin_layout Standard
11171 The last length related command affects all the list environments.
11182 a list environment then all the vertical spacing between the list items
11184 Note that this is a command not a length so it doesn't require
11190 like the stuff mentioned above.
11193 \begin_layout Subsubsection
11194 Headers and Footers
11197 \begin_layout Standard
11210 commands control whether the logo in the
11214 definition appear on a given page.
11221 in the preamble then none of the foils will have the logo on them.
11222 If you don't want the logo on a particular page place the
11228 directly after the foilhead of that page and the
11234 directly after the next foilhead.
11237 \begin_layout Standard
11238 If you decide to use the
11242 page style setting in the
11245 \begin_inset space ~
11250 dialog you should probably add
11260 to your preamble so headers and footers on landscape pages are correctly
11261 placed when rotated.
11262 This is due to some clashes between the page layouts provided by the
11273 \begin_layout Section
11274 Hollywood (Hollywood spec scripts)
11277 \begin_layout Standard
11283 \begin_layout Subsection
11287 \begin_layout Standard
11288 Getting the format of a Hollywood script right is a
11289 \begin_inset Quotes eld
11293 \begin_inset Quotes erd
11296 It is designed to make the readers focus on content and to be easy and
11297 familiar for the actors to read.
11298 Each page of a script should be one minute of film.
11299 Nothing goes in a script that you cannot see or hear on screen.
11300 The courier 12 pt font should be used throughout.
11304 \begin_layout Subsection
11308 \begin_layout Standard
11309 Speakers' lines should NEVER break in mid-sentence.
11310 If a speaker's lines continue over a page break, repeat the
11314 title followed by (Cont'd).
11317 \begin_layout Subsection
11321 \begin_layout Standard
11326 names as labels then cross-reference the label to insert the name.
11327 The cross-reference dialog will show the current cast of characters.
11328 You can use this to insert the speaker name in narratives also.
11331 \begin_layout Subsection
11332 Paper size and Margins
11335 \begin_layout Standard
11336 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11339 \begin_layout Subsection
11343 \begin_layout Standard
11344 The following environments are available.
11345 You can use hollywood.bind to get the bind keys shown at the right.
11348 \begin_layout Itemize
11352 \begin_inset Newline newline
11357 Used where nothing else works.
11361 \begin_layout Itemize
11367 \begin_inset space \hfill{}
11375 \begin_inset Newline newline
11378 Usually followed by something like
11379 \begin_inset Quotes eld
11382 on Sally waking up.
11383 \begin_inset Quotes erd
11389 \begin_layout Itemize
11393 \begin_inset space \hfill{}
11397 \begin_inset Newline newline
11402 Introduces a new INTERIOR camera set-up.
11403 Always followed by DAY or NIGHT, or something similar to define the lighting
11405 Everthing on this line in CAPS.
11408 \begin_layout Itemize
11412 \begin_inset space \hfill{}
11416 \begin_inset Newline newline
11421 Introduces a new EXTERIOR camera set-up.
11422 Everthing on this line in CAPS.
11425 \begin_layout Itemize
11429 \begin_inset space \hfill{}
11433 \begin_inset Newline newline
11438 The character speaking.
11441 \begin_layout Itemize
11445 \begin_inset space \hfill{}
11449 \begin_inset Newline newline
11454 Instructions to the speaker.
11455 The () are automatically inserted, but only the ( will show in LyX.
11456 Both will be printed.
11459 \begin_layout Itemize
11463 \begin_inset space \hfill{}
11467 \begin_inset Newline newline
11479 \begin_layout Itemize
11483 \begin_inset space \hfill{}
11487 \begin_inset Newline newline
11492 Camera movement instruction.
11494 \begin_inset space \thinspace{}
11498 \begin_inset space \space{}
11504 \begin_layout Itemize
11508 \begin_inset space \hfill{}
11514 \begin_layout Itemize
11518 \begin_inset space \hfill{}
11524 \begin_layout Itemize
11528 \begin_inset space \hfill{}
11534 \begin_layout Itemize
11538 \begin_inset space \hfill{}
11544 \begin_layout Subsection
11548 \begin_layout Itemize
11552 \begin_layout Itemize
11556 \begin_layout Itemize
11558 \begin_inset space \thinspace{}
11565 \begin_layout Itemize
11570 \begin_layout Itemize
11571 PAN — camera movement
11574 \begin_layout Itemize
11575 INSERT — cut to close-up of
11578 \begin_layout Section
11582 \begin_layout Standard
11585 Panayotis Papasotiriou
11588 \begin_layout Subsection
11592 \begin_layout Standard
11593 The ijmpc package is a set of macros that facilitates electronic manuscript
11596 International Journal of Modern Physics C
11599 Similarly, the ijmpd package is for creating manuscripts to be submitted
11602 International Journal of Modern Physics D
11605 Both journals are published by World Scientific.
11606 The corresponding document classes are named
11615 These files, together with instructions for the authors, can be downloaded
11617 \begin_inset Flex URL
11620 \begin_layout Plain Layout
11622 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11628 \begin_inset Flex URL
11631 \begin_layout Plain Layout
11633 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11639 Both packages are modified versions of the standard
11640 \begin_inset Quotes eld
11644 \begin_inset Quotes erd
11647 package, and they are almost (but not exactly) identical.
11648 Most of their features are supported by LyX.
11649 I have used LyX successfully to write articles submitted to both journals
11650 without any problem.
11653 \begin_layout Subsection
11657 \begin_layout Standard
11658 As usual, the easiest way to write a paper is to start with a template.
11661 File\SpecialChar \menuseparator
11680 This will give an (almost) empty document that includes the most common
11681 fields found in a manuscript.
11682 Simply overwrite the existing text (including the brackets,
11687 You should keep in mind the following remarks.
11690 \begin_layout Enumerate
11691 LyX won't let you change the font size and the page style of the document,
11692 because such modifications are not allowed by both packages.
11695 \begin_layout Enumerate
11696 The language of the document should not be changed.
11697 Before previewing your paper, be sure that the babel package is not used.
11698 To do this, click on
11700 Tools\SpecialChar \menuseparator
11711 checkbox in the language settings, and click on
11719 , if you wish to make this change permanent).
11722 \begin_layout Enumerate
11724 \begin_inset Quotes eld
11728 \begin_inset Quotes erd
11731 style must be used to define keywords.
11734 \begin_layout Enumerate
11735 The ijmpc package provides a style named
11736 \begin_inset Quotes eld
11739 Classification Codes
11740 \begin_inset Quotes erd
11743 , which can be used to define classification codes, such as PACS numbers.
11744 Note that this facility is not supported by the ijmpd package.
11747 \begin_layout Enumerate
11748 Several new environments are available:
11749 \begin_inset Quotes eld
11753 \begin_inset Quotes erd
11757 \begin_inset Quotes eld
11761 \begin_inset Quotes erd
11765 \begin_inset Quotes eld
11769 \begin_inset Quotes erd
11773 \begin_inset Quotes eld
11777 \begin_inset Quotes erd
11781 \begin_inset Quotes eld
11785 \begin_inset Quotes erd
11789 \begin_inset Quotes eld
11793 \begin_inset Quotes erd
11797 \begin_inset Quotes eld
11801 \begin_inset Quotes erd
11805 \begin_inset Quotes eld
11809 \begin_inset Quotes erd
11813 \begin_inset Quotes eld
11817 \begin_inset Quotes erd
11821 \begin_inset Quotes eld
11825 \begin_inset Quotes erd
11829 \begin_inset Quotes eld
11833 \begin_inset Quotes erd
11837 \begin_inset Quotes eld
11841 \begin_inset Quotes erd
11845 \begin_inset Quotes eld
11849 \begin_inset Quotes erd
11853 \begin_inset Quotes eld
11857 \begin_inset Quotes erd
11861 Their use is more or less obvious.
11862 LyX supports all these environments; it will use the proper label, text
11863 style, and numbering scheme for each of them.
11866 \begin_layout Enumerate
11867 Both packages use basic citations; the natbib package should not be used.
11868 In LyX, citation references are shown as usual; in the output, citations
11869 are shown as superscripts.
11870 If you want to use a citation as normal text, you should use the
11875 \begin_inset space \thinspace{}
11879 \begin_inset space \space{}
11883 \begin_inset Quotes eld
11887 \begin_inset space \space{}
11897 \begin_inset Quotes erd
11903 \begin_layout Enumerate
11905 \begin_inset Quotes eld
11909 \begin_inset Quotes erd
11912 section in both packages.
11913 To put acknowledgments, just use the
11914 \begin_inset Quotes eld
11918 \begin_inset Quotes erd
11924 \begin_layout Enumerate
11925 Appendices may be added to the paper,
11929 the Acknowledgments and
11934 LyX provides a special environment, called
11935 \begin_inset Quotes eld
11939 \begin_inset Quotes erd
11942 which marks the beginning of the appendices.
11943 This environment should be left blank; it just sends a LaTeX command, but
11944 nothing is really printed.
11946 \begin_inset Quotes eld
11950 \begin_inset Quotes erd
11953 is printed with blue letters, as a signal that all sections after that
11954 point are appendices.
11955 To write an appendix, use the
11956 \begin_inset Quotes eld
11960 \begin_inset Quotes erd
11964 LyX will number each appendix with capital letters, as required by both
11967 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11978 be present before the first appendix; if not, all appendices will be numbered
11979 as normal sections in the output.
11982 \begin_layout Enumerate
11983 The ijmpc and the ijmpd packages use the
11987 command to implement table captions.
11988 As a result, a table created by LyX is printed correctly, but its caption
11990 However, you can use some TeX code to overpass this problem, so that captions
11991 are printed as expected.
11992 To do so, create a float table as usual, remove the caption, and replace
11993 it with the TeX code
12003 (sic); you must also the TeX code
12007 immediately after the tabular material.
12008 Study the example table included in the template files to see how this
12009 trick is implemented.
12010 Alternatively, If you need table captions, you should implement the whole
12015 file, then include this file to the LyX document (
12017 Insert\SpecialChar \menuseparator
12018 File\SpecialChar \menuseparator
12020 \begin_inset space ~
12026 Details on how to create a table float can be found in the files
12034 , included in the corresponding packages.
12037 \begin_layout Subsection
12038 Preparing a paper for submission
12041 \begin_layout Standard
12042 Before you submit your paper you must export the LyX document as a LaTeX
12045 File\SpecialChar \menuseparator
12046 Export\SpecialChar \menuseparator
12053 \begin_layout Plain Layout
12054 Actually you have the choice between LaTeX (plain) and pdflatex.
12055 If you intend to use pdflatex to prepare the paper, you should use the
12056 pdflatex option so that included graphics are converted to PDF format,
12057 ready for use by pdflatex.
12062 , then make the following changes to the resulting
12069 \begin_layout Enumerate
12070 Remove the comment lines before the
12079 \begin_layout Enumerate
12080 Remove everything between (and including) the
12092 commands, except for any commands you specifically put into the LaTeX preamble.
12095 \begin_layout Standard
12100 file should be saved and processed through LaTeX as many times as necessary.
12101 You may also want to check the resulting
12108 \begin_layout Subsection
12112 \begin_layout Standard
12113 The use of TeX code is reduced to two commands, which must be placed at
12114 the top of the document.
12115 If you started writing your paper by using the
12123 template, the TeX code needed is already in its place; you usually don't
12125 You may only modify the first TeX code to specify the information printed
12126 to the top of odd and even pages (authors' names and short paper's title,
12128 This TeX code must have the form
12132 markboth{Authors' Names}{Short Paper's Title}
12137 \begin_layout Section
12141 \begin_layout Standard
12147 \begin_layout Subsection
12151 \begin_layout Standard
12152 The iopart package provides a document class to create electronic manuscript
12153 submission to the journals published by the Institute of Physics.
12154 Instructions for the authors how to create a paper using the iopart class
12155 can be downloaded together with the iopart package from the site
12156 \begin_inset Flex URL
12159 \begin_layout Plain Layout
12161 ftp://ftp.iop.org/pub/journals/latex2e
12169 \begin_layout Subsection
12173 \begin_layout Standard
12174 The easiest way to write a paper is to start with the file
12178 that is available in LyX's examples files folder.
12179 Open this file, save it under a new name, and start writing.
12180 The example file explains how to use the special text environments.
12181 Here are the most important advices:
12184 \begin_layout Itemize
12185 To be able to compile your document to a PDF, PS, or DVI, assure that the
12188 Use AMS math package
12190 in the document settings under
12197 \begin_layout Itemize
12200 The title environment defines the kind of your paper.
12201 So use one of the following environments for the title:
12205 \begin_layout Itemize
12214 \begin_layout Itemize
12223 \begin_layout Itemize
12229 for a Topical review
12232 \begin_layout Itemize
12241 \begin_layout Itemize
12250 \begin_layout Itemize
12256 for a Paper (same as Title)
12259 \begin_layout Itemize
12265 for a Preliminary communication
12268 \begin_layout Itemize
12274 for a Rapid communication
12277 \begin_layout Itemize
12283 for a Letter to the editor
12287 \begin_layout Itemize
12290 All title environments except of
12294 can have an optional short title.
12297 \begin_layout Itemize
12298 There is a general title environment
12302 which is not directly supported by the LyX.
12303 This can be used as TeX code when your document doesn't fit into one of
12304 the other title types.
12307 \begin_layout Standard
12308 For more informations like hints for special table and formula formatting,
12309 look at the IOP author guidelines.
12312 \begin_layout Section
12316 \begin_layout Standard
12319 Panayotis Papasotiriou
12322 \begin_layout Subsection
12326 \begin_layout Standard
12327 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12328 that facilitates electronic manuscript submission to the journals they
12330 Most known of them (at least in my domain of interest) are
12332 Astrophysics and Space Science
12338 , but there are many others (see a complete list at
12339 \begin_inset Flex URL
12342 \begin_layout Plain Layout
12344 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12350 The Kluwer package may be downloaded from the site
12351 \begin_inset Flex URL
12354 \begin_layout Plain Layout
12356 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12362 A complete user guide is contained in that package (but it can also be
12363 downloaded separately).
12366 \begin_layout Standard
12367 LyX supports many features of the package but not everything.
12368 However, the TeX code needed is reduced to some
12369 \begin_inset Quotes eld
12373 \begin_inset Quotes erd
12376 commands of the package (see
12377 \begin_inset space ~
12381 \begin_inset CommandInset ref
12383 reference "subsec:kluwer_peculiarities"
12388 I have recently used LyX to write an article submitted to the
12390 Astrophysics and Space Science
12392 without any problem.
12395 \begin_layout Subsection
12399 \begin_layout Standard
12400 The easiest way to write a paper is to start with the Kluwer template file.
12403 File\SpecialChar \menuseparator
12415 This will give an (almost) empty document that includes the most common
12416 fields found in a manuscript and a short description of their use.
12417 As in most templates, simply overwrite the existing text (including the
12422 ) with the correct information.
12425 \begin_layout Subsection
12426 Preparing a paper for submission
12429 \begin_layout Standard
12430 As in the AASTeX package, before you submit your paper to a journal you
12432 \begin_inset Quotes eld
12436 \begin_inset Quotes erd
12442 \begin_layout Enumerate
12443 Export your paper as a LaTeX file.
12444 To do this, click on
12446 File\SpecialChar \menuseparator
12447 Export\SpecialChar \menuseparator
12454 \begin_layout Enumerate
12459 file with a text editor and make the following changes
12463 \begin_layout Enumerate
12464 remove the comment lines before the
12473 \begin_layout Enumerate
12474 remove everything between (and including) the
12486 commands, except for any commands you specifically put into the LaTeX preamble.
12489 \begin_layout Standard
12498 \begin_layout Enumerate
12503 file through LaTeX as many times as necessary (usually up to three).
12506 \begin_layout Enumerate
12512 \begin_inset space \thinspace{}
12516 \begin_inset space \space{}
12523 , and check if everything is OK (it should, if you didn't make any mistake).
12526 \begin_layout Subsection
12527 \begin_inset Quotes eld
12531 \begin_inset Quotes erd
12534 of the Kluwer package
12535 \begin_inset CommandInset label
12537 name "subsec:kluwer_peculiarities"
12544 \begin_layout Standard
12545 The Kluwer package has the following
12546 \begin_inset Quotes eld
12550 \begin_inset Quotes erd
12556 \begin_layout Enumerate
12557 It is possible to write multiple articles in the same LaTeX file
12561 \begin_layout Plain Layout
12562 I can't imagine any good reason to do this.
12568 Each article must be included in the environment
12569 \begin_inset Quotes eld
12573 \begin_inset Quotes erd
12577 Unfortunately, this environment cannot be omitted, even if you write just
12579 Therefore, each article starts with the command
12585 and, obviously, ends with the command
12592 Although this can be implemented in LyX, I didn't included it, since it
12593 looks ugly and can confuse the novice user.
12594 Therefore, you need to enter them directly and mark them as LaTeX code
12596 \begin_inset Quotes eld
12600 \begin_inset Quotes erd
12606 \begin_layout Enumerate
12607 Information given at the beginning of the article (i.
12608 \begin_inset space \thinspace{}
12612 \begin_inset space \space{}
12615 title, subtitle, author, institution, running title, running author, abstract
12616 and keywords) must be included in an environment called
12617 \begin_inset Quotes eld
12621 \begin_inset Quotes erd
12625 This is not implemented in LyX, so you must enter title, subtitle etc.
12626 \begin_inset space ~
12629 between two TeX code lines (
12644 \begin_layout Enumerate
12645 According to the user manual, the label of each bibliography item must be
12669 \begin_layout Standard
12674 template takes care of all these
12675 \begin_inset Quotes eld
12679 \begin_inset Quotes erd
12683 If you start a new paper using this template you don't need to do anything
12688 \begin_layout Enumerate
12689 don't delete the TeX code included in the template, and
12692 \begin_layout Enumerate
12693 copy the example bibliography item included in the template and modify it
12694 as necessary to enter new bibliography items.
12697 \begin_layout Section
12701 \begin_layout Standard
12707 \begin_layout Subsection
12711 \begin_layout Standard
12712 The LyX document classes
12714 article (koma-script)
12718 report (koma-script)
12736 correspond to the LaTeX document classes
12753 \begin_inset space ~
12756 of the Koma-Script family.
12757 They are replacements for the standard document classes
12773 , resp., and fit better to European typography conventions in a number of
12777 \begin_layout Itemize
12778 Standard character size is 11pt in
12780 article (koma-script)
12784 report (koma-script)
12792 letter (koma-script)
12797 \begin_layout Itemize
12798 Headings, labels of the description environment, and a number of elements
12801 letter (koma-script)
12803 document class are set in a bold sans serif font.
12807 \begin_layout Plain Layout
12808 There is a big difference between the bold sans serif old cm fonts and new
12809 ec fonts, especially in the appearance of headings.
12810 In comparison, the ec bold sans serif fonts look a bit thin.
12811 Here the LaTeX package
12819 helps to produce the
12820 \begin_inset Quotes eld
12824 \begin_inset Quotes erd
12827 appearance when using the ec fonts.
12832 The numbering of chapter headings is made in the same way as the numbering
12833 of section headings, that is without the extra line
12834 \begin_inset Quotes eld
12837 Chapter\SpecialChar \ldots{}
12839 \begin_inset Quotes erd
12843 In addition, the appearance of the headings can be modified by using a
12844 number of options (in LyX to be entered in the field
12847 \begin_inset space ~
12854 Layout\SpecialChar \menuseparator
12858 A detailed German description of these options can be found in the Koma-Script
12866 \begin_layout Itemize
12867 The main means in the Koma-Script document classes to design the type area
12876 (in LyX to be entered in the extra class options field in the dialog
12878 Document\SpecialChar \menuseparator
12882 They make a clearer modification of page margins possible as do the options
12885 Document\SpecialChar \menuseparator
12889 A detailed German description of these and other type area options can
12890 be found in the Koma-Script documentation
12897 \begin_layout Itemize
12898 The LaTeX document classes of the Koma-Script family define a number of
12899 additional commands.
12900 Those part of it which makes sense in LyX is implemented in corresponding
12904 \begin_layout Standard
12905 A detailed German description of the LaTeX document classes of the Koma-Script
12906 family can be found in the Koma-Script documentation
12914 \begin_layout Plain Layout
12915 There is an English translation
12919 , but it is not a complete one.
12924 The following sections describe only those aspects, which are relevant
12928 \begin_layout Subsection
12929 article (koma-script), report (koma-script), and book (koma-script)
12932 \begin_layout Standard
12933 The document classes
12935 article (koma-script)
12939 report (koma-script)
12949 are implemented in the layout files
12962 They contain all the paragraph types of the corresponding standard document
12975 , resp., partly modified, with the exception of the LyX specific
12979 -type, which is replaced by the new
12983 -type having the same functionality.
12988 -Type there is a number of new paragraph types added.
12995 letter (koma-script)
13000 \begin_layout Itemize
13009 : are equivalents to
13017 , resp., additionally inserting an entry in the table of contents.
13026 are not contained in
13028 article (koma-script)
13033 \begin_layout Itemize
13042 : behave exactly as
13050 , resp., additionally clearing running heads.
13055 is not contained in
13057 article (koma-script)
13063 \begin_layout Plain Layout
13076 report (koma-script)
13078 , but since this is identical to
13082 , is has not been implemented in LyX.
13090 \begin_layout Itemize
13095 : generates a heading directly above the following paragraph in the standard
13096 character size without affecting the structure of the document.
13099 \begin_layout Itemize
13108 are special captions which respect the different space settings needed
13109 for captions placed above or below an element (if you follow strict typographic
13110 rules, you might want to place table captions always above the table).
13111 You can also use the class option
13115 , which will switch
13128 You need at least Koma-Script version 2.8q to use this.
13131 \begin_layout Itemize
13136 : can be used to set a bonmot, e.
13137 \begin_inset space \thinspace{}
13141 \begin_inset space \space{}
13144 at the beginning of a chapter.
13145 If you use the optional argument (
13147 Insert\SpecialChar \menuseparator
13149 \begin_inset space ~
13154 ), you can insert the dictum's author there.
13155 Dictum and author are separated by a line.
13156 You need at least Koma-Script version 2.8q to use this.
13161 is not contained in
13163 article (koma-script)
13168 \begin_layout Standard
13169 The following types, together with the standard types
13181 , form the title area of the document.
13182 They must be entered ahead of the first
13183 \begin_inset Quotes eld
13187 \begin_inset Quotes erd
13194 \begin_layout Plain Layout
13195 The corresponding LaTeX commands must appear before the
13206 When such a type is used more than once, the latter usage overwrites the
13207 former one, that means, for every type only the latest usage is valid.
13208 The order of the different types however has, like
13220 , no effect on the appearance of the produced document.
13223 \begin_layout Itemize
13228 : produces a centered paragraph above the ordinary title (
13240 ) for the subject of the document.
13243 \begin_layout Itemize
13248 : produces a centered paragraph below the ordinary title (
13260 ) for the publishers' name.
13263 \begin_layout Itemize
13270 report (koma-script)
13276 produces a centered paragraph on its own page behind the title page, or
13279 article (koma-script)
13281 produces a centered paragraph below the ordinary title (
13297 ) for a dedication.
13300 \begin_layout Itemize
13305 : produces a left aligned paragraph above the ordinary title (
13321 ) for a document`s head.
13324 \begin_layout Itemize
13329 : produces in a double-sided print in
13331 report (koma-script)
13337 a left-aligned paragraph at the top of the title page`s back or has no
13338 effect in a single-sided print or in
13340 article (koma-script)
13345 \begin_layout Itemize
13350 : produces in a double-sided print in
13352 report (koma-script)
13358 a left-aligned paragraph at the bottom of the title page`s back or has
13359 no effect in a single-sided print or in
13361 article (koma-script)
13366 \begin_layout Itemize
13371 : produces a special
13372 \begin_inset Quotes eld
13376 \begin_inset Quotes erd
13379 page ahead of the actual document containing a paragraph without special
13383 \begin_layout Standard
13384 The layout files for the document classes
13386 article (koma-script)
13390 report (koma-script)
13396 do include the file
13401 This is thought of as a place to define your own types.
13406 in your personal layout directory and edit the file!
13409 \begin_layout Subsection
13410 letter (koma-script)
13413 \begin_layout Standard
13417 \begin_layout Plain Layout
13429 \begin_layout Standard
13433 letter (koma-script)
13435 is implemented in the layout file
13440 It contains all the paragraph types of the corresponding standard document
13445 , partly modified, with the exception of the LyX specific types
13457 type, which is replaced by the new
13462 In addition, it contains, in contrast to the standard document class, the
13480 Furthermore, there are a number of new letter specific types.
13483 \begin_layout Standard
13487 \begin_layout Plain Layout
13499 \begin_layout Standard
13500 The appearance of the letter produced by this document class can be controlled
13501 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13505 \begin_layout Plain Layout
13506 For example, the standard appearance of the letter`s heading, consisting
13507 of name and address, is quite self-willed.
13509 \begin_inset Quotes eld
13513 \begin_inset Quotes erd
13516 heading is produced by the following LaTeX commands in the preamble:
13519 \begin_layout LyX-Code
13529 \begin_layout LyX-Code
13545 \begin_layout LyX-Code
13555 \begin_layout LyX-Code
13575 A detailed German description of such LaTeX commands can be found in the
13576 Koma-Script documentation
13581 With it, the letter's author can produce his personal letter layout.
13584 \begin_layout Standard
13593 define the beginning of the letter and must be used in every letter.
13594 To emphasize them in the LyX document class, they are marked with the letter
13604 \begin_inset space ~
13607 in the left margin.
13608 It is possible to write any number of letters in one file.
13613 type produces a new letter using the same addressee and a
13617 type produces a new addressee.
13634 are ordinary paragraph types and can also be used several times in one
13635 and the same letter.
13638 \begin_layout Itemize
13643 : produces a paragraph for the addressee and implicitly defines the beginning
13647 \begin_layout Itemize
13652 : produces a paragraph for the form of address and implicitly produces a
13656 \begin_layout Itemize
13661 : produces a paragraph for a close.
13664 \begin_layout Itemize
13669 : produces a paragraph for a postscript.
13672 \begin_layout Itemize
13677 : produces a paragraph for a distribution list.
13680 \begin_layout Itemize
13685 : produces a paragraph for enclosures.
13688 \begin_layout Standard
13729 are input types provided with a label to enter information, which will
13730 be processed by the document class.
13734 \begin_layout Plain Layout
13735 It could be seen as a matter of inconsequence, that the types
13743 described above are not such input types as well.
13744 Because of the special meaning of those types, however, I have implemented
13745 them as ordinary paragraph types with a one letter mark in the left margin.
13746 Moreover, it would affect my feeling of symmetry, if the
13754 type had such a serious different appearance.
13759 The types must be used ahead of the corresponding
13766 \begin_layout Standard
13767 An implementation of these types in a WYSIWYG fashion does not seem to make
13768 sense, because the real appearance of the produced letter does not only
13769 depend on the usage of the particular type, but also on other factors.
13770 For example, a signature entered in the
13774 type will in the standard behavior appear in the produced letter only,
13775 when in the same letter also a
13780 The entered value of the
13784 type will in the standard behavior not appear in the produced letter at
13786 The possibility to design the letter`s heading freely is already indicated
13787 in a footnote above.
13790 \begin_layout Standard
13791 The input types can also be used as empty paragraphs.
13792 This makes sense e.
13793 \begin_inset space \thinspace{}
13797 \begin_inset space \space{}
13809 type is not used at all, in the standard behavior the value of the
13813 type is used as signature, whereas if an empty
13817 type is used, no signature value is defined.
13820 \begin_layout Standard
13821 By using the input types it is possible to write a letter template, containing
13822 filled input types with your personal dates (name, address, etc.) and empty
13823 input types for other dates you want to enter.
13826 \begin_layout Itemize
13831 : sender's name, in the standard behavior appears as a centered paragraph
13832 in small caps in the letter`s heading.
13835 \begin_layout Itemize
13840 : sender's signature, in the standard behavior appears below the
13849 type is used, the value of the
13853 type appears instead.
13856 \begin_layout Itemize
13861 : sender's address, in the standard behavior appears in a centered paragraph
13862 in the letter`s heading below the sender's name.
13865 \begin_layout Itemize
13870 : sender's telephone number, in the standard behavior only sets the LaTeX
13880 \begin_layout Itemize
13885 : place of the letter`s making.
13888 \begin_layout Itemize
13893 : date of the letter`s making.
13902 , in the standard behavior, produce the place and the date in a right-aligned
13903 line below the addressee's field.
13908 type is used, neither place nor date appear, independent of the value of
13918 type is used, the date of the letter `s production is used.
13921 \begin_layout Itemize
13926 : sender`s back address, in the standard behavior appears above the addressee's
13927 field in a small sans serif font.
13930 \begin_layout Itemize
13935 : special mail information, in the standard behavior appears underlined
13936 above the addressee's field below the back address.
13939 \begin_layout Itemize
13944 : additional information, in the standard behavior appears on right side
13945 below the addressee`s field.
13948 \begin_layout Itemize
13953 : the letter's title, in the standard behavior appears in a big, bold, sans
13954 serif font above the subject.
13957 \begin_layout Itemize
13962 : the letter's subject, in the standard behavior appears in a bold font
13970 \begin_layout Standard
13991 produce a business letter like line above the
13995 line containing the fields
13996 \begin_inset Quotes eld
14000 \begin_inset Quotes erd
14004 \begin_inset Quotes eld
14008 \begin_inset Quotes erd
14012 \begin_inset Quotes eld
14016 \begin_inset Quotes erd
14020 \begin_inset Quotes eld
14024 \begin_inset Quotes erd
14028 \begin_inset Quotes eld
14032 \begin_inset Quotes erd
14036 \begin_inset Quotes eld
14040 \begin_inset Quotes erd
14044 For the date field, the value of the
14050 \begin_inset Quotes eld
14053 business letter types
14054 \begin_inset Quotes erd
14057 is used, the value of the
14061 type however does not appear, but only the LaTeX variable
14068 The ordinary output of place and date in a right-aligned line below the
14069 addressee`s field is suppressed.
14070 The types are implemented as input types provided with a label and must
14071 be used ahead of the corresponding
14078 \begin_layout Itemize
14086 \begin_layout Itemize
14094 \begin_layout Itemize
14102 \begin_layout Itemize
14110 \begin_layout Itemize
14118 \begin_layout Subsection
14119 The new letter class: letter (koma-script v.2)
14122 \begin_layout Standard
14128 \begin_layout Standard
14129 \begin_inset VSpace medskip
14135 \begin_layout Standard
14137 Koma-Script version 2.8 has introduced a new letter class
14141 which supersedes the now unsupported
14146 It has — on the LaTeX side — a completely new interface and is not compatible
14147 with the old class.
14148 Therefore, LyX supports both, though it is recommended to use the new class.
14151 \begin_layout Standard
14152 This class covers the same functionality as
14154 letter (koma-script),
14157 The basic items are
14161 (receiver's address, same as
14165 in the old layout),
14178 will start a new letter (i.
14179 \begin_inset space \thinspace{}
14183 \begin_inset space \space{}
14186 you can write several letters per document).
14187 New elements are sender's
14203 and the possibility to use a
14209 Insert\SpecialChar \menuseparator
14215 \begin_layout Standard
14216 The biggest improvement is, though, that the letter's layout is configurable
14217 at almost any needs.
14218 This can be done via the preamble or with a special style file (Letter
14219 Class Option, extension
14223 ), that will be read in as a class option.
14227 \begin_layout Plain Layout
14228 The KOMA package comes with some default
14233 There is, for instance, a
14237 file that follows german typesetting rules, or a
14241 that provides the default layout of the old
14246 The latter can be loaded with the class option
14255 ayout\SpecialChar \menuseparator
14260 ocument\SpecialChar \menuseparator
14272 template that is included in LyX for examples.
14273 A detailed description is to be found in the Koma-Script documentation
14281 \begin_layout Subsection
14285 \begin_layout Standard
14286 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14290 \begin_layout Itemize
14291 The chapter number of a
14295 type appears on a line of its own above the chapter heading instead of
14296 appearing in the same line ahead of it.
14297 The cause for that is the LyX internal behavior for the labeltype
14301 in the layout file.
14304 \begin_layout Itemize
14305 The headings of the types
14313 are only put in the
14314 \begin_inset Quotes eld
14318 \begin_inset Quotes erd
14321 LaTeX table of contents, but not in the LyX table of contents (
14323 Document\SpecialChar \menuseparator
14325 \begin_inset space ~
14329 \begin_inset space ~
14337 \begin_layout Itemize
14338 The paragraphs in a
14342 document class appear in a skip separation mode, not indented.
14343 This is the standard behavior, no special LaTeX commands are needed for
14347 Document\SpecialChar \menuseparator
14350 dialog the corresponding radio button indicates
14359 value always has the effect that extra LaTeX commands are inserted in the
14360 document to produce the gap, which is not what is wanted in this case.
14363 \begin_layout Section
14364 Latex8 (IEEE Conference Papers)
14367 \begin_layout Standard
14373 \begin_layout Subsection
14377 \begin_layout Standard
14378 Since this class is specifically for writing submissions to IEEE sponsored
14379 conferences I strongly recommend that you get a copy of their Authors Kit.
14384 package and associated bibliography style file is included in the kit.
14385 The Authors Kit is usually sent out by email once your initial submission
14387 There is a lot of useful information in the Authors Kit explaining formatting
14388 restrictions and so on and I will assume you have read this since that
14389 means I don't have to repeat it all here.
14392 \begin_layout Subsection
14396 \begin_layout Standard
14397 [AR\SpecialChar \@.
14401 \begin_layout Subsection
14402 Supported Environments
14405 \begin_layout Itemize
14411 \begin_layout Itemize
14417 \begin_layout Itemize
14423 \begin_layout Itemize
14429 \begin_layout Itemize
14435 \begin_layout Itemize
14441 \begin_layout Itemize
14447 \begin_layout Itemize
14453 \begin_layout Itemize
14459 \begin_layout Subsection
14460 Differences Between Screen and Paper
14463 \begin_layout Standard
14464 There are slight differences in appearance mainly with the presentation
14465 of section counters.
14466 On screen the trailing period of the section counter is missing but it
14467 will appear in the output so don't let this worry you.
14470 \begin_layout Section
14474 \begin_layout Standard
14480 \begin_layout Subsection
14484 \begin_layout Standard
14485 Memoir is a very powerful and constantly evolving class.
14486 It has been designed with regard to fictional and non-fictional literature.
14487 Its aim is to let the user have maximum control over the typesetting of
14489 Memoir is based on the standard book class, but it can also emulate the
14490 article class (see below).
14493 \begin_layout Standard
14494 Peter Wilson, the developer of Memoir, is known as the author of lots of
14495 useful packages in the LaTeX world.
14496 Most of them have been merged with Memoir.
14497 Therefore, it is much easier to layout the table of contents, appendices,
14498 chapter designs and such.
14499 LyX, though, does not support all of these goodies natively.
14500 Some of them might be added to forthcoming releases
14504 \begin_layout Plain Layout
14505 You are invited to send suggestions to
14506 \begin_inset Flex URL
14509 \begin_layout Plain Layout
14511 lyx-devel@lists.lyx.org
14521 , lots will probably never, due to the limitations of LyX's framework.
14522 Of course you can still use all features with the help of some native LaTeX
14527 \begin_layout Plain Layout
14532 \begin_layout Plain Layout
14542 \begin_inset space ~
14546 \begin_inset CommandInset ref
14548 reference "sec:Inserting-TeX-Code"
14558 In this section, we can only list those features which are natively supported
14560 For detailed descriptions (and for the rest of features) we are recommending
14561 to have a look at the detailed manual of the Memoir class
14565 \begin_layout Plain Layout
14570 \begin_layout Plain Layout
14580 \begin_inset Flex URL
14583 \begin_layout Plain Layout
14585 CTAN:/macros/latex/memoir/memman.pdf
14595 , which is not only a user guide for the class, but also both a comprehensive
14596 description on good typesetting and a superb example for good typesetting
14600 \begin_layout Subsection
14601 Basic features and restrictions
14604 \begin_layout Standard
14605 Memoir supports basically all features of the standard book classes.
14606 There are, however, some differences, as follows:
14609 \begin_layout Description
14611 \begin_inset space ~
14614 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14617 \begin_layout Description
14619 \begin_inset space ~
14622 style: The fancy page style is not supported, due to a command clash between
14623 Memoir and the fancyhdr package (they are both defining a command with
14624 the same name, which confuses LaTeX).
14625 Instead, Memoir comes with a bunch of own page styles (see
14627 Layout\SpecialChar \menuseparator
14628 Document\SpecialChar \menuseparator
14630 \begin_inset space ~
14636 If you want to use these for the chapter pages, you have to use the command
14643 in the main text or in preamble (e.
14644 \begin_inset space \thinspace{}
14648 \begin_inset space \space{}
14655 chapterstyle{companion}
14660 \begin_layout Description
14661 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14662 an optional argument in the standard classes.
14663 With this, you can specify an alternative version of the title for the
14664 table of contents and the headers (for instance, if the title is too long).
14665 In LyX, you can do this via
14667 Insert\SpecialChar \menuseparator
14669 \begin_inset space ~
14674 at the beginning of a chapter/section.
14675 Memoir features a second optional argument and thus separates the table
14676 of contents from the header.
14677 You can define three variants of a title with this: one for the main text,
14678 one for the table of contents, and one for the headers.
14679 Simply insert two optional arguments if you need this feature, the first
14680 one containing the short title for the Table of Contents, the second one
14681 containing an alternative short title for the headers.
14684 \begin_layout Description
14685 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14686 of contents, the list of figures and the list of table start a new page
14688 Memoir does not follow this route.
14689 You have to insert a page break yourself, if you want to have one.
14692 \begin_layout Description
14693 Titlepage: For some unknown reason, Memoir uses pagination on the title
14694 page (in the standard classes, title pages are
14695 \begin_inset Quotes eld
14699 \begin_inset Quotes erd
14703 \begin_inset space \thinspace{}
14707 \begin_inset space \space{}
14711 If you want an empty title page, type
14715 aliaspagestyle{title}{empty}
14720 \begin_layout Description
14721 Article: With the class option
14727 Layout\SpecialChar \menuseparator
14728 Document\SpecialChar \menuseparator
14730 \begin_inset space ~
14735 ), you can emulate article style.
14736 That is, counters (footnotes, figures, tables etc.) will not be reset on
14737 new chapters, chapters don't start a new page (but are—in contrary to
14738 \begin_inset Quotes eld
14742 \begin_inset Quotes erd
14745 article classes—still allowed), parts, though, use their own page, as in
14749 \begin_layout Description
14750 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14751 font commands, which have been used in the old LaTeX version 2.09 (e.
14752 \begin_inset space \thinspace{}
14756 \begin_inset space \space{}
14772 It produces an error and stops LaTeX whenever such a command appears.
14777 reallows the commands and spits out warnings instead (which does at least
14779 Since a lot of packages and particularly BibTeX style files are still using
14780 those commands, we have decided to use this option by default.
14783 \begin_layout Subsection
14787 \begin_layout Standard
14788 We will only describe the features supported by LyX (which is not much currently
14790 Please consult the Memoir manual
14794 \begin_layout Plain Layout
14799 \begin_layout Plain Layout
14809 \begin_inset Flex URL
14812 \begin_layout Plain Layout
14814 CTAN:/macros/latex/memoir/memman.pdf
14827 \begin_layout Description
14828 Abstract: You may wonder why an abstract is an extra feature.
14829 Well, it is in book class.
14830 Usually books don't have abstracts.
14831 Memoir, however, has.
14832 You can use it wherever and how often you like.
14835 \begin_layout Description
14836 Chapterprecis: You may know this from belletristic: The contents of a chapter
14837 is shortly described below the title and also in the table of contents
14839 \begin_inset space \thinspace{}
14843 \begin_inset space \space{}
14848 Our hero arrives in Troia; he loses some friends; he finds others
14851 Chapterprecis does exactly this.
14852 It is therefore only sensible below a chapter.
14855 \begin_layout Description
14856 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14857 The epigraph environment provides an elegant way of typesetting such a
14859 The motto itself (text) and its author (source) are divided by a short
14861 Unfortunately, we have to fool LyX a bit here again, since the environment
14862 needs two arguments (text and source).
14863 In this case, we have to use curly brackets (in TeX mode) between the two
14874 <author of the slogan>.
14877 \begin_layout Description
14878 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14879 complex figurative poems).
14880 LyX can only support a few of them.
14881 One is poemtitle, which is a centered title for poems, which will also
14882 be added to the table of contents (verse is the standard environment for
14884 Memoir has some enhanced versions of verse, but you need to use TeX code,
14885 because they have to be nested inside regular verse environments, which
14886 is not possible with LyX).
14889 \begin_layout Description
14890 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14893 \begin_layout Section
14894 Article (mwart), book (mwbk) and report (mwrep)
14895 \begin_inset Argument
14898 \begin_layout Plain Layout
14911 \begin_layout Standard
14917 \begin_layout Standard
14918 The LyX document classes
14934 correspond to the LaTeX document classes
14947 They are replacements for the standard document classes
14959 , resp., and fit better to Polish typography conventions in a number of points.
14963 \begin_layout Standard
14967 \begin_layout Itemize
14968 Unnumbered titles (with star, e.
14969 \begin_inset space \thinspace{}
14973 \begin_inset space \space{}
14980 ) are added into table of contents,
14983 \begin_layout Itemize
14984 Additional page styles:
14988 \begin_layout Description
14989 uheadings header with separated lines,
14992 \begin_layout Description
14993 myheadings custom header, contents headers via commands:
15008 \begin_layout Description
15009 myuheadings custom header with separated lines,
15012 \begin_layout Description
15013 outer page number is placed on outer side of page
15017 \begin_layout Itemize
15022 \begin_layout Description
15023 rmheadings serif titles — default,
15026 \begin_layout Description
15027 sfheadings sansserif titles,
15030 \begin_layout Description
15031 authortitle on title page first placed is author next title — default,
15034 \begin_layout Description
15035 titleauthor on title page first placed is title next author,
15038 \begin_layout Description
15039 withmarginpar reserve place on page for margins.
15043 \begin_layout Section
15047 \begin_layout Standard
15052 provides an alternative to the standard
15057 It provides similar functionality, but you might prefer this layout with
15058 sans serif sections, headings, and more.
15061 \begin_layout Section
15065 \begin_layout Standard
15071 \begin_layout Standard
15072 \begin_inset VSpace bigskip
15078 \begin_layout Standard
15083 \begin_inset space ~
15088 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15089 \begin_inset Formula $\beta$
15092 release of May, 1999) class.
15095 \begin_layout Standard
15100 textclass, which works with RevTeX 3.1.
15101 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15102 That means that it doesn't interact very well with LyX, which requires
15103 LaTeX2e, although it has been kludged to work.
15104 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15108 \begin_inset space ~
15113 textclass should also be pretty easy to use.
15116 \begin_layout Standard
15117 These documents are supposed to be used in
15121 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15122 macros, and assume you'll know what to put in the preamble if necessary.
15125 \begin_layout Subsection
15129 \begin_layout Standard
15130 All you need to do is install RevTeX 4, as described in the package's README
15132 The package can be found at The RevTeX 4 Web Site
15133 \begin_inset Flex URL
15136 \begin_layout Plain Layout
15138 http://publish.aps.org/revtex4/
15144 Install it somewhere that LaTeX can see it.
15145 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15147 \begin_inset space \thinspace{}
15151 \begin_inset space \space{}
15154 not the directory where you installed the class file.) Then, if you reconfigure
15155 LyX, it will find the class file and let you use the RevTeX4 textclass.
15158 \begin_layout Standard
15159 Probably the easiest way to get started is either to import a RevTeX 4 document
15167 \begin_inset space ~
15172 template, found in the templates directory.
15175 \begin_layout Subsection
15179 \begin_layout Standard
15180 Optional arguments to
15187 \begin_inset Quotes eld
15191 \begin_inset Quotes erd
15195 \begin_inset Quotes eld
15199 \begin_inset Quotes erd
15209 \begin_inset space ~
15217 \begin_inset space ~
15223 Remember that in RevTeX, at least one optional argument is required!
15226 \begin_layout Standard
15227 Other preamble matter, like
15234 \begin_inset space ~
15240 \begin_inset space ~
15245 dialog, also as usual.
15248 \begin_layout Subsection
15252 \begin_layout Standard
15253 The layouts basically correspond to the commands in RevTeX4.0.
15254 For example, the Email layout corresponds to
15261 Note that (at least as of RevTeX 4.0 Beta), the
15269 layouts are exactly equivalent, so you shouldn't need to use both.
15273 \begin_layout Plain Layout
15274 In case you're curious, both were included so that
15278 would be able to translate both
15298 \begin_layout Subsection
15302 \begin_layout Standard
15303 There are a couple of important unique aspects of RevTeX 4 which might cause
15304 bugs that will be even more confusing in LyX.
15307 \begin_layout Standard
15325 The LyX equivalent is that there is a separate Thanks layout.
15330 write footnotes in the
15334 layout, or weird things may happen.
15335 See the RevTeX 4 documentation for more details.
15338 \begin_layout Standard
15342 \begin_inset space ~
15350 \begin_inset space ~
15359 layouts must be placed
15367 layout and the corresponding
15384 , the LaTeX won't compile.
15387 \begin_layout Subsection
15391 \begin_layout Standard
15392 The main problem with this layout is that you can't use the optional arguments
15393 to layouts like Email and Title.
15394 (The problem is not unique to this layout; you can't use optional arguments
15395 to the Section layouts either.) This means that after you export that file
15396 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15397 need to edit the LaTeX file with a text editor to add the optional arguments
15399 \begin_inset space \thinspace{}
15403 \begin_inset space \space{}
15406 the running title for the page headers.
15407 Lacking these layouts makes the
15413 (and the equivalent
15419 ) useless, so the corresponding layouts don't exist, and will have to be
15424 \begin_layout Plain Layout
15429 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15430 has not been updated yet to take advantage of it.
15438 \begin_layout Section
15439 Springer Journals (
15446 \begin_layout Standard
15452 \begin_layout Subsection
15456 \begin_layout Standard
15457 These are the layout files for some of the journal formats used by Springer
15458 Verlag and listed on
15459 \begin_inset Flex URL
15462 \begin_layout Plain Layout
15464 http://www.springer.de/author/tex/help-journals.html
15469 , where you should also go to fetch the class files (yes, these are LaTeX2e
15471 It is a modular system: the things common to all journals are implemented
15476 , which journal-specific layout files (such as, e.
15477 \begin_inset space \thinspace{}
15481 \begin_inset space \space{}
15488 for Journal of Geodesy) can include.
15491 \begin_layout Standard
15492 This means that implementing support for any other Springer journal on this
15493 list is as simple as writing your own
15501 file following the outline given in
15509 \begin_layout Standard
15510 It is reasonably well tested only for the Journal of Geodesy.
15519 come with the standard LyX distribution.
15520 Install the relevant class file (downloaded from Springer) in a proper
15521 directory, reconfigure LaTeX (in the teTeX case by running
15525 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15526 and it should work.
15529 \begin_layout Subsection
15533 \begin_layout Standard
15534 A large number of theorem-like styles —
15540 \SpecialChar \ldots{}
15546 \begin_layout Standard
15549 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15550 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15553 See the Springer class file documentation for details.
15556 \begin_layout Subsection
15560 \begin_layout Itemize
15572 \begin_layout Itemize
15575 Probability Theory and Related Fields
15581 — Jean-Marc Lasgouttes
15584 \begin_layout Standard
15585 Add your own, it isn't so hard!
15588 \begin_layout Subsection
15592 \begin_layout Standard
15593 These files are partly based on the older
15597 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15598 file from Springer.
15603 layout, are now defunct.
15604 Jean-Marc Lasgouttes helped out big in making me find my way around the
15605 LyX layout file mechanism.
15608 \begin_layout Subsection
15612 \begin_layout Standard
15614 But probably less than in the old hacked-LaTeX
15621 \begin_layout Standard
15623 \begin_inset space \thinspace{}
15626 g.: does not display the number for theorem-like layouts, just #.
15629 \begin_layout Section
15635 \begin_inset CommandInset label
15644 \begin_layout Standard
15652 \begin_layout Subsection
15656 \begin_layout Standard
15657 This section describes how to use LyX to make slides for overhead projectors.
15658 There are two document classes that can do this: the default slides class
15664 This section documents the former.
15667 \begin_layout Standard
15668 I'm going to say this again, nice and clear, so that there's no misunderstanding
15672 \begin_layout Standard
15673 \begin_inset VSpace bigskip
15679 \begin_layout Standard
15683 This section documents the class
15684 \begin_inset Quotes eld
15692 \begin_inset Quotes erd
15700 \begin_layout Standard
15701 \begin_inset VSpace bigskip
15707 \begin_layout Standard
15708 If you're looking for the documentation for
15709 \begin_inset Quotes eld
15717 \begin_inset Quotes erd
15720 , check out section
15721 \begin_inset space ~
15725 \begin_inset CommandInset ref
15727 reference "sec:foiltex"
15737 \begin_inset Quotes eld
15745 \begin_inset Quotes erd
15748 ] is actually somewhat better than the default
15756 \begin_layout Plain Layout
15757 \SpecialChar \ldots{}
15758 or so I've been told repeatedly by its advocates.
15759 Having never used it, I have no idea if this claim is true or not.
15764 which this section documents.
15767 \begin_layout Standard
15768 This class is the LaTeX2e improvement of the old
15773 Every LaTeX2e distribution includes this class [which I'll just refer to
15775 \begin_inset Quotes eld
15783 \begin_inset Quotes erd
15786 from now on], so you're bound to have it.
15787 As I noted earlier, there are other classes, such as
15791 , which also produce slides for overhead projectors and do a better job
15793 However, there are some things which
15797 can do which the others can't, such as generate overlays.
15798 Read on to learn more!
15801 \begin_layout Subsection
15803 \begin_inset CommandInset label
15805 name "sec:slidesetup"
15812 \begin_layout Standard
15813 Obviously, to use this document class, you need to select
15814 \begin_inset Quotes eld
15822 \begin_inset Quotes erd
15825 from the class list in the
15827 Document\SpecialChar \menuseparator
15831 There are some other special things you should know about this class:
15834 \begin_layout Itemize
15835 Don't bother changing the options
15840 They're not supported by the
15847 \begin_layout Itemize
15851 \begin_inset space ~
15856 behaves a bit differently for this class.
15857 The possible choices and what they do are as follows:
15861 \begin_layout Description
15866 The final output contains page numbers in the lower right corner.
15869 \begin_layout Description
15878 , but also prints out any time markers you've put in.
15879 This is the default.
15882 \begin_layout Description
15887 The final output contains no page numbers, time markers, or alignment markers.
15891 \begin_layout Itemize
15896 class has an extra option:
15902 \begin_inset Quotes eld
15910 \begin_inset Quotes erd
15913 in the extra class options.
15917 \begin_layout Standard
15918 Using this options allows you to add time markers to
15924 \begin_inset space ~
15928 \begin_inset CommandInset ref
15930 reference "sec:slideNote"
15938 \begin_layout Standard
15939 You can also use the template file
15940 \begin_inset Quotes eld
15948 \begin_inset Quotes erd
15951 to automatically set up a document to use the
15957 File\SpecialChar \menuseparator
15959 \begin_inset space ~
15963 \begin_inset space ~
15968 to open your new document].
15969 The template file also contains some examples of the special paragraph
15970 environments used by this class.
15971 I'll describe those next.
15974 \begin_layout Subsection
15975 Paragraph Environments
15978 \begin_layout Subsubsection
15979 Supported Environments
15982 \begin_layout Standard
15983 The first thing you'll notice when you start up a new
15987 document is the font size and type: it's the equivalent of the size
15988 \begin_inset Quotes eld
15996 \begin_inset Quotes erd
16002 \begin_inset space ~
16008 This is also what's used in the output.
16010 \begin_inset Quotes eld
16014 \begin_inset Quotes erd
16017 to remind you that this is a slide.
16018 Your final slides will use a larger font; ergo, you'll have less space.
16019 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16022 \begin_layout Standard
16023 The next thing that becomes obvious is the changes to the paragraph environment
16024 pull-down box [at the far-left end of the toolbar].
16025 Most of the paragraph environments you're used to seeing are missing.
16026 There are also five new ones.
16031 class itself only supports certain paragraph environments:
16034 \begin_layout Itemize
16040 \begin_layout Itemize
16046 \begin_layout Itemize
16052 \begin_layout Itemize
16058 \begin_layout Itemize
16064 \begin_layout Itemize
16070 \begin_layout Itemize
16076 \begin_layout Itemize
16082 \begin_layout Itemize
16088 \begin_layout Itemize
16094 \begin_layout Itemize
16100 \begin_layout Standard
16101 All of the other standard environments, including the section-heading environmen
16102 ts, aren't used in the
16109 \begin_layout Standard
16110 On the other hand, you'll notice the following new environments:
16113 \begin_layout Itemize
16119 \begin_layout Itemize
16125 \begin_layout Itemize
16131 \begin_layout Itemize
16137 \begin_layout Itemize
16143 \begin_layout Standard
16144 These five are kind of quirky, due to a
16145 \begin_inset Quotes eld
16149 \begin_inset Quotes erd
16153 You see, LyX doesn't permit you to nest any other paragraph environment
16154 into an empty environment.
16155 Now, that's fine and dandy, but it means that you wouldn't be able to start
16156 a slide with anything except plain text.
16157 To deal with this, I've performed a little
16158 \begin_inset Quotes eld
16162 \begin_inset Quotes erd
16168 \begin_layout Subsubsection
16169 Quirks of the New Environments
16170 \begin_inset CommandInset label
16172 name "sec:slideQuirk"
16179 \begin_layout Standard
16180 All five of the new paragraph environments are somewhat quirky due to inherent
16181 limitiations in the current version of LyX.
16182 As I just mentioned, LyX forbids environments that begin with another environme
16184 To get around this, the
16188 environment isn't a paragraph environment as described in the
16196 \begin_layout Standard
16197 You should consider
16210 \begin_inset Quotes eld
16213 pseudo-environments.
16214 \begin_inset Quotes erd
16217 They look like a section heading or a
16218 \begin_inset Quotes eld
16226 \begin_inset Quotes erd
16229 but really begin a [and, if necessary, end the previous] paragraph environment.
16239 \begin_inset Quotes eld
16243 \begin_inset Quotes erd
16246 These two perform some action.
16249 \begin_layout Standard
16250 A common feature of all five environments,
16270 , is a rather long-ish label.
16271 The text following this label — ordinarily the contents of the paragraph
16272 environment — is utterly irrelevant for
16293 LyX completely ignores it.
16294 In fact, you can leave these five environments completely empty.
16298 \begin_layout Standard
16303 to put any text after the rather long-ish label, you might want to.
16304 This could be a short description of the contents of the
16309 In that case, enter in your descriptive comment and hit
16313 as you normally would.
16316 \begin_layout Standard
16317 If, on the other hand, you don't want to enter in any descriptive text,
16318 you'll hit another LyX quirk.
16319 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16320 environment until you put something in the old one.
16324 \begin_layout Itemize
16325 Start entering the text that will
16353 \begin_layout Itemize
16354 Now move to the beginning of that paragraph.
16358 \begin_layout Itemize
16367 \begin_layout Itemize
16368 Finally, change this new, empty paragraph to a
16392 \begin_layout Standard
16393 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16397 \begin_layout Subsection
16398 Making a Presentation with
16411 \begin_layout Subsubsection
16419 \begin_layout Standard
16420 If you're expecting this section to teach you how to actually make a presentatio
16421 n, you'll be sorely disappointed.
16422 Naturally, I'll describe all of the ways the
16426 class can assist you in preparing the materials for a presentation.
16427 Filling in the contents, however, is up to you.
16432 the LyX philosophy.]
16435 \begin_layout Standard
16440 environment [in the manner described in section
16441 \begin_inset space ~
16445 \begin_inset CommandInset ref
16447 reference "sec:slideQuirk"
16451 ] tells LyX to begin a new slide [duh].
16452 The label for this environment/
16453 \begin_inset Quotes erd
16457 \begin_inset Quotes erd
16461 \begin_inset Quotes eld
16465 \begin_inset Quotes erd
16468 in cool blue, followed by the label,
16469 \begin_inset Quotes eld
16473 \begin_inset Quotes erd
16477 Any text or paragraph environments that follow this one go on the new slide.
16481 \begin_layout Standard
16482 Slides are probably the only time you'll need to forcibly end pages in LyX
16483 (this can be specified in the
16488 In fact, you'll want to, once you finish entering the contents of one slide.
16489 If you've entered more text than can physically fit on a slide, the extra
16490 overflows onto a new slide.
16491 I don't recommend doing this, however, since the overflow slide won't have
16492 any page number on it.
16493 Furthermore, it may interfere with any
16497 you've made to accompany the oversized
16504 \begin_layout Standard
16513 environments work the same way as the
16518 They both create an
16519 \begin_inset Quotes eld
16523 \begin_inset Quotes erd
16526 followed by a label [
16527 \begin_inset Quotes eld
16531 \begin_inset Quotes erd
16535 \begin_inset Quotes eld
16539 \begin_inset Quotes erd
16543 The color is a stunning magenta instead of blue, and the
16544 \begin_inset Quotes eld
16548 \begin_inset Quotes erd
16551 will look different, in style and in length.
16552 The label fonts of all three also differ from one another.
16555 \begin_layout Standard
16560 , if the contents of a
16568 exceed the physical size of a slide or sheet of paper, the extra will overflow
16570 Again, you should avoid this.
16571 It defeats the whole purpose of
16582 \begin_layout Subsubsection
16592 \begin_layout Standard
16597 is a slide that sits atop another slide.
16598 Perhaps you wish to discuss a figure on the main
16602 before displaying the text associated with it.
16603 One way to accomplish this is tape a flap of dark paper over the part of
16608 you want to display later.
16609 This method fails, however, if you wish to overlap one graph with another,
16611 You would then have to fumble while speaking to align the two separate,
16616 s to align the two graphs.
16621 environment in both cases makes life much easier.
16624 \begin_layout Standard
16629 receives the page number of its
16630 \begin_inset Quotes eld
16634 \begin_inset Quotes erd
16642 \begin_inset Quotes eld
16650 \begin_inset Quotes erd
16657 \begin_layout Plain Layout
16658 Presumably, mutliple
16663 \begin_inset Quotes eld
16671 \begin_inset Quotes erd
16675 \begin_inset Quotes eld
16683 \begin_inset Quotes erd
16687 \begin_inset Quotes eld
16695 \begin_inset Quotes erd
16699 \begin_inset space ~
16702 appended to the page number of the parent
16712 Clearly, you want the contents of both the
16720 to each fit on a single physical slide! You should probably consider an
16726 \begin_inset Quotes eld
16730 \begin_inset Quotes erd
16742 class provides a visual cue for this: the label at the start of an
16746 is shorter than that at the start of a
16751 Lastly, when you generate printable output, you'll find alignment markers
16752 in all four corners of both the
16756 page and its parent
16761 These will assist you in lining up the two physical slides.
16764 \begin_layout Standard
16765 The major problem in overlaying two slides is aligning the contents of the
16766 two transparencies.
16767 How much space should you leave for that graph on the second slide? Worse
16768 still, what if you want a graph and a sentence on second slide, but there
16769 is text on the main transparency that goes in between them? You could try
16770 and insert vertical space of the right size.
16771 The better way is to use
16782 \begin_layout Standard
16783 As their names imply,
16791 are two command-like paragraph environments that make all subsequent text
16792 invisible and visible, respectively.
16794 \begin_inset space ~
16798 \begin_inset CommandInset ref
16800 reference "sec:slideQuirk"
16804 that you don't place anything
16808 these two environments, however.
16813 , it inserts a centered, sky-blue label into the page reading
16814 \begin_inset Quotes eld
16817 <Invisible Text Follows>
16818 \begin_inset Quotes erd
16822 For paragraphs following this label, the parts of the
16830 ; it doesn't matter which] where they would be contain instead blank space.
16834 \begin_layout Standard
16839 , the corresponding centered label is
16840 \begin_inset Quotes eld
16843 <Visible Text Follows>
16844 \begin_inset Quotes erd
16848 Paragraphs following this label behave normally.
16849 Note that the beginning of a new
16861 automatically shuts off an
16866 It's therefore not necessary to use
16877 \begin_layout Standard
16878 By now, it should be obvious how to create overlay transparencies using
16879 the proper combination of
16898 \begin_layout Enumerate
16903 , including everything that will appear on it, whether on the main slide
16911 \begin_layout Enumerate
16912 Before each figure or paragraph that will appear only on the
16921 If necessary, insert a
16925 environment after the
16932 \begin_layout Enumerate
16937 immediately following the
16944 \begin_layout Enumerate
16945 Copy the contents of this
16956 \begin_layout Enumerate
16961 , change all of the
16972 \begin_layout Standard
16974 You've just made an
16981 \begin_layout Standard
16982 There's one problem with the way I've designed the LyX
16986 class: you can't make text in the middle of a paragraph invisible, nor
16987 make text in the middle of an invisible paragraph visible again.
16988 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16992 \begin_layout Plain Layout
16993 The commands of interest are:
16996 \begin_layout Itemize
17001 invisible \SpecialChar \ldots{}
17005 \begin_layout Itemize
17010 visible \SpecialChar \ldots{}
17014 \begin_layout Plain Layout
17015 \SpecialChar \ldots{}
17016 and need to be marked as TeX.
17018 \begin_inset Quotes eld
17022 \begin_inset Quotes erd
17025 you wish to change goes in between the brackets [and after the
17038 If you don't know how to mark text as TeX, see the appropriate section
17051 \begin_layout Subsubsection
17061 \begin_inset CommandInset label
17063 name "sec:slideNote"
17070 \begin_layout Standard
17079 is associated with a
17080 \begin_inset Quotes eld
17084 \begin_inset Quotes erd
17096 class provides visual cues.
17101 is shorter than that of a
17105 [yet longer than that of an
17109 ] and, like the label of an
17113 is shockingly magenta.
17114 Additionally, the printed
17118 has the page number of its
17119 \begin_inset Quotes eld
17123 \begin_inset Quotes erd
17131 \begin_inset Quotes eld
17139 \begin_inset Quotes erd
17143 \begin_inset Quotes eld
17151 \begin_inset Quotes erd
17155 \begin_inset Quotes eld
17163 \begin_inset Quotes erd
17167 You can have multiple
17171 s associated with a single
17183 , you'll probably want to break up long
17187 s so that they fit on a single sheet of paper.
17190 \begin_layout Standard
17195 is obvious: it contains anything additional you might want to say about
17201 It could also be used as a sheet of reminders for a particular
17206 In the case of the latter, you might want to make use of time markers.
17212 \begin_inset Quotes eld
17216 \begin_inset Quotes erd
17219 support for time markers, a
17224 So, you'll have to resort to using the LaTeX codes.
17227 \begin_layout Standard
17228 To use time markers, you'll need to specify the extra class option
17229 \begin_inset Quotes eld
17237 \begin_inset Quotes erd
17241 \begin_inset space ~
17245 \begin_inset CommandInset ref
17247 reference "sec:slidesetup"
17252 This option turns on timing marks, which will appear in the lower-left-hand
17258 To set what appears in the time marker, you use the LaTeX commands
17259 \begin_inset Quotes eld
17269 \begin_inset Quotes erd
17273 \begin_inset Quotes eld
17283 \begin_inset Quotes erd
17287 The arguments of both commands are time measured in seconds.
17289 \begin_inset Quotes eld
17299 \begin_inset Quotes erd
17302 sets the time marker to a given time.
17304 \begin_inset Quotes eld
17314 \begin_inset Quotes erd
17317 increments the time marker by the specified amount.
17318 Using time markers and
17322 s in this fashion, you can remind yourself how much time to spend on a particula
17330 \begin_layout Standard
17331 There's one last feature to describe.
17332 Clearly, you'd like to print out all of your
17340 s on transparencies while printing all of your
17357 with which it is associated.
17358 What's a person to do?
17361 \begin_layout Standard
17362 Luckily, there are two LaTeX commands that allow you to select what to print
17364 Both must be placed into the preamble of your document.
17366 \begin_inset Quotes eld
17378 \begin_inset Quotes erd
17381 will cause the output to contain only the
17390 Correspondingly, the command
17391 \begin_inset Quotes eld
17403 \begin_inset Quotes erd
17406 prevents the output of anything but
17411 I'd advise placing both commands in the preamble and initially comment
17413 You can then preview your entire presentation as you write.
17414 When you're done writing, you can then uncomment one of the two to select
17415 what you want to print.
17416 I like to uncomment
17417 \begin_inset Quotes eld
17429 \begin_inset Quotes erd
17432 , print to a file with
17433 \begin_inset Quotes eld
17441 \begin_inset Quotes erd
17444 in its name, comment it back out, then uncomment
17445 \begin_inset Quotes eld
17457 \begin_inset Quotes erd
17461 \begin_inset Quotes eld
17469 \begin_inset Quotes erd
17473 I can then send either file to a printer, loading transparencies or plain
17474 paper as appropriate.
17477 \begin_layout Standard
17478 You can also provide other arguments to the
17479 \begin_inset Quotes eld
17489 \begin_inset Quotes erd
17493 \begin_inset Quotes eld
17503 \begin_inset Quotes erd
17507 See a good LaTeX book for details.
17510 \begin_layout Subsection
17515 Class Template File
17518 \begin_layout Standard
17519 I have also provided a template file,
17520 \begin_inset Quotes eld
17528 \begin_inset Quotes erd
17536 To use it, begin your new presentation with
17541 ile\SpecialChar \menuseparator
17543 \begin_inset space ~
17547 \begin_inset space ~
17557 Your new LyX presentation file will contain an example
17578 additionally contain an example of the use of
17587 Lastly, the preamble will contain:
17590 \begin_layout LyX-Code
17591 % Uncomment to print out only slides and overlays
17594 \begin_layout LyX-Code
17598 \begin_layout LyX-Code
17604 \begin_inset Newline newline
17610 \begin_layout LyX-Code
17611 % Uncomment to print out only notes
17614 \begin_layout LyX-Code
17618 \begin_layout LyX-Code
17626 \begin_layout Standard
17627 One final thing: I created this class to support the LaTeX2e
17628 \begin_inset Quotes eld
17636 \begin_inset Quotes erd
17639 class, one of the built-in LaTeX2e classes.
17640 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17641 built-in slide class.
17642 It's here if you want it or need it.
17643 There exist other LaTeX2e classes for creating presentations, such as the
17649 \begin_inset space ~
17653 \begin_inset CommandInset ref
17655 reference "sec:foiltex"
17660 \begin_inset Quotes eld
17668 \begin_inset Quotes erd
17671 package [present on some TeX distributions].
17672 The latter is not yet supported under LyX.
17676 \begin_layout Plain Layout
17677 Perhaps you can take on the task\SpecialChar \ldots{}
17683 I know nothing about these other classes.
17684 Try them out to see what sort of alternative they provide.
17687 \begin_layout Chapter
17688 LyX Features needing Extra Software
17691 \begin_layout Section
17695 \begin_layout Standard
17701 \begin_layout Subsection
17705 \begin_layout Standard
17714 \begin_layout Plain Layout
17719 is not yet available when you are using the LaTeX distribution MiKTeX.
17724 , you'll find in the
17731 \begin_inset space ~
17742 \begin_inset CommandInset href
17744 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17751 \begin_layout Standard
17756 package is a program that was written by
17757 \begin_inset Flex CharStyle:Noun
17760 \begin_layout Plain Layout
17762 \begin_inset space ~
17770 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17771 and easy to forget.
17772 The program runs over your LaTeX file, checks the integrity of the file,
17773 and flags some common errors.
17774 In other technical words, it is
17781 \begin_layout Standard
17782 Well, what is a syntax checker doing in LyX which is supposed to produce
17783 correct LaTeX anyways? The answer is simple: Just as
17787 not only checks the
17791 of C programs, but also does
17795 checks for type-errors,
17799 catches some common
17803 errors, in addition to the syntactical ones.
17808 is capable of detecting several common errors, such as
17811 \begin_layout Itemize
17812 Ellipsis detection:
17813 \begin_inset Newline newline
17816 Use \SpecialChar \ldots{}
17820 \begin_layout Itemize
17821 No space in front of/after parenthesis:
17822 \begin_inset Newline newline
17828 \begin_layout Itemize
17829 Enforcement of normal space after common abbreviations:
17830 \begin_inset Newline newline
17834 \begin_inset space \thinspace{}
17838 \begin_inset space \space{}
17841 is too wide spacing.
17844 \begin_layout Itemize
17845 Enforcement of end-of-sentence space when the last sentence ends with a
17847 \begin_inset Newline newline
17851 And this is wrong spacing.
17854 \begin_layout Itemize
17855 Space in front of labels and similar commands:
17856 \begin_inset Newline newline
17859 The label should stick right up to the text to avoid falling to a wrong
17862 \begin_inset CommandInset label
17872 \begin_layout Plain Layout
17873 This footnote is in danger of falling off to a wrong page
17878 The label is separated too much.
17881 \begin_layout Itemize
17882 Space in front of references, instead of hard spaces:
17883 \begin_inset Newline newline
17886 In you are in bad luck, the text will break right between the referenced
17887 text and reference number, and that's a pity.
17889 \begin_inset CommandInset ref
17891 reference "sec:chktex"
17898 \begin_layout Itemize
17900 \begin_inset Quotes eld
17904 \begin_inset Quotes erd
17908 \begin_inset Formula $\times$
17912 \begin_inset Newline newline
17915 2x2 looks cheap compared to
17916 \begin_inset Formula $2\times2$
17922 \begin_layout Standard
17923 and more \SpecialChar \ldots{}
17924 It is an invaluable tool when you are
17925 \begin_inset Quotes eld
17929 \begin_inset Quotes erd
17932 your document before printing, and you should run it right after the obligatory
17933 spelling check, and before you go fine tuning the typesetting.
17936 \begin_layout Subsection
17940 \begin_layout Standard
17941 If you have the program installed, usage is as simple as choosing
17943 Tools\SpecialChar \menuseparator
17945 \begin_inset space ~
17951 This will make LyX generate a LaTeX file of your document, start
17955 to check it, and then make LyX insert
17956 \begin_inset Quotes eld
17960 \begin_inset Quotes erd
17963 with the warnings from
17967 , if there were any.
17968 The warnings will be placed close to the point of the mistake, and you
17969 can quickly find them by using the
17971 Navigate\SpecialChar \menuseparator
17974 menu item, or the shortcut key
17983 Open the error boxes by clicking on them with the mouse, or use the shortcut
17992 bindings, or the corresponding
18001 Read the warning and correct the mistake, if it is a mistake.
18002 If you have trouble understanding what the warning is about, you can safely
18004 Remember that there is a hidden layer between the document on screen and
18005 the technical details in invoking
18009 , and this gap can make some warnings seem arcane or just right down plain
18013 \begin_layout Standard
18014 This document is an excellent testing bed for the feature, and it should
18015 provide quite a few warnings for you to fiddle with.
18016 Since computers are only so smart, expect most of the warnings to be false
18020 \begin_layout Subsection
18021 How to fine tune it
18024 \begin_layout Standard
18025 Sometimes, you'll find that
18029 makes more noise than suits your mood.
18030 Then you can choose not to use it, wait until your mood changes, or try
18035 to get better along with you.
18036 Another choice in the most desperate situations is to use
18038 View\SpecialChar \menuseparator
18040 \begin_inset space ~
18044 \begin_inset space ~
18048 \begin_inset space ~
18053 , which will get rid of all warnings instantly.
18056 \begin_layout Standard
18065 very configurable and extensible, you shouldn't expect to solve all problems
18071 Since LyX has to generate a somewhat special LaTeX file to be able to match
18072 the line numbers from the
18080 \begin_layout Plain Layout
18081 You can inspect the specific output from
18087 Edit\SpecialChar \menuseparator
18089 \begin_inset space ~
18093 \begin_inset space ~
18107 to the internal document structure, some of the warnings will not seen
18108 to appear correctly.
18109 There are two things you can do about this:
18112 \begin_layout Itemize
18117 invocation command line in
18133 installation configuration file (usually with the file
18138 See below to learn what warnings can be enabled and disabled on the command
18143 \begin_layout Itemize
18144 Export your document as a raw LaTeX file using
18146 File\SpecialChar \menuseparator
18147 Export\SpecialChar \menuseparator
18155 Invoked in this way, it can be a hassle to find the corresponding place
18156 in the document inside LyX, but with a little patience, you should be able
18160 \begin_layout Standard
18161 Here follows the warning messages that can be enabled and disabled in
18170 to disable a warning, and
18174 to enable a warning.
18175 The emphasized entries are disabled by default, because the default is
18178 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18183 \begin_layout Standard
18184 Notice that you should only use the options that enable and disable warnings,
18185 because LyX relies on some of the other command line parameters to be set
18186 in a specific way to have a chance to communicate with
18193 \begin_layout Enumerate
18197 Command terminated with space.
18200 \begin_layout Enumerate
18203 Non-breaking space (
18204 \begin_inset Quotes eld
18212 \begin_inset Quotes erd
18215 ) should have been used.
18218 \begin_layout Enumerate
18222 You should enclose the previous parenthesis with
18223 \begin_inset Quotes eld
18231 \begin_inset Quotes erd
18237 \begin_layout Enumerate
18240 Italic correction (
18241 \begin_inset Quotes eld
18251 \begin_inset Quotes erd
18254 ) found in non-italic buffer.
18257 \begin_layout Enumerate
18260 Italic correction (
18261 \begin_inset Quotes eld
18271 \begin_inset Quotes erd
18274 ) found more than once.
18277 \begin_layout Enumerate
18281 No italic correction (
18282 \begin_inset Quotes eld
18292 \begin_inset Quotes erd
18298 \begin_layout Enumerate
18302 \begin_inset Quotes eld
18310 \begin_inset Quotes erd
18314 \begin_inset Quotes eld
18322 \begin_inset Quotes erd
18328 \begin_layout Enumerate
18331 Wrong length of dash may have been used.
18334 \begin_layout Enumerate
18338 \begin_inset Quotes eld
18346 \begin_inset Quotes erd
18350 \begin_inset Quotes eld
18358 \begin_inset Quotes erd
18364 \begin_layout Enumerate
18368 \begin_inset Quotes eld
18376 \begin_inset Quotes erd
18382 \begin_layout Enumerate
18386 \begin_inset Quotes eld
18394 \begin_inset Quotes erd
18397 to achieve an ellipsis.
18400 \begin_layout Enumerate
18403 Inter-word spacing (
18404 \begin_inset Quotes eld
18414 \begin_inset Quotes eld
18417 ) should perhaps be used.
18420 \begin_layout Enumerate
18423 Inter-sentence spacing (
18424 \begin_inset Quotes eld
18434 \begin_inset Quotes erd
18437 ) should perhaps be used.
18440 \begin_layout Enumerate
18443 Could not find argument for command.
18446 \begin_layout Enumerate
18450 \begin_inset Quotes eld
18458 \begin_inset Quotes erd
18464 \begin_layout Enumerate
18467 Math mode still on at end of LaTeX file.
18470 \begin_layout Enumerate
18474 \begin_inset Quotes eld
18482 \begin_inset Quotes erd
18485 doesn't match the number of
18486 \begin_inset Quotes eld
18494 \begin_inset Quotes erd
18500 \begin_layout Enumerate
18503 You should use either
18506 \begin_inset Quotes eld
18514 \begin_inset Quotes erd
18519 as an alternative to
18520 \begin_inset Quotes eld
18528 \begin_inset Quotes erd
18534 \begin_layout Enumerate
18541 " (ASCII 39) instead of "
18548 \begin_layout Enumerate
18551 User-specified pattern found.
18554 \begin_layout Enumerate
18557 This command might not be intended.
18560 \begin_layout Enumerate
18567 \begin_layout Enumerate
18585 \begin_layout Enumerate
18588 Delete this space to maintain correct page references.
18591 \begin_layout Enumerate
18595 You might wish to put this between a pair of
18596 \begin_inset Quotes eld
18604 \begin_inset Quotes erd
18610 \begin_layout Enumerate
18613 You ought to remove spaces in front of punctuation.
18616 \begin_layout Enumerate
18619 Could not execute LaTeX command.
18622 \begin_layout Enumerate
18631 in front of small punctuation.
18634 \begin_layout Enumerate
18642 may look prettier here.
18645 \begin_layout Enumerate
18649 Multiple spaces detected in output.
18652 \begin_layout Enumerate
18655 This text may be ignored.
18658 \begin_layout Enumerate
18664 \begin_inset Quotes eld
18669 to begin quotation, not
18676 \begin_layout Enumerate
18683 to end quotation, not
18686 \begin_inset Quotes eld
18694 \begin_layout Enumerate
18700 \begin_layout Enumerate
18703 You should perhaps use
18704 \begin_inset Quotes eld
18712 \begin_inset Quotes erd
18718 \begin_layout Enumerate
18721 You should put a space in front of/after parenthesis.
18724 \begin_layout Enumerate
18727 You should avoid spaces in front of/after parenthesis.
18730 \begin_layout Enumerate
18734 You should not use punctuation in front of/after quotes.
18737 \begin_layout Enumerate
18740 Double space found.
18743 \begin_layout Enumerate
18746 You should put punctuation outside inner/inside display math mode.
18749 \begin_layout Enumerate
18752 You ought to not use primitive TeX in LaTeX code.
18755 \begin_layout Enumerate
18758 You should remove spaces in front of
18759 \begin_inset Quotes eld
18767 \begin_inset Quotes erd
18773 \begin_layout Enumerate
18776 \begin_inset Quotes eld
18784 \begin_inset Quotes erd
18787 is normally not followed by
18788 \begin_inset Quotes eld
18796 \begin_inset Quotes erd
18802 \begin_layout Standard
18803 In later versions of LyX, we hope to provide a more complete interface to
18804 this tool (and it's smaller cousin
18808 ) to exploit the full power of it.
18809 But it's not exactly useless as it is now: go try it on one of your existing
18810 documents of a certain length and be surprised.
18813 \begin_layout Section
18814 Version Control in LyX
18817 \begin_layout Standard
18820 Lars Gullik Bjønnes
18827 \begin_layout Subsection
18831 \begin_layout Standard
18832 A friend of mine wanted to try LyX for a group project.
18833 When he didn't find support for version control or file locking, he dropped
18835 This angered me a bit, so I thought that I should at least make support
18836 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18837 This has now been done.
18838 LyX now supports some of the most basic RCS commands.
18839 If you need to something a bit more sophisticated you will have to do that
18840 manually in a terminal.
18843 \begin_layout Standard
18844 Before you begin to use the version control features in LyX, you should
18846 \begin_inset Quotes eld
18850 \begin_inset Quotes erd
18853 (a man file, read it with
18858 This file describes all the basic features of RCS.
18859 You should especially notice the comment about a RCS directory, and the
18860 notion of a master RCS file (the file ending in
18867 \begin_layout Standard
18868 Later basic CVS/SVN support was added.
18869 You should be familiar with CVS/SVN usage before start using it under LyX.
18870 Most of the log messages are not currently displayed after operations -
18871 you can check them in Messages pane if unsure.
18874 \begin_layout Standard
18875 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18876 package—no guarantees are made for older versions.
18879 \begin_layout Standard
18880 For introducing your own external commands consult vc-command in the manual
18884 \begin_layout Subsection
18885 RCS commands in LyX
18888 \begin_layout Standard
18889 The following sections describe the RCS commands supported by LyX.
18890 You can find them in the
18892 File\SpecialChar \menuseparator
18894 \begin_inset space ~
18900 LyX was tested against RCS 5.7.
18903 \begin_layout Subsubsection
18909 \begin_layout Standard
18910 If your document is not under revision control, this is the only item shown
18912 And if it is under revision control, the
18916 item is not visible.
18920 \begin_layout Standard
18921 This command registers your document with RCS (unless you are under the
18922 directory managed by CVS)\SpecialChar \@.
18923 You are asked interactively to supply an initial
18924 description of the document.
18925 The document is now set in Read-Only mode and you have to
18928 \begin_inset space ~
18932 \begin_inset space ~
18936 \begin_inset space ~
18941 , before making any changes to it.
18942 A document under revision control has a
18943 \begin_inset Quotes eld
18946 [RCS:<version> <locker>]
18947 \begin_inset Quotes erd
18950 item tagged to the filename in the minibuffer.
18953 \begin_layout Standard
18954 RCS command that is run:
18956 ci -q -u -i -t-"<initial description>" <file-name>
18959 \begin_layout Standard
18964 to understand the switches.
18968 \begin_layout Subsubsection
18974 \begin_layout Standard
18975 When you are finished editing a file, you check in your changes.
18976 When you do this, you are asked for a description of the changes.
18977 This is stored in the history log.
18978 The version number is bumped, your changes are applied to the master RCS
18979 file, the document is unlocked and set to Read-Only mode.
18983 \begin_layout Standard
18986 ci -q -u -m"<description>" <file-name>
18989 \begin_layout Subsubsection
18995 \begin_layout Standard
18996 By doing this you lock the document so that only you can edit it.
18997 This will also make the document Read-Write only for you.
18998 You will usually continue editing for a while and when you are finished
18999 you check in your changes.
19000 The status line is changed to reflect that you have locked the file.
19004 \begin_layout Standard
19007 co -q -l <file-name>
19010 \begin_layout Subsubsection
19013 Revert To Repository Version
19016 \begin_layout Standard
19017 This will discard all changes made to the document since the last check
19019 You get a warning before changes are discarded.
19022 \begin_layout Standard
19025 co -f -u<version> <file-name>
19028 \begin_layout Subsubsection
19034 \begin_layout Standard
19035 This makes as if the last check in never happened.
19036 No changes are made to the document loaded into LyX, but the last version
19037 is removed from the master RCS file.
19041 \begin_layout Standard
19044 rcs -o<version> <file-name>
19047 \begin_layout Subsubsection
19053 \begin_layout Standard
19054 This show the complete history of the RCS document.
19059 is shown in a browser.
19067 \begin_layout Subsubsection
19071 \begin_layout Standard
19072 LyX supports RCS version number information (only), see
19073 \begin_inset CommandInset ref
19075 reference "sub:VCS-Revision-Information"
19082 \begin_layout Subsection
19083 CVS commands in LyX
19086 \begin_layout Standard
19087 CVS is now partially supported by LyX.
19088 You can find the commands in the
19090 File\SpecialChar \menuseparator
19092 \begin_inset space ~
19098 Focus of the development moved to SVN support, so please use it instead
19099 of CVS if possible.
19102 \begin_layout Subsubsection
19108 \begin_layout Standard
19109 If your document is not under revision control, this is the only item shown
19111 And if it is under revision control, the
19118 item is not visible.
19122 \begin_layout Standard
19123 This command registers in CVS your document ONLY in case you have already
19124 the documents directory under CVS control (in particular
19129 This means you have to checkout the archive by yourself.
19133 \begin_layout Standard
19134 Then you are asked interactively to supply an initial description of the
19136 Don't forget that registered file is not yet commited.
19139 \begin_layout Standard
19140 CVS command that is run:
19143 \begin_inset Quotes erd
19147 \begin_inset Quotes eld
19151 \begin_inset Quotes erd
19157 \begin_layout Standard
19162 to understand the switches.
19166 \begin_layout Subsubsection
19172 \begin_layout Standard
19173 When you are finished editing a file, you commit your changes.
19174 When you do this, you are asked for a description of the changes.
19175 After that changes are commited.
19178 \begin_layout Standard
19181 cvs -q commit -m"<description>" "<file-name>"
19184 \begin_layout Subsubsection
19187 Revert To Repository Version
19190 \begin_layout Standard
19191 This will discard all changes made to the document since the last check
19193 You get a warning before changes are discarded.
19194 Firstly the file is deleted, secondly CVS update command is run.
19197 \begin_layout Standard
19201 \begin_inset Quotes eld
19205 \begin_inset Quotes erd
19211 \begin_layout Subsubsection
19217 \begin_layout Standard
19218 This show the complete history of the CVS document.
19222 \begin_inset Quotes eld
19226 \begin_inset Quotes erd
19231 is shown in a browser.
19234 \begin_layout Subsection
19235 SVN commands in LyX
19238 \begin_layout Standard
19239 SVN is now partially supported by LyX.
19240 You can find the commands in the
19242 File\SpecialChar \menuseparator
19244 \begin_inset space ~
19250 Please note that if you use password protected access to repository via
19251 ssh, you will be asked in terminal window.
19252 LyX was tested against SVN 1.5 and 1.6
19256 \begin_layout Plain Layout
19257 Most of the commands will work with 1.4 too, see
19258 \begin_inset CommandInset ref
19260 reference "sub:SVN-Repo-Update"
19272 \begin_layout Subsubsection
19278 \begin_layout Standard
19279 If your document is not under revision control, this is the only item shown
19281 And if it is under revision control, the
19288 item is not visible.
19292 \begin_layout Standard
19293 This command registers in SVN your document ONLY in case you have already
19294 the documents directory under SVN control (in particular
19299 This means you have to checkout the archive by yourself.
19303 \begin_layout Standard
19304 Then you are asked interactively to supply an initial description of the
19306 Don't forget that registered file is not yet commited.
19309 \begin_layout Standard
19310 SVN command that is run:
19313 \begin_inset Quotes eld
19317 \begin_inset Quotes erd
19323 \begin_layout Standard
19328 to understand the switches.
19332 \begin_layout Subsubsection
19338 \begin_layout Standard
19339 When you are finished editing a file, you commit your changes.
19340 When you do this, you are asked for a description of the changes.
19341 After that changes are commited.
19344 \begin_layout Standard
19349 \begin_layout Plain Layout
19350 In case locking is not enabled.
19352 \begin_inset CommandInset ref
19354 reference "subsec:SVN-File-Locking"
19365 svn commit -q -m"<description>" <file-name>
19368 \begin_layout Subsubsection
19374 \begin_layout Standard
19375 Updates the changes of this file from the repository.
19376 Be sure you understand SVN merging and conflicts resolving before using
19377 this function, because all conflicts has to be resolved manually by you!
19380 \begin_layout Standard
19385 \begin_layout Plain Layout
19393 svn update --non-interactive
19394 \begin_inset Quotes eld
19398 \begin_inset Quotes erd
19404 \begin_layout Subsubsection
19407 Revert To Repository Version
19410 \begin_layout Standard
19411 This will discard all changes made to the document since the last check
19413 You get a warning before changes are discarded.
19417 \begin_layout Standard
19421 \begin_inset Quotes eld
19425 \begin_inset Quotes erd
19431 \begin_layout Subsubsection
19432 \begin_inset CommandInset label
19434 name "sub:SVN-Repo-Update"
19438 Update of the local directory checkout from repository
19442 \begin_layout Plain Layout
19443 Note that this command will work only with subversion
19444 \begin_inset Formula $\geqq1.5$
19455 \begin_layout Standard
19456 All the commands above have one shortcomming - they deal with the current
19458 Once your document contains pictures, includes external
19459 \begin_inset Flex CharStyle:Code
19462 \begin_layout Plain Layout
19468 files and so on administration becomes more complicated.
19469 LyX now supports updating the whole tree in which resides the document
19473 \begin_layout Plain Layout
19474 One need to organize the files structure so that all external files are
19475 in the same directory or subdirectories of the document.
19482 This become especially useful once you cooperate with people which neither
19483 know about subversion management nor they have ambition to commit additional
19484 material to the repository.
19488 \begin_layout Standard
19489 \begin_inset Flex CharStyle:Code
19492 \begin_layout Plain Layout
19493 Update local directory from repository
19498 command updates the whole directory and in case of merge conflicts local
19499 version of the files are left, so no unintended data loss occurs.
19500 If local changes are detected user is warned before update starts.
19503 \begin_layout Labeling
19504 \labelwidthstring 00.00.0000
19506 \begin_inset space ~
19510 \begin_inset space ~
19514 \begin_inset Newline newline
19518 \begin_inset Flex CharStyle:Code
19521 \begin_layout Plain Layout
19527 (Ask if changes are detected.)
19528 \begin_inset Newline newline
19532 \begin_inset Flex CharStyle:Code
19535 \begin_layout Plain Layout
19536 svn update --accept mine-full $path
19544 \begin_layout Standard
19546 \begin_inset Flex CharStyle:Code
19549 \begin_layout Plain Layout
19555 stands for the path to the document.
19558 \begin_layout Subsubsection
19564 \begin_layout Standard
19565 This show the complete history of the SVN document.
19569 \begin_inset Quotes eld
19573 \begin_inset Quotes erd
19578 is shown in a browser.
19581 \begin_layout Subsubsection
19583 \begin_inset CommandInset label
19585 name "subsec:SVN-File-Locking"
19592 \begin_layout Standard
19593 The file exchange through various revision control systems brings the problem
19594 of merge conflicts in case two different users try to edit the same (parts
19596 When such conflict happens it needs manual resolving and one reasonable
19597 alternative is to provide some kind of locking mechanism, which guarantees
19598 that only one user is allowed to edit file at the given time.
19601 \begin_layout Standard
19602 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19603 access - locks and automatical setting of write permissions (see sec.
19605 \begin_inset CommandInset ref
19607 reference "subsec:Automatical-Locking-Property"
19612 \begin_inset Flex CharStyle:Code
19615 \begin_layout Plain Layout
19625 \begin_layout Plain Layout
19626 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19632 In a case this property is detected for a given document LyX starts to
19633 use SVN locks for document editing automatically and the whole check-in/out
19634 mechanism switches to the same regimen as for RCS.
19635 This in particular means there are two different modes how file is used
19639 \begin_layout Itemize
19641 The loaded file is in the read-only mode.
19642 For editation on needs to check-out.
19647 consists of update from repository and gaining write lock.
19648 If the lock is not possible to obtain, we remain in unlocked state.
19651 \begin_layout Itemize
19653 The loaded file is in the 'normal' edit mode.
19654 No other user is allowed to edit the file.
19659 consists of commiting changes and releasing write-lock.
19660 If no changes have been made to the document, no commit will be produced
19664 \begin_layout Plain Layout
19665 Don't be puzzled by the fact that you will be asked for commit message anyway.
19670 and only the write-lock will be released.
19673 \begin_layout Standard
19677 \begin_layout Labeling
19678 \labelwidthstring 00.00.0000
19681 svn commit -q -m"<description>" "<file-name>"
19682 \begin_inset Newline newline
19685 svn unlock "<file-name>"
19688 \begin_layout Labeling
19689 \labelwidthstring 00.00.0000
19692 svn update "<file-name>"
19693 \begin_inset Newline newline
19696 svn lock "<file-name>"
19699 \begin_layout Subsubsection
19702 \begin_inset CommandInset label
19704 name "subsec:Automatical-Locking-Property"
19710 Automatical Locking Property
19713 \begin_layout Standard
19714 The above mentioned automatical setting of write permissions of the .lyx
19715 file can be set through
19720 ile\SpecialChar \menuseparator
19726 \begin_inset space ~
19729 Control\SpecialChar \menuseparator
19734 oggle locking property
19737 This command is active only when the file is not locked on the svn server
19739 you need to check-out before proceeding).
19742 \begin_layout Labeling
19743 \labelwidthstring 00.00.0000
19745 \begin_inset space ~
19751 \begin_layout Labeling
19752 \labelwidthstring 00.00.0000
19755 svn propset svn:needs-lock ON "<file-name>"
19758 \begin_layout Labeling
19759 \labelwidthstring 00.00.0000
19762 svn propdel svn:needs-lock "<file-name>"
19765 \begin_layout Subsubsection
19766 \begin_inset CommandInset label
19768 name "sub:VCS-Revision-Information"
19772 Revision Information in Documents
19775 \begin_layout Standard
19776 There are more possibilities how to activate revision information in our
19780 \begin_layout Itemize
19781 LyX supports directly:
19785 \begin_layout Itemize
19786 tree revision information (
19787 \begin_inset Flex CharStyle:Code
19790 \begin_layout Plain Layout
19797 The result is the output of the
19798 \begin_inset Flex CharStyle:Code
19801 \begin_layout Plain Layout
19807 command, the following table gives you an idea, how to read the results.
19810 \begin_layout Standard
19812 \begin_inset Tabular
19813 <lyxtabular version="3" rows="6" columns="2">
19814 <features tabularvalignment="middle">
19815 <column alignment="center" valignment="top" width="0">
19816 <column alignment="center" valignment="top" width="0">
19818 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19821 \begin_layout Plain Layout
19827 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19830 \begin_layout Plain Layout
19838 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19841 \begin_layout Plain Layout
19847 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19850 \begin_layout Plain Layout
19851 mixed revision working copy
19858 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19861 \begin_layout Plain Layout
19867 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19870 \begin_layout Plain Layout
19871 modified working copy
19878 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19881 \begin_layout Plain Layout
19887 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19890 \begin_layout Plain Layout
19891 switched working copy
19898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19901 \begin_layout Plain Layout
19907 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19910 \begin_layout Plain Layout
19911 partial working copy, from a sparse checkout
19918 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19921 \begin_layout Plain Layout
19927 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19930 \begin_layout Plain Layout
19931 mixed revision, modified, switched working copy
19944 \begin_layout Itemize
19945 file revision information.
19946 The result comes from parsing the output of
19947 \begin_inset Flex CharStyle:Code
19950 \begin_layout Plain Layout
19952 \begin_inset space ~
19956 \begin_inset space ~
19960 \begin_inset space ~
19969 Supported flags are:
19973 \begin_layout Itemize
19974 version number of the last commit (
19975 \begin_inset Flex CharStyle:Code
19978 \begin_layout Plain Layout
19987 \begin_layout Itemize
19988 author of the last commit (
19989 \begin_inset Flex CharStyle:Code
19992 \begin_layout Plain Layout
20001 \begin_layout Itemize
20002 date of the last commit (
20003 \begin_inset Flex CharStyle:Code
20006 \begin_layout Plain Layout
20015 \begin_layout Itemize
20016 time of the last commit (
20017 \begin_inset Flex CharStyle:Code
20020 \begin_layout Plain Layout
20030 \begin_layout Standard
20031 You can obtain this info via InsetInfo (e.g.
20033 \begin_inset Flex CharStyle:Code
20036 \begin_layout Plain Layout
20037 info-insert buffer vcs-date
20043 The information will be available only when you have the file stored under
20044 svn managment (i.e.
20046 \begin_inset Flex CharStyle:Code
20049 \begin_layout Plain Layout
20055 directory is available with your document).
20059 \begin_layout Itemize
20060 Another---a hacking one---possibility is to use svn keywords
20064 \begin_layout Plain Layout
20065 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20071 In short -- you set file keywords property (e.g.
20074 svn propset svn:keywords 'Rev' file.lyx
20076 ) and then paste keyword ERT
20080 \begin_layout Plain Layout
20081 This is an easy way how to ensure that LyX won't break the line in the middle
20087 tag in your document (e.g.
20092 \begin_layout Plain Layout
20100 This way svn client will automatically substitute revision number (e.g.
20105 \begin_layout Plain Layout
20112 ) after each update and commit.
20113 There are more problems with this approach.
20114 Firstly, the '$' character is used in TeX world for math equations, so
20115 any occurence of math formula
20116 \begin_inset Formula $Rev$
20120 \begin_inset Formula $Rev:59$
20123 in your LyX document.
20124 Similarly for other keywords like Id, Date, Author, etc.
20125 Secondly svn output is dependent on your locales, so its very easy that
20126 svn would produce some problematic strings once Date is used.
20127 Thirdly you get the whole 'Rev: 59' string in your document instead of
20129 Until subversion implements user's custom keywords it will be hard to use
20130 this approach reliably or let LyX to support it directly.
20133 \begin_layout Subsection
20134 SVN and Windows Environment
20137 \begin_layout Quote
20138 My inclination is to say that if the user cannot figure out the command
20139 line operations on their own fairly quickly, they would be well advised
20140 to use TortoiseSVN.
20146 \begin_layout Subsubsection
20150 \begin_layout Standard
20151 In addition to installing LyX, and having access to a Subversion repository,
20152 the user will need to install the Subversion client program.
20153 A Windows installer for the client program is available from
20154 \begin_inset CommandInset href
20157 target "http://www.collab.net/nonav/downloads/subversion/"
20162 The user may also want to install
20163 \begin_inset CommandInset href
20166 target "http://tortoisesvn.tigris.org/"
20170 , which integrates Subversion operations into the context (rightclick) menu
20171 of Windows Explorer.
20172 Operations done outside LyX will typically be more convenient using the
20173 Explorer context menu.
20174 Note that TortoiseSVN is not a replacement for the client program, which
20175 is what LyX itself will use.
20178 \begin_layout Subsubsection
20179 Bringing a document under Subversion control
20182 \begin_layout Standard
20183 Before a LyX document can be brought under version control in Subversion,
20184 its parent directory needs to be under version control.
20185 If the document is being added to a project already in the repository,
20186 this is accomplished by checking the project out to the directory where
20187 the new document will be placed.
20188 If the project itself is not yet under version control (for instance, if
20189 this document starts a new project), the directory must be imported into
20191 This is done outside LyX.
20192 Both import and checkout are easily accomplished from the Explorer context
20193 menu using TortoiseSVN, or alternatively can be done using the command
20194 line client at a DOS prompt.
20195 The procedure for importing the project using TortoiseSVN is described
20196 below, assuming an existing repository and a new project being started
20204 For information on using the Subversion client program, run
20211 \begin_layout Enumerate
20218 in Windows Explorer, right click it, and select
20220 TortoiseSVN > Repo-browser
20223 If necessary, adjust the URL for the repository, then click OK.
20226 \begin_layout Enumerate
20227 Right click the level of the repository under which you want to place the
20228 new project folder (typically the top level) and click
20230 Create folder\SpecialChar \ldots{}
20233 Supply a name for the project folder and click OK.
20234 Add a message for the log file if desired, then click OK again.
20235 The new project folder should appear in the repository.
20236 Finally, click OK again to exit the repository browser.
20239 \begin_layout Enumerate
20240 Once again right click
20246 , this time selecting SVN Checkout\SpecialChar \ldots{}
20247 Select the URL of the project folder
20248 you just created in the repository, and set the checkout directory to
20256 You will be warned about a non-empty folder; click OK to proceed.
20257 You should now have a
20268 \begin_layout Enumerate
20269 Create or open your document in LyX and click
20274 ile\SpecialChar \menuseparator
20280 \begin_inset space ~
20283 Control\SpecialChar \menuseparator
20291 Add a log message and click OK to commit the document to version control.
20294 \begin_layout Standard
20295 From this point onward, you should have full functionality in the
20300 ile\SpecialChar \menuseparator
20306 \begin_inset space ~
20312 You also have the option of checking the document in and out, viewing its
20314 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20315 client program from a command prompt.
20318 \begin_layout Subsubsection
20319 SSH tunel used with SVN under Windows
20322 \begin_layout Standard
20323 Compared to linux setting svn client to communicate over ssh under Windows
20324 is rather troublesome task.
20325 We will at least make some hints how to setup client side but former knowledge
20326 about ssh and Windows command line is needed, also be prepared for a great
20327 deal of frustration...
20330 \begin_layout Enumerate
20331 Get svn client for windows, as described in previous sections.
20332 When it is fresh install run some svn command (e.g.
20334 \begin_inset Flex CharStyle:Code
20337 \begin_layout Plain Layout
20343 ) to have created config files, which you will need to change later on.
20346 \begin_layout Enumerate
20347 Choose ssh client for Windows.
20348 There are more possibilities, we will use the one from Putty tools
20352 \begin_layout Plain Layout
20353 \begin_inset Flex URL
20356 \begin_layout Plain Layout
20358 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20369 You will need to automatize connection, so client doesn't ask for any password
20371 To keep things easy we will use only keys without any additional password
20376 \begin_layout Enumerate
20378 \begin_inset Flex CharStyle:Code
20381 \begin_layout Plain Layout
20388 Save your private .ppk key file and put the public one on the server side.
20389 In case the SVN server runs on linux, note that the format of the public
20390 key is not compatible with linux openssh and you will need to direcly copy-past
20391 e the key from the “
20393 Public key for pasting into OpenSSH authorized_keys file
20395 :” edit field into the server's
20396 \begin_inset Flex CharStyle:Code
20399 \begin_layout Plain Layout
20400 ~/.ssh/authorized_keys
20406 \begin_inset Flex CharStyle:Code
20409 \begin_layout Plain Layout
20418 \begin_layout Enumerate
20420 \begin_inset Flex CharStyle:Code
20423 \begin_layout Plain Layout
20430 In the SVN config file
20434 \begin_layout Plain Layout
20435 Exact path depends on Windows version, usually somewhere around
20436 \begin_inset Flex CharStyle:Code
20439 \begin_layout Plain Layout
20442 Documents and Settings
20456 \begin_inset Flex CharStyle:Code
20459 \begin_layout Plain Layout
20474 , section [tunnels], setup ssh command, e.g.
20476 \begin_inset Flex CharStyle:Code
20479 \begin_layout Plain Layout
20480 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20489 \begin_layout Plain Layout
20490 It will usually take a lot of time to get exact command right and it depends
20492 For example do not have some remote server saved as a default session in
20494 If things fail, try to connect via plink without SVN first.
20503 \begin_layout Enumerate
20504 Checkout the SVN archive, e.g.
20506 \begin_inset Flex CharStyle:Code
20509 \begin_layout Plain Layout
20510 svn co svn+ssh://user@server/repository_path
20518 \begin_layout Subsubsection
20520 \change_inserted 1 1274738367
20521 End-of-Line Conversions
20524 \begin_layout Standard
20526 \change_inserted 1 1274738433
20527 When the collsraborators are mixing Linux and Windows environments, LyX
20528 will use different line endings inside the .lyx files.
20529 This is not problem as far as LyX functionality is concerned, but the commit
20530 diffs will be huge and merge-conflicts prone.
20531 Fortunately SVN itself knows
20535 \begin_layout Plain Layout
20537 \change_inserted 1 1274738731
20538 \begin_inset Flex URL
20541 \begin_layout Plain Layout
20543 \change_inserted 1 1274738731
20545 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20559 how to deal with CR/LF problems when switching .lyx files to the
20560 \begin_inset Flex CharStyle:Code
20563 \begin_layout Plain Layout
20565 \change_inserted 1 1274738399
20577 \begin_layout Plain Layout
20579 \change_inserted 1 1274738457
20581 \begin_inset Flex CharStyle:Code
20584 \begin_layout Plain Layout
20586 \change_inserted 1 1274738457
20587 svn propset svn:eol-style native FILE_NAME
20604 \begin_layout Subsection
20608 \begin_layout Standard
20609 With the recent addition of the vc-command function LyX power users are
20610 allowed to create their own commands for revision control.
20613 \begin_layout Standard
20614 As an example you can see how two TortoiseSVN commands could be integrated
20618 \begin_layout Description
20620 \begin_inset Flex CharStyle:Code
20623 \begin_layout Plain Layout
20624 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20632 \begin_layout Description
20634 \begin_inset Flex CharStyle:Code
20637 \begin_layout Plain Layout
20638 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20646 \begin_layout Section
20647 Literate Programming
20650 \begin_layout Standard
20655 (kayvan@sylvan.com)
20659 original documentation written by
20661 Edmar Wienskoski Jr.
20664 (edmar-w-jr@technologist.com)
20667 \begin_layout Subsection
20671 \begin_layout Standard
20672 The main purpose of this documentation is to show you how to use LyX for
20673 literate programming.
20674 Where it is assumed that you are familiar with this programming technique,
20676 \begin_inset Quotes eld
20680 \begin_inset Quotes erd
20684 \begin_inset Quotes eld
20688 \begin_inset Quotes erd
20692 If that is not the case, please follow the web links provided in the following
20694 There is a lot of good documentation out there covering old development
20695 history to the latest tools tips.
20698 \begin_layout Standard
20699 It is also assumed that you are familiar with LyX itself to a point that
20700 you are comfortable changing your LyX preferences, and X resources file.
20701 If that is not the case please refer to other LyX documentation to cover
20702 your specific needs.
20705 \begin_layout Subsection
20706 Literate Programming
20709 \begin_layout Standard
20710 From the Literate Programming FAQ:
20713 \begin_layout Quotation
20714 Literate programming is the combination of documentation and source together
20715 in a fashion suited for reading by human beings.
20716 In fact, literate programs should be enjoyable reading, even inviting!
20717 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20718 and documentation in a single file.
20719 Literate programming tools then parse the file to produce either readable
20720 documentation or compilable source.
20721 The WEB style of literate programming was created by D.
20722 \begin_inset space \thinspace{}
20726 Knuth during the development of his TeX typesetting software.
20730 \begin_layout Standard
20731 Another excerpt says:
20734 \begin_layout Quotation
20737 How is literate programming different from verbose commenting?
20740 \begin_layout Quotation
20741 There are three distinguishing characteristics.
20742 In order of importance, they are:
20746 \begin_layout Itemize
20747 flexible order of elaboration
20750 \begin_layout Itemize
20751 automatic support for browsing
20754 \begin_layout Itemize
20755 typeset documentation, especially diagrams and mathematics
20759 \begin_layout Standard
20760 Now that I sparked your curiosity, take a look in the references.
20763 \begin_layout Subsubsection
20767 \begin_layout Standard
20768 The complete Literate Programming FAQ can be found at:
20771 \begin_layout Quote
20772 Literate Programming FAQ
20773 \begin_inset Flex URL
20776 \begin_layout Plain Layout
20778 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20786 \begin_layout Standard
20787 The FAQ lists 23 (twenty three!) different literate programming tools.
20788 Where some are specialized or
20789 \begin_inset Quotes eld
20793 \begin_inset Quotes erd
20796 for particular programming languages, while other have general scope.
20801 for my own use for several reasons:
20804 \begin_layout Itemize
20805 It can generate the documentation either in LaTeX or HTML.
20808 \begin_layout Itemize
20809 It has a open architecture, i.
20810 \begin_inset space \thinspace{}
20814 \begin_inset space \space{}
20817 it is easy to plug in new filters and to perform special processing that
20822 \begin_layout Itemize
20823 There is a good selection of filters available already (the HTML is one
20827 \begin_layout Itemize
20831 \begin_layout Standard
20832 The Noweb web page can be found at:
20835 \begin_layout Quote
20837 \begin_inset Flex URL
20840 \begin_layout Plain Layout
20842 http://www.cs.virginia.edu/~nr/noweb/
20850 \begin_layout Standard
20851 Starting from there you can reach many other interesting links and even
20852 some literate program examples.
20855 \begin_layout Subsection
20856 LyX and Literate Programming
20859 \begin_layout Standard
20860 The LyX support for Literate Programming is provided by using the generic
20861 LyX converters mechanism.
20862 This support is provided in a
20863 \begin_inset Quotes eld
20867 \begin_inset Quotes erd
20871 \begin_inset space \thinspace{}
20875 \begin_inset space \space{}
20878 you will be able to use this new LyX feature with some other literate programmin
20879 g tool of your choice by just changing your LyX preferences.
20882 \begin_layout Subsubsection
20883 Generating documents and code (weaving and tangling)
20886 \begin_layout Paragraph
20887 Selecting the document class
20890 \begin_layout Standard
20891 If you have installed Noweb and LyX successfully, whenever you open a new
20892 document or try to change the document class of an existing one, you will
20893 find that there are three new document classes available:
20896 \begin_layout Itemize
20900 \begin_layout Itemize
20904 \begin_layout Itemize
20908 \begin_layout Standard
20909 You must select one of them to create your literate documents from.
20913 \begin_layout Standard
20914 Note that literate documents are not limited to these three classes.
20915 New classes can be generated from other styles like letter or in combination
20916 with other class variations like Article (AMS).
20917 If you have special needs that cannot be covered by one of the existing
20918 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20919 will arrange to insert a new entry, or teach you how to do it.
20923 \begin_layout Plain Layout
20924 It is very simple, it involves the creation of a file with four lines, and
20925 re-running of the auto configuration.
20930 Moreover, if you use a literate tool other than Noweb you may need to create
20931 a new set of document classes for it.
20934 \begin_layout Paragraph
20938 \begin_layout Standard
20939 LyX enables you to write code with a layout named
20947 \begin_layout Plain Layout
20948 The equivalent Noweb term is
20949 \begin_inset Quotes eld
20953 \begin_inset Quotes erd
20957 For historical reasons, I got used to the term
20958 \begin_inset Quotes eld
20962 \begin_inset Quotes erd
20965 introduced by other literate tool named Nuweb, which I used for many years
20966 before rendering myself to Noweb.
20971 Noweb delimits scraps like this:
20974 \begin_layout LyX-Code
20978 \begin_layout LyX-Code
20982 \begin_layout LyX-Code
20986 \begin_layout LyX-Code
20990 \begin_layout LyX-Code
20994 \begin_layout Standard
20995 The problem is that whatever is written in between the << and the
20999 must be taken literally, i.
21000 \begin_inset space \thinspace{}
21004 \begin_inset space \space{}
21007 LyX should be prevented from making any special interpretation of what has
21009 This is handled by a special layout named Scrap, that works like a normal
21010 paragraph but has a free spacing capability.
21013 \begin_layout Standard
21014 The down side of the Scrap paragraph layout is that consecutive paragraphs
21015 of code will be spaced with one empty line in the source code and also
21016 in the printed documentation.
21017 The work around is to enter each line of code within a single Scrap, with
21018 a newline (ctrl-return).
21019 The example above will look like this:
21023 \begin_layout Plain Layout
21024 If you have a printed version of this document you will not see any difference
21025 between the previous example and this one.
21033 \begin_layout LyX-Code
21035 \begin_inset Newline newline
21039 \begin_inset Newline newline
21043 \begin_inset Newline newline
21047 \begin_inset Newline newline
21053 \begin_layout Standard
21054 This layout works fine.
21055 The only real inconvenience is that you have to type ctrl-return instead
21060 \begin_layout Plain Layout
21061 It is in my list of
21062 \begin_inset Quotes eld
21066 \begin_inset Quotes erd
21077 \begin_layout Standard
21078 As a special note, you can also use the
21079 \begin_inset Quotes eld
21083 \begin_inset Quotes erd
21086 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21090 \begin_layout LyX-Code
21092 \begin_inset Newline newline
21095 def some_function(args):
21096 \begin_inset Newline newline
21099 "This is the doc string for this function."
21100 \begin_inset Newline newline
21103 print "My args: ", args
21106 \begin_layout LyX-Code
21107 @ %def some_function
21110 \begin_layout Standard
21111 For an example of this usage and the resulting cross-reference output, look
21112 at the Literate python program in
21114 LIBDIR/examples/listerrors.lyx
21116 which should make this all clear.
21119 \begin_layout Paragraph
21120 Generating the documentation
21123 \begin_layout Standard
21124 At this point you already have a new document file with a proper document
21125 class, and with some code and text on it.
21126 How do I print it? The answer is simple, you select
21128 View\SpecialChar \menuseparator
21132 Just like you would do for a plain document.
21133 No special procedure is required.
21136 \begin_layout Standard
21137 To help orientate you, I will now explain what happens inside LyX:
21140 \begin_layout Enumerate
21143 Update\SpecialChar \menuseparator
21146 menu option is chosen, a LaTeX file is generated.
21151 \begin_layout Standard
21152 If the document is of any literate class the generated file will be named
21153 with an extension name defined by the
21154 \begin_inset Quotes eld
21158 \begin_inset Quotes erd
21161 format (defined in the Preferences panel), otherwise the file will have
21170 \begin_layout Enumerate
21171 Note that the only difference so far is in the name of the file, no special
21172 processing is required by LyX.
21173 Given that you formatted the code using the Scrap layout that, by itself,
21174 takes care of the business.
21177 \begin_layout Enumerate
21178 If the document is of any literate class LyX will then use the internal
21179 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21183 \begin_layout Plain Layout
21184 The converters are defined in the
21186 Tools\SpecialChar \menuseparator
21190 \begin_inset Quotes eld
21194 \begin_inset Quotes erd
21206 manual for general information about converters.
21211 to generate the LaTeX file.
21215 \begin_layout Standard
21216 Otherwise it will just skip this step.
21220 \begin_layout Enumerate
21221 Finally, LaTeX is invoked and the regular post processing continues as in
21225 \begin_layout Standard
21226 Independence from a particular
21227 \begin_inset Quotes eld
21231 \begin_inset Quotes erd
21234 is easily achieved by changing the commands that are run by the various
21238 \begin_layout Paragraph
21239 Generating the code
21242 \begin_layout Standard
21243 When the build menu option is chosen or the corresponding button in the
21244 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21245 Next, LyX invokes the
21250 This converter needs to be defined by the user and is not installed by
21251 default, though the Program format is.
21252 This converter (like any other converter) will have two parts:
21255 \begin_layout Enumerate
21256 The converter program itself.
21257 This program performs the conversion from the one format to the other (in
21258 this case, from the Noweb format to the Program pseudo-format).
21261 \begin_layout Enumerate
21262 The error log parser.
21263 This is a program whose sole purpose is to rewrite error messages in a
21264 format that LyX understands.
21265 This makes it possible for LyX to place error boxes in the right places
21266 in the file buffer.
21269 \begin_layout Standard
21270 The first part, the
21271 \begin_inset Quotes eld
21275 \begin_inset Quotes erd
21278 setting, should be set to
21279 \begin_inset Quotes eld
21287 \begin_inset Quotes erd
21291 This basically means that LyX will call
21292 \begin_inset Quotes eld
21296 \begin_inset Quotes erd
21299 (a program or script) with the name of the Noweb file (normally a file
21300 in the LyX temp directory).
21304 \begin_layout Standard
21305 This is an implementation of
21306 \begin_inset Quotes eld
21310 \begin_inset Quotes erd
21313 that you can place in a directory on your path:
21316 \begin_layout LyX-Code
21320 \begin_layout LyX-Code
21324 \begin_layout LyX-Code
21325 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21328 \begin_layout Standard
21329 The next part of the converter setting is the
21330 \begin_inset Quotes eld
21334 \begin_inset Quotes erd
21337 which is to be set to
21338 \begin_inset Quotes eld
21343 parselog=listerrors
21346 \begin_inset Quotes erd
21350 This will run any errors that are generated by the
21351 \begin_inset Quotes eld
21355 \begin_inset Quotes erd
21358 process through the
21359 \begin_inset Quotes eld
21363 \begin_inset Quotes erd
21369 \begin_layout Standard
21370 The converter code looks in
21378 then on the path for the
21379 \begin_inset Quotes eld
21383 \begin_inset Quotes erd
21389 \begin_layout Standard
21390 The build will normally take place in LyX's temporary directory, so the
21391 files produced by the conversion will be in that directory.
21392 LyX will copy out what it regards as the `main' file, but the
21396 conversion may produce several files, and so most of these would then be
21397 deleted when LyX was closed.
21398 The present solution is to use a `copier',
21402 \begin_layout Plain Layout
21411 manual for information on these.
21420 script in its default mode, so that the entire contents of the temporary
21421 directory is copied.
21422 More will get copied than is needed, to be sure, but nothing will be lost.
21423 If, however, you know what extensions the generated files will have, this
21424 can be improved by using the
21433 This option takes a comma-separated list of extensions to copy.
21434 So, for example, if the conversion will generate only files with the extensions
21443 , then the correct definition would be:
21446 \begin_layout LyX-Code
21447 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21450 \begin_layout Standard
21451 The result will be that only files with these two extensions will be copied
21455 \begin_layout Paragraph
21456 Build instructions in the document
21459 \begin_layout Standard
21460 The last piece of the integration between LyX and noweb is the
21461 \begin_inset Quotes eld
21465 \begin_inset Quotes erd
21469 Generally, the instructions for building your program should be embedded
21470 in a scrap of its own.
21472 \begin_inset Quotes eld
21476 \begin_inset Quotes erd
21479 above uses the notangle command to look for this scrap (called
21480 \begin_inset Quotes eld
21484 \begin_inset Quotes erd
21487 ) and runs its contents through
21488 \begin_inset Quotes eld
21492 \begin_inset Quotes erd
21498 \begin_layout Standard
21499 Typically, such a scrap would look something like this:
21502 \begin_layout LyX-Code
21504 \begin_inset Newline newline
21508 \begin_inset Newline newline
21512 \begin_inset Newline newline
21515 if [ -z "${NOWEB_SOURCE}" ]
21516 \begin_inset Newline newline
21520 \begin_inset Newline newline
21523 NOWEB_SOURCE=myfile.nw
21524 \begin_inset Newline newline
21528 \begin_inset Newline newline
21532 code to extract files ...]
21533 \begin_inset Newline newline
21537 code to compile files ...]
21538 \begin_inset Newline newline
21544 \begin_layout Standard
21547 LIBDIR/examples/listerrors.lyx
21551 LIBDIR/examples/Literate.lyx
21553 which implement two versions of the
21554 \begin_inset Quotes eld
21558 \begin_inset Quotes erd
21561 program for some illustrations of how all of these pieces go together or
21564 LIBDIR/examples/noweb2lyx.lyx.
21567 Interestingly, these three files show off the language-indepence of the
21568 LyX literate programming support since they are written in Python, C and
21572 \begin_layout Subsubsection
21576 \begin_layout Standard
21577 All the Literate Programming support is configured by the
21579 Tools\SpecialChar \menuseparator
21583 \begin_inset Quotes eld
21587 \begin_inset Quotes erd
21591 The important parts are:
21594 \begin_layout Description
21596 \begin_inset space ~
21600 \begin_inset Quotes eld
21604 \begin_inset Quotes erd
21608 \begin_inset space ~
21611 format Set up via the Formats tab, this is where the Noweb-specific pieces
21621 , the file extension is set to
21626 This tells LyX to create a file with a
21630 extension in the first step of the conversion process.
21633 \begin_layout Description
21635 \begin_inset space ~
21643 \begin_inset space ~
21646 format This is an empty format whose sole purpose is to be the endpoint
21647 of a conversion (which then allows us to set up a converter for it).
21650 \begin_layout Description
21659 This converter performs the
21660 \begin_inset Quotes eld
21664 \begin_inset Quotes erd
21667 of the literate document.
21668 For Noweb, it is set to
21669 \begin_inset Quotes eld
21674 noweave -delay -index $$i > $$o
21677 \begin_inset Quotes erd
21683 \begin_layout Description
21693 \begin_inset Quotes eld
21697 \begin_inset Quotes erd
21701 As stated above, the Converter is set to
21702 \begin_inset Quotes eld
21710 \begin_inset Quotes erd
21713 , with Flags set to
21714 \begin_inset Quotes eld
21719 originaldir,parselog=listerrors
21722 \begin_inset Quotes erd
21728 \begin_layout Subsubsection
21732 \begin_layout Standard
21733 There is also a new function implemented in the LyX server, the
21734 \begin_inset Quotes eld
21737 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21741 \begin_layout Standard
21742 When debugging code with ddd/gdb, it is possible to invoke a text editor
21743 at the current execution position with a single key stroke.
21744 The default ddd configuration for that is shift-ctrl-V.
21745 It happens that you can define the editor command line invocation in ddd
21748 Edit\SpecialChar \menuseparator
21749 Preferences\SpecialChar \menuseparator
21752 dialog and changing the "Edit Sources" entry.
21755 \begin_layout Standard
21756 I take advantage of the new created LyX server function and this ddd feature,
21758 \begin_inset Quotes eld
21762 \begin_inset Quotes erd
21768 \begin_layout LyX-Code
21769 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21772 \begin_layout Standard
21773 With this, whenever you are using ddd and find a point in the program that
21774 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21775 ddd you forward this information to LyX through the LyX server and then
21776 the LyX window will show the same file with the cursor at the same position
21777 ddd was pointing to.
21778 No more guessing or long scrolling to locate a point in the program back
21782 \begin_layout Standard
21783 Note however that you must enable the LyX server to get this feature working
21784 (it is disabled by default).
21785 You can enable it in
21797 ) by entering in the
21802 \begin_inset Quotes eld
21807 /home/<your-home-directory>/.lyx/lyxpipe
21810 \begin_inset Quotes erd
21816 \begin_layout Standard
21817 Read the LyX server documentation in the
21819 Customization Manual
21821 for further information.
21824 \begin_layout Subsubsection
21828 \begin_layout Standard
21829 There are six new buttons that can be added to your LyX toolbar.
21830 Five of these buttons are short cuts to layout styles:
21851 The last one is a short cut to the
21852 \begin_inset Quotes eld
21856 \begin_inset Quotes erd
21863 \begin_layout Standard
21864 LyX has a range of buttons that are available for tool bar customization.
21865 In my toolbar I like to combine the six short cuts above with two more:
21870 \SpecialChar \menuseparator
21875 \SpecialChar \menuseparator
21882 View\SpecialChar \menuseparator
21886 Here is how it looks like:
21889 \begin_layout LyX-Code
21893 \begin_layout LyX-Code
21897 \begin_layout LyX-Code
21898 Icon "layout Standard"
21901 \begin_layout LyX-Code
21902 Icon "layout Section"
21905 \begin_layout LyX-Code
21906 Icon "layout LaTeX"
21909 \begin_layout LyX-Code
21910 Icon "layout LyX-Code"
21913 \begin_layout LyX-Code
21914 Icon "layout Scrap"
21917 \begin_layout LyX-Code
21921 \begin_layout LyX-Code
21925 \begin_layout LyX-Code
21926 Icon "buffer-typeset"
21929 \begin_layout LyX-Code
21930 Icon "build-program"
21933 \begin_layout LyX-Code
21937 \begin_layout LyX-Code
21941 \begin_layout LyX-Code
21945 \begin_layout LyX-Code
21949 \begin_layout LyX-Code
21953 \begin_layout Subsubsection
21954 Colors customization
21957 \begin_layout Standard
21958 There are a number of colors in LyX that can be customized in
21963 One of the things that bothers people is the LaTeX font color.
21964 The default color is red, since the scraps uses LaTeX font, and there is
21965 a lot of scraps in literate documents, you may get tired of seeing everything
21967 You can change it by going to the tabs
21976 \begin_layout Standard
21977 The next thing is the visible presence of the newline character in the screen.
21978 You can choose the color of this particular character and make it blend
21980 I recommend you choosing a color that is close to the background but not
21981 equal, that way you still can see it is there, but it is not bothering
21986 \begin_layout Chapter
21987 Secrets of the LaTeX Masters
21988 \begin_inset CommandInset label
21997 \begin_layout Standard
21998 Though LyX is a powerful tool, it cannot hope to support everything that
21999 can be done with pure TeX/LaTeX.
22000 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22001 as long as you are not afraid to use that
22002 \begin_inset Quotes eld
22006 \begin_inset Quotes erd
22009 button on the toolbar or add things to the LaTeX preamble.
22010 This section lists some tips, tricks, and otherwise cool ideas to give
22011 your document that extra little flair.
22014 Do try this at home
22016 , just start with something a little smaller and less important than your
22020 \begin_layout Standard
22021 Most ideas in this section require less common files in your LaTeX installation.
22022 If you have a system like teTeX, most will already be available.
22023 A few, however, will need to be downloaded from one of the CTAN archives.
22024 Often, there are several ways to do something, or several LaTeX style files
22025 which do the same thing.
22026 We do not endorse one choice over another, we simply claim that we have
22027 done a particular task with a particular file.
22028 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22031 \begin_layout Section
22035 \begin_layout Standard
22038 Lars Gullik Bjønnes
22041 \begin_layout Subsection
22045 \begin_layout Standard
22046 The aim for this chapter
22050 \begin_layout Plain Layout
22051 Editor's note: Lars' original chapter was a masterful description of how
22057 However, it was too long to flow smoothly in this document.
22058 I have therefore chosen to excerpt the most important sections here (sorry,
22059 Lars); you can read the original chapter (and more of the story!) in the
22062 examples/multicol.lyx
22070 is to show how the LaTeX package
22074 can be used in a LyX document.
22075 As LyX doesn't support the
22079 package natively yet, we have to use some small hacks.
22080 By reading this section it should be obvious how to do this.
22083 \begin_layout Subsection
22087 \begin_layout Standard
22092 package allows switching between one and multicolumn format on the same
22094 Footnotes are handled correctly (for the most part), but will be placed
22095 at the bottom of the page and not under each column.
22096 LaTeX's float mechanism, however, is partly disabled in the current implementat
22098 At the moment only page-wide floats can be used within the scope of the
22102 \begin_layout Subsection
22106 \begin_layout Subsubsection
22110 \begin_layout Standard
22111 If you want to have two columns in your text, you have use LaTeX mode to
22116 begin{multicols}{2}
22118 at the point where you want the two column layout to start, and then
22124 where you want it to end.
22128 \begin_layout Standard
22132 \begin_layout Plain Layout
22136 begin{multicols}{2}
22144 \begin_layout Standard
22149 The Adventure of the Empty House
22152 \begin_inset Newline newline
22157 Sir Arthur Conan Doyle
22160 \begin_layout Standard
22163 It was in the spring of the year 1894 that all London was interested, and
22164 the fashionable world dismayed, by the murder of the Honourable Ronald
22165 Adair under most unusual and inexplicable circumstances.
22166 The public has already learned those particulars of the crime which came
22167 out in the police investigation, but a good deal was suppressed upon that
22168 occasion, since the case for the prosecution was so overwhelmingly strong
22169 that it was not necessary to bring forward all the facts.
22170 Only now, at the end of nearly ten years, am I allowed to supply those
22171 missing links which make up the whole of that remarkable chain.
22172 The crime was of interest in itself, but that interest was as nothing to
22173 me compared to the inconceivable sequel, which afforded me the greatest
22174 shock and surprise of any event in my adventurous life.
22175 Even now, after this long interval, I find myself thrilling as I think
22176 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22177 ty which utterly submerged my mind.
22178 Let me say to that public, which has shown some interest in those glimpses
22179 which I have occasionally given them of the thoughts and actions of a very
22180 remarkable man, that they are not to blame me if I have not shared my knowledge
22181 with them, for I should have considered it my first duty to do so, had
22182 I not been barred by a positive prohibition from his own lips, which was
22183 only withdrawn upon the third of last month.
22186 \begin_layout Standard
22190 \begin_layout Plain Layout
22202 \begin_layout Subsubsection
22206 \begin_layout Standard
22207 The same pattern is used when you want more than two columns:
22210 \begin_layout Standard
22214 \begin_layout Plain Layout
22218 begin{multicols}{3}
22226 \begin_layout Standard
22229 It can be imagined that my close intimacy with Sherlock Holmes had interested
22230 me deeply in crime, and that after his disappearance I never failed to
22231 read with care the various problems which came before the public.
22232 And I even attempted, more than once, for my own private satisfaction,
22233 to employ his methods in their solution, though with indifferent success.
22234 There was none, however, which appealed to me like this tragedy of Ronald
22236 As I read the evidence at the inquest, which led up to a verdict of willful
22237 murder against some person or persons unknown, I realized more clearly
22238 than I had ever done the loss which the community had sustained by the
22239 death of Sherlock Holmes.
22240 There were points about this strange business which would, I was sure,
22241 have specially appealed to him, and the efforts of the police would have
22242 been supplemented, or more probably anticipated, by the trained observation
22243 and the alert mind of the first criminal agent in Europe.
22244 All day, as I drove upon my round, I turned over the case in my mind and
22245 found no explanation which appeared to me to be adequate.
22246 At the risk of telling a twice-told tale, I will recapitulate the facts
22247 as they were known to the public at the conclusion of the inquest.
22250 \begin_layout Standard
22254 \begin_layout Plain Layout
22266 \begin_layout Standard
22267 You can have more than 3 columns if you want to, but that might not be very
22268 pleasant for the eye.
22271 \begin_layout Subsubsection
22272 Columns inside columns
22275 \begin_layout Standard
22276 You can even have columns inside columns:
22279 \begin_layout Standard
22283 \begin_layout Plain Layout
22287 begin{multicols}{2}
22295 \begin_layout Standard
22298 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22299 at that time governor of one of the Australian colonies.
22300 Adair's mother had returned from Australia to undergo the operation for
22301 cataract, and she, her son Ronald, and her daughter Hilda were living together
22305 \begin_layout Standard
22309 \begin_layout Plain Layout
22313 begin{multicols}{2}
22321 \begin_layout Standard
22324 The youth moved in the best society–had, so far as was known, no enemies
22325 and no particular vices.
22326 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22327 had been broken off by mutual consent some months before, and there was
22328 no sign that it had left any very profound feeling behind it.
22329 For the rest {sic} the man's life moved in a narrow and conventional circle,
22330 for his habits were quiet and his nature unemotional.
22331 Yet it was upon this easy-going young aristocrat that death came, in most
22332 strange and unexpected form, between the hours of ten and eleven-twenty
22333 on the night of March 30, 1894.
22336 \begin_layout Standard
22340 \begin_layout Plain Layout
22352 \begin_layout Standard
22355 Ronald Adair was fond of cards–playing continually, but never for such stakes
22357 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22358 It was shown that, after dinner on the day of his death, he had played
22359 a rubber of whist at the latter club.
22360 He had also played there in the afternoon.
22365 The evidence of those who had played with him– Mr.
22366 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22367 and that there was a fairly equal fall of the cards.
22368 Adair might have lost five pounds, but not more.
22369 His fortune was a considerable one, and such a loss could not in any way
22371 He had played nearly every day at one club or other, but he was a cautious
22372 player, and usually rose a winner.
22373 It came out in evidence that, in partnership with Colonel Moran, he had
22374 actually won as much as four hundred and twenty pounds in a sitting, some
22375 weeks before, from Godfrey Milner and Lord Balmoral.
22376 So much for his recent history as it came out at the inquest.
22379 \begin_layout Standard
22383 \begin_layout Plain Layout
22395 \begin_layout Standard
22396 Please do read the file
22398 examples/multicol.lyx
22400 for more advanced examples including column and header spacing, vertical
22401 separator lines, and more.
22404 \begin_layout Section
22409 Paragraph Environment
22410 \begin_inset Argument
22413 \begin_layout Plain Layout
22414 Numbering in Enumerate
22422 \begin_layout Standard
22428 \begin_layout Standard
22429 \begin_inset VSpace bigskip
22435 \begin_layout Standard
22437 The default numbering for the
22441 paragraph environment begins with Arabic numbers and ends with uppercase
22443 Suppose, however, you wanted a different type of numbering scheme.
22444 Here's a quickie example of how to change the numbering scheme:
22447 \begin_layout LyX-Code
22457 \begin_layout LyX-Code
22467 \begin_layout LyX-Code
22477 \begin_layout LyX-Code
22487 \begin_layout Standard
22488 \SpecialChar \ldots{}
22489 which changes the numbering scheme to uppercase Roman numerals, uppercase
22490 letters, Arabic numbers, and lowercase letter.
22493 \begin_layout Standard
22494 Additionally, the previous example also adds a little bit extra to the numbering
22496 For example, the first level label actually looks like:
22497 \begin_inset Quotes eld
22501 \begin_inset Quotes erd
22505 For ease of reading, we'll describe what the numbering schemes look like
22506 using a notation something like this: <
22507 \begin_inset Quotes eld
22511 \begin_inset Quotes erd
22515 \begin_inset space ~
22519 \begin_inset Quotes erd
22523 \begin_inset Quotes erd
22527 \begin_inset space ~
22531 \begin_inset Quotes erd
22535 \begin_inset Quotes erd
22539 \begin_inset space ~
22543 \begin_inset Quotes eld
22547 \begin_inset Quotes erd
22554 \begin_layout Standard
22555 As you can see in the example, there is a label command for each nesting
22562 \SpecialChar \ldots{}
22569 , as well as a counter,
22573 \SpecialChar \ldots{}
22579 There are also five
22580 \begin_inset Quotes eld
22584 \begin_inset Quotes erd
22617 , each of which take one counter as an argument.
22618 You can add characters before or after these, but there's no need to add
22622 \begin_layout Standard
22623 You can get really fancy with these.
22627 \begin_layout LyX-Code
22641 \begin_layout LyX-Code
22653 \begin_layout LyX-Code
22663 \begin_layout LyX-Code
22673 \begin_layout Standard
22674 produces the somewhat out of hand numbering scheme: <
22675 \begin_inset Quotes eld
22679 \begin_inset Quotes erd
22683 \begin_inset space ~
22687 \begin_inset Quotes erd
22691 \begin_inset Quotes erd
22695 \begin_inset space ~
22699 \begin_inset Quotes erd
22703 \begin_inset Quotes erd
22707 \begin_inset space ~
22711 \begin_inset Quotes eld
22715 \begin_inset Quotes erd
22722 \begin_layout Standard
22726 \begin_layout Section
22730 \begin_layout Standard
22736 \begin_layout Standard
22737 \begin_inset VSpace bigskip
22743 \begin_layout Standard
22748 \begin_layout Plain Layout
22754 tmpfont}{cmr17 scaled 2500}{
22766 \begin_layout Standard
22771 \begin_layout Plain Layout
22782 hose of you who like the style of old books probably also like
22783 \begin_inset Quotes eld
22787 \begin_inset Quotes erd
22790 —those large capital letters which begin each new chapter or section.
22791 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22792 know some plain TeX!) but does require a lot of work and many iterations,
22793 as you can see by all the ugly TeX-mode stuff at the beginning of this
22797 \begin_layout Standard
22801 \begin_layout Plain Layout
22807 bigdrop{-1em}{3}{ptmri}{T}+
22812 here is a much easier way of doing this, of course.
22821 ) package from CTAN allows a simple way to add such letters to your documents.
22822 Since this package is not a standard part of teTeX, I can't demonstrate
22823 it within this document, but if you copy this paragraph to a new document,
22825 \begin_inset Quotes eld
22835 \begin_inset Quotes erd
22838 and the pluses from the TeX code at the beginning of the paragraph, and
22843 usepackage{dropcaps}
22845 to your LaTeX preamble, you will get a nice Times Roman Italic
22846 \begin_inset Quotes eld
22850 \begin_inset Quotes erd
22853 , whose height is three lines of text and which protrudes 1 em into the
22855 (Make certain you have copied
22856 \begin_inset Quotes eld
22864 \begin_inset Quotes erd
22867 into a directory where TeX can see it.) The first argument is the amount
22868 of indentation; in this case the negative sign moves it into the margin.
22869 The second argument is the height of the letter in number of lines of text.
22870 The third argument is the font name: virtually anything which has a tfm
22871 file should work (wade through the
22873 .../texmf/fonts/tfm
22875 directory for possibilities).
22876 My personal favorite is
22877 \begin_inset Quotes eld
22885 \begin_inset Quotes erd
22888 , a fancy German font specifically designed for dropped capitals.
22889 The fourth argument is the letter (or letters) to be dropped.
22894 package also offers the
22900 command, as well as a slightly simplified
22909 \begin_layout Section
22910 Non-standard Paragraph Shapes
22913 \begin_layout Standard
22919 \begin_layout Standard
22920 \begin_inset VSpace bigskip
22926 \begin_layout Standard
22930 \begin_layout Plain Layout
22942 \begin_layout Standard
22946 \begin_layout Plain Layout
22955 \begin_layout Plain Layout
22969 \begin_layout Standard
22974 \begin_layout Plain Layout
22985 \begin_layout Plain Layout
22994 \begin_layout Plain Layout
23003 \begin_layout Plain Layout
23012 \begin_layout Plain Layout
23021 \begin_layout Plain Layout
23030 \begin_layout Plain Layout
23039 \begin_layout Plain Layout
23048 \begin_layout Plain Layout
23057 \begin_layout Plain Layout
23066 \begin_layout Plain Layout
23075 \begin_layout Plain Layout
23084 \begin_layout Plain Layout
23093 \begin_layout Plain Layout
23102 \begin_layout Plain Layout
23111 \begin_layout Plain Layout
23120 \begin_layout Plain Layout
23129 \begin_layout Plain Layout
23138 \begin_layout Plain Layout
23147 \begin_layout Plain Layout
23153 There are times when the tyranny of rectangular paragraphs must be overthrown.
23154 In such situations, a call to the delightful plain TeX command
23161 As you can see, completely arbitrary shapes can be laid out with a suitable
23162 set of linelength definitions.
23163 While this parshape may look a bit silly and useless, one could conceive
23164 of situations such as finely tuned dropped capitals, word wrapping around
23165 non-rectangular graphics, etc.
23166 which will benefit from such handcrafting.
23169 \begin_layout Standard
23170 \begin_inset VSpace bigskip
23176 \begin_layout Standard
23181 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23188 is the number of lines of text which define the paragraph.
23189 If there turn out to be fewer lines, the shape is truncated; if there are
23190 more, the excess lines have the same dimensions as the last line of the
23200 entries specify the indentation of the line from the left margin, and the
23201 length of the line as measured from that point.
23202 The shape applies only to the current paragraph; everything is reset to
23203 normal for the next paragraph.
23206 \begin_layout Standard
23210 \begin_layout Plain Layout
23222 \begin_layout Section
23226 \begin_layout Standard
23227 As you can see, the examples in this section range from the useful to the
23229 While I don't expect that anyone will ever need the paragraph shape demonstrate
23230 d in the last section, the important point is that you can do almost anything
23231 you want in LyX if you are willing to figure out how to do it in TeX and
23233 TeX is a fantastically powerful typesetting system and all that power is
23234 available to you since LyX uses it as its backend.