1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes true
130 \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 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 MenuItem
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
317 \begin_inset Flex MenuItem
320 \begin_layout Plain Layout
327 \begin_inset Flex MenuItem
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
337 ), then look at the preamble of the resulting
338 \begin_inset Flex 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 MenuItem
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
401 \begin_layout Itemize
402 \begin_inset Flex 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 Code
430 \begin_layout Plain Layout
437 \begin_inset Flex Code
440 \begin_layout Plain Layout
449 \begin_layout Enumerate
451 \begin_inset Flex Code
454 \begin_layout Plain Layout
460 file (maybe several times), and run any other commands (such as
461 \begin_inset Flex Code
464 \begin_layout Plain Layout
471 \begin_inset Flex 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 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 MenuItem
508 \begin_layout Plain Layout
511 \SpecialChar \menuseparator
519 , LyX performs further steps:
522 \begin_layout Itemize
524 \begin_inset Flex 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 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 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 Code
576 \begin_layout Plain Layout
582 which will create a file
583 \begin_inset Flex Code
586 \begin_layout Plain Layout
593 \begin_inset Flex Code
596 \begin_layout Plain Layout
603 LyX will then open that file.
607 \begin_layout Plain Layout
608 \begin_inset Flex 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 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 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 Code
673 \begin_layout Plain Layout
679 box, which you can insert into your document with
680 \begin_inset Flex 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 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 MenuItem
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
915 to include your file (you should select the type
916 \begin_inset Flex Code
919 \begin_layout Plain Layout
926 We recommend that you only do this if you have a
927 \begin_inset Flex 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 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 Code
1083 \begin_layout Plain Layout
1092 \begin_inset Flex 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 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 MenuItem
1144 \begin_layout Plain Layout
1146 \begin_inset space ~
1155 \begin_inset Flex MenuItem
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1166 LyX adds anything in the
1167 \begin_inset Flex 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 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 Code
1227 \begin_layout Plain Layout
1236 \begin_inset Flex 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 Code
1256 \begin_layout Plain Layout
1265 \begin_inset Flex Code
1268 \begin_layout Plain Layout
1279 \begin_layout Standard
1280 The default values for
1281 \begin_inset Flex Code
1284 \begin_layout Plain Layout
1293 \begin_inset Flex 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 Code
1324 \begin_layout Plain Layout
1333 \begin_inset Flex Code
1336 \begin_layout Plain Layout
1345 Suppose your 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 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 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 Code
1463 \begin_layout Plain Layout
1472 \begin_inset Flex Code
1475 \begin_layout Plain Layout
1483 around each label text.
1484 This and other special features of
1485 \begin_inset Flex 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 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 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 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 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 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 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 Code
1777 \begin_layout Plain Layout
1786 \begin_inset Flex 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 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 Code
1842 \begin_layout Plain Layout
1850 command, then one of the packages LyX tried to load is missing.
1852 \begin_inset Flex 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 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 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 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 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 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 Code
2003 \begin_layout Plain Layout
2005 \begin_inset space ~
2014 \begin_inset Flex Code
2017 \begin_layout Plain Layout
2024 \begin_inset Flex 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 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 Code
2172 \begin_layout Plain Layout
2179 \begin_inset Flex 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 Code
2195 \begin_layout Plain Layout
2201 , than the established
2202 \begin_inset Flex 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 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 MenuItem
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2240 \begin_inset Flex MenuItem
2243 \begin_layout Plain Layout
2250 \begin_inset Flex MenuItem
2253 \begin_layout Plain Layout
2260 \begin_inset Flex 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 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 Code
2423 \begin_layout Plain Layout
2430 \begin_inset Flex Code
2433 \begin_layout Plain Layout
2443 \begin_layout Standard
2445 \begin_inset Flex MenuItem
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2456 \begin_inset Flex MenuItem
2459 \begin_layout Plain Layout
2466 \begin_inset Flex 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 Code
2482 \begin_layout Plain Layout
2488 and a second one for the database
2489 \begin_inset Flex 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 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 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 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 Code
2624 \begin_layout Plain Layout
2631 \begin_inset Flex Code
2634 \begin_layout Plain Layout
2640 package, respectively.
2648 \begin_layout Standard
2650 \begin_inset Flex MenuItem
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2661 \begin_inset Flex MenuItem
2664 \begin_layout Plain Layout
2671 \begin_inset Flex 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 Code
2687 \begin_layout Plain Layout
2696 \begin_inset Flex 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 Code
2713 \begin_layout Plain Layout
2724 If you are using this approach, then every citation reference has to be
2726 \begin_inset Flex Code
2729 \begin_layout Plain Layout
2737 \begin_inset Flex 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 Code
2793 \begin_layout Plain Layout
2802 \begin_inset Flex 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 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 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 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 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 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 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 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 Code
3197 \begin_layout Plain Layout
3206 \begin_inset Flex Code
3209 \begin_layout Plain Layout
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3230 \begin_inset Flex 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 Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex 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 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 Code
3415 \begin_layout Plain Layout
3420 headrulewidth}{0.4pt}
3426 \begin_inset Flex 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 Code
3448 \begin_layout Plain Layout
3451 thispagestyle{empty}
3457 \begin_inset Flex Code
3460 \begin_layout Plain Layout
3463 thispagestyle{plain}
3469 \begin_inset Flex 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 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 MenuItem
3572 \begin_layout Plain Layout
3573 Document\SpecialChar \menuseparator
3579 menu item and then select the
3580 \begin_inset Flex 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 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 MenuItem
4061 \begin_layout Plain Layout
4068 For example, this item was started with
4069 \begin_inset Flex 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 Code
4155 \begin_layout Plain Layout
4162 \begin_inset Flex Code
4165 \begin_layout Plain Layout
4172 \begin_inset Flex 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 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 Code
4206 \begin_layout Plain Layout
4212 files, counters, and references, and can often make use of the
4213 \begin_inset Flex 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 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 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 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 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 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 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 Code
4334 \begin_layout Plain Layout
4335 development/HTML.notes
4340 , which can be found in the LyX source tree or
4341 \begin_inset CommandInset href
4343 name "accessed online"
4344 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4348 , usually contains up-to-date information about the state of XHTML output.
4353 Still, the developers have chosen this approach because it has several
4354 potential advantages over the other two.
4357 \begin_layout Standard
4358 These advantages are primarily due to the fact that the XHTML output routines,
4359 since they are part of LyX, know everything LyX knows about the document
4364 \begin_layout Plain Layout
4365 Another advantege is that, since these routines are internal to LyX, they
4366 are immune to changes in LyX's file format, or to changes in the semantics
4372 So they know about the table of contents (as displayed in the outline),
4373 about the counters associated with different paragraph styles, and about
4374 user-defined styles.
4375 The XHTML output routines know what LyX knows about internationalization,
4376 too, so they will output
4377 \begin_inset Quotes eld
4381 \begin_inset Quotes erd
4385 \begin_inset Quotes eld
4393 \begin_inset Quotes erd
4396 , depending upon the language in effect at the time.
4400 \begin_layout Standard
4401 Quite generally, the output routines know everything LyX knows about document
4402 layout, that is, about how the document is to be rendered on screen.
4403 We use this information when we output the document as XHTML.
4408 generates CSS style information corresponding to the layout information
4409 it uses to render the document on screen: if section headings are supposed
4410 to be sans-serif and bold as seen in LyX, then (by default) they will be
4411 sans-serif and bold when viewed in a web browser, too.
4412 And this is true not just for pre-defined styles, like Section, but for
4413 any style, including user-defined styles.
4414 Indeed, the XHTML output routines make no distinction between user-defined
4415 paragraph and character styles and LyX's own pre-defined styles: in each
4416 case, everything LyX knows about the styles is contained in the layout
4418 And much the same is true as regards pre-defined textual insets, such as
4419 footnotes, and various custom insets.
4423 \begin_layout Standard
4424 The result is that XHTML output can be customized and extended in
4428 the same way LaTeX output can be customized and extended: through layout
4430 See chapter five of the
4434 manual for the details.
4437 \begin_layout Standard
4438 The remainder of this chapter contains more detailed information on XHTML
4439 output, its limitations, and ways to work around those limitations.
4442 \begin_layout Section
4443 Math Output in XHTML
4446 \begin_layout Standard
4447 LyX offers four choices for how math is rendered.
4448 These have various advantages and disadvantages:
4451 \begin_layout Itemize
4453 \begin_inset Newline newline
4456 MathML is a dialect of XML designed specifically for mathematics on the
4457 web, and it typically renders very well in browsers that support it.
4458 The disadvantage is that not all browsers support MathML, and support is
4459 not complete even in the Gecko-based browsers, such as Firefox.
4460 \begin_inset Newline newline
4463 If LyX is unable to render a formula as MathML---for example, if the formula
4465 \begin_inset Flex Code
4468 \begin_layout Plain Layout
4474 package or ERT---then it will instead output the formula as an image.
4478 \begin_layout Itemize
4480 \begin_inset Newline newline
4484 \begin_inset Flex Code
4487 \begin_layout Plain Layout
4493 outputs math as HTML, styled by CSS.
4497 \begin_layout Plain Layout
4498 LyX has borrowed some of the CSS for its HTML output from
4499 \begin_inset Flex Code
4502 \begin_layout Plain Layout
4513 For simple formulae, this can work quite well, though with more complicated
4514 formulae it tends to break down.
4515 Still, this method has the advantage that it is very widely supported and
4516 so it may be appropriate for documents that contain only a little, fairly
4518 \begin_inset Newline newline
4521 If Lyx is unable to render a formula as MathML---for example, if the formula
4523 \begin_inset Flex Code
4526 \begin_layout Plain Layout
4532 package or ERT---then it will instead output the formula as an image.
4536 \begin_layout Itemize
4538 \begin_inset Newline newline
4542 \begin_inset Flex Code
4545 \begin_layout Plain Layout
4551 , LyX will output formulae as images, the very same images, in fact, that
4552 are used for instant preview.
4556 \begin_layout Plain Layout
4557 Instant preview does
4561 have to be on for images to be output, however.
4566 The advantage to this method is that the images are simply generated by
4567 LaTeX, so they are very accurate.
4568 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4569 so they do not scale terribly well, and one cannot copy them, etc.
4570 \begin_inset Newline newline
4573 The size of the images can be controlled by setting the
4574 \begin_inset Quotes eld
4578 \begin_inset Quotes erd
4582 \begin_inset Flex MenuItem
4585 \begin_layout Plain Layout
4586 Document\SpecialChar \menuseparator
4587 Settings\SpecialChar \menuseparator
4597 \begin_layout Plain Layout
4598 For those who want to know, this controls the resolution of the image in
4599 dots per inch and is based upon a default of 75 dpi.
4605 \begin_inset Newline newline
4608 If LyX for some reason fails to create an image for a formula (e.g., if a
4609 required LaTeX package is not installed), then it will fall back to outputing
4613 \begin_layout Itemize
4615 \begin_inset Newline newline
4618 Finally, LyX will happily output math as LaTeX.
4619 As well as being the output of last resort, this method can be used with
4621 \begin_inset CommandInset href
4624 target "http://www.math.union.edu/~dpvc/jsMath/"
4628 , which uses JavaScript to render LaTeX embedded in HTML documents.
4629 LyX wraps the LaTeX in either a
4630 \begin_inset Flex Code
4633 \begin_layout Plain Layout
4639 (for inline formulas) or
4640 \begin_inset Flex Code
4643 \begin_layout Plain Layout
4649 (for displayed formulas) with
4650 \begin_inset Flex Code
4653 \begin_layout Plain Layout
4659 , as is required for jsMath.
4662 \begin_layout Standard
4663 One of these output methods must be selected under
4664 \begin_inset Flex MenuItem
4667 \begin_layout Plain Layout
4668 Document\SpecialChar \menuseparator
4669 Settings\SpecialChar \menuseparator
4676 By default, LyX outputs MathML.
4677 This is a document-wide setting, therefore.
4680 \begin_layout Standard
4681 Eventually, LyX will offer the user the option to select an alternate output
4682 method for a particular inset, say, one that isn't being rendered very
4687 \begin_layout Plain Layout
4688 That said, since LyX falls back to images if the inset contains ERT, then
4689 one can force output as an image by putting some harmless ERT into the
4691 \begin_inset Formula $a=b\relax$
4702 \begin_layout Section
4703 Bibliography and Citations
4706 \begin_layout Standard
4707 XHTML output fully supports bibliographies and citations.
4711 \begin_layout Standard
4712 Citation labels are generated by the same machinery that generates LyX's
4713 on-screen labels, so the labels will look in the output much as they do
4714 in LyX, though better.
4715 If you are using numerical citations, then LyX will output numerical labels,
4716 such as [1] or [17], rather than simply showing the citation key in square
4717 brackets, as it does on-screen.
4718 If you are using author-year citations, then LyX will add lowercase letters
4719 to the years, just as BibTeX does, if it finds more than one citation for
4720 a given author-year combination.
4721 The labels will be printed with the bibliography entries.
4722 Note that there is, at present, no way to customize the appearance of the
4723 labels, for example, to choose between square brackets and parentheses.
4726 \begin_layout Standard
4727 Bibliography output is handled by the same machinery that handles the presentati
4728 on of reference information in the citation dialog, so you will see in the
4729 XHTML output pretty much what you would see if you were to look at a given
4730 entry in the citation dialog.
4731 The formatting can be customized in your layout file or, preferably, in
4737 manual for the details.
4740 \begin_layout Standard
4741 The main defect at present is that cross-referenced information is printed
4742 with every entry with which it is associated.
4743 So you can see things like this:
4748 \begin_inset Quotes eld
4751 Context and Logical Form
4752 \begin_inset Quotes erd
4757 Language in Context: Selected Essays
4759 (Oxford: Oxford University Press, 2007), pp.
4765 \begin_inset Quotes eld
4768 Semantics in Context
4769 \begin_inset Quotes erd
4774 Language in Context: Selected Essays
4776 (Oxford: Oxford University Press, 2007), pp.
4780 \begin_layout Standard
4781 This should be fixed before long.
4784 \begin_layout Standard
4785 There is no support at present for sectioned bibliographies.
4786 If you have multiple bibliographies, then LyX will print the same bibliography
4790 \begin_layout Section
4794 \begin_layout Standard
4795 LyX will happily export indexes as XHTML, but with certain limitations at
4799 \begin_layout Standard
4800 Index export will be most reliable when you do not attempt to use the fancy
4801 constructs that are described in the section on indexes in the
4809 \begin_layout Plain Layout
4810 The main issue here is that LyX itself does not really handle these.
4811 It just lets you enter what you would have to enter in raw LaTeX.
4816 We'll describe how they are handled using the subsection headings from
4820 \begin_layout Itemize
4821 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4822 these, but the entries must be separated by
4823 \begin_inset Quotes eld
4827 \begin_inset Quotes erd
4830 , that is, there must be spaces around the exclamation point.
4831 This is because it is otherwise too difficult to check for escaped exclamation
4832 points, ones in math, and so forth.
4835 \begin_layout Itemize
4836 Page Ranges: There is no support at all for page ranges, since these make
4837 no sense with XHMTL.
4838 Instead, you will just get two index entries, one at either end.
4841 \begin_layout Itemize
4842 Cross-referencing: There is no support for cross-referencing.
4843 If LyX finds an entry containing the
4844 \begin_inset Quotes eld
4847 |see\SpecialChar \ldots{}
4849 \begin_inset Quotes erd
4852 construct, it is just dropped, and the rest is treated as an ordinary index
4856 \begin_layout Itemize
4857 Index Entry Order: LyX does support attempts to fix the sorting order.
4858 It will take what is before the first `@' it finds and use that for sorting,
4859 taking what follows the first `@' to be the actual entry.
4860 At present, LyX does not check for escaped `@', so do not try to index
4864 \begin_layout Itemize
4865 Index Entry Layout: You can format entries by using the text style dialog,
4866 or by using any other method available within LyX itself.
4867 There is no support for constructs like:
4868 \begin_inset Quotes eld
4872 \begin_inset Quotes erd
4876 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4877 and everything that follows it.
4880 \begin_layout Itemize
4881 Multiple Indexes: There is no support for multiple indexes.
4882 Rather, all index entries will be printed as one large index.
4883 To avoid our printing several versions of the index, we print only the
4884 main index, so make sure you have one.
4887 \begin_layout Section
4888 Nomenclature and Glossary
4891 \begin_layout Standard
4892 There is at present no support for glossaries.
4895 \begin_layout Chapter
4899 \begin_layout Section
4903 \begin_layout Standard
4904 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4905 and retrieve information about the LyX internal state.
4906 This is only intended for advanced users, but they should find it useful.
4907 It is by writing to the LyX server, for example, that bibliography managers,
4908 such as JabRef, are able to
4909 \begin_inset Quotes eld
4913 \begin_inset Quotes erd
4919 \begin_layout Section
4920 Starting the LyX Server
4923 \begin_layout Standard
4924 The LyX server works through the use of a pair of named pipes.
4925 These are usually located in
4926 \begin_inset Flex Code
4929 \begin_layout Plain Layout
4935 , (except on Windows, where
4939 named pipes are special objects located in
4940 \begin_inset Flex Code
4943 \begin_layout Plain Layout
4955 ) and have the names
4956 \begin_inset Quotes eld
4960 \begin_inset Flex Code
4963 \begin_layout Plain Layout
4970 \begin_inset Quotes erd
4974 \begin_inset Quotes eld
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4988 \begin_inset Quotes erd
4992 External programs write into
4993 \begin_inset Flex Code
4996 \begin_layout Plain Layout
5002 and read back data from
5003 \begin_inset Flex Code
5006 \begin_layout Plain Layout
5013 The stem of the pipe names can be defined in the
5014 \begin_inset Flex MenuItem
5017 \begin_layout Plain Layout
5018 Tools\SpecialChar \menuseparator
5025 \begin_inset Flex Code
5028 \begin_layout Plain Layout
5029 "/home/myhome/lyxpipe"
5035 \begin_inset Flex Code
5038 \begin_layout Plain Layout
5057 configure this manually in order for the server to start.
5060 \begin_layout Standard
5062 \begin_inset Flex Code
5065 \begin_layout Plain Layout
5072 \begin_inset Flex Code
5075 \begin_layout Plain Layout
5081 ' to create the pipes.
5082 If one of the pipes already exists, LyX will assume that another LyX process
5083 is already running and will not start the server.
5084 On POSIX (Unix like) systems, if for some other reason, an unused
5085 \begin_inset Quotes eld
5089 \begin_inset Quotes erd
5092 pipe is left in existence when LyX closes, then LyX will try to delete
5094 If this fails for some reason, you will need to delete the pipes manually
5095 and then restart LyX.
5096 On Windows, pipes are deleted by the OS on program termination or crash,
5098 \begin_inset Quotes eld
5102 \begin_inset Quotes erd
5105 pipes should not be possible.
5108 \begin_layout Standard
5109 To have several LyX processes with servers at the same time, you have to
5110 use different configurations, perhaps by using separate user directories,
5112 \begin_inset Flex Code
5115 \begin_layout Plain Layout
5121 file, for each process.
5124 \begin_layout Standard
5125 If you are developing a client program, you might find it useful to enable
5126 debugging information from the LyX server.
5127 Do this by starting LyX as
5128 \begin_inset Flex Code
5131 \begin_layout Plain Layout
5140 \begin_layout Standard
5141 You can find a complete example client written in C in the source distribution
5143 \begin_inset Flex Code
5146 \begin_layout Plain Layout
5147 development/lyxserver/server_monitor.c
5155 \begin_layout Standard
5156 Another useful tool is command-line based client you will find in
5157 \begin_inset Flex Code
5160 \begin_layout Plain Layout
5161 src/client/lyxclient
5169 \begin_layout Section
5170 Normal communication
5173 \begin_layout Standard
5174 To issue a LyX call, the client writes a line of ASCII text into the input
5176 This line has the following format:
5193 \begin_layout Description
5194 clientname is a name that the client can choose arbitrarily.
5195 Its only use is that LyX will echo it if it sends an answer—so a client
5196 can dispatch results from different requesters.
5199 \begin_layout Description
5200 function is the function you want LyX to perform.
5201 It is the same as the commands you'd use in the minibuffer.
5204 \begin_layout Description
5205 argument is an optional argument which is meaningful only to some functions
5207 \begin_inset Quotes eld
5211 \begin_inset Quotes erd
5214 LFUN will insert the argument as text at the cursor position).
5217 \begin_layout Standard
5218 The answer from LyX will arrive in the output pipe and be of the form
5235 \begin_layout Standard
5244 are just echoed from the command request, while
5248 is more or less useful information filled according to how the command
5249 execution worked out.
5250 Some commands, such as
5251 \begin_inset Quotes eld
5255 \begin_inset Quotes erd
5258 , will return information about the internal state of LyX, while other will
5259 return an empty data-response.
5260 This means that the command execution went fine.
5263 \begin_layout Standard
5264 In case of errors, the response from LyX will have this form
5281 \begin_layout Standard
5286 should contain an explanation of why the command failed.
5289 \begin_layout Standard
5293 \begin_layout LyX-Code
5294 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5295 \begin_inset Newline newline
5298 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5299 \begin_inset Newline newline
5302 read a <~/.lyxpipe.out
5303 \begin_inset Newline newline
5309 \begin_layout Section
5313 \begin_layout Standard
5314 LyX can notify clients of events going on asynchronously.
5315 Currently it will only do this if the user binds a key sequence with the
5317 \begin_inset Quotes eld
5321 \begin_inset Quotes erd
5325 The format of the string LyX sends is as follows:
5329 \begin_inset Flex Code
5332 \begin_layout Plain Layout
5343 \begin_layout Standard
5348 is the printed representation of the key sequence that was actually typed
5352 \begin_layout Standard
5353 This mechanism can be used to extend LyX's command set and implement macros.
5354 Bind some key sequence to
5355 \begin_inset Quotes eld
5359 \begin_inset Quotes erd
5363 Then start a client that listens on the output pipe, dispatches the command
5364 according to the sequence, and starts a function that may use LyX calls
5365 and LyX requests to issue a command or a series of commands to LyX.
5368 \begin_layout Section
5369 The simple LyX Server Protocol
5372 \begin_layout Standard
5373 LyX implements a simple protocol that can be used for session management.
5374 All messages are of the form
5387 \begin_layout Standard
5393 \begin_inset Quotes eld
5397 \begin_inset Quotes erd
5401 \begin_inset Quotes eld
5405 \begin_inset Quotes erd
5410 \begin_inset Quotes eld
5414 \begin_inset Quotes erd
5417 is received from a client, LyX will report back to inform the client that
5418 it's listening to it's messages, while
5419 \begin_inset Quotes eld
5423 \begin_inset Quotes erd
5426 sent from LyX will inform clients that LyX is closing.
5429 \begin_layout Section
5430 Reverse DVI/PDF search
5433 \begin_layout Standard
5434 Some DVI/PDF viewers
5438 \begin_layout Plain Layout
5439 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5440 Skim on Mac OSX and SumatraPDF on Windows.
5449 facility (also called
5454 This means that you can tell LyX to put the cursor to a specific line in
5455 the document by clicking at the respective position in the DVI/PDF output.
5456 To achieve this, the viewer must be able to communicate with LyX.
5457 This is done via the LyX server either by using the named pipe (
5461 ), or the UNIX domain socket (
5465 ) that LyX creates in its temporary directory (this is the way the
5466 \begin_inset Flex Code
5469 \begin_layout Plain Layout
5475 program communicates with LyX).
5476 In some cases, you need a helper script that mediates between the viewer
5477 and LyX, in others, the viewer can communicate with LyX directly.
5478 This depends on the selected viewer and on your operating system.
5479 The same applies to the way viewers need to be configured and the way the
5480 reverse search is actually performed.
5481 In what follows, we will thus describe how to setup reverse search for
5483 Before we turn to this, though, we will explain what needs to be done generally
5484 to enable reverse search in the DVI/PDF output.
5487 \begin_layout Subsection
5488 \begin_inset CommandInset label
5490 name "sub:rev-search"
5494 Automatical enabling
5497 \begin_layout Standard
5498 In most cases LyX will do the work for you by enabling
5499 \begin_inset Flex MenuItem
5502 \begin_layout Plain Layout
5503 Document\SpecialChar \menuseparator
5504 Output\SpecialChar \menuseparator
5511 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5512 srcltx package (for DVI) respectively.
5513 This option can be easily reached also on
5514 \begin_inset Flex Code
5517 \begin_layout Plain Layout
5526 \begin_layout Standard
5527 Plase note that including
5528 \begin_inset Flex Code
5531 \begin_layout Plain Layout
5538 \begin_inset Flex Code
5541 \begin_layout Plain Layout
5547 sometimes have an impact on the typeset and you should switch them off
5548 for the final typesets.
5551 \begin_layout Standard
5552 You can also define custom macro in preferences and in case you need some
5553 special tweaks read the next section about manual enabling.
5557 \begin_layout Subsection
5561 \begin_layout Standard
5562 LaTeX provides several different methods for reverse search.
5563 Some are built-in in the
5564 \begin_inset Flex Code
5567 \begin_layout Plain Layout
5573 program, some are provided by external packages.
5574 Your choice depends on whether your LaTeX distribution already provides
5575 a given method (the built-in methods are rather new) and whether your viewer
5577 The available methods are described in the following.
5580 \begin_layout Subsubsection*
5581 Built-in DVI-search via src-specials (DVI only)
5584 \begin_layout Standard
5585 This method provides the DVI file with the necessary information for reverse
5587 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5588 distribution should include it), and it works reliably.
5589 To enable it, change the
5590 \begin_inset Flex MenuItem
5593 \begin_layout Plain Layout
5598 \begin_layout Plain Layout
5611 \begin_inset Flex MenuItem
5614 \begin_layout Plain Layout
5619 \begin_layout Plain Layout
5626 eX (plain)->DraftDVI
5632 \begin_inset Flex MenuItem
5635 \begin_layout Plain Layout
5636 Preferences\SpecialChar \menuseparator
5637 File Handling\SpecialChar \menuseparator
5644 \begin_inset Flex Code
5647 \begin_layout Plain Layout
5648 latex -src-specials $$i
5654 If this doesn't work, check if your TeX engine needs different options
5655 (the syntax might differ in some distributions).
5658 \begin_layout Subsubsection*
5659 External Packages (PDFSync and scrltx)
5662 \begin_layout Standard
5671 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5673 In order to enable it, load the packages in the LyX preamble:
5676 \begin_layout Itemize
5677 \begin_inset Flex Code
5680 \begin_layout Plain Layout
5688 for reverse PDF search,
5691 \begin_layout Itemize
5693 \begin_inset Flex Code
5696 \begin_layout Plain Layout
5699 usepackage[active]{srcltx}
5704 for reverse DVI search.
5707 \begin_layout Standard
5708 If you want to be able to perform both DVI and PDF reverse searches, you
5709 can also insert in the preamble the following lines
5712 \begin_layout LyX-Code
5716 \begin_inset Newline newline
5722 \begin_inset Newline newline
5728 \begin_inset Newline newline
5734 \begin_inset Newline newline
5739 usepackage[active]{srcltx}
5740 \begin_inset Newline newline
5748 \begin_layout Standard
5749 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5750 right package will be used.
5753 \begin_layout Standard
5754 Note that PDFSync might affect the output layout of your document.
5755 It is therefore advised to disable PDFsync for final documents.
5758 \begin_layout Subsubsection*
5759 Built-in reverse search via SyncTeX (DVI and PDF)
5762 \begin_layout Standard
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5773 have built-in support for both PDF and DVI reverse search.
5778 facility is basically the result of the integration of the PDFSync package
5779 to the pdftex program and its merge with the
5784 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5786 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5787 already provide SyncTeX support.
5790 \begin_layout Standard
5791 To enable SyncTeX for DVI output, change the
5792 \begin_inset Flex MenuItem
5795 \begin_layout Plain Layout
5800 \begin_layout Plain Layout
5813 \begin_inset Flex MenuItem
5816 \begin_layout Plain Layout
5821 \begin_layout Plain Layout
5828 eX (plain) -> DraftDVI
5834 \begin_inset Flex MenuItem
5837 \begin_layout Plain Layout
5838 Preferences\SpecialChar \menuseparator
5839 File Handling\SpecialChar \menuseparator
5846 \begin_inset Flex Code
5849 \begin_layout Plain Layout
5850 latex -synctex=1 $$i
5855 , and for PDF output, change the
5856 \begin_inset Flex MenuItem
5859 \begin_layout Plain Layout
5864 \begin_layout Plain Layout
5871 eX (pdflatex) -> PDF (pdflatex)
5877 \begin_inset Flex Code
5880 \begin_layout Plain Layout
5881 pdflatex -synctex=1 $$i
5887 Check the documentation of your viewer whether the viewer needs to be configure
5888 d for the use with SyncTeX.
5892 \begin_layout Plain Layout
5894 \begin_inset Flex Code
5897 \begin_layout Plain Layout
5903 option enables gzip compression.
5904 If your viewer does not support it, you should instead use
5905 \begin_inset Flex Code
5908 \begin_layout Plain Layout
5922 \begin_layout Subsection
5923 Configuring and using specific viewers
5926 \begin_layout Subsubsection*
5927 Xdvi (all platforms)
5930 \begin_layout Standard
5932 \begin_inset Flex Code
5935 \begin_layout Plain Layout
5941 , you don't need to do anything else for performing a reverse DVI search,
5942 as LyX already provides the necessary hooks for automatically using the
5944 \begin_inset Flex Code
5947 \begin_layout Plain Layout
5954 Just setup your document as described above (reverse search is triggered
5955 by Ctrl-click or Alt-click on Mac OSX, respectively).
5958 \begin_layout Standard
5959 However, if for whatever reason you want to use the named pipe instead of
5960 the socket for communicating with LyX, simply change the DVI viewer in
5962 \begin_inset Flex MenuItem
5965 \begin_layout Plain Layout
5966 Preferences\SpecialChar \menuseparator
5967 File Handling\SpecialChar \menuseparator
5977 \begin_layout Plain Layout
5978 On Mac OSX you have to use
5979 \begin_inset Flex Code
5982 \begin_layout Plain Layout
5983 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5994 \begin_inset Flex Code
5997 \begin_layout Plain Layout
5998 xdvi -editor 'lyxeditor.sh %f %l'
6004 \begin_inset Flex Code
6007 \begin_layout Plain Layout
6013 is a suitable script.
6014 For example, a minimal shell script is the following one:
6017 \begin_layout LyX-Code
6019 \begin_inset Newline newline
6022 LYXPIPE="/path/to/lyxpipe"
6023 \begin_inset Newline newline
6026 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6027 \begin_inset Newline newline
6030 echo "$COMMAND" > "${LYXPIPE}".in || exit
6031 \begin_inset Newline newline
6034 read < "${LYXPIPE}".out || exit
6037 \begin_layout Standard
6039 \begin_inset Flex Code
6042 \begin_layout Plain Layout
6052 \begin_layout Plain Layout
6059 XServer pipe path specified in
6060 \begin_inset Flex MenuItem
6063 \begin_layout Plain Layout
6064 Preferences\SpecialChar \menuseparator
6074 \begin_layout Plain Layout
6076 \begin_inset Flex Code
6079 \begin_layout Plain Layout
6085 folder of a source distribution you can find a
6086 \begin_inset Flex Code
6089 \begin_layout Plain Layout
6095 script which is able to locate the
6099 based on your preferences.
6107 \begin_layout Subsubsection*
6111 \begin_layout Standard
6113 \begin_inset Flex Code
6116 \begin_layout Plain Layout
6117 /Applications/MacDviX_Folder/calleditor.script
6122 , add the following lines:
6125 \begin_layout LyX-Code
6130 \begin_layout Plain Layout
6137 X.app/Contents/MacOS/lyxeditor "$2" $1
6138 \begin_inset Newline newline
6144 \begin_layout Standard
6145 Modify the lines accordingly if you install LyX somewhere else than in the
6146 Applications folder.
6149 \begin_layout Standard
6150 Reverse search is triggered by Alt-click (OPTION-click).
6153 \begin_layout Subsubsection*
6157 \begin_layout Standard
6159 \begin_inset Flex Code
6162 \begin_layout Plain Layout
6163 open -a Skim.app $$i
6168 to the viewer setting in
6169 \begin_inset Flex MenuItem
6172 \begin_layout Plain Layout
6173 Preferences\SpecialChar \menuseparator
6174 File Handling\SpecialChar \menuseparator
6175 File formats\SpecialChar \menuseparator
6182 \begin_inset Flex MenuItem
6185 \begin_layout Plain Layout
6186 Skim\SpecialChar \menuseparator
6187 Preferences\SpecialChar \menuseparator
6197 \begin_layout Plain Layout
6207 \begin_layout Standard
6208 Reverse search is triggered by COMMAND-SHIFT-click
6211 \begin_layout Subsubsection*
6215 \begin_layout Standard
6217 \begin_inset Flex MenuItem
6220 \begin_layout Plain Layout
6221 Settings\SpecialChar \menuseparator
6222 Configure Okular\SpecialChar \ldots{}
6223 \SpecialChar \menuseparator
6230 \begin_inset Quotes eld
6234 \begin_inset Quotes erd
6238 \begin_inset Flex Code
6241 \begin_layout Plain Layout
6250 \begin_layout Standard
6251 Reverse search is triggered by SHIFT-click.
6254 \begin_layout Subsubsection*
6258 \begin_layout Standard
6259 Launch yap, choose its
6260 \begin_inset Flex MenuItem
6263 \begin_layout Plain Layout
6264 View\SpecialChar \menuseparator
6271 \begin_inset Quotes eld
6275 \begin_inset Quotes erd
6280 \begin_inset Quotes eld
6283 New\SpecialChar \ldots{}
6285 \begin_inset Quotes erd
6288 button and, in the window that opens, enter
6289 \begin_inset Quotes eld
6293 \begin_inset Quotes erd
6296 (or any other name you like) in the
6297 \begin_inset Quotes eld
6301 \begin_inset Quotes erd
6305 Now click on the button labeled
6306 \begin_inset Quotes eld
6309 \SpecialChar \ldots{}
6311 \begin_inset Quotes erd
6314 to open a file dialog and navigate to the directory containing the batch
6316 \begin_inset Flex Code
6319 \begin_layout Plain Layout
6327 \begin_inset Flex Code
6330 \begin_layout Plain Layout
6336 and then specify the program arguments as
6337 \begin_inset Flex Code
6340 \begin_layout Plain Layout
6348 \begin_inset Flex Code
6351 \begin_layout Plain Layout
6357 wrapper is used for communicating with LyX through the
6364 \begin_layout LyX-Code
6366 \begin_inset Newline newline
6369 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6378 \begin_inset Newline newline
6392 \begin_layout Standard
6393 Make sure that the LyXServer pipe path you specified in LyX is
6394 \begin_inset Flex Code
6397 \begin_layout Plain Layout
6411 , otherwise change the
6412 \begin_inset Flex Code
6415 \begin_layout Plain Layout
6421 wrapper accordingly.
6424 \begin_layout Standard
6425 In yap, reverse search is triggered by double-click.
6428 \begin_layout Subsubsection*
6429 SumatraPDF (Windows)
6432 \begin_layout Standard
6433 In order to use SumatraPDF for inverse search, enter
6434 \begin_inset Flex Code
6437 \begin_layout Plain Layout
6438 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6443 in the viewer setting in
6444 \begin_inset Flex MenuItem
6447 \begin_layout Plain Layout
6448 Preferences\SpecialChar \menuseparator
6449 File Handling\SpecialChar \menuseparator
6450 File formats\SpecialChar \menuseparator
6457 \begin_inset Flex Code
6460 \begin_layout Plain Layout
6466 is the previous wrapper.
6467 If SumatraPDF.exe is not in your command PATH, use its full file name.
6470 \begin_layout Standard
6471 Reverse search is triggered by double-click.
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6479 First of all, make sure that yap is your default DVI viewer in the Windows
6480 environment, then launch it, choose its
6481 \begin_inset Flex MenuItem
6484 \begin_layout Plain Layout
6485 View\SpecialChar \menuseparator
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6501 \begin_inset Quotes eld
6504 New\SpecialChar \ldots{}
6506 \begin_inset Quotes erd
6509 button and, in the window that opens, enter
6510 \begin_inset Quotes eld
6514 \begin_inset Quotes erd
6517 (or any other name you like) in the
6518 \begin_inset Quotes eld
6522 \begin_inset Quotes erd
6526 Now click on the button labeled
6527 \begin_inset Quotes eld
6530 \SpecialChar \ldots{}
6532 \begin_inset Quotes erd
6535 to open a file dialog and navigate to the directory containing the
6536 \begin_inset Flex Code
6539 \begin_layout Plain Layout
6545 program (which is installed by default on Cygwin along with the LyX executable).
6547 \begin_inset Flex Code
6550 \begin_layout Plain Layout
6556 and then specify the program arguments as
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6567 In this way, you will be using the
6571 for communicating with LyX.
6572 If, for whatever reason, you want to use the
6577 \begin_inset Flex Code
6580 \begin_layout Plain Layout
6586 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6589 \begin_layout Standard
6590 In yap, reverse search is triggered by double-click.
6593 \begin_layout Subsubsection*
6597 \begin_layout Standard
6598 In order to use SumatraPDF for inverse search, enter
6599 \begin_inset Flex Code
6602 \begin_layout Plain Layout
6608 in the viewer setting in
6609 \begin_inset Flex MenuItem
6612 \begin_layout Plain Layout
6613 Preferences\SpecialChar \menuseparator
6614 File Handling\SpecialChar \menuseparator
6615 File formats\SpecialChar \menuseparator
6622 \begin_inset Flex Code
6625 \begin_layout Plain Layout
6631 is the following script (to be placed in your command PATH,
6632 \begin_inset Flex Code
6635 \begin_layout Plain Layout
6641 being the best choice):
6644 \begin_layout LyX-Code
6646 \begin_inset Newline newline
6650 \begin_inset Newline newline
6653 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6656 \begin_layout Standard
6657 This wrapper script is needed because SumatraPDF is a native Windows application
6658 and does not understand the posix paths used by the Cygwin version of LyX.
6659 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6662 \begin_inset Flex Code
6665 \begin_layout Plain Layout
6671 enables communication via the
6677 \begin_inset Flex Code
6680 \begin_layout Plain Layout
6686 option if you want to use the
6690 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6693 \begin_layout Standard
6694 Reverse search is triggered by double-click.
6697 \begin_layout Section
6701 \begin_layout Standard
6702 To make forward search possible you need to provide generated output PDF/DVI
6703 file with additional information about TeX sources.
6704 This can be done via the methods described in the section
6705 \begin_inset CommandInset ref
6707 reference "sub:rev-search"
6714 \begin_layout Standard
6715 Secondly you need to configure LyX for using your viewers in
6716 \begin_inset Flex MenuItem
6719 \begin_layout Plain Layout
6720 Preferences\SpecialChar \menuseparator
6721 Output\SpecialChar \menuseparator
6728 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6733 \begin_layout Plain Layout
6734 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6741 Some other viewers allow at least reloading and positioning to particular
6742 page of the file --- Evince or xpdf --- for these cases you can use external
6744 Please study the prepared examples in the Preferences dialog.
6747 \begin_layout Chapter
6748 Special Document Classes
6751 \begin_layout Section
6755 \begin_layout Standard
6761 \begin_layout Subsection
6765 \begin_layout Standard
6766 This section describes how LyX can be used to write articles for submission
6767 to the scientific journal
6769 Astronomy and Astrophysics
6771 (www.edpsciences.fr/aa/
6772 \begin_inset Flex URL
6775 \begin_layout Plain Layout
6777 http://www.edpsciences.fr/aa/
6782 ) using Version 5.01 of the document class
6787 This package can be downloaded from the ftp site
6790 \begin_layout Standard
6791 \begin_inset VSpace medskip
6797 \begin_layout Standard
6799 \begin_inset Flex URL
6802 \begin_layout Plain Layout
6804 ftp://ftp.edpsciences.org/pub/aa/readme.html
6812 \begin_layout Standard
6813 \begin_inset VSpace medskip
6819 \begin_layout Standard
6820 A manual comes together with that package, and this text is not meant to
6821 replace the original manual but is merely a short guide in how to realize
6822 the correct form of your paper.
6826 \begin_layout Standard
6827 Please note that the publisher of the journal was changed from Springer
6828 to EDP Sciences starting January 1, 2001.
6829 That change involved also some slight changes to the style files, namely
6830 the removal of the thesaurus command.
6831 The LyX class aa supports the newest version of these style files, V 5.01.
6832 If you have an older version installed, please upgrade.
6833 For compatibility, the old (version 4) layout has been kept as
6838 Please refer to the comments in
6840 LyXDir/layouts/aapaper.layout
6845 \begin_layout Subsection
6849 \begin_layout Standard
6850 It is recommended you start from the example template distributed with LyX.
6851 If you are not using a template, note the following settings:
6854 \begin_layout Itemize
6861 Document\SpecialChar \menuseparator
6864 dialog (OK, that one was obvious).
6867 \begin_layout Itemize
6868 Don't change the option
6871 \begin_inset space ~
6881 The whole layout is done by the macros, you shouldn't change anything.
6884 \begin_layout Subsection
6888 \begin_layout Standard
6889 First thing to enter is the header information.
6890 It consists of seven entries, of which some are optional.
6894 \begin_layout Itemize
6902 \begin_layout Itemize
6910 \begin_layout Itemize
6918 \begin_layout Itemize
6926 \begin_layout Itemize
6931 : [optional] if more than one author: whom to contact for offprint requests.
6934 \begin_layout Itemize
6939 : [optional] mail address for contacts.
6942 \begin_layout Itemize
6950 Received: <date>; Accepted <date>
6953 \begin_layout Standard
6954 There is no need to issue the
6960 command, this is done automatically by LyX when the header is finished.
6961 Although the order of the single header entries doesn't matter it is advised
6962 to keep the above sequence, just to get the best optics and meets the layout
6963 of the real document.
6966 \begin_layout Standard
6967 If you want to place footnotes in the header block, e.
6968 \begin_inset space \thinspace{}
6972 \begin_inset space \space{}
6975 to state your present address, just use the standard footnote via the menu
6978 Insert\SpecialChar \menuseparator
6982 LyX will automagically use the term
6991 \begin_layout Standard
6992 In addition to these topics, the macros use three additional LaTeX commands
6993 that have no counterpart in LyX:
6996 \begin_layout Itemize
7003 to separate different names for more than one author and institute, respectivel
7007 \begin_layout Itemize
7014 to mark corresponding author/institute pairs.
7015 The institutes are numbered sequentially as they appear in the
7019 field, so you have to put a marker to each author.
7022 \begin_layout Itemize
7029 to supply an email address for fast contact.
7032 \begin_layout Standard
7033 In all cases, the appropriate command has to be entered in LyX and marked
7039 \begin_layout Subsection
7043 \begin_layout Standard
7044 The abstract should immediately follow the header block.
7045 With version 5 the abstract environment was changed to a command, and there
7046 is now a resctriction to only one paragraph.
7047 In addition, it should contain an entry with the keywords.
7048 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7055 by hand and mark it as LaTeX code.
7056 Refer to the example paper.
7059 \begin_layout Subsection
7060 Supported environments
7063 \begin_layout Standard
7064 The A&A paper layout supports the following environments for structuring
7068 \begin_layout Itemize
7074 \begin_layout Itemize
7080 \begin_layout Itemize
7086 \begin_layout Itemize
7092 \begin_layout Itemize
7098 \begin_layout Itemize
7104 \begin_layout Itemize
7110 \begin_layout Itemize
7116 \begin_layout Itemize
7122 \begin_layout Itemize
7128 \begin_layout Itemize
7134 \begin_layout Itemize
7140 \begin_layout Subsection
7141 Commands not supported by LyX
7144 \begin_layout Standard
7145 Some commands are not yet supported by the
7150 Some have already been mentioned.
7151 For the sake of completeness, they are listed all together here:
7154 \begin_layout Itemize
7162 \begin_layout Itemize
7170 \begin_layout Itemize
7178 \begin_layout Itemize
7186 \begin_layout Itemize
7194 \begin_layout Itemize
7202 \begin_layout Itemize
7210 \begin_layout Itemize
7218 \begin_layout Standard
7219 If you want to use any of these commands, you have to enter them yourself.
7222 Do not forget to mark them as LaTeX code!
7225 \begin_layout Subsection
7226 Figure and Table Floats
7229 \begin_layout Standard
7230 LyX provides support for the necessary float environments
7232 figure, figure*, table
7238 , therefore we won't tell much about it here.
7242 \begin_inset space ~
7248 Just remember that tables should be left-aligned.
7249 For that, select the table and change the alignment in
7251 Edit\SpecialChar \menuseparator
7253 \begin_inset space ~
7259 \begin_layout Standard
7260 There is only one special thing: the figures with caption besides the figure.
7261 To create such a figure, you have to do the following:
7264 \begin_layout Enumerate
7265 Create a wide figure float:
7267 Insert\SpecialChar \menuseparator
7268 Float\SpecialChar \menuseparator
7271 , then right click in the figure and select
7277 \begin_inset space ~
7285 \begin_layout Enumerate
7286 Enter your caption text.
7289 \begin_layout Enumerate
7294 to move the cursor above the caption.
7297 \begin_layout Enumerate
7301 \begin_layout Enumerate
7302 Position the cursor behind the figure and insert a horizontal fill:
7304 Insert\SpecialChar \menuseparator
7306 \begin_inset space ~
7309 Character\SpecialChar \menuseparator
7311 \begin_inset space ~
7319 \begin_layout Enumerate
7320 Switch to LaTeX mode:
7323 \begin_inset space ~
7331 \begin_layout Enumerate
7341 Do not close the brace!
7344 \begin_layout Enumerate
7345 Position the cursor behind the caption text, switch to LaTeX mode and insert
7349 \begin_inset space ~
7361 \begin_layout Standard
7362 Also, refer to the figures in the example paper.
7365 \begin_layout Subsection
7369 \begin_layout Standard
7370 For submission, the paper has to be formated in a special double-spacing
7372 For this purpose, you have to give the option
7376 to the documentclass.
7377 This must be done using the extra class options field in the
7379 Document\SpecialChar \menuseparator
7383 Just enter the string
7390 \begin_layout Subsection
7394 \begin_layout Standard
7399 directory contains an example paper written with LyX.
7400 It is the example paper from the original macro package, translated to
7402 Use it for inspiration, and compare the original LaTeX code with LyX way
7406 \begin_layout Section
7410 \begin_layout Standard
7416 \begin_layout Subsection
7420 \begin_layout Standard
7421 AASTeX is a set of macros produced by the American Astronomical Society
7422 to facilitate electronic manuscript submission to the three journals they
7423 publish: the Astrophysical Journal (including the Letters and Supplement),
7424 the Astronomical Journal, and the Publications of the Astronomical Society
7426 LyX has proven to be an excellent tool for generating these documents,
7427 especially given its equation, citation, and figure handling capabilities.
7428 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7429 is the version described here, or higher.
7430 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7431 incompatible with LyX.
7432 The AASTeX package may be downloaded from the AASTeX Web site
7435 \begin_layout Standard
7436 \begin_inset VSpace medskip
7442 \begin_layout Standard
7444 \begin_inset Flex URL
7447 \begin_layout Plain Layout
7449 http://www.journals.uchicago.edu/AAS/AASTeX
7457 \begin_layout Standard
7458 \begin_inset VSpace medskip
7464 \begin_layout Standard
7465 A complete user guide is contained in that package and you should familiarize
7466 yourself with it thoroughly before embarking on writing a paper in LyX.
7467 LyX will not reduce the need to figure out all the AASTeX commands, it
7468 will only reduce the drudgery of typing everything in.
7469 It is your responsibility to ensure that the final exported LaTeX document
7470 conforms completely to the requirements of the journal to which you are
7471 submitting your paper.
7474 \begin_layout Subsection
7475 Starting a New Paper
7478 \begin_layout Standard
7479 I strongly suggest that you start with the AASTeX template file.
7482 File\SpecialChar \menuseparator
7489 , enter the new file name, then choose the
7494 This will show the most common fields found in a manuscript.
7495 Simply overwrite the existing text (including the brackets,
7499 ) with the correct information.
7500 Many of the AASTeX commands and environments can be implemented directly
7501 in LyX, but some cannot: most noticeably
7513 , which should stick out like a sore thumb if you actually just opened the
7515 For commands such as these, the LaTeX code must be entered directly and
7517 Such commands are referred to as TeX code, or Evil Red Text.
7518 I tried to minimize the amount of TeX code needed in an AASTeX document,
7519 but there is still a bit more required than any of us would like.
7522 \begin_layout Subsection
7523 Finishing Your Paper
7526 \begin_layout Standard
7527 When the paper is finished to your satisfaction and previews/prints correctly,
7529 \begin_inset Quotes eld
7533 \begin_inset Quotes erd
7536 actions which need to be done before you submit it to the journals.
7540 \begin_layout Enumerate
7541 Export your paper as a LaTeX file (
7543 File\SpecialChar \menuseparator
7544 Export\SpecialChar \menuseparator
7551 \begin_layout Enumerate
7556 file with your favorite text editor
7560 \begin_layout Enumerate
7561 remove the comment lines before the
7570 \begin_layout Enumerate
7575 usepackage...{fontenc}
7577 line if it appears (usually just after
7592 \begin_layout Enumerate
7593 remove everything between (and including) the
7605 commands, except for any commands you specifically put into the LaTeX preamble
7606 (which should appear immediately after the
7607 \begin_inset Quotes eld
7610 User specified LaTeX commands
7611 \begin_inset Quotes erd
7622 \begin_layout Enumerate
7623 Run the resulting file through LaTeX to make sure it still processes correctly.
7626 \begin_layout Enumerate
7627 Reread the journal requirements to make sure your filenames and formats
7631 \begin_layout Enumerate
7635 \begin_layout Subsection
7636 Comments On Specific Commands
7639 \begin_layout Standard
7640 I will not describe the detailed usage of the individual AASTeX commands:
7641 the AASTeX User Guide (
7645 ) gives a good description of each.
7646 Thus it's probably easiest for me to go down the list as found in the guide
7647 and offer comments where necessary.
7648 So let's begin \SpecialChar \ldots{}
7652 \begin_layout Subsubsection
7653 Things that work as expected
7656 \begin_layout Standard
7660 \begin_layout Plain Layout
7672 \begin_layout Standard
7673 Because they work as you might expect, I simply list them and the section
7774 begin{thebibliography}
7782 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7783 graphicx figure commands (2.14.1),
7807 (2.15.4, amongst other places),
7834 \begin_layout Standard
7835 The following style options also work correctly:
7856 Simply put them in the
7862 Layout\SpecialChar \menuseparator
7868 \begin_layout Standard
7872 \begin_layout Plain Layout
7884 \begin_layout Subsubsection
7885 Things that work, but require more comment
7888 \begin_layout Standard
7889 The following items work, but require a little more discussion:
7892 \begin_layout Itemize
7893 These items are reserved for use by the journal editors, but you can put
7894 them into the LaTeX preamble if you feel compelled to do so:
7927 \begin_layout Itemize
7928 These items may be placed in the LaTeX preamble, and are included as blanks
7929 in the template file:
7950 \begin_layout Itemize
7957 (2.3) – can only be used
7958 \begin_inset Quotes eld
7962 \begin_inset Quotes erd
7965 , not in the middle of a paragraph.
7966 Use TeX code if you need to embed it.
7969 \begin_layout Itemize
7976 (2.3) – will have extra {} after it.
7977 This should not cause an error.
7980 \begin_layout Itemize
7987 (2.6) – can only be used
7988 \begin_inset Quotes eld
7992 \begin_inset Quotes erd
7995 , not in the middle of a paragraph.
7996 Use TeX code if you need to embed it.
7999 \begin_layout Itemize
8006 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8010 \begin_layout Itemize
8024 \begin_layout Itemize
8031 (2.9) – will have extra {} after it.
8032 This should not cause an error.
8035 \begin_layout Itemize
8042 (2.11) – will have extra {} after it.
8043 This should not cause an error.
8046 \begin_layout Itemize
8053 (2.14.2) – you can insert an optional filename argument by placing the cursor
8054 at the beginning of the text and selecting
8056 Insert\SpecialChar \menuseparator
8061 \begin_inset Quotes eld
8065 \begin_inset Quotes erd
8068 inserts an optional argument of the type needed by
8075 Hopefully it will be renamed someday.
8078 \begin_layout Itemize
8091 for the catalog ID optional parameter
8094 \begin_layout Itemize
8107 for the catalog ID optional parameter
8110 \begin_layout Subsubsection
8111 Things not implemented, use TeX code
8114 \begin_layout Standard
8118 \begin_layout Plain Layout
8130 \begin_layout Standard
8153 setcounter{equation}
8155 (2.12), Journal name abbreviations (2.13.4),
8191 (2.15.4, insert it as the first element in the lefthand cell after where
8193 Don't use any of LyX's rules in the table),
8205 (2.15.5), much of Misc (2.17, except
8256 \begin_layout Standard
8260 \begin_layout Plain Layout
8272 \begin_layout Subsubsection
8273 Things that cannot be implemented
8276 \begin_layout Standard
8277 \SpecialChar \ldots{}
8278 at least in any meaningful sort of way, so I suggest ignoring them.
8279 They are the references environment (2.13.3), and the deluxetable environment
8281 If you really, really need to use deluxetable, I suggest editing it in
8282 a separate file with a text editor, then using
8284 Insert\SpecialChar \menuseparator
8286 \begin_inset space ~
8291 to include it in your LyX document.
8296 file to see an example of this.
8299 \begin_layout Subsection
8300 FAQs, Tips, Tricks, and Other Ruminations
8303 \begin_layout Subsubsection
8304 Getting LyX and AASTeX to cooperate
8307 \begin_layout Standard
8308 It can be a bit tricky to get LyX to recognize a new layout and document
8310 When all else fails, do this:
8313 \begin_layout Enumerate
8314 Make certain that LaTeX can find AASTeX.
8315 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8316 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8323 \begin_layout Enumerate
8335 \begin_layout Enumerate
8338 Tools\SpecialChar \menuseparator
8341 in LyX, then restart LyX.
8344 \begin_layout Enumerate
8345 Open a regular new file, not from a template.
8346 Does AASTeX appear in the class list in
8348 Document\SpecialChar \menuseparator
8354 \begin_layout Standard
8355 If you get a warning from an existing AASTeX document about not being able
8356 to find the AASTeX layout or a message about
8357 \begin_inset Quotes eld
8360 You should not mix title layouts with normal ones
8361 \begin_inset Quotes erd
8364 , things haven't been installed correctly.
8367 \begin_layout Subsubsection
8368 LaTeX error processing a table
8371 \begin_layout Standard
8372 LyX, by default, attempts to center the table caption/title.
8373 This seems to produce a bad interaction in AASTeX so you should click somewhere
8374 in the caption/title, then select
8376 Edit\SpecialChar \menuseparator
8378 \begin_inset space ~
8392 This took care of it for me.
8395 \begin_layout Subsubsection
8399 \begin_layout Standard
8400 A couple of things: 1) I have noticed some funny spacing in the reference
8401 entries in the text.
8402 When you enter the bibliography item data, make sure their is
8406 space between the last author and the parenthesis setting off the year;
8410 \begin_inset space \thinspace{}
8414 \begin_inset space \space{}
8428 2) Entering the references at all is not obvious.
8429 The easiest thing is to start typing your first reference at the end of
8430 the document, then mark it as type
8435 That will put a small gray box in front of what you just typed.
8436 Click on the box to fill in the rest of the information.
8437 For new references, go to the end of an existing reference and press return.
8438 That will create a new line with its own box, etc.
8441 \begin_layout Subsubsection
8445 \begin_layout Standard
8446 Even though AASTeX provides its own figure commands (
8452 , for example), I much prefer LaTeX's standard figure commands (with the
8461 \begin_inset space ~
8464 commands as TeX code into a Figure Float box if you desire, but I never
8465 have much luck getting the layout right.
8466 With the standard graphics, LyX will insert a
8470 usepackage{graphicx}
8472 command into the LaTeX preamble and handle the figures in the standard
8473 LaTeX2e way, interspersing the figures in the text.
8474 I believe ApJ accepts figures exactly this way now; AJ might still use
8476 \begin_inset Quotes eld
8479 stack everything at the end
8480 \begin_inset Quotes erd
8486 \begin_layout Subsubsection
8487 Things I could have done, but didn't
8490 \begin_layout Standard
8492 \begin_inset Quotes eld
8496 \begin_inset Quotes erd
8499 things I could have implemented, but chose not to.
8500 For instance, I saw no point in double-spacing the text in the LyX window,
8501 even though it is double-spaced in the paper manuscript.
8502 Also, I chose not to make separate layouts for the preprint and preprint2
8504 Since I assume you will spend most of your time in the plain manuscript
8505 mode anyway, I decided not to chew up more disk space with this.
8509 \begin_layout Subsection
8513 \begin_layout Standard
8514 Your mileage may vary.
8515 I've now had papers published by both ApJ and AJ that have had 98% of the
8516 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8518 I have had no trouble with the submission process, and I'm sure the journals
8519 were never aware that there might be a difference.
8520 So, go forth and publish!
8523 \begin_layout Section
8527 \begin_layout Standard
8530 David Johnson; updated by Richard Heck
8533 \begin_layout Standard
8534 \begin_inset VSpace bigskip
8540 \begin_layout Standard
8542 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8543 papers to be submitted to American Mathematical Society publications.
8544 The layouts are not tailored to a specific journal, but easily can be.
8545 You should refer to the AMS documentation for specific instructions for
8546 each journal (usually it will entail only changing a single line in the
8548 That documentation is available on the Web at
8549 \begin_inset Flex URL
8552 \begin_layout Plain Layout
8560 \begin_inset Flex URL
8563 \begin_layout Plain Layout
8565 ftp://ftp.ams.org/pub/tex/amslatex/
8571 These layouts are appropriate, and useful, for any mathematical writing.
8575 \begin_layout Standard
8576 There are two basic AMS LaTeX layouts:
8579 \begin_layout Itemize
8580 amsart: The standard AMS article format.
8583 \begin_layout Itemize
8584 amsbook: the standard AMS book (really, monograph) format.
8588 \begin_layout Standard
8589 The layouts themselves contain only the minimum necessary to use the AMS
8591 They do not, in particular, contain any of the `theorem' environments used
8592 for setting theorems, lemmas, and the like.
8593 These are contained, instead, in the
8594 \begin_inset Flex Code
8597 \begin_layout Plain Layout
8603 module, which is loaded by default when when you select one of the AMS
8605 (It can also be used with other classes and can be removed, if you would
8606 rather use something else.) Less commonly used environments are in the
8607 \begin_inset Flex Code
8610 \begin_layout Plain Layout
8611 Theorems (AMS-Extended)
8616 module, which must be loaded manually.
8619 \begin_layout Standard
8620 By default, theorems and the like are numbered consecutively throughout
8621 the document, but this may be modified by loading the module
8622 \begin_inset Flex Code
8625 \begin_layout Plain Layout
8626 Theorems (Order by Section)
8631 or, if you are using
8632 \begin_inset Flex Code
8635 \begin_layout Plain Layout
8642 \begin_inset Flex Code
8645 \begin_layout Plain Layout
8646 Theorems (Order by Chapter)
8652 These will number the results as
8653 \begin_inset Formula $n.m$
8656 , where the first number refers to the section (or chapter) and the second
8657 refers to the total number of results so far in that section (or chapter).
8658 Many environments are also available unnumbered.
8659 These are indicated by an asterisk at the end.
8660 If you happen to want
8664 unnumbered results, the module
8665 \begin_inset Flex Code
8668 \begin_layout Plain Layout
8674 provides that option.
8677 \begin_layout Standard
8678 Note that these modules do not
8682 to be used with the AMS classes.
8683 It is perfectly possible to use the
8684 \begin_inset Flex Code
8687 \begin_layout Plain Layout
8693 module, and the others mentioned, with other classes, such as
8694 \begin_inset Flex Code
8697 \begin_layout Plain Layout
8704 \begin_inset Flex Code
8707 \begin_layout Plain Layout
8714 \begin_inset Flex Code
8717 \begin_layout Plain Layout
8726 \begin_layout Subsection
8727 What these layouts provide
8730 \begin_layout Standard
8731 There is a long list of included environments provided by these layouts.
8732 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8733 variety of `theorem' environments.
8734 However, the AMS recommends the environments that are available in LyX.
8738 \begin_layout Standard
8739 The following environments—as well as the standard environments, such as
8741 \begin_inset Flex Noun
8744 \begin_layout Plain Layout
8751 \begin_inset Flex Noun
8754 \begin_layout Plain Layout
8761 \begin_inset Flex Noun
8764 \begin_layout Plain Layout
8771 \begin_inset Flex Noun
8774 \begin_layout Plain Layout
8781 \begin_inset Flex Noun
8784 \begin_layout Plain Layout
8791 \begin_inset Flex Code
8794 \begin_layout Plain Layout
8801 \begin_inset Flex Code
8804 \begin_layout Plain Layout
8813 \begin_layout Description
8814 Address This should be the author's permanent address.
8817 \begin_layout Description
8819 \begin_inset space ~
8822 Address This should be the author's temporary address at the time of submission,
8823 if different from the Address.
8826 \begin_layout Description
8827 Email Author's e-mail address
8830 \begin_layout Description
8831 URL Author's Web address, if desired.
8834 \begin_layout Description
8835 Keywords Key words or phrases used to identify specific topics discussed
8839 \begin_layout Description
8840 Subjectclass These refer to the AMS Subject Classifications, published and
8843 Mathematical Reviews
8846 These are also available online at the AMS cites listed above.
8849 \begin_layout Description
8853 \begin_layout Description
8857 \begin_layout Description
8861 \begin_layout Standard
8862 The following environments are provided by both the
8863 \begin_inset Flex Code
8866 \begin_layout Plain Layout
8873 \begin_inset Flex Code
8876 \begin_layout Plain Layout
8882 modules, in the latter case in both starred (unnumbered) and unstarred
8883 (numbered) versions.
8884 These same environments are provided only in the starred versions by the
8886 \begin_inset Flex Code
8889 \begin_layout Plain Layout
8898 \begin_layout Theorem
8899 This is typically used for the statements of major results.
8903 \begin_layout Corollary*
8904 This is used for statements which follow fairly directly from previous statement
8906 Again, these can be major results.
8911 These are smaller results needed to prove other statements.
8914 \begin_layout Proposition
8915 These are less major results which (hopefully) add to the general theory
8919 \begin_layout Conjecture
8920 These are statements provided without justification, which the author does
8921 not know how to prove, but which seem to be true (to the author, at least).
8924 \begin_layout Definition*
8925 Guess what this is for.
8926 The font is different for this environment than for the previous ones.
8930 \begin_layout Example*
8931 Used for examples illustrating proven results.
8934 \begin_layout Problem
8935 It's not really known what this is for.
8936 You should figure it out.
8939 \begin_layout Exercise*
8940 Write a description for this one.
8943 \begin_layout Remark
8944 This environment is also a type of theorem, usually a lesser sort of observation.
8947 \begin_layout Claim*
8948 Often used in the course of giving a proof of a larger result.
8952 Generally, these are used to break up long arguments, using specific instances
8958 The numbering scheme for cases is on its own, not together with other numbered
8964 At the end of this environment, a QED symbol (usually a square, but it can
8965 vary with different styles) is placed.
8966 If you want to have other environments within this one—for example, Case
8967 environments—and have the QED symbol appear only after them, then the other
8968 environments need to be nested within the proof environment.
8971 Nesting Environments
8977 for information on nesting.
8980 \begin_layout Standard
8981 And these environments are provided by
8982 \begin_inset Flex Code
8985 \begin_layout Plain Layout
8986 Theorems (AMS-Extended)
8994 \begin_layout Criterion*
8995 A required condition.
8998 \begin_layout Algorithm*
8999 A general procedure to be used.
9002 \begin_layout Axiom*
9003 This is a property or statement taken as true within the system being discussed.
9006 \begin_layout Condition*
9007 Sometimes used to state a condition assumed within the present context of
9012 Similar to a Remark.
9015 \begin_layout Notation*
9016 Used for the explanation of, yes, notation.
9019 \begin_layout Summary
9020 Do we really need to tell you?
9023 \begin_layout Acknowledgement*
9027 \begin_layout Conclusion*
9028 Sometimes used at the end of a long train of argument.
9032 Used in a way similar to Proposition, though perhaps lower on the scale.
9035 \begin_layout Standard
9036 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9038 They need to be available on your system in order to use these environments.
9041 \begin_layout Section
9049 \begin_layout Standard
9055 \begin_layout Subsection
9059 \begin_layout Standard
9060 These are the layout files for some of the journals of the American Geophysical
9062 It is assumed that you have both the AGU's own class files and AGUplus
9063 installed (everything to be found at
9064 \begin_inset Flex URL
9067 \begin_layout Plain Layout
9069 ftp://ftp.agu.org/journals/latex/journals
9077 \begin_layout Subsection
9081 \begin_layout Standard
9091 They are still called this in the LyX GUI, though their LaTeX equivalents
9092 in the AGU classes are
9103 \begin_layout Standard
9104 Newly defined styles are
9141 These are mostly manuscript attributes and defined in the AGU class documentati
9145 \begin_layout Standard
9146 I suspect this is still badly incomplete.
9149 \begin_layout Subsection
9153 \begin_layout Standard
9170 \begin_layout Subsection
9174 \begin_layout Itemize
9177 Journal of Geophysical Research
9186 \begin_layout Standard
9187 Add your own, it isn't so hard! Look at the
9198 \begin_layout Subsection
9199 Bugs and things to remember
9202 \begin_layout Standard
9203 In order to use the new layouts, you must remember to do the following for
9207 \begin_layout Enumerate
9213 This can be done in the
9215 Layout\SpecialChar \menuseparator
9220 Document\SpecialChar \menuseparator
9224 (AGU articles are always in English, right? So
9231 \begin_layout Enumerate
9241 (Yes, this is a bug.)
9244 \begin_layout Enumerate
9245 Make sure you use the
9249 bibliography style, by entering
9253 into the second field of the BibTeX inset.
9254 None of the standard styles will do.
9257 \begin_layout Section
9261 \begin_layout Standard
9267 \begin_layout Subsection
9271 \begin_layout Standard
9272 Broadway is for writing plays.
9273 The format is more decorative than Hollywood, and much less standardized.
9274 This format should be suitable for workshops.
9277 \begin_layout Subsection
9281 \begin_layout Standard
9282 The same as in Hollywood.
9285 \begin_layout Subsection
9289 \begin_layout Standard
9294 names as labels then cross-reference the label to insert the name.
9295 The cross-reference dialog will show the current cast of characters.
9298 \begin_layout Subsection
9299 Paper size and Margins
9302 \begin_layout Standard
9303 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9306 \begin_layout Subsection
9310 \begin_layout Standard
9311 The following environments are available.
9312 You can use broadway.bind to get the bind keys shown at the right.
9315 \begin_layout Itemize
9319 \begin_inset Newline newline
9324 You should not have to use this, but it is here for anything that does not
9328 \begin_layout Itemize
9332 \begin_inset space \hfill{}
9336 \begin_inset Newline newline
9341 Used to describe stage setting and the action.
9342 First use of speaker names in all CAPs.
9345 \begin_layout Itemize
9349 \begin_inset space \hfill{}
9353 \begin_inset Newline newline
9358 Automatically numbered.
9359 On screen it will be arabic, but will print as Roman.
9362 \begin_layout Itemize
9366 \begin_inset space \hfill{}
9370 \begin_inset Newline newline
9380 It is just centered text.
9383 \begin_layout Itemize
9387 \begin_inset space \hfill{}
9391 \begin_inset Newline newline
9396 Not automatically numbered.
9397 You supply the number.
9398 This is because I couldn't figure out how.
9401 \begin_layout Itemize
9405 \begin_inset space \hfill{}
9409 \begin_inset Newline newline
9414 A special case of Narrative to describe the setting and action as the curtain
9418 \begin_layout Itemize
9422 \begin_inset space \hfill{}
9426 \begin_inset Newline newline
9431 The speaker's (actor's) title, centered in all CAPS.
9434 \begin_layout Itemize
9438 \begin_inset space \hfill{}
9442 \begin_inset Newline newline
9447 Instructions to the speaker.
9448 The parentheses are automatically inserted.
9449 The ( will appear on screen, but both will be in the printed play.
9450 This environment is only used within
9457 \begin_layout Itemize
9461 \begin_inset space \hfill{}
9465 \begin_inset Newline newline
9470 What the Speaker says.
9473 \begin_layout Itemize
9477 \begin_inset space \hfill{}
9481 \begin_inset Newline newline
9486 The curtain comes down.
9489 \begin_layout Itemize
9493 \begin_inset space \hfill{}
9499 \begin_layout Itemize
9503 \begin_inset space \hfill{}
9509 \begin_layout Itemize
9513 \begin_inset space \hfill{}
9519 \begin_layout Standard
9523 \begin_layout Section
9527 \begin_layout Standard
9532 can be used to type letters according to German conventions.
9533 A template file is included in
9535 .../lyx/share/templates
9537 for you to use as a starting point.
9540 \begin_layout Section
9548 \begin_layout Standard
9554 \begin_layout Subsection
9558 \begin_layout Standard
9559 This is the layout file for the European Geophysical Society journals.
9564 can be downloaded from the web site of the EGS under
9565 \begin_inset Flex URL
9568 \begin_layout Plain Layout
9578 \begin_layout Subsection
9582 \begin_layout Standard
9585 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9593 The current layout file is unfortunately very unmodular and would benefit
9594 from using the various
9601 \begin_layout Section
9605 \begin_layout Standard
9611 \begin_layout Standard
9612 Elsevier Science Publishers B.V.
9613 provides a standard LaTeX document class (
9617 ) for submitting articles to their various journals.
9618 The style file can be downloaded directly from their web site:
9619 \begin_inset Flex URL
9622 \begin_layout Plain Layout
9624 http://www.elsevier.com/wps/find/authorsview.authors/latex
9630 Instructions are supplied along with the class file, which details the
9631 requirements of the publishers.
9632 LyX includes a package that allows for the use of this class, by a layout
9633 and a template file.
9634 Installation of the class file is the same as for any other LaTeX package;
9635 instructions are provided in the Elsevier documentation.
9638 \begin_layout Standard
9648 As the Elsevier class file is based mainly on the standard article class,
9649 most of the normal functionality is provided.
9650 The Elsevier class defines a number of mathematical environments, which
9651 are similar to the AMS environments.
9652 These commands are all described in the Elsevier documentation, and are
9656 \begin_layout Standard
9657 The easiest way to use the Elsevier style is to base documents on the included
9659 It is best not to use options such as fancy headings or the geometry package,
9660 as elements such as these are defined by Elsevier in their style file.
9661 Ideally, no extra packages except those mentioned in the Elsevier documentation
9663 Essentially, Elsevier require as
9664 \begin_inset Quotes eld
9668 \begin_inset Quotes erd
9671 a LaTeX file as possible, as their intention is to take the supplied file
9672 and replace the class file with one for the particular journal to which
9673 the paper has been submitted.
9674 This also means that not too much time should be spent on the formating
9676 When it comes to be published, this will change anyway.
9677 The rest of the usage for this layout is substantially the same as for
9678 the normal article class.
9679 For details of what Elsevier do and don't allow, refer to their documentation.
9682 \begin_layout Section
9688 \begin_inset CommandInset label
9697 \begin_layout Standard
9703 \begin_layout Subsection
9707 \begin_layout Standard
9708 This section describes how to use LyX to make slides for overhead projectors.
9709 There are two document classes that can do this: the default slides class
9715 This section documents the latter.
9718 \begin_layout Standard
9719 I'm going to say this again, nice and clear, so that there's no misunderstanding
9723 \begin_layout Standard
9724 \begin_inset VSpace bigskip
9730 \begin_layout Standard
9734 This section documents the class
9735 \begin_inset Quotes eld
9743 \begin_inset Quotes erd
9751 \begin_layout Standard
9752 \begin_inset VSpace bigskip
9758 \begin_layout Standard
9759 If you're looking for the documentation for
9760 \begin_inset Quotes eld
9768 \begin_inset Quotes erd
9772 \begin_inset space ~
9776 \begin_inset CommandInset ref
9778 reference "sec:slitex"
9783 If your machine doesn't have the
9788 \begin_inset Quotes eld
9796 \begin_inset Quotes erd
9799 ] installed, you'll probably have to use the default
9803 class, which isn't quite as good as
9808 \begin_layout Standard
9813 class is designed for use with version 2.1 of the
9817 LaTeX class file which is now an integral part of LaTeX2e.
9820 \begin_layout Subsection
9824 \begin_layout Standard
9825 Obviously, to use this document class, you need to select
9826 \begin_inset Quotes eld
9834 \begin_inset Quotes erd
9844 \begin_inset space ~
9850 There are some settings in the
9853 \begin_inset space ~
9858 dialog that you should know about that are specific to this class:
9861 \begin_layout Itemize
9862 Don't change the options
9873 \begin_inset space ~
9879 They're ignored by the
9886 \begin_layout Itemize
9887 The default font size is 20
9888 \begin_inset space \thinspace{}
9891 pt with the other options being 17
9892 \begin_inset space \thinspace{}
9896 \begin_inset space \thinspace{}
9900 \begin_inset space \thinspace{}
9906 \begin_layout Itemize
9915 but all math equations are still typeset in the usual roman font.
9918 \begin_layout Itemize
9923 supports A4 and Letter paper sizes as well as a special size for working
9925 \begin_inset space \thinspace{}
9929 It doesn't support A5, B5, legal or executive paper sizes.
9932 \begin_layout Itemize
9933 Don't bother changing the
9937 settings because they are ignored anyway.
9938 All floats appear where they are defined in the text.
9941 \begin_layout Itemize
9946 setting behaves a bit differently for this class.
9951 provides extensive footer and header capabilities including a user-defined
9954 \begin_inset space ~
9958 \begin_inset CommandInset ref
9960 reference "sec:foilfoot"
9965 The title page is treated differently to all other pages in the document
9974 has the logo centered at the bottom of the page (if one is defined).
9975 The possible page style choices and what they do are as follows:
9979 \begin_layout Labeling
9980 \labelwidthstring MMMMMMM
9987 The final output contains no page numbers, or other headers or footers
9988 (except footnotes of course).
9992 \begin_layout Labeling
9993 \labelwidthstring MMMMMMM
10000 The final output contains page numbers centered at the bottom of the page.
10001 No other headings or footers (other than footnotes).
10004 \begin_layout Labeling
10005 \labelwidthstring MMMMMMM
10010 Page numbers in lower right corner.
10011 Additional headers and footers are also shown.
10012 This is also the default.
10015 \begin_layout Labeling
10016 \labelwidthstring MMMMMMM
10021 Gives you access to the
10025 package although its use with
10029 is discouraged by the writer of the
10033 package because of some potential page layout clashes.
10037 \begin_layout Subsubsection
10041 \begin_layout Standard
10042 The following options may be used in the extra class options in the
10044 Document\SpecialChar \menuseparator
10050 \begin_layout Labeling
10051 \labelwidthstring MMMMMMx
10056 This sets up the page layout for 7.33
10057 \begin_inset space \thinspace{}
10061 \begin_inset space \thinspace{}
10064 in paper, which is about the same aspect ratio as a 35
10065 \begin_inset space \thinspace{}
10068 mm slide, making it a bit easier to work with this medium.
10071 \begin_layout Labeling
10072 \labelwidthstring MMMMMMx
10077 Places a rule across the page below the header on every page except the
10081 \begin_layout Labeling
10082 \labelwidthstring MMMMMMx
10087 Places a rule across the page above the footer on every page except the
10091 \begin_layout Labeling
10092 \labelwidthstring MMMMMMx
10097 This is automatically set each time you create a new
10106 to use the dvips driver to rotate those pages that are set as landscape
10110 \begin_layout Labeling
10111 \labelwidthstring MMMMMMx
10116 Simply changes the page dimensions to those of a landscape page but doesn't
10118 Thus if you use this option you need to use an external program to rotate
10119 each page or feed your paper through your printer as landscape.
10120 Note that this option effectively reverses the roles of the
10128 environments (don't worry these are described in the next section).
10131 \begin_layout Labeling
10132 \labelwidthstring MMMMMMx
10137 Equation numbers on the left.
10140 \begin_layout Labeling
10141 \labelwidthstring MMMMMMx
10146 Flush-left equations.
10149 \begin_layout Subsection
10150 Supported Environments
10153 \begin_layout Standard
10154 Most of the environments commonly supported in other classes are also supported
10160 There are several additional environments provided by
10164 as well as a couple added by LyX.
10165 The following environments are shared with other classes:
10168 \begin_layout Standard
10172 \begin_layout Plain Layout
10176 begin{multicols}{2}
10184 \begin_layout Itemize
10190 \begin_layout Itemize
10196 \begin_layout Itemize
10202 \begin_layout Itemize
10208 \begin_layout Itemize
10214 \begin_layout Itemize
10220 \begin_layout Itemize
10226 \begin_layout Itemize
10232 \begin_layout Itemize
10238 \begin_layout Itemize
10244 \begin_layout Itemize
10250 \begin_layout Itemize
10256 \begin_layout Itemize
10262 \begin_layout Itemize
10268 \begin_layout Itemize
10274 \begin_layout Itemize
10280 \begin_layout Itemize
10286 \begin_layout Itemize
10292 \begin_layout Standard
10296 \begin_layout Plain Layout
10308 \begin_layout Standard
10309 That is, all the major environments apart from the sectioning environments.
10310 Since foils are essentially self-contained sections, with a title and body,
10315 provides specific commands for starting new foils and these are:
10318 \begin_layout Itemize
10324 \begin_layout Itemize
10330 \begin_layout Standard
10331 LyX also provides slightly modified versions of these two environments called:
10334 \begin_layout Itemize
10340 \begin_layout Itemize
10343 ShortRotatefoilhead
10346 \begin_layout Standard
10347 and the differences will be explained in the next section.
10350 \begin_layout Standard
10351 Since foils are often used in presenting ideas or new theorems and such
10356 also provides a comprehensive box of goodies for presenting them:
10359 \begin_layout Standard
10363 \begin_layout Plain Layout
10367 begin{multicols}{2}
10375 \begin_layout Itemize
10381 \begin_layout Itemize
10387 \begin_layout Itemize
10393 \begin_layout Itemize
10399 \begin_layout Itemize
10405 \begin_layout Itemize
10411 \begin_layout Itemize
10417 \begin_layout Itemize
10423 \begin_layout Itemize
10429 \begin_layout Itemize
10435 \begin_layout Itemize
10441 \begin_layout Standard
10445 \begin_layout Plain Layout
10457 \begin_layout Standard
10458 The starred versions are unnumbered while the unstarred versions are numbered.
10459 There are also two list environments added by LyX and these are:
10462 \begin_layout Itemize
10468 \begin_layout Itemize
10474 \begin_layout Standard
10479 provides some powerful header and footer capabilities that are best set
10480 in the preamble although they may be set at any point in a document.
10481 If you want to change these settings in your document the best place to
10482 do so is at the very top of a foil, i.
10483 \begin_inset space \thinspace{}
10489 \begin_inset space \space{}
10494 straight after the foilhead.
10497 \begin_layout Standard
10498 For this purpose, the following command styles are provided [
10505 \begin_layout Standard
10509 \begin_layout Plain Layout
10513 begin{multicols}{2}
10521 \begin_layout Itemize
10525 \begin_inset space ~
10531 \begin_layout Itemize
10537 \begin_layout Itemize
10541 \begin_inset space ~
10547 \begin_layout Itemize
10551 \begin_inset space ~
10557 \begin_layout Itemize
10561 \begin_inset space ~
10568 \begin_layout Standard
10569 \begin_inset space ~
10576 \begin_layout Standard
10580 \begin_layout Plain Layout
10592 \begin_layout Standard
10593 There are also a few commands provided by
10597 that aren't directly supported by LyX but I'll tell you what they do and
10598 how to use them in section
10599 \begin_inset space ~
10603 \begin_inset CommandInset ref
10605 reference "sec:unsuppfoils"
10612 \begin_layout Subsection
10613 Building a Set of Foils
10616 \begin_layout Standard
10617 This section will give a simple introduction to using the different environments
10618 to build a set of foils.
10619 If you want to see an example set of foils, take a look at the
10623 file you find in LyX's
10630 \begin_layout Subsubsection
10631 Give It a Title Page
10634 \begin_layout Standard
10635 Unlike other classes that provide
10655 creates the title on a page of its own.
10656 If you leave out the
10660 environment LaTeX will substitute the current date (every time you regenerate
10664 \begin_layout Subsubsection
10668 \begin_layout Standard
10669 As I mentioned earlier, there are four ways of starting a new foil.
10670 For portrait foils you should use
10679 The difference between these two environments is the amount of space between
10680 the title of the foil (the foilhead) and the body of the foil.
10683 \begin_layout Standard
10684 Landscape foils are generated using the
10690 ShortRotatefoilhead
10693 Again the only difference is the spacing between foilhead and body.
10694 Both of the short versions have 0.5 inches less separation between the foilhead
10699 \begin_layout Standard
10700 One problem with the support for landscape foils is the requirement that
10701 you have to use the
10705 driver to generate the PostScript output otherwise the foils won't be rotated.
10706 It is possible to get landscape foils even if you haven't got the
10710 driver provided you can feed your foils sideways through your printer ;-)
10713 \begin_layout Subsubsection
10714 Theorems, Lemmas, Proofs and more
10717 \begin_layout Standard
10718 Due to a small bug in LyX you can't have two of the same type of these environme
10719 nts directly following each other.
10720 They must be separated by something.
10721 If you try, you will just be extending the previous environment as if you
10722 had merged the two environments together.
10723 So, how do you get around this problem? The simplest option is to insert
10724 some text between the two environments or add a
10728 environment between the two with just a
10729 \begin_inset Quotes eld
10737 \begin_inset Quotes erd
10741 This will force LyX to produce two separate environments and hence the
10742 correct LaTeX output.
10743 An example is provided in the example file included with the LyX distribution.
10744 Remember, this problem only occurs if you are trying to place two of the
10745 same type of theorem-like environments one directly after the other.
10748 \begin_layout Subsubsection
10752 \begin_layout Standard
10753 You get all the commonly supported list styles found in other classes as
10754 well as two new ones.
10755 I'll only describe the new ones here.
10756 If you want to find out more about the other list environments check out
10762 If you intend to use itemized lists you might also want to read about the
10766 \begin_inset space ~
10770 \begin_inset space ~
10775 dialog described above in section
10776 \begin_inset space ~
10780 \begin_inset CommandInset ref
10782 reference "sec:bullet"
10789 \begin_layout Standard
10790 The two new list styles,
10798 , are designed to make it easier for you to create lists of do's and don'ts
10799 or right and wrong by providing dedicated environments that use a tick
10800 or a cross as the label of the list.
10801 These lists are in fact dedicated variants of the
10806 They do however require that you have the
10810 packages installed.
10813 \begin_layout Subsubsection
10817 \begin_layout Standard
10822 redefines the floating tables and figures so that they appear exactly where
10823 they are in the text rather than pushing them to the top of the page or
10824 to some user specified location.
10825 In fact if you change the float placement settings they are simply ignored.
10828 \begin_layout Subsubsection
10829 Page Headers and Footers
10830 \begin_inset CommandInset label
10832 name "sec:foilfoot"
10839 \begin_layout Standard
10843 \begin_inset space ~
10852 are two commands used to control the left-footer text string.
10853 The first is meant to allow you to include a graphic logo on your foils
10855 \begin_inset Quotes eld
10863 \begin_inset Quotes erd
10867 While the second is meant to provide a classification for the audience,
10871 \begin_inset space \thinspace{}
10877 \begin_inset space \space{}
10881 It is empty by default.
10884 \begin_layout Standard
10885 The remaining page corners can be filled by
10888 \begin_inset space ~
10893 (which defaults to page numbers),
10896 \begin_inset space ~
10904 \begin_inset space ~
10912 \begin_layout Subsection
10918 \begin_inset CommandInset label
10920 name "sec:unsuppfoils"
10927 \begin_layout Standard
10928 All the commands mentioned below need to be set in a
10936 within another environment.
10939 \begin_layout Subsubsection
10943 \begin_layout Standard
10944 All lengths are adjusted using the
10967 should be replaced by the name given to the length you want to change and
10972 is the length value.
10973 All lengths should be specified in units of length such as inches (
10985 ) or relative to some document or font-based length such as
10995 \begin_layout Standard
10996 It's possible to change the spacing between a foilhead and the body of the
10997 foil by adjusting the length specified by
11004 For example, to make
11009 \begin_inset space \space{}
11012 in closer to their bodies put the following in the preamble:
11018 foilheadskip}{-0.5in}
11021 \begin_layout Standard
11022 The spacings around floats can be adjusted by setting these lengths:
11025 \begin_layout Labeling
11026 \labelwidthstring MMMMMMMMMMM
11033 Separation between the text and the top of the float
11036 \begin_layout Labeling
11037 \labelwidthstring MMMMMMMMMMM
11044 Separation between the float and the caption
11047 \begin_layout Labeling
11048 \labelwidthstring MMMMMMMMMMM
11055 Separation between the caption and the following text
11058 \begin_layout Labeling
11059 \labelwidthstring MMMMMMMMMMM
11066 You can make the captions narrower than the surrounding text by adjusting
11068 Best done relative to
11077 \begin_layout Standard
11078 There are also several title page related lengths that you may find useful
11079 if you have a long title or several authors:
11082 \begin_layout Labeling
11083 \labelwidthstring MMMMMMMMMMM
11090 Separation from headers to
11095 \begin_layout Labeling
11096 \labelwidthstring MMMMMMMMMMM
11114 \begin_layout Labeling
11115 \labelwidthstring MMMMMMMMMMM
11129 \begin_layout Labeling
11130 \labelwidthstring MMMMMMMMMMM
11146 \begin_layout Labeling
11147 \labelwidthstring MMMMMMMMMMM
11163 \begin_layout Standard
11164 The last length related command affects all the list environments.
11175 a list environment then all the vertical spacing between the list items
11177 Note that this is a command not a length so it doesn't require
11183 like the stuff mentioned above.
11186 \begin_layout Subsubsection
11187 Headers and Footers
11190 \begin_layout Standard
11203 commands control whether the logo in the
11207 definition appear on a given page.
11214 in the preamble then none of the foils will have the logo on them.
11215 If you don't want the logo on a particular page place the
11221 directly after the foilhead of that page and the
11227 directly after the next foilhead.
11230 \begin_layout Standard
11231 If you decide to use the
11235 page style setting in the
11238 \begin_inset space ~
11243 dialog you should probably add
11253 to your preamble so headers and footers on landscape pages are correctly
11254 placed when rotated.
11255 This is due to some clashes between the page layouts provided by the
11266 \begin_layout Section
11267 Hollywood (Hollywood spec scripts)
11270 \begin_layout Standard
11276 \begin_layout Subsection
11280 \begin_layout Standard
11281 Getting the format of a Hollywood script right is a
11282 \begin_inset Quotes eld
11286 \begin_inset Quotes erd
11289 It is designed to make the readers focus on content and to be easy and
11290 familiar for the actors to read.
11291 Each page of a script should be one minute of film.
11292 Nothing goes in a script that you cannot see or hear on screen.
11293 The courier 12 pt font should be used throughout.
11297 \begin_layout Subsection
11301 \begin_layout Standard
11302 Speakers' lines should NEVER break in mid-sentence.
11303 If a speaker's lines continue over a page break, repeat the
11307 title followed by (Cont'd).
11310 \begin_layout Subsection
11314 \begin_layout Standard
11319 names as labels then cross-reference the label to insert the name.
11320 The cross-reference dialog will show the current cast of characters.
11321 You can use this to insert the speaker name in narratives also.
11324 \begin_layout Subsection
11325 Paper size and Margins
11328 \begin_layout Standard
11329 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11332 \begin_layout Subsection
11336 \begin_layout Standard
11337 The following environments are available.
11338 You can use hollywood.bind to get the bind keys shown at the right.
11341 \begin_layout Itemize
11345 \begin_inset Newline newline
11350 Used where nothing else works.
11354 \begin_layout Itemize
11360 \begin_inset space \hfill{}
11368 \begin_inset Newline newline
11371 Usually followed by something like
11372 \begin_inset Quotes eld
11375 on Sally waking up.
11376 \begin_inset Quotes erd
11382 \begin_layout Itemize
11386 \begin_inset space \hfill{}
11390 \begin_inset Newline newline
11395 Introduces a new INTERIOR camera set-up.
11396 Always followed by DAY or NIGHT, or something similar to define the lighting
11398 Everthing on this line in CAPS.
11401 \begin_layout Itemize
11405 \begin_inset space \hfill{}
11409 \begin_inset Newline newline
11414 Introduces a new EXTERIOR camera set-up.
11415 Everthing on this line in CAPS.
11418 \begin_layout Itemize
11422 \begin_inset space \hfill{}
11426 \begin_inset Newline newline
11431 The character speaking.
11434 \begin_layout Itemize
11438 \begin_inset space \hfill{}
11442 \begin_inset Newline newline
11447 Instructions to the speaker.
11448 The () are automatically inserted, but only the ( will show in LyX.
11449 Both will be printed.
11452 \begin_layout Itemize
11456 \begin_inset space \hfill{}
11460 \begin_inset Newline newline
11472 \begin_layout Itemize
11476 \begin_inset space \hfill{}
11480 \begin_inset Newline newline
11485 Camera movement instruction.
11487 \begin_inset space \thinspace{}
11491 \begin_inset space \space{}
11497 \begin_layout Itemize
11501 \begin_inset space \hfill{}
11507 \begin_layout Itemize
11511 \begin_inset space \hfill{}
11517 \begin_layout Itemize
11521 \begin_inset space \hfill{}
11527 \begin_layout Itemize
11531 \begin_inset space \hfill{}
11537 \begin_layout Subsection
11541 \begin_layout Itemize
11545 \begin_layout Itemize
11549 \begin_layout Itemize
11551 \begin_inset space \thinspace{}
11558 \begin_layout Itemize
11563 \begin_layout Itemize
11564 PAN — camera movement
11567 \begin_layout Itemize
11568 INSERT — cut to close-up of
11571 \begin_layout Section
11575 \begin_layout Standard
11578 Panayotis Papasotiriou
11581 \begin_layout Subsection
11585 \begin_layout Standard
11586 The ijmpc package is a set of macros that facilitates electronic manuscript
11589 International Journal of Modern Physics C
11592 Similarly, the ijmpd package is for creating manuscripts to be submitted
11595 International Journal of Modern Physics D
11598 Both journals are published by World Scientific.
11599 The corresponding document classes are named
11608 These files, together with instructions for the authors, can be downloaded
11610 \begin_inset Flex URL
11613 \begin_layout Plain Layout
11615 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11621 \begin_inset Flex URL
11624 \begin_layout Plain Layout
11626 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11632 Both packages are modified versions of the standard
11633 \begin_inset Quotes eld
11637 \begin_inset Quotes erd
11640 package, and they are almost (but not exactly) identical.
11641 Most of their features are supported by LyX.
11642 I have used LyX successfully to write articles submitted to both journals
11643 without any problem.
11646 \begin_layout Subsection
11650 \begin_layout Standard
11651 As usual, the easiest way to write a paper is to start with a template.
11654 File\SpecialChar \menuseparator
11673 This will give an (almost) empty document that includes the most common
11674 fields found in a manuscript.
11675 Simply overwrite the existing text (including the brackets,
11680 You should keep in mind the following remarks.
11683 \begin_layout Enumerate
11684 LyX won't let you change the font size and the page style of the document,
11685 because such modifications are not allowed by both packages.
11688 \begin_layout Enumerate
11689 The language of the document should not be changed.
11690 Before previewing your paper, be sure that the babel package is not used.
11691 To do this, click on
11693 Tools\SpecialChar \menuseparator
11704 checkbox in the language settings, and click on
11712 , if you wish to make this change permanent).
11715 \begin_layout Enumerate
11717 \begin_inset Quotes eld
11721 \begin_inset Quotes erd
11724 style must be used to define keywords.
11727 \begin_layout Enumerate
11728 The ijmpc package provides a style named
11729 \begin_inset Quotes eld
11732 Classification Codes
11733 \begin_inset Quotes erd
11736 , which can be used to define classification codes, such as PACS numbers.
11737 Note that this facility is not supported by the ijmpd package.
11740 \begin_layout Enumerate
11741 Several new environments are available:
11742 \begin_inset Quotes eld
11746 \begin_inset Quotes erd
11750 \begin_inset Quotes eld
11754 \begin_inset Quotes erd
11758 \begin_inset Quotes eld
11762 \begin_inset Quotes erd
11766 \begin_inset Quotes eld
11770 \begin_inset Quotes erd
11774 \begin_inset Quotes eld
11778 \begin_inset Quotes erd
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11798 \begin_inset Quotes eld
11802 \begin_inset Quotes erd
11806 \begin_inset Quotes eld
11810 \begin_inset Quotes erd
11814 \begin_inset Quotes eld
11818 \begin_inset Quotes erd
11822 \begin_inset Quotes eld
11826 \begin_inset Quotes erd
11830 \begin_inset Quotes eld
11834 \begin_inset Quotes erd
11838 \begin_inset Quotes eld
11842 \begin_inset Quotes erd
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 Their use is more or less obvious.
11855 LyX supports all these environments; it will use the proper label, text
11856 style, and numbering scheme for each of them.
11859 \begin_layout Enumerate
11860 Both packages use basic citations; the natbib package should not be used.
11861 In LyX, citation references are shown as usual; in the output, citations
11862 are shown as superscripts.
11863 If you want to use a citation as normal text, you should use the
11868 \begin_inset space \thinspace{}
11872 \begin_inset space \space{}
11876 \begin_inset Quotes eld
11880 \begin_inset space \space{}
11890 \begin_inset Quotes erd
11896 \begin_layout Enumerate
11898 \begin_inset Quotes eld
11902 \begin_inset Quotes erd
11905 section in both packages.
11906 To put acknowledgments, just use the
11907 \begin_inset Quotes eld
11911 \begin_inset Quotes erd
11917 \begin_layout Enumerate
11918 Appendices may be added to the paper,
11922 the Acknowledgments and
11927 LyX provides a special environment, called
11928 \begin_inset Quotes eld
11932 \begin_inset Quotes erd
11935 which marks the beginning of the appendices.
11936 This environment should be left blank; it just sends a LaTeX command, but
11937 nothing is really printed.
11939 \begin_inset Quotes eld
11943 \begin_inset Quotes erd
11946 is printed with blue letters, as a signal that all sections after that
11947 point are appendices.
11948 To write an appendix, use the
11949 \begin_inset Quotes eld
11953 \begin_inset Quotes erd
11957 LyX will number each appendix with capital letters, as required by both
11960 \begin_inset Quotes eld
11964 \begin_inset Quotes erd
11971 be present before the first appendix; if not, all appendices will be numbered
11972 as normal sections in the output.
11975 \begin_layout Enumerate
11976 The ijmpc and the ijmpd packages use the
11980 command to implement table captions.
11981 As a result, a table created by LyX is printed correctly, but its caption
11983 However, you can use some TeX code to overcome this problem, so that captions
11984 are printed as expected.
11985 To do so, create a float table as usual, remove the caption, and replace
11986 it with the TeX code
11996 (sic); you must also the TeX code
12000 immediately after the tabular material.
12001 Study the example table included in the template files to see how this
12002 trick is implemented.
12003 Alternatively, If you need table captions, you should implement the whole
12008 file, then include this file to the LyX document (
12010 Insert\SpecialChar \menuseparator
12011 File\SpecialChar \menuseparator
12013 \begin_inset space ~
12019 Details on how to create a table float can be found in the files
12027 , included in the corresponding packages.
12030 \begin_layout Subsection
12031 Preparing a paper for submission
12034 \begin_layout Standard
12035 Before you submit your paper you must export the LyX document as a LaTeX
12038 File\SpecialChar \menuseparator
12039 Export\SpecialChar \menuseparator
12046 \begin_layout Plain Layout
12047 Actually you have the choice between LaTeX (plain) and pdflatex.
12048 If you intend to use pdflatex to prepare the paper, you should use the
12049 pdflatex option so that included graphics are converted to PDF format,
12050 ready for use by pdflatex.
12055 , then make the following changes to the resulting
12062 \begin_layout Enumerate
12063 Remove the comment lines before the
12072 \begin_layout Enumerate
12073 Remove everything between (and including) the
12085 commands, except for any commands you specifically put into the LaTeX preamble.
12088 \begin_layout Standard
12093 file should be saved and processed through LaTeX as many times as necessary.
12094 You may also want to check the resulting
12101 \begin_layout Subsection
12105 \begin_layout Standard
12106 The use of TeX code is reduced to two commands, which must be placed at
12107 the top of the document.
12108 If you started writing your paper by using the
12116 template, the TeX code needed is already in its place; you usually don't
12118 You may only modify the first TeX code to specify the information printed
12119 to the top of odd and even pages (authors' names and short paper's title,
12121 This TeX code must have the form
12125 markboth{Authors' Names}{Short Paper's Title}
12130 \begin_layout Section
12134 \begin_layout Standard
12140 \begin_layout Subsection
12144 \begin_layout Standard
12145 The iopart package provides a document class to create electronic manuscript
12146 submission to the journals published by the Institute of Physics.
12147 Instructions for the authors how to create a paper using the iopart class
12148 can be downloaded together with the iopart package from the site
12149 \begin_inset Flex URL
12152 \begin_layout Plain Layout
12154 ftp://ftp.iop.org/pub/journals/latex2e
12162 \begin_layout Subsection
12166 \begin_layout Standard
12167 The easiest way to write a paper is to start with the file
12171 that is available in LyX's examples files folder.
12172 Open this file, save it under a new name, and start writing.
12173 The example file explains how to use the special text environments.
12174 Here are the most important advices:
12177 \begin_layout Itemize
12178 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12181 Use AMS math package
12183 in the document settings under
12190 \begin_layout Itemize
12193 The title environment defines the kind of your paper.
12194 So use one of the following environments for the title:
12198 \begin_layout Itemize
12207 \begin_layout Itemize
12216 \begin_layout Itemize
12222 for a Topical review
12225 \begin_layout Itemize
12234 \begin_layout Itemize
12243 \begin_layout Itemize
12249 for a Paper (same as Title)
12252 \begin_layout Itemize
12258 for a Preliminary communication
12261 \begin_layout Itemize
12267 for a Rapid communication
12270 \begin_layout Itemize
12276 for a Letter to the editor
12280 \begin_layout Itemize
12283 All title environments except of
12287 can have an optional short title.
12290 \begin_layout Itemize
12291 There is a general title environment
12295 which is not directly supported by the LyX.
12296 This can be used as TeX code when your document doesn't fit into one of
12297 the other title types.
12300 \begin_layout Standard
12301 For more informations like hints for special table and formula formatting,
12302 look at the IOP author guidelines.
12305 \begin_layout Section
12309 \begin_layout Standard
12312 Panayotis Papasotiriou
12315 \begin_layout Subsection
12319 \begin_layout Standard
12320 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12321 that facilitates electronic manuscript submission to the journals they
12323 Most known of them (at least in my domain of interest) are
12325 Astrophysics and Space Science
12331 , but there are many others (see a complete list at
12332 \begin_inset Flex URL
12335 \begin_layout Plain Layout
12337 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12343 The Kluwer package may be downloaded from the site
12344 \begin_inset Flex URL
12347 \begin_layout Plain Layout
12349 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12355 A complete user guide is contained in that package (but it can also be
12356 downloaded separately).
12359 \begin_layout Standard
12360 LyX supports many features of the package but not everything.
12361 However, the TeX code needed is reduced to some
12362 \begin_inset Quotes eld
12366 \begin_inset Quotes erd
12369 commands of the package (see
12370 \begin_inset space ~
12374 \begin_inset CommandInset ref
12376 reference "subsec:kluwer_peculiarities"
12381 I have recently used LyX to write an article submitted to the
12383 Astrophysics and Space Science
12385 without any problem.
12388 \begin_layout Subsection
12392 \begin_layout Standard
12393 The easiest way to write a paper is to start with the Kluwer template file.
12396 File\SpecialChar \menuseparator
12408 This will give an (almost) empty document that includes the most common
12409 fields found in a manuscript and a short description of their use.
12410 As in most templates, simply overwrite the existing text (including the
12415 ) with the correct information.
12418 \begin_layout Subsection
12419 Preparing a paper for submission
12422 \begin_layout Standard
12423 As in the AASTeX package, before you submit your paper to a journal you
12425 \begin_inset Quotes eld
12429 \begin_inset Quotes erd
12435 \begin_layout Enumerate
12436 Export your paper as a LaTeX file.
12437 To do this, click on
12439 File\SpecialChar \menuseparator
12440 Export\SpecialChar \menuseparator
12447 \begin_layout Enumerate
12452 file with a text editor and make the following changes
12456 \begin_layout Enumerate
12457 remove the comment lines before the
12466 \begin_layout Enumerate
12467 remove everything between (and including) the
12479 commands, except for any commands you specifically put into the LaTeX preamble.
12482 \begin_layout Standard
12491 \begin_layout Enumerate
12496 file through LaTeX as many times as necessary (usually up to three).
12499 \begin_layout Enumerate
12505 \begin_inset space \thinspace{}
12509 \begin_inset space \space{}
12516 , and check if everything is OK (it should, if you didn't make any mistake).
12519 \begin_layout Subsection
12520 \begin_inset Quotes eld
12524 \begin_inset Quotes erd
12527 of the Kluwer package
12528 \begin_inset CommandInset label
12530 name "subsec:kluwer_peculiarities"
12537 \begin_layout Standard
12538 The Kluwer package has the following
12539 \begin_inset Quotes eld
12543 \begin_inset Quotes erd
12549 \begin_layout Enumerate
12550 It is possible to write multiple articles in the same LaTeX file
12554 \begin_layout Plain Layout
12555 I can't imagine any good reason to do this.
12561 Each article must be included in the environment
12562 \begin_inset Quotes eld
12566 \begin_inset Quotes erd
12570 Unfortunately, this environment cannot be omitted, even if you write just
12572 Therefore, each article starts with the command
12578 and, obviously, ends with the command
12585 Although this can be implemented in LyX, I didn't included it, since it
12586 looks ugly and can confuse the novice user.
12587 Therefore, you need to enter them directly and mark them as LaTeX code
12589 \begin_inset Quotes eld
12593 \begin_inset Quotes erd
12599 \begin_layout Enumerate
12600 Information given at the beginning of the article (i.
12601 \begin_inset space \thinspace{}
12605 \begin_inset space \space{}
12608 title, subtitle, author, institution, running title, running author, abstract
12609 and keywords) must be included in an environment called
12610 \begin_inset Quotes eld
12614 \begin_inset Quotes erd
12618 This is not implemented in LyX, so you must enter title, subtitle etc.
12619 \begin_inset space ~
12622 between two TeX code lines (
12637 \begin_layout Enumerate
12638 According to the user manual, the label of each bibliography item must be
12662 \begin_layout Standard
12667 template takes care of all these
12668 \begin_inset Quotes eld
12672 \begin_inset Quotes erd
12676 If you start a new paper using this template you don't need to do anything
12681 \begin_layout Enumerate
12682 don't delete the TeX code included in the template, and
12685 \begin_layout Enumerate
12686 copy the example bibliography item included in the template and modify it
12687 as necessary to enter new bibliography items.
12690 \begin_layout Section
12694 \begin_layout Standard
12700 \begin_layout Subsection
12704 \begin_layout Standard
12705 The LyX document classes
12707 article (koma-script)
12711 report (koma-script)
12729 correspond to the LaTeX document classes
12746 \begin_inset space ~
12749 of the Koma-Script family.
12750 They are replacements for the standard document classes
12766 , resp., and fit better to European typography conventions in a number of
12770 \begin_layout Itemize
12771 Standard character size is 11pt in
12773 article (koma-script)
12777 report (koma-script)
12785 letter (koma-script)
12790 \begin_layout Itemize
12791 Headings, labels of the description environment, and a number of elements
12794 letter (koma-script)
12796 document class are set in a bold sans serif font.
12800 \begin_layout Plain Layout
12801 There is a big difference between the bold sans serif old cm fonts and new
12802 ec fonts, especially in the appearance of headings.
12803 In comparison, the ec bold sans serif fonts look a bit thin.
12804 Here the LaTeX package
12812 helps to produce the
12813 \begin_inset Quotes eld
12817 \begin_inset Quotes erd
12820 appearance when using the ec fonts.
12825 The numbering of chapter headings is made in the same way as the numbering
12826 of section headings, that is without the extra line
12827 \begin_inset Quotes eld
12830 Chapter\SpecialChar \ldots{}
12832 \begin_inset Quotes erd
12836 In addition, the appearance of the headings can be modified by using a
12837 number of options (in LyX to be entered in the field
12840 \begin_inset space ~
12847 Layout\SpecialChar \menuseparator
12854 \begin_layout Itemize
12855 The main means in the Koma-Script document classes to design the type area
12864 (in LyX to be entered in the extra class options field in the dialog
12866 Document\SpecialChar \menuseparator
12870 They make a clearer modification of page margins possible as do the options
12873 Document\SpecialChar \menuseparator
12880 \begin_layout Itemize
12881 The LaTeX document classes of the Koma-Script family define a number of
12882 additional commands.
12883 Those part of it which makes sense in LyX is implemented in corresponding
12887 \begin_layout Standard
12888 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12889 can be found in the Koma-Script documentation
12900 \begin_layout Subsection
12901 article (koma-script), report (koma-script), and book (koma-script)
12904 \begin_layout Standard
12905 The document classes
12907 article (koma-script)
12911 report (koma-script)
12921 are implemented in the layout files
12934 They contain all the paragraph types of the corresponding standard document
12947 , resp., partly modified, with the exception of the LyX specific
12951 -type, which is replaced by the new
12955 -type having the same functionality.
12960 -Type there is a number of new paragraph types added.
12967 letter (koma-script)
12972 \begin_layout Itemize
12981 : are equivalents to
12989 , resp., additionally inserting an entry in the table of contents.
12998 are not contained in
13000 article (koma-script)
13005 \begin_layout Itemize
13014 : behave exactly as
13022 , resp., additionally clearing running heads.
13027 is not contained in
13029 article (koma-script)
13035 \begin_layout Plain Layout
13048 report (koma-script)
13050 , but since this is identical to
13054 , is has not been implemented in LyX.
13062 \begin_layout Itemize
13067 : generates a heading directly above the following paragraph in the standard
13068 character size without affecting the structure of the document.
13071 \begin_layout Itemize
13080 are special captions which respect the different space settings needed
13081 for captions placed above or below an element (if you follow strict typographic
13082 rules, you might want to place table captions always above the table).
13083 You can also use the class option
13087 , which will switch
13100 You need at least Koma-Script version 2.8q to use this.
13103 \begin_layout Itemize
13108 : can be used to set a bonmot, e.
13109 \begin_inset space \thinspace{}
13113 \begin_inset space \space{}
13116 at the beginning of a chapter.
13117 If you use the optional argument (
13119 Insert\SpecialChar \menuseparator
13121 \begin_inset space ~
13126 ), you can insert the dictum's author there.
13127 Dictum and author are separated by a line.
13128 You need at least Koma-Script version 2.8q to use this.
13133 is not contained in
13135 article (koma-script)
13140 \begin_layout Standard
13141 The following types, together with the standard types
13153 , form the title area of the document.
13154 They must be entered ahead of the first
13155 \begin_inset Quotes eld
13159 \begin_inset Quotes erd
13166 \begin_layout Plain Layout
13167 The corresponding LaTeX commands must appear before the
13178 When such a type is used more than once, the latter usage overwrites the
13179 former one, that means, for every type only the latest usage is valid.
13180 The order of the different types however has, like
13192 , no effect on the appearance of the produced document.
13195 \begin_layout Itemize
13200 : produces a centered paragraph above the ordinary title (
13212 ) for the subject of the document.
13215 \begin_layout Itemize
13220 : produces a centered paragraph below the ordinary title (
13232 ) for the publishers' name.
13235 \begin_layout Itemize
13242 report (koma-script)
13248 produces a centered paragraph on its own page behind the title page, or
13251 article (koma-script)
13253 produces a centered paragraph below the ordinary title (
13269 ) for a dedication.
13272 \begin_layout Itemize
13277 : produces a left aligned paragraph above the ordinary title (
13293 ) for a document`s head.
13296 \begin_layout Itemize
13301 : produces in a double-sided print in
13303 report (koma-script)
13309 a left-aligned paragraph at the top of the title page`s back or has no
13310 effect in a single-sided print or in
13312 article (koma-script)
13317 \begin_layout Itemize
13322 : produces in a double-sided print in
13324 report (koma-script)
13330 a left-aligned paragraph at the bottom of the title page`s back or has
13331 no effect in a single-sided print or in
13333 article (koma-script)
13338 \begin_layout Itemize
13343 : produces a special
13344 \begin_inset Quotes eld
13348 \begin_inset Quotes erd
13351 page ahead of the actual document containing a paragraph without special
13355 \begin_layout Standard
13356 The layout files for the document classes
13358 article (koma-script)
13362 report (koma-script)
13368 do include the file
13373 This is thought of as a place to define your own types.
13378 in your personal layout directory and edit the file!
13381 \begin_layout Subsection
13382 letter (koma-script)
13385 \begin_layout Standard
13389 \begin_layout Plain Layout
13401 \begin_layout Standard
13405 letter (koma-script)
13407 is implemented in the layout file
13412 It contains all the paragraph types of the corresponding standard document
13417 , partly modified, with the exception of the LyX specific types
13429 type, which is replaced by the new
13434 In addition, it contains, in contrast to the standard document class, the
13452 Furthermore, there are a number of new letter specific types.
13455 \begin_layout Standard
13459 \begin_layout Plain Layout
13471 \begin_layout Standard
13472 The appearance of the letter produced by this document class can be controlled
13473 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13477 \begin_layout Plain Layout
13478 For example, the standard appearance of the letter`s heading, consisting
13479 of name and address, is quite self-willed.
13481 \begin_inset Quotes eld
13485 \begin_inset Quotes erd
13488 heading is produced by the following LaTeX commands in the preamble:
13491 \begin_layout LyX-Code
13501 \begin_layout LyX-Code
13517 \begin_layout LyX-Code
13527 \begin_layout LyX-Code
13547 A detailed German description of such LaTeX commands can be found in the
13548 Koma-Script documentation
13553 With it, the letter's author can produce his personal letter layout.
13556 \begin_layout Standard
13565 define the beginning of the letter and must be used in every letter.
13566 To emphasize them in the LyX document class, they are marked with the letter
13576 \begin_inset space ~
13579 in the left margin.
13580 It is possible to write any number of letters in one file.
13585 type produces a new letter using the same addressee and a
13589 type produces a new addressee.
13606 are ordinary paragraph types and can also be used several times in one
13607 and the same letter.
13610 \begin_layout Itemize
13615 : produces a paragraph for the addressee and implicitly defines the beginning
13619 \begin_layout Itemize
13624 : produces a paragraph for the form of address and implicitly produces a
13628 \begin_layout Itemize
13633 : produces a paragraph for a close.
13636 \begin_layout Itemize
13641 : produces a paragraph for a postscript.
13644 \begin_layout Itemize
13649 : produces a paragraph for a distribution list.
13652 \begin_layout Itemize
13657 : produces a paragraph for enclosures.
13660 \begin_layout Standard
13701 are input types provided with a label to enter information, which will
13702 be processed by the document class.
13706 \begin_layout Plain Layout
13707 It could be seen as a matter of inconsequence, that the types
13715 described above are not such input types as well.
13716 Because of the special meaning of those types, however, I have implemented
13717 them as ordinary paragraph types with a one letter mark in the left margin.
13718 Moreover, it would affect my feeling of symmetry, if the
13726 type had such a serious different appearance.
13731 The types must be used ahead of the corresponding
13738 \begin_layout Standard
13739 An implementation of these types in a WYSIWYG fashion does not seem to make
13740 sense, because the real appearance of the produced letter does not only
13741 depend on the usage of the particular type, but also on other factors.
13742 For example, a signature entered in the
13746 type will in the standard behavior appear in the produced letter only,
13747 when in the same letter also a
13752 The entered value of the
13756 type will in the standard behavior not appear in the produced letter at
13758 The possibility to design the letter`s heading freely is already indicated
13759 in a footnote above.
13762 \begin_layout Standard
13763 The input types can also be used as empty paragraphs.
13764 This makes sense e.
13765 \begin_inset space \thinspace{}
13769 \begin_inset space \space{}
13781 type is not used at all, in the standard behavior the value of the
13785 type is used as signature, whereas if an empty
13789 type is used, no signature value is defined.
13792 \begin_layout Standard
13793 By using the input types it is possible to write a letter template, containing
13794 filled input types with your personal dates (name, address, etc.) and empty
13795 input types for other dates you want to enter.
13798 \begin_layout Itemize
13803 : sender's name, in the standard behavior appears as a centered paragraph
13804 in small caps in the letter`s heading.
13807 \begin_layout Itemize
13812 : sender's signature, in the standard behavior appears below the
13821 type is used, the value of the
13825 type appears instead.
13828 \begin_layout Itemize
13833 : sender's address, in the standard behavior appears in a centered paragraph
13834 in the letter`s heading below the sender's name.
13837 \begin_layout Itemize
13842 : sender's telephone number, in the standard behavior only sets the LaTeX
13852 \begin_layout Itemize
13857 : place of the letter`s making.
13860 \begin_layout Itemize
13865 : date of the letter`s making.
13874 , in the standard behavior, produce the place and the date in a right-aligned
13875 line below the addressee's field.
13880 type is used, neither place nor date appear, independent of the value of
13890 type is used, the date of the letter `s production is used.
13893 \begin_layout Itemize
13898 : sender`s back address, in the standard behavior appears above the addressee's
13899 field in a small sans serif font.
13902 \begin_layout Itemize
13907 : special mail information, in the standard behavior appears underlined
13908 above the addressee's field below the back address.
13911 \begin_layout Itemize
13916 : additional information, in the standard behavior appears on right side
13917 below the addressee`s field.
13920 \begin_layout Itemize
13925 : the letter's title, in the standard behavior appears in a big, bold, sans
13926 serif font above the subject.
13929 \begin_layout Itemize
13934 : the letter's subject, in the standard behavior appears in a bold font
13942 \begin_layout Standard
13963 produce a business letter like line above the
13967 line containing the fields
13968 \begin_inset Quotes eld
13972 \begin_inset Quotes erd
13976 \begin_inset Quotes eld
13980 \begin_inset Quotes erd
13984 \begin_inset Quotes eld
13988 \begin_inset Quotes erd
13992 \begin_inset Quotes eld
13996 \begin_inset Quotes erd
14000 \begin_inset Quotes eld
14004 \begin_inset Quotes erd
14008 \begin_inset Quotes eld
14012 \begin_inset Quotes erd
14016 For the date field, the value of the
14022 \begin_inset Quotes eld
14025 business letter types
14026 \begin_inset Quotes erd
14029 is used, the value of the
14033 type however does not appear, but only the LaTeX variable
14040 The ordinary output of place and date in a right-aligned line below the
14041 addressee`s field is suppressed.
14042 The types are implemented as input types provided with a label and must
14043 be used ahead of the corresponding
14050 \begin_layout Itemize
14058 \begin_layout Itemize
14066 \begin_layout Itemize
14074 \begin_layout Itemize
14082 \begin_layout Itemize
14090 \begin_layout Subsection
14091 The new letter class: letter (koma-script v.2)
14094 \begin_layout Standard
14100 \begin_layout Standard
14101 \begin_inset VSpace medskip
14107 \begin_layout Standard
14109 Koma-Script version 2.8 has introduced a new letter class
14113 which supersedes the now unsupported
14118 It has — on the LaTeX side — a completely new interface and is not compatible
14119 with the old class.
14120 Therefore, LyX supports both, though it is recommended you use the new
14124 \begin_layout Standard
14125 This class covers the same functionality as
14127 letter (koma-script),
14130 The basic items are
14134 (receiver's address, same as
14138 in the old layout),
14151 will start a new letter (i.
14152 \begin_inset space \thinspace{}
14156 \begin_inset space \space{}
14159 you can write several letters per document).
14160 New elements are sender's
14176 and the possibility to use a
14182 Insert\SpecialChar \menuseparator
14188 \begin_layout Standard
14189 The biggest improvement is, though, that the letter's layout is configurable
14190 to meet almost any needs.
14191 This can be done via the preamble or with a special style file (Letter
14192 Class Option, extension
14196 ), that will be read in as a class option.
14200 \begin_layout Plain Layout
14201 The KOMA package comes with some default
14206 There is, for instance, a
14210 file that follows german typesetting rules, or a
14214 that provides the default layout of the old
14219 The latter can be loaded with the class option
14228 ayout\SpecialChar \menuseparator
14233 ocument\SpecialChar \menuseparator
14245 template that is included in LyX for examples.
14246 A detailed description is to be found in the Koma-Script documentation
14254 \begin_layout Subsection
14258 \begin_layout Standard
14259 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14263 \begin_layout Itemize
14264 The chapter number of a
14268 type appears on a line of its own above the chapter heading instead of
14269 appearing in the same line ahead of it.
14270 The cause for that is the LyX internal behavior for the labeltype
14274 in the layout file.
14277 \begin_layout Itemize
14278 The headings of the types
14286 are only put in the
14287 \begin_inset Quotes eld
14291 \begin_inset Quotes erd
14294 LaTeX table of contents, but not in the LyX table of contents (
14296 Document\SpecialChar \menuseparator
14298 \begin_inset space ~
14302 \begin_inset space ~
14310 \begin_layout Itemize
14311 The paragraphs in a
14315 document class appear in a skip separation mode, not indented.
14316 This is the standard behavior, no special LaTeX commands are needed for
14320 Document\SpecialChar \menuseparator
14323 dialog the corresponding radio button indicates
14332 value always has the effect that extra LaTeX commands are inserted in the
14333 document to produce the gap, which is not what is wanted in this case.
14336 \begin_layout Section
14337 Latex8 (IEEE Conference Papers)
14340 \begin_layout Standard
14346 \begin_layout Subsection
14350 \begin_layout Standard
14351 Since this class is specifically for writing submissions to IEEE sponsored
14352 conferences I strongly recommend that you get a copy of their Authors Kit.
14357 package and associated bibliography style file is included in the kit.
14358 The Authors Kit is usually sent out by email once your initial submission
14360 There is a lot of useful information in the Authors Kit explaining formatting
14361 restrictions and so on and I will assume you have read this since that
14362 means I don't have to repeat it all here.
14365 \begin_layout Subsection
14369 \begin_layout Standard
14370 [AR\SpecialChar \@.
14374 \begin_layout Subsection
14375 Supported Environments
14378 \begin_layout Itemize
14384 \begin_layout Itemize
14390 \begin_layout Itemize
14396 \begin_layout Itemize
14402 \begin_layout Itemize
14408 \begin_layout Itemize
14414 \begin_layout Itemize
14420 \begin_layout Itemize
14426 \begin_layout Itemize
14432 \begin_layout Subsection
14433 Differences Between Screen and Paper
14436 \begin_layout Standard
14437 There are slight differences in appearance mainly with the presentation
14438 of section counters.
14439 On screen the trailing period of the section counter is missing but it
14440 will appear in the output so don't let this worry you.
14443 \begin_layout Section
14447 \begin_layout Standard
14453 \begin_layout Subsection
14457 \begin_layout Standard
14458 Memoir is a very powerful and constantly evolving class.
14459 It has been designed with regard to fictional and non-fictional literature.
14460 Its aim is to let the user have maximum control over the typesetting of
14462 Memoir is based on the standard book class, but it can also emulate the
14463 article class (see below).
14466 \begin_layout Standard
14467 Peter Wilson, the developer of Memoir, is known as the author of lots of
14468 useful packages in the LaTeX world.
14469 Most of them have been merged with Memoir.
14470 Therefore, it is much easier to layout the table of contents, appendices,
14471 chapter designs and such.
14472 LyX, though, does not support all of these goodies natively.
14473 Some of them might be added to forthcoming releases
14477 \begin_layout Plain Layout
14478 You are invited to send suggestions to
14479 \begin_inset Flex URL
14482 \begin_layout Plain Layout
14484 lyx-devel@lists.lyx.org
14494 , lots will probably never, due to the limitations of LyX's framework.
14495 Of course you can still use all features with the help of some native LaTeX
14500 \begin_layout Plain Layout
14505 \begin_layout Plain Layout
14515 \begin_inset space ~
14519 \begin_inset CommandInset ref
14521 reference "sec:Inserting-TeX-Code"
14531 In this section, we can only list those features which are natively supported
14533 For detailed descriptions (and for the rest of features) we recommend you
14534 have a look at the detailed manual of the Memoir class
14538 \begin_layout Plain Layout
14543 \begin_layout Plain Layout
14553 \begin_inset Flex URL
14556 \begin_layout Plain Layout
14558 CTAN:/macros/latex/memoir/memman.pdf
14568 , which is not only a user guide for the class, but also both a comprehensive
14569 description on good typesetting and a superb example for good typesetting
14573 \begin_layout Subsection
14574 Basic features and restrictions
14577 \begin_layout Standard
14578 Memoir supports basically all features of the standard book classes.
14579 There are, however, some differences, as follows:
14582 \begin_layout Description
14584 \begin_inset space ~
14587 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14590 \begin_layout Description
14592 \begin_inset space ~
14595 style: The fancy page style is not supported, due to a command clash between
14596 Memoir and the fancyhdr package (they both define a command with the same
14597 name, which confuses LaTeX).
14598 Instead, Memoir comes with a number of its own page styles (see
14600 Layout\SpecialChar \menuseparator
14601 Document\SpecialChar \menuseparator
14603 \begin_inset space ~
14609 If you want to use these for the chapter pages, you have to use the command
14616 in the main text or in preamble (e.
14617 \begin_inset space \thinspace{}
14621 \begin_inset space \space{}
14628 chapterstyle{companion}
14633 \begin_layout Description
14634 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14635 optional argument in the standard classes.
14636 With this, you can specify an alternative version of the title for the
14637 table of contents and the headers (for instance, if the title is too long).
14638 In LyX, you can do this via
14640 Insert\SpecialChar \menuseparator
14642 \begin_inset space ~
14647 at the beginning of a chapter/section.
14648 Memoir features a second optional argument and thus separates the table
14649 of contents from the header.
14650 You can define three variants of a title with this: one for the main text,
14651 one for the table of contents, and one for the headers.
14652 Simply insert two optional arguments if you need this feature, the first
14653 one containing the short title for the Table of Contents, the second one
14654 containing an alternative short title for the headers.
14657 \begin_layout Description
14658 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14659 of contents, the list of figures and the list of table start a new page
14661 Memoir does not follow this route.
14662 You have to insert a page break yourself, if you want to have one.
14665 \begin_layout Description
14666 Titlepage: For some unknown reason, Memoir uses pagination on the title
14667 page (in the standard classes, title pages are
14668 \begin_inset Quotes eld
14672 \begin_inset Quotes erd
14676 \begin_inset space \thinspace{}
14680 \begin_inset space \space{}
14684 If you want an empty title page, type
14688 aliaspagestyle{title}{empty}
14693 \begin_layout Description
14694 Article: With the class option
14700 Layout\SpecialChar \menuseparator
14701 Document\SpecialChar \menuseparator
14703 \begin_inset space ~
14708 ), you can emulate article style.
14709 That is, counters (footnotes, figures, tables etc.) will not be reset on
14710 new chapters, chapters don't start a new page (but are—in contrary to
14711 \begin_inset Quotes eld
14715 \begin_inset Quotes erd
14718 article classes—still allowed), parts, though, use their own page, as in
14722 \begin_layout Description
14723 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14724 font commands, which have been used in the old LaTeX version 2.09 (e.
14725 \begin_inset space \thinspace{}
14729 \begin_inset space \space{}
14745 It produces an error and stops LaTeX whenever such a command appears.
14750 reallows the commands and spits out warnings instead (which does at least
14752 Since a lot of packages and particularly BibTeX style files are still using
14753 those commands, we have decided to use this option by default.
14756 \begin_layout Subsection
14760 \begin_layout Standard
14761 We will only describe the features supported by LyX (which is not much currently
14763 Please consult the Memoir manual
14767 \begin_layout Plain Layout
14772 \begin_layout Plain Layout
14782 \begin_inset Flex URL
14785 \begin_layout Plain Layout
14787 CTAN:/macros/latex/memoir/memman.pdf
14800 \begin_layout Description
14801 Abstract: You may wonder why an abstract is an extra feature.
14802 Well, it is in book class.
14803 Usually books don't have abstracts.
14804 Memoir, however, has.
14805 You can use it wherever and how often you like.
14808 \begin_layout Description
14809 Chapterprecis: You may know this older typesetting style: The contents of
14810 a chapter are summarized below the title and also in the table of contents
14812 \begin_inset space \thinspace{}
14816 \begin_inset space \space{}
14821 Our hero arrives in Troia; he loses some friends; he finds others
14824 Chapterprecis does exactly this.
14825 It is therefore only sensible below a chapter.
14828 \begin_layout Description
14829 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14830 The epigraph environment provides an elegant way of typesetting such a
14832 The motto itself (text) and its author (source) are divided by a short
14834 Unfortunately, we have to fool LyX a bit here again, since the environment
14835 needs two arguments (text and source).
14836 In this case, we have to use curly brackets (in TeX mode) between the two
14847 <author of the slogan>.
14850 \begin_layout Description
14851 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14852 complex figurative poems).
14853 LyX can only support a few of them.
14854 One is poemtitle, which is a centered title for poems, which will also
14855 be added to the table of contents (verse is the standard environment for
14857 Memoir has some enhanced versions of verse, but you need to use TeX code,
14858 because they have to be nested inside regular verse environments, which
14859 is not possible with LyX).
14862 \begin_layout Description
14863 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14866 \begin_layout Section
14867 Article (mwart), book (mwbk) and report (mwrep)
14868 \begin_inset Argument
14871 \begin_layout Plain Layout
14884 \begin_layout Standard
14890 \begin_layout Standard
14891 The LyX document classes
14907 correspond to the LaTeX document classes
14920 They are replacements for the standard document classes
14932 , resp., and fit better to Polish typography conventions in a number of points.
14936 \begin_layout Standard
14940 \begin_layout Itemize
14941 Unnumbered titles (with star, e.
14942 \begin_inset space \thinspace{}
14946 \begin_inset space \space{}
14953 ) are added into table of contents,
14956 \begin_layout Itemize
14957 Additional page styles:
14961 \begin_layout Description
14962 uheadings header with separated lines,
14965 \begin_layout Description
14966 myheadings custom header, contents headers via commands:
14981 \begin_layout Description
14982 myuheadings custom header with separated lines,
14985 \begin_layout Description
14986 outer page number is placed on outer side of page
14990 \begin_layout Itemize
14995 \begin_layout Description
14996 rmheadings serif titles — default,
14999 \begin_layout Description
15000 sfheadings sansserif titles,
15003 \begin_layout Description
15004 authortitle on title page first placed is author next title — default,
15007 \begin_layout Description
15008 titleauthor on title page first placed is title next author,
15011 \begin_layout Description
15012 withmarginpar reserve place on page for margins.
15016 \begin_layout Section
15020 \begin_layout Standard
15025 provides an alternative to the standard
15030 It provides similar functionality, but you might prefer this layout with
15031 sans serif sections, headings, and more.
15034 \begin_layout Section
15038 \begin_layout Standard
15044 \begin_layout Standard
15045 \begin_inset VSpace bigskip
15051 \begin_layout Standard
15056 \begin_inset space ~
15061 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15062 \begin_inset Formula $\beta$
15065 release of May, 1999) class.
15068 \begin_layout Standard
15073 textclass, which works with RevTeX 3.1.
15074 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15075 That means that it doesn't interact very well with LyX, which requires
15076 LaTeX2e, although it has been kludged to work.
15077 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15081 \begin_inset space ~
15086 textclass should also be pretty easy to use.
15089 \begin_layout Standard
15090 These documents are supposed to be used in
15094 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15095 macros, and assume you'll know what to put in the preamble if necessary.
15098 \begin_layout Subsection
15102 \begin_layout Standard
15103 All you need to do is install RevTeX 4, as described in the package's README
15105 The package can be found at The RevTeX 4 Web Site
15106 \begin_inset Flex URL
15109 \begin_layout Plain Layout
15111 http://publish.aps.org/revtex4/
15117 Install it somewhere that LaTeX can see it.
15118 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15120 \begin_inset space \thinspace{}
15124 \begin_inset space \space{}
15127 not the directory where you installed the class file.) Then, if you reconfigure
15128 LyX, it will find the class file and let you use the RevTeX4 textclass.
15131 \begin_layout Standard
15132 Probably the easiest way to get started is either to import a RevTeX 4 document
15140 \begin_inset space ~
15145 template, found in the templates directory.
15148 \begin_layout Subsection
15152 \begin_layout Standard
15153 Optional arguments to
15160 \begin_inset Quotes eld
15164 \begin_inset Quotes erd
15168 \begin_inset Quotes eld
15172 \begin_inset Quotes erd
15182 \begin_inset space ~
15190 \begin_inset space ~
15196 Remember that in RevTeX, at least one optional argument is required!
15199 \begin_layout Standard
15200 Other preamble matter, like
15207 \begin_inset space ~
15213 \begin_inset space ~
15218 dialog, also as usual.
15221 \begin_layout Subsection
15225 \begin_layout Standard
15226 The layouts basically correspond to the commands in RevTeX4.0.
15227 For example, the Email layout corresponds to
15234 Note that (at least as of RevTeX 4.0 Beta), the
15242 layouts are exactly equivalent, so you shouldn't need to use both.
15246 \begin_layout Plain Layout
15247 In case you're curious, both were included so that
15251 would be able to translate both
15271 \begin_layout Subsection
15275 \begin_layout Standard
15276 There are a couple of important unique aspects of RevTeX 4 which might cause
15277 bugs that will be even more confusing in LyX.
15280 \begin_layout Standard
15298 The LyX equivalent is that there is a separate Thanks layout.
15303 write footnotes in the
15307 layout, or weird things may happen.
15308 See the RevTeX 4 documentation for more details.
15311 \begin_layout Standard
15315 \begin_inset space ~
15323 \begin_inset space ~
15332 layouts must be placed
15340 layout and the corresponding
15357 , the LaTeX won't compile.
15360 \begin_layout Subsection
15364 \begin_layout Standard
15365 The main problem with this layout is that you can't use the optional arguments
15366 to layouts like Email and Title.
15367 (The problem is not unique to this layout; you can't use optional arguments
15368 to the Section layouts either.) This means that after you export that file
15369 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15370 need to edit the LaTeX file with a text editor to add the optional arguments
15372 \begin_inset space \thinspace{}
15376 \begin_inset space \space{}
15379 the running title for the page headers.
15380 Lacking these layouts makes the
15386 (and the equivalent
15392 ) useless, so the corresponding layouts don't exist, and will have to be
15397 \begin_layout Plain Layout
15402 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15403 has not been updated yet to take advantage of it.
15411 \begin_layout Section
15412 Springer Journals (
15419 \begin_layout Standard
15425 \begin_layout Subsection
15429 \begin_layout Standard
15430 These are the layout files for some of the journal formats used by Springer
15431 Verlag and listed on
15432 \begin_inset Flex URL
15435 \begin_layout Plain Layout
15437 http://www.springer.de/author/tex/help-journals.html
15442 , where you should also go to fetch the class files (yes, these are LaTeX2e
15444 It is a modular system: the things common to all journals are implemented
15449 , which journal-specific layout files (such as, e.
15450 \begin_inset space \thinspace{}
15454 \begin_inset space \space{}
15461 for Journal of Geodesy) can include.
15464 \begin_layout Standard
15465 This means that implementing support for any other Springer journal on this
15466 list is as simple as writing your own
15474 file following the outline given in
15482 \begin_layout Standard
15483 It is reasonably well tested only for the Journal of Geodesy.
15492 come with the standard LyX distribution.
15493 Install the relevant class file (downloaded from Springer) in a proper
15494 directory, reconfigure LaTeX (in the teTeX case by running
15498 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15499 and it should work.
15502 \begin_layout Subsection
15506 \begin_layout Standard
15507 A large number of theorem-like styles —
15513 \SpecialChar \ldots{}
15519 \begin_layout Standard
15522 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15523 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15526 See the Springer class file documentation for details.
15529 \begin_layout Subsection
15533 \begin_layout Itemize
15545 \begin_layout Itemize
15548 Probability Theory and Related Fields
15554 — Jean-Marc Lasgouttes
15557 \begin_layout Standard
15558 Add your own, it isn't so hard!
15561 \begin_layout Subsection
15565 \begin_layout Standard
15566 These files are partly based on the older
15570 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15571 file from Springer.
15576 layout, are now defunct.
15577 Jean-Marc Lasgouttes helped out big in making me find my way around the
15578 LyX layout file mechanism.
15581 \begin_layout Subsection
15585 \begin_layout Standard
15587 But probably less than in the old hacked-LaTeX
15594 \begin_layout Standard
15596 \begin_inset space \thinspace{}
15599 g.: does not display the number for theorem-like layouts, just #.
15602 \begin_layout Section
15608 \begin_inset CommandInset label
15617 \begin_layout Standard
15625 \begin_layout Subsection
15629 \begin_layout Standard
15630 This section describes how to use LyX to make slides for overhead projectors.
15631 There are two document classes that can do this: the default slides class
15637 This section documents the former.
15640 \begin_layout Standard
15641 I'm going to say this again, nice and clear, so that there's no misunderstanding
15645 \begin_layout Standard
15646 \begin_inset VSpace bigskip
15652 \begin_layout Standard
15656 This section documents the class
15657 \begin_inset Quotes eld
15665 \begin_inset Quotes erd
15673 \begin_layout Standard
15674 \begin_inset VSpace bigskip
15680 \begin_layout Standard
15681 If you're looking for the documentation for
15682 \begin_inset Quotes eld
15690 \begin_inset Quotes erd
15693 , check out section
15694 \begin_inset space ~
15698 \begin_inset CommandInset ref
15700 reference "sec:foiltex"
15710 \begin_inset Quotes eld
15718 \begin_inset Quotes erd
15721 ] is actually somewhat better than the default
15729 \begin_layout Plain Layout
15730 \SpecialChar \ldots{}
15731 or so I've been told repeatedly by its advocates.
15732 Having never used it, I have no idea if this claim is true or not.
15737 which this section documents.
15740 \begin_layout Standard
15741 This class is the LaTeX2e improvement of the old
15746 Every LaTeX2e distribution includes this class [which I'll just refer to
15748 \begin_inset Quotes eld
15756 \begin_inset Quotes erd
15759 from now on], so you're bound to have it.
15760 As I noted earlier, there are other classes, such as
15764 , which also produce slides for overhead projectors and do a better job
15766 However, there are some things which
15770 can do which the others can't, such as generate overlays.
15771 Read on to learn more!
15774 \begin_layout Subsection
15776 \begin_inset CommandInset label
15778 name "sec:slidesetup"
15785 \begin_layout Standard
15786 Obviously, to use this document class, you need to select
15787 \begin_inset Quotes eld
15795 \begin_inset Quotes erd
15798 from the class list in the
15800 Document\SpecialChar \menuseparator
15804 There are some other special things you should know about this class:
15807 \begin_layout Itemize
15808 Don't bother changing the options
15813 They're not supported by the
15820 \begin_layout Itemize
15824 \begin_inset space ~
15829 behaves a bit differently for this class.
15830 The possible choices and what they do are as follows:
15834 \begin_layout Description
15839 The final output contains page numbers in the lower right corner.
15842 \begin_layout Description
15851 , but also prints out any time markers you've put in.
15852 This is the default.
15855 \begin_layout Description
15860 The final output contains no page numbers, time markers, or alignment markers.
15864 \begin_layout Itemize
15869 class has an extra option:
15875 \begin_inset Quotes eld
15883 \begin_inset Quotes erd
15886 in the extra class options.
15890 \begin_layout Standard
15891 Using this options allows you to add time markers to
15897 \begin_inset space ~
15901 \begin_inset CommandInset ref
15903 reference "sec:slideNote"
15911 \begin_layout Standard
15912 You can also use the template file
15913 \begin_inset Quotes eld
15921 \begin_inset Quotes erd
15924 to automatically set up a document to use the
15930 File\SpecialChar \menuseparator
15932 \begin_inset space ~
15936 \begin_inset space ~
15941 to open your new document].
15942 The template file also contains some examples of the special paragraph
15943 environments used by this class.
15944 I'll describe those next.
15947 \begin_layout Subsection
15948 Paragraph Environments
15951 \begin_layout Subsubsection
15952 Supported Environments
15955 \begin_layout Standard
15956 The first thing you'll notice when you start up a new
15960 document is the font size and type: it's the equivalent of the size
15961 \begin_inset Quotes eld
15969 \begin_inset Quotes erd
15975 \begin_inset space ~
15981 This is also what's used in the output.
15983 \begin_inset Quotes eld
15987 \begin_inset Quotes erd
15990 to remind you that this is a slide.
15991 Your final slides will use a larger font; ergo, you'll have less space.
15992 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15995 \begin_layout Standard
15996 The next thing that becomes obvious is the changes to the paragraph environment
15997 pull-down box [at the far-left end of the toolbar].
15998 Most of the paragraph environments you're used to seeing are missing.
15999 There are also five new ones.
16004 class itself only supports certain paragraph environments:
16007 \begin_layout Itemize
16013 \begin_layout Itemize
16019 \begin_layout Itemize
16025 \begin_layout Itemize
16031 \begin_layout Itemize
16037 \begin_layout Itemize
16043 \begin_layout Itemize
16049 \begin_layout Itemize
16055 \begin_layout Itemize
16061 \begin_layout Itemize
16067 \begin_layout Itemize
16073 \begin_layout Standard
16074 All of the other standard environments, including the section-heading environmen
16075 ts, aren't used in the
16082 \begin_layout Standard
16083 On the other hand, you'll notice the following new environments:
16086 \begin_layout Itemize
16092 \begin_layout Itemize
16098 \begin_layout Itemize
16104 \begin_layout Itemize
16110 \begin_layout Itemize
16116 \begin_layout Standard
16117 These five are kind of quirky, due to a
16118 \begin_inset Quotes eld
16122 \begin_inset Quotes erd
16126 You see, LyX doesn't permit you to nest any other paragraph environment
16127 into an empty environment.
16128 Now, that's fine and dandy, but it means that you wouldn't be able to start
16129 a slide with anything except plain text.
16130 To deal with this, I've performed a little
16131 \begin_inset Quotes eld
16135 \begin_inset Quotes erd
16141 \begin_layout Subsubsection
16142 Quirks of the New Environments
16143 \begin_inset CommandInset label
16145 name "sec:slideQuirk"
16152 \begin_layout Standard
16153 All five of the new paragraph environments are somewhat quirky due to inherent
16154 limitiations in the current version of LyX.
16155 As I just mentioned, LyX forbids environments that begin with another environme
16157 To get around this, the
16161 environment isn't a paragraph environment as described in the
16169 \begin_layout Standard
16170 You should consider
16183 \begin_inset Quotes eld
16186 pseudo-environments.
16187 \begin_inset Quotes erd
16190 They look like a section heading or a
16191 \begin_inset Quotes eld
16199 \begin_inset Quotes erd
16202 but really begin a [and, if necessary, end the previous] paragraph environment.
16212 \begin_inset Quotes eld
16216 \begin_inset Quotes erd
16219 These two perform some action.
16222 \begin_layout Standard
16223 A common feature of all five environments,
16243 , is a rather long-ish label.
16244 The text following this label — ordinarily the contents of the paragraph
16245 environment — is utterly irrelevant for
16266 LyX completely ignores it.
16267 In fact, you can leave these five environments completely empty.
16271 \begin_layout Standard
16276 to put any text after the rather long-ish label, you might want to.
16277 This could be a short description of the contents of the
16282 In that case, enter your descriptive comment and hit
16286 as you normally would.
16289 \begin_layout Standard
16290 If, on the other hand, you don't want to enter any descriptive text, you'll
16291 hit another LyX quirk.
16292 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16293 environment until you put something in the old one.
16297 \begin_layout Itemize
16298 Start entering the text that will
16326 \begin_layout Itemize
16327 Now move to the beginning of that paragraph.
16331 \begin_layout Itemize
16340 \begin_layout Itemize
16341 Finally, change this new, empty paragraph to a
16365 \begin_layout Standard
16366 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16370 \begin_layout Subsection
16371 Making a Presentation with
16384 \begin_layout Subsubsection
16392 \begin_layout Standard
16393 If you're expecting this section to teach you how to actually make a presentatio
16394 n, you'll be sorely disappointed.
16395 Naturally, I'll describe all of the ways the
16399 class can assist you in preparing the materials for a presentation.
16400 Filling in the contents, however, is up to you.
16405 the LyX philosophy.]
16408 \begin_layout Standard
16413 environment [in the manner described in section
16414 \begin_inset space ~
16418 \begin_inset CommandInset ref
16420 reference "sec:slideQuirk"
16424 ] tells LyX to begin a new slide [duh].
16425 The label for this environment/
16426 \begin_inset Quotes erd
16430 \begin_inset Quotes erd
16434 \begin_inset Quotes eld
16438 \begin_inset Quotes erd
16441 in cool blue, followed by the label,
16442 \begin_inset Quotes eld
16446 \begin_inset Quotes erd
16450 Any text or paragraph environments that follow this one go on the new slide.
16454 \begin_layout Standard
16455 Slides are probably the only time you'll need to forcibly end pages in LyX
16456 (this can be specified in the
16461 In fact, you'll want to, once you finish entering the contents of one slide.
16462 If you've entered more text than can physically fit on a slide, the extra
16463 overflows onto a new slide.
16464 I don't recommend doing this, however, since the overflow slide won't have
16465 any page number on it.
16466 Furthermore, it may interfere with any
16470 you've made to accompany the oversized
16477 \begin_layout Standard
16486 environments work the same way as the
16491 They both create an
16492 \begin_inset Quotes eld
16496 \begin_inset Quotes erd
16499 followed by a label [
16500 \begin_inset Quotes eld
16504 \begin_inset Quotes erd
16508 \begin_inset Quotes eld
16512 \begin_inset Quotes erd
16516 The color is a stunning magenta instead of blue, and the
16517 \begin_inset Quotes eld
16521 \begin_inset Quotes erd
16524 will look different, in style and in length.
16525 The label fonts of all three also differ from one another.
16528 \begin_layout Standard
16533 , if the contents of a
16541 exceed the physical size of a slide or sheet of paper, the extra will overflow
16543 Again, you should avoid this.
16544 It defeats the whole purpose of
16555 \begin_layout Subsubsection
16565 \begin_layout Standard
16570 is a slide that sits atop another slide.
16571 Perhaps you wish to discuss a figure on the main
16575 before displaying the text associated with it.
16576 One way to accomplish this is tape a flap of dark paper over the part of
16581 you want to display later.
16582 This method fails, however, if you wish to overlap one graph with another,
16584 You would then have to fumble while speaking to align the two separate,
16589 s to align the two graphs.
16594 environment in both cases makes life much easier.
16597 \begin_layout Standard
16602 receives the page number of its
16603 \begin_inset Quotes eld
16607 \begin_inset Quotes erd
16615 \begin_inset Quotes eld
16623 \begin_inset Quotes erd
16630 \begin_layout Plain Layout
16631 Presumably, mutliple
16636 \begin_inset Quotes eld
16644 \begin_inset Quotes erd
16648 \begin_inset Quotes eld
16656 \begin_inset Quotes erd
16660 \begin_inset Quotes eld
16668 \begin_inset Quotes erd
16672 \begin_inset space ~
16675 appended to the page number of the parent
16685 Clearly, you want the contents of both the
16693 to each fit on a single physical slide! You should probably consider an
16699 \begin_inset Quotes eld
16703 \begin_inset Quotes erd
16715 class provides a visual cue for this: the label at the start of an
16719 is shorter than that at the start of a
16724 Lastly, when you generate printable output, you'll find alignment markers
16725 in all four corners of both the
16729 page and its parent
16734 These will assist you in lining up the two physical slides.
16737 \begin_layout Standard
16738 The major problem in overlaying two slides is aligning the contents of the
16739 two transparencies.
16740 How much space should you leave for that graph on the second slide? Worse
16741 still, what if you want a graph and a sentence on second slide, but there
16742 is text on the main transparency that goes in between them? You could try
16743 and insert vertical space of the right size.
16744 The better way is to use
16755 \begin_layout Standard
16756 As their names imply,
16764 are two command-like paragraph environments that make all subsequent text
16765 invisible and visible, respectively.
16767 \begin_inset space ~
16771 \begin_inset CommandInset ref
16773 reference "sec:slideQuirk"
16777 that you don't place anything
16781 these two environments, however.
16786 , it inserts a centered, sky-blue label into the page reading
16787 \begin_inset Quotes eld
16790 <Invisible Text Follows>
16791 \begin_inset Quotes erd
16795 For paragraphs following this label, the parts of the
16803 ; it doesn't matter which] where they would be contain instead blank space.
16807 \begin_layout Standard
16812 , the corresponding centered label is
16813 \begin_inset Quotes eld
16816 <Visible Text Follows>
16817 \begin_inset Quotes erd
16821 Paragraphs following this label behave normally.
16822 Note that the beginning of a new
16834 automatically shuts off an
16839 It's therefore not necessary to use
16850 \begin_layout Standard
16851 By now, it should be obvious how to create overlay transparencies using
16852 the proper combination of
16871 \begin_layout Enumerate
16876 , including everything that will appear on it, whether on the main slide
16884 \begin_layout Enumerate
16885 Before each figure or paragraph that will appear only on the
16894 If necessary, insert a
16898 environment after the
16905 \begin_layout Enumerate
16910 immediately following the
16917 \begin_layout Enumerate
16918 Copy the contents of this
16929 \begin_layout Enumerate
16934 , change all of the
16945 \begin_layout Standard
16947 You've just made an
16954 \begin_layout Standard
16955 There's one problem with the way I've designed the LyX
16959 class: you can't make text in the middle of a paragraph invisible, nor
16960 make text in the middle of an invisible paragraph visible again.
16961 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16965 \begin_layout Plain Layout
16966 The commands of interest are:
16969 \begin_layout Itemize
16974 invisible \SpecialChar \ldots{}
16978 \begin_layout Itemize
16983 visible \SpecialChar \ldots{}
16987 \begin_layout Plain Layout
16988 \SpecialChar \ldots{}
16989 and need to be marked as TeX.
16991 \begin_inset Quotes eld
16995 \begin_inset Quotes erd
16998 you wish to change goes in between the brackets [and after the
17011 If you don't know how to mark text as TeX, see the appropriate section
17024 \begin_layout Subsubsection
17034 \begin_inset CommandInset label
17036 name "sec:slideNote"
17043 \begin_layout Standard
17052 is associated with a
17053 \begin_inset Quotes eld
17057 \begin_inset Quotes erd
17069 class provides visual cues.
17074 is shorter than that of a
17078 [yet longer than that of an
17082 ] and, like the label of an
17086 is shockingly magenta.
17087 Additionally, the printed
17091 has the page number of its
17092 \begin_inset Quotes eld
17096 \begin_inset Quotes erd
17104 \begin_inset Quotes eld
17112 \begin_inset Quotes erd
17116 \begin_inset Quotes eld
17124 \begin_inset Quotes erd
17128 \begin_inset Quotes eld
17136 \begin_inset Quotes erd
17140 You can have multiple
17144 s associated with a single
17156 , you'll probably want to break up long
17160 s so that they fit on a single sheet of paper.
17163 \begin_layout Standard
17168 is obvious: it contains anything additional you might want to say about
17174 It could also be used as a sheet of reminders for a particular
17179 In the case of the latter, you might want to make use of time markers.
17185 \begin_inset Quotes eld
17189 \begin_inset Quotes erd
17192 support for time markers, a
17197 So, you'll have to resort to using the LaTeX codes.
17200 \begin_layout Standard
17201 To use time markers, you'll need to specify the extra class option
17202 \begin_inset Quotes eld
17210 \begin_inset Quotes erd
17214 \begin_inset space ~
17218 \begin_inset CommandInset ref
17220 reference "sec:slidesetup"
17225 This option turns on timing marks, which will appear in the lower-left-hand
17231 To set what appears in the time marker, you use the LaTeX commands
17232 \begin_inset Quotes eld
17242 \begin_inset Quotes erd
17246 \begin_inset Quotes eld
17256 \begin_inset Quotes erd
17260 The arguments of both commands are time measured in seconds.
17262 \begin_inset Quotes eld
17272 \begin_inset Quotes erd
17275 sets the time marker to a given time.
17277 \begin_inset Quotes eld
17287 \begin_inset Quotes erd
17290 increments the time marker by the specified amount.
17291 Using time markers and
17295 s in this fashion, you can remind yourself how much time to spend on a particula
17303 \begin_layout Standard
17304 There's one last feature to describe.
17305 Clearly, you'd like to print out all of your
17313 s on transparencies while printing all of your
17330 with which it is associated.
17331 What's a person to do?
17334 \begin_layout Standard
17335 Luckily, there are two LaTeX commands that allow you to select what to print
17337 Both must be placed into the preamble of your document.
17339 \begin_inset Quotes eld
17351 \begin_inset Quotes erd
17354 will cause the output to contain only the
17363 Correspondingly, the command
17364 \begin_inset Quotes eld
17376 \begin_inset Quotes erd
17379 prevents the output of anything but
17384 I'd advise placing both commands in the preamble and initially comment
17386 You can then preview your entire presentation as you write.
17387 When you're done writing, you can then uncomment one of the two to select
17388 what you want to print.
17389 I like to uncomment
17390 \begin_inset Quotes eld
17402 \begin_inset Quotes erd
17405 , print to a file with
17406 \begin_inset Quotes eld
17414 \begin_inset Quotes erd
17417 in its name, comment it back out, then uncomment
17418 \begin_inset Quotes eld
17430 \begin_inset Quotes erd
17434 \begin_inset Quotes eld
17442 \begin_inset Quotes erd
17446 I can then send either file to a printer, loading transparencies or plain
17447 paper as appropriate.
17450 \begin_layout Standard
17451 You can also provide other arguments to the
17452 \begin_inset Quotes eld
17462 \begin_inset Quotes erd
17466 \begin_inset Quotes eld
17476 \begin_inset Quotes erd
17480 See a good LaTeX book for details.
17483 \begin_layout Subsection
17488 Class Template File
17491 \begin_layout Standard
17492 I have also provided a template file,
17493 \begin_inset Quotes eld
17501 \begin_inset Quotes erd
17509 To use it, begin your new presentation with
17514 ile\SpecialChar \menuseparator
17516 \begin_inset space ~
17520 \begin_inset space ~
17530 Your new LyX presentation file will contain an example
17551 additionally contain an example of the use of
17560 Lastly, the preamble will contain:
17563 \begin_layout LyX-Code
17564 % Uncomment to print out only slides and overlays
17567 \begin_layout LyX-Code
17571 \begin_layout LyX-Code
17577 \begin_inset Newline newline
17583 \begin_layout LyX-Code
17584 % Uncomment to print out only notes
17587 \begin_layout LyX-Code
17591 \begin_layout LyX-Code
17599 \begin_layout Standard
17600 One final thing: I created this class to support the LaTeX2e
17601 \begin_inset Quotes eld
17609 \begin_inset Quotes erd
17612 class, one of the built-in LaTeX2e classes.
17613 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17614 built-in slide class.
17615 It's here if you want it or need it.
17616 There exist other LaTeX2e classes for creating presentations, such as the
17622 \begin_inset space ~
17626 \begin_inset CommandInset ref
17628 reference "sec:foiltex"
17633 \begin_inset Quotes eld
17641 \begin_inset Quotes erd
17644 package [present on some TeX distributions].
17645 The latter is not yet supported under LyX.
17649 \begin_layout Plain Layout
17650 Perhaps you can take on the task\SpecialChar \ldots{}
17656 I know nothing about these other classes.
17657 Try them out to see what sort of alternative they provide.
17660 \begin_layout Chapter
17661 LyX Features needing Extra Software
17664 \begin_layout Section
17668 \begin_layout Standard
17674 \begin_layout Subsection
17678 \begin_layout Standard
17687 \begin_layout Plain Layout
17692 is not yet available when you are using the LaTeX distribution MiKTeX.
17697 , you'll find in the
17704 \begin_inset space ~
17715 \begin_inset CommandInset href
17717 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17724 \begin_layout Standard
17729 package is a program that was written by
17730 \begin_inset Flex Noun
17733 \begin_layout Plain Layout
17735 \begin_inset space ~
17743 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17744 and easy to forget.
17745 The program runs over your LaTeX file, checks the integrity of the file,
17746 and flags some common errors.
17747 In other technical words, it is
17754 \begin_layout Standard
17755 Well, what is a syntax checker doing in LyX which is supposed to produce
17756 correct LaTeX anyways? The answer is simple: Just as
17760 not only checks the
17764 of C programs, but also does
17768 checks for type-errors,
17772 catches some common
17776 errors, in addition to the syntactical ones.
17781 is capable of detecting several common errors, such as
17784 \begin_layout Itemize
17785 Ellipsis detection:
17786 \begin_inset Newline newline
17789 Use \SpecialChar \ldots{}
17793 \begin_layout Itemize
17794 No space in front of/after parenthesis:
17795 \begin_inset Newline newline
17801 \begin_layout Itemize
17802 Enforcement of normal space after common abbreviations:
17803 \begin_inset Newline newline
17807 \begin_inset space \thinspace{}
17811 \begin_inset space \space{}
17814 is too wide spacing.
17817 \begin_layout Itemize
17818 Enforcement of end-of-sentence space when the last sentence ends with a
17820 \begin_inset Newline newline
17824 And this is wrong spacing.
17827 \begin_layout Itemize
17828 Space in front of labels and similar commands:
17829 \begin_inset Newline newline
17832 The label should stick right up to the text to avoid falling to a wrong
17835 \begin_inset CommandInset label
17845 \begin_layout Plain Layout
17846 This footnote is in danger of falling off to a wrong page
17851 The label is separated too much.
17854 \begin_layout Itemize
17855 Space in front of references, instead of hard spaces:
17856 \begin_inset Newline newline
17859 In you are in bad luck, the text will break right between the referenced
17860 text and reference number, and that's a pity.
17862 \begin_inset CommandInset ref
17864 reference "sec:chktex"
17871 \begin_layout Itemize
17873 \begin_inset Quotes eld
17877 \begin_inset Quotes erd
17881 \begin_inset Formula $\times$
17885 \begin_inset Newline newline
17888 2x2 looks cheap compared to
17889 \begin_inset Formula $2\times2$
17895 \begin_layout Standard
17896 and more \SpecialChar \ldots{}
17897 It is an invaluable tool when you are
17898 \begin_inset Quotes eld
17902 \begin_inset Quotes erd
17905 your document before printing, and you should run it right after the obligatory
17906 spelling check, and before you go fine tuning the typesetting.
17909 \begin_layout Subsection
17913 \begin_layout Standard
17914 If you have the program installed, usage is as simple as choosing
17916 Tools\SpecialChar \menuseparator
17918 \begin_inset space ~
17924 This will make LyX generate a LaTeX file of your document, start
17928 to check it, and then make LyX insert
17929 \begin_inset Quotes eld
17933 \begin_inset Quotes erd
17936 with the warnings from
17940 , if there were any.
17941 The warnings will be placed close to the point of the mistake, and you
17942 can quickly find them by using the
17944 Navigate\SpecialChar \menuseparator
17947 menu item, or the shortcut key
17956 Open the error boxes by clicking on them with the mouse, or use the shortcut
17965 bindings, or the corresponding
17974 Read the warning and correct the mistake, if it is a mistake.
17975 If you have trouble understanding what the warning is about, you can safely
17977 Remember that there is a hidden layer between the document on screen and
17978 the technical details in invoking
17982 , and this gap can make some warnings seem arcane or just right down plain
17986 \begin_layout Standard
17987 This document is an excellent testing bed for the feature, and it should
17988 provide quite a few warnings for you to fiddle with.
17989 Since computers are only so smart, expect most of the warnings to be false
17993 \begin_layout Subsection
17994 How to fine tune it
17997 \begin_layout Standard
17998 Sometimes, you'll find that
18002 makes more noise than suits your mood.
18003 Then you can choose not to use it, wait until your mood changes, or try
18008 to get better along with you.
18009 Another choice in the most desperate situations is to use
18011 View\SpecialChar \menuseparator
18013 \begin_inset space ~
18017 \begin_inset space ~
18021 \begin_inset space ~
18026 , which will get rid of all warnings instantly.
18029 \begin_layout Standard
18038 very configurable and extensible, you shouldn't expect to solve all problems
18044 Since LyX has to generate a somewhat special LaTeX file to be able to match
18045 the line numbers from the
18053 \begin_layout Plain Layout
18054 You can inspect the specific output from
18060 Edit\SpecialChar \menuseparator
18062 \begin_inset space ~
18066 \begin_inset space ~
18080 to the internal document structure, some of the warnings will not seen
18081 to appear correctly.
18082 There are two things you can do about this:
18085 \begin_layout Itemize
18090 invocation command line in
18106 installation configuration file (usually with the file
18111 See below to learn what warnings can be enabled and disabled on the command
18116 \begin_layout Itemize
18117 Export your document as a raw LaTeX file using
18119 File\SpecialChar \menuseparator
18120 Export\SpecialChar \menuseparator
18128 Invoked in this way, it can be a hassle to find the corresponding place
18129 in the document inside LyX, but with a little patience, you should be able
18133 \begin_layout Standard
18134 Here follows the warning messages that can be enabled and disabled in
18143 to disable a warning, and
18147 to enable a warning.
18148 The emphasized entries are disabled by default, because the default is
18151 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18156 \begin_layout Standard
18157 Notice that you should only use the options that enable and disable warnings,
18158 because LyX relies on some of the other command line parameters to be set
18159 in a specific way to have a chance to communicate with
18166 \begin_layout Enumerate
18170 Command terminated with space.
18173 \begin_layout Enumerate
18176 Non-breaking space (
18177 \begin_inset Quotes eld
18185 \begin_inset Quotes erd
18188 ) should have been used.
18191 \begin_layout Enumerate
18195 You should enclose the previous parenthesis with
18196 \begin_inset Quotes eld
18204 \begin_inset Quotes erd
18210 \begin_layout Enumerate
18213 Italic correction (
18214 \begin_inset Quotes eld
18224 \begin_inset Quotes erd
18227 ) found in non-italic buffer.
18230 \begin_layout Enumerate
18233 Italic correction (
18234 \begin_inset Quotes eld
18244 \begin_inset Quotes erd
18247 ) found more than once.
18250 \begin_layout Enumerate
18254 No italic correction (
18255 \begin_inset Quotes eld
18265 \begin_inset Quotes erd
18271 \begin_layout Enumerate
18275 \begin_inset Quotes eld
18283 \begin_inset Quotes erd
18287 \begin_inset Quotes eld
18295 \begin_inset Quotes erd
18301 \begin_layout Enumerate
18304 Wrong length of dash may have been used.
18307 \begin_layout Enumerate
18311 \begin_inset Quotes eld
18319 \begin_inset Quotes erd
18323 \begin_inset Quotes eld
18331 \begin_inset Quotes erd
18337 \begin_layout Enumerate
18341 \begin_inset Quotes eld
18349 \begin_inset Quotes erd
18355 \begin_layout Enumerate
18359 \begin_inset Quotes eld
18367 \begin_inset Quotes erd
18370 to achieve an ellipsis.
18373 \begin_layout Enumerate
18376 Inter-word spacing (
18377 \begin_inset Quotes eld
18387 \begin_inset Quotes eld
18390 ) should perhaps be used.
18393 \begin_layout Enumerate
18396 Inter-sentence spacing (
18397 \begin_inset Quotes eld
18407 \begin_inset Quotes erd
18410 ) should perhaps be used.
18413 \begin_layout Enumerate
18416 Could not find argument for command.
18419 \begin_layout Enumerate
18423 \begin_inset Quotes eld
18431 \begin_inset Quotes erd
18437 \begin_layout Enumerate
18440 Math mode still on at end of LaTeX file.
18443 \begin_layout Enumerate
18447 \begin_inset Quotes eld
18455 \begin_inset Quotes erd
18458 doesn't match the number of
18459 \begin_inset Quotes eld
18467 \begin_inset Quotes erd
18473 \begin_layout Enumerate
18476 You should use either
18479 \begin_inset Quotes eld
18487 \begin_inset Quotes erd
18492 as an alternative to
18493 \begin_inset Quotes eld
18501 \begin_inset Quotes erd
18507 \begin_layout Enumerate
18514 " (ASCII 39) instead of "
18521 \begin_layout Enumerate
18524 User-specified pattern found.
18527 \begin_layout Enumerate
18530 This command might not be intended.
18533 \begin_layout Enumerate
18540 \begin_layout Enumerate
18558 \begin_layout Enumerate
18561 Delete this space to maintain correct page references.
18564 \begin_layout Enumerate
18568 You might wish to put this between a pair of
18569 \begin_inset Quotes eld
18577 \begin_inset Quotes erd
18583 \begin_layout Enumerate
18586 You ought to remove spaces in front of punctuation.
18589 \begin_layout Enumerate
18592 Could not execute LaTeX command.
18595 \begin_layout Enumerate
18604 in front of small punctuation.
18607 \begin_layout Enumerate
18615 may look prettier here.
18618 \begin_layout Enumerate
18622 Multiple spaces detected in output.
18625 \begin_layout Enumerate
18628 This text may be ignored.
18631 \begin_layout Enumerate
18637 \begin_inset Quotes eld
18642 to begin quotation, not
18649 \begin_layout Enumerate
18656 to end quotation, not
18659 \begin_inset Quotes eld
18667 \begin_layout Enumerate
18673 \begin_layout Enumerate
18676 You should perhaps use
18677 \begin_inset Quotes eld
18685 \begin_inset Quotes erd
18691 \begin_layout Enumerate
18694 You should put a space in front of/after parenthesis.
18697 \begin_layout Enumerate
18700 You should avoid spaces in front of/after parenthesis.
18703 \begin_layout Enumerate
18707 You should not use punctuation in front of/after quotes.
18710 \begin_layout Enumerate
18713 Double space found.
18716 \begin_layout Enumerate
18719 You should put punctuation outside inner/inside display math mode.
18722 \begin_layout Enumerate
18725 You ought to not use primitive TeX in LaTeX code.
18728 \begin_layout Enumerate
18731 You should remove spaces in front of
18732 \begin_inset Quotes eld
18740 \begin_inset Quotes erd
18746 \begin_layout Enumerate
18749 \begin_inset Quotes eld
18757 \begin_inset Quotes erd
18760 is normally not followed by
18761 \begin_inset Quotes eld
18769 \begin_inset Quotes erd
18775 \begin_layout Standard
18776 In later versions of LyX, we hope to provide a more complete interface to
18777 this tool (and it's smaller cousin
18781 ) to exploit the full power of it.
18782 But it's not exactly useless as it is now: go try it on one of your existing
18783 documents of a certain length and be surprised.
18786 \begin_layout Section
18787 Version Control in LyX
18790 \begin_layout Standard
18793 Lars Gullik Bjønnes
18800 \begin_layout Subsection
18804 \begin_layout Standard
18805 A friend of mine wanted to try LyX for a group project.
18806 When he didn't find support for version control or file locking, he dropped
18808 This angered me a bit, so I thought that I should at least make support
18809 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18810 This has been done.
18811 LyX now supports some of the most basic RCS/CVS/SVN commands.
18812 If you need something a bit more sophisticated you will have to do that
18813 manually in a terminal.
18816 \begin_layout Standard
18817 Before you begin to use the version control features in LyX, you should
18818 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18819 Also note that CVS support is not as good as subversion support so we advice
18821 Good place to start with Subversion is SVN Book
18825 \begin_layout Plain Layout
18826 \begin_inset CommandInset href
18828 target "http://svnbook.red-bean.com/"
18838 In case of RCS you should read
18839 \begin_inset Quotes eld
18843 \begin_inset Quotes erd
18846 (a man file, read it with
18851 This file describes all the basic features of RCS.
18852 You should especially notice the comment about a RCS directory, and the
18853 notion of a master RCS file (the file ending in
18860 \begin_layout Standard
18861 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18862 package—no guarantees are made for older versions.
18863 Most of the log messages are not currently displayed after operations —
18864 you can check them in Messages pane if unsure.
18867 \begin_layout Standard
18868 For introducing your own external commands consult vc-command in the manual
18872 \begin_layout Subsection
18873 RCS commands in LyX
18876 \begin_layout Standard
18877 The following sections describe the RCS commands supported by LyX.
18878 You can find them in the
18880 File\SpecialChar \menuseparator
18882 \begin_inset space ~
18888 LyX was tested against RCS 5.7.
18891 \begin_layout Subsubsection
18897 \begin_layout Standard
18898 If your document is not under revision control, this is the only item shown
18900 And if it is under revision control, the
18904 item is not visible.
18908 \begin_layout Standard
18909 This command registers your document with RCS (unless you are under the
18910 directory managed by CVS)\SpecialChar \@.
18911 You are asked interactively to supply an initial
18912 description of the document.
18913 The document is now set in Read-Only mode and you have to
18916 \begin_inset space ~
18920 \begin_inset space ~
18924 \begin_inset space ~
18929 , before making any changes to it.
18930 A document under revision control has a
18931 \begin_inset Quotes eld
18934 [RCS:<version> <locker>]
18935 \begin_inset Quotes erd
18938 item tagged to the filename in the minibuffer.
18941 \begin_layout Standard
18942 RCS command that is run:
18944 ci -q -u -i -t-"<initial description>" <file-name>
18947 \begin_layout Standard
18952 to understand the switches.
18956 \begin_layout Subsubsection
18962 \begin_layout Standard
18963 When you are finished editing a file, you check in your changes.
18964 When you do this, you are asked for a description of the changes.
18965 This is stored in the history log.
18966 The version number is bumped, your changes are applied to the master RCS
18967 file, the document is unlocked and set to Read-Only mode.
18971 \begin_layout Standard
18974 ci -q -u -m"<description>" <file-name>
18977 \begin_layout Subsubsection
18983 \begin_layout Standard
18984 By doing this you lock the document so that only you can edit it.
18985 This will also make the document Read-Write only for you.
18986 You will usually continue editing for a while and when you are finished
18987 you check in your changes.
18988 The status line is changed to reflect that you have locked the file.
18992 \begin_layout Standard
18995 co -q -l <file-name>
18998 \begin_layout Subsubsection
19001 Revert To Repository Version
19004 \begin_layout Standard
19005 This will discard all changes made to the document since the last check
19007 You get a warning before changes are discarded.
19010 \begin_layout Standard
19013 co -f -u<version> <file-name>
19016 \begin_layout Subsubsection
19022 \begin_layout Standard
19023 This makes as if the last check in never happened.
19024 No changes are made to the document loaded into LyX, but the last version
19025 is removed from the master RCS file.
19029 \begin_layout Standard
19032 rcs -o<version> <file-name>
19035 \begin_layout Subsubsection
19041 \begin_layout Standard
19042 This shows the complete history of the RCS document.
19047 is shown in a browser.
19055 \begin_layout Subsubsection
19059 \begin_layout Standard
19060 LyX supports RCS version number information (only), see
19061 \begin_inset CommandInset ref
19063 reference "sub:VCS-Revision-Information"
19070 \begin_layout Subsection
19071 CVS commands in LyX
19074 \begin_layout Standard
19075 A subset of CVS operations is supported by LyX.
19076 You can find the commands in the
19078 File\SpecialChar \menuseparator
19080 \begin_inset space ~
19086 The version control system SVN is more powerful, so please use it instead
19087 of CVS if possible.
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 If you start from scratch with CVS you have to create your repository and
19098 checkout the working copy with external tools.
19099 If you're using a client-server setup you may need to login before doing
19100 the first repository checkout.
19103 \begin_layout Standard
19104 If your documents are under revision control and others are using the same
19105 repository problems arise when different changes to the same document at
19106 the same location happen.
19107 Standard CVS repositories doesn't operate with a file locking mechanism.
19108 This may be surprising, but conflicts only occur if people disagree on
19109 the proper content of the same part of a document.
19110 So, if co-workers are used to communicate regularly, these conflicts occur
19112 If they don't communicate they have a fundamental problem anyway.
19113 Nevertheless some people like to work with so called
19114 \begin_inset Quotes eld
19118 \begin_inset Quotes erd
19122 If they do so the working copy of all files is readonly when checked out
19123 first and the user starts editing after using a special command to make
19124 the working copy writable.
19125 When the changes are checked in the working copy returns to readonly state.
19126 With LyX one has to edit the
19127 \begin_inset Flex Code
19130 \begin_layout Plain Layout
19136 file and add the line
19137 \begin_inset Flex Code
19140 \begin_layout Plain Layout
19146 to work with reserved checkouts.
19147 The benefit is the possibility to see who is using a writable copy of some
19149 It's not guaranteed only one user makes a copy writable.
19152 \begin_layout Standard
19153 LyX tries to guess if you're using reserved or non-reserved checkouts.
19154 If your working copy is readonly or it is writable and an additional copy
19155 of your document exists in the CVS/Base sub-directory a reserved otherwise
19156 a non-reserved checkout is assumed.
19157 When a reserved checkout is detected you have to use
19158 \begin_inset Flex MenuItem
19161 \begin_layout Plain Layout
19167 to make your working copy writable if it's readonly.
19169 \begin_inset Flex MenuItem
19172 \begin_layout Plain Layout
19178 operation is possible and that makes your working copy readonly again after
19179 transferring your changes to the repository.
19182 \begin_layout Standard
19183 More information about CVS can be found here
19184 \begin_inset Flex URL
19187 \begin_layout Plain Layout
19189 http://www.nongnu.org/cvs
19195 \begin_inset Flex URL
19198 \begin_layout Plain Layout
19200 http://ximbiot.com/cvs
19208 \begin_layout Standard
19213 to understand the sub-commands and the switches mentioned below.
19216 \begin_layout Subsubsection
19222 \begin_layout Standard
19223 If your document is not under revision control, this is the only item shown
19225 And if it is under revision control, the
19232 item is not visible.
19236 \begin_layout Standard
19237 This command registers in CVS your document
19240 \begin_inset Flex Strong
19243 \begin_layout Plain Layout
19253 in case you have already the documents directory under CVS control (in
19259 This means you have to create or checkout the archive by yourself using
19261 (In case you forget that step LyX registers the document with RCS.)
19264 \begin_layout Standard
19265 Then you are asked interactively to supply an initial description of the
19267 Don't forget that registered file is not yet checked in.
19270 \begin_layout Standard
19271 CVS command that is run:
19273 cvs -q add -m"<entered message>" "<file-name>"
19276 \begin_layout Standard
19281 above and for all other CVS commands is an abbreviation for
19282 \begin_inset Quotes eld
19285 change the current working directory to file location and use the file name
19286 without path component as argument
19287 \begin_inset Quotes erd
19293 \begin_layout Subsubsection
19299 \begin_layout Standard
19300 When you are finished editing a file, you commit your changes.
19301 When you do this and you had changed the document, you are asked for a
19302 description of the changes.
19303 After that changes are written to the repository.
19304 In case you didn't change the document and a reserved checkout is detected
19305 the reservation made on
19306 \begin_inset Flex MenuItem
19309 \begin_layout Plain Layout
19318 \begin_layout Labeling
19319 \labelwidthstring 00.00.0000
19321 \begin_inset space ~
19325 \begin_inset space ~
19329 \begin_inset Newline newline
19333 \begin_inset Flex Code
19336 \begin_layout Plain Layout
19339 -q commit -m"<description>" "<file-name>"
19345 \begin_inset Newline newline
19349 \begin_inset Flex Code
19352 \begin_layout Plain Layout
19363 \begin_layout Subsubsection
19369 \begin_layout Standard
19370 When you are sharing a repository with others, you may have to incorporate
19371 their changes into your working copy.
19374 \begin_layout Standard
19377 cvs -q update "<file-name>"
19380 \begin_layout Standard
19381 If a readonly checkout is detected the working copy is made writable and
19385 \begin_layout Standard
19388 cvs -q edit "<file-name>"
19391 \begin_layout Subsubsection
19394 Revert To Repository Version
19397 \begin_layout Standard
19398 This will discard all changes made to the document since the last check
19400 You get a warning before changes are discarded.
19401 Firstly the file is deleted, secondly CVS update command is run.
19404 \begin_layout Standard
19407 cvs -q update "<file-name>"
19410 \begin_layout Standard
19411 If a reserved checkout is detected and the working copy has no changes only
19412 the reservation is undone.
19415 \begin_layout Standard
19418 cvs -q unedit "<file-name>"
19421 \begin_layout Subsubsection
19422 Update of the local directory checkout from repository
19425 \begin_layout Standard
19426 Once your documents gets more complex, containing sub-documents and pictures,
19428 \begin_inset Flex Code
19431 \begin_layout Plain Layout
19437 files and so on using version control becomes more complicated.
19438 LyX supports updating the whole tree in which resides the document.
19439 This become especially useful once you cooperate with people which neither
19440 have detailed knowledge about CVS usage nor they have ambition to commit
19441 additional material to the repository.
19442 You have to organize the files structure so that all external files are
19443 in the same directory or subdirectories of the document.
19444 It's good practice anyway to store multipart documents in an extra directory.
19447 \begin_layout Standard
19449 \begin_inset Flex Code
19452 \begin_layout Plain Layout
19453 Update local directory from repository
19458 command updates the whole directory.
19459 If local changes are detected user is warned before update starts.
19460 In case of merge conflicts both versions of the conflicting document parts
19461 are placed in the final document.
19462 You have to review and correct the result of the merge.
19463 You'll find the conflicts enclosed in pairs of
19464 \begin_inset Flex Code
19467 \begin_layout Plain Layout
19474 \begin_inset Flex Code
19477 \begin_layout Plain Layout
19484 \begin_inset Flex Code
19487 \begin_layout Plain Layout
19494 The first part is your version as before the update operation with the
19495 document name prepended.
19496 The second one is the repository version with the version number after
19498 \begin_inset Flex Code
19501 \begin_layout Plain Layout
19510 \begin_layout Labeling
19511 \labelwidthstring 00.00.0000
19513 \begin_inset space ~
19517 \begin_inset space ~
19521 \begin_inset Newline newline
19525 \begin_inset Flex Code
19528 \begin_layout Plain Layout
19536 (Ask if changes are detected.)
19537 \begin_inset Newline newline
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19545 cd $path; cvs -q update
19555 \begin_layout Standard
19557 \begin_inset Flex Code
19560 \begin_layout Plain Layout
19566 stands for the path to the document.
19569 \begin_layout Subsubsection
19575 \begin_layout Standard
19576 This shows the complete history of the CVS document.
19579 cvs log "<file-name>"
19581 is shown in a browser.
19584 \begin_layout Subsection
19585 SVN commands in LyX
19588 \begin_layout Standard
19589 SVN is now partially supported by LyX.
19590 You can find the commands in the
19592 File\SpecialChar \menuseparator
19594 \begin_inset space ~
19600 Please note that if you use password protected access to repository via
19601 ssh, you will be asked in terminal window.
19602 LyX was tested against SVN 1.5 and 1.6
19606 \begin_layout Plain Layout
19607 Most of the commands will work with 1.4 too, see
19608 \begin_inset CommandInset ref
19610 reference "sub:SVN-Repo-Update"
19622 \begin_layout Subsubsection
19628 \begin_layout Standard
19629 If your document is not under revision control, this is the only item shown
19631 And if it is under revision control, the
19638 item is not visible.
19642 \begin_layout Standard
19643 This command registers in SVN your document ONLY in case you have already
19644 the documents directory under SVN control (in particular
19649 This means you have to checkout the archive by yourself.
19653 \begin_layout Standard
19654 Then you are asked interactively to supply an initial description of the
19656 Don't forget that registered file is not yet commited.
19659 \begin_layout Standard
19660 SVN command that is run:
19663 \begin_inset Quotes eld
19667 \begin_inset Quotes erd
19673 \begin_layout Standard
19678 to understand the switches.
19682 \begin_layout Subsubsection
19688 \begin_layout Standard
19689 When you are finished editing a file, you commit your changes.
19690 When you do this, you are asked for a description of the changes.
19691 After that changes are commited.
19694 \begin_layout Standard
19699 \begin_layout Plain Layout
19700 In case locking is not enabled.
19702 \begin_inset CommandInset ref
19704 reference "subsec:SVN-File-Locking"
19715 svn commit -q -m"<description>" <file-name>
19718 \begin_layout Subsubsection
19724 \begin_layout Standard
19725 Updates the changes of this file from the repository.
19726 Be sure you understand SVN merging and conflicts resolving before using
19727 this function, because all conflicts has to be resolved manually by you!
19730 \begin_layout Standard
19735 \begin_layout Plain Layout
19743 svn update --non-interactive
19744 \begin_inset Quotes eld
19748 \begin_inset Quotes erd
19754 \begin_layout Subsubsection
19757 Revert To Repository Version
19760 \begin_layout Standard
19761 This will discard all changes made to the document since the last check
19763 You get a warning before changes are discarded.
19767 \begin_layout Standard
19771 \begin_inset Quotes eld
19775 \begin_inset Quotes erd
19781 \begin_layout Subsubsection
19782 \begin_inset CommandInset label
19784 name "sub:SVN-Repo-Update"
19788 Update of the local directory checkout from repository
19792 \begin_layout Plain Layout
19793 Note that this command will work only with subversion
19794 \begin_inset Formula $\geqq1.5$
19805 \begin_layout Standard
19806 All the commands above have one shortcomming - they deal with the current
19808 Once your document contains pictures, includes external
19809 \begin_inset Flex Code
19812 \begin_layout Plain Layout
19818 files and so on administration becomes more complicated.
19819 LyX now supports updating the whole tree in which resides the document
19823 \begin_layout Plain Layout
19824 One need to organize the files structure so that all external files are
19825 in the same directory or subdirectories of the document.
19832 This become especially useful once you cooperate with people which neither
19833 know about subversion management nor they have ambition to commit additional
19834 material to the repository.
19838 \begin_layout Standard
19839 \begin_inset Flex Code
19842 \begin_layout Plain Layout
19843 Update local directory from repository
19848 command updates the whole directory and in case of merge conflicts local
19849 version of the files are left, so no unintended data loss occurs.
19850 If local changes are detected user is warned before update starts.
19853 \begin_layout Labeling
19854 \labelwidthstring 00.00.0000
19856 \begin_inset space ~
19860 \begin_inset space ~
19864 \begin_inset Newline newline
19868 \begin_inset Flex Code
19871 \begin_layout Plain Layout
19877 (Ask if changes are detected.)
19878 \begin_inset Newline newline
19882 \begin_inset Flex Code
19885 \begin_layout Plain Layout
19886 svn update --accept mine-full $path
19894 \begin_layout Standard
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19905 stands for the path to the document.
19908 \begin_layout Subsubsection
19914 \begin_layout Standard
19915 This shows the complete history of the SVN document.
19919 \begin_inset Quotes eld
19923 \begin_inset Quotes erd
19928 is shown in a browser.
19931 \begin_layout Subsubsection
19933 \begin_inset CommandInset label
19935 name "subsec:SVN-File-Locking"
19942 \begin_layout Standard
19943 The file exchange through various revision control systems brings the problem
19944 of merge conflicts in case two different users try to edit the same (parts
19946 When such a conflict happens it needs manual resolving and one reasonable
19947 alternative is to provide some kind of locking mechanism, which guarantees
19948 that only one user is allowed to edit file at the given time.
19951 \begin_layout Standard
19952 SVN has two such mechanisms to provide mutual exclusivity for file access
19953 - locks and automatic setting of write permissions (see sec.
19955 \begin_inset CommandInset ref
19957 reference "subsec:Automatical-Locking-Property"
19962 \begin_inset Flex Code
19965 \begin_layout Plain Layout
19975 \begin_layout Plain Layout
19976 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19982 If this property is detected for a given document LyX starts to use SVN
19983 locks for document editing automatically and the whole check-in/out mechanism
19984 switches to the same regimen as for RCS.
19985 This in particular means there are two different modes of file use in LyX:
19988 \begin_layout Itemize
19990 The loaded file is in the read-only mode.
19991 For editing on needs to check-out.
19996 consists of updating from the repository and gaining write lock.
19997 If the lock is not possible to obtain, we remain in unlocked state.
20000 \begin_layout Itemize
20002 The loaded file is in the 'normal' edit mode.
20003 No other user is allowed to edit the file.
20008 consists of commiting changes and releasing write-lock.
20009 If no changes have been made to the document, no commit will be produced
20013 \begin_layout Plain Layout
20014 Don't be puzzled by the fact that you will be asked for commit message anyway.
20019 and only the write-lock will be released.
20022 \begin_layout Standard
20026 \begin_layout Labeling
20027 \labelwidthstring 00.00.0000
20030 svn commit -q -m"<description>" "<file-name>"
20031 \begin_inset Newline newline
20034 svn unlock "<file-name>"
20037 \begin_layout Labeling
20038 \labelwidthstring 00.00.0000
20041 svn update "<file-name>"
20042 \begin_inset Newline newline
20045 svn lock "<file-name>"
20048 \begin_layout Subsubsection
20051 \begin_inset CommandInset label
20053 name "subsec:Automatical-Locking-Property"
20059 Automatic Locking Property
20062 \begin_layout Standard
20063 The above mentioned automatic setting of write permissions of the .lyx file
20069 ile\SpecialChar \menuseparator
20075 \begin_inset space ~
20078 Control\SpecialChar \menuseparator
20083 oggle locking property
20086 This command is active only when the file is not locked on the svn server
20088 you need to check-out before proceeding).
20091 \begin_layout Labeling
20092 \labelwidthstring 00.00.0000
20094 \begin_inset space ~
20100 \begin_layout Labeling
20101 \labelwidthstring 00.00.0000
20104 svn propset svn:needs-lock ON "<file-name>"
20107 \begin_layout Labeling
20108 \labelwidthstring 00.00.0000
20111 svn propdel svn:needs-lock "<file-name>"
20114 \begin_layout Subsubsection
20115 \begin_inset CommandInset label
20117 name "sub:VCS-Revision-Information"
20121 Revision Information in Documents
20124 \begin_layout Standard
20125 There are more possibilities how to activate revision information in our
20129 \begin_layout Itemize
20130 LyX supports directly:
20134 \begin_layout Itemize
20135 tree revision information (
20136 \begin_inset Flex Code
20139 \begin_layout Plain Layout
20146 The result is the output of the
20147 \begin_inset Flex Code
20150 \begin_layout Plain Layout
20156 command, the following table gives you an idea, how to read the results.
20159 \begin_layout Standard
20161 \begin_inset Tabular
20162 <lyxtabular version="3" rows="6" columns="2">
20163 <features tabularvalignment="middle">
20164 <column alignment="center" valignment="top" width="0">
20165 <column alignment="center" valignment="top" width="0">
20167 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20170 \begin_layout Plain Layout
20176 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20179 \begin_layout Plain Layout
20187 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20190 \begin_layout Plain Layout
20196 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20199 \begin_layout Plain Layout
20200 mixed revision working copy
20207 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20210 \begin_layout Plain Layout
20216 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20219 \begin_layout Plain Layout
20220 modified working copy
20227 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20230 \begin_layout Plain Layout
20236 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20239 \begin_layout Plain Layout
20240 switched working copy
20247 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20250 \begin_layout Plain Layout
20256 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20259 \begin_layout Plain Layout
20260 partial working copy, from a sparse checkout
20267 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20270 \begin_layout Plain Layout
20276 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20279 \begin_layout Plain Layout
20280 mixed revision, modified, switched working copy
20293 \begin_layout Itemize
20294 file revision information.
20295 The result comes from parsing the output of
20296 \begin_inset Flex Code
20299 \begin_layout Plain Layout
20301 \begin_inset space ~
20305 \begin_inset space ~
20309 \begin_inset space ~
20318 Supported flags are:
20322 \begin_layout Itemize
20323 version number of the last commit (
20324 \begin_inset Flex Code
20327 \begin_layout Plain Layout
20336 \begin_layout Itemize
20337 author of the last commit (
20338 \begin_inset Flex Code
20341 \begin_layout Plain Layout
20350 \begin_layout Itemize
20351 date of the last commit (
20352 \begin_inset Flex Code
20355 \begin_layout Plain Layout
20364 \begin_layout Itemize
20365 time of the last commit (
20366 \begin_inset Flex Code
20369 \begin_layout Plain Layout
20379 \begin_layout Standard
20380 You can obtain this info via InsetInfo (e.g.
20382 \begin_inset Flex Code
20385 \begin_layout Plain Layout
20386 info-insert buffer vcs-date
20392 The information will be available only when you have the file stored under
20393 svn managment (i.e.
20395 \begin_inset Flex Code
20398 \begin_layout Plain Layout
20404 directory is available with your document).
20408 \begin_layout Itemize
20409 Another---a hacking one---possibility is to use svn keywords
20413 \begin_layout Plain Layout
20414 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20420 In short -- you set file keywords property (e.g.
20423 svn propset svn:keywords 'Rev' file.lyx
20425 ) and then paste keyword TeX code
20429 \begin_layout Plain Layout
20430 This is an easy way how to ensure that LyX won't break the line in the middle
20436 tag in your document (e.g.
20441 \begin_layout Plain Layout
20449 This way svn client will automatically substitute revision number (e.g.
20454 \begin_layout Plain Layout
20461 ) after each update and commit.
20462 There are more problems with this approach.
20463 Firstly, the '$' character is used in TeX world for math equations, so
20464 any occurence of math formula
20465 \begin_inset Formula $Rev$
20469 \begin_inset Formula $Rev:59$
20472 in your LyX document.
20473 Similarly for other keywords like Id, Date, Author, etc.
20474 Secondly svn output is dependent on your locales, so its very easy that
20475 svn would produce some problematic strings once Date is used.
20476 Thirdly you get the whole 'Rev: 59' string in your document instead of
20478 Until subversion implements user's custom keywords it will be hard to use
20479 this approach reliably or let LyX to support it directly.
20482 \begin_layout Subsection
20483 SVN and Windows Environment
20486 \begin_layout Quote
20487 My inclination is to say that if the user cannot figure out the command
20488 line operations on their own fairly quickly, they would be well advised
20489 to use TortoiseSVN.
20495 \begin_layout Subsubsection
20499 \begin_layout Standard
20500 In addition to installing LyX, and having access to a Subversion repository,
20501 the user will need to install the Subversion client program.
20502 A Windows installer for the client program is available from
20503 \begin_inset CommandInset href
20506 target "http://www.collab.net/nonav/downloads/subversion/"
20511 The user may also want to install
20512 \begin_inset CommandInset href
20515 target "http://tortoisesvn.tigris.org/"
20519 , which integrates Subversion operations into the context (rightclick) menu
20520 of Windows Explorer.
20521 Operations done outside LyX will typically be more convenient using the
20522 Explorer context menu.
20523 Note that TortoiseSVN is not a replacement for the client program, which
20524 is what LyX itself will use.
20527 \begin_layout Subsubsection
20528 Bringing a document under Subversion control
20531 \begin_layout Standard
20532 Before a LyX document can be brought under version control in Subversion,
20533 its parent directory needs to be under version control.
20534 If the document is being added to a project already in the repository,
20535 this is accomplished by checking the project out to the directory where
20536 the new document will be placed.
20537 If the project itself is not yet under version control (for instance, if
20538 this document starts a new project), the directory must be imported into
20540 This is done outside LyX.
20541 Both import and checkout are easily accomplished from the Explorer context
20542 menu using TortoiseSVN, or alternatively can be done using the command
20543 line client at a DOS prompt.
20544 The procedure for importing the project using TortoiseSVN is described
20545 below, assuming an existing repository and a new project being started
20553 For information on using the Subversion client program, run
20560 \begin_layout Enumerate
20567 in Windows Explorer, right click it, and select
20569 TortoiseSVN > Repo-browser
20572 If necessary, adjust the URL for the repository, then click OK.
20575 \begin_layout Enumerate
20576 Right click the level of the repository under which you want to place the
20577 new project folder (typically the top level) and click
20579 Create folder\SpecialChar \ldots{}
20582 Supply a name for the project folder and click OK.
20583 Add a message for the log file if desired, then click OK again.
20584 The new project folder should appear in the repository.
20585 Finally, click OK again to exit the repository browser.
20588 \begin_layout Enumerate
20589 Once again right click
20595 , this time selecting SVN Checkout\SpecialChar \ldots{}
20596 Select the URL of the project folder
20597 you just created in the repository, and set the checkout directory to
20605 You will be warned about a non-empty folder; click OK to proceed.
20606 You should now have a
20617 \begin_layout Enumerate
20618 Create or open your document in LyX and click
20623 ile\SpecialChar \menuseparator
20629 \begin_inset space ~
20632 Control\SpecialChar \menuseparator
20640 Add a log message and click OK to commit the document to version control.
20643 \begin_layout Standard
20644 From this point onward, you should have full functionality in the
20649 ile\SpecialChar \menuseparator
20655 \begin_inset space ~
20661 You also have the option of checking the document in and out, viewing its
20663 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20664 client program from a command prompt.
20667 \begin_layout Subsubsection
20668 SSH tunnel used with SVN under Windows
20671 \begin_layout Standard
20672 Compared with Linux setting up svn client to communicate over ssh under
20673 Windows is a rather troublesome task.
20674 We will at least offer some hints how to setup the client side but prior
20675 knowledge about ssh and the Windows command line is needed, also be prepared
20676 for a great deal of frustration\SpecialChar \ldots{}
20680 \begin_layout Enumerate
20681 Get a svn client for windows, as described in the previous sections.
20682 When it is a fresh install run some svn command (e.g.
20684 \begin_inset Flex Code
20687 \begin_layout Plain Layout
20693 ) to create config files, which you will need to change later on.
20696 \begin_layout Enumerate
20697 Choose a ssh client for Windows.
20698 There are several possibilities, we will use the one from Putty tools
20702 \begin_layout Plain Layout
20703 \begin_inset Flex URL
20706 \begin_layout Plain Layout
20708 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20719 You will need to set the connection up so that the client doesn't ask for
20720 any password from you.
20721 To keep things easy we will use only keys without any additional password
20726 \begin_layout Enumerate
20728 \begin_inset Flex Code
20731 \begin_layout Plain Layout
20738 Save your private .ppk key file and put the public one on the server side.
20739 If the SVN server runs on Linux, note that the format of the public key
20740 is not compatible with Linux openssh and you will need to direcly copy-paste
20743 Public key for pasting into OpenSSH authorized_keys file
20745 :” edit field into the server's
20746 \begin_inset Flex Code
20749 \begin_layout Plain Layout
20750 ~/.ssh/authorized_keys
20756 \begin_inset Flex Code
20759 \begin_layout Plain Layout
20768 \begin_layout Enumerate
20770 \begin_inset Flex Code
20773 \begin_layout Plain Layout
20780 In the SVN config file
20784 \begin_layout Plain Layout
20785 Exact path depends on Windows version, usually somewhere around
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20792 Documents and Settings
20806 \begin_inset Flex Code
20809 \begin_layout Plain Layout
20824 , section [tunnels], setup ssh command, e.g.
20826 \begin_inset Flex Code
20829 \begin_layout Plain Layout
20830 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20839 \begin_layout Plain Layout
20840 It will usually take a lot of time to get exact command right and it depends
20842 For example do not have some remote server saved as a default session in
20844 If things fail, try to connect via plink without SVN first.
20853 \begin_layout Enumerate
20854 Checkout the SVN archive, e.g.
20856 \begin_inset Flex Code
20859 \begin_layout Plain Layout
20860 svn co svn+ssh://user@server/repository_path
20868 \begin_layout Subsubsection
20869 End-of-Line Conversions
20872 \begin_layout Standard
20873 When the collsraborators are mixing Linux and Windows environments, LyX
20874 will use different line endings inside the .lyx files.
20875 This is not a problem as far as LyX functionality is concerned, but the
20876 commit diffs will be huge and merge-conflicts prone.
20877 Fortunately SVN itself knows
20881 \begin_layout Plain Layout
20882 \begin_inset Flex URL
20885 \begin_layout Plain Layout
20887 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20897 how to deal with CR/LF problems when switching .lyx files to the
20898 \begin_inset Flex Code
20901 \begin_layout Plain Layout
20911 \begin_layout Plain Layout
20913 \begin_inset Flex Code
20916 \begin_layout Plain Layout
20917 svn propset svn:eol-style native FILE_NAME
20930 \begin_layout Subsection
20934 \begin_layout Standard
20935 With the recent addition of the vc-command function LyX power users are
20936 allowed to create their own commands for revision control.
20939 \begin_layout Standard
20940 As an example you can see how two TortoiseSVN commands could be integrated
20944 \begin_layout Description
20946 \begin_inset Flex Code
20949 \begin_layout Plain Layout
20950 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20958 \begin_layout Description
20960 \begin_inset Flex Code
20963 \begin_layout Plain Layout
20964 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20972 \begin_layout Subsection
20973 Version control and Document comparison
20976 \begin_layout Standard
20977 One of the typical uses of version control is to inspect the changes between
20978 revisions, usually by creating
20979 \begin_inset Flex Code
20982 \begin_layout Plain Layout
20989 While this is useful for plain text files, it is much less useful in the
20990 case of LyX files, which have more complicated structure.
20991 Hence we provide binding to the Document comparison feature.
20992 They are two ways of calling this feature - either by direct call of
20993 \begin_inset Flex Code
20996 \begin_layout Plain Layout
21002 LyX function (for details see LyX functions manual) or by icon/menu item
21004 \begin_inset Flex MenuItem
21007 \begin_layout Plain Layout
21008 Compare with older revision...
21014 One can either compare two chosen revisions of the document or he can simply
21015 compare the current version of edited text with older revisions (where
21017 \begin_inset Flex MenuItem
21020 \begin_layout Plain Layout
21026 ' revisions back means comparison of the edited file with last commited
21031 \begin_layout Standard
21032 This feature is supported for SVN and RCS though due to the more complicated
21033 versioning scheme of RCS there is a constraint -- when addressing the revisions
21034 in dialog, numbers always point to the last number in RCS revision number,
21039 \begin_layout Section
21040 Literate Programming
21043 \begin_layout Standard
21048 (kayvan@sylvan.com)
21052 original documentation written by
21054 Edmar Wienskoski Jr.
21057 (edmar-w-jr@technologist.com)
21060 \begin_layout Subsection
21064 \begin_layout Standard
21065 The main purpose of this documentation is to show you how to use LyX for
21066 literate programming, where it is assumed that you are familiar with this
21067 programming technique, and know what
21068 \begin_inset Quotes eld
21072 \begin_inset Quotes erd
21076 \begin_inset Quotes eld
21080 \begin_inset Quotes erd
21084 If that is not the case, please follow the web links provided in the following
21086 There is a lot of good documentation out there covering old development
21087 history to the latest tools tips.
21090 \begin_layout Standard
21091 It is also assumed that you are familiar with LyX itself to a point that
21092 you are comfortable changing your LyX preferences, and X resources file.
21093 If that is not the case please refer to other LyX documentation to cover
21094 your specific needs.
21097 \begin_layout Subsection
21098 Literate Programming
21101 \begin_layout Standard
21102 From the Literate Programming FAQ:
21105 \begin_layout Quotation
21106 Literate programming is the combination of documentation and source together
21107 in a fashion suited for reading by human beings.
21108 In fact, literate programs should be enjoyable reading, even inviting!
21109 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21110 and documentation in a single file.
21111 Literate programming tools then parse the file to produce either readable
21112 documentation or compilable source.
21113 The WEB style of literate programming was created by D.
21114 \begin_inset space \thinspace{}
21118 Knuth during the development of his TeX typesetting software.
21122 \begin_layout Standard
21123 Another excerpt says:
21126 \begin_layout Quotation
21129 How is literate programming different from verbose commenting?
21132 \begin_layout Quotation
21133 There are three distinguishing characteristics.
21134 In order of importance, they are:
21138 \begin_layout Itemize
21139 flexible order of elaboration
21142 \begin_layout Itemize
21143 automatic support for browsing
21146 \begin_layout Itemize
21147 typeset documentation, especially diagrams and mathematics
21151 \begin_layout Standard
21152 Now that I sparked your curiosity, take a look in the references.
21155 \begin_layout Subsubsection
21159 \begin_layout Standard
21160 The complete Literate Programming FAQ can be found at:
21163 \begin_layout Quote
21164 Literate Programming FAQ
21165 \begin_inset Flex URL
21168 \begin_layout Plain Layout
21170 http://www.literateprogramming.com/lpfaq.pdf
21178 \begin_layout Standard
21179 The FAQ lists 23 (twenty three!) different literate programming tools.
21180 Where some are specialized or
21181 \begin_inset Quotes eld
21185 \begin_inset Quotes erd
21188 for particular programming languages, while other have general scope.
21193 for my own use for several reasons:
21196 \begin_layout Itemize
21197 It can generate the documentation either in LaTeX or HTML.
21200 \begin_layout Itemize
21201 It has a open architecture, i.
21202 \begin_inset space \thinspace{}
21206 \begin_inset space \space{}
21209 it is easy to plug in new filters and to perform special processing that
21214 \begin_layout Itemize
21215 There is a good selection of filters available already (the HTML is one
21219 \begin_layout Itemize
21223 \begin_layout Standard
21224 The Noweb web page can be found at:
21227 \begin_layout Quote
21229 \begin_inset Flex URL
21232 \begin_layout Plain Layout
21234 http://www.cs.virginia.edu/~nr/noweb/
21242 \begin_layout Standard
21243 Starting from there you can reach many other interesting links and even
21244 some literate program examples.
21247 \begin_layout Subsection
21248 LyX and Literate Programming
21251 \begin_layout Standard
21252 The LyX support for Literate Programming is provided by using the generic
21253 LyX converters mechanism.
21254 This support is provided in a
21255 \begin_inset Quotes eld
21259 \begin_inset Quotes erd
21263 \begin_inset space \thinspace{}
21267 \begin_inset space \space{}
21270 you will be able to use this new LyX feature with some other literate programmin
21271 g tool of your choice by just changing your LyX preferences.
21274 \begin_layout Subsubsection
21275 Generating documents and code (weaving and tangling)
21278 \begin_layout Paragraph
21279 Selecting the document class
21282 \begin_layout Standard
21283 If you have installed Noweb and LyX successfully, whenever you open a new
21284 document or try to change the document class of an existing one, you will
21285 find that there are three new document classes available:
21288 \begin_layout Itemize
21292 \begin_layout Itemize
21296 \begin_layout Itemize
21300 \begin_layout Standard
21301 You must select one of them to create your literate documents from.
21305 \begin_layout Standard
21306 Note that literate documents are not limited to these three classes.
21307 New classes can be generated from other styles like letter or in combination
21308 with other class variations like Article (AMS).
21309 If you have special needs that cannot be covered by one of the existing
21310 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21311 will arrange to insert a new entry, or teach you how to do it.
21315 \begin_layout Plain Layout
21316 It is very simple, it involves the creation of a file with four lines, and
21317 re-running of the auto configuration.
21322 Moreover, if you use a literate tool other than Noweb you may need to create
21323 a new set of document classes for it.
21326 \begin_layout Paragraph
21330 \begin_layout Standard
21331 LyX enables you to write code with a layout named
21339 \begin_layout Plain Layout
21340 The equivalent Noweb term is
21341 \begin_inset Quotes eld
21345 \begin_inset Quotes erd
21349 For historical reasons, I got used to the term
21350 \begin_inset Quotes eld
21354 \begin_inset Quotes erd
21357 introduced by other literate tool named Nuweb, which I used for many years
21358 before rendering myself to Noweb.
21363 Noweb delimits scraps like this:
21366 \begin_layout LyX-Code
21370 \begin_layout LyX-Code
21374 \begin_layout LyX-Code
21378 \begin_layout LyX-Code
21382 \begin_layout LyX-Code
21386 \begin_layout Standard
21387 The problem is that whatever is written in between the << and the
21391 must be taken literally, i.
21392 \begin_inset space \thinspace{}
21396 \begin_inset space \space{}
21399 LyX should be prevented from making any special interpretation of what has
21401 This is handled by a special layout named Scrap, that works like a normal
21402 paragraph but has a free spacing capability.
21405 \begin_layout Standard
21406 The down side of the Scrap paragraph layout is that consecutive paragraphs
21407 of code will be spaced with one empty line in the source code and also
21408 in the printed documentation.
21409 The work around is to enter each line of code within a single Scrap, with
21410 a newline (ctrl-return).
21411 The example above will look like this:
21415 \begin_layout Plain Layout
21416 If you have a printed version of this document you will not see any difference
21417 between the previous example and this one.
21425 \begin_layout LyX-Code
21427 \begin_inset Newline newline
21431 \begin_inset Newline newline
21435 \begin_inset Newline newline
21439 \begin_inset Newline newline
21445 \begin_layout Standard
21446 This layout works fine.
21447 The only real inconvenience is that you have to type ctrl-return instead
21452 \begin_layout Plain Layout
21453 It is in my list of
21454 \begin_inset Quotes eld
21458 \begin_inset Quotes erd
21469 \begin_layout Standard
21470 As a special note, you can also use the
21471 \begin_inset Quotes eld
21475 \begin_inset Quotes erd
21478 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21482 \begin_layout LyX-Code
21484 \begin_inset Newline newline
21487 def some_function(args):
21488 \begin_inset Newline newline
21491 "This is the doc string for this function."
21492 \begin_inset Newline newline
21495 print "My args: ", args
21498 \begin_layout LyX-Code
21499 @ %def some_function
21502 \begin_layout Standard
21503 For an example of this usage and the resulting cross-reference output, look
21504 at the Literate python program in
21506 LIBDIR/examples/listerrors.lyx
21508 which should make this all clear.
21511 \begin_layout Paragraph
21512 Generating the documentation
21515 \begin_layout Standard
21516 At this point you already have a new document file with a proper document
21517 class, and with some code and text on it.
21518 How do I print it? The answer is simple, you select
21520 View\SpecialChar \menuseparator
21524 Just like you would do for a plain document.
21525 No special procedure is required.
21528 \begin_layout Standard
21529 To help orientate you, I will now explain what happens inside LyX:
21532 \begin_layout Enumerate
21535 Update\SpecialChar \menuseparator
21538 menu option is chosen, a LaTeX file is generated.
21543 \begin_layout Standard
21544 If the document is of any literate class the generated file will be named
21545 with an extension name defined by the
21546 \begin_inset Quotes eld
21550 \begin_inset Quotes erd
21553 format (defined in the Preferences panel), otherwise the file will have
21562 \begin_layout Enumerate
21563 Note that the only difference so far is in the name of the file, no special
21564 processing is required by LyX.
21565 Given that you formatted the code using the Scrap layout that, by itself,
21566 takes care of the business.
21569 \begin_layout Enumerate
21570 If the document is of any literate class LyX will then use the internal
21571 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21575 \begin_layout Plain Layout
21576 The converters are defined in the
21578 Tools\SpecialChar \menuseparator
21582 \begin_inset Quotes eld
21586 \begin_inset Quotes erd
21598 manual for general information about converters.
21603 to generate the LaTeX file.
21607 \begin_layout Standard
21608 Otherwise it will just skip this step.
21612 \begin_layout Enumerate
21613 Finally, LaTeX is invoked and the regular post processing continues as in
21617 \begin_layout Standard
21618 Independence from a particular
21619 \begin_inset Quotes eld
21623 \begin_inset Quotes erd
21626 is easily achieved by changing the commands that are run by the various
21630 \begin_layout Paragraph
21631 Generating the code
21634 \begin_layout Standard
21635 When the build menu option is chosen or the corresponding button in the
21636 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21637 Next, LyX invokes the
21642 This converter needs to be defined by the user and is not installed by
21643 default, though the Program format is.
21644 This converter (like any other converter) will have two parts:
21647 \begin_layout Enumerate
21648 The converter program itself.
21649 This program performs the conversion from the one format to the other (in
21650 this case, from the Noweb format to the Program pseudo-format).
21653 \begin_layout Enumerate
21654 The error log parser.
21655 This is a program whose sole purpose is to rewrite error messages in a
21656 format that LyX understands.
21657 This makes it possible for LyX to place error boxes in the right places
21658 in the file buffer.
21661 \begin_layout Standard
21662 The first part, the
21663 \begin_inset Quotes eld
21667 \begin_inset Quotes erd
21670 setting, should be set to
21671 \begin_inset Quotes eld
21679 \begin_inset Quotes erd
21683 This basically means that LyX will call
21684 \begin_inset Quotes eld
21688 \begin_inset Quotes erd
21691 (a program or script) with the name of the Noweb file (normally a file
21692 in the LyX temp directory).
21696 \begin_layout Standard
21697 This is an implementation of
21698 \begin_inset Quotes eld
21702 \begin_inset Quotes erd
21705 that you can place in a directory on your path:
21708 \begin_layout LyX-Code
21712 \begin_layout LyX-Code
21716 \begin_layout LyX-Code
21717 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21720 \begin_layout Standard
21721 The next part of the converter setting is the
21722 \begin_inset Quotes eld
21726 \begin_inset Quotes erd
21729 which is to be set to
21730 \begin_inset Quotes eld
21735 parselog=listerrors
21738 \begin_inset Quotes erd
21742 This will run any errors that are generated by the
21743 \begin_inset Quotes eld
21747 \begin_inset Quotes erd
21750 process through the
21751 \begin_inset Quotes eld
21755 \begin_inset Quotes erd
21761 \begin_layout Standard
21762 The converter code looks in
21770 then on the path for the
21771 \begin_inset Quotes eld
21775 \begin_inset Quotes erd
21781 \begin_layout Standard
21782 The build will normally take place in LyX's temporary directory, so the
21783 files produced by the conversion will be in that directory.
21784 LyX will copy out what it regards as the `main' file, but the
21788 conversion may produce several files, and so most of these would then be
21789 deleted when LyX was closed.
21790 The present solution is to use a `copier',
21794 \begin_layout Plain Layout
21803 manual for information on these.
21812 script in its default mode, so that the entire contents of the temporary
21813 directory is copied.
21814 More will get copied than is needed, to be sure, but nothing will be lost.
21815 If, however, you know what extensions the generated files will have, this
21816 can be improved by using the
21825 This option takes a comma-separated list of extensions to copy.
21826 So, for example, if the conversion will generate only files with the extensions
21835 , then the correct definition would be:
21838 \begin_layout LyX-Code
21839 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21842 \begin_layout Standard
21843 The result will be that only files with these two extensions will be copied
21847 \begin_layout Paragraph
21848 Build instructions in the document
21851 \begin_layout Standard
21852 The last piece of the integration between LyX and noweb is the
21853 \begin_inset Quotes eld
21857 \begin_inset Quotes erd
21861 Generally, the instructions for building your program should be embedded
21862 in a scrap of its own.
21864 \begin_inset Quotes eld
21868 \begin_inset Quotes erd
21871 above uses the notangle command to look for this scrap (called
21872 \begin_inset Quotes eld
21876 \begin_inset Quotes erd
21879 ) and runs its contents through
21880 \begin_inset Quotes eld
21884 \begin_inset Quotes erd
21890 \begin_layout Standard
21891 Typically, such a scrap would look something like this:
21894 \begin_layout LyX-Code
21896 \begin_inset Newline newline
21900 \begin_inset Newline newline
21904 \begin_inset Newline newline
21907 if [ -z "${NOWEB_SOURCE}" ]
21908 \begin_inset Newline newline
21912 \begin_inset Newline newline
21915 NOWEB_SOURCE=myfile.nw
21916 \begin_inset Newline newline
21920 \begin_inset Newline newline
21924 code to extract files ...]
21925 \begin_inset Newline newline
21929 code to compile files ...]
21930 \begin_inset Newline newline
21936 \begin_layout Standard
21939 LIBDIR/examples/listerrors.lyx
21943 LIBDIR/examples/Literate.lyx
21945 which implement two versions of the
21946 \begin_inset Quotes eld
21950 \begin_inset Quotes erd
21953 program for some illustrations of how all of these pieces go together or
21956 LIBDIR/examples/noweb2lyx.lyx.
21959 Interestingly, these three files show off the language-indepence of the
21960 LyX literate programming support since they are written in Python, C and
21964 \begin_layout Subsubsection
21968 \begin_layout Standard
21969 All the Literate Programming support is configured by the
21971 Tools\SpecialChar \menuseparator
21975 \begin_inset Quotes eld
21979 \begin_inset Quotes erd
21983 The important parts are:
21986 \begin_layout Description
21988 \begin_inset space ~
21992 \begin_inset Quotes eld
21996 \begin_inset Quotes erd
22000 \begin_inset space ~
22003 format Set up via the Formats tab, this is where the Noweb-specific pieces
22013 , the file extension is set to
22018 This tells LyX to create a file with a
22022 extension in the first step of the conversion process.
22025 \begin_layout Description
22027 \begin_inset space ~
22035 \begin_inset space ~
22038 format This is an empty format whose sole purpose is to be the endpoint
22039 of a conversion (which then allows us to set up a converter for it).
22042 \begin_layout Description
22051 This converter performs the
22052 \begin_inset Quotes eld
22056 \begin_inset Quotes erd
22059 of the literate document.
22060 For Noweb, it is set to
22061 \begin_inset Quotes eld
22066 noweave -delay -index $$i > $$o
22069 \begin_inset Quotes erd
22075 \begin_layout Description
22085 \begin_inset Quotes eld
22089 \begin_inset Quotes erd
22093 As stated above, the Converter is set to
22094 \begin_inset Quotes eld
22102 \begin_inset Quotes erd
22105 , with Flags set to
22106 \begin_inset Quotes eld
22111 originaldir,parselog=listerrors
22114 \begin_inset Quotes erd
22120 \begin_layout Subsubsection
22124 \begin_layout Standard
22125 There is also a new function implemented in the LyX server, the
22126 \begin_inset Quotes eld
22129 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22133 \begin_layout Standard
22134 When debugging code with ddd/gdb, it is possible to invoke a text editor
22135 at the current execution position with a single key stroke.
22136 The default ddd configuration for that is shift-ctrl-V.
22137 It happens that you can define the editor command line invocation in ddd
22140 Edit\SpecialChar \menuseparator
22141 Preferences\SpecialChar \menuseparator
22144 dialog and changing the "Edit Sources" entry.
22147 \begin_layout Standard
22148 I take advantage of the new created LyX server function and this ddd feature,
22150 \begin_inset Quotes eld
22154 \begin_inset Quotes erd
22160 \begin_layout LyX-Code
22161 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22164 \begin_layout Standard
22165 With this, whenever you are using ddd and find a point in the program that
22166 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22167 ddd you forward this information to LyX through the LyX server and then
22168 the LyX window will show the same file with the cursor at the same position
22169 ddd was pointing to.
22170 No more guessing or long scrolling to locate a point in the program back
22174 \begin_layout Standard
22175 Note however that you must enable the LyX server to get this feature working
22176 (it is disabled by default).
22177 You can enable it in
22189 ) by entering in the
22194 \begin_inset Quotes eld
22199 /home/<your-home-directory>/.lyx/lyxpipe
22202 \begin_inset Quotes erd
22208 \begin_layout Standard
22209 Read the LyX server documentation in the
22211 Customization Manual
22213 for further information.
22216 \begin_layout Subsubsection
22220 \begin_layout Standard
22221 There are six new buttons that can be added to your LyX toolbar.
22222 Five of these buttons are short cuts to layout styles:
22243 The last one is a short cut to the
22244 \begin_inset Quotes eld
22248 \begin_inset Quotes erd
22255 \begin_layout Standard
22256 LyX has a range of buttons that are available for tool bar customization.
22257 In my toolbar I like to combine the six short cuts above with two more:
22262 \SpecialChar \menuseparator
22267 \SpecialChar \menuseparator
22274 View\SpecialChar \menuseparator
22278 Here is how it looks like:
22281 \begin_layout LyX-Code
22285 \begin_layout LyX-Code
22289 \begin_layout LyX-Code
22290 Icon "layout Standard"
22293 \begin_layout LyX-Code
22294 Icon "layout Section"
22297 \begin_layout LyX-Code
22298 Icon "layout LaTeX"
22301 \begin_layout LyX-Code
22302 Icon "layout LyX-Code"
22305 \begin_layout LyX-Code
22306 Icon "layout Scrap"
22309 \begin_layout LyX-Code
22313 \begin_layout LyX-Code
22317 \begin_layout LyX-Code
22318 Icon "buffer-typeset"
22321 \begin_layout LyX-Code
22322 Icon "build-program"
22325 \begin_layout LyX-Code
22329 \begin_layout LyX-Code
22333 \begin_layout LyX-Code
22337 \begin_layout LyX-Code
22341 \begin_layout LyX-Code
22345 \begin_layout Subsubsection
22346 Colors customization
22349 \begin_layout Standard
22350 There are a number of colors in LyX that can be customized in
22355 One of the things that bothers people is the LaTeX font color.
22356 The default color is red, since the scraps uses LaTeX font, and there is
22357 a lot of scraps in literate documents, you may get tired of seeing everything
22359 You can change it by going to the tabs
22368 \begin_layout Standard
22369 The next thing is the visible presence of the newline character in the screen.
22370 You can choose the color of this particular character and make it blend
22372 I recommend you choosing a color that is close to the background but not
22373 equal, that way you still can see it is there, but it is not bothering
22378 \begin_layout Chapter
22379 Secrets of the LaTeX Masters
22380 \begin_inset CommandInset label
22389 \begin_layout Standard
22390 Though LyX is a powerful tool, it cannot hope to support everything that
22391 can be done with pure TeX/LaTeX.
22392 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22393 as long as you are not afraid to use that
22394 \begin_inset Quotes eld
22398 \begin_inset Quotes erd
22401 button on the toolbar or add things to the LaTeX preamble.
22402 This section lists some tips, tricks, and otherwise cool ideas to give
22403 your document that extra little flair.
22406 Do try this at home
22408 , just start with something a little smaller and less important than your
22412 \begin_layout Standard
22413 Most ideas in this section require less common files in your LaTeX installation.
22414 If you have a system like TeXLive, most will already be available.
22415 A few, however, will need to be downloaded from one of the CTAN archives.
22416 Often, there are several ways to do something, or several LaTeX style files
22417 which do the same thing.
22418 We do not endorse one choice over another, we simply claim that we have
22419 done a particular task with a particular file.
22420 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22423 \begin_layout Section
22427 \begin_layout Standard
22430 Lars Gullik Bjønnes
22433 \begin_layout Subsection
22437 \begin_layout Standard
22438 The aim for this chapter
22442 \begin_layout Plain Layout
22443 Editor's note: Lars' original chapter was a masterful description of how
22449 However, it was too long to flow smoothly in this document.
22450 I have therefore chosen to excerpt the most important sections here (sorry,
22451 Lars); you can read the original chapter (and more of the story!) in the
22454 examples/multicol.lyx
22462 is to show how the LaTeX package
22466 can be used in a LyX document.
22467 As LyX doesn't support the
22471 package natively yet, we have to use some small hacks.
22472 By reading this section it should be obvious how to do this.
22475 \begin_layout Subsection
22479 \begin_layout Standard
22484 package allows switching between one and multicolumn format on the same
22486 Footnotes are handled correctly (for the most part), but will be placed
22487 at the bottom of the page and not under each column.
22488 LaTeX's float mechanism, however, is partly disabled in the current implementat
22490 At the moment only page-wide floats can be used within the scope of the
22494 \begin_layout Subsection
22498 \begin_layout Subsubsection
22502 \begin_layout Standard
22503 If you want to have two columns in your text, you have use LaTeX mode to
22508 begin{multicols}{2}
22510 at the point where you want the two column layout to start, and then
22516 where you want it to end.
22520 \begin_layout Standard
22524 \begin_layout Plain Layout
22528 begin{multicols}{2}
22536 \begin_layout Standard
22541 The Adventure of the Empty House
22544 \begin_inset Newline newline
22549 Sir Arthur Conan Doyle
22552 \begin_layout Standard
22555 It was in the spring of the year 1894 that all London was interested, and
22556 the fashionable world dismayed, by the murder of the Honourable Ronald
22557 Adair under most unusual and inexplicable circumstances.
22558 The public has already learned those particulars of the crime which came
22559 out in the police investigation, but a good deal was suppressed upon that
22560 occasion, since the case for the prosecution was so overwhelmingly strong
22561 that it was not necessary to bring forward all the facts.
22562 Only now, at the end of nearly ten years, am I allowed to supply those
22563 missing links which make up the whole of that remarkable chain.
22564 The crime was of interest in itself, but that interest was as nothing to
22565 me compared to the inconceivable sequel, which afforded me the greatest
22566 shock and surprise of any event in my adventurous life.
22567 Even now, after this long interval, I find myself thrilling as I think
22568 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22569 ty which utterly submerged my mind.
22570 Let me say to that public, which has shown some interest in those glimpses
22571 which I have occasionally given them of the thoughts and actions of a very
22572 remarkable man, that they are not to blame me if I have not shared my knowledge
22573 with them, for I should have considered it my first duty to do so, had
22574 I not been barred by a positive prohibition from his own lips, which was
22575 only withdrawn upon the third of last month.
22578 \begin_layout Standard
22582 \begin_layout Plain Layout
22594 \begin_layout Subsubsection
22598 \begin_layout Standard
22599 The same pattern is used when you want more than two columns:
22602 \begin_layout Standard
22606 \begin_layout Plain Layout
22610 begin{multicols}{3}
22618 \begin_layout Standard
22621 It can be imagined that my close intimacy with Sherlock Holmes had interested
22622 me deeply in crime, and that after his disappearance I never failed to
22623 read with care the various problems which came before the public.
22624 And I even attempted, more than once, for my own private satisfaction,
22625 to employ his methods in their solution, though with indifferent success.
22626 There was none, however, which appealed to me like this tragedy of Ronald
22628 As I read the evidence at the inquest, which led up to a verdict of willful
22629 murder against some person or persons unknown, I realized more clearly
22630 than I had ever done the loss which the community had sustained by the
22631 death of Sherlock Holmes.
22632 There were points about this strange business which would, I was sure,
22633 have specially appealed to him, and the efforts of the police would have
22634 been supplemented, or more probably anticipated, by the trained observation
22635 and the alert mind of the first criminal agent in Europe.
22636 All day, as I drove upon my round, I turned over the case in my mind and
22637 found no explanation which appeared to me to be adequate.
22638 At the risk of telling a twice-told tale, I will recapitulate the facts
22639 as they were known to the public at the conclusion of the inquest.
22642 \begin_layout Standard
22646 \begin_layout Plain Layout
22658 \begin_layout Standard
22659 You can have more than 3 columns if you want to, but that might not be very
22660 pleasant for the eye.
22663 \begin_layout Subsubsection
22664 Columns inside columns
22667 \begin_layout Standard
22668 You can even have columns inside columns:
22671 \begin_layout Standard
22675 \begin_layout Plain Layout
22679 begin{multicols}{2}
22687 \begin_layout Standard
22690 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22691 at that time governor of one of the Australian colonies.
22692 Adair's mother had returned from Australia to undergo the operation for
22693 cataract, and she, her son Ronald, and her daughter Hilda were living together
22697 \begin_layout Standard
22701 \begin_layout Plain Layout
22705 begin{multicols}{2}
22713 \begin_layout Standard
22716 The youth moved in the best society–had, so far as was known, no enemies
22717 and no particular vices.
22718 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22719 had been broken off by mutual consent some months before, and there was
22720 no sign that it had left any very profound feeling behind it.
22721 For the rest {sic} the man's life moved in a narrow and conventional circle,
22722 for his habits were quiet and his nature unemotional.
22723 Yet it was upon this easy-going young aristocrat that death came, in most
22724 strange and unexpected form, between the hours of ten and eleven-twenty
22725 on the night of March 30, 1894.
22728 \begin_layout Standard
22732 \begin_layout Plain Layout
22744 \begin_layout Standard
22747 Ronald Adair was fond of cards–playing continually, but never for such stakes
22749 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22750 It was shown that, after dinner on the day of his death, he had played
22751 a rubber of whist at the latter club.
22752 He had also played there in the afternoon.
22757 The evidence of those who had played with him– Mr.
22758 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22759 and that there was a fairly equal fall of the cards.
22760 Adair might have lost five pounds, but not more.
22761 His fortune was a considerable one, and such a loss could not in any way
22763 He had played nearly every day at one club or other, but he was a cautious
22764 player, and usually rose a winner.
22765 It came out in evidence that, in partnership with Colonel Moran, he had
22766 actually won as much as four hundred and twenty pounds in a sitting, some
22767 weeks before, from Godfrey Milner and Lord Balmoral.
22768 So much for his recent history as it came out at the inquest.
22771 \begin_layout Standard
22775 \begin_layout Plain Layout
22787 \begin_layout Standard
22788 Please do read the file
22790 examples/multicol.lyx
22792 for more advanced examples including column and header spacing, vertical
22793 separator lines, and more.
22796 \begin_layout Section
22801 Paragraph Environment
22802 \begin_inset Argument
22805 \begin_layout Plain Layout
22806 Numbering in Enumerate
22814 \begin_layout Standard
22820 \begin_layout Standard
22821 \begin_inset VSpace bigskip
22827 \begin_layout Standard
22829 The default numbering for the
22833 paragraph environment begins with Arabic numbers and ends with uppercase
22835 Suppose, however, you wanted a different type of numbering scheme.
22836 Here's a quickie example of how to change the numbering scheme:
22839 \begin_layout LyX-Code
22849 \begin_layout LyX-Code
22859 \begin_layout LyX-Code
22869 \begin_layout LyX-Code
22879 \begin_layout Standard
22880 \SpecialChar \ldots{}
22881 which changes the numbering scheme to uppercase Roman numerals, uppercase
22882 letters, Arabic numbers, and lowercase letter.
22885 \begin_layout Standard
22886 Additionally, the previous example also adds a little bit extra to the numbering
22888 For example, the first level label actually looks like:
22889 \begin_inset Quotes eld
22893 \begin_inset Quotes erd
22897 For ease of reading, we'll describe what the numbering schemes look like
22898 using a notation something like this: <
22899 \begin_inset Quotes eld
22903 \begin_inset Quotes erd
22907 \begin_inset space ~
22911 \begin_inset Quotes erd
22915 \begin_inset Quotes erd
22919 \begin_inset space ~
22923 \begin_inset Quotes erd
22927 \begin_inset Quotes erd
22931 \begin_inset space ~
22935 \begin_inset Quotes eld
22939 \begin_inset Quotes erd
22946 \begin_layout Standard
22947 As you can see in the example, there is a label command for each nesting
22954 \SpecialChar \ldots{}
22961 , as well as a counter,
22965 \SpecialChar \ldots{}
22971 There are also five
22972 \begin_inset Quotes eld
22976 \begin_inset Quotes erd
23009 , each of which take one counter as an argument.
23010 You can add characters before or after these, but there's no need to add
23014 \begin_layout Standard
23015 You can get really fancy with these.
23019 \begin_layout LyX-Code
23033 \begin_layout LyX-Code
23045 \begin_layout LyX-Code
23055 \begin_layout LyX-Code
23065 \begin_layout Standard
23066 produces the somewhat out of hand numbering scheme: <
23067 \begin_inset Quotes eld
23071 \begin_inset Quotes erd
23075 \begin_inset space ~
23079 \begin_inset Quotes erd
23083 \begin_inset Quotes erd
23087 \begin_inset space ~
23091 \begin_inset Quotes erd
23095 \begin_inset Quotes erd
23099 \begin_inset space ~
23103 \begin_inset Quotes eld
23107 \begin_inset Quotes erd
23114 \begin_layout Section
23118 \begin_layout Standard
23124 \begin_layout Standard
23125 \begin_inset VSpace bigskip
23131 \begin_layout Standard
23136 \begin_layout Plain Layout
23142 tmpfont}{cmr17 scaled 2500}{
23154 \begin_layout Standard
23159 \begin_layout Plain Layout
23170 hose of you who like the style of old books probably also like
23171 \begin_inset Quotes eld
23175 \begin_inset Quotes erd
23178 —those large capital letters which begin each new chapter or section.
23179 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23180 know some plain TeX!) but does require a lot of work and many iterations,
23181 as you can see by all the ugly TeX-mode stuff at the beginning of this
23185 \begin_layout Standard
23189 \begin_layout Plain Layout
23195 bigdrop{-1em}{3}{ptmri}{T}+
23200 here is a much easier way of doing this, of course.
23209 ) package from CTAN allows a simple way to add such letters to your documents.
23210 Since this package is not a standard part of TeXLive, I can't demonstrate
23211 it within this document, but if you copy this paragraph to a new document,
23213 \begin_inset Quotes eld
23223 \begin_inset Quotes erd
23226 and the pluses from the TeX code at the beginning of the paragraph, and
23231 usepackage{dropcaps}
23233 to your LaTeX preamble, you will get a nice Times Roman Italic
23234 \begin_inset Quotes eld
23238 \begin_inset Quotes erd
23241 , whose height is three lines of text and which protrudes 1 em into the
23243 (Make certain you have copied
23244 \begin_inset Quotes eld
23252 \begin_inset Quotes erd
23255 into a directory where TeX can see it.) The first argument is the amount
23256 of indentation; in this case the negative sign moves it into the margin.
23257 The second argument is the height of the letter in number of lines of text.
23258 The third argument is the font name: virtually anything which has a tfm
23259 file should work (wade through the
23261 .../texmf/fonts/tfm
23263 directory for possibilities).
23264 My personal favorite is
23265 \begin_inset Quotes eld
23273 \begin_inset Quotes erd
23276 , a fancy German font specifically designed for dropped capitals.
23277 The fourth argument is the letter (or letters) to be dropped.
23282 package also offers the
23288 command, as well as a slightly simplified
23297 \begin_layout Section
23298 Non-standard Paragraph Shapes
23301 \begin_layout Standard
23307 \begin_layout Standard
23308 \begin_inset VSpace bigskip
23314 \begin_layout Standard
23318 \begin_layout Plain Layout
23330 \begin_layout Standard
23334 \begin_layout Plain Layout
23343 \begin_layout Plain Layout
23357 \begin_layout Standard
23362 \begin_layout Plain Layout
23373 \begin_layout Plain Layout
23382 \begin_layout Plain Layout
23391 \begin_layout Plain Layout
23400 \begin_layout Plain Layout
23409 \begin_layout Plain Layout
23418 \begin_layout Plain Layout
23427 \begin_layout Plain Layout
23436 \begin_layout Plain Layout
23445 \begin_layout Plain Layout
23454 \begin_layout Plain Layout
23463 \begin_layout Plain Layout
23472 \begin_layout Plain Layout
23481 \begin_layout Plain Layout
23490 \begin_layout Plain Layout
23499 \begin_layout Plain Layout
23508 \begin_layout Plain Layout
23517 \begin_layout Plain Layout
23526 \begin_layout Plain Layout
23535 \begin_layout Plain Layout
23541 There are times when the tyranny of rectangular paragraphs must be overthrown.
23542 In such situations, a call to the delightful plain TeX command
23549 As you can see, completely arbitrary shapes can be laid out with a suitable
23550 set of linelength definitions.
23551 While this parshape may look a bit silly and useless, one could conceive
23552 of situations such as finely tuned dropped capitals, word wrapping around
23553 non-rectangular graphics, etc.
23554 which will benefit from such handcrafting.
23557 \begin_layout Standard
23558 \begin_inset VSpace bigskip
23564 \begin_layout Standard
23569 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23576 is the number of lines of text which define the paragraph.
23577 If there turn out to be fewer lines, the shape is truncated; if there are
23578 more, the excess lines have the same dimensions as the last line of the
23588 entries specify the indentation of the line from the left margin, and the
23589 length of the line as measured from that point.
23590 The shape applies only to the current paragraph; everything is reset to
23591 normal for the next paragraph.
23594 \begin_layout Standard
23598 \begin_layout Plain Layout
23610 \begin_layout Section
23614 \begin_layout Standard
23615 As you can see, the examples in this section range from the useful to the
23617 While I don't expect that anyone will ever need the paragraph shape demonstrate
23618 d in the last section, the important point is that you can do almost anything
23619 you want in LyX if you are willing to figure out how to do it in TeX and
23621 TeX is a fantastically powerful typesetting system and all that power is
23622 available to you since LyX uses it as its backend.