1 #LyX 2.0 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}}
71 \language_package default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes true
131 \output_changes false
135 \author 711066561 "Enrico Forestieri"
136 \author 1414654397 "Richard Heck"
142 Additional LyX Features
150 \begin_layout Plain Layout
152 Principal maintainer of this file is
157 If you have comments or error corrections, please send them to the LyX
158 Documentation mailing list,
159 \begin_inset Flex Code
162 \begin_layout Plain Layout
164 <lyx-docs@lists.lyx.org>
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
186 \begin_layout Chapter
190 \begin_layout Standard
191 This manual is essentially Part II of the
193 User's Guide\SpecialChar \@.
196 The reason for separating this document out is simple: the
200 is already quite lengthy, and it contains information on all of the basic
201 features one needs to know in order to prepare most documents.
202 However, the LyX Team has worked to make LyX extensible through various
203 configuration files and external packages.
204 That means that if you want to support the Fizzwizzle LaTeX package, you
205 can create a layout file (or module) for it without having to alter LyX
207 We've already had contributions of several new features this way, and some
208 of them are documented here.
209 There are also some more `advanced' features, such as how to control the
210 presentation of bibliographies and how to work with multi-part documents,
211 that are not covered in the
215 and are discussed here.
218 \begin_layout Standard
219 This manual also documents some special features, like fax support, version
220 control, and SGML support, which require additional software to work properly.
221 There is also a chapter on LyX's support for HTML.
222 And lastly, there's a chapter of LaTeX tools and tips, things you can use
223 to spruce up your documents by directly using the powerful features of
229 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
232 \begin_layout Standard
233 If you haven't read the
237 yet, you are definitely in the wrong manual.
242 is the first place to go, since it describes the notation and format of
244 You should also be thoroughly familiar with the
248 and all of the basic features of LyX before attempting to read this one.
251 \begin_layout Standard
252 Since many of the topics in this manual depend heavily on LyX's interaction
253 with LaTeX, this first chapter covers the inner workings of LyX and how
254 to direct LyX to generate exactly the LaTeX code you want.
255 It is obviously for more seasoned LyX users.
258 \begin_layout Chapter
262 \begin_layout Section
266 \begin_layout Standard
267 This chapter is for both TeX-nicians and the LaTeX-curious.
268 In it, we'll explain how LyX and LaTeX work together to produce printable
270 This is the only place in any of the manuals where we assume you know something
274 \begin_layout Standard
275 At one time, LyX was called a
276 \begin_inset Quotes eld
279 WYSIWYM frontend to LaTeX,
280 \begin_inset Quotes erd
283 but that's no longer true.
284 There are frontends to LaTeX out there.
288 \begin_layout Plain Layout
289 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
290 There are also the LaTeX modes for vi and emacs, of course.
295 These are basically text editors with the ability to run LaTeX and mark
296 any errors in the file you're editing.
305 run LaTeX, and it also indicates errors in the file, it also does much,
307 For one thing, you don't need to know LaTeX to use LyX effectively.
308 And LyX has added its own extensions to LaTeX.
309 Try the following sometime: select
310 \begin_inset Flex MenuItem
313 \begin_layout Plain Layout
314 Export\SpecialChar \menuseparator
321 \begin_inset Flex MenuItem
324 \begin_layout Plain Layout
331 \begin_inset Flex MenuItem
334 \begin_layout Plain Layout
335 View\SpecialChar \menuseparator
341 ), then look at the preamble of the resulting
342 \begin_inset Flex Code
345 \begin_layout Plain Layout
352 You'll notice a variety of new macros defined specifically by LyX.
353 These macros are defined automatically, according to the features you use
357 \begin_layout Standard
358 There are several commands that automatically invoke LaTeX.
362 \begin_layout Itemize
363 \begin_inset Flex MenuItem
366 \begin_layout Plain Layout
367 View\SpecialChar \menuseparator
376 \begin_layout Itemize
377 \begin_inset Flex MenuItem
380 \begin_layout Plain Layout
381 View\SpecialChar \menuseparator
382 Update\SpecialChar \menuseparator
391 \begin_layout Itemize
392 \begin_inset Flex MenuItem
395 \begin_layout Plain Layout
396 File\SpecialChar \menuseparator
405 \begin_layout Itemize
406 \begin_inset Flex MenuItem
409 \begin_layout Plain Layout
410 File\SpecialChar \menuseparator
419 \begin_layout Standard
420 They will only invoke LaTeX if the file has changed since the last time
425 \begin_layout Standard
426 When LyX runs LaTeX on the file you're editing, it performs these steps:
429 \begin_layout Enumerate
430 Convert the document to LaTeX and save to a file with the extension
431 \begin_inset Flex Code
434 \begin_layout Plain Layout
441 \begin_inset Flex Code
444 \begin_layout Plain Layout
453 \begin_layout Enumerate
455 \begin_inset Flex Code
458 \begin_layout Plain Layout
464 file (maybe several times), and run any other commands (such as
465 \begin_inset Flex Code
468 \begin_layout Plain Layout
475 \begin_inset Flex Code
478 \begin_layout Plain Layout
484 ) needed to compile the LaTeX file.
487 \begin_layout Enumerate
488 If there are any errors, show the error log.
491 \begin_layout Standard
492 If you've run LaTeX using
493 \begin_inset Flex MenuItem
496 \begin_layout Plain Layout
499 \SpecialChar \menuseparator
507 , LyX then runs a DVI viewer to display the DVI-file.
509 \begin_inset Flex MenuItem
512 \begin_layout Plain Layout
515 \SpecialChar \menuseparator
523 , LyX performs further steps:
526 \begin_layout Itemize
528 \begin_inset Flex Code
531 \begin_layout Plain Layout
537 to convert the DVI file to PostScript.
540 \begin_layout Itemize
541 Run a PostScript viewer, such as
542 \begin_inset Flex Code
545 \begin_layout Plain Layout
551 , to display the PostScript file.
554 \begin_layout Standard
555 LyX does similar things when viewing, or exporting, other formats.
558 \begin_layout Section
559 Translating LaTeX files into LyX
562 \begin_layout Standard
563 You can import a LaTeX file into LyX by using the
564 \begin_inset Flex MenuItem
567 \begin_layout Plain Layout
568 File\SpecialChar \menuseparator
569 Import\SpecialChar \menuseparator
576 This will call a program named
577 \begin_inset Flex Code
580 \begin_layout Plain Layout
586 which will create a file
587 \begin_inset Flex Code
590 \begin_layout Plain Layout
597 \begin_inset Flex Code
600 \begin_layout Plain Layout
607 LyX will then open that file.
611 \begin_layout Plain Layout
612 \begin_inset Flex Code
615 \begin_layout Plain Layout
621 can also be run from the command line, of course.
629 \begin_layout Standard
630 \begin_inset Flex Code
633 \begin_layout Plain Layout
639 will translate most legal LaTeX, but not everything.
640 It will put things it doesn't understand into TeX code, so after translating
642 \begin_inset Flex Code
645 \begin_layout Plain Layout
651 , you can look for TeX code and hand-edit it until it looks right.
654 \begin_layout Standard
655 If you don't know what TeX code is, read the next section.
658 \begin_layout Section
659 \begin_inset CommandInset label
661 name "sec:Inserting-TeX-Code"
665 Inserting TeX Code into LyX Documents
668 \begin_layout Standard
669 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
670 You can always insert TeX code into any LyX document.
671 LyX cannot, and will never be able to, display every possible LaTeX construct.
672 If ever you need to insert LaTeX commands into your LyX document, you can
674 \begin_inset Flex Code
677 \begin_layout Plain Layout
683 box, which you can insert into your document with
684 \begin_inset Flex MenuItem
687 \begin_layout Plain Layout
688 Insert\SpecialChar \menuseparator
697 \begin_layout Standard
698 Here's an example of inserting LaTeX commands in a LyX document.
699 The code looks like this:
702 \begin_layout LyX-Code
706 \begin_inset Newline newline
712 \begin_inset Newline newline
715 This is an example for a minipage environment.
717 \begin_inset Newline newline
720 can put nearly everything in it, even (non-floating)
721 \begin_inset Newline newline
726 \begin_inset Newline newline
732 \begin_inset Newline newline
736 \begin_inset Newline newline
742 \begin_inset Newline newline
748 \begin_inset Newline newline
754 \begin_inset Newline newline
759 \begin_inset Newline newline
765 \begin_inset Newline newline
771 \begin_inset Newline newline
777 \begin_inset Newline newline
785 \begin_layout LyX-Code
789 \begin_layout Standard
791 \begin_inset Flex Code
794 \begin_layout Plain Layout
800 box containing this text is directly after this paragraph.
801 Those of you reading the manual in LyX will only see the TeX code inset.
802 Those reading a printed version of the manuals will see the actual results:
805 \begin_layout Standard
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
823 \begin_layout Plain Layout
825 This is an example for a minipage environment.
826 You can put nearly everything in it, even (non-floating) figures and tables.
830 \begin_layout Plain Layout
837 \begin_layout Plain Layout
842 \begin_layout Plain Layout
849 \begin_layout Plain Layout
856 \begin_layout Plain Layout
863 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
883 \begin_layout Plain Layout
890 \begin_layout Plain Layout
902 \begin_layout Standard
903 In addition to using TeX code, you can also create a separate file containing
904 some complex LaTeX structure and then use
905 \begin_inset Flex MenuItem
908 \begin_layout Plain Layout
909 Insert\SpecialChar \menuseparator
919 to include your file (you should select the type
920 \begin_inset Flex Code
923 \begin_layout Plain Layout
930 We recommend that you only do this if you have a
931 \begin_inset Flex Code
934 \begin_layout Plain Layout
945 Otherwise, you'll have a big job tracking down LaTeX errors.
948 \begin_layout Standard
949 There are a few last points to emphasize:
952 \begin_layout Itemize
957 check if your LaTeX code is correct.
960 \begin_layout Itemize
961 Beware reinventing the wheel.
964 \begin_layout Standard
965 On that last point, LyX does have quite a few features tucked into it, and
967 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
968 feature before you decide you have to do it by hand.
969 Moreover, there are numerous LaTeX packages out there to do all sorts of
970 things, from labels to envelopes to fancy multipage tables.
972 \begin_inset CommandInset href
975 target "http://www.ctan.org/"
979 for details, and see chapter
980 \begin_inset CommandInset ref
982 reference "cha:secrets"
989 \begin_layout Standard
990 If you do need to do some wild and fancy things within your document, be
991 sure to check out a good LaTeX book for assistance.
992 There are a number of them listed in the bibliography of the
999 \begin_layout Section
1000 LyX and the LaTeX Preamble
1003 \begin_layout Subsection
1004 About the LaTeX Preamble
1007 \begin_layout Standard
1008 If you already know LaTeX, there is no need to explain here what the preamble
1010 If you don't, the following will give you some ideas—we recommend again
1011 that you consult a LaTeX book for further information.
1012 In any case, you should read the points below, because they explain what
1013 you can do and what you don't need to do in the LaTeX preamble of a LyX
1017 \begin_layout Standard
1018 The LaTeX preamble comes at the very beginning of a document,
1026 \begin_layout Itemize
1027 Declare the document class.
1029 \begin_inset Newline newline
1032 LyX already does this for you.
1033 If you're a seasoned LaTeX-nician, and you have a custom document class
1034 you want to use, check out the
1036 Customization Manual
1038 for information on how to make LyX interface to it.
1041 \begin_layout Itemize
1042 Declare the usage of packages.
1044 \begin_inset Newline newline
1047 LaTeX packages provide special commands, which are only available within
1048 a document when the package has been declared in the preamble.
1049 For example, the package
1050 \begin_inset Flex Code
1053 \begin_layout Plain Layout
1059 forces all paragraphs to be indented.
1060 There are other packages for labels, envelopes, margins, etc.
1064 \begin_layout Itemize
1065 Set counters, variables, lengths and widths.
1067 \begin_inset Newline newline
1070 There are several LaTeX counters and variables which
1074 be set globally from within the preamble in order to have the desired effect.
1075 (There are variables which you can set and reset inside the document, too.)
1076 Margins are a good example of something which must be set in the preamble.
1077 Another example is the label format for lists.
1078 You can actually set these just about anywhere, but it's best to do it
1079 just once, inside the preamble.
1082 \begin_layout Itemize
1083 Declare user defined commands (with
1084 \begin_inset Flex Code
1087 \begin_layout Plain Layout
1096 \begin_inset Flex Code
1099 \begin_layout Plain Layout
1108 \begin_inset Newline newline
1111 These are abbreviations for LaTeX commands which appear very often inside
1113 Although the preamble is a good place to declare such commands, they
1117 be declared anywhere (before they are used for the first time, of course).
1118 This can be useful if there is a lot of raw LaTeX code in your document,
1119 which normally should not be the case.
1122 \begin_layout Standard
1123 LyX adds its own set of definitions to the preamble of the
1124 \begin_inset Flex Code
1127 \begin_layout Plain Layout
1134 This makes LaTeX files generated by LyX portable.
1137 \begin_layout Subsection
1138 Changing the Preamble
1141 \begin_layout Standard
1142 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1143 can't change them without patching LyX itself.
1144 You can, however, add your own stuff to the preamble by selecting
1145 \begin_inset Flex MenuItem
1148 \begin_layout Plain Layout
1150 \begin_inset space ~
1159 \begin_inset Flex MenuItem
1162 \begin_layout Plain Layout
1163 Document\SpecialChar \menuseparator
1170 LyX adds anything in the
1171 \begin_inset Flex MenuItem
1174 \begin_layout Plain Layout
1180 dialog to its own built-in preamble.
1181 Before adding your own declarations in the preamble, you should make sure
1182 that LyX doesn't already support what you want to do.
1183 (Remember what we said about reinventing the wheel?) Also,
1185 make sure your preamble code is correct
1188 LyX doesn't check it for you.
1189 If there is an error, you're likely to get an error like
1190 \begin_inset Quotes eld
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_inset Quotes erd
1210 If you see this error, check your preamble.
1213 \begin_layout Subsection
1217 \begin_layout Standard
1218 Here are some examples of what you can add to a preamble, and what they
1222 \begin_layout Subsubsection
1226 \begin_layout Standard
1227 There are two variables under LaTeX that control page position:
1228 \begin_inset Flex Code
1231 \begin_layout Plain Layout
1240 \begin_inset Flex Code
1243 \begin_layout Plain Layout
1252 Their names should be self-explanatory.
1253 These variables are useful if you think for a moment about computer labels.
1254 Sometimes, the size of a print medium and the area of the medium that you
1255 can actually print on aren't the same.
1257 \begin_inset Flex Code
1260 \begin_layout Plain Layout
1269 \begin_inset Flex Code
1272 \begin_layout Plain Layout
1283 \begin_layout Standard
1284 The default values for
1285 \begin_inset Flex Code
1288 \begin_layout Plain Layout
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1309 \begin_inset space \thinspace{}
1313 \begin_inset space \thinspace{}
1317 \begin_inset space \space{}
1320 the page isn't shifted.
1321 Unfortunately, some DVI drivers always seem to shift the page.
1322 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1323 If you're using LyX on a system that you don't personally maintain, and
1324 your sysadmin is a doofus,
1325 \begin_inset Flex Code
1328 \begin_layout Plain Layout
1337 \begin_inset Flex Code
1340 \begin_layout Plain Layout
1349 Suppose your left and top margins are always 0.5
1350 \begin_inset space \thinspace{}
1354 You can add this to the preamble:
1357 \begin_layout LyX-Code
1365 \begin_layout LyX-Code
1373 \begin_layout Standard
1374 and your margins should now be correct.
1377 \begin_layout Subsubsection
1381 \begin_layout Standard
1382 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1383 There's a rather nice package, available at your nearest CTAN archive,
1384 for printing sheets of labels:
1385 \begin_inset Flex Code
1388 \begin_layout Plain Layout
1395 Now, your system may not have this package installed by default.
1396 We leave that up to you to check.
1397 You'll also want to read the documentation for it; we're not going to do
1399 Since this is an example, however, we'll give you an example of how you
1403 \begin_layout Standard
1404 First, make sure you're using the
1405 \begin_inset Flex Code
1408 \begin_layout Plain Layout
1415 Next, you need to put the following in your preamble:
1418 \begin_layout LyX-Code
1424 \begin_layout LyX-Code
1430 \begin_layout LyX-Code
1436 \begin_layout LyX-Code
1442 \begin_layout LyX-Code
1448 \begin_layout LyX-Code
1454 \begin_layout LyX-Code
1460 \begin_layout Standard
1461 This sets things up for Avery label sheets, stock #5360.
1462 You're now ready to print labels, but you'll need to insert LaTeX code,
1463 placing the commands
1464 \begin_inset Flex Code
1467 \begin_layout Plain Layout
1476 \begin_inset Flex Code
1479 \begin_layout Plain Layout
1487 around each label text.
1488 This and other special features of
1489 \begin_inset Flex Code
1492 \begin_layout Plain Layout
1498 are explained in its documentation.
1501 \begin_layout Standard
1502 Someday, someone may write a LyX layout file to support this package directly.
1503 Maybe that someone is you.
1506 \begin_layout Subsubsection
1507 Example #3: Paragraph Indentation
1510 \begin_layout Standard
1511 Americans are trained to indent the first line of
1516 As with all of their other weird quirks, most Americans will whine and
1517 moan until they can have their way and indent the first line of all paragraphs.
1526 \begin_layout Standard
1527 Of course, this behavior isn't standard typography.
1528 In books, you typically only indent the first line of a paragraph
1532 it follows another one.
1533 The idea behind indenting the first line of a paragraph is to distinguish
1534 neighboring paragraphs from one another.
1535 If there is no previous paragraph—for example, if it follows a figure or
1536 is the first paragraph in a section—then there is no need for indentation.
1540 \begin_layout Standard
1541 If you're a typical American (we're still joking!), though, you don't care
1542 about such esoteric things; you want your indentation! Add this to the
1546 \begin_layout LyX-Code
1549 usepackage{indentfirst}
1552 \begin_layout Standard
1553 If your TeX distribution isn't braindead, you'll have this package, and
1554 all of your paragraphs will get the indentation the Founding Fathers intended
1558 \begin_layout Subsubsection
1559 Example #4: This Document
1562 \begin_layout Standard
1563 You can also check out the preamble of this document to get an idea of some
1564 of the advanced things you can do.
1565 Also, there are more examples and an assortment of LaTeX
1566 \begin_inset Quotes eld
1570 \begin_inset Quotes erd
1574 \begin_inset space ~
1578 \begin_inset CommandInset ref
1580 reference "cha:secrets"
1588 \begin_layout Section
1589 LyX and LaTeX Errors
1592 \begin_layout Standard
1593 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1595 It then uses the logfile from the LaTeX run to do a post-mortem.
1596 After analyzing the logfile,LyX displays a dialog listing the errors.
1597 Clicking on any one of them will take you to the position in your LyX file
1598 where the error occurred.
1602 \begin_layout Plain Layout
1604 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1606 There are also cases where LaTeX reports the error on one line, but the
1607 actual error is earlier.
1608 This is not unlike forgetting a closing brace in a program: You'll get
1609 an error, but only later.
1617 \begin_layout Standard
1618 Some folks also like to look at the log file directly: It is available from
1620 \begin_inset Flex MenuItem
1623 \begin_layout Plain Layout
1626 \SpecialChar \menuseparator
1630 \begin_inset space ~
1639 There are some fairly common error messages and warnings.
1640 We'll cover those here.
1641 You should look at a good LaTeX book for a complete listing.
1644 \begin_layout Itemize
1645 \begin_inset Flex Code
1648 \begin_layout Plain Layout
1655 \begin_inset Newline newline
1658 Anything beginning with these words is a warning message for the purpose
1660 \begin_inset Quotes eld
1664 \begin_inset Quotes erd
1667 the LaTeX code itself.
1668 You'll get messages like this if you added or changed cross-references
1669 or bibliography entries, in which case, LaTeX is trying to tell you that
1670 you need to make another run.
1671 You can by-and-large ignore these.
1674 \begin_layout Itemize
1675 \begin_inset Flex Code
1678 \begin_layout Plain Layout
1685 \begin_inset Newline newline
1688 Another warning message, this time about fonts which LaTeX couldn't find.
1689 The rest of the message will often say something about a replacement font
1691 You can safely ignore these, too.
1694 \begin_layout Itemize
1695 \begin_inset Flex Code
1698 \begin_layout Plain Layout
1707 \begin_inset Newline newline
1715 They are warnings about lines that were too long and run past the right
1717 Almost always, this is unnoticeable in the final output.
1718 (It can be just a point or two.) Or, only one or two characters extend past
1720 LaTeX seems to generate at least one of these messages for just about any
1722 \begin_inset Newline newline
1725 You can ignore these messages.
1726 Your eyes will tell you if there's a problem with something that's too
1727 wide; just look at the output.
1731 \begin_layout Plain Layout
1732 You can also enable the `draft' option in
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1739 \SpecialChar \menuseparator
1747 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1755 \begin_layout Itemize
1756 \begin_inset Flex Code
1759 \begin_layout Plain Layout
1768 \begin_inset Newline newline
1771 Not quite as common as its cousin.
1772 LaTeX seems to like to print lines that are a bit too wide as opposed to
1773 ones that are a bit too narrow.
1774 We have no idea why.
1777 \begin_layout Itemize
1778 \begin_inset Flex Code
1781 \begin_layout Plain Layout
1790 \begin_inset Flex Code
1793 \begin_layout Plain Layout
1802 \begin_inset Newline newline
1805 Warnings about troubles breaking the page.
1806 Once again, just look at the output.
1807 Your eyes will tell you where something has gone wrong.
1810 \begin_layout Itemize
1811 \begin_inset Flex Code
1814 \begin_layout Plain Layout
1816 \begin_inset Quotes els
1820 \begin_inset Quotes ers
1829 \begin_inset Newline newline
1833 \begin_inset Quotes eld
1837 \begin_inset Quotes erd
1840 isn't installed on this system.
1841 This usually appears because some package your document needs isn't installed.
1842 If you didn't touch the preamble or didn't use the
1843 \begin_inset Flex Code
1846 \begin_layout Plain Layout
1854 command, then one of the packages LyX tried to load is missing.
1856 \begin_inset Flex MenuItem
1859 \begin_layout Plain Layout
1860 Help\SpecialChar \menuseparator
1866 to get a list of packages that LyX knows about.
1867 This file is updated whenever you reconfigure LyX (using
1868 \begin_inset Flex MenuItem
1871 \begin_layout Plain Layout
1872 Tools\SpecialChar \menuseparator
1878 ) and tells you which packages have been detected and what they do.
1879 \begin_inset Newline newline
1883 \begin_inset Flex Code
1886 \begin_layout Plain Layout
1894 command and the package in question isn't installed, then you'll need to
1895 install it yourself.
1898 \begin_layout Itemize
1899 \begin_inset Flex Code
1902 \begin_layout Plain Layout
1903 LaTeX Error: Unknown option
1909 \begin_inset Newline newline
1912 Error messages beginning with this are trying to tell you that you specified
1913 a bad or undefined option to a package.
1914 Check the package's documentation.
1917 \begin_layout Itemize
1918 \begin_inset Flex Code
1921 \begin_layout Plain Layout
1922 Undefined control sequence
1928 \begin_inset Newline newline
1931 If you've inserted LaTeX code into your document, but made a typo, you'll
1933 You may have forgotten to load a package.
1934 In any case, this error message usually means that you used an undefined
1939 \begin_layout Standard
1940 There are other error and warning messages.
1941 Some are self-explanatory.
1942 These are usually LaTeX messages.
1943 Others are downright cryptic.
1944 These are usually TeX error messages, and we really have
1948 what they mean or how to decipher them.
1952 \begin_layout Standard
1953 There's a general sequence you should follow if you get error messages:
1956 \begin_layout Enumerate
1957 Look at the LaTeX code you inserted for typos.
1960 \begin_layout Enumerate
1961 If there are no typos, check that you used the command(s) correctly.
1964 \begin_layout Enumerate
1965 If you get a bunch of error boxes piled up at the very top of the document—and
1966 especially if you see a
1967 \begin_inset Quotes eld
1971 \begin_inset Flex Code
1974 \begin_layout Plain Layout
1983 \begin_inset Quotes erd
1986 error—it means that there are errors in the preamble.
1987 Start debugging your preamble.
1990 \begin_layout Enumerate
1991 If you didn't add anything to the preamble and didn't add any LaTeX code
1992 to the document, the first suspect is your LaTeX distribution itself.
1993 Check for missing packages and install them.
1996 \begin_layout Enumerate
1997 Okay, so there are no missing packages.
1998 Did you use any of the fine-tuning options in LyX? Specifically, did you
2003 any of them, like trying to manually insert lots of
2004 \begin_inset Flex Code
2007 \begin_layout Plain Layout
2009 \begin_inset space ~
2018 \begin_inset Flex Code
2021 \begin_layout Plain Layout
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2037 ? Did you try to kludge something together with these instead of using the
2038 appropriate paragraph environment?
2041 \begin_layout Enumerate
2042 All right, you didn't use any of the fine-tuning options, you played by
2044 Did you try to pull a fancy maneuver? Did you do something funky inside
2045 a table or an equation, like inserting a graphic into a table cell?
2048 \begin_layout Enumerate
2049 Do you have long sections of text where LaTeX cannot find a place to break
2050 a line? By default, LaTeX is rather strict about how much extra inter-word
2051 spacing it will add in order to break a line.
2052 Preferably, you should rework the paragraph to avoid the problem.
2053 If this isn't an option, you can wrap your text in
2054 \begin_inset Flex Code
2057 \begin_layout Plain Layout
2065 to make LaTeX's line breaking more, well, sloppy.
2068 \begin_layout Enumerate
2069 Did you go overboard with the nesting? LyX (currently) doesn't check to
2070 make sure you're in the limits for nesting environments.
2071 If you nested a bunch of environments to the
2072 \begin_inset Formula $17^{\mathrm{th}}$
2075 level, that's the problem.
2076 (The limit in LaTeX is five.)
2079 \begin_layout Enumerate
2080 Okay, you didn't get any error messages, but your output looks awful.
2081 If you have a table or figure that's too wide or long for the page, you
2086 \begin_layout Enumerate
2087 rescale the figure so it fits.
2090 \begin_layout Enumerate
2091 trim down the table so it fits.
2095 \begin_layout Enumerate
2096 If something else is wrong with the output, and you didn't try to pull anything
2097 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2100 \begin_layout Standard
2101 If all this doesn't help—well, then
2105 you might have found a bug in LyX\SpecialChar \ldots{}
2109 \begin_layout Chapter
2113 \begin_layout Section
2114 Customizing Bibliographies with BibTeX
2117 \begin_layout Standard
2118 The most basic information about how to use BibTeX with LyX is contained
2121 Bibliography databases (BibTeX)
2128 The following subsections explain special bibliography features supported
2132 \begin_layout Subsection
2133 Alternative Citation Styles
2136 \begin_layout Standard
2137 Standard BibTeX uses numbers (e.
2138 \begin_inset space \thinspace{}
2142 \begin_inset space \space{}
2146 \begin_inset Quotes eld
2150 \begin_inset Quotes erd
2153 ) to refer to a cited work.
2154 However, in many scientific disciplines, other citation styles are in use.
2155 The most common one is the author-year style (e.
2156 \begin_inset space \thinspace{}
2160 \begin_inset space \space{}
2164 \begin_inset Quotes eld
2168 \begin_inset Quotes erd
2172 LyX supports two packages that provide this style,
2173 \begin_inset Flex Code
2176 \begin_layout Plain Layout
2183 \begin_inset Flex Code
2186 \begin_layout Plain Layout
2193 Both packages have their pros and cons, which cannot be listed in detail.
2194 If you only want to have simple author-year (or author-numerical) style,
2195 or if you want to use one of the countless style files for
2196 \begin_inset Flex Code
2199 \begin_layout Plain Layout
2205 , than the established
2206 \begin_inset Flex Code
2209 \begin_layout Plain Layout
2215 package is probably your choice.
2216 If you need special features like short title references, ibidem etc., you
2218 \begin_inset Flex Code
2221 \begin_layout Plain Layout
2230 \begin_layout Standard
2231 The handling of both packages in LyX is basically the same.
2233 \begin_inset Flex MenuItem
2236 \begin_layout Plain Layout
2237 Document\SpecialChar \menuseparator
2244 \begin_inset Flex MenuItem
2247 \begin_layout Plain Layout
2254 \begin_inset Flex MenuItem
2257 \begin_layout Plain Layout
2264 \begin_inset Flex MenuItem
2267 \begin_layout Plain Layout
2274 With both packages, you will get some extra features in the citation dialog
2275 and you can select the style of the reference (
2276 \begin_inset Quotes eld
2280 \begin_inset Quotes erd
2284 \begin_inset Quotes eld
2288 \begin_inset Quotes erd
2292 \begin_inset Quotes eld
2296 \begin_inset Quotes erd
2300 \begin_inset Quotes eld
2304 \begin_inset Quotes erd
2308 Note that both packages need specifically designed style files.
2309 They both ship their own, but there are lots of additional style files,
2310 and there is even an interactive style file builder
2314 \begin_layout Plain Layout
2316 \begin_inset Flex URL
2319 \begin_layout Plain Layout
2321 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2332 \begin_inset Flex Code
2335 \begin_layout Plain Layout
2344 \begin_layout Subsection
2345 Sectioned Bibliographies
2348 \begin_layout Standard
2349 Sometimes you might need to divide your bibliography into several sections.
2350 If you are for instance a historian, the possibility to separate sources
2351 and scientific works is most likely a
2352 \begin_inset Quotes eld
2356 \begin_inset Quotes erd
2360 Unfortunately, BibTeX itself does not allow you to do this.
2361 But with the help of some LaTeX packages, BibTeX can be extended to fit
2365 \begin_layout Standard
2366 LyX provides native support for one of these packages,
2374 \begin_layout Plain Layout
2376 \begin_inset Flex URL
2379 \begin_layout Plain Layout
2381 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2391 The advantage of this package (compared to other packages like
2395 ) is that you don't need to define new citation commands.
2396 Instead, you need to prepare different bibliographic databases which include
2397 the entries for the different sections of the bibliography.
2398 For example: If you want to divide your bibliography into the sections
2400 \begin_inset Quotes eld
2404 \begin_inset Quotes erd
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2415 , you first need to create two bibliographic databases, e.
2416 \begin_inset space \thinspace{}
2420 \begin_inset space \space{}
2424 \begin_inset Flex Code
2427 \begin_layout Plain Layout
2434 \begin_inset Flex Code
2437 \begin_layout Plain Layout
2447 \begin_layout Standard
2449 \begin_inset Flex MenuItem
2452 \begin_layout Plain Layout
2453 Document\SpecialChar \menuseparator
2460 \begin_inset Flex MenuItem
2463 \begin_layout Plain Layout
2470 \begin_inset Flex MenuItem
2473 \begin_layout Plain Layout
2474 Sectioned bibliography
2480 Now you can insert multiple BibTeX bibliographies, one for each section
2481 of your bibliography.
2482 Returning to our example: Insert the BibTeX bibliography
2483 \begin_inset Flex Code
2486 \begin_layout Plain Layout
2492 and a second one for the database
2493 \begin_inset Flex Code
2496 \begin_layout Plain Layout
2503 You are free to use the same or different styles for each section.
2504 Additionally, you can chose if the bibliography section should contain
2506 \begin_inset Quotes eld
2509 all cited references
2510 \begin_inset Quotes erd
2513 of the specified database(s) (which is the default),
2514 \begin_inset Quotes eld
2517 all uncited references
2518 \begin_inset Quotes erd
2522 \begin_inset Quotes eld
2526 \begin_inset Quotes erd
2530 This might be useful if you would like to separate your bibliography into
2532 \begin_inset Quotes eld
2536 \begin_inset Quotes erd
2540 \begin_inset Quotes eld
2544 \begin_inset Quotes erd
2548 \begin_inset Quotes eld
2552 \begin_inset Quotes erd
2556 The titles for the sections can be added as ordinary sections or subsections.
2558 \begin_inset Flex Code
2561 \begin_layout Plain Layout
2567 removes the bibliography title, you have manually re-add that, too (as
2568 a chapter* or section*, for instance).
2571 \begin_layout Subsection
2572 Multiple Bibliographies
2575 \begin_layout Standard
2576 Multiple bibliographies, e.
2577 \begin_inset space \thinspace{}
2581 \begin_inset space \space{}
2584 a bibliography for each section or chapter of the document, are not supported
2587 \begin_inset Flex Code
2590 \begin_layout Plain Layout
2596 package, which is used for the creation of sectioned bibliographies in
2597 LyX (see the previous section), provides an easy way to solve this task,
2598 if you are willing to use some
2599 \begin_inset Flex MenuItem
2602 \begin_layout Plain Layout
2609 \begin_inset space ~
2613 \begin_inset CommandInset ref
2615 reference "sec:Inserting-TeX-Code"
2623 \begin_layout Plain Layout
2624 An alternative approach is to use the
2625 \begin_inset Flex Code
2628 \begin_layout Plain Layout
2635 \begin_inset Flex Code
2638 \begin_layout Plain Layout
2644 package, respectively.
2652 \begin_layout Standard
2654 \begin_inset Flex MenuItem
2657 \begin_layout Plain Layout
2658 Document\SpecialChar \menuseparator
2665 \begin_inset Flex MenuItem
2668 \begin_layout Plain Layout
2675 \begin_inset Flex MenuItem
2678 \begin_layout Plain Layout
2679 Sectioned bibliography
2685 In the document, you have to enclose the sections, which shall contain
2686 their own bibliography (including the BibTeX bibliography itself), between
2688 \begin_inset Flex Code
2691 \begin_layout Plain Layout
2700 \begin_inset Flex Code
2703 \begin_layout Plain Layout
2711 (those commands have to be inserted as TeX code).
2712 The bibliography will contain all references which have been cited in the
2714 \begin_inset Flex Code
2717 \begin_layout Plain Layout
2728 If you are using this approach, then every citation reference has to be
2730 \begin_inset Flex Code
2733 \begin_layout Plain Layout
2741 \begin_inset Flex Code
2744 \begin_layout Plain Layout
2753 \begin_layout Section
2757 \begin_layout Subsection
2761 \begin_layout Standard
2762 When you are working on a large file with many sections, it is often convenient
2763 to break up the document into several files, or perhaps you have something
2764 where a table may change from time to time, but the preceding text does
2766 In these cases, you should seriously consider using multipart documents.
2767 For example, scientific papers often have five major sections: the introduction
2768 , observations, results, discussion, and conclusion.
2769 Each of these could be its own separate LyX file, with one
2770 \begin_inset Quotes eld
2774 \begin_inset Quotes erd
2777 file which contains the title, authors, abstract, references, etc., plus
2778 the five included files.
2779 It is important to note that each of these files is a full LyX file which
2780 can be formatted and printed on its own, as well as included in a master
2782 Each of these files must have the same document class, however—don't attempt
2783 to mix book classes with article classes.
2784 You may also include LaTeX files; however, these files must not have their
2786 \begin_inset space \thinspace{}
2790 \begin_inset space \space{}
2793 everything up to and including the
2794 \begin_inset Flex Code
2797 \begin_layout Plain Layout
2806 \begin_inset Flex Code
2809 \begin_layout Plain Layout
2817 line must be deleted) or else errors will be generated when you try to
2821 \begin_layout Standard
2822 LyX allows you to include files quite easily with
2823 \begin_inset Flex MenuItem
2826 \begin_layout Plain Layout
2827 Insert\SpecialChar \menuseparator
2829 \begin_inset space ~
2838 When you click on this selection a small box is inserted into the file
2839 at the current cursor location.
2840 Clicking on the box raises a dialog which allows you to select the file
2841 to be included, and the method of its inclusion.
2845 \begin_layout Standard
2846 The file selection box should by now be obvious.
2847 The three inclusion methods are
2848 \begin_inset Quotes eld
2852 \begin_inset Quotes erd
2856 \begin_inset Quotes eld
2860 \begin_inset Quotes erd
2864 \begin_inset Quotes eld
2868 \begin_inset Quotes erd
2872 The difference between
2873 \begin_inset Quotes eld
2877 \begin_inset Quotes erd
2881 \begin_inset Quotes eld
2885 \begin_inset Quotes erd
2888 is really only meaningful to LaTeXperts, but the practical difference is
2889 that files which are
2890 \begin_inset Quotes eld
2894 \begin_inset Quotes erd
2897 are typeset beginning on a new page, while files which are
2898 \begin_inset Quotes eld
2902 \begin_inset Quotes erd
2905 are typeset starting on the current page.
2908 \begin_layout Standard
2909 Generally, the master file is converted into a full LaTeX file before typesettin
2910 g, while the included files are converted to LaTeX files which do not have
2911 all the preamble information.
2914 \begin_layout Standard
2916 \begin_inset Quotes eld
2920 \begin_inset Quotes erd
2923 included file allows you to include a file typeset exactly as it appears
2925 \begin_inset space \thinspace{}
2929 \begin_inset space \space{}
2933 \begin_inset Flex Code
2936 \begin_layout Plain Layout
2942 mode, with the characters set in a fixed-width typewriter font.
2943 Normally, spaces in this file are invisible, though two consecutive spaces
2944 are conserved, unlike LyX's normal treatment of spaces.
2945 However, setting the
2946 \begin_inset Flex MenuItem
2949 \begin_layout Plain Layout
2951 \begin_inset space ~
2955 \begin_inset space ~
2959 \begin_inset space ~
2967 checkbox typesets a mark to unambiguously define the presence of a space.
2971 \begin_layout Subsection
2972 Cross-References Between Files
2975 \begin_layout Standard
2976 \begin_inset Box Shadowbox
2986 height_special "totalheight"
2989 \begin_layout Plain Layout
2990 This section is somewhat out of date.
2991 Need to describe default master documents and how children are opened when
3001 \begin_layout Standard
3002 It is possible to set up cross-references between the different files.
3003 First, open all the files in question: let's call them A and B in a two
3004 file example, where B is included in A.
3005 Let's say you insert a label in A, then want to reference it in B.
3006 Open the cross-reference dialog in whilst in document B, and you can select
3008 \begin_inset Quotes eld
3012 \begin_inset Quotes erd
3018 \begin_layout Subsection
3019 Bibliography Lists in all Subdocuments
3022 \begin_layout Standard
3023 \begin_inset Box Frameless
3033 height_special "totalheight"
3036 \begin_layout Plain Layout
3037 This section also needs updating.
3038 There is now material about this on the wiki, and it could be copied here.
3046 \begin_layout Standard
3047 Copy the bibliography list with all entries to all subdocuments and transform
3049 This way LyX will find the
3050 \begin_inset Flex Code
3053 \begin_layout Plain Layout
3059 -files and you can easily insert references without making the bibliography
3063 \begin_layout Standard
3064 As the bibliography list is in a comment, LaTeX won't use use it and the
3065 references will look like this: [?], instead of like this: [1].
3066 One solution is to use the LaTeX-package
3067 \begin_inset Flex Code
3070 \begin_layout Plain Layout
3076 that will only include comments by processing the files separately.
3077 To do this, add in the LaTeX preamble of every subdocument the following:
3080 \begin_layout LyX-Code
3086 \begin_layout LyX-Code
3089 includecomment{comment}
3092 \begin_layout Standard
3094 \begin_inset Flex URL
3097 \begin_layout Plain Layout
3099 http://wiki.lyx.org/FAQ/Unsorted#toc31
3107 \begin_layout Section
3109 \change_inserted 1414654397 1302963669
3113 \begin_layout Standard
3115 \change_inserted 1414654397 1302963893
3116 Users sometimes need to be able to
3117 \begin_inset Quotes eld
3121 \begin_inset Quotes erd
3124 a LyX file together with all the images (and other files) on which it depends,
3125 either for sending to a publisher or for sharing with a co-author.
3126 LyX 2.0 includes a Python script
3127 \change_inserted 711066561 1302968890
3129 \begin_inset Flex Code
3132 \begin_layout Plain Layout
3134 \change_inserted 711066561 1302968879
3143 \change_deleted 711066561 1302967226
3144 (written by Enrico Forestieri)
3145 \change_inserted 1414654397 1302963893
3146 that automates this process.
3147 To use it, you must have either
3148 \change_inserted 711066561 1302967360
3150 \change_inserted 1414654397 1302963893
3152 \begin_inset Flex Code
3155 \begin_layout Plain Layout
3157 \change_inserted 1414654397 1302963710
3159 \change_inserted 711066561 1302967333
3168 \begin_inset Flex Code
3171 \begin_layout Plain Layout
3173 \change_inserted 1414654397 1302963714
3175 \change_inserted 711066561 1302967339
3184 \change_inserted 711066561 1302967345
3186 \change_inserted 1414654397 1302963893
3187 installed on your system.
3189 \change_deleted 711066561 1302967469
3191 \change_inserted 711066561 1302968934
3193 \change_inserted 1414654397 1302963893
3195 \change_inserted 711066561 1302967645
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3202 \change_inserted 711066561 1302967636
3211 \change_inserted 1414654397 1302963893
3213 \begin_inset Flex Code
3216 \begin_layout Plain Layout
3218 \change_inserted 1414654397 1302963720
3227 \change_inserted 711066561 1302967527
3228 format on Unix-like systems
3229 \change_inserted 1414654397 1302963893
3231 \change_inserted 711066561 1302967699
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3238 \change_inserted 711066561 1302967678
3247 \change_deleted 711066561 1302967705
3248 , if it is available, then it will compress the archive using
3249 \begin_inset Flex Code
3252 \begin_layout Plain Layout
3254 \change_inserted 1414654397 1302963726
3263 \begin_inset Flex Code
3266 \begin_layout Plain Layout
3268 \change_inserted 1414654397 1302963730
3278 \begin_inset Flex Code
3281 \begin_layout Plain Layout
3283 \change_inserted 1414654397 1302963866
3291 is available, then it will use that.)
3292 \change_inserted 1414654397 1302963893
3296 \begin_layout Standard
3298 \change_deleted 711066561 1302967868
3299 If the appropriate programs are available, then
3300 \change_inserted 711066561 1302967868
3302 \change_inserted 1414654397 1302963889
3303 LyX's configuration process will set the script up to export a `LyX Archive',
3304 and this format will then be available under
3305 \begin_inset Flex Code
3308 \begin_layout Plain Layout
3310 \change_inserted 1414654397 1302963776
3311 File\SpecialChar \menuseparator
3320 \change_inserted 711066561 1302968080
3324 \begin_layout Standard
3326 \change_inserted 711066561 1302970799
3327 Independently of the platform, the generation of a particular archive format
3328 can be forced by adding either the
3329 \begin_inset Flex Code
3332 \begin_layout Plain Layout
3334 \change_inserted 711066561 1302968170
3343 \begin_inset Flex Code
3346 \begin_layout Plain Layout
3348 \change_inserted 711066561 1302968192
3357 \begin_inset Flex Code
3360 \begin_layout Plain Layout
3362 \change_inserted 711066561 1302968216
3371 \begin_inset Flex Code
3374 \begin_layout Plain Layout
3376 \change_inserted 711066561 1302968265
3384 format) switch to the
3385 \begin_inset Flex MenuItem
3388 \begin_layout Plain Layout
3390 \change_inserted 711066561 1302968420
3391 LyX\SpecialChar \menuseparator
3400 \begin_inset Flex MenuItem
3403 \begin_layout Plain Layout
3405 \change_inserted 711066561 1302968494
3406 Tools\SpecialChar \menuseparator
3407 Preferences\SpecialChar \menuseparator
3408 File Handling\SpecialChar \menuseparator
3416 (pay attention to add the switch after the script name, not before it).
3417 \change_inserted 1414654397 1302963889
3421 \begin_layout Section
3422 Fancy Headers and Footers
3425 \begin_layout Standard
3426 The default page layout is rather plain; for an
3427 \begin_inset Flex Code
3430 \begin_layout Plain Layout
3436 document class, all you get is a centered page number at the bottom of
3438 This document uses KOMA-script's book class, so it appears to be a bit
3440 But to really put on a show, you need to set the document page style to
3442 \begin_inset Quotes eld
3446 \begin_inset Quotes erd
3449 , as mentioned in the
3454 This section describes the LaTeX code you need to insert in your LaTeX
3455 preamble in order to get the desired effects.
3458 \begin_layout Standard
3459 For more information on fancy headers, see the
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3469 package documentation.
3471 \begin_inset Flex URL
3474 \begin_layout Plain Layout
3476 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3484 \begin_layout Standard
3485 The page header is divided into three fields, not surprisingly labeled
3486 \begin_inset Quotes eld
3490 \begin_inset Quotes erd
3494 \begin_inset Quotes eld
3498 \begin_inset Quotes erd
3502 \begin_inset Quotes eld
3506 \begin_inset Quotes erd
3510 The footer is also divided into these three fields.
3511 The LaTeX commands to set these fields in the simplest manner are
3512 \begin_inset Flex Code
3515 \begin_layout Plain Layout
3524 \begin_inset Flex Code
3527 \begin_layout Plain Layout
3536 \begin_inset Flex Code
3539 \begin_layout Plain Layout
3548 \begin_inset Flex Code
3551 \begin_layout Plain Layout
3560 Suppose you wish to put your name in the upper left hand corner of each
3562 Simply insert the following command in the preamble:
3565 \begin_layout Standard
3574 \begin_layout Standard
3575 You will now see your name in the upper left.
3576 If a field has a default entry that you would like to get rid of (often
3577 the page number appears in the central footer, simply include a command
3578 with a blank argument, e.
3579 \begin_inset space \thinspace{}
3585 \begin_layout Standard
3593 \begin_layout Standard
3594 Let's get really fancy: lets put the section number with the word
3595 \begin_inset Quotes eld
3599 \begin_inset Quotes erd
3603 \begin_inset space \thinspace{}
3607 \begin_inset space \space{}
3610 Section 3) in the upper left, the page number (e.
3611 \begin_inset space \thinspace{}
3615 \begin_inset space \space{}
3618 Page 4) in the upper right, your name in the lower left, and the date in
3620 The following commands should now appear in the preamble:
3623 \begin_layout Standard
3633 \begin_layout Standard
3641 \begin_layout Standard
3651 \begin_layout Standard
3660 \begin_layout Standard
3668 \begin_layout Standard
3678 \begin_layout Standard
3680 \begin_inset Flex Code
3683 \begin_layout Plain Layout
3692 \begin_inset Flex Code
3695 \begin_layout Plain Layout
3703 access LaTeX's section and page counters, and so print out the current
3704 section and page numbers.
3706 \begin_inset Flex Code
3709 \begin_layout Plain Layout
3717 simply prints out today's date.
3720 \begin_layout Standard
3721 The thicknesses of the horizontal rules drawn beneath the header and above
3722 the footer can also be modified.
3723 If you don't want one of the rules, set its thickness to 0.
3724 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3730 \begin_inset Flex Code
3733 \begin_layout Plain Layout
3738 headrulewidth}{0.4pt}
3744 \begin_inset Flex Code
3747 \begin_layout Plain Layout
3752 footrulewidth}{0.4pt}
3757 to set the thicknesses.
3760 \begin_layout Standard
3761 You can switch the header/footer settings on and off for individual pages
3763 \begin_inset Flex Code
3766 \begin_layout Plain Layout
3769 thispagestyle{empty}
3775 \begin_inset Flex Code
3778 \begin_layout Plain Layout
3781 thispagestyle{plain}
3787 \begin_inset Flex Code
3790 \begin_layout Plain Layout
3793 thispagestyle{fancy}
3799 Simply insert them in the text on the page you want changed and mark them
3801 In fact, title pages are marked as plain by default, while following pages
3802 are marked fancy when using the global fancy setting.
3805 \begin_layout Standard
3806 As a final example, it is possible to include an image in the header or
3808 Suppose you want to put a company logo in the upper lefthand corner.
3809 You might try something like
3812 \begin_layout Standard
3821 includegraphics{logo.eps}}}
3824 \begin_layout Standard
3826 (you may need to preface this with
3827 \begin_inset Flex Code
3830 \begin_layout Plain Layout
3834 usepackage{graphics}
3839 if you don't include graphics elsewhere in your document).
3842 \begin_layout Section
3843 Itemize Bullet Selection
3844 \begin_inset CommandInset label
3853 \begin_layout Standard
3859 \begin_layout Subsection
3863 \begin_layout Standard
3864 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3865 Using this dialog you can easily specify what bullet shape to use at each
3866 level of an itemized list.
3867 These settings are document-wide so you won't be able to specify different
3868 sets of bullets for different paragraphs.
3872 \begin_layout Plain Layout
3873 Well, actually you can but you'll have to do it by hand.
3881 \begin_layout Subsection
3885 \begin_layout Standard
3886 Open the dialog by selecting the
3887 \begin_inset Flex MenuItem
3890 \begin_layout Plain Layout
3891 Document\SpecialChar \menuseparator
3897 menu item and then select the
3898 \begin_inset Flex MenuItem
3901 \begin_layout Plain Layout
3910 \begin_layout Standard
3911 The dialog provides you with a table of bullet shapes.
3912 A column of buttons on the left of the table provides access to the six
3913 different panels of bullet shapes.
3914 The row of buttons across the top is used to select which bullet depth
3916 A text entry under the table shows the currently selected bullet shape's
3917 LaTeX equivalent and this can be edited if desired.
3918 If you do modify the text you will also need to specify any needed packages
3919 in the LaTeX preamble.
3922 \begin_layout Standard
3923 The six panels are divided up by the packages they require.
3924 The following table shows the mappings from button name to LaTeX packages.
3927 \begin_layout Standard
3929 \begin_inset Tabular
3930 <lyxtabular version="3" rows="7" columns="2">
3931 <features tabularvalignment="middle">
3932 <column alignment="center" valignment="top" width="0pt">
3933 <column alignment="center" valignment="top" width="0pt">
3935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3938 \begin_layout Plain Layout
3953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3956 \begin_layout Plain Layout
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3976 \begin_layout Plain Layout
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3994 \begin_layout Plain Layout
4010 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4013 \begin_layout Plain Layout
4028 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4031 \begin_layout Plain Layout
4048 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4051 \begin_layout Plain Layout
4066 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4069 \begin_layout Plain Layout
4086 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4089 \begin_layout Plain Layout
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4107 \begin_layout Plain Layout
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4127 \begin_layout Plain Layout
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4145 \begin_layout Plain Layout
4162 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4165 \begin_layout Plain Layout
4180 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4183 \begin_layout Plain Layout
4206 \begin_layout Standard
4207 LyX doesn't stop you using bullets from packages you don't have.
4208 If you get errors from LaTeX when you try to view or print the file, then
4209 it is likely you are missing a package.
4213 \begin_layout Plain Layout
4214 LyX doesn't restrict your use since you may be editing locally and exporting
4223 \begin_layout Subsection
4227 \begin_layout Standard
4228 Select which bullet depth you want to change then select the bullet shape
4230 Any changes will not be visible in LyX, but are visible when viewing the
4234 \begin_layout Standard
4235 You can reset a bullet shape to the default simply by clicking your right
4236 mouse button on the appropriate bullet depth button.
4240 \begin_layout Plain Layout
4245 want to have multiple sets of paragraphs with different sets of bullets
4246 in each, then you're going to have to get your hands dirty with TeX code.
4247 The bullet selection dialog can help though because it provides you with
4248 the LaTeX code for a wide range of bullet shapes.
4249 To make your own custom paragraphs you have the following options:
4252 \begin_layout Plain Layout
4256 \begin_layout Plain Layout
4272 \begin_layout Plain Layout
4276 \begin_layout Plain Layout
4298 \begin_layout Itemize
4299 Use the LaTeX command
4300 \begin_inset Flex Code
4303 \begin_layout Plain Layout
4311 to specify a new bullet shape for a given depth.
4312 You'll also need to save the current bullet shape so you can restore it
4314 In this itemized list the following LaTeX code was used to change the bullet
4315 used for the first depth.
4319 \begin_layout LyX-Code
4329 \begin_layout LyX-Code
4346 \begin_layout Itemize
4347 Note that the itemize depth is specified in Roman numerals as part of the
4357 \begin_layout Itemize
4361 \begin_layout Plain Layout
4374 Specify each individual entry by starting each item with the bullet shape
4375 enclosed in square brackets and set as
4376 \begin_inset Flex MenuItem
4379 \begin_layout Plain Layout
4386 For example, this item was started with
4387 \begin_inset Flex Code
4390 \begin_layout Plain Layout
4405 \begin_layout Plain Layout
4409 \begin_layout Plain Layout
4425 \begin_layout Plain Layout
4426 You'll also need to revert the labelitem back to its previous setting for
4427 the global bullet shape settings to remain in effect.
4428 The way used here was:
4431 \begin_layout LyX-Code
4446 \begin_layout Chapter
4447 LyX and the World Wide Web
4450 \begin_layout Standard
4451 LyX has long supported the export of documents to various web-friendly formats,
4453 Before verson 2.0, however, HTML export was always accomplished by the use
4454 of external converters.
4458 \begin_layout Plain Layout
4459 For details on the use of external converters with LyX, see the
4463 section of the Customization manual.
4468 These fall into two large groups: there are converters that use LaTeX as
4469 an intermediate format, such as
4470 \begin_inset Flex Code
4473 \begin_layout Plain Layout
4480 \begin_inset Flex Code
4483 \begin_layout Plain Layout
4490 \begin_inset Flex Code
4493 \begin_layout Plain Layout
4499 , relying upon LyX to produce the LaTeX; and there is a converter that works
4500 directly on LyX files,
4501 \begin_inset Flex Code
4504 \begin_layout Plain Layout
4511 All of these have different advantages and disadvantages.
4515 \begin_layout Standard
4516 The LaTeX-based converters have the advantage that, in principle, they know
4517 everything about the exported document that LaTeX does.
4518 Such converters do not care, for example, if a certain block of code was
4519 produced by LyX or was Evil Red Text.
4520 These converters know about
4521 \begin_inset Flex Code
4524 \begin_layout Plain Layout
4530 files, counters, and references, and can often make use of the
4531 \begin_inset Flex Code
4534 \begin_layout Plain Layout
4540 files generated by BibTeX.
4541 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4542 said that only TeX itself understands TeX---and LaTeX-based converters
4543 will often choke on what seem to be quite simple constructs; complex ones
4544 can throw them completely, and as of this writing, for example, the
4548 manual will not export with
4549 \begin_inset Flex Code
4552 \begin_layout Plain Layout
4558 , though the others will.
4559 The other issue concerns how math is handled.
4560 These converters typically convert the formulae into little pictures that
4561 are then linked from the HTML document.
4562 Since these are actually generated by LaTeX, they are accurate.
4563 But they do not scale well, and just getting them to look as if they are
4564 actually meant to be in your document---so that the font sizes seem to
4565 be roughly the same---can be a challenge.
4568 \begin_layout Standard
4570 \begin_inset Flex Code
4573 \begin_layout Plain Layout
4580 \begin_inset CommandInset href
4582 name "http://elyxer.nongnu.org/"
4583 target "http://elyxer.nongnu.org/"
4587 ) solves some of these problems.
4588 In particular, the formulae it produces scale perfectly, since it renders
4589 math using a combination of HTML and CSS rather than converting the formulae
4591 But even moderately complex formula are rendered less well than with
4592 \begin_inset Flex Code
4595 \begin_layout Plain Layout
4601 ; this reflects the limitations of HTML.
4605 \begin_layout Plain Layout
4607 \begin_inset Flex Code
4610 \begin_layout Plain Layout
4616 can also use jsMath and MathJax for equations, but this setting is only
4617 available globally and requires one to have access to a server that runs
4623 More importantly (as of version 1.1.1, at least),
4624 \begin_inset Flex Code
4627 \begin_layout Plain Layout
4633 has limited support for math macros and no support for user-defined paragraph
4634 or character styles.
4635 These limitations make
4636 \begin_inset Flex Code
4639 \begin_layout Plain Layout
4645 unsuitable for many of the documents LyX users produce.
4646 In principle, of course, these problems could be solved, but the LyX developers
4647 have decided to follow a different path and have made LyX itself capable
4648 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4652 \begin_layout Standard
4653 As of this writing, XHTML output remains under development and should probably
4655 \begin_inset Quotes eld
4659 \begin_inset Quotes erd
4666 \begin_layout Plain Layout
4668 \begin_inset Flex Code
4671 \begin_layout Plain Layout
4672 development/HTML.notes
4677 , which can be found in the LyX source tree or
4678 \begin_inset CommandInset href
4680 name "accessed online"
4681 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4685 , usually contains up-to-date information about the state of XHTML output.
4686 See also the list of XHTML bugs on
4687 \begin_inset CommandInset href
4689 name "the bug tracker"
4690 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4699 Still, the developers have chosen this approach because it has several
4700 potential advantages over the other two.
4703 \begin_layout Standard
4704 These advantages are primarily due to the fact that the XHTML output routines,
4705 since they are part of LyX, know everything LyX knows about the document
4710 \begin_layout Plain Layout
4711 Another advantage is that, since these routines are internal to LyX, they
4712 are immune to changes in LyX's file format, or to changes in the semantics
4718 So they know about the table of contents (as displayed in the outline),
4719 about the counters associated with different paragraph styles, and about
4720 user-defined styles.
4721 The XHTML output routines know what LyX knows about internationalization,
4722 too, so they will output
4723 \begin_inset Quotes eld
4727 \begin_inset Quotes erd
4731 \begin_inset Quotes eld
4739 \begin_inset Quotes erd
4742 , depending upon the language in effect at the time.
4746 \begin_layout Standard
4747 Quite generally, the output routines know what LyX knows about document
4748 layout, that is, about how the document is to be rendered on screen.
4749 We use this information when we output the document as XHTML.
4754 generates CSS style information corresponding to the layout information
4755 it uses to render the document on screen: if section headings are supposed
4756 to be sans-serif and bold as seen in LyX, then (by default) they will be
4757 sans-serif and bold when viewed in a web browser, too.
4758 And this is true not just for pre-defined styles, like Section, but for
4759 any style, including user-defined styles.
4760 Indeed, the XHTML output routines make no distinction between user-defined
4761 paragraph and character styles and LyX's own pre-defined styles: in each
4762 case, everything LyX knows about the styles is contained in the layout
4764 And much the same is true as regards pre-defined textual insets, such as
4765 footnotes, and various custom insets.
4769 \begin_layout Standard
4770 The result is that XHTML output can be customized and extended in exactly
4771 the same way LaTeX output can be customized and extended: through layout
4773 See chapter five of the
4777 manual for the details.
4780 \begin_layout Standard
4781 The remainder of this chapter contains more detailed information on XHTML
4782 output, its limitations, and ways to work around those limitations.
4785 \begin_layout Section
4786 Math Output in XHTML
4789 \begin_layout Standard
4790 LyX offers four choices for how math is rendered.
4791 These have various advantages and disadvantages:
4794 \begin_layout Itemize
4796 \begin_inset Newline newline
4799 MathML is a dialect of XML designed specifically for mathematics on the
4800 web, and it typically renders very well in browsers that support it.
4801 The disadvantage is that not all browsers support MathML, and support is
4802 not complete even in the Gecko-based browsers, such as Firefox.
4803 \begin_inset Newline newline
4806 If LyX is unable to render a formula as MathML---for example, if the formula
4808 \begin_inset Flex Code
4811 \begin_layout Plain Layout
4817 package or ERT---then it will instead output the formula as an image.
4821 \begin_layout Itemize
4823 \begin_inset Newline newline
4827 \begin_inset Flex Code
4830 \begin_layout Plain Layout
4836 outputs math as HTML, styled by CSS.
4840 \begin_layout Plain Layout
4841 LyX has borrowed some of the CSS for its HTML output from
4842 \begin_inset Flex Code
4845 \begin_layout Plain Layout
4856 For simple formulae, this can work quite well, though with more complicated
4857 formulae it tends to break down.
4858 Still, this method has the advantage that it is very widely supported and
4859 so it may be appropriate for documents that contain only a little, fairly
4861 \begin_inset Newline newline
4864 If Lyx is unable to render a formula as HTML---for example, if the formula
4866 \begin_inset Flex Code
4869 \begin_layout Plain Layout
4875 package or ERT---then it will instead output the formula as an image.
4879 \begin_layout Itemize
4881 \begin_inset Newline newline
4885 \begin_inset Flex Code
4888 \begin_layout Plain Layout
4894 , LyX will output formulae as images, the very same images, in fact, that
4895 are used for instant preview.
4899 \begin_layout Plain Layout
4900 Instant preview does
4904 have to be on for images to be output, however.
4909 The advantage to this method is that the images are simply generated by
4910 LaTeX, so they are very accurate.
4911 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4912 so they do not scale terribly well, and one cannot copy them, etc.
4913 (As of this writing, there are also problems about equation numbering.
4915 \begin_inset CommandInset href
4918 target "http://www.lyx.org/trac/ticket/6894"
4923 \begin_inset Newline newline
4926 The size of the images can be controlled by setting the
4927 \begin_inset Quotes eld
4931 \begin_inset Quotes erd
4935 \begin_inset Flex MenuItem
4938 \begin_layout Plain Layout
4939 Document\SpecialChar \menuseparator
4940 Settings\SpecialChar \menuseparator
4950 \begin_layout Plain Layout
4951 For those who want to know, this controls the resolution of the image in
4952 dots per inch and is based upon a default of 75 dpi.
4958 \begin_inset Newline newline
4961 If LyX for some reason fails to create an image for a formula (e.g., if a
4962 required LaTeX package is not installed), then it will fall back to outputing
4966 \begin_layout Itemize
4968 \begin_inset Newline newline
4971 Finally, LyX will happily output math as LaTeX.
4972 As well as being the output of last resort, this method can be used with
4974 \begin_inset CommandInset href
4977 target "http://www.math.union.edu/~dpvc/jsMath/"
4981 , which uses JavaScript to render LaTeX embedded in HTML documents.
4982 LyX wraps the LaTeX in either a
4983 \begin_inset Flex Code
4986 \begin_layout Plain Layout
4992 (for inline formulas) or
4993 \begin_inset Flex Code
4996 \begin_layout Plain Layout
5002 (for displayed formulas) with
5003 \begin_inset Flex Code
5006 \begin_layout Plain Layout
5012 , as is required for jsMath.
5015 \begin_layout Standard
5016 One of these output methods must be selected under
5017 \begin_inset Flex MenuItem
5020 \begin_layout Plain Layout
5021 Document\SpecialChar \menuseparator
5022 Settings\SpecialChar \menuseparator
5029 By default, LyX outputs MathML.
5030 This is a document-wide setting, therefore.
5033 \begin_layout Standard
5034 Eventually, LyX will offer the user the option to select an alternate output
5035 method for a particular inset, say, one that isn't being rendered very
5040 \begin_layout Plain Layout
5041 That said, since LyX falls back to images if the inset contains ERT, then
5042 one can force output as an image by putting some harmless ERT into the
5044 \begin_inset Formula $a=b\relax$
5055 \begin_layout Section
5056 Bibliography and Citations
5059 \begin_layout Standard
5060 XHTML output fully supports bibliographies and citations.
5064 \begin_layout Standard
5065 Citation labels are generated by the same machinery that generates LyX's
5066 on-screen labels, so the labels will look in the output much as they do
5067 in LyX, though better.
5068 If you are using numerical citations, then LyX will output numerical labels,
5069 such as [1] or [17], rather than simply showing the citation key in square
5070 brackets, as it does on-screen.
5071 If you are using author-year citations, then LyX will add lowercase letters
5072 to the years, just as BibTeX does, if it finds more than one citation for
5073 a given author-year combination.
5074 The labels will be printed with the bibliography entries.
5075 Note that there is, at present, no way to customize the appearance of the
5076 labels, for example, to choose between square brackets and parentheses.
5079 \begin_layout Standard
5080 Bibliography output is handled by the same machinery that handles the presentati
5081 on of reference information in the citation dialog, so you will see in the
5082 XHTML output pretty much what you would see if you were to look at a given
5083 entry in the citation dialog.
5084 The formatting can be customized in your layout file or, preferably, in
5090 manual for the details.
5093 \begin_layout Standard
5094 The main defect at present is that cross-referenced information is printed
5095 with every entry with which it is associated.
5096 So you can see things like this:
5101 \begin_inset Quotes eld
5104 Context and Logical Form
5105 \begin_inset Quotes erd
5110 Language in Context: Selected Essays
5112 (Oxford: Oxford University Press, 2007), pp.
5118 \begin_inset Quotes eld
5121 Semantics in Context
5122 \begin_inset Quotes erd
5127 Language in Context: Selected Essays
5129 (Oxford: Oxford University Press, 2007), pp.
5133 \begin_layout Standard
5134 This should be fixed before long.
5137 \begin_layout Standard
5138 There is no support at present for sectioned bibliographies.
5139 If you have multiple bibliographies, then LyX will print the same bibliography
5143 \begin_layout Section
5147 \begin_layout Standard
5148 LyX will happily export indexes as XHTML, but with certain limitations at
5152 \begin_layout Standard
5153 Index export will be most reliable when you do not attempt to use the fancy
5154 constructs that are described in the section on indexes in the
5162 \begin_layout Plain Layout
5163 The main issue here is that LyX itself does not really handle these.
5164 It just lets you enter what you would have to enter in raw LaTeX.
5169 We'll describe how they are handled using the subsection headings from
5173 \begin_layout Itemize
5174 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5175 these, but the entries must be separated by
5176 \begin_inset Quotes eld
5180 \begin_inset Quotes erd
5183 , that is, there must be spaces around the exclamation point.
5184 This is because it is otherwise too difficult to check for escaped exclamation
5185 points, ones in math, and so forth.
5188 \begin_layout Itemize
5189 Page Ranges: There is no support at all for page ranges, since these make
5190 no sense with XHMTL.
5191 Instead, you will just get two index entries, one at either end.
5194 \begin_layout Itemize
5195 Cross-referencing: There is no support for cross-referencing.
5196 If LyX finds an entry containing the
5197 \begin_inset Quotes eld
5200 |see\SpecialChar \ldots{}
5202 \begin_inset Quotes erd
5205 construct, it is just dropped, and the rest is treated as an ordinary index
5209 \begin_layout Itemize
5210 Index Entry Order: LyX does support attempts to fix the sorting order.
5211 It will take what is before the first `@' it finds and use that for sorting,
5212 taking what follows the first `@' to be the actual entry.
5213 At present, LyX does not check for escaped `@', so do not try to index
5217 \begin_layout Itemize
5218 Index Entry Layout: You can format entries by using the text style dialog,
5219 or by using any other method available within LyX itself.
5220 There is no support for constructs like:
5221 \begin_inset Quotes eld
5225 \begin_inset Quotes erd
5229 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5230 and everything that follows it.
5233 \begin_layout Itemize
5234 Multiple Indexes: There is no support for multiple indexes.
5235 Rather, all index entries will be printed as one large index.
5236 To avoid our printing several versions of the index, we print only the
5237 main index, so make sure you have one.
5240 \begin_layout Section
5241 Nomenclature and Glossary
5244 \begin_layout Standard
5245 There is at present no support for glossaries.
5246 Adding it would be fairly trivial, and welcome.
5249 \begin_layout Chapter
5253 \begin_layout Section
5257 \begin_layout Standard
5258 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5259 and retrieve information about the LyX internal state.
5260 This is only intended for advanced users, but they should find it useful.
5261 It is by writing to the LyX server, for example, that bibliography managers,
5262 such as JabRef, are able to
5263 \begin_inset Quotes eld
5267 \begin_inset Quotes erd
5273 \begin_layout Section
5274 Starting the LyX Server
5277 \begin_layout Standard
5278 The LyX server works through the use of a pair of named pipes.
5279 These are usually located in
5280 \begin_inset Flex Code
5283 \begin_layout Plain Layout
5289 , (except on Windows, where
5293 named pipes are special objects located in
5294 \begin_inset Flex Code
5297 \begin_layout Plain Layout
5309 ) and have the names
5310 \begin_inset Quotes eld
5314 \begin_inset Flex Code
5317 \begin_layout Plain Layout
5324 \begin_inset Quotes erd
5328 \begin_inset Quotes eld
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5342 \begin_inset Quotes erd
5346 External programs write into
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5356 and read back data from
5357 \begin_inset Flex Code
5360 \begin_layout Plain Layout
5367 The stem of the pipe names can be defined in the
5368 \begin_inset Flex MenuItem
5371 \begin_layout Plain Layout
5372 Tools\SpecialChar \menuseparator
5379 \begin_inset Flex Code
5382 \begin_layout Plain Layout
5383 "/home/myhome/lyxpipe"
5389 \begin_inset Flex Code
5392 \begin_layout Plain Layout
5406 on Windows (but any working path can be used).
5411 configure this manually in order for the server to start.
5414 \begin_layout Standard
5416 \begin_inset Flex Code
5419 \begin_layout Plain Layout
5426 \begin_inset Flex Code
5429 \begin_layout Plain Layout
5435 ' to create the pipes.
5436 If one of the pipes already exists, LyX will assume that another LyX process
5437 is already running and will not start the server.
5438 On POSIX (Unix like) systems, if for some other reason, an unused
5439 \begin_inset Quotes eld
5443 \begin_inset Quotes erd
5446 pipe is left in existence when LyX closes, then LyX will try to delete
5448 If this fails for some reason, you will need to delete the pipes manually
5449 and then restart LyX.
5450 On Windows, pipes are deleted by the OS on program termination or crash,
5452 \begin_inset Quotes eld
5456 \begin_inset Quotes erd
5459 pipes should not be possible.
5462 \begin_layout Standard
5463 To have several LyX processes with servers at the same time, you have to
5464 use different configurations, perhaps by using separate user directories,
5466 \begin_inset Flex Code
5469 \begin_layout Plain Layout
5475 file, for each process.
5478 \begin_layout Standard
5479 If you are developing a client program, you might find it useful to enable
5480 debugging information from the LyX server.
5481 Do this by starting LyX as
5482 \begin_inset Flex Code
5485 \begin_layout Plain Layout
5494 \begin_layout Standard
5495 You can find a complete example client written in C in the source distribution
5497 \begin_inset Flex Code
5500 \begin_layout Plain Layout
5501 development/lyxserver/server_monitor.c
5509 \begin_layout Standard
5510 Another useful tool is command-line based client you will find in
5511 \begin_inset Flex Code
5514 \begin_layout Plain Layout
5515 src/client/lyxclient
5523 \begin_layout Section
5524 Normal communication
5527 \begin_layout Standard
5528 To issue a LyX call, the client writes a line of ASCII text into the input
5530 This line has the following format:
5547 \begin_layout Description
5548 clientname is a name that the client can choose arbitrarily.
5549 Its only use is that LyX will echo it if it sends an answer—so a client
5550 can dispatch results from different requesters.
5553 \begin_layout Description
5554 function is the function you want LyX to perform.
5555 It is the same as the commands you'd use in the minibuffer.
5558 \begin_layout Description
5559 argument is an optional argument which is meaningful only to some functions
5561 \begin_inset Quotes eld
5565 \begin_inset Quotes erd
5568 LFUN will insert the argument as text at the cursor position).
5571 \begin_layout Standard
5572 The answer from LyX will arrive in the output pipe and be of the form
5589 \begin_layout Standard
5598 are just echoed from the command request, while
5602 is more or less useful information filled according to how the command
5603 execution worked out.
5604 Some commands, such as
5605 \begin_inset Quotes eld
5609 \begin_inset Quotes erd
5612 , will return information about the internal state of LyX, while other will
5613 return an empty data-response.
5614 This means that the command execution went fine.
5617 \begin_layout Standard
5618 In case of errors, the response from LyX will have this form
5635 \begin_layout Standard
5640 should contain an explanation of why the command failed.
5643 \begin_layout Standard
5647 \begin_layout LyX-Code
5648 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5649 \begin_inset Newline newline
5652 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5653 \begin_inset Newline newline
5656 read a <~/.lyxpipe.out
5657 \begin_inset Newline newline
5663 \begin_layout Section
5667 \begin_layout Standard
5668 LyX can notify clients of events going on asynchronously.
5669 Currently it will only do this if the user binds a key sequence with the
5671 \begin_inset Quotes eld
5675 \begin_inset Quotes erd
5679 The format of the string LyX sends is as follows:
5683 \begin_inset Flex Code
5686 \begin_layout Plain Layout
5697 \begin_layout Standard
5702 is the printed representation of the key sequence that was actually typed
5706 \begin_layout Standard
5707 This mechanism can be used to extend LyX's command set and implement macros.
5708 Bind some key sequence to
5709 \begin_inset Quotes eld
5713 \begin_inset Quotes erd
5717 Then start a client that listens on the output pipe, dispatches the command
5718 according to the sequence, and starts a function that may use LyX calls
5719 and LyX requests to issue a command or a series of commands to LyX.
5722 \begin_layout Section
5723 The simple LyX Server Protocol
5726 \begin_layout Standard
5727 LyX implements a simple protocol that can be used for session management.
5728 All messages are of the form
5741 \begin_layout Standard
5747 \begin_inset Quotes eld
5751 \begin_inset Quotes erd
5755 \begin_inset Quotes eld
5759 \begin_inset Quotes erd
5764 \begin_inset Quotes eld
5768 \begin_inset Quotes erd
5771 is received from a client, LyX will report back to inform the client that
5772 it's listening to it's messages, while
5773 \begin_inset Quotes eld
5777 \begin_inset Quotes erd
5780 sent from LyX will inform clients that LyX is closing.
5783 \begin_layout Section
5784 Reverse DVI/PDF search
5787 \begin_layout Standard
5788 Some DVI/PDF viewers
5792 \begin_layout Plain Layout
5793 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5794 Skim on Mac OSX and SumatraPDF on Windows.
5803 facility (also called
5808 This means that you can tell LyX to put the cursor to a specific line in
5809 the document by clicking at the respective position in the DVI/PDF output.
5810 To achieve this, the viewer must be able to communicate with LyX.
5811 This is done via the LyX server either by using the named pipe (
5815 ), or the UNIX domain socket (
5819 ) that LyX creates in its temporary directory (this is the way the
5820 \begin_inset Flex Code
5823 \begin_layout Plain Layout
5829 program communicates with LyX).
5830 In some cases, you need a helper script that mediates between the viewer
5831 and LyX, in others, the viewer can communicate with LyX directly.
5832 This depends on the selected viewer and on your operating system.
5833 The same applies to the way viewers need to be configured and the way the
5834 reverse search is actually performed.
5835 In what follows, we will thus describe how to setup reverse search for
5837 Before we turn to this, though, we will explain what needs to be done generally
5838 to enable reverse search in the DVI/PDF output.
5841 \begin_layout Subsection
5842 \begin_inset CommandInset label
5844 name "sub:rev-search"
5851 \begin_layout Standard
5852 In most cases LyX will do the work for you by enabling
5853 \begin_inset Flex MenuItem
5856 \begin_layout Plain Layout
5857 Document\SpecialChar \menuseparator
5858 Output\SpecialChar \menuseparator
5859 Synchronize with Output
5865 In such a case LyX will automatically insert the necessary SyncTeX macro
5866 (for PDF) or load the srcltx package (for DVI) respectively.
5867 This option can be easily reached also on
5868 \begin_inset Flex Code
5871 \begin_layout Plain Layout
5880 \begin_layout Standard
5881 If you need a different setting, you can select or input a custom macro
5882 from the drop down box just below
5883 \begin_inset Flex MenuItem
5886 \begin_layout Plain Layout
5887 Document\SpecialChar \menuseparator
5888 Output\SpecialChar \menuseparator
5889 Synchronize with Output
5897 \begin_layout Standard
5898 Please note that including the
5899 \begin_inset Flex Code
5902 \begin_layout Plain Layout
5909 \begin_inset Flex Code
5912 \begin_layout Plain Layout
5918 sometimes has an undesired impact on the typesetting.
5919 Thus, you should switch output synchronization off for the final typesetting
5921 \begin_inset Flex Code
5924 \begin_layout Plain Layout
5931 \begin_inset Flex Code
5934 \begin_layout Plain Layout
5943 \begin_layout Standard
5944 In case you need some more special settings that are not covered by the
5945 automatic settings, read the next section about how to set up output synchroniz
5947 If the automatic setup suits your needs, you can readily jump to section
5948 \begin_inset space ~
5952 \begin_inset CommandInset ref
5954 reference "sub:configuring-viewers"
5958 , where the necessary configuration steps in your viewer -- needed both
5959 with the automatic and the manual setup -- are described.
5962 \begin_layout Subsection
5966 \begin_layout Standard
5967 LaTeX provides several different methods for reverse search.
5968 Some are built-in in the
5969 \begin_inset Flex Code
5972 \begin_layout Plain Layout
5978 program, some are provided by external packages.
5979 Your choice depends on whether your LaTeX distribution already provides
5980 a given method (the built-in methods are rather new) and whether your viewer
5982 The available methods are described in the following.
5985 \begin_layout Subsubsection*
5986 Built-in DVI-search via src-specials (DVI only)
5989 \begin_layout Standard
5990 This method provides the DVI file with the necessary information for reverse
5992 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5993 distribution should include it), and it works reliably.
5994 To enable it, change the
5995 \begin_inset Flex MenuItem
5998 \begin_layout Plain Layout
6003 \begin_layout Plain Layout
6016 \begin_inset Flex MenuItem
6019 \begin_layout Plain Layout
6024 \begin_layout Plain Layout
6031 eX (plain)->DraftDVI
6037 \begin_inset Flex MenuItem
6040 \begin_layout Plain Layout
6041 Preferences\SpecialChar \menuseparator
6042 File Handling\SpecialChar \menuseparator
6049 \begin_inset Flex Code
6052 \begin_layout Plain Layout
6053 latex -src-specials $$i
6059 If this doesn't work, check if your TeX engine needs different options
6060 (the syntax might differ in some distributions).
6063 \begin_layout Subsubsection*
6064 External Packages (PDFSync and scrltx)
6067 \begin_layout Standard
6076 provide reverse search facility for PDF output (via pdflatex) and DVI output,
6078 In order to enable it, load the packages in the LyX preamble:
6081 \begin_layout Itemize
6082 \begin_inset Flex Code
6085 \begin_layout Plain Layout
6093 for reverse PDF search,
6096 \begin_layout Itemize
6098 \begin_inset Flex Code
6101 \begin_layout Plain Layout
6104 usepackage[active]{srcltx}
6109 for reverse DVI search.
6112 \begin_layout Standard
6113 If you want to be able to perform both DVI and PDF reverse searches, you
6114 can also insert in the preamble the following lines
6117 \begin_layout LyX-Code
6121 \begin_inset Newline newline
6127 \begin_inset Newline newline
6133 \begin_inset Newline newline
6139 \begin_inset Newline newline
6144 usepackage[active]{srcltx}
6145 \begin_inset Newline newline
6153 \begin_layout Standard
6154 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6155 right package will be used.
6158 \begin_layout Standard
6159 Note that PDFSync might affect the output layout of your document.
6160 It is therefore advised to disable PDFsync for final documents.
6163 \begin_layout Subsubsection*
6164 Built-in reverse search via SyncTeX (DVI and PDF)
6167 \begin_layout Standard
6169 \begin_inset Flex Code
6172 \begin_layout Plain Layout
6178 have built-in support for both PDF and DVI reverse search.
6183 facility is basically the result of the integration of the PDFSync package
6184 to the pdftex program and its merge with the
6189 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6191 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6192 already provide SyncTeX support.
6195 \begin_layout Standard
6196 To enable SyncTeX for DVI output, change the
6197 \begin_inset Flex MenuItem
6200 \begin_layout Plain Layout
6205 \begin_layout Plain Layout
6218 \begin_inset Flex MenuItem
6221 \begin_layout Plain Layout
6226 \begin_layout Plain Layout
6233 eX (plain) -> DraftDVI
6239 \begin_inset Flex MenuItem
6242 \begin_layout Plain Layout
6243 Preferences\SpecialChar \menuseparator
6244 File Handling\SpecialChar \menuseparator
6251 \begin_inset Flex Code
6254 \begin_layout Plain Layout
6255 latex -synctex=1 $$i
6260 , and for PDF output, change the
6261 \begin_inset Flex MenuItem
6264 \begin_layout Plain Layout
6269 \begin_layout Plain Layout
6276 eX (pdflatex) -> PDF (pdflatex)
6282 \begin_inset Flex Code
6285 \begin_layout Plain Layout
6286 pdflatex -synctex=1 $$i
6292 Check the documentation of your viewer whether the viewer needs to be configure
6293 d for the use with SyncTeX.
6297 \begin_layout Plain Layout
6299 \begin_inset Flex Code
6302 \begin_layout Plain Layout
6308 option enables gzip compression.
6309 If your viewer does not support it, you should instead use
6310 \begin_inset Flex Code
6313 \begin_layout Plain Layout
6327 \begin_layout Subsection
6328 Configuring and using specific viewers
6329 \begin_inset CommandInset label
6331 name "sub:configuring-viewers"
6338 \begin_layout Subsubsection*
6339 Xdvi (all platforms)
6342 \begin_layout Standard
6344 \begin_inset Flex Code
6347 \begin_layout Plain Layout
6353 , you don't need to do anything else for performing a reverse DVI search,
6354 as LyX already provides the necessary hooks for automatically using the
6356 \begin_inset Flex Code
6359 \begin_layout Plain Layout
6366 Just setup your document as described above (reverse search is triggered
6367 by Ctrl-click or Alt-click on Mac OSX, respectively).
6370 \begin_layout Standard
6371 However, if for whatever reason you want to use the named pipe instead of
6372 the socket for communicating with LyX, simply change the DVI viewer in
6374 \begin_inset Flex MenuItem
6377 \begin_layout Plain Layout
6378 Preferences\SpecialChar \menuseparator
6379 File Handling\SpecialChar \menuseparator
6389 \begin_layout Plain Layout
6390 On Mac OSX you have to use
6391 \begin_inset Flex Code
6394 \begin_layout Plain Layout
6395 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6406 \begin_inset Flex Code
6409 \begin_layout Plain Layout
6410 xdvi -editor 'lyxeditor.sh %f %l'
6416 \begin_inset Flex Code
6419 \begin_layout Plain Layout
6425 is a suitable script.
6426 For example, a minimal shell script is the following one:
6429 \begin_layout LyX-Code
6431 \begin_inset Newline newline
6434 LYXPIPE="/path/to/lyxpipe"
6435 \begin_inset Newline newline
6438 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6439 \begin_inset Newline newline
6442 echo "$COMMAND" > "${LYXPIPE}".in || exit
6443 \begin_inset Newline newline
6446 read < "${LYXPIPE}".out || exit
6449 \begin_layout Standard
6451 \begin_inset Flex Code
6454 \begin_layout Plain Layout
6464 \begin_layout Plain Layout
6471 XServer pipe path specified in
6472 \begin_inset Flex MenuItem
6475 \begin_layout Plain Layout
6476 Preferences\SpecialChar \menuseparator
6486 \begin_layout Plain Layout
6488 \begin_inset Flex Code
6491 \begin_layout Plain Layout
6497 folder of a source distribution you can find a
6498 \begin_inset Flex Code
6501 \begin_layout Plain Layout
6507 script which is able to locate the
6511 based on your preferences.
6519 \begin_layout Subsubsection*
6523 \begin_layout Standard
6525 \begin_inset Flex Code
6528 \begin_layout Plain Layout
6529 /Applications/MacDviX_Folder/calleditor.script
6534 , add the following lines:
6537 \begin_layout LyX-Code
6542 \begin_layout Plain Layout
6549 X.app/Contents/MacOS/lyxeditor "$2" $1
6550 \begin_inset Newline newline
6556 \begin_layout Standard
6557 Modify the lines accordingly if you install LyX somewhere else than in the
6558 Applications folder.
6561 \begin_layout Standard
6562 Reverse search is triggered by Alt-click (OPTION-click).
6565 \begin_layout Subsubsection*
6569 \begin_layout Standard
6571 \begin_inset Flex Code
6574 \begin_layout Plain Layout
6575 open -a Skim.app $$i
6580 to the viewer setting in
6581 \begin_inset Flex MenuItem
6584 \begin_layout Plain Layout
6585 Preferences\SpecialChar \menuseparator
6586 File Handling\SpecialChar \menuseparator
6587 File formats\SpecialChar \menuseparator
6594 \begin_inset Flex MenuItem
6597 \begin_layout Plain Layout
6598 Skim\SpecialChar \menuseparator
6599 Preferences\SpecialChar \menuseparator
6609 \begin_layout Plain Layout
6619 \begin_layout Standard
6620 Reverse search is triggered by COMMAND-SHIFT-click
6623 \begin_layout Subsubsection*
6627 \begin_layout Standard
6629 \begin_inset Flex MenuItem
6632 \begin_layout Plain Layout
6633 Settings\SpecialChar \menuseparator
6634 Configure Okular\SpecialChar \ldots{}
6635 \SpecialChar \menuseparator
6642 \begin_inset Quotes eld
6646 \begin_inset Quotes erd
6650 \begin_inset Flex Code
6653 \begin_layout Plain Layout
6662 \begin_layout Standard
6663 Reverse search is triggered by SHIFT-click.
6666 \begin_layout Subsubsection*
6670 \begin_layout Standard
6671 Launch yap, choose its
6672 \begin_inset Flex MenuItem
6675 \begin_layout Plain Layout
6676 View\SpecialChar \menuseparator
6683 \begin_inset Quotes eld
6687 \begin_inset Quotes erd
6692 \begin_inset Quotes eld
6695 New\SpecialChar \ldots{}
6697 \begin_inset Quotes erd
6700 button and, in the window that opens, enter
6701 \begin_inset Quotes eld
6705 \begin_inset Quotes erd
6708 (or any other name you like) in the
6709 \begin_inset Quotes eld
6713 \begin_inset Quotes erd
6717 Now click on the button labeled
6718 \begin_inset Quotes eld
6721 \SpecialChar \ldots{}
6723 \begin_inset Quotes erd
6726 to open a file dialog and navigate to the directory containing the batch
6728 \begin_inset Flex Code
6731 \begin_layout Plain Layout
6739 \begin_inset Flex Code
6742 \begin_layout Plain Layout
6748 and then specify the program arguments as
6749 \begin_inset Flex Code
6752 \begin_layout Plain Layout
6760 \begin_inset Flex Code
6763 \begin_layout Plain Layout
6769 wrapper is used for communicating with LyX through the
6776 \begin_layout LyX-Code
6778 \begin_inset Newline newline
6781 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6790 \begin_inset Newline newline
6804 \begin_layout Standard
6805 Make sure that the LyXServer pipe path you specified in LyX is
6806 \begin_inset Flex Code
6809 \begin_layout Plain Layout
6823 , otherwise change the
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6833 wrapper accordingly.
6836 \begin_layout Standard
6837 In yap, reverse search is triggered by double-click.
6840 \begin_layout Subsubsection*
6841 SumatraPDF (Windows)
6844 \begin_layout Standard
6845 In order to use SumatraPDF for inverse search, enter
6846 \begin_inset Flex Code
6849 \begin_layout Plain Layout
6850 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6855 in the viewer setting in
6856 \begin_inset Flex MenuItem
6859 \begin_layout Plain Layout
6860 Preferences\SpecialChar \menuseparator
6861 File Handling\SpecialChar \menuseparator
6862 File formats\SpecialChar \menuseparator
6869 \begin_inset Flex Code
6872 \begin_layout Plain Layout
6878 is the previous wrapper.
6879 If SumatraPDF.exe is not in your command PATH, use its full file name.
6882 \begin_layout Standard
6883 Reverse search is triggered by double-click.
6886 \begin_layout Subsubsection*
6890 \begin_layout Standard
6891 First of all, make sure that yap is your default DVI viewer in the Windows
6892 environment, then launch it, choose its
6893 \begin_inset Flex MenuItem
6896 \begin_layout Plain Layout
6897 View\SpecialChar \menuseparator
6904 \begin_inset Quotes eld
6908 \begin_inset Quotes erd
6913 \begin_inset Quotes eld
6916 New\SpecialChar \ldots{}
6918 \begin_inset Quotes erd
6921 button and, in the window that opens, enter
6922 \begin_inset Quotes eld
6926 \begin_inset Quotes erd
6929 (or any other name you like) in the
6930 \begin_inset Quotes eld
6934 \begin_inset Quotes erd
6938 Now click on the button labeled
6939 \begin_inset Quotes eld
6942 \SpecialChar \ldots{}
6944 \begin_inset Quotes erd
6947 to open a file dialog and navigate to the directory containing the
6948 \begin_inset Flex Code
6951 \begin_layout Plain Layout
6957 program (which is installed by default on Cygwin along with the LyX executable).
6959 \begin_inset Flex Code
6962 \begin_layout Plain Layout
6968 and then specify the program arguments as
6969 \begin_inset Flex Code
6972 \begin_layout Plain Layout
6979 In this way, you will be using the
6983 for communicating with LyX.
6984 If, for whatever reason, you want to use the
6989 \begin_inset Flex Code
6992 \begin_layout Plain Layout
6998 option and be sure to specify the LyXServer pipe path in the LyX preferences.
7001 \begin_layout Standard
7002 In yap, reverse search is triggered by double-click.
7005 \begin_layout Subsubsection*
7009 \begin_layout Standard
7010 In order to use SumatraPDF for inverse search, enter
7011 \begin_inset Flex Code
7014 \begin_layout Plain Layout
7020 in the viewer setting in
7021 \begin_inset Flex MenuItem
7024 \begin_layout Plain Layout
7025 Preferences\SpecialChar \menuseparator
7026 File Handling\SpecialChar \menuseparator
7027 File formats\SpecialChar \menuseparator
7034 \begin_inset Flex Code
7037 \begin_layout Plain Layout
7043 is the following script (to be placed in your command PATH,
7044 \begin_inset Flex Code
7047 \begin_layout Plain Layout
7053 being the best choice):
7056 \begin_layout LyX-Code
7058 \begin_inset Newline newline
7062 \begin_inset Newline newline
7065 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
7068 \begin_layout Standard
7069 This wrapper script is needed because SumatraPDF is a native Windows application
7070 and does not understand the posix paths used by the Cygwin version of LyX.
7071 If SumatraPDF.exe is not in your command PATH, use its full posix path in
7074 \begin_inset Flex Code
7077 \begin_layout Plain Layout
7083 enables communication via the
7089 \begin_inset Flex Code
7092 \begin_layout Plain Layout
7098 option if you want to use the
7102 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7105 \begin_layout Standard
7106 Reverse search is triggered by double-click.
7109 \begin_layout Section
7113 \begin_layout Standard
7114 Forward search is, as the name implies, in a sense the
7115 \begin_inset Quotes eld
7119 \begin_inset Quotes erd
7123 It allows you to let the viewer jump to a given position from within LyX.
7124 If forward search is set up (as described in what follows), you can put
7125 the cursor anywhere in your LyX document, and hit
7126 \begin_inset Flex MenuItem
7129 \begin_layout Plain Layout
7130 Navigate\SpecialChar \menuseparator
7137 \begin_inset Flex MenuItem
7140 \begin_layout Plain Layout
7146 in the context menu via right mouse click), and then the viewer will jump
7147 to that position as well.
7148 This implies, of course, that your viewer supports this function.
7151 \begin_layout Standard
7152 To make forward search possible, you first need to provide the generated
7153 output PDF/DVI file with additional information about the TeX sources.
7154 This can be done via the methods described in the section
7155 \begin_inset CommandInset ref
7157 reference "sub:rev-search"
7164 \begin_layout Standard
7165 Additionally, you need to configure LyX for using your viewers in
7166 \begin_inset Flex MenuItem
7169 \begin_layout Plain Layout
7170 Tools\SpecialChar \menuseparator
7171 Preferences\SpecialChar \menuseparator
7172 Output\SpecialChar \menuseparator
7179 We provide a range of tested configurations for some viewers, which you
7180 can select from the drop down list.
7181 If none of these configurations suits you, you have to find out and enter
7182 a suitable configuration yourself.
7183 The definition syntax uses the following placeholders:
7186 \begin_layout Itemize
7188 \begin_inset Flex Code
7191 \begin_layout Plain Layout
7200 \begin_layout Itemize
7202 \begin_inset Flex Code
7205 \begin_layout Plain Layout
7211 : name of the (temporary) exported .tex file
7214 \begin_layout Itemize
7216 \begin_inset Flex Code
7219 \begin_layout Plain Layout
7225 : name of the exported output file (either dvi or pdf, depending on which
7226 one exists in the temporary directory)
7229 \begin_layout Standard
7230 Note that only some of the viewers provide full forward search functionality,
7231 among them yap, xdvi, okular and Sumatra PDF
7235 \begin_layout Plain Layout
7236 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7243 While many of the widespread PDF viewers (most notably Adobe Reader) do
7244 not support forward search at all, some other viewers -- e.
7245 \begin_inset space \thinspace{}
7249 evince and xpdf -- allow at least to reload the document and jump to a
7250 specific page of the file, so you can at least navigate
7251 \begin_inset Quotes eld
7255 \begin_inset Quotes erd
7259 These latter functionality is provided by an external call of synctex (see
7260 the predefined example configurations).
7264 \begin_layout Standard
7265 Forward search works both with DVI and PDF output.
7266 LyX simply checks which preview format you have used before (i.
7267 \begin_inset space \thinspace{}
7270 e., which format is already there in the temporary directory) and chooses
7271 the appropriate configuration for the respective format.
7275 \begin_layout Chapter
7276 Special Document Classes
7279 \begin_layout Section
7283 \begin_layout Standard
7289 \begin_layout Subsection
7293 \begin_layout Standard
7294 This section describes how LyX can be used to write articles for submission
7295 to the scientific journal
7297 Astronomy and Astrophysics
7299 (www.edpsciences.fr/aa/
7300 \begin_inset Flex URL
7303 \begin_layout Plain Layout
7305 http://www.edpsciences.fr/aa/
7310 ) using Version 5.01 of the document class
7315 This package can be downloaded from the ftp site
7318 \begin_layout Standard
7319 \begin_inset VSpace medskip
7325 \begin_layout Standard
7327 \begin_inset Flex URL
7330 \begin_layout Plain Layout
7332 ftp://ftp.edpsciences.org/pub/aa/readme.html
7340 \begin_layout Standard
7341 \begin_inset VSpace medskip
7347 \begin_layout Standard
7348 A manual comes together with that package, and this text is not meant to
7349 replace the original manual but is merely a short guide in how to realize
7350 the correct form of your paper.
7354 \begin_layout Standard
7355 Please note that the publisher of the journal was changed from Springer
7356 to EDP Sciences starting January 1, 2001.
7357 That change involved also some slight changes to the style files, namely
7358 the removal of the thesaurus command.
7359 The LyX class aa supports the newest version of these style files, V 5.01.
7360 If you have an older version installed, please upgrade.
7361 For compatibility, the old (version 4) layout has been kept as
7366 Please refer to the comments in
7368 LyXDir/layouts/aapaper.layout
7373 \begin_layout Subsection
7377 \begin_layout Standard
7378 It is recommended you start from the example template distributed with LyX.
7379 If you are not using a template, note the following settings:
7382 \begin_layout Itemize
7389 Document\SpecialChar \menuseparator
7392 dialog (OK, that one was obvious).
7395 \begin_layout Itemize
7396 Don't change the option
7399 \begin_inset space ~
7409 The whole layout is done by the macros, you shouldn't change anything.
7412 \begin_layout Subsection
7416 \begin_layout Standard
7417 First thing to enter is the header information.
7418 It consists of seven entries, of which some are optional.
7422 \begin_layout Itemize
7430 \begin_layout Itemize
7438 \begin_layout Itemize
7446 \begin_layout Itemize
7454 \begin_layout Itemize
7459 : [optional] if more than one author: whom to contact for offprint requests.
7462 \begin_layout Itemize
7467 : [optional] mail address for contacts.
7470 \begin_layout Itemize
7478 Received: <date>; Accepted <date>
7481 \begin_layout Standard
7482 There is no need to issue the
7488 command, this is done automatically by LyX when the header is finished.
7489 Although the order of the single header entries doesn't matter it is advised
7490 to keep the above sequence, just to get the best optics and meets the layout
7491 of the real document.
7494 \begin_layout Standard
7495 If you want to place footnotes in the header block, e.
7496 \begin_inset space \thinspace{}
7500 \begin_inset space \space{}
7503 to state your present address, just use the standard footnote via the menu
7506 Insert\SpecialChar \menuseparator
7510 LyX will automagically use the term
7519 \begin_layout Standard
7520 In addition to these topics, the macros use three additional LaTeX commands
7521 that have no counterpart in LyX:
7524 \begin_layout Itemize
7531 to separate different names for more than one author and institute, respectivel
7535 \begin_layout Itemize
7542 to mark corresponding author/institute pairs.
7543 The institutes are numbered sequentially as they appear in the
7547 field, so you have to put a marker to each author.
7550 \begin_layout Itemize
7557 to supply an email address for fast contact.
7560 \begin_layout Standard
7561 In all cases, the appropriate command has to be entered in LyX and marked
7567 \begin_layout Subsection
7571 \begin_layout Standard
7572 The abstract should immediately follow the header block.
7573 With version 5 the abstract environment was changed to a command, and there
7574 is now a resctriction to only one paragraph.
7575 In addition, it should contain an entry with the keywords.
7576 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7583 by hand and mark it as LaTeX code.
7584 Refer to the example paper.
7587 \begin_layout Subsection
7588 Supported environments
7591 \begin_layout Standard
7592 The A&A paper layout supports the following environments for structuring
7596 \begin_layout Itemize
7602 \begin_layout Itemize
7608 \begin_layout Itemize
7614 \begin_layout Itemize
7620 \begin_layout Itemize
7626 \begin_layout Itemize
7632 \begin_layout Itemize
7638 \begin_layout Itemize
7644 \begin_layout Itemize
7650 \begin_layout Itemize
7656 \begin_layout Itemize
7662 \begin_layout Itemize
7668 \begin_layout Subsection
7669 Commands not supported by LyX
7672 \begin_layout Standard
7673 Some commands are not yet supported by the
7678 Some have already been mentioned.
7679 For the sake of completeness, they are listed all together here:
7682 \begin_layout Itemize
7690 \begin_layout Itemize
7698 \begin_layout Itemize
7706 \begin_layout Itemize
7714 \begin_layout Itemize
7722 \begin_layout Itemize
7730 \begin_layout Itemize
7738 \begin_layout Itemize
7746 \begin_layout Standard
7747 If you want to use any of these commands, you have to enter them yourself.
7750 Do not forget to mark them as LaTeX code!
7753 \begin_layout Subsection
7754 Figure and Table Floats
7757 \begin_layout Standard
7758 LyX provides support for the necessary float environments
7760 figure, figure*, table
7766 , therefore we won't tell much about it here.
7770 \begin_inset space ~
7776 Just remember that tables should be left-aligned.
7777 For that, select the table and change the alignment in
7779 Edit\SpecialChar \menuseparator
7781 \begin_inset space ~
7787 \begin_layout Standard
7788 There is only one special thing: the figures with caption besides the figure.
7789 To create such a figure, you have to do the following:
7792 \begin_layout Enumerate
7793 Create a wide figure float:
7795 Insert\SpecialChar \menuseparator
7796 Float\SpecialChar \menuseparator
7799 , then right click in the figure and select
7805 \begin_inset space ~
7813 \begin_layout Enumerate
7814 Enter your caption text.
7817 \begin_layout Enumerate
7822 to move the cursor above the caption.
7825 \begin_layout Enumerate
7829 \begin_layout Enumerate
7830 Position the cursor behind the figure and insert a horizontal fill:
7832 Insert\SpecialChar \menuseparator
7834 \begin_inset space ~
7837 Character\SpecialChar \menuseparator
7839 \begin_inset space ~
7847 \begin_layout Enumerate
7848 Switch to LaTeX mode:
7851 \begin_inset space ~
7859 \begin_layout Enumerate
7869 Do not close the brace!
7872 \begin_layout Enumerate
7873 Position the cursor behind the caption text, switch to LaTeX mode and insert
7877 \begin_inset space ~
7889 \begin_layout Standard
7890 Also, refer to the figures in the example paper.
7893 \begin_layout Subsection
7897 \begin_layout Standard
7898 For submission, the paper has to be formated in a special double-spacing
7900 For this purpose, you have to give the option
7904 to the documentclass.
7905 This must be done using the extra class options field in the
7907 Document\SpecialChar \menuseparator
7911 Just enter the string
7918 \begin_layout Subsection
7922 \begin_layout Standard
7927 directory contains an example paper written with LyX.
7928 It is the example paper from the original macro package, translated to
7930 Use it for inspiration, and compare the original LaTeX code with LyX way
7934 \begin_layout Section
7938 \begin_layout Standard
7944 \begin_layout Subsection
7948 \begin_layout Standard
7949 AASTeX is a set of macros produced by the American Astronomical Society
7950 to facilitate electronic manuscript submission to the three journals they
7951 publish: the Astrophysical Journal (including the Letters and Supplement),
7952 the Astronomical Journal, and the Publications of the Astronomical Society
7954 LyX has proven to be an excellent tool for generating these documents,
7955 especially given its equation, citation, and figure handling capabilities.
7956 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7957 is the version described here, or higher.
7958 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7959 incompatible with LyX.
7960 The AASTeX package may be downloaded from the AASTeX Web site
7963 \begin_layout Standard
7964 \begin_inset VSpace medskip
7970 \begin_layout Standard
7972 \begin_inset Flex URL
7975 \begin_layout Plain Layout
7977 http://www.journals.uchicago.edu/AAS/AASTeX
7985 \begin_layout Standard
7986 \begin_inset VSpace medskip
7992 \begin_layout Standard
7993 A complete user guide is contained in that package and you should familiarize
7994 yourself with it thoroughly before embarking on writing a paper in LyX.
7995 LyX will not reduce the need to figure out all the AASTeX commands, it
7996 will only reduce the drudgery of typing everything in.
7997 It is your responsibility to ensure that the final exported LaTeX document
7998 conforms completely to the requirements of the journal to which you are
7999 submitting your paper.
8002 \begin_layout Subsection
8003 Starting a New Paper
8006 \begin_layout Standard
8007 I strongly suggest that you start with the AASTeX template file.
8010 File\SpecialChar \menuseparator
8017 , enter the new file name, then choose the
8022 This will show the most common fields found in a manuscript.
8023 Simply overwrite the existing text (including the brackets,
8027 ) with the correct information.
8028 Many of the AASTeX commands and environments can be implemented directly
8029 in LyX, but some cannot: most noticeably
8041 , which should stick out like a sore thumb if you actually just opened the
8043 For commands such as these, the LaTeX code must be entered directly and
8045 Such commands are referred to as TeX code, or Evil Red Text.
8046 I tried to minimize the amount of TeX code needed in an AASTeX document,
8047 but there is still a bit more required than any of us would like.
8050 \begin_layout Subsection
8051 Finishing Your Paper
8054 \begin_layout Standard
8055 When the paper is finished to your satisfaction and previews/prints correctly,
8057 \begin_inset Quotes eld
8061 \begin_inset Quotes erd
8064 actions which need to be done before you submit it to the journals.
8068 \begin_layout Enumerate
8069 Export your paper as a LaTeX file (
8071 File\SpecialChar \menuseparator
8072 Export\SpecialChar \menuseparator
8079 \begin_layout Enumerate
8084 file with your favorite text editor
8088 \begin_layout Enumerate
8089 remove the comment lines before the
8098 \begin_layout Enumerate
8103 usepackage...{fontenc}
8105 line if it appears (usually just after
8120 \begin_layout Enumerate
8121 remove everything between (and including) the
8133 commands, except for any commands you specifically put into the LaTeX preamble
8134 (which should appear immediately after the
8135 \begin_inset Quotes eld
8138 User specified LaTeX commands
8139 \begin_inset Quotes erd
8150 \begin_layout Enumerate
8151 Run the resulting file through LaTeX to make sure it still processes correctly.
8154 \begin_layout Enumerate
8155 Reread the journal requirements to make sure your filenames and formats
8159 \begin_layout Enumerate
8163 \begin_layout Subsection
8164 Comments On Specific Commands
8167 \begin_layout Standard
8168 I will not describe the detailed usage of the individual AASTeX commands:
8169 the AASTeX User Guide (
8173 ) gives a good description of each.
8174 Thus it's probably easiest for me to go down the list as found in the guide
8175 and offer comments where necessary.
8176 So let's begin \SpecialChar \ldots{}
8180 \begin_layout Subsubsection
8181 Things that work as expected
8184 \begin_layout Standard
8188 \begin_layout Plain Layout
8200 \begin_layout Standard
8201 Because they work as you might expect, I simply list them and the section
8302 begin{thebibliography}
8310 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8311 graphicx figure commands (2.14.1),
8335 (2.15.4, amongst other places),
8362 \begin_layout Standard
8363 The following style options also work correctly:
8384 Simply put them in the
8390 Layout\SpecialChar \menuseparator
8396 \begin_layout Standard
8400 \begin_layout Plain Layout
8412 \begin_layout Subsubsection
8413 Things that work, but require more comment
8416 \begin_layout Standard
8417 The following items work, but require a little more discussion:
8420 \begin_layout Itemize
8421 These items are reserved for use by the journal editors, but you can put
8422 them into the LaTeX preamble if you feel compelled to do so:
8455 \begin_layout Itemize
8456 These items may be placed in the LaTeX preamble, and are included as blanks
8457 in the template file:
8478 \begin_layout Itemize
8485 (2.3) – can only be used
8486 \begin_inset Quotes eld
8490 \begin_inset Quotes erd
8493 , not in the middle of a paragraph.
8494 Use TeX code if you need to embed it.
8497 \begin_layout Itemize
8504 (2.3) – will have extra {} after it.
8505 This should not cause an error.
8508 \begin_layout Itemize
8515 (2.6) – can only be used
8516 \begin_inset Quotes eld
8520 \begin_inset Quotes erd
8523 , not in the middle of a paragraph.
8524 Use TeX code if you need to embed it.
8527 \begin_layout Itemize
8534 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8538 \begin_layout Itemize
8552 \begin_layout Itemize
8559 (2.9) – will have extra {} after it.
8560 This should not cause an error.
8563 \begin_layout Itemize
8570 (2.11) – will have extra {} after it.
8571 This should not cause an error.
8574 \begin_layout Itemize
8581 (2.14.2) – you can insert an optional filename argument by placing the cursor
8582 at the beginning of the text and selecting
8584 Insert\SpecialChar \menuseparator
8589 \begin_inset Quotes eld
8593 \begin_inset Quotes erd
8596 inserts an optional argument of the type needed by
8603 Hopefully it will be renamed someday.
8606 \begin_layout Itemize
8619 for the catalog ID optional parameter
8622 \begin_layout Itemize
8635 for the catalog ID optional parameter
8638 \begin_layout Subsubsection
8639 Things not implemented, use TeX code
8642 \begin_layout Standard
8646 \begin_layout Plain Layout
8658 \begin_layout Standard
8681 setcounter{equation}
8683 (2.12), Journal name abbreviations (2.13.4),
8719 (2.15.4, insert it as the first element in the lefthand cell after where
8721 Don't use any of LyX's rules in the table),
8733 (2.15.5), much of Misc (2.17, except
8784 \begin_layout Standard
8788 \begin_layout Plain Layout
8800 \begin_layout Subsubsection
8801 Things that cannot be implemented
8804 \begin_layout Standard
8805 \SpecialChar \ldots{}
8806 at least in any meaningful sort of way, so I suggest ignoring them.
8807 They are the references environment (2.13.3), and the deluxetable environment
8809 If you really, really need to use deluxetable, I suggest editing it in
8810 a separate file with a text editor, then using
8812 Insert\SpecialChar \menuseparator
8814 \begin_inset space ~
8819 to include it in your LyX document.
8824 file to see an example of this.
8827 \begin_layout Subsection
8828 FAQs, Tips, Tricks, and Other Ruminations
8831 \begin_layout Subsubsection
8832 Getting LyX and AASTeX to cooperate
8835 \begin_layout Standard
8836 It can be a bit tricky to get LyX to recognize a new layout and document
8838 When all else fails, do this:
8841 \begin_layout Enumerate
8842 Make certain that LaTeX can find AASTeX.
8843 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8844 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8851 \begin_layout Enumerate
8863 \begin_layout Enumerate
8866 Tools\SpecialChar \menuseparator
8869 in LyX, then restart LyX.
8872 \begin_layout Enumerate
8873 Open a regular new file, not from a template.
8874 Does AASTeX appear in the class list in
8876 Document\SpecialChar \menuseparator
8882 \begin_layout Standard
8883 If you get a warning from an existing AASTeX document about not being able
8884 to find the AASTeX layout or a message about
8885 \begin_inset Quotes eld
8888 You should not mix title layouts with normal ones
8889 \begin_inset Quotes erd
8892 , things haven't been installed correctly.
8895 \begin_layout Subsubsection
8896 LaTeX error processing a table
8899 \begin_layout Standard
8900 LyX, by default, attempts to center the table caption/title.
8901 This seems to produce a bad interaction in AASTeX so you should click somewhere
8902 in the caption/title, then select
8904 Edit\SpecialChar \menuseparator
8906 \begin_inset space ~
8920 This took care of it for me.
8923 \begin_layout Subsubsection
8927 \begin_layout Standard
8928 A couple of things: 1) I have noticed some funny spacing in the reference
8929 entries in the text.
8930 When you enter the bibliography item data, make sure their is
8934 space between the last author and the parenthesis setting off the year;
8938 \begin_inset space \thinspace{}
8942 \begin_inset space \space{}
8956 2) Entering the references at all is not obvious.
8957 The easiest thing is to start typing your first reference at the end of
8958 the document, then mark it as type
8963 That will put a small gray box in front of what you just typed.
8964 Click on the box to fill in the rest of the information.
8965 For new references, go to the end of an existing reference and press return.
8966 That will create a new line with its own box, etc.
8969 \begin_layout Subsubsection
8973 \begin_layout Standard
8974 Even though AASTeX provides its own figure commands (
8980 , for example), I much prefer LaTeX's standard figure commands (with the
8989 \begin_inset space ~
8992 commands as TeX code into a Figure Float box if you desire, but I never
8993 have much luck getting the layout right.
8994 With the standard graphics, LyX will insert a
8998 usepackage{graphicx}
9000 command into the LaTeX preamble and handle the figures in the standard
9001 LaTeX2e way, interspersing the figures in the text.
9002 I believe ApJ accepts figures exactly this way now; AJ might still use
9004 \begin_inset Quotes eld
9007 stack everything at the end
9008 \begin_inset Quotes erd
9014 \begin_layout Subsubsection
9015 Things I could have done, but didn't
9018 \begin_layout Standard
9020 \begin_inset Quotes eld
9024 \begin_inset Quotes erd
9027 things I could have implemented, but chose not to.
9028 For instance, I saw no point in double-spacing the text in the LyX window,
9029 even though it is double-spaced in the paper manuscript.
9030 Also, I chose not to make separate layouts for the preprint and preprint2
9032 Since I assume you will spend most of your time in the plain manuscript
9033 mode anyway, I decided not to chew up more disk space with this.
9037 \begin_layout Subsection
9041 \begin_layout Standard
9042 Your mileage may vary.
9043 I've now had papers published by both ApJ and AJ that have had 98% of the
9044 effort done in LyX; the last 2% was the LaTeX post-processing and a few
9046 I have had no trouble with the submission process, and I'm sure the journals
9047 were never aware that there might be a difference.
9048 So, go forth and publish!
9051 \begin_layout Section
9055 \begin_layout Standard
9058 David Johnson; updated by Richard Heck
9061 \begin_layout Standard
9062 \begin_inset VSpace bigskip
9068 \begin_layout Standard
9070 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9071 papers to be submitted to American Mathematical Society publications.
9072 The layouts are not tailored to a specific journal, but easily can be.
9073 You should refer to the AMS documentation for specific instructions for
9074 each journal (usually it will entail only changing a single line in the
9076 That documentation is available on the Web at
9077 \begin_inset Flex URL
9080 \begin_layout Plain Layout
9088 \begin_inset Flex URL
9091 \begin_layout Plain Layout
9093 ftp://ftp.ams.org/pub/tex/amslatex/
9099 These layouts are appropriate, and useful, for any mathematical writing.
9103 \begin_layout Standard
9104 There are two basic AMS LaTeX layouts:
9107 \begin_layout Itemize
9108 amsart: The standard AMS article format.
9111 \begin_layout Itemize
9112 amsbook: the standard AMS book (really, monograph) format.
9116 \begin_layout Standard
9117 The layouts themselves contain only the minimum necessary to use the AMS
9119 They do not, in particular, contain any of the `theorem' environments used
9120 for setting theorems, lemmas, and the like.
9121 These are contained, instead, in the
9122 \begin_inset Flex Code
9125 \begin_layout Plain Layout
9131 module, which is loaded by default when when you select one of the AMS
9133 (It can also be used with other classes and can be removed, if you would
9134 rather use something else.) Less commonly used environments are in the
9135 \begin_inset Flex Code
9138 \begin_layout Plain Layout
9139 Theorems (AMS-Extended)
9144 module, which must be loaded manually.
9147 \begin_layout Standard
9148 By default, theorems and the like are numbered consecutively throughout
9149 the document, but this may be modified by loading the module
9150 \begin_inset Flex Code
9153 \begin_layout Plain Layout
9154 Theorems (Order by Section)
9159 or, if you are using
9160 \begin_inset Flex Code
9163 \begin_layout Plain Layout
9170 \begin_inset Flex Code
9173 \begin_layout Plain Layout
9174 Theorems (Order by Chapter)
9180 These will number the results as
9181 \begin_inset Formula $n.m$
9184 , where the first number refers to the section (or chapter) and the second
9185 refers to the total number of results so far in that section (or chapter).
9186 Many environments are also available unnumbered.
9187 These are indicated by an asterisk at the end.
9188 If you happen to want
9192 unnumbered results, the module
9193 \begin_inset Flex Code
9196 \begin_layout Plain Layout
9202 provides that option.
9205 \begin_layout Standard
9206 Note that these modules do not
9210 to be used with the AMS classes.
9211 It is perfectly possible to use the
9212 \begin_inset Flex Code
9215 \begin_layout Plain Layout
9221 module, and the others mentioned, with other classes, such as
9222 \begin_inset Flex Code
9225 \begin_layout Plain Layout
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9242 \begin_inset Flex Code
9245 \begin_layout Plain Layout
9254 \begin_layout Subsection
9255 What these layouts provide
9258 \begin_layout Standard
9259 There is a long list of included environments provided by these layouts.
9260 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9261 variety of `theorem' environments.
9262 However, the AMS recommends the environments that are available in LyX.
9266 \begin_layout Standard
9267 The following environments—as well as the standard environments, such as
9269 \begin_inset Flex Noun
9272 \begin_layout Plain Layout
9279 \begin_inset Flex Noun
9282 \begin_layout Plain Layout
9289 \begin_inset Flex Noun
9292 \begin_layout Plain Layout
9299 \begin_inset Flex Noun
9302 \begin_layout Plain Layout
9309 \begin_inset Flex Noun
9312 \begin_layout Plain Layout
9319 \begin_inset Flex Code
9322 \begin_layout Plain Layout
9329 \begin_inset Flex Code
9332 \begin_layout Plain Layout
9341 \begin_layout Description
9342 Address This should be the author's permanent address.
9345 \begin_layout Description
9347 \begin_inset space ~
9350 Address This should be the author's temporary address at the time of submission,
9351 if different from the Address.
9354 \begin_layout Description
9355 Email Author's e-mail address
9358 \begin_layout Description
9359 URL Author's Web address, if desired.
9362 \begin_layout Description
9363 Keywords Key words or phrases used to identify specific topics discussed
9367 \begin_layout Description
9368 Subjectclass These refer to the AMS Subject Classifications, published and
9371 Mathematical Reviews
9374 These are also available online at the AMS cites listed above.
9377 \begin_layout Description
9381 \begin_layout Description
9385 \begin_layout Description
9389 \begin_layout Standard
9390 The following environments are provided by both the
9391 \begin_inset Flex Code
9394 \begin_layout Plain Layout
9401 \begin_inset Flex Code
9404 \begin_layout Plain Layout
9410 modules, in the latter case in both starred (unnumbered) and unstarred
9411 (numbered) versions.
9412 These same environments are provided only in the starred versions by the
9414 \begin_inset Flex Code
9417 \begin_layout Plain Layout
9426 \begin_layout Theorem
9427 This is typically used for the statements of major results.
9431 \begin_layout Corollary*
9432 This is used for statements which follow fairly directly from previous statement
9434 Again, these can be major results.
9439 These are smaller results needed to prove other statements.
9442 \begin_layout Proposition
9443 These are less major results which (hopefully) add to the general theory
9447 \begin_layout Conjecture
9448 These are statements provided without justification, which the author does
9449 not know how to prove, but which seem to be true (to the author, at least).
9452 \begin_layout Definition*
9453 Guess what this is for.
9454 The font is different for this environment than for the previous ones.
9458 \begin_layout Example*
9459 Used for examples illustrating proven results.
9462 \begin_layout Problem
9463 It's not really known what this is for.
9464 You should figure it out.
9467 \begin_layout Exercise*
9468 Write a description for this one.
9471 \begin_layout Remark
9472 This environment is also a type of theorem, usually a lesser sort of observation.
9475 \begin_layout Claim*
9476 Often used in the course of giving a proof of a larger result.
9480 Generally, these are used to break up long arguments, using specific instances
9486 The numbering scheme for cases is on its own, not together with other numbered
9492 At the end of this environment, a QED symbol (usually a square, but it can
9493 vary with different styles) is placed.
9494 If you want to have other environments within this one—for example, Case
9495 environments—and have the QED symbol appear only after them, then the other
9496 environments need to be nested within the proof environment.
9499 Nesting Environments
9505 for information on nesting.
9508 \begin_layout Standard
9509 And these environments are provided by
9510 \begin_inset Flex Code
9513 \begin_layout Plain Layout
9514 Theorems (AMS-Extended)
9522 \begin_layout Criterion*
9523 A required condition.
9526 \begin_layout Algorithm*
9527 A general procedure to be used.
9530 \begin_layout Axiom*
9531 This is a property or statement taken as true within the system being discussed.
9534 \begin_layout Condition*
9535 Sometimes used to state a condition assumed within the present context of
9540 Similar to a Remark.
9543 \begin_layout Notation*
9544 Used for the explanation of, yes, notation.
9547 \begin_layout Summary
9548 Do we really need to tell you?
9551 \begin_layout Acknowledgement*
9555 \begin_layout Conclusion*
9556 Sometimes used at the end of a long train of argument.
9560 Used in a way similar to Proposition, though perhaps lower on the scale.
9563 \begin_layout Standard
9564 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9566 They need to be available on your system in order to use these environments.
9569 \begin_layout Section
9577 \begin_layout Standard
9583 \begin_layout Subsection
9587 \begin_layout Standard
9588 These are the layout files for some of the journals of the American Geophysical
9590 It is assumed that you have both the AGU's own class files and AGUplus
9591 installed (everything to be found at
9592 \begin_inset Flex URL
9595 \begin_layout Plain Layout
9597 ftp://ftp.agu.org/journals/latex/journals
9605 \begin_layout Subsection
9609 \begin_layout Standard
9619 They are still called this in the LyX GUI, though their LaTeX equivalents
9620 in the AGU classes are
9631 \begin_layout Standard
9632 Newly defined styles are
9669 These are mostly manuscript attributes and defined in the AGU class documentati
9673 \begin_layout Standard
9674 I suspect this is still badly incomplete.
9677 \begin_layout Subsection
9681 \begin_layout Standard
9698 \begin_layout Subsection
9702 \begin_layout Itemize
9705 Journal of Geophysical Research
9714 \begin_layout Standard
9715 Add your own, it isn't so hard! Look at the
9726 \begin_layout Subsection
9727 Bugs and things to remember
9730 \begin_layout Standard
9731 In order to use the new layouts, you must remember to do the following for
9735 \begin_layout Enumerate
9741 This can be done in the
9743 Layout\SpecialChar \menuseparator
9748 Document\SpecialChar \menuseparator
9752 (AGU articles are always in English, right? So
9759 \begin_layout Enumerate
9769 (Yes, this is a bug.)
9772 \begin_layout Enumerate
9773 Make sure you use the
9777 bibliography style, by entering
9781 into the second field of the BibTeX inset.
9782 None of the standard styles will do.
9785 \begin_layout Section
9789 \begin_layout Standard
9795 \begin_layout Subsection
9799 \begin_layout Standard
9800 Broadway is for writing plays.
9801 The format is more decorative than Hollywood, and much less standardized.
9802 This format should be suitable for workshops.
9805 \begin_layout Subsection
9809 \begin_layout Standard
9810 The same as in Hollywood.
9813 \begin_layout Subsection
9817 \begin_layout Standard
9822 names as labels then cross-reference the label to insert the name.
9823 The cross-reference dialog will show the current cast of characters.
9826 \begin_layout Subsection
9827 Paper size and Margins
9830 \begin_layout Standard
9831 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9834 \begin_layout Subsection
9838 \begin_layout Standard
9839 The following environments are available.
9840 You can use broadway.bind to get the bind keys shown at the right.
9843 \begin_layout Itemize
9847 \begin_inset Newline newline
9852 You should not have to use this, but it is here for anything that does not
9856 \begin_layout Itemize
9860 \begin_inset space \hfill{}
9864 \begin_inset Newline newline
9869 Used to describe stage setting and the action.
9870 First use of speaker names in all CAPs.
9873 \begin_layout Itemize
9877 \begin_inset space \hfill{}
9881 \begin_inset Newline newline
9886 Automatically numbered.
9887 On screen it will be arabic, but will print as Roman.
9890 \begin_layout Itemize
9894 \begin_inset space \hfill{}
9898 \begin_inset Newline newline
9908 It is just centered text.
9911 \begin_layout Itemize
9915 \begin_inset space \hfill{}
9919 \begin_inset Newline newline
9924 Not automatically numbered.
9925 You supply the number.
9926 This is because I couldn't figure out how.
9929 \begin_layout Itemize
9933 \begin_inset space \hfill{}
9937 \begin_inset Newline newline
9942 A special case of Narrative to describe the setting and action as the curtain
9946 \begin_layout Itemize
9950 \begin_inset space \hfill{}
9954 \begin_inset Newline newline
9959 The speaker's (actor's) title, centered in all CAPS.
9962 \begin_layout Itemize
9966 \begin_inset space \hfill{}
9970 \begin_inset Newline newline
9975 Instructions to the speaker.
9976 The parentheses are automatically inserted.
9977 The ( will appear on screen, but both will be in the printed play.
9978 This environment is only used within
9985 \begin_layout Itemize
9989 \begin_inset space \hfill{}
9993 \begin_inset Newline newline
9998 What the Speaker says.
10001 \begin_layout Itemize
10005 \begin_inset space \hfill{}
10009 \begin_inset Newline newline
10014 The curtain comes down.
10017 \begin_layout Itemize
10021 \begin_inset space \hfill{}
10027 \begin_layout Itemize
10031 \begin_inset space \hfill{}
10037 \begin_layout Itemize
10041 \begin_inset space \hfill{}
10047 \begin_layout Standard
10051 \begin_layout Section
10055 \begin_layout Standard
10060 can be used to type letters according to German conventions.
10061 A template file is included in
10063 .../lyx/share/templates
10065 for you to use as a starting point.
10068 \begin_layout Section
10076 \begin_layout Standard
10082 \begin_layout Subsection
10086 \begin_layout Standard
10087 This is the layout file for the European Geophysical Society journals.
10092 can be downloaded from the web site of the EGS under
10093 \begin_inset Flex URL
10096 \begin_layout Plain Layout
10106 \begin_layout Subsection
10110 \begin_layout Standard
10113 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10121 The current layout file is unfortunately very unmodular and would benefit
10122 from using the various
10129 \begin_layout Section
10133 \begin_layout Standard
10139 \begin_layout Standard
10140 Elsevier Science Publishers B.V.
10141 provides a standard LaTeX document class (
10145 ) for submitting articles to their various journals.
10146 The style file can be downloaded directly from their web site:
10147 \begin_inset Flex URL
10150 \begin_layout Plain Layout
10152 http://www.elsevier.com/wps/find/authorsview.authors/latex
10158 Instructions are supplied along with the class file, which details the
10159 requirements of the publishers.
10160 LyX includes a package that allows for the use of this class, by a layout
10161 and a template file.
10162 Installation of the class file is the same as for any other LaTeX package;
10163 instructions are provided in the Elsevier documentation.
10166 \begin_layout Standard
10176 As the Elsevier class file is based mainly on the standard article class,
10177 most of the normal functionality is provided.
10178 The Elsevier class defines a number of mathematical environments, which
10179 are similar to the AMS environments.
10180 These commands are all described in the Elsevier documentation, and are
10184 \begin_layout Standard
10185 The easiest way to use the Elsevier style is to base documents on the included
10187 It is best not to use options such as fancy headings or the geometry package,
10188 as elements such as these are defined by Elsevier in their style file.
10189 Ideally, no extra packages except those mentioned in the Elsevier documentation
10191 Essentially, Elsevier require as
10192 \begin_inset Quotes eld
10196 \begin_inset Quotes erd
10199 a LaTeX file as possible, as their intention is to take the supplied file
10200 and replace the class file with one for the particular journal to which
10201 the paper has been submitted.
10202 This also means that not too much time should be spent on the formating
10204 When it comes to be published, this will change anyway.
10205 The rest of the usage for this layout is substantially the same as for
10206 the normal article class.
10207 For details of what Elsevier do and don't allow, refer to their documentation.
10210 \begin_layout Section
10216 \begin_inset CommandInset label
10225 \begin_layout Standard
10231 \begin_layout Subsection
10235 \begin_layout Standard
10236 This section describes how to use LyX to make slides for overhead projectors.
10237 There are two document classes that can do this: the default slides class
10243 This section documents the latter.
10246 \begin_layout Standard
10247 I'm going to say this again, nice and clear, so that there's no misunderstanding
10251 \begin_layout Standard
10252 \begin_inset VSpace bigskip
10258 \begin_layout Standard
10262 This section documents the class
10263 \begin_inset Quotes eld
10271 \begin_inset Quotes erd
10279 \begin_layout Standard
10280 \begin_inset VSpace bigskip
10286 \begin_layout Standard
10287 If you're looking for the documentation for
10288 \begin_inset Quotes eld
10296 \begin_inset Quotes erd
10299 , check out section
10300 \begin_inset space ~
10304 \begin_inset CommandInset ref
10306 reference "sec:slitex"
10311 If your machine doesn't have the
10316 \begin_inset Quotes eld
10324 \begin_inset Quotes erd
10327 ] installed, you'll probably have to use the default
10331 class, which isn't quite as good as
10336 \begin_layout Standard
10341 class is designed for use with version 2.1 of the
10345 LaTeX class file which is now an integral part of LaTeX2e.
10348 \begin_layout Subsection
10352 \begin_layout Standard
10353 Obviously, to use this document class, you need to select
10354 \begin_inset Quotes eld
10362 \begin_inset Quotes erd
10372 \begin_inset space ~
10378 There are some settings in the
10381 \begin_inset space ~
10386 dialog that you should know about that are specific to this class:
10389 \begin_layout Itemize
10390 Don't change the options
10401 \begin_inset space ~
10407 They're ignored by the
10414 \begin_layout Itemize
10415 The default font size is 20
10416 \begin_inset space \thinspace{}
10419 pt with the other options being 17
10420 \begin_inset space \thinspace{}
10424 \begin_inset space \thinspace{}
10428 \begin_inset space \thinspace{}
10434 \begin_layout Itemize
10435 The default font is
10443 but all math equations are still typeset in the usual roman font.
10446 \begin_layout Itemize
10451 supports A4 and Letter paper sizes as well as a special size for working
10453 \begin_inset space \thinspace{}
10457 It doesn't support A5, B5, legal or executive paper sizes.
10460 \begin_layout Itemize
10461 Don't bother changing the
10465 settings because they are ignored anyway.
10466 All floats appear where they are defined in the text.
10469 \begin_layout Itemize
10474 setting behaves a bit differently for this class.
10479 provides extensive footer and header capabilities including a user-defined
10482 \begin_inset space ~
10486 \begin_inset CommandInset ref
10488 reference "sec:foilfoot"
10493 The title page is treated differently to all other pages in the document
10502 has the logo centered at the bottom of the page (if one is defined).
10503 The possible page style choices and what they do are as follows:
10507 \begin_layout Labeling
10508 \labelwidthstring MMMMMMM
10515 The final output contains no page numbers, or other headers or footers
10516 (except footnotes of course).
10520 \begin_layout Labeling
10521 \labelwidthstring MMMMMMM
10528 The final output contains page numbers centered at the bottom of the page.
10529 No other headings or footers (other than footnotes).
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMM
10538 Page numbers in lower right corner.
10539 Additional headers and footers are also shown.
10540 This is also the default.
10543 \begin_layout Labeling
10544 \labelwidthstring MMMMMMM
10549 Gives you access to the
10553 package although its use with
10557 is discouraged by the writer of the
10561 package because of some potential page layout clashes.
10565 \begin_layout Subsubsection
10569 \begin_layout Standard
10570 The following options may be used in the extra class options in the
10572 Document\SpecialChar \menuseparator
10578 \begin_layout Labeling
10579 \labelwidthstring MMMMMMx
10584 This sets up the page layout for 7.33
10585 \begin_inset space \thinspace{}
10589 \begin_inset space \thinspace{}
10592 in paper, which is about the same aspect ratio as a 35
10593 \begin_inset space \thinspace{}
10596 mm slide, making it a bit easier to work with this medium.
10599 \begin_layout Labeling
10600 \labelwidthstring MMMMMMx
10605 Places a rule across the page below the header on every page except the
10609 \begin_layout Labeling
10610 \labelwidthstring MMMMMMx
10615 Places a rule across the page above the footer on every page except the
10619 \begin_layout Labeling
10620 \labelwidthstring MMMMMMx
10625 This is automatically set each time you create a new
10634 to use the dvips driver to rotate those pages that are set as landscape
10638 \begin_layout Labeling
10639 \labelwidthstring MMMMMMx
10644 Simply changes the page dimensions to those of a landscape page but doesn't
10646 Thus if you use this option you need to use an external program to rotate
10647 each page or feed your paper through your printer as landscape.
10648 Note that this option effectively reverses the roles of the
10656 environments (don't worry these are described in the next section).
10659 \begin_layout Labeling
10660 \labelwidthstring MMMMMMx
10665 Equation numbers on the left.
10668 \begin_layout Labeling
10669 \labelwidthstring MMMMMMx
10674 Flush-left equations.
10677 \begin_layout Subsection
10678 Supported Environments
10681 \begin_layout Standard
10682 Most of the environments commonly supported in other classes are also supported
10688 There are several additional environments provided by
10692 as well as a couple added by LyX.
10693 The following environments are shared with other classes:
10696 \begin_layout Standard
10700 \begin_layout Plain Layout
10704 begin{multicols}{2}
10712 \begin_layout Itemize
10718 \begin_layout Itemize
10724 \begin_layout Itemize
10730 \begin_layout Itemize
10736 \begin_layout Itemize
10742 \begin_layout Itemize
10748 \begin_layout Itemize
10754 \begin_layout Itemize
10760 \begin_layout Itemize
10766 \begin_layout Itemize
10772 \begin_layout Itemize
10778 \begin_layout Itemize
10784 \begin_layout Itemize
10790 \begin_layout Itemize
10796 \begin_layout Itemize
10802 \begin_layout Itemize
10808 \begin_layout Itemize
10814 \begin_layout Itemize
10820 \begin_layout Standard
10824 \begin_layout Plain Layout
10836 \begin_layout Standard
10837 That is, all the major environments apart from the sectioning environments.
10838 Since foils are essentially self-contained sections, with a title and body,
10843 provides specific commands for starting new foils and these are:
10846 \begin_layout Itemize
10852 \begin_layout Itemize
10858 \begin_layout Standard
10859 LyX also provides slightly modified versions of these two environments called:
10862 \begin_layout Itemize
10868 \begin_layout Itemize
10871 ShortRotatefoilhead
10874 \begin_layout Standard
10875 and the differences will be explained in the next section.
10878 \begin_layout Standard
10879 Since foils are often used in presenting ideas or new theorems and such
10884 also provides a comprehensive box of goodies for presenting them:
10887 \begin_layout Standard
10891 \begin_layout Plain Layout
10895 begin{multicols}{2}
10903 \begin_layout Itemize
10909 \begin_layout Itemize
10915 \begin_layout Itemize
10921 \begin_layout Itemize
10927 \begin_layout Itemize
10933 \begin_layout Itemize
10939 \begin_layout Itemize
10945 \begin_layout Itemize
10951 \begin_layout Itemize
10957 \begin_layout Itemize
10963 \begin_layout Itemize
10969 \begin_layout Standard
10973 \begin_layout Plain Layout
10985 \begin_layout Standard
10986 The starred versions are unnumbered while the unstarred versions are numbered.
10987 There are also two list environments added by LyX and these are:
10990 \begin_layout Itemize
10996 \begin_layout Itemize
11002 \begin_layout Standard
11007 provides some powerful header and footer capabilities that are best set
11008 in the preamble although they may be set at any point in a document.
11009 If you want to change these settings in your document the best place to
11010 do so is at the very top of a foil, i.
11011 \begin_inset space \thinspace{}
11017 \begin_inset space \space{}
11022 straight after the foilhead.
11025 \begin_layout Standard
11026 For this purpose, the following command styles are provided [
11033 \begin_layout Standard
11037 \begin_layout Plain Layout
11041 begin{multicols}{2}
11049 \begin_layout Itemize
11053 \begin_inset space ~
11059 \begin_layout Itemize
11065 \begin_layout Itemize
11069 \begin_inset space ~
11075 \begin_layout Itemize
11079 \begin_inset space ~
11085 \begin_layout Itemize
11089 \begin_inset space ~
11096 \begin_layout Standard
11097 \begin_inset space ~
11104 \begin_layout Standard
11108 \begin_layout Plain Layout
11120 \begin_layout Standard
11121 There are also a few commands provided by
11125 that aren't directly supported by LyX but I'll tell you what they do and
11126 how to use them in section
11127 \begin_inset space ~
11131 \begin_inset CommandInset ref
11133 reference "sec:unsuppfoils"
11140 \begin_layout Subsection
11141 Building a Set of Foils
11144 \begin_layout Standard
11145 This section will give a simple introduction to using the different environments
11146 to build a set of foils.
11147 If you want to see an example set of foils, take a look at the
11151 file you find in LyX's
11158 \begin_layout Subsubsection
11159 Give It a Title Page
11162 \begin_layout Standard
11163 Unlike other classes that provide
11183 creates the title on a page of its own.
11184 If you leave out the
11188 environment LaTeX will substitute the current date (every time you regenerate
11192 \begin_layout Subsubsection
11196 \begin_layout Standard
11197 As I mentioned earlier, there are four ways of starting a new foil.
11198 For portrait foils you should use
11207 The difference between these two environments is the amount of space between
11208 the title of the foil (the foilhead) and the body of the foil.
11211 \begin_layout Standard
11212 Landscape foils are generated using the
11218 ShortRotatefoilhead
11221 Again the only difference is the spacing between foilhead and body.
11222 Both of the short versions have 0.5 inches less separation between the foilhead
11227 \begin_layout Standard
11228 One problem with the support for landscape foils is the requirement that
11229 you have to use the
11233 driver to generate the PostScript output otherwise the foils won't be rotated.
11234 It is possible to get landscape foils even if you haven't got the
11238 driver provided you can feed your foils sideways through your printer ;-)
11241 \begin_layout Subsubsection
11242 Theorems, Lemmas, Proofs and more
11245 \begin_layout Standard
11246 Due to a small bug in LyX you can't have two of the same type of these environme
11247 nts directly following each other.
11248 They must be separated by something.
11249 If you try, you will just be extending the previous environment as if you
11250 had merged the two environments together.
11251 So, how do you get around this problem? The simplest option is to insert
11252 some text between the two environments or add a
11256 environment between the two with just a
11257 \begin_inset Quotes eld
11265 \begin_inset Quotes erd
11269 This will force LyX to produce two separate environments and hence the
11270 correct LaTeX output.
11271 An example is provided in the example file included with the LyX distribution.
11272 Remember, this problem only occurs if you are trying to place two of the
11273 same type of theorem-like environments one directly after the other.
11276 \begin_layout Subsubsection
11280 \begin_layout Standard
11281 You get all the commonly supported list styles found in other classes as
11282 well as two new ones.
11283 I'll only describe the new ones here.
11284 If you want to find out more about the other list environments check out
11290 If you intend to use itemized lists you might also want to read about the
11294 \begin_inset space ~
11298 \begin_inset space ~
11303 dialog described above in section
11304 \begin_inset space ~
11308 \begin_inset CommandInset ref
11310 reference "sec:bullet"
11317 \begin_layout Standard
11318 The two new list styles,
11326 , are designed to make it easier for you to create lists of do's and don'ts
11327 or right and wrong by providing dedicated environments that use a tick
11328 or a cross as the label of the list.
11329 These lists are in fact dedicated variants of the
11334 They do however require that you have the
11338 packages installed.
11341 \begin_layout Subsubsection
11345 \begin_layout Standard
11350 redefines the floating tables and figures so that they appear exactly where
11351 they are in the text rather than pushing them to the top of the page or
11352 to some user specified location.
11353 In fact if you change the float placement settings they are simply ignored.
11356 \begin_layout Subsubsection
11357 Page Headers and Footers
11358 \begin_inset CommandInset label
11360 name "sec:foilfoot"
11367 \begin_layout Standard
11371 \begin_inset space ~
11380 are two commands used to control the left-footer text string.
11381 The first is meant to allow you to include a graphic logo on your foils
11383 \begin_inset Quotes eld
11391 \begin_inset Quotes erd
11395 While the second is meant to provide a classification for the audience,
11399 \begin_inset space \thinspace{}
11405 \begin_inset space \space{}
11409 It is empty by default.
11412 \begin_layout Standard
11413 The remaining page corners can be filled by
11416 \begin_inset space ~
11421 (which defaults to page numbers),
11424 \begin_inset space ~
11432 \begin_inset space ~
11440 \begin_layout Subsection
11446 \begin_inset CommandInset label
11448 name "sec:unsuppfoils"
11455 \begin_layout Standard
11456 All the commands mentioned below need to be set in a
11464 within another environment.
11467 \begin_layout Subsubsection
11471 \begin_layout Standard
11472 All lengths are adjusted using the
11495 should be replaced by the name given to the length you want to change and
11500 is the length value.
11501 All lengths should be specified in units of length such as inches (
11513 ) or relative to some document or font-based length such as
11523 \begin_layout Standard
11524 It's possible to change the spacing between a foilhead and the body of the
11525 foil by adjusting the length specified by
11532 For example, to make
11537 \begin_inset space \space{}
11540 in closer to their bodies put the following in the preamble:
11546 foilheadskip}{-0.5in}
11549 \begin_layout Standard
11550 The spacings around floats can be adjusted by setting these lengths:
11553 \begin_layout Labeling
11554 \labelwidthstring MMMMMMMMMMM
11561 Separation between the text and the top of the float
11564 \begin_layout Labeling
11565 \labelwidthstring MMMMMMMMMMM
11572 Separation between the float and the caption
11575 \begin_layout Labeling
11576 \labelwidthstring MMMMMMMMMMM
11583 Separation between the caption and the following text
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11594 You can make the captions narrower than the surrounding text by adjusting
11596 Best done relative to
11605 \begin_layout Standard
11606 There are also several title page related lengths that you may find useful
11607 if you have a long title or several authors:
11610 \begin_layout Labeling
11611 \labelwidthstring MMMMMMMMMMM
11618 Separation from headers to
11623 \begin_layout Labeling
11624 \labelwidthstring MMMMMMMMMMM
11642 \begin_layout Labeling
11643 \labelwidthstring MMMMMMMMMMM
11657 \begin_layout Labeling
11658 \labelwidthstring MMMMMMMMMMM
11674 \begin_layout Labeling
11675 \labelwidthstring MMMMMMMMMMM
11691 \begin_layout Standard
11692 The last length related command affects all the list environments.
11703 a list environment then all the vertical spacing between the list items
11705 Note that this is a command not a length so it doesn't require
11711 like the stuff mentioned above.
11714 \begin_layout Subsubsection
11715 Headers and Footers
11718 \begin_layout Standard
11731 commands control whether the logo in the
11735 definition appear on a given page.
11742 in the preamble then none of the foils will have the logo on them.
11743 If you don't want the logo on a particular page place the
11749 directly after the foilhead of that page and the
11755 directly after the next foilhead.
11758 \begin_layout Standard
11759 If you decide to use the
11763 page style setting in the
11766 \begin_inset space ~
11771 dialog you should probably add
11781 to your preamble so headers and footers on landscape pages are correctly
11782 placed when rotated.
11783 This is due to some clashes between the page layouts provided by the
11794 \begin_layout Section
11795 Hollywood (Hollywood spec scripts)
11798 \begin_layout Standard
11804 \begin_layout Subsection
11808 \begin_layout Standard
11809 Getting the format of a Hollywood script right is a
11810 \begin_inset Quotes eld
11814 \begin_inset Quotes erd
11817 It is designed to make the readers focus on content and to be easy and
11818 familiar for the actors to read.
11819 Each page of a script should be one minute of film.
11820 Nothing goes in a script that you cannot see or hear on screen.
11821 The courier 12 pt font should be used throughout.
11825 \begin_layout Subsection
11829 \begin_layout Standard
11830 Speakers' lines should NEVER break in mid-sentence.
11831 If a speaker's lines continue over a page break, repeat the
11835 title followed by (Cont'd).
11838 \begin_layout Subsection
11842 \begin_layout Standard
11847 names as labels then cross-reference the label to insert the name.
11848 The cross-reference dialog will show the current cast of characters.
11849 You can use this to insert the speaker name in narratives also.
11852 \begin_layout Subsection
11853 Paper size and Margins
11856 \begin_layout Standard
11857 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11860 \begin_layout Subsection
11864 \begin_layout Standard
11865 The following environments are available.
11866 You can use hollywood.bind to get the bind keys shown at the right.
11869 \begin_layout Itemize
11873 \begin_inset Newline newline
11878 Used where nothing else works.
11882 \begin_layout Itemize
11888 \begin_inset space \hfill{}
11896 \begin_inset Newline newline
11899 Usually followed by something like
11900 \begin_inset Quotes eld
11903 on Sally waking up.
11904 \begin_inset Quotes erd
11910 \begin_layout Itemize
11914 \begin_inset space \hfill{}
11918 \begin_inset Newline newline
11923 Introduces a new INTERIOR camera set-up.
11924 Always followed by DAY or NIGHT, or something similar to define the lighting
11926 Everthing on this line in CAPS.
11929 \begin_layout Itemize
11933 \begin_inset space \hfill{}
11937 \begin_inset Newline newline
11942 Introduces a new EXTERIOR camera set-up.
11943 Everthing on this line in CAPS.
11946 \begin_layout Itemize
11950 \begin_inset space \hfill{}
11954 \begin_inset Newline newline
11959 The character speaking.
11962 \begin_layout Itemize
11966 \begin_inset space \hfill{}
11970 \begin_inset Newline newline
11975 Instructions to the speaker.
11976 The () are automatically inserted, but only the ( will show in LyX.
11977 Both will be printed.
11980 \begin_layout Itemize
11984 \begin_inset space \hfill{}
11988 \begin_inset Newline newline
12000 \begin_layout Itemize
12004 \begin_inset space \hfill{}
12008 \begin_inset Newline newline
12013 Camera movement instruction.
12015 \begin_inset space \thinspace{}
12019 \begin_inset space \space{}
12025 \begin_layout Itemize
12029 \begin_inset space \hfill{}
12035 \begin_layout Itemize
12039 \begin_inset space \hfill{}
12045 \begin_layout Itemize
12049 \begin_inset space \hfill{}
12055 \begin_layout Itemize
12059 \begin_inset space \hfill{}
12065 \begin_layout Subsection
12069 \begin_layout Itemize
12073 \begin_layout Itemize
12077 \begin_layout Itemize
12079 \begin_inset space \thinspace{}
12086 \begin_layout Itemize
12091 \begin_layout Itemize
12092 PAN — camera movement
12095 \begin_layout Itemize
12096 INSERT — cut to close-up of
12099 \begin_layout Section
12103 \begin_layout Standard
12106 Panayotis Papasotiriou
12109 \begin_layout Subsection
12113 \begin_layout Standard
12114 The ijmpc package is a set of macros that facilitates electronic manuscript
12117 International Journal of Modern Physics C
12120 Similarly, the ijmpd package is for creating manuscripts to be submitted
12123 International Journal of Modern Physics D
12126 Both journals are published by World Scientific.
12127 The corresponding document classes are named
12136 These files, together with instructions for the authors, can be downloaded
12138 \begin_inset Flex URL
12141 \begin_layout Plain Layout
12143 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12149 \begin_inset Flex URL
12152 \begin_layout Plain Layout
12154 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12160 Both packages are modified versions of the standard
12161 \begin_inset Quotes eld
12165 \begin_inset Quotes erd
12168 package, and they are almost (but not exactly) identical.
12169 Most of their features are supported by LyX.
12170 I have used LyX successfully to write articles submitted to both journals
12171 without any problem.
12174 \begin_layout Subsection
12178 \begin_layout Standard
12179 As usual, the easiest way to write a paper is to start with a template.
12182 File\SpecialChar \menuseparator
12201 This will give an (almost) empty document that includes the most common
12202 fields found in a manuscript.
12203 Simply overwrite the existing text (including the brackets,
12208 You should keep in mind the following remarks.
12211 \begin_layout Enumerate
12212 LyX won't let you change the font size and the page style of the document,
12213 because such modifications are not allowed by both packages.
12216 \begin_layout Enumerate
12217 The language of the document should not be changed.
12218 Before previewing your paper, be sure that the babel package is not used.
12219 To do this, click on
12221 Tools\SpecialChar \menuseparator
12232 checkbox in the language settings, and click on
12240 , if you wish to make this change permanent).
12243 \begin_layout Enumerate
12245 \begin_inset Quotes eld
12249 \begin_inset Quotes erd
12252 style must be used to define keywords.
12255 \begin_layout Enumerate
12256 The ijmpc package provides a style named
12257 \begin_inset Quotes eld
12260 Classification Codes
12261 \begin_inset Quotes erd
12264 , which can be used to define classification codes, such as PACS numbers.
12265 Note that this facility is not supported by the ijmpd package.
12268 \begin_layout Enumerate
12269 Several new environments are available:
12270 \begin_inset Quotes eld
12274 \begin_inset Quotes erd
12278 \begin_inset Quotes eld
12282 \begin_inset Quotes erd
12286 \begin_inset Quotes eld
12290 \begin_inset Quotes erd
12294 \begin_inset Quotes eld
12298 \begin_inset Quotes erd
12302 \begin_inset Quotes eld
12306 \begin_inset Quotes erd
12310 \begin_inset Quotes eld
12314 \begin_inset Quotes erd
12318 \begin_inset Quotes eld
12322 \begin_inset Quotes erd
12326 \begin_inset Quotes eld
12330 \begin_inset Quotes erd
12334 \begin_inset Quotes eld
12338 \begin_inset Quotes erd
12342 \begin_inset Quotes eld
12346 \begin_inset Quotes erd
12350 \begin_inset Quotes eld
12354 \begin_inset Quotes erd
12358 \begin_inset Quotes eld
12362 \begin_inset Quotes erd
12366 \begin_inset Quotes eld
12370 \begin_inset Quotes erd
12374 \begin_inset Quotes eld
12378 \begin_inset Quotes erd
12382 Their use is more or less obvious.
12383 LyX supports all these environments; it will use the proper label, text
12384 style, and numbering scheme for each of them.
12387 \begin_layout Enumerate
12388 Both packages use basic citations; the natbib package should not be used.
12389 In LyX, citation references are shown as usual; in the output, citations
12390 are shown as superscripts.
12391 If you want to use a citation as normal text, you should use the
12396 \begin_inset space \thinspace{}
12400 \begin_inset space \space{}
12404 \begin_inset Quotes eld
12408 \begin_inset space \space{}
12418 \begin_inset Quotes erd
12424 \begin_layout Enumerate
12426 \begin_inset Quotes eld
12430 \begin_inset Quotes erd
12433 section in both packages.
12434 To put acknowledgments, just use the
12435 \begin_inset Quotes eld
12439 \begin_inset Quotes erd
12445 \begin_layout Enumerate
12446 Appendices may be added to the paper,
12450 the Acknowledgments and
12455 LyX provides a special environment, called
12456 \begin_inset Quotes eld
12460 \begin_inset Quotes erd
12463 which marks the beginning of the appendices.
12464 This environment should be left blank; it just sends a LaTeX command, but
12465 nothing is really printed.
12467 \begin_inset Quotes eld
12471 \begin_inset Quotes erd
12474 is printed with blue letters, as a signal that all sections after that
12475 point are appendices.
12476 To write an appendix, use the
12477 \begin_inset Quotes eld
12481 \begin_inset Quotes erd
12485 LyX will number each appendix with capital letters, as required by both
12488 \begin_inset Quotes eld
12492 \begin_inset Quotes erd
12499 be present before the first appendix; if not, all appendices will be numbered
12500 as normal sections in the output.
12503 \begin_layout Enumerate
12504 The ijmpc and the ijmpd packages use the
12508 command to implement table captions.
12509 As a result, a table created by LyX is printed correctly, but its caption
12511 However, you can use some TeX code to overcome this problem, so that captions
12512 are printed as expected.
12513 To do so, create a float table as usual, remove the caption, and replace
12514 it with the TeX code
12524 (sic); you must also the TeX code
12528 immediately after the tabular material.
12529 Study the example table included in the template files to see how this
12530 trick is implemented.
12531 Alternatively, If you need table captions, you should implement the whole
12536 file, then include this file to the LyX document (
12538 Insert\SpecialChar \menuseparator
12539 File\SpecialChar \menuseparator
12541 \begin_inset space ~
12547 Details on how to create a table float can be found in the files
12555 , included in the corresponding packages.
12558 \begin_layout Subsection
12559 Preparing a paper for submission
12562 \begin_layout Standard
12563 Before you submit your paper you must export the LyX document as a LaTeX
12566 File\SpecialChar \menuseparator
12567 Export\SpecialChar \menuseparator
12574 \begin_layout Plain Layout
12575 Actually you have the choice between LaTeX (plain) and pdflatex.
12576 If you intend to use pdflatex to prepare the paper, you should use the
12577 pdflatex option so that included graphics are converted to PDF format,
12578 ready for use by pdflatex.
12583 , then make the following changes to the resulting
12590 \begin_layout Enumerate
12591 Remove the comment lines before the
12600 \begin_layout Enumerate
12601 Remove everything between (and including) the
12613 commands, except for any commands you specifically put into the LaTeX preamble.
12616 \begin_layout Standard
12621 file should be saved and processed through LaTeX as many times as necessary.
12622 You may also want to check the resulting
12629 \begin_layout Subsection
12633 \begin_layout Standard
12634 The use of TeX code is reduced to two commands, which must be placed at
12635 the top of the document.
12636 If you started writing your paper by using the
12644 template, the TeX code needed is already in its place; you usually don't
12646 You may only modify the first TeX code to specify the information printed
12647 to the top of odd and even pages (authors' names and short paper's title,
12649 This TeX code must have the form
12653 markboth{Authors' Names}{Short Paper's Title}
12658 \begin_layout Section
12662 \begin_layout Standard
12668 \begin_layout Subsection
12672 \begin_layout Standard
12673 The iopart package provides a document class to create electronic manuscript
12674 submission to the journals published by the Institute of Physics.
12675 Instructions for the authors how to create a paper using the iopart class
12676 can be downloaded together with the iopart package from the site
12677 \begin_inset Flex URL
12680 \begin_layout Plain Layout
12682 ftp://ftp.iop.org/pub/journals/latex2e
12690 \begin_layout Subsection
12694 \begin_layout Standard
12695 The easiest way to write a paper is to start with the file
12699 that is available in LyX's examples files folder.
12700 Open this file, save it under a new name, and start writing.
12701 The example file explains how to use the special text environments.
12702 Here are the most important advices:
12705 \begin_layout Itemize
12706 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12709 Use AMS math package
12711 in the document settings under
12718 \begin_layout Itemize
12721 The title environment defines the kind of your paper.
12722 So use one of the following environments for the title:
12726 \begin_layout Itemize
12735 \begin_layout Itemize
12744 \begin_layout Itemize
12750 for a Topical review
12753 \begin_layout Itemize
12762 \begin_layout Itemize
12771 \begin_layout Itemize
12777 for a Paper (same as Title)
12780 \begin_layout Itemize
12786 for a Preliminary communication
12789 \begin_layout Itemize
12795 for a Rapid communication
12798 \begin_layout Itemize
12804 for a Letter to the editor
12808 \begin_layout Itemize
12811 All title environments except of
12815 can have an optional short title.
12818 \begin_layout Itemize
12819 There is a general title environment
12823 which is not directly supported by the LyX.
12824 This can be used as TeX code when your document doesn't fit into one of
12825 the other title types.
12828 \begin_layout Standard
12829 For more informations like hints for special table and formula formatting,
12830 look at the IOP author guidelines.
12833 \begin_layout Section
12837 \begin_layout Standard
12840 Panayotis Papasotiriou
12843 \begin_layout Subsection
12847 \begin_layout Standard
12848 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12849 that facilitates electronic manuscript submission to the journals they
12851 Most known of them (at least in my domain of interest) are
12853 Astrophysics and Space Science
12859 , but there are many others (see a complete list at
12860 \begin_inset Flex URL
12863 \begin_layout Plain Layout
12865 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12871 The Kluwer package may be downloaded from the site
12872 \begin_inset Flex URL
12875 \begin_layout Plain Layout
12877 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12883 A complete user guide is contained in that package (but it can also be
12884 downloaded separately).
12887 \begin_layout Standard
12888 LyX supports many features of the package but not everything.
12889 However, the TeX code needed is reduced to some
12890 \begin_inset Quotes eld
12894 \begin_inset Quotes erd
12897 commands of the package (see
12898 \begin_inset space ~
12902 \begin_inset CommandInset ref
12904 reference "subsec:kluwer_peculiarities"
12909 I have recently used LyX to write an article submitted to the
12911 Astrophysics and Space Science
12913 without any problem.
12916 \begin_layout Subsection
12920 \begin_layout Standard
12921 The easiest way to write a paper is to start with the Kluwer template file.
12924 File\SpecialChar \menuseparator
12936 This will give an (almost) empty document that includes the most common
12937 fields found in a manuscript and a short description of their use.
12938 As in most templates, simply overwrite the existing text (including the
12943 ) with the correct information.
12946 \begin_layout Subsection
12947 Preparing a paper for submission
12950 \begin_layout Standard
12951 As in the AASTeX package, before you submit your paper to a journal you
12953 \begin_inset Quotes eld
12957 \begin_inset Quotes erd
12963 \begin_layout Enumerate
12964 Export your paper as a LaTeX file.
12965 To do this, click on
12967 File\SpecialChar \menuseparator
12968 Export\SpecialChar \menuseparator
12975 \begin_layout Enumerate
12980 file with a text editor and make the following changes
12984 \begin_layout Enumerate
12985 remove the comment lines before the
12994 \begin_layout Enumerate
12995 remove everything between (and including) the
13007 commands, except for any commands you specifically put into the LaTeX preamble.
13010 \begin_layout Standard
13019 \begin_layout Enumerate
13024 file through LaTeX as many times as necessary (usually up to three).
13027 \begin_layout Enumerate
13033 \begin_inset space \thinspace{}
13037 \begin_inset space \space{}
13044 , and check if everything is OK (it should, if you didn't make any mistake).
13047 \begin_layout Subsection
13048 \begin_inset Quotes eld
13052 \begin_inset Quotes erd
13055 of the Kluwer package
13056 \begin_inset CommandInset label
13058 name "subsec:kluwer_peculiarities"
13065 \begin_layout Standard
13066 The Kluwer package has the following
13067 \begin_inset Quotes eld
13071 \begin_inset Quotes erd
13077 \begin_layout Enumerate
13078 It is possible to write multiple articles in the same LaTeX file
13082 \begin_layout Plain Layout
13083 I can't imagine any good reason to do this.
13089 Each article must be included in the environment
13090 \begin_inset Quotes eld
13094 \begin_inset Quotes erd
13098 Unfortunately, this environment cannot be omitted, even if you write just
13100 Therefore, each article starts with the command
13106 and, obviously, ends with the command
13113 Although this can be implemented in LyX, I didn't included it, since it
13114 looks ugly and can confuse the novice user.
13115 Therefore, you need to enter them directly and mark them as LaTeX code
13117 \begin_inset Quotes eld
13121 \begin_inset Quotes erd
13127 \begin_layout Enumerate
13128 Information given at the beginning of the article (i.
13129 \begin_inset space \thinspace{}
13133 \begin_inset space \space{}
13136 title, subtitle, author, institution, running title, running author, abstract
13137 and keywords) must be included in an environment called
13138 \begin_inset Quotes eld
13142 \begin_inset Quotes erd
13146 This is not implemented in LyX, so you must enter title, subtitle etc.
13147 \begin_inset space ~
13150 between two TeX code lines (
13165 \begin_layout Enumerate
13166 According to the user manual, the label of each bibliography item must be
13190 \begin_layout Standard
13195 template takes care of all these
13196 \begin_inset Quotes eld
13200 \begin_inset Quotes erd
13204 If you start a new paper using this template you don't need to do anything
13209 \begin_layout Enumerate
13210 don't delete the TeX code included in the template, and
13213 \begin_layout Enumerate
13214 copy the example bibliography item included in the template and modify it
13215 as necessary to enter new bibliography items.
13218 \begin_layout Section
13222 \begin_layout Standard
13228 \begin_layout Subsection
13232 \begin_layout Standard
13233 The LyX document classes
13235 article (koma-script)
13239 report (koma-script)
13257 correspond to the LaTeX document classes
13274 \begin_inset space ~
13277 of the Koma-Script family.
13278 They are replacements for the standard document classes
13294 , resp., and fit better to European typography conventions in a number of
13298 \begin_layout Itemize
13299 Standard character size is 11pt in
13301 article (koma-script)
13305 report (koma-script)
13313 letter (koma-script)
13318 \begin_layout Itemize
13319 Headings, labels of the description environment, and a number of elements
13322 letter (koma-script)
13324 document class are set in a bold sans serif font.
13328 \begin_layout Plain Layout
13329 There is a big difference between the bold sans serif old cm fonts and new
13330 ec fonts, especially in the appearance of headings.
13331 In comparison, the ec bold sans serif fonts look a bit thin.
13332 Here the LaTeX package
13340 helps to produce the
13341 \begin_inset Quotes eld
13345 \begin_inset Quotes erd
13348 appearance when using the ec fonts.
13353 The numbering of chapter headings is made in the same way as the numbering
13354 of section headings, that is without the extra line
13355 \begin_inset Quotes eld
13358 Chapter\SpecialChar \ldots{}
13360 \begin_inset Quotes erd
13364 In addition, the appearance of the headings can be modified by using a
13365 number of options (in LyX to be entered in the field
13368 \begin_inset space ~
13375 Layout\SpecialChar \menuseparator
13382 \begin_layout Itemize
13383 The main means in the Koma-Script document classes to design the type area
13392 (in LyX to be entered in the extra class options field in the dialog
13394 Document\SpecialChar \menuseparator
13398 They make a clearer modification of page margins possible as do the options
13401 Document\SpecialChar \menuseparator
13408 \begin_layout Itemize
13409 The LaTeX document classes of the Koma-Script family define a number of
13410 additional commands.
13411 Those part of it which makes sense in LyX is implemented in corresponding
13415 \begin_layout Standard
13416 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13417 can be found in the Koma-Script documentation
13428 \begin_layout Subsection
13429 article (koma-script), report (koma-script), and book (koma-script)
13432 \begin_layout Standard
13433 The document classes
13435 article (koma-script)
13439 report (koma-script)
13449 are implemented in the layout files
13462 They contain all the paragraph types of the corresponding standard document
13475 , resp., partly modified, with the exception of the LyX specific
13479 -type, which is replaced by the new
13483 -type having the same functionality.
13488 -Type there is a number of new paragraph types added.
13495 letter (koma-script)
13500 \begin_layout Itemize
13509 : are equivalents to
13517 , resp., additionally inserting an entry in the table of contents.
13526 are not contained in
13528 article (koma-script)
13533 \begin_layout Itemize
13542 : behave exactly as
13550 , resp., additionally clearing running heads.
13555 is not contained in
13557 article (koma-script)
13563 \begin_layout Plain Layout
13576 report (koma-script)
13578 , but since this is identical to
13582 , is has not been implemented in LyX.
13590 \begin_layout Itemize
13595 : generates a heading directly above the following paragraph in the standard
13596 character size without affecting the structure of the document.
13599 \begin_layout Itemize
13608 are special captions which respect the different space settings needed
13609 for captions placed above or below an element (if you follow strict typographic
13610 rules, you might want to place table captions always above the table).
13611 You can also use the class option
13615 , which will switch
13628 You need at least Koma-Script version 2.8q to use this.
13631 \begin_layout Itemize
13636 : can be used to set a bonmot, e.
13637 \begin_inset space \thinspace{}
13641 \begin_inset space \space{}
13644 at the beginning of a chapter.
13645 If you use the optional argument (
13647 Insert\SpecialChar \menuseparator
13649 \begin_inset space ~
13654 ), you can insert the dictum's author there.
13655 Dictum and author are separated by a line.
13656 You need at least Koma-Script version 2.8q to use this.
13661 is not contained in
13663 article (koma-script)
13668 \begin_layout Standard
13669 The following types, together with the standard types
13681 , form the title area of the document.
13682 They must be entered ahead of the first
13683 \begin_inset Quotes eld
13687 \begin_inset Quotes erd
13694 \begin_layout Plain Layout
13695 The corresponding LaTeX commands must appear before the
13706 When such a type is used more than once, the latter usage overwrites the
13707 former one, that means, for every type only the latest usage is valid.
13708 The order of the different types however has, like
13720 , no effect on the appearance of the produced document.
13723 \begin_layout Itemize
13728 : produces a centered paragraph above the ordinary title (
13740 ) for the subject of the document.
13743 \begin_layout Itemize
13748 : produces a centered paragraph below the ordinary title (
13760 ) for the publishers' name.
13763 \begin_layout Itemize
13770 report (koma-script)
13776 produces a centered paragraph on its own page behind the title page, or
13779 article (koma-script)
13781 produces a centered paragraph below the ordinary title (
13797 ) for a dedication.
13800 \begin_layout Itemize
13805 : produces a left aligned paragraph above the ordinary title (
13821 ) for a document`s head.
13824 \begin_layout Itemize
13829 : produces in a double-sided print in
13831 report (koma-script)
13837 a left-aligned paragraph at the top of the title page`s back or has no
13838 effect in a single-sided print or in
13840 article (koma-script)
13845 \begin_layout Itemize
13850 : produces in a double-sided print in
13852 report (koma-script)
13858 a left-aligned paragraph at the bottom of the title page`s back or has
13859 no effect in a single-sided print or in
13861 article (koma-script)
13866 \begin_layout Itemize
13871 : produces a special
13872 \begin_inset Quotes eld
13876 \begin_inset Quotes erd
13879 page ahead of the actual document containing a paragraph without special
13883 \begin_layout Standard
13884 The layout files for the document classes
13886 article (koma-script)
13890 report (koma-script)
13896 do include the file
13901 This is thought of as a place to define your own types.
13906 in your personal layout directory and edit the file!
13909 \begin_layout Subsection
13910 letter (koma-script)
13913 \begin_layout Standard
13917 \begin_layout Plain Layout
13929 \begin_layout Standard
13933 letter (koma-script)
13935 is implemented in the layout file
13940 It contains all the paragraph types of the corresponding standard document
13945 , partly modified, with the exception of the LyX specific types
13957 type, which is replaced by the new
13962 In addition, it contains, in contrast to the standard document class, the
13980 Furthermore, there are a number of new letter specific types.
13983 \begin_layout Standard
13987 \begin_layout Plain Layout
13999 \begin_layout Standard
14000 The appearance of the letter produced by this document class can be controlled
14001 by a number of LaTeX commands, which you can put in the LaTeX preamble.
14005 \begin_layout Plain Layout
14006 For example, the standard appearance of the letter`s heading, consisting
14007 of name and address, is quite self-willed.
14009 \begin_inset Quotes eld
14013 \begin_inset Quotes erd
14016 heading is produced by the following LaTeX commands in the preamble:
14019 \begin_layout LyX-Code
14029 \begin_layout LyX-Code
14045 \begin_layout LyX-Code
14055 \begin_layout LyX-Code
14075 A detailed German description of such LaTeX commands can be found in the
14076 Koma-Script documentation
14081 With it, the letter's author can produce his personal letter layout.
14084 \begin_layout Standard
14093 define the beginning of the letter and must be used in every letter.
14094 To emphasize them in the LyX document class, they are marked with the letter
14104 \begin_inset space ~
14107 in the left margin.
14108 It is possible to write any number of letters in one file.
14113 type produces a new letter using the same addressee and a
14117 type produces a new addressee.
14134 are ordinary paragraph types and can also be used several times in one
14135 and the same letter.
14138 \begin_layout Itemize
14143 : produces a paragraph for the addressee and implicitly defines the beginning
14147 \begin_layout Itemize
14152 : produces a paragraph for the form of address and implicitly produces a
14156 \begin_layout Itemize
14161 : produces a paragraph for a close.
14164 \begin_layout Itemize
14169 : produces a paragraph for a postscript.
14172 \begin_layout Itemize
14177 : produces a paragraph for a distribution list.
14180 \begin_layout Itemize
14185 : produces a paragraph for enclosures.
14188 \begin_layout Standard
14229 are input types provided with a label to enter information, which will
14230 be processed by the document class.
14234 \begin_layout Plain Layout
14235 It could be seen as a matter of inconsequence, that the types
14243 described above are not such input types as well.
14244 Because of the special meaning of those types, however, I have implemented
14245 them as ordinary paragraph types with a one letter mark in the left margin.
14246 Moreover, it would affect my feeling of symmetry, if the
14254 type had such a serious different appearance.
14259 The types must be used ahead of the corresponding
14266 \begin_layout Standard
14267 An implementation of these types in a WYSIWYG fashion does not seem to make
14268 sense, because the real appearance of the produced letter does not only
14269 depend on the usage of the particular type, but also on other factors.
14270 For example, a signature entered in the
14274 type will in the standard behavior appear in the produced letter only,
14275 when in the same letter also a
14280 The entered value of the
14284 type will in the standard behavior not appear in the produced letter at
14286 The possibility to design the letter`s heading freely is already indicated
14287 in a footnote above.
14290 \begin_layout Standard
14291 The input types can also be used as empty paragraphs.
14292 This makes sense e.
14293 \begin_inset space \thinspace{}
14297 \begin_inset space \space{}
14309 type is not used at all, in the standard behavior the value of the
14313 type is used as signature, whereas if an empty
14317 type is used, no signature value is defined.
14320 \begin_layout Standard
14321 By using the input types it is possible to write a letter template, containing
14322 filled input types with your personal dates (name, address, etc.) and empty
14323 input types for other dates you want to enter.
14326 \begin_layout Itemize
14331 : sender's name, in the standard behavior appears as a centered paragraph
14332 in small caps in the letter`s heading.
14335 \begin_layout Itemize
14340 : sender's signature, in the standard behavior appears below the
14349 type is used, the value of the
14353 type appears instead.
14356 \begin_layout Itemize
14361 : sender's address, in the standard behavior appears in a centered paragraph
14362 in the letter`s heading below the sender's name.
14365 \begin_layout Itemize
14370 : sender's telephone number, in the standard behavior only sets the LaTeX
14380 \begin_layout Itemize
14385 : place of the letter`s making.
14388 \begin_layout Itemize
14393 : date of the letter`s making.
14402 , in the standard behavior, produce the place and the date in a right-aligned
14403 line below the addressee's field.
14408 type is used, neither place nor date appear, independent of the value of
14418 type is used, the date of the letter `s production is used.
14421 \begin_layout Itemize
14426 : sender`s back address, in the standard behavior appears above the addressee's
14427 field in a small sans serif font.
14430 \begin_layout Itemize
14435 : special mail information, in the standard behavior appears underlined
14436 above the addressee's field below the back address.
14439 \begin_layout Itemize
14444 : additional information, in the standard behavior appears on right side
14445 below the addressee`s field.
14448 \begin_layout Itemize
14453 : the letter's title, in the standard behavior appears in a big, bold, sans
14454 serif font above the subject.
14457 \begin_layout Itemize
14462 : the letter's subject, in the standard behavior appears in a bold font
14470 \begin_layout Standard
14491 produce a business letter like line above the
14495 line containing the fields
14496 \begin_inset Quotes eld
14500 \begin_inset Quotes erd
14504 \begin_inset Quotes eld
14508 \begin_inset Quotes erd
14512 \begin_inset Quotes eld
14516 \begin_inset Quotes erd
14520 \begin_inset Quotes eld
14524 \begin_inset Quotes erd
14528 \begin_inset Quotes eld
14532 \begin_inset Quotes erd
14536 \begin_inset Quotes eld
14540 \begin_inset Quotes erd
14544 For the date field, the value of the
14550 \begin_inset Quotes eld
14553 business letter types
14554 \begin_inset Quotes erd
14557 is used, the value of the
14561 type however does not appear, but only the LaTeX variable
14568 The ordinary output of place and date in a right-aligned line below the
14569 addressee`s field is suppressed.
14570 The types are implemented as input types provided with a label and must
14571 be used ahead of the corresponding
14578 \begin_layout Itemize
14586 \begin_layout Itemize
14594 \begin_layout Itemize
14602 \begin_layout Itemize
14610 \begin_layout Itemize
14618 \begin_layout Subsection
14619 The new letter class: letter (koma-script v.2)
14622 \begin_layout Standard
14628 \begin_layout Standard
14629 \begin_inset VSpace medskip
14635 \begin_layout Standard
14637 Koma-Script version 2.8 has introduced a new letter class
14641 which supersedes the now unsupported
14646 It has — on the LaTeX side — a completely new interface and is not compatible
14647 with the old class.
14648 Therefore, LyX supports both, though it is recommended you use the new
14652 \begin_layout Standard
14653 This class covers the same functionality as
14655 letter (koma-script),
14658 The basic items are
14662 (receiver's address, same as
14666 in the old layout),
14679 will start a new letter (i.
14680 \begin_inset space \thinspace{}
14684 \begin_inset space \space{}
14687 you can write several letters per document).
14688 New elements are sender's
14704 and the possibility to use a
14710 Insert\SpecialChar \menuseparator
14716 \begin_layout Standard
14717 The biggest improvement is, though, that the letter's layout is configurable
14718 to meet almost any needs.
14719 This can be done via the preamble or with a special style file (Letter
14720 Class Option, extension
14724 ), that will be read in as a class option.
14728 \begin_layout Plain Layout
14729 The KOMA package comes with some default
14734 There is, for instance, a
14738 file that follows german typesetting rules, or a
14742 that provides the default layout of the old
14747 The latter can be loaded with the class option
14756 ayout\SpecialChar \menuseparator
14761 ocument\SpecialChar \menuseparator
14773 template that is included in LyX for examples.
14774 A detailed description is to be found in the Koma-Script documentation
14782 \begin_layout Subsection
14786 \begin_layout Standard
14787 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14791 \begin_layout Itemize
14792 The chapter number of a
14796 type appears on a line of its own above the chapter heading instead of
14797 appearing in the same line ahead of it.
14798 The cause for that is the LyX internal behavior for the labeltype
14802 in the layout file.
14805 \begin_layout Itemize
14806 The headings of the types
14814 are only put in the
14815 \begin_inset Quotes eld
14819 \begin_inset Quotes erd
14822 LaTeX table of contents, but not in the LyX table of contents (
14824 Document\SpecialChar \menuseparator
14826 \begin_inset space ~
14830 \begin_inset space ~
14838 \begin_layout Itemize
14839 The paragraphs in a
14843 document class appear in a skip separation mode, not indented.
14844 This is the standard behavior, no special LaTeX commands are needed for
14848 Document\SpecialChar \menuseparator
14851 dialog the corresponding radio button indicates
14860 value always has the effect that extra LaTeX commands are inserted in the
14861 document to produce the gap, which is not what is wanted in this case.
14864 \begin_layout Section
14865 Latex8 (IEEE Conference Papers)
14868 \begin_layout Standard
14874 \begin_layout Subsection
14878 \begin_layout Standard
14879 Since this class is specifically for writing submissions to IEEE sponsored
14880 conferences I strongly recommend that you get a copy of their Authors Kit.
14885 package and associated bibliography style file is included in the kit.
14886 The Authors Kit is usually sent out by email once your initial submission
14888 There is a lot of useful information in the Authors Kit explaining formatting
14889 restrictions and so on and I will assume you have read this since that
14890 means I don't have to repeat it all here.
14893 \begin_layout Subsection
14897 \begin_layout Standard
14898 [AR\SpecialChar \@.
14902 \begin_layout Subsection
14903 Supported Environments
14906 \begin_layout Itemize
14912 \begin_layout Itemize
14918 \begin_layout Itemize
14924 \begin_layout Itemize
14930 \begin_layout Itemize
14936 \begin_layout Itemize
14942 \begin_layout Itemize
14948 \begin_layout Itemize
14954 \begin_layout Itemize
14960 \begin_layout Subsection
14961 Differences Between Screen and Paper
14964 \begin_layout Standard
14965 There are slight differences in appearance mainly with the presentation
14966 of section counters.
14967 On screen the trailing period of the section counter is missing but it
14968 will appear in the output so don't let this worry you.
14971 \begin_layout Section
14975 \begin_layout Standard
14981 \begin_layout Subsection
14985 \begin_layout Standard
14986 Memoir is a very powerful and constantly evolving class.
14987 It has been designed with regard to fictional and non-fictional literature.
14988 Its aim is to let the user have maximum control over the typesetting of
14990 Memoir is based on the standard book class, but it can also emulate the
14991 article class (see below).
14994 \begin_layout Standard
14995 Peter Wilson, the developer of Memoir, is known as the author of lots of
14996 useful packages in the LaTeX world.
14997 Most of them have been merged with Memoir.
14998 Therefore, it is much easier to layout the table of contents, appendices,
14999 chapter designs and such.
15000 LyX, though, does not support all of these goodies natively.
15001 Some of them might be added to forthcoming releases
15005 \begin_layout Plain Layout
15006 You are invited to send suggestions to
15007 \begin_inset Flex URL
15010 \begin_layout Plain Layout
15012 lyx-devel@lists.lyx.org
15022 , lots will probably never, due to the limitations of LyX's framework.
15023 Of course you can still use all features with the help of some native LaTeX
15028 \begin_layout Plain Layout
15033 \begin_layout Plain Layout
15043 \begin_inset space ~
15047 \begin_inset CommandInset ref
15049 reference "sec:Inserting-TeX-Code"
15059 In this section, we can only list those features which are natively supported
15061 For detailed descriptions (and for the rest of features) we recommend you
15062 have a look at the detailed manual of the Memoir class
15066 \begin_layout Plain Layout
15071 \begin_layout Plain Layout
15081 \begin_inset Flex URL
15084 \begin_layout Plain Layout
15086 CTAN:/macros/latex/memoir/memman.pdf
15096 , which is not only a user guide for the class, but also both a comprehensive
15097 description on good typesetting and a superb example for good typesetting
15101 \begin_layout Subsection
15102 Basic features and restrictions
15105 \begin_layout Standard
15106 Memoir supports basically all features of the standard book classes.
15107 There are, however, some differences, as follows:
15110 \begin_layout Description
15112 \begin_inset space ~
15115 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15118 \begin_layout Description
15120 \begin_inset space ~
15123 style: The fancy page style is not supported, due to a command clash between
15124 Memoir and the fancyhdr package (they both define a command with the same
15125 name, which confuses LaTeX).
15126 Instead, Memoir comes with a number of its own page styles (see
15128 Layout\SpecialChar \menuseparator
15129 Document\SpecialChar \menuseparator
15131 \begin_inset space ~
15137 If you want to use these for the chapter pages, you have to use the command
15144 in the main text or in preamble (e.
15145 \begin_inset space \thinspace{}
15149 \begin_inset space \space{}
15156 chapterstyle{companion}
15161 \begin_layout Description
15162 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15163 optional argument in the standard classes.
15164 With this, you can specify an alternative version of the title for the
15165 table of contents and the headers (for instance, if the title is too long).
15166 In LyX, you can do this via
15168 Insert\SpecialChar \menuseparator
15170 \begin_inset space ~
15175 at the beginning of a chapter/section.
15176 Memoir features a second optional argument and thus separates the table
15177 of contents from the header.
15178 You can define three variants of a title with this: one for the main text,
15179 one for the table of contents, and one for the headers.
15180 Simply insert two optional arguments if you need this feature, the first
15181 one containing the short title for the Table of Contents, the second one
15182 containing an alternative short title for the headers.
15185 \begin_layout Description
15186 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15187 of contents, the list of figures and the list of table start a new page
15189 Memoir does not follow this route.
15190 You have to insert a page break yourself, if you want to have one.
15193 \begin_layout Description
15194 Titlepage: For some unknown reason, Memoir uses pagination on the title
15195 page (in the standard classes, title pages are
15196 \begin_inset Quotes eld
15200 \begin_inset Quotes erd
15204 \begin_inset space \thinspace{}
15208 \begin_inset space \space{}
15212 If you want an empty title page, type
15216 aliaspagestyle{title}{empty}
15221 \begin_layout Description
15222 Article: With the class option
15228 Layout\SpecialChar \menuseparator
15229 Document\SpecialChar \menuseparator
15231 \begin_inset space ~
15236 ), you can emulate article style.
15237 That is, counters (footnotes, figures, tables etc.) will not be reset on
15238 new chapters, chapters don't start a new page (but are—in contrary to
15239 \begin_inset Quotes eld
15243 \begin_inset Quotes erd
15246 article classes—still allowed), parts, though, use their own page, as in
15250 \begin_layout Description
15251 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15252 font commands, which have been used in the old LaTeX version 2.09 (e.
15253 \begin_inset space \thinspace{}
15257 \begin_inset space \space{}
15273 It produces an error and stops LaTeX whenever such a command appears.
15278 reallows the commands and spits out warnings instead (which does at least
15280 Since a lot of packages and particularly BibTeX style files are still using
15281 those commands, we have decided to use this option by default.
15284 \begin_layout Subsection
15288 \begin_layout Standard
15289 We will only describe the features supported by LyX (which is not much currently
15291 Please consult the Memoir manual
15295 \begin_layout Plain Layout
15300 \begin_layout Plain Layout
15310 \begin_inset Flex URL
15313 \begin_layout Plain Layout
15315 CTAN:/macros/latex/memoir/memman.pdf
15328 \begin_layout Description
15329 Abstract: You may wonder why an abstract is an extra feature.
15330 Well, it is in book class.
15331 Usually books don't have abstracts.
15332 Memoir, however, has.
15333 You can use it wherever and how often you like.
15336 \begin_layout Description
15337 Chapterprecis: You may know this older typesetting style: The contents of
15338 a chapter are summarized below the title and also in the table of contents
15340 \begin_inset space \thinspace{}
15344 \begin_inset space \space{}
15349 Our hero arrives in Troia; he loses some friends; he finds others
15352 Chapterprecis does exactly this.
15353 It is therefore only sensible below a chapter.
15356 \begin_layout Description
15357 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15358 The epigraph environment provides an elegant way of typesetting such a
15360 The motto itself (text) and its author (source) are divided by a short
15362 Unfortunately, we have to fool LyX a bit here again, since the environment
15363 needs two arguments (text and source).
15364 In this case, we have to use curly brackets (in TeX mode) between the two
15375 <author of the slogan>.
15378 \begin_layout Description
15379 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15380 complex figurative poems).
15381 LyX can only support a few of them.
15382 One is poemtitle, which is a centered title for poems, which will also
15383 be added to the table of contents (verse is the standard environment for
15385 Memoir has some enhanced versions of verse, but you need to use TeX code,
15386 because they have to be nested inside regular verse environments, which
15387 is not possible with LyX).
15390 \begin_layout Description
15391 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15394 \begin_layout Section
15395 Article (mwart), book (mwbk) and report (mwrep)
15396 \begin_inset Argument
15399 \begin_layout Plain Layout
15412 \begin_layout Standard
15418 \begin_layout Standard
15419 The LyX document classes
15435 correspond to the LaTeX document classes
15448 They are replacements for the standard document classes
15460 , resp., and fit better to Polish typography conventions in a number of points.
15464 \begin_layout Standard
15468 \begin_layout Itemize
15469 Unnumbered titles (with star, e.
15470 \begin_inset space \thinspace{}
15474 \begin_inset space \space{}
15481 ) are added into table of contents,
15484 \begin_layout Itemize
15485 Additional page styles:
15489 \begin_layout Description
15490 uheadings header with separated lines,
15493 \begin_layout Description
15494 myheadings custom header, contents headers via commands:
15509 \begin_layout Description
15510 myuheadings custom header with separated lines,
15513 \begin_layout Description
15514 outer page number is placed on outer side of page
15518 \begin_layout Itemize
15523 \begin_layout Description
15524 rmheadings serif titles — default,
15527 \begin_layout Description
15528 sfheadings sansserif titles,
15531 \begin_layout Description
15532 authortitle on title page first placed is author next title — default,
15535 \begin_layout Description
15536 titleauthor on title page first placed is title next author,
15539 \begin_layout Description
15540 withmarginpar reserve place on page for margins.
15544 \begin_layout Section
15548 \begin_layout Standard
15553 provides an alternative to the standard
15558 It provides similar functionality, but you might prefer this layout with
15559 sans serif sections, headings, and more.
15562 \begin_layout Section
15566 \begin_layout Standard
15572 \begin_layout Standard
15573 \begin_inset VSpace bigskip
15579 \begin_layout Standard
15584 \begin_inset space ~
15589 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15590 \begin_inset Formula $\beta$
15593 release of May, 1999) class.
15596 \begin_layout Standard
15601 textclass, which works with RevTeX 3.1.
15602 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15603 That means that it doesn't interact very well with LyX, which requires
15604 LaTeX2e, although it has been kludged to work.
15605 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15609 \begin_inset space ~
15614 textclass should also be pretty easy to use.
15617 \begin_layout Standard
15618 These documents are supposed to be used in
15622 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15623 macros, and assume you'll know what to put in the preamble if necessary.
15626 \begin_layout Subsection
15630 \begin_layout Standard
15631 All you need to do is install RevTeX 4, as described in the package's README
15633 The package can be found at The RevTeX 4 Web Site
15634 \begin_inset Flex URL
15637 \begin_layout Plain Layout
15639 http://publish.aps.org/revtex4/
15645 Install it somewhere that LaTeX can see it.
15646 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15648 \begin_inset space \thinspace{}
15652 \begin_inset space \space{}
15655 not the directory where you installed the class file.) Then, if you reconfigure
15656 LyX, it will find the class file and let you use the RevTeX4 textclass.
15659 \begin_layout Standard
15660 Probably the easiest way to get started is either to import a RevTeX 4 document
15668 \begin_inset space ~
15673 template, found in the templates directory.
15676 \begin_layout Subsection
15680 \begin_layout Standard
15681 Optional arguments to
15688 \begin_inset Quotes eld
15692 \begin_inset Quotes erd
15696 \begin_inset Quotes eld
15700 \begin_inset Quotes erd
15710 \begin_inset space ~
15718 \begin_inset space ~
15724 Remember that in RevTeX, at least one optional argument is required!
15727 \begin_layout Standard
15728 Other preamble matter, like
15735 \begin_inset space ~
15741 \begin_inset space ~
15746 dialog, also as usual.
15749 \begin_layout Subsection
15753 \begin_layout Standard
15754 The layouts basically correspond to the commands in RevTeX4.0.
15755 For example, the Email layout corresponds to
15762 Note that (at least as of RevTeX 4.0 Beta), the
15770 layouts are exactly equivalent, so you shouldn't need to use both.
15774 \begin_layout Plain Layout
15775 In case you're curious, both were included so that
15779 would be able to translate both
15799 \begin_layout Subsection
15803 \begin_layout Standard
15804 There are a couple of important unique aspects of RevTeX 4 which might cause
15805 bugs that will be even more confusing in LyX.
15808 \begin_layout Standard
15826 The LyX equivalent is that there is a separate Thanks layout.
15831 write footnotes in the
15835 layout, or weird things may happen.
15836 See the RevTeX 4 documentation for more details.
15839 \begin_layout Standard
15843 \begin_inset space ~
15851 \begin_inset space ~
15860 layouts must be placed
15868 layout and the corresponding
15885 , the LaTeX won't compile.
15888 \begin_layout Subsection
15892 \begin_layout Standard
15893 The main problem with this layout is that you can't use the optional arguments
15894 to layouts like Email and Title.
15895 (The problem is not unique to this layout; you can't use optional arguments
15896 to the Section layouts either.) This means that after you export that file
15897 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15898 need to edit the LaTeX file with a text editor to add the optional arguments
15900 \begin_inset space \thinspace{}
15904 \begin_inset space \space{}
15907 the running title for the page headers.
15908 Lacking these layouts makes the
15914 (and the equivalent
15920 ) useless, so the corresponding layouts don't exist, and will have to be
15925 \begin_layout Plain Layout
15930 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15931 has not been updated yet to take advantage of it.
15939 \begin_layout Section
15940 Springer Journals (
15947 \begin_layout Standard
15953 \begin_layout Subsection
15957 \begin_layout Standard
15958 These are the layout files for some of the journal formats used by Springer
15959 Verlag and listed on
15960 \begin_inset Flex URL
15963 \begin_layout Plain Layout
15965 http://www.springer.de/author/tex/help-journals.html
15970 , where you should also go to fetch the class files (yes, these are LaTeX2e
15972 It is a modular system: the things common to all journals are implemented
15977 , which journal-specific layout files (such as, e.
15978 \begin_inset space \thinspace{}
15982 \begin_inset space \space{}
15989 for Journal of Geodesy) can include.
15992 \begin_layout Standard
15993 This means that implementing support for any other Springer journal on this
15994 list is as simple as writing your own
16002 file following the outline given in
16010 \begin_layout Standard
16011 It is reasonably well tested only for the Journal of Geodesy.
16020 come with the standard LyX distribution.
16021 Install the relevant class file (downloaded from Springer) in a proper
16022 directory, reconfigure LaTeX (in the teTeX case by running
16026 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
16027 and it should work.
16030 \begin_layout Subsection
16034 \begin_layout Standard
16035 A large number of theorem-like styles —
16041 \SpecialChar \ldots{}
16047 \begin_layout Standard
16050 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
16051 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16054 See the Springer class file documentation for details.
16057 \begin_layout Subsection
16061 \begin_layout Itemize
16073 \begin_layout Itemize
16076 Probability Theory and Related Fields
16082 — Jean-Marc Lasgouttes
16085 \begin_layout Standard
16086 Add your own, it isn't so hard!
16089 \begin_layout Subsection
16093 \begin_layout Standard
16094 These files are partly based on the older
16098 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16099 file from Springer.
16104 layout, are now defunct.
16105 Jean-Marc Lasgouttes helped out big in making me find my way around the
16106 LyX layout file mechanism.
16109 \begin_layout Subsection
16113 \begin_layout Standard
16115 But probably less than in the old hacked-LaTeX
16122 \begin_layout Standard
16124 \begin_inset space \thinspace{}
16127 g.: does not display the number for theorem-like layouts, just #.
16130 \begin_layout Section
16136 \begin_inset CommandInset label
16145 \begin_layout Standard
16153 \begin_layout Subsection
16157 \begin_layout Standard
16158 This section describes how to use LyX to make slides for overhead projectors.
16159 There are two document classes that can do this: the default slides class
16165 This section documents the former.
16168 \begin_layout Standard
16169 I'm going to say this again, nice and clear, so that there's no misunderstanding
16173 \begin_layout Standard
16174 \begin_inset VSpace bigskip
16180 \begin_layout Standard
16184 This section documents the class
16185 \begin_inset Quotes eld
16193 \begin_inset Quotes erd
16201 \begin_layout Standard
16202 \begin_inset VSpace bigskip
16208 \begin_layout Standard
16209 If you're looking for the documentation for
16210 \begin_inset Quotes eld
16218 \begin_inset Quotes erd
16221 , check out section
16222 \begin_inset space ~
16226 \begin_inset CommandInset ref
16228 reference "sec:foiltex"
16238 \begin_inset Quotes eld
16246 \begin_inset Quotes erd
16249 ] is actually somewhat better than the default
16257 \begin_layout Plain Layout
16258 \SpecialChar \ldots{}
16259 or so I've been told repeatedly by its advocates.
16260 Having never used it, I have no idea if this claim is true or not.
16265 which this section documents.
16268 \begin_layout Standard
16269 This class is the LaTeX2e improvement of the old
16274 Every LaTeX2e distribution includes this class [which I'll just refer to
16276 \begin_inset Quotes eld
16284 \begin_inset Quotes erd
16287 from now on], so you're bound to have it.
16288 As I noted earlier, there are other classes, such as
16292 , which also produce slides for overhead projectors and do a better job
16294 However, there are some things which
16298 can do which the others can't, such as generate overlays.
16299 Read on to learn more!
16302 \begin_layout Subsection
16304 \begin_inset CommandInset label
16306 name "sec:slidesetup"
16313 \begin_layout Standard
16314 Obviously, to use this document class, you need to select
16315 \begin_inset Quotes eld
16323 \begin_inset Quotes erd
16326 from the class list in the
16328 Document\SpecialChar \menuseparator
16332 There are some other special things you should know about this class:
16335 \begin_layout Itemize
16336 Don't bother changing the options
16341 They're not supported by the
16348 \begin_layout Itemize
16352 \begin_inset space ~
16357 behaves a bit differently for this class.
16358 The possible choices and what they do are as follows:
16362 \begin_layout Description
16367 The final output contains page numbers in the lower right corner.
16370 \begin_layout Description
16379 , but also prints out any time markers you've put in.
16380 This is the default.
16383 \begin_layout Description
16388 The final output contains no page numbers, time markers, or alignment markers.
16392 \begin_layout Itemize
16397 class has an extra option:
16403 \begin_inset Quotes eld
16411 \begin_inset Quotes erd
16414 in the extra class options.
16418 \begin_layout Standard
16419 Using this options allows you to add time markers to
16425 \begin_inset space ~
16429 \begin_inset CommandInset ref
16431 reference "sec:slideNote"
16439 \begin_layout Standard
16440 You can also use the template file
16441 \begin_inset Quotes eld
16449 \begin_inset Quotes erd
16452 to automatically set up a document to use the
16458 File\SpecialChar \menuseparator
16460 \begin_inset space ~
16464 \begin_inset space ~
16469 to open your new document].
16470 The template file also contains some examples of the special paragraph
16471 environments used by this class.
16472 I'll describe those next.
16475 \begin_layout Subsection
16476 Paragraph Environments
16479 \begin_layout Subsubsection
16480 Supported Environments
16483 \begin_layout Standard
16484 The first thing you'll notice when you start up a new
16488 document is the font size and type: it's the equivalent of the size
16489 \begin_inset Quotes eld
16497 \begin_inset Quotes erd
16503 \begin_inset space ~
16509 This is also what's used in the output.
16511 \begin_inset Quotes eld
16515 \begin_inset Quotes erd
16518 to remind you that this is a slide.
16519 Your final slides will use a larger font; ergo, you'll have less space.
16520 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16523 \begin_layout Standard
16524 The next thing that becomes obvious is the changes to the paragraph environment
16525 pull-down box [at the far-left end of the toolbar].
16526 Most of the paragraph environments you're used to seeing are missing.
16527 There are also five new ones.
16532 class itself only supports certain paragraph environments:
16535 \begin_layout Itemize
16541 \begin_layout Itemize
16547 \begin_layout Itemize
16553 \begin_layout Itemize
16559 \begin_layout Itemize
16565 \begin_layout Itemize
16571 \begin_layout Itemize
16577 \begin_layout Itemize
16583 \begin_layout Itemize
16589 \begin_layout Itemize
16595 \begin_layout Itemize
16601 \begin_layout Standard
16602 All of the other standard environments, including the section-heading environmen
16603 ts, aren't used in the
16610 \begin_layout Standard
16611 On the other hand, you'll notice the following new environments:
16614 \begin_layout Itemize
16620 \begin_layout Itemize
16626 \begin_layout Itemize
16632 \begin_layout Itemize
16638 \begin_layout Itemize
16644 \begin_layout Standard
16645 These five are kind of quirky, due to a
16646 \begin_inset Quotes eld
16650 \begin_inset Quotes erd
16654 You see, LyX doesn't permit you to nest any other paragraph environment
16655 into an empty environment.
16656 Now, that's fine and dandy, but it means that you wouldn't be able to start
16657 a slide with anything except plain text.
16658 To deal with this, I've performed a little
16659 \begin_inset Quotes eld
16663 \begin_inset Quotes erd
16669 \begin_layout Subsubsection
16670 Quirks of the New Environments
16671 \begin_inset CommandInset label
16673 name "sec:slideQuirk"
16680 \begin_layout Standard
16681 All five of the new paragraph environments are somewhat quirky due to inherent
16682 limitiations in the current version of LyX.
16683 As I just mentioned, LyX forbids environments that begin with another environme
16685 To get around this, the
16689 environment isn't a paragraph environment as described in the
16697 \begin_layout Standard
16698 You should consider
16711 \begin_inset Quotes eld
16714 pseudo-environments.
16715 \begin_inset Quotes erd
16718 They look like a section heading or a
16719 \begin_inset Quotes eld
16727 \begin_inset Quotes erd
16730 but really begin a [and, if necessary, end the previous] paragraph environment.
16740 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16747 These two perform some action.
16750 \begin_layout Standard
16751 A common feature of all five environments,
16771 , is a rather long-ish label.
16772 The text following this label — ordinarily the contents of the paragraph
16773 environment — is utterly irrelevant for
16794 LyX completely ignores it.
16795 In fact, you can leave these five environments completely empty.
16799 \begin_layout Standard
16804 to put any text after the rather long-ish label, you might want to.
16805 This could be a short description of the contents of the
16810 In that case, enter your descriptive comment and hit
16814 as you normally would.
16817 \begin_layout Standard
16818 If, on the other hand, you don't want to enter any descriptive text, you'll
16819 hit another LyX quirk.
16820 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16821 environment until you put something in the old one.
16825 \begin_layout Itemize
16826 Start entering the text that will
16854 \begin_layout Itemize
16855 Now move to the beginning of that paragraph.
16859 \begin_layout Itemize
16868 \begin_layout Itemize
16869 Finally, change this new, empty paragraph to a
16893 \begin_layout Standard
16894 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16898 \begin_layout Subsection
16899 Making a Presentation with
16912 \begin_layout Subsubsection
16920 \begin_layout Standard
16921 If you're expecting this section to teach you how to actually make a presentatio
16922 n, you'll be sorely disappointed.
16923 Naturally, I'll describe all of the ways the
16927 class can assist you in preparing the materials for a presentation.
16928 Filling in the contents, however, is up to you.
16933 the LyX philosophy.]
16936 \begin_layout Standard
16941 environment [in the manner described in section
16942 \begin_inset space ~
16946 \begin_inset CommandInset ref
16948 reference "sec:slideQuirk"
16952 ] tells LyX to begin a new slide [duh].
16953 The label for this environment/
16954 \begin_inset Quotes erd
16958 \begin_inset Quotes erd
16962 \begin_inset Quotes eld
16966 \begin_inset Quotes erd
16969 in cool blue, followed by the label,
16970 \begin_inset Quotes eld
16974 \begin_inset Quotes erd
16978 Any text or paragraph environments that follow this one go on the new slide.
16982 \begin_layout Standard
16983 Slides are probably the only time you'll need to forcibly end pages in LyX
16984 (this can be specified in the
16989 In fact, you'll want to, once you finish entering the contents of one slide.
16990 If you've entered more text than can physically fit on a slide, the extra
16991 overflows onto a new slide.
16992 I don't recommend doing this, however, since the overflow slide won't have
16993 any page number on it.
16994 Furthermore, it may interfere with any
16998 you've made to accompany the oversized
17005 \begin_layout Standard
17014 environments work the same way as the
17019 They both create an
17020 \begin_inset Quotes eld
17024 \begin_inset Quotes erd
17027 followed by a label [
17028 \begin_inset Quotes eld
17032 \begin_inset Quotes erd
17036 \begin_inset Quotes eld
17040 \begin_inset Quotes erd
17044 The color is a stunning magenta instead of blue, and the
17045 \begin_inset Quotes eld
17049 \begin_inset Quotes erd
17052 will look different, in style and in length.
17053 The label fonts of all three also differ from one another.
17056 \begin_layout Standard
17061 , if the contents of a
17069 exceed the physical size of a slide or sheet of paper, the extra will overflow
17071 Again, you should avoid this.
17072 It defeats the whole purpose of
17083 \begin_layout Subsubsection
17093 \begin_layout Standard
17098 is a slide that sits atop another slide.
17099 Perhaps you wish to discuss a figure on the main
17103 before displaying the text associated with it.
17104 One way to accomplish this is tape a flap of dark paper over the part of
17109 you want to display later.
17110 This method fails, however, if you wish to overlap one graph with another,
17112 You would then have to fumble while speaking to align the two separate,
17117 s to align the two graphs.
17122 environment in both cases makes life much easier.
17125 \begin_layout Standard
17130 receives the page number of its
17131 \begin_inset Quotes eld
17135 \begin_inset Quotes erd
17143 \begin_inset Quotes eld
17151 \begin_inset Quotes erd
17158 \begin_layout Plain Layout
17159 Presumably, mutliple
17164 \begin_inset Quotes eld
17172 \begin_inset Quotes erd
17176 \begin_inset Quotes eld
17184 \begin_inset Quotes erd
17188 \begin_inset Quotes eld
17196 \begin_inset Quotes erd
17200 \begin_inset space ~
17203 appended to the page number of the parent
17213 Clearly, you want the contents of both the
17221 to each fit on a single physical slide! You should probably consider an
17227 \begin_inset Quotes eld
17231 \begin_inset Quotes erd
17243 class provides a visual cue for this: the label at the start of an
17247 is shorter than that at the start of a
17252 Lastly, when you generate printable output, you'll find alignment markers
17253 in all four corners of both the
17257 page and its parent
17262 These will assist you in lining up the two physical slides.
17265 \begin_layout Standard
17266 The major problem in overlaying two slides is aligning the contents of the
17267 two transparencies.
17268 How much space should you leave for that graph on the second slide? Worse
17269 still, what if you want a graph and a sentence on second slide, but there
17270 is text on the main transparency that goes in between them? You could try
17271 and insert vertical space of the right size.
17272 The better way is to use
17283 \begin_layout Standard
17284 As their names imply,
17292 are two command-like paragraph environments that make all subsequent text
17293 invisible and visible, respectively.
17295 \begin_inset space ~
17299 \begin_inset CommandInset ref
17301 reference "sec:slideQuirk"
17305 that you don't place anything
17309 these two environments, however.
17314 , it inserts a centered, sky-blue label into the page reading
17315 \begin_inset Quotes eld
17318 <Invisible Text Follows>
17319 \begin_inset Quotes erd
17323 For paragraphs following this label, the parts of the
17331 ; it doesn't matter which] where they would be contain instead blank space.
17335 \begin_layout Standard
17340 , the corresponding centered label is
17341 \begin_inset Quotes eld
17344 <Visible Text Follows>
17345 \begin_inset Quotes erd
17349 Paragraphs following this label behave normally.
17350 Note that the beginning of a new
17362 automatically shuts off an
17367 It's therefore not necessary to use
17378 \begin_layout Standard
17379 By now, it should be obvious how to create overlay transparencies using
17380 the proper combination of
17399 \begin_layout Enumerate
17404 , including everything that will appear on it, whether on the main slide
17412 \begin_layout Enumerate
17413 Before each figure or paragraph that will appear only on the
17422 If necessary, insert a
17426 environment after the
17433 \begin_layout Enumerate
17438 immediately following the
17445 \begin_layout Enumerate
17446 Copy the contents of this
17457 \begin_layout Enumerate
17462 , change all of the
17473 \begin_layout Standard
17475 You've just made an
17482 \begin_layout Standard
17483 There's one problem with the way I've designed the LyX
17487 class: you can't make text in the middle of a paragraph invisible, nor
17488 make text in the middle of an invisible paragraph visible again.
17489 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17493 \begin_layout Plain Layout
17494 The commands of interest are:
17497 \begin_layout Itemize
17502 invisible \SpecialChar \ldots{}
17506 \begin_layout Itemize
17511 visible \SpecialChar \ldots{}
17515 \begin_layout Plain Layout
17516 \SpecialChar \ldots{}
17517 and need to be marked as TeX.
17519 \begin_inset Quotes eld
17523 \begin_inset Quotes erd
17526 you wish to change goes in between the brackets [and after the
17539 If you don't know how to mark text as TeX, see the appropriate section
17552 \begin_layout Subsubsection
17562 \begin_inset CommandInset label
17564 name "sec:slideNote"
17571 \begin_layout Standard
17580 is associated with a
17581 \begin_inset Quotes eld
17585 \begin_inset Quotes erd
17597 class provides visual cues.
17602 is shorter than that of a
17606 [yet longer than that of an
17610 ] and, like the label of an
17614 is shockingly magenta.
17615 Additionally, the printed
17619 has the page number of its
17620 \begin_inset Quotes eld
17624 \begin_inset Quotes erd
17632 \begin_inset Quotes eld
17640 \begin_inset Quotes erd
17644 \begin_inset Quotes eld
17652 \begin_inset Quotes erd
17656 \begin_inset Quotes eld
17664 \begin_inset Quotes erd
17668 You can have multiple
17672 s associated with a single
17684 , you'll probably want to break up long
17688 s so that they fit on a single sheet of paper.
17691 \begin_layout Standard
17696 is obvious: it contains anything additional you might want to say about
17702 It could also be used as a sheet of reminders for a particular
17707 In the case of the latter, you might want to make use of time markers.
17713 \begin_inset Quotes eld
17717 \begin_inset Quotes erd
17720 support for time markers, a
17725 So, you'll have to resort to using the LaTeX codes.
17728 \begin_layout Standard
17729 To use time markers, you'll need to specify the extra class option
17730 \begin_inset Quotes eld
17738 \begin_inset Quotes erd
17742 \begin_inset space ~
17746 \begin_inset CommandInset ref
17748 reference "sec:slidesetup"
17753 This option turns on timing marks, which will appear in the lower-left-hand
17759 To set what appears in the time marker, you use the LaTeX commands
17760 \begin_inset Quotes eld
17770 \begin_inset Quotes erd
17774 \begin_inset Quotes eld
17784 \begin_inset Quotes erd
17788 The arguments of both commands are time measured in seconds.
17790 \begin_inset Quotes eld
17800 \begin_inset Quotes erd
17803 sets the time marker to a given time.
17805 \begin_inset Quotes eld
17815 \begin_inset Quotes erd
17818 increments the time marker by the specified amount.
17819 Using time markers and
17823 s in this fashion, you can remind yourself how much time to spend on a particula
17831 \begin_layout Standard
17832 There's one last feature to describe.
17833 Clearly, you'd like to print out all of your
17841 s on transparencies while printing all of your
17858 with which it is associated.
17859 What's a person to do?
17862 \begin_layout Standard
17863 Luckily, there are two LaTeX commands that allow you to select what to print
17865 Both must be placed into the preamble of your document.
17867 \begin_inset Quotes eld
17879 \begin_inset Quotes erd
17882 will cause the output to contain only the
17891 Correspondingly, the command
17892 \begin_inset Quotes eld
17904 \begin_inset Quotes erd
17907 prevents the output of anything but
17912 I'd advise placing both commands in the preamble and initially comment
17914 You can then preview your entire presentation as you write.
17915 When you're done writing, you can then uncomment one of the two to select
17916 what you want to print.
17917 I like to uncomment
17918 \begin_inset Quotes eld
17930 \begin_inset Quotes erd
17933 , print to a file with
17934 \begin_inset Quotes eld
17942 \begin_inset Quotes erd
17945 in its name, comment it back out, then uncomment
17946 \begin_inset Quotes eld
17958 \begin_inset Quotes erd
17962 \begin_inset Quotes eld
17970 \begin_inset Quotes erd
17974 I can then send either file to a printer, loading transparencies or plain
17975 paper as appropriate.
17978 \begin_layout Standard
17979 You can also provide other arguments to the
17980 \begin_inset Quotes eld
17990 \begin_inset Quotes erd
17994 \begin_inset Quotes eld
18004 \begin_inset Quotes erd
18008 See a good LaTeX book for details.
18011 \begin_layout Subsection
18016 Class Template File
18019 \begin_layout Standard
18020 I have also provided a template file,
18021 \begin_inset Quotes eld
18029 \begin_inset Quotes erd
18037 To use it, begin your new presentation with
18042 ile\SpecialChar \menuseparator
18044 \begin_inset space ~
18048 \begin_inset space ~
18058 Your new LyX presentation file will contain an example
18079 additionally contain an example of the use of
18088 Lastly, the preamble will contain:
18091 \begin_layout LyX-Code
18092 % Uncomment to print out only slides and overlays
18095 \begin_layout LyX-Code
18099 \begin_layout LyX-Code
18105 \begin_inset Newline newline
18111 \begin_layout LyX-Code
18112 % Uncomment to print out only notes
18115 \begin_layout LyX-Code
18119 \begin_layout LyX-Code
18127 \begin_layout Standard
18128 One final thing: I created this class to support the LaTeX2e
18129 \begin_inset Quotes eld
18137 \begin_inset Quotes erd
18140 class, one of the built-in LaTeX2e classes.
18141 Neither I nor the rest of the LyX Team endorse or oppose the use of this
18142 built-in slide class.
18143 It's here if you want it or need it.
18144 There exist other LaTeX2e classes for creating presentations, such as the
18150 \begin_inset space ~
18154 \begin_inset CommandInset ref
18156 reference "sec:foiltex"
18161 \begin_inset Quotes eld
18169 \begin_inset Quotes erd
18172 package [present on some TeX distributions].
18173 The latter is not yet supported under LyX.
18177 \begin_layout Plain Layout
18178 Perhaps you can take on the task\SpecialChar \ldots{}
18184 I know nothing about these other classes.
18185 Try them out to see what sort of alternative they provide.
18188 \begin_layout Chapter
18189 LyX Features needing Extra Software
18192 \begin_layout Section
18196 \begin_layout Standard
18202 \begin_layout Subsection
18206 \begin_layout Standard
18215 \begin_layout Plain Layout
18220 is not yet available when you are using the LaTeX distribution MiKTeX.
18225 , you'll find in the
18232 \begin_inset space ~
18243 \begin_inset CommandInset href
18245 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18252 \begin_layout Standard
18257 package is a program that was written by
18258 \begin_inset Flex Noun
18261 \begin_layout Plain Layout
18263 \begin_inset space ~
18271 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18272 and easy to forget.
18273 The program runs over your LaTeX file, checks the integrity of the file,
18274 and flags some common errors.
18275 In other technical words, it is
18282 \begin_layout Standard
18283 Well, what is a syntax checker doing in LyX which is supposed to produce
18284 correct LaTeX anyways? The answer is simple: Just as
18288 not only checks the
18292 of C programs, but also does
18296 checks for type-errors,
18300 catches some common
18304 errors, in addition to the syntactical ones.
18309 is capable of detecting several common errors, such as
18312 \begin_layout Itemize
18313 Ellipsis detection:
18314 \begin_inset Newline newline
18317 Use \SpecialChar \ldots{}
18321 \begin_layout Itemize
18322 No space in front of/after parenthesis:
18323 \begin_inset Newline newline
18329 \begin_layout Itemize
18330 Enforcement of normal space after common abbreviations:
18331 \begin_inset Newline newline
18335 \begin_inset space \thinspace{}
18339 \begin_inset space \space{}
18342 is too wide spacing.
18345 \begin_layout Itemize
18346 Enforcement of end-of-sentence space when the last sentence ends with a
18348 \begin_inset Newline newline
18352 And this is wrong spacing.
18355 \begin_layout Itemize
18356 Space in front of labels and similar commands:
18357 \begin_inset Newline newline
18360 The label should stick right up to the text to avoid falling to a wrong
18363 \begin_inset CommandInset label
18373 \begin_layout Plain Layout
18374 This footnote is in danger of falling off to a wrong page
18379 The label is separated too much.
18382 \begin_layout Itemize
18383 Space in front of references, instead of hard spaces:
18384 \begin_inset Newline newline
18387 In you are in bad luck, the text will break right between the referenced
18388 text and reference number, and that's a pity.
18390 \begin_inset CommandInset ref
18392 reference "sec:chktex"
18399 \begin_layout Itemize
18401 \begin_inset Quotes eld
18405 \begin_inset Quotes erd
18409 \begin_inset Formula $\times$
18413 \begin_inset Newline newline
18416 2x2 looks cheap compared to
18417 \begin_inset Formula $2\times2$
18423 \begin_layout Standard
18424 and more \SpecialChar \ldots{}
18425 It is an invaluable tool when you are
18426 \begin_inset Quotes eld
18430 \begin_inset Quotes erd
18433 your document before printing, and you should run it right after the obligatory
18434 spelling check, and before you go fine tuning the typesetting.
18437 \begin_layout Subsection
18441 \begin_layout Standard
18442 If you have the program installed, usage is as simple as choosing
18444 Tools\SpecialChar \menuseparator
18446 \begin_inset space ~
18452 This will make LyX generate a LaTeX file of your document, start
18456 to check it, and then make LyX insert
18457 \begin_inset Quotes eld
18461 \begin_inset Quotes erd
18464 with the warnings from
18468 , if there were any.
18469 The warnings will be placed close to the point of the mistake, and you
18470 can quickly find them by using the
18472 Navigate\SpecialChar \menuseparator
18475 menu item, or the shortcut key
18484 Open the error boxes by clicking on them with the mouse, or use the shortcut
18493 bindings, or the corresponding
18502 Read the warning and correct the mistake, if it is a mistake.
18503 If you have trouble understanding what the warning is about, you can safely
18505 Remember that there is a hidden layer between the document on screen and
18506 the technical details in invoking
18510 , and this gap can make some warnings seem arcane or just right down plain
18514 \begin_layout Standard
18515 This document is an excellent testing bed for the feature, and it should
18516 provide quite a few warnings for you to fiddle with.
18517 Since computers are only so smart, expect most of the warnings to be false
18521 \begin_layout Subsection
18522 How to fine tune it
18525 \begin_layout Standard
18526 Sometimes, you'll find that
18530 makes more noise than suits your mood.
18531 Then you can choose not to use it, wait until your mood changes, or try
18536 to get better along with you.
18537 Another choice in the most desperate situations is to use
18539 View\SpecialChar \menuseparator
18541 \begin_inset space ~
18545 \begin_inset space ~
18549 \begin_inset space ~
18554 , which will get rid of all warnings instantly.
18557 \begin_layout Standard
18566 very configurable and extensible, you shouldn't expect to solve all problems
18572 Since LyX has to generate a somewhat special LaTeX file to be able to match
18573 the line numbers from the
18581 \begin_layout Plain Layout
18582 You can inspect the specific output from
18588 Edit\SpecialChar \menuseparator
18590 \begin_inset space ~
18594 \begin_inset space ~
18608 to the internal document structure, some of the warnings will not seen
18609 to appear correctly.
18610 There are two things you can do about this:
18613 \begin_layout Itemize
18618 invocation command line in
18634 installation configuration file (usually with the file
18639 See below to learn what warnings can be enabled and disabled on the command
18644 \begin_layout Itemize
18645 Export your document as a raw LaTeX file using
18647 File\SpecialChar \menuseparator
18648 Export\SpecialChar \menuseparator
18656 Invoked in this way, it can be a hassle to find the corresponding place
18657 in the document inside LyX, but with a little patience, you should be able
18661 \begin_layout Standard
18662 Here follows the warning messages that can be enabled and disabled in
18671 to disable a warning, and
18675 to enable a warning.
18676 The emphasized entries are disabled by default, because the default is
18679 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18684 \begin_layout Standard
18685 Notice that you should only use the options that enable and disable warnings,
18686 because LyX relies on some of the other command line parameters to be set
18687 in a specific way to have a chance to communicate with
18694 \begin_layout Enumerate
18698 Command terminated with space.
18701 \begin_layout Enumerate
18704 Non-breaking space (
18705 \begin_inset Quotes eld
18713 \begin_inset Quotes erd
18716 ) should have been used.
18719 \begin_layout Enumerate
18723 You should enclose the previous parenthesis with
18724 \begin_inset Quotes eld
18732 \begin_inset Quotes erd
18738 \begin_layout Enumerate
18741 Italic correction (
18742 \begin_inset Quotes eld
18752 \begin_inset Quotes erd
18755 ) found in non-italic buffer.
18758 \begin_layout Enumerate
18761 Italic correction (
18762 \begin_inset Quotes eld
18772 \begin_inset Quotes erd
18775 ) found more than once.
18778 \begin_layout Enumerate
18782 No italic correction (
18783 \begin_inset Quotes eld
18793 \begin_inset Quotes erd
18799 \begin_layout Enumerate
18803 \begin_inset Quotes eld
18811 \begin_inset Quotes erd
18815 \begin_inset Quotes eld
18823 \begin_inset Quotes erd
18829 \begin_layout Enumerate
18832 Wrong length of dash may have been used.
18835 \begin_layout Enumerate
18839 \begin_inset Quotes eld
18847 \begin_inset Quotes erd
18851 \begin_inset Quotes eld
18859 \begin_inset Quotes erd
18865 \begin_layout Enumerate
18869 \begin_inset Quotes eld
18877 \begin_inset Quotes erd
18883 \begin_layout Enumerate
18887 \begin_inset Quotes eld
18895 \begin_inset Quotes erd
18898 to achieve an ellipsis.
18901 \begin_layout Enumerate
18904 Inter-word spacing (
18905 \begin_inset Quotes eld
18915 \begin_inset Quotes eld
18918 ) should perhaps be used.
18921 \begin_layout Enumerate
18924 Inter-sentence spacing (
18925 \begin_inset Quotes eld
18935 \begin_inset Quotes erd
18938 ) should perhaps be used.
18941 \begin_layout Enumerate
18944 Could not find argument for command.
18947 \begin_layout Enumerate
18951 \begin_inset Quotes eld
18959 \begin_inset Quotes erd
18965 \begin_layout Enumerate
18968 Math mode still on at end of LaTeX file.
18971 \begin_layout Enumerate
18975 \begin_inset Quotes eld
18983 \begin_inset Quotes erd
18986 doesn't match the number of
18987 \begin_inset Quotes eld
18995 \begin_inset Quotes erd
19001 \begin_layout Enumerate
19004 You should use either
19007 \begin_inset Quotes eld
19015 \begin_inset Quotes erd
19020 as an alternative to
19021 \begin_inset Quotes eld
19029 \begin_inset Quotes erd
19035 \begin_layout Enumerate
19042 " (ASCII 39) instead of "
19049 \begin_layout Enumerate
19052 User-specified pattern found.
19055 \begin_layout Enumerate
19058 This command might not be intended.
19061 \begin_layout Enumerate
19068 \begin_layout Enumerate
19086 \begin_layout Enumerate
19089 Delete this space to maintain correct page references.
19092 \begin_layout Enumerate
19096 You might wish to put this between a pair of
19097 \begin_inset Quotes eld
19105 \begin_inset Quotes erd
19111 \begin_layout Enumerate
19114 You ought to remove spaces in front of punctuation.
19117 \begin_layout Enumerate
19120 Could not execute LaTeX command.
19123 \begin_layout Enumerate
19132 in front of small punctuation.
19135 \begin_layout Enumerate
19143 may look prettier here.
19146 \begin_layout Enumerate
19150 Multiple spaces detected in output.
19153 \begin_layout Enumerate
19156 This text may be ignored.
19159 \begin_layout Enumerate
19165 \begin_inset Quotes eld
19170 to begin quotation, not
19177 \begin_layout Enumerate
19184 to end quotation, not
19187 \begin_inset Quotes eld
19195 \begin_layout Enumerate
19201 \begin_layout Enumerate
19204 You should perhaps use
19205 \begin_inset Quotes eld
19213 \begin_inset Quotes erd
19219 \begin_layout Enumerate
19222 You should put a space in front of/after parenthesis.
19225 \begin_layout Enumerate
19228 You should avoid spaces in front of/after parenthesis.
19231 \begin_layout Enumerate
19235 You should not use punctuation in front of/after quotes.
19238 \begin_layout Enumerate
19241 Double space found.
19244 \begin_layout Enumerate
19247 You should put punctuation outside inner/inside display math mode.
19250 \begin_layout Enumerate
19253 You ought to not use primitive TeX in LaTeX code.
19256 \begin_layout Enumerate
19259 You should remove spaces in front of
19260 \begin_inset Quotes eld
19268 \begin_inset Quotes erd
19274 \begin_layout Enumerate
19277 \begin_inset Quotes eld
19285 \begin_inset Quotes erd
19288 is normally not followed by
19289 \begin_inset Quotes eld
19297 \begin_inset Quotes erd
19303 \begin_layout Standard
19304 In later versions of LyX, we hope to provide a more complete interface to
19305 this tool (and it's smaller cousin
19309 ) to exploit the full power of it.
19310 But it's not exactly useless as it is now: go try it on one of your existing
19311 documents of a certain length and be surprised.
19314 \begin_layout Section
19315 Version Control in LyX
19318 \begin_layout Standard
19321 Lars Gullik Bjønnes
19328 \begin_layout Subsection
19332 \begin_layout Standard
19333 A friend of mine wanted to try LyX for a group project.
19334 When he didn't find support for version control or file locking, he dropped
19336 This angered me a bit, so I thought that I should at least make support
19337 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19338 This has been done.
19339 LyX now supports some of the most basic RCS/CVS/SVN commands.
19340 If you need something a bit more sophisticated you will have to do that
19341 manually in a terminal.
19344 \begin_layout Standard
19345 Before you begin to use the version control features in LyX, you should
19346 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19347 Also note that CVS support is not as good as subversion support so we advice
19349 Good place to start with Subversion is SVN Book
19353 \begin_layout Plain Layout
19354 \begin_inset CommandInset href
19356 target "http://svnbook.red-bean.com/"
19366 In case of RCS you should read
19367 \begin_inset Quotes eld
19371 \begin_inset Quotes erd
19374 (a man file, read it with
19379 This file describes all the basic features of RCS.
19380 You should especially notice the comment about a RCS directory, and the
19381 notion of a master RCS file (the file ending in
19388 \begin_layout Standard
19389 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19390 package—no guarantees are made for older versions.
19391 Most of the log messages are not currently displayed after operations —
19392 you can check them in Messages pane if unsure.
19395 \begin_layout Standard
19396 For introducing your own external commands consult vc-command in the manual
19400 \begin_layout Subsection
19401 RCS commands in LyX
19404 \begin_layout Standard
19405 The following sections describe the RCS commands supported by LyX.
19406 You can find them in the
19408 File\SpecialChar \menuseparator
19410 \begin_inset space ~
19416 LyX was tested against RCS 5.7.
19419 \begin_layout Subsubsection
19425 \begin_layout Standard
19426 If your document is not under revision control, this is the only item shown
19428 And if it is under revision control, the
19432 item is not visible.
19436 \begin_layout Standard
19437 This command registers your document with RCS (unless you are under the
19438 directory managed by CVS)\SpecialChar \@.
19439 You are asked interactively to supply an initial
19440 description of the document.
19441 The document is now set in Read-Only mode and you have to
19444 \begin_inset space ~
19448 \begin_inset space ~
19452 \begin_inset space ~
19457 , before making any changes to it.
19458 A document under revision control has a
19459 \begin_inset Quotes eld
19462 [RCS:<version> <locker>]
19463 \begin_inset Quotes erd
19466 item tagged to the filename in the minibuffer.
19469 \begin_layout Standard
19470 RCS command that is run:
19472 ci -q -u -i -t-"<initial description>" <file-name>
19475 \begin_layout Standard
19480 to understand the switches.
19484 \begin_layout Subsubsection
19490 \begin_layout Standard
19491 When you are finished editing a file, you check in your changes.
19492 When you do this, you are asked for a description of the changes.
19493 This is stored in the history log.
19494 The version number is bumped, your changes are applied to the master RCS
19495 file, the document is unlocked and set to Read-Only mode.
19499 \begin_layout Standard
19502 ci -q -u -m"<description>" <file-name>
19505 \begin_layout Subsubsection
19511 \begin_layout Standard
19512 By doing this you lock the document so that only you can edit it.
19513 This will also make the document Read-Write only for you.
19514 You will usually continue editing for a while and when you are finished
19515 you check in your changes.
19516 The status line is changed to reflect that you have locked the file.
19520 \begin_layout Standard
19523 co -q -l <file-name>
19526 \begin_layout Subsubsection
19529 Revert To Repository Version
19532 \begin_layout Standard
19533 This will discard all changes made to the document since the last check
19535 You get a warning before changes are discarded.
19538 \begin_layout Standard
19541 co -f -u<version> <file-name>
19544 \begin_layout Subsubsection
19550 \begin_layout Standard
19551 This makes as if the last check in never happened.
19552 No changes are made to the document loaded into LyX, but the last version
19553 is removed from the master RCS file.
19557 \begin_layout Standard
19560 rcs -o<version> <file-name>
19563 \begin_layout Subsubsection
19569 \begin_layout Standard
19570 This shows the complete history of the RCS document.
19575 is shown in a browser.
19583 \begin_layout Subsubsection
19587 \begin_layout Standard
19588 LyX supports RCS version number information (only), see
19589 \begin_inset CommandInset ref
19591 reference "sub:VCS-Revision-Information"
19598 \begin_layout Subsection
19599 CVS commands in LyX
19602 \begin_layout Standard
19603 A subset of CVS operations is supported by LyX.
19604 You can find the commands in the
19606 File\SpecialChar \menuseparator
19608 \begin_inset space ~
19614 The version control system SVN is more powerful, so please use it instead
19615 of CVS if possible.
19618 \begin_layout Subsubsection
19624 \begin_layout Standard
19625 If you start from scratch with CVS you have to create your repository and
19626 checkout the working copy with external tools.
19627 If you're using a client-server setup you may need to login before doing
19628 the first repository checkout.
19631 \begin_layout Standard
19632 If your documents are under revision control and others are using the same
19633 repository problems arise when different changes to the same document at
19634 the same location happen.
19635 Standard CVS repositories doesn't operate with a file locking mechanism.
19636 This may be surprising, but conflicts only occur if people disagree on
19637 the proper content of the same part of a document.
19638 So, if co-workers are used to communicate regularly, these conflicts occur
19640 If they don't communicate they have a fundamental problem anyway.
19641 Nevertheless some people like to work with so called
19642 \begin_inset Quotes eld
19646 \begin_inset Quotes erd
19650 If they do so the working copy of all files is readonly when checked out
19651 first and the user starts editing after using a special command to make
19652 the working copy writable.
19653 When the changes are checked in the working copy returns to readonly state.
19654 With LyX one has to edit the
19655 \begin_inset Flex Code
19658 \begin_layout Plain Layout
19664 file and add the line
19665 \begin_inset Flex Code
19668 \begin_layout Plain Layout
19674 to work with reserved checkouts.
19675 The benefit is the possibility to see who is using a writable copy of some
19677 It's not guaranteed only one user makes a copy writable.
19680 \begin_layout Standard
19681 LyX tries to guess if you're using reserved or non-reserved checkouts.
19682 If your working copy is readonly or it is writable and an additional copy
19683 of your document exists in the CVS/Base sub-directory a reserved otherwise
19684 a non-reserved checkout is assumed.
19685 When a reserved checkout is detected you have to use
19686 \begin_inset Flex MenuItem
19689 \begin_layout Plain Layout
19695 to make your working copy writable if it's readonly.
19697 \begin_inset Flex MenuItem
19700 \begin_layout Plain Layout
19706 operation is possible and that makes your working copy readonly again after
19707 transferring your changes to the repository.
19710 \begin_layout Standard
19711 More information about CVS can be found here
19712 \begin_inset Flex URL
19715 \begin_layout Plain Layout
19717 http://www.nongnu.org/cvs
19723 \begin_inset Flex URL
19726 \begin_layout Plain Layout
19728 http://ximbiot.com/cvs
19736 \begin_layout Standard
19741 to understand the sub-commands and the switches mentioned below.
19744 \begin_layout Subsubsection
19750 \begin_layout Standard
19751 If your document is not under revision control, this is the only item shown
19753 And if it is under revision control, the
19760 item is not visible.
19764 \begin_layout Standard
19765 This command registers in CVS your document
19766 \begin_inset Flex Strong
19769 \begin_layout Plain Layout
19777 in case you have already the documents directory under CVS control (in
19783 This means you have to create or checkout the archive by yourself using
19785 (In case you forget that step LyX registers the document with RCS.)
19788 \begin_layout Standard
19789 Then you are asked interactively to supply an initial description of the
19791 Don't forget that registered file is not yet checked in.
19794 \begin_layout Standard
19795 CVS command that is run:
19797 cvs -q add -m"<entered message>" "<file-name>"
19800 \begin_layout Standard
19805 above and for all other CVS commands is an abbreviation for
19806 \begin_inset Quotes eld
19809 change the current working directory to file location and use the file name
19810 without path component as argument
19811 \begin_inset Quotes erd
19817 \begin_layout Subsubsection
19823 \begin_layout Standard
19824 When you are finished editing a file, you commit your changes.
19825 When you do this and you had changed the document, you are asked for a
19826 description of the changes.
19827 After that changes are written to the repository.
19828 In case you didn't change the document and a reserved checkout is detected
19829 the reservation made on
19830 \begin_inset Flex MenuItem
19833 \begin_layout Plain Layout
19842 \begin_layout Labeling
19843 \labelwidthstring 00.00.0000
19845 \begin_inset space ~
19849 \begin_inset space ~
19853 \begin_inset Newline newline
19857 \begin_inset Flex Code
19860 \begin_layout Plain Layout
19863 -q commit -m"<description>" "<file-name>"
19869 \begin_inset Newline newline
19873 \begin_inset Flex Code
19876 \begin_layout Plain Layout
19887 \begin_layout Subsubsection
19893 \begin_layout Standard
19894 When you are sharing a repository with others, you may have to incorporate
19895 their changes into your working copy.
19898 \begin_layout Standard
19901 cvs -q update "<file-name>"
19904 \begin_layout Standard
19905 If a readonly checkout is detected the working copy is made writable and
19909 \begin_layout Standard
19912 cvs -q edit "<file-name>"
19915 \begin_layout Subsubsection
19918 Revert To Repository Version
19921 \begin_layout Standard
19922 This will discard all changes made to the document since the last check
19924 You get a warning before changes are discarded.
19925 Firstly the file is deleted, secondly CVS update command is run.
19928 \begin_layout Standard
19931 cvs -q update "<file-name>"
19934 \begin_layout Standard
19935 If a reserved checkout is detected and the working copy has no changes only
19936 the reservation is undone.
19939 \begin_layout Standard
19942 cvs -q unedit "<file-name>"
19945 \begin_layout Subsubsection
19946 Update of the local directory checkout from repository
19949 \begin_layout Standard
19950 Once your documents gets more complex, containing sub-documents and pictures,
19952 \begin_inset Flex Code
19955 \begin_layout Plain Layout
19961 files and so on using version control becomes more complicated.
19962 LyX supports updating the whole tree in which resides the document.
19963 This become especially useful once you cooperate with people which neither
19964 have detailed knowledge about CVS usage nor they have ambition to commit
19965 additional material to the repository.
19966 You have to organize the files structure so that all external files are
19967 in the same directory or subdirectories of the document.
19968 It's good practice anyway to store multipart documents in an extra directory.
19971 \begin_layout Standard
19973 \begin_inset Flex Code
19976 \begin_layout Plain Layout
19977 Update local directory from repository
19982 command updates the whole directory.
19983 If local changes are detected user is warned before update starts.
19984 In case of merge conflicts both versions of the conflicting document parts
19985 are placed in the final document.
19986 You have to review and correct the result of the merge.
19987 You'll find the conflicts enclosed in pairs of
19988 \begin_inset Flex Code
19991 \begin_layout Plain Layout
19998 \begin_inset Flex Code
20001 \begin_layout Plain Layout
20008 \begin_inset Flex Code
20011 \begin_layout Plain Layout
20018 The first part is your version as before the update operation with the
20019 document name prepended.
20020 The second one is the repository version with the version number after
20022 \begin_inset Flex Code
20025 \begin_layout Plain Layout
20034 \begin_layout Labeling
20035 \labelwidthstring 00.00.0000
20037 \begin_inset space ~
20041 \begin_inset space ~
20045 \begin_inset Newline newline
20049 \begin_inset Flex Code
20052 \begin_layout Plain Layout
20060 (Ask if changes are detected.)
20061 \begin_inset Newline newline
20065 \begin_inset Flex Code
20068 \begin_layout Plain Layout
20069 cd $path; cvs -q update
20079 \begin_layout Standard
20081 \begin_inset Flex Code
20084 \begin_layout Plain Layout
20090 stands for the path to the document.
20093 \begin_layout Subsubsection
20099 \begin_layout Standard
20100 This shows the complete history of the CVS document.
20103 cvs log "<file-name>"
20105 is shown in a browser.
20108 \begin_layout Subsection
20109 SVN commands in LyX
20112 \begin_layout Standard
20113 SVN is now partially supported by LyX.
20114 You can find the commands in the
20116 File\SpecialChar \menuseparator
20118 \begin_inset space ~
20124 Please note that if you use password protected access to repository via
20125 ssh, you will be asked in terminal window.
20126 LyX was tested against SVN 1.5 and 1.6
20130 \begin_layout Plain Layout
20131 Most of the commands will work with 1.4 too, see
20132 \begin_inset CommandInset ref
20134 reference "sub:SVN-Repo-Update"
20146 \begin_layout Subsubsection
20152 \begin_layout Standard
20153 If your document is not under revision control, this is the only item shown
20155 And if it is under revision control, the
20162 item is not visible.
20166 \begin_layout Standard
20167 This command registers in SVN your document ONLY in case you have already
20168 the documents directory under SVN control (in particular
20173 This means you have to checkout the archive by yourself.
20177 \begin_layout Standard
20178 Then you are asked interactively to supply an initial description of the
20180 Don't forget that registered file is not yet commited.
20183 \begin_layout Standard
20184 SVN command that is run:
20187 \begin_inset Quotes eld
20191 \begin_inset Quotes erd
20197 \begin_layout Standard
20202 to understand the switches.
20206 \begin_layout Subsubsection
20212 \begin_layout Standard
20213 When you are finished editing a file, you commit your changes.
20214 When you do this, you are asked for a description of the changes.
20215 After that changes are commited.
20218 \begin_layout Standard
20223 \begin_layout Plain Layout
20224 In case locking is not enabled.
20226 \begin_inset CommandInset ref
20228 reference "subsec:SVN-File-Locking"
20239 svn commit -q -m"<description>" <file-name>
20242 \begin_layout Subsubsection
20248 \begin_layout Standard
20249 Updates the changes of this file from the repository.
20250 Be sure you understand SVN merging and conflicts resolving before using
20251 this function, because all conflicts has to be resolved manually by you!
20254 \begin_layout Standard
20259 \begin_layout Plain Layout
20267 svn update --non-interactive
20268 \begin_inset Quotes eld
20272 \begin_inset Quotes erd
20278 \begin_layout Subsubsection
20281 Revert To Repository Version
20284 \begin_layout Standard
20285 This will discard all changes made to the document since the last check
20287 You get a warning before changes are discarded.
20291 \begin_layout Standard
20295 \begin_inset Quotes eld
20299 \begin_inset Quotes erd
20305 \begin_layout Subsubsection
20306 \begin_inset CommandInset label
20308 name "sub:SVN-Repo-Update"
20312 Update of the local directory checkout from repository
20316 \begin_layout Plain Layout
20317 Note that this command will work only with subversion
20318 \begin_inset Formula $\geqq1.5$
20329 \begin_layout Standard
20330 All the commands above have one shortcomming - they deal with the current
20332 Once your document contains pictures, includes external
20333 \begin_inset Flex Code
20336 \begin_layout Plain Layout
20342 files and so on administration becomes more complicated.
20343 LyX now supports updating the whole tree in which resides the document
20347 \begin_layout Plain Layout
20348 One need to organize the files structure so that all external files are
20349 in the same directory or subdirectories of the document.
20356 This become especially useful once you cooperate with people which neither
20357 know about subversion management nor they have ambition to commit additional
20358 material to the repository.
20362 \begin_layout Standard
20363 \begin_inset Flex Code
20366 \begin_layout Plain Layout
20367 Update local directory from repository
20372 command updates the whole directory and in case of merge conflicts local
20373 version of the files are left, so no unintended data loss occurs.
20374 If local changes are detected user is warned before update starts.
20377 \begin_layout Labeling
20378 \labelwidthstring 00.00.0000
20380 \begin_inset space ~
20384 \begin_inset space ~
20388 \begin_inset Newline newline
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20401 (Ask if changes are detected.)
20402 \begin_inset Newline newline
20406 \begin_inset Flex Code
20409 \begin_layout Plain Layout
20410 svn update --accept mine-full $path
20418 \begin_layout Standard
20420 \begin_inset Flex Code
20423 \begin_layout Plain Layout
20429 stands for the path to the document.
20432 \begin_layout Subsubsection
20438 \begin_layout Standard
20439 This shows the complete history of the SVN document.
20443 \begin_inset Quotes eld
20447 \begin_inset Quotes erd
20452 is shown in a browser.
20455 \begin_layout Subsubsection
20457 \begin_inset CommandInset label
20459 name "subsec:SVN-File-Locking"
20466 \begin_layout Standard
20467 The file exchange through various revision control systems brings the problem
20468 of merge conflicts in case two different users try to edit the same (parts
20470 When such a conflict happens it needs manual resolving and one reasonable
20471 alternative is to provide some kind of locking mechanism, which guarantees
20472 that only one user is allowed to edit file at the given time.
20475 \begin_layout Standard
20476 SVN has two such mechanisms to provide mutual exclusivity for file access
20477 - locks and automatic setting of write permissions (see sec.
20479 \begin_inset CommandInset ref
20481 reference "subsec:Automatical-Locking-Property"
20486 \begin_inset Flex Code
20489 \begin_layout Plain Layout
20499 \begin_layout Plain Layout
20500 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20506 If this property is detected for a given document LyX starts to use SVN
20507 locks for document editing automatically and the whole check-in/out mechanism
20508 switches to the same regimen as for RCS.
20509 This in particular means there are two different modes of file use in LyX:
20512 \begin_layout Itemize
20514 The loaded file is in the read-only mode.
20515 For editing on needs to check-out.
20520 consists of updating from the repository and gaining write lock.
20521 If the lock is not possible to obtain, we remain in unlocked state.
20524 \begin_layout Itemize
20526 The loaded file is in the 'normal' edit mode.
20527 No other user is allowed to edit the file.
20532 consists of commiting changes and releasing write-lock.
20533 If no changes have been made to the document, no commit will be produced
20537 \begin_layout Plain Layout
20538 Don't be puzzled by the fact that you will be asked for commit message anyway.
20543 and only the write-lock will be released.
20546 \begin_layout Standard
20550 \begin_layout Labeling
20551 \labelwidthstring 00.00.0000
20554 svn commit -q -m"<description>" "<file-name>"
20555 \begin_inset Newline newline
20558 svn unlock "<file-name>"
20561 \begin_layout Labeling
20562 \labelwidthstring 00.00.0000
20565 svn update "<file-name>"
20566 \begin_inset Newline newline
20569 svn lock "<file-name>"
20572 \begin_layout Subsubsection
20575 \begin_inset CommandInset label
20577 name "subsec:Automatical-Locking-Property"
20583 Automatic Locking Property
20586 \begin_layout Standard
20587 The above mentioned automatic setting of write permissions of the .lyx file
20593 ile\SpecialChar \menuseparator
20599 \begin_inset space ~
20602 Control\SpecialChar \menuseparator
20607 oggle locking property
20610 This command is active only when the file is not locked on the svn server
20612 you need to check-out before proceeding).
20615 \begin_layout Labeling
20616 \labelwidthstring 00.00.0000
20618 \begin_inset space ~
20624 \begin_layout Labeling
20625 \labelwidthstring 00.00.0000
20628 svn propset svn:needs-lock ON "<file-name>"
20631 \begin_layout Labeling
20632 \labelwidthstring 00.00.0000
20635 svn propdel svn:needs-lock "<file-name>"
20638 \begin_layout Subsubsection
20639 \begin_inset CommandInset label
20641 name "sub:VCS-Revision-Information"
20645 Revision Information in Documents
20648 \begin_layout Standard
20649 There are more possibilities how to activate revision information in our
20653 \begin_layout Itemize
20654 LyX supports directly:
20658 \begin_layout Itemize
20659 tree revision information (
20660 \begin_inset Flex Code
20663 \begin_layout Plain Layout
20670 The result is the output of the
20671 \begin_inset Flex Code
20674 \begin_layout Plain Layout
20680 command, the following table gives you an idea, how to read the results.
20683 \begin_layout Standard
20685 \begin_inset Tabular
20686 <lyxtabular version="3" rows="6" columns="2">
20687 <features tabularvalignment="middle">
20688 <column alignment="center" valignment="top" width="0">
20689 <column alignment="center" valignment="top" width="0">
20691 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20694 \begin_layout Plain Layout
20700 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20703 \begin_layout Plain Layout
20711 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20714 \begin_layout Plain Layout
20720 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20723 \begin_layout Plain Layout
20724 mixed revision working copy
20731 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20734 \begin_layout Plain Layout
20740 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20743 \begin_layout Plain Layout
20744 modified working copy
20751 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20754 \begin_layout Plain Layout
20760 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20763 \begin_layout Plain Layout
20764 switched working copy
20771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20774 \begin_layout Plain Layout
20780 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20783 \begin_layout Plain Layout
20784 partial working copy, from a sparse checkout
20791 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20794 \begin_layout Plain Layout
20800 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20803 \begin_layout Plain Layout
20804 mixed revision, modified, switched working copy
20817 \begin_layout Itemize
20818 file revision information.
20819 The result comes from parsing the output of
20820 \begin_inset Flex Code
20823 \begin_layout Plain Layout
20825 \begin_inset space ~
20829 \begin_inset space ~
20833 \begin_inset space ~
20842 Supported flags are:
20846 \begin_layout Itemize
20847 version number of the last commit (
20848 \begin_inset Flex Code
20851 \begin_layout Plain Layout
20860 \begin_layout Itemize
20861 author of the last commit (
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20874 \begin_layout Itemize
20875 date of the last commit (
20876 \begin_inset Flex Code
20879 \begin_layout Plain Layout
20888 \begin_layout Itemize
20889 time of the last commit (
20890 \begin_inset Flex Code
20893 \begin_layout Plain Layout
20903 \begin_layout Standard
20904 You can obtain this info via InsetInfo (e.g.
20906 \begin_inset Flex Code
20909 \begin_layout Plain Layout
20910 info-insert buffer vcs-date
20916 The information will be available only when you have the file stored under
20917 svn managment (i.e.
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20928 directory is available with your document).
20932 \begin_layout Itemize
20933 Another---a hacking one---possibility is to use svn keywords
20937 \begin_layout Plain Layout
20938 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20944 In short -- you set file keywords property (e.g.
20947 svn propset svn:keywords 'Rev' file.lyx
20949 ) and then paste keyword TeX code
20953 \begin_layout Plain Layout
20954 This is an easy way how to ensure that LyX won't break the line in the middle
20960 tag in your document (e.g.
20965 \begin_layout Plain Layout
20973 This way svn client will automatically substitute revision number (e.g.
20978 \begin_layout Plain Layout
20985 ) after each update and commit.
20986 There are more problems with this approach.
20987 Firstly, the '$' character is used in TeX world for math equations, so
20988 any occurence of math formula
20989 \begin_inset Formula $Rev$
20993 \begin_inset Formula $Rev:59$
20996 in your LyX document.
20997 Similarly for other keywords like Id, Date, Author, etc.
20998 Secondly svn output is dependent on your locales, so its very easy that
20999 svn would produce some problematic strings once Date is used.
21000 Thirdly you get the whole 'Rev: 59' string in your document instead of
21002 Until subversion implements user's custom keywords it will be hard to use
21003 this approach reliably or let LyX to support it directly.
21006 \begin_layout Subsection
21007 SVN and Windows Environment
21010 \begin_layout Quote
21011 My inclination is to say that if the user cannot figure out the command
21012 line operations on their own fairly quickly, they would be well advised
21013 to use TortoiseSVN.
21019 \begin_layout Subsubsection
21023 \begin_layout Standard
21024 In addition to installing LyX, and having access to a Subversion repository,
21025 the user will need to install the Subversion client program.
21026 A Windows installer for the client program is available from
21027 \begin_inset CommandInset href
21030 target "http://www.collab.net/nonav/downloads/subversion/"
21035 The user may also want to install
21036 \begin_inset CommandInset href
21039 target "http://tortoisesvn.tigris.org/"
21043 , which integrates Subversion operations into the context (rightclick) menu
21044 of Windows Explorer.
21045 Operations done outside LyX will typically be more convenient using the
21046 Explorer context menu.
21047 Note that TortoiseSVN is not a replacement for the client program, which
21048 is what LyX itself will use.
21051 \begin_layout Subsubsection
21052 Bringing a document under Subversion control
21055 \begin_layout Standard
21056 Before a LyX document can be brought under version control in Subversion,
21057 its parent directory needs to be under version control.
21058 If the document is being added to a project already in the repository,
21059 this is accomplished by checking the project out to the directory where
21060 the new document will be placed.
21061 If the project itself is not yet under version control (for instance, if
21062 this document starts a new project), the directory must be imported into
21064 This is done outside LyX.
21065 Both import and checkout are easily accomplished from the Explorer context
21066 menu using TortoiseSVN, or alternatively can be done using the command
21067 line client at a DOS prompt.
21068 The procedure for importing the project using TortoiseSVN is described
21069 below, assuming an existing repository and a new project being started
21077 For information on using the Subversion client program, run
21084 \begin_layout Enumerate
21091 in Windows Explorer, right click it, and select
21093 TortoiseSVN > Repo-browser
21096 If necessary, adjust the URL for the repository, then click OK.
21099 \begin_layout Enumerate
21100 Right click the level of the repository under which you want to place the
21101 new project folder (typically the top level) and click
21103 Create folder\SpecialChar \ldots{}
21106 Supply a name for the project folder and click OK.
21107 Add a message for the log file if desired, then click OK again.
21108 The new project folder should appear in the repository.
21109 Finally, click OK again to exit the repository browser.
21112 \begin_layout Enumerate
21113 Once again right click
21119 , this time selecting SVN Checkout\SpecialChar \ldots{}
21120 Select the URL of the project folder
21121 you just created in the repository, and set the checkout directory to
21129 You will be warned about a non-empty folder; click OK to proceed.
21130 You should now have a
21141 \begin_layout Enumerate
21142 Create or open your document in LyX and click
21147 ile\SpecialChar \menuseparator
21153 \begin_inset space ~
21156 Control\SpecialChar \menuseparator
21164 Add a log message and click OK to commit the document to version control.
21167 \begin_layout Standard
21168 From this point onward, you should have full functionality in the
21173 ile\SpecialChar \menuseparator
21179 \begin_inset space ~
21185 You also have the option of checking the document in and out, viewing its
21187 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21188 client program from a command prompt.
21191 \begin_layout Subsubsection
21192 SSH tunnel used with SVN under Windows
21195 \begin_layout Standard
21196 Compared with Linux setting up svn client to communicate over ssh under
21197 Windows is a rather troublesome task.
21198 We will at least offer some hints how to setup the client side but prior
21199 knowledge about ssh and the Windows command line is needed, also be prepared
21200 for a great deal of frustration\SpecialChar \ldots{}
21204 \begin_layout Enumerate
21205 Get a svn client for windows, as described in the previous sections.
21206 When it is a fresh install run some svn command (e.g.
21208 \begin_inset Flex Code
21211 \begin_layout Plain Layout
21217 ) to create config files, which you will need to change later on.
21220 \begin_layout Enumerate
21221 Choose a ssh client for Windows.
21222 There are several possibilities, we will use the one from Putty tools
21226 \begin_layout Plain Layout
21227 \begin_inset Flex URL
21230 \begin_layout Plain Layout
21232 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21243 You will need to set the connection up so that the client doesn't ask for
21244 any password from you.
21245 To keep things easy we will use only keys without any additional password
21250 \begin_layout Enumerate
21252 \begin_inset Flex Code
21255 \begin_layout Plain Layout
21262 Save your private .ppk key file and put the public one on the server side.
21263 If the SVN server runs on Linux, note that the format of the public key
21264 is not compatible with Linux openssh and you will need to direcly copy-paste
21267 Public key for pasting into OpenSSH authorized_keys file
21269 :” edit field into the server's
21270 \begin_inset Flex Code
21273 \begin_layout Plain Layout
21274 ~/.ssh/authorized_keys
21280 \begin_inset Flex Code
21283 \begin_layout Plain Layout
21292 \begin_layout Enumerate
21294 \begin_inset Flex Code
21297 \begin_layout Plain Layout
21304 In the SVN config file
21308 \begin_layout Plain Layout
21309 Exact path depends on Windows version, usually somewhere around
21310 \begin_inset Flex Code
21313 \begin_layout Plain Layout
21316 Documents and Settings
21330 \begin_inset Flex Code
21333 \begin_layout Plain Layout
21348 , section [tunnels], setup ssh command, e.g.
21350 \begin_inset Flex Code
21353 \begin_layout Plain Layout
21354 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21363 \begin_layout Plain Layout
21364 It will usually take a lot of time to get exact command right and it depends
21366 For example do not have some remote server saved as a default session in
21368 If things fail, try to connect via plink without SVN first.
21377 \begin_layout Enumerate
21378 Checkout the SVN archive, e.g.
21380 \begin_inset Flex Code
21383 \begin_layout Plain Layout
21384 svn co svn+ssh://user@server/repository_path
21392 \begin_layout Subsubsection
21393 End-of-Line Conversions
21396 \begin_layout Standard
21397 When the collsraborators are mixing Linux and Windows environments, LyX
21398 will use different line endings inside the .lyx files.
21399 This is not a problem as far as LyX functionality is concerned, but the
21400 commit diffs will be huge and merge-conflicts prone.
21401 Fortunately SVN itself knows
21405 \begin_layout Plain Layout
21406 \begin_inset Flex URL
21409 \begin_layout Plain Layout
21411 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21421 how to deal with CR/LF problems when switching .lyx files to the
21422 \begin_inset Flex Code
21425 \begin_layout Plain Layout
21435 \begin_layout Plain Layout
21437 \begin_inset Flex Code
21440 \begin_layout Plain Layout
21441 svn propset svn:eol-style native FILE_NAME
21454 \begin_layout Subsection
21458 \begin_layout Standard
21459 With the recent addition of the vc-command function LyX power users are
21460 allowed to create their own commands for revision control.
21463 \begin_layout Standard
21464 As an example you can see how two TortoiseSVN commands could be integrated
21468 \begin_layout Description
21470 \begin_inset Flex Code
21473 \begin_layout Plain Layout
21474 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21482 \begin_layout Description
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21488 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21496 \begin_layout Subsection
21497 Version control and Document comparison
21500 \begin_layout Standard
21501 One of the typical uses of version control is to inspect the changes between
21502 revisions, usually by creating
21503 \begin_inset Flex Code
21506 \begin_layout Plain Layout
21513 While this is useful for plain text files, it is much less useful in the
21514 case of LyX files, which have more complicated structure.
21515 Hence we provide binding to the Document comparison feature.
21516 They are two ways of calling this feature - either by direct call of
21517 \begin_inset Flex Code
21520 \begin_layout Plain Layout
21526 LyX function (for details see LyX functions manual) or by icon/menu item
21528 \begin_inset Flex MenuItem
21531 \begin_layout Plain Layout
21532 Compare with older revision...
21538 One can either compare two chosen revisions of the document or he can simply
21539 compare the current version of edited text with older revisions (where
21541 \begin_inset Flex MenuItem
21544 \begin_layout Plain Layout
21550 ' revisions back means comparison of the edited file with last commited
21555 \begin_layout Standard
21556 This feature is supported for SVN and RCS though due to the more complicated
21557 versioning scheme of RCS there is a constraint -- when addressing the revisions
21558 in dialog, numbers always point to the last number in RCS revision number,
21563 \begin_layout Section
21564 Literate Programming
21567 \begin_layout Standard
21572 (kayvan@sylvan.com)
21576 original documentation written by
21578 Edmar Wienskoski Jr.
21581 (edmar-w-jr@technologist.com)
21584 \begin_layout Subsection
21588 \begin_layout Standard
21589 The main purpose of this documentation is to show you how to use LyX for
21590 literate programming, where it is assumed that you are familiar with this
21591 programming technique, and know what
21592 \begin_inset Quotes eld
21596 \begin_inset Quotes erd
21600 \begin_inset Quotes eld
21604 \begin_inset Quotes erd
21608 If that is not the case, please follow the web links provided in the following
21610 There is a lot of good documentation out there covering old development
21611 history to the latest tools tips.
21614 \begin_layout Standard
21615 It is also assumed that you are familiar with LyX itself to a point that
21616 you are comfortable changing your LyX preferences, and X resources file.
21617 If that is not the case please refer to other LyX documentation to cover
21618 your specific needs.
21621 \begin_layout Subsection
21622 Literate Programming
21625 \begin_layout Standard
21626 From the Literate Programming FAQ:
21629 \begin_layout Quotation
21630 Literate programming is the combination of documentation and source together
21631 in a fashion suited for reading by human beings.
21632 In fact, literate programs should be enjoyable reading, even inviting!
21633 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21634 and documentation in a single file.
21635 Literate programming tools then parse the file to produce either readable
21636 documentation or compilable source.
21637 The WEB style of literate programming was created by D.
21638 \begin_inset space \thinspace{}
21642 Knuth during the development of his TeX typesetting software.
21646 \begin_layout Standard
21647 Another excerpt says:
21650 \begin_layout Quotation
21653 How is literate programming different from verbose commenting?
21656 \begin_layout Quotation
21657 There are three distinguishing characteristics.
21658 In order of importance, they are:
21662 \begin_layout Itemize
21663 flexible order of elaboration
21666 \begin_layout Itemize
21667 automatic support for browsing
21670 \begin_layout Itemize
21671 typeset documentation, especially diagrams and mathematics
21675 \begin_layout Standard
21676 Now that I sparked your curiosity, take a look in the references.
21679 \begin_layout Subsubsection
21683 \begin_layout Standard
21684 The complete Literate Programming FAQ can be found at:
21687 \begin_layout Quote
21688 Literate Programming FAQ
21689 \begin_inset Flex URL
21692 \begin_layout Plain Layout
21694 http://www.literateprogramming.com/lpfaq.pdf
21702 \begin_layout Standard
21703 The FAQ lists 23 (twenty three!) different literate programming tools.
21704 Where some are specialized or
21705 \begin_inset Quotes eld
21709 \begin_inset Quotes erd
21712 for particular programming languages, while other have general scope.
21717 for my own use for several reasons:
21720 \begin_layout Itemize
21721 It can generate the documentation either in LaTeX or HTML.
21724 \begin_layout Itemize
21725 It has a open architecture, i.
21726 \begin_inset space \thinspace{}
21730 \begin_inset space \space{}
21733 it is easy to plug in new filters and to perform special processing that
21738 \begin_layout Itemize
21739 There is a good selection of filters available already (the HTML is one
21743 \begin_layout Itemize
21747 \begin_layout Standard
21748 The Noweb web page can be found at:
21751 \begin_layout Quote
21753 \begin_inset Flex URL
21756 \begin_layout Plain Layout
21758 http://www.cs.virginia.edu/~nr/noweb/
21766 \begin_layout Standard
21767 Starting from there you can reach many other interesting links and even
21768 some literate program examples.
21771 \begin_layout Subsection
21772 LyX and Literate Programming
21775 \begin_layout Standard
21776 The LyX support for Literate Programming is provided by using the generic
21777 LyX converters mechanism.
21778 This support is provided in a
21779 \begin_inset Quotes eld
21783 \begin_inset Quotes erd
21787 \begin_inset space \thinspace{}
21791 \begin_inset space \space{}
21794 you will be able to use this new LyX feature with some other literate programmin
21795 g tool of your choice by just changing your LyX preferences.
21798 \begin_layout Subsubsection
21799 Generating documents and code (weaving and tangling)
21802 \begin_layout Paragraph
21803 Selecting the document class
21806 \begin_layout Standard
21807 If you have installed Noweb and LyX successfully, whenever you open a new
21808 document or try to change the document class of an existing one, you will
21809 find that there are three new document classes available:
21812 \begin_layout Itemize
21816 \begin_layout Itemize
21820 \begin_layout Itemize
21824 \begin_layout Standard
21825 You must select one of them to create your literate documents from.
21829 \begin_layout Standard
21830 Note that literate documents are not limited to these three classes.
21831 New classes can be generated from other styles like letter or in combination
21832 with other class variations like Article (AMS).
21833 If you have special needs that cannot be covered by one of the existing
21834 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21835 will arrange to insert a new entry, or teach you how to do it.
21839 \begin_layout Plain Layout
21840 It is very simple, it involves the creation of a file with four lines, and
21841 re-running of the auto configuration.
21846 Moreover, if you use a literate tool other than Noweb you may need to create
21847 a new set of document classes for it.
21850 \begin_layout Paragraph
21854 \begin_layout Standard
21855 LyX enables you to write code with a layout named
21863 \begin_layout Plain Layout
21864 The equivalent Noweb term is
21865 \begin_inset Quotes eld
21869 \begin_inset Quotes erd
21873 For historical reasons, I got used to the term
21874 \begin_inset Quotes eld
21878 \begin_inset Quotes erd
21881 introduced by other literate tool named Nuweb, which I used for many years
21882 before rendering myself to Noweb.
21887 Noweb delimits scraps like this:
21890 \begin_layout LyX-Code
21894 \begin_layout LyX-Code
21898 \begin_layout LyX-Code
21902 \begin_layout LyX-Code
21906 \begin_layout LyX-Code
21910 \begin_layout Standard
21911 The problem is that whatever is written in between the << and the
21915 must be taken literally, i.
21916 \begin_inset space \thinspace{}
21920 \begin_inset space \space{}
21923 LyX should be prevented from making any special interpretation of what has
21925 This is handled by a special layout named Scrap, that works like a normal
21926 paragraph but has a free spacing capability.
21929 \begin_layout Standard
21930 The down side of the Scrap paragraph layout is that consecutive paragraphs
21931 of code will be spaced with one empty line in the source code and also
21932 in the printed documentation.
21933 The work around is to enter each line of code within a single Scrap, with
21934 a newline (ctrl-return).
21935 The example above will look like this:
21939 \begin_layout Plain Layout
21940 If you have a printed version of this document you will not see any difference
21941 between the previous example and this one.
21949 \begin_layout LyX-Code
21951 \begin_inset Newline newline
21955 \begin_inset Newline newline
21959 \begin_inset Newline newline
21963 \begin_inset Newline newline
21969 \begin_layout Standard
21970 This layout works fine.
21971 The only real inconvenience is that you have to type ctrl-return instead
21976 \begin_layout Plain Layout
21977 It is in my list of
21978 \begin_inset Quotes eld
21982 \begin_inset Quotes erd
21993 \begin_layout Standard
21994 As a special note, you can also use the
21995 \begin_inset Quotes eld
21999 \begin_inset Quotes erd
22002 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
22006 \begin_layout LyX-Code
22008 \begin_inset Newline newline
22011 def some_function(args):
22012 \begin_inset Newline newline
22015 "This is the doc string for this function."
22016 \begin_inset Newline newline
22019 print "My args: ", args
22022 \begin_layout LyX-Code
22023 @ %def some_function
22026 \begin_layout Standard
22027 For an example of this usage and the resulting cross-reference output, look
22028 at the Literate python program in
22030 LIBDIR/examples/listerrors.lyx
22032 which should make this all clear.
22035 \begin_layout Paragraph
22036 Generating the documentation
22039 \begin_layout Standard
22040 At this point you already have a new document file with a proper document
22041 class, and with some code and text on it.
22042 How do I print it? The answer is simple, you select
22044 View\SpecialChar \menuseparator
22048 Just like you would do for a plain document.
22049 No special procedure is required.
22052 \begin_layout Standard
22053 To help orientate you, I will now explain what happens inside LyX:
22056 \begin_layout Enumerate
22059 Update\SpecialChar \menuseparator
22062 menu option is chosen, a LaTeX file is generated.
22067 \begin_layout Standard
22068 If the document is of any literate class the generated file will be named
22069 with an extension name defined by the
22070 \begin_inset Quotes eld
22074 \begin_inset Quotes erd
22077 format (defined in the Preferences panel), otherwise the file will have
22086 \begin_layout Enumerate
22087 Note that the only difference so far is in the name of the file, no special
22088 processing is required by LyX.
22089 Given that you formatted the code using the Scrap layout that, by itself,
22090 takes care of the business.
22093 \begin_layout Enumerate
22094 If the document is of any literate class LyX will then use the internal
22095 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22099 \begin_layout Plain Layout
22100 The converters are defined in the
22102 Tools\SpecialChar \menuseparator
22106 \begin_inset Quotes eld
22110 \begin_inset Quotes erd
22122 manual for general information about converters.
22127 to generate the LaTeX file.
22131 \begin_layout Standard
22132 Otherwise it will just skip this step.
22136 \begin_layout Enumerate
22137 Finally, LaTeX is invoked and the regular post processing continues as in
22141 \begin_layout Standard
22142 Independence from a particular
22143 \begin_inset Quotes eld
22147 \begin_inset Quotes erd
22150 is easily achieved by changing the commands that are run by the various
22154 \begin_layout Paragraph
22155 Generating the code
22158 \begin_layout Standard
22159 When the build menu option is chosen or the corresponding button in the
22160 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22161 Next, LyX invokes the
22166 This converter needs to be defined by the user and is not installed by
22167 default, though the Program format is.
22168 This converter (like any other converter) will have two parts:
22171 \begin_layout Enumerate
22172 The converter program itself.
22173 This program performs the conversion from the one format to the other (in
22174 this case, from the Noweb format to the Program pseudo-format).
22177 \begin_layout Enumerate
22178 The error log parser.
22179 This is a program whose sole purpose is to rewrite error messages in a
22180 format that LyX understands.
22181 This makes it possible for LyX to place error boxes in the right places
22182 in the file buffer.
22185 \begin_layout Standard
22186 The first part, the
22187 \begin_inset Quotes eld
22191 \begin_inset Quotes erd
22194 setting, should be set to
22195 \begin_inset Quotes eld
22203 \begin_inset Quotes erd
22207 This basically means that LyX will call
22208 \begin_inset Quotes eld
22212 \begin_inset Quotes erd
22215 (a program or script) with the name of the Noweb file (normally a file
22216 in the LyX temp directory).
22220 \begin_layout Standard
22221 This is an implementation of
22222 \begin_inset Quotes eld
22226 \begin_inset Quotes erd
22229 that you can place in a directory on your path:
22232 \begin_layout LyX-Code
22236 \begin_layout LyX-Code
22240 \begin_layout LyX-Code
22241 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22244 \begin_layout Standard
22245 The next part of the converter setting is the
22246 \begin_inset Quotes eld
22250 \begin_inset Quotes erd
22253 which is to be set to
22254 \begin_inset Quotes eld
22259 parselog=listerrors
22262 \begin_inset Quotes erd
22266 This will run any errors that are generated by the
22267 \begin_inset Quotes eld
22271 \begin_inset Quotes erd
22274 process through the
22275 \begin_inset Quotes eld
22279 \begin_inset Quotes erd
22285 \begin_layout Standard
22286 The converter code looks in
22294 then on the path for the
22295 \begin_inset Quotes eld
22299 \begin_inset Quotes erd
22305 \begin_layout Standard
22306 The build will normally take place in LyX's temporary directory, so the
22307 files produced by the conversion will be in that directory.
22308 LyX will copy out what it regards as the `main' file, but the
22312 conversion may produce several files, and so most of these would then be
22313 deleted when LyX was closed.
22314 The present solution is to use a `copier',
22318 \begin_layout Plain Layout
22327 manual for information on these.
22336 script in its default mode, so that the entire contents of the temporary
22337 directory is copied.
22338 More will get copied than is needed, to be sure, but nothing will be lost.
22339 If, however, you know what extensions the generated files will have, this
22340 can be improved by using the
22349 This option takes a comma-separated list of extensions to copy.
22350 So, for example, if the conversion will generate only files with the extensions
22359 , then the correct definition would be:
22362 \begin_layout LyX-Code
22363 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22366 \begin_layout Standard
22367 The result will be that only files with these two extensions will be copied
22371 \begin_layout Paragraph
22372 Build instructions in the document
22375 \begin_layout Standard
22376 The last piece of the integration between LyX and noweb is the
22377 \begin_inset Quotes eld
22381 \begin_inset Quotes erd
22385 Generally, the instructions for building your program should be embedded
22386 in a scrap of its own.
22388 \begin_inset Quotes eld
22392 \begin_inset Quotes erd
22395 above uses the notangle command to look for this scrap (called
22396 \begin_inset Quotes eld
22400 \begin_inset Quotes erd
22403 ) and runs its contents through
22404 \begin_inset Quotes eld
22408 \begin_inset Quotes erd
22414 \begin_layout Standard
22415 Typically, such a scrap would look something like this:
22418 \begin_layout LyX-Code
22420 \begin_inset Newline newline
22424 \begin_inset Newline newline
22428 \begin_inset Newline newline
22431 if [ -z "${NOWEB_SOURCE}" ]
22432 \begin_inset Newline newline
22436 \begin_inset Newline newline
22439 NOWEB_SOURCE=myfile.nw
22440 \begin_inset Newline newline
22444 \begin_inset Newline newline
22448 code to extract files ...]
22449 \begin_inset Newline newline
22453 code to compile files ...]
22454 \begin_inset Newline newline
22460 \begin_layout Standard
22463 LIBDIR/examples/listerrors.lyx
22467 LIBDIR/examples/Literate.lyx
22469 which implement two versions of the
22470 \begin_inset Quotes eld
22474 \begin_inset Quotes erd
22477 program for some illustrations of how all of these pieces go together or
22480 LIBDIR/examples/noweb2lyx.lyx.
22483 Interestingly, these three files show off the language-indepence of the
22484 LyX literate programming support since they are written in Python, C and
22488 \begin_layout Subsubsection
22492 \begin_layout Standard
22493 All the Literate Programming support is configured by the
22495 Tools\SpecialChar \menuseparator
22499 \begin_inset Quotes eld
22503 \begin_inset Quotes erd
22507 The important parts are:
22510 \begin_layout Description
22512 \begin_inset space ~
22516 \begin_inset Quotes eld
22520 \begin_inset Quotes erd
22524 \begin_inset space ~
22527 format Set up via the Formats tab, this is where the Noweb-specific pieces
22537 , the file extension is set to
22542 This tells LyX to create a file with a
22546 extension in the first step of the conversion process.
22549 \begin_layout Description
22551 \begin_inset space ~
22559 \begin_inset space ~
22562 format This is an empty format whose sole purpose is to be the endpoint
22563 of a conversion (which then allows us to set up a converter for it).
22566 \begin_layout Description
22575 This converter performs the
22576 \begin_inset Quotes eld
22580 \begin_inset Quotes erd
22583 of the literate document.
22584 For Noweb, it is set to
22585 \begin_inset Quotes eld
22590 noweave -delay -index $$i > $$o
22593 \begin_inset Quotes erd
22599 \begin_layout Description
22609 \begin_inset Quotes eld
22613 \begin_inset Quotes erd
22617 As stated above, the Converter is set to
22618 \begin_inset Quotes eld
22626 \begin_inset Quotes erd
22629 , with Flags set to
22630 \begin_inset Quotes eld
22635 originaldir,parselog=listerrors
22638 \begin_inset Quotes erd
22644 \begin_layout Subsubsection
22648 \begin_layout Standard
22649 There is also a new function implemented in the LyX server, the
22650 \begin_inset Quotes eld
22653 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22657 \begin_layout Standard
22658 When debugging code with ddd/gdb, it is possible to invoke a text editor
22659 at the current execution position with a single key stroke.
22660 The default ddd configuration for that is shift-ctrl-V.
22661 It happens that you can define the editor command line invocation in ddd
22664 Edit\SpecialChar \menuseparator
22665 Preferences\SpecialChar \menuseparator
22668 dialog and changing the "Edit Sources" entry.
22671 \begin_layout Standard
22672 I take advantage of the new created LyX server function and this ddd feature,
22674 \begin_inset Quotes eld
22678 \begin_inset Quotes erd
22684 \begin_layout LyX-Code
22685 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22688 \begin_layout Standard
22689 With this, whenever you are using ddd and find a point in the program that
22690 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22691 ddd you forward this information to LyX through the LyX server and then
22692 the LyX window will show the same file with the cursor at the same position
22693 ddd was pointing to.
22694 No more guessing or long scrolling to locate a point in the program back
22698 \begin_layout Standard
22699 Note however that you must enable the LyX server to get this feature working
22700 (it is disabled by default).
22701 You can enable it in
22713 ) by entering in the
22718 \begin_inset Quotes eld
22723 /home/<your-home-directory>/.lyx/lyxpipe
22726 \begin_inset Quotes erd
22732 \begin_layout Standard
22733 Read the LyX server documentation in the
22735 Customization Manual
22737 for further information.
22740 \begin_layout Subsubsection
22744 \begin_layout Standard
22745 There are six new buttons that can be added to your LyX toolbar.
22746 Five of these buttons are short cuts to layout styles:
22767 The last one is a short cut to the
22768 \begin_inset Quotes eld
22772 \begin_inset Quotes erd
22779 \begin_layout Standard
22780 LyX has a range of buttons that are available for tool bar customization.
22781 In my toolbar I like to combine the six short cuts above with two more:
22786 \SpecialChar \menuseparator
22791 \SpecialChar \menuseparator
22798 View\SpecialChar \menuseparator
22802 Here is how it looks like:
22805 \begin_layout LyX-Code
22809 \begin_layout LyX-Code
22813 \begin_layout LyX-Code
22814 Icon "layout Standard"
22817 \begin_layout LyX-Code
22818 Icon "layout Section"
22821 \begin_layout LyX-Code
22822 Icon "layout LaTeX"
22825 \begin_layout LyX-Code
22826 Icon "layout LyX-Code"
22829 \begin_layout LyX-Code
22830 Icon "layout Scrap"
22833 \begin_layout LyX-Code
22837 \begin_layout LyX-Code
22841 \begin_layout LyX-Code
22842 Icon "buffer-typeset"
22845 \begin_layout LyX-Code
22846 Icon "build-program"
22849 \begin_layout LyX-Code
22853 \begin_layout LyX-Code
22857 \begin_layout LyX-Code
22861 \begin_layout LyX-Code
22865 \begin_layout LyX-Code
22869 \begin_layout Subsubsection
22870 Colors customization
22873 \begin_layout Standard
22874 There are a number of colors in LyX that can be customized in
22879 One of the things that bothers people is the LaTeX font color.
22880 The default color is red, since the scraps uses LaTeX font, and there is
22881 a lot of scraps in literate documents, you may get tired of seeing everything
22883 You can change it by going to the tabs
22892 \begin_layout Standard
22893 The next thing is the visible presence of the newline character in the screen.
22894 You can choose the color of this particular character and make it blend
22896 I recommend you choosing a color that is close to the background but not
22897 equal, that way you still can see it is there, but it is not bothering
22902 \begin_layout Chapter
22903 Secrets of the LaTeX Masters
22904 \begin_inset CommandInset label
22913 \begin_layout Standard
22914 Though LyX is a powerful tool, it cannot hope to support everything that
22915 can be done with pure TeX/LaTeX.
22916 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22917 as long as you are not afraid to use that
22918 \begin_inset Quotes eld
22922 \begin_inset Quotes erd
22925 button on the toolbar or add things to the LaTeX preamble.
22926 This section lists some tips, tricks, and otherwise cool ideas to give
22927 your document that extra little flair.
22930 Do try this at home
22932 , just start with something a little smaller and less important than your
22936 \begin_layout Standard
22937 Most ideas in this section require less common files in your LaTeX installation.
22938 If you have a system like TeXLive, most will already be available.
22939 A few, however, will need to be downloaded from one of the CTAN archives.
22940 Often, there are several ways to do something, or several LaTeX style files
22941 which do the same thing.
22942 We do not endorse one choice over another, we simply claim that we have
22943 done a particular task with a particular file.
22944 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22947 \begin_layout Section
22951 \begin_layout Standard
22954 Lars Gullik Bjønnes
22957 \begin_layout Subsection
22961 \begin_layout Standard
22962 The aim for this chapter
22966 \begin_layout Plain Layout
22967 Editor's note: Lars' original chapter was a masterful description of how
22973 However, it was too long to flow smoothly in this document.
22974 I have therefore chosen to excerpt the most important sections here (sorry,
22975 Lars); you can read the original chapter (and more of the story!) in the
22978 examples/multicol.lyx
22986 is to show how the LaTeX package
22990 can be used in a LyX document.
22991 As LyX doesn't support the
22995 package natively yet, we have to use some small hacks.
22996 By reading this section it should be obvious how to do this.
22999 \begin_layout Subsection
23003 \begin_layout Standard
23008 package allows switching between one and multicolumn format on the same
23010 Footnotes are handled correctly (for the most part), but will be placed
23011 at the bottom of the page and not under each column.
23012 LaTeX's float mechanism, however, is partly disabled in the current implementat
23014 At the moment only page-wide floats can be used within the scope of the
23018 \begin_layout Subsection
23022 \begin_layout Subsubsection
23026 \begin_layout Standard
23027 If you want to have two columns in your text, you have use LaTeX mode to
23032 begin{multicols}{2}
23034 at the point where you want the two column layout to start, and then
23040 where you want it to end.
23044 \begin_layout Standard
23048 \begin_layout Plain Layout
23052 begin{multicols}{2}
23060 \begin_layout Standard
23065 The Adventure of the Empty House
23068 \begin_inset Newline newline
23073 Sir Arthur Conan Doyle
23076 \begin_layout Standard
23079 It was in the spring of the year 1894 that all London was interested, and
23080 the fashionable world dismayed, by the murder of the Honourable Ronald
23081 Adair under most unusual and inexplicable circumstances.
23082 The public has already learned those particulars of the crime which came
23083 out in the police investigation, but a good deal was suppressed upon that
23084 occasion, since the case for the prosecution was so overwhelmingly strong
23085 that it was not necessary to bring forward all the facts.
23086 Only now, at the end of nearly ten years, am I allowed to supply those
23087 missing links which make up the whole of that remarkable chain.
23088 The crime was of interest in itself, but that interest was as nothing to
23089 me compared to the inconceivable sequel, which afforded me the greatest
23090 shock and surprise of any event in my adventurous life.
23091 Even now, after this long interval, I find myself thrilling as I think
23092 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23093 ty which utterly submerged my mind.
23094 Let me say to that public, which has shown some interest in those glimpses
23095 which I have occasionally given them of the thoughts and actions of a very
23096 remarkable man, that they are not to blame me if I have not shared my knowledge
23097 with them, for I should have considered it my first duty to do so, had
23098 I not been barred by a positive prohibition from his own lips, which was
23099 only withdrawn upon the third of last month.
23102 \begin_layout Standard
23106 \begin_layout Plain Layout
23118 \begin_layout Subsubsection
23122 \begin_layout Standard
23123 The same pattern is used when you want more than two columns:
23126 \begin_layout Standard
23130 \begin_layout Plain Layout
23134 begin{multicols}{3}
23142 \begin_layout Standard
23145 It can be imagined that my close intimacy with Sherlock Holmes had interested
23146 me deeply in crime, and that after his disappearance I never failed to
23147 read with care the various problems which came before the public.
23148 And I even attempted, more than once, for my own private satisfaction,
23149 to employ his methods in their solution, though with indifferent success.
23150 There was none, however, which appealed to me like this tragedy of Ronald
23152 As I read the evidence at the inquest, which led up to a verdict of willful
23153 murder against some person or persons unknown, I realized more clearly
23154 than I had ever done the loss which the community had sustained by the
23155 death of Sherlock Holmes.
23156 There were points about this strange business which would, I was sure,
23157 have specially appealed to him, and the efforts of the police would have
23158 been supplemented, or more probably anticipated, by the trained observation
23159 and the alert mind of the first criminal agent in Europe.
23160 All day, as I drove upon my round, I turned over the case in my mind and
23161 found no explanation which appeared to me to be adequate.
23162 At the risk of telling a twice-told tale, I will recapitulate the facts
23163 as they were known to the public at the conclusion of the inquest.
23166 \begin_layout Standard
23170 \begin_layout Plain Layout
23182 \begin_layout Standard
23183 You can have more than 3 columns if you want to, but that might not be very
23184 pleasant for the eye.
23187 \begin_layout Subsubsection
23188 Columns inside columns
23191 \begin_layout Standard
23192 You can even have columns inside columns:
23195 \begin_layout Standard
23199 \begin_layout Plain Layout
23203 begin{multicols}{2}
23211 \begin_layout Standard
23214 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23215 at that time governor of one of the Australian colonies.
23216 Adair's mother had returned from Australia to undergo the operation for
23217 cataract, and she, her son Ronald, and her daughter Hilda were living together
23221 \begin_layout Standard
23225 \begin_layout Plain Layout
23229 begin{multicols}{2}
23237 \begin_layout Standard
23240 The youth moved in the best society–had, so far as was known, no enemies
23241 and no particular vices.
23242 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23243 had been broken off by mutual consent some months before, and there was
23244 no sign that it had left any very profound feeling behind it.
23245 For the rest {sic} the man's life moved in a narrow and conventional circle,
23246 for his habits were quiet and his nature unemotional.
23247 Yet it was upon this easy-going young aristocrat that death came, in most
23248 strange and unexpected form, between the hours of ten and eleven-twenty
23249 on the night of March 30, 1894.
23252 \begin_layout Standard
23256 \begin_layout Plain Layout
23268 \begin_layout Standard
23271 Ronald Adair was fond of cards–playing continually, but never for such stakes
23273 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23274 It was shown that, after dinner on the day of his death, he had played
23275 a rubber of whist at the latter club.
23276 He had also played there in the afternoon.
23281 The evidence of those who had played with him– Mr.
23282 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23283 and that there was a fairly equal fall of the cards.
23284 Adair might have lost five pounds, but not more.
23285 His fortune was a considerable one, and such a loss could not in any way
23287 He had played nearly every day at one club or other, but he was a cautious
23288 player, and usually rose a winner.
23289 It came out in evidence that, in partnership with Colonel Moran, he had
23290 actually won as much as four hundred and twenty pounds in a sitting, some
23291 weeks before, from Godfrey Milner and Lord Balmoral.
23292 So much for his recent history as it came out at the inquest.
23295 \begin_layout Standard
23299 \begin_layout Plain Layout
23311 \begin_layout Standard
23312 Please do read the file
23314 examples/multicol.lyx
23316 for more advanced examples including column and header spacing, vertical
23317 separator lines, and more.
23320 \begin_layout Section
23325 Paragraph Environment
23326 \begin_inset Argument
23329 \begin_layout Plain Layout
23330 Numbering in Enumerate
23338 \begin_layout Standard
23344 \begin_layout Standard
23345 \begin_inset VSpace bigskip
23351 \begin_layout Standard
23353 The default numbering for the
23357 paragraph environment begins with Arabic numbers and ends with uppercase
23359 Suppose, however, you wanted a different type of numbering scheme.
23360 Here's a quickie example of how to change the numbering scheme:
23363 \begin_layout LyX-Code
23373 \begin_layout LyX-Code
23383 \begin_layout LyX-Code
23393 \begin_layout LyX-Code
23403 \begin_layout Standard
23404 \SpecialChar \ldots{}
23405 which changes the numbering scheme to uppercase Roman numerals, uppercase
23406 letters, Arabic numbers, and lowercase letter.
23409 \begin_layout Standard
23410 Additionally, the previous example also adds a little bit extra to the numbering
23412 For example, the first level label actually looks like:
23413 \begin_inset Quotes eld
23417 \begin_inset Quotes erd
23421 For ease of reading, we'll describe what the numbering schemes look like
23422 using a notation something like this: <
23423 \begin_inset Quotes eld
23427 \begin_inset Quotes erd
23431 \begin_inset space ~
23435 \begin_inset Quotes erd
23439 \begin_inset Quotes erd
23443 \begin_inset space ~
23447 \begin_inset Quotes erd
23451 \begin_inset Quotes erd
23455 \begin_inset space ~
23459 \begin_inset Quotes eld
23463 \begin_inset Quotes erd
23470 \begin_layout Standard
23471 As you can see in the example, there is a label command for each nesting
23478 \SpecialChar \ldots{}
23485 , as well as a counter,
23489 \SpecialChar \ldots{}
23495 There are also five
23496 \begin_inset Quotes eld
23500 \begin_inset Quotes erd
23533 , each of which take one counter as an argument.
23534 You can add characters before or after these, but there's no need to add
23538 \begin_layout Standard
23539 You can get really fancy with these.
23543 \begin_layout LyX-Code
23557 \begin_layout LyX-Code
23569 \begin_layout LyX-Code
23579 \begin_layout LyX-Code
23589 \begin_layout Standard
23590 produces the somewhat out of hand numbering scheme: <
23591 \begin_inset Quotes eld
23595 \begin_inset Quotes erd
23599 \begin_inset space ~
23603 \begin_inset Quotes erd
23607 \begin_inset Quotes erd
23611 \begin_inset space ~
23615 \begin_inset Quotes erd
23619 \begin_inset Quotes erd
23623 \begin_inset space ~
23627 \begin_inset Quotes eld
23631 \begin_inset Quotes erd
23638 \begin_layout Section
23642 \begin_layout Standard
23648 \begin_layout Standard
23649 \begin_inset VSpace bigskip
23655 \begin_layout Standard
23660 \begin_layout Plain Layout
23666 tmpfont}{cmr17 scaled 2500}{
23678 \begin_layout Standard
23683 \begin_layout Plain Layout
23694 hose of you who like the style of old books probably also like
23695 \begin_inset Quotes eld
23699 \begin_inset Quotes erd
23702 —those large capital letters which begin each new chapter or section.
23703 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23704 know some plain TeX!) but does require a lot of work and many iterations,
23705 as you can see by all the ugly TeX-mode stuff at the beginning of this
23709 \begin_layout Standard
23713 \begin_layout Plain Layout
23719 bigdrop{-1em}{3}{ptmri}{T}+
23724 here is a much easier way of doing this, of course.
23733 ) package from CTAN allows a simple way to add such letters to your documents.
23734 Since this package is not a standard part of TeXLive, I can't demonstrate
23735 it within this document, but if you copy this paragraph to a new document,
23737 \begin_inset Quotes eld
23747 \begin_inset Quotes erd
23750 and the pluses from the TeX code at the beginning of the paragraph, and
23755 usepackage{dropcaps}
23757 to your LaTeX preamble, you will get a nice Times Roman Italic
23758 \begin_inset Quotes eld
23762 \begin_inset Quotes erd
23765 , whose height is three lines of text and which protrudes 1 em into the
23767 (Make certain you have copied
23768 \begin_inset Quotes eld
23776 \begin_inset Quotes erd
23779 into a directory where TeX can see it.) The first argument is the amount
23780 of indentation; in this case the negative sign moves it into the margin.
23781 The second argument is the height of the letter in number of lines of text.
23782 The third argument is the font name: virtually anything which has a tfm
23783 file should work (wade through the
23785 .../texmf/fonts/tfm
23787 directory for possibilities).
23788 My personal favorite is
23789 \begin_inset Quotes eld
23797 \begin_inset Quotes erd
23800 , a fancy German font specifically designed for dropped capitals.
23801 The fourth argument is the letter (or letters) to be dropped.
23806 package also offers the
23812 command, as well as a slightly simplified
23821 \begin_layout Section
23822 Non-standard Paragraph Shapes
23825 \begin_layout Standard
23831 \begin_layout Standard
23832 \begin_inset VSpace bigskip
23838 \begin_layout Standard
23842 \begin_layout Plain Layout
23854 \begin_layout Standard
23858 \begin_layout Plain Layout
23867 \begin_layout Plain Layout
23881 \begin_layout Standard
23886 \begin_layout Plain Layout
23897 \begin_layout Plain Layout
23906 \begin_layout Plain Layout
23915 \begin_layout Plain Layout
23924 \begin_layout Plain Layout
23933 \begin_layout Plain Layout
23942 \begin_layout Plain Layout
23951 \begin_layout Plain Layout
23960 \begin_layout Plain Layout
23969 \begin_layout Plain Layout
23978 \begin_layout Plain Layout
23987 \begin_layout Plain Layout
23996 \begin_layout Plain Layout
24005 \begin_layout Plain Layout
24014 \begin_layout Plain Layout
24023 \begin_layout Plain Layout
24032 \begin_layout Plain Layout
24041 \begin_layout Plain Layout
24050 \begin_layout Plain Layout
24059 \begin_layout Plain Layout
24065 There are times when the tyranny of rectangular paragraphs must be overthrown.
24066 In such situations, a call to the delightful plain TeX command
24073 As you can see, completely arbitrary shapes can be laid out with a suitable
24074 set of linelength definitions.
24075 While this parshape may look a bit silly and useless, one could conceive
24076 of situations such as finely tuned dropped capitals, word wrapping around
24077 non-rectangular graphics, etc.
24078 which will benefit from such handcrafting.
24081 \begin_layout Standard
24082 \begin_inset VSpace bigskip
24088 \begin_layout Standard
24093 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24100 is the number of lines of text which define the paragraph.
24101 If there turn out to be fewer lines, the shape is truncated; if there are
24102 more, the excess lines have the same dimensions as the last line of the
24112 entries specify the indentation of the line from the left margin, and the
24113 length of the line as measured from that point.
24114 The shape applies only to the current paragraph; everything is reset to
24115 normal for the next paragraph.
24118 \begin_layout Standard
24122 \begin_layout Plain Layout
24134 \begin_layout Section
24138 \begin_layout Standard
24139 As you can see, the examples in this section range from the useful to the
24141 While I don't expect that anyone will ever need the paragraph shape demonstrate
24142 d in the last section, the important point is that you can do almost anything
24143 you want in LyX if you are willing to figure out how to do it in TeX and
24145 TeX is a fantastically powerful typesetting system and all that power is
24146 available to you since LyX uses it as its backend.