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 TMP < "${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
7106 \begin_layout Plain Layout
7107 You might want to set
7108 \begin_inset Flex Code
7111 \begin_layout Plain Layout
7118 \begin_inset Flex MenuItem
7121 \begin_layout Plain Layout
7122 Tools\SpecialChar \menuseparator
7123 Preferences\SpecialChar \menuseparator
7124 File Handling\SpecialChar \menuseparator
7126 \begin_inset space ~
7143 \begin_layout Plain Layout
7144 For Sumatra CMCDDE is needed --- downloadable from
7145 \begin_inset CommandInset href
7147 target "http://www.istri.fr/zip/CMCDDE.zip"
7157 While many of the widespread PDF viewers (most notably Adobe Reader) do
7158 not support forward search at all, some other viewers -- e.
7159 \begin_inset space \thinspace{}
7163 evince and xpdf -- allow at least to reload the document and jump to a
7164 specific page of the file, so you can at least navigate
7165 \begin_inset Quotes eld
7169 \begin_inset Quotes erd
7173 This latter functionality is provided by an external call of synctex (see
7174 the predefined example configurations).
7178 \begin_layout Standard
7179 Forward search works both with DVI and PDF output.
7180 LyX simply checks which preview format you have used before (i.
7181 \begin_inset space \thinspace{}
7184 e., which format is already there in the temporary directory) and chooses
7185 the appropriate configuration for the respective format.
7188 \begin_layout Chapter
7189 Special Document Classes
7192 \begin_layout Section
7196 \begin_layout Standard
7202 \begin_layout Subsection
7206 \begin_layout Standard
7207 This section describes how LyX can be used to write articles for submission
7208 to the scientific journal
7210 Astronomy and Astrophysics
7212 (www.edpsciences.fr/aa/
7213 \begin_inset Flex URL
7216 \begin_layout Plain Layout
7218 http://www.edpsciences.fr/aa/
7223 ) using Version 5.01 of the document class
7228 This package can be downloaded from the ftp site
7231 \begin_layout Standard
7232 \begin_inset VSpace medskip
7238 \begin_layout Standard
7240 \begin_inset Flex URL
7243 \begin_layout Plain Layout
7245 ftp://ftp.edpsciences.org/pub/aa/readme.html
7253 \begin_layout Standard
7254 \begin_inset VSpace medskip
7260 \begin_layout Standard
7261 A manual comes together with that package, and this text is not meant to
7262 replace the original manual but is merely a short guide in how to realize
7263 the correct form of your paper.
7267 \begin_layout Standard
7268 Please note that the publisher of the journal was changed from Springer
7269 to EDP Sciences starting January 1, 2001.
7270 That change involved also some slight changes to the style files, namely
7271 the removal of the thesaurus command.
7272 The LyX class aa supports the newest version of these style files, V 5.01.
7273 If you have an older version installed, please upgrade.
7274 For compatibility, the old (version 4) layout has been kept as
7279 Please refer to the comments in
7281 LyXDir/layouts/aapaper.layout
7286 \begin_layout Subsection
7290 \begin_layout Standard
7291 It is recommended you start from the example template distributed with LyX.
7292 If you are not using a template, note the following settings:
7295 \begin_layout Itemize
7302 Document\SpecialChar \menuseparator
7305 dialog (OK, that one was obvious).
7308 \begin_layout Itemize
7309 Don't change the option
7312 \begin_inset space ~
7322 The whole layout is done by the macros, you shouldn't change anything.
7325 \begin_layout Subsection
7329 \begin_layout Standard
7330 First thing to enter is the header information.
7331 It consists of seven entries, of which some are optional.
7335 \begin_layout Itemize
7343 \begin_layout Itemize
7351 \begin_layout Itemize
7359 \begin_layout Itemize
7367 \begin_layout Itemize
7372 : [optional] if more than one author: whom to contact for offprint requests.
7375 \begin_layout Itemize
7380 : [optional] mail address for contacts.
7383 \begin_layout Itemize
7391 Received: <date>; Accepted <date>
7394 \begin_layout Standard
7395 There is no need to issue the
7401 command, this is done automatically by LyX when the header is finished.
7402 Although the order of the single header entries doesn't matter it is advised
7403 to keep the above sequence, just to get the best optics and meets the layout
7404 of the real document.
7407 \begin_layout Standard
7408 If you want to place footnotes in the header block, e.
7409 \begin_inset space \thinspace{}
7413 \begin_inset space \space{}
7416 to state your present address, just use the standard footnote via the menu
7419 Insert\SpecialChar \menuseparator
7423 LyX will automagically use the term
7432 \begin_layout Standard
7433 In addition to these topics, the macros use three additional LaTeX commands
7434 that have no counterpart in LyX:
7437 \begin_layout Itemize
7444 to separate different names for more than one author and institute, respectivel
7448 \begin_layout Itemize
7455 to mark corresponding author/institute pairs.
7456 The institutes are numbered sequentially as they appear in the
7460 field, so you have to put a marker to each author.
7463 \begin_layout Itemize
7470 to supply an email address for fast contact.
7473 \begin_layout Standard
7474 In all cases, the appropriate command has to be entered in LyX and marked
7480 \begin_layout Subsection
7484 \begin_layout Standard
7485 The abstract should immediately follow the header block.
7486 With version 5 the abstract environment was changed to a command, and there
7487 is now a resctriction to only one paragraph.
7488 In addition, it should contain an entry with the keywords.
7489 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7496 by hand and mark it as LaTeX code.
7497 Refer to the example paper.
7500 \begin_layout Subsection
7501 Supported environments
7504 \begin_layout Standard
7505 The A&A paper layout supports the following environments for structuring
7509 \begin_layout Itemize
7515 \begin_layout Itemize
7521 \begin_layout Itemize
7527 \begin_layout Itemize
7533 \begin_layout Itemize
7539 \begin_layout Itemize
7545 \begin_layout Itemize
7551 \begin_layout Itemize
7557 \begin_layout Itemize
7563 \begin_layout Itemize
7569 \begin_layout Itemize
7575 \begin_layout Itemize
7581 \begin_layout Subsection
7582 Commands not supported by LyX
7585 \begin_layout Standard
7586 Some commands are not yet supported by the
7591 Some have already been mentioned.
7592 For the sake of completeness, they are listed all together here:
7595 \begin_layout Itemize
7603 \begin_layout Itemize
7611 \begin_layout Itemize
7619 \begin_layout Itemize
7627 \begin_layout Itemize
7635 \begin_layout Itemize
7643 \begin_layout Itemize
7651 \begin_layout Itemize
7659 \begin_layout Standard
7660 If you want to use any of these commands, you have to enter them yourself.
7663 Do not forget to mark them as LaTeX code!
7666 \begin_layout Subsection
7667 Figure and Table Floats
7670 \begin_layout Standard
7671 LyX provides support for the necessary float environments
7673 figure, figure*, table
7679 , therefore we won't tell much about it here.
7683 \begin_inset space ~
7689 Just remember that tables should be left-aligned.
7690 For that, select the table and change the alignment in
7692 Edit\SpecialChar \menuseparator
7694 \begin_inset space ~
7700 \begin_layout Standard
7701 There is only one special thing: the figures with caption besides the figure.
7702 To create such a figure, you have to do the following:
7705 \begin_layout Enumerate
7706 Create a wide figure float:
7708 Insert\SpecialChar \menuseparator
7709 Float\SpecialChar \menuseparator
7712 , then right click in the figure and select
7718 \begin_inset space ~
7726 \begin_layout Enumerate
7727 Enter your caption text.
7730 \begin_layout Enumerate
7735 to move the cursor above the caption.
7738 \begin_layout Enumerate
7742 \begin_layout Enumerate
7743 Position the cursor behind the figure and insert a horizontal fill:
7745 Insert\SpecialChar \menuseparator
7747 \begin_inset space ~
7750 Character\SpecialChar \menuseparator
7752 \begin_inset space ~
7760 \begin_layout Enumerate
7761 Switch to LaTeX mode:
7764 \begin_inset space ~
7772 \begin_layout Enumerate
7782 Do not close the brace!
7785 \begin_layout Enumerate
7786 Position the cursor behind the caption text, switch to LaTeX mode and insert
7790 \begin_inset space ~
7802 \begin_layout Standard
7803 Also, refer to the figures in the example paper.
7806 \begin_layout Subsection
7810 \begin_layout Standard
7811 For submission, the paper has to be formated in a special double-spacing
7813 For this purpose, you have to give the option
7817 to the documentclass.
7818 This must be done using the extra class options field in the
7820 Document\SpecialChar \menuseparator
7824 Just enter the string
7831 \begin_layout Subsection
7835 \begin_layout Standard
7840 directory contains an example paper written with LyX.
7841 It is the example paper from the original macro package, translated to
7843 Use it for inspiration, and compare the original LaTeX code with LyX way
7847 \begin_layout Section
7851 \begin_layout Standard
7857 \begin_layout Subsection
7861 \begin_layout Standard
7862 AASTeX is a set of macros produced by the American Astronomical Society
7863 to facilitate electronic manuscript submission to the three journals they
7864 publish: the Astrophysical Journal (including the Letters and Supplement),
7865 the Astronomical Journal, and the Publications of the Astronomical Society
7867 LyX has proven to be an excellent tool for generating these documents,
7868 especially given its equation, citation, and figure handling capabilities.
7869 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7870 is the version described here, or higher.
7871 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7872 incompatible with LyX.
7873 The AASTeX package may be downloaded from the AASTeX Web site
7876 \begin_layout Standard
7877 \begin_inset VSpace medskip
7883 \begin_layout Standard
7885 \begin_inset Flex URL
7888 \begin_layout Plain Layout
7890 http://www.journals.uchicago.edu/AAS/AASTeX
7898 \begin_layout Standard
7899 \begin_inset VSpace medskip
7905 \begin_layout Standard
7906 A complete user guide is contained in that package and you should familiarize
7907 yourself with it thoroughly before embarking on writing a paper in LyX.
7908 LyX will not reduce the need to figure out all the AASTeX commands, it
7909 will only reduce the drudgery of typing everything in.
7910 It is your responsibility to ensure that the final exported LaTeX document
7911 conforms completely to the requirements of the journal to which you are
7912 submitting your paper.
7915 \begin_layout Subsection
7916 Starting a New Paper
7919 \begin_layout Standard
7920 I strongly suggest that you start with the AASTeX template file.
7923 File\SpecialChar \menuseparator
7930 , enter the new file name, then choose the
7935 This will show the most common fields found in a manuscript.
7936 Simply overwrite the existing text (including the brackets,
7940 ) with the correct information.
7941 Many of the AASTeX commands and environments can be implemented directly
7942 in LyX, but some cannot: most noticeably
7954 , which should stick out like a sore thumb if you actually just opened the
7956 For commands such as these, the LaTeX code must be entered directly and
7958 Such commands are referred to as TeX code, or Evil Red Text.
7959 I tried to minimize the amount of TeX code needed in an AASTeX document,
7960 but there is still a bit more required than any of us would like.
7963 \begin_layout Subsection
7964 Finishing Your Paper
7967 \begin_layout Standard
7968 When the paper is finished to your satisfaction and previews/prints correctly,
7970 \begin_inset Quotes eld
7974 \begin_inset Quotes erd
7977 actions which need to be done before you submit it to the journals.
7981 \begin_layout Enumerate
7982 Export your paper as a LaTeX file (
7984 File\SpecialChar \menuseparator
7985 Export\SpecialChar \menuseparator
7992 \begin_layout Enumerate
7997 file with your favorite text editor
8001 \begin_layout Enumerate
8002 remove the comment lines before the
8011 \begin_layout Enumerate
8016 usepackage...{fontenc}
8018 line if it appears (usually just after
8033 \begin_layout Enumerate
8034 remove everything between (and including) the
8046 commands, except for any commands you specifically put into the LaTeX preamble
8047 (which should appear immediately after the
8048 \begin_inset Quotes eld
8051 User specified LaTeX commands
8052 \begin_inset Quotes erd
8063 \begin_layout Enumerate
8064 Run the resulting file through LaTeX to make sure it still processes correctly.
8067 \begin_layout Enumerate
8068 Reread the journal requirements to make sure your filenames and formats
8072 \begin_layout Enumerate
8076 \begin_layout Subsection
8077 Comments On Specific Commands
8080 \begin_layout Standard
8081 I will not describe the detailed usage of the individual AASTeX commands:
8082 the AASTeX User Guide (
8086 ) gives a good description of each.
8087 Thus it's probably easiest for me to go down the list as found in the guide
8088 and offer comments where necessary.
8089 So let's begin \SpecialChar \ldots{}
8093 \begin_layout Subsubsection
8094 Things that work as expected
8097 \begin_layout Standard
8098 Because they work as you might expect, I simply list them and the section
8199 begin{thebibliography}
8207 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8208 graphicx figure commands (2.14.1),
8232 (2.15.4, amongst other places),
8259 \begin_layout Standard
8260 The following style options also work correctly:
8281 Simply put them in the
8287 Layout\SpecialChar \menuseparator
8293 \begin_layout Subsubsection
8294 Things that work, but require more comment
8297 \begin_layout Standard
8298 The following items work, but require a little more discussion:
8301 \begin_layout Itemize
8302 These items are reserved for use by the journal editors, but you can put
8303 them into the LaTeX preamble if you feel compelled to do so:
8336 \begin_layout Itemize
8337 These items may be placed in the LaTeX preamble, and are included as blanks
8338 in the template file:
8359 \begin_layout Itemize
8366 (2.3) – can only be used
8367 \begin_inset Quotes eld
8371 \begin_inset Quotes erd
8374 , not in the middle of a paragraph.
8375 Use TeX code if you need to embed it.
8378 \begin_layout Itemize
8385 (2.3) – will have extra {} after it.
8386 This should not cause an error.
8389 \begin_layout Itemize
8396 (2.6) – can only be used
8397 \begin_inset Quotes eld
8401 \begin_inset Quotes erd
8404 , not in the middle of a paragraph.
8405 Use TeX code if you need to embed it.
8408 \begin_layout Itemize
8415 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8419 \begin_layout Itemize
8433 \begin_layout Itemize
8440 (2.9) – will have extra {} after it.
8441 This should not cause an error.
8444 \begin_layout Itemize
8451 (2.11) – will have extra {} after it.
8452 This should not cause an error.
8455 \begin_layout Itemize
8462 (2.14.2) – you can insert an optional filename argument by placing the cursor
8463 at the beginning of the text and selecting
8465 Insert\SpecialChar \menuseparator
8470 \begin_inset Quotes eld
8474 \begin_inset Quotes erd
8477 inserts an optional argument of the type needed by
8484 Hopefully it will be renamed someday.
8487 \begin_layout Itemize
8500 for the catalog ID optional parameter
8503 \begin_layout Itemize
8516 for the catalog ID optional parameter
8519 \begin_layout Subsubsection
8520 Things not implemented, use TeX code
8523 \begin_layout Standard
8546 setcounter{equation}
8548 (2.12), Journal name abbreviations (2.13.4),
8584 (2.15.4, insert it as the first element in the lefthand cell after where
8586 Don't use any of LyX's rules in the table),
8598 (2.15.5), much of Misc (2.17, except
8649 \begin_layout Subsubsection
8650 Things that cannot be implemented
8653 \begin_layout Standard
8654 \SpecialChar \ldots{}
8655 at least in any meaningful sort of way, so I suggest ignoring them.
8656 They are the references environment (2.13.3), and the deluxetable environment
8658 If you really, really need to use deluxetable, I suggest editing it in
8659 a separate file with a text editor, then using
8661 Insert\SpecialChar \menuseparator
8663 \begin_inset space ~
8668 to include it in your LyX document.
8673 file to see an example of this.
8676 \begin_layout Subsection
8677 FAQs, Tips, Tricks, and Other Ruminations
8680 \begin_layout Subsubsection
8681 Getting LyX and AASTeX to cooperate
8684 \begin_layout Standard
8685 It can be a bit tricky to get LyX to recognize a new layout and document
8687 When all else fails, do this:
8690 \begin_layout Enumerate
8691 Make certain that LaTeX can find AASTeX.
8692 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8693 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8700 \begin_layout Enumerate
8712 \begin_layout Enumerate
8715 Tools\SpecialChar \menuseparator
8718 in LyX, then restart LyX.
8721 \begin_layout Enumerate
8722 Open a regular new file, not from a template.
8723 Does AASTeX appear in the class list in
8725 Document\SpecialChar \menuseparator
8731 \begin_layout Standard
8732 If you get a warning from an existing AASTeX document about not being able
8733 to find the AASTeX layout or a message about
8734 \begin_inset Quotes eld
8737 You should not mix title layouts with normal ones
8738 \begin_inset Quotes erd
8741 , things haven't been installed correctly.
8744 \begin_layout Subsubsection
8745 LaTeX error processing a table
8748 \begin_layout Standard
8749 LyX, by default, attempts to center the table caption/title.
8750 This seems to produce a bad interaction in AASTeX so you should click somewhere
8751 in the caption/title, then select
8753 Edit\SpecialChar \menuseparator
8755 \begin_inset space ~
8769 This took care of it for me.
8772 \begin_layout Subsubsection
8776 \begin_layout Standard
8777 A couple of things: 1) I have noticed some funny spacing in the reference
8778 entries in the text.
8779 When you enter the bibliography item data, make sure their is
8783 space between the last author and the parenthesis setting off the year;
8787 \begin_inset space \thinspace{}
8791 \begin_inset space \space{}
8805 2) Entering the references at all is not obvious.
8806 The easiest thing is to start typing your first reference at the end of
8807 the document, then mark it as type
8812 That will put a small gray box in front of what you just typed.
8813 Click on the box to fill in the rest of the information.
8814 For new references, go to the end of an existing reference and press return.
8815 That will create a new line with its own box, etc.
8818 \begin_layout Subsubsection
8822 \begin_layout Standard
8823 Even though AASTeX provides its own figure commands (
8829 , for example), I much prefer LaTeX's standard figure commands (with the
8838 \begin_inset space ~
8841 commands as TeX code into a Figure Float box if you desire, but I never
8842 have much luck getting the layout right.
8843 With the standard graphics, LyX will insert a
8847 usepackage{graphicx}
8849 command into the LaTeX preamble and handle the figures in the standard
8850 LaTeX2e way, interspersing the figures in the text.
8851 I believe ApJ accepts figures exactly this way now; AJ might still use
8853 \begin_inset Quotes eld
8856 stack everything at the end
8857 \begin_inset Quotes erd
8863 \begin_layout Subsubsection
8864 Things I could have done, but didn't
8867 \begin_layout Standard
8869 \begin_inset Quotes eld
8873 \begin_inset Quotes erd
8876 things I could have implemented, but chose not to.
8877 For instance, I saw no point in double-spacing the text in the LyX window,
8878 even though it is double-spaced in the paper manuscript.
8879 Also, I chose not to make separate layouts for the preprint and preprint2
8881 Since I assume you will spend most of your time in the plain manuscript
8882 mode anyway, I decided not to chew up more disk space with this.
8886 \begin_layout Subsection
8890 \begin_layout Standard
8891 Your mileage may vary.
8892 I've now had papers published by both ApJ and AJ that have had 98% of the
8893 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8895 I have had no trouble with the submission process, and I'm sure the journals
8896 were never aware that there might be a difference.
8897 So, go forth and publish!
8900 \begin_layout Section
8904 \begin_layout Standard
8914 \begin_layout Standard
8915 \begin_inset VSpace bigskip
8921 \begin_layout Standard
8923 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8924 papers to be submitted to American Mathematical Society publications.
8925 The layouts are not tailored to a specific journal, but easily can be.
8926 You should refer to the AMS documentation for specific instructions for
8927 each journal (usually it will entail only changing a single line in the
8929 That documentation is available on the Web at
8930 \begin_inset Flex URL
8933 \begin_layout Plain Layout
8941 \begin_inset Flex URL
8944 \begin_layout Plain Layout
8946 ftp://ftp.ams.org/pub/tex/amslatex/
8952 These layouts are appropriate, and useful, for any mathematical writing.
8956 \begin_layout Standard
8957 There are two basic AMS LaTeX layouts:
8960 \begin_layout Itemize
8961 amsart: The standard AMS article format.
8964 \begin_layout Itemize
8965 amsbook: the standard AMS book (really, monograph) format.
8969 \begin_layout Standard
8970 The layouts themselves contain only the minimum necessary to use the AMS
8972 They do not, in particular, contain any of the `theorem' environments used
8973 for setting theorems, lemmas, and the like.
8974 These are contained, instead, in the
8975 \begin_inset Flex Code
8978 \begin_layout Plain Layout
8984 module, which is loaded by default when you select one of the AMS classes.
8985 (It can also be used with other classes and can be removed, if you would
8986 rather use something else.) Less commonly used environments are in the
8987 \begin_inset Flex Code
8990 \begin_layout Plain Layout
8991 Theorems (AMS-Extended)
8996 module, which must be loaded manually.
8999 \begin_layout Standard
9000 By default, theorems and the like are numbered consecutively throughout
9001 the document, but this may be modified by loading the module
9002 \begin_inset Flex Code
9005 \begin_layout Plain Layout
9006 Theorems (Order by Section)
9011 or, if you are using
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9026 Theorems (Order by Chapter)
9032 These will number the results as
9033 \begin_inset Formula $n.m$
9036 , where the first number refers to the section (or chapter) and the second
9037 refers to the total number of results so far in that section (or chapter).
9038 Many environments are also available unnumbered.
9039 These are indicated by an asterisk at the end.
9040 If you happen to want
9044 unnumbered results, the module
9045 \begin_inset Flex Code
9048 \begin_layout Plain Layout
9054 provides that option.
9057 \begin_layout Standard
9058 Note that these modules do not
9062 to be used with the AMS classes.
9063 It is perfectly possible to use the
9064 \begin_inset Flex Code
9067 \begin_layout Plain Layout
9073 module, and the others mentioned, with other classes, such as
9074 \begin_inset Flex Code
9077 \begin_layout Plain Layout
9084 \begin_inset Flex Code
9087 \begin_layout Plain Layout
9094 \begin_inset Flex Code
9097 \begin_layout Plain Layout
9106 \begin_layout Subsection
9107 What these layouts provide
9110 \begin_layout Standard
9111 There is a long list of included environments provided by these layouts.
9112 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9113 variety of `theorem' environments.
9114 However, the AMS recommends the environments that are available in LyX.
9118 \begin_layout Standard
9119 The following environments—as well as the standard environments, such as
9121 \begin_inset Flex Noun
9124 \begin_layout Plain Layout
9131 \begin_inset Flex Noun
9134 \begin_layout Plain Layout
9141 \begin_inset Flex Noun
9144 \begin_layout Plain Layout
9151 \begin_inset Flex Noun
9154 \begin_layout Plain Layout
9161 \begin_inset Flex Noun
9164 \begin_layout Plain Layout
9171 \begin_inset Flex Code
9174 \begin_layout Plain Layout
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9193 \begin_layout Description
9194 Address This should be the author's permanent address.
9197 \begin_layout Description
9199 \begin_inset space ~
9202 Address This should be the author's temporary address at the time of submission,
9203 if different from the Address.
9206 \begin_layout Description
9207 Email Author's e-mail address
9210 \begin_layout Description
9211 URL Author's Web address, if desired.
9214 \begin_layout Description
9215 Keywords Key words or phrases used to identify specific topics discussed
9219 \begin_layout Description
9220 Subjectclass These refer to the AMS Subject Classifications, published and
9223 Mathematical Reviews
9226 These are also available online at the AMS cites listed above.
9229 \begin_layout Description
9233 \begin_layout Description
9237 \begin_layout Description
9241 \begin_layout Standard
9242 The following environments are provided by both the
9243 \begin_inset Flex Code
9246 \begin_layout Plain Layout
9253 \begin_inset Flex Code
9256 \begin_layout Plain Layout
9262 modules, in the latter case in both starred (unnumbered) and unstarred
9263 (numbered) versions.
9264 These same environments are provided only in the starred versions by the
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9278 \begin_layout Theorem
9279 This is typically used for the statements of major results.
9283 \begin_layout Corollary*
9284 This is used for statements which follow fairly directly from previous statement
9286 Again, these can be major results.
9291 These are smaller results needed to prove other statements.
9294 \begin_layout Proposition
9295 These are less major results which (hopefully) add to the general theory
9299 \begin_layout Conjecture
9300 These are statements provided without justification, which the author does
9301 not know how to prove, but which seem to be true (to the author, at least).
9304 \begin_layout Definition*
9305 Guess what this is for.
9306 The font is different for this environment than for the previous ones.
9310 \begin_layout Example*
9311 Used for examples illustrating proven results.
9314 \begin_layout Problem
9315 It's not really known what this is for.
9316 You should figure it out.
9319 \begin_layout Exercise*
9320 Write a description for this one.
9323 \begin_layout Remark
9324 This environment is also a type of theorem, usually a lesser sort of observation.
9327 \begin_layout Claim*
9328 Often used in the course of giving a proof of a larger result.
9332 Generally, these are used to break up long arguments, using specific instances
9338 The numbering scheme for cases is on its own, not together with other numbered
9344 At the end of this environment, a QED symbol (usually a square, but it can
9345 vary with different styles) is placed.
9346 If you want to have other environments within this one—for example, Case
9347 environments—and have the QED symbol appear only after them, then the other
9348 environments need to be nested within the proof environment.
9351 Nesting Environments
9357 for information on nesting.
9360 \begin_layout Standard
9361 And these environments are provided by
9362 \begin_inset Flex Code
9365 \begin_layout Plain Layout
9366 Theorems (AMS-Extended)
9374 \begin_layout Criterion*
9375 A required condition.
9378 \begin_layout Algorithm*
9379 A general procedure to be used.
9382 \begin_layout Axiom*
9383 This is a property or statement taken as true within the system being discussed.
9386 \begin_layout Condition*
9387 Sometimes used to state a condition assumed within the present context of
9392 Similar to a Remark.
9395 \begin_layout Notation*
9396 Used for the explanation of, yes, notation.
9399 \begin_layout Summary
9400 Do we really need to tell you?
9403 \begin_layout Acknowledgement*
9407 \begin_layout Conclusion*
9408 Sometimes used at the end of a long train of argument.
9412 Used in a way similar to Proposition, though perhaps lower on the scale.
9415 \begin_layout Standard
9416 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9418 They need to be available on your system in order to use these environments.
9421 \begin_layout Section
9429 \begin_layout Standard
9435 \begin_layout Subsection
9439 \begin_layout Standard
9440 These are the layout files for some of the journals of the American Geophysical
9442 It is assumed that you have both the AGU's own class files and AGUplus
9443 installed (everything to be found at
9444 \begin_inset Flex URL
9447 \begin_layout Plain Layout
9449 ftp://ftp.agu.org/journals/latex/journals
9457 \begin_layout Subsection
9461 \begin_layout Standard
9471 They are still called this in the LyX GUI, though their LaTeX equivalents
9472 in the AGU classes are
9483 \begin_layout Standard
9484 Newly defined styles are
9521 These are mostly manuscript attributes and defined in the AGU class documentati
9525 \begin_layout Standard
9526 I suspect this is still badly incomplete.
9529 \begin_layout Subsection
9533 \begin_layout Standard
9550 \begin_layout Subsection
9554 \begin_layout Itemize
9557 Journal of Geophysical Research
9566 \begin_layout Standard
9567 Add your own, it isn't so hard! Look at the
9578 \begin_layout Subsection
9579 Bugs and things to remember
9582 \begin_layout Standard
9583 In order to use the new layouts, you must remember to do the following for
9587 \begin_layout Enumerate
9593 This can be done in the
9595 Layout\SpecialChar \menuseparator
9600 Document\SpecialChar \menuseparator
9604 (AGU articles are always in English, right? So
9611 \begin_layout Enumerate
9621 (Yes, this is a bug.)
9624 \begin_layout Enumerate
9625 Make sure you use the
9629 bibliography style, by entering
9633 into the second field of the BibTeX inset.
9634 None of the standard styles will do.
9637 \begin_layout Section
9641 \begin_layout Standard
9647 \begin_layout Subsection
9651 \begin_layout Standard
9652 Broadway is for writing plays.
9653 The format is more decorative than Hollywood, and much less standardized.
9654 This format should be suitable for workshops.
9657 \begin_layout Subsection
9661 \begin_layout Standard
9662 The same as in Hollywood.
9665 \begin_layout Subsection
9669 \begin_layout Standard
9674 names as labels then cross-reference the label to insert the name.
9675 The cross-reference dialog will show the current cast of characters.
9678 \begin_layout Subsection
9679 Paper size and Margins
9682 \begin_layout Standard
9683 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9686 \begin_layout Subsection
9690 \begin_layout Standard
9691 The following environments are available.
9692 You can use broadway.bind to get the bind keys shown at the right.
9695 \begin_layout Itemize
9699 \begin_inset Newline newline
9704 You should not have to use this, but it is here for anything that does not
9708 \begin_layout Itemize
9712 \begin_inset space \hfill{}
9716 \begin_inset Newline newline
9721 Used to describe stage setting and the action.
9722 First use of speaker names in all CAPs.
9725 \begin_layout Itemize
9729 \begin_inset space \hfill{}
9733 \begin_inset Newline newline
9738 Automatically numbered.
9739 On screen it will be arabic, but will print as Roman.
9742 \begin_layout Itemize
9746 \begin_inset space \hfill{}
9750 \begin_inset Newline newline
9760 It is just centered text.
9763 \begin_layout Itemize
9767 \begin_inset space \hfill{}
9771 \begin_inset Newline newline
9776 Not automatically numbered.
9777 You supply the number.
9778 This is because I couldn't figure out how.
9781 \begin_layout Itemize
9785 \begin_inset space \hfill{}
9789 \begin_inset Newline newline
9794 A special case of Narrative to describe the setting and action as the curtain
9798 \begin_layout Itemize
9802 \begin_inset space \hfill{}
9806 \begin_inset Newline newline
9811 The speaker's (actor's) title, centered in all CAPS.
9814 \begin_layout Itemize
9818 \begin_inset space \hfill{}
9822 \begin_inset Newline newline
9827 Instructions to the speaker.
9828 The parentheses are automatically inserted.
9829 The ( will appear on screen, but both will be in the printed play.
9830 This environment is only used within
9837 \begin_layout Itemize
9841 \begin_inset space \hfill{}
9845 \begin_inset Newline newline
9850 What the Speaker says.
9853 \begin_layout Itemize
9857 \begin_inset space \hfill{}
9861 \begin_inset Newline newline
9866 The curtain comes down.
9869 \begin_layout Itemize
9873 \begin_inset space \hfill{}
9879 \begin_layout Itemize
9883 \begin_inset space \hfill{}
9889 \begin_layout Itemize
9893 \begin_inset space \hfill{}
9899 \begin_layout Standard
9903 \begin_layout Section
9907 \begin_layout Standard
9912 can be used to type letters according to German conventions.
9913 A template file is included in
9915 .../lyx/share/templates
9917 for you to use as a starting point.
9920 \begin_layout Section
9928 \begin_layout Standard
9934 \begin_layout Subsection
9938 \begin_layout Standard
9939 This is the layout file for the European Geophysical Society journals.
9944 can be downloaded from the web site of the EGS under
9945 \begin_inset Flex URL
9948 \begin_layout Plain Layout
9958 \begin_layout Subsection
9962 \begin_layout Standard
9965 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9973 The current layout file is unfortunately very unmodular and would benefit
9974 from using the various
9981 \begin_layout Section
9985 \begin_layout Standard
9986 See the LyX template file
9991 It contains all infos you need.
9994 \begin_layout Section
10000 \begin_inset CommandInset label
10009 \begin_layout Standard
10015 \begin_layout Subsection
10019 \begin_layout Standard
10020 This section describes how to use LyX to make slides for overhead projectors.
10021 There are two document classes that can do this: the default slides class
10027 This section documents the latter.
10030 \begin_layout Standard
10031 I'm going to say this again, nice and clear, so that there's no misunderstanding
10035 \begin_layout Standard
10036 \begin_inset VSpace bigskip
10042 \begin_layout Standard
10046 This section documents the class
10047 \begin_inset Quotes eld
10055 \begin_inset Quotes erd
10063 \begin_layout Standard
10064 \begin_inset VSpace bigskip
10070 \begin_layout Standard
10071 If you're looking for the documentation for
10072 \begin_inset Quotes eld
10080 \begin_inset Quotes erd
10083 , check out section
10084 \begin_inset space ~
10088 \begin_inset CommandInset ref
10090 reference "sec:slitex"
10095 If your machine doesn't have the
10100 \begin_inset Quotes eld
10108 \begin_inset Quotes erd
10111 ] installed, you'll probably have to use the default
10115 class, which isn't quite as good as
10120 \begin_layout Standard
10125 class is designed for use with version 2.1 of the
10129 LaTeX class file which is now an integral part of LaTeX2e.
10132 \begin_layout Subsection
10136 \begin_layout Standard
10137 Obviously, to use this document class, you need to select
10138 \begin_inset Quotes eld
10146 \begin_inset Quotes erd
10156 \begin_inset space ~
10162 There are some settings in the
10165 \begin_inset space ~
10170 dialog that you should know about that are specific to this class:
10173 \begin_layout Itemize
10174 Don't change the options
10185 \begin_inset space ~
10191 They're ignored by the
10198 \begin_layout Itemize
10199 The default font size is 20
10200 \begin_inset space \thinspace{}
10203 pt with the other options being 17
10204 \begin_inset space \thinspace{}
10208 \begin_inset space \thinspace{}
10212 \begin_inset space \thinspace{}
10218 \begin_layout Itemize
10219 The default font is
10227 but all math equations are still typeset in the usual roman font.
10230 \begin_layout Itemize
10235 supports A4 and Letter paper sizes as well as a special size for working
10237 \begin_inset space \thinspace{}
10241 It doesn't support A5, B5, legal or executive paper sizes.
10244 \begin_layout Itemize
10245 Don't bother changing the
10249 settings because they are ignored anyway.
10250 All floats appear where they are defined in the text.
10253 \begin_layout Itemize
10258 setting behaves a bit differently for this class.
10263 provides extensive footer and header capabilities including a user-defined
10266 \begin_inset space ~
10270 \begin_inset CommandInset ref
10272 reference "sec:foilfoot"
10277 The title page is treated differently to all other pages in the document
10286 has the logo centered at the bottom of the page (if one is defined).
10287 The possible page style choices and what they do are as follows:
10291 \begin_layout Labeling
10292 \labelwidthstring MMMMMMM
10299 The final output contains no page numbers, or other headers or footers
10300 (except footnotes of course).
10304 \begin_layout Labeling
10305 \labelwidthstring MMMMMMM
10312 The final output contains page numbers centered at the bottom of the page.
10313 No other headings or footers (other than footnotes).
10316 \begin_layout Labeling
10317 \labelwidthstring MMMMMMM
10322 Page numbers in lower right corner.
10323 Additional headers and footers are also shown.
10324 This is also the default.
10327 \begin_layout Labeling
10328 \labelwidthstring MMMMMMM
10333 Gives you access to the
10337 package although its use with
10341 is discouraged by the writer of the
10345 package because of some potential page layout clashes.
10349 \begin_layout Subsubsection
10353 \begin_layout Standard
10354 The following options may be used in the extra class options in the
10356 Document\SpecialChar \menuseparator
10362 \begin_layout Labeling
10363 \labelwidthstring MMMMMMx
10368 This sets up the page layout for 7.33
10369 \begin_inset space \thinspace{}
10373 \begin_inset space \thinspace{}
10376 in paper, which is about the same aspect ratio as a 35
10377 \begin_inset space \thinspace{}
10380 mm slide, making it a bit easier to work with this medium.
10383 \begin_layout Labeling
10384 \labelwidthstring MMMMMMx
10389 Places a rule across the page below the header on every page except the
10393 \begin_layout Labeling
10394 \labelwidthstring MMMMMMx
10399 Places a rule across the page above the footer on every page except the
10403 \begin_layout Labeling
10404 \labelwidthstring MMMMMMx
10409 This is automatically set each time you create a new
10418 to use the dvips driver to rotate those pages that are set as landscape
10422 \begin_layout Labeling
10423 \labelwidthstring MMMMMMx
10428 Simply changes the page dimensions to those of a landscape page but doesn't
10430 Thus if you use this option you need to use an external program to rotate
10431 each page or feed your paper through your printer as landscape.
10432 Note that this option effectively reverses the roles of the
10440 environments (don't worry these are described in the next section).
10443 \begin_layout Labeling
10444 \labelwidthstring MMMMMMx
10449 Equation numbers on the left.
10452 \begin_layout Labeling
10453 \labelwidthstring MMMMMMx
10458 Flush-left equations.
10461 \begin_layout Subsection
10462 Supported Environments
10465 \begin_layout Standard
10466 Most of the environments commonly supported in other classes are also supported
10472 There are several additional environments provided by
10476 as well as a couple added by LyX.
10477 The following environments are shared with other classes:
10480 \begin_layout Standard
10481 \begin_inset Flex Multiple Columns
10484 \begin_layout Itemize
10490 \begin_layout Itemize
10496 \begin_layout Itemize
10502 \begin_layout Itemize
10508 \begin_layout Itemize
10514 \begin_layout Itemize
10520 \begin_layout Itemize
10526 \begin_layout Itemize
10532 \begin_layout Itemize
10538 \begin_layout Itemize
10544 \begin_layout Itemize
10550 \begin_layout Itemize
10556 \begin_layout Itemize
10562 \begin_layout Itemize
10568 \begin_layout Itemize
10574 \begin_layout Itemize
10580 \begin_layout Itemize
10586 \begin_layout Itemize
10597 \begin_layout Standard
10598 That is, all the major environments apart from the sectioning environments.
10599 Since foils are essentially self-contained sections, with a title and body,
10604 provides specific commands for starting new foils and these are:
10607 \begin_layout Itemize
10613 \begin_layout Itemize
10619 \begin_layout Standard
10620 LyX also provides slightly modified versions of these two environments called:
10623 \begin_layout Itemize
10629 \begin_layout Itemize
10632 ShortRotatefoilhead
10635 \begin_layout Standard
10636 and the differences will be explained in the next section.
10639 \begin_layout Standard
10640 Since foils are often used in presenting ideas or new theorems and such
10645 also provides a comprehensive box of goodies for presenting them:
10648 \begin_layout Standard
10649 \begin_inset Flex Multiple Columns
10652 \begin_layout Itemize
10658 \begin_layout Itemize
10664 \begin_layout Itemize
10670 \begin_layout Itemize
10676 \begin_layout Itemize
10682 \begin_layout Itemize
10688 \begin_layout Itemize
10694 \begin_layout Itemize
10700 \begin_layout Itemize
10706 \begin_layout Itemize
10712 \begin_layout Itemize
10723 \begin_layout Standard
10724 The starred versions are unnumbered while the unstarred versions are numbered.
10725 There are also two list environments added by LyX and these are:
10728 \begin_layout Itemize
10734 \begin_layout Itemize
10740 \begin_layout Standard
10745 provides some powerful header and footer capabilities that are best set
10746 in the preamble although they may be set at any point in a document.
10747 If you want to change these settings in your document the best place to
10748 do so is at the very top of a foil, i.
10749 \begin_inset space \thinspace{}
10755 \begin_inset space \space{}
10760 straight after the foilhead.
10763 \begin_layout Standard
10764 For this purpose, the following command styles are provided [
10771 \begin_layout Standard
10772 \begin_inset Flex Multiple Columns
10775 \begin_layout Itemize
10779 \begin_inset space ~
10785 \begin_layout Itemize
10791 \begin_layout Itemize
10795 \begin_inset space ~
10801 \begin_layout Itemize
10805 \begin_inset space ~
10811 \begin_layout Itemize
10815 \begin_inset space ~
10822 \begin_layout Plain Layout
10823 \begin_inset space ~
10835 \begin_layout Standard
10836 There are also a few commands provided by
10840 that aren't directly supported by LyX but I'll tell you what they do and
10841 how to use them in section
10842 \begin_inset space ~
10846 \begin_inset CommandInset ref
10848 reference "sec:unsuppfoils"
10855 \begin_layout Subsection
10856 Building a Set of Foils
10859 \begin_layout Standard
10860 This section will give a simple introduction to using the different environments
10861 to build a set of foils.
10862 If you want to see an example set of foils, take a look at the
10866 file you find in LyX's
10873 \begin_layout Subsubsection
10874 Give It a Title Page
10877 \begin_layout Standard
10878 Unlike other classes that provide
10898 creates the title on a page of its own.
10899 If you leave out the
10903 environment LaTeX will substitute the current date (every time you regenerate
10907 \begin_layout Subsubsection
10911 \begin_layout Standard
10912 As I mentioned earlier, there are four ways of starting a new foil.
10913 For portrait foils you should use
10922 The difference between these two environments is the amount of space between
10923 the title of the foil (the foilhead) and the body of the foil.
10926 \begin_layout Standard
10927 Landscape foils are generated using the
10933 ShortRotatefoilhead
10936 Again the only difference is the spacing between foilhead and body.
10937 Both of the short versions have 0.5
10938 \begin_inset space ~
10941 inches less separation between the foilhead and the body.
10945 \begin_layout Standard
10946 One problem with the support for landscape foils is the requirement that
10947 you have to use the
10951 driver to generate the PostScript output otherwise the foils won't be rotated.
10952 It is possible to get landscape foils even if you haven't got the
10956 driver provided you can feed your foils sideways through your printer ;-)
10959 \begin_layout Subsubsection
10960 Theorems, Lemmas, Proofs and more
10963 \begin_layout Standard
10964 Due to a small bug in LyX you can't have two of the same type of these environme
10965 nts directly following each other.
10966 They must be separated by something.
10967 If you try, you will just be extending the previous environment as if you
10968 had merged the two environments together.
10969 So, how do you get around this problem? The simplest option is to insert
10970 some text between the two environments or add a
10974 environment between the two with just a
10975 \begin_inset Quotes eld
10983 \begin_inset Quotes erd
10987 This will force LyX to produce two separate environments and hence the
10988 correct LaTeX output.
10989 An example is provided in the example file included with the LyX distribution.
10990 Remember, this problem only occurs if you are trying to place two of the
10991 same type of theorem-like environments one directly after the other.
10994 \begin_layout Subsubsection
10998 \begin_layout Standard
10999 You get all the commonly supported list styles found in other classes as
11000 well as two new ones.
11001 I'll only describe the new ones here.
11002 If you want to find out more about the other list environments check out
11008 If you intend to use itemized lists you might also want to read about the
11012 \begin_inset space ~
11016 \begin_inset space ~
11021 dialog described above in section
11022 \begin_inset space ~
11026 \begin_inset CommandInset ref
11028 reference "sec:bullet"
11035 \begin_layout Standard
11036 The two new list styles,
11044 , are designed to make it easier for you to create lists of do's and don'ts
11045 or right and wrong by providing dedicated environments that use a tick
11046 or a cross as the label of the list.
11047 These lists are in fact dedicated variants of the
11052 They do however require that you have the
11056 packages installed.
11059 \begin_layout Subsubsection
11063 \begin_layout Standard
11068 redefines the floating tables and figures so that they appear exactly where
11069 they are in the text rather than pushing them to the top of the page or
11070 to some user specified location.
11071 In fact if you change the float placement settings they are simply ignored.
11074 \begin_layout Subsubsection
11075 Page Headers and Footers
11076 \begin_inset CommandInset label
11078 name "sec:foilfoot"
11085 \begin_layout Standard
11089 \begin_inset space ~
11098 are two commands used to control the left-footer text string.
11099 The first is meant to allow you to include a graphic logo on your foils
11101 \begin_inset Quotes eld
11109 \begin_inset Quotes erd
11113 While the second is meant to provide a classification for the audience,
11117 \begin_inset space \thinspace{}
11123 \begin_inset space \space{}
11127 It is empty by default.
11130 \begin_layout Standard
11131 The remaining page corners can be filled by
11134 \begin_inset space ~
11139 (which defaults to page numbers),
11142 \begin_inset space ~
11150 \begin_inset space ~
11158 \begin_layout Subsection
11164 \begin_inset CommandInset label
11166 name "sec:unsuppfoils"
11173 \begin_layout Standard
11174 All the commands mentioned below need to be set in a
11182 within another environment.
11185 \begin_layout Subsubsection
11189 \begin_layout Standard
11190 All lengths are adjusted using the
11213 should be replaced by the name given to the length you want to change and
11218 is the length value.
11219 All lengths should be specified in units of length such as inches (
11231 ) or relative to some document or font-based length such as
11241 \begin_layout Standard
11242 It's possible to change the spacing between a foilhead and the body of the
11243 foil by adjusting the length specified by
11250 For example, to make
11255 \begin_inset space \space{}
11258 in closer to their bodies put the following in the preamble:
11264 foilheadskip}{-0.5in}
11267 \begin_layout Standard
11268 The spacings around floats can be adjusted by setting these lengths:
11271 \begin_layout Labeling
11272 \labelwidthstring MMMMMMMMMMM
11279 Separation between the text and the top of the float
11282 \begin_layout Labeling
11283 \labelwidthstring MMMMMMMMMMM
11290 Separation between the float and the caption
11293 \begin_layout Labeling
11294 \labelwidthstring MMMMMMMMMMM
11301 Separation between the caption and the following text
11304 \begin_layout Labeling
11305 \labelwidthstring MMMMMMMMMMM
11312 You can make the captions narrower than the surrounding text by adjusting
11314 Best done relative to
11323 \begin_layout Standard
11324 There are also several title page related lengths that you may find useful
11325 if you have a long title or several authors:
11328 \begin_layout Labeling
11329 \labelwidthstring MMMMMMMMMMM
11336 Separation from headers to
11341 \begin_layout Labeling
11342 \labelwidthstring MMMMMMMMMMM
11360 \begin_layout Labeling
11361 \labelwidthstring MMMMMMMMMMM
11375 \begin_layout Labeling
11376 \labelwidthstring MMMMMMMMMMM
11392 \begin_layout Labeling
11393 \labelwidthstring MMMMMMMMMMM
11409 \begin_layout Standard
11410 The last length related command affects all the list environments.
11421 a list environment then all the vertical spacing between the list items
11423 Note that this is a command not a length so it doesn't require
11429 like the stuff mentioned above.
11432 \begin_layout Subsubsection
11433 Headers and Footers
11436 \begin_layout Standard
11449 commands control whether the logo in the
11453 definition appear on a given page.
11460 in the preamble then none of the foils will have the logo on them.
11461 If you don't want the logo on a particular page place the
11467 directly after the foilhead of that page and the
11473 directly after the next foilhead.
11476 \begin_layout Standard
11477 If you decide to use the
11481 page style setting in the
11484 \begin_inset space ~
11489 dialog you should probably add
11499 to your preamble so headers and footers on landscape pages are correctly
11500 placed when rotated.
11501 This is due to some clashes between the page layouts provided by the
11512 \begin_layout Section
11513 Hollywood (Hollywood spec scripts)
11516 \begin_layout Standard
11522 \begin_layout Subsection
11526 \begin_layout Standard
11527 Getting the format of a Hollywood script right is a
11528 \begin_inset Quotes eld
11532 \begin_inset Quotes erd
11535 It is designed to make the readers focus on content and to be easy and
11536 familiar for the actors to read.
11537 Each page of a script should be one minute of film.
11538 Nothing goes in a script that you cannot see or hear on screen.
11539 The courier 12 pt font should be used throughout.
11543 \begin_layout Subsection
11547 \begin_layout Standard
11548 Speakers' lines should NEVER break in mid-sentence.
11549 If a speaker's lines continue over a page break, repeat the
11553 title followed by (Cont'd).
11556 \begin_layout Subsection
11560 \begin_layout Standard
11565 names as labels then cross-reference the label to insert the name.
11566 The cross-reference dialog will show the current cast of characters.
11567 You can use this to insert the speaker name in narratives also.
11570 \begin_layout Subsection
11571 Paper size and Margins
11574 \begin_layout Standard
11575 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11578 \begin_layout Subsection
11582 \begin_layout Standard
11583 The following environments are available.
11584 You can use hollywood.bind to get the bind keys shown at the right.
11587 \begin_layout Itemize
11591 \begin_inset Newline newline
11596 Used where nothing else works.
11600 \begin_layout Itemize
11606 \begin_inset space \hfill{}
11614 \begin_inset Newline newline
11617 Usually followed by something like
11618 \begin_inset Quotes eld
11621 on Sally waking up.
11622 \begin_inset Quotes erd
11628 \begin_layout Itemize
11632 \begin_inset space \hfill{}
11636 \begin_inset Newline newline
11641 Introduces a new INTERIOR camera set-up.
11642 Always followed by DAY or NIGHT, or something similar to define the lighting
11644 Everthing on this line in CAPS.
11647 \begin_layout Itemize
11651 \begin_inset space \hfill{}
11655 \begin_inset Newline newline
11660 Introduces a new EXTERIOR camera set-up.
11661 Everthing on this line in CAPS.
11664 \begin_layout Itemize
11668 \begin_inset space \hfill{}
11672 \begin_inset Newline newline
11677 The character speaking.
11680 \begin_layout Itemize
11684 \begin_inset space \hfill{}
11688 \begin_inset Newline newline
11693 Instructions to the speaker.
11694 The () are automatically inserted, but only the ( will show in LyX.
11695 Both will be printed.
11698 \begin_layout Itemize
11702 \begin_inset space \hfill{}
11706 \begin_inset Newline newline
11718 \begin_layout Itemize
11722 \begin_inset space \hfill{}
11726 \begin_inset Newline newline
11731 Camera movement instruction.
11733 \begin_inset space \thinspace{}
11737 \begin_inset space \space{}
11743 \begin_layout Itemize
11747 \begin_inset space \hfill{}
11753 \begin_layout Itemize
11757 \begin_inset space \hfill{}
11763 \begin_layout Itemize
11767 \begin_inset space \hfill{}
11773 \begin_layout Itemize
11777 \begin_inset space \hfill{}
11783 \begin_layout Subsection
11787 \begin_layout Itemize
11791 \begin_layout Itemize
11795 \begin_layout Itemize
11797 \begin_inset space \thinspace{}
11804 \begin_layout Itemize
11809 \begin_layout Itemize
11810 PAN — camera movement
11813 \begin_layout Itemize
11814 INSERT — cut to close-up of
11817 \begin_layout Section
11821 \begin_layout Standard
11824 Panayotis Papasotiriou
11827 \begin_layout Subsection
11831 \begin_layout Standard
11832 The ijmpc package is a set of macros that facilitates electronic manuscript
11835 International Journal of Modern Physics C
11838 Similarly, the ijmpd package is for creating manuscripts to be submitted
11841 International Journal of Modern Physics D
11844 Both journals are published by World Scientific.
11845 The corresponding document classes are named
11854 These files, together with instructions for the authors, can be downloaded
11856 \begin_inset Flex URL
11859 \begin_layout Plain Layout
11861 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11867 \begin_inset Flex URL
11870 \begin_layout Plain Layout
11872 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11878 Both packages are modified versions of the standard
11879 \begin_inset Quotes eld
11883 \begin_inset Quotes erd
11886 package, and they are almost (but not exactly) identical.
11887 Most of their features are supported by LyX.
11888 I have used LyX successfully to write articles submitted to both journals
11889 without any problem.
11892 \begin_layout Subsection
11896 \begin_layout Standard
11897 As usual, the easiest way to write a paper is to start with a template.
11900 File\SpecialChar \menuseparator
11919 This will give an (almost) empty document that includes the most common
11920 fields found in a manuscript.
11921 Simply overwrite the existing text (including the brackets,
11926 You should keep in mind the following remarks.
11929 \begin_layout Enumerate
11930 LyX won't let you change the font size and the page style of the document,
11931 because such modifications are not allowed by both packages.
11934 \begin_layout Enumerate
11935 The language of the document should not be changed.
11936 Before previewing your paper, be sure that the babel package is not used.
11937 To do this, click on
11939 Tools\SpecialChar \menuseparator
11950 checkbox in the language settings, and click on
11958 , if you wish to make this change permanent).
11961 \begin_layout Enumerate
11963 \begin_inset Quotes eld
11967 \begin_inset Quotes erd
11970 style must be used to define keywords.
11973 \begin_layout Enumerate
11974 The ijmpc package provides a style named
11975 \begin_inset Quotes eld
11978 Classification Codes
11979 \begin_inset Quotes erd
11982 , which can be used to define classification codes, such as PACS numbers.
11983 Note that this facility is not supported by the ijmpd package.
11986 \begin_layout Enumerate
11987 Several new environments are available:
11988 \begin_inset Quotes eld
11992 \begin_inset Quotes erd
11996 \begin_inset Quotes eld
12000 \begin_inset Quotes erd
12004 \begin_inset Quotes eld
12008 \begin_inset Quotes erd
12012 \begin_inset Quotes eld
12016 \begin_inset Quotes erd
12020 \begin_inset Quotes eld
12024 \begin_inset Quotes erd
12028 \begin_inset Quotes eld
12032 \begin_inset Quotes erd
12036 \begin_inset Quotes eld
12040 \begin_inset Quotes erd
12044 \begin_inset Quotes eld
12048 \begin_inset Quotes erd
12052 \begin_inset Quotes eld
12056 \begin_inset Quotes erd
12060 \begin_inset Quotes eld
12064 \begin_inset Quotes erd
12068 \begin_inset Quotes eld
12072 \begin_inset Quotes erd
12076 \begin_inset Quotes eld
12080 \begin_inset Quotes erd
12084 \begin_inset Quotes eld
12088 \begin_inset Quotes erd
12092 \begin_inset Quotes eld
12096 \begin_inset Quotes erd
12100 Their use is more or less obvious.
12101 LyX supports all these environments; it will use the proper label, text
12102 style, and numbering scheme for each of them.
12105 \begin_layout Enumerate
12106 Both packages use basic citations; the natbib package should not be used.
12107 In LyX, citation references are shown as usual; in the output, citations
12108 are shown as superscripts.
12109 If you want to use a citation as normal text, you should use the
12114 \begin_inset space \thinspace{}
12118 \begin_inset space \space{}
12122 \begin_inset Quotes eld
12126 \begin_inset space \space{}
12136 \begin_inset Quotes erd
12142 \begin_layout Enumerate
12144 \begin_inset Quotes eld
12148 \begin_inset Quotes erd
12151 section in both packages.
12152 To put acknowledgments, just use the
12153 \begin_inset Quotes eld
12157 \begin_inset Quotes erd
12163 \begin_layout Enumerate
12164 Appendices may be added to the paper,
12168 the Acknowledgments and
12173 LyX provides a special environment, called
12174 \begin_inset Quotes eld
12178 \begin_inset Quotes erd
12181 which marks the beginning of the appendices.
12182 This environment should be left blank; it just sends a LaTeX command, but
12183 nothing is really printed.
12185 \begin_inset Quotes eld
12189 \begin_inset Quotes erd
12192 is printed with blue letters, as a signal that all sections after that
12193 point are appendices.
12194 To write an appendix, use the
12195 \begin_inset Quotes eld
12199 \begin_inset Quotes erd
12203 LyX will number each appendix with capital letters, as required by both
12206 \begin_inset Quotes eld
12210 \begin_inset Quotes erd
12217 be present before the first appendix; if not, all appendices will be numbered
12218 as normal sections in the output.
12221 \begin_layout Enumerate
12222 The ijmpc and the ijmpd packages use the
12226 command to implement table captions.
12227 As a result, a table created by LyX is printed correctly, but its caption
12229 However, you can use some TeX code to overcome this problem, so that captions
12230 are printed as expected.
12231 To do so, create a float table as usual, remove the caption, and replace
12232 it with the TeX code
12242 (sic); you must also the TeX code
12246 immediately after the tabular material.
12247 Study the example table included in the template files to see how this
12248 trick is implemented.
12249 Alternatively, If you need table captions, you should implement the whole
12254 file, then include this file to the LyX document (
12256 Insert\SpecialChar \menuseparator
12257 File\SpecialChar \menuseparator
12259 \begin_inset space ~
12265 Details on how to create a table float can be found in the files
12273 , included in the corresponding packages.
12276 \begin_layout Subsection
12277 Preparing a paper for submission
12280 \begin_layout Standard
12281 Before you submit your paper you must export the LyX document as a LaTeX
12284 File\SpecialChar \menuseparator
12285 Export\SpecialChar \menuseparator
12292 \begin_layout Plain Layout
12293 Actually you have the choice between LaTeX (plain) and pdflatex.
12294 If you intend to use pdflatex to prepare the paper, you should use the
12295 pdflatex option so that included graphics are converted to PDF format,
12296 ready for use by pdflatex.
12301 , then make the following changes to the resulting
12308 \begin_layout Enumerate
12309 Remove the comment lines before the
12318 \begin_layout Enumerate
12319 Remove everything between (and including) the
12331 commands, except for any commands you specifically put into the LaTeX preamble.
12334 \begin_layout Standard
12339 file should be saved and processed through LaTeX as many times as necessary.
12340 You may also want to check the resulting
12347 \begin_layout Subsection
12351 \begin_layout Standard
12352 The use of TeX code is reduced to two commands, which must be placed at
12353 the top of the document.
12354 If you started writing your paper by using the
12362 template, the TeX code needed is already in its place; you usually don't
12364 You may only modify the first TeX code to specify the information printed
12365 to the top of odd and even pages (authors' names and short paper's title,
12367 This TeX code must have the form
12371 markboth{Authors' Names}{Short Paper's Title}
12376 \begin_layout Section
12380 \begin_layout Standard
12386 \begin_layout Subsection
12390 \begin_layout Standard
12391 The iopart package provides a document class to create electronic manuscript
12392 submission to the journals published by the Institute of Physics.
12393 Instructions for the authors how to create a paper using the iopart class
12394 can be downloaded together with the iopart package from the site
12395 \begin_inset Flex URL
12398 \begin_layout Plain Layout
12400 ftp://ftp.iop.org/pub/journals/latex2e
12408 \begin_layout Subsection
12412 \begin_layout Standard
12413 The easiest way to write a paper is to start with the file
12417 that is available in LyX's examples files folder.
12418 Open this file, save it under a new name, and start writing.
12419 The example file explains how to use the special text environments.
12420 Here are the most important advices:
12423 \begin_layout Itemize
12424 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12427 Use AMS math package
12429 in the document settings under
12436 \begin_layout Itemize
12439 The title environment defines the kind of your paper.
12440 So use one of the following environments for the title:
12444 \begin_layout Itemize
12453 \begin_layout Itemize
12462 \begin_layout Itemize
12468 for a Topical review
12471 \begin_layout Itemize
12480 \begin_layout Itemize
12489 \begin_layout Itemize
12495 for a Paper (same as Title)
12498 \begin_layout Itemize
12504 for a Preliminary communication
12507 \begin_layout Itemize
12513 for a Rapid communication
12516 \begin_layout Itemize
12522 for a Letter to the editor
12526 \begin_layout Itemize
12529 All title environments except of
12533 can have an optional short title.
12536 \begin_layout Itemize
12537 There is a general title environment
12541 which is not directly supported by the LyX.
12542 This can be used as TeX code when your document doesn't fit into one of
12543 the other title types.
12546 \begin_layout Standard
12547 For more informations like hints for special table and formula formatting,
12548 look at the IOP author guidelines.
12551 \begin_layout Section
12555 \begin_layout Standard
12558 Panayotis Papasotiriou
12561 \begin_layout Subsection
12565 \begin_layout Standard
12566 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12567 that facilitates electronic manuscript submission to the journals they
12569 Most known of them (at least in my domain of interest) are
12571 Astrophysics and Space Science
12577 , but there are many others (see a complete list at
12578 \begin_inset Flex URL
12581 \begin_layout Plain Layout
12583 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12589 The Kluwer package may be downloaded from the site
12590 \begin_inset Flex URL
12593 \begin_layout Plain Layout
12595 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12601 A complete user guide is contained in that package (but it can also be
12602 downloaded separately).
12605 \begin_layout Standard
12606 LyX supports many features of the package but not everything.
12607 However, the TeX code needed is reduced to some
12608 \begin_inset Quotes eld
12612 \begin_inset Quotes erd
12615 commands of the package (see
12616 \begin_inset space ~
12620 \begin_inset CommandInset ref
12622 reference "subsec:kluwer_peculiarities"
12627 I have recently used LyX to write an article submitted to the
12629 Astrophysics and Space Science
12631 without any problem.
12634 \begin_layout Subsection
12638 \begin_layout Standard
12639 The easiest way to write a paper is to start with the Kluwer template file.
12642 File\SpecialChar \menuseparator
12654 This will give an (almost) empty document that includes the most common
12655 fields found in a manuscript and a short description of their use.
12656 As in most templates, simply overwrite the existing text (including the
12661 ) with the correct information.
12664 \begin_layout Subsection
12665 Preparing a paper for submission
12668 \begin_layout Standard
12669 As in the AASTeX package, before you submit your paper to a journal you
12671 \begin_inset Quotes eld
12675 \begin_inset Quotes erd
12681 \begin_layout Enumerate
12682 Export your paper as a LaTeX file.
12683 To do this, click on
12685 File\SpecialChar \menuseparator
12686 Export\SpecialChar \menuseparator
12693 \begin_layout Enumerate
12698 file with a text editor and make the following changes
12702 \begin_layout Enumerate
12703 remove the comment lines before the
12712 \begin_layout Enumerate
12713 remove everything between (and including) the
12725 commands, except for any commands you specifically put into the LaTeX preamble.
12728 \begin_layout Standard
12737 \begin_layout Enumerate
12742 file through LaTeX as many times as necessary (usually up to three).
12745 \begin_layout Enumerate
12751 \begin_inset space \thinspace{}
12755 \begin_inset space \space{}
12762 , and check if everything is OK (it should, if you didn't make any mistake).
12765 \begin_layout Subsection
12766 \begin_inset Quotes eld
12770 \begin_inset Quotes erd
12773 of the Kluwer package
12774 \begin_inset CommandInset label
12776 name "subsec:kluwer_peculiarities"
12783 \begin_layout Standard
12784 The Kluwer package has the following
12785 \begin_inset Quotes eld
12789 \begin_inset Quotes erd
12795 \begin_layout Enumerate
12796 It is possible to write multiple articles in the same LaTeX file
12800 \begin_layout Plain Layout
12801 I can't imagine any good reason to do this.
12807 Each article must be included in the environment
12808 \begin_inset Quotes eld
12812 \begin_inset Quotes erd
12816 Unfortunately, this environment cannot be omitted, even if you write just
12818 Therefore, each article starts with the command
12824 and, obviously, ends with the command
12831 Although this can be implemented in LyX, I didn't included it, since it
12832 looks ugly and can confuse the novice user.
12833 Therefore, you need to enter them directly and mark them as LaTeX code
12835 \begin_inset Quotes eld
12839 \begin_inset Quotes erd
12845 \begin_layout Enumerate
12846 Information given at the beginning of the article (i.
12847 \begin_inset space \thinspace{}
12851 \begin_inset space \space{}
12854 title, subtitle, author, institution, running title, running author, abstract
12855 and keywords) must be included in an environment called
12856 \begin_inset Quotes eld
12860 \begin_inset Quotes erd
12864 This is not implemented in LyX, so you must enter title, subtitle etc.
12865 \begin_inset space ~
12868 between two TeX code lines (
12883 \begin_layout Enumerate
12884 According to the user manual, the label of each bibliography item must be
12908 \begin_layout Standard
12913 template takes care of all these
12914 \begin_inset Quotes eld
12918 \begin_inset Quotes erd
12922 If you start a new paper using this template you don't need to do anything
12927 \begin_layout Enumerate
12928 don't delete the TeX code included in the template, and
12931 \begin_layout Enumerate
12932 copy the example bibliography item included in the template and modify it
12933 as necessary to enter new bibliography items.
12936 \begin_layout Section
12940 \begin_layout Standard
12946 \begin_layout Subsection
12950 \begin_layout Standard
12951 The LyX document classes
12953 article (koma-script)
12957 report (koma-script)
12975 correspond to the LaTeX document classes
12992 \begin_inset space ~
12995 of the Koma-Script family.
12996 They are replacements for the standard document classes
13012 , resp., and fit better to European typography conventions in a number of
13016 \begin_layout Itemize
13017 Standard character size is 11pt in
13019 article (koma-script)
13023 report (koma-script)
13031 letter (koma-script)
13036 \begin_layout Itemize
13037 Headings, labels of the description environment, and a number of elements
13040 letter (koma-script)
13042 document class are set in a bold sans serif font.
13046 \begin_layout Plain Layout
13047 There is a big difference between the bold sans serif old cm fonts and new
13048 ec fonts, especially in the appearance of headings.
13049 In comparison, the ec bold sans serif fonts look a bit thin.
13050 Here the LaTeX package
13058 helps to produce the
13059 \begin_inset Quotes eld
13063 \begin_inset Quotes erd
13066 appearance when using the ec fonts.
13071 The numbering of chapter headings is made in the same way as the numbering
13072 of section headings, that is without the extra line
13073 \begin_inset Quotes eld
13076 Chapter\SpecialChar \ldots{}
13078 \begin_inset Quotes erd
13082 In addition, the appearance of the headings can be modified by using a
13083 number of options (in LyX to be entered in the field
13086 \begin_inset space ~
13093 Layout\SpecialChar \menuseparator
13100 \begin_layout Itemize
13101 The main means in the Koma-Script document classes to design the type area
13110 (in LyX to be entered in the extra class options field in the dialog
13112 Document\SpecialChar \menuseparator
13116 They make a clearer modification of page margins possible as do the options
13119 Document\SpecialChar \menuseparator
13126 \begin_layout Itemize
13127 The LaTeX document classes of the Koma-Script family define a number of
13128 additional commands.
13129 Those part of it which makes sense in LyX is implemented in corresponding
13133 \begin_layout Standard
13134 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13135 can be found in the Koma-Script documentation
13146 \begin_layout Subsection
13147 article (koma-script), report (koma-script), and book (koma-script)
13150 \begin_layout Standard
13151 The document classes
13153 article (koma-script)
13157 report (koma-script)
13167 are implemented in the layout files
13180 They contain all the paragraph types of the corresponding standard document
13193 , resp., partly modified, with the exception of the LyX specific
13197 -type, which is replaced by the new
13201 -type having the same functionality.
13206 -Type there is a number of new paragraph types added.
13213 letter (koma-script)
13218 \begin_layout Itemize
13227 : are equivalents to
13235 , resp., additionally inserting an entry in the table of contents.
13244 are not contained in
13246 article (koma-script)
13251 \begin_layout Itemize
13260 : behave exactly as
13268 , resp., additionally clearing running heads.
13273 is not contained in
13275 article (koma-script)
13281 \begin_layout Plain Layout
13294 report (koma-script)
13296 , but since this is identical to
13300 , is has not been implemented in LyX.
13308 \begin_layout Itemize
13313 : generates a heading directly above the following paragraph in the standard
13314 character size without affecting the structure of the document.
13317 \begin_layout Itemize
13326 are special captions which respect the different space settings needed
13327 for captions placed above or below an element (if you follow strict typographic
13328 rules, you might want to place table captions always above the table).
13329 You can also use the class option
13333 , which will switch
13346 You need at least Koma-Script version 2.8q to use this.
13349 \begin_layout Itemize
13354 : can be used to set a bonmot, e.
13355 \begin_inset space \thinspace{}
13359 \begin_inset space \space{}
13362 at the beginning of a chapter.
13363 If you use the optional argument (
13365 Insert\SpecialChar \menuseparator
13367 \begin_inset space ~
13372 ), you can insert the dictum's author there.
13373 Dictum and author are separated by a line.
13374 You need at least Koma-Script version 2.8q to use this.
13379 is not contained in
13381 article (koma-script)
13386 \begin_layout Standard
13387 The following types, together with the standard types
13399 , form the title area of the document.
13400 They must be entered ahead of the first
13401 \begin_inset Quotes eld
13405 \begin_inset Quotes erd
13412 \begin_layout Plain Layout
13413 The corresponding LaTeX commands must appear before the
13424 When such a type is used more than once, the latter usage overwrites the
13425 former one, that means, for every type only the latest usage is valid.
13426 The order of the different types however has, like
13438 , no effect on the appearance of the produced document.
13441 \begin_layout Itemize
13446 : produces a centered paragraph above the ordinary title (
13458 ) for the subject of the document.
13461 \begin_layout Itemize
13466 : produces a centered paragraph below the ordinary title (
13478 ) for the publishers' name.
13481 \begin_layout Itemize
13488 report (koma-script)
13494 produces a centered paragraph on its own page behind the title page, or
13497 article (koma-script)
13499 produces a centered paragraph below the ordinary title (
13515 ) for a dedication.
13518 \begin_layout Itemize
13523 : produces a left aligned paragraph above the ordinary title (
13539 ) for a document`s head.
13542 \begin_layout Itemize
13547 : produces in a double-sided print in
13549 report (koma-script)
13555 a left-aligned paragraph at the top of the title page`s back or has no
13556 effect in a single-sided print or in
13558 article (koma-script)
13563 \begin_layout Itemize
13568 : produces in a double-sided print in
13570 report (koma-script)
13576 a left-aligned paragraph at the bottom of the title page`s back or has
13577 no effect in a single-sided print or in
13579 article (koma-script)
13584 \begin_layout Itemize
13589 : produces a special
13590 \begin_inset Quotes eld
13594 \begin_inset Quotes erd
13597 page ahead of the actual document containing a paragraph without special
13601 \begin_layout Standard
13602 The layout files for the document classes
13604 article (koma-script)
13608 report (koma-script)
13614 do include the file
13619 This is thought of as a place to define your own types.
13624 in your personal layout directory and edit the file!
13627 \begin_layout Subsection
13628 letter (koma-script)
13631 \begin_layout Standard
13635 letter (koma-script)
13637 is implemented in the layout file
13642 It contains all the paragraph types of the corresponding standard document
13647 , partly modified, with the exception of the LyX specific types
13659 type, which is replaced by the new
13664 In addition, it contains, in contrast to the standard document class, the
13682 Furthermore, there are a number of new letter specific types.
13685 \begin_layout Standard
13686 The appearance of the letter produced by this document class can be controlled
13687 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13691 \begin_layout Plain Layout
13692 For example, the standard appearance of the letter`s heading, consisting
13693 of name and address, is quite self-willed.
13695 \begin_inset Quotes eld
13699 \begin_inset Quotes erd
13702 heading is produced by the following LaTeX commands in the preamble:
13705 \begin_layout LyX-Code
13715 \begin_layout LyX-Code
13731 \begin_layout LyX-Code
13741 \begin_layout LyX-Code
13761 A detailed German description of such LaTeX commands can be found in the
13762 Koma-Script documentation
13767 With it, the letter's author can produce his personal letter layout.
13770 \begin_layout Standard
13779 define the beginning of the letter and must be used in every letter.
13780 To emphasize them in the LyX document class, they are marked with the letter
13790 \begin_inset space ~
13793 in the left margin.
13794 It is possible to write any number of letters in one file.
13799 type produces a new letter using the same addressee and a
13803 type produces a new addressee.
13820 are ordinary paragraph types and can also be used several times in one
13821 and the same letter.
13824 \begin_layout Itemize
13829 : produces a paragraph for the addressee and implicitly defines the beginning
13833 \begin_layout Itemize
13838 : produces a paragraph for the form of address and implicitly produces a
13842 \begin_layout Itemize
13847 : produces a paragraph for a close.
13850 \begin_layout Itemize
13855 : produces a paragraph for a postscript.
13858 \begin_layout Itemize
13863 : produces a paragraph for a distribution list.
13866 \begin_layout Itemize
13871 : produces a paragraph for enclosures.
13874 \begin_layout Standard
13915 are input types provided with a label to enter information, which will
13916 be processed by the document class.
13920 \begin_layout Plain Layout
13921 It could be seen as a matter of inconsequence, that the types
13929 described above are not such input types as well.
13930 Because of the special meaning of those types, however, I have implemented
13931 them as ordinary paragraph types with a one letter mark in the left margin.
13932 Moreover, it would affect my feeling of symmetry, if the
13940 type had such a serious different appearance.
13945 The types must be used ahead of the corresponding
13952 \begin_layout Standard
13953 An implementation of these types in a WYSIWYG fashion does not seem to make
13954 sense, because the real appearance of the produced letter does not only
13955 depend on the usage of the particular type, but also on other factors.
13956 For example, a signature entered in the
13960 type will in the standard behavior appear in the produced letter only,
13961 when in the same letter also a
13966 The entered value of the
13970 type will in the standard behavior not appear in the produced letter at
13972 The possibility to design the letter`s heading freely is already indicated
13973 in a footnote above.
13976 \begin_layout Standard
13977 The input types can also be used as empty paragraphs.
13978 This makes sense e.
13979 \begin_inset space \thinspace{}
13983 \begin_inset space \space{}
13995 type is not used at all, in the standard behavior the value of the
13999 type is used as signature, whereas if an empty
14003 type is used, no signature value is defined.
14006 \begin_layout Standard
14007 By using the input types it is possible to write a letter template, containing
14008 filled input types with your personal dates (name, address, etc.) and empty
14009 input types for other dates you want to enter.
14012 \begin_layout Itemize
14017 : sender's name, in the standard behavior appears as a centered paragraph
14018 in small caps in the letter`s heading.
14021 \begin_layout Itemize
14026 : sender's signature, in the standard behavior appears below the
14035 type is used, the value of the
14039 type appears instead.
14042 \begin_layout Itemize
14047 : sender's address, in the standard behavior appears in a centered paragraph
14048 in the letter`s heading below the sender's name.
14051 \begin_layout Itemize
14056 : sender's telephone number, in the standard behavior only sets the LaTeX
14066 \begin_layout Itemize
14071 : place of the letter`s making.
14074 \begin_layout Itemize
14079 : date of the letter`s making.
14088 , in the standard behavior, produce the place and the date in a right-aligned
14089 line below the addressee's field.
14094 type is used, neither place nor date appear, independent of the value of
14104 type is used, the date of the letter `s production is used.
14107 \begin_layout Itemize
14112 : sender`s back address, in the standard behavior appears above the addressee's
14113 field in a small sans serif font.
14116 \begin_layout Itemize
14121 : special mail information, in the standard behavior appears underlined
14122 above the addressee's field below the back address.
14125 \begin_layout Itemize
14130 : additional information, in the standard behavior appears on right side
14131 below the addressee`s field.
14134 \begin_layout Itemize
14139 : the letter's title, in the standard behavior appears in a big, bold, sans
14140 serif font above the subject.
14143 \begin_layout Itemize
14148 : the letter's subject, in the standard behavior appears in a bold font
14156 \begin_layout Standard
14177 produce a business letter like line above the
14181 line containing the fields
14182 \begin_inset Quotes eld
14186 \begin_inset Quotes erd
14190 \begin_inset Quotes eld
14194 \begin_inset Quotes erd
14198 \begin_inset Quotes eld
14202 \begin_inset Quotes erd
14206 \begin_inset Quotes eld
14210 \begin_inset Quotes erd
14214 \begin_inset Quotes eld
14218 \begin_inset Quotes erd
14222 \begin_inset Quotes eld
14226 \begin_inset Quotes erd
14230 For the date field, the value of the
14236 \begin_inset Quotes eld
14239 business letter types
14240 \begin_inset Quotes erd
14243 is used, the value of the
14247 type however does not appear, but only the LaTeX variable
14254 The ordinary output of place and date in a right-aligned line below the
14255 addressee`s field is suppressed.
14256 The types are implemented as input types provided with a label and must
14257 be used ahead of the corresponding
14264 \begin_layout Itemize
14272 \begin_layout Itemize
14280 \begin_layout Itemize
14288 \begin_layout Itemize
14296 \begin_layout Itemize
14304 \begin_layout Subsection
14305 The new letter class: letter (koma-script v.2)
14308 \begin_layout Standard
14314 \begin_layout Standard
14315 \begin_inset VSpace medskip
14321 \begin_layout Standard
14323 Koma-Script version 2.8 has introduced a new letter class
14327 which supersedes the now unsupported
14332 It has — on the LaTeX side — a completely new interface and is not compatible
14333 with the old class.
14334 Therefore, LyX supports both, though it is recommended you use the new
14338 \begin_layout Standard
14339 This class covers the same functionality as
14341 letter (koma-script),
14344 The basic items are
14348 (receiver's address, same as
14352 in the old layout),
14365 will start a new letter (i.
14366 \begin_inset space \thinspace{}
14370 \begin_inset space \space{}
14373 you can write several letters per document).
14374 New elements are sender's
14390 and the possibility to use a
14396 Insert\SpecialChar \menuseparator
14402 \begin_layout Standard
14403 The biggest improvement is, though, that the letter's layout is configurable
14404 to meet almost any needs.
14405 This can be done via the preamble or with a special style file (Letter
14406 Class Option, extension
14410 ), that will be read in as a class option.
14414 \begin_layout Plain Layout
14415 The KOMA package comes with some default
14420 There is, for instance, a
14424 file that follows german typesetting rules, or a
14428 that provides the default layout of the old
14433 The latter can be loaded with the class option
14442 ayout\SpecialChar \menuseparator
14447 ocument\SpecialChar \menuseparator
14459 template that is included in LyX for examples.
14460 A detailed description is to be found in the Koma-Script documentation
14468 \begin_layout Subsection
14472 \begin_layout Standard
14473 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14477 \begin_layout Itemize
14478 The chapter number of a
14482 type appears on a line of its own above the chapter heading instead of
14483 appearing in the same line ahead of it.
14484 The cause for that is the LyX internal behavior for the labeltype
14488 in the layout file.
14491 \begin_layout Itemize
14492 The headings of the types
14500 are only put in the
14501 \begin_inset Quotes eld
14505 \begin_inset Quotes erd
14508 LaTeX table of contents, but not in the LyX table of contents (
14510 Document\SpecialChar \menuseparator
14512 \begin_inset space ~
14516 \begin_inset space ~
14524 \begin_layout Itemize
14525 The paragraphs in a
14529 document class appear in a skip separation mode, not indented.
14530 This is the standard behavior, no special LaTeX commands are needed for
14534 Document\SpecialChar \menuseparator
14537 dialog the corresponding radio button indicates
14546 value always has the effect that extra LaTeX commands are inserted in the
14547 document to produce the gap, which is not what is wanted in this case.
14550 \begin_layout Section
14554 \begin_layout Standard
14560 \begin_layout Subsection
14564 \begin_layout Standard
14565 Memoir is a very powerful and constantly evolving class.
14566 It has been designed with regard to fictional and non-fictional literature.
14567 Its aim is to let the user have maximum control over the typesetting of
14569 Memoir is based on the standard book class, but it can also emulate the
14570 article class (see below).
14573 \begin_layout Standard
14574 Peter Wilson, the developer of Memoir, is known as the author of lots of
14575 useful packages in the LaTeX world.
14576 Most of them have been merged with Memoir.
14577 Therefore, it is much easier to layout the table of contents, appendices,
14578 chapter designs and such.
14579 LyX, though, does not support all of these goodies natively.
14580 Some of them might be added to forthcoming releases
14584 \begin_layout Plain Layout
14585 You are invited to send suggestions to
14586 \begin_inset Flex URL
14589 \begin_layout Plain Layout
14591 lyx-devel@lists.lyx.org
14601 , lots will probably never be supported, due to the limitations of LyX's
14603 Of course you can still use all features with the help of some native LaTeX
14608 \begin_layout Plain Layout
14613 \begin_layout Plain Layout
14623 \begin_inset space ~
14627 \begin_inset CommandInset ref
14629 reference "sec:Inserting-TeX-Code"
14639 In this section, we can only list those features that are natively supported
14641 For detailed descriptions (and for the rest of features) we recommend you
14642 have a look at the detailed manual of the Memoir class
14646 \begin_layout Plain Layout
14651 \begin_layout Plain Layout
14661 \begin_inset Flex URL
14664 \begin_layout Plain Layout
14666 CTAN:/macros/latex/memoir/memman.pdf
14676 , which is not only a user guide for the class, but also both a comprehensive
14677 description on good typesetting and a superb example for good typesetting
14681 \begin_layout Subsection
14682 Basic features and restrictions
14685 \begin_layout Standard
14686 Memoir supports basically all features of the standard book classes.
14687 There are, however, some differences, as follows:
14690 \begin_layout Description
14692 \begin_inset space ~
14695 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14698 \begin_layout Description
14700 \begin_inset space ~
14703 style: The fancy page style is not supported, due to a command clash between
14704 Memoir and the fancyhdr package (they both define a command with the same
14705 name, which confuses LaTeX).
14706 Instead, Memoir comes with a number of its own page styles (see
14708 Layout\SpecialChar \menuseparator
14709 Document\SpecialChar \menuseparator
14711 \begin_inset space ~
14717 If you want to use these for the chapter pages, you have to use the command
14724 in the main text or in preamble (e.
14725 \begin_inset space \thinspace{}
14729 \begin_inset space \space{}
14736 chapterstyle{companion}
14741 \begin_layout Description
14742 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14743 optional argument in the standard classes.
14744 With this, you can specify an alternative version of the title for the
14745 table of contents and the headers (for instance, if the title is too long).
14746 In LyX, you can do this via
14748 Insert\SpecialChar \menuseparator
14750 \begin_inset space ~
14755 at the beginning of a chapter/section.
14756 Memoir features a second optional argument and thus separates the table
14757 of contents from the header.
14758 You can define three variants of a title with this: one for the main text,
14759 one for the table of contents, and one for the headers.
14760 Simply insert two optional arguments if you need this feature, the first
14761 one containing the short title for the Table of Contents, the second one
14762 containing an alternative short title for the headers.
14765 \begin_layout Description
14766 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14767 of contents, the list of figures and the list of table start a new page
14769 Memoir does not follow this route.
14770 You have to insert a page break yourself, if you want to have one.
14773 \begin_layout Description
14774 Titlepage: For some unknown reason, Memoir uses pagination on the title
14775 page (in the standard classes, title pages are
14776 \begin_inset Quotes eld
14780 \begin_inset Quotes erd
14784 If you want an empty title page, type
14788 aliaspagestyle{title}{empty}
14793 \begin_layout Description
14794 Article: With the class option
14800 Layout\SpecialChar \menuseparator
14801 Document\SpecialChar \menuseparator
14803 \begin_inset space ~
14808 ), you can emulate article style.
14809 That is, counters (footnotes, figures, tables etc.) will not be reset on
14810 new chapters, chapters don't start a new page (but are—in contrary to
14811 \begin_inset Quotes eld
14815 \begin_inset Quotes erd
14818 article classes—still allowed), parts, though, use their own page, as in
14822 \begin_layout Description
14823 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14824 font commands, which have been used in the old LaTeX version 2.09 (e.
14825 \begin_inset space \thinspace{}
14829 \begin_inset space \space{}
14845 It produces an error and stops LaTeX whenever such a command appears.
14850 reallows the commands and spits out warnings instead (which does at least
14852 Since a lot of packages and particularly BibTeX style files are still using
14853 those commands, we have decided to use this option by default.
14856 \begin_layout Subsection
14860 \begin_layout Standard
14861 We will only describe the features supported by LyX (which is not much currently
14863 Please consult the Memoir manual
14867 \begin_layout Plain Layout
14872 \begin_layout Plain Layout
14882 \begin_inset Flex URL
14885 \begin_layout Plain Layout
14887 CTAN:/macros/latex/memoir/memman.pdf
14900 \begin_layout Description
14901 Abstract: You may wonder why an abstract is an extra feature.
14902 Well, it is in book class.
14903 Usually books don't have abstracts.
14904 Memoir, however, has.
14905 You can use it wherever and how often you like.
14908 \begin_layout Description
14909 Chapterprecis: You may know this older typesetting style: The contents of
14910 a chapter are summarized below the title and also in the table of contents
14912 \begin_inset space \thinspace{}
14916 \begin_inset space \space{}
14921 Our hero arrives in Troia; he loses some friends; he finds others
14924 Chapterprecis does exactly this.
14925 It is therefore only sensible below a chapter.
14928 \begin_layout Description
14929 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14930 The epigraph environment provides an elegant way of typesetting such a
14932 The motto itself (text) and its author (source) are divided by a short
14934 Unfortunately, we have to fool LyX a bit here again, since the environment
14935 needs two arguments (text and source).
14936 In this case, we have to use curly brackets (in TeX mode) between the two
14947 <author of the slogan>.
14950 \begin_layout Description
14951 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14952 complex figurative poems).
14953 LyX can only support a few of them.
14954 One is poemtitle, which is a centered title for poems, which will also
14955 be added to the table of contents (verse is the standard environment for
14957 Memoir has some enhanced versions of verse, but you need to use TeX code,
14958 because they have to be nested inside regular verse environments, which
14959 is not possible with LyX).
14962 \begin_layout Description
14963 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14966 \begin_layout Section
14967 Article (mwart), book (mwbk) and report (mwrep)
14968 \begin_inset Argument status
14971 \begin_layout Plain Layout
14984 \begin_layout Standard
14990 \begin_layout Standard
14991 The LyX document classes
15007 correspond to the LaTeX document classes
15020 They are replacements for the standard document classes
15032 , resp., and fit better to Polish typography conventions in a number of points.
15036 \begin_layout Standard
15040 \begin_layout Itemize
15041 Unnumbered titles (with star, e.
15042 \begin_inset space \thinspace{}
15046 \begin_inset space \space{}
15053 ) are added into table of contents,
15056 \begin_layout Itemize
15057 Additional page styles:
15061 \begin_layout Description
15062 uheadings header with separated lines,
15065 \begin_layout Description
15066 myheadings custom header, contents headers via commands:
15081 \begin_layout Description
15082 myuheadings custom header with separated lines,
15085 \begin_layout Description
15086 outer page number is placed on outer side of page
15090 \begin_layout Itemize
15095 \begin_layout Description
15096 rmheadings serif titles — default,
15099 \begin_layout Description
15100 sfheadings sansserif titles,
15103 \begin_layout Description
15104 authortitle on title page first placed is author next title — default,
15107 \begin_layout Description
15108 titleauthor on title page first placed is title next author,
15111 \begin_layout Description
15112 withmarginpar reserve place on page for margins.
15116 \begin_layout Section
15120 \begin_layout Standard
15125 provides an alternative to the standard
15130 It provides similar functionality, but you might prefer this layout with
15131 sans serif sections, headings, and more.
15134 \begin_layout Section
15138 \begin_layout Standard
15144 \begin_layout Standard
15145 \begin_inset VSpace bigskip
15151 \begin_layout Standard
15156 \begin_inset space ~
15161 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15162 \begin_inset Formula $\beta$
15165 release of May, 1999) class.
15168 \begin_layout Standard
15173 textclass, which works with RevTeX 3.1.
15174 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15175 That means that it doesn't interact very well with LyX, which requires
15176 LaTeX2e, although it has been kludged to work.
15177 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15181 \begin_inset space ~
15186 textclass should also be pretty easy to use.
15189 \begin_layout Standard
15190 These documents are supposed to be used in
15194 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15195 macros, and assume you'll know what to put in the preamble if necessary.
15198 \begin_layout Subsection
15202 \begin_layout Standard
15203 All you need to do is install RevTeX 4, as described in the package's README
15205 The package can be found at The RevTeX 4 Web Site
15206 \begin_inset Flex URL
15209 \begin_layout Plain Layout
15211 http://publish.aps.org/revtex4/
15217 Install it somewhere that LaTeX can see it.
15218 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15220 \begin_inset space \thinspace{}
15224 \begin_inset space \space{}
15227 not the directory where you installed the class file.) Then, if you reconfigure
15228 LyX, it will find the class file and let you use the RevTeX4 textclass.
15231 \begin_layout Standard
15232 Probably the easiest way to get started is either to import a RevTeX 4 document
15240 \begin_inset space ~
15245 template, found in the templates directory.
15248 \begin_layout Subsection
15252 \begin_layout Standard
15253 Optional arguments to
15260 \begin_inset Quotes eld
15264 \begin_inset Quotes erd
15268 \begin_inset Quotes eld
15272 \begin_inset Quotes erd
15282 \begin_inset space ~
15290 \begin_inset space ~
15296 Remember that in RevTeX, at least one optional argument is required!
15299 \begin_layout Standard
15300 Other preamble matter, like
15307 \begin_inset space ~
15313 \begin_inset space ~
15318 dialog, also as usual.
15321 \begin_layout Subsection
15325 \begin_layout Standard
15326 The layouts basically correspond to the commands in RevTeX4.0.
15327 For example, the Email layout corresponds to
15334 Note that (at least as of RevTeX 4.0 Beta), the
15342 layouts are exactly equivalent, so you shouldn't need to use both.
15346 \begin_layout Plain Layout
15347 In case you're curious, both were included so that
15351 would be able to translate both
15371 \begin_layout Subsection
15375 \begin_layout Standard
15376 There are a couple of important unique aspects of RevTeX 4 which might cause
15377 bugs that will be even more confusing in LyX.
15380 \begin_layout Standard
15398 The LyX equivalent is that there is a separate Thanks layout.
15403 write footnotes in the
15407 layout, or weird things may happen.
15408 See the RevTeX 4 documentation for more details.
15411 \begin_layout Standard
15415 \begin_inset space ~
15423 \begin_inset space ~
15432 layouts must be placed
15440 layout and the corresponding
15457 , the LaTeX won't compile.
15460 \begin_layout Subsection
15464 \begin_layout Standard
15465 The main problem with this layout is that you can't use the optional arguments
15466 to layouts like Email and Title.
15467 (The problem is not unique to this layout; you can't use optional arguments
15468 to the Section layouts either.) This means that after you export that file
15469 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15470 need to edit the LaTeX file with a text editor to add the optional arguments
15472 \begin_inset space \thinspace{}
15476 \begin_inset space \space{}
15479 the running title for the page headers.
15480 Lacking these layouts makes the
15486 (and the equivalent
15492 ) useless, so the corresponding layouts don't exist, and will have to be
15497 \begin_layout Plain Layout
15502 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15503 has not been updated yet to take advantage of it.
15511 \begin_layout Section
15512 Springer Journals (
15519 \begin_layout Standard
15525 \begin_layout Subsection
15529 \begin_layout Standard
15530 These are the layout files for some of the journal formats used by Springer
15531 Verlag and listed on
15532 \begin_inset Flex URL
15535 \begin_layout Plain Layout
15537 http://www.springer.de/author/tex/help-journals.html
15542 , where you should also go to fetch the class files (yes, these are LaTeX2e
15544 It is a modular system: the things common to all journals are implemented
15549 , which journal-specific layout files (such as, e.
15550 \begin_inset space \thinspace{}
15554 \begin_inset space \space{}
15561 for Journal of Geodesy) can include.
15564 \begin_layout Standard
15565 This means that implementing support for any other Springer journal on this
15566 list is as simple as writing your own
15574 file following the outline given in
15582 \begin_layout Standard
15583 It is reasonably well tested only for the Journal of Geodesy.
15592 come with the standard LyX distribution.
15593 Install the relevant class file (downloaded from Springer) in a proper
15594 directory, reconfigure LaTeX (in the teTeX case by running
15598 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15599 and it should work.
15602 \begin_layout Subsection
15606 \begin_layout Standard
15607 A large number of theorem-like styles —
15613 \SpecialChar \ldots{}
15619 \begin_layout Standard
15622 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15623 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15626 See the Springer class file documentation for details.
15629 \begin_layout Subsection
15633 \begin_layout Itemize
15645 \begin_layout Itemize
15648 Probability Theory and Related Fields
15654 — Jean-Marc Lasgouttes
15657 \begin_layout Standard
15658 Add your own, it isn't so hard!
15661 \begin_layout Subsection
15665 \begin_layout Standard
15666 These files are partly based on the older
15670 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15671 file from Springer.
15676 layout, are now defunct.
15677 Jean-Marc Lasgouttes helped out big in making me find my way around the
15678 LyX layout file mechanism.
15681 \begin_layout Subsection
15685 \begin_layout Standard
15687 But probably less than in the old hacked-LaTeX
15694 \begin_layout Standard
15696 \begin_inset space \thinspace{}
15699 g.: does not display the number for theorem-like layouts, just #.
15702 \begin_layout Section
15708 \begin_inset CommandInset label
15717 \begin_layout Standard
15725 \begin_layout Subsection
15729 \begin_layout Standard
15730 This section describes how to use LyX to make slides for overhead projectors.
15731 There are two document classes that can do this: the default slides class
15737 This section documents the former.
15740 \begin_layout Standard
15741 I'm going to say this again, nice and clear, so that there's no misunderstanding
15745 \begin_layout Standard
15746 \begin_inset VSpace bigskip
15752 \begin_layout Standard
15756 This section documents the class
15757 \begin_inset Quotes eld
15765 \begin_inset Quotes erd
15773 \begin_layout Standard
15774 \begin_inset VSpace bigskip
15780 \begin_layout Standard
15781 If you're looking for the documentation for
15782 \begin_inset Quotes eld
15790 \begin_inset Quotes erd
15793 , check out section
15794 \begin_inset space ~
15798 \begin_inset CommandInset ref
15800 reference "sec:foiltex"
15810 \begin_inset Quotes eld
15818 \begin_inset Quotes erd
15821 ] is actually somewhat better than the default
15829 \begin_layout Plain Layout
15830 \SpecialChar \ldots{}
15831 or so I've been told repeatedly by its advocates.
15832 Having never used it, I have no idea if this claim is true or not.
15837 which this section documents.
15840 \begin_layout Standard
15841 This class is the LaTeX2e improvement of the old
15846 Every LaTeX2e distribution includes this class [which I'll just refer to
15848 \begin_inset Quotes eld
15856 \begin_inset Quotes erd
15859 from now on], so you're bound to have it.
15860 As I noted earlier, there are other classes, such as
15864 , which also produce slides for overhead projectors and do a better job
15866 However, there are some things which
15870 can do which the others can't, such as generate overlays.
15871 Read on to learn more!
15874 \begin_layout Subsection
15876 \begin_inset CommandInset label
15878 name "sec:slidesetup"
15885 \begin_layout Standard
15886 Obviously, to use this document class, you need to select
15887 \begin_inset Quotes eld
15895 \begin_inset Quotes erd
15898 from the class list in the
15900 Document\SpecialChar \menuseparator
15904 There are some other special things you should know about this class:
15907 \begin_layout Itemize
15908 Don't bother changing the options
15913 They're not supported by the
15920 \begin_layout Itemize
15924 \begin_inset space ~
15929 behaves a bit differently for this class.
15930 The possible choices and what they do are as follows:
15934 \begin_layout Description
15939 The final output contains page numbers in the lower right corner.
15942 \begin_layout Description
15951 , but also prints out any time markers you've put in.
15952 This is the default.
15955 \begin_layout Description
15960 The final output contains no page numbers, time markers, or alignment markers.
15964 \begin_layout Itemize
15969 class has an extra option:
15975 \begin_inset Quotes eld
15983 \begin_inset Quotes erd
15986 in the extra class options.
15990 \begin_layout Standard
15991 Using this options allows you to add time markers to
15997 \begin_inset space ~
16001 \begin_inset CommandInset ref
16003 reference "sec:slideNote"
16011 \begin_layout Standard
16012 You can also use the template file
16013 \begin_inset Quotes eld
16021 \begin_inset Quotes erd
16024 to automatically set up a document to use the
16030 File\SpecialChar \menuseparator
16032 \begin_inset space ~
16036 \begin_inset space ~
16041 to open your new document].
16042 The template file also contains some examples of the special paragraph
16043 environments used by this class.
16044 I'll describe those next.
16047 \begin_layout Subsection
16048 Paragraph Environments
16051 \begin_layout Subsubsection
16052 Supported Environments
16055 \begin_layout Standard
16056 The first thing you'll notice when you start up a new
16060 document is the font size and type: it's the equivalent of the size
16061 \begin_inset Quotes eld
16069 \begin_inset Quotes erd
16075 \begin_inset space ~
16081 This is also what's used in the output.
16083 \begin_inset Quotes eld
16087 \begin_inset Quotes erd
16090 to remind you that this is a slide.
16091 Your final slides will use a larger font; ergo, you'll have less space.
16092 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16095 \begin_layout Standard
16096 The next thing that becomes obvious is the changes to the paragraph environment
16097 pull-down box [at the far-left end of the toolbar].
16098 Most of the paragraph environments you're used to seeing are missing.
16099 There are also five new ones.
16104 class itself only supports certain paragraph environments:
16107 \begin_layout Itemize
16113 \begin_layout Itemize
16119 \begin_layout Itemize
16125 \begin_layout Itemize
16131 \begin_layout Itemize
16137 \begin_layout Itemize
16143 \begin_layout Itemize
16149 \begin_layout Itemize
16155 \begin_layout Itemize
16161 \begin_layout Itemize
16167 \begin_layout Itemize
16173 \begin_layout Standard
16174 All of the other standard environments, including the section-heading environmen
16175 ts, aren't used in the
16182 \begin_layout Standard
16183 On the other hand, you'll notice the following new environments:
16186 \begin_layout Itemize
16192 \begin_layout Itemize
16198 \begin_layout Itemize
16204 \begin_layout Itemize
16210 \begin_layout Itemize
16216 \begin_layout Standard
16217 These five are kind of quirky, due to a
16218 \begin_inset Quotes eld
16222 \begin_inset Quotes erd
16226 You see, LyX doesn't permit you to nest any other paragraph environment
16227 into an empty environment.
16228 Now, that's fine and dandy, but it means that you wouldn't be able to start
16229 a slide with anything except plain text.
16230 To deal with this, I've performed a little
16231 \begin_inset Quotes eld
16235 \begin_inset Quotes erd
16241 \begin_layout Subsubsection
16242 Quirks of the New Environments
16243 \begin_inset CommandInset label
16245 name "sec:slideQuirk"
16252 \begin_layout Standard
16253 All five of the new paragraph environments are somewhat quirky due to inherent
16254 limitiations in the current version of LyX.
16255 As I just mentioned, LyX forbids environments that begin with another environme
16257 To get around this, the
16261 environment isn't a paragraph environment as described in the
16269 \begin_layout Standard
16270 You should consider
16283 \begin_inset Quotes eld
16286 pseudo-environments.
16287 \begin_inset Quotes erd
16290 They look like a section heading or a
16291 \begin_inset Quotes eld
16299 \begin_inset Quotes erd
16302 but really begin a [and, if necessary, end the previous] paragraph environment.
16312 \begin_inset Quotes eld
16316 \begin_inset Quotes erd
16319 These two perform some action.
16322 \begin_layout Standard
16323 A common feature of all five environments,
16343 , is a rather long-ish label.
16344 The text following this label — ordinarily the contents of the paragraph
16345 environment — is utterly irrelevant for
16366 LyX completely ignores it.
16367 In fact, you can leave these five environments completely empty.
16371 \begin_layout Standard
16376 to put any text after the rather long-ish label, you might want to.
16377 This could be a short description of the contents of the
16382 In that case, enter your descriptive comment and hit
16386 as you normally would.
16389 \begin_layout Standard
16390 If, on the other hand, you don't want to enter any descriptive text, you'll
16391 hit another LyX quirk.
16392 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16393 environment until you put something in the old one.
16397 \begin_layout Itemize
16398 Start entering the text that will
16426 \begin_layout Itemize
16427 Now move to the beginning of that paragraph.
16431 \begin_layout Itemize
16440 \begin_layout Itemize
16441 Finally, change this new, empty paragraph to a
16465 \begin_layout Standard
16466 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16470 \begin_layout Subsection
16471 Making a Presentation with
16484 \begin_layout Subsubsection
16492 \begin_layout Standard
16493 If you're expecting this section to teach you how to actually make a presentatio
16494 n, you'll be sorely disappointed.
16495 Naturally, I'll describe all of the ways the
16499 class can assist you in preparing the materials for a presentation.
16500 Filling in the contents, however, is up to you.
16505 the LyX philosophy.]
16508 \begin_layout Standard
16513 environment [in the manner described in section
16514 \begin_inset space ~
16518 \begin_inset CommandInset ref
16520 reference "sec:slideQuirk"
16524 ] tells LyX to begin a new slide [duh].
16525 The label for this environment/
16526 \begin_inset Quotes erd
16530 \begin_inset Quotes erd
16534 \begin_inset Quotes eld
16538 \begin_inset Quotes erd
16541 in cool blue, followed by the label,
16542 \begin_inset Quotes eld
16546 \begin_inset Quotes erd
16550 Any text or paragraph environments that follow this one go on the new slide.
16554 \begin_layout Standard
16555 Slides are probably the only time you'll need to forcibly end pages in LyX
16556 (this can be specified in the
16561 In fact, you'll want to, once you finish entering the contents of one slide.
16562 If you've entered more text than can physically fit on a slide, the extra
16563 overflows onto a new slide.
16564 I don't recommend doing this, however, since the overflow slide won't have
16565 any page number on it.
16566 Furthermore, it may interfere with any
16570 you've made to accompany the oversized
16577 \begin_layout Standard
16586 environments work the same way as the
16591 They both create an
16592 \begin_inset Quotes eld
16596 \begin_inset Quotes erd
16599 followed by a label [
16600 \begin_inset Quotes eld
16604 \begin_inset Quotes erd
16608 \begin_inset Quotes eld
16612 \begin_inset Quotes erd
16616 The color is a stunning magenta instead of blue, and the
16617 \begin_inset Quotes eld
16621 \begin_inset Quotes erd
16624 will look different, in style and in length.
16625 The label fonts of all three also differ from one another.
16628 \begin_layout Standard
16633 , if the contents of a
16641 exceed the physical size of a slide or sheet of paper, the extra will overflow
16643 Again, you should avoid this.
16644 It defeats the whole purpose of
16655 \begin_layout Subsubsection
16665 \begin_layout Standard
16670 is a slide that sits atop another slide.
16671 Perhaps you wish to discuss a figure on the main
16675 before displaying the text associated with it.
16676 One way to accomplish this is tape a flap of dark paper over the part of
16681 you want to display later.
16682 This method fails, however, if you wish to overlap one graph with another,
16684 You would then have to fumble while speaking to align the two separate,
16689 s to align the two graphs.
16694 environment in both cases makes life much easier.
16697 \begin_layout Standard
16702 receives the page number of its
16703 \begin_inset Quotes eld
16707 \begin_inset Quotes erd
16715 \begin_inset Quotes eld
16723 \begin_inset Quotes erd
16730 \begin_layout Plain Layout
16731 Presumably, mutliple
16736 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16748 \begin_inset Quotes eld
16756 \begin_inset Quotes erd
16760 \begin_inset Quotes eld
16768 \begin_inset Quotes erd
16772 \begin_inset space ~
16775 appended to the page number of the parent
16785 Clearly, you want the contents of both the
16793 to each fit on a single physical slide! You should probably consider an
16799 \begin_inset Quotes eld
16803 \begin_inset Quotes erd
16815 class provides a visual cue for this: the label at the start of an
16819 is shorter than that at the start of a
16824 Lastly, when you generate printable output, you'll find alignment markers
16825 in all four corners of both the
16829 page and its parent
16834 These will assist you in lining up the two physical slides.
16837 \begin_layout Standard
16838 The major problem in overlaying two slides is aligning the contents of the
16839 two transparencies.
16840 How much space should you leave for that graph on the second slide? Worse
16841 still, what if you want a graph and a sentence on second slide, but there
16842 is text on the main transparency that goes in between them? You could try
16843 and insert vertical space of the right size.
16844 The better way is to use
16855 \begin_layout Standard
16856 As their names imply,
16864 are two command-like paragraph environments that make all subsequent text
16865 invisible and visible, respectively.
16867 \begin_inset space ~
16871 \begin_inset CommandInset ref
16873 reference "sec:slideQuirk"
16877 that you don't place anything
16881 these two environments, however.
16886 , it inserts a centered, sky-blue label into the page reading
16887 \begin_inset Quotes eld
16890 <Invisible Text Follows>
16891 \begin_inset Quotes erd
16895 For paragraphs following this label, the parts of the
16903 ; it doesn't matter which] where they would be contain instead blank space.
16907 \begin_layout Standard
16912 , the corresponding centered label is
16913 \begin_inset Quotes eld
16916 <Visible Text Follows>
16917 \begin_inset Quotes erd
16921 Paragraphs following this label behave normally.
16922 Note that the beginning of a new
16934 automatically shuts off an
16939 It's therefore not necessary to use
16950 \begin_layout Standard
16951 By now, it should be obvious how to create overlay transparencies using
16952 the proper combination of
16971 \begin_layout Enumerate
16976 , including everything that will appear on it, whether on the main slide
16984 \begin_layout Enumerate
16985 Before each figure or paragraph that will appear only on the
16994 If necessary, insert a
16998 environment after the
17005 \begin_layout Enumerate
17010 immediately following the
17017 \begin_layout Enumerate
17018 Copy the contents of this
17029 \begin_layout Enumerate
17034 , change all of the
17045 \begin_layout Standard
17047 You've just made an
17054 \begin_layout Standard
17055 There's one problem with the way I've designed the LyX
17059 class: you can't make text in the middle of a paragraph invisible, nor
17060 make text in the middle of an invisible paragraph visible again.
17061 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17065 \begin_layout Plain Layout
17066 The commands of interest are:
17069 \begin_layout Itemize
17074 invisible \SpecialChar \ldots{}
17078 \begin_layout Itemize
17083 visible \SpecialChar \ldots{}
17087 \begin_layout Plain Layout
17088 \SpecialChar \ldots{}
17089 and need to be marked as TeX.
17091 \begin_inset Quotes eld
17095 \begin_inset Quotes erd
17098 you wish to change goes in between the brackets [and after the
17111 If you don't know how to mark text as TeX, see the appropriate section
17124 \begin_layout Subsubsection
17134 \begin_inset CommandInset label
17136 name "sec:slideNote"
17143 \begin_layout Standard
17152 is associated with a
17153 \begin_inset Quotes eld
17157 \begin_inset Quotes erd
17169 class provides visual cues.
17174 is shorter than that of a
17178 [yet longer than that of an
17182 ] and, like the label of an
17186 is shockingly magenta.
17187 Additionally, the printed
17191 has the page number of its
17192 \begin_inset Quotes eld
17196 \begin_inset Quotes erd
17204 \begin_inset Quotes eld
17212 \begin_inset Quotes erd
17216 \begin_inset Quotes eld
17224 \begin_inset Quotes erd
17228 \begin_inset Quotes eld
17236 \begin_inset Quotes erd
17240 You can have multiple
17244 s associated with a single
17256 , you'll probably want to break up long
17260 s so that they fit on a single sheet of paper.
17263 \begin_layout Standard
17268 is obvious: it contains anything additional you might want to say about
17274 It could also be used as a sheet of reminders for a particular
17279 In the case of the latter, you might want to make use of time markers.
17285 \begin_inset Quotes eld
17289 \begin_inset Quotes erd
17292 support for time markers, a
17297 So, you'll have to resort to using the LaTeX codes.
17300 \begin_layout Standard
17301 To use time markers, you'll need to specify the extra class option
17302 \begin_inset Quotes eld
17310 \begin_inset Quotes erd
17314 \begin_inset space ~
17318 \begin_inset CommandInset ref
17320 reference "sec:slidesetup"
17325 This option turns on timing marks, which will appear in the lower-left-hand
17331 To set what appears in the time marker, you use the LaTeX commands
17332 \begin_inset Quotes eld
17342 \begin_inset Quotes erd
17346 \begin_inset Quotes eld
17356 \begin_inset Quotes erd
17360 The arguments of both commands are time measured in seconds.
17362 \begin_inset Quotes eld
17372 \begin_inset Quotes erd
17375 sets the time marker to a given time.
17377 \begin_inset Quotes eld
17387 \begin_inset Quotes erd
17390 increments the time marker by the specified amount.
17391 Using time markers and
17395 s in this fashion, you can remind yourself how much time to spend on a particula
17403 \begin_layout Standard
17404 There's one last feature to describe.
17405 Clearly, you'd like to print out all of your
17413 s on transparencies while printing all of your
17430 with which it is associated.
17431 What's a person to do?
17434 \begin_layout Standard
17435 Luckily, there are two LaTeX commands that allow you to select what to print
17437 Both must be placed into the preamble of your document.
17439 \begin_inset Quotes eld
17451 \begin_inset Quotes erd
17454 will cause the output to contain only the
17463 Correspondingly, the command
17464 \begin_inset Quotes eld
17476 \begin_inset Quotes erd
17479 prevents the output of anything but
17484 I'd advise placing both commands in the preamble and initially comment
17486 You can then preview your entire presentation as you write.
17487 When you're done writing, you can then uncomment one of the two to select
17488 what you want to print.
17489 I like to uncomment
17490 \begin_inset Quotes eld
17502 \begin_inset Quotes erd
17505 , print to a file with
17506 \begin_inset Quotes eld
17514 \begin_inset Quotes erd
17517 in its name, comment it back out, then uncomment
17518 \begin_inset Quotes eld
17530 \begin_inset Quotes erd
17534 \begin_inset Quotes eld
17542 \begin_inset Quotes erd
17546 I can then send either file to a printer, loading transparencies or plain
17547 paper as appropriate.
17550 \begin_layout Standard
17551 You can also provide other arguments to the
17552 \begin_inset Quotes eld
17562 \begin_inset Quotes erd
17566 \begin_inset Quotes eld
17576 \begin_inset Quotes erd
17580 See a good LaTeX book for details.
17583 \begin_layout Subsection
17588 Class Template File
17591 \begin_layout Standard
17592 I have also provided a template file,
17593 \begin_inset Quotes eld
17601 \begin_inset Quotes erd
17609 To use it, begin your new presentation with
17614 ile\SpecialChar \menuseparator
17616 \begin_inset space ~
17620 \begin_inset space ~
17630 Your new LyX presentation file will contain an example
17651 additionally contain an example of the use of
17660 Lastly, the preamble will contain:
17663 \begin_layout LyX-Code
17664 % Uncomment to print out only slides and overlays
17667 \begin_layout LyX-Code
17671 \begin_layout LyX-Code
17677 \begin_inset Newline newline
17683 \begin_layout LyX-Code
17684 % Uncomment to print out only notes
17687 \begin_layout LyX-Code
17691 \begin_layout LyX-Code
17699 \begin_layout Standard
17700 One final thing: I created this class to support the LaTeX2e
17701 \begin_inset Quotes eld
17709 \begin_inset Quotes erd
17712 class, one of the built-in LaTeX2e classes.
17713 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17714 built-in slide class.
17715 It's here if you want it or need it.
17716 There exist other LaTeX2e classes for creating presentations, such as the
17722 \begin_inset space ~
17726 \begin_inset CommandInset ref
17728 reference "sec:foiltex"
17733 \begin_inset Quotes eld
17741 \begin_inset Quotes erd
17744 package [present on some TeX distributions].
17745 The latter is not yet supported under LyX.
17749 \begin_layout Plain Layout
17750 Perhaps you can take on the task\SpecialChar \ldots{}
17756 I know nothing about these other classes.
17757 Try them out to see what sort of alternative they provide.
17760 \begin_layout Chapter
17761 LyX Features needing Extra Software
17764 \begin_layout Section
17768 \begin_layout Standard
17774 \begin_layout Subsection
17778 \begin_layout Standard
17787 \begin_layout Plain Layout
17792 is not yet available when you are using the LaTeX distribution MiKTeX.
17797 , you'll find in the
17804 \begin_inset space ~
17815 \begin_inset Newline newline
17819 \begin_inset CommandInset href
17821 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17828 \begin_layout Standard
17833 package is a program that was written by
17834 \begin_inset Flex Noun
17837 \begin_layout Plain Layout
17839 \begin_inset space ~
17847 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17848 and easy to forget.
17849 The program runs over your LaTeX file, checks the integrity of the file,
17850 and flags some common errors.
17851 In other technical words, it is
17858 \begin_layout Standard
17859 Well, what is a syntax checker doing in LyX which is supposed to produce
17860 correct LaTeX anyways? The answer is simple: Just as
17864 not only checks the
17868 of C programs, but also does
17872 checks for type-errors,
17876 catches some common
17880 errors, in addition to the syntactical ones.
17885 is capable of detecting several common errors, such as
17888 \begin_layout Itemize
17889 Ellipsis detection:
17890 \begin_inset Newline newline
17893 Use \SpecialChar \ldots{}
17897 \begin_layout Itemize
17898 No space in front of/after parenthesis:
17899 \begin_inset Newline newline
17905 \begin_layout Itemize
17906 Enforcement of normal space after common abbreviations:
17907 \begin_inset Newline newline
17911 \begin_inset space \thinspace{}
17915 \begin_inset space \space{}
17918 is too wide spacing.
17921 \begin_layout Itemize
17922 Enforcement of end-of-sentence space when the last sentence ends with a
17924 \begin_inset Newline newline
17928 And this is wrong spacing.
17931 \begin_layout Itemize
17932 Space in front of labels and similar commands:
17933 \begin_inset Newline newline
17936 The label should stick right up to the text to avoid falling to a wrong
17939 \begin_inset CommandInset label
17949 \begin_layout Plain Layout
17950 This footnote is in danger of falling off to a wrong page
17955 The label is separated too much.
17958 \begin_layout Itemize
17959 Space in front of references, instead of hard spaces:
17960 \begin_inset Newline newline
17963 If you have bad luck, the text will break right between the referenced text
17964 and reference number, and that's a pity.
17966 \begin_inset CommandInset ref
17968 reference "sec:chktex"
17975 \begin_layout Itemize
17977 \begin_inset Quotes eld
17981 \begin_inset Quotes erd
17985 \begin_inset Formula $\times$
17989 \begin_inset Newline newline
17992 2x2 looks cheap compared to
17993 \begin_inset Formula $2\times2$
17999 \begin_layout Standard
18000 and more \SpecialChar \ldots{}
18001 It is an invaluable tool when you are
18002 \begin_inset Quotes eld
18006 \begin_inset Quotes erd
18009 your document before printing, and you should run it right after the obligatory
18010 spelling check, and before you go fine tuning the typesetting.
18013 \begin_layout Subsection
18017 \begin_layout Standard
18018 If you have the program installed, usage is as simple as choosing
18020 Tools\SpecialChar \menuseparator
18022 \begin_inset space ~
18028 This will make LyX generate a LaTeX file of your document, start
18032 to check it, and then make LyX insert
18033 \begin_inset Quotes eld
18037 \begin_inset Quotes erd
18040 with the warnings from
18044 , if there were any.
18045 The warnings will be placed close to the point of the mistake, and you
18046 can quickly find them by using the
18048 Navigate\SpecialChar \menuseparator
18051 menu item, or the shortcut key
18060 Open the error boxes by clicking on them with the mouse, or use the shortcut
18069 bindings, or the corresponding
18078 Read the warning and correct the mistake, if it is a mistake.
18079 If you have trouble understanding what the warning is about, you can safely
18081 Remember that there is a hidden layer between the document on screen and
18082 the technical details in invoking
18086 , and this gap can make some warnings seem arcane or just plain silly.
18089 \begin_layout Standard
18090 This document is an excellent testing bed for the feature, and it should
18091 provide quite a few warnings for you to fiddle with.
18092 Since computers are only so smart, expect most of the warnings to be false
18096 \begin_layout Subsection
18097 How to fine tune it
18100 \begin_layout Standard
18101 Sometimes, you'll find that
18105 makes more noise than suits your mood.
18106 Then you can choose not to use it, wait until your mood changes, or try
18111 to get better along with you.
18114 \begin_layout Standard
18123 very configurable and extensible, you shouldn't expect to solve all problems
18129 Since LyX has to generate a somewhat special LaTeX file to be able to match
18130 the line numbers from the
18138 \begin_layout Plain Layout
18139 You can inspect the specific output from
18145 Edit\SpecialChar \menuseparator
18147 \begin_inset space ~
18151 \begin_inset space ~
18165 to the internal document structure, some of the warnings will not appear
18167 There are two things you can do about this:
18170 \begin_layout Itemize
18175 invocation command line in
18176 \begin_inset Flex MenuItem
18179 \begin_layout Plain Layout
18180 Tools\SpecialChar \menuseparator
18181 Preferences\SpecialChar \menuseparator
18182 Output\SpecialChar \menuseparator
18183 LaTeX\SpecialChar \menuseparator
18193 installation configuration file (usually with the file
18198 See below to learn what warnings can be enabled and disabled on the command
18202 \begin_layout Itemize
18203 Export your document as a raw LaTeX file using
18205 File\SpecialChar \menuseparator
18206 Export\SpecialChar \menuseparator
18214 Invoked in this way, it can be a hassle to find the corresponding place
18215 in the document inside LyX, but with a little patience, you should be able
18219 \begin_layout Standard
18220 Here follows the warning messages that can be enabled and disabled in
18229 to disable a warning, and
18233 to enable a warning.
18234 The emphasized entries are disabled by default, because the default is
18237 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18242 \begin_layout Standard
18243 Notice that you should only use the options that enable and disable warnings,
18244 because LyX relies on some of the other command line parameters to be set
18245 in a specific way to have a chance to communicate with
18252 \begin_layout Enumerate
18256 Command terminated with space.
18259 \begin_layout Enumerate
18262 Non-breaking space (
18263 \begin_inset Quotes eld
18271 \begin_inset Quotes erd
18274 ) should have been used.
18277 \begin_layout Enumerate
18281 You should enclose the previous parenthesis with
18282 \begin_inset Quotes eld
18290 \begin_inset Quotes erd
18296 \begin_layout Enumerate
18299 Italic correction (
18300 \begin_inset Quotes eld
18310 \begin_inset Quotes erd
18313 ) found in non-italic buffer.
18316 \begin_layout Enumerate
18319 Italic correction (
18320 \begin_inset Quotes eld
18330 \begin_inset Quotes erd
18333 ) found more than once.
18336 \begin_layout Enumerate
18340 No italic correction (
18341 \begin_inset Quotes eld
18351 \begin_inset Quotes erd
18357 \begin_layout Enumerate
18361 \begin_inset Quotes eld
18369 \begin_inset Quotes erd
18373 \begin_inset Quotes eld
18381 \begin_inset Quotes erd
18387 \begin_layout Enumerate
18390 Wrong length of dash may have been used.
18393 \begin_layout Enumerate
18397 \begin_inset Quotes eld
18405 \begin_inset Quotes erd
18409 \begin_inset Quotes eld
18417 \begin_inset Quotes erd
18423 \begin_layout Enumerate
18427 \begin_inset Quotes eld
18435 \begin_inset Quotes erd
18441 \begin_layout Enumerate
18445 \begin_inset Quotes eld
18453 \begin_inset Quotes erd
18456 to achieve an ellipsis.
18459 \begin_layout Enumerate
18462 Inter-word spacing (
18463 \begin_inset Quotes eld
18473 \begin_inset Quotes eld
18476 ) should perhaps be used.
18479 \begin_layout Enumerate
18482 Inter-sentence spacing (
18483 \begin_inset Quotes eld
18493 \begin_inset Quotes erd
18496 ) should perhaps be used.
18499 \begin_layout Enumerate
18502 Could not find argument for command.
18505 \begin_layout Enumerate
18509 \begin_inset Quotes eld
18517 \begin_inset Quotes erd
18523 \begin_layout Enumerate
18526 Math mode still on at end of LaTeX file.
18529 \begin_layout Enumerate
18533 \begin_inset Quotes eld
18541 \begin_inset Quotes erd
18544 doesn't match the number of
18545 \begin_inset Quotes eld
18553 \begin_inset Quotes erd
18559 \begin_layout Enumerate
18562 You should use either
18565 \begin_inset Quotes eld
18573 \begin_inset Quotes erd
18578 as an alternative to
18579 \begin_inset Quotes eld
18587 \begin_inset Quotes erd
18593 \begin_layout Enumerate
18600 " (ASCII 39) instead of "
18607 \begin_layout Enumerate
18610 User-specified pattern found.
18613 \begin_layout Enumerate
18616 This command might not be intended.
18619 \begin_layout Enumerate
18626 \begin_layout Enumerate
18644 \begin_layout Enumerate
18647 Delete this space to maintain correct page references.
18650 \begin_layout Enumerate
18654 You might wish to put this between a pair of
18655 \begin_inset Quotes eld
18663 \begin_inset Quotes erd
18669 \begin_layout Enumerate
18672 You ought to remove spaces in front of punctuation.
18675 \begin_layout Enumerate
18678 Could not execute LaTeX command.
18681 \begin_layout Enumerate
18690 in front of small punctuation.
18693 \begin_layout Enumerate
18701 may look prettier here.
18704 \begin_layout Enumerate
18708 Multiple spaces detected in output.
18711 \begin_layout Enumerate
18714 This text may be ignored.
18717 \begin_layout Enumerate
18723 \begin_inset Quotes eld
18728 to begin quotation, not
18735 \begin_layout Enumerate
18742 to end quotation, not
18745 \begin_inset Quotes eld
18753 \begin_layout Enumerate
18759 \begin_layout Enumerate
18762 You should perhaps use
18763 \begin_inset Quotes eld
18771 \begin_inset Quotes erd
18777 \begin_layout Enumerate
18780 You should put a space in front of/after parenthesis.
18783 \begin_layout Enumerate
18786 You should avoid spaces in front of/after parenthesis.
18789 \begin_layout Enumerate
18793 You should not use punctuation in front of/after quotes.
18796 \begin_layout Enumerate
18799 Double space found.
18802 \begin_layout Enumerate
18805 You should put punctuation outside inner/inside display math mode.
18808 \begin_layout Enumerate
18811 You ought to not use primitive TeX in LaTeX code.
18814 \begin_layout Enumerate
18817 You should remove spaces in front of
18818 \begin_inset Quotes eld
18826 \begin_inset Quotes erd
18832 \begin_layout Enumerate
18835 \begin_inset Quotes eld
18843 \begin_inset Quotes erd
18846 is normally not followed by
18847 \begin_inset Quotes eld
18855 \begin_inset Quotes erd
18861 \begin_layout Standard
18862 In later versions of LyX, we hope to provide a more complete interface to
18863 this tool (and it's smaller cousin
18867 ) to exploit the full power of it.
18868 But it's not exactly useless as it is now: go try it on one of your existing
18869 documents of a certain length and be surprised.
18872 \begin_layout Section
18873 Version Control in LyX
18876 \begin_layout Standard
18879 Lars Gullik Bjønnes
18886 \begin_layout Subsection
18890 \begin_layout Standard
18891 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18892 If you need something a bit more sophisticated you will have to do that
18893 manually in a terminal.
18896 \begin_layout Standard
18897 Also note that CVS support is not as good as subversion support so we advise
18899 A good place to start learning Subversion is SVN Book
18903 \begin_layout Plain Layout
18904 \begin_inset CommandInset href
18906 target "http://svnbook.red-bean.com/"
18916 In the case of RCS you should read
18917 \begin_inset Quotes eld
18921 \begin_inset Quotes erd
18924 (a man file, read it with
18929 This file describes all the basic features of RCS.
18930 You should especially notice the comment about a RCS directory, and the
18931 notion of a master RCS file (the file ending in
18938 \begin_layout Standard
18939 Before you begin to use the version control features in LyX, you should
18940 be familiar with RCS/CVS/SVN/GIT usage.
18941 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18942 package — no guarantees are made for older versions.
18943 Most of the log messages are not currently displayed after operations —
18944 you can check them in the Messages pane if unsure.
18945 Regular users of version control will appreciate VC toolbar, which can
18948 View\SpecialChar \menuseparator
18949 Toolbars\SpecialChar \menuseparator
18951 \begin_inset space ~
18959 \begin_layout Standard
18960 For introducing your own external commands consult vc-command in the manual
18964 \begin_layout Subsection
18965 RCS commands in LyX
18968 \begin_layout Standard
18969 The following sections describe the RCS commands supported by LyX.
18970 You can find them in the
18972 File\SpecialChar \menuseparator
18974 \begin_inset space ~
18980 LyX was tested against RCS 5.7/5.8
18984 \begin_layout Plain Layout
18985 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18986 in order to work properly with LyX.
18987 In particular time zone (TZ) should be set and more importantly RCSINIT
18988 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18989 expects archive to be found in file.lyx,v within the original document directory.
18990 See also README shipped with Windows RCS binaries.
18998 \begin_layout Subsubsection
19004 \begin_layout Standard
19005 If your document is not under revision control, this is the only item shown
19007 And if it is under revision control, the
19011 item is not visible.
19015 \begin_layout Standard
19016 This command registers your document with RCS (unless you are under the
19017 directory managed by CVS)\SpecialChar \@.
19018 You are asked interactively to supply an initial
19019 description of the document.
19020 The document is now set in Read-Only mode and you have to
19023 \begin_inset space ~
19027 \begin_inset space ~
19031 \begin_inset space ~
19036 , before making any changes to it.
19037 A document under revision control has a
19038 \begin_inset Quotes eld
19041 [RCS:<version> <locker>]
19042 \begin_inset Quotes erd
19045 item tagged to the filename in the minibuffer.
19048 \begin_layout Standard
19049 RCS command that is run:
19051 ci -q -u -i -t-"<initial description>" <file-name>
19054 \begin_layout Standard
19059 to understand the switches.
19063 \begin_layout Subsubsection
19069 \begin_layout Standard
19070 When you are finished editing a file, you check in your changes.
19071 When you do this, you are asked for a description of the changes.
19072 This is stored in the history log.
19073 The version number is bumped, your changes are applied to the master RCS
19074 file, the document is unlocked and set to Read-Only mode.
19077 \begin_layout Standard
19080 ci -q -u -m"<description>" <file-name>
19083 \begin_layout Subsubsection
19089 \begin_layout Standard
19090 By doing this you lock the document so that only you can edit it.
19091 This will also make the document Read-Write only for you.
19092 You will usually continue editing for a while and when you are finished
19093 you check in your changes.
19094 The status line is changed to reflect that you have locked the file.
19097 \begin_layout Standard
19100 co -q -l <file-name>
19103 \begin_layout Subsubsection
19106 Revert To Repository Version
19109 \begin_layout Standard
19110 This will discard all changes made to the document since the last check
19112 You get a warning before changes are discarded.
19115 \begin_layout Standard
19118 co -f -u<version> <file-name>
19121 \begin_layout Subsubsection
19127 \begin_layout Standard
19128 This will create a copy of the current document.
19129 Since RCS does not support copy operations natively, the version history
19130 is not preserved, and the copy is added as a new file.
19131 It requires a clean document without any changes since the last checkin.
19132 You are asked for a file name and a description of the copy operation.
19133 After that the copy is created, both locally and in the repository.
19134 If the parent directories of the copied and original document differ, all
19135 relative paths of included files of the copy are adjusted (like in
19137 File\SpecialChar \menuseparator
19140 \SpecialChar \ldots{}
19142 Finally, the copy is loaded instead of the original document.
19145 \begin_layout Labeling
19146 \labelwidthstring 00.00.0000
19148 \begin_inset space ~
19152 \begin_inset space ~
19156 \begin_inset Newline newline
19160 \begin_inset Flex Code
19163 \begin_layout Plain Layout
19166 \begin_inset Quotes eld
19170 \begin_inset Quotes erd
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19185 \begin_inset Quotes eld
19189 \begin_inset Quotes erd
19198 \begin_inset Newline newline
19202 \begin_inset Flex Code
19205 \begin_layout Plain Layout
19209 \begin_inset Quotes eld
19213 \begin_inset Quotes erd
19224 \begin_layout Subsubsection
19230 \begin_layout Standard
19231 This makes as if the last check in never happened.
19232 No changes are made to the document loaded into LyX, but the last version
19233 is removed from the master RCS file.
19236 \begin_layout Standard
19239 rcs -o<version> <file-name>
19242 \begin_layout Subsubsection
19248 \begin_layout Standard
19249 This shows the complete history of the RCS document.
19254 is shown in a browser.
19262 \begin_layout Subsubsection
19266 \begin_layout Standard
19267 LyX supports RCS version number, author name, date and time of last commit.
19268 All those are extracted from
19270 rlog -r <file-name>
19274 \begin_inset CommandInset ref
19276 reference "sub:VCS-Revision-Information"
19283 \begin_layout Subsection
19284 CVS commands in LyX
19287 \begin_layout Standard
19288 A subset of CVS operations is supported by LyX.
19289 You can find the commands in the
19291 File\SpecialChar \menuseparator
19293 \begin_inset space ~
19299 The version control system SVN is more powerful, so please use it instead
19300 of CVS if possible.
19303 \begin_layout Subsubsection
19309 \begin_layout Standard
19310 If you start from scratch with CVS you have to create your repository and
19311 checkout the working copy with external tools.
19312 If you're using a client-server setup you may need to login before doing
19313 the first repository checkout.
19316 \begin_layout Standard
19317 If your documents are under revision control and others are using the same
19318 repository problems arise when different changes to the same document at
19319 the same location happen.
19320 Standard CVS repositories don't operate with a file locking mechanism.
19321 This may be surprising, but conflicts only occur if people disagree on
19322 the proper content of the same part of a document.
19323 So, if co-workers are used to communicate regularly, these conflicts occur
19325 If they don't communicate they have a fundamental problem anyway.
19326 Nevertheless some people like to work with so called
19327 \begin_inset Quotes eld
19331 \begin_inset Quotes erd
19335 If they do so the working copy of all files is readonly when checked out
19336 first and the user starts editing after using a special command to make
19337 the working copy writable.
19338 When the changes are checked in the working copy returns to readonly state.
19339 With LyX one has to edit the
19340 \begin_inset Flex Code
19343 \begin_layout Plain Layout
19349 file and add the line
19350 \begin_inset Flex Code
19353 \begin_layout Plain Layout
19359 to work with reserved checkouts.
19360 The benefit is the possibility to see who is using a writable copy of some
19362 It's not guaranteed only one user makes a copy writable.
19365 \begin_layout Standard
19366 LyX tries to guess if you're using reserved or non-reserved checkouts.
19367 If your working copy is readonly or it is writable and an additional copy
19368 of your document exists in the CVS/Base sub-directory a reserved otherwise
19369 a non-reserved checkout is assumed.
19370 When a reserved checkout is detected you have to use
19371 \begin_inset Flex MenuItem
19374 \begin_layout Plain Layout
19380 to make your working copy writable if it's readonly.
19382 \begin_inset Flex MenuItem
19385 \begin_layout Plain Layout
19391 operation is possible and that makes your working copy readonly again after
19392 transferring your changes to the repository.
19395 \begin_layout Standard
19396 More information about CVS can be found here
19397 \begin_inset Flex URL
19400 \begin_layout Plain Layout
19402 http://www.nongnu.org/cvs
19408 \begin_inset Flex URL
19411 \begin_layout Plain Layout
19413 http://ximbiot.com/cvs
19421 \begin_layout Standard
19426 to understand the sub-commands and the switches mentioned below.
19429 \begin_layout Subsubsection
19435 \begin_layout Standard
19436 If your document is not under revision control, this is the only item shown
19438 And if it is under revision control, the
19445 item is not visible.
19449 \begin_layout Standard
19450 This command registers in CVS your document
19451 \begin_inset Flex Strong
19454 \begin_layout Plain Layout
19462 in the case you have already the documents directory under CVS control
19468 This means you have to create or checkout the archive by yourself using
19470 (In case you forget that step LyX registers the document with RCS.)
19473 \begin_layout Standard
19474 Then you are asked interactively to supply an initial description of the
19476 Don't forget that registered file is not yet checked in.
19479 \begin_layout Standard
19480 CVS command that is run:
19482 cvs -q add -m"<entered message>" "<file-name>"
19485 \begin_layout Standard
19490 above and for all other CVS commands is an abbreviation for
19491 \begin_inset Quotes eld
19494 change the current working directory to file location and use the file name
19495 without path component as argument
19496 \begin_inset Quotes erd
19502 \begin_layout Subsubsection
19508 \begin_layout Standard
19509 When you are finished editing a file, you commit your changes.
19510 When you do this and you had changed the document, you are asked for a
19511 description of the changes.
19512 After that changes are written to the repository.
19513 In case you didn't change the document and a reserved checkout is detected
19514 the reservation made on
19515 \begin_inset Flex MenuItem
19518 \begin_layout Plain Layout
19527 \begin_layout Labeling
19528 \labelwidthstring 00.00.0000
19530 \begin_inset space ~
19534 \begin_inset space ~
19538 \begin_inset Newline newline
19542 \begin_inset Flex Code
19545 \begin_layout Plain Layout
19548 -q commit -m"<description>" "<file-name>"
19554 \begin_inset Newline newline
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19572 \begin_layout Subsubsection
19578 \begin_layout Standard
19579 When you are sharing a repository with others, you may have to incorporate
19580 their changes into your working copy.
19583 \begin_layout Standard
19586 cvs -q update "<file-name>"
19589 \begin_layout Standard
19590 If a readonly checkout is detected the working copy is made writable and
19594 \begin_layout Standard
19597 cvs -q edit "<file-name>"
19600 \begin_layout Subsubsection
19603 Revert To Repository Version
19606 \begin_layout Standard
19607 This will discard all changes made to the document since the last check
19609 You get a warning before changes are discarded.
19610 Firstly the file is deleted, secondly CVS update command is run.
19613 \begin_layout Standard
19616 cvs -q update "<file-name>"
19619 \begin_layout Standard
19620 If a reserved checkout is detected and the working copy has no changes only
19621 the reservation is undone.
19624 \begin_layout Standard
19627 cvs -q unedit "<file-name>"
19630 \begin_layout Subsubsection
19636 \begin_layout Standard
19637 This will create a copy of the current document.
19638 Since CVS does not support copy operations natively, the version history
19639 is not preserved, and the copy is added as a new file.
19640 It requires a clean document without any changes since the last checkin.
19641 You are asked for a file name and a description of the copy operation.
19642 After that the copy is created, both locally and in the repository.
19643 If the parent directories of the copied and original document differ, all
19644 relative paths of included files of the copy are adjusted (like in
19646 File\SpecialChar \menuseparator
19649 \SpecialChar \ldots{}
19651 Finally, the copy is loaded instead of the original document.
19654 \begin_layout Labeling
19655 \labelwidthstring 00.00.0000
19657 \begin_inset space ~
19661 \begin_inset space ~
19665 \begin_inset Newline newline
19669 \begin_inset Flex Code
19672 \begin_layout Plain Layout
19675 \begin_inset Quotes eld
19679 \begin_inset Quotes erd
19688 \begin_inset Flex Code
19691 \begin_layout Plain Layout
19694 \begin_inset Quotes eld
19698 \begin_inset Quotes erd
19707 \begin_inset Newline newline
19711 \begin_inset Flex Code
19714 \begin_layout Plain Layout
19718 \begin_inset Quotes eld
19722 \begin_inset Quotes erd
19733 \begin_layout Subsubsection
19739 \begin_layout Standard
19740 This will rename the current document.
19741 Since CVS does not support rename operations natively, the version history
19742 is not preserved, the renamed document is added as a new file, and the
19743 original document is deleted.
19744 It requires a clean document without any changes since the last checkin.
19745 You are asked for a file name and a description of the rename operation.
19746 After that the document is renamed, both locally and in the repository.
19747 If the parent directories of the new and old file names differ, all relative
19748 paths of included files are adjusted (like in
19750 File\SpecialChar \menuseparator
19753 \SpecialChar \ldots{}
19755 Finally, the document is reloaded using the new name.
19758 \begin_layout Labeling
19759 \labelwidthstring 00.00.0000
19761 \begin_inset space ~
19765 \begin_inset space ~
19769 \begin_inset Newline newline
19773 \begin_inset Flex Code
19776 \begin_layout Plain Layout
19779 \begin_inset Quotes eld
19783 \begin_inset Quotes erd
19792 \begin_inset Flex Code
19795 \begin_layout Plain Layout
19798 \begin_inset Quotes eld
19802 \begin_inset Quotes erd
19811 \begin_inset Newline newline
19815 \begin_inset Flex Code
19818 \begin_layout Plain Layout
19822 \begin_inset Quotes eld
19826 \begin_inset Quotes erd
19835 \begin_inset Newline newline
19839 \begin_inset Flex Code
19842 \begin_layout Plain Layout
19846 \begin_inset Quotes eld
19850 \begin_inset Quotes erd
19861 \begin_layout Subsubsection
19862 Update of the local directory checkout from repository
19865 \begin_layout Standard
19866 Once your documents gets more complex, containing sub-documents and pictures,
19868 \begin_inset Flex Code
19871 \begin_layout Plain Layout
19877 files and so on using version control becomes more complicated.
19878 LyX supports updating the whole tree in which resides the document.
19879 This become especially useful once you cooperate with people which neither
19880 have detailed knowledge about CVS usage nor they have ambition to commit
19881 additional material to the repository.
19882 You have to organize the files structure so that all external files are
19883 in the same directory or subdirectories of the document.
19884 It's good practice anyway to store multipart documents in an extra directory.
19887 \begin_layout Standard
19889 \begin_inset Flex Code
19892 \begin_layout Plain Layout
19893 Update local directory from repository
19898 command updates the whole directory.
19899 If local changes are detected user is warned before update starts.
19900 In case of merge conflicts both versions of the conflicting document parts
19901 are placed in the final document.
19902 You have to review and correct the result of the merge.
19903 You'll find the conflicts enclosed in pairs of
19904 \begin_inset Flex Code
19907 \begin_layout Plain Layout
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19924 \begin_inset Flex Code
19927 \begin_layout Plain Layout
19934 The first part is your version as before the update operation with the
19935 document name prepended.
19936 The second one is the repository version with the version number after
19938 \begin_inset Flex Code
19941 \begin_layout Plain Layout
19950 \begin_layout Labeling
19951 \labelwidthstring 00.00.0000
19953 \begin_inset space ~
19957 \begin_inset space ~
19961 \begin_inset Newline newline
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19976 (Ask if changes are detected.)
19977 \begin_inset Newline newline
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19985 cd $path; cvs -q update
19995 \begin_layout Standard
19997 \begin_inset Flex Code
20000 \begin_layout Plain Layout
20006 stands for the path to the document.
20009 \begin_layout Subsubsection
20015 \begin_layout Standard
20016 This shows the complete history of the CVS document.
20019 cvs log "<file-name>"
20021 is shown in a browser.
20024 \begin_layout Subsubsection
20028 \begin_layout Standard
20029 LyX supports CVS version number, author name, date and time of last commit.
20030 All those are extracted from
20032 cvs log -r <file-name>
20036 \begin_inset CommandInset ref
20038 reference "sub:VCS-Revision-Information"
20045 \begin_layout Subsection
20046 SVN commands in LyX
20049 \begin_layout Standard
20050 SVN is now partially supported by LyX.
20051 You can find the commands in the
20053 File\SpecialChar \menuseparator
20055 \begin_inset space ~
20061 Please note that if you use password protected access to repository via
20062 ssh, you will be asked in terminal window.
20063 LyX was tested against SVN 1.5 and 1.6
20067 \begin_layout Plain Layout
20068 Most of the commands will work with 1.4 too, see
20069 \begin_inset CommandInset ref
20071 reference "sub:SVN-Repo-Update"
20083 \begin_layout Subsubsection
20089 \begin_layout Standard
20090 If your document is not under revision control, this is the only item shown
20092 And if it is under revision control, the
20099 item is not visible.
20102 \begin_layout Standard
20103 This command registers in SVN your document ONLY in case you have already
20104 the documents directory under SVN control (in particular
20109 This means you have to checkout the archive by yourself.
20112 \begin_layout Standard
20113 Then you are asked interactively to supply an initial description of the
20115 Don't forget that registered file is not yet commited.
20118 \begin_layout Standard
20119 SVN command that is run:
20122 \begin_inset Quotes eld
20126 \begin_inset Quotes erd
20132 \begin_layout Standard
20137 to understand the switches.
20140 \begin_layout Subsubsection
20146 \begin_layout Standard
20147 When you are finished editing a file, you commit your changes.
20148 When you do this, you are asked for a description of the changes.
20149 After that changes are commited.
20152 \begin_layout Standard
20157 \begin_layout Plain Layout
20158 In case locking is not enabled.
20160 \begin_inset CommandInset ref
20162 reference "subsec:SVN-File-Locking"
20173 svn commit -q -m"<description>" <file-name>
20176 \begin_layout Subsubsection
20182 \begin_layout Standard
20183 Updates the changes of this file from the repository.
20184 Be sure you understand SVN merging and conflicts resolving before using
20185 this function, because all conflicts has to be resolved manually by you!
20188 \begin_layout Standard
20193 \begin_layout Plain Layout
20201 svn update --non-interactive
20202 \begin_inset Quotes eld
20206 \begin_inset Quotes erd
20212 \begin_layout Subsubsection
20215 Revert To Repository Version
20218 \begin_layout Standard
20219 This will discard all changes made to the document since the last check
20221 You get a warning before changes are discarded.
20224 \begin_layout Standard
20228 \begin_inset Quotes eld
20232 \begin_inset Quotes erd
20238 \begin_layout Subsubsection
20244 \begin_layout Standard
20245 This will create a copy of the current document including the version history.
20246 It requires a clean document without any changes since the last checkin.
20247 You are asked for a file name and a description of the copy operation.
20248 After that the copy is created, both locally and in the repository.
20249 If the parent directories of the copied and original document differ, all
20250 relative paths of included files of the copy are adjusted (like in
20252 File\SpecialChar \menuseparator
20255 \SpecialChar \ldots{}
20257 Finally, the copy is loaded instead of the original document.
20260 \begin_layout Labeling
20261 \labelwidthstring 00.00.0000
20263 \begin_inset space ~
20267 \begin_inset space ~
20271 \begin_inset Newline newline
20275 \begin_inset Flex Code
20278 \begin_layout Plain Layout
20282 \begin_inset Quotes eld
20286 \begin_inset Quotes erd
20290 \begin_inset Quotes eld
20294 \begin_inset Quotes erd
20303 \begin_inset Newline newline
20307 \begin_inset Flex Code
20310 \begin_layout Plain Layout
20319 \begin_layout Subsubsection
20325 \begin_layout Standard
20326 This will rename the current document including the version history.
20327 It requires a clean document without any changes since the last checkin.
20328 You are asked for a file name and a description of the rename operation.
20329 After that the document is renamed, both locally and in the repository.
20330 If the parent directories of the new and old file names differ, all relative
20331 paths of included files are adjusted (like in
20333 File\SpecialChar \menuseparator
20336 \SpecialChar \ldots{}
20338 Finally, the document is reloaded using the new name.
20341 \begin_layout Labeling
20342 \labelwidthstring 00.00.0000
20344 \begin_inset space ~
20348 \begin_inset space ~
20352 \begin_inset Newline newline
20356 \begin_inset Flex Code
20359 \begin_layout Plain Layout
20363 \begin_inset Quotes eld
20367 \begin_inset Quotes erd
20371 \begin_inset Quotes eld
20375 \begin_inset Quotes erd
20384 \begin_inset Newline newline
20388 \begin_inset Flex Code
20391 \begin_layout Plain Layout
20400 \begin_layout Subsubsection
20401 \begin_inset CommandInset label
20403 name "sub:SVN-Repo-Update"
20407 Update of the local directory checkout from repository
20411 \begin_layout Plain Layout
20412 Note that this command will work only with subversion
20413 \begin_inset Formula $\geqq1.5$
20424 \begin_layout Standard
20425 All the commands above have one shortcomming - they deal with the current
20427 Once your document contains pictures, includes external
20428 \begin_inset Flex Code
20431 \begin_layout Plain Layout
20437 files and so on administration becomes more complicated.
20438 LyX now supports updating the whole tree in which resides the document
20442 \begin_layout Plain Layout
20443 One need to organize the files structure so that all external files are
20444 in the same directory or subdirectories of the document.
20451 This become especially useful once you cooperate with people which neither
20452 know about subversion management nor they have ambition to commit additional
20453 material to the repository.
20457 \begin_layout Standard
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20462 Update local directory from repository
20467 command updates the whole directory and in case of merge conflicts local
20468 version of the files are left, so no unintended data loss occurs.
20469 If local changes are detected user is warned before update starts.
20472 \begin_layout Labeling
20473 \labelwidthstring 00.00.0000
20475 \begin_inset space ~
20479 \begin_inset space ~
20483 \begin_inset Newline newline
20487 \begin_inset Flex Code
20490 \begin_layout Plain Layout
20496 (Ask if changes are detected.)
20497 \begin_inset Newline newline
20501 \begin_inset Flex Code
20504 \begin_layout Plain Layout
20505 svn update --accept mine-full $path
20513 \begin_layout Standard
20515 \begin_inset Flex Code
20518 \begin_layout Plain Layout
20524 stands for the path to the document.
20527 \begin_layout Subsubsection
20533 \begin_layout Standard
20534 This shows the complete history of the SVN document.
20538 \begin_inset Quotes eld
20542 \begin_inset Quotes erd
20547 is shown in a browser.
20550 \begin_layout Subsubsection
20552 \begin_inset CommandInset label
20554 name "subsec:SVN-File-Locking"
20561 \begin_layout Standard
20562 The file exchange through various revision control systems brings the problem
20563 of merge conflicts in case two different users try to edit the same (parts
20565 When such a conflict happens it needs manual resolving and one reasonable
20566 alternative is to provide some kind of locking mechanism, which guarantees
20567 that only one user is allowed to edit file at the given time.
20570 \begin_layout Standard
20571 SVN has two such mechanisms to provide mutual exclusivity for file access
20572 - locks and automatic setting of write permissions (see sec.
20574 \begin_inset CommandInset ref
20576 reference "subsec:Automatical-Locking-Property"
20581 \begin_inset Flex Code
20584 \begin_layout Plain Layout
20594 \begin_layout Plain Layout
20595 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20601 If this property is detected for a given document LyX starts to use SVN
20602 locks for document editing automatically and the whole check-in/out mechanism
20603 switches to the same regimen as for RCS.
20604 This in particular means there are two different modes of file use in LyX:
20607 \begin_layout Itemize
20609 The loaded file is in the read-only mode.
20610 For editing on needs to check-out.
20615 consists of updating from the repository and gaining write lock.
20616 If the lock is not possible to obtain, we remain in unlocked state.
20619 \begin_layout Itemize
20621 The loaded file is in the 'normal' edit mode.
20622 No other user is allowed to edit the file.
20627 consists of commiting changes and releasing write-lock.
20628 If no changes have been made to the document, no commit will be produced
20632 \begin_layout Plain Layout
20633 Don't be puzzled by the fact that you will be asked for commit message anyway.
20638 and only the write-lock will be released.
20641 \begin_layout Standard
20645 \begin_layout Labeling
20646 \labelwidthstring 00.00.0000
20649 svn commit -q -m"<description>" "<file-name>"
20650 \begin_inset Newline newline
20653 svn unlock "<file-name>"
20656 \begin_layout Labeling
20657 \labelwidthstring 00.00.0000
20660 svn update "<file-name>"
20661 \begin_inset Newline newline
20664 svn lock "<file-name>"
20667 \begin_layout Subsubsection
20670 \begin_inset CommandInset label
20672 name "subsec:Automatical-Locking-Property"
20678 Automatic Locking Property
20681 \begin_layout Standard
20682 The above mentioned automatic setting of write permissions of the .lyx file
20688 ile\SpecialChar \menuseparator
20694 \begin_inset space ~
20697 Control\SpecialChar \menuseparator
20702 oggle locking property
20705 This command is active only when the file is not locked on the svn server
20707 you need to check-out before proceeding).
20710 \begin_layout Labeling
20711 \labelwidthstring 00.00.0000
20713 \begin_inset space ~
20719 \begin_layout Labeling
20720 \labelwidthstring 00.00.0000
20723 svn propset svn:needs-lock ON "<file-name>"
20726 \begin_layout Labeling
20727 \labelwidthstring 00.00.0000
20730 svn propdel svn:needs-lock "<file-name>"
20733 \begin_layout Subsubsection
20734 \begin_inset CommandInset label
20736 name "sub:VCS-Revision-Information"
20740 Revision Information in Documents
20743 \begin_layout Standard
20744 There are more possibilities how to activate revision information in our
20748 \begin_layout Itemize
20749 LyX supports directly:
20753 \begin_layout Itemize
20754 tree revision information (
20755 \begin_inset Flex Code
20758 \begin_layout Plain Layout
20765 The result is the output of the
20766 \begin_inset Flex Code
20769 \begin_layout Plain Layout
20775 command, the following table gives you an idea, how to read the results.
20778 \begin_layout Standard
20780 \begin_inset Tabular
20781 <lyxtabular version="3" rows="6" columns="2">
20782 <features rotate="0" tabularvalignment="middle">
20783 <column alignment="center" valignment="top">
20784 <column alignment="center" valignment="top">
20786 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20789 \begin_layout Plain Layout
20795 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20798 \begin_layout Plain Layout
20806 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20809 \begin_layout Plain Layout
20815 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20818 \begin_layout Plain Layout
20819 mixed revision working copy
20826 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20829 \begin_layout Plain Layout
20835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20838 \begin_layout Plain Layout
20839 modified working copy
20846 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20849 \begin_layout Plain Layout
20855 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20858 \begin_layout Plain Layout
20859 switched working copy
20866 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20869 \begin_layout Plain Layout
20875 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20878 \begin_layout Plain Layout
20879 partial working copy, from a sparse checkout
20886 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20889 \begin_layout Plain Layout
20895 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20898 \begin_layout Plain Layout
20899 mixed revision, modified, switched working copy
20912 \begin_layout Itemize
20913 file revision information.
20914 The result comes from parsing the output of
20915 \begin_inset Flex Code
20918 \begin_layout Plain Layout
20920 \begin_inset space ~
20924 \begin_inset space ~
20928 \begin_inset space ~
20937 Supported flags are:
20941 \begin_layout Itemize
20942 version number of the last commit (
20943 \begin_inset Flex Code
20946 \begin_layout Plain Layout
20955 \begin_layout Itemize
20956 author of the last commit (
20957 \begin_inset Flex Code
20960 \begin_layout Plain Layout
20969 \begin_layout Itemize
20970 date of the last commit (
20971 \begin_inset Flex Code
20974 \begin_layout Plain Layout
20983 \begin_layout Itemize
20984 time of the last commit (
20985 \begin_inset Flex Code
20988 \begin_layout Plain Layout
20998 \begin_layout Standard
20999 You can obtain this info via InsetInfo (e.g.
21001 \begin_inset Flex Code
21004 \begin_layout Plain Layout
21005 info-insert buffer vcs-date
21011 The information will be available only when you have the file stored under
21012 svn managment (i.e.
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21023 directory is available with your document).
21027 \begin_layout Itemize
21028 Another---a hacking one---possibility is to use svn keywords
21032 \begin_layout Plain Layout
21033 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21039 In short -- you set file keywords property (e.g.
21042 svn propset svn:keywords 'Rev' file.lyx
21044 ) and then paste keyword TeX code
21048 \begin_layout Plain Layout
21049 This is an easy way how to ensure that LyX won't break the line in the middle
21055 tag in your document (e.g.
21060 \begin_layout Plain Layout
21068 This way svn client will automatically substitute revision number (e.g.
21073 \begin_layout Plain Layout
21080 ) after each update and commit.
21081 There are more problems with this approach.
21082 Firstly, the '$' character is used in TeX world for math equations, so
21083 any occurence of math formula
21084 \begin_inset Formula $Rev$
21088 \begin_inset Formula $Rev:59$
21091 in your LyX document.
21092 Similarly for other keywords like Id, Date, Author, etc.
21093 Secondly svn output is dependent on your locales, so its very easy that
21094 svn would produce some problematic strings once Date is used.
21095 Thirdly you get the whole 'Rev: 59' string in your document instead of
21097 Until subversion implements user's custom keywords it will be hard to use
21098 this approach reliably or let LyX to support it directly.
21101 \begin_layout Subsection
21102 SVN and Windows Environment
21105 \begin_layout Quote
21106 My inclination is to say that if the user cannot figure out the command
21107 line operations on their own fairly quickly, they would be well advised
21108 to use TortoiseSVN.
21114 \begin_layout Subsubsection
21118 \begin_layout Standard
21119 In addition to installing LyX, and having access to a Subversion repository,
21120 the user will need to install the Subversion client program.
21121 A Windows installer for the client program is available from
21122 \begin_inset CommandInset href
21125 target "http://www.collab.net/nonav/downloads/subversion/"
21130 The user may also want to install
21131 \begin_inset CommandInset href
21134 target "http://tortoisesvn.tigris.org/"
21138 , which integrates Subversion operations into the context (rightclick) menu
21139 of Windows Explorer.
21140 Operations done outside LyX will typically be more convenient using the
21141 Explorer context menu.
21142 Note that TortoiseSVN is not a replacement for the client program, which
21143 is what LyX itself will use.
21146 \begin_layout Subsubsection
21147 Bringing a document under Subversion control
21150 \begin_layout Standard
21151 Before a LyX document can be brought under version control in Subversion,
21152 its parent directory needs to be under version control.
21153 If the document is being added to a project already in the repository,
21154 this is accomplished by checking the project out to the directory where
21155 the new document will be placed.
21156 If the project itself is not yet under version control (for instance, if
21157 this document starts a new project), the directory must be imported into
21159 This is done outside LyX.
21160 Both import and checkout are easily accomplished from the Explorer context
21161 menu using TortoiseSVN, or alternatively can be done using the command
21162 line client at a DOS prompt.
21163 The procedure for importing the project using TortoiseSVN is described
21164 below, assuming an existing repository and a new project being started
21172 For information on using the Subversion client program, run
21179 \begin_layout Enumerate
21186 in Windows Explorer, right click it, and select
21188 TortoiseSVN\SpecialChar \menuseparator
21192 If necessary, adjust the URL for the repository, then click OK.
21195 \begin_layout Enumerate
21196 Right click the level of the repository under which you want to place the
21197 new project folder (typically the top level) and click
21201 Supply a name for the project folder and click OK.
21202 Add a message for the log file if desired, then click OK again.
21203 The new project folder should appear in the repository.
21204 Finally, click OK again to exit the repository browser.
21207 \begin_layout Enumerate
21208 Once again right click
21214 , this time selecting SVN Checkout\SpecialChar \ldots{}
21215 Select the URL of the project folder
21216 you just created in the repository, and set the checkout directory to
21224 You will be warned about a non-empty folder; click OK to proceed.
21225 You should now have a
21236 \begin_layout Enumerate
21237 Create or open your document in LyX and click
21239 File\SpecialChar \menuseparator
21241 \begin_inset space ~
21244 Control\SpecialChar \menuseparator
21248 Add a log message and click OK to commit the document to version control.
21251 \begin_layout Standard
21252 From this point onward, you should have full functionality in the
21254 File\SpecialChar \menuseparator
21256 \begin_inset space ~
21262 You also have the option of checking the document in and out, viewing its
21264 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21265 client program from a command prompt.
21268 \begin_layout Subsubsection
21269 SSH tunnel used with SVN under Windows
21272 \begin_layout Standard
21273 Compared with Linux setting up an svn client to communicate over ssh under
21274 Windows is a rather troublesome task.
21275 We will at least offer some hints how to setup the client side but prior
21276 knowledge about ssh and the Windows command line is needed, also be prepared
21277 for a great deal of frustration\SpecialChar \ldots{}
21281 \begin_layout Enumerate
21282 Get an svn client for windows, as described in the previous sections.
21283 When it is a fresh install run some svn command (e.g.
21285 \begin_inset Flex Code
21288 \begin_layout Plain Layout
21294 ) to create config files, which you will need to change later on.
21297 \begin_layout Enumerate
21298 Choose an ssh client for Windows.
21299 There are several possibilities, we will use the one from Putty tools
21303 \begin_layout Plain Layout
21304 \begin_inset Flex URL
21307 \begin_layout Plain Layout
21309 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21320 You will need to set the connection up so that the client doesn't ask for
21321 any password from you.
21322 To keep things easy we will use only keys without any additional password
21327 \begin_layout Enumerate
21329 \begin_inset Flex Code
21332 \begin_layout Plain Layout
21339 Save your private .ppk key file and put the public one on the server side.
21340 If the SVN server runs on Linux, note that the format of the public key
21341 is not compatible with Linux openssh and you will need to direcly copy-paste
21344 Public key for pasting into OpenSSH authorized_keys file
21346 :” edit field into the server's
21347 \begin_inset Flex Code
21350 \begin_layout Plain Layout
21351 ~/.ssh/authorized_keys
21357 \begin_inset Flex Code
21360 \begin_layout Plain Layout
21369 \begin_layout Enumerate
21371 \begin_inset Flex Code
21374 \begin_layout Plain Layout
21381 In the SVN config file
21385 \begin_layout Plain Layout
21386 Exact path depends on Windows version, usually somewhere around
21387 \begin_inset Flex Code
21390 \begin_layout Plain Layout
21393 Documents and Settings
21407 \begin_inset Flex Code
21410 \begin_layout Plain Layout
21425 , section [tunnels], setup ssh command, e.g.
21427 \begin_inset Flex Code
21430 \begin_layout Plain Layout
21431 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21440 \begin_layout Plain Layout
21441 It will usually take a lot of time to get exact command right and it depends
21443 For example do not have some remote server saved as a default session in
21445 If things fail, try to connect via plink without SVN first.
21454 \begin_layout Enumerate
21455 Checkout the SVN archive, e.
21456 \begin_inset space \thinspace{}
21460 \begin_inset Newline newline
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21468 svn co svn+ssh://user@server/repository_path
21476 \begin_layout Subsubsection
21477 End-of-Line Conversions
21480 \begin_layout Standard
21481 When the collaborators are mixing Linux and Windows environments, LyX will
21482 use different line endings inside the .lyx files.
21483 This is not a problem as far as LyX functionality is concerned, but the
21484 commit diffs will be huge and merge-conflicts prone.
21485 Fortunately SVN itself knows
21489 \begin_layout Plain Layout
21490 \begin_inset Flex URL
21493 \begin_layout Plain Layout
21495 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21505 how to deal with CR/LF problems when switching .lyx files to the
21506 \begin_inset Flex Code
21509 \begin_layout Plain Layout
21519 \begin_layout Plain Layout
21521 \begin_inset Flex Code
21524 \begin_layout Plain Layout
21525 svn propset svn:eol-style native FILE_NAME
21538 \begin_layout Subsection
21539 GIT commands in LyX
21542 \begin_layout Standard
21543 A minimal subset of GIT commands is now supported by LyX.
21544 You can find the commands in the
21546 File\SpecialChar \menuseparator
21548 \begin_inset space ~
21554 Please note that if you use password protected access to repository via
21555 ssh, you will be asked in terminal window.
21556 LyX was tested against GIT 1.7.
21559 \begin_layout Standard
21560 One big difference of GIT and the other supported version control systems
21561 is the distributed nature of GIT: With traditional version control systems
21562 there is one central server which hosts the repository.
21563 Users commit their changes to the server, and get updates made by other
21565 With GIT, users commit to a local repository.
21566 The local repository can be synchronized with one or more remote repositories
21568 \begin_inset Flex Code
21571 \begin_layout Plain Layout
21578 \begin_inset Flex Code
21581 \begin_layout Plain Layout
21588 LyX does not interact in any way with remote GIT repositories.
21589 It works exclusively with the local repository in a very similar way as
21590 with a central CVS or SVN repository.
21591 If you use remote GIT repositories you need to do the
21592 \begin_inset Flex Code
21595 \begin_layout Plain Layout
21602 \begin_inset Flex Code
21605 \begin_layout Plain Layout
21611 operations with your favourite GIT client.
21614 \begin_layout Subsubsection
21620 \begin_layout Standard
21621 If your document is not under revision control, this is the only item shown
21623 And if it is under revision control, the
21630 item is not visible.
21633 \begin_layout Standard
21634 This command registers in GIT your document ONLY in case you have already
21635 the documents directory under GIT control (in particular
21640 This means you have to checkout the archive by yourself.
21643 \begin_layout Standard
21644 Then you are asked interactively to supply an initial description of the
21646 Don't forget that registered file is not yet commited.
21649 \begin_layout Standard
21650 GIT command that is run:
21653 \begin_inset Quotes eld
21657 \begin_inset Quotes erd
21663 \begin_layout Standard
21668 to understand the switches.
21671 \begin_layout Subsubsection
21677 \begin_layout Standard
21678 When you are finished editing a file, you commit your changes.
21679 When you do this, you are asked for a description of the changes.
21680 After that changes are commited.
21683 \begin_layout Standard
21686 git commit -q -m"<description>" <file-name>
21689 \begin_layout Subsubsection
21692 Revert To Repository Version
21695 \begin_layout Standard
21696 This will discard all changes made to the document since the last check
21698 You get a warning before changes are discarded.
21701 \begin_layout Standard
21705 \begin_inset Quotes eld
21709 \begin_inset Quotes erd
21715 \begin_layout Subsubsection
21721 \begin_layout Standard
21722 This will rename the current document including the version history.
21723 It requires a clean document without any changes since the last checkin.
21724 You are asked for a file name and a description of the rename operation.
21725 After that the document is renamed, both locally and in the repository.
21726 If the parent directories of the new and old file names differ, all relative
21727 paths of included files are adjusted (like in
21729 File\SpecialChar \menuseparator
21732 \SpecialChar \ldots{}
21734 Finally, the document is reloaded using the new name.
21737 \begin_layout Labeling
21738 \labelwidthstring 00.00.0000
21740 \begin_inset space ~
21744 \begin_inset space ~
21748 \begin_inset Newline newline
21752 \begin_inset Flex Code
21755 \begin_layout Plain Layout
21759 \begin_inset Quotes eld
21763 \begin_inset Quotes erd
21767 \begin_inset Quotes eld
21771 \begin_inset Quotes erd
21780 \begin_inset Newline newline
21784 \begin_inset Flex Code
21787 \begin_layout Plain Layout
21796 \begin_layout Subsubsection
21802 \begin_layout Standard
21803 This shows the complete history of the GIT document.
21807 \begin_inset Quotes eld
21811 \begin_inset Quotes erd
21816 is shown in a browser.
21819 \begin_layout Subsubsection
21823 \begin_layout Standard
21824 LyX supports GIT hash number of the last commit to the file, author name,
21825 date and time of last commit.
21826 All those are extracted from
21828 git log -n 1 --pretty=format:%H%n%an%n%ai
21831 Tree version information is obtained via
21833 git describe --abbrev --dirty --long
21837 \begin_inset CommandInset ref
21839 reference "sub:VCS-Revision-Information"
21846 \begin_layout Subsection
21850 \begin_layout Standard
21851 With the recent addition of the vc-command function LyX power users are
21852 allowed to create their own commands for revision control.
21855 \begin_layout Standard
21856 As an example you can see how two TortoiseSVN commands could be integrated
21860 \begin_layout Description
21862 \begin_inset Flex Code
21865 \begin_layout Plain Layout
21866 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21874 \begin_layout Description
21876 \begin_inset Flex Code
21879 \begin_layout Plain Layout
21880 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21888 \begin_layout Subsection
21889 Version control and Document comparison
21892 \begin_layout Standard
21893 One of the typical uses of version control is to inspect the changes between
21894 revisions, usually by creating
21895 \begin_inset Flex Code
21898 \begin_layout Plain Layout
21905 While this is useful for plain text files, it is much less useful in the
21906 case of LyX files, which have more a complicated structure.
21907 Hence we provide binding to the Document comparison feature.
21908 There are two ways of calling this feature - either by direct call of
21909 \begin_inset Flex Code
21912 \begin_layout Plain Layout
21918 LyX function (for details see LyX functions manual) or by icon/menu item
21920 \begin_inset Flex MenuItem
21923 \begin_layout Plain Layout
21924 Compare with older revision...
21930 One can either compare two chosen revisions of the document or he can simply
21931 compare the current version of edited text with older revisions (where
21933 \begin_inset Flex MenuItem
21936 \begin_layout Plain Layout
21942 ' revisions back means comparison of the edited file with last commited
21947 \begin_layout Standard
21948 This feature is supported for SVN and RCS though due to the more complicated
21949 versioning scheme of RCS there is a constraint -- when addressing the revisions
21950 in dialog, numbers always point to the last number in RCS revision number,
21953 We don't currently support GIT addressing of revisions, one can just compare
21954 edited document with its revision X steps backs, where X is addressed as
21958 \begin_layout Section
21959 Literate Programming
21962 \begin_layout Standard
21967 (kayvan@sylvan.com)
21971 original documentation written by
21973 Edmar Wienskoski Jr.
21976 (edmar-w-jr@technologist.com)
21979 \begin_layout Subsection
21983 \begin_layout Standard
21984 The main purpose of this documentation is to show you how to use LyX for
21985 literate programming, where it is assumed that you are familiar with this
21986 programming technique, and know what
21987 \begin_inset Quotes eld
21991 \begin_inset Quotes erd
21995 \begin_inset Quotes eld
21999 \begin_inset Quotes erd
22003 If that is not the case, please follow the web links provided in the following
22005 There is a lot of good documentation out there covering old development
22006 history to the latest tools tips.
22009 \begin_layout Standard
22010 It is also assumed that you are familiar with LyX itself to a point that
22011 you are comfortable changing your LyX preferences, and X resources file.
22012 If that is not the case please refer to other LyX documentation to cover
22013 your specific needs.
22016 \begin_layout Subsection
22017 Literate Programming
22020 \begin_layout Standard
22021 From the Literate Programming FAQ:
22024 \begin_layout Quotation
22025 Literate programming is the combination of documentation and source together
22026 in a fashion suited for reading by human beings.
22027 In fact, literate programs should be enjoyable reading, even inviting!
22028 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22029 and documentation in a single file.
22030 Literate programming tools then parse the file to produce either readable
22031 documentation or compilable source.
22032 The WEB style of literate programming was created by D.
22033 \begin_inset space \thinspace{}
22037 Knuth during the development of his TeX typesetting software.
22041 \begin_layout Standard
22042 Another excerpt says:
22045 \begin_layout Quotation
22048 How is literate programming different from verbose commenting?
22051 \begin_layout Quotation
22052 There are three distinguishing characteristics.
22053 In order of importance, they are:
22057 \begin_layout Itemize
22058 flexible order of elaboration
22061 \begin_layout Itemize
22062 automatic support for browsing
22065 \begin_layout Itemize
22066 typeset documentation, especially diagrams and mathematics
22070 \begin_layout Standard
22071 Now that I sparked your curiosity, take a look in the references.
22074 \begin_layout Subsubsection
22078 \begin_layout Standard
22079 The complete Literate Programming FAQ can be found at:
22082 \begin_layout Quote
22083 Literate Programming FAQ
22084 \begin_inset Flex URL
22087 \begin_layout Plain Layout
22089 http://www.literateprogramming.com/lpfaq.pdf
22097 \begin_layout Standard
22098 The FAQ lists 23 (twenty three!) different literate programming tools.
22099 Where some are specialized or
22100 \begin_inset Quotes eld
22104 \begin_inset Quotes erd
22107 for particular programming languages, while other have general scope.
22112 for my own use for several reasons:
22115 \begin_layout Itemize
22116 It can generate the documentation either in LaTeX or HTML.
22119 \begin_layout Itemize
22120 It has a open architecture, i.
22121 \begin_inset space \thinspace{}
22125 \begin_inset space \space{}
22128 it is easy to plug in new filters and to perform special processing that
22133 \begin_layout Itemize
22134 There is a good selection of filters available already (the HTML is one
22138 \begin_layout Itemize
22142 \begin_layout Standard
22143 The Noweb web page can be found at:
22146 \begin_layout Quote
22148 \begin_inset Flex URL
22151 \begin_layout Plain Layout
22153 http://www.cs.virginia.edu/~nr/noweb/
22161 \begin_layout Standard
22162 Starting from there you can reach many other interesting links and even
22163 some literate program examples.
22166 \begin_layout Subsection
22167 LyX and Literate Programming with Noweb
22170 \begin_layout Standard
22171 The LyX support for Literate Programming is provided by using the generic
22172 LyX converters mechanism.
22173 This support is provided in a
22174 \begin_inset Quotes eld
22178 \begin_inset Quotes erd
22182 \begin_inset space \thinspace{}
22186 \begin_inset space \space{}
22189 you will be able to use this new LyX feature with some other literate programmin
22190 g tool of your choice by just changing your LyX preferences.
22193 \begin_layout Subsubsection
22194 Generating documents and code (weaving and tangling)
22197 \begin_layout Paragraph
22198 Using the noweb module
22201 \begin_layout Standard
22202 If you have installed Noweb and LyX successfully, whenever you open a new
22203 document, after you have chosen its document class, use the Document->Settings
22205 \begin_inset Quotes eld
22209 \begin_inset Quotes erd
22213 If Noweb is correctly installed, when you click on the
22214 \begin_inset Quotes eld
22218 \begin_inset Quotes erd
22221 link, you will see the
22222 \begin_inset Quotes eld
22226 \begin_inset Quotes erd
22229 module in the available list and you can add it to your document.
22232 \begin_layout Paragraph
22236 \begin_layout Standard
22237 LyX enables you to write code with a layout named
22238 \begin_inset Flex Noun
22241 \begin_layout Plain Layout
22248 Noweb delimits chunks like this:
22251 \begin_layout LyX-Code
22255 \begin_layout LyX-Code
22259 \begin_layout LyX-Code
22263 \begin_layout LyX-Code
22267 \begin_layout LyX-Code
22271 \begin_layout Standard
22272 The problem is that whatever is written in between the << and the
22276 must be taken literally, i.
22277 \begin_inset space \thinspace{}
22281 \begin_inset space \space{}
22284 LyX should be prevented from making any special interpretation of what has
22286 This is also handled by
22287 \begin_inset Flex Noun
22290 \begin_layout Plain Layout
22296 , that works like a normal paragraph but has a free spacing capability.
22299 \begin_layout Standard
22300 As a special note, you can also use the
22301 \begin_inset Quotes eld
22305 \begin_inset Quotes erd
22308 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22312 \begin_layout LyX-Code
22316 \begin_layout LyX-Code
22317 def some_function(args):
22320 \begin_layout LyX-Code
22321 "This is the doc string for this function."
22324 \begin_layout LyX-Code
22325 print "My args: ", args
22328 \begin_layout LyX-Code
22329 @ %def some_function
22332 \begin_layout Standard
22333 For an example of this usage and the resulting cross-reference output, look
22334 at the Literate python program in
22336 LIBDIR/examples/listerrors.lyx
22338 which should make this all clear.
22341 \begin_layout Paragraph
22342 Generating the documentation
22345 \begin_layout Standard
22346 At this point you already have a new document file with a proper document
22347 class, and with some code and text on it.
22348 How do I print it? The answer is simple, you select
22350 View\SpecialChar \menuseparator
22354 Just like you would do for a plain document.
22355 No special procedure is required.
22358 \begin_layout Standard
22359 To help orientate you, I will now explain what happens inside LyX:
22362 \begin_layout Enumerate
22365 Update\SpecialChar \menuseparator
22368 menu option is chosen, a LaTeX file is generated.
22373 \begin_layout Standard
22374 If the document is of any literate class the generated file will be named
22375 with an extension name defined by the
22376 \begin_inset Quotes eld
22380 \begin_inset Quotes erd
22383 format (defined in the Preferences panel), otherwise the file will have
22392 \begin_layout Enumerate
22393 Note that the only difference so far is in the name of the file, no special
22394 processing is required by LyX.
22395 Given that you formatted the code using the
22396 \begin_inset Flex Noun
22399 \begin_layout Plain Layout
22405 layout that, by itself, takes care of the business.
22408 \begin_layout Enumerate
22409 If the document is of any literate class LyX will then use the internal
22410 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22414 \begin_layout Plain Layout
22415 The converters are defined in the
22417 Tools\SpecialChar \menuseparator
22421 \begin_inset Quotes eld
22425 \begin_inset Quotes erd
22437 manual for general information about converters.
22442 to generate the LaTeX file.
22446 \begin_layout Standard
22447 Otherwise it will just skip this step.
22451 \begin_layout Enumerate
22452 Finally, LaTeX is invoked and the regular post processing continues as in
22456 \begin_layout Standard
22457 Independence from a particular
22458 \begin_inset Quotes eld
22462 \begin_inset Quotes erd
22465 is easily achieved by changing the commands that are run by the various
22469 \begin_layout Paragraph
22470 Generating the code
22473 \begin_layout Standard
22474 When the build menu option is chosen or the corresponding button in the
22475 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22476 Next, LyX invokes the
22481 This converter needs to be defined by the user and is not installed by
22482 default, though the Program format is.
22483 This converter (like any other converter) will have two parts:
22486 \begin_layout Enumerate
22487 The converter program itself.
22488 This program performs the conversion from the one format to the other (in
22489 this case, from the Noweb format to the Program pseudo-format).
22492 \begin_layout Enumerate
22493 The error log parser.
22494 This is a program whose sole purpose is to rewrite error messages in a
22495 format that LyX understands.
22496 This makes it possible for LyX to place error boxes in the right places
22497 in the file buffer.
22500 \begin_layout Standard
22501 The first part, the
22502 \begin_inset Quotes eld
22506 \begin_inset Quotes erd
22509 setting, should be set to
22510 \begin_inset Newline newline
22514 \begin_inset Quotes eld
22522 \begin_inset Quotes erd
22526 \begin_inset Newline newline
22529 This basically means that LyX will call
22530 \begin_inset Quotes eld
22534 \begin_inset Quotes erd
22537 (a program or script) with the name of the Noweb file (normally a file
22538 in the LyX temp directory) and the directory path of the original LyX file.
22542 \begin_layout Standard
22543 This is an implementation of
22544 \begin_inset Quotes eld
22548 \begin_inset Quotes erd
22551 that you can place in a directory on your path:
22554 \begin_layout Standard
22555 \begin_inset VSpace defskip
22561 \begin_layout Standard
22562 \begin_inset Newpage pagebreak
22568 \begin_layout Standard
22574 \begin_layout Standard
22580 \begin_layout Standard
22583 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22586 \begin_layout Standard
22587 \begin_inset VSpace defskip
22593 \begin_layout Standard
22594 The next part of the converter setting is the
22595 \begin_inset Quotes eld
22599 \begin_inset Quotes erd
22602 which is to be set to
22603 \begin_inset Newline newline
22607 \begin_inset Quotes eld
22612 parselog=$$s/scripts/listerrors
22615 \begin_inset Quotes erd
22619 \begin_inset Newline newline
22622 This will run any errors that are generated by the
22623 \begin_inset Quotes eld
22627 \begin_inset Quotes erd
22630 process through the
22631 \begin_inset Quotes eld
22635 \begin_inset Quotes erd
22641 \begin_layout Standard
22642 The build will normally take place in LyX's temporary directory, so the
22643 files produced by the conversion will be in that directory.
22644 LyX will copy out what it regards as the `main' file, but the
22648 conversion may produce several files, and so most of these would then be
22649 deleted when LyX was closed.
22650 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22651 the build-script chunk can place the generated files in that location.
22654 \begin_layout Paragraph
22655 Build instructions in the document
22658 \begin_layout Standard
22659 The last piece of the integration between LyX and noweb is the
22660 \begin_inset Quotes eld
22664 \begin_inset Quotes erd
22668 Generally, the instructions for building your program should be embedded
22669 in a chunk of its own.
22671 \begin_inset Quotes eld
22675 \begin_inset Quotes erd
22678 above uses the notangle command to look for this chunk (called
22679 \begin_inset Quotes eld
22683 \begin_inset Quotes erd
22686 ) and runs its contents through
22687 \begin_inset Quotes eld
22691 \begin_inset Quotes erd
22697 \begin_layout Standard
22698 Typically, such a chunk would look something like this:
22701 \begin_layout LyX-Code
22705 \begin_layout LyX-Code
22707 \begin_inset Newline newline
22710 if [ -z "${NOWEB_SOURCE}" ]
22711 \begin_inset Newline newline
22717 \begin_layout LyX-Code
22718 NOWEB_SOURCE=myfile.nw
22719 \begin_inset Newline newline
22723 \begin_inset Newline newline
22727 code to extract files ...
22728 use NOWEB_OUTPUT_DIR here ...]
22729 \begin_inset Newline newline
22733 code to compile files ...]
22734 \begin_inset Newline newline
22740 \begin_layout Standard
22743 LIBDIR/examples/listerrors.lyx
22747 LIBDIR/examples/Literate.lyx
22749 which implement two versions of the
22750 \begin_inset Quotes eld
22754 \begin_inset Quotes erd
22757 program for some illustrations of how all of these pieces go together or
22760 LIBDIR/examples/noweb2lyx.lyx.
22763 Interestingly, these three files show off the language-indepence of the
22764 LyX literate programming support since they are written in Python, C and
22768 \begin_layout Subsubsection
22772 \begin_layout Standard
22773 All the Literate Programming support is configured by the
22775 Tools\SpecialChar \menuseparator
22779 \begin_inset Quotes eld
22783 \begin_inset Quotes erd
22787 The important parts are:
22790 \begin_layout Description
22792 \begin_inset space ~
22796 \begin_inset Quotes eld
22800 \begin_inset Quotes erd
22804 \begin_inset space ~
22807 format Set up via the File Formats tab, this is where the Noweb-specific
22817 , the file extension is set to
22822 This tells LyX to create a file with a
22826 extension in the first step of the conversion process.
22829 \begin_layout Description
22831 \begin_inset space ~
22839 \begin_inset space ~
22842 format This is an empty format whose sole purpose is to be the endpoint
22843 of a conversion (which then allows us to set up a converter for it).
22846 \begin_layout Description
22855 This converter performs the
22856 \begin_inset Quotes eld
22860 \begin_inset Quotes erd
22863 of the literate document.
22864 For Noweb, it is set to
22865 \begin_inset Quotes eld
22870 noweave -delay -index $$i > $$o
22873 \begin_inset Quotes erd
22879 \begin_layout Description
22889 \begin_inset Quotes eld
22893 \begin_inset Quotes erd
22897 As stated above, the Converter is set to
22898 \begin_inset Quotes eld
22906 \begin_inset Quotes erd
22909 , with Flags set to
22910 \begin_inset Newline newline
22914 \begin_inset Quotes eld
22919 parselog=$$s/scripts/listerrors
22922 \begin_inset Quotes erd
22928 \begin_layout Subsubsection
22932 \begin_layout Standard
22933 There is also a new function implemented in the LyX server, the
22934 \begin_inset Quotes eld
22937 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22941 \begin_layout Standard
22942 When debugging code with ddd/gdb, it is possible to invoke a text editor
22943 at the current execution position with a single key stroke.
22944 The default ddd configuration for that is shift-ctrl-V.
22945 It happens that you can define the editor command line invocation in ddd
22948 Edit\SpecialChar \menuseparator
22949 Preferences\SpecialChar \menuseparator
22952 dialog and changing the "Edit Sources" entry.
22955 \begin_layout Standard
22956 I take advantage of the newly created LyX server function and this ddd feature,
22958 \begin_inset Quotes eld
22962 \begin_inset Quotes erd
22968 \begin_layout Standard
22969 \begin_inset VSpace defskip
22975 \begin_layout Standard
22978 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22981 \begin_layout Standard
22982 \begin_inset VSpace defskip
22988 \begin_layout Standard
22989 With this, whenever you are using ddd and find a point in the program that
22990 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22991 ddd will forward this information to LyX through the LyX server and then
22992 the LyX window will show the same file with the cursor at the same position
22993 ddd was pointing to.
22994 No more guessing or long scrolling to locate a point in the program back
22998 \begin_layout Standard
22999 Note however that you must enable the LyX server to get this feature working
23000 (it is disabled by default).
23001 You can enable it in
23013 ) by entering in the
23018 \begin_inset Quotes eld
23023 /home/<your-home-directory>/.lyx/lyxpipe
23026 \begin_inset Quotes erd
23032 \begin_layout Standard
23033 Read the LyX server documentation in the
23035 Customization Manual
23037 for further information.
23040 \begin_layout Subsubsection
23044 \begin_layout Standard
23045 There are six new buttons that can be added to your LyX toolbar.
23046 Five of these buttons are short cuts to layout styles:
23067 The last one is a short cut to the
23068 \begin_inset Quotes eld
23072 \begin_inset Quotes erd
23079 \begin_layout Standard
23080 LyX has a range of buttons that are available for tool bar customization.
23081 In my toolbar I like to combine the six short cuts above with two more:
23086 \SpecialChar \menuseparator
23091 \SpecialChar \menuseparator
23098 View\SpecialChar \menuseparator
23102 Here is how it looks like:
23105 \begin_layout LyX-Code
23109 \begin_layout LyX-Code
23113 \begin_layout LyX-Code
23114 Icon "layout Standard"
23117 \begin_layout LyX-Code
23118 Icon "layout Section"
23121 \begin_layout LyX-Code
23122 Icon "layout LaTeX"
23125 \begin_layout LyX-Code
23126 Icon "layout LyX-Code"
23129 \begin_layout LyX-Code
23130 Icon "layout Chunk"
23133 \begin_layout LyX-Code
23137 \begin_layout LyX-Code
23141 \begin_layout LyX-Code
23142 Icon "buffer-typeset"
23145 \begin_layout LyX-Code
23146 Icon "build-program"
23149 \begin_layout LyX-Code
23153 \begin_layout LyX-Code
23157 \begin_layout LyX-Code
23161 \begin_layout LyX-Code
23165 \begin_layout LyX-Code
23169 \begin_layout Subsubsection
23170 Colors customization
23173 \begin_layout Standard
23174 There are a number of colors in LyX that can be customized in
23179 One of the things that bothers people is the LaTeX font color.
23180 The default color is red, since the chunks uses LaTeX font, and there is
23181 a lot of chunks in literate documents, you may get tired of seeing everything
23183 You can change it by going to the tabs
23192 \begin_layout Standard
23193 The next thing is the visible presence of the newline character in the screen.
23194 You can choose the color of this particular character and make it blend
23196 I recommend you choosing a color that is close to the background but not
23197 equal, that way you still can see it is there, but it is not bothering
23201 \begin_layout Subsection
23202 LyX and knitr/Sweave
23205 \begin_layout Standard
23214 is documented in the
23218 example file and in the Sweave manual (menu
23220 Help\SpecialChar \menuseparator
23226 \begin_layout Chapter
23230 \begin_layout Standard
23231 You can do everything with LyX that you can do with LaTeX.
23232 However, LyX cannot support every LaTeX feature directly.
23233 But you can always use TeX Code.
23234 This chapter shows you some more special things you might want to use.
23235 For other special things you can do with figures, tables, floats, boxes
23236 and notes, have a look at the
23239 \begin_inset space ~
23247 \begin_layout Section
23248 Multiple Text Columns
23251 \begin_layout Standard
23252 This feature is independent of the option
23254 Two-column document
23256 in the document settings under
23261 If you want to have 2
23262 \begin_inset space ~
23265 columns for the whole document, it is recommended to use the
23267 Two-column document
23270 For all other cases use this feature.
23273 \begin_layout Standard
23274 To use multiple text columns in your document, you have to load the module
23281 Document\SpecialChar \menuseparator
23282 Settings\SpecialChar \menuseparator
23285 ) and must have the LaTeX-package
23292 \begin_layout Standard
23293 Footnotes within multiple columns will be placed at the bottom of the page
23294 and not under each column.
23295 Within the different columns you can use everything, with the limitation
23296 that for floats you need to use the float option
23303 \begin_layout Subsection
23307 \begin_layout Standard
23308 If you want to have 2
23309 \begin_inset space ~
23312 columns in your text, insert a multicolumn inset via the menu
23314 Insert\SpecialChar \menuseparator
23316 \begin_inset space ~
23319 Insets\SpecialChar \menuseparator
23321 \begin_inset space ~
23326 where the columns should start.
23327 Write all text that should be printed in 2
23328 \begin_inset space ~
23331 columns into this inset.
23334 \begin_layout Standard
23335 Here is an example:
23338 \begin_layout Standard
23340 \begin_inset Flex Multiple Columns
23343 \begin_layout Plain Layout
23348 The Adventure of the Empty House
23351 \begin_inset Newline newline
23354 by Sir Arthur Conan Doyle
23357 \begin_layout Plain Layout
23360 It was in the spring of the year 1894 that all London was interested, and
23361 the fashionable world dismayed, by the murder of the Honourable Ronald
23362 Adair under most unusual and inexplicable circumstances.
23363 The public has already learned those particulars of the crime which came
23364 out in the police investigation, but a good deal was suppressed upon that
23365 occasion, since the case for the prosecution was so overwhelmingly strong
23366 that it was not necessary to bring forward all the facts.
23367 Only now, at the end of nearly ten years, am I allowed to supply those
23368 missing links which make up the whole of that remarkable chain.
23369 The crime was of interest in itself, but that interest was as nothing to
23370 me compared to the inconceivable sequel, which afforded me the greatest
23371 shock and surprise of any event in my adventurous life.
23372 Even now, after this long interval, I find myself thrilling as I think
23373 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23374 ty which utterly submerged my mind.
23375 Let me say to that public, which has shown some interest in those glimpses
23376 which I have occasionally given them of the thoughts and actions of a very
23377 remarkable man, that they are not to blame me if I have not shared my knowledge
23378 with them, for I should have considered it my first duty to do so, had
23379 I not been barred by a positive prohibition from his own lips, which was
23380 only withdrawn upon the third of last month.
23388 \begin_layout Standard
23389 To get 3 or more columns, set the cursor into the multicolumn inset and
23392 Insert\SpecialChar \menuseparator
23394 \begin_inset space ~
23398 \begin_inset space ~
23404 The number of the desired columns is written into that inset (for 3
23405 \begin_inset space ~
23409 \begin_inset Quotes eld
23413 \begin_inset Quotes erd
23417 \begin_inset Newline newline
23420 Here is an example with 3
23421 \begin_inset space ~
23427 \begin_layout Standard
23428 \begin_inset Flex Multiple Columns
23431 \begin_layout Plain Layout
23434 \begin_inset Argument 1
23437 \begin_layout Plain Layout
23443 It can be imagined that my close intimacy with Sherlock Holmes had interested
23444 me deeply in crime, and that after his disappearance I never failed to
23445 read with care the various problems which came before the public.
23446 And I even attempted, more than once, for my own private satisfaction,
23447 to employ his methods in their solution, though with indifferent success.
23448 There was none, however, which appealed to me like this tragedy of Ronald
23450 As I read the evidence at the inquest, which led up to a verdict of willful
23451 murder against some person or persons unknown, I realized more clearly
23452 than I had ever done the loss which the community had sustained by the
23453 death of Sherlock Holmes.
23454 There were points about this strange business which would, I was sure,
23455 have specially appealed to him, and the efforts of the police would have
23456 been supplemented, or more probably anticipated, by the trained observation
23457 and the alert mind of the first criminal agent in Europe.
23458 All day, as I drove upon my round, I turned over the case in my mind and
23459 found no explanation which appeared to me to be adequate.
23460 At the risk of telling a twice-told tale, I will recapitulate the facts
23461 as they were known to the public at the conclusion of the inquest.
23469 \begin_layout Standard
23470 You can have up to 10
23471 \begin_inset space ~
23474 columns if you want to, but that might not be very pleasant for the readers
23478 \begin_layout Standard
23479 \begin_inset Newpage newpage
23485 \begin_layout Subsection
23486 Columns inside Columns
23489 \begin_layout Standard
23490 You can also have columns inside columns:
23493 \begin_layout Standard
23494 \begin_inset Flex Multiple Columns
23497 \begin_layout Plain Layout
23500 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23501 at that time governor of one of the Australian colonies.
23502 Adair's mother had returned from Australia to undergo the operation for
23503 cataract, and she, her son Ronald, and her daughter Hilda were living together
23507 \begin_layout Plain Layout
23508 \begin_inset Flex Multiple Columns
23511 \begin_layout Plain Layout
23514 The youth moved in the best society–had, so far as was known, no enemies
23515 and no particular vices.
23516 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23517 had been broken off by mutual consent some months before, and there was
23518 no sign that it had left any very profound feeling behind it.
23519 For the rest {sic} the man's life moved in a narrow and conventional circle,
23520 for his habits were quiet and his nature unemotional.
23521 Yet it was upon this easy-going young aristocrat that death came, in most
23522 strange and unexpected form, between the hours of ten and eleven-twenty
23523 on the night of March 30, 1894.
23531 \begin_layout Plain Layout
23534 Ronald Adair was fond of cards–playing continually, but never for such stakes
23536 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23537 It was shown that, after dinner on the day of his death, he had played
23538 a rubber of whist at the latter club.
23539 He had also played there in the afternoon.
23544 The evidence of those who had played with him– Mr.
23545 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23546 and that there was a fairly equal fall of the cards.
23547 Adair might have lost five pounds, but not more.
23548 His fortune was a considerable one, and such a loss could not in any way
23550 He had played nearly every day at one club or other, but he was a cautious
23551 player, and usually rose a winner.
23552 It came out in evidence that, in partnership with Colonel Moran, he had
23553 actually won as much as four hundred and twenty pounds in a sitting, some
23554 weeks before, from Godfrey Milner and Lord Balmoral.
23555 So much for his recent history as it came out at the inquest.
23563 \begin_layout Subsection
23567 \begin_layout Standard
23568 The examples in this section show some more special features of multiple
23572 \begin_layout Standard
23573 For more features of multiple columns, have a look at the documentation
23574 of the LaTeX-package
23579 \begin_inset CommandInset citation
23588 \begin_layout Subsubsection
23592 \begin_layout Standard
23593 To add a preface text for multiple columns, set the cursor into the multicolumn
23594 inset and use the menu
23596 Insert\SpecialChar \menuseparator
23600 Write your preface text into that inset.
23601 \begin_inset Newline newline
23604 This is an example with some preface text:
23607 \begin_layout Standard
23608 \begin_inset VSpace bigskip
23614 \begin_layout Standard
23615 \begin_inset Flex Multiple Columns
23618 \begin_layout Plain Layout
23619 \begin_inset Argument 2
23622 \begin_layout Plain Layout
23623 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23631 On the evening of the crime, he returned from the club exactly at ten.
23632 His mother and sister were out spending the evening with a relation.
23633 The servant deposed that she heard him enter the front room on the second
23634 floor, generally used as his sitting-room.
23635 She had lit a fire there, and as it smoked she had opened the window.
23636 No sound was heard from the room until eleven-twenty, the hour of the return
23637 of Lady Maynooth and her daughter.
23638 Desiring to say good-night, she attempted to enter her son's room.
23639 The door was locked on the inside, and no answer could be got to their
23640 cries and knocking.
23641 Help was obtained, and the door forced.
23642 The unfortunate young man was found lying near the table.
23643 His head had been horribly mutilated by an expanding revolver bullet, but
23644 no weapon of any sort was to be found in the room.
23652 \begin_layout Standard
23653 You can also use a section heading as the preface if you use a section command
23655 For example the command
23658 \begin_layout Standard
23663 subsection{subsection title}
23666 \begin_layout Standard
23667 creates a subsection.
23668 In this example the preface is a subsubsection:
23671 \begin_layout Standard
23672 \begin_inset Flex Multiple Columns
23675 \begin_layout Plain Layout
23676 \begin_inset Argument 2
23679 \begin_layout Plain Layout
23683 \begin_layout Plain Layout
23692 This is a subsubsection heading as a preface
23696 \begin_layout Plain Layout
23710 A minute examination of the circumstances served only to make the case more
23712 In the first place, no reason could be given why the young man should have
23713 fastened the door upon the inside.
23714 There was the possibility that the murderer had done this, and had afterwards
23715 escaped by the window.
23716 The drop was at least twenty feet, however, and a bed of crocuses in full
23718 Neither the flowers nor the earth showed any sign of having been disturbed,
23719 nor were there any marks upon the narrow strip of grass which separated
23720 the house from the road.
23721 Apparently, therefore, it was the young man himself who had fastened the
23723 But how did he come by his death? No one could have climbed up to the window
23724 without leaving traces.
23725 Suppose a man had fired through the window, he would indeed be a remarkable
23726 shot who could with a revolver inflict so deadly a wound.
23727 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23728 a hundred yards of the house.
23729 No one had heard a shot.
23737 \begin_layout Standard
23738 If there is less vertical space than 6
23739 \begin_inset space ~
23742 text lines is left on the page at the beginning of the multiple columns,
23743 a page break will be inserted before the multiple columns.
23744 Depending on the number of lines of the preface text, you might want to
23746 This is done by setting the cursor into the mulitcolumn inset behind the
23747 preface (if there is any) and using the menu
23749 Insert\SpecialChar \menuseparator
23751 \begin_inset space ~
23755 \begin_inset space ~
23759 \begin_inset space ~
23765 Insert into that inset the amount of space like e.
23766 \begin_inset space \thinspace{}
23770 \begin_inset space \space{}
23774 \begin_inset Quotes eld
23778 \begin_inset Quotes erd
23782 \begin_inset Newline newline
23785 In this example the space is set to 7
23786 \begin_inset space ~
23789 text lines by using
23790 \begin_inset Quotes eld
23796 \begin_inset Quotes erd
23805 needs to be inserted as TeX code):
23808 \begin_layout Standard
23809 \begin_inset Flex Multiple Columns
23812 \begin_layout Plain Layout
23813 \begin_inset Argument 3
23816 \begin_layout Plain Layout
23821 \begin_layout Plain Layout
23837 On the evening of the crime, he returned from the club exactly at ten.
23838 His mother and sister were out spending the evening with a relation.
23839 The servant deposed that she heard him enter the front room on the second
23840 floor, generally used as his sitting-room.
23841 She had lit a fire there, and as it smoked she had opened the window.
23842 No sound was heard from the room until eleven-twenty, the hour of the return
23843 of Lady Maynooth and her daughter.
23844 Desiring to say good-night, she attempted to enter her son's room.
23845 The door was locked on the inside, and no answer could be got to their
23846 cries and knocking.
23847 Help was obtained, and the door forced.
23848 The unfortunate young man was found lying near the table.
23849 His head had been horribly mutilated by an expanding revolver bullet, but
23850 no weapon of any sort was to be found in the room.
23858 \begin_layout Subsubsection
23862 \begin_layout Standard
23863 The amount of space before and after multiple columns can be changed by
23864 changing the length
23871 For example the command
23874 \begin_layout Standard
23884 \begin_layout Standard
23885 in TeX Code changes its value to 3
23886 \begin_inset space \thinspace{}
23890 The change must be made before the multiple columns' start.
23891 The predefined value is 13
23892 \begin_inset space \thinspace{}
23898 \begin_layout Standard
23906 \begin_inset space \thinspace{}
23912 \begin_layout Standard
23916 \begin_layout Plain Layout
23922 multicolsep}{2.5cm}
23930 \begin_layout Standard
23931 \begin_inset Flex Multiple Columns
23934 \begin_layout Plain Layout
23937 All day I turned these facts over in my mind, endeavouring to hit upon some
23938 theory which could reconcile them all, and to find that line of least resistanc
23939 e which my poor friend had declared to be the starting-point of every investigat
23941 I confess that I made little progress.
23942 In the evening I strolled across the Park, and found myself about six o'clock
23943 at the Oxford Street end of Park Lane.
23944 A group of loafers upon the pavements, all staring up at a particular window,
23945 directed me to the house which I had come to see.
23946 A tall, thin man with coloured glasses, whom I strongly suspected of being
23947 a plain-clothes detective, was pointing out some theory of his own, while
23948 the others crowded round to listen to what he said.
23949 I got as near him as I could, but his observations seemed to me to be absurd,
23950 so I withdrew again in some disgust.
23951 As I did so I struck against an elderly, deformed man, who had been behind
23952 me, and I knocked down several books which he was carrying.
23960 \begin_layout Standard
23961 \begin_inset Note Greyedout
23964 \begin_layout Plain Layout
23969 The values you set with
23975 will be used for all following multiple columns until you change them again.
23983 \begin_layout Standard
23987 \begin_layout Plain Layout
23999 \begin_inset Note Note
24002 \begin_layout Plain Layout
24003 go back to the default
24011 \begin_layout Standard
24012 \begin_inset Newpage newpage
24018 \begin_layout Subsubsection
24022 \begin_layout Standard
24023 A column break can be forced by inserting the command
24029 as TeX-Code to that position in the text where the column should be broken.
24030 Note that this leads in most cases to whitespace in the text.
24031 \begin_inset Newline newline
24034 Here is an example:
24037 \begin_layout Standard
24038 \begin_inset Flex Multiple Columns
24041 \begin_layout Plain Layout
24044 \begin_inset Quotes eld
24047 You're surprised to see me, sir,
24048 \begin_inset Quotes erd
24051 said he, in a strange, croaking voice.
24054 \begin_layout Plain Layout
24057 I acknowledged that I was.
24060 \begin_layout Plain Layout
24063 \begin_inset Quotes eld
24066 Well, I've a conscience, sir, and when I chanced to see you go into this
24067 house, as I came hobbling after you, I thought to myself, I'll just step
24068 in and see that kind gentleman, and tell him that if I was a bit gruff
24069 in my manner there was not any harm meant, and that I am much obliged to
24070 him for picking up my books.
24071 \begin_inset Quotes erd
24077 \begin_layout Plain Layout
24080 \begin_inset Quotes eld
24083 You make too much of a trifle,
24084 \begin_inset Quotes erd
24089 \begin_inset Quotes eld
24092 May I ask how you knew who I was?
24093 \begin_inset Quotes erd
24096 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24100 \begin_layout Plain Layout
24112 \begin_layout Plain Layout
24115 \begin_inset Quotes eld
24118 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24119 you'll find my little bookshop at the corner of Church Street, and very
24120 happy to see you, I am sure.
24121 Maybe you collect yourself, sir.
24125 \begin_inset space ~
24138 --a bargain, every one of them.
24139 With five volumes you could just fill that gap on that second shelf.
24140 It looks untidy, does it not, sir?
24141 \begin_inset Quotes erd
24152 \begin_layout Subsubsection
24156 \begin_layout Standard
24157 The width of the columns is automatically calculated, but you can modify
24158 the space between the columns.
24159 This is done by changing the length
24166 Its predefined value is 10
24167 \begin_inset space \thinspace{}
24171 Here is an example where
24178 \begin_inset space \thinspace{}
24184 \begin_layout Standard
24188 \begin_layout Plain Layout
24202 \begin_layout Standard
24203 \begin_inset Flex Multiple Columns
24206 \begin_layout Plain Layout
24209 My observations of No.
24210 \begin_inset space \space{}
24213 427 Park Lane did little to clear up the problem in which I was interested.
24214 The house was separated from the street by a low wall and railing, the
24215 whole not more than five feet high.
24216 It was perfectly easy, therefore, for anyone to get into the garden, but
24217 the window was entirely inaccessible, since there was no water pipe or
24218 anything which could help the most active man to climb it.
24219 More puzzled than ever, I retraced my steps to Kensington.
24220 I had not been in my study five minutes when the maid entered to say that
24221 a person desired to see me.
24222 To my astonishment it was none other than my strange old book collector,
24223 his sharp, wizened face peering out from a frame of white hair, and his
24224 precious volumes, a dozen of them at least, wedged under his right arm.
24232 \begin_layout Standard
24236 \begin_layout Plain Layout
24248 \begin_inset Note Note
24251 \begin_layout Plain Layout
24252 go back to the default
24260 \begin_layout Subsubsection
24264 \begin_layout Standard
24265 Between the columns a rule with a width of the length
24272 If this rule width is set to 0
24273 \begin_inset space \thinspace{}
24276 pt (this is the default), the rule is suppressed.
24277 In the following example the rule is 2
24278 \begin_inset space \thinspace{}
24284 \begin_layout Standard
24288 \begin_layout Plain Layout
24294 columnseprule}{2pt}
24302 \begin_layout Standard
24303 \begin_inset Flex Multiple Columns
24306 \begin_layout Plain Layout
24309 \begin_inset Quotes eld
24312 You're surprised to see me, sir,
24313 \begin_inset Quotes erd
24316 said he, in a strange, croaking voice.
24319 \begin_layout Plain Layout
24322 I acknowledged that I was.
24325 \begin_layout Plain Layout
24328 \begin_inset Quotes eld
24331 Well, I've a conscience, sir, and when I chanced to see you go into this
24332 house, as I came hobbling after you, I thought to myself, I'll just step
24333 in and see that kind gentleman, and tell him that if I was a bit gruff
24334 in my manner there was not any harm meant, and that I am much obliged to
24335 him for picking up my books.
24336 \begin_inset Quotes erd
24342 \begin_layout Plain Layout
24345 \begin_inset Quotes eld
24348 You make too much of a trifle,
24349 \begin_inset Quotes erd
24354 \begin_inset Quotes eld
24357 May I ask how you knew who I was?
24358 \begin_inset Quotes erd
24364 \begin_layout Plain Layout
24367 \begin_inset Quotes eld
24370 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24371 you'll find my little bookshop at the corner of Church Street, and very
24372 happy to see you, I am sure.
24373 Maybe you collect yourself, sir.
24377 \begin_inset space ~
24390 --a bargain, every one of them.
24391 With five volumes you could just fill that gap on that second shelf.
24392 It looks untidy, does it not, sir?
24393 \begin_inset Quotes erd
24404 \begin_layout Standard
24405 \begin_inset VSpace defskip
24411 \begin_layout Standard
24412 The rule can be colored by redefining the command
24419 This is done by inserting the command
24420 \begin_inset Newline newline
24429 columnseprulecolor}{
24434 \begin_inset Newline newline
24437 as TeX-Code before the multicolumn inset.
24442 in this command by a color of your choice.
24443 You can use all pre- and self-defined colors.
24451 \begin_inset space ~
24456 for more information about pre- and self-defined colors.
24457 To go back to the default color insert the command
24458 \begin_inset Newline newline
24467 columnseprulecolor}{
24472 \begin_inset Newline newline
24475 Here is the example with a cyan rule and 1
24476 \begin_inset space \thinspace{}
24479 cm column separation:
24482 \begin_layout Standard
24486 \begin_layout Plain Layout
24495 \begin_layout Plain Layout
24501 columnseprulecolor}{
24511 \begin_layout Standard
24512 \begin_inset Flex Multiple Columns
24515 \begin_layout Plain Layout
24518 \begin_inset Quotes eld
24521 You're surprised to see me, sir,
24522 \begin_inset Quotes erd
24525 said he, in a strange, croaking voice.
24528 \begin_layout Plain Layout
24531 I acknowledged that I was.
24534 \begin_layout Plain Layout
24537 \begin_inset Quotes eld
24540 Well, I've a conscience, sir, and when I chanced to see you go into this
24541 house, as I came hobbling after you, I thought to myself, I'll just step
24542 in and see that kind gentleman, and tell him that if I was a bit gruff
24543 in my manner there was not any harm meant, and that I am much obliged to
24544 him for picking up my books.
24545 \begin_inset Quotes erd
24551 \begin_layout Plain Layout
24554 \begin_inset Quotes eld
24557 You make too much of a trifle,
24558 \begin_inset Quotes erd
24563 \begin_inset Quotes eld
24566 May I ask how you knew who I was?
24567 \begin_inset Quotes erd
24573 \begin_layout Plain Layout
24576 \begin_inset Quotes eld
24579 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24580 you'll find my little bookshop at the corner of Church Street, and very
24581 happy to see you, I am sure.
24582 Maybe you collect yourself, sir.
24586 \begin_inset space ~
24599 --a bargain, every one of them.
24600 With five volumes you could just fill that gap on that second shelf.
24601 It looks untidy, does it not, sir?
24602 \begin_inset Quotes erd
24613 \begin_layout Standard
24617 \begin_layout Plain Layout
24623 columnseprule}{0pt}
24626 \begin_layout Plain Layout
24632 columnseprulecolor}{
24640 \begin_inset Note Note
24643 \begin_layout Plain Layout
24644 go back to the default
24652 \begin_layout Section
24653 Non-standard Paragraph Shapes
24656 \begin_layout Standard
24658 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24659 For special cases like for example posters, invitation cards or poems you
24660 can modify the paragraph shape to one of your choice.
24661 This can be done by using the LaTeX-package
24665 which is loaded by using in the document settings the module
24667 Custom paragraph shapes
24672 \begin_layout Subsection
24676 \begin_layout Standard
24681 provides the following shapes:
24684 \begin_layout Standard
24685 \begin_inset Tabular
24686 <lyxtabular version="3" rows="13" columns="3">
24687 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24688 <column alignment="center" valignment="middle" width="16col%">
24689 <column alignment="center" valignment="middle" width="40col%">
24690 <column alignment="center" valignment="middle" width="35col%">
24691 <row endhead="true">
24692 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24695 \begin_layout Plain Layout
24701 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24704 \begin_layout Plain Layout
24710 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24713 \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" usebox="none">
24733 \begin_layout Plain Layout
24734 Circle with circular hole (in the size of a CD/DVD)
24739 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24742 \begin_layout Plain Layout
24743 Cannot be scaled, take care there is not too much text
24750 <cell alignment="center" valignment="top" topline="true" usebox="none">
24753 \begin_layout Plain Layout
24759 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24762 \begin_layout Plain Layout
24768 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24771 \begin_layout Plain Layout
24772 Fragile, calculation might fail
24779 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24782 \begin_layout Plain Layout
24788 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24791 \begin_layout Plain Layout
24792 Rhomboid (symbolizing a
24793 \begin_inset Quotes eld
24797 \begin_inset Quotes erd
24805 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24808 \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" usebox="none">
24828 \begin_layout Plain Layout
24834 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24837 \begin_layout Plain Layout
24845 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24848 \begin_layout Plain Layout
24854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24857 \begin_layout Plain Layout
24863 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24866 \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" usebox="none">
24886 \begin_layout Plain Layout
24887 Nut for bolt (hexagon with circular hole)
24892 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24895 \begin_layout Plain Layout
24903 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24906 \begin_layout Plain Layout
24912 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24915 \begin_layout Plain Layout
24921 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24924 \begin_layout Plain Layout
24932 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24935 \begin_layout Plain Layout
24941 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24944 \begin_layout Plain Layout
24950 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24953 \begin_layout Plain Layout
24961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24964 \begin_layout Plain Layout
24970 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24973 \begin_layout Plain Layout
24979 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24982 \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" usebox="none">
25002 \begin_layout Plain Layout
25003 Normal/reversed rain drop
25008 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25011 \begin_layout Plain Layout
25012 Fragile, calculation might fail
25019 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25022 \begin_layout Plain Layout
25028 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25031 \begin_layout Plain Layout
25037 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25040 \begin_layout Plain Layout
25048 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25051 \begin_layout Plain Layout
25053 \begin_inset Newline newline
25061 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25064 \begin_layout Plain Layout
25065 Triangles in different orientations
25070 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25073 \begin_layout Plain Layout
25087 \begin_layout Standard
25088 To use a shape for your paragraph, simply select it in LyX's pull-down box
25089 for environments in the toolbar.
25092 \begin_layout Standard
25093 \begin_inset Newpage newpage
25099 \begin_layout Standard
25100 Here is an example paragraph in the shape of a nut:
25103 \begin_layout Standard
25104 \begin_inset VSpace bigskip
25113 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25114 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25116 At vero eos et accusam et justo duo dolores et ea rebum.
25117 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25119 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25120 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25124 \begin_layout Standard
25125 \begin_inset VSpace bigskip
25131 \begin_layout Standard
25132 \begin_inset Note Greyedout
25135 \begin_layout Plain Layout
25140 : shapepar paragraphs cannot run over a page break.
25148 \begin_layout Standard
25149 \begin_inset VSpace bigskip
25155 \begin_layout Standard
25160 takes care that the shape will always be preserved, no matter how much
25161 text is in the paragraph.
25162 Therefore the paragraph size changes with the amount of contained text.
25163 This can lead to paragraph sizes exceeding the page margins.
25164 To demonstrate the size scaling, here is the same example paragraph but
25165 with twice as much text:
25168 \begin_layout Standard
25169 \begin_inset Newpage newpage
25178 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25179 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25181 At vero eos et accusam et justo duo dolores et ea rebum.
25182 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25184 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25185 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25187 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25188 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25190 At vero eos et accusam et justo duo dolores et ea rebum.
25191 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25193 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25194 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25198 \begin_layout Standard
25199 \begin_inset VSpace bigskip
25205 \begin_layout Standard
25206 An exception is the shape
25211 It cannot be scaled because it must fit the size of a CD/DVD.
25212 Therefore the amount of text that fits into the shape is limited.
25213 \begin_inset Newline newline
25224 shape are fragile, meaning that the calculation of their size can fail,
25225 depending on the amount of text.
25226 You will then get the LaTeX error
25227 \begin_inset Quotes eld
25230 Arithmetic overflow
25231 \begin_inset Quotes erd
25235 In this case one can try to remove or add some text; if nothing works one
25236 has to use another shape.
25239 \begin_layout Standard
25240 \begin_inset VSpace bigskip
25246 \begin_layout Standard
25247 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25248 fails for text in the tips.
25249 Therefore it is often necessary to add hyphenation points
25254 arg "specialchar-insert hyphenation"
25259 ) to the corresponding text parts.
25262 \begin_layout Standard
25263 \begin_inset VSpace bigskip
25269 \begin_layout Standard
25270 Shapepar paragraphs are either always centered or placed on the page so
25271 that their left border touches the left page margin.
25272 You can therefore not use the paragraph dialog to align such paragraphs.
25273 A solution is to put the paragraph into a minipage or parbox and align
25275 The problem is hereby to find the right width for the box.
25276 Because if it is too wide and you center the box, the paragraph is not
25277 centered too because it sticks at the left side of the box.
25278 So you might have to play a bit with the width until it fits.
25279 Here are two heart-shaped paragraphs, the first one is not aligned, the
25280 second one is right-aligned:
25283 \begin_layout Standard
25284 \begin_inset Newpage newpage
25290 \begin_layout Heart
25295 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25296 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25298 At vero eos et accusam et justo duo dolores et ea rebum.
25299 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25303 \begin_layout Standard
25304 \begin_inset VSpace bigskip
25310 \begin_layout Standard
25313 \begin_inset Box Frameless
25323 height_special "totalheight"
25326 \begin_layout Heart
25331 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25332 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25334 At vero eos et accusam et justo duo dolores et ea rebum.
25335 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25344 \begin_layout Subsection
25348 \begin_layout Standard
25349 You can define any shape you want.
25350 Doing this manually is a lot of work because every coordinate must be specified.
25351 But there is a way to let the computer calculate the coordinates:
25354 \begin_layout Enumerate
25355 Install the program
25356 \begin_inset CommandInset href
25359 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25366 \begin_layout Enumerate
25377 \begin_layout Plain Layout
25388 \begin_layout Plain Layout
25395 eX\SpecialChar \menuseparator
25396 Settings\SpecialChar \menuseparator
25399 and select the font size you are using in your document.
25400 For example this document uses the size 12
25401 \begin_inset space \thinspace{}
25407 \begin_layout Enumerate
25411 \begin_layout Enumerate
25418 \begin_layout Plain Layout
25429 \begin_layout Plain Layout
25436 eX\SpecialChar \menuseparator
25439 to export the shape to coordinates.
25440 In the appearing dialog use either the outline of your shape for the coordinate
25441 s or the path itself.
25445 \begin_layout Plain Layout
25446 For more information see
25447 \begin_inset CommandInset href
25449 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25461 \begin_layout Standard
25462 The coordinates are written into a TeX-file.
25463 To use it for your LyX document
25466 \begin_layout Enumerate
25467 Place the cursor before the first character of your paragraph (or into a
25471 \begin_layout Enumerate
25472 Open in LyX the menu
25474 Insert\SpecialChar \menuseparator
25475 File\SpecialChar \menuseparator
25477 \begin_inset space ~
25482 , select the file and use
25491 \begin_layout Standard
25492 \begin_inset VSpace defskip
25498 \begin_layout Standard
25499 \begin_inset Note Greyedout
25502 \begin_layout Plain Layout
25507 : The changed shape only applies to the current paragraph; everything is
25508 reset to normal for the next paragraph.
25509 Therefore the shape definition file must be input into every paragraph
25510 with the desired shape.
25518 \begin_layout Standard
25519 \begin_inset VSpace bigskip
25525 \begin_layout Standard
25526 Here is an example:
25529 \begin_layout Standard
25530 \begin_inset VSpace bigskip
25536 \begin_layout Standard
25537 \begin_inset CommandInset include
25539 filename "SpecialParagraphShape.tex"
25545 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25546 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25548 At vero eos et accusam et justo duo dolores et ea rebum.
25549 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25551 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25552 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25556 \begin_layout Standard
25557 \begin_inset VSpace bigskip
25563 \begin_layout Standard
25568 to draw complexer shapes in
25572 you can draw the shape in a program of your choice and import the resulting
25578 Then you only need to draw a line or spline along the outline of the image.
25581 \begin_layout Standard
25582 \begin_inset VSpace bigskip
25588 \begin_layout Standard
25591 Custom paragraph shapes
25593 also provides the two commands
25601 which can be used to define custom shapes coordinate by coordinate.
25605 \begin_layout Plain Layout
25606 These commands are internally used for all shapes described here.
25611 For information how these styles are used and about further customization
25612 possibilities, have a look at the documentation of the package
25617 \begin_inset CommandInset citation
25626 \begin_layout Bibliography
25627 \begin_inset CommandInset bibitem
25628 LatexCommand bibitem
25633 Documentation of the LaTeX-package
25634 \begin_inset CommandInset href
25637 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25644 \begin_layout Bibliography
25645 \begin_inset CommandInset bibitem
25646 LatexCommand bibitem
25651 Documentation of the LaTeX-package
25652 \begin_inset CommandInset href
25655 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"