1 #LyX 2.1 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 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
48 \maintain_unincluded_children false
51 InsetLayout CharStyle:MenuItem
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
113 \cite_engine_type default
117 \paperorientation portrait
121 \notefontcolor #0000ff
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
133 \paperpagestyle headings
134 \tracking_changes false
135 \output_changes false
144 Additional LyX Features
147 \begin_layout Subtitle
156 \begin_layout Plain Layout
158 Principal maintainer of this file is
163 If you have comments or error corrections, please send them to the LyX
164 Documentation mailing list,
165 \begin_inset Flex Code
168 \begin_layout Plain Layout
170 <lyx-docs@lists.lyx.org>
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
192 \begin_layout Chapter
196 \begin_layout Standard
197 This manual is essentially Part II of the
199 User's Guide\SpecialChar \@.
202 The reason for separating the two documents is simple: the
206 is already quite lengthy, and it contains information on all of the basic
207 features one needs to know in order to prepare most documents.
208 However, the LyX Team has worked to make LyX extensible through various
209 configuration files and external packages.
210 That means that if you want to support the Fizzwizzle LaTeX package, you
211 can create a layout file (or module) for it without having to alter LyX
213 We've already had contributions of several new features this way, and some
214 of them are documented here.
215 There are also some more `advanced' features, such as how to control the
216 presentation of bibliographies and how to work with multi-part documents,
217 that are not covered in the
221 and are discussed here.
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226 control, and SGML support, which require additional software to work properly.
227 There is also a chapter on LyX's support for HTML.
228 And lastly, there's a chapter of LaTeX tools and tips, things you can use
229 to spruce up your documents by directly using the powerful features of
235 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
238 \begin_layout Standard
239 If you haven't read the
243 yet, you are definitely in the wrong manual.
248 is the first place to go, since it describes the notation and format of
250 You should also be thoroughly familiar with the
254 and all of the basic features of LyX before attempting to read this one.
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259 with LaTeX, this first chapter covers the inner workings of LyX and how
260 to direct LyX to generate exactly the LaTeX code you want.
261 It is obviously for more seasoned LyX users.
264 \begin_layout Chapter
268 \begin_layout Section
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274 In it, we'll explain how LyX and LaTeX work together to produce printable
276 This is the only place in any of the manuals where we assume you know something
280 \begin_layout Standard
281 At one time, LyX was called a
282 \begin_inset Quotes eld
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
289 but that's no longer true.
290 There are frontends to LaTeX out there.
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296 There are also the LaTeX modes for vi and emacs, of course.
301 These are basically text editors with the ability to run LaTeX and mark
302 any errors in the file you're editing.
311 run LaTeX, and it also indicates errors in the file, it also does much,
313 For one thing, you don't need to know LaTeX to use LyX effectively.
314 And LyX has added its own extensions to LaTeX.
315 Try the following sometime: select
316 \begin_inset Flex MenuItem
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
327 \begin_inset Flex MenuItem
330 \begin_layout Plain Layout
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
347 ), then look at the preamble of the resulting
348 \begin_inset Flex Code
351 \begin_layout Plain Layout
358 You'll notice a variety of new macros defined specifically by LyX.
359 These macros are defined automatically, according to the features you use
363 \begin_layout Standard
364 There are several commands that automatically invoke LaTeX.
368 \begin_layout Itemize
369 \begin_inset Flex MenuItem
372 \begin_layout Plain Layout
373 View\SpecialChar \menuseparator
382 \begin_layout Itemize
383 \begin_inset Flex MenuItem
386 \begin_layout Plain Layout
387 View\SpecialChar \menuseparator
396 \begin_layout Itemize
397 \begin_inset Flex MenuItem
400 \begin_layout Plain Layout
401 File\SpecialChar \menuseparator
410 \begin_layout Itemize
411 \begin_inset Flex MenuItem
414 \begin_layout Plain Layout
415 File\SpecialChar \menuseparator
424 \begin_layout Standard
425 They will only invoke LaTeX if the file has changed since the last time
430 \begin_layout Standard
431 When LyX runs LaTeX on the file you're editing, it performs these steps:
434 \begin_layout Enumerate
435 Convert the document to LaTeX and save to a file with the extension
436 \begin_inset Flex Code
439 \begin_layout Plain Layout
446 \begin_inset Flex Code
449 \begin_layout Plain Layout
458 \begin_layout Enumerate
460 \begin_inset Flex Code
463 \begin_layout Plain Layout
469 file (maybe several times), and run any other commands (such as
470 \begin_inset Flex Code
473 \begin_layout Plain Layout
480 \begin_inset Flex Code
483 \begin_layout Plain Layout
489 ) needed to compile the LaTeX file.
492 \begin_layout Enumerate
493 If there are any errors, show the error log.
496 \begin_layout Standard
497 If you have run LaTeX using
498 \begin_inset Flex MenuItem
501 \begin_layout Plain Layout
504 \SpecialChar \menuseparator
512 , LyX then runs a DVI viewer to display the DVI-file.
514 \begin_inset Flex MenuItem
517 \begin_layout Plain Layout
520 \SpecialChar \menuseparator
528 , LyX performs further steps:
531 \begin_layout Itemize
533 \begin_inset Flex Code
536 \begin_layout Plain Layout
542 to convert the DVI file to PostScript.
545 \begin_layout Itemize
546 Run a PostScript viewer, such as
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
556 , to display the PostScript file.
559 \begin_layout Standard
560 LyX does similar things when viewing, or exporting, other formats.
563 \begin_layout Section
564 Translating LaTeX files into LyX
567 \begin_layout Standard
568 You can import a LaTeX file into LyX by using the
569 \begin_inset Flex MenuItem
572 \begin_layout Plain Layout
573 File\SpecialChar \menuseparator
574 Import\SpecialChar \menuseparator
581 This will call a program named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 which will create a file
592 \begin_inset Flex Code
595 \begin_layout Plain Layout
602 \begin_inset Flex Code
605 \begin_layout Plain Layout
612 LyX will then open that file.
616 \begin_layout Plain Layout
617 \begin_inset Flex Code
620 \begin_layout Plain Layout
626 can also be run from the command line, of course.
634 \begin_layout Standard
635 \begin_inset Flex Code
638 \begin_layout Plain Layout
644 will translate most legal LaTeX, but not everything.
645 It will put things it doesn't understand into TeX code, so after translating
647 \begin_inset Flex Code
650 \begin_layout Plain Layout
656 , you can look for TeX code and hand-edit it until it looks right.
659 \begin_layout Standard
660 If you don't know what TeX code is, read the next section.
663 \begin_layout Section
664 \begin_inset CommandInset label
666 name "sec:Inserting-TeX-Code"
670 Inserting TeX Code into LyX Documents
673 \begin_layout Standard
674 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
675 You can always insert TeX code into any LyX document.
676 LyX cannot, and will never be able to, display every possible LaTeX construct.
677 If ever you need to insert LaTeX commands into your LyX document, you can
679 \begin_inset Flex Code
682 \begin_layout Plain Layout
688 box, which you can insert into your document with
689 \begin_inset Flex MenuItem
692 \begin_layout Plain Layout
693 Insert\SpecialChar \menuseparator
699 or the keyboard shortcut
708 \begin_layout Standard
709 Here's an example of inserting LaTeX commands in a LyX document.
710 The code looks like this:
713 \begin_layout LyX-Code
717 \begin_inset Newline newline
723 \begin_inset Newline newline
726 This is an example of a minipage environment.
728 \begin_inset Newline newline
731 can put nearly everything in it, even (non-floating)
732 \begin_inset Newline newline
737 \begin_inset Newline newline
743 \begin_inset Newline newline
747 \begin_inset Newline newline
753 \begin_inset Newline newline
759 \begin_inset Newline newline
765 \begin_inset Newline newline
770 \begin_inset Newline newline
776 \begin_inset Newline newline
782 \begin_inset Newline newline
788 \begin_inset Newline newline
796 \begin_layout LyX-Code
800 \begin_layout Standard
802 \begin_inset Flex Code
805 \begin_layout Plain Layout
811 box containing this text is directly after this paragraph.
812 Those of you reading the manual in LyX will only see the TeX code inset.
813 Those reading a printed version of the manuals will see the actual results:
814 \begin_inset VSpace bigskip
820 \begin_layout Standard
824 \begin_layout Plain Layout
831 \begin_layout Plain Layout
838 \begin_layout Plain Layout
840 This is an example of a minipage environment.
841 You can put nearly everything in it, even (non-floating) figures and tables.
845 \begin_layout Plain Layout
852 \begin_layout Plain Layout
857 \begin_layout Plain Layout
864 \begin_layout Plain Layout
871 \begin_layout Plain Layout
878 \begin_layout Plain Layout
884 \begin_layout Plain Layout
891 \begin_layout Plain Layout
898 \begin_layout Plain Layout
905 \begin_layout Plain Layout
915 \begin_inset VSpace bigskip
921 \begin_layout Standard
922 In addition to using TeX code, you can also create a separate file containing
923 some complex LaTeX structure and then use
924 \begin_inset Flex MenuItem
927 \begin_layout Plain Layout
928 Insert\SpecialChar \menuseparator
938 to include your file (you should select the type
939 \begin_inset Flex Code
942 \begin_layout Plain Layout
949 We recommend that you only do this if you have a
950 \begin_inset Flex Code
953 \begin_layout Plain Layout
964 Otherwise, you'll have a big job tracking down LaTeX errors.
967 \begin_layout Standard
968 There are a few last points to emphasize:
971 \begin_layout Itemize
976 check if your LaTeX code is correct.
979 \begin_layout Itemize
980 Beware of reinventing the wheel.
983 \begin_layout Standard
984 On that last point, LyX does have quite a few features tucked into it, and
986 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
987 feature before you decide you have to do it by hand.
988 Moreover, there are numerous LaTeX packages out there to do all sorts of
989 things, from labels to envelopes to fancy multipage tables.
991 \begin_inset CommandInset href
994 target "http://www.ctan.org/"
1001 \begin_layout Standard
1002 If you do need to do some wild and fancy things within your document, be
1003 sure to check out a good LaTeX book for assistance.
1004 There are a number of them listed in the bibliography of the
1011 \begin_layout Section
1012 LyX and the LaTeX Preamble
1015 \begin_layout Subsection
1016 About the LaTeX Preamble
1019 \begin_layout Standard
1020 If you already know LaTeX, there is no need to explain here what the preamble
1022 If you don't, the following will give you some ideas—we recommend again
1023 that you consult a LaTeX book for further information.
1024 In any case, you should read the points below, because they explain what
1025 you can do and what you don't need to do in the LaTeX preamble of a LyX
1029 \begin_layout Standard
1030 The LaTeX preamble comes at the very beginning of a document,
1038 \begin_layout Itemize
1039 Declare the document class.
1041 \begin_inset Newline newline
1044 LyX already does this for you.
1045 If you're a seasoned LaTeX-nician, and you have a custom document class
1046 you want to use, check out the
1048 Customization Manual
1050 for information on how to make LyX interface to it.
1053 \begin_layout Itemize
1054 Declare the usage of packages.
1056 \begin_inset Newline newline
1059 LaTeX packages provide special commands, which are only available within
1060 a document when the package has been declared in the preamble.
1061 In addition to providing special commands, the inclusion of a package can
1062 change the document.
1063 For example, the package
1064 \begin_inset Flex Code
1067 \begin_layout Plain Layout
1073 forces all paragraphs to be indented.
1074 There are other packages for labels, envelopes, margins, etc.
1078 \begin_layout Itemize
1079 Set counters, variables, lengths and widths.
1081 \begin_inset Newline newline
1084 There are several LaTeX counters and variables that
1088 be set globally from within the preamble in order to have the desired effect.
1089 (There are variables that you can set and reset inside the document, too.)
1090 Margins are a good example of something that must be set in the preamble.
1091 Another example is the label format for lists.
1092 You can actually set these just about anywhere, but it's best to do it
1093 just once, inside the preamble.
1096 \begin_layout Itemize
1097 Declare user defined commands (with
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1110 \begin_inset Flex Code
1113 \begin_layout Plain Layout
1122 \begin_inset Newline newline
1125 These are abbreviations for LaTeX commands which appear very often inside
1127 Although the preamble is a good place to declare such commands, they
1131 be declared anywhere (before they are used for the first time, of course).
1132 This can be useful if there is a lot of raw LaTeX code in your document,
1133 which normally should not be the case.
1136 \begin_layout Standard
1137 LyX adds its own set of definitions to the preamble of the
1138 \begin_inset Flex Code
1141 \begin_layout Plain Layout
1148 This makes LaTeX files generated by LyX portable.
1151 \begin_layout Subsection
1152 Changing the Preamble
1155 \begin_layout Standard
1156 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1157 can't change them without patching LyX itself.
1158 You can, however, add your own stuff to the preamble by selecting
1159 \begin_inset Flex MenuItem
1162 \begin_layout Plain Layout
1164 \begin_inset space ~
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Document\SpecialChar \menuseparator
1184 LyX adds anything in the
1185 \begin_inset Flex MenuItem
1188 \begin_layout Plain Layout
1194 dialog to its own built-in preamble.
1195 Before adding your own declarations in the preamble, you should make sure
1196 that LyX doesn't already support what you want to do.
1197 (Remember what we said about reinventing the wheel?) Also,
1199 make sure your preamble code is correct
1202 LyX doesn't check it for you.
1203 If there is an error, you're likely to get an error like
1204 \begin_inset Quotes eld
1208 \begin_inset Flex Code
1211 \begin_layout Plain Layout
1220 \begin_inset Quotes erd
1224 If you see this error, check your preamble.
1227 \begin_layout Subsection
1231 \begin_layout Standard
1232 Here are some examples of what you can add to a preamble, and what they
1236 \begin_layout Subsubsection
1240 \begin_layout Standard
1241 There are two variables under LaTeX that control page position:
1242 \begin_inset Flex Code
1245 \begin_layout Plain Layout
1254 \begin_inset Flex Code
1257 \begin_layout Plain Layout
1266 Their names should be self-explanatory.
1267 These variables are useful if you think for a moment about computer labels.
1268 Sometimes, the size of a print medium and the area of the medium that you
1269 can actually print on aren't the same.
1271 \begin_inset Flex Code
1274 \begin_layout Plain Layout
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1297 \begin_layout Standard
1298 The default values for
1299 \begin_inset Flex Code
1302 \begin_layout Plain Layout
1311 \begin_inset Flex Code
1314 \begin_layout Plain Layout
1323 \begin_inset space \thinspace{}
1327 \begin_inset space \thinspace{}
1331 \begin_inset space \space{}
1334 the page isn't shifted.
1335 Unfortunately, some DVI drivers always seem to shift the page.
1336 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1337 If you're using LyX on a system that you don't personally maintain, and
1338 your sysadmin is a doofus,
1339 \begin_inset Flex Code
1342 \begin_layout Plain Layout
1351 \begin_inset Flex Code
1354 \begin_layout Plain Layout
1363 Suppose your left and top margins are always 0.5
1364 \begin_inset space \thinspace{}
1368 You can add this to the preamble:
1371 \begin_layout LyX-Code
1379 \begin_layout LyX-Code
1387 \begin_layout Standard
1388 and your margins should now be correct.
1391 \begin_layout Subsubsection
1395 \begin_layout Standard
1396 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1397 There's a rather nice package, available at your nearest CTAN archive,
1398 for printing sheets of labels:
1399 \begin_inset Flex Code
1402 \begin_layout Plain Layout
1409 Now, your system may not have this package installed by default.
1410 We leave that up to you to check.
1411 You'll also want to read the documentation for it; we're not going to do
1413 Since this is an example, however, we'll give you an example of how you
1417 \begin_layout Standard
1418 First, make sure you're using the
1419 \begin_inset Flex Code
1422 \begin_layout Plain Layout
1429 Next, you need to put the following in your preamble:
1432 \begin_layout LyX-Code
1438 \begin_layout LyX-Code
1444 \begin_layout LyX-Code
1450 \begin_layout LyX-Code
1456 \begin_layout LyX-Code
1462 \begin_layout LyX-Code
1468 \begin_layout LyX-Code
1474 \begin_layout Standard
1475 This sets things up for Avery label sheets, stock #5360.
1476 You're now ready to print labels, but you'll need to insert LaTeX code,
1477 placing the commands
1478 \begin_inset Flex Code
1481 \begin_layout Plain Layout
1490 \begin_inset Flex Code
1493 \begin_layout Plain Layout
1501 around each label text.
1502 This and other special features of
1503 \begin_inset Flex Code
1506 \begin_layout Plain Layout
1512 are explained in its documentation.
1515 \begin_layout Standard
1516 Someday, someone may write a LyX layout file to support this package directly.
1517 Maybe that someone is you.
1520 \begin_layout Subsubsection
1521 Example #3: Paragraph Indentation
1524 \begin_layout Standard
1525 Americans are trained to indent the first line of
1530 As with all of their other weird quirks, most Americans will whine and
1531 moan until they can have their way and indent the first line of all paragraphs.
1540 \begin_layout Standard
1541 Of course, this behavior isn't standard typography.
1542 In books, you typically only indent the first line of a paragraph
1546 it follows another one.
1547 The idea behind indenting the first line of a paragraph is to distinguish
1548 neighboring paragraphs from one another.
1549 If there is no previous paragraph—for example, if it follows a figure or
1550 is the first paragraph in a section—then there is no need for indentation.
1554 \begin_layout Standard
1555 If you're a typical American (we're still joking!), though, you don't care
1556 about such esoteric things; you want your indentation! Add this to the
1560 \begin_layout LyX-Code
1563 usepackage{indentfirst}
1566 \begin_layout Standard
1567 If your TeX distribution isn't braindead, you'll have this package, and
1568 all of your paragraphs will get the indentation the Founding Fathers intended
1572 \begin_layout Subsubsection
1573 Example #4: This Document
1576 \begin_layout Standard
1577 You can also check out the preamble of this document to get an idea of some
1578 of the advanced things you can do.
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1588 It then uses the logfile from the LaTeX run to do a post-mortem.
1589 After analyzing the logfile, LyX displays a dialog listing the errors.
1590 Clicking on any one of them will take you to the position in your LyX file
1591 where the error occurred.
1595 \begin_layout Plain Layout
1597 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1599 There are also cases where LaTeX reports the error on one line, but the
1600 actual error is earlier.
1601 This is not unlike forgetting a closing brace in a program: You'll get
1602 an error, but only later.
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1613 \begin_inset Flex MenuItem
1616 \begin_layout Plain Layout
1619 \SpecialChar \menuseparator
1623 \begin_inset space ~
1632 There are some fairly common error messages and warnings.
1633 We'll cover those here.
1634 You should look at a good LaTeX book for a complete listing.
1637 \begin_layout Itemize
1638 \begin_inset Flex Code
1641 \begin_layout Plain Layout
1648 \begin_inset Newline newline
1651 Anything beginning with these words is a warning message for the purpose
1653 \begin_inset Quotes eld
1657 \begin_inset Quotes erd
1660 the LaTeX code itself.
1661 You'll get messages like this if you added or changed cross-references
1662 or bibliography entries, in which case, LaTeX is trying to tell you that
1663 you need to make another run.
1664 You can by-and-large ignore these.
1667 \begin_layout Itemize
1668 \begin_inset Flex Code
1671 \begin_layout Plain Layout
1678 \begin_inset Newline newline
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682 The rest of the message will often say something about a replacement font
1684 You can safely ignore these, too.
1687 \begin_layout Itemize
1688 \begin_inset Flex Code
1691 \begin_layout Plain Layout
1700 \begin_inset Newline newline
1708 They are warnings about lines that were too long and run past the right
1710 Almost always, this is unnoticeable in the final output.
1711 (It can be just a point or two.) Or, only one or two characters extend past
1713 LaTeX seems to generate at least one of these messages for just about any
1715 \begin_inset Newline newline
1718 You can ignore these messages.
1719 Your eyes will tell you if there's a problem with something that's too
1720 wide; just look at the output.
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in
1726 \begin_inset Flex MenuItem
1729 \begin_layout Plain Layout
1732 \SpecialChar \menuseparator
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1752 \begin_layout Plain Layout
1761 \begin_inset Newline newline
1764 Not quite as common as its cousin.
1765 LaTeX seems to like to print lines that are a bit too wide as opposed to
1766 ones that are a bit too narrow.
1767 We have no idea why.
1770 \begin_layout Itemize
1771 \begin_inset Flex Code
1774 \begin_layout Plain Layout
1783 \begin_inset Flex Code
1786 \begin_layout Plain Layout
1795 \begin_inset Newline newline
1798 Warnings about troubles breaking the page.
1799 Once again, just look at the output.
1800 Your eyes will tell you where something has gone wrong.
1803 \begin_layout Itemize
1804 \begin_inset Flex Code
1807 \begin_layout Plain Layout
1809 \begin_inset Quotes els
1813 \begin_inset Quotes ers
1822 \begin_inset Newline newline
1826 \begin_inset Quotes eld
1830 \begin_inset Quotes erd
1833 isn't installed on this system.
1834 This usually appears because some package your document needs isn't installed.
1835 If you didn't touch the preamble or didn't use the
1836 \begin_inset Flex Code
1839 \begin_layout Plain Layout
1847 command, then one of the packages LyX tried to load is missing.
1849 \begin_inset Flex MenuItem
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1859 to get a list of packages that LyX knows about.
1860 This file is updated whenever you reconfigure LyX (using
1861 \begin_inset Flex MenuItem
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1887 command and the package in question isn't installed, then you'll need to
1888 install it yourself.
1891 \begin_layout Itemize
1892 \begin_inset Flex Code
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1902 \begin_inset Newline newline
1905 Error messages beginning with this are trying to tell you that you specified
1906 a bad or undefined option to a package.
1907 Check the package's documentation.
1910 \begin_layout Itemize
1911 \begin_inset Flex Code
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1921 \begin_inset Newline newline
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1926 You may have forgotten to load a package.
1927 In any case, this error message usually means that you used an undefined
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934 Some are self-explanatory.
1935 These are usually LaTeX messages.
1936 Others are downright cryptic.
1937 These are usually TeX error messages, and we really have
1941 what they mean or how to decipher them.
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959 especially if you see a
1960 \begin_inset Quotes eld
1964 \begin_inset Flex Code
1967 \begin_layout Plain Layout
1976 \begin_inset Quotes erd
1979 error—it means that there are errors in the preamble.
1980 Start debugging your preamble.
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985 to the document, the first suspect is your LaTeX distribution itself.
1986 Check for missing packages and install them.
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991 Did you use any of the fine-tuning options in LyX? Specifically, did you
1996 any of them, like trying to manually insert lots of
1997 \begin_inset Flex Code
2000 \begin_layout Plain Layout
2002 \begin_inset space ~
2011 \begin_inset Flex Code
2014 \begin_layout Plain Layout
2021 \begin_inset Flex Code
2024 \begin_layout Plain Layout
2030 ? Did you try to kludge something together with these instead of using the
2031 appropriate paragraph environment?
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2037 Did you try to pull a fancy maneuver? Did you do something funky inside
2038 a table or an equation, like inserting a graphic into a table cell?
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043 a line? By default, LaTeX is rather strict about how much extra inter-word
2044 spacing it will add in order to break a line.
2045 Preferably, you should rework the paragraph to avoid the problem.
2046 If this isn't an option, you can wrap your text in
2047 \begin_inset Flex Code
2050 \begin_layout Plain Layout
2058 to make LaTeX's line breaking more, well, sloppy.
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063 make sure you're in the limits for nesting environments.
2064 If you nested a bunch of environments to the
2065 \begin_inset Formula $17^{\mathrm{th}}$
2068 level, that's the problem.
2069 (The limit in LaTeX is five.)
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074 If you have a table or figure that's too wide or long for the page, you
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2093 \begin_layout Standard
2094 If all this doesn't help—well, then
2098 you might have found a bug in LyX\SpecialChar \ldots{}
2102 \begin_layout Chapter
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2114 Bibliography databases (BibTeX)
2121 The following subsections explain special bibliography features supported
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2135 \begin_inset space \space{}
2139 \begin_inset Quotes eld
2143 \begin_inset Quotes erd
2146 ) to refer to a cited work.
2147 However, in many scientific disciplines, other citation styles are in use.
2148 The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2153 \begin_inset space \space{}
2157 \begin_inset Quotes eld
2161 \begin_inset Quotes erd
2165 LyX supports two packages that provide this style,
2166 \begin_inset Flex Code
2169 \begin_layout Plain Layout
2176 \begin_inset Flex Code
2179 \begin_layout Plain Layout
2186 Both packages have their pros and cons, which cannot be listed in detail.
2187 If you only want to have simple author-year (or author-numerical) style,
2188 or if you want to use one of the countless style files for
2189 \begin_inset Flex Code
2192 \begin_layout Plain Layout
2198 , then the established
2199 \begin_inset Flex Code
2202 \begin_layout Plain Layout
2208 package is probably your choice.
2209 If you need special features like short title references, ibidem etc., you
2211 \begin_inset Flex Code
2214 \begin_layout Plain Layout
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2226 \begin_inset Flex MenuItem
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2237 \begin_inset Flex MenuItem
2240 \begin_layout Plain Layout
2247 \begin_inset Flex MenuItem
2250 \begin_layout Plain Layout
2257 \begin_inset Flex MenuItem
2260 \begin_layout Plain Layout
2267 With both packages, you will get some extra features in the citation dialog
2268 and you can select the style of the reference (
2269 \begin_inset Quotes eld
2273 \begin_inset Quotes erd
2277 \begin_inset Quotes eld
2281 \begin_inset Quotes erd
2285 \begin_inset Quotes eld
2289 \begin_inset Quotes erd
2293 \begin_inset Quotes eld
2297 \begin_inset Quotes erd
2301 Note that both packages need specifically designed style files.
2302 They both ship their own, but there are lots of additional style files,
2303 and there is even an interactive style file builder
2307 \begin_layout Plain Layout
2309 \begin_inset Flex URL
2312 \begin_layout Plain Layout
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2325 \begin_inset Flex Code
2328 \begin_layout Plain Layout
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343 If you are for instance a historian, the possibility to separate sources
2344 and scientific works is most likely a
2345 \begin_inset Quotes eld
2349 \begin_inset Quotes erd
2353 Unfortunately, BibTeX itself does not allow you to do this.
2354 But with the help of some LaTeX packages, BibTeX can be extended to fit
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages,
2367 \begin_layout Plain Layout
2369 \begin_inset Flex URL
2372 \begin_layout Plain Layout
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2384 The advantage of this package (compared to other packages like
2388 ) is that you don't need to define new citation commands.
2389 Instead, you need to prepare different bibliographic databases which include
2390 the entries for the different sections of the bibliography.
2391 For example: If you want to divide your bibliography into the sections
2393 \begin_inset Quotes eld
2397 \begin_inset Quotes erd
2401 \begin_inset Quotes eld
2405 \begin_inset Quotes erd
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2413 \begin_inset space \space{}
2417 \begin_inset Flex Code
2420 \begin_layout Plain Layout
2427 \begin_inset Flex Code
2430 \begin_layout Plain Layout
2440 \begin_layout Standard
2442 \begin_inset Flex MenuItem
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2453 \begin_inset Flex MenuItem
2456 \begin_layout Plain Layout
2463 \begin_inset Flex MenuItem
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2473 Now you can insert multiple BibTeX bibliographies, one for each section
2474 of your bibliography.
2475 Returning to our example: Insert the BibTeX bibliography
2476 \begin_inset Flex Code
2479 \begin_layout Plain Layout
2485 and a second one for the database
2486 \begin_inset Flex Code
2489 \begin_layout Plain Layout
2496 You are free to use the same or different styles for each section.
2497 Additionally, you can choose if the bibliography section should contain
2499 \begin_inset Quotes eld
2502 all cited references
2503 \begin_inset Quotes erd
2506 of the specified database(s) (which is the default),
2507 \begin_inset Quotes eld
2510 all uncited references
2511 \begin_inset Quotes erd
2515 \begin_inset Quotes eld
2519 \begin_inset Quotes erd
2523 This might be useful if you would like to separate your bibliography into
2525 \begin_inset Quotes eld
2529 \begin_inset Quotes erd
2533 \begin_inset Quotes eld
2537 \begin_inset Quotes erd
2541 \begin_inset Quotes eld
2545 \begin_inset Quotes erd
2549 The titles for the sections can be added as ordinary sections or subsections.
2551 \begin_inset Flex Code
2554 \begin_layout Plain Layout
2560 removes the bibliography title, you have to manually re-add that, too (as
2561 a chapter* or section*, for instance).
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2574 \begin_inset space \space{}
2577 a bibliography for each section or chapter of the document, are not supported
2580 \begin_inset Flex Code
2583 \begin_layout Plain Layout
2589 package, which is used for the creation of sectioned bibliographies in
2590 LyX (see the previous section), provides an easy way to solve this task,
2591 if you are willing to use some
2592 \begin_inset Flex MenuItem
2595 \begin_layout Plain Layout
2602 \begin_inset space ~
2606 \begin_inset CommandInset ref
2608 reference "sec:Inserting-TeX-Code"
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the
2618 \begin_inset Flex Code
2621 \begin_layout Plain Layout
2628 \begin_inset Flex Code
2631 \begin_layout Plain Layout
2637 package, respectively.
2645 \begin_layout Standard
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2658 \begin_inset Flex MenuItem
2661 \begin_layout Plain Layout
2668 \begin_inset Flex MenuItem
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2678 In the document, you have to enclose the sections, which shall contain
2679 their own bibliography (including the BibTeX bibliography itself), between
2681 \begin_inset Flex Code
2684 \begin_layout Plain Layout
2693 \begin_inset Flex Code
2696 \begin_layout Plain Layout
2704 (those commands have to be inserted as TeX code).
2705 The bibliography will contain all references that have been cited in the
2707 \begin_inset Flex Code
2710 \begin_layout Plain Layout
2721 If you are using this approach, then every citation reference has to be
2723 \begin_inset Flex Code
2726 \begin_layout Plain Layout
2734 \begin_inset Flex Code
2737 \begin_layout Plain Layout
2746 \begin_layout Section
2750 \begin_layout Subsection
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756 to break up the document into several files, or perhaps you have something
2757 where a table may change from time to time, but the preceding text does
2759 In these cases, you should seriously consider using multipart documents.
2760 For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762 Each of these could be its own separate LyX file, with one
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2770 file which contains the title, authors, abstract, references, etc., plus
2771 the five included files.
2772 It is important to note that each of these files is a full LyX file which
2773 can be formatted and printed on its own, as well as included in a master
2775 Each of these files must have the same document class, however—don't attempt
2776 to mix book classes with article classes.
2777 You may also include LaTeX files; however, these files must not have their
2779 \begin_inset space \thinspace{}
2783 \begin_inset space \space{}
2786 everything up to and including the
2787 \begin_inset Flex Code
2790 \begin_layout Plain Layout
2799 \begin_inset Flex Code
2802 \begin_layout Plain Layout
2810 line must be deleted) or else errors will be generated when you try to
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with
2816 \begin_inset Flex MenuItem
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2822 \begin_inset space ~
2831 When you click on this selection a small box is inserted into the file
2832 at the current cursor location.
2833 Clicking on the box raises a dialog which allows you to select the file
2834 to be included, and the method of its inclusion.
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840 The three inclusion methods are
2841 \begin_inset Quotes eld
2845 \begin_inset Quotes erd
2849 \begin_inset Quotes eld
2853 \begin_inset Quotes erd
2857 \begin_inset Quotes eld
2861 \begin_inset Quotes erd
2865 The difference between
2866 \begin_inset Quotes eld
2870 \begin_inset Quotes erd
2874 \begin_inset Quotes eld
2878 \begin_inset Quotes erd
2881 is really only meaningful to LaTeXperts, but the practical difference is
2883 \begin_inset Quotes eld
2887 \begin_inset Quotes erd
2890 are typeset beginning on a new page, while files that are
2891 \begin_inset Quotes eld
2895 \begin_inset Quotes erd
2898 are typeset starting on the current page.
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files that do not have
2904 all the preamble information.
2907 \begin_layout Standard
2909 \begin_inset Quotes eld
2913 \begin_inset Quotes erd
2916 included file allows you to include a file typeset exactly as it appears
2918 \begin_inset space \thinspace{}
2922 \begin_inset space \space{}
2926 \begin_inset Flex Code
2929 \begin_layout Plain Layout
2935 mode, with the characters set in a fixed-width typewriter font.
2936 Normally, spaces in this file are invisible, though two consecutive spaces
2937 are conserved, unlike LyX's normal treatment of spaces.
2938 However, setting the
2939 \begin_inset Flex MenuItem
2942 \begin_layout Plain Layout
2944 \begin_inset space ~
2948 \begin_inset space ~
2952 \begin_inset space ~
2960 checkbox typesets a mark to unambiguously define the presence of a space.
2964 \begin_layout Subsection
2965 Cross-References Between Files
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2979 height_special "totalheight"
2982 \begin_layout Plain Layout
2983 This section is somewhat out of date.
2984 Need to describe default master documents and how children are opened when
2994 \begin_layout Standard
2995 It is possible to set up cross-references between the different files.
2996 First, open all the files in question: let's call them A and B in a two
2997 file example, where B is included in A.
2998 Let's say you insert a label in A, then want to reference it in B.
2999 Open the cross-reference dialog whilst in document B, and you can select
3001 \begin_inset Quotes eld
3005 \begin_inset Quotes erd
3011 \begin_layout Subsection
3012 Bibliography Lists in all Subdocuments
3015 \begin_layout Standard
3016 \begin_inset Box Frameless
3026 height_special "totalheight"
3029 \begin_layout Plain Layout
3030 This section also needs updating.
3031 There is now material about this on the wiki, and it could be copied here.
3039 \begin_layout Standard
3040 Copy the bibliography list with all entries to all subdocuments and transform
3042 This way LyX will find the
3043 \begin_inset Flex Code
3046 \begin_layout Plain Layout
3052 -files and you can easily insert references without making the bibliography
3056 \begin_layout Standard
3057 As the bibliography list is in a comment, LaTeX won't use it and the references
3058 will look like this: [?], instead of like this: [1].
3059 One solution is to use the LaTeX-package
3060 \begin_inset Flex Code
3063 \begin_layout Plain Layout
3069 that will only include comments by processing the files separately.
3070 To do this, add in the LaTeX preamble of every subdocument the following:
3073 \begin_layout LyX-Code
3079 \begin_layout LyX-Code
3082 includecomment{comment}
3085 \begin_layout Standard
3087 \begin_inset Flex URL
3090 \begin_layout Plain Layout
3092 http://wiki.lyx.org/FAQ/Unsorted#toc31
3100 \begin_layout Section
3104 \begin_layout Standard
3105 Users sometimes need to be able to
3106 \begin_inset Quotes eld
3110 \begin_inset Quotes erd
3113 a LyX file together with all the images (and other files) on which it depends,
3114 either for sending to a publisher or for sharing with a co-author.
3115 LyX 2.0 includes a Python script (
3116 \begin_inset Flex Code
3119 \begin_layout Plain Layout
3125 ) that automates this process.
3126 To use it, you must have either the
3127 \begin_inset Flex Code
3130 \begin_layout Plain Layout
3137 \begin_inset Flex Code
3140 \begin_layout Plain Layout
3146 python modules installed on your system.
3147 By default, the script prefers the
3148 \begin_inset Flex Code
3151 \begin_layout Plain Layout
3158 \begin_inset Flex Code
3161 \begin_layout Plain Layout
3167 format on Unix-like systems and the
3168 \begin_inset Flex Code
3171 \begin_layout Plain Layout
3180 \begin_layout Standard
3181 LyX's configuration process will set the script up to export a `LyX Archive',
3182 and this format will then be available under
3183 \begin_inset Flex Code
3186 \begin_layout Plain Layout
3187 File\SpecialChar \menuseparator
3196 \begin_layout Standard
3197 Independently of the platform, the generation of a particular archive format
3198 can be forced by adding either the
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3209 \begin_inset Flex Code
3212 \begin_layout Plain Layout
3219 \begin_inset Flex Code
3222 \begin_layout Plain Layout
3229 \begin_inset Flex Code
3232 \begin_layout Plain Layout
3238 format) switch to the
3239 \begin_inset Flex Code
3242 \begin_layout Plain Layout
3243 LyX\SpecialChar \menuseparator
3250 \begin_inset Flex Code
3253 \begin_layout Plain Layout
3254 Tools\SpecialChar \menuseparator
3255 Preferences\SpecialChar \menuseparator
3256 File Handling\SpecialChar \menuseparator
3263 (Make sure you add the switch after the script name, not before it.)
3266 \begin_layout Section
3267 Fancy Headers and Footers
3270 \begin_layout Standard
3271 The default page layout is rather plain; for an
3272 \begin_inset Flex Code
3275 \begin_layout Plain Layout
3281 document class, all you get is a centered page number at the bottom of
3283 This document uses KOMA-script's book class, so it appears to be a bit
3285 But to really put on a show, you need to set the document page style to
3287 \begin_inset Quotes eld
3291 \begin_inset Quotes erd
3294 , as mentioned in the
3299 This section describes the LaTeX code you need to insert in your LaTeX
3300 preamble in order to get the desired effects.
3303 \begin_layout Standard
3304 For more information on fancy headers, see the
3305 \begin_inset Flex Code
3308 \begin_layout Plain Layout
3314 package documentation.
3316 \begin_inset Flex URL
3319 \begin_layout Plain Layout
3321 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3329 \begin_layout Standard
3330 The page header is divided into three fields, not surprisingly labeled
3331 \begin_inset Quotes eld
3335 \begin_inset Quotes erd
3339 \begin_inset Quotes eld
3343 \begin_inset Quotes erd
3347 \begin_inset Quotes eld
3351 \begin_inset Quotes erd
3355 The footer is also divided into these three fields.
3356 The LaTeX commands to set these fields in the simplest manner are
3357 \begin_inset Flex Code
3360 \begin_layout Plain Layout
3369 \begin_inset Flex Code
3372 \begin_layout Plain Layout
3381 \begin_inset Flex Code
3384 \begin_layout Plain Layout
3393 \begin_inset Flex Code
3396 \begin_layout Plain Layout
3405 Suppose you wish to put your name in the upper left hand corner of each
3407 Simply insert the following command in the preamble:
3410 \begin_layout Standard
3419 \begin_layout Standard
3420 You will now see your name in the upper left.
3421 If a field has a default entry that you would like to get rid of (often
3422 the page number appears in the central footer) simply include a command
3423 with a blank argument, e.
3424 \begin_inset space \thinspace{}
3430 \begin_layout Standard
3438 \begin_layout Standard
3439 Let's get really fancy: lets put the section number with the word
3440 \begin_inset Quotes eld
3444 \begin_inset Quotes erd
3448 \begin_inset space \thinspace{}
3452 \begin_inset space \space{}
3455 Section 3) in the upper left, the page number (e.
3456 \begin_inset space \thinspace{}
3460 \begin_inset space \space{}
3463 Page 4) in the upper right, your name in the lower left, and the date in
3465 The following commands should now appear in the preamble:
3468 \begin_layout Standard
3478 \begin_layout Standard
3486 \begin_layout Standard
3496 \begin_layout Standard
3505 \begin_layout Standard
3513 \begin_layout Standard
3523 \begin_layout Standard
3525 \begin_inset Flex Code
3528 \begin_layout Plain Layout
3537 \begin_inset Flex Code
3540 \begin_layout Plain Layout
3548 access LaTeX's section and page counters, and so print out the current
3549 section and page numbers.
3551 \begin_inset Flex Code
3554 \begin_layout Plain Layout
3562 simply prints out today's date.
3565 \begin_layout Standard
3566 The thicknesses of the horizontal rules drawn beneath the header and above
3567 the footer can also be modified.
3568 If you don't want one of the rules, set its thickness to 0.
3569 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3575 \begin_inset Flex Code
3578 \begin_layout Plain Layout
3583 headrulewidth}{0.4pt}
3589 \begin_inset Flex Code
3592 \begin_layout Plain Layout
3597 footrulewidth}{0.4pt}
3602 to set the thicknesses.
3605 \begin_layout Standard
3606 You can switch the header/footer settings on and off for individual pages
3608 \begin_inset Flex Code
3611 \begin_layout Plain Layout
3614 thispagestyle{empty}
3620 \begin_inset Flex Code
3623 \begin_layout Plain Layout
3626 thispagestyle{plain}
3632 \begin_inset Flex Code
3635 \begin_layout Plain Layout
3638 thispagestyle{fancy}
3644 Simply insert them in the text on the page you want changed and mark them
3646 In fact, title pages are marked as plain by default, while following pages
3647 are marked fancy when using the global fancy setting.
3650 \begin_layout Standard
3651 As a final example, it is possible to include an image in the header or
3653 Suppose you want to put a company logo in the upper lefthand corner.
3654 You might try something like
3657 \begin_layout Standard
3666 includegraphics{logo.eps}}}
3669 \begin_layout Standard
3671 (you may need to preface this with
3672 \begin_inset Flex Code
3675 \begin_layout Plain Layout
3679 usepackage{graphics}
3684 if you don't include graphics elsewhere in your document).
3687 \begin_layout Section
3688 Itemize Bullet Selection
3689 \begin_inset CommandInset label
3698 \begin_layout Standard
3704 \begin_layout Subsection
3708 \begin_layout Standard
3709 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3710 Using this dialog you can easily specify what bullet shape to use at each
3711 level of an itemized list.
3712 These settings are document-wide so you won't be able to specify different
3713 sets of bullets for different paragraphs.
3717 \begin_layout Plain Layout
3718 Well, actually you can but you'll have to do it by hand.
3726 \begin_layout Subsection
3730 \begin_layout Standard
3731 Open the dialog by selecting the
3732 \begin_inset Flex MenuItem
3735 \begin_layout Plain Layout
3736 Document\SpecialChar \menuseparator
3742 menu item and then select the
3743 \begin_inset Flex MenuItem
3746 \begin_layout Plain Layout
3755 \begin_layout Standard
3756 The dialog provides you with a table of bullet shapes.
3757 A column of buttons on the left of the table provides access to the six
3758 different panels of bullet shapes.
3759 The row of buttons across the top is used to select which bullet depth
3761 A text entry under the table shows the currently selected bullet shape's
3762 LaTeX equivalent and this can be edited if desired.
3763 If you do modify the text you will also need to specify any needed packages
3764 in the LaTeX preamble.
3767 \begin_layout Standard
3768 The six panels are divided up by the packages they require.
3769 The following table shows the mappings from button name to LaTeX package.
3772 \begin_layout Standard
3774 \begin_inset Tabular
3775 <lyxtabular version="3" rows="7" columns="2">
3776 <features rotate="0" tabularvalignment="middle">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <column alignment="center" valignment="top" width="0pt">
3780 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3783 \begin_layout Plain Layout
3798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3801 \begin_layout Plain Layout
3818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3821 \begin_layout Plain Layout
3836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3839 \begin_layout Plain Layout
3855 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3858 \begin_layout Plain Layout
3873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3876 \begin_layout Plain Layout
3893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3896 \begin_layout Plain Layout
3911 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3914 \begin_layout Plain Layout
3931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3934 \begin_layout Plain Layout
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3952 \begin_layout Plain Layout
3969 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3972 \begin_layout Plain Layout
3987 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3990 \begin_layout Plain Layout
4007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4010 \begin_layout Plain Layout
4025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4028 \begin_layout Plain Layout
4051 \begin_layout Standard
4052 LyX doesn't stop you using bullets from packages you don't have.
4053 If you get errors from LaTeX when you try to view or print the file, then
4054 it is likely you are missing a package.
4058 \begin_layout Plain Layout
4059 LyX doesn't restrict your use since you may be editing locally and exporting
4068 \begin_layout Subsection
4072 \begin_layout Standard
4073 Select which bullet depth you want to change then select the bullet shape
4075 Any changes will not be visible in LyX, but are visible when viewing the
4079 \begin_layout Standard
4080 You can reset a bullet shape to the default simply by clicking your right
4081 mouse button on the appropriate bullet depth button.
4085 \begin_layout Plain Layout
4090 want to have multiple sets of paragraphs with different sets of bullets
4091 in each, then you're going to have to get your hands dirty with TeX code.
4092 The bullet selection dialog can help though because it provides you with
4093 the LaTeX code for a wide range of bullet shapes.
4094 To make your own custom paragraphs you have the following options:
4097 \begin_layout Plain Layout
4101 \begin_layout Plain Layout
4117 \begin_layout Plain Layout
4121 \begin_layout Plain Layout
4143 \begin_layout Itemize
4144 Use the LaTeX command
4145 \begin_inset Flex Code
4148 \begin_layout Plain Layout
4156 to specify a new bullet shape for a given depth.
4157 You'll also need to save the current bullet shape so you can restore it
4159 In this itemized list the following LaTeX code was used to change the bullet
4160 used for the first depth.
4164 \begin_layout LyX-Code
4174 \begin_layout LyX-Code
4191 \begin_layout Itemize
4192 Note that the itemize depth is specified in Roman numerals as part of the
4202 \begin_layout Itemize
4206 \begin_layout Plain Layout
4219 Specify each individual entry by starting each item with the bullet shape
4220 enclosed in square brackets and set as
4221 \begin_inset Flex MenuItem
4224 \begin_layout Plain Layout
4231 For example, this item was started with
4232 \begin_inset Flex Code
4235 \begin_layout Plain Layout
4250 \begin_layout Plain Layout
4254 \begin_layout Plain Layout
4270 \begin_layout Plain Layout
4271 You'll also need to revert the labelitem back to its previous setting for
4272 the global bullet shape settings to remain in effect.
4273 The way used here was:
4276 \begin_layout LyX-Code
4291 \begin_layout Chapter
4292 LyX and the World Wide Web
4295 \begin_layout Standard
4296 LyX has long supported the export of documents to various web-friendly formats,
4298 Before verson 2.0, however, HTML export was always accomplished by the use
4299 of external converters.
4303 \begin_layout Plain Layout
4304 For details on the use of external converters with LyX, see the
4308 section of the Customization manual.
4313 These fall into two large groups: there are converters that use LaTeX as
4314 an intermediate format, such as
4315 \begin_inset Flex Code
4318 \begin_layout Plain Layout
4325 \begin_inset Flex Code
4328 \begin_layout Plain Layout
4335 \begin_inset Flex Code
4338 \begin_layout Plain Layout
4344 , relying upon LyX to produce the LaTeX; and there is a converter that works
4345 directly on LyX files,
4346 \begin_inset Flex Code
4349 \begin_layout Plain Layout
4356 All of these have different advantages and disadvantages.
4360 \begin_layout Standard
4361 The LaTeX-based converters have the advantage that, in principle, they know
4362 everything about the exported document that LaTeX does.
4363 Such converters do not care, for example, if a certain block of code was
4364 produced by LyX or was Evil Red Text.
4365 These converters know about
4366 \begin_inset Flex Code
4369 \begin_layout Plain Layout
4375 files, counters, and references, and can often make use of the
4376 \begin_inset Flex Code
4379 \begin_layout Plain Layout
4385 files generated by BibTeX.
4386 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4387 said that only TeX itself understands TeX---and LaTeX-based converters
4388 will often choke on what seem to be quite simple constructs; complex ones
4389 can throw them completely, and as of this writing, for example, the
4393 manual will not export with
4394 \begin_inset Flex Code
4397 \begin_layout Plain Layout
4403 , though the others will.
4404 The other issue concerns how math is handled.
4405 These converters typically convert the formulae into little pictures that
4406 are then linked from the HTML document.
4407 Since these are actually generated by LaTeX, they are accurate.
4408 But they do not scale well, and just getting them to look as if they are
4409 actually meant to be in your document---so that the font sizes seem to
4410 be roughly the same---can be a challenge.
4413 \begin_layout Standard
4415 \begin_inset Flex Code
4418 \begin_layout Plain Layout
4425 \begin_inset CommandInset href
4427 name "http://elyxer.nongnu.org/"
4428 target "http://elyxer.nongnu.org/"
4432 ) solves some of these problems.
4433 In particular, the formulae it produces scale perfectly, since it renders
4434 math using a combination of HTML and CSS rather than converting the formulae
4436 But even moderately complex formula are rendered less well than with
4437 \begin_inset Flex Code
4440 \begin_layout Plain Layout
4446 ; this reflects the limitations of HTML.
4450 \begin_layout Plain Layout
4452 \begin_inset Flex Code
4455 \begin_layout Plain Layout
4461 can also use jsMath and MathJax for equations, but this setting is only
4462 available globally and requires one to have access to a server that runs
4468 More importantly (as of version 1.1.1, at least),
4469 \begin_inset Flex Code
4472 \begin_layout Plain Layout
4478 has limited support for math macros and no support for user-defined paragraph
4479 or character styles.
4480 These limitations make
4481 \begin_inset Flex Code
4484 \begin_layout Plain Layout
4490 unsuitable for many of the documents LyX users produce.
4491 In principle, of course, these problems could be solved, but the LyX developers
4492 have decided to follow a different path and have made LyX itself capable
4493 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4497 \begin_layout Standard
4498 As of this writing, XHTML output remains under development and should probably
4500 \begin_inset Quotes eld
4504 \begin_inset Quotes erd
4511 \begin_layout Plain Layout
4513 \begin_inset Flex Code
4516 \begin_layout Plain Layout
4517 development/HTML.notes
4522 , which can be found in the LyX source tree or
4523 \begin_inset CommandInset href
4525 name "accessed online"
4526 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4530 , usually contains up-to-date information about the state of XHTML output.
4531 See also the list of XHTML bugs on
4532 \begin_inset CommandInset href
4534 name "the bug tracker"
4535 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"
4544 Still, the developers have chosen this approach because it has several
4545 potential advantages over the other two.
4548 \begin_layout Standard
4549 These advantages are primarily due to the fact that the XHTML output routines,
4550 since they are part of LyX, know everything LyX knows about the document
4555 \begin_layout Plain Layout
4556 Another advantage is that, since these routines are internal to LyX, they
4557 are immune to changes in LyX's file format, or to changes in the semantics
4563 So they know about the table of contents (as displayed in the outline),
4564 about the counters associated with different paragraph styles, and about
4565 user-defined styles.
4566 The XHTML output routines know what LyX knows about internationalization,
4567 too, so they will output
4568 \begin_inset Quotes eld
4572 \begin_inset Quotes erd
4576 \begin_inset Quotes eld
4584 \begin_inset Quotes erd
4587 , depending upon the language in effect at the time.
4591 \begin_layout Standard
4592 Quite generally, the output routines know what LyX knows about document
4593 layout, that is, about how the document is to be rendered on screen.
4594 We use this information when we output the document as XHTML.
4599 generates CSS style information corresponding to the layout information
4600 it uses to render the document on screen: if section headings are supposed
4601 to be sans-serif and bold as seen in LyX, then (by default) they will be
4602 sans-serif and bold when viewed in a web browser, too.
4603 And this is true not just for pre-defined styles, like Section, but for
4604 any style, including user-defined styles.
4605 Indeed, the XHTML output routines make no distinction between user-defined
4606 paragraph and character styles and LyX's own pre-defined styles: in each
4607 case, everything LyX knows about the styles is contained in the layout
4609 And much the same is true as regards pre-defined textual insets, such as
4610 footnotes, and various custom insets.
4614 \begin_layout Standard
4615 The result is that XHTML output can be customized and extended in exactly
4616 the same way LaTeX output can be customized and extended: through layout
4618 See chapter five of the
4622 manual for the details.
4625 \begin_layout Standard
4626 The remainder of this chapter contains more detailed information on XHTML
4627 output, its limitations, and ways to work around those limitations.
4630 \begin_layout Section
4631 Math Output in XHTML
4634 \begin_layout Standard
4635 LyX offers four choices for how math is rendered.
4636 These have various advantages and disadvantages:
4639 \begin_layout Itemize
4641 \begin_inset Newline newline
4644 MathML is a dialect of XML designed specifically for mathematics on the
4645 web, and it typically renders very well in browsers that support it.
4646 The disadvantage is that not all browsers support MathML, and support is
4647 not complete even in the Gecko-based browsers, such as Firefox.
4648 \begin_inset Newline newline
4651 If LyX is unable to render a formula as MathML---for example, if the formula
4653 \begin_inset Flex Code
4656 \begin_layout Plain Layout
4662 package or ERT---then it will instead output the formula as an image.
4666 \begin_layout Itemize
4668 \begin_inset Newline newline
4672 \begin_inset Flex Code
4675 \begin_layout Plain Layout
4681 outputs math as HTML, styled by CSS.
4685 \begin_layout Plain Layout
4686 LyX has borrowed some of the CSS for its HTML output from
4687 \begin_inset Flex Code
4690 \begin_layout Plain Layout
4701 For simple formulae, this can work quite well, though with more complicated
4702 formulae it tends to break down.
4703 Still, this method has the advantage that it is very widely supported and
4704 so it may be appropriate for documents that contain only a little, fairly
4706 \begin_inset Newline newline
4709 If Lyx is unable to render a formula as HTML---for example, if the formula
4711 \begin_inset Flex Code
4714 \begin_layout Plain Layout
4720 package or ERT---then it will instead output the formula as an image.
4724 \begin_layout Itemize
4726 \begin_inset Newline newline
4730 \begin_inset Flex Code
4733 \begin_layout Plain Layout
4739 , LyX will output formulae as images, the very same images, in fact, that
4740 are used for instant preview.
4744 \begin_layout Plain Layout
4745 Instant preview does
4749 have to be on for images to be output, however.
4754 The advantage to this method is that the images are simply generated by
4755 LaTeX, so they are very accurate.
4756 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4757 so they do not scale terribly well, and one cannot copy them, etc.
4758 (As of this writing, there are also problems about equation numbering.
4760 \begin_inset CommandInset href
4763 target "http://www.lyx.org/trac/ticket/6894"
4768 \begin_inset Newline newline
4771 The size of the images can be controlled by setting the
4772 \begin_inset Quotes eld
4776 \begin_inset Quotes erd
4780 \begin_inset Flex MenuItem
4783 \begin_layout Plain Layout
4784 Document\SpecialChar \menuseparator
4785 Settings\SpecialChar \menuseparator
4795 \begin_layout Plain Layout
4796 For those who want to know, this controls the resolution of the image in
4797 dots per inch and is based upon a default of 75 dpi.
4803 \begin_inset Newline newline
4806 If LyX for some reason fails to create an image for a formula (e.g., if a
4807 required LaTeX package is not installed), then it will fall back to outputing
4811 \begin_layout Itemize
4813 \begin_inset Newline newline
4816 Finally, LyX will happily output math as LaTeX.
4817 As well as being the output of last resort, this method can be used with
4819 \begin_inset CommandInset href
4822 target "http://www.math.union.edu/~dpvc/jsMath/"
4826 , which uses JavaScript to render LaTeX embedded in HTML documents.
4827 LyX wraps the LaTeX in either a
4828 \begin_inset Flex Code
4831 \begin_layout Plain Layout
4837 (for inline formulas) or
4838 \begin_inset Flex Code
4841 \begin_layout Plain Layout
4847 (for displayed formulas) with
4848 \begin_inset Flex Code
4851 \begin_layout Plain Layout
4857 , as is required for jsMath.
4860 \begin_layout Standard
4861 One of these output methods must be selected under
4862 \begin_inset Flex MenuItem
4865 \begin_layout Plain Layout
4866 Document\SpecialChar \menuseparator
4867 Settings\SpecialChar \menuseparator
4874 By default, LyX outputs MathML.
4875 This is a document-wide setting, therefore.
4878 \begin_layout Standard
4879 Eventually, LyX will offer the user the option to select an alternate output
4880 method for a particular inset, say, one that isn't being rendered very
4885 \begin_layout Plain Layout
4886 That said, since LyX falls back to images if the inset contains ERT, then
4887 one can force output as an image by putting some harmless ERT into the
4889 \begin_inset Formula $a=b\relax$
4900 \begin_layout Section
4901 Bibliography and Citations
4904 \begin_layout Standard
4905 XHTML output fully supports bibliographies and citations.
4909 \begin_layout Standard
4910 Citation labels are generated by the same machinery that generates LyX's
4911 on-screen labels, so the labels will look in the output much as they do
4912 in LyX, though better.
4913 If you are using numerical citations, then LyX will output numerical labels,
4914 such as [1] or [17], rather than simply showing the citation key in square
4915 brackets, as it does on-screen.
4916 If you are using author-year citations, then LyX will add lowercase letters
4917 to the years, just as BibTeX does, if it finds more than one citation for
4918 a given author-year combination.
4919 The labels will be printed with the bibliography entries.
4920 Note that there is, at present, no way to customize the appearance of the
4921 labels, for example, to choose between square brackets and parentheses.
4924 \begin_layout Standard
4925 Bibliography output is handled by the same machinery that handles the presentati
4926 on of reference information in the citation dialog, so you will see in the
4927 XHTML output pretty much what you would see if you were to look at a given
4928 entry in the citation dialog.
4929 The formatting can be customized in your layout file or, preferably, in
4935 manual for the details.
4938 \begin_layout Standard
4939 The main defect at present is that cross-referenced information is printed
4940 with every entry with which it is associated.
4941 So you can see things like this:
4946 \begin_inset Quotes eld
4949 Context and Logical Form
4950 \begin_inset Quotes erd
4955 Language in Context: Selected Essays
4957 (Oxford: Oxford University Press, 2007), pp.
4963 \begin_inset Quotes eld
4966 Semantics in Context
4967 \begin_inset Quotes erd
4972 Language in Context: Selected Essays
4974 (Oxford: Oxford University Press, 2007), pp.
4978 \begin_layout Standard
4979 This should be fixed before long.
4982 \begin_layout Standard
4983 There is no support at present for sectioned bibliographies.
4984 If you have multiple bibliographies, then LyX will print the same bibliography
4988 \begin_layout Section
4992 \begin_layout Standard
4993 LyX will happily export indexes as XHTML, but with certain limitations at
4997 \begin_layout Standard
4998 Index export will be most reliable when you do not attempt to use the fancy
4999 constructs that are described in the section on indexes in the
5007 \begin_layout Plain Layout
5008 The main issue here is that LyX itself does not really handle these.
5009 It just lets you enter what you would have to enter in raw LaTeX.
5014 We'll describe how they are handled using the subsection headings from
5018 \begin_layout Itemize
5019 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5020 these, but the entries must be separated by
5021 \begin_inset Quotes eld
5025 \begin_inset Quotes erd
5028 , that is, there must be spaces around the exclamation point.
5029 This is because it is otherwise too difficult to check for escaped exclamation
5030 points, ones in math, and so forth.
5033 \begin_layout Itemize
5034 Page Ranges: There is no support at all for page ranges, since these make
5035 no sense with XHMTL.
5036 Instead, you will just get two index entries, one at either end.
5039 \begin_layout Itemize
5040 Cross-referencing: There is no support for cross-referencing.
5041 If LyX finds an entry containing the
5042 \begin_inset Quotes eld
5045 |see\SpecialChar \ldots{}
5047 \begin_inset Quotes erd
5050 construct, it is just dropped, and the rest is treated as an ordinary index
5054 \begin_layout Itemize
5055 Index Entry Order: LyX does support attempts to fix the sorting order.
5056 It will take what is before the first `@' it finds and use that for sorting,
5057 taking what follows the first `@' to be the actual entry.
5058 At present, LyX does not check for escaped `@', so do not try to index
5062 \begin_layout Itemize
5063 Index Entry Layout: You can format entries by using the text style dialog,
5064 or by using any other method available within LyX itself.
5065 There is no support for constructs like:
5066 \begin_inset Quotes eld
5070 \begin_inset Quotes erd
5074 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5075 and everything that follows it.
5078 \begin_layout Itemize
5079 Multiple Indexes: There is no support for multiple indexes.
5080 Rather, all index entries will be printed as one large index.
5081 To avoid our printing several versions of the index, we print only the
5082 main index, so make sure you have one.
5085 \begin_layout Section
5086 Nomenclature and Glossary
5089 \begin_layout Standard
5090 There is at present no support for glossaries.
5091 Adding it would be fairly trivial, and welcome.
5094 \begin_layout Chapter
5098 \begin_layout Section
5102 \begin_layout Standard
5103 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5104 and retrieve information about the LyX internal state.
5105 This is only intended for advanced users, but they should find it useful.
5106 It is by writing to the LyX server, for example, that bibliography managers,
5107 such as JabRef, are able to
5108 \begin_inset Quotes eld
5112 \begin_inset Quotes erd
5118 \begin_layout Section
5119 Starting the LyX Server
5122 \begin_layout Standard
5123 The LyX server works through the use of a pair of named pipes.
5124 These are usually located in
5125 \begin_inset Flex Code
5128 \begin_layout Plain Layout
5134 , (except on Windows, where
5138 named pipes are special objects located in
5139 \begin_inset Flex Code
5142 \begin_layout Plain Layout
5154 ) and have the names
5155 \begin_inset Quotes eld
5159 \begin_inset Flex Code
5162 \begin_layout Plain Layout
5169 \begin_inset Quotes erd
5173 \begin_inset Quotes eld
5177 \begin_inset Flex Code
5180 \begin_layout Plain Layout
5187 \begin_inset Quotes erd
5191 External programs write into
5192 \begin_inset Flex Code
5195 \begin_layout Plain Layout
5201 and read back data from
5202 \begin_inset Flex Code
5205 \begin_layout Plain Layout
5212 The stem of the pipe names can be defined in the
5213 \begin_inset Flex MenuItem
5216 \begin_layout Plain Layout
5217 Tools\SpecialChar \menuseparator
5224 \begin_inset Flex Code
5227 \begin_layout Plain Layout
5228 "/home/myhome/lyxpipe"
5234 \begin_inset Flex Code
5237 \begin_layout Plain Layout
5251 on Windows (but any working path can be used).
5256 configure this manually in order for the server to start.
5259 \begin_layout Standard
5261 \begin_inset Flex Code
5264 \begin_layout Plain Layout
5271 \begin_inset Flex Code
5274 \begin_layout Plain Layout
5280 ' to create the pipes.
5281 If one of the pipes already exists, LyX will assume that another LyX process
5282 is already running and will not start the server.
5283 On POSIX (Unix like) systems, if for some other reason, an unused
5284 \begin_inset Quotes eld
5288 \begin_inset Quotes erd
5291 pipe is left in existence when LyX closes, then LyX will try to delete
5293 If this fails for some reason, you will need to delete the pipes manually
5294 and then restart LyX.
5295 On Windows, pipes are deleted by the OS on program termination or crash,
5297 \begin_inset Quotes eld
5301 \begin_inset Quotes erd
5304 pipes should not be possible.
5307 \begin_layout Standard
5308 To have several LyX processes with servers at the same time, you have to
5309 use different configurations, perhaps by using separate user directories,
5311 \begin_inset Flex Code
5314 \begin_layout Plain Layout
5320 file, for each process.
5323 \begin_layout Standard
5324 If you are developing a client program, you might find it useful to enable
5325 debugging information from the LyX server.
5326 Do this by starting LyX as
5327 \begin_inset Flex Code
5330 \begin_layout Plain Layout
5339 \begin_layout Standard
5340 You can find a complete example client written in C in the source distribution
5342 \begin_inset Flex Code
5345 \begin_layout Plain Layout
5346 development/lyxserver/server_monitor.c
5354 \begin_layout Standard
5355 Another useful tool is the command-line based clientfound in
5356 \begin_inset Flex Code
5359 \begin_layout Plain Layout
5360 src/client/lyxclient
5368 \begin_layout Section
5369 Normal communication
5372 \begin_layout Standard
5373 To issue a LyX call, the client writes a line of ASCII text into the input
5375 This line has the following format:
5392 \begin_layout Description
5393 clientname is a name that the client can choose arbitrarily.
5394 Its only use is that LyX will echo it if it sends an answer—so a client
5395 can dispatch results from different requesters.
5398 \begin_layout Description
5399 function is the function you want LyX to perform.
5400 It is the same as the commands you'd use in the minibuffer.
5403 \begin_layout Description
5404 argument is an optional argument which is meaningful only to some functions
5406 \begin_inset Quotes eld
5410 \begin_inset Quotes erd
5413 LFUN will insert the argument as text at the cursor position).
5416 \begin_layout Standard
5417 The answer from LyX will arrive in the output pipe and be of the form
5434 \begin_layout Standard
5443 are just echoed from the command request, while
5447 is more or less useful information filled according to how the command
5448 execution worked out.
5449 Some commands, such as
5450 \begin_inset Quotes eld
5454 \begin_inset Quotes erd
5457 , will return information about the internal state of LyX, while other will
5458 return an empty data-response.
5459 This means that the command execution went fine.
5462 \begin_layout Standard
5463 In case of errors, the response from LyX will have this form
5480 \begin_layout Standard
5485 should contain an explanation of why the command failed.
5488 \begin_layout Standard
5492 \begin_layout LyX-Code
5493 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5494 \begin_inset Newline newline
5497 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5501 read a <~/.lyxpipe.out
5502 \begin_inset Newline newline
5508 \begin_layout Section
5512 \begin_layout Standard
5513 LyX can notify clients of events going on asynchronously.
5514 Currently it will only do this if the user binds a key sequence with the
5516 \begin_inset Quotes eld
5520 \begin_inset Quotes erd
5524 The format of the string LyX sends is as follows:
5528 \begin_inset Flex Code
5531 \begin_layout Plain Layout
5542 \begin_layout Standard
5547 is the printed representation of the key sequence that was actually typed
5551 \begin_layout Standard
5552 This mechanism can be used to extend LyX's command set and implement macros.
5553 Bind some key sequence to
5554 \begin_inset Quotes eld
5558 \begin_inset Quotes erd
5562 Then start a client that listens on the output pipe, dispatches the command
5563 according to the sequence, and starts a function that may use LyX calls
5564 and LyX requests to issue a command or a series of commands to LyX.
5567 \begin_layout Section
5568 The simple LyX Server Protocol
5571 \begin_layout Standard
5572 LyX implements a simple protocol that can be used for session management.
5573 All messages are of the form
5586 \begin_layout Standard
5592 \begin_inset Quotes eld
5596 \begin_inset Quotes erd
5600 \begin_inset Quotes eld
5604 \begin_inset Quotes erd
5609 \begin_inset Quotes eld
5613 \begin_inset Quotes erd
5616 is received from a client, LyX will report back to inform the client that
5617 it's listening to it's messages, while
5618 \begin_inset Quotes eld
5622 \begin_inset Quotes erd
5625 sent from LyX will inform clients that LyX is closing.
5628 \begin_layout Section
5629 Reverse DVI/PDF search
5632 \begin_layout Standard
5633 Some DVI/PDF viewers
5637 \begin_layout Plain Layout
5638 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5639 Skim on Mac OSX and SumatraPDF on Windows.
5648 facility (also called
5653 This means that you can tell LyX to put the cursor to a specific line in
5654 the document by clicking at the respective position in the DVI/PDF output.
5655 To achieve this, the viewer must be able to communicate with LyX.
5656 This is done via the LyX server either by using the named pipe (
5660 ), or the UNIX domain socket (
5664 ) that LyX creates in its temporary directory (this is the way the
5665 \begin_inset Flex Code
5668 \begin_layout Plain Layout
5674 program communicates with LyX).
5675 In some cases, you need a helper script that mediates between the viewer
5676 and LyX, in others, the viewer can communicate with LyX directly.
5677 This depends on the selected viewer and on your operating system.
5678 The same applies to the way viewers need to be configured and the way the
5679 reverse search is actually performed.
5680 In what follows, we will thus describe how to setup reverse search for
5682 Before we turn to this, though, we will explain what needs to be done generally
5683 to enable reverse search in the DVI/PDF output.
5686 \begin_layout Subsection
5688 \begin_inset CommandInset label
5690 name "sub:rev-search"
5697 \begin_layout Standard
5698 In most cases LyX will do the work for you by enabling the option
5699 \begin_inset Flex MenuItem
5702 \begin_layout Plain Layout
5703 Synchronize with Output
5709 \begin_inset Flex MenuItem
5712 \begin_layout Plain Layout
5713 Document\SpecialChar \menuseparator
5714 Settings\SpecialChar \menuseparator
5721 In such a case LyX will automatically insert the necessary SyncTeX macro
5722 (for PDF) or load the srcltx package (for DVI) respectively.
5723 This option can be easily reached also on
5724 \begin_inset Flex Code
5727 \begin_layout Plain Layout
5736 \begin_layout Standard
5737 If you need a different setting, you can select or input a custom macro
5738 from the drop down box just below
5739 \begin_inset Flex MenuItem
5742 \begin_layout Plain Layout
5743 Document\SpecialChar \menuseparator
5744 Settings\SpecialChar \menuseparator
5745 Output\SpecialChar \menuseparator
5746 Synchronize with Output
5754 \begin_layout Standard
5755 Note that the method
5756 \begin_inset Flex Code
5759 \begin_layout Plain Layout
5767 enables gzip compression.
5768 If your viewer does not support it, you should instead use
5769 \begin_inset Flex Code
5772 \begin_layout Plain Layout
5783 \begin_layout Standard
5784 Please aöso note that including the
5785 \begin_inset Flex Code
5788 \begin_layout Plain Layout
5795 \begin_inset Flex Code
5798 \begin_layout Plain Layout
5804 sometimes has an undesired impact on the typesetting.
5805 Thus, you should switch output synchronization off for the final typesetting
5807 \begin_inset Flex Code
5810 \begin_layout Plain Layout
5817 \begin_inset Flex Code
5820 \begin_layout Plain Layout
5830 \begin_layout Standard
5831 In case you need some more special settings that are not covered by the
5832 automatic settings, read the next section about how to set up output synchroniz
5834 If the automatic setup suits your needs, you can readily jump to section
5835 \begin_inset space ~
5839 \begin_inset CommandInset ref
5841 reference "sub:configuring-viewers"
5845 , where the necessary configuration steps in your viewer -- needed both
5846 with the automatic and the manual setup -- are described.
5849 \begin_layout Subsection
5853 \begin_layout Standard
5854 LaTeX provides several different methods for reverse search.
5855 Some are built-in in the
5856 \begin_inset Flex Code
5859 \begin_layout Plain Layout
5865 program, some are provided by external packages.
5866 Your choice depends on whether your LaTeX distribution already provides
5867 a given method (the built-in methods are rather new) and whether your viewer
5869 The available methods are described in the following.
5872 \begin_layout Subsubsection*
5873 Built-in DVI-search via src-specials (DVI only)
5876 \begin_layout Standard
5877 This method provides the DVI file with the necessary information for reverse
5879 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5880 distribution should include it), and it works reliably.
5881 To enable it, change the
5882 \begin_inset Flex MenuItem
5885 \begin_layout Plain Layout
5890 \begin_layout Plain Layout
5903 \begin_inset Flex MenuItem
5906 \begin_layout Plain Layout
5911 \begin_layout Plain Layout
5918 eX (plain)->DraftDVI
5924 \begin_inset Flex MenuItem
5927 \begin_layout Plain Layout
5928 Preferences\SpecialChar \menuseparator
5929 File Handling\SpecialChar \menuseparator
5936 \begin_inset Flex Code
5939 \begin_layout Plain Layout
5940 latex -src-specials $$i
5946 If this doesn't work, check if your TeX engine needs different options
5947 (the syntax might differ in some distributions).
5950 \begin_layout Subsubsection*
5951 External Packages (PDFSync and scrltx)
5954 \begin_layout Standard
5963 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5965 In order to enable it, load the packages in the LyX preamble:
5968 \begin_layout Itemize
5969 \begin_inset Flex Code
5972 \begin_layout Plain Layout
5980 for reverse PDF search,
5983 \begin_layout Itemize
5984 \begin_inset Flex Code
5987 \begin_layout Plain Layout
5990 usepackage[active]{srcltx}
5995 for reverse DVI search.
5998 \begin_layout Standard
5999 If you want to be able to perform both DVI and PDF reverse searches, you
6000 can also insert in the preamble the following lines
6003 \begin_layout LyX-Code
6007 \begin_inset Newline newline
6013 \begin_inset Newline newline
6019 \begin_inset Newline newline
6025 \begin_inset Newline newline
6030 usepackage[active]{srcltx}
6031 \begin_inset Newline newline
6039 \begin_layout Standard
6040 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6041 right package will be used.
6044 \begin_layout Standard
6045 Note that PDFSync might affect the output layout of your document.
6046 It is therefore advised to disable PDFsync for final documents.
6049 \begin_layout Subsubsection*
6050 Built-in reverse search via SyncTeX (DVI and PDF)
6053 \begin_layout Standard
6055 \begin_inset Flex Code
6058 \begin_layout Plain Layout
6064 have built-in support for both PDF and DVI reverse search.
6069 facility is basically the result of the integration of the PDFSync package
6070 to the pdftex program and its merge with the
6075 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6077 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6078 already provide SyncTeX support.
6081 \begin_layout Standard
6082 To enable SyncTeX for DVI output, change the
6083 \begin_inset Flex MenuItem
6086 \begin_layout Plain Layout
6091 \begin_layout Plain Layout
6104 \begin_inset Flex MenuItem
6107 \begin_layout Plain Layout
6112 \begin_layout Plain Layout
6119 eX (plain) -> DraftDVI
6125 \begin_inset Flex MenuItem
6128 \begin_layout Plain Layout
6129 Preferences\SpecialChar \menuseparator
6130 File Handling\SpecialChar \menuseparator
6137 \begin_inset Flex Code
6140 \begin_layout Plain Layout
6141 latex -synctex=1 $$i
6146 , and for PDF output, change the
6147 \begin_inset Flex MenuItem
6150 \begin_layout Plain Layout
6155 \begin_layout Plain Layout
6162 eX (pdflatex) -> PDF (pdflatex)
6168 \begin_inset Flex Code
6171 \begin_layout Plain Layout
6172 pdflatex -synctex=1 $$i
6178 Check the documentation of your viewer whether the viewer needs to be configure
6179 d for the use with SyncTeX.
6183 \begin_layout Plain Layout
6184 Note that the option
6185 \begin_inset Flex Code
6188 \begin_layout Plain Layout
6194 option enables gzip compression.
6195 If your viewer does not support it, you should instead use
6196 \begin_inset Flex Code
6199 \begin_layout Plain Layout
6213 \begin_layout Subsection
6214 Configuring and using specific viewers
6215 \begin_inset CommandInset label
6217 name "sub:configuring-viewers"
6224 \begin_layout Subsubsection*
6225 Xdvi (all platforms)
6228 \begin_layout Standard
6230 \begin_inset Flex Code
6233 \begin_layout Plain Layout
6239 , you don't need to do anything else for performing a reverse DVI search,
6240 as LyX already provides the necessary hooks for automatically using the
6242 \begin_inset Flex Code
6245 \begin_layout Plain Layout
6252 Just setup your document as described above (reverse search is triggered
6253 by Ctrl-click or Alt-click on Mac OSX, respectively).
6256 \begin_layout Standard
6257 However, if for whatever reason you want to use the named pipe instead of
6258 the socket for communicating with LyX, simply change the DVI viewer in
6260 \begin_inset Flex MenuItem
6263 \begin_layout Plain Layout
6264 Preferences\SpecialChar \menuseparator
6265 File Handling\SpecialChar \menuseparator
6275 \begin_layout Plain Layout
6276 On Mac OSX you have to use
6277 \begin_inset Flex Code
6280 \begin_layout Plain Layout
6281 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6292 \begin_inset Flex Code
6295 \begin_layout Plain Layout
6296 xdvi -editor 'lyxeditor.sh %f %l'
6302 \begin_inset Flex Code
6305 \begin_layout Plain Layout
6311 is a suitable script.
6312 For example, a minimal shell script is the following one:
6315 \begin_layout LyX-Code
6317 \begin_inset Newline newline
6320 LYXPIPE="/path/to/lyxpipe"
6321 \begin_inset Newline newline
6324 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6325 \begin_inset Newline newline
6328 echo "$COMMAND" > "${LYXPIPE}".in || exit
6329 \begin_inset Newline newline
6332 read < "${LYXPIPE}".out || exit
6335 \begin_layout Standard
6337 \begin_inset Flex Code
6340 \begin_layout Plain Layout
6350 \begin_layout Plain Layout
6357 XServer pipe path specified in
6358 \begin_inset Flex MenuItem
6361 \begin_layout Plain Layout
6362 Preferences\SpecialChar \menuseparator
6372 \begin_layout Plain Layout
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6383 folder of a source distribution you can find a
6384 \begin_inset Flex Code
6387 \begin_layout Plain Layout
6393 script which is able to locate the
6397 based on your preferences.
6405 \begin_layout Subsubsection*
6409 \begin_layout Standard
6411 \begin_inset Flex Code
6414 \begin_layout Plain Layout
6415 /Applications/MacDviX_Folder/calleditor.script
6420 , add the following lines:
6423 \begin_layout LyX-Code
6428 \begin_layout Plain Layout
6435 X.app/Contents/MacOS/lyxeditor "$2" $1
6436 \begin_inset Newline newline
6442 \begin_layout Standard
6443 Modify the lines accordingly if you install LyX somewhere else than in the
6444 Applications folder.
6447 \begin_layout Standard
6448 Reverse search is triggered by Alt-click (OPTION-click).
6451 \begin_layout Subsubsection*
6455 \begin_layout Standard
6457 \begin_inset Flex Code
6460 \begin_layout Plain Layout
6461 open -a Skim.app $$i
6466 to the viewer setting in
6467 \begin_inset Flex MenuItem
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6472 File Handling\SpecialChar \menuseparator
6473 File formats\SpecialChar \menuseparator
6480 \begin_inset Flex MenuItem
6483 \begin_layout Plain Layout
6484 Skim\SpecialChar \menuseparator
6485 Preferences\SpecialChar \menuseparator
6492 \begin_inset Flex MenuItem
6495 \begin_layout Plain Layout
6501 preset and enter command
6502 \begin_inset Flex MenuItem
6505 \begin_layout Plain Layout
6506 /Applications/LyX.app/Contents/MacOS/lyxeditor
6514 \begin_layout Standard
6515 Reverse search is triggered by COMMAND-SHIFT-click
6518 \begin_layout Subsubsection*
6522 \begin_layout Standard
6524 \begin_inset Flex MenuItem
6527 \begin_layout Plain Layout
6528 Settings\SpecialChar \menuseparator
6529 Configure Okular\SpecialChar \ldots{}
6530 \SpecialChar \menuseparator
6537 \begin_inset Quotes eld
6541 \begin_inset Quotes erd
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6557 \begin_layout Standard
6558 Reverse search is triggered by SHIFT-click.
6561 \begin_layout Subsubsection*
6565 \begin_layout Standard
6566 Launch yap, choose its
6567 \begin_inset Flex MenuItem
6570 \begin_layout Plain Layout
6571 View\SpecialChar \menuseparator
6578 \begin_inset Quotes eld
6582 \begin_inset Quotes erd
6587 \begin_inset Quotes eld
6590 New\SpecialChar \ldots{}
6592 \begin_inset Quotes erd
6595 button and, in the window that opens, enter
6596 \begin_inset Quotes eld
6600 \begin_inset Quotes erd
6603 (or any other name you like) in the
6604 \begin_inset Quotes eld
6608 \begin_inset Quotes erd
6612 Now click on the button labeled
6613 \begin_inset Quotes eld
6616 \SpecialChar \ldots{}
6618 \begin_inset Quotes erd
6621 to open a file dialog and navigate to the directory containing the batch
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6634 \begin_inset Flex Code
6637 \begin_layout Plain Layout
6643 and then specify the program arguments as
6644 \begin_inset Flex Code
6647 \begin_layout Plain Layout
6655 \begin_inset Flex Code
6658 \begin_layout Plain Layout
6664 wrapper is used for communicating with LyX through the
6671 \begin_layout LyX-Code
6673 \begin_inset Newline newline
6676 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6685 \begin_inset Newline newline
6699 \begin_layout Standard
6700 Make sure that the LyXServer pipe path you specified in LyX is
6701 \begin_inset Flex Code
6704 \begin_layout Plain Layout
6718 , otherwise change the
6719 \begin_inset Flex Code
6722 \begin_layout Plain Layout
6728 wrapper accordingly.
6731 \begin_layout Standard
6732 In yap, reverse search is triggered by double-click.
6735 \begin_layout Subsubsection*
6736 SumatraPDF (Windows)
6739 \begin_layout Standard
6740 In order to use SumatraPDF for inverse search, enter
6741 \begin_inset Flex Code
6744 \begin_layout Plain Layout
6745 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6750 in the viewer setting in
6751 \begin_inset Flex MenuItem
6754 \begin_layout Plain Layout
6755 Preferences\SpecialChar \menuseparator
6756 File Handling\SpecialChar \menuseparator
6757 File formats\SpecialChar \menuseparator
6764 \begin_inset Flex Code
6767 \begin_layout Plain Layout
6773 is the previous wrapper.
6774 If SumatraPDF.exe is not in your command PATH, use its full file name.
6777 \begin_layout Standard
6778 Reverse search is triggered by double-click.
6781 \begin_layout Subsubsection*
6785 \begin_layout Standard
6786 First of all, make sure that yap is your default DVI viewer in the Windows
6787 environment, then launch it, choose its
6788 \begin_inset Flex MenuItem
6791 \begin_layout Plain Layout
6792 View\SpecialChar \menuseparator
6799 \begin_inset Quotes eld
6803 \begin_inset Quotes erd
6808 \begin_inset Quotes eld
6811 New\SpecialChar \ldots{}
6813 \begin_inset Quotes erd
6816 button and, in the window that opens, enter
6817 \begin_inset Quotes eld
6821 \begin_inset Quotes erd
6824 (or any other name you like) in the
6825 \begin_inset Quotes eld
6829 \begin_inset Quotes erd
6833 Now click on the button labeled
6834 \begin_inset Quotes eld
6837 \SpecialChar \ldots{}
6839 \begin_inset Quotes erd
6842 to open a file dialog and navigate to the directory containing the
6843 \begin_inset Flex Code
6846 \begin_layout Plain Layout
6852 program (which is installed by default on Cygwin along with the LyX executable).
6854 \begin_inset Flex Code
6857 \begin_layout Plain Layout
6863 and then specify the program arguments as
6864 \begin_inset Flex Code
6867 \begin_layout Plain Layout
6874 In this way, you will be using the
6878 for communicating with LyX.
6879 If, for whatever reason, you want to use the
6884 \begin_inset Flex Code
6887 \begin_layout Plain Layout
6893 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6896 \begin_layout Standard
6897 In yap, reverse search is triggered by double-click.
6900 \begin_layout Subsubsection*
6904 \begin_layout Standard
6905 In order to use SumatraPDF for inverse search, enter
6906 \begin_inset Flex Code
6909 \begin_layout Plain Layout
6910 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6915 in the viewer setting in
6916 \begin_inset Flex MenuItem
6919 \begin_layout Plain Layout
6920 Preferences\SpecialChar \menuseparator
6921 File Handling\SpecialChar \menuseparator
6922 File formats\SpecialChar \menuseparator
6929 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6931 \begin_inset Flex Code
6934 \begin_layout Plain Layout
6940 enables communication via the
6946 \begin_inset Flex Code
6949 \begin_layout Plain Layout
6955 option if you want to use the
6959 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6962 \begin_layout Standard
6963 Reverse search is triggered by double-click.
6966 \begin_layout Section
6970 \begin_layout Standard
6971 Forward search is, as the name implies, in a sense the
6972 \begin_inset Quotes eld
6976 \begin_inset Quotes erd
6980 It allows you to let the viewer jump to a given position from within LyX.
6981 If forward search is set up (as described in what follows), you can put
6982 the cursor anywhere in your LyX document, and hit
6983 \begin_inset Flex MenuItem
6986 \begin_layout Plain Layout
6987 Navigate\SpecialChar \menuseparator
6994 \begin_inset Flex MenuItem
6997 \begin_layout Plain Layout
7003 in the context menu via right mouse click), and then the viewer will jump
7004 to that position as well.
7005 This implies, of course, that your viewer supports this function.
7008 \begin_layout Standard
7009 To make forward search possible, you first need to provide the generated
7010 output PDF/DVI file with additional information about the TeX sources.
7011 This can be done via the methods described in the section
7012 \begin_inset CommandInset ref
7014 reference "sub:rev-search"
7021 \begin_layout Standard
7022 Additionally, you need to configure LyX for using your viewers in
7023 \begin_inset Flex MenuItem
7026 \begin_layout Plain Layout
7027 Tools\SpecialChar \menuseparator
7028 Preferences\SpecialChar \menuseparator
7029 Output\SpecialChar \menuseparator
7036 We provide a range of tested configurations for some viewers, which you
7037 can select from the drop down list.
7038 If none of these configurations suits you, you have to find out and enter
7039 a suitable configuration yourself.
7040 The definition syntax uses the following placeholders:
7043 \begin_layout Itemize
7045 \begin_inset Flex Code
7048 \begin_layout Plain Layout
7057 \begin_layout Itemize
7059 \begin_inset Flex Code
7062 \begin_layout Plain Layout
7068 : name of the (temporary) exported .tex file (without path)
7071 \begin_layout Itemize
7073 \begin_inset Flex Code
7076 \begin_layout Plain Layout
7082 : name of the (temporary) exported .tex file (including path)
7085 \begin_layout Itemize
7087 \begin_inset Flex Code
7090 \begin_layout Plain Layout
7096 : name of the exported output file (either dvi or pdf, depending on which
7097 one exists in the temporary directory)
7100 \begin_layout Standard
7101 Note that only some of the viewers provide full forward search functionality,
7102 among them yap, xdvi, okular and Sumatra PDF.
7106 \begin_layout Plain Layout
7107 For Sumatra CMCDDE is needed --- downloadable from
7108 \begin_inset CommandInset href
7110 target "http://www.istri.fr/zip/CMCDDE.zip"
7119 While many of the widespread PDF viewers (most notably Adobe Reader) do
7120 not support forward search at all, some other viewers -- e.
7121 \begin_inset space \thinspace{}
7125 evince and xpdf -- allow at least to reload the document and jump to a
7126 specific page of the file, so you can at least navigate
7127 \begin_inset Quotes eld
7131 \begin_inset Quotes erd
7135 This latter functionality is provided by an external call of synctex (see
7136 the predefined example configurations).
7140 \begin_layout Standard
7141 Forward search works both with DVI and PDF output.
7142 LyX simply checks which preview format you have used before (i.
7143 \begin_inset space \thinspace{}
7146 e., which format is already there in the temporary directory) and chooses
7147 the appropriate configuration for the respective format.
7150 \begin_layout Chapter
7151 Special Document Classes
7154 \begin_layout Section
7158 \begin_layout Standard
7164 \begin_layout Subsection
7168 \begin_layout Standard
7169 This section describes how LyX can be used to write articles for submission
7170 to the scientific journal
7172 Astronomy and Astrophysics
7174 (www.edpsciences.fr/aa/
7175 \begin_inset Flex URL
7178 \begin_layout Plain Layout
7180 http://www.edpsciences.fr/aa/
7185 ) using Version 5.01 of the document class
7190 This package can be downloaded from the ftp site
7193 \begin_layout Standard
7194 \begin_inset VSpace medskip
7200 \begin_layout Standard
7202 \begin_inset Flex URL
7205 \begin_layout Plain Layout
7207 ftp://ftp.edpsciences.org/pub/aa/readme.html
7215 \begin_layout Standard
7216 \begin_inset VSpace medskip
7222 \begin_layout Standard
7223 A manual comes together with that package, and this text is not meant to
7224 replace the original manual but is merely a short guide in how to realize
7225 the correct form of your paper.
7229 \begin_layout Standard
7230 Please note that the publisher of the journal was changed from Springer
7231 to EDP Sciences starting January 1, 2001.
7232 That change involved also some slight changes to the style files, namely
7233 the removal of the thesaurus command.
7234 The LyX class aa supports the newest version of these style files, V 5.01.
7235 If you have an older version installed, please upgrade.
7236 For compatibility, the old (version 4) layout has been kept as
7241 Please refer to the comments in
7243 LyXDir/layouts/aapaper.layout
7248 \begin_layout Subsection
7252 \begin_layout Standard
7253 It is recommended you start from the example template distributed with LyX.
7254 If you are not using a template, note the following settings:
7257 \begin_layout Itemize
7264 Document\SpecialChar \menuseparator
7267 dialog (OK, that one was obvious).
7270 \begin_layout Itemize
7271 Don't change the option
7274 \begin_inset space ~
7284 The whole layout is done by the macros, you shouldn't change anything.
7287 \begin_layout Subsection
7291 \begin_layout Standard
7292 First thing to enter is the header information.
7293 It consists of seven entries, of which some are optional.
7297 \begin_layout Itemize
7305 \begin_layout Itemize
7313 \begin_layout Itemize
7321 \begin_layout Itemize
7329 \begin_layout Itemize
7334 : [optional] if more than one author: whom to contact for offprint requests.
7337 \begin_layout Itemize
7342 : [optional] mail address for contacts.
7345 \begin_layout Itemize
7353 Received: <date>; Accepted <date>
7356 \begin_layout Standard
7357 There is no need to issue the
7363 command, this is done automatically by LyX when the header is finished.
7364 Although the order of the single header entries doesn't matter it is advised
7365 to keep the above sequence, just to get the best optics and meets the layout
7366 of the real document.
7369 \begin_layout Standard
7370 If you want to place footnotes in the header block, e.
7371 \begin_inset space \thinspace{}
7375 \begin_inset space \space{}
7378 to state your present address, just use the standard footnote via the menu
7381 Insert\SpecialChar \menuseparator
7385 LyX will automagically use the term
7394 \begin_layout Standard
7395 In addition to these topics, the macros use three additional LaTeX commands
7396 that have no counterpart in LyX:
7399 \begin_layout Itemize
7406 to separate different names for more than one author and institute, respectivel
7410 \begin_layout Itemize
7417 to mark corresponding author/institute pairs.
7418 The institutes are numbered sequentially as they appear in the
7422 field, so you have to put a marker to each author.
7425 \begin_layout Itemize
7432 to supply an email address for fast contact.
7435 \begin_layout Standard
7436 In all cases, the appropriate command has to be entered in LyX and marked
7442 \begin_layout Subsection
7446 \begin_layout Standard
7447 The abstract should immediately follow the header block.
7448 With version 5 the abstract environment was changed to a command, and there
7449 is now a resctriction to only one paragraph.
7450 In addition, it should contain an entry with the keywords.
7451 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7458 by hand and mark it as LaTeX code.
7459 Refer to the example paper.
7462 \begin_layout Subsection
7463 Supported environments
7466 \begin_layout Standard
7467 The A&A paper layout supports the following environments for structuring
7471 \begin_layout Itemize
7477 \begin_layout Itemize
7483 \begin_layout Itemize
7489 \begin_layout Itemize
7495 \begin_layout Itemize
7501 \begin_layout Itemize
7507 \begin_layout Itemize
7513 \begin_layout Itemize
7519 \begin_layout Itemize
7525 \begin_layout Itemize
7531 \begin_layout Itemize
7537 \begin_layout Itemize
7543 \begin_layout Subsection
7544 Commands not supported by LyX
7547 \begin_layout Standard
7548 Some commands are not yet supported by the
7553 Some have already been mentioned.
7554 For the sake of completeness, they are listed all together here:
7557 \begin_layout Itemize
7565 \begin_layout Itemize
7573 \begin_layout Itemize
7581 \begin_layout Itemize
7589 \begin_layout Itemize
7597 \begin_layout Itemize
7605 \begin_layout Itemize
7613 \begin_layout Itemize
7621 \begin_layout Standard
7622 If you want to use any of these commands, you have to enter them yourself.
7625 Do not forget to mark them as LaTeX code!
7628 \begin_layout Subsection
7629 Figure and Table Floats
7632 \begin_layout Standard
7633 LyX provides support for the necessary float environments
7635 figure, figure*, table
7641 , therefore we won't tell much about it here.
7645 \begin_inset space ~
7651 Just remember that tables should be left-aligned.
7652 For that, select the table and change the alignment in
7654 Edit\SpecialChar \menuseparator
7656 \begin_inset space ~
7662 \begin_layout Standard
7663 There is only one special thing: the figures with caption besides the figure.
7664 To create such a figure, you have to do the following:
7667 \begin_layout Enumerate
7668 Create a wide figure float:
7670 Insert\SpecialChar \menuseparator
7671 Float\SpecialChar \menuseparator
7674 , then right click in the figure and select
7680 \begin_inset space ~
7688 \begin_layout Enumerate
7689 Enter your caption text.
7692 \begin_layout Enumerate
7697 to move the cursor above the caption.
7700 \begin_layout Enumerate
7704 \begin_layout Enumerate
7705 Position the cursor behind the figure and insert a horizontal fill:
7707 Insert\SpecialChar \menuseparator
7709 \begin_inset space ~
7712 Character\SpecialChar \menuseparator
7714 \begin_inset space ~
7722 \begin_layout Enumerate
7723 Switch to LaTeX mode:
7726 \begin_inset space ~
7734 \begin_layout Enumerate
7744 Do not close the brace!
7747 \begin_layout Enumerate
7748 Position the cursor behind the caption text, switch to LaTeX mode and insert
7752 \begin_inset space ~
7764 \begin_layout Standard
7765 Also, refer to the figures in the example paper.
7768 \begin_layout Subsection
7772 \begin_layout Standard
7773 For submission, the paper has to be formated in a special double-spacing
7775 For this purpose, you have to give the option
7779 to the documentclass.
7780 This must be done using the extra class options field in the
7782 Document\SpecialChar \menuseparator
7786 Just enter the string
7793 \begin_layout Subsection
7797 \begin_layout Standard
7802 directory contains an example paper written with LyX.
7803 It is the example paper from the original macro package, translated to
7805 Use it for inspiration, and compare the original LaTeX code with LyX way
7809 \begin_layout Section
7813 \begin_layout Standard
7819 \begin_layout Subsection
7823 \begin_layout Standard
7824 AASTeX is a set of macros produced by the American Astronomical Society
7825 to facilitate electronic manuscript submission to the three journals they
7826 publish: the Astrophysical Journal (including the Letters and Supplement),
7827 the Astronomical Journal, and the Publications of the Astronomical Society
7829 LyX has proven to be an excellent tool for generating these documents,
7830 especially given its equation, citation, and figure handling capabilities.
7831 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7832 is the version described here, or higher.
7833 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7834 incompatible with LyX.
7835 The AASTeX package may be downloaded from the AASTeX Web site
7838 \begin_layout Standard
7839 \begin_inset VSpace medskip
7845 \begin_layout Standard
7847 \begin_inset Flex URL
7850 \begin_layout Plain Layout
7852 http://www.journals.uchicago.edu/AAS/AASTeX
7860 \begin_layout Standard
7861 \begin_inset VSpace medskip
7867 \begin_layout Standard
7868 A complete user guide is contained in that package and you should familiarize
7869 yourself with it thoroughly before embarking on writing a paper in LyX.
7870 LyX will not reduce the need to figure out all the AASTeX commands, it
7871 will only reduce the drudgery of typing everything in.
7872 It is your responsibility to ensure that the final exported LaTeX document
7873 conforms completely to the requirements of the journal to which you are
7874 submitting your paper.
7877 \begin_layout Subsection
7878 Starting a New Paper
7881 \begin_layout Standard
7882 I strongly suggest that you start with the AASTeX template file.
7885 File\SpecialChar \menuseparator
7892 , enter the new file name, then choose the
7897 This will show the most common fields found in a manuscript.
7898 Simply overwrite the existing text (including the brackets,
7902 ) with the correct information.
7903 Many of the AASTeX commands and environments can be implemented directly
7904 in LyX, but some cannot: most noticeably
7916 , which should stick out like a sore thumb if you actually just opened the
7918 For commands such as these, the LaTeX code must be entered directly and
7920 Such commands are referred to as TeX code, or Evil Red Text.
7921 I tried to minimize the amount of TeX code needed in an AASTeX document,
7922 but there is still a bit more required than any of us would like.
7925 \begin_layout Subsection
7926 Finishing Your Paper
7929 \begin_layout Standard
7930 When the paper is finished to your satisfaction and previews/prints correctly,
7932 \begin_inset Quotes eld
7936 \begin_inset Quotes erd
7939 actions which need to be done before you submit it to the journals.
7943 \begin_layout Enumerate
7944 Export your paper as a LaTeX file (
7946 File\SpecialChar \menuseparator
7947 Export\SpecialChar \menuseparator
7954 \begin_layout Enumerate
7959 file with your favorite text editor
7963 \begin_layout Enumerate
7964 remove the comment lines before the
7973 \begin_layout Enumerate
7978 usepackage...{fontenc}
7980 line if it appears (usually just after
7995 \begin_layout Enumerate
7996 remove everything between (and including) the
8008 commands, except for any commands you specifically put into the LaTeX preamble
8009 (which should appear immediately after the
8010 \begin_inset Quotes eld
8013 User specified LaTeX commands
8014 \begin_inset Quotes erd
8025 \begin_layout Enumerate
8026 Run the resulting file through LaTeX to make sure it still processes correctly.
8029 \begin_layout Enumerate
8030 Reread the journal requirements to make sure your filenames and formats
8034 \begin_layout Enumerate
8038 \begin_layout Subsection
8039 Comments On Specific Commands
8042 \begin_layout Standard
8043 I will not describe the detailed usage of the individual AASTeX commands:
8044 the AASTeX User Guide (
8048 ) gives a good description of each.
8049 Thus it's probably easiest for me to go down the list as found in the guide
8050 and offer comments where necessary.
8051 So let's begin \SpecialChar \ldots{}
8055 \begin_layout Subsubsection
8056 Things that work as expected
8059 \begin_layout Standard
8060 Because they work as you might expect, I simply list them and the section
8161 begin{thebibliography}
8169 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8170 graphicx figure commands (2.14.1),
8194 (2.15.4, amongst other places),
8221 \begin_layout Standard
8222 The following style options also work correctly:
8243 Simply put them in the
8249 Layout\SpecialChar \menuseparator
8255 \begin_layout Subsubsection
8256 Things that work, but require more comment
8259 \begin_layout Standard
8260 The following items work, but require a little more discussion:
8263 \begin_layout Itemize
8264 These items are reserved for use by the journal editors, but you can put
8265 them into the LaTeX preamble if you feel compelled to do so:
8298 \begin_layout Itemize
8299 These items may be placed in the LaTeX preamble, and are included as blanks
8300 in the template file:
8321 \begin_layout Itemize
8328 (2.3) – can only be used
8329 \begin_inset Quotes eld
8333 \begin_inset Quotes erd
8336 , not in the middle of a paragraph.
8337 Use TeX code if you need to embed it.
8340 \begin_layout Itemize
8347 (2.3) – will have extra {} after it.
8348 This should not cause an error.
8351 \begin_layout Itemize
8358 (2.6) – can only be used
8359 \begin_inset Quotes eld
8363 \begin_inset Quotes erd
8366 , not in the middle of a paragraph.
8367 Use TeX code if you need to embed it.
8370 \begin_layout Itemize
8377 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8381 \begin_layout Itemize
8395 \begin_layout Itemize
8402 (2.9) – will have extra {} after it.
8403 This should not cause an error.
8406 \begin_layout Itemize
8413 (2.11) – will have extra {} after it.
8414 This should not cause an error.
8417 \begin_layout Itemize
8424 (2.14.2) – you can insert an optional filename argument by placing the cursor
8425 at the beginning of the text and selecting
8427 Insert\SpecialChar \menuseparator
8432 \begin_inset Quotes eld
8436 \begin_inset Quotes erd
8439 inserts an optional argument of the type needed by
8446 Hopefully it will be renamed someday.
8449 \begin_layout Itemize
8462 for the catalog ID optional parameter
8465 \begin_layout Itemize
8478 for the catalog ID optional parameter
8481 \begin_layout Subsubsection
8482 Things not implemented, use TeX code
8485 \begin_layout Standard
8508 setcounter{equation}
8510 (2.12), Journal name abbreviations (2.13.4),
8546 (2.15.4, insert it as the first element in the lefthand cell after where
8548 Don't use any of LyX's rules in the table),
8560 (2.15.5), much of Misc (2.17, except
8611 \begin_layout Subsubsection
8612 Things that cannot be implemented
8615 \begin_layout Standard
8616 \SpecialChar \ldots{}
8617 at least in any meaningful sort of way, so I suggest ignoring them.
8618 They are the references environment (2.13.3), and the deluxetable environment
8620 If you really, really need to use deluxetable, I suggest editing it in
8621 a separate file with a text editor, then using
8623 Insert\SpecialChar \menuseparator
8625 \begin_inset space ~
8630 to include it in your LyX document.
8635 file to see an example of this.
8638 \begin_layout Subsection
8639 FAQs, Tips, Tricks, and Other Ruminations
8642 \begin_layout Subsubsection
8643 Getting LyX and AASTeX to cooperate
8646 \begin_layout Standard
8647 It can be a bit tricky to get LyX to recognize a new layout and document
8649 When all else fails, do this:
8652 \begin_layout Enumerate
8653 Make certain that LaTeX can find AASTeX.
8654 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8655 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8662 \begin_layout Enumerate
8674 \begin_layout Enumerate
8677 Tools\SpecialChar \menuseparator
8680 in LyX, then restart LyX.
8683 \begin_layout Enumerate
8684 Open a regular new file, not from a template.
8685 Does AASTeX appear in the class list in
8687 Document\SpecialChar \menuseparator
8693 \begin_layout Standard
8694 If you get a warning from an existing AASTeX document about not being able
8695 to find the AASTeX layout or a message about
8696 \begin_inset Quotes eld
8699 You should not mix title layouts with normal ones
8700 \begin_inset Quotes erd
8703 , things haven't been installed correctly.
8706 \begin_layout Subsubsection
8707 LaTeX error processing a table
8710 \begin_layout Standard
8711 LyX, by default, attempts to center the table caption/title.
8712 This seems to produce a bad interaction in AASTeX so you should click somewhere
8713 in the caption/title, then select
8715 Edit\SpecialChar \menuseparator
8717 \begin_inset space ~
8731 This took care of it for me.
8734 \begin_layout Subsubsection
8738 \begin_layout Standard
8739 A couple of things: 1) I have noticed some funny spacing in the reference
8740 entries in the text.
8741 When you enter the bibliography item data, make sure their is
8745 space between the last author and the parenthesis setting off the year;
8749 \begin_inset space \thinspace{}
8753 \begin_inset space \space{}
8767 2) Entering the references at all is not obvious.
8768 The easiest thing is to start typing your first reference at the end of
8769 the document, then mark it as type
8774 That will put a small gray box in front of what you just typed.
8775 Click on the box to fill in the rest of the information.
8776 For new references, go to the end of an existing reference and press return.
8777 That will create a new line with its own box, etc.
8780 \begin_layout Subsubsection
8784 \begin_layout Standard
8785 Even though AASTeX provides its own figure commands (
8791 , for example), I much prefer LaTeX's standard figure commands (with the
8800 \begin_inset space ~
8803 commands as TeX code into a Figure Float box if you desire, but I never
8804 have much luck getting the layout right.
8805 With the standard graphics, LyX will insert a
8809 usepackage{graphicx}
8811 command into the LaTeX preamble and handle the figures in the standard
8812 LaTeX2e way, interspersing the figures in the text.
8813 I believe ApJ accepts figures exactly this way now; AJ might still use
8815 \begin_inset Quotes eld
8818 stack everything at the end
8819 \begin_inset Quotes erd
8825 \begin_layout Subsubsection
8826 Things I could have done, but didn't
8829 \begin_layout Standard
8831 \begin_inset Quotes eld
8835 \begin_inset Quotes erd
8838 things I could have implemented, but chose not to.
8839 For instance, I saw no point in double-spacing the text in the LyX window,
8840 even though it is double-spaced in the paper manuscript.
8841 Also, I chose not to make separate layouts for the preprint and preprint2
8843 Since I assume you will spend most of your time in the plain manuscript
8844 mode anyway, I decided not to chew up more disk space with this.
8848 \begin_layout Subsection
8852 \begin_layout Standard
8853 Your mileage may vary.
8854 I've now had papers published by both ApJ and AJ that have had 98% of the
8855 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8857 I have had no trouble with the submission process, and I'm sure the journals
8858 were never aware that there might be a difference.
8859 So, go forth and publish!
8862 \begin_layout Section
8866 \begin_layout Standard
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8883 \begin_layout Standard
8885 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8886 papers to be submitted to American Mathematical Society publications.
8887 The layouts are not tailored to a specific journal, but easily can be.
8888 You should refer to the AMS documentation for specific instructions for
8889 each journal (usually it will entail only changing a single line in the
8891 That documentation is available on the Web at
8892 \begin_inset Flex URL
8895 \begin_layout Plain Layout
8903 \begin_inset Flex URL
8906 \begin_layout Plain Layout
8908 ftp://ftp.ams.org/pub/tex/amslatex/
8914 These layouts are appropriate, and useful, for any mathematical writing.
8918 \begin_layout Standard
8919 There are two basic AMS LaTeX layouts:
8922 \begin_layout Itemize
8923 amsart: The standard AMS article format.
8926 \begin_layout Itemize
8927 amsbook: the standard AMS book (really, monograph) format.
8931 \begin_layout Standard
8932 The layouts themselves contain only the minimum necessary to use the AMS
8934 They do not, in particular, contain any of the `theorem' environments used
8935 for setting theorems, lemmas, and the like.
8936 These are contained, instead, in the
8937 \begin_inset Flex Code
8940 \begin_layout Plain Layout
8946 module, which is loaded by default when you select one of the AMS classes.
8947 (It can also be used with other classes and can be removed, if you would
8948 rather use something else.) Less commonly used environments are in the
8949 \begin_inset Flex Code
8952 \begin_layout Plain Layout
8953 Theorems (AMS-Extended)
8958 module, which must be loaded manually.
8961 \begin_layout Standard
8962 By default, theorems and the like are numbered consecutively throughout
8963 the document, but this may be modified by loading the module
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8968 Theorems (Order by Section)
8973 or, if you are using
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8988 Theorems (Order by Chapter)
8994 These will number the results as
8995 \begin_inset Formula $n.m$
8998 , where the first number refers to the section (or chapter) and the second
8999 refers to the total number of results so far in that section (or chapter).
9000 Many environments are also available unnumbered.
9001 These are indicated by an asterisk at the end.
9002 If you happen to want
9006 unnumbered results, the module
9007 \begin_inset Flex Code
9010 \begin_layout Plain Layout
9016 provides that option.
9019 \begin_layout Standard
9020 Note that these modules do not
9024 to be used with the AMS classes.
9025 It is perfectly possible to use the
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9035 module, and the others mentioned, with other classes, such as
9036 \begin_inset Flex Code
9039 \begin_layout Plain Layout
9046 \begin_inset Flex Code
9049 \begin_layout Plain Layout
9056 \begin_inset Flex Code
9059 \begin_layout Plain Layout
9068 \begin_layout Subsection
9069 What these layouts provide
9072 \begin_layout Standard
9073 There is a long list of included environments provided by these layouts.
9074 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9075 variety of `theorem' environments.
9076 However, the AMS recommends the environments that are available in LyX.
9080 \begin_layout Standard
9081 The following environments—as well as the standard environments, such as
9083 \begin_inset Flex Noun
9086 \begin_layout Plain Layout
9093 \begin_inset Flex Noun
9096 \begin_layout Plain Layout
9103 \begin_inset Flex Noun
9106 \begin_layout Plain Layout
9113 \begin_inset Flex Noun
9116 \begin_layout Plain Layout
9123 \begin_inset Flex Noun
9126 \begin_layout Plain Layout
9133 \begin_inset Flex Code
9136 \begin_layout Plain Layout
9143 \begin_inset Flex Code
9146 \begin_layout Plain Layout
9155 \begin_layout Description
9156 Address This should be the author's permanent address.
9159 \begin_layout Description
9161 \begin_inset space ~
9164 Address This should be the author's temporary address at the time of submission,
9165 if different from the Address.
9168 \begin_layout Description
9169 Email Author's e-mail address
9172 \begin_layout Description
9173 URL Author's Web address, if desired.
9176 \begin_layout Description
9177 Keywords Key words or phrases used to identify specific topics discussed
9181 \begin_layout Description
9182 Subjectclass These refer to the AMS Subject Classifications, published and
9185 Mathematical Reviews
9188 These are also available online at the AMS cites listed above.
9191 \begin_layout Description
9195 \begin_layout Description
9199 \begin_layout Description
9203 \begin_layout Standard
9204 The following environments are provided by both the
9205 \begin_inset Flex Code
9208 \begin_layout Plain Layout
9215 \begin_inset Flex Code
9218 \begin_layout Plain Layout
9224 modules, in the latter case in both starred (unnumbered) and unstarred
9225 (numbered) versions.
9226 These same environments are provided only in the starred versions by the
9228 \begin_inset Flex Code
9231 \begin_layout Plain Layout
9240 \begin_layout Theorem
9241 This is typically used for the statements of major results.
9245 \begin_layout Corollary*
9246 This is used for statements which follow fairly directly from previous statement
9248 Again, these can be major results.
9253 These are smaller results needed to prove other statements.
9256 \begin_layout Proposition
9257 These are less major results which (hopefully) add to the general theory
9261 \begin_layout Conjecture
9262 These are statements provided without justification, which the author does
9263 not know how to prove, but which seem to be true (to the author, at least).
9266 \begin_layout Definition*
9267 Guess what this is for.
9268 The font is different for this environment than for the previous ones.
9272 \begin_layout Example*
9273 Used for examples illustrating proven results.
9276 \begin_layout Problem
9277 It's not really known what this is for.
9278 You should figure it out.
9281 \begin_layout Exercise*
9282 Write a description for this one.
9285 \begin_layout Remark
9286 This environment is also a type of theorem, usually a lesser sort of observation.
9289 \begin_layout Claim*
9290 Often used in the course of giving a proof of a larger result.
9294 Generally, these are used to break up long arguments, using specific instances
9300 The numbering scheme for cases is on its own, not together with other numbered
9306 At the end of this environment, a QED symbol (usually a square, but it can
9307 vary with different styles) is placed.
9308 If you want to have other environments within this one—for example, Case
9309 environments—and have the QED symbol appear only after them, then the other
9310 environments need to be nested within the proof environment.
9313 Nesting Environments
9319 for information on nesting.
9322 \begin_layout Standard
9323 And these environments are provided by
9324 \begin_inset Flex Code
9327 \begin_layout Plain Layout
9328 Theorems (AMS-Extended)
9336 \begin_layout Criterion*
9337 A required condition.
9340 \begin_layout Algorithm*
9341 A general procedure to be used.
9344 \begin_layout Axiom*
9345 This is a property or statement taken as true within the system being discussed.
9348 \begin_layout Condition*
9349 Sometimes used to state a condition assumed within the present context of
9354 Similar to a Remark.
9357 \begin_layout Notation*
9358 Used for the explanation of, yes, notation.
9361 \begin_layout Summary
9362 Do we really need to tell you?
9365 \begin_layout Acknowledgement*
9369 \begin_layout Conclusion*
9370 Sometimes used at the end of a long train of argument.
9374 Used in a way similar to Proposition, though perhaps lower on the scale.
9377 \begin_layout Standard
9378 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9380 They need to be available on your system in order to use these environments.
9383 \begin_layout Section
9391 \begin_layout Standard
9397 \begin_layout Subsection
9401 \begin_layout Standard
9402 These are the layout files for some of the journals of the American Geophysical
9404 It is assumed that you have both the AGU's own class files and AGUplus
9405 installed (everything to be found at
9406 \begin_inset Flex URL
9409 \begin_layout Plain Layout
9411 ftp://ftp.agu.org/journals/latex/journals
9419 \begin_layout Subsection
9423 \begin_layout Standard
9433 They are still called this in the LyX GUI, though their LaTeX equivalents
9434 in the AGU classes are
9445 \begin_layout Standard
9446 Newly defined styles are
9483 These are mostly manuscript attributes and defined in the AGU class documentati
9487 \begin_layout Standard
9488 I suspect this is still badly incomplete.
9491 \begin_layout Subsection
9495 \begin_layout Standard
9512 \begin_layout Subsection
9516 \begin_layout Itemize
9519 Journal of Geophysical Research
9528 \begin_layout Standard
9529 Add your own, it isn't so hard! Look at the
9540 \begin_layout Subsection
9541 Bugs and things to remember
9544 \begin_layout Standard
9545 In order to use the new layouts, you must remember to do the following for
9549 \begin_layout Enumerate
9555 This can be done in the
9557 Layout\SpecialChar \menuseparator
9562 Document\SpecialChar \menuseparator
9566 (AGU articles are always in English, right? So
9573 \begin_layout Enumerate
9583 (Yes, this is a bug.)
9586 \begin_layout Enumerate
9587 Make sure you use the
9591 bibliography style, by entering
9595 into the second field of the BibTeX inset.
9596 None of the standard styles will do.
9599 \begin_layout Section
9603 \begin_layout Standard
9609 \begin_layout Subsection
9613 \begin_layout Standard
9614 Broadway is for writing plays.
9615 The format is more decorative than Hollywood, and much less standardized.
9616 This format should be suitable for workshops.
9619 \begin_layout Subsection
9623 \begin_layout Standard
9624 The same as in Hollywood.
9627 \begin_layout Subsection
9631 \begin_layout Standard
9636 names as labels then cross-reference the label to insert the name.
9637 The cross-reference dialog will show the current cast of characters.
9640 \begin_layout Subsection
9641 Paper size and Margins
9644 \begin_layout Standard
9645 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9648 \begin_layout Subsection
9652 \begin_layout Standard
9653 The following environments are available.
9654 You can use broadway.bind to get the bind keys shown at the right.
9657 \begin_layout Itemize
9661 \begin_inset Newline newline
9666 You should not have to use this, but it is here for anything that does not
9670 \begin_layout Itemize
9674 \begin_inset space \hfill{}
9678 \begin_inset Newline newline
9683 Used to describe stage setting and the action.
9684 First use of speaker names in all CAPs.
9687 \begin_layout Itemize
9691 \begin_inset space \hfill{}
9695 \begin_inset Newline newline
9700 Automatically numbered.
9701 On screen it will be arabic, but will print as Roman.
9704 \begin_layout Itemize
9708 \begin_inset space \hfill{}
9712 \begin_inset Newline newline
9722 It is just centered text.
9725 \begin_layout Itemize
9729 \begin_inset space \hfill{}
9733 \begin_inset Newline newline
9738 Not automatically numbered.
9739 You supply the number.
9740 This is because I couldn't figure out how.
9743 \begin_layout Itemize
9747 \begin_inset space \hfill{}
9751 \begin_inset Newline newline
9756 A special case of Narrative to describe the setting and action as the curtain
9760 \begin_layout Itemize
9764 \begin_inset space \hfill{}
9768 \begin_inset Newline newline
9773 The speaker's (actor's) title, centered in all CAPS.
9776 \begin_layout Itemize
9780 \begin_inset space \hfill{}
9784 \begin_inset Newline newline
9789 Instructions to the speaker.
9790 The parentheses are automatically inserted.
9791 The ( will appear on screen, but both will be in the printed play.
9792 This environment is only used within
9799 \begin_layout Itemize
9803 \begin_inset space \hfill{}
9807 \begin_inset Newline newline
9812 What the Speaker says.
9815 \begin_layout Itemize
9819 \begin_inset space \hfill{}
9823 \begin_inset Newline newline
9828 The curtain comes down.
9831 \begin_layout Itemize
9835 \begin_inset space \hfill{}
9841 \begin_layout Itemize
9845 \begin_inset space \hfill{}
9851 \begin_layout Itemize
9855 \begin_inset space \hfill{}
9861 \begin_layout Standard
9865 \begin_layout Section
9869 \begin_layout Standard
9874 can be used to type letters according to German conventions.
9875 A template file is included in
9877 .../lyx/share/templates
9879 for you to use as a starting point.
9882 \begin_layout Section
9890 \begin_layout Standard
9896 \begin_layout Subsection
9900 \begin_layout Standard
9901 This is the layout file for the European Geophysical Society journals.
9906 can be downloaded from the web site of the EGS under
9907 \begin_inset Flex URL
9910 \begin_layout Plain Layout
9920 \begin_layout Subsection
9924 \begin_layout Standard
9927 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9935 The current layout file is unfortunately very unmodular and would benefit
9936 from using the various
9943 \begin_layout Section
9947 \begin_layout Standard
9948 See the LyX template file
9953 It contains all infos you need.
9956 \begin_layout Section
9962 \begin_inset CommandInset label
9971 \begin_layout Standard
9977 \begin_layout Subsection
9981 \begin_layout Standard
9982 This section describes how to use LyX to make slides for overhead projectors.
9983 There are two document classes that can do this: the default slides class
9989 This section documents the latter.
9992 \begin_layout Standard
9993 I'm going to say this again, nice and clear, so that there's no misunderstanding
9997 \begin_layout Standard
9998 \begin_inset VSpace bigskip
10004 \begin_layout Standard
10008 This section documents the class
10009 \begin_inset Quotes eld
10017 \begin_inset Quotes erd
10025 \begin_layout Standard
10026 \begin_inset VSpace bigskip
10032 \begin_layout Standard
10033 If you're looking for the documentation for
10034 \begin_inset Quotes eld
10042 \begin_inset Quotes erd
10045 , check out section
10046 \begin_inset space ~
10050 \begin_inset CommandInset ref
10052 reference "sec:slitex"
10057 If your machine doesn't have the
10062 \begin_inset Quotes eld
10070 \begin_inset Quotes erd
10073 ] installed, you'll probably have to use the default
10077 class, which isn't quite as good as
10082 \begin_layout Standard
10087 class is designed for use with version 2.1 of the
10091 LaTeX class file which is now an integral part of LaTeX2e.
10094 \begin_layout Subsection
10098 \begin_layout Standard
10099 Obviously, to use this document class, you need to select
10100 \begin_inset Quotes eld
10108 \begin_inset Quotes erd
10118 \begin_inset space ~
10124 There are some settings in the
10127 \begin_inset space ~
10132 dialog that you should know about that are specific to this class:
10135 \begin_layout Itemize
10136 Don't change the options
10147 \begin_inset space ~
10153 They're ignored by the
10160 \begin_layout Itemize
10161 The default font size is 20
10162 \begin_inset space \thinspace{}
10165 pt with the other options being 17
10166 \begin_inset space \thinspace{}
10170 \begin_inset space \thinspace{}
10174 \begin_inset space \thinspace{}
10180 \begin_layout Itemize
10181 The default font is
10189 but all math equations are still typeset in the usual roman font.
10192 \begin_layout Itemize
10197 supports A4 and Letter paper sizes as well as a special size for working
10199 \begin_inset space \thinspace{}
10203 It doesn't support A5, B5, legal or executive paper sizes.
10206 \begin_layout Itemize
10207 Don't bother changing the
10211 settings because they are ignored anyway.
10212 All floats appear where they are defined in the text.
10215 \begin_layout Itemize
10220 setting behaves a bit differently for this class.
10225 provides extensive footer and header capabilities including a user-defined
10228 \begin_inset space ~
10232 \begin_inset CommandInset ref
10234 reference "sec:foilfoot"
10239 The title page is treated differently to all other pages in the document
10248 has the logo centered at the bottom of the page (if one is defined).
10249 The possible page style choices and what they do are as follows:
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10261 The final output contains no page numbers, or other headers or footers
10262 (except footnotes of course).
10266 \begin_layout Labeling
10267 \labelwidthstring MMMMMMM
10274 The final output contains page numbers centered at the bottom of the page.
10275 No other headings or footers (other than footnotes).
10278 \begin_layout Labeling
10279 \labelwidthstring MMMMMMM
10284 Page numbers in lower right corner.
10285 Additional headers and footers are also shown.
10286 This is also the default.
10289 \begin_layout Labeling
10290 \labelwidthstring MMMMMMM
10295 Gives you access to the
10299 package although its use with
10303 is discouraged by the writer of the
10307 package because of some potential page layout clashes.
10311 \begin_layout Subsubsection
10315 \begin_layout Standard
10316 The following options may be used in the extra class options in the
10318 Document\SpecialChar \menuseparator
10324 \begin_layout Labeling
10325 \labelwidthstring MMMMMMx
10330 This sets up the page layout for 7.33
10331 \begin_inset space \thinspace{}
10335 \begin_inset space \thinspace{}
10338 in paper, which is about the same aspect ratio as a 35
10339 \begin_inset space \thinspace{}
10342 mm slide, making it a bit easier to work with this medium.
10345 \begin_layout Labeling
10346 \labelwidthstring MMMMMMx
10351 Places a rule across the page below the header on every page except the
10355 \begin_layout Labeling
10356 \labelwidthstring MMMMMMx
10361 Places a rule across the page above the footer on every page except the
10365 \begin_layout Labeling
10366 \labelwidthstring MMMMMMx
10371 This is automatically set each time you create a new
10380 to use the dvips driver to rotate those pages that are set as landscape
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMx
10390 Simply changes the page dimensions to those of a landscape page but doesn't
10392 Thus if you use this option you need to use an external program to rotate
10393 each page or feed your paper through your printer as landscape.
10394 Note that this option effectively reverses the roles of the
10402 environments (don't worry these are described in the next section).
10405 \begin_layout Labeling
10406 \labelwidthstring MMMMMMx
10411 Equation numbers on the left.
10414 \begin_layout Labeling
10415 \labelwidthstring MMMMMMx
10420 Flush-left equations.
10423 \begin_layout Subsection
10424 Supported Environments
10427 \begin_layout Standard
10428 Most of the environments commonly supported in other classes are also supported
10434 There are several additional environments provided by
10438 as well as a couple added by LyX.
10439 The following environments are shared with other classes:
10442 \begin_layout Standard
10443 \begin_inset Flex Multiple Columns
10446 \begin_layout Itemize
10452 \begin_layout Itemize
10458 \begin_layout Itemize
10464 \begin_layout Itemize
10470 \begin_layout Itemize
10476 \begin_layout Itemize
10482 \begin_layout Itemize
10488 \begin_layout Itemize
10494 \begin_layout Itemize
10500 \begin_layout Itemize
10506 \begin_layout Itemize
10512 \begin_layout Itemize
10518 \begin_layout Itemize
10524 \begin_layout Itemize
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Itemize
10548 \begin_layout Itemize
10559 \begin_layout Standard
10560 That is, all the major environments apart from the sectioning environments.
10561 Since foils are essentially self-contained sections, with a title and body,
10566 provides specific commands for starting new foils and these are:
10569 \begin_layout Itemize
10575 \begin_layout Itemize
10581 \begin_layout Standard
10582 LyX also provides slightly modified versions of these two environments called:
10585 \begin_layout Itemize
10591 \begin_layout Itemize
10594 ShortRotatefoilhead
10597 \begin_layout Standard
10598 and the differences will be explained in the next section.
10601 \begin_layout Standard
10602 Since foils are often used in presenting ideas or new theorems and such
10607 also provides a comprehensive box of goodies for presenting them:
10610 \begin_layout Standard
10611 \begin_inset Flex Multiple Columns
10614 \begin_layout Itemize
10620 \begin_layout Itemize
10626 \begin_layout Itemize
10632 \begin_layout Itemize
10638 \begin_layout Itemize
10644 \begin_layout Itemize
10650 \begin_layout Itemize
10656 \begin_layout Itemize
10662 \begin_layout Itemize
10668 \begin_layout Itemize
10674 \begin_layout Itemize
10685 \begin_layout Standard
10686 The starred versions are unnumbered while the unstarred versions are numbered.
10687 There are also two list environments added by LyX and these are:
10690 \begin_layout Itemize
10696 \begin_layout Itemize
10702 \begin_layout Standard
10707 provides some powerful header and footer capabilities that are best set
10708 in the preamble although they may be set at any point in a document.
10709 If you want to change these settings in your document the best place to
10710 do so is at the very top of a foil, i.
10711 \begin_inset space \thinspace{}
10717 \begin_inset space \space{}
10722 straight after the foilhead.
10725 \begin_layout Standard
10726 For this purpose, the following command styles are provided [
10733 \begin_layout Standard
10734 \begin_inset Flex Multiple Columns
10737 \begin_layout Itemize
10741 \begin_inset space ~
10747 \begin_layout Itemize
10753 \begin_layout Itemize
10757 \begin_inset space ~
10763 \begin_layout Itemize
10767 \begin_inset space ~
10773 \begin_layout Itemize
10777 \begin_inset space ~
10784 \begin_layout Plain Layout
10785 \begin_inset space ~
10797 \begin_layout Standard
10798 There are also a few commands provided by
10802 that aren't directly supported by LyX but I'll tell you what they do and
10803 how to use them in section
10804 \begin_inset space ~
10808 \begin_inset CommandInset ref
10810 reference "sec:unsuppfoils"
10817 \begin_layout Subsection
10818 Building a Set of Foils
10821 \begin_layout Standard
10822 This section will give a simple introduction to using the different environments
10823 to build a set of foils.
10824 If you want to see an example set of foils, take a look at the
10828 file you find in LyX's
10835 \begin_layout Subsubsection
10836 Give It a Title Page
10839 \begin_layout Standard
10840 Unlike other classes that provide
10860 creates the title on a page of its own.
10861 If you leave out the
10865 environment LaTeX will substitute the current date (every time you regenerate
10869 \begin_layout Subsubsection
10873 \begin_layout Standard
10874 As I mentioned earlier, there are four ways of starting a new foil.
10875 For portrait foils you should use
10884 The difference between these two environments is the amount of space between
10885 the title of the foil (the foilhead) and the body of the foil.
10888 \begin_layout Standard
10889 Landscape foils are generated using the
10895 ShortRotatefoilhead
10898 Again the only difference is the spacing between foilhead and body.
10899 Both of the short versions have 0.5
10900 \begin_inset space ~
10903 inches less separation between the foilhead and the body.
10907 \begin_layout Standard
10908 One problem with the support for landscape foils is the requirement that
10909 you have to use the
10913 driver to generate the PostScript output otherwise the foils won't be rotated.
10914 It is possible to get landscape foils even if you haven't got the
10918 driver provided you can feed your foils sideways through your printer ;-)
10921 \begin_layout Subsubsection
10922 Theorems, Lemmas, Proofs and more
10925 \begin_layout Standard
10926 Due to a small bug in LyX you can't have two of the same type of these environme
10927 nts directly following each other.
10928 They must be separated by something.
10929 If you try, you will just be extending the previous environment as if you
10930 had merged the two environments together.
10931 So, how do you get around this problem? The simplest option is to insert
10932 some text between the two environments or add a
10936 environment between the two with just a
10937 \begin_inset Quotes eld
10945 \begin_inset Quotes erd
10949 This will force LyX to produce two separate environments and hence the
10950 correct LaTeX output.
10951 An example is provided in the example file included with the LyX distribution.
10952 Remember, this problem only occurs if you are trying to place two of the
10953 same type of theorem-like environments one directly after the other.
10956 \begin_layout Subsubsection
10960 \begin_layout Standard
10961 You get all the commonly supported list styles found in other classes as
10962 well as two new ones.
10963 I'll only describe the new ones here.
10964 If you want to find out more about the other list environments check out
10970 If you intend to use itemized lists you might also want to read about the
10974 \begin_inset space ~
10978 \begin_inset space ~
10983 dialog described above in section
10984 \begin_inset space ~
10988 \begin_inset CommandInset ref
10990 reference "sec:bullet"
10997 \begin_layout Standard
10998 The two new list styles,
11006 , are designed to make it easier for you to create lists of do's and don'ts
11007 or right and wrong by providing dedicated environments that use a tick
11008 or a cross as the label of the list.
11009 These lists are in fact dedicated variants of the
11014 They do however require that you have the
11018 packages installed.
11021 \begin_layout Subsubsection
11025 \begin_layout Standard
11030 redefines the floating tables and figures so that they appear exactly where
11031 they are in the text rather than pushing them to the top of the page or
11032 to some user specified location.
11033 In fact if you change the float placement settings they are simply ignored.
11036 \begin_layout Subsubsection
11037 Page Headers and Footers
11038 \begin_inset CommandInset label
11040 name "sec:foilfoot"
11047 \begin_layout Standard
11051 \begin_inset space ~
11060 are two commands used to control the left-footer text string.
11061 The first is meant to allow you to include a graphic logo on your foils
11063 \begin_inset Quotes eld
11071 \begin_inset Quotes erd
11075 While the second is meant to provide a classification for the audience,
11079 \begin_inset space \thinspace{}
11085 \begin_inset space \space{}
11089 It is empty by default.
11092 \begin_layout Standard
11093 The remaining page corners can be filled by
11096 \begin_inset space ~
11101 (which defaults to page numbers),
11104 \begin_inset space ~
11112 \begin_inset space ~
11120 \begin_layout Subsection
11126 \begin_inset CommandInset label
11128 name "sec:unsuppfoils"
11135 \begin_layout Standard
11136 All the commands mentioned below need to be set in a
11144 within another environment.
11147 \begin_layout Subsubsection
11151 \begin_layout Standard
11152 All lengths are adjusted using the
11175 should be replaced by the name given to the length you want to change and
11180 is the length value.
11181 All lengths should be specified in units of length such as inches (
11193 ) or relative to some document or font-based length such as
11203 \begin_layout Standard
11204 It's possible to change the spacing between a foilhead and the body of the
11205 foil by adjusting the length specified by
11212 For example, to make
11217 \begin_inset space \space{}
11220 in closer to their bodies put the following in the preamble:
11226 foilheadskip}{-0.5in}
11229 \begin_layout Standard
11230 The spacings around floats can be adjusted by setting these lengths:
11233 \begin_layout Labeling
11234 \labelwidthstring MMMMMMMMMMM
11241 Separation between the text and the top of the float
11244 \begin_layout Labeling
11245 \labelwidthstring MMMMMMMMMMM
11252 Separation between the float and the caption
11255 \begin_layout Labeling
11256 \labelwidthstring MMMMMMMMMMM
11263 Separation between the caption and the following text
11266 \begin_layout Labeling
11267 \labelwidthstring MMMMMMMMMMM
11274 You can make the captions narrower than the surrounding text by adjusting
11276 Best done relative to
11285 \begin_layout Standard
11286 There are also several title page related lengths that you may find useful
11287 if you have a long title or several authors:
11290 \begin_layout Labeling
11291 \labelwidthstring MMMMMMMMMMM
11298 Separation from headers to
11303 \begin_layout Labeling
11304 \labelwidthstring MMMMMMMMMMM
11322 \begin_layout Labeling
11323 \labelwidthstring MMMMMMMMMMM
11337 \begin_layout Labeling
11338 \labelwidthstring MMMMMMMMMMM
11354 \begin_layout Labeling
11355 \labelwidthstring MMMMMMMMMMM
11371 \begin_layout Standard
11372 The last length related command affects all the list environments.
11383 a list environment then all the vertical spacing between the list items
11385 Note that this is a command not a length so it doesn't require
11391 like the stuff mentioned above.
11394 \begin_layout Subsubsection
11395 Headers and Footers
11398 \begin_layout Standard
11411 commands control whether the logo in the
11415 definition appear on a given page.
11422 in the preamble then none of the foils will have the logo on them.
11423 If you don't want the logo on a particular page place the
11429 directly after the foilhead of that page and the
11435 directly after the next foilhead.
11438 \begin_layout Standard
11439 If you decide to use the
11443 page style setting in the
11446 \begin_inset space ~
11451 dialog you should probably add
11461 to your preamble so headers and footers on landscape pages are correctly
11462 placed when rotated.
11463 This is due to some clashes between the page layouts provided by the
11474 \begin_layout Section
11475 Hollywood (Hollywood spec scripts)
11478 \begin_layout Standard
11484 \begin_layout Subsection
11488 \begin_layout Standard
11489 Getting the format of a Hollywood script right is a
11490 \begin_inset Quotes eld
11494 \begin_inset Quotes erd
11497 It is designed to make the readers focus on content and to be easy and
11498 familiar for the actors to read.
11499 Each page of a script should be one minute of film.
11500 Nothing goes in a script that you cannot see or hear on screen.
11501 The courier 12 pt font should be used throughout.
11505 \begin_layout Subsection
11509 \begin_layout Standard
11510 Speakers' lines should NEVER break in mid-sentence.
11511 If a speaker's lines continue over a page break, repeat the
11515 title followed by (Cont'd).
11518 \begin_layout Subsection
11522 \begin_layout Standard
11527 names as labels then cross-reference the label to insert the name.
11528 The cross-reference dialog will show the current cast of characters.
11529 You can use this to insert the speaker name in narratives also.
11532 \begin_layout Subsection
11533 Paper size and Margins
11536 \begin_layout Standard
11537 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11540 \begin_layout Subsection
11544 \begin_layout Standard
11545 The following environments are available.
11546 You can use hollywood.bind to get the bind keys shown at the right.
11549 \begin_layout Itemize
11553 \begin_inset Newline newline
11558 Used where nothing else works.
11562 \begin_layout Itemize
11568 \begin_inset space \hfill{}
11576 \begin_inset Newline newline
11579 Usually followed by something like
11580 \begin_inset Quotes eld
11583 on Sally waking up.
11584 \begin_inset Quotes erd
11590 \begin_layout Itemize
11594 \begin_inset space \hfill{}
11598 \begin_inset Newline newline
11603 Introduces a new INTERIOR camera set-up.
11604 Always followed by DAY or NIGHT, or something similar to define the lighting
11606 Everthing on this line in CAPS.
11609 \begin_layout Itemize
11613 \begin_inset space \hfill{}
11617 \begin_inset Newline newline
11622 Introduces a new EXTERIOR camera set-up.
11623 Everthing on this line in CAPS.
11626 \begin_layout Itemize
11630 \begin_inset space \hfill{}
11634 \begin_inset Newline newline
11639 The character speaking.
11642 \begin_layout Itemize
11646 \begin_inset space \hfill{}
11650 \begin_inset Newline newline
11655 Instructions to the speaker.
11656 The () are automatically inserted, but only the ( will show in LyX.
11657 Both will be printed.
11660 \begin_layout Itemize
11664 \begin_inset space \hfill{}
11668 \begin_inset Newline newline
11680 \begin_layout Itemize
11684 \begin_inset space \hfill{}
11688 \begin_inset Newline newline
11693 Camera movement instruction.
11695 \begin_inset space \thinspace{}
11699 \begin_inset space \space{}
11705 \begin_layout Itemize
11709 \begin_inset space \hfill{}
11715 \begin_layout Itemize
11719 \begin_inset space \hfill{}
11725 \begin_layout Itemize
11729 \begin_inset space \hfill{}
11735 \begin_layout Itemize
11739 \begin_inset space \hfill{}
11745 \begin_layout Subsection
11749 \begin_layout Itemize
11753 \begin_layout Itemize
11757 \begin_layout Itemize
11759 \begin_inset space \thinspace{}
11766 \begin_layout Itemize
11771 \begin_layout Itemize
11772 PAN — camera movement
11775 \begin_layout Itemize
11776 INSERT — cut to close-up of
11779 \begin_layout Section
11783 \begin_layout Standard
11786 Panayotis Papasotiriou
11789 \begin_layout Subsection
11793 \begin_layout Standard
11794 The ijmpc package is a set of macros that facilitates electronic manuscript
11797 International Journal of Modern Physics C
11800 Similarly, the ijmpd package is for creating manuscripts to be submitted
11803 International Journal of Modern Physics D
11806 Both journals are published by World Scientific.
11807 The corresponding document classes are named
11816 These files, together with instructions for the authors, can be downloaded
11818 \begin_inset Flex URL
11821 \begin_layout Plain Layout
11823 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11829 \begin_inset Flex URL
11832 \begin_layout Plain Layout
11834 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11840 Both packages are modified versions of the standard
11841 \begin_inset Quotes eld
11845 \begin_inset Quotes erd
11848 package, and they are almost (but not exactly) identical.
11849 Most of their features are supported by LyX.
11850 I have used LyX successfully to write articles submitted to both journals
11851 without any problem.
11854 \begin_layout Subsection
11858 \begin_layout Standard
11859 As usual, the easiest way to write a paper is to start with a template.
11862 File\SpecialChar \menuseparator
11881 This will give an (almost) empty document that includes the most common
11882 fields found in a manuscript.
11883 Simply overwrite the existing text (including the brackets,
11888 You should keep in mind the following remarks.
11891 \begin_layout Enumerate
11892 LyX won't let you change the font size and the page style of the document,
11893 because such modifications are not allowed by both packages.
11896 \begin_layout Enumerate
11897 The language of the document should not be changed.
11898 Before previewing your paper, be sure that the babel package is not used.
11899 To do this, click on
11901 Tools\SpecialChar \menuseparator
11912 checkbox in the language settings, and click on
11920 , if you wish to make this change permanent).
11923 \begin_layout Enumerate
11925 \begin_inset Quotes eld
11929 \begin_inset Quotes erd
11932 style must be used to define keywords.
11935 \begin_layout Enumerate
11936 The ijmpc package provides a style named
11937 \begin_inset Quotes eld
11940 Classification Codes
11941 \begin_inset Quotes erd
11944 , which can be used to define classification codes, such as PACS numbers.
11945 Note that this facility is not supported by the ijmpd package.
11948 \begin_layout Enumerate
11949 Several new environments are available:
11950 \begin_inset Quotes eld
11954 \begin_inset Quotes erd
11958 \begin_inset Quotes eld
11962 \begin_inset Quotes erd
11966 \begin_inset Quotes eld
11970 \begin_inset Quotes erd
11974 \begin_inset Quotes eld
11978 \begin_inset Quotes erd
11982 \begin_inset Quotes eld
11986 \begin_inset Quotes erd
11990 \begin_inset Quotes eld
11994 \begin_inset Quotes erd
11998 \begin_inset Quotes eld
12002 \begin_inset Quotes erd
12006 \begin_inset Quotes eld
12010 \begin_inset Quotes erd
12014 \begin_inset Quotes eld
12018 \begin_inset Quotes erd
12022 \begin_inset Quotes eld
12026 \begin_inset Quotes erd
12030 \begin_inset Quotes eld
12034 \begin_inset Quotes erd
12038 \begin_inset Quotes eld
12042 \begin_inset Quotes erd
12046 \begin_inset Quotes eld
12050 \begin_inset Quotes erd
12054 \begin_inset Quotes eld
12058 \begin_inset Quotes erd
12062 Their use is more or less obvious.
12063 LyX supports all these environments; it will use the proper label, text
12064 style, and numbering scheme for each of them.
12067 \begin_layout Enumerate
12068 Both packages use basic citations; the natbib package should not be used.
12069 In LyX, citation references are shown as usual; in the output, citations
12070 are shown as superscripts.
12071 If you want to use a citation as normal text, you should use the
12076 \begin_inset space \thinspace{}
12080 \begin_inset space \space{}
12084 \begin_inset Quotes eld
12088 \begin_inset space \space{}
12098 \begin_inset Quotes erd
12104 \begin_layout Enumerate
12106 \begin_inset Quotes eld
12110 \begin_inset Quotes erd
12113 section in both packages.
12114 To put acknowledgments, just use the
12115 \begin_inset Quotes eld
12119 \begin_inset Quotes erd
12125 \begin_layout Enumerate
12126 Appendices may be added to the paper,
12130 the Acknowledgments and
12135 LyX provides a special environment, called
12136 \begin_inset Quotes eld
12140 \begin_inset Quotes erd
12143 which marks the beginning of the appendices.
12144 This environment should be left blank; it just sends a LaTeX command, but
12145 nothing is really printed.
12147 \begin_inset Quotes eld
12151 \begin_inset Quotes erd
12154 is printed with blue letters, as a signal that all sections after that
12155 point are appendices.
12156 To write an appendix, use the
12157 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12165 LyX will number each appendix with capital letters, as required by both
12168 \begin_inset Quotes eld
12172 \begin_inset Quotes erd
12179 be present before the first appendix; if not, all appendices will be numbered
12180 as normal sections in the output.
12183 \begin_layout Enumerate
12184 The ijmpc and the ijmpd packages use the
12188 command to implement table captions.
12189 As a result, a table created by LyX is printed correctly, but its caption
12191 However, you can use some TeX code to overcome this problem, so that captions
12192 are printed as expected.
12193 To do so, create a float table as usual, remove the caption, and replace
12194 it with the TeX code
12204 (sic); you must also the TeX code
12208 immediately after the tabular material.
12209 Study the example table included in the template files to see how this
12210 trick is implemented.
12211 Alternatively, If you need table captions, you should implement the whole
12216 file, then include this file to the LyX document (
12218 Insert\SpecialChar \menuseparator
12219 File\SpecialChar \menuseparator
12221 \begin_inset space ~
12227 Details on how to create a table float can be found in the files
12235 , included in the corresponding packages.
12238 \begin_layout Subsection
12239 Preparing a paper for submission
12242 \begin_layout Standard
12243 Before you submit your paper you must export the LyX document as a LaTeX
12246 File\SpecialChar \menuseparator
12247 Export\SpecialChar \menuseparator
12254 \begin_layout Plain Layout
12255 Actually you have the choice between LaTeX (plain) and pdflatex.
12256 If you intend to use pdflatex to prepare the paper, you should use the
12257 pdflatex option so that included graphics are converted to PDF format,
12258 ready for use by pdflatex.
12263 , then make the following changes to the resulting
12270 \begin_layout Enumerate
12271 Remove the comment lines before the
12280 \begin_layout Enumerate
12281 Remove everything between (and including) the
12293 commands, except for any commands you specifically put into the LaTeX preamble.
12296 \begin_layout Standard
12301 file should be saved and processed through LaTeX as many times as necessary.
12302 You may also want to check the resulting
12309 \begin_layout Subsection
12313 \begin_layout Standard
12314 The use of TeX code is reduced to two commands, which must be placed at
12315 the top of the document.
12316 If you started writing your paper by using the
12324 template, the TeX code needed is already in its place; you usually don't
12326 You may only modify the first TeX code to specify the information printed
12327 to the top of odd and even pages (authors' names and short paper's title,
12329 This TeX code must have the form
12333 markboth{Authors' Names}{Short Paper's Title}
12338 \begin_layout Section
12342 \begin_layout Standard
12348 \begin_layout Subsection
12352 \begin_layout Standard
12353 The iopart package provides a document class to create electronic manuscript
12354 submission to the journals published by the Institute of Physics.
12355 Instructions for the authors how to create a paper using the iopart class
12356 can be downloaded together with the iopart package from the site
12357 \begin_inset Flex URL
12360 \begin_layout Plain Layout
12362 ftp://ftp.iop.org/pub/journals/latex2e
12370 \begin_layout Subsection
12374 \begin_layout Standard
12375 The easiest way to write a paper is to start with the file
12379 that is available in LyX's examples files folder.
12380 Open this file, save it under a new name, and start writing.
12381 The example file explains how to use the special text environments.
12382 Here are the most important advices:
12385 \begin_layout Itemize
12386 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12389 Use AMS math package
12391 in the document settings under
12398 \begin_layout Itemize
12401 The title environment defines the kind of your paper.
12402 So use one of the following environments for the title:
12406 \begin_layout Itemize
12415 \begin_layout Itemize
12424 \begin_layout Itemize
12430 for a Topical review
12433 \begin_layout Itemize
12442 \begin_layout Itemize
12451 \begin_layout Itemize
12457 for a Paper (same as Title)
12460 \begin_layout Itemize
12466 for a Preliminary communication
12469 \begin_layout Itemize
12475 for a Rapid communication
12478 \begin_layout Itemize
12484 for a Letter to the editor
12488 \begin_layout Itemize
12491 All title environments except of
12495 can have an optional short title.
12498 \begin_layout Itemize
12499 There is a general title environment
12503 which is not directly supported by the LyX.
12504 This can be used as TeX code when your document doesn't fit into one of
12505 the other title types.
12508 \begin_layout Standard
12509 For more informations like hints for special table and formula formatting,
12510 look at the IOP author guidelines.
12513 \begin_layout Section
12517 \begin_layout Standard
12520 Panayotis Papasotiriou
12523 \begin_layout Subsection
12527 \begin_layout Standard
12528 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12529 that facilitates electronic manuscript submission to the journals they
12531 Most known of them (at least in my domain of interest) are
12533 Astrophysics and Space Science
12539 , but there are many others (see a complete list at
12540 \begin_inset Flex URL
12543 \begin_layout Plain Layout
12545 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12551 The Kluwer package may be downloaded from the site
12552 \begin_inset Flex URL
12555 \begin_layout Plain Layout
12557 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12563 A complete user guide is contained in that package (but it can also be
12564 downloaded separately).
12567 \begin_layout Standard
12568 LyX supports many features of the package but not everything.
12569 However, the TeX code needed is reduced to some
12570 \begin_inset Quotes eld
12574 \begin_inset Quotes erd
12577 commands of the package (see
12578 \begin_inset space ~
12582 \begin_inset CommandInset ref
12584 reference "subsec:kluwer_peculiarities"
12589 I have recently used LyX to write an article submitted to the
12591 Astrophysics and Space Science
12593 without any problem.
12596 \begin_layout Subsection
12600 \begin_layout Standard
12601 The easiest way to write a paper is to start with the Kluwer template file.
12604 File\SpecialChar \menuseparator
12616 This will give an (almost) empty document that includes the most common
12617 fields found in a manuscript and a short description of their use.
12618 As in most templates, simply overwrite the existing text (including the
12623 ) with the correct information.
12626 \begin_layout Subsection
12627 Preparing a paper for submission
12630 \begin_layout Standard
12631 As in the AASTeX package, before you submit your paper to a journal you
12633 \begin_inset Quotes eld
12637 \begin_inset Quotes erd
12643 \begin_layout Enumerate
12644 Export your paper as a LaTeX file.
12645 To do this, click on
12647 File\SpecialChar \menuseparator
12648 Export\SpecialChar \menuseparator
12655 \begin_layout Enumerate
12660 file with a text editor and make the following changes
12664 \begin_layout Enumerate
12665 remove the comment lines before the
12674 \begin_layout Enumerate
12675 remove everything between (and including) the
12687 commands, except for any commands you specifically put into the LaTeX preamble.
12690 \begin_layout Standard
12699 \begin_layout Enumerate
12704 file through LaTeX as many times as necessary (usually up to three).
12707 \begin_layout Enumerate
12713 \begin_inset space \thinspace{}
12717 \begin_inset space \space{}
12724 , and check if everything is OK (it should, if you didn't make any mistake).
12727 \begin_layout Subsection
12728 \begin_inset Quotes eld
12732 \begin_inset Quotes erd
12735 of the Kluwer package
12736 \begin_inset CommandInset label
12738 name "subsec:kluwer_peculiarities"
12745 \begin_layout Standard
12746 The Kluwer package has the following
12747 \begin_inset Quotes eld
12751 \begin_inset Quotes erd
12757 \begin_layout Enumerate
12758 It is possible to write multiple articles in the same LaTeX file
12762 \begin_layout Plain Layout
12763 I can't imagine any good reason to do this.
12769 Each article must be included in the environment
12770 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12778 Unfortunately, this environment cannot be omitted, even if you write just
12780 Therefore, each article starts with the command
12786 and, obviously, ends with the command
12793 Although this can be implemented in LyX, I didn't included it, since it
12794 looks ugly and can confuse the novice user.
12795 Therefore, you need to enter them directly and mark them as LaTeX code
12797 \begin_inset Quotes eld
12801 \begin_inset Quotes erd
12807 \begin_layout Enumerate
12808 Information given at the beginning of the article (i.
12809 \begin_inset space \thinspace{}
12813 \begin_inset space \space{}
12816 title, subtitle, author, institution, running title, running author, abstract
12817 and keywords) must be included in an environment called
12818 \begin_inset Quotes eld
12822 \begin_inset Quotes erd
12826 This is not implemented in LyX, so you must enter title, subtitle etc.
12827 \begin_inset space ~
12830 between two TeX code lines (
12845 \begin_layout Enumerate
12846 According to the user manual, the label of each bibliography item must be
12870 \begin_layout Standard
12875 template takes care of all these
12876 \begin_inset Quotes eld
12880 \begin_inset Quotes erd
12884 If you start a new paper using this template you don't need to do anything
12889 \begin_layout Enumerate
12890 don't delete the TeX code included in the template, and
12893 \begin_layout Enumerate
12894 copy the example bibliography item included in the template and modify it
12895 as necessary to enter new bibliography items.
12898 \begin_layout Section
12902 \begin_layout Standard
12908 \begin_layout Subsection
12912 \begin_layout Standard
12913 The LyX document classes
12915 article (koma-script)
12919 report (koma-script)
12937 correspond to the LaTeX document classes
12954 \begin_inset space ~
12957 of the Koma-Script family.
12958 They are replacements for the standard document classes
12974 , resp., and fit better to European typography conventions in a number of
12978 \begin_layout Itemize
12979 Standard character size is 11pt in
12981 article (koma-script)
12985 report (koma-script)
12993 letter (koma-script)
12998 \begin_layout Itemize
12999 Headings, labels of the description environment, and a number of elements
13002 letter (koma-script)
13004 document class are set in a bold sans serif font.
13008 \begin_layout Plain Layout
13009 There is a big difference between the bold sans serif old cm fonts and new
13010 ec fonts, especially in the appearance of headings.
13011 In comparison, the ec bold sans serif fonts look a bit thin.
13012 Here the LaTeX package
13020 helps to produce the
13021 \begin_inset Quotes eld
13025 \begin_inset Quotes erd
13028 appearance when using the ec fonts.
13033 The numbering of chapter headings is made in the same way as the numbering
13034 of section headings, that is without the extra line
13035 \begin_inset Quotes eld
13038 Chapter\SpecialChar \ldots{}
13040 \begin_inset Quotes erd
13044 In addition, the appearance of the headings can be modified by using a
13045 number of options (in LyX to be entered in the field
13048 \begin_inset space ~
13055 Layout\SpecialChar \menuseparator
13062 \begin_layout Itemize
13063 The main means in the Koma-Script document classes to design the type area
13072 (in LyX to be entered in the extra class options field in the dialog
13074 Document\SpecialChar \menuseparator
13078 They make a clearer modification of page margins possible as do the options
13081 Document\SpecialChar \menuseparator
13088 \begin_layout Itemize
13089 The LaTeX document classes of the Koma-Script family define a number of
13090 additional commands.
13091 Those part of it which makes sense in LyX is implemented in corresponding
13095 \begin_layout Standard
13096 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13097 can be found in the Koma-Script documentation
13108 \begin_layout Subsection
13109 article (koma-script), report (koma-script), and book (koma-script)
13112 \begin_layout Standard
13113 The document classes
13115 article (koma-script)
13119 report (koma-script)
13129 are implemented in the layout files
13142 They contain all the paragraph types of the corresponding standard document
13155 , resp., partly modified, with the exception of the LyX specific
13159 -type, which is replaced by the new
13163 -type having the same functionality.
13168 -Type there is a number of new paragraph types added.
13175 letter (koma-script)
13180 \begin_layout Itemize
13189 : are equivalents to
13197 , resp., additionally inserting an entry in the table of contents.
13206 are not contained in
13208 article (koma-script)
13213 \begin_layout Itemize
13222 : behave exactly as
13230 , resp., additionally clearing running heads.
13235 is not contained in
13237 article (koma-script)
13243 \begin_layout Plain Layout
13256 report (koma-script)
13258 , but since this is identical to
13262 , is has not been implemented in LyX.
13270 \begin_layout Itemize
13275 : generates a heading directly above the following paragraph in the standard
13276 character size without affecting the structure of the document.
13279 \begin_layout Itemize
13288 are special captions which respect the different space settings needed
13289 for captions placed above or below an element (if you follow strict typographic
13290 rules, you might want to place table captions always above the table).
13291 You can also use the class option
13295 , which will switch
13308 You need at least Koma-Script version 2.8q to use this.
13311 \begin_layout Itemize
13316 : can be used to set a bonmot, e.
13317 \begin_inset space \thinspace{}
13321 \begin_inset space \space{}
13324 at the beginning of a chapter.
13325 If you use the optional argument (
13327 Insert\SpecialChar \menuseparator
13329 \begin_inset space ~
13334 ), you can insert the dictum's author there.
13335 Dictum and author are separated by a line.
13336 You need at least Koma-Script version 2.8q to use this.
13341 is not contained in
13343 article (koma-script)
13348 \begin_layout Standard
13349 The following types, together with the standard types
13361 , form the title area of the document.
13362 They must be entered ahead of the first
13363 \begin_inset Quotes eld
13367 \begin_inset Quotes erd
13374 \begin_layout Plain Layout
13375 The corresponding LaTeX commands must appear before the
13386 When such a type is used more than once, the latter usage overwrites the
13387 former one, that means, for every type only the latest usage is valid.
13388 The order of the different types however has, like
13400 , no effect on the appearance of the produced document.
13403 \begin_layout Itemize
13408 : produces a centered paragraph above the ordinary title (
13420 ) for the subject of the document.
13423 \begin_layout Itemize
13428 : produces a centered paragraph below the ordinary title (
13440 ) for the publishers' name.
13443 \begin_layout Itemize
13450 report (koma-script)
13456 produces a centered paragraph on its own page behind the title page, or
13459 article (koma-script)
13461 produces a centered paragraph below the ordinary title (
13477 ) for a dedication.
13480 \begin_layout Itemize
13485 : produces a left aligned paragraph above the ordinary title (
13501 ) for a document`s head.
13504 \begin_layout Itemize
13509 : produces in a double-sided print in
13511 report (koma-script)
13517 a left-aligned paragraph at the top of the title page`s back or has no
13518 effect in a single-sided print or in
13520 article (koma-script)
13525 \begin_layout Itemize
13530 : produces in a double-sided print in
13532 report (koma-script)
13538 a left-aligned paragraph at the bottom of the title page`s back or has
13539 no effect in a single-sided print or in
13541 article (koma-script)
13546 \begin_layout Itemize
13551 : produces a special
13552 \begin_inset Quotes eld
13556 \begin_inset Quotes erd
13559 page ahead of the actual document containing a paragraph without special
13563 \begin_layout Standard
13564 The layout files for the document classes
13566 article (koma-script)
13570 report (koma-script)
13576 do include the file
13581 This is thought of as a place to define your own types.
13586 in your personal layout directory and edit the file!
13589 \begin_layout Subsection
13590 letter (koma-script)
13593 \begin_layout Standard
13597 letter (koma-script)
13599 is implemented in the layout file
13604 It contains all the paragraph types of the corresponding standard document
13609 , partly modified, with the exception of the LyX specific types
13621 type, which is replaced by the new
13626 In addition, it contains, in contrast to the standard document class, the
13644 Furthermore, there are a number of new letter specific types.
13647 \begin_layout Standard
13648 The appearance of the letter produced by this document class can be controlled
13649 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13653 \begin_layout Plain Layout
13654 For example, the standard appearance of the letter`s heading, consisting
13655 of name and address, is quite self-willed.
13657 \begin_inset Quotes eld
13661 \begin_inset Quotes erd
13664 heading is produced by the following LaTeX commands in the preamble:
13667 \begin_layout LyX-Code
13677 \begin_layout LyX-Code
13693 \begin_layout LyX-Code
13703 \begin_layout LyX-Code
13723 A detailed German description of such LaTeX commands can be found in the
13724 Koma-Script documentation
13729 With it, the letter's author can produce his personal letter layout.
13732 \begin_layout Standard
13741 define the beginning of the letter and must be used in every letter.
13742 To emphasize them in the LyX document class, they are marked with the letter
13752 \begin_inset space ~
13755 in the left margin.
13756 It is possible to write any number of letters in one file.
13761 type produces a new letter using the same addressee and a
13765 type produces a new addressee.
13782 are ordinary paragraph types and can also be used several times in one
13783 and the same letter.
13786 \begin_layout Itemize
13791 : produces a paragraph for the addressee and implicitly defines the beginning
13795 \begin_layout Itemize
13800 : produces a paragraph for the form of address and implicitly produces a
13804 \begin_layout Itemize
13809 : produces a paragraph for a close.
13812 \begin_layout Itemize
13817 : produces a paragraph for a postscript.
13820 \begin_layout Itemize
13825 : produces a paragraph for a distribution list.
13828 \begin_layout Itemize
13833 : produces a paragraph for enclosures.
13836 \begin_layout Standard
13877 are input types provided with a label to enter information, which will
13878 be processed by the document class.
13882 \begin_layout Plain Layout
13883 It could be seen as a matter of inconsequence, that the types
13891 described above are not such input types as well.
13892 Because of the special meaning of those types, however, I have implemented
13893 them as ordinary paragraph types with a one letter mark in the left margin.
13894 Moreover, it would affect my feeling of symmetry, if the
13902 type had such a serious different appearance.
13907 The types must be used ahead of the corresponding
13914 \begin_layout Standard
13915 An implementation of these types in a WYSIWYG fashion does not seem to make
13916 sense, because the real appearance of the produced letter does not only
13917 depend on the usage of the particular type, but also on other factors.
13918 For example, a signature entered in the
13922 type will in the standard behavior appear in the produced letter only,
13923 when in the same letter also a
13928 The entered value of the
13932 type will in the standard behavior not appear in the produced letter at
13934 The possibility to design the letter`s heading freely is already indicated
13935 in a footnote above.
13938 \begin_layout Standard
13939 The input types can also be used as empty paragraphs.
13940 This makes sense e.
13941 \begin_inset space \thinspace{}
13945 \begin_inset space \space{}
13957 type is not used at all, in the standard behavior the value of the
13961 type is used as signature, whereas if an empty
13965 type is used, no signature value is defined.
13968 \begin_layout Standard
13969 By using the input types it is possible to write a letter template, containing
13970 filled input types with your personal dates (name, address, etc.) and empty
13971 input types for other dates you want to enter.
13974 \begin_layout Itemize
13979 : sender's name, in the standard behavior appears as a centered paragraph
13980 in small caps in the letter`s heading.
13983 \begin_layout Itemize
13988 : sender's signature, in the standard behavior appears below the
13997 type is used, the value of the
14001 type appears instead.
14004 \begin_layout Itemize
14009 : sender's address, in the standard behavior appears in a centered paragraph
14010 in the letter`s heading below the sender's name.
14013 \begin_layout Itemize
14018 : sender's telephone number, in the standard behavior only sets the LaTeX
14028 \begin_layout Itemize
14033 : place of the letter`s making.
14036 \begin_layout Itemize
14041 : date of the letter`s making.
14050 , in the standard behavior, produce the place and the date in a right-aligned
14051 line below the addressee's field.
14056 type is used, neither place nor date appear, independent of the value of
14066 type is used, the date of the letter `s production is used.
14069 \begin_layout Itemize
14074 : sender`s back address, in the standard behavior appears above the addressee's
14075 field in a small sans serif font.
14078 \begin_layout Itemize
14083 : special mail information, in the standard behavior appears underlined
14084 above the addressee's field below the back address.
14087 \begin_layout Itemize
14092 : additional information, in the standard behavior appears on right side
14093 below the addressee`s field.
14096 \begin_layout Itemize
14101 : the letter's title, in the standard behavior appears in a big, bold, sans
14102 serif font above the subject.
14105 \begin_layout Itemize
14110 : the letter's subject, in the standard behavior appears in a bold font
14118 \begin_layout Standard
14139 produce a business letter like line above the
14143 line containing the fields
14144 \begin_inset Quotes eld
14148 \begin_inset Quotes erd
14152 \begin_inset Quotes eld
14156 \begin_inset Quotes erd
14160 \begin_inset Quotes eld
14164 \begin_inset Quotes erd
14168 \begin_inset Quotes eld
14172 \begin_inset Quotes erd
14176 \begin_inset Quotes eld
14180 \begin_inset Quotes erd
14184 \begin_inset Quotes eld
14188 \begin_inset Quotes erd
14192 For the date field, the value of the
14198 \begin_inset Quotes eld
14201 business letter types
14202 \begin_inset Quotes erd
14205 is used, the value of the
14209 type however does not appear, but only the LaTeX variable
14216 The ordinary output of place and date in a right-aligned line below the
14217 addressee`s field is suppressed.
14218 The types are implemented as input types provided with a label and must
14219 be used ahead of the corresponding
14226 \begin_layout Itemize
14234 \begin_layout Itemize
14242 \begin_layout Itemize
14250 \begin_layout Itemize
14258 \begin_layout Itemize
14266 \begin_layout Subsection
14267 The new letter class: letter (koma-script v.2)
14270 \begin_layout Standard
14276 \begin_layout Standard
14277 \begin_inset VSpace medskip
14283 \begin_layout Standard
14285 Koma-Script version 2.8 has introduced a new letter class
14289 which supersedes the now unsupported
14294 It has — on the LaTeX side — a completely new interface and is not compatible
14295 with the old class.
14296 Therefore, LyX supports both, though it is recommended you use the new
14300 \begin_layout Standard
14301 This class covers the same functionality as
14303 letter (koma-script),
14306 The basic items are
14310 (receiver's address, same as
14314 in the old layout),
14327 will start a new letter (i.
14328 \begin_inset space \thinspace{}
14332 \begin_inset space \space{}
14335 you can write several letters per document).
14336 New elements are sender's
14352 and the possibility to use a
14358 Insert\SpecialChar \menuseparator
14364 \begin_layout Standard
14365 The biggest improvement is, though, that the letter's layout is configurable
14366 to meet almost any needs.
14367 This can be done via the preamble or with a special style file (Letter
14368 Class Option, extension
14372 ), that will be read in as a class option.
14376 \begin_layout Plain Layout
14377 The KOMA package comes with some default
14382 There is, for instance, a
14386 file that follows german typesetting rules, or a
14390 that provides the default layout of the old
14395 The latter can be loaded with the class option
14404 ayout\SpecialChar \menuseparator
14409 ocument\SpecialChar \menuseparator
14421 template that is included in LyX for examples.
14422 A detailed description is to be found in the Koma-Script documentation
14430 \begin_layout Subsection
14434 \begin_layout Standard
14435 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14439 \begin_layout Itemize
14440 The chapter number of a
14444 type appears on a line of its own above the chapter heading instead of
14445 appearing in the same line ahead of it.
14446 The cause for that is the LyX internal behavior for the labeltype
14450 in the layout file.
14453 \begin_layout Itemize
14454 The headings of the types
14462 are only put in the
14463 \begin_inset Quotes eld
14467 \begin_inset Quotes erd
14470 LaTeX table of contents, but not in the LyX table of contents (
14472 Document\SpecialChar \menuseparator
14474 \begin_inset space ~
14478 \begin_inset space ~
14486 \begin_layout Itemize
14487 The paragraphs in a
14491 document class appear in a skip separation mode, not indented.
14492 This is the standard behavior, no special LaTeX commands are needed for
14496 Document\SpecialChar \menuseparator
14499 dialog the corresponding radio button indicates
14508 value always has the effect that extra LaTeX commands are inserted in the
14509 document to produce the gap, which is not what is wanted in this case.
14512 \begin_layout Section
14516 \begin_layout Standard
14522 \begin_layout Subsection
14526 \begin_layout Standard
14527 Memoir is a very powerful and constantly evolving class.
14528 It has been designed with regard to fictional and non-fictional literature.
14529 Its aim is to let the user have maximum control over the typesetting of
14531 Memoir is based on the standard book class, but it can also emulate the
14532 article class (see below).
14535 \begin_layout Standard
14536 Peter Wilson, the developer of Memoir, is known as the author of lots of
14537 useful packages in the LaTeX world.
14538 Most of them have been merged with Memoir.
14539 Therefore, it is much easier to layout the table of contents, appendices,
14540 chapter designs and such.
14541 LyX, though, does not support all of these goodies natively.
14542 Some of them might be added to forthcoming releases
14546 \begin_layout Plain Layout
14547 You are invited to send suggestions to
14548 \begin_inset Flex URL
14551 \begin_layout Plain Layout
14553 lyx-devel@lists.lyx.org
14563 , lots will probably never be supported, due to the limitations of LyX's
14565 Of course you can still use all features with the help of some native LaTeX
14570 \begin_layout Plain Layout
14575 \begin_layout Plain Layout
14585 \begin_inset space ~
14589 \begin_inset CommandInset ref
14591 reference "sec:Inserting-TeX-Code"
14601 In this section, we can only list those features that are natively supported
14603 For detailed descriptions (and for the rest of features) we recommend you
14604 have a look at the detailed manual of the Memoir class
14608 \begin_layout Plain Layout
14613 \begin_layout Plain Layout
14623 \begin_inset Flex URL
14626 \begin_layout Plain Layout
14628 CTAN:/macros/latex/memoir/memman.pdf
14638 , which is not only a user guide for the class, but also both a comprehensive
14639 description on good typesetting and a superb example for good typesetting
14643 \begin_layout Subsection
14644 Basic features and restrictions
14647 \begin_layout Standard
14648 Memoir supports basically all features of the standard book classes.
14649 There are, however, some differences, as follows:
14652 \begin_layout Description
14654 \begin_inset space ~
14657 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14660 \begin_layout Description
14662 \begin_inset space ~
14665 style: The fancy page style is not supported, due to a command clash between
14666 Memoir and the fancyhdr package (they both define a command with the same
14667 name, which confuses LaTeX).
14668 Instead, Memoir comes with a number of its own page styles (see
14670 Layout\SpecialChar \menuseparator
14671 Document\SpecialChar \menuseparator
14673 \begin_inset space ~
14679 If you want to use these for the chapter pages, you have to use the command
14686 in the main text or in preamble (e.
14687 \begin_inset space \thinspace{}
14691 \begin_inset space \space{}
14698 chapterstyle{companion}
14703 \begin_layout Description
14704 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14705 optional argument in the standard classes.
14706 With this, you can specify an alternative version of the title for the
14707 table of contents and the headers (for instance, if the title is too long).
14708 In LyX, you can do this via
14710 Insert\SpecialChar \menuseparator
14712 \begin_inset space ~
14717 at the beginning of a chapter/section.
14718 Memoir features a second optional argument and thus separates the table
14719 of contents from the header.
14720 You can define three variants of a title with this: one for the main text,
14721 one for the table of contents, and one for the headers.
14722 Simply insert two optional arguments if you need this feature, the first
14723 one containing the short title for the Table of Contents, the second one
14724 containing an alternative short title for the headers.
14727 \begin_layout Description
14728 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14729 of contents, the list of figures and the list of table start a new page
14731 Memoir does not follow this route.
14732 You have to insert a page break yourself, if you want to have one.
14735 \begin_layout Description
14736 Titlepage: For some unknown reason, Memoir uses pagination on the title
14737 page (in the standard classes, title pages are
14738 \begin_inset Quotes eld
14742 \begin_inset Quotes erd
14746 If you want an empty title page, type
14750 aliaspagestyle{title}{empty}
14755 \begin_layout Description
14756 Article: With the class option
14762 Layout\SpecialChar \menuseparator
14763 Document\SpecialChar \menuseparator
14765 \begin_inset space ~
14770 ), you can emulate article style.
14771 That is, counters (footnotes, figures, tables etc.) will not be reset on
14772 new chapters, chapters don't start a new page (but are—in contrary to
14773 \begin_inset Quotes eld
14777 \begin_inset Quotes erd
14780 article classes—still allowed), parts, though, use their own page, as in
14784 \begin_layout Description
14785 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14786 font commands, which have been used in the old LaTeX version 2.09 (e.
14787 \begin_inset space \thinspace{}
14791 \begin_inset space \space{}
14807 It produces an error and stops LaTeX whenever such a command appears.
14812 reallows the commands and spits out warnings instead (which does at least
14814 Since a lot of packages and particularly BibTeX style files are still using
14815 those commands, we have decided to use this option by default.
14818 \begin_layout Subsection
14822 \begin_layout Standard
14823 We will only describe the features supported by LyX (which is not much currently
14825 Please consult the Memoir manual
14829 \begin_layout Plain Layout
14834 \begin_layout Plain Layout
14844 \begin_inset Flex URL
14847 \begin_layout Plain Layout
14849 CTAN:/macros/latex/memoir/memman.pdf
14862 \begin_layout Description
14863 Abstract: You may wonder why an abstract is an extra feature.
14864 Well, it is in book class.
14865 Usually books don't have abstracts.
14866 Memoir, however, has.
14867 You can use it wherever and how often you like.
14870 \begin_layout Description
14871 Chapterprecis: You may know this older typesetting style: The contents of
14872 a chapter are summarized below the title and also in the table of contents
14874 \begin_inset space \thinspace{}
14878 \begin_inset space \space{}
14883 Our hero arrives in Troia; he loses some friends; he finds others
14886 Chapterprecis does exactly this.
14887 It is therefore only sensible below a chapter.
14890 \begin_layout Description
14891 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14892 The epigraph environment provides an elegant way of typesetting such a
14894 The motto itself (text) and its author (source) are divided by a short
14896 Unfortunately, we have to fool LyX a bit here again, since the environment
14897 needs two arguments (text and source).
14898 In this case, we have to use curly brackets (in TeX mode) between the two
14909 <author of the slogan>.
14912 \begin_layout Description
14913 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14914 complex figurative poems).
14915 LyX can only support a few of them.
14916 One is poemtitle, which is a centered title for poems, which will also
14917 be added to the table of contents (verse is the standard environment for
14919 Memoir has some enhanced versions of verse, but you need to use TeX code,
14920 because they have to be nested inside regular verse environments, which
14921 is not possible with LyX).
14924 \begin_layout Description
14925 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14928 \begin_layout Section
14929 Article (mwart), book (mwbk) and report (mwrep)
14930 \begin_inset Argument status
14933 \begin_layout Plain Layout
14946 \begin_layout Standard
14952 \begin_layout Standard
14953 The LyX document classes
14969 correspond to the LaTeX document classes
14982 They are replacements for the standard document classes
14994 , resp., and fit better to Polish typography conventions in a number of points.
14998 \begin_layout Standard
15002 \begin_layout Itemize
15003 Unnumbered titles (with star, e.
15004 \begin_inset space \thinspace{}
15008 \begin_inset space \space{}
15015 ) are added into table of contents,
15018 \begin_layout Itemize
15019 Additional page styles:
15023 \begin_layout Description
15024 uheadings header with separated lines,
15027 \begin_layout Description
15028 myheadings custom header, contents headers via commands:
15043 \begin_layout Description
15044 myuheadings custom header with separated lines,
15047 \begin_layout Description
15048 outer page number is placed on outer side of page
15052 \begin_layout Itemize
15057 \begin_layout Description
15058 rmheadings serif titles — default,
15061 \begin_layout Description
15062 sfheadings sansserif titles,
15065 \begin_layout Description
15066 authortitle on title page first placed is author next title — default,
15069 \begin_layout Description
15070 titleauthor on title page first placed is title next author,
15073 \begin_layout Description
15074 withmarginpar reserve place on page for margins.
15078 \begin_layout Section
15082 \begin_layout Standard
15087 provides an alternative to the standard
15092 It provides similar functionality, but you might prefer this layout with
15093 sans serif sections, headings, and more.
15096 \begin_layout Section
15100 \begin_layout Standard
15106 \begin_layout Standard
15107 \begin_inset VSpace bigskip
15113 \begin_layout Standard
15118 \begin_inset space ~
15123 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15124 \begin_inset Formula $\beta$
15127 release of May, 1999) class.
15130 \begin_layout Standard
15135 textclass, which works with RevTeX 3.1.
15136 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15137 That means that it doesn't interact very well with LyX, which requires
15138 LaTeX2e, although it has been kludged to work.
15139 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15143 \begin_inset space ~
15148 textclass should also be pretty easy to use.
15151 \begin_layout Standard
15152 These documents are supposed to be used in
15156 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15157 macros, and assume you'll know what to put in the preamble if necessary.
15160 \begin_layout Subsection
15164 \begin_layout Standard
15165 All you need to do is install RevTeX 4, as described in the package's README
15167 The package can be found at The RevTeX 4 Web Site
15168 \begin_inset Flex URL
15171 \begin_layout Plain Layout
15173 http://publish.aps.org/revtex4/
15179 Install it somewhere that LaTeX can see it.
15180 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15182 \begin_inset space \thinspace{}
15186 \begin_inset space \space{}
15189 not the directory where you installed the class file.) Then, if you reconfigure
15190 LyX, it will find the class file and let you use the RevTeX4 textclass.
15193 \begin_layout Standard
15194 Probably the easiest way to get started is either to import a RevTeX 4 document
15202 \begin_inset space ~
15207 template, found in the templates directory.
15210 \begin_layout Subsection
15214 \begin_layout Standard
15215 Optional arguments to
15222 \begin_inset Quotes eld
15226 \begin_inset Quotes erd
15230 \begin_inset Quotes eld
15234 \begin_inset Quotes erd
15244 \begin_inset space ~
15252 \begin_inset space ~
15258 Remember that in RevTeX, at least one optional argument is required!
15261 \begin_layout Standard
15262 Other preamble matter, like
15269 \begin_inset space ~
15275 \begin_inset space ~
15280 dialog, also as usual.
15283 \begin_layout Subsection
15287 \begin_layout Standard
15288 The layouts basically correspond to the commands in RevTeX4.0.
15289 For example, the Email layout corresponds to
15296 Note that (at least as of RevTeX 4.0 Beta), the
15304 layouts are exactly equivalent, so you shouldn't need to use both.
15308 \begin_layout Plain Layout
15309 In case you're curious, both were included so that
15313 would be able to translate both
15333 \begin_layout Subsection
15337 \begin_layout Standard
15338 There are a couple of important unique aspects of RevTeX 4 which might cause
15339 bugs that will be even more confusing in LyX.
15342 \begin_layout Standard
15360 The LyX equivalent is that there is a separate Thanks layout.
15365 write footnotes in the
15369 layout, or weird things may happen.
15370 See the RevTeX 4 documentation for more details.
15373 \begin_layout Standard
15377 \begin_inset space ~
15385 \begin_inset space ~
15394 layouts must be placed
15402 layout and the corresponding
15419 , the LaTeX won't compile.
15422 \begin_layout Subsection
15426 \begin_layout Standard
15427 The main problem with this layout is that you can't use the optional arguments
15428 to layouts like Email and Title.
15429 (The problem is not unique to this layout; you can't use optional arguments
15430 to the Section layouts either.) This means that after you export that file
15431 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15432 need to edit the LaTeX file with a text editor to add the optional arguments
15434 \begin_inset space \thinspace{}
15438 \begin_inset space \space{}
15441 the running title for the page headers.
15442 Lacking these layouts makes the
15448 (and the equivalent
15454 ) useless, so the corresponding layouts don't exist, and will have to be
15459 \begin_layout Plain Layout
15464 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15465 has not been updated yet to take advantage of it.
15473 \begin_layout Section
15474 Springer Journals (
15481 \begin_layout Standard
15487 \begin_layout Subsection
15491 \begin_layout Standard
15492 These are the layout files for some of the journal formats used by Springer
15493 Verlag and listed on
15494 \begin_inset Flex URL
15497 \begin_layout Plain Layout
15499 http://www.springer.de/author/tex/help-journals.html
15504 , where you should also go to fetch the class files (yes, these are LaTeX2e
15506 It is a modular system: the things common to all journals are implemented
15511 , which journal-specific layout files (such as, e.
15512 \begin_inset space \thinspace{}
15516 \begin_inset space \space{}
15523 for Journal of Geodesy) can include.
15526 \begin_layout Standard
15527 This means that implementing support for any other Springer journal on this
15528 list is as simple as writing your own
15536 file following the outline given in
15544 \begin_layout Standard
15545 It is reasonably well tested only for the Journal of Geodesy.
15554 come with the standard LyX distribution.
15555 Install the relevant class file (downloaded from Springer) in a proper
15556 directory, reconfigure LaTeX (in the teTeX case by running
15560 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15561 and it should work.
15564 \begin_layout Subsection
15568 \begin_layout Standard
15569 A large number of theorem-like styles —
15575 \SpecialChar \ldots{}
15581 \begin_layout Standard
15584 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15585 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15588 See the Springer class file documentation for details.
15591 \begin_layout Subsection
15595 \begin_layout Itemize
15607 \begin_layout Itemize
15610 Probability Theory and Related Fields
15616 — Jean-Marc Lasgouttes
15619 \begin_layout Standard
15620 Add your own, it isn't so hard!
15623 \begin_layout Subsection
15627 \begin_layout Standard
15628 These files are partly based on the older
15632 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15633 file from Springer.
15638 layout, are now defunct.
15639 Jean-Marc Lasgouttes helped out big in making me find my way around the
15640 LyX layout file mechanism.
15643 \begin_layout Subsection
15647 \begin_layout Standard
15649 But probably less than in the old hacked-LaTeX
15656 \begin_layout Standard
15658 \begin_inset space \thinspace{}
15661 g.: does not display the number for theorem-like layouts, just #.
15664 \begin_layout Section
15670 \begin_inset CommandInset label
15679 \begin_layout Standard
15687 \begin_layout Subsection
15691 \begin_layout Standard
15692 This section describes how to use LyX to make slides for overhead projectors.
15693 There are two document classes that can do this: the default slides class
15699 This section documents the former.
15702 \begin_layout Standard
15703 I'm going to say this again, nice and clear, so that there's no misunderstanding
15707 \begin_layout Standard
15708 \begin_inset VSpace bigskip
15714 \begin_layout Standard
15718 This section documents the class
15719 \begin_inset Quotes eld
15727 \begin_inset Quotes erd
15735 \begin_layout Standard
15736 \begin_inset VSpace bigskip
15742 \begin_layout Standard
15743 If you're looking for the documentation for
15744 \begin_inset Quotes eld
15752 \begin_inset Quotes erd
15755 , check out section
15756 \begin_inset space ~
15760 \begin_inset CommandInset ref
15762 reference "sec:foiltex"
15772 \begin_inset Quotes eld
15780 \begin_inset Quotes erd
15783 ] is actually somewhat better than the default
15791 \begin_layout Plain Layout
15792 \SpecialChar \ldots{}
15793 or so I've been told repeatedly by its advocates.
15794 Having never used it, I have no idea if this claim is true or not.
15799 which this section documents.
15802 \begin_layout Standard
15803 This class is the LaTeX2e improvement of the old
15808 Every LaTeX2e distribution includes this class [which I'll just refer to
15810 \begin_inset Quotes eld
15818 \begin_inset Quotes erd
15821 from now on], so you're bound to have it.
15822 As I noted earlier, there are other classes, such as
15826 , which also produce slides for overhead projectors and do a better job
15828 However, there are some things which
15832 can do which the others can't, such as generate overlays.
15833 Read on to learn more!
15836 \begin_layout Subsection
15838 \begin_inset CommandInset label
15840 name "sec:slidesetup"
15847 \begin_layout Standard
15848 Obviously, to use this document class, you need to select
15849 \begin_inset Quotes eld
15857 \begin_inset Quotes erd
15860 from the class list in the
15862 Document\SpecialChar \menuseparator
15866 There are some other special things you should know about this class:
15869 \begin_layout Itemize
15870 Don't bother changing the options
15875 They're not supported by the
15882 \begin_layout Itemize
15886 \begin_inset space ~
15891 behaves a bit differently for this class.
15892 The possible choices and what they do are as follows:
15896 \begin_layout Description
15901 The final output contains page numbers in the lower right corner.
15904 \begin_layout Description
15913 , but also prints out any time markers you've put in.
15914 This is the default.
15917 \begin_layout Description
15922 The final output contains no page numbers, time markers, or alignment markers.
15926 \begin_layout Itemize
15931 class has an extra option:
15937 \begin_inset Quotes eld
15945 \begin_inset Quotes erd
15948 in the extra class options.
15952 \begin_layout Standard
15953 Using this options allows you to add time markers to
15959 \begin_inset space ~
15963 \begin_inset CommandInset ref
15965 reference "sec:slideNote"
15973 \begin_layout Standard
15974 You can also use the template file
15975 \begin_inset Quotes eld
15983 \begin_inset Quotes erd
15986 to automatically set up a document to use the
15992 File\SpecialChar \menuseparator
15994 \begin_inset space ~
15998 \begin_inset space ~
16003 to open your new document].
16004 The template file also contains some examples of the special paragraph
16005 environments used by this class.
16006 I'll describe those next.
16009 \begin_layout Subsection
16010 Paragraph Environments
16013 \begin_layout Subsubsection
16014 Supported Environments
16017 \begin_layout Standard
16018 The first thing you'll notice when you start up a new
16022 document is the font size and type: it's the equivalent of the size
16023 \begin_inset Quotes eld
16031 \begin_inset Quotes erd
16037 \begin_inset space ~
16043 This is also what's used in the output.
16045 \begin_inset Quotes eld
16049 \begin_inset Quotes erd
16052 to remind you that this is a slide.
16053 Your final slides will use a larger font; ergo, you'll have less space.
16054 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16057 \begin_layout Standard
16058 The next thing that becomes obvious is the changes to the paragraph environment
16059 pull-down box [at the far-left end of the toolbar].
16060 Most of the paragraph environments you're used to seeing are missing.
16061 There are also five new ones.
16066 class itself only supports certain paragraph environments:
16069 \begin_layout Itemize
16075 \begin_layout Itemize
16081 \begin_layout Itemize
16087 \begin_layout Itemize
16093 \begin_layout Itemize
16099 \begin_layout Itemize
16105 \begin_layout Itemize
16111 \begin_layout Itemize
16117 \begin_layout Itemize
16123 \begin_layout Itemize
16129 \begin_layout Itemize
16135 \begin_layout Standard
16136 All of the other standard environments, including the section-heading environmen
16137 ts, aren't used in the
16144 \begin_layout Standard
16145 On the other hand, you'll notice the following new environments:
16148 \begin_layout Itemize
16154 \begin_layout Itemize
16160 \begin_layout Itemize
16166 \begin_layout Itemize
16172 \begin_layout Itemize
16178 \begin_layout Standard
16179 These five are kind of quirky, due to a
16180 \begin_inset Quotes eld
16184 \begin_inset Quotes erd
16188 You see, LyX doesn't permit you to nest any other paragraph environment
16189 into an empty environment.
16190 Now, that's fine and dandy, but it means that you wouldn't be able to start
16191 a slide with anything except plain text.
16192 To deal with this, I've performed a little
16193 \begin_inset Quotes eld
16197 \begin_inset Quotes erd
16203 \begin_layout Subsubsection
16204 Quirks of the New Environments
16205 \begin_inset CommandInset label
16207 name "sec:slideQuirk"
16214 \begin_layout Standard
16215 All five of the new paragraph environments are somewhat quirky due to inherent
16216 limitiations in the current version of LyX.
16217 As I just mentioned, LyX forbids environments that begin with another environme
16219 To get around this, the
16223 environment isn't a paragraph environment as described in the
16231 \begin_layout Standard
16232 You should consider
16245 \begin_inset Quotes eld
16248 pseudo-environments.
16249 \begin_inset Quotes erd
16252 They look like a section heading or a
16253 \begin_inset Quotes eld
16261 \begin_inset Quotes erd
16264 but really begin a [and, if necessary, end the previous] paragraph environment.
16274 \begin_inset Quotes eld
16278 \begin_inset Quotes erd
16281 These two perform some action.
16284 \begin_layout Standard
16285 A common feature of all five environments,
16305 , is a rather long-ish label.
16306 The text following this label — ordinarily the contents of the paragraph
16307 environment — is utterly irrelevant for
16328 LyX completely ignores it.
16329 In fact, you can leave these five environments completely empty.
16333 \begin_layout Standard
16338 to put any text after the rather long-ish label, you might want to.
16339 This could be a short description of the contents of the
16344 In that case, enter your descriptive comment and hit
16348 as you normally would.
16351 \begin_layout Standard
16352 If, on the other hand, you don't want to enter any descriptive text, you'll
16353 hit another LyX quirk.
16354 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16355 environment until you put something in the old one.
16359 \begin_layout Itemize
16360 Start entering the text that will
16388 \begin_layout Itemize
16389 Now move to the beginning of that paragraph.
16393 \begin_layout Itemize
16402 \begin_layout Itemize
16403 Finally, change this new, empty paragraph to a
16427 \begin_layout Standard
16428 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16432 \begin_layout Subsection
16433 Making a Presentation with
16446 \begin_layout Subsubsection
16454 \begin_layout Standard
16455 If you're expecting this section to teach you how to actually make a presentatio
16456 n, you'll be sorely disappointed.
16457 Naturally, I'll describe all of the ways the
16461 class can assist you in preparing the materials for a presentation.
16462 Filling in the contents, however, is up to you.
16467 the LyX philosophy.]
16470 \begin_layout Standard
16475 environment [in the manner described in section
16476 \begin_inset space ~
16480 \begin_inset CommandInset ref
16482 reference "sec:slideQuirk"
16486 ] tells LyX to begin a new slide [duh].
16487 The label for this environment/
16488 \begin_inset Quotes erd
16492 \begin_inset Quotes erd
16496 \begin_inset Quotes eld
16500 \begin_inset Quotes erd
16503 in cool blue, followed by the label,
16504 \begin_inset Quotes eld
16508 \begin_inset Quotes erd
16512 Any text or paragraph environments that follow this one go on the new slide.
16516 \begin_layout Standard
16517 Slides are probably the only time you'll need to forcibly end pages in LyX
16518 (this can be specified in the
16523 In fact, you'll want to, once you finish entering the contents of one slide.
16524 If you've entered more text than can physically fit on a slide, the extra
16525 overflows onto a new slide.
16526 I don't recommend doing this, however, since the overflow slide won't have
16527 any page number on it.
16528 Furthermore, it may interfere with any
16532 you've made to accompany the oversized
16539 \begin_layout Standard
16548 environments work the same way as the
16553 They both create an
16554 \begin_inset Quotes eld
16558 \begin_inset Quotes erd
16561 followed by a label [
16562 \begin_inset Quotes eld
16566 \begin_inset Quotes erd
16570 \begin_inset Quotes eld
16574 \begin_inset Quotes erd
16578 The color is a stunning magenta instead of blue, and the
16579 \begin_inset Quotes eld
16583 \begin_inset Quotes erd
16586 will look different, in style and in length.
16587 The label fonts of all three also differ from one another.
16590 \begin_layout Standard
16595 , if the contents of a
16603 exceed the physical size of a slide or sheet of paper, the extra will overflow
16605 Again, you should avoid this.
16606 It defeats the whole purpose of
16617 \begin_layout Subsubsection
16627 \begin_layout Standard
16632 is a slide that sits atop another slide.
16633 Perhaps you wish to discuss a figure on the main
16637 before displaying the text associated with it.
16638 One way to accomplish this is tape a flap of dark paper over the part of
16643 you want to display later.
16644 This method fails, however, if you wish to overlap one graph with another,
16646 You would then have to fumble while speaking to align the two separate,
16651 s to align the two graphs.
16656 environment in both cases makes life much easier.
16659 \begin_layout Standard
16664 receives the page number of its
16665 \begin_inset Quotes eld
16669 \begin_inset Quotes erd
16677 \begin_inset Quotes eld
16685 \begin_inset Quotes erd
16692 \begin_layout Plain Layout
16693 Presumably, mutliple
16698 \begin_inset Quotes eld
16706 \begin_inset Quotes erd
16710 \begin_inset Quotes eld
16718 \begin_inset Quotes erd
16722 \begin_inset Quotes eld
16730 \begin_inset Quotes erd
16734 \begin_inset space ~
16737 appended to the page number of the parent
16747 Clearly, you want the contents of both the
16755 to each fit on a single physical slide! You should probably consider an
16761 \begin_inset Quotes eld
16765 \begin_inset Quotes erd
16777 class provides a visual cue for this: the label at the start of an
16781 is shorter than that at the start of a
16786 Lastly, when you generate printable output, you'll find alignment markers
16787 in all four corners of both the
16791 page and its parent
16796 These will assist you in lining up the two physical slides.
16799 \begin_layout Standard
16800 The major problem in overlaying two slides is aligning the contents of the
16801 two transparencies.
16802 How much space should you leave for that graph on the second slide? Worse
16803 still, what if you want a graph and a sentence on second slide, but there
16804 is text on the main transparency that goes in between them? You could try
16805 and insert vertical space of the right size.
16806 The better way is to use
16817 \begin_layout Standard
16818 As their names imply,
16826 are two command-like paragraph environments that make all subsequent text
16827 invisible and visible, respectively.
16829 \begin_inset space ~
16833 \begin_inset CommandInset ref
16835 reference "sec:slideQuirk"
16839 that you don't place anything
16843 these two environments, however.
16848 , it inserts a centered, sky-blue label into the page reading
16849 \begin_inset Quotes eld
16852 <Invisible Text Follows>
16853 \begin_inset Quotes erd
16857 For paragraphs following this label, the parts of the
16865 ; it doesn't matter which] where they would be contain instead blank space.
16869 \begin_layout Standard
16874 , the corresponding centered label is
16875 \begin_inset Quotes eld
16878 <Visible Text Follows>
16879 \begin_inset Quotes erd
16883 Paragraphs following this label behave normally.
16884 Note that the beginning of a new
16896 automatically shuts off an
16901 It's therefore not necessary to use
16912 \begin_layout Standard
16913 By now, it should be obvious how to create overlay transparencies using
16914 the proper combination of
16933 \begin_layout Enumerate
16938 , including everything that will appear on it, whether on the main slide
16946 \begin_layout Enumerate
16947 Before each figure or paragraph that will appear only on the
16956 If necessary, insert a
16960 environment after the
16967 \begin_layout Enumerate
16972 immediately following the
16979 \begin_layout Enumerate
16980 Copy the contents of this
16991 \begin_layout Enumerate
16996 , change all of the
17007 \begin_layout Standard
17009 You've just made an
17016 \begin_layout Standard
17017 There's one problem with the way I've designed the LyX
17021 class: you can't make text in the middle of a paragraph invisible, nor
17022 make text in the middle of an invisible paragraph visible again.
17023 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17027 \begin_layout Plain Layout
17028 The commands of interest are:
17031 \begin_layout Itemize
17036 invisible \SpecialChar \ldots{}
17040 \begin_layout Itemize
17045 visible \SpecialChar \ldots{}
17049 \begin_layout Plain Layout
17050 \SpecialChar \ldots{}
17051 and need to be marked as TeX.
17053 \begin_inset Quotes eld
17057 \begin_inset Quotes erd
17060 you wish to change goes in between the brackets [and after the
17073 If you don't know how to mark text as TeX, see the appropriate section
17086 \begin_layout Subsubsection
17096 \begin_inset CommandInset label
17098 name "sec:slideNote"
17105 \begin_layout Standard
17114 is associated with a
17115 \begin_inset Quotes eld
17119 \begin_inset Quotes erd
17131 class provides visual cues.
17136 is shorter than that of a
17140 [yet longer than that of an
17144 ] and, like the label of an
17148 is shockingly magenta.
17149 Additionally, the printed
17153 has the page number of its
17154 \begin_inset Quotes eld
17158 \begin_inset Quotes erd
17166 \begin_inset Quotes eld
17174 \begin_inset Quotes erd
17178 \begin_inset Quotes eld
17186 \begin_inset Quotes erd
17190 \begin_inset Quotes eld
17198 \begin_inset Quotes erd
17202 You can have multiple
17206 s associated with a single
17218 , you'll probably want to break up long
17222 s so that they fit on a single sheet of paper.
17225 \begin_layout Standard
17230 is obvious: it contains anything additional you might want to say about
17236 It could also be used as a sheet of reminders for a particular
17241 In the case of the latter, you might want to make use of time markers.
17247 \begin_inset Quotes eld
17251 \begin_inset Quotes erd
17254 support for time markers, a
17259 So, you'll have to resort to using the LaTeX codes.
17262 \begin_layout Standard
17263 To use time markers, you'll need to specify the extra class option
17264 \begin_inset Quotes eld
17272 \begin_inset Quotes erd
17276 \begin_inset space ~
17280 \begin_inset CommandInset ref
17282 reference "sec:slidesetup"
17287 This option turns on timing marks, which will appear in the lower-left-hand
17293 To set what appears in the time marker, you use the LaTeX commands
17294 \begin_inset Quotes eld
17304 \begin_inset Quotes erd
17308 \begin_inset Quotes eld
17318 \begin_inset Quotes erd
17322 The arguments of both commands are time measured in seconds.
17324 \begin_inset Quotes eld
17334 \begin_inset Quotes erd
17337 sets the time marker to a given time.
17339 \begin_inset Quotes eld
17349 \begin_inset Quotes erd
17352 increments the time marker by the specified amount.
17353 Using time markers and
17357 s in this fashion, you can remind yourself how much time to spend on a particula
17365 \begin_layout Standard
17366 There's one last feature to describe.
17367 Clearly, you'd like to print out all of your
17375 s on transparencies while printing all of your
17392 with which it is associated.
17393 What's a person to do?
17396 \begin_layout Standard
17397 Luckily, there are two LaTeX commands that allow you to select what to print
17399 Both must be placed into the preamble of your document.
17401 \begin_inset Quotes eld
17413 \begin_inset Quotes erd
17416 will cause the output to contain only the
17425 Correspondingly, the command
17426 \begin_inset Quotes eld
17438 \begin_inset Quotes erd
17441 prevents the output of anything but
17446 I'd advise placing both commands in the preamble and initially comment
17448 You can then preview your entire presentation as you write.
17449 When you're done writing, you can then uncomment one of the two to select
17450 what you want to print.
17451 I like to uncomment
17452 \begin_inset Quotes eld
17464 \begin_inset Quotes erd
17467 , print to a file with
17468 \begin_inset Quotes eld
17476 \begin_inset Quotes erd
17479 in its name, comment it back out, then uncomment
17480 \begin_inset Quotes eld
17492 \begin_inset Quotes erd
17496 \begin_inset Quotes eld
17504 \begin_inset Quotes erd
17508 I can then send either file to a printer, loading transparencies or plain
17509 paper as appropriate.
17512 \begin_layout Standard
17513 You can also provide other arguments to the
17514 \begin_inset Quotes eld
17524 \begin_inset Quotes erd
17528 \begin_inset Quotes eld
17538 \begin_inset Quotes erd
17542 See a good LaTeX book for details.
17545 \begin_layout Subsection
17550 Class Template File
17553 \begin_layout Standard
17554 I have also provided a template file,
17555 \begin_inset Quotes eld
17563 \begin_inset Quotes erd
17571 To use it, begin your new presentation with
17576 ile\SpecialChar \menuseparator
17578 \begin_inset space ~
17582 \begin_inset space ~
17592 Your new LyX presentation file will contain an example
17613 additionally contain an example of the use of
17622 Lastly, the preamble will contain:
17625 \begin_layout LyX-Code
17626 % Uncomment to print out only slides and overlays
17629 \begin_layout LyX-Code
17633 \begin_layout LyX-Code
17639 \begin_inset Newline newline
17645 \begin_layout LyX-Code
17646 % Uncomment to print out only notes
17649 \begin_layout LyX-Code
17653 \begin_layout LyX-Code
17661 \begin_layout Standard
17662 One final thing: I created this class to support the LaTeX2e
17663 \begin_inset Quotes eld
17671 \begin_inset Quotes erd
17674 class, one of the built-in LaTeX2e classes.
17675 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17676 built-in slide class.
17677 It's here if you want it or need it.
17678 There exist other LaTeX2e classes for creating presentations, such as the
17684 \begin_inset space ~
17688 \begin_inset CommandInset ref
17690 reference "sec:foiltex"
17695 \begin_inset Quotes eld
17703 \begin_inset Quotes erd
17706 package [present on some TeX distributions].
17707 The latter is not yet supported under LyX.
17711 \begin_layout Plain Layout
17712 Perhaps you can take on the task\SpecialChar \ldots{}
17718 I know nothing about these other classes.
17719 Try them out to see what sort of alternative they provide.
17722 \begin_layout Chapter
17723 LyX Features needing Extra Software
17726 \begin_layout Section
17730 \begin_layout Standard
17736 \begin_layout Subsection
17740 \begin_layout Standard
17749 \begin_layout Plain Layout
17754 is not yet available when you are using the LaTeX distribution MiKTeX.
17759 , you'll find in the
17766 \begin_inset space ~
17777 \begin_inset Newline newline
17781 \begin_inset CommandInset href
17783 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17790 \begin_layout Standard
17795 package is a program that was written by
17796 \begin_inset Flex Noun
17799 \begin_layout Plain Layout
17801 \begin_inset space ~
17809 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17810 and easy to forget.
17811 The program runs over your LaTeX file, checks the integrity of the file,
17812 and flags some common errors.
17813 In other technical words, it is
17820 \begin_layout Standard
17821 Well, what is a syntax checker doing in LyX which is supposed to produce
17822 correct LaTeX anyways? The answer is simple: Just as
17826 not only checks the
17830 of C programs, but also does
17834 checks for type-errors,
17838 catches some common
17842 errors, in addition to the syntactical ones.
17847 is capable of detecting several common errors, such as
17850 \begin_layout Itemize
17851 Ellipsis detection:
17852 \begin_inset Newline newline
17855 Use \SpecialChar \ldots{}
17859 \begin_layout Itemize
17860 No space in front of/after parenthesis:
17861 \begin_inset Newline newline
17867 \begin_layout Itemize
17868 Enforcement of normal space after common abbreviations:
17869 \begin_inset Newline newline
17873 \begin_inset space \thinspace{}
17877 \begin_inset space \space{}
17880 is too wide spacing.
17883 \begin_layout Itemize
17884 Enforcement of end-of-sentence space when the last sentence ends with a
17886 \begin_inset Newline newline
17890 And this is wrong spacing.
17893 \begin_layout Itemize
17894 Space in front of labels and similar commands:
17895 \begin_inset Newline newline
17898 The label should stick right up to the text to avoid falling to a wrong
17901 \begin_inset CommandInset label
17911 \begin_layout Plain Layout
17912 This footnote is in danger of falling off to a wrong page
17917 The label is separated too much.
17920 \begin_layout Itemize
17921 Space in front of references, instead of hard spaces:
17922 \begin_inset Newline newline
17925 If you have bad luck, the text will break right between the referenced text
17926 and reference number, and that's a pity.
17928 \begin_inset CommandInset ref
17930 reference "sec:chktex"
17937 \begin_layout Itemize
17939 \begin_inset Quotes eld
17943 \begin_inset Quotes erd
17947 \begin_inset Formula $\times$
17951 \begin_inset Newline newline
17954 2x2 looks cheap compared to
17955 \begin_inset Formula $2\times2$
17961 \begin_layout Standard
17962 and more \SpecialChar \ldots{}
17963 It is an invaluable tool when you are
17964 \begin_inset Quotes eld
17968 \begin_inset Quotes erd
17971 your document before printing, and you should run it right after the obligatory
17972 spelling check, and before you go fine tuning the typesetting.
17975 \begin_layout Subsection
17979 \begin_layout Standard
17980 If you have the program installed, usage is as simple as choosing
17982 Tools\SpecialChar \menuseparator
17984 \begin_inset space ~
17990 This will make LyX generate a LaTeX file of your document, start
17994 to check it, and then make LyX insert
17995 \begin_inset Quotes eld
17999 \begin_inset Quotes erd
18002 with the warnings from
18006 , if there were any.
18007 The warnings will be placed close to the point of the mistake, and you
18008 can quickly find them by using the
18010 Navigate\SpecialChar \menuseparator
18013 menu item, or the shortcut key
18022 Open the error boxes by clicking on them with the mouse, or use the shortcut
18031 bindings, or the corresponding
18040 Read the warning and correct the mistake, if it is a mistake.
18041 If you have trouble understanding what the warning is about, you can safely
18043 Remember that there is a hidden layer between the document on screen and
18044 the technical details in invoking
18048 , and this gap can make some warnings seem arcane or just plain silly.
18051 \begin_layout Standard
18052 This document is an excellent testing bed for the feature, and it should
18053 provide quite a few warnings for you to fiddle with.
18054 Since computers are only so smart, expect most of the warnings to be false
18058 \begin_layout Subsection
18059 How to fine tune it
18062 \begin_layout Standard
18063 Sometimes, you'll find that
18067 makes more noise than suits your mood.
18068 Then you can choose not to use it, wait until your mood changes, or try
18073 to get better along with you.
18076 \begin_layout Standard
18085 very configurable and extensible, you shouldn't expect to solve all problems
18091 Since LyX has to generate a somewhat special LaTeX file to be able to match
18092 the line numbers from the
18100 \begin_layout Plain Layout
18101 You can inspect the specific output from
18107 Edit\SpecialChar \menuseparator
18109 \begin_inset space ~
18113 \begin_inset space ~
18127 to the internal document structure, some of the warnings will not appear
18129 There are two things you can do about this:
18132 \begin_layout Itemize
18137 invocation command line in
18138 \begin_inset Flex MenuItem
18141 \begin_layout Plain Layout
18142 Tools\SpecialChar \menuseparator
18143 Preferences\SpecialChar \menuseparator
18144 Output\SpecialChar \menuseparator
18145 LaTeX\SpecialChar \menuseparator
18155 installation configuration file (usually with the file
18160 See below to learn what warnings can be enabled and disabled on the command
18164 \begin_layout Itemize
18165 Export your document as a raw LaTeX file using
18167 File\SpecialChar \menuseparator
18168 Export\SpecialChar \menuseparator
18176 Invoked in this way, it can be a hassle to find the corresponding place
18177 in the document inside LyX, but with a little patience, you should be able
18181 \begin_layout Standard
18182 Here follows the warning messages that can be enabled and disabled in
18191 to disable a warning, and
18195 to enable a warning.
18196 The emphasized entries are disabled by default, because the default is
18199 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18204 \begin_layout Standard
18205 Notice that you should only use the options that enable and disable warnings,
18206 because LyX relies on some of the other command line parameters to be set
18207 in a specific way to have a chance to communicate with
18214 \begin_layout Enumerate
18218 Command terminated with space.
18221 \begin_layout Enumerate
18224 Non-breaking space (
18225 \begin_inset Quotes eld
18233 \begin_inset Quotes erd
18236 ) should have been used.
18239 \begin_layout Enumerate
18243 You should enclose the previous parenthesis with
18244 \begin_inset Quotes eld
18252 \begin_inset Quotes erd
18258 \begin_layout Enumerate
18261 Italic correction (
18262 \begin_inset Quotes eld
18272 \begin_inset Quotes erd
18275 ) found in non-italic buffer.
18278 \begin_layout Enumerate
18281 Italic correction (
18282 \begin_inset Quotes eld
18292 \begin_inset Quotes erd
18295 ) found more than once.
18298 \begin_layout Enumerate
18302 No italic correction (
18303 \begin_inset Quotes eld
18313 \begin_inset Quotes erd
18319 \begin_layout Enumerate
18323 \begin_inset Quotes eld
18331 \begin_inset Quotes erd
18335 \begin_inset Quotes eld
18343 \begin_inset Quotes erd
18349 \begin_layout Enumerate
18352 Wrong length of dash may have been used.
18355 \begin_layout Enumerate
18359 \begin_inset Quotes eld
18367 \begin_inset Quotes erd
18371 \begin_inset Quotes eld
18379 \begin_inset Quotes erd
18385 \begin_layout Enumerate
18389 \begin_inset Quotes eld
18397 \begin_inset Quotes erd
18403 \begin_layout Enumerate
18407 \begin_inset Quotes eld
18415 \begin_inset Quotes erd
18418 to achieve an ellipsis.
18421 \begin_layout Enumerate
18424 Inter-word spacing (
18425 \begin_inset Quotes eld
18435 \begin_inset Quotes eld
18438 ) should perhaps be used.
18441 \begin_layout Enumerate
18444 Inter-sentence spacing (
18445 \begin_inset Quotes eld
18455 \begin_inset Quotes erd
18458 ) should perhaps be used.
18461 \begin_layout Enumerate
18464 Could not find argument for command.
18467 \begin_layout Enumerate
18471 \begin_inset Quotes eld
18479 \begin_inset Quotes erd
18485 \begin_layout Enumerate
18488 Math mode still on at end of LaTeX file.
18491 \begin_layout Enumerate
18495 \begin_inset Quotes eld
18503 \begin_inset Quotes erd
18506 doesn't match the number of
18507 \begin_inset Quotes eld
18515 \begin_inset Quotes erd
18521 \begin_layout Enumerate
18524 You should use either
18527 \begin_inset Quotes eld
18535 \begin_inset Quotes erd
18540 as an alternative to
18541 \begin_inset Quotes eld
18549 \begin_inset Quotes erd
18555 \begin_layout Enumerate
18562 " (ASCII 39) instead of "
18569 \begin_layout Enumerate
18572 User-specified pattern found.
18575 \begin_layout Enumerate
18578 This command might not be intended.
18581 \begin_layout Enumerate
18588 \begin_layout Enumerate
18606 \begin_layout Enumerate
18609 Delete this space to maintain correct page references.
18612 \begin_layout Enumerate
18616 You might wish to put this between a pair of
18617 \begin_inset Quotes eld
18625 \begin_inset Quotes erd
18631 \begin_layout Enumerate
18634 You ought to remove spaces in front of punctuation.
18637 \begin_layout Enumerate
18640 Could not execute LaTeX command.
18643 \begin_layout Enumerate
18652 in front of small punctuation.
18655 \begin_layout Enumerate
18663 may look prettier here.
18666 \begin_layout Enumerate
18670 Multiple spaces detected in output.
18673 \begin_layout Enumerate
18676 This text may be ignored.
18679 \begin_layout Enumerate
18685 \begin_inset Quotes eld
18690 to begin quotation, not
18697 \begin_layout Enumerate
18704 to end quotation, not
18707 \begin_inset Quotes eld
18715 \begin_layout Enumerate
18721 \begin_layout Enumerate
18724 You should perhaps use
18725 \begin_inset Quotes eld
18733 \begin_inset Quotes erd
18739 \begin_layout Enumerate
18742 You should put a space in front of/after parenthesis.
18745 \begin_layout Enumerate
18748 You should avoid spaces in front of/after parenthesis.
18751 \begin_layout Enumerate
18755 You should not use punctuation in front of/after quotes.
18758 \begin_layout Enumerate
18761 Double space found.
18764 \begin_layout Enumerate
18767 You should put punctuation outside inner/inside display math mode.
18770 \begin_layout Enumerate
18773 You ought to not use primitive TeX in LaTeX code.
18776 \begin_layout Enumerate
18779 You should remove spaces in front of
18780 \begin_inset Quotes eld
18788 \begin_inset Quotes erd
18794 \begin_layout Enumerate
18797 \begin_inset Quotes eld
18805 \begin_inset Quotes erd
18808 is normally not followed by
18809 \begin_inset Quotes eld
18817 \begin_inset Quotes erd
18823 \begin_layout Standard
18824 In later versions of LyX, we hope to provide a more complete interface to
18825 this tool (and it's smaller cousin
18829 ) to exploit the full power of it.
18830 But it's not exactly useless as it is now: go try it on one of your existing
18831 documents of a certain length and be surprised.
18834 \begin_layout Section
18835 Version Control in LyX
18838 \begin_layout Standard
18841 Lars Gullik Bjønnes
18848 \begin_layout Subsection
18852 \begin_layout Standard
18853 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18854 If you need something a bit more sophisticated you will have to do that
18855 manually in a terminal.
18858 \begin_layout Standard
18859 Also note that CVS support is not as good as subversion support so we advise
18861 A good place to start learning Subversion is SVN Book
18865 \begin_layout Plain Layout
18866 \begin_inset CommandInset href
18868 target "http://svnbook.red-bean.com/"
18878 In the case of RCS you should read
18879 \begin_inset Quotes eld
18883 \begin_inset Quotes erd
18886 (a man file, read it with
18891 This file describes all the basic features of RCS.
18892 You should especially notice the comment about a RCS directory, and the
18893 notion of a master RCS file (the file ending in
18900 \begin_layout Standard
18901 Before you begin to use the version control features in LyX, you should
18902 be familiar with RCS/CVS/SVN/GIT usage.
18903 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18904 package — no guarantees are made for older versions.
18905 Most of the log messages are not currently displayed after operations —
18906 you can check them in the Messages pane if unsure.
18907 Regular users of version control will appreciate VC toolbar, which can
18910 View\SpecialChar \menuseparator
18911 Toolbars\SpecialChar \menuseparator
18913 \begin_inset space ~
18921 \begin_layout Standard
18922 For introducing your own external commands consult vc-command in the manual
18926 \begin_layout Subsection
18927 RCS commands in LyX
18930 \begin_layout Standard
18931 The following sections describe the RCS commands supported by LyX.
18932 You can find them in the
18934 File\SpecialChar \menuseparator
18936 \begin_inset space ~
18942 LyX was tested against RCS 5.7/5.8
18946 \begin_layout Plain Layout
18947 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18948 in order to work properly with LyX.
18949 In particular time zone (TZ) should be set and more importantly RCSINIT
18950 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18951 expects archive to be found in file.lyx,v within the original document directory.
18952 See also README shipped with Windows RCS binaries.
18960 \begin_layout Subsubsection
18966 \begin_layout Standard
18967 If your document is not under revision control, this is the only item shown
18969 And if it is under revision control, the
18973 item is not visible.
18977 \begin_layout Standard
18978 This command registers your document with RCS (unless you are under the
18979 directory managed by CVS)\SpecialChar \@.
18980 You are asked interactively to supply an initial
18981 description of the document.
18982 The document is now set in Read-Only mode and you have to
18985 \begin_inset space ~
18989 \begin_inset space ~
18993 \begin_inset space ~
18998 , before making any changes to it.
18999 A document under revision control has a
19000 \begin_inset Quotes eld
19003 [RCS:<version> <locker>]
19004 \begin_inset Quotes erd
19007 item tagged to the filename in the minibuffer.
19010 \begin_layout Standard
19011 RCS command that is run:
19013 ci -q -u -i -t-"<initial description>" <file-name>
19016 \begin_layout Standard
19021 to understand the switches.
19025 \begin_layout Subsubsection
19031 \begin_layout Standard
19032 When you are finished editing a file, you check in your changes.
19033 When you do this, you are asked for a description of the changes.
19034 This is stored in the history log.
19035 The version number is bumped, your changes are applied to the master RCS
19036 file, the document is unlocked and set to Read-Only mode.
19039 \begin_layout Standard
19042 ci -q -u -m"<description>" <file-name>
19045 \begin_layout Subsubsection
19051 \begin_layout Standard
19052 By doing this you lock the document so that only you can edit it.
19053 This will also make the document Read-Write only for you.
19054 You will usually continue editing for a while and when you are finished
19055 you check in your changes.
19056 The status line is changed to reflect that you have locked the file.
19059 \begin_layout Standard
19062 co -q -l <file-name>
19065 \begin_layout Subsubsection
19068 Revert To Repository Version
19071 \begin_layout Standard
19072 This will discard all changes made to the document since the last check
19074 You get a warning before changes are discarded.
19077 \begin_layout Standard
19080 co -f -u<version> <file-name>
19083 \begin_layout Subsubsection
19089 \begin_layout Standard
19090 This will create a copy of the current document.
19091 Since RCS does not support copy operations natively, the version history
19092 is not preserved, and the copy is added as a new file.
19093 It requires a clean document without any changes since the last checkin.
19094 You are asked for a file name and a description of the copy operation.
19095 After that the copy is created, both locally and in the repository.
19096 If the parent directories of the copied and original document differ, all
19097 relative paths of included files of the copy are adjusted (like in
19099 File\SpecialChar \menuseparator
19102 \SpecialChar \ldots{}
19104 Finally, the copy is loaded instead of the original document.
19107 \begin_layout Labeling
19108 \labelwidthstring 00.00.0000
19110 \begin_inset space ~
19114 \begin_inset space ~
19118 \begin_inset Newline newline
19122 \begin_inset Flex Code
19125 \begin_layout Plain Layout
19128 \begin_inset Quotes eld
19132 \begin_inset Quotes erd
19141 \begin_inset Flex Code
19144 \begin_layout Plain Layout
19147 \begin_inset Quotes eld
19151 \begin_inset Quotes erd
19160 \begin_inset Newline newline
19164 \begin_inset Flex Code
19167 \begin_layout Plain Layout
19171 \begin_inset Quotes eld
19175 \begin_inset Quotes erd
19186 \begin_layout Subsubsection
19192 \begin_layout Standard
19193 This makes as if the last check in never happened.
19194 No changes are made to the document loaded into LyX, but the last version
19195 is removed from the master RCS file.
19198 \begin_layout Standard
19201 rcs -o<version> <file-name>
19204 \begin_layout Subsubsection
19210 \begin_layout Standard
19211 This shows the complete history of the RCS document.
19216 is shown in a browser.
19224 \begin_layout Subsubsection
19228 \begin_layout Standard
19229 LyX supports RCS version number, author name, date and time of last commit.
19230 All those are extracted from
19232 rlog -r <file-name>
19236 \begin_inset CommandInset ref
19238 reference "sub:VCS-Revision-Information"
19245 \begin_layout Subsection
19246 CVS commands in LyX
19249 \begin_layout Standard
19250 A subset of CVS operations is supported by LyX.
19251 You can find the commands in the
19253 File\SpecialChar \menuseparator
19255 \begin_inset space ~
19261 The version control system SVN is more powerful, so please use it instead
19262 of CVS if possible.
19265 \begin_layout Subsubsection
19271 \begin_layout Standard
19272 If you start from scratch with CVS you have to create your repository and
19273 checkout the working copy with external tools.
19274 If you're using a client-server setup you may need to login before doing
19275 the first repository checkout.
19278 \begin_layout Standard
19279 If your documents are under revision control and others are using the same
19280 repository problems arise when different changes to the same document at
19281 the same location happen.
19282 Standard CVS repositories don't operate with a file locking mechanism.
19283 This may be surprising, but conflicts only occur if people disagree on
19284 the proper content of the same part of a document.
19285 So, if co-workers are used to communicate regularly, these conflicts occur
19287 If they don't communicate they have a fundamental problem anyway.
19288 Nevertheless some people like to work with so called
19289 \begin_inset Quotes eld
19293 \begin_inset Quotes erd
19297 If they do so the working copy of all files is readonly when checked out
19298 first and the user starts editing after using a special command to make
19299 the working copy writable.
19300 When the changes are checked in the working copy returns to readonly state.
19301 With LyX one has to edit the
19302 \begin_inset Flex Code
19305 \begin_layout Plain Layout
19311 file and add the line
19312 \begin_inset Flex Code
19315 \begin_layout Plain Layout
19321 to work with reserved checkouts.
19322 The benefit is the possibility to see who is using a writable copy of some
19324 It's not guaranteed only one user makes a copy writable.
19327 \begin_layout Standard
19328 LyX tries to guess if you're using reserved or non-reserved checkouts.
19329 If your working copy is readonly or it is writable and an additional copy
19330 of your document exists in the CVS/Base sub-directory a reserved otherwise
19331 a non-reserved checkout is assumed.
19332 When a reserved checkout is detected you have to use
19333 \begin_inset Flex MenuItem
19336 \begin_layout Plain Layout
19342 to make your working copy writable if it's readonly.
19344 \begin_inset Flex MenuItem
19347 \begin_layout Plain Layout
19353 operation is possible and that makes your working copy readonly again after
19354 transferring your changes to the repository.
19357 \begin_layout Standard
19358 More information about CVS can be found here
19359 \begin_inset Flex URL
19362 \begin_layout Plain Layout
19364 http://www.nongnu.org/cvs
19370 \begin_inset Flex URL
19373 \begin_layout Plain Layout
19375 http://ximbiot.com/cvs
19383 \begin_layout Standard
19388 to understand the sub-commands and the switches mentioned below.
19391 \begin_layout Subsubsection
19397 \begin_layout Standard
19398 If your document is not under revision control, this is the only item shown
19400 And if it is under revision control, the
19407 item is not visible.
19411 \begin_layout Standard
19412 This command registers in CVS your document
19413 \begin_inset Flex Strong
19416 \begin_layout Plain Layout
19424 in the case you have already the documents directory under CVS control
19430 This means you have to create or checkout the archive by yourself using
19432 (In case you forget that step LyX registers the document with RCS.)
19435 \begin_layout Standard
19436 Then you are asked interactively to supply an initial description of the
19438 Don't forget that registered file is not yet checked in.
19441 \begin_layout Standard
19442 CVS command that is run:
19444 cvs -q add -m"<entered message>" "<file-name>"
19447 \begin_layout Standard
19452 above and for all other CVS commands is an abbreviation for
19453 \begin_inset Quotes eld
19456 change the current working directory to file location and use the file name
19457 without path component as argument
19458 \begin_inset Quotes erd
19464 \begin_layout Subsubsection
19470 \begin_layout Standard
19471 When you are finished editing a file, you commit your changes.
19472 When you do this and you had changed the document, you are asked for a
19473 description of the changes.
19474 After that changes are written to the repository.
19475 In case you didn't change the document and a reserved checkout is detected
19476 the reservation made on
19477 \begin_inset Flex MenuItem
19480 \begin_layout Plain Layout
19489 \begin_layout Labeling
19490 \labelwidthstring 00.00.0000
19492 \begin_inset space ~
19496 \begin_inset space ~
19500 \begin_inset Newline newline
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19510 -q commit -m"<description>" "<file-name>"
19516 \begin_inset Newline newline
19520 \begin_inset Flex Code
19523 \begin_layout Plain Layout
19534 \begin_layout Subsubsection
19540 \begin_layout Standard
19541 When you are sharing a repository with others, you may have to incorporate
19542 their changes into your working copy.
19545 \begin_layout Standard
19548 cvs -q update "<file-name>"
19551 \begin_layout Standard
19552 If a readonly checkout is detected the working copy is made writable and
19556 \begin_layout Standard
19559 cvs -q edit "<file-name>"
19562 \begin_layout Subsubsection
19565 Revert To Repository Version
19568 \begin_layout Standard
19569 This will discard all changes made to the document since the last check
19571 You get a warning before changes are discarded.
19572 Firstly the file is deleted, secondly CVS update command is run.
19575 \begin_layout Standard
19578 cvs -q update "<file-name>"
19581 \begin_layout Standard
19582 If a reserved checkout is detected and the working copy has no changes only
19583 the reservation is undone.
19586 \begin_layout Standard
19589 cvs -q unedit "<file-name>"
19592 \begin_layout Subsubsection
19598 \begin_layout Standard
19599 This will create a copy of the current document.
19600 Since CVS does not support copy operations natively, the version history
19601 is not preserved, and the copy is added as a new file.
19602 It requires a clean document without any changes since the last checkin.
19603 You are asked for a file name and a description of the copy operation.
19604 After that the copy is created, both locally and in the repository.
19605 If the parent directories of the copied and original document differ, all
19606 relative paths of included files of the copy are adjusted (like in
19608 File\SpecialChar \menuseparator
19611 \SpecialChar \ldots{}
19613 Finally, the copy is loaded instead of the original document.
19616 \begin_layout Labeling
19617 \labelwidthstring 00.00.0000
19619 \begin_inset space ~
19623 \begin_inset space ~
19627 \begin_inset Newline newline
19631 \begin_inset Flex Code
19634 \begin_layout Plain Layout
19637 \begin_inset Quotes eld
19641 \begin_inset Quotes erd
19650 \begin_inset Flex Code
19653 \begin_layout Plain Layout
19656 \begin_inset Quotes eld
19660 \begin_inset Quotes erd
19669 \begin_inset Newline newline
19673 \begin_inset Flex Code
19676 \begin_layout Plain Layout
19680 \begin_inset Quotes eld
19684 \begin_inset Quotes erd
19695 \begin_layout Subsubsection
19701 \begin_layout Standard
19702 This will rename the current document.
19703 Since CVS does not support rename operations natively, the version history
19704 is not preserved, the renamed document is added as a new file, and the
19705 original document is deleted.
19706 It requires a clean document without any changes since the last checkin.
19707 You are asked for a file name and a description of the rename operation.
19708 After that the document is renamed, both locally and in the repository.
19709 If the parent directories of the new and old file names differ, all relative
19710 paths of included files are adjusted (like in
19712 File\SpecialChar \menuseparator
19715 \SpecialChar \ldots{}
19717 Finally, the document is reloaded using the new name.
19720 \begin_layout Labeling
19721 \labelwidthstring 00.00.0000
19723 \begin_inset space ~
19727 \begin_inset space ~
19731 \begin_inset Newline newline
19735 \begin_inset Flex Code
19738 \begin_layout Plain Layout
19741 \begin_inset Quotes eld
19745 \begin_inset Quotes erd
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19760 \begin_inset Quotes eld
19764 \begin_inset Quotes erd
19773 \begin_inset Newline newline
19777 \begin_inset Flex Code
19780 \begin_layout Plain Layout
19784 \begin_inset Quotes eld
19788 \begin_inset Quotes erd
19797 \begin_inset Newline newline
19801 \begin_inset Flex Code
19804 \begin_layout Plain Layout
19808 \begin_inset Quotes eld
19812 \begin_inset Quotes erd
19823 \begin_layout Subsubsection
19824 Update of the local directory checkout from repository
19827 \begin_layout Standard
19828 Once your documents gets more complex, containing sub-documents and pictures,
19830 \begin_inset Flex Code
19833 \begin_layout Plain Layout
19839 files and so on using version control becomes more complicated.
19840 LyX supports updating the whole tree in which resides the document.
19841 This become especially useful once you cooperate with people which neither
19842 have detailed knowledge about CVS usage nor they have ambition to commit
19843 additional material to the repository.
19844 You have to organize the files structure so that all external files are
19845 in the same directory or subdirectories of the document.
19846 It's good practice anyway to store multipart documents in an extra directory.
19849 \begin_layout Standard
19851 \begin_inset Flex Code
19854 \begin_layout Plain Layout
19855 Update local directory from repository
19860 command updates the whole directory.
19861 If local changes are detected user is warned before update starts.
19862 In case of merge conflicts both versions of the conflicting document parts
19863 are placed in the final document.
19864 You have to review and correct the result of the merge.
19865 You'll find the conflicts enclosed in pairs of
19866 \begin_inset Flex Code
19869 \begin_layout Plain Layout
19876 \begin_inset Flex Code
19879 \begin_layout Plain Layout
19886 \begin_inset Flex Code
19889 \begin_layout Plain Layout
19896 The first part is your version as before the update operation with the
19897 document name prepended.
19898 The second one is the repository version with the version number after
19900 \begin_inset Flex Code
19903 \begin_layout Plain Layout
19912 \begin_layout Labeling
19913 \labelwidthstring 00.00.0000
19915 \begin_inset space ~
19919 \begin_inset space ~
19923 \begin_inset Newline newline
19927 \begin_inset Flex Code
19930 \begin_layout Plain Layout
19938 (Ask if changes are detected.)
19939 \begin_inset Newline newline
19943 \begin_inset Flex Code
19946 \begin_layout Plain Layout
19947 cd $path; cvs -q update
19957 \begin_layout Standard
19959 \begin_inset Flex Code
19962 \begin_layout Plain Layout
19968 stands for the path to the document.
19971 \begin_layout Subsubsection
19977 \begin_layout Standard
19978 This shows the complete history of the CVS document.
19981 cvs log "<file-name>"
19983 is shown in a browser.
19986 \begin_layout Subsubsection
19990 \begin_layout Standard
19991 LyX supports CVS version number, author name, date and time of last commit.
19992 All those are extracted from
19994 cvs log -r <file-name>
19998 \begin_inset CommandInset ref
20000 reference "sub:VCS-Revision-Information"
20007 \begin_layout Subsection
20008 SVN commands in LyX
20011 \begin_layout Standard
20012 SVN is now partially supported by LyX.
20013 You can find the commands in the
20015 File\SpecialChar \menuseparator
20017 \begin_inset space ~
20023 Please note that if you use password protected access to repository via
20024 ssh, you will be asked in terminal window.
20025 LyX was tested against SVN 1.5 and 1.6
20029 \begin_layout Plain Layout
20030 Most of the commands will work with 1.4 too, see
20031 \begin_inset CommandInset ref
20033 reference "sub:SVN-Repo-Update"
20045 \begin_layout Subsubsection
20051 \begin_layout Standard
20052 If your document is not under revision control, this is the only item shown
20054 And if it is under revision control, the
20061 item is not visible.
20064 \begin_layout Standard
20065 This command registers in SVN your document ONLY in case you have already
20066 the documents directory under SVN control (in particular
20071 This means you have to checkout the archive by yourself.
20074 \begin_layout Standard
20075 Then you are asked interactively to supply an initial description of the
20077 Don't forget that registered file is not yet commited.
20080 \begin_layout Standard
20081 SVN command that is run:
20084 \begin_inset Quotes eld
20088 \begin_inset Quotes erd
20094 \begin_layout Standard
20099 to understand the switches.
20102 \begin_layout Subsubsection
20108 \begin_layout Standard
20109 When you are finished editing a file, you commit your changes.
20110 When you do this, you are asked for a description of the changes.
20111 After that changes are commited.
20114 \begin_layout Standard
20119 \begin_layout Plain Layout
20120 In case locking is not enabled.
20122 \begin_inset CommandInset ref
20124 reference "subsec:SVN-File-Locking"
20135 svn commit -q -m"<description>" <file-name>
20138 \begin_layout Subsubsection
20144 \begin_layout Standard
20145 Updates the changes of this file from the repository.
20146 Be sure you understand SVN merging and conflicts resolving before using
20147 this function, because all conflicts has to be resolved manually by you!
20150 \begin_layout Standard
20155 \begin_layout Plain Layout
20163 svn update --non-interactive
20164 \begin_inset Quotes eld
20168 \begin_inset Quotes erd
20174 \begin_layout Subsubsection
20177 Revert To Repository Version
20180 \begin_layout Standard
20181 This will discard all changes made to the document since the last check
20183 You get a warning before changes are discarded.
20186 \begin_layout Standard
20190 \begin_inset Quotes eld
20194 \begin_inset Quotes erd
20200 \begin_layout Subsubsection
20206 \begin_layout Standard
20207 This will create a copy of the current document including the version history.
20208 It requires a clean document without any changes since the last checkin.
20209 You are asked for a file name and a description of the copy operation.
20210 After that the copy is created, both locally and in the repository.
20211 If the parent directories of the copied and original document differ, all
20212 relative paths of included files of the copy are adjusted (like in
20214 File\SpecialChar \menuseparator
20217 \SpecialChar \ldots{}
20219 Finally, the copy is loaded instead of the original document.
20222 \begin_layout Labeling
20223 \labelwidthstring 00.00.0000
20225 \begin_inset space ~
20229 \begin_inset space ~
20233 \begin_inset Newline newline
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20244 \begin_inset Quotes eld
20248 \begin_inset Quotes erd
20252 \begin_inset Quotes eld
20256 \begin_inset Quotes erd
20265 \begin_inset Newline newline
20269 \begin_inset Flex Code
20272 \begin_layout Plain Layout
20281 \begin_layout Subsubsection
20287 \begin_layout Standard
20288 This will rename the current document including the version history.
20289 It requires a clean document without any changes since the last checkin.
20290 You are asked for a file name and a description of the rename operation.
20291 After that the document is renamed, both locally and in the repository.
20292 If the parent directories of the new and old file names differ, all relative
20293 paths of included files are adjusted (like in
20295 File\SpecialChar \menuseparator
20298 \SpecialChar \ldots{}
20300 Finally, the document is reloaded using the new name.
20303 \begin_layout Labeling
20304 \labelwidthstring 00.00.0000
20306 \begin_inset space ~
20310 \begin_inset space ~
20314 \begin_inset Newline newline
20318 \begin_inset Flex Code
20321 \begin_layout Plain Layout
20325 \begin_inset Quotes eld
20329 \begin_inset Quotes erd
20333 \begin_inset Quotes eld
20337 \begin_inset Quotes erd
20346 \begin_inset Newline newline
20350 \begin_inset Flex Code
20353 \begin_layout Plain Layout
20362 \begin_layout Subsubsection
20363 \begin_inset CommandInset label
20365 name "sub:SVN-Repo-Update"
20369 Update of the local directory checkout from repository
20373 \begin_layout Plain Layout
20374 Note that this command will work only with subversion
20375 \begin_inset Formula $\geqq1.5$
20386 \begin_layout Standard
20387 All the commands above have one shortcomming - they deal with the current
20389 Once your document contains pictures, includes external
20390 \begin_inset Flex Code
20393 \begin_layout Plain Layout
20399 files and so on administration becomes more complicated.
20400 LyX now supports updating the whole tree in which resides the document
20404 \begin_layout Plain Layout
20405 One need to organize the files structure so that all external files are
20406 in the same directory or subdirectories of the document.
20413 This become especially useful once you cooperate with people which neither
20414 know about subversion management nor they have ambition to commit additional
20415 material to the repository.
20419 \begin_layout Standard
20420 \begin_inset Flex Code
20423 \begin_layout Plain Layout
20424 Update local directory from repository
20429 command updates the whole directory and in case of merge conflicts local
20430 version of the files are left, so no unintended data loss occurs.
20431 If local changes are detected user is warned before update starts.
20434 \begin_layout Labeling
20435 \labelwidthstring 00.00.0000
20437 \begin_inset space ~
20441 \begin_inset space ~
20445 \begin_inset Newline newline
20449 \begin_inset Flex Code
20452 \begin_layout Plain Layout
20458 (Ask if changes are detected.)
20459 \begin_inset Newline newline
20463 \begin_inset Flex Code
20466 \begin_layout Plain Layout
20467 svn update --accept mine-full $path
20475 \begin_layout Standard
20477 \begin_inset Flex Code
20480 \begin_layout Plain Layout
20486 stands for the path to the document.
20489 \begin_layout Subsubsection
20495 \begin_layout Standard
20496 This shows the complete history of the SVN document.
20500 \begin_inset Quotes eld
20504 \begin_inset Quotes erd
20509 is shown in a browser.
20512 \begin_layout Subsubsection
20514 \begin_inset CommandInset label
20516 name "subsec:SVN-File-Locking"
20523 \begin_layout Standard
20524 The file exchange through various revision control systems brings the problem
20525 of merge conflicts in case two different users try to edit the same (parts
20527 When such a conflict happens it needs manual resolving and one reasonable
20528 alternative is to provide some kind of locking mechanism, which guarantees
20529 that only one user is allowed to edit file at the given time.
20532 \begin_layout Standard
20533 SVN has two such mechanisms to provide mutual exclusivity for file access
20534 - locks and automatic setting of write permissions (see sec.
20536 \begin_inset CommandInset ref
20538 reference "subsec:Automatical-Locking-Property"
20543 \begin_inset Flex Code
20546 \begin_layout Plain Layout
20556 \begin_layout Plain Layout
20557 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20563 If this property is detected for a given document LyX starts to use SVN
20564 locks for document editing automatically and the whole check-in/out mechanism
20565 switches to the same regimen as for RCS.
20566 This in particular means there are two different modes of file use in LyX:
20569 \begin_layout Itemize
20571 The loaded file is in the read-only mode.
20572 For editing on needs to check-out.
20577 consists of updating from the repository and gaining write lock.
20578 If the lock is not possible to obtain, we remain in unlocked state.
20581 \begin_layout Itemize
20583 The loaded file is in the 'normal' edit mode.
20584 No other user is allowed to edit the file.
20589 consists of commiting changes and releasing write-lock.
20590 If no changes have been made to the document, no commit will be produced
20594 \begin_layout Plain Layout
20595 Don't be puzzled by the fact that you will be asked for commit message anyway.
20600 and only the write-lock will be released.
20603 \begin_layout Standard
20607 \begin_layout Labeling
20608 \labelwidthstring 00.00.0000
20611 svn commit -q -m"<description>" "<file-name>"
20612 \begin_inset Newline newline
20615 svn unlock "<file-name>"
20618 \begin_layout Labeling
20619 \labelwidthstring 00.00.0000
20622 svn update "<file-name>"
20623 \begin_inset Newline newline
20626 svn lock "<file-name>"
20629 \begin_layout Subsubsection
20632 \begin_inset CommandInset label
20634 name "subsec:Automatical-Locking-Property"
20640 Automatic Locking Property
20643 \begin_layout Standard
20644 The above mentioned automatic setting of write permissions of the .lyx file
20650 ile\SpecialChar \menuseparator
20656 \begin_inset space ~
20659 Control\SpecialChar \menuseparator
20664 oggle locking property
20667 This command is active only when the file is not locked on the svn server
20669 you need to check-out before proceeding).
20672 \begin_layout Labeling
20673 \labelwidthstring 00.00.0000
20675 \begin_inset space ~
20681 \begin_layout Labeling
20682 \labelwidthstring 00.00.0000
20685 svn propset svn:needs-lock ON "<file-name>"
20688 \begin_layout Labeling
20689 \labelwidthstring 00.00.0000
20692 svn propdel svn:needs-lock "<file-name>"
20695 \begin_layout Subsubsection
20696 \begin_inset CommandInset label
20698 name "sub:VCS-Revision-Information"
20702 Revision Information in Documents
20705 \begin_layout Standard
20706 There are more possibilities how to activate revision information in our
20710 \begin_layout Itemize
20711 LyX supports directly:
20715 \begin_layout Itemize
20716 tree revision information (
20717 \begin_inset Flex Code
20720 \begin_layout Plain Layout
20727 The result is the output of the
20728 \begin_inset Flex Code
20731 \begin_layout Plain Layout
20737 command, the following table gives you an idea, how to read the results.
20740 \begin_layout Standard
20742 \begin_inset Tabular
20743 <lyxtabular version="3" rows="6" columns="2">
20744 <features rotate="0" tabularvalignment="middle">
20745 <column alignment="center" valignment="top">
20746 <column alignment="center" valignment="top">
20748 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20751 \begin_layout Plain Layout
20757 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20760 \begin_layout Plain Layout
20768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20771 \begin_layout Plain Layout
20777 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20780 \begin_layout Plain Layout
20781 mixed revision working copy
20788 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20791 \begin_layout Plain Layout
20797 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20800 \begin_layout Plain Layout
20801 modified working copy
20808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20811 \begin_layout Plain Layout
20817 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20820 \begin_layout Plain Layout
20821 switched working copy
20828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20831 \begin_layout Plain Layout
20837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20840 \begin_layout Plain Layout
20841 partial working copy, from a sparse checkout
20848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20851 \begin_layout Plain Layout
20857 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20860 \begin_layout Plain Layout
20861 mixed revision, modified, switched working copy
20874 \begin_layout Itemize
20875 file revision information.
20876 The result comes from parsing the output of
20877 \begin_inset Flex Code
20880 \begin_layout Plain Layout
20882 \begin_inset space ~
20886 \begin_inset space ~
20890 \begin_inset space ~
20899 Supported flags are:
20903 \begin_layout Itemize
20904 version number of the last commit (
20905 \begin_inset Flex Code
20908 \begin_layout Plain Layout
20917 \begin_layout Itemize
20918 author of the last commit (
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20931 \begin_layout Itemize
20932 date of the last commit (
20933 \begin_inset Flex Code
20936 \begin_layout Plain Layout
20945 \begin_layout Itemize
20946 time of the last commit (
20947 \begin_inset Flex Code
20950 \begin_layout Plain Layout
20960 \begin_layout Standard
20961 You can obtain this info via InsetInfo (e.g.
20963 \begin_inset Flex Code
20966 \begin_layout Plain Layout
20967 info-insert buffer vcs-date
20973 The information will be available only when you have the file stored under
20974 svn managment (i.e.
20976 \begin_inset Flex Code
20979 \begin_layout Plain Layout
20985 directory is available with your document).
20989 \begin_layout Itemize
20990 Another---a hacking one---possibility is to use svn keywords
20994 \begin_layout Plain Layout
20995 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21001 In short -- you set file keywords property (e.g.
21004 svn propset svn:keywords 'Rev' file.lyx
21006 ) and then paste keyword TeX code
21010 \begin_layout Plain Layout
21011 This is an easy way how to ensure that LyX won't break the line in the middle
21017 tag in your document (e.g.
21022 \begin_layout Plain Layout
21030 This way svn client will automatically substitute revision number (e.g.
21035 \begin_layout Plain Layout
21042 ) after each update and commit.
21043 There are more problems with this approach.
21044 Firstly, the '$' character is used in TeX world for math equations, so
21045 any occurence of math formula
21046 \begin_inset Formula $Rev$
21050 \begin_inset Formula $Rev:59$
21053 in your LyX document.
21054 Similarly for other keywords like Id, Date, Author, etc.
21055 Secondly svn output is dependent on your locales, so its very easy that
21056 svn would produce some problematic strings once Date is used.
21057 Thirdly you get the whole 'Rev: 59' string in your document instead of
21059 Until subversion implements user's custom keywords it will be hard to use
21060 this approach reliably or let LyX to support it directly.
21063 \begin_layout Subsection
21064 SVN and Windows Environment
21067 \begin_layout Quote
21068 My inclination is to say that if the user cannot figure out the command
21069 line operations on their own fairly quickly, they would be well advised
21070 to use TortoiseSVN.
21076 \begin_layout Subsubsection
21080 \begin_layout Standard
21081 In addition to installing LyX, and having access to a Subversion repository,
21082 the user will need to install the Subversion client program.
21083 A Windows installer for the client program is available from
21084 \begin_inset CommandInset href
21087 target "http://www.collab.net/nonav/downloads/subversion/"
21092 The user may also want to install
21093 \begin_inset CommandInset href
21096 target "http://tortoisesvn.tigris.org/"
21100 , which integrates Subversion operations into the context (rightclick) menu
21101 of Windows Explorer.
21102 Operations done outside LyX will typically be more convenient using the
21103 Explorer context menu.
21104 Note that TortoiseSVN is not a replacement for the client program, which
21105 is what LyX itself will use.
21108 \begin_layout Subsubsection
21109 Bringing a document under Subversion control
21112 \begin_layout Standard
21113 Before a LyX document can be brought under version control in Subversion,
21114 its parent directory needs to be under version control.
21115 If the document is being added to a project already in the repository,
21116 this is accomplished by checking the project out to the directory where
21117 the new document will be placed.
21118 If the project itself is not yet under version control (for instance, if
21119 this document starts a new project), the directory must be imported into
21121 This is done outside LyX.
21122 Both import and checkout are easily accomplished from the Explorer context
21123 menu using TortoiseSVN, or alternatively can be done using the command
21124 line client at a DOS prompt.
21125 The procedure for importing the project using TortoiseSVN is described
21126 below, assuming an existing repository and a new project being started
21134 For information on using the Subversion client program, run
21141 \begin_layout Enumerate
21148 in Windows Explorer, right click it, and select
21150 TortoiseSVN\SpecialChar \menuseparator
21154 If necessary, adjust the URL for the repository, then click OK.
21157 \begin_layout Enumerate
21158 Right click the level of the repository under which you want to place the
21159 new project folder (typically the top level) and click
21163 Supply a name for the project folder and click OK.
21164 Add a message for the log file if desired, then click OK again.
21165 The new project folder should appear in the repository.
21166 Finally, click OK again to exit the repository browser.
21169 \begin_layout Enumerate
21170 Once again right click
21176 , this time selecting SVN Checkout\SpecialChar \ldots{}
21177 Select the URL of the project folder
21178 you just created in the repository, and set the checkout directory to
21186 You will be warned about a non-empty folder; click OK to proceed.
21187 You should now have a
21198 \begin_layout Enumerate
21199 Create or open your document in LyX and click
21201 File\SpecialChar \menuseparator
21203 \begin_inset space ~
21206 Control\SpecialChar \menuseparator
21210 Add a log message and click OK to commit the document to version control.
21213 \begin_layout Standard
21214 From this point onward, you should have full functionality in the
21216 File\SpecialChar \menuseparator
21218 \begin_inset space ~
21224 You also have the option of checking the document in and out, viewing its
21226 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21227 client program from a command prompt.
21230 \begin_layout Subsubsection
21231 SSH tunnel used with SVN under Windows
21234 \begin_layout Standard
21235 Compared with Linux setting up an svn client to communicate over ssh under
21236 Windows is a rather troublesome task.
21237 We will at least offer some hints how to setup the client side but prior
21238 knowledge about ssh and the Windows command line is needed, also be prepared
21239 for a great deal of frustration\SpecialChar \ldots{}
21243 \begin_layout Enumerate
21244 Get an svn client for windows, as described in the previous sections.
21245 When it is a fresh install run some svn command (e.g.
21247 \begin_inset Flex Code
21250 \begin_layout Plain Layout
21256 ) to create config files, which you will need to change later on.
21259 \begin_layout Enumerate
21260 Choose an ssh client for Windows.
21261 There are several possibilities, we will use the one from Putty tools
21265 \begin_layout Plain Layout
21266 \begin_inset Flex URL
21269 \begin_layout Plain Layout
21271 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21282 You will need to set the connection up so that the client doesn't ask for
21283 any password from you.
21284 To keep things easy we will use only keys without any additional password
21289 \begin_layout Enumerate
21291 \begin_inset Flex Code
21294 \begin_layout Plain Layout
21301 Save your private .ppk key file and put the public one on the server side.
21302 If the SVN server runs on Linux, note that the format of the public key
21303 is not compatible with Linux openssh and you will need to direcly copy-paste
21306 Public key for pasting into OpenSSH authorized_keys file
21308 :” edit field into the server's
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21313 ~/.ssh/authorized_keys
21319 \begin_inset Flex Code
21322 \begin_layout Plain Layout
21331 \begin_layout Enumerate
21333 \begin_inset Flex Code
21336 \begin_layout Plain Layout
21343 In the SVN config file
21347 \begin_layout Plain Layout
21348 Exact path depends on Windows version, usually somewhere around
21349 \begin_inset Flex Code
21352 \begin_layout Plain Layout
21355 Documents and Settings
21369 \begin_inset Flex Code
21372 \begin_layout Plain Layout
21387 , section [tunnels], setup ssh command, e.g.
21389 \begin_inset Flex Code
21392 \begin_layout Plain Layout
21393 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21402 \begin_layout Plain Layout
21403 It will usually take a lot of time to get exact command right and it depends
21405 For example do not have some remote server saved as a default session in
21407 If things fail, try to connect via plink without SVN first.
21416 \begin_layout Enumerate
21417 Checkout the SVN archive, e.
21418 \begin_inset space \thinspace{}
21422 \begin_inset Newline newline
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21430 svn co svn+ssh://user@server/repository_path
21438 \begin_layout Subsubsection
21439 End-of-Line Conversions
21442 \begin_layout Standard
21443 When the collaborators are mixing Linux and Windows environments, LyX will
21444 use different line endings inside the .lyx files.
21445 This is not a problem as far as LyX functionality is concerned, but the
21446 commit diffs will be huge and merge-conflicts prone.
21447 Fortunately SVN itself knows
21451 \begin_layout Plain Layout
21452 \begin_inset Flex URL
21455 \begin_layout Plain Layout
21457 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21467 how to deal with CR/LF problems when switching .lyx files to the
21468 \begin_inset Flex Code
21471 \begin_layout Plain Layout
21481 \begin_layout Plain Layout
21483 \begin_inset Flex Code
21486 \begin_layout Plain Layout
21487 svn propset svn:eol-style native FILE_NAME
21500 \begin_layout Subsection
21501 GIT commands in LyX
21504 \begin_layout Standard
21505 A minimal subset of GIT commands is now supported by LyX.
21506 You can find the commands in the
21508 File\SpecialChar \menuseparator
21510 \begin_inset space ~
21516 Please note that if you use password protected access to repository via
21517 ssh, you will be asked in terminal window.
21518 LyX was tested against GIT 1.7.
21521 \begin_layout Standard
21522 One big difference of GIT and the other supported version control systems
21523 is the distributed nature of GIT: With traditional version control systems
21524 there is one central server which hosts the repository.
21525 Users commit their changes to the server, and get updates made by other
21527 With GIT, users commit to a local repository.
21528 The local repository can be synchronized with one or more remote repositories
21530 \begin_inset Flex Code
21533 \begin_layout Plain Layout
21540 \begin_inset Flex Code
21543 \begin_layout Plain Layout
21550 LyX does not interact in any way with remote GIT repositories.
21551 It works exclusively with the local repository in a very similar way as
21552 with a central CVS or SVN repository.
21553 If you use remote GIT repositories you need to do the
21554 \begin_inset Flex Code
21557 \begin_layout Plain Layout
21564 \begin_inset Flex Code
21567 \begin_layout Plain Layout
21573 operations with your favourite GIT client.
21576 \begin_layout Subsubsection
21582 \begin_layout Standard
21583 If your document is not under revision control, this is the only item shown
21585 And if it is under revision control, the
21592 item is not visible.
21595 \begin_layout Standard
21596 This command registers in GIT your document ONLY in case you have already
21597 the documents directory under GIT control (in particular
21602 This means you have to checkout the archive by yourself.
21605 \begin_layout Standard
21606 Then you are asked interactively to supply an initial description of the
21608 Don't forget that registered file is not yet commited.
21611 \begin_layout Standard
21612 GIT command that is run:
21615 \begin_inset Quotes eld
21619 \begin_inset Quotes erd
21625 \begin_layout Standard
21630 to understand the switches.
21633 \begin_layout Subsubsection
21639 \begin_layout Standard
21640 When you are finished editing a file, you commit your changes.
21641 When you do this, you are asked for a description of the changes.
21642 After that changes are commited.
21645 \begin_layout Standard
21648 git commit -q -m"<description>" <file-name>
21651 \begin_layout Subsubsection
21654 Revert To Repository Version
21657 \begin_layout Standard
21658 This will discard all changes made to the document since the last check
21660 You get a warning before changes are discarded.
21663 \begin_layout Standard
21667 \begin_inset Quotes eld
21671 \begin_inset Quotes erd
21677 \begin_layout Subsubsection
21683 \begin_layout Standard
21684 This will rename the current document including the version history.
21685 It requires a clean document without any changes since the last checkin.
21686 You are asked for a file name and a description of the rename operation.
21687 After that the document is renamed, both locally and in the repository.
21688 If the parent directories of the new and old file names differ, all relative
21689 paths of included files are adjusted (like in
21691 File\SpecialChar \menuseparator
21694 \SpecialChar \ldots{}
21696 Finally, the document is reloaded using the new name.
21699 \begin_layout Labeling
21700 \labelwidthstring 00.00.0000
21702 \begin_inset space ~
21706 \begin_inset space ~
21710 \begin_inset Newline newline
21714 \begin_inset Flex Code
21717 \begin_layout Plain Layout
21721 \begin_inset Quotes eld
21725 \begin_inset Quotes erd
21729 \begin_inset Quotes eld
21733 \begin_inset Quotes erd
21742 \begin_inset Newline newline
21746 \begin_inset Flex Code
21749 \begin_layout Plain Layout
21758 \begin_layout Subsubsection
21764 \begin_layout Standard
21765 This shows the complete history of the GIT document.
21769 \begin_inset Quotes eld
21773 \begin_inset Quotes erd
21778 is shown in a browser.
21781 \begin_layout Subsubsection
21785 \begin_layout Standard
21786 LyX supports GIT hash number of the last commit to the file, author name,
21787 date and time of last commit.
21788 All those are extracted from
21790 git log -n 1 --pretty=format:%H%n%an%n%ai
21793 Tree version information is obtained via
21795 git describe --abbrev --dirty --long
21799 \begin_inset CommandInset ref
21801 reference "sub:VCS-Revision-Information"
21808 \begin_layout Subsection
21812 \begin_layout Standard
21813 With the recent addition of the vc-command function LyX power users are
21814 allowed to create their own commands for revision control.
21817 \begin_layout Standard
21818 As an example you can see how two TortoiseSVN commands could be integrated
21822 \begin_layout Description
21824 \begin_inset Flex Code
21827 \begin_layout Plain Layout
21828 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21836 \begin_layout Description
21838 \begin_inset Flex Code
21841 \begin_layout Plain Layout
21842 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21850 \begin_layout Subsection
21851 Version control and Document comparison
21854 \begin_layout Standard
21855 One of the typical uses of version control is to inspect the changes between
21856 revisions, usually by creating
21857 \begin_inset Flex Code
21860 \begin_layout Plain Layout
21867 While this is useful for plain text files, it is much less useful in the
21868 case of LyX files, which have more a complicated structure.
21869 Hence we provide binding to the Document comparison feature.
21870 There are two ways of calling this feature - either by direct call of
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21880 LyX function (for details see LyX functions manual) or by icon/menu item
21882 \begin_inset Flex MenuItem
21885 \begin_layout Plain Layout
21886 Compare with older revision...
21892 One can either compare two chosen revisions of the document or he can simply
21893 compare the current version of edited text with older revisions (where
21895 \begin_inset Flex MenuItem
21898 \begin_layout Plain Layout
21904 ' revisions back means comparison of the edited file with last commited
21909 \begin_layout Standard
21910 This feature is supported for SVN and RCS though due to the more complicated
21911 versioning scheme of RCS there is a constraint -- when addressing the revisions
21912 in dialog, numbers always point to the last number in RCS revision number,
21915 We don't currently support GIT addressing of revisions, one can just compare
21916 edited document with its revision X steps backs, where X is addressed as
21920 \begin_layout Section
21921 Literate Programming
21924 \begin_layout Standard
21929 (kayvan@sylvan.com)
21933 original documentation written by
21935 Edmar Wienskoski Jr.
21938 (edmar-w-jr@technologist.com)
21941 \begin_layout Subsection
21945 \begin_layout Standard
21946 The main purpose of this documentation is to show you how to use LyX for
21947 literate programming, where it is assumed that you are familiar with this
21948 programming technique, and know what
21949 \begin_inset Quotes eld
21953 \begin_inset Quotes erd
21957 \begin_inset Quotes eld
21961 \begin_inset Quotes erd
21965 If that is not the case, please follow the web links provided in the following
21967 There is a lot of good documentation out there covering old development
21968 history to the latest tools tips.
21971 \begin_layout Standard
21972 It is also assumed that you are familiar with LyX itself to a point that
21973 you are comfortable changing your LyX preferences, and X resources file.
21974 If that is not the case please refer to other LyX documentation to cover
21975 your specific needs.
21978 \begin_layout Subsection
21979 Literate Programming
21982 \begin_layout Standard
21983 From the Literate Programming FAQ:
21986 \begin_layout Quotation
21987 Literate programming is the combination of documentation and source together
21988 in a fashion suited for reading by human beings.
21989 In fact, literate programs should be enjoyable reading, even inviting!
21990 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21991 and documentation in a single file.
21992 Literate programming tools then parse the file to produce either readable
21993 documentation or compilable source.
21994 The WEB style of literate programming was created by D.
21995 \begin_inset space \thinspace{}
21999 Knuth during the development of his TeX typesetting software.
22003 \begin_layout Standard
22004 Another excerpt says:
22007 \begin_layout Quotation
22010 How is literate programming different from verbose commenting?
22013 \begin_layout Quotation
22014 There are three distinguishing characteristics.
22015 In order of importance, they are:
22019 \begin_layout Itemize
22020 flexible order of elaboration
22023 \begin_layout Itemize
22024 automatic support for browsing
22027 \begin_layout Itemize
22028 typeset documentation, especially diagrams and mathematics
22032 \begin_layout Standard
22033 Now that I sparked your curiosity, take a look in the references.
22036 \begin_layout Subsubsection
22040 \begin_layout Standard
22041 The complete Literate Programming FAQ can be found at:
22044 \begin_layout Quote
22045 Literate Programming FAQ
22046 \begin_inset Flex URL
22049 \begin_layout Plain Layout
22051 http://www.literateprogramming.com/lpfaq.pdf
22059 \begin_layout Standard
22060 The FAQ lists 23 (twenty three!) different literate programming tools.
22061 Where some are specialized or
22062 \begin_inset Quotes eld
22066 \begin_inset Quotes erd
22069 for particular programming languages, while other have general scope.
22074 for my own use for several reasons:
22077 \begin_layout Itemize
22078 It can generate the documentation either in LaTeX or HTML.
22081 \begin_layout Itemize
22082 It has a open architecture, i.
22083 \begin_inset space \thinspace{}
22087 \begin_inset space \space{}
22090 it is easy to plug in new filters and to perform special processing that
22095 \begin_layout Itemize
22096 There is a good selection of filters available already (the HTML is one
22100 \begin_layout Itemize
22104 \begin_layout Standard
22105 The Noweb web page can be found at:
22108 \begin_layout Quote
22110 \begin_inset Flex URL
22113 \begin_layout Plain Layout
22115 http://www.cs.virginia.edu/~nr/noweb/
22123 \begin_layout Standard
22124 Starting from there you can reach many other interesting links and even
22125 some literate program examples.
22128 \begin_layout Subsection
22129 LyX and Literate Programming with Noweb
22132 \begin_layout Standard
22133 The LyX support for Literate Programming is provided by using the generic
22134 LyX converters mechanism.
22135 This support is provided in a
22136 \begin_inset Quotes eld
22140 \begin_inset Quotes erd
22144 \begin_inset space \thinspace{}
22148 \begin_inset space \space{}
22151 you will be able to use this new LyX feature with some other literate programmin
22152 g tool of your choice by just changing your LyX preferences.
22155 \begin_layout Subsubsection
22156 Generating documents and code (weaving and tangling)
22159 \begin_layout Paragraph
22160 Using the noweb module
22163 \begin_layout Standard
22164 If you have installed Noweb and LyX successfully, whenever you open a new
22165 document, after you have chosen its document class, use the Document->Settings
22167 \begin_inset Quotes eld
22171 \begin_inset Quotes erd
22175 If Noweb is correctly installed, when you click on the
22176 \begin_inset Quotes eld
22180 \begin_inset Quotes erd
22183 link, you will see the
22184 \begin_inset Quotes eld
22188 \begin_inset Quotes erd
22191 module in the available list and you can add it to your document.
22194 \begin_layout Paragraph
22198 \begin_layout Standard
22199 LyX enables you to write code with a layout named
22200 \begin_inset Flex Noun
22203 \begin_layout Plain Layout
22210 Noweb delimits chunks like this:
22213 \begin_layout LyX-Code
22217 \begin_layout LyX-Code
22221 \begin_layout LyX-Code
22225 \begin_layout LyX-Code
22229 \begin_layout LyX-Code
22233 \begin_layout Standard
22234 The problem is that whatever is written in between the << and the
22238 must be taken literally, i.
22239 \begin_inset space \thinspace{}
22243 \begin_inset space \space{}
22246 LyX should be prevented from making any special interpretation of what has
22248 This is also handled by
22249 \begin_inset Flex Noun
22252 \begin_layout Plain Layout
22258 , that works like a normal paragraph but has a free spacing capability.
22261 \begin_layout Standard
22262 As a special note, you can also use the
22263 \begin_inset Quotes eld
22267 \begin_inset Quotes erd
22270 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22274 \begin_layout LyX-Code
22278 \begin_layout LyX-Code
22279 def some_function(args):
22282 \begin_layout LyX-Code
22283 "This is the doc string for this function."
22286 \begin_layout LyX-Code
22287 print "My args: ", args
22290 \begin_layout LyX-Code
22291 @ %def some_function
22294 \begin_layout Standard
22295 For an example of this usage and the resulting cross-reference output, look
22296 at the Literate python program in
22298 LIBDIR/examples/listerrors.lyx
22300 which should make this all clear.
22303 \begin_layout Paragraph
22304 Generating the documentation
22307 \begin_layout Standard
22308 At this point you already have a new document file with a proper document
22309 class, and with some code and text on it.
22310 How do I print it? The answer is simple, you select
22312 View\SpecialChar \menuseparator
22316 Just like you would do for a plain document.
22317 No special procedure is required.
22320 \begin_layout Standard
22321 To help orientate you, I will now explain what happens inside LyX:
22324 \begin_layout Enumerate
22327 Update\SpecialChar \menuseparator
22330 menu option is chosen, a LaTeX file is generated.
22335 \begin_layout Standard
22336 If the document is of any literate class the generated file will be named
22337 with an extension name defined by the
22338 \begin_inset Quotes eld
22342 \begin_inset Quotes erd
22345 format (defined in the Preferences panel), otherwise the file will have
22354 \begin_layout Enumerate
22355 Note that the only difference so far is in the name of the file, no special
22356 processing is required by LyX.
22357 Given that you formatted the code using the
22358 \begin_inset Flex Noun
22361 \begin_layout Plain Layout
22367 layout that, by itself, takes care of the business.
22370 \begin_layout Enumerate
22371 If the document is of any literate class LyX will then use the internal
22372 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22376 \begin_layout Plain Layout
22377 The converters are defined in the
22379 Tools\SpecialChar \menuseparator
22383 \begin_inset Quotes eld
22387 \begin_inset Quotes erd
22399 manual for general information about converters.
22404 to generate the LaTeX file.
22408 \begin_layout Standard
22409 Otherwise it will just skip this step.
22413 \begin_layout Enumerate
22414 Finally, LaTeX is invoked and the regular post processing continues as in
22418 \begin_layout Standard
22419 Independence from a particular
22420 \begin_inset Quotes eld
22424 \begin_inset Quotes erd
22427 is easily achieved by changing the commands that are run by the various
22431 \begin_layout Paragraph
22432 Generating the code
22435 \begin_layout Standard
22436 When the build menu option is chosen or the corresponding button in the
22437 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22438 Next, LyX invokes the
22443 This converter needs to be defined by the user and is not installed by
22444 default, though the Program format is.
22445 This converter (like any other converter) will have two parts:
22448 \begin_layout Enumerate
22449 The converter program itself.
22450 This program performs the conversion from the one format to the other (in
22451 this case, from the Noweb format to the Program pseudo-format).
22454 \begin_layout Enumerate
22455 The error log parser.
22456 This is a program whose sole purpose is to rewrite error messages in a
22457 format that LyX understands.
22458 This makes it possible for LyX to place error boxes in the right places
22459 in the file buffer.
22462 \begin_layout Standard
22463 The first part, the
22464 \begin_inset Quotes eld
22468 \begin_inset Quotes erd
22471 setting, should be set to
22472 \begin_inset Newline newline
22476 \begin_inset Quotes eld
22484 \begin_inset Quotes erd
22488 \begin_inset Newline newline
22491 This basically means that LyX will call
22492 \begin_inset Quotes eld
22496 \begin_inset Quotes erd
22499 (a program or script) with the name of the Noweb file (normally a file
22500 in the LyX temp directory) and the directory path of the original LyX file.
22504 \begin_layout Standard
22505 This is an implementation of
22506 \begin_inset Quotes eld
22510 \begin_inset Quotes erd
22513 that you can place in a directory on your path:
22516 \begin_layout Standard
22517 \begin_inset VSpace defskip
22523 \begin_layout Standard
22524 \begin_inset Newpage pagebreak
22530 \begin_layout Standard
22536 \begin_layout Standard
22542 \begin_layout Standard
22545 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22548 \begin_layout Standard
22549 \begin_inset VSpace defskip
22555 \begin_layout Standard
22556 The next part of the converter setting is the
22557 \begin_inset Quotes eld
22561 \begin_inset Quotes erd
22564 which is to be set to
22565 \begin_inset Newline newline
22569 \begin_inset Quotes eld
22574 parselog=$$s/scripts/listerrors
22577 \begin_inset Quotes erd
22581 \begin_inset Newline newline
22584 This will run any errors that are generated by the
22585 \begin_inset Quotes eld
22589 \begin_inset Quotes erd
22592 process through the
22593 \begin_inset Quotes eld
22597 \begin_inset Quotes erd
22603 \begin_layout Standard
22604 The build will normally take place in LyX's temporary directory, so the
22605 files produced by the conversion will be in that directory.
22606 LyX will copy out what it regards as the `main' file, but the
22610 conversion may produce several files, and so most of these would then be
22611 deleted when LyX was closed.
22612 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22613 the build-script chunk can place the generated files in that location.
22616 \begin_layout Paragraph
22617 Build instructions in the document
22620 \begin_layout Standard
22621 The last piece of the integration between LyX and noweb is the
22622 \begin_inset Quotes eld
22626 \begin_inset Quotes erd
22630 Generally, the instructions for building your program should be embedded
22631 in a chunk of its own.
22633 \begin_inset Quotes eld
22637 \begin_inset Quotes erd
22640 above uses the notangle command to look for this chunk (called
22641 \begin_inset Quotes eld
22645 \begin_inset Quotes erd
22648 ) and runs its contents through
22649 \begin_inset Quotes eld
22653 \begin_inset Quotes erd
22659 \begin_layout Standard
22660 Typically, such a chunk would look something like this:
22663 \begin_layout LyX-Code
22667 \begin_layout LyX-Code
22669 \begin_inset Newline newline
22672 if [ -z "${NOWEB_SOURCE}" ]
22673 \begin_inset Newline newline
22679 \begin_layout LyX-Code
22680 NOWEB_SOURCE=myfile.nw
22681 \begin_inset Newline newline
22685 \begin_inset Newline newline
22689 code to extract files ...
22690 use NOWEB_OUTPUT_DIR here ...]
22691 \begin_inset Newline newline
22695 code to compile files ...]
22696 \begin_inset Newline newline
22702 \begin_layout Standard
22705 LIBDIR/examples/listerrors.lyx
22709 LIBDIR/examples/Literate.lyx
22711 which implement two versions of the
22712 \begin_inset Quotes eld
22716 \begin_inset Quotes erd
22719 program for some illustrations of how all of these pieces go together or
22722 LIBDIR/examples/noweb2lyx.lyx.
22725 Interestingly, these three files show off the language-indepence of the
22726 LyX literate programming support since they are written in Python, C and
22730 \begin_layout Subsubsection
22734 \begin_layout Standard
22735 All the Literate Programming support is configured by the
22737 Tools\SpecialChar \menuseparator
22741 \begin_inset Quotes eld
22745 \begin_inset Quotes erd
22749 The important parts are:
22752 \begin_layout Description
22754 \begin_inset space ~
22758 \begin_inset Quotes eld
22762 \begin_inset Quotes erd
22766 \begin_inset space ~
22769 format Set up via the File Formats tab, this is where the Noweb-specific
22779 , the file extension is set to
22784 This tells LyX to create a file with a
22788 extension in the first step of the conversion process.
22791 \begin_layout Description
22793 \begin_inset space ~
22801 \begin_inset space ~
22804 format This is an empty format whose sole purpose is to be the endpoint
22805 of a conversion (which then allows us to set up a converter for it).
22808 \begin_layout Description
22817 This converter performs the
22818 \begin_inset Quotes eld
22822 \begin_inset Quotes erd
22825 of the literate document.
22826 For Noweb, it is set to
22827 \begin_inset Quotes eld
22832 noweave -delay -index $$i > $$o
22835 \begin_inset Quotes erd
22841 \begin_layout Description
22851 \begin_inset Quotes eld
22855 \begin_inset Quotes erd
22859 As stated above, the Converter is set to
22860 \begin_inset Quotes eld
22868 \begin_inset Quotes erd
22871 , with Flags set to
22872 \begin_inset Newline newline
22876 \begin_inset Quotes eld
22881 parselog=$$s/scripts/listerrors
22884 \begin_inset Quotes erd
22890 \begin_layout Subsubsection
22894 \begin_layout Standard
22895 There is also a new function implemented in the LyX server, the
22896 \begin_inset Quotes eld
22899 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22903 \begin_layout Standard
22904 When debugging code with ddd/gdb, it is possible to invoke a text editor
22905 at the current execution position with a single key stroke.
22906 The default ddd configuration for that is shift-ctrl-V.
22907 It happens that you can define the editor command line invocation in ddd
22910 Edit\SpecialChar \menuseparator
22911 Preferences\SpecialChar \menuseparator
22914 dialog and changing the "Edit Sources" entry.
22917 \begin_layout Standard
22918 I take advantage of the newly created LyX server function and this ddd feature,
22920 \begin_inset Quotes eld
22924 \begin_inset Quotes erd
22930 \begin_layout Standard
22931 \begin_inset VSpace defskip
22937 \begin_layout Standard
22940 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22943 \begin_layout Standard
22944 \begin_inset VSpace defskip
22950 \begin_layout Standard
22951 With this, whenever you are using ddd and find a point in the program that
22952 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22953 ddd will forward this information to LyX through the LyX server and then
22954 the LyX window will show the same file with the cursor at the same position
22955 ddd was pointing to.
22956 No more guessing or long scrolling to locate a point in the program back
22960 \begin_layout Standard
22961 Note however that you must enable the LyX server to get this feature working
22962 (it is disabled by default).
22963 You can enable it in
22975 ) by entering in the
22980 \begin_inset Quotes eld
22985 /home/<your-home-directory>/.lyx/lyxpipe
22988 \begin_inset Quotes erd
22994 \begin_layout Standard
22995 Read the LyX server documentation in the
22997 Customization Manual
22999 for further information.
23002 \begin_layout Subsubsection
23006 \begin_layout Standard
23007 There are six new buttons that can be added to your LyX toolbar.
23008 Five of these buttons are short cuts to layout styles:
23029 The last one is a short cut to the
23030 \begin_inset Quotes eld
23034 \begin_inset Quotes erd
23041 \begin_layout Standard
23042 LyX has a range of buttons that are available for tool bar customization.
23043 In my toolbar I like to combine the six short cuts above with two more:
23048 \SpecialChar \menuseparator
23053 \SpecialChar \menuseparator
23060 View\SpecialChar \menuseparator
23064 Here is how it looks like:
23067 \begin_layout LyX-Code
23071 \begin_layout LyX-Code
23075 \begin_layout LyX-Code
23076 Icon "layout Standard"
23079 \begin_layout LyX-Code
23080 Icon "layout Section"
23083 \begin_layout LyX-Code
23084 Icon "layout LaTeX"
23087 \begin_layout LyX-Code
23088 Icon "layout LyX-Code"
23091 \begin_layout LyX-Code
23092 Icon "layout Chunk"
23095 \begin_layout LyX-Code
23099 \begin_layout LyX-Code
23103 \begin_layout LyX-Code
23104 Icon "buffer-typeset"
23107 \begin_layout LyX-Code
23108 Icon "build-program"
23111 \begin_layout LyX-Code
23115 \begin_layout LyX-Code
23119 \begin_layout LyX-Code
23123 \begin_layout LyX-Code
23127 \begin_layout LyX-Code
23131 \begin_layout Subsubsection
23132 Colors customization
23135 \begin_layout Standard
23136 There are a number of colors in LyX that can be customized in
23141 One of the things that bothers people is the LaTeX font color.
23142 The default color is red, since the chunks uses LaTeX font, and there is
23143 a lot of chunks in literate documents, you may get tired of seeing everything
23145 You can change it by going to the tabs
23154 \begin_layout Standard
23155 The next thing is the visible presence of the newline character in the screen.
23156 You can choose the color of this particular character and make it blend
23158 I recommend you choosing a color that is close to the background but not
23159 equal, that way you still can see it is there, but it is not bothering
23163 \begin_layout Subsection
23164 LyX and knitr/Sweave
23167 \begin_layout Standard
23176 is documented in the
23180 example file and in the Sweave manual (menu
23182 Help\SpecialChar \menuseparator
23188 \begin_layout Chapter
23192 \begin_layout Standard
23193 You can do everything with LyX that you can do with LaTeX.
23194 However, LyX cannot support every LaTeX feature directly.
23195 But you can always use TeX Code.
23196 This chapter shows you some more special things you might want to use.
23197 For other special things you can do with figures, tables, floats, boxes
23198 and notes, have a look at the
23201 \begin_inset space ~
23209 \begin_layout Section
23210 Multiple Text Columns
23213 \begin_layout Standard
23214 This feature is independent of the option
23216 Two-column document
23218 in the document settings under
23223 If you want to have 2
23224 \begin_inset space ~
23227 columns for the whole document, it is recommended to use the
23229 Two-column document
23232 For all other cases use this feature.
23235 \begin_layout Standard
23236 To use multiple text columns in your document, you have to load the module
23243 Document\SpecialChar \menuseparator
23244 Settings\SpecialChar \menuseparator
23247 ) and must have the LaTeX-package
23254 \begin_layout Standard
23255 Footnotes within multiple columns will be placed at the bottom of the page
23256 and not under each column.
23257 Within the different columns you can use everything, with the limitation
23258 that for floats you need to use the float option
23265 \begin_layout Subsection
23269 \begin_layout Standard
23270 If you want to have 2
23271 \begin_inset space ~
23274 columns in your text, insert a multicolumn inset via the menu
23276 Insert\SpecialChar \menuseparator
23278 \begin_inset space ~
23281 Insets\SpecialChar \menuseparator
23283 \begin_inset space ~
23288 where the columns should start.
23289 Write all text that should be printed in 2
23290 \begin_inset space ~
23293 columns into this inset.
23296 \begin_layout Standard
23297 Here is an example:
23300 \begin_layout Standard
23302 \begin_inset Flex Multiple Columns
23305 \begin_layout Plain Layout
23310 The Adventure of the Empty House
23313 \begin_inset Newline newline
23316 by Sir Arthur Conan Doyle
23319 \begin_layout Plain Layout
23322 It was in the spring of the year 1894 that all London was interested, and
23323 the fashionable world dismayed, by the murder of the Honourable Ronald
23324 Adair under most unusual and inexplicable circumstances.
23325 The public has already learned those particulars of the crime which came
23326 out in the police investigation, but a good deal was suppressed upon that
23327 occasion, since the case for the prosecution was so overwhelmingly strong
23328 that it was not necessary to bring forward all the facts.
23329 Only now, at the end of nearly ten years, am I allowed to supply those
23330 missing links which make up the whole of that remarkable chain.
23331 The crime was of interest in itself, but that interest was as nothing to
23332 me compared to the inconceivable sequel, which afforded me the greatest
23333 shock and surprise of any event in my adventurous life.
23334 Even now, after this long interval, I find myself thrilling as I think
23335 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23336 ty which utterly submerged my mind.
23337 Let me say to that public, which has shown some interest in those glimpses
23338 which I have occasionally given them of the thoughts and actions of a very
23339 remarkable man, that they are not to blame me if I have not shared my knowledge
23340 with them, for I should have considered it my first duty to do so, had
23341 I not been barred by a positive prohibition from his own lips, which was
23342 only withdrawn upon the third of last month.
23350 \begin_layout Standard
23351 To get 3 or more columns, set the cursor into the multicolumn inset and
23354 Insert\SpecialChar \menuseparator
23356 \begin_inset space ~
23360 \begin_inset space ~
23366 The number of the desired columns is written into that inset (for 3
23367 \begin_inset space ~
23371 \begin_inset Quotes eld
23375 \begin_inset Quotes erd
23379 \begin_inset Newline newline
23382 Here is an example with 3
23383 \begin_inset space ~
23389 \begin_layout Standard
23390 \begin_inset Flex Multiple Columns
23393 \begin_layout Plain Layout
23396 \begin_inset Argument 1
23399 \begin_layout Plain Layout
23405 It can be imagined that my close intimacy with Sherlock Holmes had interested
23406 me deeply in crime, and that after his disappearance I never failed to
23407 read with care the various problems which came before the public.
23408 And I even attempted, more than once, for my own private satisfaction,
23409 to employ his methods in their solution, though with indifferent success.
23410 There was none, however, which appealed to me like this tragedy of Ronald
23412 As I read the evidence at the inquest, which led up to a verdict of willful
23413 murder against some person or persons unknown, I realized more clearly
23414 than I had ever done the loss which the community had sustained by the
23415 death of Sherlock Holmes.
23416 There were points about this strange business which would, I was sure,
23417 have specially appealed to him, and the efforts of the police would have
23418 been supplemented, or more probably anticipated, by the trained observation
23419 and the alert mind of the first criminal agent in Europe.
23420 All day, as I drove upon my round, I turned over the case in my mind and
23421 found no explanation which appeared to me to be adequate.
23422 At the risk of telling a twice-told tale, I will recapitulate the facts
23423 as they were known to the public at the conclusion of the inquest.
23431 \begin_layout Standard
23432 You can have up to 10
23433 \begin_inset space ~
23436 columns if you want to, but that might not be very pleasant for the readers
23440 \begin_layout Standard
23441 \begin_inset Newpage newpage
23447 \begin_layout Subsection
23448 Columns inside Columns
23451 \begin_layout Standard
23452 You can also have columns inside columns:
23455 \begin_layout Standard
23456 \begin_inset Flex Multiple Columns
23459 \begin_layout Plain Layout
23462 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23463 at that time governor of one of the Australian colonies.
23464 Adair's mother had returned from Australia to undergo the operation for
23465 cataract, and she, her son Ronald, and her daughter Hilda were living together
23469 \begin_layout Plain Layout
23470 \begin_inset Flex Multiple Columns
23473 \begin_layout Plain Layout
23476 The youth moved in the best society–had, so far as was known, no enemies
23477 and no particular vices.
23478 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23479 had been broken off by mutual consent some months before, and there was
23480 no sign that it had left any very profound feeling behind it.
23481 For the rest {sic} the man's life moved in a narrow and conventional circle,
23482 for his habits were quiet and his nature unemotional.
23483 Yet it was upon this easy-going young aristocrat that death came, in most
23484 strange and unexpected form, between the hours of ten and eleven-twenty
23485 on the night of March 30, 1894.
23493 \begin_layout Plain Layout
23496 Ronald Adair was fond of cards–playing continually, but never for such stakes
23498 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23499 It was shown that, after dinner on the day of his death, he had played
23500 a rubber of whist at the latter club.
23501 He had also played there in the afternoon.
23506 The evidence of those who had played with him– Mr.
23507 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23508 and that there was a fairly equal fall of the cards.
23509 Adair might have lost five pounds, but not more.
23510 His fortune was a considerable one, and such a loss could not in any way
23512 He had played nearly every day at one club or other, but he was a cautious
23513 player, and usually rose a winner.
23514 It came out in evidence that, in partnership with Colonel Moran, he had
23515 actually won as much as four hundred and twenty pounds in a sitting, some
23516 weeks before, from Godfrey Milner and Lord Balmoral.
23517 So much for his recent history as it came out at the inquest.
23525 \begin_layout Subsection
23529 \begin_layout Standard
23530 The examples in this section show some more special features of multiple
23534 \begin_layout Standard
23535 For more features of multiple columns, have a look at the documentation
23536 of the LaTeX-package
23541 \begin_inset CommandInset citation
23550 \begin_layout Subsubsection
23554 \begin_layout Standard
23555 To add a preface text for multiple columns, set the cursor into the multicolumn
23556 inset and use the menu
23558 Insert\SpecialChar \menuseparator
23562 Write your preface text into that inset.
23563 \begin_inset Newline newline
23566 This is an example with some preface text:
23569 \begin_layout Standard
23570 \begin_inset VSpace bigskip
23576 \begin_layout Standard
23577 \begin_inset Flex Multiple Columns
23580 \begin_layout Plain Layout
23581 \begin_inset Argument 2
23584 \begin_layout Plain Layout
23585 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23593 On the evening of the crime, he returned from the club exactly at ten.
23594 His mother and sister were out spending the evening with a relation.
23595 The servant deposed that she heard him enter the front room on the second
23596 floor, generally used as his sitting-room.
23597 She had lit a fire there, and as it smoked she had opened the window.
23598 No sound was heard from the room until eleven-twenty, the hour of the return
23599 of Lady Maynooth and her daughter.
23600 Desiring to say good-night, she attempted to enter her son's room.
23601 The door was locked on the inside, and no answer could be got to their
23602 cries and knocking.
23603 Help was obtained, and the door forced.
23604 The unfortunate young man was found lying near the table.
23605 His head had been horribly mutilated by an expanding revolver bullet, but
23606 no weapon of any sort was to be found in the room.
23614 \begin_layout Standard
23615 You can also use a section heading as the preface if you use a section command
23617 For example the command
23620 \begin_layout Standard
23625 subsection{subsection title}
23628 \begin_layout Standard
23629 creates a subsection.
23630 In this example the preface is a subsubsection:
23633 \begin_layout Standard
23634 \begin_inset Flex Multiple Columns
23637 \begin_layout Plain Layout
23638 \begin_inset Argument 2
23641 \begin_layout Plain Layout
23645 \begin_layout Plain Layout
23654 This is a subsubsection heading as a preface
23658 \begin_layout Plain Layout
23672 A minute examination of the circumstances served only to make the case more
23674 In the first place, no reason could be given why the young man should have
23675 fastened the door upon the inside.
23676 There was the possibility that the murderer had done this, and had afterwards
23677 escaped by the window.
23678 The drop was at least twenty feet, however, and a bed of crocuses in full
23680 Neither the flowers nor the earth showed any sign of having been disturbed,
23681 nor were there any marks upon the narrow strip of grass which separated
23682 the house from the road.
23683 Apparently, therefore, it was the young man himself who had fastened the
23685 But how did he come by his death? No one could have climbed up to the window
23686 without leaving traces.
23687 Suppose a man had fired through the window, he would indeed be a remarkable
23688 shot who could with a revolver inflict so deadly a wound.
23689 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23690 a hundred yards of the house.
23691 No one had heard a shot.
23699 \begin_layout Standard
23700 If there is less vertical space than 6
23701 \begin_inset space ~
23704 text lines is left on the page at the beginning of the multiple columns,
23705 a page break will be inserted before the multiple columns.
23706 Depending on the number of lines of the preface text, you might want to
23708 This is done by setting the cursor into the mulitcolumn inset behind the
23709 preface (if there is any) and using the menu
23711 Insert\SpecialChar \menuseparator
23713 \begin_inset space ~
23717 \begin_inset space ~
23721 \begin_inset space ~
23727 Insert into that inset the amount of space like e.
23728 \begin_inset space \thinspace{}
23732 \begin_inset space \space{}
23736 \begin_inset Quotes eld
23740 \begin_inset Quotes erd
23744 \begin_inset Newline newline
23747 In this example the space is set to 7
23748 \begin_inset space ~
23751 text lines by using
23752 \begin_inset Quotes eld
23758 \begin_inset Quotes erd
23767 needs to be inserted as TeX code):
23770 \begin_layout Standard
23771 \begin_inset Flex Multiple Columns
23774 \begin_layout Plain Layout
23775 \begin_inset Argument 3
23778 \begin_layout Plain Layout
23783 \begin_layout Plain Layout
23799 On the evening of the crime, he returned from the club exactly at ten.
23800 His mother and sister were out spending the evening with a relation.
23801 The servant deposed that she heard him enter the front room on the second
23802 floor, generally used as his sitting-room.
23803 She had lit a fire there, and as it smoked she had opened the window.
23804 No sound was heard from the room until eleven-twenty, the hour of the return
23805 of Lady Maynooth and her daughter.
23806 Desiring to say good-night, she attempted to enter her son's room.
23807 The door was locked on the inside, and no answer could be got to their
23808 cries and knocking.
23809 Help was obtained, and the door forced.
23810 The unfortunate young man was found lying near the table.
23811 His head had been horribly mutilated by an expanding revolver bullet, but
23812 no weapon of any sort was to be found in the room.
23820 \begin_layout Subsubsection
23824 \begin_layout Standard
23825 The amount of space before and after multiple columns can be changed by
23826 changing the length
23833 For example the command
23836 \begin_layout Standard
23846 \begin_layout Standard
23847 in TeX Code changes its value to 3
23848 \begin_inset space \thinspace{}
23852 The change must be made before the multiple columns' start.
23853 The predefined value is 13
23854 \begin_inset space \thinspace{}
23860 \begin_layout Standard
23868 \begin_inset space \thinspace{}
23874 \begin_layout Standard
23878 \begin_layout Plain Layout
23884 multicolsep}{2.5cm}
23892 \begin_layout Standard
23893 \begin_inset Flex Multiple Columns
23896 \begin_layout Plain Layout
23899 All day I turned these facts over in my mind, endeavouring to hit upon some
23900 theory which could reconcile them all, and to find that line of least resistanc
23901 e which my poor friend had declared to be the starting-point of every investigat
23903 I confess that I made little progress.
23904 In the evening I strolled across the Park, and found myself about six o'clock
23905 at the Oxford Street end of Park Lane.
23906 A group of loafers upon the pavements, all staring up at a particular window,
23907 directed me to the house which I had come to see.
23908 A tall, thin man with coloured glasses, whom I strongly suspected of being
23909 a plain-clothes detective, was pointing out some theory of his own, while
23910 the others crowded round to listen to what he said.
23911 I got as near him as I could, but his observations seemed to me to be absurd,
23912 so I withdrew again in some disgust.
23913 As I did so I struck against an elderly, deformed man, who had been behind
23914 me, and I knocked down several books which he was carrying.
23922 \begin_layout Standard
23923 \begin_inset Note Greyedout
23926 \begin_layout Plain Layout
23931 The values you set with
23937 will be used for all following multiple columns until you change them again.
23945 \begin_layout Standard
23949 \begin_layout Plain Layout
23961 \begin_inset Note Note
23964 \begin_layout Plain Layout
23965 go back to the default
23973 \begin_layout Standard
23974 \begin_inset Newpage newpage
23980 \begin_layout Subsubsection
23984 \begin_layout Standard
23985 A column break can be forced by inserting the command
23991 as TeX-Code to that position in the text where the column should be broken.
23992 Note that this leads in most cases to whitespace in the text.
23993 \begin_inset Newline newline
23996 Here is an example:
23999 \begin_layout Standard
24000 \begin_inset Flex Multiple Columns
24003 \begin_layout Plain Layout
24006 \begin_inset Quotes eld
24009 You're surprised to see me, sir,
24010 \begin_inset Quotes erd
24013 said he, in a strange, croaking voice.
24016 \begin_layout Plain Layout
24019 I acknowledged that I was.
24022 \begin_layout Plain Layout
24025 \begin_inset Quotes eld
24028 Well, I've a conscience, sir, and when I chanced to see you go into this
24029 house, as I came hobbling after you, I thought to myself, I'll just step
24030 in and see that kind gentleman, and tell him that if I was a bit gruff
24031 in my manner there was not any harm meant, and that I am much obliged to
24032 him for picking up my books.
24033 \begin_inset Quotes erd
24039 \begin_layout Plain Layout
24042 \begin_inset Quotes eld
24045 You make too much of a trifle,
24046 \begin_inset Quotes erd
24051 \begin_inset Quotes eld
24054 May I ask how you knew who I was?
24055 \begin_inset Quotes erd
24058 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24062 \begin_layout Plain Layout
24074 \begin_layout Plain Layout
24077 \begin_inset Quotes eld
24080 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24081 you'll find my little bookshop at the corner of Church Street, and very
24082 happy to see you, I am sure.
24083 Maybe you collect yourself, sir.
24087 \begin_inset space ~
24100 --a bargain, every one of them.
24101 With five volumes you could just fill that gap on that second shelf.
24102 It looks untidy, does it not, sir?
24103 \begin_inset Quotes erd
24114 \begin_layout Subsubsection
24118 \begin_layout Standard
24119 The width of the columns is automatically calculated, but you can modify
24120 the space between the columns.
24121 This is done by changing the length
24128 Its predefined value is 10
24129 \begin_inset space \thinspace{}
24133 Here is an example where
24140 \begin_inset space \thinspace{}
24146 \begin_layout Standard
24150 \begin_layout Plain Layout
24164 \begin_layout Standard
24165 \begin_inset Flex Multiple Columns
24168 \begin_layout Plain Layout
24171 My observations of No.
24172 \begin_inset space \space{}
24175 427 Park Lane did little to clear up the problem in which I was interested.
24176 The house was separated from the street by a low wall and railing, the
24177 whole not more than five feet high.
24178 It was perfectly easy, therefore, for anyone to get into the garden, but
24179 the window was entirely inaccessible, since there was no water pipe or
24180 anything which could help the most active man to climb it.
24181 More puzzled than ever, I retraced my steps to Kensington.
24182 I had not been in my study five minutes when the maid entered to say that
24183 a person desired to see me.
24184 To my astonishment it was none other than my strange old book collector,
24185 his sharp, wizened face peering out from a frame of white hair, and his
24186 precious volumes, a dozen of them at least, wedged under his right arm.
24194 \begin_layout Standard
24198 \begin_layout Plain Layout
24210 \begin_inset Note Note
24213 \begin_layout Plain Layout
24214 go back to the default
24222 \begin_layout Subsubsection
24226 \begin_layout Standard
24227 Between the columns a rule with a width of the length
24234 If this rule width is set to 0
24235 \begin_inset space \thinspace{}
24238 pt (this is the default), the rule is suppressed.
24239 In the following example the rule is 2
24240 \begin_inset space \thinspace{}
24246 \begin_layout Standard
24250 \begin_layout Plain Layout
24256 columnseprule}{2pt}
24264 \begin_layout Standard
24265 \begin_inset Flex Multiple Columns
24268 \begin_layout Plain Layout
24271 \begin_inset Quotes eld
24274 You're surprised to see me, sir,
24275 \begin_inset Quotes erd
24278 said he, in a strange, croaking voice.
24281 \begin_layout Plain Layout
24284 I acknowledged that I was.
24287 \begin_layout Plain Layout
24290 \begin_inset Quotes eld
24293 Well, I've a conscience, sir, and when I chanced to see you go into this
24294 house, as I came hobbling after you, I thought to myself, I'll just step
24295 in and see that kind gentleman, and tell him that if I was a bit gruff
24296 in my manner there was not any harm meant, and that I am much obliged to
24297 him for picking up my books.
24298 \begin_inset Quotes erd
24304 \begin_layout Plain Layout
24307 \begin_inset Quotes eld
24310 You make too much of a trifle,
24311 \begin_inset Quotes erd
24316 \begin_inset Quotes eld
24319 May I ask how you knew who I was?
24320 \begin_inset Quotes erd
24326 \begin_layout Plain Layout
24329 \begin_inset Quotes eld
24332 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24333 you'll find my little bookshop at the corner of Church Street, and very
24334 happy to see you, I am sure.
24335 Maybe you collect yourself, sir.
24339 \begin_inset space ~
24352 --a bargain, every one of them.
24353 With five volumes you could just fill that gap on that second shelf.
24354 It looks untidy, does it not, sir?
24355 \begin_inset Quotes erd
24366 \begin_layout Standard
24367 \begin_inset VSpace defskip
24373 \begin_layout Standard
24374 The rule can be colored by redefining the command
24381 This is done by inserting the command
24382 \begin_inset Newline newline
24391 columnseprulecolor}{
24396 \begin_inset Newline newline
24399 as TeX-Code before the multicolumn inset.
24404 in this command by a color of your choice.
24405 You can use all pre- and self-defined colors.
24413 \begin_inset space ~
24418 for more information about pre- and self-defined colors.
24419 To go back to the default color insert the command
24420 \begin_inset Newline newline
24429 columnseprulecolor}{
24434 \begin_inset Newline newline
24437 Here is the example with a cyan rule and 1
24438 \begin_inset space \thinspace{}
24441 cm column separation:
24444 \begin_layout Standard
24448 \begin_layout Plain Layout
24457 \begin_layout Plain Layout
24463 columnseprulecolor}{
24473 \begin_layout Standard
24474 \begin_inset Flex Multiple Columns
24477 \begin_layout Plain Layout
24480 \begin_inset Quotes eld
24483 You're surprised to see me, sir,
24484 \begin_inset Quotes erd
24487 said he, in a strange, croaking voice.
24490 \begin_layout Plain Layout
24493 I acknowledged that I was.
24496 \begin_layout Plain Layout
24499 \begin_inset Quotes eld
24502 Well, I've a conscience, sir, and when I chanced to see you go into this
24503 house, as I came hobbling after you, I thought to myself, I'll just step
24504 in and see that kind gentleman, and tell him that if I was a bit gruff
24505 in my manner there was not any harm meant, and that I am much obliged to
24506 him for picking up my books.
24507 \begin_inset Quotes erd
24513 \begin_layout Plain Layout
24516 \begin_inset Quotes eld
24519 You make too much of a trifle,
24520 \begin_inset Quotes erd
24525 \begin_inset Quotes eld
24528 May I ask how you knew who I was?
24529 \begin_inset Quotes erd
24535 \begin_layout Plain Layout
24538 \begin_inset Quotes eld
24541 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24542 you'll find my little bookshop at the corner of Church Street, and very
24543 happy to see you, I am sure.
24544 Maybe you collect yourself, sir.
24548 \begin_inset space ~
24561 --a bargain, every one of them.
24562 With five volumes you could just fill that gap on that second shelf.
24563 It looks untidy, does it not, sir?
24564 \begin_inset Quotes erd
24575 \begin_layout Standard
24579 \begin_layout Plain Layout
24585 columnseprule}{0pt}
24588 \begin_layout Plain Layout
24594 columnseprulecolor}{
24602 \begin_inset Note Note
24605 \begin_layout Plain Layout
24606 go back to the default
24614 \begin_layout Section
24615 Non-standard Paragraph Shapes
24618 \begin_layout Standard
24620 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24621 For special cases like for example posters, invitation cards or poems you
24622 can modify the paragraph shape to one of your choice.
24623 This can be done by using the LaTeX-package
24627 which is loaded by using in the document settings the module
24629 Custom paragraph shapes
24634 \begin_layout Subsection
24638 \begin_layout Standard
24643 provides the following shapes:
24646 \begin_layout Standard
24647 \begin_inset Tabular
24648 <lyxtabular version="3" rows="13" columns="3">
24649 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24650 <column alignment="center" valignment="middle" width="16col%">
24651 <column alignment="center" valignment="middle" width="40col%">
24652 <column alignment="center" valignment="middle" width="35col%">
24653 <row endhead="true">
24654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24657 \begin_layout Plain Layout
24663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24666 \begin_layout Plain Layout
24672 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24675 \begin_layout Plain Layout
24683 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24686 \begin_layout Plain Layout
24692 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24695 \begin_layout Plain Layout
24696 Circle with circular hole (in the size of a CD/DVD)
24701 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24704 \begin_layout Plain Layout
24705 Cannot be scaled, take care there is not too much text
24712 <cell alignment="center" valignment="top" topline="true" usebox="none">
24715 \begin_layout Plain Layout
24721 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24724 \begin_layout Plain Layout
24730 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24733 \begin_layout Plain Layout
24734 Fragile, calculation might fail
24741 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24744 \begin_layout Plain Layout
24750 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24753 \begin_layout Plain Layout
24754 Rhomboid (symbolizing a
24755 \begin_inset Quotes eld
24759 \begin_inset Quotes erd
24767 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24770 \begin_layout Plain Layout
24778 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24781 \begin_layout Plain Layout
24787 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24790 \begin_layout Plain Layout
24796 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24799 \begin_layout Plain Layout
24807 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24810 \begin_layout Plain Layout
24816 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24819 \begin_layout Plain Layout
24825 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24828 \begin_layout Plain Layout
24836 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24839 \begin_layout Plain Layout
24845 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24848 \begin_layout Plain Layout
24849 Nut for bolt (hexagon with circular hole)
24854 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24857 \begin_layout Plain Layout
24865 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24868 \begin_layout Plain Layout
24874 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24877 \begin_layout Plain Layout
24883 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24886 \begin_layout Plain Layout
24894 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24897 \begin_layout Plain Layout
24903 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24906 \begin_layout Plain Layout
24912 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24915 \begin_layout Plain Layout
24923 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24926 \begin_layout Plain Layout
24932 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24935 \begin_layout Plain Layout
24941 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24944 \begin_layout Plain Layout
24952 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24955 \begin_layout Plain Layout
24961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24964 \begin_layout Plain Layout
24965 Normal/reversed rain drop
24970 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24973 \begin_layout Plain Layout
24974 Fragile, calculation might fail
24981 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24984 \begin_layout Plain Layout
24990 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24993 \begin_layout Plain Layout
24999 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25002 \begin_layout Plain Layout
25010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25013 \begin_layout Plain Layout
25015 \begin_inset Newline newline
25023 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25026 \begin_layout Plain Layout
25027 Triangles in different orientations
25032 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25035 \begin_layout Plain Layout
25049 \begin_layout Standard
25050 To use a shape for your paragraph, simply select it in LyX's pull-down box
25051 for environments in the toolbar.
25054 \begin_layout Standard
25055 \begin_inset Newpage newpage
25061 \begin_layout Standard
25062 Here is an example paragraph in the shape of a nut:
25065 \begin_layout Standard
25066 \begin_inset VSpace bigskip
25075 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25076 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25078 At vero eos et accusam et justo duo dolores et ea rebum.
25079 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25081 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25082 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25086 \begin_layout Standard
25087 \begin_inset VSpace bigskip
25093 \begin_layout Standard
25094 \begin_inset Note Greyedout
25097 \begin_layout Plain Layout
25102 : shapepar paragraphs cannot run over a page break.
25110 \begin_layout Standard
25111 \begin_inset VSpace bigskip
25117 \begin_layout Standard
25122 takes care that the shape will always be preserved, no matter how much
25123 text is in the paragraph.
25124 Therefore the paragraph size changes with the amount of contained text.
25125 This can lead to paragraph sizes exceeding the page margins.
25126 To demonstrate the size scaling, here is the same example paragraph but
25127 with twice as much text:
25130 \begin_layout Standard
25131 \begin_inset Newpage newpage
25140 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25141 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25143 At vero eos et accusam et justo duo dolores et ea rebum.
25144 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25146 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25147 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25149 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25150 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25152 At vero eos et accusam et justo duo dolores et ea rebum.
25153 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25155 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25156 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25160 \begin_layout Standard
25161 \begin_inset VSpace bigskip
25167 \begin_layout Standard
25168 An exception is the shape
25173 It cannot be scaled because it must fit the size of a CD/DVD.
25174 Therefore the amount of text that fits into the shape is limited.
25175 \begin_inset Newline newline
25186 shape are fragile, meaning that the calculation of their size can fail,
25187 depending on the amount of text.
25188 You will then get the LaTeX error
25189 \begin_inset Quotes eld
25192 Arithmetic overflow
25193 \begin_inset Quotes erd
25197 In this case one can try to remove or add some text; if nothing works one
25198 has to use another shape.
25201 \begin_layout Standard
25202 \begin_inset VSpace bigskip
25208 \begin_layout Standard
25209 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25210 fails for text in the tips.
25211 Therefore it is often necessary to add hyphenation points
25216 arg "specialchar-insert hyphenation"
25221 ) to the corresponding text parts.
25224 \begin_layout Standard
25225 \begin_inset VSpace bigskip
25231 \begin_layout Standard
25232 Shapepar paragraphs are either always centered or placed on the page so
25233 that their left border touches the left page margin.
25234 You can therefore not use the paragraph dialog to align such paragraphs.
25235 A solution is to put the paragraph into a minipage or parbox and align
25237 The problem is hereby to find the right width for the box.
25238 Because if it is too wide and you center the box, the paragraph is not
25239 centered too because it sticks at the left side of the box.
25240 So you might have to play a bit with the width until it fits.
25241 Here are two heart-shaped paragraphs, the first one is not aligned, the
25242 second one is right-aligned:
25245 \begin_layout Standard
25246 \begin_inset Newpage newpage
25252 \begin_layout Heart
25257 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25258 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25260 At vero eos et accusam et justo duo dolores et ea rebum.
25261 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25265 \begin_layout Standard
25266 \begin_inset VSpace bigskip
25272 \begin_layout Standard
25275 \begin_inset Box Frameless
25285 height_special "totalheight"
25288 \begin_layout Heart
25293 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25294 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25296 At vero eos et accusam et justo duo dolores et ea rebum.
25297 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25306 \begin_layout Subsection
25310 \begin_layout Standard
25311 You can define any shape you want.
25312 Doing this manually is a lot of work because every coordinate must be specified.
25313 But there is a way to let the computer calculate the coordinates:
25316 \begin_layout Enumerate
25317 Install the program
25318 \begin_inset CommandInset href
25321 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25328 \begin_layout Enumerate
25339 \begin_layout Plain Layout
25350 \begin_layout Plain Layout
25357 eX\SpecialChar \menuseparator
25358 Settings\SpecialChar \menuseparator
25361 and select the font size you are using in your document.
25362 For example this document uses the size 12
25363 \begin_inset space \thinspace{}
25369 \begin_layout Enumerate
25373 \begin_layout Enumerate
25380 \begin_layout Plain Layout
25391 \begin_layout Plain Layout
25398 eX\SpecialChar \menuseparator
25401 to export the shape to coordinates.
25402 In the appearing dialog use either the outline of your shape for the coordinate
25403 s or the path itself.
25407 \begin_layout Plain Layout
25408 For more information see
25409 \begin_inset CommandInset href
25411 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25423 \begin_layout Standard
25424 The coordinates are written into a TeX-file.
25425 To use it for your LyX document
25428 \begin_layout Enumerate
25429 Place the cursor before the first character of your paragraph (or into a
25433 \begin_layout Enumerate
25434 Open in LyX the menu
25436 Insert\SpecialChar \menuseparator
25437 File\SpecialChar \menuseparator
25439 \begin_inset space ~
25444 , select the file and use
25453 \begin_layout Standard
25454 \begin_inset VSpace defskip
25460 \begin_layout Standard
25461 \begin_inset Note Greyedout
25464 \begin_layout Plain Layout
25469 : The changed shape only applies to the current paragraph; everything is
25470 reset to normal for the next paragraph.
25471 Therefore the shape definition file must be input into every paragraph
25472 with the desired shape.
25480 \begin_layout Standard
25481 \begin_inset VSpace bigskip
25487 \begin_layout Standard
25488 Here is an example:
25491 \begin_layout Standard
25492 \begin_inset VSpace bigskip
25498 \begin_layout Standard
25499 \begin_inset CommandInset include
25501 filename "SpecialParagraphShape.tex"
25507 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25508 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25510 At vero eos et accusam et justo duo dolores et ea rebum.
25511 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25513 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25514 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25518 \begin_layout Standard
25519 \begin_inset VSpace bigskip
25525 \begin_layout Standard
25530 to draw complexer shapes in
25534 you can draw the shape in a program of your choice and import the resulting
25540 Then you only need to draw a line or spline along the outline of the image.
25543 \begin_layout Standard
25544 \begin_inset VSpace bigskip
25550 \begin_layout Standard
25553 Custom paragraph shapes
25555 also provides the two commands
25563 which can be used to define custom shapes coordinate by coordinate.
25567 \begin_layout Plain Layout
25568 These commands are internally used for all shapes described here.
25573 For information how these styles are used and about further customization
25574 possibilities, have a look at the documentation of the package
25579 \begin_inset CommandInset citation
25588 \begin_layout Bibliography
25589 \begin_inset CommandInset bibitem
25590 LatexCommand bibitem
25595 Documentation of the LaTeX-package
25596 \begin_inset CommandInset href
25599 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25606 \begin_layout Bibliography
25607 \begin_inset CommandInset bibitem
25608 LatexCommand bibitem
25613 Documentation of the LaTeX-package
25614 \begin_inset CommandInset href
25617 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"