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
351 ), then look at the preamble of the resulting
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 You'll notice a variety of new macros defined specifically by LyX.
363 These macros are defined automatically, according to the features you use
367 \begin_layout Standard
368 There are several commands that automatically invoke LaTeX.
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
376 \begin_layout Plain Layout
377 Document\SpecialChar \menuseparator
386 \begin_layout Itemize
387 \begin_inset Flex MenuItem
390 \begin_layout Plain Layout
391 Document\SpecialChar \menuseparator
400 \begin_layout Itemize
401 \begin_inset Flex MenuItem
404 \begin_layout Plain Layout
405 File\SpecialChar \menuseparator
414 \begin_layout Itemize
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 File\SpecialChar \menuseparator
428 \begin_layout Standard
429 They will only invoke LaTeX if the file has changed since the last time
434 \begin_layout Standard
435 When LyX runs LaTeX on the file you're editing, it performs these steps:
438 \begin_layout Enumerate
439 Convert the document to LaTeX and save to a file with the extension
440 \begin_inset Flex Code
443 \begin_layout Plain Layout
450 \begin_inset Flex Code
453 \begin_layout Plain Layout
462 \begin_layout Enumerate
464 \begin_inset Flex Code
467 \begin_layout Plain Layout
473 file (maybe several times), and run any other commands (such as
474 \begin_inset Flex Code
477 \begin_layout Plain Layout
484 \begin_inset Flex Code
487 \begin_layout Plain Layout
493 ) needed to compile the LaTeX file.
496 \begin_layout Enumerate
497 If there are any errors, show the error log.
500 \begin_layout Standard
501 If you have run LaTeX using
502 \begin_inset Flex MenuItem
505 \begin_layout Plain Layout
508 \SpecialChar \menuseparator
516 , LyX then runs a DVI viewer to display the DVI-file.
518 \begin_inset Flex MenuItem
521 \begin_layout Plain Layout
524 \SpecialChar \menuseparator
532 , LyX performs further steps:
535 \begin_layout Itemize
537 \begin_inset Flex Code
540 \begin_layout Plain Layout
546 to convert the DVI file to PostScript.
549 \begin_layout Itemize
550 Run a PostScript viewer, such as
551 \begin_inset Flex Code
554 \begin_layout Plain Layout
560 , to display the PostScript file.
563 \begin_layout Standard
564 LyX does similar things when viewing, or exporting, other formats.
567 \begin_layout Section
568 Translating LaTeX files into LyX
571 \begin_layout Standard
572 You can import a LaTeX file into LyX by using the
573 \begin_inset Flex MenuItem
576 \begin_layout Plain Layout
577 File\SpecialChar \menuseparator
578 Import\SpecialChar \menuseparator
585 This will call a program named
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
595 which will create a file
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
606 \begin_inset Flex Code
609 \begin_layout Plain Layout
616 LyX will then open that file.
620 \begin_layout Plain Layout
621 \begin_inset Flex Code
624 \begin_layout Plain Layout
630 can also be run from the command line, of course.
638 \begin_layout Standard
639 \begin_inset Flex Code
642 \begin_layout Plain Layout
648 will translate most legal LaTeX, but not everything.
649 It will put things it doesn't understand into TeX code, so after translating
651 \begin_inset Flex Code
654 \begin_layout Plain Layout
660 , you can look for TeX code and hand-edit it until it looks right.
663 \begin_layout Standard
664 If you don't know what TeX code is, read the next section.
667 \begin_layout Section
668 \begin_inset CommandInset label
670 name "sec:Inserting-TeX-Code"
674 Inserting TeX Code into LyX Documents
677 \begin_layout Standard
678 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
679 You can always insert TeX code into any LyX document.
680 LyX cannot, and will never be able to, display every possible LaTeX construct.
681 If ever you need to insert LaTeX commands into your LyX document, you can
683 \begin_inset Flex Code
686 \begin_layout Plain Layout
692 box, which you can insert into your document with
693 \begin_inset Flex MenuItem
696 \begin_layout Plain Layout
697 Insert\SpecialChar \menuseparator
703 or the keyboard shortcut
712 \begin_layout Standard
713 Here's an example of inserting LaTeX commands in a LyX document.
714 The code looks like this:
717 \begin_layout LyX-Code
721 \begin_inset Newline newline
727 \begin_inset Newline newline
730 This is an example of a minipage environment.
732 \begin_inset Newline newline
735 can put nearly everything in it, even (non-floating)
736 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
751 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
774 \begin_inset Newline newline
780 \begin_inset Newline newline
786 \begin_inset Newline newline
792 \begin_inset Newline newline
800 \begin_layout LyX-Code
804 \begin_layout Standard
806 \begin_inset Flex Code
809 \begin_layout Plain Layout
815 box containing this text is directly after this paragraph.
816 Those of you reading the manual in LyX will only see the TeX code inset.
817 Those reading a printed version of the manuals will see the actual results:
818 \begin_inset VSpace bigskip
824 \begin_layout Standard
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
842 \begin_layout Plain Layout
844 This is an example of a minipage environment.
845 You can put nearly everything in it, even (non-floating) figures and tables.
849 \begin_layout Plain Layout
856 \begin_layout Plain Layout
861 \begin_layout Plain Layout
868 \begin_layout Plain Layout
875 \begin_layout Plain Layout
882 \begin_layout Plain Layout
888 \begin_layout Plain Layout
895 \begin_layout Plain Layout
902 \begin_layout Plain Layout
909 \begin_layout Plain Layout
919 \begin_inset VSpace bigskip
925 \begin_layout Standard
926 In addition to using TeX code, you can also create a separate file containing
927 some complex LaTeX structure and then use
928 \begin_inset Flex MenuItem
931 \begin_layout Plain Layout
932 Insert\SpecialChar \menuseparator
942 to include your file (you should select the type
943 \begin_inset Flex Code
946 \begin_layout Plain Layout
953 We recommend that you only do this if you have a
954 \begin_inset Flex Code
957 \begin_layout Plain Layout
968 Otherwise, you'll have a big job tracking down LaTeX errors.
971 \begin_layout Standard
972 There are a few last points to emphasize:
975 \begin_layout Itemize
980 check if your LaTeX code is correct.
983 \begin_layout Itemize
984 Beware of reinventing the wheel.
987 \begin_layout Standard
988 On that last point, LyX does have quite a few features tucked into it, and
990 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
991 feature before you decide you have to do it by hand.
992 Moreover, there are numerous LaTeX packages out there to do all sorts of
993 things, from labels to envelopes to fancy multipage tables.
995 \begin_inset CommandInset href
998 target "http://www.ctan.org/"
1005 \begin_layout Standard
1006 If you do need to do some wild and fancy things within your document, be
1007 sure to check out a good LaTeX book for assistance.
1008 There are a number of them listed in the bibliography of the
1015 \begin_layout Section
1016 LyX and the LaTeX Preamble
1019 \begin_layout Subsection
1020 About the LaTeX Preamble
1023 \begin_layout Standard
1024 If you already know LaTeX, there is no need to explain here what the preamble
1026 If you don't, the following will give you some ideas—we recommend again
1027 that you consult a LaTeX book for further information.
1028 In any case, you should read the points below, because they explain what
1029 you can do and what you don't need to do in the LaTeX preamble of a LyX
1033 \begin_layout Standard
1034 The LaTeX preamble comes at the very beginning of a document,
1042 \begin_layout Itemize
1043 Declare the document class.
1045 \begin_inset Newline newline
1048 LyX already does this for you.
1049 If you're a seasoned LaTeX-nician, and you have a custom document class
1050 you want to use, check out the
1052 Customization Manual
1054 for information on how to make LyX interface to it.
1057 \begin_layout Itemize
1058 Declare the usage of packages.
1060 \begin_inset Newline newline
1063 LaTeX packages provide special commands, which are only available within
1064 a document when the package has been declared in the preamble.
1065 In addition to providing special commands, the inclusion of a package can
1066 change the document.
1067 For example, the package
1068 \begin_inset Flex Code
1071 \begin_layout Plain Layout
1077 forces all paragraphs to be indented.
1078 There are other packages for labels, envelopes, margins, etc.
1082 \begin_layout Itemize
1083 Set counters, variables, lengths and widths.
1085 \begin_inset Newline newline
1088 There are several LaTeX counters and variables that
1092 be set globally from within the preamble in order to have the desired effect.
1093 (There are variables that you can set and reset inside the document, too.)
1094 Margins are a good example of something that must be set in the preamble.
1095 Another example is the label format for lists.
1096 You can actually set these just about anywhere, but it's best to do it
1097 just once, inside the preamble.
1100 \begin_layout Itemize
1101 Declare user defined commands (with
1102 \begin_inset Flex Code
1105 \begin_layout Plain Layout
1114 \begin_inset Flex Code
1117 \begin_layout Plain Layout
1126 \begin_inset Newline newline
1129 These are abbreviations for LaTeX commands which appear very often inside
1131 Although the preamble is a good place to declare such commands, they
1135 be declared anywhere (before they are used for the first time, of course).
1136 This can be useful if there is a lot of raw LaTeX code in your document,
1137 which normally should not be the case.
1140 \begin_layout Standard
1141 LyX adds its own set of definitions to the preamble of the
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1152 This makes LaTeX files generated by LyX portable.
1155 \begin_layout Subsection
1156 Changing the Preamble
1159 \begin_layout Standard
1160 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1161 can't change them without patching LyX itself.
1162 You can, however, add your own stuff to the preamble by selecting
1163 \begin_inset Flex MenuItem
1166 \begin_layout Plain Layout
1168 \begin_inset space ~
1177 \begin_inset Flex MenuItem
1180 \begin_layout Plain Layout
1181 Document\SpecialChar \menuseparator
1188 LyX adds anything in the
1189 \begin_inset Flex MenuItem
1192 \begin_layout Plain Layout
1198 dialog to its own built-in preamble.
1199 Before adding your own declarations in the preamble, you should make sure
1200 that LyX doesn't already support what you want to do.
1201 (Remember what we said about reinventing the wheel?) Also,
1203 make sure your preamble code is correct
1206 LyX doesn't check it for you.
1207 If there is an error, you're likely to get an error like
1208 \begin_inset Quotes eld
1212 \begin_inset Flex Code
1215 \begin_layout Plain Layout
1224 \begin_inset Quotes erd
1228 If you see this error, check your preamble.
1231 \begin_layout Subsection
1235 \begin_layout Standard
1236 Here are some examples of what you can add to a preamble, and what they
1240 \begin_layout Subsubsection
1244 \begin_layout Standard
1245 There are two variables under LaTeX that control page position:
1246 \begin_inset Flex Code
1249 \begin_layout Plain Layout
1258 \begin_inset Flex Code
1261 \begin_layout Plain Layout
1270 Their names should be self-explanatory.
1271 These variables are useful if you think for a moment about computer labels.
1272 Sometimes, the size of a print medium and the area of the medium that you
1273 can actually print on aren't the same.
1275 \begin_inset Flex Code
1278 \begin_layout Plain Layout
1287 \begin_inset Flex Code
1290 \begin_layout Plain Layout
1301 \begin_layout Standard
1302 The default values for
1303 \begin_inset Flex Code
1306 \begin_layout Plain Layout
1315 \begin_inset Flex Code
1318 \begin_layout Plain Layout
1327 \begin_inset space \thinspace{}
1331 \begin_inset space \thinspace{}
1335 \begin_inset space \space{}
1338 the page isn't shifted.
1339 Unfortunately, some DVI drivers always seem to shift the page.
1340 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1341 If you're using LyX on a system that you don't personally maintain, and
1342 your sysadmin is a doofus,
1343 \begin_inset Flex Code
1346 \begin_layout Plain Layout
1355 \begin_inset Flex Code
1358 \begin_layout Plain Layout
1367 Suppose your left and top margins are always 0.5
1368 \begin_inset space \thinspace{}
1372 You can add this to the preamble:
1375 \begin_layout LyX-Code
1383 \begin_layout LyX-Code
1391 \begin_layout Standard
1392 and your margins should now be correct.
1395 \begin_layout Subsubsection
1399 \begin_layout Standard
1400 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1401 There's a rather nice package, available at your nearest CTAN archive,
1402 for printing sheets of labels:
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Now, your system may not have this package installed by default.
1414 We leave that up to you to check.
1415 You'll also want to read the documentation for it; we're not going to do
1417 Since this is an example, however, we'll give you an example of how you
1421 \begin_layout Standard
1422 First, make sure you're using the
1423 \begin_inset Flex Code
1426 \begin_layout Plain Layout
1433 Next, you need to put the following in your preamble:
1436 \begin_layout LyX-Code
1442 \begin_layout LyX-Code
1448 \begin_layout LyX-Code
1454 \begin_layout LyX-Code
1460 \begin_layout LyX-Code
1466 \begin_layout LyX-Code
1472 \begin_layout LyX-Code
1478 \begin_layout Standard
1479 This sets things up for Avery label sheets, stock #5360.
1480 You're now ready to print labels, but you'll need to insert LaTeX code,
1481 placing the commands
1482 \begin_inset Flex Code
1485 \begin_layout Plain Layout
1494 \begin_inset Flex Code
1497 \begin_layout Plain Layout
1505 around each label text.
1506 This and other special features of
1507 \begin_inset Flex Code
1510 \begin_layout Plain Layout
1516 are explained in its documentation.
1519 \begin_layout Standard
1520 Someday, someone may write a LyX layout file to support this package directly.
1521 Maybe that someone is you.
1524 \begin_layout Subsubsection
1525 Example #3: Paragraph Indentation
1528 \begin_layout Standard
1529 Americans are trained to indent the first line of
1534 As with all of their other weird quirks, most Americans will whine and
1535 moan until they can have their way and indent the first line of all paragraphs.
1544 \begin_layout Standard
1545 Of course, this behavior isn't standard typography.
1546 In books, you typically only indent the first line of a paragraph
1550 it follows another one.
1551 The idea behind indenting the first line of a paragraph is to distinguish
1552 neighboring paragraphs from one another.
1553 If there is no previous paragraph—for example, if it follows a figure or
1554 is the first paragraph in a section—then there is no need for indentation.
1558 \begin_layout Standard
1559 If you're a typical American (we're still joking!), though, you don't care
1560 about such esoteric things; you want your indentation! Add this to the
1564 \begin_layout LyX-Code
1567 usepackage{indentfirst}
1570 \begin_layout Standard
1571 If your TeX distribution isn't braindead, you'll have this package, and
1572 all of your paragraphs will get the indentation the Founding Fathers intended
1576 \begin_layout Subsubsection
1577 Example #4: This Document
1580 \begin_layout Standard
1581 You can also check out the preamble of this document to get an idea of some
1582 of the advanced things you can do.
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592 It then uses the logfile from the LaTeX run to do a post-mortem.
1593 After analyzing the logfile, LyX displays a dialog listing the errors.
1594 Clicking on any one of them will take you to the position in your LyX file
1595 where the error occurred.
1599 \begin_layout Plain Layout
1601 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603 There are also cases where LaTeX reports the error on one line, but the
1604 actual error is earlier.
1605 This is not unlike forgetting a closing brace in a program: You'll get
1606 an error, but only later.
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1617 \begin_inset Flex MenuItem
1620 \begin_layout Plain Layout
1623 \SpecialChar \menuseparator
1627 \begin_inset space ~
1636 There are some fairly common error messages and warnings.
1637 We'll cover those here.
1638 You should look at a good LaTeX book for a complete listing.
1641 \begin_layout Itemize
1642 \begin_inset Flex Code
1645 \begin_layout Plain Layout
1652 \begin_inset Newline newline
1655 Anything beginning with these words is a warning message for the purpose
1657 \begin_inset Quotes eld
1661 \begin_inset Quotes erd
1664 the LaTeX code itself.
1665 You'll get messages like this if you added or changed cross-references
1666 or bibliography entries, in which case, LaTeX is trying to tell you that
1667 you need to make another run.
1668 You can by-and-large ignore these.
1671 \begin_layout Itemize
1672 \begin_inset Flex Code
1675 \begin_layout Plain Layout
1682 \begin_inset Newline newline
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686 The rest of the message will often say something about a replacement font
1688 You can safely ignore these, too.
1691 \begin_layout Itemize
1692 \begin_inset Flex Code
1695 \begin_layout Plain Layout
1704 \begin_inset Newline newline
1712 They are warnings about lines that were too long and run past the right
1714 Almost always, this is unnoticeable in the final output.
1715 (It can be just a point or two.) Or, only one or two characters extend past
1717 LaTeX seems to generate at least one of these messages for just about any
1719 \begin_inset Newline newline
1722 You can ignore these messages.
1723 Your eyes will tell you if there's a problem with something that's too
1724 wide; just look at the output.
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in
1730 \begin_inset Flex MenuItem
1733 \begin_layout Plain Layout
1736 \SpecialChar \menuseparator
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1752 \begin_layout Itemize
1753 \begin_inset Flex Code
1756 \begin_layout Plain Layout
1765 \begin_inset Newline newline
1768 Not quite as common as its cousin.
1769 LaTeX seems to like to print lines that are a bit too wide as opposed to
1770 ones that are a bit too narrow.
1771 We have no idea why.
1774 \begin_layout Itemize
1775 \begin_inset Flex Code
1778 \begin_layout Plain Layout
1787 \begin_inset Flex Code
1790 \begin_layout Plain Layout
1799 \begin_inset Newline newline
1802 Warnings about troubles breaking the page.
1803 Once again, just look at the output.
1804 Your eyes will tell you where something has gone wrong.
1807 \begin_layout Itemize
1808 \begin_inset Flex Code
1811 \begin_layout Plain Layout
1813 \begin_inset Quotes els
1817 \begin_inset Quotes ers
1826 \begin_inset Newline newline
1830 \begin_inset Quotes eld
1834 \begin_inset Quotes erd
1837 isn't installed on this system.
1838 This usually appears because some package your document needs isn't installed.
1839 If you didn't touch the preamble or didn't use the
1840 \begin_inset Flex Code
1843 \begin_layout Plain Layout
1851 command, then one of the packages LyX tried to load is missing.
1853 \begin_inset Flex MenuItem
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1863 to get a list of packages that LyX knows about.
1864 This file is updated whenever you reconfigure LyX (using
1865 \begin_inset Flex MenuItem
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1880 \begin_inset Flex Code
1883 \begin_layout Plain Layout
1891 command and the package in question isn't installed, then you'll need to
1892 install it yourself.
1895 \begin_layout Itemize
1896 \begin_inset Flex Code
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1906 \begin_inset Newline newline
1909 Error messages beginning with this are trying to tell you that you specified
1910 a bad or undefined option to a package.
1911 Check the package's documentation.
1914 \begin_layout Itemize
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1925 \begin_inset Newline newline
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1930 You may have forgotten to load a package.
1931 In any case, this error message usually means that you used an undefined
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938 Some are self-explanatory.
1939 These are usually LaTeX messages.
1940 Others are downright cryptic.
1941 These are usually TeX error messages, and we really have
1945 what they mean or how to decipher them.
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963 especially if you see a
1964 \begin_inset Quotes eld
1968 \begin_inset Flex Code
1971 \begin_layout Plain Layout
1980 \begin_inset Quotes erd
1983 error—it means that there are errors in the preamble.
1984 Start debugging your preamble.
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989 to the document, the first suspect is your LaTeX distribution itself.
1990 Check for missing packages and install them.
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995 Did you use any of the fine-tuning options in LyX? Specifically, did you
2000 any of them, like trying to manually insert lots of
2001 \begin_inset Flex Code
2004 \begin_layout Plain Layout
2006 \begin_inset space ~
2015 \begin_inset Flex Code
2018 \begin_layout Plain Layout
2025 \begin_inset Flex Code
2028 \begin_layout Plain Layout
2034 ? Did you try to kludge something together with these instead of using the
2035 appropriate paragraph environment?
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2041 Did you try to pull a fancy maneuver? Did you do something funky inside
2042 a table or an equation, like inserting a graphic into a table cell?
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047 a line? By default, LaTeX is rather strict about how much extra inter-word
2048 spacing it will add in order to break a line.
2049 Preferably, you should rework the paragraph to avoid the problem.
2050 If this isn't an option, you can wrap your text in
2051 \begin_inset Flex Code
2054 \begin_layout Plain Layout
2062 to make LaTeX's line breaking more, well, sloppy.
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067 make sure you're in the limits for nesting environments.
2068 If you nested a bunch of environments to the
2069 \begin_inset Formula $17^{\mathrm{th}}$
2072 level, that's the problem.
2073 (The limit in LaTeX is five.)
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078 If you have a table or figure that's too wide or long for the page, you
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \begin_layout Standard
2098 If all this doesn't help—well, then
2102 you might have found a bug in LyX\SpecialChar \ldots{}
2106 \begin_layout Chapter
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2118 Bibliography databases (BibTeX)
2125 The following subsections explain special bibliography features supported
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2139 \begin_inset space \space{}
2143 \begin_inset Quotes eld
2147 \begin_inset Quotes erd
2150 ) to refer to a cited work.
2151 However, in many scientific disciplines, other citation styles are in use.
2152 The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2157 \begin_inset space \space{}
2161 \begin_inset Quotes eld
2165 \begin_inset Quotes erd
2169 LyX supports two packages that provide this style,
2170 \begin_inset Flex Code
2173 \begin_layout Plain Layout
2180 \begin_inset Flex Code
2183 \begin_layout Plain Layout
2190 Both packages have their pros and cons, which cannot be listed in detail.
2191 If you only want to have simple author-year (or author-numerical) style,
2192 or if you want to use one of the countless style files for
2193 \begin_inset Flex Code
2196 \begin_layout Plain Layout
2202 , then the established
2203 \begin_inset Flex Code
2206 \begin_layout Plain Layout
2212 package is probably your choice.
2213 If you need special features like short title references, ibidem etc., you
2215 \begin_inset Flex Code
2218 \begin_layout Plain Layout
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2230 \begin_inset Flex MenuItem
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2241 \begin_inset Flex MenuItem
2244 \begin_layout Plain Layout
2251 \begin_inset Flex MenuItem
2254 \begin_layout Plain Layout
2261 \begin_inset Flex MenuItem
2264 \begin_layout Plain Layout
2271 With both packages, you will get some extra features in the citation dialog
2272 and you can select the style of the reference (
2273 \begin_inset Quotes eld
2277 \begin_inset Quotes erd
2281 \begin_inset Quotes eld
2285 \begin_inset Quotes erd
2289 \begin_inset Quotes eld
2293 \begin_inset Quotes erd
2297 \begin_inset Quotes eld
2301 \begin_inset Quotes erd
2305 Note that both packages need specifically designed style files.
2306 They both ship their own, but there are lots of additional style files,
2307 and there is even an interactive style file builder
2311 \begin_layout Plain Layout
2313 \begin_inset Flex URL
2316 \begin_layout Plain Layout
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2329 \begin_inset Flex Code
2332 \begin_layout Plain Layout
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347 If you are for instance a historian, the possibility to separate sources
2348 and scientific works is most likely a
2349 \begin_inset Quotes eld
2353 \begin_inset Quotes erd
2357 Unfortunately, BibTeX itself does not allow you to do this.
2358 But with the help of some LaTeX packages, BibTeX can be extended to fit
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages,
2371 \begin_layout Plain Layout
2373 \begin_inset Flex URL
2376 \begin_layout Plain Layout
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2388 The advantage of this package (compared to other packages like
2392 ) is that you don't need to define new citation commands.
2393 Instead, you need to prepare different bibliographic databases which include
2394 the entries for the different sections of the bibliography.
2395 For example: If you want to divide your bibliography into the sections
2397 \begin_inset Quotes eld
2401 \begin_inset Quotes erd
2405 \begin_inset Quotes eld
2409 \begin_inset Quotes erd
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2417 \begin_inset space \space{}
2421 \begin_inset Flex Code
2424 \begin_layout Plain Layout
2431 \begin_inset Flex Code
2434 \begin_layout Plain Layout
2444 \begin_layout Standard
2446 \begin_inset Flex MenuItem
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2457 \begin_inset Flex MenuItem
2460 \begin_layout Plain Layout
2467 \begin_inset Flex MenuItem
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2477 Now you can insert multiple BibTeX bibliographies, one for each section
2478 of your bibliography.
2479 Returning to our example: Insert the BibTeX bibliography
2480 \begin_inset Flex Code
2483 \begin_layout Plain Layout
2489 and a second one for the database
2490 \begin_inset Flex Code
2493 \begin_layout Plain Layout
2500 You are free to use the same or different styles for each section.
2501 Additionally, you can choose if the bibliography section should contain
2503 \begin_inset Quotes eld
2506 all cited references
2507 \begin_inset Quotes erd
2510 of the specified database(s) (which is the default),
2511 \begin_inset Quotes eld
2514 all uncited references
2515 \begin_inset Quotes erd
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 This might be useful if you would like to separate your bibliography into
2529 \begin_inset Quotes eld
2533 \begin_inset Quotes erd
2537 \begin_inset Quotes eld
2541 \begin_inset Quotes erd
2545 \begin_inset Quotes eld
2549 \begin_inset Quotes erd
2553 The titles for the sections can be added as ordinary sections or subsections.
2555 \begin_inset Flex Code
2558 \begin_layout Plain Layout
2564 removes the bibliography title, you have to manually re-add that, too (as
2565 a chapter* or section*, for instance).
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2578 \begin_inset space \space{}
2581 a bibliography for each section or chapter of the document, are not supported
2584 \begin_inset Flex Code
2587 \begin_layout Plain Layout
2593 package, which is used for the creation of sectioned bibliographies in
2594 LyX (see the previous section), provides an easy way to solve this task,
2595 if you are willing to use some
2596 \begin_inset Flex MenuItem
2599 \begin_layout Plain Layout
2606 \begin_inset space ~
2610 \begin_inset CommandInset ref
2612 reference "sec:Inserting-TeX-Code"
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the
2622 \begin_inset Flex Code
2625 \begin_layout Plain Layout
2632 \begin_inset Flex Code
2635 \begin_layout Plain Layout
2641 package, respectively.
2649 \begin_layout Standard
2651 \begin_inset Flex MenuItem
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2662 \begin_inset Flex MenuItem
2665 \begin_layout Plain Layout
2672 \begin_inset Flex MenuItem
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2682 In the document, you have to enclose the sections, which shall contain
2683 their own bibliography (including the BibTeX bibliography itself), between
2685 \begin_inset Flex Code
2688 \begin_layout Plain Layout
2697 \begin_inset Flex Code
2700 \begin_layout Plain Layout
2708 (those commands have to be inserted as TeX code).
2709 The bibliography will contain all references that have been cited in the
2711 \begin_inset Flex Code
2714 \begin_layout Plain Layout
2725 If you are using this approach, then every citation reference has to be
2727 \begin_inset Flex Code
2730 \begin_layout Plain Layout
2738 \begin_inset Flex Code
2741 \begin_layout Plain Layout
2750 \begin_layout Section
2754 \begin_layout Subsection
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760 to break up the document into several files, or perhaps you have something
2761 where a table may change from time to time, but the preceding text does
2763 In these cases, you should seriously consider using multipart documents.
2764 For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766 Each of these could be its own separate LyX file, with one
2767 \begin_inset Quotes eld
2771 \begin_inset Quotes erd
2774 file which contains the title, authors, abstract, references, etc., plus
2775 the five included files.
2776 It is important to note that each of these files is a full LyX file which
2777 can be formatted and printed on its own, as well as included in a master
2779 Each of these files must have the same document class, however—don't attempt
2780 to mix book classes with article classes.
2781 You may also include LaTeX files; however, these files must not have their
2783 \begin_inset space \thinspace{}
2787 \begin_inset space \space{}
2790 everything up to and including the
2791 \begin_inset Flex Code
2794 \begin_layout Plain Layout
2803 \begin_inset Flex Code
2806 \begin_layout Plain Layout
2814 line must be deleted) or else errors will be generated when you try to
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with
2820 \begin_inset Flex MenuItem
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2826 \begin_inset space ~
2835 When you click on this selection a small box is inserted into the file
2836 at the current cursor location.
2837 Clicking on the box raises a dialog which allows you to select the file
2838 to be included, and the method of its inclusion.
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844 The three inclusion methods are
2845 \begin_inset Quotes eld
2849 \begin_inset Quotes erd
2853 \begin_inset Quotes eld
2857 \begin_inset Quotes erd
2861 \begin_inset Quotes eld
2865 \begin_inset Quotes erd
2869 The difference between
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2885 is really only meaningful to LaTeXperts, but the practical difference is
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 are typeset beginning on a new page, while files that are
2895 \begin_inset Quotes eld
2899 \begin_inset Quotes erd
2902 are typeset starting on the current page.
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files that do not have
2908 all the preamble information.
2911 \begin_layout Standard
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2920 included file allows you to include a file typeset exactly as it appears
2922 \begin_inset space \thinspace{}
2926 \begin_inset space \space{}
2930 \begin_inset Flex Code
2933 \begin_layout Plain Layout
2939 mode, with the characters set in a fixed-width typewriter font.
2940 Normally, spaces in this file are invisible, though two consecutive spaces
2941 are conserved, unlike LyX's normal treatment of spaces.
2942 However, setting the
2943 \begin_inset Flex MenuItem
2946 \begin_layout Plain Layout
2948 \begin_inset space ~
2952 \begin_inset space ~
2956 \begin_inset space ~
2964 checkbox typesets a mark to unambiguously define the presence of a space.
2968 \begin_layout Subsection
2969 Cross-References Between Files
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2983 height_special "totalheight"
2986 \begin_layout Plain Layout
2987 This section is somewhat out of date.
2988 Need to describe default master documents and how children are opened when
2998 \begin_layout Standard
2999 It is possible to set up cross-references between the different files.
3000 First, open all the files in question: let's call them A and B in a two
3001 file example, where B is included in A.
3002 Let's say you insert a label in A, then want to reference it in B.
3003 Open the cross-reference dialog whilst in document B, and you can select
3005 \begin_inset Quotes eld
3009 \begin_inset Quotes erd
3015 \begin_layout Subsection
3016 Bibliography Lists in all Subdocuments
3019 \begin_layout Standard
3020 \begin_inset Box Frameless
3030 height_special "totalheight"
3033 \begin_layout Plain Layout
3034 This section also needs updating.
3035 There is now material about this on the wiki, and it could be copied here.
3043 \begin_layout Standard
3044 Copy the bibliography list with all entries to all subdocuments and transform
3046 This way LyX will find the
3047 \begin_inset Flex Code
3050 \begin_layout Plain Layout
3056 -files and you can easily insert references without making the bibliography
3060 \begin_layout Standard
3061 As the bibliography list is in a comment, LaTeX won't use it and the references
3062 will look like this: [?], instead of like this: [1].
3063 One solution is to use the LaTeX-package
3064 \begin_inset Flex Code
3067 \begin_layout Plain Layout
3073 that will only include comments by processing the files separately.
3074 To do this, add in the LaTeX preamble of every subdocument the following:
3077 \begin_layout LyX-Code
3083 \begin_layout LyX-Code
3086 includecomment{comment}
3089 \begin_layout Standard
3091 \begin_inset Flex URL
3094 \begin_layout Plain Layout
3096 http://wiki.lyx.org/FAQ/Unsorted#toc31
3104 \begin_layout Section
3108 \begin_layout Standard
3109 Users sometimes need to be able to
3110 \begin_inset Quotes eld
3114 \begin_inset Quotes erd
3117 a LyX file together with all the images (and other files) on which it depends,
3118 either for sending to a publisher or for sharing with a co-author.
3119 LyX 2.0 includes a Python script (
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3129 ) that automates this process.
3130 To use it, you must have either the
3131 \begin_inset Flex Code
3134 \begin_layout Plain Layout
3141 \begin_inset Flex Code
3144 \begin_layout Plain Layout
3150 python modules installed on your system.
3151 By default, the script prefers the
3152 \begin_inset Flex Code
3155 \begin_layout Plain Layout
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3171 format on Unix-like systems and the
3172 \begin_inset Flex Code
3175 \begin_layout Plain Layout
3184 \begin_layout Standard
3185 LyX's configuration process will set the script up to export a `LyX Archive',
3186 and this format will then be available under
3187 \begin_inset Flex Code
3190 \begin_layout Plain Layout
3191 File\SpecialChar \menuseparator
3200 \begin_layout Standard
3201 Independently of the platform, the generation of a particular archive format
3202 can be forced by adding either the
3203 \begin_inset Flex Code
3206 \begin_layout Plain Layout
3213 \begin_inset Flex Code
3216 \begin_layout Plain Layout
3223 \begin_inset Flex Code
3226 \begin_layout Plain Layout
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3242 format) switch to the
3243 \begin_inset Flex Code
3246 \begin_layout Plain Layout
3247 LyX\SpecialChar \menuseparator
3254 \begin_inset Flex Code
3257 \begin_layout Plain Layout
3258 Tools\SpecialChar \menuseparator
3259 Preferences\SpecialChar \menuseparator
3260 File Handling\SpecialChar \menuseparator
3267 (Make sure you add the switch after the script name, not before it.)
3270 \begin_layout Section
3271 Fancy Headers and Footers
3274 \begin_layout Standard
3275 The default page layout is rather plain; for an
3276 \begin_inset Flex Code
3279 \begin_layout Plain Layout
3285 document class, all you get is a centered page number at the bottom of
3287 This document uses KOMA-script's book class, so it appears to be a bit
3289 But to really put on a show, you need to set the document page style to
3291 \begin_inset Quotes eld
3295 \begin_inset Quotes erd
3298 , as mentioned in the
3303 This section describes the LaTeX code you need to insert in your LaTeX
3304 preamble in order to get the desired effects.
3307 \begin_layout Standard
3308 For more information on fancy headers, see the
3309 \begin_inset Flex Code
3312 \begin_layout Plain Layout
3318 package documentation.
3320 \begin_inset Flex URL
3323 \begin_layout Plain Layout
3325 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3333 \begin_layout Standard
3334 The page header is divided into three fields, not surprisingly labeled
3335 \begin_inset Quotes eld
3339 \begin_inset Quotes erd
3343 \begin_inset Quotes eld
3347 \begin_inset Quotes erd
3351 \begin_inset Quotes eld
3355 \begin_inset Quotes erd
3359 The footer is also divided into these three fields.
3360 The LaTeX commands to set these fields in the simplest manner are
3361 \begin_inset Flex Code
3364 \begin_layout Plain Layout
3373 \begin_inset Flex Code
3376 \begin_layout Plain Layout
3385 \begin_inset Flex Code
3388 \begin_layout Plain Layout
3397 \begin_inset Flex Code
3400 \begin_layout Plain Layout
3409 Suppose you wish to put your name in the upper left hand corner of each
3411 Simply insert the following command in the preamble:
3414 \begin_layout Standard
3423 \begin_layout Standard
3424 You will now see your name in the upper left.
3425 If a field has a default entry that you would like to get rid of (often
3426 the page number appears in the central footer) simply include a command
3427 with a blank argument, e.
3428 \begin_inset space \thinspace{}
3434 \begin_layout Standard
3442 \begin_layout Standard
3443 Let's get really fancy: lets put the section number with the word
3444 \begin_inset Quotes eld
3448 \begin_inset Quotes erd
3452 \begin_inset space \thinspace{}
3456 \begin_inset space \space{}
3459 Section 3) in the upper left, the page number (e.
3460 \begin_inset space \thinspace{}
3464 \begin_inset space \space{}
3467 Page 4) in the upper right, your name in the lower left, and the date in
3469 The following commands should now appear in the preamble:
3472 \begin_layout Standard
3482 \begin_layout Standard
3490 \begin_layout Standard
3500 \begin_layout Standard
3509 \begin_layout Standard
3517 \begin_layout Standard
3527 \begin_layout Standard
3529 \begin_inset Flex Code
3532 \begin_layout Plain Layout
3541 \begin_inset Flex Code
3544 \begin_layout Plain Layout
3552 access LaTeX's section and page counters, and so print out the current
3553 section and page numbers.
3555 \begin_inset Flex Code
3558 \begin_layout Plain Layout
3566 simply prints out today's date.
3569 \begin_layout Standard
3570 The thicknesses of the horizontal rules drawn beneath the header and above
3571 the footer can also be modified.
3572 If you don't want one of the rules, set its thickness to 0.
3573 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3579 \begin_inset Flex Code
3582 \begin_layout Plain Layout
3587 headrulewidth}{0.4pt}
3593 \begin_inset Flex Code
3596 \begin_layout Plain Layout
3601 footrulewidth}{0.4pt}
3606 to set the thicknesses.
3609 \begin_layout Standard
3610 You can switch the header/footer settings on and off for individual pages
3612 \begin_inset Flex Code
3615 \begin_layout Plain Layout
3618 thispagestyle{empty}
3624 \begin_inset Flex Code
3627 \begin_layout Plain Layout
3630 thispagestyle{plain}
3636 \begin_inset Flex Code
3639 \begin_layout Plain Layout
3642 thispagestyle{fancy}
3648 Simply insert them in the text on the page you want changed and mark them
3650 In fact, title pages are marked as plain by default, while following pages
3651 are marked fancy when using the global fancy setting.
3654 \begin_layout Standard
3655 As a final example, it is possible to include an image in the header or
3657 Suppose you want to put a company logo in the upper lefthand corner.
3658 You might try something like
3661 \begin_layout Standard
3670 includegraphics{logo.eps}}}
3673 \begin_layout Standard
3675 (you may need to preface this with
3676 \begin_inset Flex Code
3679 \begin_layout Plain Layout
3683 usepackage{graphics}
3688 if you don't include graphics elsewhere in your document).
3691 \begin_layout Section
3692 Itemize Bullet Selection
3693 \begin_inset CommandInset label
3702 \begin_layout Standard
3708 \begin_layout Subsection
3712 \begin_layout Standard
3713 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3714 Using this dialog you can easily specify what bullet shape to use at each
3715 level of an itemized list.
3716 These settings are document-wide so you won't be able to specify different
3717 sets of bullets for different paragraphs.
3721 \begin_layout Plain Layout
3722 Well, actually you can but you'll have to do it by hand.
3730 \begin_layout Subsection
3734 \begin_layout Standard
3735 Open the dialog by selecting the
3736 \begin_inset Flex MenuItem
3739 \begin_layout Plain Layout
3740 Document\SpecialChar \menuseparator
3746 menu item and then select the
3747 \begin_inset Flex MenuItem
3750 \begin_layout Plain Layout
3759 \begin_layout Standard
3760 The dialog provides you with a table of bullet shapes.
3761 A column of buttons on the left of the table provides access to the six
3762 different panels of bullet shapes.
3763 The row of buttons across the top is used to select which bullet depth
3765 A text entry under the table shows the currently selected bullet shape's
3766 LaTeX equivalent and this can be edited if desired.
3767 If you do modify the text you will also need to specify any needed packages
3768 in the LaTeX preamble.
3771 \begin_layout Standard
3772 The six panels are divided up by the packages they require.
3773 The following table shows the mappings from button name to LaTeX package.
3776 \begin_layout Standard
3778 \begin_inset Tabular
3779 <lyxtabular version="3" rows="7" columns="2">
3780 <features rotate="0" tabularvalignment="middle">
3781 <column alignment="center" valignment="top" width="0pt">
3782 <column alignment="center" valignment="top" width="0pt">
3784 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3787 \begin_layout Plain Layout
3802 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3805 \begin_layout Plain Layout
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3825 \begin_layout Plain Layout
3840 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3843 \begin_layout Plain Layout
3859 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3862 \begin_layout Plain Layout
3877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3880 \begin_layout Plain Layout
3897 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3900 \begin_layout Plain Layout
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3918 \begin_layout Plain Layout
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3938 \begin_layout Plain Layout
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3956 \begin_layout Plain Layout
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3976 \begin_layout Plain Layout
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3994 \begin_layout Plain Layout
4011 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4014 \begin_layout Plain Layout
4029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4032 \begin_layout Plain Layout
4055 \begin_layout Standard
4056 LyX doesn't stop you using bullets from packages you don't have.
4057 If you get errors from LaTeX when you try to view or print the file, then
4058 it is likely you are missing a package.
4062 \begin_layout Plain Layout
4063 LyX doesn't restrict your use since you may be editing locally and exporting
4072 \begin_layout Subsection
4076 \begin_layout Standard
4077 Select which bullet depth you want to change then select the bullet shape
4079 Any changes will not be visible in LyX, but are visible when viewing the
4083 \begin_layout Standard
4084 You can reset a bullet shape to the default simply by clicking your right
4085 mouse button on the appropriate bullet depth button.
4089 \begin_layout Plain Layout
4094 want to have multiple sets of paragraphs with different sets of bullets
4095 in each, then you're going to have to get your hands dirty with TeX code.
4096 The bullet selection dialog can help though because it provides you with
4097 the LaTeX code for a wide range of bullet shapes.
4098 To make your own custom paragraphs you have the following options:
4101 \begin_layout Plain Layout
4105 \begin_layout Plain Layout
4121 \begin_layout Plain Layout
4125 \begin_layout Plain Layout
4147 \begin_layout Itemize
4148 Use the LaTeX command
4149 \begin_inset Flex Code
4152 \begin_layout Plain Layout
4160 to specify a new bullet shape for a given depth.
4161 You'll also need to save the current bullet shape so you can restore it
4163 In this itemized list the following LaTeX code was used to change the bullet
4164 used for the first depth.
4168 \begin_layout LyX-Code
4178 \begin_layout LyX-Code
4195 \begin_layout Itemize
4196 Note that the itemize depth is specified in Roman numerals as part of the
4206 \begin_layout Itemize
4210 \begin_layout Plain Layout
4223 Specify each individual entry by starting each item with the bullet shape
4224 enclosed in square brackets and set as
4225 \begin_inset Flex MenuItem
4228 \begin_layout Plain Layout
4235 For example, this item was started with
4236 \begin_inset Flex Code
4239 \begin_layout Plain Layout
4254 \begin_layout Plain Layout
4258 \begin_layout Plain Layout
4274 \begin_layout Plain Layout
4275 You'll also need to revert the labelitem back to its previous setting for
4276 the global bullet shape settings to remain in effect.
4277 The way used here was:
4280 \begin_layout LyX-Code
4295 \begin_layout Chapter
4296 LyX and the World Wide Web
4299 \begin_layout Standard
4300 LyX has long supported the export of documents to various web-friendly formats,
4302 Before verson 2.0, however, HTML export was always accomplished by the use
4303 of external converters.
4307 \begin_layout Plain Layout
4308 For details on the use of external converters with LyX, see the
4312 section of the Customization manual.
4317 These fall into two large groups: there are converters that use LaTeX as
4318 an intermediate format, such as
4319 \begin_inset Flex Code
4322 \begin_layout Plain Layout
4329 \begin_inset Flex Code
4332 \begin_layout Plain Layout
4339 \begin_inset Flex Code
4342 \begin_layout Plain Layout
4348 , relying upon LyX to produce the LaTeX; and there is a converter that works
4349 directly on LyX files,
4350 \begin_inset Flex Code
4353 \begin_layout Plain Layout
4360 All of these have different advantages and disadvantages.
4364 \begin_layout Standard
4365 The LaTeX-based converters have the advantage that, in principle, they know
4366 everything about the exported document that LaTeX does.
4367 Such converters do not care, for example, if a certain block of code was
4368 produced by LyX or was Evil Red Text.
4369 These converters know about
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 files, counters, and references, and can often make use of the
4380 \begin_inset Flex Code
4383 \begin_layout Plain Layout
4389 files generated by BibTeX.
4390 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4391 said that only TeX itself understands TeX---and LaTeX-based converters
4392 will often choke on what seem to be quite simple constructs; complex ones
4393 can throw them completely, and as of this writing, for example, the
4397 manual will not export with
4398 \begin_inset Flex Code
4401 \begin_layout Plain Layout
4407 , though the others will.
4408 The other issue concerns how math is handled.
4409 These converters typically convert the formulae into little pictures that
4410 are then linked from the HTML document.
4411 Since these are actually generated by LaTeX, they are accurate.
4412 But they do not scale well, and just getting them to look as if they are
4413 actually meant to be in your document---so that the font sizes seem to
4414 be roughly the same---can be a challenge.
4417 \begin_layout Standard
4419 \begin_inset Flex Code
4422 \begin_layout Plain Layout
4429 \begin_inset CommandInset href
4431 name "http://elyxer.nongnu.org/"
4432 target "http://elyxer.nongnu.org/"
4436 ) solves some of these problems.
4437 In particular, the formulae it produces scale perfectly, since it renders
4438 math using a combination of HTML and CSS rather than converting the formulae
4440 But even moderately complex formula are rendered less well than with
4441 \begin_inset Flex Code
4444 \begin_layout Plain Layout
4450 ; this reflects the limitations of HTML.
4454 \begin_layout Plain Layout
4456 \begin_inset Flex Code
4459 \begin_layout Plain Layout
4465 can also use jsMath and MathJax for equations, but this setting is only
4466 available globally and requires one to have access to a server that runs
4472 More importantly (as of version 1.1.1, at least),
4473 \begin_inset Flex Code
4476 \begin_layout Plain Layout
4482 has limited support for math macros and no support for user-defined paragraph
4483 or character styles.
4484 These limitations make
4485 \begin_inset Flex Code
4488 \begin_layout Plain Layout
4494 unsuitable for many of the documents LyX users produce.
4495 In principle, of course, these problems could be solved, but the LyX developers
4496 have decided to follow a different path and have made LyX itself capable
4497 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4501 \begin_layout Standard
4502 As of this writing, XHTML output remains under development and should probably
4504 \begin_inset Quotes eld
4508 \begin_inset Quotes erd
4515 \begin_layout Plain Layout
4517 \begin_inset Flex Code
4520 \begin_layout Plain Layout
4521 development/HTML.notes
4526 , which can be found in the LyX source tree or
4527 \begin_inset CommandInset href
4529 name "accessed online"
4530 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4534 , usually contains up-to-date information about the state of XHTML output.
4535 See also the list of XHTML bugs on
4536 \begin_inset CommandInset href
4538 name "the bug tracker"
4539 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"
4548 Still, the developers have chosen this approach because it has several
4549 potential advantages over the other two.
4552 \begin_layout Standard
4553 These advantages are primarily due to the fact that the XHTML output routines,
4554 since they are part of LyX, know everything LyX knows about the document
4559 \begin_layout Plain Layout
4560 Another advantage is that, since these routines are internal to LyX, they
4561 are immune to changes in LyX's file format, or to changes in the semantics
4567 So they know about the table of contents (as displayed in the outline),
4568 about the counters associated with different paragraph styles, and about
4569 user-defined styles.
4570 The XHTML output routines know what LyX knows about internationalization,
4571 too, so they will output
4572 \begin_inset Quotes eld
4576 \begin_inset Quotes erd
4580 \begin_inset Quotes eld
4588 \begin_inset Quotes erd
4591 , depending upon the language in effect at the time.
4595 \begin_layout Standard
4596 Quite generally, the output routines know what LyX knows about document
4597 layout, that is, about how the document is to be rendered on screen.
4598 We use this information when we output the document as XHTML.
4603 generates CSS style information corresponding to the layout information
4604 it uses to render the document on screen: if section headings are supposed
4605 to be sans-serif and bold as seen in LyX, then (by default) they will be
4606 sans-serif and bold when viewed in a web browser, too.
4607 And this is true not just for pre-defined styles, like Section, but for
4608 any style, including user-defined styles.
4609 Indeed, the XHTML output routines make no distinction between user-defined
4610 paragraph and character styles and LyX's own pre-defined styles: in each
4611 case, everything LyX knows about the styles is contained in the layout
4613 And much the same is true as regards pre-defined textual insets, such as
4614 footnotes, and various custom insets.
4618 \begin_layout Standard
4619 The result is that XHTML output can be customized and extended in exactly
4620 the same way LaTeX output can be customized and extended: through layout
4622 See chapter five of the
4626 manual for the details.
4629 \begin_layout Standard
4630 The remainder of this chapter contains more detailed information on XHTML
4631 output, its limitations, and ways to work around those limitations.
4634 \begin_layout Section
4635 Math Output in XHTML
4638 \begin_layout Standard
4639 LyX offers four choices for how math is rendered.
4640 These have various advantages and disadvantages:
4643 \begin_layout Itemize
4645 \begin_inset Newline newline
4648 MathML is a dialect of XML designed specifically for mathematics on the
4649 web, and it typically renders very well in browsers that support it.
4650 The disadvantage is that not all browsers support MathML, and support is
4651 not complete even in the Gecko-based browsers, such as Firefox.
4652 \begin_inset Newline newline
4655 If LyX is unable to render a formula as MathML---for example, if the formula
4657 \begin_inset Flex Code
4660 \begin_layout Plain Layout
4666 package or ERT---then it will instead output the formula as an image.
4670 \begin_layout Itemize
4672 \begin_inset Newline newline
4676 \begin_inset Flex Code
4679 \begin_layout Plain Layout
4685 outputs math as HTML, styled by CSS.
4689 \begin_layout Plain Layout
4690 LyX has borrowed some of the CSS for its HTML output from
4691 \begin_inset Flex Code
4694 \begin_layout Plain Layout
4705 For simple formulae, this can work quite well, though with more complicated
4706 formulae it tends to break down.
4707 Still, this method has the advantage that it is very widely supported and
4708 so it may be appropriate for documents that contain only a little, fairly
4710 \begin_inset Newline newline
4713 If Lyx is unable to render a formula as HTML---for example, if the formula
4715 \begin_inset Flex Code
4718 \begin_layout Plain Layout
4724 package or ERT---then it will instead output the formula as an image.
4728 \begin_layout Itemize
4730 \begin_inset Newline newline
4734 \begin_inset Flex Code
4737 \begin_layout Plain Layout
4743 , LyX will output formulae as images, the very same images, in fact, that
4744 are used for instant preview.
4748 \begin_layout Plain Layout
4749 Instant preview does
4753 have to be on for images to be output, however.
4758 The advantage to this method is that the images are simply generated by
4759 LaTeX, so they are very accurate.
4760 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4761 so they do not scale terribly well, and one cannot copy them, etc.
4762 (As of this writing, there are also problems about equation numbering.
4764 \begin_inset CommandInset href
4767 target "http://www.lyx.org/trac/ticket/6894"
4772 \begin_inset Newline newline
4775 The size of the images can be controlled by setting the
4776 \begin_inset Quotes eld
4780 \begin_inset Quotes erd
4784 \begin_inset Flex MenuItem
4787 \begin_layout Plain Layout
4788 Document\SpecialChar \menuseparator
4789 Settings\SpecialChar \menuseparator
4799 \begin_layout Plain Layout
4800 For those who want to know, this controls the resolution of the image in
4801 dots per inch and is based upon a default of 75 dpi.
4807 \begin_inset Newline newline
4810 If LyX for some reason fails to create an image for a formula (e.g., if a
4811 required LaTeX package is not installed), then it will fall back to outputing
4815 \begin_layout Itemize
4817 \begin_inset Newline newline
4820 Finally, LyX will happily output math as LaTeX.
4821 As well as being the output of last resort, this method can be used with
4823 \begin_inset CommandInset href
4826 target "http://www.math.union.edu/~dpvc/jsMath/"
4830 , which uses JavaScript to render LaTeX embedded in HTML documents.
4831 LyX wraps the LaTeX in either a
4832 \begin_inset Flex Code
4835 \begin_layout Plain Layout
4841 (for inline formulas) or
4842 \begin_inset Flex Code
4845 \begin_layout Plain Layout
4851 (for displayed formulas) with
4852 \begin_inset Flex Code
4855 \begin_layout Plain Layout
4861 , as is required for jsMath.
4864 \begin_layout Standard
4865 One of these output methods must be selected under
4866 \begin_inset Flex MenuItem
4869 \begin_layout Plain Layout
4870 Document\SpecialChar \menuseparator
4871 Settings\SpecialChar \menuseparator
4878 By default, LyX outputs MathML.
4879 This is a document-wide setting, therefore.
4882 \begin_layout Standard
4883 Eventually, LyX will offer the user the option to select an alternate output
4884 method for a particular inset, say, one that isn't being rendered very
4889 \begin_layout Plain Layout
4890 That said, since LyX falls back to images if the inset contains ERT, then
4891 one can force output as an image by putting some harmless ERT into the
4893 \begin_inset Formula $a=b\relax$
4904 \begin_layout Section
4905 Bibliography and Citations
4908 \begin_layout Standard
4909 XHTML output fully supports bibliographies and citations.
4913 \begin_layout Standard
4914 Citation labels are generated by the same machinery that generates LyX's
4915 on-screen labels, so the labels will look in the output much as they do
4916 in LyX, though better.
4917 If you are using numerical citations, then LyX will output numerical labels,
4918 such as [1] or [17], rather than simply showing the citation key in square
4919 brackets, as it does on-screen.
4920 If you are using author-year citations, then LyX will add lowercase letters
4921 to the years, just as BibTeX does, if it finds more than one citation for
4922 a given author-year combination.
4923 The labels will be printed with the bibliography entries.
4924 Note that there is, at present, no way to customize the appearance of the
4925 labels, for example, to choose between square brackets and parentheses.
4928 \begin_layout Standard
4929 Bibliography output is handled by the same machinery that handles the presentati
4930 on of reference information in the citation dialog, so you will see in the
4931 XHTML output pretty much what you would see if you were to look at a given
4932 entry in the citation dialog.
4933 The formatting can be customized in your layout file or, preferably, in
4939 manual for the details.
4942 \begin_layout Standard
4943 The main defect at present is that cross-referenced information is printed
4944 with every entry with which it is associated.
4945 So you can see things like this:
4950 \begin_inset Quotes eld
4953 Context and Logical Form
4954 \begin_inset Quotes erd
4959 Language in Context: Selected Essays
4961 (Oxford: Oxford University Press, 2007), pp.
4967 \begin_inset Quotes eld
4970 Semantics in Context
4971 \begin_inset Quotes erd
4976 Language in Context: Selected Essays
4978 (Oxford: Oxford University Press, 2007), pp.
4982 \begin_layout Standard
4983 This should be fixed before long.
4986 \begin_layout Standard
4987 There is no support at present for sectioned bibliographies.
4988 If you have multiple bibliographies, then LyX will print the same bibliography
4992 \begin_layout Section
4996 \begin_layout Standard
4997 LyX will happily export indexes as XHTML, but with certain limitations at
5001 \begin_layout Standard
5002 Index export will be most reliable when you do not attempt to use the fancy
5003 constructs that are described in the section on indexes in the
5011 \begin_layout Plain Layout
5012 The main issue here is that LyX itself does not really handle these.
5013 It just lets you enter what you would have to enter in raw LaTeX.
5018 We'll describe how they are handled using the subsection headings from
5022 \begin_layout Itemize
5023 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5024 these, but the entries must be separated by
5025 \begin_inset Quotes eld
5029 \begin_inset Quotes erd
5032 , that is, there must be spaces around the exclamation point.
5033 This is because it is otherwise too difficult to check for escaped exclamation
5034 points, ones in math, and so forth.
5037 \begin_layout Itemize
5038 Page Ranges: There is no support at all for page ranges, since these make
5039 no sense with XHMTL.
5040 Instead, you will just get two index entries, one at either end.
5043 \begin_layout Itemize
5044 Cross-referencing: There is no support for cross-referencing.
5045 If LyX finds an entry containing the
5046 \begin_inset Quotes eld
5049 |see\SpecialChar \ldots{}
5051 \begin_inset Quotes erd
5054 construct, it is just dropped, and the rest is treated as an ordinary index
5058 \begin_layout Itemize
5059 Index Entry Order: LyX does support attempts to fix the sorting order.
5060 It will take what is before the first `@' it finds and use that for sorting,
5061 taking what follows the first `@' to be the actual entry.
5062 At present, LyX does not check for escaped `@', so do not try to index
5066 \begin_layout Itemize
5067 Index Entry Layout: You can format entries by using the text style dialog,
5068 or by using any other method available within LyX itself.
5069 There is no support for constructs like:
5070 \begin_inset Quotes eld
5074 \begin_inset Quotes erd
5078 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5079 and everything that follows it.
5082 \begin_layout Itemize
5083 Multiple Indexes: There is no support for multiple indexes.
5084 Rather, all index entries will be printed as one large index.
5085 To avoid our printing several versions of the index, we print only the
5086 main index, so make sure you have one.
5089 \begin_layout Section
5090 Nomenclature and Glossary
5093 \begin_layout Standard
5094 There is at present no support for glossaries.
5095 Adding it would be fairly trivial, and welcome.
5098 \begin_layout Chapter
5102 \begin_layout Section
5106 \begin_layout Standard
5107 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5108 and retrieve information about the LyX internal state.
5109 This is only intended for advanced users, but they should find it useful.
5110 It is by writing to the LyX server, for example, that bibliography managers,
5111 such as JabRef, are able to
5112 \begin_inset Quotes eld
5116 \begin_inset Quotes erd
5122 \begin_layout Section
5123 Starting the LyX Server
5126 \begin_layout Standard
5127 The LyX server works through the use of a pair of named pipes.
5128 These are usually located in
5129 \begin_inset Flex Code
5132 \begin_layout Plain Layout
5138 , (except on Windows, where
5142 named pipes are special objects located in
5143 \begin_inset Flex Code
5146 \begin_layout Plain Layout
5158 ) and have the names
5159 \begin_inset Quotes eld
5163 \begin_inset Flex Code
5166 \begin_layout Plain Layout
5173 \begin_inset Quotes erd
5177 \begin_inset Quotes eld
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5191 \begin_inset Quotes erd
5195 External programs write into
5196 \begin_inset Flex Code
5199 \begin_layout Plain Layout
5205 and read back data from
5206 \begin_inset Flex Code
5209 \begin_layout Plain Layout
5216 The stem of the pipe names can be defined in the
5217 \begin_inset Flex MenuItem
5220 \begin_layout Plain Layout
5221 Tools\SpecialChar \menuseparator
5228 \begin_inset Flex Code
5231 \begin_layout Plain Layout
5232 "/home/myhome/lyxpipe"
5238 \begin_inset Flex Code
5241 \begin_layout Plain Layout
5255 on Windows (but any working path can be used).
5260 configure this manually in order for the server to start.
5263 \begin_layout Standard
5265 \begin_inset Flex Code
5268 \begin_layout Plain Layout
5275 \begin_inset Flex Code
5278 \begin_layout Plain Layout
5284 ' to create the pipes.
5285 If one of the pipes already exists, LyX will assume that another LyX process
5286 is already running and will not start the server.
5287 On POSIX (Unix like) systems, if for some other reason, an unused
5288 \begin_inset Quotes eld
5292 \begin_inset Quotes erd
5295 pipe is left in existence when LyX closes, then LyX will try to delete
5297 If this fails for some reason, you will need to delete the pipes manually
5298 and then restart LyX.
5299 On Windows, pipes are deleted by the OS on program termination or crash,
5301 \begin_inset Quotes eld
5305 \begin_inset Quotes erd
5308 pipes should not be possible.
5311 \begin_layout Standard
5312 To have several LyX processes with servers at the same time, you have to
5313 use different configurations, perhaps by using separate user directories,
5315 \begin_inset Flex Code
5318 \begin_layout Plain Layout
5324 file, for each process.
5327 \begin_layout Standard
5328 If you are developing a client program, you might find it useful to enable
5329 debugging information from the LyX server.
5330 Do this by starting LyX as
5331 \begin_inset Flex Code
5334 \begin_layout Plain Layout
5343 \begin_layout Standard
5344 You can find a complete example client written in C in the source distribution
5346 \begin_inset Flex Code
5349 \begin_layout Plain Layout
5350 development/lyxserver/server_monitor.c
5358 \begin_layout Standard
5359 Another useful tool is the command-line based clientfound in
5360 \begin_inset Flex Code
5363 \begin_layout Plain Layout
5364 src/client/lyxclient
5372 \begin_layout Section
5373 Normal communication
5376 \begin_layout Standard
5377 To issue a LyX call, the client writes a line of ASCII text into the input
5379 This line has the following format:
5396 \begin_layout Description
5397 clientname is a name that the client can choose arbitrarily.
5398 Its only use is that LyX will echo it if it sends an answer—so a client
5399 can dispatch results from different requesters.
5402 \begin_layout Description
5403 function is the function you want LyX to perform.
5404 It is the same as the commands you'd use in the minibuffer.
5407 \begin_layout Description
5408 argument is an optional argument which is meaningful only to some functions
5410 \begin_inset Quotes eld
5414 \begin_inset Quotes erd
5417 LFUN will insert the argument as text at the cursor position).
5420 \begin_layout Standard
5421 The answer from LyX will arrive in the output pipe and be of the form
5438 \begin_layout Standard
5447 are just echoed from the command request, while
5451 is more or less useful information filled according to how the command
5452 execution worked out.
5453 Some commands, such as
5454 \begin_inset Quotes eld
5458 \begin_inset Quotes erd
5461 , will return information about the internal state of LyX, while other will
5462 return an empty data-response.
5463 This means that the command execution went fine.
5466 \begin_layout Standard
5467 In case of errors, the response from LyX will have this form
5484 \begin_layout Standard
5489 should contain an explanation of why the command failed.
5492 \begin_layout Standard
5496 \begin_layout LyX-Code
5497 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5501 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5502 \begin_inset Newline newline
5505 read a <~/.lyxpipe.out
5506 \begin_inset Newline newline
5512 \begin_layout Section
5516 \begin_layout Standard
5517 LyX can notify clients of events going on asynchronously.
5518 Currently it will only do this if the user binds a key sequence with the
5520 \begin_inset Quotes eld
5524 \begin_inset Quotes erd
5528 The format of the string LyX sends is as follows:
5532 \begin_inset Flex Code
5535 \begin_layout Plain Layout
5546 \begin_layout Standard
5551 is the printed representation of the key sequence that was actually typed
5555 \begin_layout Standard
5556 This mechanism can be used to extend LyX's command set and implement macros.
5557 Bind some key sequence to
5558 \begin_inset Quotes eld
5562 \begin_inset Quotes erd
5566 Then start a client that listens on the output pipe, dispatches the command
5567 according to the sequence, and starts a function that may use LyX calls
5568 and LyX requests to issue a command or a series of commands to LyX.
5571 \begin_layout Section
5572 The simple LyX Server Protocol
5575 \begin_layout Standard
5576 LyX implements a simple protocol that can be used for session management.
5577 All messages are of the form
5590 \begin_layout Standard
5596 \begin_inset Quotes eld
5600 \begin_inset Quotes erd
5604 \begin_inset Quotes eld
5608 \begin_inset Quotes erd
5613 \begin_inset Quotes eld
5617 \begin_inset Quotes erd
5620 is received from a client, LyX will report back to inform the client that
5621 it's listening to it's messages, while
5622 \begin_inset Quotes eld
5626 \begin_inset Quotes erd
5629 sent from LyX will inform clients that LyX is closing.
5632 \begin_layout Section
5633 Reverse DVI/PDF search
5636 \begin_layout Standard
5637 Some DVI/PDF viewers
5641 \begin_layout Plain Layout
5642 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5643 Skim on Mac OSX and SumatraPDF on Windows.
5652 facility (also called
5657 This means that you can tell LyX to put the cursor to a specific line in
5658 the document by clicking at the respective position in the DVI/PDF output.
5659 To achieve this, the viewer must be able to communicate with LyX.
5660 This is done via the LyX server either by using the named pipe (
5664 ), or the UNIX domain socket (
5668 ) that LyX creates in its temporary directory (this is the way the
5669 \begin_inset Flex Code
5672 \begin_layout Plain Layout
5678 program communicates with LyX).
5679 In some cases, you need a helper script that mediates between the viewer
5680 and LyX, in others, the viewer can communicate with LyX directly.
5681 This depends on the selected viewer and on your operating system.
5682 The same applies to the way viewers need to be configured and the way the
5683 reverse search is actually performed.
5684 In what follows, we will thus describe how to setup reverse search for
5686 Before we turn to this, though, we will explain what needs to be done generally
5687 to enable reverse search in the DVI/PDF output.
5690 \begin_layout Subsection
5692 \begin_inset CommandInset label
5694 name "sub:rev-search"
5701 \begin_layout Standard
5702 In most cases LyX will do the work for you by enabling the option
5703 \begin_inset Flex MenuItem
5706 \begin_layout Plain Layout
5707 Synchronize with Output
5713 \begin_inset Flex MenuItem
5716 \begin_layout Plain Layout
5717 Document\SpecialChar \menuseparator
5718 Settings\SpecialChar \menuseparator
5725 In such a case LyX will automatically insert the necessary SyncTeX macro
5726 (for PDF) or load the srcltx package (for DVI) respectively.
5727 This option can be easily reached also on
5728 \begin_inset Flex Code
5731 \begin_layout Plain Layout
5740 \begin_layout Standard
5741 If you need a different setting, you can select or input a custom macro
5742 from the drop down box just below
5743 \begin_inset Flex MenuItem
5746 \begin_layout Plain Layout
5747 Document\SpecialChar \menuseparator
5748 Settings\SpecialChar \menuseparator
5749 Output\SpecialChar \menuseparator
5750 Synchronize with Output
5758 \begin_layout Standard
5759 Note that the method
5760 \begin_inset Flex Code
5763 \begin_layout Plain Layout
5771 enables gzip compression.
5772 If your viewer does not support it, you should instead use
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5787 \begin_layout Standard
5788 Please aöso note that including the
5789 \begin_inset Flex Code
5792 \begin_layout Plain Layout
5799 \begin_inset Flex Code
5802 \begin_layout Plain Layout
5808 sometimes has an undesired impact on the typesetting.
5809 Thus, you should switch output synchronization off for the final typesetting
5811 \begin_inset Flex Code
5814 \begin_layout Plain Layout
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5834 \begin_layout Standard
5835 In case you need some more special settings that are not covered by the
5836 automatic settings, read the next section about how to set up output synchroniz
5838 If the automatic setup suits your needs, you can readily jump to section
5839 \begin_inset space ~
5843 \begin_inset CommandInset ref
5845 reference "sub:configuring-viewers"
5849 , where the necessary configuration steps in your viewer -- needed both
5850 with the automatic and the manual setup -- are described.
5853 \begin_layout Subsection
5857 \begin_layout Standard
5858 LaTeX provides several different methods for reverse search.
5859 Some are built-in in the
5860 \begin_inset Flex Code
5863 \begin_layout Plain Layout
5869 program, some are provided by external packages.
5870 Your choice depends on whether your LaTeX distribution already provides
5871 a given method (the built-in methods are rather new) and whether your viewer
5873 The available methods are described in the following.
5876 \begin_layout Subsubsection*
5877 Built-in DVI-search via src-specials (DVI only)
5880 \begin_layout Standard
5881 This method provides the DVI file with the necessary information for reverse
5883 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5884 distribution should include it), and it works reliably.
5885 To enable it, change the
5886 \begin_inset Flex MenuItem
5889 \begin_layout Plain Layout
5894 \begin_layout Plain Layout
5907 \begin_inset Flex MenuItem
5910 \begin_layout Plain Layout
5915 \begin_layout Plain Layout
5922 eX (plain)->DraftDVI
5928 \begin_inset Flex MenuItem
5931 \begin_layout Plain Layout
5932 Preferences\SpecialChar \menuseparator
5933 File Handling\SpecialChar \menuseparator
5940 \begin_inset Flex Code
5943 \begin_layout Plain Layout
5944 latex -src-specials $$i
5950 If this doesn't work, check if your TeX engine needs different options
5951 (the syntax might differ in some distributions).
5954 \begin_layout Subsubsection*
5955 External Packages (PDFSync and scrltx)
5958 \begin_layout Standard
5967 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5969 In order to enable it, load the packages in the LyX preamble:
5972 \begin_layout Itemize
5973 \begin_inset Flex Code
5976 \begin_layout Plain Layout
5984 for reverse PDF search,
5987 \begin_layout Itemize
5988 \begin_inset Flex Code
5991 \begin_layout Plain Layout
5994 usepackage[active]{srcltx}
5999 for reverse DVI search.
6002 \begin_layout Standard
6003 If you want to be able to perform both DVI and PDF reverse searches, you
6004 can also insert in the preamble the following lines
6007 \begin_layout LyX-Code
6011 \begin_inset Newline newline
6017 \begin_inset Newline newline
6023 \begin_inset Newline newline
6029 \begin_inset Newline newline
6034 usepackage[active]{srcltx}
6035 \begin_inset Newline newline
6043 \begin_layout Standard
6044 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6045 right package will be used.
6048 \begin_layout Standard
6049 Note that PDFSync might affect the output layout of your document.
6050 It is therefore advised to disable PDFsync for final documents.
6053 \begin_layout Subsubsection*
6054 Built-in reverse search via SyncTeX (DVI and PDF)
6057 \begin_layout Standard
6059 \begin_inset Flex Code
6062 \begin_layout Plain Layout
6068 have built-in support for both PDF and DVI reverse search.
6073 facility is basically the result of the integration of the PDFSync package
6074 to the pdftex program and its merge with the
6079 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6081 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6082 already provide SyncTeX support.
6085 \begin_layout Standard
6086 To enable SyncTeX for DVI output, change the
6087 \begin_inset Flex MenuItem
6090 \begin_layout Plain Layout
6095 \begin_layout Plain Layout
6108 \begin_inset Flex MenuItem
6111 \begin_layout Plain Layout
6116 \begin_layout Plain Layout
6123 eX (plain) -> DraftDVI
6129 \begin_inset Flex MenuItem
6132 \begin_layout Plain Layout
6133 Preferences\SpecialChar \menuseparator
6134 File Handling\SpecialChar \menuseparator
6141 \begin_inset Flex Code
6144 \begin_layout Plain Layout
6145 latex -synctex=1 $$i
6150 , and for PDF output, change the
6151 \begin_inset Flex MenuItem
6154 \begin_layout Plain Layout
6159 \begin_layout Plain Layout
6166 eX (pdflatex) -> PDF (pdflatex)
6172 \begin_inset Flex Code
6175 \begin_layout Plain Layout
6176 pdflatex -synctex=1 $$i
6182 Check the documentation of your viewer whether the viewer needs to be configure
6183 d for the use with SyncTeX.
6187 \begin_layout Plain Layout
6188 Note that the option
6189 \begin_inset Flex Code
6192 \begin_layout Plain Layout
6198 option enables gzip compression.
6199 If your viewer does not support it, you should instead use
6200 \begin_inset Flex Code
6203 \begin_layout Plain Layout
6217 \begin_layout Subsection
6218 Configuring and using specific viewers
6219 \begin_inset CommandInset label
6221 name "sub:configuring-viewers"
6228 \begin_layout Subsubsection*
6229 Xdvi (all platforms)
6232 \begin_layout Standard
6234 \begin_inset Flex Code
6237 \begin_layout Plain Layout
6243 , you don't need to do anything else for performing a reverse DVI search,
6244 as LyX already provides the necessary hooks for automatically using the
6246 \begin_inset Flex Code
6249 \begin_layout Plain Layout
6256 Just setup your document as described above (reverse search is triggered
6257 by Ctrl-click or Alt-click on Mac OSX, respectively).
6260 \begin_layout Standard
6261 However, if for whatever reason you want to use the named pipe instead of
6262 the socket for communicating with LyX, simply change the DVI viewer in
6264 \begin_inset Flex MenuItem
6267 \begin_layout Plain Layout
6268 Preferences\SpecialChar \menuseparator
6269 File Handling\SpecialChar \menuseparator
6279 \begin_layout Plain Layout
6280 On Mac OSX you have to use
6281 \begin_inset Flex Code
6284 \begin_layout Plain Layout
6285 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6296 \begin_inset Flex Code
6299 \begin_layout Plain Layout
6300 xdvi -editor "lyxeditor.sh %f %l"
6306 \begin_inset Flex Code
6309 \begin_layout Plain Layout
6315 is a suitable script.
6316 For example, a minimal shell script is the following one:
6319 \begin_layout LyX-Code
6321 \begin_inset Newline newline
6324 LYXPIPE="/path/to/lyxpipe"
6325 \begin_inset Newline newline
6328 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6329 \begin_inset Newline newline
6332 echo "$COMMAND" > "${LYXPIPE}".in || exit
6333 \begin_inset Newline newline
6336 read TMP < "${LYXPIPE}".out || exit
6339 \begin_layout Standard
6341 \begin_inset Flex Code
6344 \begin_layout Plain Layout
6354 \begin_layout Plain Layout
6361 XServer pipe path specified in
6362 \begin_inset Flex MenuItem
6365 \begin_layout Plain Layout
6366 Preferences\SpecialChar \menuseparator
6376 \begin_layout Plain Layout
6378 \begin_inset Flex Code
6381 \begin_layout Plain Layout
6387 folder of a source distribution you can find a
6388 \begin_inset Flex Code
6391 \begin_layout Plain Layout
6397 script which is able to locate the
6401 based on your preferences.
6409 \begin_layout Subsubsection*
6413 \begin_layout Standard
6415 \begin_inset Flex Code
6418 \begin_layout Plain Layout
6419 /Applications/MacDviX_Folder/calleditor.script
6424 , add the following lines:
6427 \begin_layout LyX-Code
6432 \begin_layout Plain Layout
6439 X.app/Contents/MacOS/lyxeditor "$2" $1
6440 \begin_inset Newline newline
6446 \begin_layout Standard
6447 Modify the lines accordingly if you install LyX somewhere else than in the
6448 Applications folder.
6451 \begin_layout Standard
6452 Reverse search is triggered by Alt-click (OPTION-click).
6455 \begin_layout Subsubsection*
6459 \begin_layout Standard
6461 \begin_inset Flex Code
6464 \begin_layout Plain Layout
6465 open -a Skim.app $$i
6470 to the viewer setting in
6471 \begin_inset Flex MenuItem
6474 \begin_layout Plain Layout
6475 Preferences\SpecialChar \menuseparator
6476 File Handling\SpecialChar \menuseparator
6477 File formats\SpecialChar \menuseparator
6484 \begin_inset Flex MenuItem
6487 \begin_layout Plain Layout
6488 Skim\SpecialChar \menuseparator
6489 Preferences\SpecialChar \menuseparator
6496 \begin_inset Flex MenuItem
6499 \begin_layout Plain Layout
6505 preset and enter command
6506 \begin_inset Flex MenuItem
6509 \begin_layout Plain Layout
6510 /Applications/LyX.app/Contents/MacOS/lyxeditor
6518 \begin_layout Standard
6519 Reverse search is triggered by COMMAND-SHIFT-click
6522 \begin_layout Subsubsection*
6526 \begin_layout Standard
6528 \begin_inset Flex MenuItem
6531 \begin_layout Plain Layout
6532 Settings\SpecialChar \menuseparator
6533 Configure Okular\SpecialChar \ldots{}
6534 \SpecialChar \menuseparator
6541 \begin_inset Quotes eld
6545 \begin_inset Quotes erd
6549 \begin_inset Flex Code
6552 \begin_layout Plain Layout
6561 \begin_layout Standard
6562 Reverse search is triggered by SHIFT-click.
6565 \begin_layout Subsubsection*
6569 \begin_layout Standard
6570 Launch yap, choose its
6571 \begin_inset Flex MenuItem
6574 \begin_layout Plain Layout
6575 View\SpecialChar \menuseparator
6582 \begin_inset Quotes eld
6586 \begin_inset Quotes erd
6591 \begin_inset Quotes eld
6594 New\SpecialChar \ldots{}
6596 \begin_inset Quotes erd
6599 button and, in the window that opens, enter
6600 \begin_inset Quotes eld
6604 \begin_inset Quotes erd
6607 (or any other name you like) in the
6608 \begin_inset Quotes eld
6612 \begin_inset Quotes erd
6616 Now click on the button labeled
6617 \begin_inset Quotes eld
6620 \SpecialChar \ldots{}
6622 \begin_inset Quotes erd
6625 to open a file dialog and navigate to the directory containing the batch
6627 \begin_inset Flex Code
6630 \begin_layout Plain Layout
6638 \begin_inset Flex Code
6641 \begin_layout Plain Layout
6647 and then specify the program arguments as
6648 \begin_inset Flex Code
6651 \begin_layout Plain Layout
6659 \begin_inset Flex Code
6662 \begin_layout Plain Layout
6668 wrapper is used for communicating with LyX through the
6675 \begin_layout LyX-Code
6677 \begin_inset Newline newline
6680 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6689 \begin_inset Newline newline
6703 \begin_layout Standard
6704 Make sure that the LyXServer pipe path you specified in LyX is
6705 \begin_inset Flex Code
6708 \begin_layout Plain Layout
6722 , otherwise change the
6723 \begin_inset Flex Code
6726 \begin_layout Plain Layout
6732 wrapper accordingly.
6735 \begin_layout Standard
6736 In yap, reverse search is triggered by double-click.
6739 \begin_layout Subsubsection*
6740 SumatraPDF (Windows)
6743 \begin_layout Standard
6744 In order to use SumatraPDF for inverse search, enter
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6749 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6754 in the viewer setting in
6755 \begin_inset Flex MenuItem
6758 \begin_layout Plain Layout
6759 Preferences\SpecialChar \menuseparator
6760 File Handling\SpecialChar \menuseparator
6761 File formats\SpecialChar \menuseparator
6768 \begin_inset Flex Code
6771 \begin_layout Plain Layout
6777 is the previous wrapper.
6778 If SumatraPDF.exe is not in your command PATH, use its full file name.
6781 \begin_layout Standard
6782 Reverse search is triggered by double-click.
6785 \begin_layout Subsubsection*
6789 \begin_layout Standard
6790 First of all, make sure that yap is your default DVI viewer in the Windows
6791 environment, then launch it, choose its
6792 \begin_inset Flex MenuItem
6795 \begin_layout Plain Layout
6796 View\SpecialChar \menuseparator
6803 \begin_inset Quotes eld
6807 \begin_inset Quotes erd
6812 \begin_inset Quotes eld
6815 New\SpecialChar \ldots{}
6817 \begin_inset Quotes erd
6820 button and, in the window that opens, enter
6821 \begin_inset Quotes eld
6825 \begin_inset Quotes erd
6828 (or any other name you like) in the
6829 \begin_inset Quotes eld
6833 \begin_inset Quotes erd
6837 Now click on the button labeled
6838 \begin_inset Quotes eld
6841 \SpecialChar \ldots{}
6843 \begin_inset Quotes erd
6846 to open a file dialog and navigate to the directory containing the
6847 \begin_inset Flex Code
6850 \begin_layout Plain Layout
6856 program (which is installed by default on Cygwin along with the LyX executable).
6858 \begin_inset Flex Code
6861 \begin_layout Plain Layout
6867 and then specify the program arguments as
6868 \begin_inset Flex Code
6871 \begin_layout Plain Layout
6878 In this way, you will be using the
6882 for communicating with LyX.
6883 If, for whatever reason, you want to use the
6888 \begin_inset Flex Code
6891 \begin_layout Plain Layout
6897 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6900 \begin_layout Standard
6901 In yap, reverse search is triggered by double-click.
6904 \begin_layout Subsubsection*
6908 \begin_layout Standard
6909 In order to use SumatraPDF for inverse search, enter
6910 \begin_inset Flex Code
6913 \begin_layout Plain Layout
6914 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6919 in the viewer setting in
6920 \begin_inset Flex MenuItem
6923 \begin_layout Plain Layout
6924 Preferences\SpecialChar \menuseparator
6925 File Handling\SpecialChar \menuseparator
6926 File formats\SpecialChar \menuseparator
6933 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6935 \begin_inset Flex Code
6938 \begin_layout Plain Layout
6944 enables communication via the
6950 \begin_inset Flex Code
6953 \begin_layout Plain Layout
6959 option if you want to use the
6963 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6966 \begin_layout Standard
6967 Reverse search is triggered by double-click.
6970 \begin_layout Section
6974 \begin_layout Standard
6975 Forward search is, as the name implies, in a sense the
6976 \begin_inset Quotes eld
6980 \begin_inset Quotes erd
6984 It allows you to let the viewer jump to a given position from within LyX.
6985 If forward search is set up (as described in what follows), you can put
6986 the cursor anywhere in your LyX document, and hit
6987 \begin_inset Flex MenuItem
6990 \begin_layout Plain Layout
6991 Navigate\SpecialChar \menuseparator
6998 \begin_inset Flex MenuItem
7001 \begin_layout Plain Layout
7007 in the context menu via right mouse click), and then the viewer will jump
7008 to that position as well.
7009 This implies, of course, that your viewer supports this function.
7012 \begin_layout Standard
7013 To make forward search possible, you first need to provide the generated
7014 output PDF/DVI file with additional information about the TeX sources.
7015 This can be done via the methods described in the section
7016 \begin_inset CommandInset ref
7018 reference "sub:rev-search"
7025 \begin_layout Standard
7026 Additionally, you need to configure LyX for using your viewers in
7027 \begin_inset Flex MenuItem
7030 \begin_layout Plain Layout
7031 Tools\SpecialChar \menuseparator
7032 Preferences\SpecialChar \menuseparator
7033 Output\SpecialChar \menuseparator
7040 We provide a range of tested configurations for some viewers, which you
7041 can select from the drop down list.
7042 If none of these configurations suits you, you have to find out and enter
7043 a suitable configuration yourself.
7044 The definition syntax uses the following placeholders:
7047 \begin_layout Itemize
7049 \begin_inset Flex Code
7052 \begin_layout Plain Layout
7061 \begin_layout Itemize
7063 \begin_inset Flex Code
7066 \begin_layout Plain Layout
7072 : name of the (temporary) exported .tex file (without path)
7075 \begin_layout Itemize
7077 \begin_inset Flex Code
7080 \begin_layout Plain Layout
7086 : name of the (temporary) exported .tex file (including path)
7089 \begin_layout Itemize
7091 \begin_inset Flex Code
7094 \begin_layout Plain Layout
7100 : name of the exported output file (either dvi or pdf, depending on which
7101 one exists in the temporary directory)
7104 \begin_layout Standard
7105 Note that only some of the viewers provide full forward search functionality,
7106 among them yap, xdvi, okular
7110 \begin_layout Plain Layout
7111 You might want to set
7112 \begin_inset Flex Code
7115 \begin_layout Plain Layout
7122 \begin_inset Flex MenuItem
7125 \begin_layout Plain Layout
7126 Tools\SpecialChar \menuseparator
7127 Preferences\SpecialChar \menuseparator
7128 File Handling\SpecialChar \menuseparator
7130 \begin_inset space ~
7147 \begin_layout Plain Layout
7148 For Sumatra CMCDDE is needed --- downloadable from
7149 \begin_inset CommandInset href
7151 target "http://www.istri.fr/zip/CMCDDE.zip"
7161 While many of the widespread PDF viewers (most notably Adobe Reader) do
7162 not support forward search at all, some other viewers -- e.
7163 \begin_inset space \thinspace{}
7167 evince and xpdf -- allow at least to reload the document and jump to a
7168 specific page of the file, so you can at least navigate
7169 \begin_inset Quotes eld
7173 \begin_inset Quotes erd
7177 This latter functionality is provided by an external call of synctex (see
7178 the predefined example configurations).
7182 \begin_layout Standard
7183 Forward search works both with DVI and PDF output.
7184 LyX simply checks which preview format you have used before (i.
7185 \begin_inset space \thinspace{}
7188 e., which format is already there in the temporary directory) and chooses
7189 the appropriate configuration for the respective format.
7192 \begin_layout Chapter
7193 Special Document Classes
7196 \begin_layout Section
7200 \begin_layout Standard
7206 \begin_layout Subsection
7210 \begin_layout Standard
7211 This section describes how LyX can be used to write articles for submission
7212 to the scientific journal
7214 Astronomy and Astrophysics
7216 (www.edpsciences.fr/aa/
7217 \begin_inset Flex URL
7220 \begin_layout Plain Layout
7222 http://www.edpsciences.fr/aa/
7227 ) using Version 5.01 of the document class
7232 This package can be downloaded from the ftp site
7235 \begin_layout Standard
7236 \begin_inset VSpace medskip
7242 \begin_layout Standard
7244 \begin_inset Flex URL
7247 \begin_layout Plain Layout
7249 ftp://ftp.edpsciences.org/pub/aa/readme.html
7257 \begin_layout Standard
7258 \begin_inset VSpace medskip
7264 \begin_layout Standard
7265 A manual comes together with that package, and this text is not meant to
7266 replace the original manual but is merely a short guide in how to realize
7267 the correct form of your paper.
7271 \begin_layout Standard
7272 Please note that the publisher of the journal was changed from Springer
7273 to EDP Sciences starting January 1, 2001.
7274 That change involved also some slight changes to the style files, namely
7275 the removal of the thesaurus command.
7276 The LyX class aa supports the newest version of these style files, V 5.01.
7277 If you have an older version installed, please upgrade.
7278 For compatibility, the old (version 4) layout has been kept as
7283 Please refer to the comments in
7285 LyXDir/layouts/aapaper.layout
7290 \begin_layout Subsection
7294 \begin_layout Standard
7295 It is recommended you start from the example template distributed with LyX.
7296 If you are not using a template, note the following settings:
7299 \begin_layout Itemize
7306 Document\SpecialChar \menuseparator
7309 dialog (OK, that one was obvious).
7312 \begin_layout Itemize
7313 Don't change the option
7316 \begin_inset space ~
7326 The whole layout is done by the macros, you shouldn't change anything.
7329 \begin_layout Subsection
7333 \begin_layout Standard
7334 First thing to enter is the header information.
7335 It consists of seven entries, of which some are optional.
7339 \begin_layout Itemize
7347 \begin_layout Itemize
7355 \begin_layout Itemize
7363 \begin_layout Itemize
7371 \begin_layout Itemize
7376 : [optional] if more than one author: whom to contact for offprint requests.
7379 \begin_layout Itemize
7384 : [optional] mail address for contacts.
7387 \begin_layout Itemize
7395 Received: <date>; Accepted <date>
7398 \begin_layout Standard
7399 There is no need to issue the
7405 command, this is done automatically by LyX when the header is finished.
7406 Although the order of the single header entries doesn't matter it is advised
7407 to keep the above sequence, just to get the best optics and meets the layout
7408 of the real document.
7411 \begin_layout Standard
7412 If you want to place footnotes in the header block, e.
7413 \begin_inset space \thinspace{}
7417 \begin_inset space \space{}
7420 to state your present address, just use the standard footnote via the menu
7423 Insert\SpecialChar \menuseparator
7427 LyX will automagically use the term
7436 \begin_layout Standard
7437 In addition to these topics, the macros use three additional LaTeX commands
7438 that have no counterpart in LyX:
7441 \begin_layout Itemize
7448 to separate different names for more than one author and institute, respectivel
7452 \begin_layout Itemize
7459 to mark corresponding author/institute pairs.
7460 The institutes are numbered sequentially as they appear in the
7464 field, so you have to put a marker to each author.
7467 \begin_layout Itemize
7474 to supply an email address for fast contact.
7477 \begin_layout Standard
7478 In all cases, the appropriate command has to be entered in LyX and marked
7484 \begin_layout Subsection
7488 \begin_layout Standard
7489 The abstract should immediately follow the header block.
7490 With version 5 the abstract environment was changed to a command, and there
7491 is now a resctriction to only one paragraph.
7492 In addition, it should contain an entry with the keywords.
7493 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7500 by hand and mark it as LaTeX code.
7501 Refer to the example paper.
7504 \begin_layout Subsection
7505 Supported environments
7508 \begin_layout Standard
7509 The A&A paper layout supports the following environments for structuring
7513 \begin_layout Itemize
7519 \begin_layout Itemize
7525 \begin_layout Itemize
7531 \begin_layout Itemize
7537 \begin_layout Itemize
7543 \begin_layout Itemize
7549 \begin_layout Itemize
7555 \begin_layout Itemize
7561 \begin_layout Itemize
7567 \begin_layout Itemize
7573 \begin_layout Itemize
7579 \begin_layout Itemize
7585 \begin_layout Subsection
7586 Commands not supported by LyX
7589 \begin_layout Standard
7590 Some commands are not yet supported by the
7595 Some have already been mentioned.
7596 For the sake of completeness, they are listed all together here:
7599 \begin_layout Itemize
7607 \begin_layout Itemize
7615 \begin_layout Itemize
7623 \begin_layout Itemize
7631 \begin_layout Itemize
7639 \begin_layout Itemize
7647 \begin_layout Itemize
7655 \begin_layout Itemize
7663 \begin_layout Standard
7664 If you want to use any of these commands, you have to enter them yourself.
7667 Do not forget to mark them as LaTeX code!
7670 \begin_layout Subsection
7671 Figure and Table Floats
7674 \begin_layout Standard
7675 LyX provides support for the necessary float environments
7677 figure, figure*, table
7683 , therefore we won't tell much about it here.
7687 \begin_inset space ~
7693 Just remember that tables should be left-aligned.
7694 For that, select the table and change the alignment in
7696 Edit\SpecialChar \menuseparator
7698 \begin_inset space ~
7704 \begin_layout Standard
7705 There is only one special thing: the figures with caption besides the figure.
7706 To create such a figure, you have to do the following:
7709 \begin_layout Enumerate
7710 Create a wide figure float:
7712 Insert\SpecialChar \menuseparator
7713 Float\SpecialChar \menuseparator
7716 , then right click in the figure and select
7722 \begin_inset space ~
7730 \begin_layout Enumerate
7731 Enter your caption text.
7734 \begin_layout Enumerate
7739 to move the cursor above the caption.
7742 \begin_layout Enumerate
7746 \begin_layout Enumerate
7747 Position the cursor behind the figure and insert a horizontal fill:
7749 Insert\SpecialChar \menuseparator
7751 \begin_inset space ~
7754 Character\SpecialChar \menuseparator
7756 \begin_inset space ~
7764 \begin_layout Enumerate
7765 Switch to LaTeX mode:
7768 \begin_inset space ~
7776 \begin_layout Enumerate
7786 Do not close the brace!
7789 \begin_layout Enumerate
7790 Position the cursor behind the caption text, switch to LaTeX mode and insert
7794 \begin_inset space ~
7806 \begin_layout Standard
7807 Also, refer to the figures in the example paper.
7810 \begin_layout Subsection
7814 \begin_layout Standard
7815 For submission, the paper has to be formated in a special double-spacing
7817 For this purpose, you have to give the option
7821 to the documentclass.
7822 This must be done using the extra class options field in the
7824 Document\SpecialChar \menuseparator
7828 Just enter the string
7835 \begin_layout Subsection
7839 \begin_layout Standard
7844 directory contains an example paper written with LyX.
7845 It is the example paper from the original macro package, translated to
7847 Use it for inspiration, and compare the original LaTeX code with LyX way
7851 \begin_layout Section
7855 \begin_layout Standard
7861 \begin_layout Subsection
7865 \begin_layout Standard
7866 AASTeX is a set of macros produced by the American Astronomical Society
7867 to facilitate electronic manuscript submission to the three journals they
7868 publish: the Astrophysical Journal (including the Letters and Supplement),
7869 the Astronomical Journal, and the Publications of the Astronomical Society
7871 LyX has proven to be an excellent tool for generating these documents,
7872 especially given its equation, citation, and figure handling capabilities.
7873 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7874 is the version described here, or higher.
7875 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7876 incompatible with LyX.
7877 The AASTeX package may be downloaded from the AASTeX Web site
7880 \begin_layout Standard
7881 \begin_inset VSpace medskip
7887 \begin_layout Standard
7889 \begin_inset Flex URL
7892 \begin_layout Plain Layout
7894 http://www.journals.uchicago.edu/AAS/AASTeX
7902 \begin_layout Standard
7903 \begin_inset VSpace medskip
7909 \begin_layout Standard
7910 A complete user guide is contained in that package and you should familiarize
7911 yourself with it thoroughly before embarking on writing a paper in LyX.
7912 LyX will not reduce the need to figure out all the AASTeX commands, it
7913 will only reduce the drudgery of typing everything in.
7914 It is your responsibility to ensure that the final exported LaTeX document
7915 conforms completely to the requirements of the journal to which you are
7916 submitting your paper.
7919 \begin_layout Subsection
7920 Starting a New Paper
7923 \begin_layout Standard
7924 I strongly suggest that you start with the AASTeX template file.
7927 File\SpecialChar \menuseparator
7934 , enter the new file name, then choose the
7939 This will show the most common fields found in a manuscript.
7940 Simply overwrite the existing text (including the brackets,
7944 ) with the correct information.
7945 Many of the AASTeX commands and environments can be implemented directly
7946 in LyX, but some cannot: most noticeably
7958 , which should stick out like a sore thumb if you actually just opened the
7960 For commands such as these, the LaTeX code must be entered directly and
7962 Such commands are referred to as TeX code, or Evil Red Text.
7963 I tried to minimize the amount of TeX code needed in an AASTeX document,
7964 but there is still a bit more required than any of us would like.
7967 \begin_layout Subsection
7968 Finishing Your Paper
7971 \begin_layout Standard
7972 When the paper is finished to your satisfaction and previews/prints correctly,
7974 \begin_inset Quotes eld
7978 \begin_inset Quotes erd
7981 actions which need to be done before you submit it to the journals.
7985 \begin_layout Enumerate
7986 Export your paper as a LaTeX file (
7988 File\SpecialChar \menuseparator
7989 Export\SpecialChar \menuseparator
7996 \begin_layout Enumerate
8001 file with your favorite text editor
8005 \begin_layout Enumerate
8006 remove the comment lines before the
8015 \begin_layout Enumerate
8020 usepackage...{fontenc}
8022 line if it appears (usually just after
8037 \begin_layout Enumerate
8038 remove everything between (and including) the
8050 commands, except for any commands you specifically put into the LaTeX preamble
8051 (which should appear immediately after the
8052 \begin_inset Quotes eld
8055 User specified LaTeX commands
8056 \begin_inset Quotes erd
8067 \begin_layout Enumerate
8068 Run the resulting file through LaTeX to make sure it still processes correctly.
8071 \begin_layout Enumerate
8072 Reread the journal requirements to make sure your filenames and formats
8076 \begin_layout Enumerate
8080 \begin_layout Subsection
8081 Comments On Specific Commands
8084 \begin_layout Standard
8085 I will not describe the detailed usage of the individual AASTeX commands:
8086 the AASTeX User Guide (
8090 ) gives a good description of each.
8091 Thus it's probably easiest for me to go down the list as found in the guide
8092 and offer comments where necessary.
8093 So let's begin \SpecialChar \ldots{}
8097 \begin_layout Subsubsection
8098 Things that work as expected
8101 \begin_layout Standard
8102 Because they work as you might expect, I simply list them and the section
8203 begin{thebibliography}
8211 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8212 graphicx figure commands (2.14.1),
8236 (2.15.4, amongst other places),
8263 \begin_layout Standard
8264 The following style options also work correctly:
8285 Simply put them in the
8291 Layout\SpecialChar \menuseparator
8297 \begin_layout Subsubsection
8298 Things that work, but require more comment
8301 \begin_layout Standard
8302 The following items work, but require a little more discussion:
8305 \begin_layout Itemize
8306 These items are reserved for use by the journal editors, but you can put
8307 them into the LaTeX preamble if you feel compelled to do so:
8340 \begin_layout Itemize
8341 These items may be placed in the LaTeX preamble, and are included as blanks
8342 in the template file:
8363 \begin_layout Itemize
8370 (2.3) – can only be used
8371 \begin_inset Quotes eld
8375 \begin_inset Quotes erd
8378 , not in the middle of a paragraph.
8379 Use TeX code if you need to embed it.
8382 \begin_layout Itemize
8389 (2.3) – will have extra {} after it.
8390 This should not cause an error.
8393 \begin_layout Itemize
8400 (2.6) – can only be used
8401 \begin_inset Quotes eld
8405 \begin_inset Quotes erd
8408 , not in the middle of a paragraph.
8409 Use TeX code if you need to embed it.
8412 \begin_layout Itemize
8419 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8423 \begin_layout Itemize
8437 \begin_layout Itemize
8444 (2.9) – will have extra {} after it.
8445 This should not cause an error.
8448 \begin_layout Itemize
8455 (2.11) – will have extra {} after it.
8456 This should not cause an error.
8459 \begin_layout Itemize
8466 (2.14.2) – you can insert an optional filename argument by placing the cursor
8467 at the beginning of the text and selecting
8469 Insert\SpecialChar \menuseparator
8474 \begin_inset Quotes eld
8478 \begin_inset Quotes erd
8481 inserts an optional argument of the type needed by
8488 Hopefully it will be renamed someday.
8491 \begin_layout Itemize
8504 for the catalog ID optional parameter
8507 \begin_layout Itemize
8520 for the catalog ID optional parameter
8523 \begin_layout Subsubsection
8524 Things not implemented, use TeX code
8527 \begin_layout Standard
8550 setcounter{equation}
8552 (2.12), Journal name abbreviations (2.13.4),
8588 (2.15.4, insert it as the first element in the lefthand cell after where
8590 Don't use any of LyX's rules in the table),
8602 (2.15.5), much of Misc (2.17, except
8653 \begin_layout Subsubsection
8654 Things that cannot be implemented
8657 \begin_layout Standard
8658 \SpecialChar \ldots{}
8659 at least in any meaningful sort of way, so I suggest ignoring them.
8660 They are the references environment (2.13.3), and the deluxetable environment
8662 If you really, really need to use deluxetable, I suggest editing it in
8663 a separate file with a text editor, then using
8665 Insert\SpecialChar \menuseparator
8667 \begin_inset space ~
8672 to include it in your LyX document.
8677 file to see an example of this.
8680 \begin_layout Subsection
8681 FAQs, Tips, Tricks, and Other Ruminations
8684 \begin_layout Subsubsection
8685 Getting LyX and AASTeX to cooperate
8688 \begin_layout Standard
8689 It can be a bit tricky to get LyX to recognize a new layout and document
8691 When all else fails, do this:
8694 \begin_layout Enumerate
8695 Make certain that LaTeX can find AASTeX.
8696 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8697 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8704 \begin_layout Enumerate
8716 \begin_layout Enumerate
8719 Tools\SpecialChar \menuseparator
8722 in LyX, then restart LyX.
8725 \begin_layout Enumerate
8726 Open a regular new file, not from a template.
8727 Does AASTeX appear in the class list in
8729 Document\SpecialChar \menuseparator
8735 \begin_layout Standard
8736 If you get a warning from an existing AASTeX document about not being able
8737 to find the AASTeX layout or a message about
8738 \begin_inset Quotes eld
8741 You should not mix title layouts with normal ones
8742 \begin_inset Quotes erd
8745 , things haven't been installed correctly.
8748 \begin_layout Subsubsection
8749 LaTeX error processing a table
8752 \begin_layout Standard
8753 LyX, by default, attempts to center the table caption/title.
8754 This seems to produce a bad interaction in AASTeX so you should click somewhere
8755 in the caption/title, then select
8757 Edit\SpecialChar \menuseparator
8759 \begin_inset space ~
8773 This took care of it for me.
8776 \begin_layout Subsubsection
8780 \begin_layout Standard
8781 A couple of things: 1) I have noticed some funny spacing in the reference
8782 entries in the text.
8783 When you enter the bibliography item data, make sure their is
8787 space between the last author and the parenthesis setting off the year;
8791 \begin_inset space \thinspace{}
8795 \begin_inset space \space{}
8809 2) Entering the references at all is not obvious.
8810 The easiest thing is to start typing your first reference at the end of
8811 the document, then mark it as type
8816 That will put a small gray box in front of what you just typed.
8817 Click on the box to fill in the rest of the information.
8818 For new references, go to the end of an existing reference and press return.
8819 That will create a new line with its own box, etc.
8822 \begin_layout Subsubsection
8826 \begin_layout Standard
8827 Even though AASTeX provides its own figure commands (
8833 , for example), I much prefer LaTeX's standard figure commands (with the
8842 \begin_inset space ~
8845 commands as TeX code into a Figure Float box if you desire, but I never
8846 have much luck getting the layout right.
8847 With the standard graphics, LyX will insert a
8851 usepackage{graphicx}
8853 command into the LaTeX preamble and handle the figures in the standard
8854 LaTeX2e way, interspersing the figures in the text.
8855 I believe ApJ accepts figures exactly this way now; AJ might still use
8857 \begin_inset Quotes eld
8860 stack everything at the end
8861 \begin_inset Quotes erd
8867 \begin_layout Subsubsection
8868 Things I could have done, but didn't
8871 \begin_layout Standard
8873 \begin_inset Quotes eld
8877 \begin_inset Quotes erd
8880 things I could have implemented, but chose not to.
8881 For instance, I saw no point in double-spacing the text in the LyX window,
8882 even though it is double-spaced in the paper manuscript.
8883 Also, I chose not to make separate layouts for the preprint and preprint2
8885 Since I assume you will spend most of your time in the plain manuscript
8886 mode anyway, I decided not to chew up more disk space with this.
8890 \begin_layout Subsection
8894 \begin_layout Standard
8895 Your mileage may vary.
8896 I've now had papers published by both ApJ and AJ that have had 98% of the
8897 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8899 I have had no trouble with the submission process, and I'm sure the journals
8900 were never aware that there might be a difference.
8901 So, go forth and publish!
8904 \begin_layout Section
8908 \begin_layout Standard
8918 \begin_layout Standard
8919 \begin_inset VSpace bigskip
8925 \begin_layout Standard
8927 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8928 papers to be submitted to American Mathematical Society publications.
8929 The layouts are not tailored to a specific journal, but easily can be.
8930 You should refer to the AMS documentation for specific instructions for
8931 each journal (usually it will entail only changing a single line in the
8933 That documentation is available on the Web at
8934 \begin_inset Flex URL
8937 \begin_layout Plain Layout
8945 \begin_inset Flex URL
8948 \begin_layout Plain Layout
8950 ftp://ftp.ams.org/pub/tex/amslatex/
8956 These layouts are appropriate, and useful, for any mathematical writing.
8960 \begin_layout Standard
8961 There are two basic AMS LaTeX layouts:
8964 \begin_layout Itemize
8965 amsart: The standard AMS article format.
8968 \begin_layout Itemize
8969 amsbook: the standard AMS book (really, monograph) format.
8973 \begin_layout Standard
8974 The layouts themselves contain only the minimum necessary to use the AMS
8976 They do not, in particular, contain any of the `theorem' environments used
8977 for setting theorems, lemmas, and the like.
8978 These are contained, instead, in the
8979 \begin_inset Flex Code
8982 \begin_layout Plain Layout
8988 module, which is loaded by default when you select one of the AMS classes.
8989 (It can also be used with other classes and can be removed, if you would
8990 rather use something else.) Less commonly used environments are in the
8991 \begin_inset Flex Code
8994 \begin_layout Plain Layout
8995 Theorems (AMS-Extended)
9000 module, which must be loaded manually.
9003 \begin_layout Standard
9004 By default, theorems and the like are numbered consecutively throughout
9005 the document, but this may be modified by loading the module
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9010 Theorems (Order by Section)
9015 or, if you are using
9016 \begin_inset Flex Code
9019 \begin_layout Plain Layout
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9030 Theorems (Order by Chapter)
9036 These will number the results as
9037 \begin_inset Formula $n.m$
9040 , where the first number refers to the section (or chapter) and the second
9041 refers to the total number of results so far in that section (or chapter).
9042 Many environments are also available unnumbered.
9043 These are indicated by an asterisk at the end.
9044 If you happen to want
9048 unnumbered results, the module
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9058 provides that option.
9061 \begin_layout Standard
9062 Note that these modules do not
9066 to be used with the AMS classes.
9067 It is perfectly possible to use the
9068 \begin_inset Flex Code
9071 \begin_layout Plain Layout
9077 module, and the others mentioned, with other classes, such as
9078 \begin_inset Flex Code
9081 \begin_layout Plain Layout
9088 \begin_inset Flex Code
9091 \begin_layout Plain Layout
9098 \begin_inset Flex Code
9101 \begin_layout Plain Layout
9110 \begin_layout Subsection
9111 What these layouts provide
9114 \begin_layout Standard
9115 There is a long list of included environments provided by these layouts.
9116 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9117 variety of `theorem' environments.
9118 However, the AMS recommends the environments that are available in LyX.
9122 \begin_layout Standard
9123 The following environments—as well as the standard environments, such as
9125 \begin_inset Flex Noun
9128 \begin_layout Plain Layout
9135 \begin_inset Flex Noun
9138 \begin_layout Plain Layout
9145 \begin_inset Flex Noun
9148 \begin_layout Plain Layout
9155 \begin_inset Flex Noun
9158 \begin_layout Plain Layout
9165 \begin_inset Flex Noun
9168 \begin_layout Plain Layout
9175 \begin_inset Flex Code
9178 \begin_layout Plain Layout
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9197 \begin_layout Description
9198 Address This should be the author's permanent address.
9201 \begin_layout Description
9203 \begin_inset space ~
9206 Address This should be the author's temporary address at the time of submission,
9207 if different from the Address.
9210 \begin_layout Description
9211 Email Author's e-mail address
9214 \begin_layout Description
9215 URL Author's Web address, if desired.
9218 \begin_layout Description
9219 Keywords Key words or phrases used to identify specific topics discussed
9223 \begin_layout Description
9224 Subjectclass These refer to the AMS Subject Classifications, published and
9227 Mathematical Reviews
9230 These are also available online at the AMS cites listed above.
9233 \begin_layout Description
9237 \begin_layout Description
9241 \begin_layout Description
9245 \begin_layout Standard
9246 The following environments are provided by both the
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9257 \begin_inset Flex Code
9260 \begin_layout Plain Layout
9266 modules, in the latter case in both starred (unnumbered) and unstarred
9267 (numbered) versions.
9268 These same environments are provided only in the starred versions by the
9270 \begin_inset Flex Code
9273 \begin_layout Plain Layout
9282 \begin_layout Theorem
9283 This is typically used for the statements of major results.
9287 \begin_layout Corollary*
9288 This is used for statements which follow fairly directly from previous statement
9290 Again, these can be major results.
9295 These are smaller results needed to prove other statements.
9298 \begin_layout Proposition
9299 These are less major results which (hopefully) add to the general theory
9303 \begin_layout Conjecture
9304 These are statements provided without justification, which the author does
9305 not know how to prove, but which seem to be true (to the author, at least).
9308 \begin_layout Definition*
9309 Guess what this is for.
9310 The font is different for this environment than for the previous ones.
9314 \begin_layout Example*
9315 Used for examples illustrating proven results.
9318 \begin_layout Problem
9319 It's not really known what this is for.
9320 You should figure it out.
9323 \begin_layout Exercise*
9324 Write a description for this one.
9327 \begin_layout Remark
9328 This environment is also a type of theorem, usually a lesser sort of observation.
9331 \begin_layout Claim*
9332 Often used in the course of giving a proof of a larger result.
9336 Generally, these are used to break up long arguments, using specific instances
9342 The numbering scheme for cases is on its own, not together with other numbered
9348 At the end of this environment, a QED symbol (usually a square, but it can
9349 vary with different styles) is placed.
9350 If you want to have other environments within this one—for example, Case
9351 environments—and have the QED symbol appear only after them, then the other
9352 environments need to be nested within the proof environment.
9355 Nesting Environments
9361 for information on nesting.
9364 \begin_layout Standard
9365 And these environments are provided by
9366 \begin_inset Flex Code
9369 \begin_layout Plain Layout
9370 Theorems (AMS-Extended)
9378 \begin_layout Criterion*
9379 A required condition.
9382 \begin_layout Algorithm*
9383 A general procedure to be used.
9386 \begin_layout Axiom*
9387 This is a property or statement taken as true within the system being discussed.
9390 \begin_layout Condition*
9391 Sometimes used to state a condition assumed within the present context of
9396 Similar to a Remark.
9399 \begin_layout Notation*
9400 Used for the explanation of, yes, notation.
9403 \begin_layout Summary
9404 Do we really need to tell you?
9407 \begin_layout Acknowledgement*
9411 \begin_layout Conclusion*
9412 Sometimes used at the end of a long train of argument.
9416 Used in a way similar to Proposition, though perhaps lower on the scale.
9419 \begin_layout Standard
9420 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9422 They need to be available on your system in order to use these environments.
9425 \begin_layout Section
9433 \begin_layout Standard
9439 \begin_layout Subsection
9443 \begin_layout Standard
9444 These are the layout files for some of the journals of the American Geophysical
9446 It is assumed that you have both the AGU's own class files and AGUplus
9447 installed (everything to be found at
9448 \begin_inset Flex URL
9451 \begin_layout Plain Layout
9453 ftp://ftp.agu.org/journals/latex/journals
9461 \begin_layout Subsection
9465 \begin_layout Standard
9475 They are still called this in the LyX GUI, though their LaTeX equivalents
9476 in the AGU classes are
9487 \begin_layout Standard
9488 Newly defined styles are
9525 These are mostly manuscript attributes and defined in the AGU class documentati
9529 \begin_layout Standard
9530 I suspect this is still badly incomplete.
9533 \begin_layout Subsection
9537 \begin_layout Standard
9554 \begin_layout Subsection
9558 \begin_layout Itemize
9561 Journal of Geophysical Research
9570 \begin_layout Standard
9571 Add your own, it isn't so hard! Look at the
9582 \begin_layout Subsection
9583 Bugs and things to remember
9586 \begin_layout Standard
9587 In order to use the new layouts, you must remember to do the following for
9591 \begin_layout Enumerate
9597 This can be done in the
9599 Layout\SpecialChar \menuseparator
9604 Document\SpecialChar \menuseparator
9608 (AGU articles are always in English, right? So
9615 \begin_layout Enumerate
9625 (Yes, this is a bug.)
9628 \begin_layout Enumerate
9629 Make sure you use the
9633 bibliography style, by entering
9637 into the second field of the BibTeX inset.
9638 None of the standard styles will do.
9641 \begin_layout Section
9645 \begin_layout Standard
9651 \begin_layout Subsection
9655 \begin_layout Standard
9656 Broadway is for writing plays.
9657 The format is more decorative than Hollywood, and much less standardized.
9658 This format should be suitable for workshops.
9661 \begin_layout Subsection
9665 \begin_layout Standard
9666 The same as in Hollywood.
9669 \begin_layout Subsection
9673 \begin_layout Standard
9678 names as labels then cross-reference the label to insert the name.
9679 The cross-reference dialog will show the current cast of characters.
9682 \begin_layout Subsection
9683 Paper size and Margins
9686 \begin_layout Standard
9687 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9690 \begin_layout Subsection
9694 \begin_layout Standard
9695 The following environments are available.
9696 You can use broadway.bind to get the bind keys shown at the right.
9699 \begin_layout Itemize
9703 \begin_inset Newline newline
9708 You should not have to use this, but it is here for anything that does not
9712 \begin_layout Itemize
9716 \begin_inset space \hfill{}
9720 \begin_inset Newline newline
9725 Used to describe stage setting and the action.
9726 First use of speaker names in all CAPs.
9729 \begin_layout Itemize
9733 \begin_inset space \hfill{}
9737 \begin_inset Newline newline
9742 Automatically numbered.
9743 On screen it will be arabic, but will print as Roman.
9746 \begin_layout Itemize
9750 \begin_inset space \hfill{}
9754 \begin_inset Newline newline
9764 It is just centered text.
9767 \begin_layout Itemize
9771 \begin_inset space \hfill{}
9775 \begin_inset Newline newline
9780 Not automatically numbered.
9781 You supply the number.
9782 This is because I couldn't figure out how.
9785 \begin_layout Itemize
9789 \begin_inset space \hfill{}
9793 \begin_inset Newline newline
9798 A special case of Narrative to describe the setting and action as the curtain
9802 \begin_layout Itemize
9806 \begin_inset space \hfill{}
9810 \begin_inset Newline newline
9815 The speaker's (actor's) title, centered in all CAPS.
9818 \begin_layout Itemize
9822 \begin_inset space \hfill{}
9826 \begin_inset Newline newline
9831 Instructions to the speaker.
9832 The parentheses are automatically inserted.
9833 The ( will appear on screen, but both will be in the printed play.
9834 This environment is only used within
9841 \begin_layout Itemize
9845 \begin_inset space \hfill{}
9849 \begin_inset Newline newline
9854 What the Speaker says.
9857 \begin_layout Itemize
9861 \begin_inset space \hfill{}
9865 \begin_inset Newline newline
9870 The curtain comes down.
9873 \begin_layout Itemize
9877 \begin_inset space \hfill{}
9883 \begin_layout Itemize
9887 \begin_inset space \hfill{}
9893 \begin_layout Itemize
9897 \begin_inset space \hfill{}
9903 \begin_layout Standard
9907 \begin_layout Section
9911 \begin_layout Standard
9916 can be used to type letters according to German conventions.
9917 A template file is included in
9919 .../lyx/share/templates
9921 for you to use as a starting point.
9924 \begin_layout Section
9932 \begin_layout Standard
9938 \begin_layout Subsection
9942 \begin_layout Standard
9943 This is the layout file for the European Geophysical Society journals.
9948 can be downloaded from the web site of the EGS under
9949 \begin_inset Flex URL
9952 \begin_layout Plain Layout
9962 \begin_layout Subsection
9966 \begin_layout Standard
9969 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9977 The current layout file is unfortunately very unmodular and would benefit
9978 from using the various
9985 \begin_layout Section
9989 \begin_layout Standard
9990 See the LyX template file
9995 It contains all infos you need.
9998 \begin_layout Section
10004 \begin_inset CommandInset label
10013 \begin_layout Standard
10019 \begin_layout Subsection
10023 \begin_layout Standard
10024 This section describes how to use LyX to make slides for overhead projectors.
10025 There are two document classes that can do this: the default slides class
10031 This section documents the latter.
10034 \begin_layout Standard
10035 I'm going to say this again, nice and clear, so that there's no misunderstanding
10039 \begin_layout Standard
10040 \begin_inset VSpace bigskip
10046 \begin_layout Standard
10050 This section documents the class
10051 \begin_inset Quotes eld
10059 \begin_inset Quotes erd
10067 \begin_layout Standard
10068 \begin_inset VSpace bigskip
10074 \begin_layout Standard
10075 If you're looking for the documentation for
10076 \begin_inset Quotes eld
10084 \begin_inset Quotes erd
10087 , check out section
10088 \begin_inset space ~
10092 \begin_inset CommandInset ref
10094 reference "sec:slitex"
10099 If your machine doesn't have the
10104 \begin_inset Quotes eld
10112 \begin_inset Quotes erd
10115 ] installed, you'll probably have to use the default
10119 class, which isn't quite as good as
10124 \begin_layout Standard
10129 class is designed for use with version 2.1 of the
10133 LaTeX class file which is now an integral part of LaTeX2e.
10136 \begin_layout Subsection
10140 \begin_layout Standard
10141 Obviously, to use this document class, you need to select
10142 \begin_inset Quotes eld
10150 \begin_inset Quotes erd
10160 \begin_inset space ~
10166 There are some settings in the
10169 \begin_inset space ~
10174 dialog that you should know about that are specific to this class:
10177 \begin_layout Itemize
10178 Don't change the options
10189 \begin_inset space ~
10195 They're ignored by the
10202 \begin_layout Itemize
10203 The default font size is 20
10204 \begin_inset space \thinspace{}
10207 pt with the other options being 17
10208 \begin_inset space \thinspace{}
10212 \begin_inset space \thinspace{}
10216 \begin_inset space \thinspace{}
10222 \begin_layout Itemize
10223 The default font is
10231 but all math equations are still typeset in the usual roman font.
10234 \begin_layout Itemize
10239 supports A4 and Letter paper sizes as well as a special size for working
10241 \begin_inset space \thinspace{}
10245 It doesn't support A5, B5, legal or executive paper sizes.
10248 \begin_layout Itemize
10249 Don't bother changing the
10253 settings because they are ignored anyway.
10254 All floats appear where they are defined in the text.
10257 \begin_layout Itemize
10262 setting behaves a bit differently for this class.
10267 provides extensive footer and header capabilities including a user-defined
10270 \begin_inset space ~
10274 \begin_inset CommandInset ref
10276 reference "sec:foilfoot"
10281 The title page is treated differently to all other pages in the document
10290 has the logo centered at the bottom of the page (if one is defined).
10291 The possible page style choices and what they do are as follows:
10295 \begin_layout Labeling
10296 \labelwidthstring MMMMMMM
10303 The final output contains no page numbers, or other headers or footers
10304 (except footnotes of course).
10308 \begin_layout Labeling
10309 \labelwidthstring MMMMMMM
10316 The final output contains page numbers centered at the bottom of the page.
10317 No other headings or footers (other than footnotes).
10320 \begin_layout Labeling
10321 \labelwidthstring MMMMMMM
10326 Page numbers in lower right corner.
10327 Additional headers and footers are also shown.
10328 This is also the default.
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMM
10337 Gives you access to the
10341 package although its use with
10345 is discouraged by the writer of the
10349 package because of some potential page layout clashes.
10353 \begin_layout Subsubsection
10357 \begin_layout Standard
10358 The following options may be used in the extra class options in the
10360 Document\SpecialChar \menuseparator
10366 \begin_layout Labeling
10367 \labelwidthstring MMMMMMx
10372 This sets up the page layout for 7.33
10373 \begin_inset space \thinspace{}
10377 \begin_inset space \thinspace{}
10380 in paper, which is about the same aspect ratio as a 35
10381 \begin_inset space \thinspace{}
10384 mm slide, making it a bit easier to work with this medium.
10387 \begin_layout Labeling
10388 \labelwidthstring MMMMMMx
10393 Places a rule across the page below the header on every page except the
10397 \begin_layout Labeling
10398 \labelwidthstring MMMMMMx
10403 Places a rule across the page above the footer on every page except the
10407 \begin_layout Labeling
10408 \labelwidthstring MMMMMMx
10413 This is automatically set each time you create a new
10422 to use the dvips driver to rotate those pages that are set as landscape
10426 \begin_layout Labeling
10427 \labelwidthstring MMMMMMx
10432 Simply changes the page dimensions to those of a landscape page but doesn't
10434 Thus if you use this option you need to use an external program to rotate
10435 each page or feed your paper through your printer as landscape.
10436 Note that this option effectively reverses the roles of the
10444 environments (don't worry these are described in the next section).
10447 \begin_layout Labeling
10448 \labelwidthstring MMMMMMx
10453 Equation numbers on the left.
10456 \begin_layout Labeling
10457 \labelwidthstring MMMMMMx
10462 Flush-left equations.
10465 \begin_layout Subsection
10466 Supported Environments
10469 \begin_layout Standard
10470 Most of the environments commonly supported in other classes are also supported
10476 There are several additional environments provided by
10480 as well as a couple added by LyX.
10481 The following environments are shared with other classes:
10484 \begin_layout Standard
10485 \begin_inset Flex Multiple Columns
10488 \begin_layout Itemize
10494 \begin_layout Itemize
10500 \begin_layout Itemize
10506 \begin_layout Itemize
10512 \begin_layout Itemize
10518 \begin_layout Itemize
10524 \begin_layout Itemize
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Itemize
10548 \begin_layout Itemize
10554 \begin_layout Itemize
10560 \begin_layout Itemize
10566 \begin_layout Itemize
10572 \begin_layout Itemize
10578 \begin_layout Itemize
10584 \begin_layout Itemize
10590 \begin_layout Itemize
10601 \begin_layout Standard
10602 That is, all the major environments apart from the sectioning environments.
10603 Since foils are essentially self-contained sections, with a title and body,
10608 provides specific commands for starting new foils and these are:
10611 \begin_layout Itemize
10617 \begin_layout Itemize
10623 \begin_layout Standard
10624 LyX also provides slightly modified versions of these two environments called:
10627 \begin_layout Itemize
10633 \begin_layout Itemize
10636 ShortRotatefoilhead
10639 \begin_layout Standard
10640 and the differences will be explained in the next section.
10643 \begin_layout Standard
10644 Since foils are often used in presenting ideas or new theorems and such
10649 also provides a comprehensive box of goodies for presenting them:
10652 \begin_layout Standard
10653 \begin_inset Flex Multiple Columns
10656 \begin_layout Itemize
10662 \begin_layout Itemize
10668 \begin_layout Itemize
10674 \begin_layout Itemize
10680 \begin_layout Itemize
10686 \begin_layout Itemize
10692 \begin_layout Itemize
10698 \begin_layout Itemize
10704 \begin_layout Itemize
10710 \begin_layout Itemize
10716 \begin_layout Itemize
10727 \begin_layout Standard
10728 The starred versions are unnumbered while the unstarred versions are numbered.
10729 There are also two list environments added by LyX and these are:
10732 \begin_layout Itemize
10738 \begin_layout Itemize
10744 \begin_layout Standard
10749 provides some powerful header and footer capabilities that are best set
10750 in the preamble although they may be set at any point in a document.
10751 If you want to change these settings in your document the best place to
10752 do so is at the very top of a foil, i.
10753 \begin_inset space \thinspace{}
10759 \begin_inset space \space{}
10764 straight after the foilhead.
10767 \begin_layout Standard
10768 For this purpose, the following command styles are provided [
10775 \begin_layout Standard
10776 \begin_inset Flex Multiple Columns
10779 \begin_layout Itemize
10783 \begin_inset space ~
10789 \begin_layout Itemize
10795 \begin_layout Itemize
10799 \begin_inset space ~
10805 \begin_layout Itemize
10809 \begin_inset space ~
10815 \begin_layout Itemize
10819 \begin_inset space ~
10826 \begin_layout Plain Layout
10827 \begin_inset space ~
10839 \begin_layout Standard
10840 There are also a few commands provided by
10844 that aren't directly supported by LyX but I'll tell you what they do and
10845 how to use them in section
10846 \begin_inset space ~
10850 \begin_inset CommandInset ref
10852 reference "sec:unsuppfoils"
10859 \begin_layout Subsection
10860 Building a Set of Foils
10863 \begin_layout Standard
10864 This section will give a simple introduction to using the different environments
10865 to build a set of foils.
10866 If you want to see an example set of foils, take a look at the
10870 file you find in LyX's
10877 \begin_layout Subsubsection
10878 Give It a Title Page
10881 \begin_layout Standard
10882 Unlike other classes that provide
10902 creates the title on a page of its own.
10903 If you leave out the
10907 environment LaTeX will substitute the current date (every time you regenerate
10911 \begin_layout Subsubsection
10915 \begin_layout Standard
10916 As I mentioned earlier, there are four ways of starting a new foil.
10917 For portrait foils you should use
10926 The difference between these two environments is the amount of space between
10927 the title of the foil (the foilhead) and the body of the foil.
10930 \begin_layout Standard
10931 Landscape foils are generated using the
10937 ShortRotatefoilhead
10940 Again the only difference is the spacing between foilhead and body.
10941 Both of the short versions have 0.5
10942 \begin_inset space ~
10945 inches less separation between the foilhead and the body.
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951 you have to use the
10955 driver to generate the PostScript output otherwise the foils won't be rotated.
10956 It is possible to get landscape foils even if you haven't got the
10960 driver provided you can feed your foils sideways through your printer ;-)
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970 They must be separated by something.
10971 If you try, you will just be extending the previous environment as if you
10972 had merged the two environments together.
10973 So, how do you get around this problem? The simplest option is to insert
10974 some text between the two environments or add a
10978 environment between the two with just a
10979 \begin_inset Quotes eld
10987 \begin_inset Quotes erd
10991 This will force LyX to produce two separate environments and hence the
10992 correct LaTeX output.
10993 An example is provided in the example file included with the LyX distribution.
10994 Remember, this problem only occurs if you are trying to place two of the
10995 same type of theorem-like environments one directly after the other.
10998 \begin_layout Subsubsection
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004 well as two new ones.
11005 I'll only describe the new ones here.
11006 If you want to find out more about the other list environments check out
11012 If you intend to use itemized lists you might also want to read about the
11016 \begin_inset space ~
11020 \begin_inset space ~
11025 dialog described above in section
11026 \begin_inset space ~
11030 \begin_inset CommandInset ref
11032 reference "sec:bullet"
11039 \begin_layout Standard
11040 The two new list styles,
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049 or right and wrong by providing dedicated environments that use a tick
11050 or a cross as the label of the list.
11051 These lists are in fact dedicated variants of the
11056 They do however require that you have the
11060 packages installed.
11063 \begin_layout Subsubsection
11067 \begin_layout Standard
11072 redefines the floating tables and figures so that they appear exactly where
11073 they are in the text rather than pushing them to the top of the page or
11074 to some user specified location.
11075 In fact if you change the float placement settings they are simply ignored.
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11082 name "sec:foilfoot"
11089 \begin_layout Standard
11093 \begin_inset space ~
11102 are two commands used to control the left-footer text string.
11103 The first is meant to allow you to include a graphic logo on your foils
11105 \begin_inset Quotes eld
11113 \begin_inset Quotes erd
11117 While the second is meant to provide a classification for the audience,
11121 \begin_inset space \thinspace{}
11127 \begin_inset space \space{}
11131 It is empty by default.
11134 \begin_layout Standard
11135 The remaining page corners can be filled by
11138 \begin_inset space ~
11143 (which defaults to page numbers),
11146 \begin_inset space ~
11154 \begin_inset space ~
11162 \begin_layout Subsection
11168 \begin_inset CommandInset label
11170 name "sec:unsuppfoils"
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a
11186 within another environment.
11189 \begin_layout Subsubsection
11193 \begin_layout Standard
11194 All lengths are adjusted using the
11217 should be replaced by the name given to the length you want to change and
11222 is the length value.
11223 All lengths should be specified in units of length such as inches (
11235 ) or relative to some document or font-based length such as
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247 foil by adjusting the length specified by
11254 For example, to make
11259 \begin_inset space \space{}
11262 in closer to their bodies put the following in the preamble:
11268 foilheadskip}{-0.5in}
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11283 Separation between the text and the top of the float
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11294 Separation between the float and the caption
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11305 Separation between the caption and the following text
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11316 You can make the captions narrower than the surrounding text by adjusting
11318 Best done relative to
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329 if you have a long title or several authors:
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11340 Separation from headers to
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11425 a list environment then all the vertical spacing between the list items
11427 Note that this is a command not a length so it doesn't require
11433 like the stuff mentioned above.
11436 \begin_layout Subsubsection
11437 Headers and Footers
11440 \begin_layout Standard
11453 commands control whether the logo in the
11457 definition appear on a given page.
11464 in the preamble then none of the foils will have the logo on them.
11465 If you don't want the logo on a particular page place the
11471 directly after the foilhead of that page and the
11477 directly after the next foilhead.
11480 \begin_layout Standard
11481 If you decide to use the
11485 page style setting in the
11488 \begin_inset space ~
11493 dialog you should probably add
11503 to your preamble so headers and footers on landscape pages are correctly
11504 placed when rotated.
11505 This is due to some clashes between the page layouts provided by the
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11520 \begin_layout Standard
11526 \begin_layout Subsection
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a
11532 \begin_inset Quotes eld
11536 \begin_inset Quotes erd
11539 It is designed to make the readers focus on content and to be easy and
11540 familiar for the actors to read.
11541 Each page of a script should be one minute of film.
11542 Nothing goes in a script that you cannot see or hear on screen.
11543 The courier 12 pt font should be used throughout.
11547 \begin_layout Subsection
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553 If a speaker's lines continue over a page break, repeat the
11557 title followed by (Cont'd).
11560 \begin_layout Subsection
11564 \begin_layout Standard
11569 names as labels then cross-reference the label to insert the name.
11570 The cross-reference dialog will show the current cast of characters.
11571 You can use this to insert the speaker name in narratives also.
11574 \begin_layout Subsection
11575 Paper size and Margins
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11582 \begin_layout Subsection
11586 \begin_layout Standard
11587 The following environments are available.
11588 You can use hollywood.bind to get the bind keys shown at the right.
11591 \begin_layout Itemize
11595 \begin_inset Newline newline
11600 Used where nothing else works.
11604 \begin_layout Itemize
11610 \begin_inset space \hfill{}
11618 \begin_inset Newline newline
11621 Usually followed by something like
11622 \begin_inset Quotes eld
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11632 \begin_layout Itemize
11636 \begin_inset space \hfill{}
11640 \begin_inset Newline newline
11645 Introduces a new INTERIOR camera set-up.
11646 Always followed by DAY or NIGHT, or something similar to define the lighting
11648 Everthing on this line in CAPS.
11651 \begin_layout Itemize
11655 \begin_inset space \hfill{}
11659 \begin_inset Newline newline
11664 Introduces a new EXTERIOR camera set-up.
11665 Everthing on this line in CAPS.
11668 \begin_layout Itemize
11672 \begin_inset space \hfill{}
11676 \begin_inset Newline newline
11681 The character speaking.
11684 \begin_layout Itemize
11688 \begin_inset space \hfill{}
11692 \begin_inset Newline newline
11697 Instructions to the speaker.
11698 The () are automatically inserted, but only the ( will show in LyX.
11699 Both will be printed.
11702 \begin_layout Itemize
11706 \begin_inset space \hfill{}
11710 \begin_inset Newline newline
11722 \begin_layout Itemize
11726 \begin_inset space \hfill{}
11730 \begin_inset Newline newline
11735 Camera movement instruction.
11737 \begin_inset space \thinspace{}
11741 \begin_inset space \space{}
11747 \begin_layout Itemize
11751 \begin_inset space \hfill{}
11757 \begin_layout Itemize
11761 \begin_inset space \hfill{}
11767 \begin_layout Itemize
11771 \begin_inset space \hfill{}
11777 \begin_layout Itemize
11781 \begin_inset space \hfill{}
11787 \begin_layout Subsection
11791 \begin_layout Itemize
11795 \begin_layout Itemize
11799 \begin_layout Itemize
11801 \begin_inset space \thinspace{}
11808 \begin_layout Itemize
11813 \begin_layout Itemize
11814 PAN — camera movement
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11821 \begin_layout Section
11825 \begin_layout Standard
11828 Panayotis Papasotiriou
11831 \begin_layout Subsection
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11839 International Journal of Modern Physics C
11842 Similarly, the ijmpd package is for creating manuscripts to be submitted
11845 International Journal of Modern Physics D
11848 Both journals are published by World Scientific.
11849 The corresponding document classes are named
11858 These files, together with instructions for the authors, can be downloaded
11860 \begin_inset Flex URL
11863 \begin_layout Plain Layout
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11871 \begin_inset Flex URL
11874 \begin_layout Plain Layout
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11882 Both packages are modified versions of the standard
11883 \begin_inset Quotes eld
11887 \begin_inset Quotes erd
11890 package, and they are almost (but not exactly) identical.
11891 Most of their features are supported by LyX.
11892 I have used LyX successfully to write articles submitted to both journals
11893 without any problem.
11896 \begin_layout Subsection
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11904 File\SpecialChar \menuseparator
11923 This will give an (almost) empty document that includes the most common
11924 fields found in a manuscript.
11925 Simply overwrite the existing text (including the brackets,
11930 You should keep in mind the following remarks.
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935 because such modifications are not allowed by both packages.
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940 Before previewing your paper, be sure that the babel package is not used.
11941 To do this, click on
11943 Tools\SpecialChar \menuseparator
11954 checkbox in the language settings, and click on
11962 , if you wish to make this change permanent).
11965 \begin_layout Enumerate
11967 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11974 style must be used to define keywords.
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named
11979 \begin_inset Quotes eld
11982 Classification Codes
11983 \begin_inset Quotes erd
11986 , which can be used to define classification codes, such as PACS numbers.
11987 Note that this facility is not supported by the ijmpd package.
11990 \begin_layout Enumerate
11991 Several new environments are available:
11992 \begin_inset Quotes eld
11996 \begin_inset Quotes erd
12000 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12008 \begin_inset Quotes eld
12012 \begin_inset Quotes erd
12016 \begin_inset Quotes eld
12020 \begin_inset Quotes erd
12024 \begin_inset Quotes eld
12028 \begin_inset Quotes erd
12032 \begin_inset Quotes eld
12036 \begin_inset Quotes erd
12040 \begin_inset Quotes eld
12044 \begin_inset Quotes erd
12048 \begin_inset Quotes eld
12052 \begin_inset Quotes erd
12056 \begin_inset Quotes eld
12060 \begin_inset Quotes erd
12064 \begin_inset Quotes eld
12068 \begin_inset Quotes erd
12072 \begin_inset Quotes eld
12076 \begin_inset Quotes erd
12080 \begin_inset Quotes eld
12084 \begin_inset Quotes erd
12088 \begin_inset Quotes eld
12092 \begin_inset Quotes erd
12096 \begin_inset Quotes eld
12100 \begin_inset Quotes erd
12104 Their use is more or less obvious.
12105 LyX supports all these environments; it will use the proper label, text
12106 style, and numbering scheme for each of them.
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111 In LyX, citation references are shown as usual; in the output, citations
12112 are shown as superscripts.
12113 If you want to use a citation as normal text, you should use the
12118 \begin_inset space \thinspace{}
12122 \begin_inset space \space{}
12126 \begin_inset Quotes eld
12130 \begin_inset space \space{}
12140 \begin_inset Quotes erd
12146 \begin_layout Enumerate
12148 \begin_inset Quotes eld
12152 \begin_inset Quotes erd
12155 section in both packages.
12156 To put acknowledgments, just use the
12157 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper,
12172 the Acknowledgments and
12177 LyX provides a special environment, called
12178 \begin_inset Quotes eld
12182 \begin_inset Quotes erd
12185 which marks the beginning of the appendices.
12186 This environment should be left blank; it just sends a LaTeX command, but
12187 nothing is really printed.
12189 \begin_inset Quotes eld
12193 \begin_inset Quotes erd
12196 is printed with blue letters, as a signal that all sections after that
12197 point are appendices.
12198 To write an appendix, use the
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12207 LyX will number each appendix with capital letters, as required by both
12210 \begin_inset Quotes eld
12214 \begin_inset Quotes erd
12221 be present before the first appendix; if not, all appendices will be numbered
12222 as normal sections in the output.
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the
12230 command to implement table captions.
12231 As a result, a table created by LyX is printed correctly, but its caption
12233 However, you can use some TeX code to overcome this problem, so that captions
12234 are printed as expected.
12235 To do so, create a float table as usual, remove the caption, and replace
12236 it with the TeX code
12246 (sic); you must also the TeX code
12250 immediately after the tabular material.
12251 Study the example table included in the template files to see how this
12252 trick is implemented.
12253 Alternatively, If you need table captions, you should implement the whole
12258 file, then include this file to the LyX document (
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12263 \begin_inset space ~
12269 Details on how to create a table float can be found in the files
12277 , included in the corresponding packages.
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298 If you intend to use pdflatex to prepare the paper, you should use the
12299 pdflatex option so that included graphics are converted to PDF format,
12300 ready for use by pdflatex.
12305 , then make the following changes to the resulting
12312 \begin_layout Enumerate
12313 Remove the comment lines before the
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the
12335 commands, except for any commands you specifically put into the LaTeX preamble.
12338 \begin_layout Standard
12343 file should be saved and processed through LaTeX as many times as necessary.
12344 You may also want to check the resulting
12351 \begin_layout Subsection
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357 the top of the document.
12358 If you started writing your paper by using the
12366 template, the TeX code needed is already in its place; you usually don't
12368 You may only modify the first TeX code to specify the information printed
12369 to the top of odd and even pages (authors' names and short paper's title,
12371 This TeX code must have the form
12375 markboth{Authors' Names}{Short Paper's Title}
12380 \begin_layout Section
12384 \begin_layout Standard
12390 \begin_layout Subsection
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396 submission to the journals published by the Institute of Physics.
12397 Instructions for the authors how to create a paper using the iopart class
12398 can be downloaded together with the iopart package from the site
12399 \begin_inset Flex URL
12402 \begin_layout Plain Layout
12404 ftp://ftp.iop.org/pub/journals/latex2e
12412 \begin_layout Subsection
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file
12421 that is available in LyX's examples files folder.
12422 Open this file, save it under a new name, and start writing.
12423 The example file explains how to use the special text environments.
12424 Here are the most important advices:
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12431 Use AMS math package
12433 in the document settings under
12440 \begin_layout Itemize
12443 The title environment defines the kind of your paper.
12444 So use one of the following environments for the title:
12448 \begin_layout Itemize
12457 \begin_layout Itemize
12466 \begin_layout Itemize
12472 for a Topical review
12475 \begin_layout Itemize
12484 \begin_layout Itemize
12493 \begin_layout Itemize
12499 for a Paper (same as Title)
12502 \begin_layout Itemize
12508 for a Preliminary communication
12511 \begin_layout Itemize
12517 for a Rapid communication
12520 \begin_layout Itemize
12526 for a Letter to the editor
12530 \begin_layout Itemize
12533 All title environments except of
12537 can have an optional short title.
12540 \begin_layout Itemize
12541 There is a general title environment
12545 which is not directly supported by the LyX.
12546 This can be used as TeX code when your document doesn't fit into one of
12547 the other title types.
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552 look at the IOP author guidelines.
12555 \begin_layout Section
12559 \begin_layout Standard
12562 Panayotis Papasotiriou
12565 \begin_layout Subsection
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571 that facilitates electronic manuscript submission to the journals they
12573 Most known of them (at least in my domain of interest) are
12575 Astrophysics and Space Science
12581 , but there are many others (see a complete list at
12582 \begin_inset Flex URL
12585 \begin_layout Plain Layout
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12593 The Kluwer package may be downloaded from the site
12594 \begin_inset Flex URL
12597 \begin_layout Plain Layout
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12605 A complete user guide is contained in that package (but it can also be
12606 downloaded separately).
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611 However, the TeX code needed is reduced to some
12612 \begin_inset Quotes eld
12616 \begin_inset Quotes erd
12619 commands of the package (see
12620 \begin_inset space ~
12624 \begin_inset CommandInset ref
12626 reference "subsec:kluwer_peculiarities"
12631 I have recently used LyX to write an article submitted to the
12633 Astrophysics and Space Science
12635 without any problem.
12638 \begin_layout Subsection
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12646 File\SpecialChar \menuseparator
12658 This will give an (almost) empty document that includes the most common
12659 fields found in a manuscript and a short description of their use.
12660 As in most templates, simply overwrite the existing text (including the
12665 ) with the correct information.
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12675 \begin_inset Quotes eld
12679 \begin_inset Quotes erd
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687 To do this, click on
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12697 \begin_layout Enumerate
12702 file with a text editor and make the following changes
12706 \begin_layout Enumerate
12707 remove the comment lines before the
12716 \begin_layout Enumerate
12717 remove everything between (and including) the
12729 commands, except for any commands you specifically put into the LaTeX preamble.
12732 \begin_layout Standard
12741 \begin_layout Enumerate
12746 file through LaTeX as many times as necessary (usually up to three).
12749 \begin_layout Enumerate
12755 \begin_inset space \thinspace{}
12759 \begin_inset space \space{}
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12777 of the Kluwer package
12778 \begin_inset CommandInset label
12780 name "subsec:kluwer_peculiarities"
12787 \begin_layout Standard
12788 The Kluwer package has the following
12789 \begin_inset Quotes eld
12793 \begin_inset Quotes erd
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12811 Each article must be included in the environment
12812 \begin_inset Quotes eld
12816 \begin_inset Quotes erd
12820 Unfortunately, this environment cannot be omitted, even if you write just
12822 Therefore, each article starts with the command
12828 and, obviously, ends with the command
12835 Although this can be implemented in LyX, I didn't included it, since it
12836 looks ugly and can confuse the novice user.
12837 Therefore, you need to enter them directly and mark them as LaTeX code
12839 \begin_inset Quotes eld
12843 \begin_inset Quotes erd
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12855 \begin_inset space \space{}
12858 title, subtitle, author, institution, running title, running author, abstract
12859 and keywords) must be included in an environment called
12860 \begin_inset Quotes eld
12864 \begin_inset Quotes erd
12868 This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12872 between two TeX code lines (
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12912 \begin_layout Standard
12917 template takes care of all these
12918 \begin_inset Quotes eld
12922 \begin_inset Quotes erd
12926 If you start a new paper using this template you don't need to do anything
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937 as necessary to enter new bibliography items.
12940 \begin_layout Section
12944 \begin_layout Standard
12950 \begin_layout Subsection
12954 \begin_layout Standard
12955 The LyX document classes
12957 article (koma-script)
12961 report (koma-script)
12979 correspond to the LaTeX document classes
12996 \begin_inset space ~
12999 of the Koma-Script family.
13000 They are replacements for the standard document classes
13016 , resp., and fit better to European typography conventions in a number of
13020 \begin_layout Itemize
13021 Standard character size is 11pt in
13023 article (koma-script)
13027 report (koma-script)
13035 letter (koma-script)
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13044 letter (koma-script)
13046 document class are set in a bold sans serif font.
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052 ec fonts, especially in the appearance of headings.
13053 In comparison, the ec bold sans serif fonts look a bit thin.
13054 Here the LaTeX package
13062 helps to produce the
13063 \begin_inset Quotes eld
13067 \begin_inset Quotes erd
13070 appearance when using the ec fonts.
13075 The numbering of chapter headings is made in the same way as the numbering
13076 of section headings, that is without the extra line
13077 \begin_inset Quotes eld
13080 Chapter\SpecialChar \ldots{}
13082 \begin_inset Quotes erd
13086 In addition, the appearance of the headings can be modified by using a
13087 number of options (in LyX to be entered in the field
13090 \begin_inset space ~
13097 Layout\SpecialChar \menuseparator
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13114 (in LyX to be entered in the extra class options field in the dialog
13116 Document\SpecialChar \menuseparator
13120 They make a clearer modification of page margins possible as do the options
13123 Document\SpecialChar \menuseparator
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132 additional commands.
13133 Those part of it which makes sense in LyX is implemented in corresponding
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139 can be found in the Koma-Script documentation
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13154 \begin_layout Standard
13155 The document classes
13157 article (koma-script)
13161 report (koma-script)
13171 are implemented in the layout files
13184 They contain all the paragraph types of the corresponding standard document
13197 , resp., partly modified, with the exception of the LyX specific
13201 -type, which is replaced by the new
13205 -type having the same functionality.
13210 -Type there is a number of new paragraph types added.
13217 letter (koma-script)
13222 \begin_layout Itemize
13231 : are equivalents to
13239 , resp., additionally inserting an entry in the table of contents.
13248 are not contained in
13250 article (koma-script)
13255 \begin_layout Itemize
13264 : behave exactly as
13272 , resp., additionally clearing running heads.
13277 is not contained in
13279 article (koma-script)
13285 \begin_layout Plain Layout
13298 report (koma-script)
13300 , but since this is identical to
13304 , is has not been implemented in LyX.
13312 \begin_layout Itemize
13317 : generates a heading directly above the following paragraph in the standard
13318 character size without affecting the structure of the document.
13321 \begin_layout Itemize
13330 are special captions which respect the different space settings needed
13331 for captions placed above or below an element (if you follow strict typographic
13332 rules, you might want to place table captions always above the table).
13333 You can also use the class option
13337 , which will switch
13350 You need at least Koma-Script version 2.8q to use this.
13353 \begin_layout Itemize
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13363 \begin_inset space \space{}
13366 at the beginning of a chapter.
13367 If you use the optional argument (
13369 Insert\SpecialChar \menuseparator
13371 \begin_inset space ~
13376 ), you can insert the dictum's author there.
13377 Dictum and author are separated by a line.
13378 You need at least Koma-Script version 2.8q to use this.
13383 is not contained in
13385 article (koma-script)
13390 \begin_layout Standard
13391 The following types, together with the standard types
13403 , form the title area of the document.
13404 They must be entered ahead of the first
13405 \begin_inset Quotes eld
13409 \begin_inset Quotes erd
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the
13428 When such a type is used more than once, the latter usage overwrites the
13429 former one, that means, for every type only the latest usage is valid.
13430 The order of the different types however has, like
13442 , no effect on the appearance of the produced document.
13445 \begin_layout Itemize
13450 : produces a centered paragraph above the ordinary title (
13462 ) for the subject of the document.
13465 \begin_layout Itemize
13470 : produces a centered paragraph below the ordinary title (
13482 ) for the publishers' name.
13485 \begin_layout Itemize
13492 report (koma-script)
13498 produces a centered paragraph on its own page behind the title page, or
13501 article (koma-script)
13503 produces a centered paragraph below the ordinary title (
13519 ) for a dedication.
13522 \begin_layout Itemize
13527 : produces a left aligned paragraph above the ordinary title (
13543 ) for a document`s head.
13546 \begin_layout Itemize
13551 : produces in a double-sided print in
13553 report (koma-script)
13559 a left-aligned paragraph at the top of the title page`s back or has no
13560 effect in a single-sided print or in
13562 article (koma-script)
13567 \begin_layout Itemize
13572 : produces in a double-sided print in
13574 report (koma-script)
13580 a left-aligned paragraph at the bottom of the title page`s back or has
13581 no effect in a single-sided print or in
13583 article (koma-script)
13588 \begin_layout Itemize
13593 : produces a special
13594 \begin_inset Quotes eld
13598 \begin_inset Quotes erd
13601 page ahead of the actual document containing a paragraph without special
13605 \begin_layout Standard
13606 The layout files for the document classes
13608 article (koma-script)
13612 report (koma-script)
13618 do include the file
13623 This is thought of as a place to define your own types.
13628 in your personal layout directory and edit the file!
13631 \begin_layout Subsection
13632 letter (koma-script)
13635 \begin_layout Standard
13639 letter (koma-script)
13641 is implemented in the layout file
13646 It contains all the paragraph types of the corresponding standard document
13651 , partly modified, with the exception of the LyX specific types
13663 type, which is replaced by the new
13668 In addition, it contains, in contrast to the standard document class, the
13686 Furthermore, there are a number of new letter specific types.
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697 of name and address, is quite self-willed.
13699 \begin_inset Quotes eld
13703 \begin_inset Quotes erd
13706 heading is produced by the following LaTeX commands in the preamble:
13709 \begin_layout LyX-Code
13719 \begin_layout LyX-Code
13735 \begin_layout LyX-Code
13745 \begin_layout LyX-Code
13765 A detailed German description of such LaTeX commands can be found in the
13766 Koma-Script documentation
13771 With it, the letter's author can produce his personal letter layout.
13774 \begin_layout Standard
13783 define the beginning of the letter and must be used in every letter.
13784 To emphasize them in the LyX document class, they are marked with the letter
13794 \begin_inset space ~
13797 in the left margin.
13798 It is possible to write any number of letters in one file.
13803 type produces a new letter using the same addressee and a
13807 type produces a new addressee.
13824 are ordinary paragraph types and can also be used several times in one
13825 and the same letter.
13828 \begin_layout Itemize
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13837 \begin_layout Itemize
13842 : produces a paragraph for the form of address and implicitly produces a
13846 \begin_layout Itemize
13851 : produces a paragraph for a close.
13854 \begin_layout Itemize
13859 : produces a paragraph for a postscript.
13862 \begin_layout Itemize
13867 : produces a paragraph for a distribution list.
13870 \begin_layout Itemize
13875 : produces a paragraph for enclosures.
13878 \begin_layout Standard
13919 are input types provided with a label to enter information, which will
13920 be processed by the document class.
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types
13933 described above are not such input types as well.
13934 Because of the special meaning of those types, however, I have implemented
13935 them as ordinary paragraph types with a one letter mark in the left margin.
13936 Moreover, it would affect my feeling of symmetry, if the
13944 type had such a serious different appearance.
13949 The types must be used ahead of the corresponding
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958 sense, because the real appearance of the produced letter does not only
13959 depend on the usage of the particular type, but also on other factors.
13960 For example, a signature entered in the
13964 type will in the standard behavior appear in the produced letter only,
13965 when in the same letter also a
13970 The entered value of the
13974 type will in the standard behavior not appear in the produced letter at
13976 The possibility to design the letter`s heading freely is already indicated
13977 in a footnote above.
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982 This makes sense e.
13983 \begin_inset space \thinspace{}
13987 \begin_inset space \space{}
13999 type is not used at all, in the standard behavior the value of the
14003 type is used as signature, whereas if an empty
14007 type is used, no signature value is defined.
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012 filled input types with your personal dates (name, address, etc.) and empty
14013 input types for other dates you want to enter.
14016 \begin_layout Itemize
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022 in small caps in the letter`s heading.
14025 \begin_layout Itemize
14030 : sender's signature, in the standard behavior appears below the
14039 type is used, the value of the
14043 type appears instead.
14046 \begin_layout Itemize
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052 in the letter`s heading below the sender's name.
14055 \begin_layout Itemize
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14070 \begin_layout Itemize
14075 : place of the letter`s making.
14078 \begin_layout Itemize
14083 : date of the letter`s making.
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093 line below the addressee's field.
14098 type is used, neither place nor date appear, independent of the value of
14108 type is used, the date of the letter `s production is used.
14111 \begin_layout Itemize
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117 field in a small sans serif font.
14120 \begin_layout Itemize
14125 : special mail information, in the standard behavior appears underlined
14126 above the addressee's field below the back address.
14129 \begin_layout Itemize
14134 : additional information, in the standard behavior appears on right side
14135 below the addressee`s field.
14138 \begin_layout Itemize
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144 serif font above the subject.
14147 \begin_layout Itemize
14152 : the letter's subject, in the standard behavior appears in a bold font
14160 \begin_layout Standard
14181 produce a business letter like line above the
14185 line containing the fields
14186 \begin_inset Quotes eld
14190 \begin_inset Quotes erd
14194 \begin_inset Quotes eld
14198 \begin_inset Quotes erd
14202 \begin_inset Quotes eld
14206 \begin_inset Quotes erd
14210 \begin_inset Quotes eld
14214 \begin_inset Quotes erd
14218 \begin_inset Quotes eld
14222 \begin_inset Quotes erd
14226 \begin_inset Quotes eld
14230 \begin_inset Quotes erd
14234 For the date field, the value of the
14240 \begin_inset Quotes eld
14243 business letter types
14244 \begin_inset Quotes erd
14247 is used, the value of the
14251 type however does not appear, but only the LaTeX variable
14258 The ordinary output of place and date in a right-aligned line below the
14259 addressee`s field is suppressed.
14260 The types are implemented as input types provided with a label and must
14261 be used ahead of the corresponding
14268 \begin_layout Itemize
14276 \begin_layout Itemize
14284 \begin_layout Itemize
14292 \begin_layout Itemize
14300 \begin_layout Itemize
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14312 \begin_layout Standard
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14325 \begin_layout Standard
14327 Koma-Script version 2.8 has introduced a new letter class
14331 which supersedes the now unsupported
14336 It has — on the LaTeX side — a completely new interface and is not compatible
14337 with the old class.
14338 Therefore, LyX supports both, though it is recommended you use the new
14342 \begin_layout Standard
14343 This class covers the same functionality as
14345 letter (koma-script),
14348 The basic items are
14352 (receiver's address, same as
14356 in the old layout),
14369 will start a new letter (i.
14370 \begin_inset space \thinspace{}
14374 \begin_inset space \space{}
14377 you can write several letters per document).
14378 New elements are sender's
14394 and the possibility to use a
14400 Insert\SpecialChar \menuseparator
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408 to meet almost any needs.
14409 This can be done via the preamble or with a special style file (Letter
14410 Class Option, extension
14414 ), that will be read in as a class option.
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default
14424 There is, for instance, a
14428 file that follows german typesetting rules, or a
14432 that provides the default layout of the old
14437 The latter can be loaded with the class option
14446 ayout\SpecialChar \menuseparator
14451 ocument\SpecialChar \menuseparator
14463 template that is included in LyX for examples.
14464 A detailed description is to be found in the Koma-Script documentation
14472 \begin_layout Subsection
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14481 \begin_layout Itemize
14482 The chapter number of a
14486 type appears on a line of its own above the chapter heading instead of
14487 appearing in the same line ahead of it.
14488 The cause for that is the LyX internal behavior for the labeltype
14492 in the layout file.
14495 \begin_layout Itemize
14496 The headings of the types
14504 are only put in the
14505 \begin_inset Quotes eld
14509 \begin_inset Quotes erd
14512 LaTeX table of contents, but not in the LyX table of contents (
14514 Document\SpecialChar \menuseparator
14516 \begin_inset space ~
14520 \begin_inset space ~
14528 \begin_layout Itemize
14529 The paragraphs in a
14533 document class appear in a skip separation mode, not indented.
14534 This is the standard behavior, no special LaTeX commands are needed for
14538 Document\SpecialChar \menuseparator
14541 dialog the corresponding radio button indicates
14550 value always has the effect that extra LaTeX commands are inserted in the
14551 document to produce the gap, which is not what is wanted in this case.
14554 \begin_layout Section
14558 \begin_layout Standard
14564 \begin_layout Subsection
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570 It has been designed with regard to fictional and non-fictional literature.
14571 Its aim is to let the user have maximum control over the typesetting of
14573 Memoir is based on the standard book class, but it can also emulate the
14574 article class (see below).
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579 useful packages in the LaTeX world.
14580 Most of them have been merged with Memoir.
14581 Therefore, it is much easier to layout the table of contents, appendices,
14582 chapter designs and such.
14583 LyX, though, does not support all of these goodies natively.
14584 Some of them might be added to forthcoming releases
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to
14590 \begin_inset Flex URL
14593 \begin_layout Plain Layout
14595 lyx-devel@lists.lyx.org
14605 , lots will probably never be supported, due to the limitations of LyX's
14607 Of course you can still use all features with the help of some native LaTeX
14612 \begin_layout Plain Layout
14617 \begin_layout Plain Layout
14627 \begin_inset space ~
14631 \begin_inset CommandInset ref
14633 reference "sec:Inserting-TeX-Code"
14643 In this section, we can only list those features that are natively supported
14645 For detailed descriptions (and for the rest of features) we recommend you
14646 have a look at the detailed manual of the Memoir class
14650 \begin_layout Plain Layout
14655 \begin_layout Plain Layout
14665 \begin_inset Flex URL
14668 \begin_layout Plain Layout
14670 CTAN:/macros/latex/memoir/memman.pdf
14680 , which is not only a user guide for the class, but also both a comprehensive
14681 description on good typesetting and a superb example for good typesetting
14685 \begin_layout Subsection
14686 Basic features and restrictions
14689 \begin_layout Standard
14690 Memoir supports basically all features of the standard book classes.
14691 There are, however, some differences, as follows:
14694 \begin_layout Description
14696 \begin_inset space ~
14699 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14702 \begin_layout Description
14704 \begin_inset space ~
14707 style: The fancy page style is not supported, due to a command clash between
14708 Memoir and the fancyhdr package (they both define a command with the same
14709 name, which confuses LaTeX).
14710 Instead, Memoir comes with a number of its own page styles (see
14712 Layout\SpecialChar \menuseparator
14713 Document\SpecialChar \menuseparator
14715 \begin_inset space ~
14721 If you want to use these for the chapter pages, you have to use the command
14728 in the main text or in preamble (e.
14729 \begin_inset space \thinspace{}
14733 \begin_inset space \space{}
14740 chapterstyle{companion}
14745 \begin_layout Description
14746 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14747 optional argument in the standard classes.
14748 With this, you can specify an alternative version of the title for the
14749 table of contents and the headers (for instance, if the title is too long).
14750 In LyX, you can do this via
14752 Insert\SpecialChar \menuseparator
14754 \begin_inset space ~
14759 at the beginning of a chapter/section.
14760 Memoir features a second optional argument and thus separates the table
14761 of contents from the header.
14762 You can define three variants of a title with this: one for the main text,
14763 one for the table of contents, and one for the headers.
14764 Simply insert two optional arguments if you need this feature, the first
14765 one containing the short title for the Table of Contents, the second one
14766 containing an alternative short title for the headers.
14769 \begin_layout Description
14770 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14771 of contents, the list of figures and the list of table start a new page
14773 Memoir does not follow this route.
14774 You have to insert a page break yourself, if you want to have one.
14777 \begin_layout Description
14778 Titlepage: For some unknown reason, Memoir uses pagination on the title
14779 page (in the standard classes, title pages are
14780 \begin_inset Quotes eld
14784 \begin_inset Quotes erd
14788 If you want an empty title page, type
14792 aliaspagestyle{title}{empty}
14797 \begin_layout Description
14798 Article: With the class option
14804 Layout\SpecialChar \menuseparator
14805 Document\SpecialChar \menuseparator
14807 \begin_inset space ~
14812 ), you can emulate article style.
14813 That is, counters (footnotes, figures, tables etc.) will not be reset on
14814 new chapters, chapters don't start a new page (but are—in contrary to
14815 \begin_inset Quotes eld
14819 \begin_inset Quotes erd
14822 article classes—still allowed), parts, though, use their own page, as in
14826 \begin_layout Description
14827 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14828 font commands, which have been used in the old LaTeX version 2.09 (e.
14829 \begin_inset space \thinspace{}
14833 \begin_inset space \space{}
14849 It produces an error and stops LaTeX whenever such a command appears.
14854 reallows the commands and spits out warnings instead (which does at least
14856 Since a lot of packages and particularly BibTeX style files are still using
14857 those commands, we have decided to use this option by default.
14860 \begin_layout Subsection
14864 \begin_layout Standard
14865 We will only describe the features supported by LyX (which is not much currently
14867 Please consult the Memoir manual
14871 \begin_layout Plain Layout
14876 \begin_layout Plain Layout
14886 \begin_inset Flex URL
14889 \begin_layout Plain Layout
14891 CTAN:/macros/latex/memoir/memman.pdf
14904 \begin_layout Description
14905 Abstract: You may wonder why an abstract is an extra feature.
14906 Well, it is in book class.
14907 Usually books don't have abstracts.
14908 Memoir, however, has.
14909 You can use it wherever and how often you like.
14912 \begin_layout Description
14913 Chapterprecis: You may know this older typesetting style: The contents of
14914 a chapter are summarized below the title and also in the table of contents
14916 \begin_inset space \thinspace{}
14920 \begin_inset space \space{}
14925 Our hero arrives in Troia; he loses some friends; he finds others
14928 Chapterprecis does exactly this.
14929 It is therefore only sensible below a chapter.
14932 \begin_layout Description
14933 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14934 The epigraph environment provides an elegant way of typesetting such a
14936 The motto itself (text) and its author (source) are divided by a short
14938 Unfortunately, we have to fool LyX a bit here again, since the environment
14939 needs two arguments (text and source).
14940 In this case, we have to use curly brackets (in TeX mode) between the two
14951 <author of the slogan>.
14954 \begin_layout Description
14955 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14956 complex figurative poems).
14957 LyX can only support a few of them.
14958 One is poemtitle, which is a centered title for poems, which will also
14959 be added to the table of contents (verse is the standard environment for
14961 Memoir has some enhanced versions of verse, but you need to use TeX code,
14962 because they have to be nested inside regular verse environments, which
14963 is not possible with LyX).
14966 \begin_layout Description
14967 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14970 \begin_layout Section
14971 Article (mwart), book (mwbk) and report (mwrep)
14972 \begin_inset Argument status
14975 \begin_layout Plain Layout
14988 \begin_layout Standard
14994 \begin_layout Standard
14995 The LyX document classes
15011 correspond to the LaTeX document classes
15024 They are replacements for the standard document classes
15036 , resp., and fit better to Polish typography conventions in a number of points.
15040 \begin_layout Standard
15044 \begin_layout Itemize
15045 Unnumbered titles (with star, e.
15046 \begin_inset space \thinspace{}
15050 \begin_inset space \space{}
15057 ) are added into table of contents,
15060 \begin_layout Itemize
15061 Additional page styles:
15065 \begin_layout Description
15066 uheadings header with separated lines,
15069 \begin_layout Description
15070 myheadings custom header, contents headers via commands:
15085 \begin_layout Description
15086 myuheadings custom header with separated lines,
15089 \begin_layout Description
15090 outer page number is placed on outer side of page
15094 \begin_layout Itemize
15099 \begin_layout Description
15100 rmheadings serif titles — default,
15103 \begin_layout Description
15104 sfheadings sansserif titles,
15107 \begin_layout Description
15108 authortitle on title page first placed is author next title — default,
15111 \begin_layout Description
15112 titleauthor on title page first placed is title next author,
15115 \begin_layout Description
15116 withmarginpar reserve place on page for margins.
15120 \begin_layout Section
15124 \begin_layout Standard
15129 provides an alternative to the standard
15134 It provides similar functionality, but you might prefer this layout with
15135 sans serif sections, headings, and more.
15138 \begin_layout Section
15142 \begin_layout Standard
15148 \begin_layout Standard
15149 \begin_inset VSpace bigskip
15155 \begin_layout Standard
15160 \begin_inset space ~
15165 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15166 \begin_inset Formula $\beta$
15169 release of May, 1999) class.
15172 \begin_layout Standard
15177 textclass, which works with RevTeX 3.1.
15178 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15179 That means that it doesn't interact very well with LyX, which requires
15180 LaTeX2e, although it has been kludged to work.
15181 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15185 \begin_inset space ~
15190 textclass should also be pretty easy to use.
15193 \begin_layout Standard
15194 These documents are supposed to be used in
15198 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15199 macros, and assume you'll know what to put in the preamble if necessary.
15202 \begin_layout Subsection
15206 \begin_layout Standard
15207 All you need to do is install RevTeX 4, as described in the package's README
15209 The package can be found at The RevTeX 4 Web Site
15210 \begin_inset Flex URL
15213 \begin_layout Plain Layout
15215 http://publish.aps.org/revtex4/
15221 Install it somewhere that LaTeX can see it.
15222 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15224 \begin_inset space \thinspace{}
15228 \begin_inset space \space{}
15231 not the directory where you installed the class file.) Then, if you reconfigure
15232 LyX, it will find the class file and let you use the RevTeX4 textclass.
15235 \begin_layout Standard
15236 Probably the easiest way to get started is either to import a RevTeX 4 document
15244 \begin_inset space ~
15249 template, found in the templates directory.
15252 \begin_layout Subsection
15256 \begin_layout Standard
15257 Optional arguments to
15264 \begin_inset Quotes eld
15268 \begin_inset Quotes erd
15272 \begin_inset Quotes eld
15276 \begin_inset Quotes erd
15286 \begin_inset space ~
15294 \begin_inset space ~
15300 Remember that in RevTeX, at least one optional argument is required!
15303 \begin_layout Standard
15304 Other preamble matter, like
15311 \begin_inset space ~
15317 \begin_inset space ~
15322 dialog, also as usual.
15325 \begin_layout Subsection
15329 \begin_layout Standard
15330 The layouts basically correspond to the commands in RevTeX4.0.
15331 For example, the Email layout corresponds to
15338 Note that (at least as of RevTeX 4.0 Beta), the
15346 layouts are exactly equivalent, so you shouldn't need to use both.
15350 \begin_layout Plain Layout
15351 In case you're curious, both were included so that
15355 would be able to translate both
15375 \begin_layout Subsection
15379 \begin_layout Standard
15380 There are a couple of important unique aspects of RevTeX 4 which might cause
15381 bugs that will be even more confusing in LyX.
15384 \begin_layout Standard
15402 The LyX equivalent is that there is a separate Thanks layout.
15407 write footnotes in the
15411 layout, or weird things may happen.
15412 See the RevTeX 4 documentation for more details.
15415 \begin_layout Standard
15419 \begin_inset space ~
15427 \begin_inset space ~
15436 layouts must be placed
15444 layout and the corresponding
15461 , the LaTeX won't compile.
15464 \begin_layout Subsection
15468 \begin_layout Standard
15469 The main problem with this layout is that you can't use the optional arguments
15470 to layouts like Email and Title.
15471 (The problem is not unique to this layout; you can't use optional arguments
15472 to the Section layouts either.) This means that after you export that file
15473 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15474 need to edit the LaTeX file with a text editor to add the optional arguments
15476 \begin_inset space \thinspace{}
15480 \begin_inset space \space{}
15483 the running title for the page headers.
15484 Lacking these layouts makes the
15490 (and the equivalent
15496 ) useless, so the corresponding layouts don't exist, and will have to be
15501 \begin_layout Plain Layout
15506 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15507 has not been updated yet to take advantage of it.
15515 \begin_layout Section
15516 Springer Journals (
15523 \begin_layout Standard
15529 \begin_layout Subsection
15533 \begin_layout Standard
15534 These are the layout files for some of the journal formats used by Springer
15535 Verlag and listed on
15536 \begin_inset Flex URL
15539 \begin_layout Plain Layout
15541 http://www.springer.de/author/tex/help-journals.html
15546 , where you should also go to fetch the class files (yes, these are LaTeX2e
15548 It is a modular system: the things common to all journals are implemented
15553 , which journal-specific layout files (such as, e.
15554 \begin_inset space \thinspace{}
15558 \begin_inset space \space{}
15565 for Journal of Geodesy) can include.
15568 \begin_layout Standard
15569 This means that implementing support for any other Springer journal on this
15570 list is as simple as writing your own
15578 file following the outline given in
15586 \begin_layout Standard
15587 It is reasonably well tested only for the Journal of Geodesy.
15596 come with the standard LyX distribution.
15597 Install the relevant class file (downloaded from Springer) in a proper
15598 directory, reconfigure LaTeX (in the teTeX case by running
15602 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15603 and it should work.
15606 \begin_layout Subsection
15610 \begin_layout Standard
15611 A large number of theorem-like styles —
15617 \SpecialChar \ldots{}
15623 \begin_layout Standard
15626 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15627 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15630 See the Springer class file documentation for details.
15633 \begin_layout Subsection
15637 \begin_layout Itemize
15649 \begin_layout Itemize
15652 Probability Theory and Related Fields
15658 — Jean-Marc Lasgouttes
15661 \begin_layout Standard
15662 Add your own, it isn't so hard!
15665 \begin_layout Subsection
15669 \begin_layout Standard
15670 These files are partly based on the older
15674 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15675 file from Springer.
15680 layout, are now defunct.
15681 Jean-Marc Lasgouttes helped out big in making me find my way around the
15682 LyX layout file mechanism.
15685 \begin_layout Subsection
15689 \begin_layout Standard
15691 But probably less than in the old hacked-LaTeX
15698 \begin_layout Standard
15700 \begin_inset space \thinspace{}
15703 g.: does not display the number for theorem-like layouts, just #.
15706 \begin_layout Section
15712 \begin_inset CommandInset label
15721 \begin_layout Standard
15729 \begin_layout Subsection
15733 \begin_layout Standard
15734 This section describes how to use LyX to make slides for overhead projectors.
15735 There are two document classes that can do this: the default slides class
15741 This section documents the former.
15744 \begin_layout Standard
15745 I'm going to say this again, nice and clear, so that there's no misunderstanding
15749 \begin_layout Standard
15750 \begin_inset VSpace bigskip
15756 \begin_layout Standard
15760 This section documents the class
15761 \begin_inset Quotes eld
15769 \begin_inset Quotes erd
15777 \begin_layout Standard
15778 \begin_inset VSpace bigskip
15784 \begin_layout Standard
15785 If you're looking for the documentation for
15786 \begin_inset Quotes eld
15794 \begin_inset Quotes erd
15797 , check out section
15798 \begin_inset space ~
15802 \begin_inset CommandInset ref
15804 reference "sec:foiltex"
15814 \begin_inset Quotes eld
15822 \begin_inset Quotes erd
15825 ] is actually somewhat better than the default
15833 \begin_layout Plain Layout
15834 \SpecialChar \ldots{}
15835 or so I've been told repeatedly by its advocates.
15836 Having never used it, I have no idea if this claim is true or not.
15841 which this section documents.
15844 \begin_layout Standard
15845 This class is the LaTeX2e improvement of the old
15850 Every LaTeX2e distribution includes this class [which I'll just refer to
15852 \begin_inset Quotes eld
15860 \begin_inset Quotes erd
15863 from now on], so you're bound to have it.
15864 As I noted earlier, there are other classes, such as
15868 , which also produce slides for overhead projectors and do a better job
15870 However, there are some things which
15874 can do which the others can't, such as generate overlays.
15875 Read on to learn more!
15878 \begin_layout Subsection
15880 \begin_inset CommandInset label
15882 name "sec:slidesetup"
15889 \begin_layout Standard
15890 Obviously, to use this document class, you need to select
15891 \begin_inset Quotes eld
15899 \begin_inset Quotes erd
15902 from the class list in the
15904 Document\SpecialChar \menuseparator
15908 There are some other special things you should know about this class:
15911 \begin_layout Itemize
15912 Don't bother changing the options
15917 They're not supported by the
15924 \begin_layout Itemize
15928 \begin_inset space ~
15933 behaves a bit differently for this class.
15934 The possible choices and what they do are as follows:
15938 \begin_layout Description
15943 The final output contains page numbers in the lower right corner.
15946 \begin_layout Description
15955 , but also prints out any time markers you've put in.
15956 This is the default.
15959 \begin_layout Description
15964 The final output contains no page numbers, time markers, or alignment markers.
15968 \begin_layout Itemize
15973 class has an extra option:
15979 \begin_inset Quotes eld
15987 \begin_inset Quotes erd
15990 in the extra class options.
15994 \begin_layout Standard
15995 Using this options allows you to add time markers to
16001 \begin_inset space ~
16005 \begin_inset CommandInset ref
16007 reference "sec:slideNote"
16015 \begin_layout Standard
16016 You can also use the template file
16017 \begin_inset Quotes eld
16025 \begin_inset Quotes erd
16028 to automatically set up a document to use the
16034 File\SpecialChar \menuseparator
16036 \begin_inset space ~
16040 \begin_inset space ~
16045 to open your new document].
16046 The template file also contains some examples of the special paragraph
16047 environments used by this class.
16048 I'll describe those next.
16051 \begin_layout Subsection
16052 Paragraph Environments
16055 \begin_layout Subsubsection
16056 Supported Environments
16059 \begin_layout Standard
16060 The first thing you'll notice when you start up a new
16064 document is the font size and type: it's the equivalent of the size
16065 \begin_inset Quotes eld
16073 \begin_inset Quotes erd
16079 \begin_inset space ~
16085 This is also what's used in the output.
16087 \begin_inset Quotes eld
16091 \begin_inset Quotes erd
16094 to remind you that this is a slide.
16095 Your final slides will use a larger font; ergo, you'll have less space.
16096 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16099 \begin_layout Standard
16100 The next thing that becomes obvious is the changes to the paragraph environment
16101 pull-down box [at the far-left end of the toolbar].
16102 Most of the paragraph environments you're used to seeing are missing.
16103 There are also five new ones.
16108 class itself only supports certain paragraph environments:
16111 \begin_layout Itemize
16117 \begin_layout Itemize
16123 \begin_layout Itemize
16129 \begin_layout Itemize
16135 \begin_layout Itemize
16141 \begin_layout Itemize
16147 \begin_layout Itemize
16153 \begin_layout Itemize
16159 \begin_layout Itemize
16165 \begin_layout Itemize
16171 \begin_layout Itemize
16177 \begin_layout Standard
16178 All of the other standard environments, including the section-heading environmen
16179 ts, aren't used in the
16186 \begin_layout Standard
16187 On the other hand, you'll notice the following new environments:
16190 \begin_layout Itemize
16196 \begin_layout Itemize
16202 \begin_layout Itemize
16208 \begin_layout Itemize
16214 \begin_layout Itemize
16220 \begin_layout Standard
16221 These five are kind of quirky, due to a
16222 \begin_inset Quotes eld
16226 \begin_inset Quotes erd
16230 You see, LyX doesn't permit you to nest any other paragraph environment
16231 into an empty environment.
16232 Now, that's fine and dandy, but it means that you wouldn't be able to start
16233 a slide with anything except plain text.
16234 To deal with this, I've performed a little
16235 \begin_inset Quotes eld
16239 \begin_inset Quotes erd
16245 \begin_layout Subsubsection
16246 Quirks of the New Environments
16247 \begin_inset CommandInset label
16249 name "sec:slideQuirk"
16256 \begin_layout Standard
16257 All five of the new paragraph environments are somewhat quirky due to inherent
16258 limitiations in the current version of LyX.
16259 As I just mentioned, LyX forbids environments that begin with another environme
16261 To get around this, the
16265 environment isn't a paragraph environment as described in the
16273 \begin_layout Standard
16274 You should consider
16287 \begin_inset Quotes eld
16290 pseudo-environments.
16291 \begin_inset Quotes erd
16294 They look like a section heading or a
16295 \begin_inset Quotes eld
16303 \begin_inset Quotes erd
16306 but really begin a [and, if necessary, end the previous] paragraph environment.
16316 \begin_inset Quotes eld
16320 \begin_inset Quotes erd
16323 These two perform some action.
16326 \begin_layout Standard
16327 A common feature of all five environments,
16347 , is a rather long-ish label.
16348 The text following this label — ordinarily the contents of the paragraph
16349 environment — is utterly irrelevant for
16370 LyX completely ignores it.
16371 In fact, you can leave these five environments completely empty.
16375 \begin_layout Standard
16380 to put any text after the rather long-ish label, you might want to.
16381 This could be a short description of the contents of the
16386 In that case, enter your descriptive comment and hit
16390 as you normally would.
16393 \begin_layout Standard
16394 If, on the other hand, you don't want to enter any descriptive text, you'll
16395 hit another LyX quirk.
16396 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16397 environment until you put something in the old one.
16401 \begin_layout Itemize
16402 Start entering the text that will
16430 \begin_layout Itemize
16431 Now move to the beginning of that paragraph.
16435 \begin_layout Itemize
16444 \begin_layout Itemize
16445 Finally, change this new, empty paragraph to a
16469 \begin_layout Standard
16470 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16474 \begin_layout Subsection
16475 Making a Presentation with
16488 \begin_layout Subsubsection
16496 \begin_layout Standard
16497 If you're expecting this section to teach you how to actually make a presentatio
16498 n, you'll be sorely disappointed.
16499 Naturally, I'll describe all of the ways the
16503 class can assist you in preparing the materials for a presentation.
16504 Filling in the contents, however, is up to you.
16509 the LyX philosophy.]
16512 \begin_layout Standard
16517 environment [in the manner described in section
16518 \begin_inset space ~
16522 \begin_inset CommandInset ref
16524 reference "sec:slideQuirk"
16528 ] tells LyX to begin a new slide [duh].
16529 The label for this environment/
16530 \begin_inset Quotes erd
16534 \begin_inset Quotes erd
16538 \begin_inset Quotes eld
16542 \begin_inset Quotes erd
16545 in cool blue, followed by the label,
16546 \begin_inset Quotes eld
16550 \begin_inset Quotes erd
16554 Any text or paragraph environments that follow this one go on the new slide.
16558 \begin_layout Standard
16559 Slides are probably the only time you'll need to forcibly end pages in LyX
16560 (this can be specified in the
16565 In fact, you'll want to, once you finish entering the contents of one slide.
16566 If you've entered more text than can physically fit on a slide, the extra
16567 overflows onto a new slide.
16568 I don't recommend doing this, however, since the overflow slide won't have
16569 any page number on it.
16570 Furthermore, it may interfere with any
16574 you've made to accompany the oversized
16581 \begin_layout Standard
16590 environments work the same way as the
16595 They both create an
16596 \begin_inset Quotes eld
16600 \begin_inset Quotes erd
16603 followed by a label [
16604 \begin_inset Quotes eld
16608 \begin_inset Quotes erd
16612 \begin_inset Quotes eld
16616 \begin_inset Quotes erd
16620 The color is a stunning magenta instead of blue, and the
16621 \begin_inset Quotes eld
16625 \begin_inset Quotes erd
16628 will look different, in style and in length.
16629 The label fonts of all three also differ from one another.
16632 \begin_layout Standard
16637 , if the contents of a
16645 exceed the physical size of a slide or sheet of paper, the extra will overflow
16647 Again, you should avoid this.
16648 It defeats the whole purpose of
16659 \begin_layout Subsubsection
16669 \begin_layout Standard
16674 is a slide that sits atop another slide.
16675 Perhaps you wish to discuss a figure on the main
16679 before displaying the text associated with it.
16680 One way to accomplish this is tape a flap of dark paper over the part of
16685 you want to display later.
16686 This method fails, however, if you wish to overlap one graph with another,
16688 You would then have to fumble while speaking to align the two separate,
16693 s to align the two graphs.
16698 environment in both cases makes life much easier.
16701 \begin_layout Standard
16706 receives the page number of its
16707 \begin_inset Quotes eld
16711 \begin_inset Quotes erd
16719 \begin_inset Quotes eld
16727 \begin_inset Quotes erd
16734 \begin_layout Plain Layout
16735 Presumably, mutliple
16740 \begin_inset Quotes eld
16748 \begin_inset Quotes erd
16752 \begin_inset Quotes eld
16760 \begin_inset Quotes erd
16764 \begin_inset Quotes eld
16772 \begin_inset Quotes erd
16776 \begin_inset space ~
16779 appended to the page number of the parent
16789 Clearly, you want the contents of both the
16797 to each fit on a single physical slide! You should probably consider an
16803 \begin_inset Quotes eld
16807 \begin_inset Quotes erd
16819 class provides a visual cue for this: the label at the start of an
16823 is shorter than that at the start of a
16828 Lastly, when you generate printable output, you'll find alignment markers
16829 in all four corners of both the
16833 page and its parent
16838 These will assist you in lining up the two physical slides.
16841 \begin_layout Standard
16842 The major problem in overlaying two slides is aligning the contents of the
16843 two transparencies.
16844 How much space should you leave for that graph on the second slide? Worse
16845 still, what if you want a graph and a sentence on second slide, but there
16846 is text on the main transparency that goes in between them? You could try
16847 and insert vertical space of the right size.
16848 The better way is to use
16859 \begin_layout Standard
16860 As their names imply,
16868 are two command-like paragraph environments that make all subsequent text
16869 invisible and visible, respectively.
16871 \begin_inset space ~
16875 \begin_inset CommandInset ref
16877 reference "sec:slideQuirk"
16881 that you don't place anything
16885 these two environments, however.
16890 , it inserts a centered, sky-blue label into the page reading
16891 \begin_inset Quotes eld
16894 <Invisible Text Follows>
16895 \begin_inset Quotes erd
16899 For paragraphs following this label, the parts of the
16907 ; it doesn't matter which] where they would be contain instead blank space.
16911 \begin_layout Standard
16916 , the corresponding centered label is
16917 \begin_inset Quotes eld
16920 <Visible Text Follows>
16921 \begin_inset Quotes erd
16925 Paragraphs following this label behave normally.
16926 Note that the beginning of a new
16938 automatically shuts off an
16943 It's therefore not necessary to use
16954 \begin_layout Standard
16955 By now, it should be obvious how to create overlay transparencies using
16956 the proper combination of
16975 \begin_layout Enumerate
16980 , including everything that will appear on it, whether on the main slide
16988 \begin_layout Enumerate
16989 Before each figure or paragraph that will appear only on the
16998 If necessary, insert a
17002 environment after the
17009 \begin_layout Enumerate
17014 immediately following the
17021 \begin_layout Enumerate
17022 Copy the contents of this
17033 \begin_layout Enumerate
17038 , change all of the
17049 \begin_layout Standard
17051 You've just made an
17058 \begin_layout Standard
17059 There's one problem with the way I've designed the LyX
17063 class: you can't make text in the middle of a paragraph invisible, nor
17064 make text in the middle of an invisible paragraph visible again.
17065 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17069 \begin_layout Plain Layout
17070 The commands of interest are:
17073 \begin_layout Itemize
17078 invisible \SpecialChar \ldots{}
17082 \begin_layout Itemize
17087 visible \SpecialChar \ldots{}
17091 \begin_layout Plain Layout
17092 \SpecialChar \ldots{}
17093 and need to be marked as TeX.
17095 \begin_inset Quotes eld
17099 \begin_inset Quotes erd
17102 you wish to change goes in between the brackets [and after the
17115 If you don't know how to mark text as TeX, see the appropriate section
17128 \begin_layout Subsubsection
17138 \begin_inset CommandInset label
17140 name "sec:slideNote"
17147 \begin_layout Standard
17156 is associated with a
17157 \begin_inset Quotes eld
17161 \begin_inset Quotes erd
17173 class provides visual cues.
17178 is shorter than that of a
17182 [yet longer than that of an
17186 ] and, like the label of an
17190 is shockingly magenta.
17191 Additionally, the printed
17195 has the page number of its
17196 \begin_inset Quotes eld
17200 \begin_inset Quotes erd
17208 \begin_inset Quotes eld
17216 \begin_inset Quotes erd
17220 \begin_inset Quotes eld
17228 \begin_inset Quotes erd
17232 \begin_inset Quotes eld
17240 \begin_inset Quotes erd
17244 You can have multiple
17248 s associated with a single
17260 , you'll probably want to break up long
17264 s so that they fit on a single sheet of paper.
17267 \begin_layout Standard
17272 is obvious: it contains anything additional you might want to say about
17278 It could also be used as a sheet of reminders for a particular
17283 In the case of the latter, you might want to make use of time markers.
17289 \begin_inset Quotes eld
17293 \begin_inset Quotes erd
17296 support for time markers, a
17301 So, you'll have to resort to using the LaTeX codes.
17304 \begin_layout Standard
17305 To use time markers, you'll need to specify the extra class option
17306 \begin_inset Quotes eld
17314 \begin_inset Quotes erd
17318 \begin_inset space ~
17322 \begin_inset CommandInset ref
17324 reference "sec:slidesetup"
17329 This option turns on timing marks, which will appear in the lower-left-hand
17335 To set what appears in the time marker, you use the LaTeX commands
17336 \begin_inset Quotes eld
17346 \begin_inset Quotes erd
17350 \begin_inset Quotes eld
17360 \begin_inset Quotes erd
17364 The arguments of both commands are time measured in seconds.
17366 \begin_inset Quotes eld
17376 \begin_inset Quotes erd
17379 sets the time marker to a given time.
17381 \begin_inset Quotes eld
17391 \begin_inset Quotes erd
17394 increments the time marker by the specified amount.
17395 Using time markers and
17399 s in this fashion, you can remind yourself how much time to spend on a particula
17407 \begin_layout Standard
17408 There's one last feature to describe.
17409 Clearly, you'd like to print out all of your
17417 s on transparencies while printing all of your
17434 with which it is associated.
17435 What's a person to do?
17438 \begin_layout Standard
17439 Luckily, there are two LaTeX commands that allow you to select what to print
17441 Both must be placed into the preamble of your document.
17443 \begin_inset Quotes eld
17455 \begin_inset Quotes erd
17458 will cause the output to contain only the
17467 Correspondingly, the command
17468 \begin_inset Quotes eld
17480 \begin_inset Quotes erd
17483 prevents the output of anything but
17488 I'd advise placing both commands in the preamble and initially comment
17490 You can then preview your entire presentation as you write.
17491 When you're done writing, you can then uncomment one of the two to select
17492 what you want to print.
17493 I like to uncomment
17494 \begin_inset Quotes eld
17506 \begin_inset Quotes erd
17509 , print to a file with
17510 \begin_inset Quotes eld
17518 \begin_inset Quotes erd
17521 in its name, comment it back out, then uncomment
17522 \begin_inset Quotes eld
17534 \begin_inset Quotes erd
17538 \begin_inset Quotes eld
17546 \begin_inset Quotes erd
17550 I can then send either file to a printer, loading transparencies or plain
17551 paper as appropriate.
17554 \begin_layout Standard
17555 You can also provide other arguments to the
17556 \begin_inset Quotes eld
17566 \begin_inset Quotes erd
17570 \begin_inset Quotes eld
17580 \begin_inset Quotes erd
17584 See a good LaTeX book for details.
17587 \begin_layout Subsection
17592 Class Template File
17595 \begin_layout Standard
17596 I have also provided a template file,
17597 \begin_inset Quotes eld
17605 \begin_inset Quotes erd
17613 To use it, begin your new presentation with
17618 ile\SpecialChar \menuseparator
17620 \begin_inset space ~
17624 \begin_inset space ~
17634 Your new LyX presentation file will contain an example
17655 additionally contain an example of the use of
17664 Lastly, the preamble will contain:
17667 \begin_layout LyX-Code
17668 % Uncomment to print out only slides and overlays
17671 \begin_layout LyX-Code
17675 \begin_layout LyX-Code
17681 \begin_inset Newline newline
17687 \begin_layout LyX-Code
17688 % Uncomment to print out only notes
17691 \begin_layout LyX-Code
17695 \begin_layout LyX-Code
17703 \begin_layout Standard
17704 One final thing: I created this class to support the LaTeX2e
17705 \begin_inset Quotes eld
17713 \begin_inset Quotes erd
17716 class, one of the built-in LaTeX2e classes.
17717 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17718 built-in slide class.
17719 It's here if you want it or need it.
17720 There exist other LaTeX2e classes for creating presentations, such as the
17726 \begin_inset space ~
17730 \begin_inset CommandInset ref
17732 reference "sec:foiltex"
17737 \begin_inset Quotes eld
17745 \begin_inset Quotes erd
17748 package [present on some TeX distributions].
17749 The latter is not yet supported under LyX.
17753 \begin_layout Plain Layout
17754 Perhaps you can take on the task\SpecialChar \ldots{}
17760 I know nothing about these other classes.
17761 Try them out to see what sort of alternative they provide.
17764 \begin_layout Chapter
17765 LyX Features needing Extra Software
17768 \begin_layout Section
17772 \begin_layout Standard
17778 \begin_layout Subsection
17782 \begin_layout Standard
17791 \begin_layout Plain Layout
17796 is not yet available when you are using the LaTeX distribution MiKTeX.
17801 , you'll find in the
17808 \begin_inset space ~
17819 \begin_inset Newline newline
17823 \begin_inset CommandInset href
17825 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17832 \begin_layout Standard
17837 package is a program that was written by
17838 \begin_inset Flex Noun
17841 \begin_layout Plain Layout
17843 \begin_inset space ~
17851 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17852 and easy to forget.
17853 The program runs over your LaTeX file, checks the integrity of the file,
17854 and flags some common errors.
17855 In other technical words, it is
17862 \begin_layout Standard
17863 Well, what is a syntax checker doing in LyX which is supposed to produce
17864 correct LaTeX anyways? The answer is simple: Just as
17868 not only checks the
17872 of C programs, but also does
17876 checks for type-errors,
17880 catches some common
17884 errors, in addition to the syntactical ones.
17889 is capable of detecting several common errors, such as
17892 \begin_layout Itemize
17893 Ellipsis detection:
17894 \begin_inset Newline newline
17897 Use \SpecialChar \ldots{}
17901 \begin_layout Itemize
17902 No space in front of/after parenthesis:
17903 \begin_inset Newline newline
17909 \begin_layout Itemize
17910 Enforcement of normal space after common abbreviations:
17911 \begin_inset Newline newline
17915 \begin_inset space \thinspace{}
17919 \begin_inset space \space{}
17922 is too wide spacing.
17925 \begin_layout Itemize
17926 Enforcement of end-of-sentence space when the last sentence ends with a
17928 \begin_inset Newline newline
17932 And this is wrong spacing.
17935 \begin_layout Itemize
17936 Space in front of labels and similar commands:
17937 \begin_inset Newline newline
17940 The label should stick right up to the text to avoid falling to a wrong
17943 \begin_inset CommandInset label
17953 \begin_layout Plain Layout
17954 This footnote is in danger of falling off to a wrong page
17959 The label is separated too much.
17962 \begin_layout Itemize
17963 Space in front of references, instead of hard spaces:
17964 \begin_inset Newline newline
17967 If you have bad luck, the text will break right between the referenced text
17968 and reference number, and that's a pity.
17970 \begin_inset CommandInset ref
17972 reference "sec:chktex"
17979 \begin_layout Itemize
17981 \begin_inset Quotes eld
17985 \begin_inset Quotes erd
17989 \begin_inset Formula $\times$
17993 \begin_inset Newline newline
17996 2x2 looks cheap compared to
17997 \begin_inset Formula $2\times2$
18003 \begin_layout Standard
18004 and more \SpecialChar \ldots{}
18005 It is an invaluable tool when you are
18006 \begin_inset Quotes eld
18010 \begin_inset Quotes erd
18013 your document before printing, and you should run it right after the obligatory
18014 spelling check, and before you go fine tuning the typesetting.
18017 \begin_layout Subsection
18021 \begin_layout Standard
18022 If you have the program installed, usage is as simple as choosing
18024 Tools\SpecialChar \menuseparator
18026 \begin_inset space ~
18032 This will make LyX generate a LaTeX file of your document, start
18036 to check it, and then make LyX insert
18037 \begin_inset Quotes eld
18041 \begin_inset Quotes erd
18044 with the warnings from
18048 , if there were any.
18049 The warnings will be placed close to the point of the mistake, and you
18050 can quickly find them by using the
18052 Navigate\SpecialChar \menuseparator
18055 menu item, or the shortcut key
18064 Open the error boxes by clicking on them with the mouse, or use the shortcut
18073 bindings, or the corresponding
18082 Read the warning and correct the mistake, if it is a mistake.
18083 If you have trouble understanding what the warning is about, you can safely
18085 Remember that there is a hidden layer between the document on screen and
18086 the technical details in invoking
18090 , and this gap can make some warnings seem arcane or just plain silly.
18093 \begin_layout Standard
18094 This document is an excellent testing bed for the feature, and it should
18095 provide quite a few warnings for you to fiddle with.
18096 Since computers are only so smart, expect most of the warnings to be false
18100 \begin_layout Subsection
18101 How to fine tune it
18104 \begin_layout Standard
18105 Sometimes, you'll find that
18109 makes more noise than suits your mood.
18110 Then you can choose not to use it, wait until your mood changes, or try
18115 to get better along with you.
18118 \begin_layout Standard
18127 very configurable and extensible, you should not expect to solve all problems
18133 Since LyX has to generate a somewhat special LaTeX file to be able to match
18134 the line numbers from the
18142 \begin_layout Plain Layout
18143 You can inspect the specific output from
18149 Document\SpecialChar \menuseparator
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, 1.6, 1.7 and 1.8
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"
20076 There seems to be currently unresolved permissions problem under SVN 1.8
20077 with reverting changes when file is locked.
20085 \begin_layout Subsubsection
20091 \begin_layout Standard
20092 If your document is not under revision control, this is the only item shown
20094 And if it is under revision control, the
20101 item is not visible.
20104 \begin_layout Standard
20105 This command registers in SVN your document ONLY in case you have already
20106 the documents directory under SVN control (in particular
20111 This means you have to checkout the archive by yourself.
20114 \begin_layout Standard
20115 Then you are asked interactively to supply an initial description of the
20117 Don't forget that registered file is not yet commited.
20120 \begin_layout Standard
20121 SVN command that is run:
20124 \begin_inset Quotes eld
20128 \begin_inset Quotes erd
20134 \begin_layout Standard
20139 to understand the switches.
20142 \begin_layout Subsubsection
20148 \begin_layout Standard
20149 When you are finished editing a file, you commit your changes.
20150 When you do this, you are asked for a description of the changes.
20151 After that changes are commited.
20154 \begin_layout Standard
20159 \begin_layout Plain Layout
20160 In case locking is not enabled.
20162 \begin_inset CommandInset ref
20164 reference "subsec:SVN-File-Locking"
20175 svn commit -q -m"<description>" <file-name>
20178 \begin_layout Subsubsection
20184 \begin_layout Standard
20185 Updates the changes of this file from the repository.
20186 Be sure you understand SVN merging and conflicts resolving before using
20187 this function, because all conflicts has to be resolved manually by you!
20190 \begin_layout Standard
20195 \begin_layout Plain Layout
20203 svn update --non-interactive
20204 \begin_inset Quotes eld
20208 \begin_inset Quotes erd
20214 \begin_layout Subsubsection
20217 Revert To Repository Version
20220 \begin_layout Standard
20221 This will discard all changes made to the document since the last check
20223 You get a warning before changes are discarded.
20226 \begin_layout Standard
20230 \begin_inset Quotes eld
20234 \begin_inset Quotes erd
20240 \begin_layout Subsubsection
20246 \begin_layout Standard
20247 This will create a copy of the current document including the version history.
20248 It requires a clean document without any changes since the last checkin.
20249 You are asked for a file name and a description of the copy operation.
20250 After that the copy is created, both locally and in the repository.
20251 If the parent directories of the copied and original document differ, all
20252 relative paths of included files of the copy are adjusted (like in
20254 File\SpecialChar \menuseparator
20257 \SpecialChar \ldots{}
20259 Finally, the copy is loaded instead of the original document.
20262 \begin_layout Labeling
20263 \labelwidthstring 00.00.0000
20265 \begin_inset space ~
20269 \begin_inset space ~
20273 \begin_inset Newline newline
20277 \begin_inset Flex Code
20280 \begin_layout Plain Layout
20284 \begin_inset Quotes eld
20288 \begin_inset Quotes erd
20292 \begin_inset Quotes eld
20296 \begin_inset Quotes erd
20305 \begin_inset Newline newline
20309 \begin_inset Flex Code
20312 \begin_layout Plain Layout
20321 \begin_layout Subsubsection
20327 \begin_layout Standard
20328 This will rename the current document including the version history.
20329 It requires a clean document without any changes since the last checkin.
20330 You are asked for a file name and a description of the rename operation.
20331 After that the document is renamed, both locally and in the repository.
20332 If the parent directories of the new and old file names differ, all relative
20333 paths of included files are adjusted (like in
20335 File\SpecialChar \menuseparator
20338 \SpecialChar \ldots{}
20340 Finally, the document is reloaded using the new name.
20343 \begin_layout Labeling
20344 \labelwidthstring 00.00.0000
20346 \begin_inset space ~
20350 \begin_inset space ~
20354 \begin_inset Newline newline
20358 \begin_inset Flex Code
20361 \begin_layout Plain Layout
20365 \begin_inset Quotes eld
20369 \begin_inset Quotes erd
20373 \begin_inset Quotes eld
20377 \begin_inset Quotes erd
20386 \begin_inset Newline newline
20390 \begin_inset Flex Code
20393 \begin_layout Plain Layout
20402 \begin_layout Subsubsection
20403 \begin_inset CommandInset label
20405 name "sub:SVN-Repo-Update"
20409 Update of the local directory checkout from repository
20413 \begin_layout Plain Layout
20414 Note that this command will work only with subversion
20415 \begin_inset Formula $\geqq1.5$
20426 \begin_layout Standard
20427 All the commands above have one shortcomming - they deal with the current
20429 Once your document contains pictures, includes external
20430 \begin_inset Flex Code
20433 \begin_layout Plain Layout
20439 files and so on administration becomes more complicated.
20440 LyX now supports updating the whole tree in which resides the document
20444 \begin_layout Plain Layout
20445 One need to organize the files structure so that all external files are
20446 in the same directory or subdirectories of the document.
20453 This become especially useful once you cooperate with people which neither
20454 know about subversion management nor they have ambition to commit additional
20455 material to the repository.
20459 \begin_layout Standard
20460 \begin_inset Flex Code
20463 \begin_layout Plain Layout
20464 Update local directory from repository
20469 command updates the whole directory and in case of merge conflicts local
20470 version of the files are left, so no unintended data loss occurs.
20471 If local changes are detected user is warned before update starts.
20474 \begin_layout Labeling
20475 \labelwidthstring 00.00.0000
20477 \begin_inset space ~
20481 \begin_inset space ~
20485 \begin_inset Newline newline
20489 \begin_inset Flex Code
20492 \begin_layout Plain Layout
20498 (Ask if changes are detected.)
20499 \begin_inset Newline newline
20503 \begin_inset Flex Code
20506 \begin_layout Plain Layout
20507 svn update --accept mine-full $path
20515 \begin_layout Standard
20517 \begin_inset Flex Code
20520 \begin_layout Plain Layout
20526 stands for the path to the document.
20529 \begin_layout Subsubsection
20535 \begin_layout Standard
20536 This shows the complete history of the SVN document.
20540 \begin_inset Quotes eld
20544 \begin_inset Quotes erd
20549 is shown in a browser.
20552 \begin_layout Subsubsection
20554 \begin_inset CommandInset label
20556 name "subsec:SVN-File-Locking"
20563 \begin_layout Standard
20564 The file exchange through various revision control systems brings the problem
20565 of merge conflicts in case two different users try to edit the same (parts
20567 When such a conflict happens it needs manual resolving and one reasonable
20568 alternative is to provide some kind of locking mechanism, which guarantees
20569 that only one user is allowed to edit file at the given time.
20572 \begin_layout Standard
20573 SVN has two such mechanisms to provide mutual exclusivity for file access
20574 - locks and automatic setting of write permissions (see sec.
20576 \begin_inset CommandInset ref
20578 reference "subsec:Automatical-Locking-Property"
20583 \begin_inset Flex Code
20586 \begin_layout Plain Layout
20596 \begin_layout Plain Layout
20597 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20603 If this property is detected for a given document LyX starts to use SVN
20604 locks for document editing automatically and the whole check-in/out mechanism
20605 switches to the same regimen as for RCS.
20606 This in particular means there are two different modes of file use in LyX:
20609 \begin_layout Itemize
20611 The loaded file is in the read-only mode.
20612 For editing on needs to check-out.
20617 consists of updating from the repository and gaining write lock.
20618 If the lock is not possible to obtain, we remain in unlocked state.
20621 \begin_layout Itemize
20623 The loaded file is in the 'normal' edit mode.
20624 No other user is allowed to edit the file.
20629 consists of commiting changes and releasing write-lock.
20630 If no changes have been made to the document, no commit will be produced
20634 \begin_layout Plain Layout
20635 Don't be puzzled by the fact that you will be asked for commit message anyway.
20640 and only the write-lock will be released.
20643 \begin_layout Standard
20647 \begin_layout Labeling
20648 \labelwidthstring 00.00.0000
20651 svn commit -q -m"<description>" "<file-name>"
20652 \begin_inset Newline newline
20655 svn unlock "<file-name>"
20658 \begin_layout Labeling
20659 \labelwidthstring 00.00.0000
20662 svn update "<file-name>"
20663 \begin_inset Newline newline
20666 svn lock "<file-name>"
20669 \begin_layout Subsubsection
20672 \begin_inset CommandInset label
20674 name "subsec:Automatical-Locking-Property"
20680 Automatic Locking Property
20683 \begin_layout Standard
20684 The above mentioned automatic setting of write permissions of the .lyx file
20690 ile\SpecialChar \menuseparator
20696 \begin_inset space ~
20699 Control\SpecialChar \menuseparator
20704 oggle locking property
20707 This command is active only when the file is not locked on the svn server
20709 you need to check-out before proceeding).
20712 \begin_layout Labeling
20713 \labelwidthstring 00.00.0000
20715 \begin_inset space ~
20721 \begin_layout Labeling
20722 \labelwidthstring 00.00.0000
20725 svn propset svn:needs-lock ON "<file-name>"
20728 \begin_layout Labeling
20729 \labelwidthstring 00.00.0000
20732 svn propdel svn:needs-lock "<file-name>"
20735 \begin_layout Subsubsection
20736 \begin_inset CommandInset label
20738 name "sub:VCS-Revision-Information"
20742 Revision Information in Documents
20745 \begin_layout Standard
20746 There are more possibilities how to activate revision information in our
20750 \begin_layout Itemize
20751 LyX supports directly:
20755 \begin_layout Itemize
20756 tree revision information (
20757 \begin_inset Flex Code
20760 \begin_layout Plain Layout
20767 The result is the output of the
20768 \begin_inset Flex Code
20771 \begin_layout Plain Layout
20777 command, the following table gives you an idea, how to read the results.
20780 \begin_layout Standard
20782 \begin_inset Tabular
20783 <lyxtabular version="3" rows="6" columns="2">
20784 <features rotate="0" tabularvalignment="middle">
20785 <column alignment="center" valignment="top">
20786 <column alignment="center" valignment="top">
20788 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20791 \begin_layout Plain Layout
20797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20800 \begin_layout Plain Layout
20808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20811 \begin_layout Plain Layout
20817 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20820 \begin_layout Plain Layout
20821 mixed revision working copy
20828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20831 \begin_layout Plain Layout
20837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20840 \begin_layout Plain Layout
20841 modified working copy
20848 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20851 \begin_layout Plain Layout
20857 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20860 \begin_layout Plain Layout
20861 switched working copy
20868 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20871 \begin_layout Plain Layout
20877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20880 \begin_layout Plain Layout
20881 partial working copy, from a sparse checkout
20888 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20891 \begin_layout Plain Layout
20897 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20900 \begin_layout Plain Layout
20901 mixed revision, modified, switched working copy
20914 \begin_layout Itemize
20915 file revision information.
20916 The result comes from parsing the output of
20917 \begin_inset Flex Code
20920 \begin_layout Plain Layout
20922 \begin_inset space ~
20926 \begin_inset space ~
20930 \begin_inset space ~
20939 Supported flags are:
20943 \begin_layout Itemize
20944 version number of the last commit (
20945 \begin_inset Flex Code
20948 \begin_layout Plain Layout
20957 \begin_layout Itemize
20958 author of the last commit (
20959 \begin_inset Flex Code
20962 \begin_layout Plain Layout
20971 \begin_layout Itemize
20972 date of the last commit (
20973 \begin_inset Flex Code
20976 \begin_layout Plain Layout
20985 \begin_layout Itemize
20986 time of the last commit (
20987 \begin_inset Flex Code
20990 \begin_layout Plain Layout
21000 \begin_layout Standard
21001 You can obtain this info via InsetInfo (e.g.
21003 \begin_inset Flex Code
21006 \begin_layout Plain Layout
21007 info-insert buffer vcs-date
21013 The information will be available only when you have the file stored under
21014 svn managment (i.e.
21016 \begin_inset Flex Code
21019 \begin_layout Plain Layout
21025 directory is available with your document).
21029 \begin_layout Itemize
21030 Another---a hacking one---possibility is to use svn keywords
21034 \begin_layout Plain Layout
21035 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21041 In short -- you set file keywords property (e.g.
21044 svn propset svn:keywords 'Rev' file.lyx
21046 ) and then paste keyword TeX code
21050 \begin_layout Plain Layout
21051 This is an easy way how to ensure that LyX won't break the line in the middle
21057 tag in your document (e.g.
21062 \begin_layout Plain Layout
21070 This way svn client will automatically substitute revision number (e.g.
21075 \begin_layout Plain Layout
21082 ) after each update and commit.
21083 There are more problems with this approach.
21084 Firstly, the '$' character is used in TeX world for math equations, so
21085 any occurence of math formula
21086 \begin_inset Formula $Rev$
21090 \begin_inset Formula $Rev:59$
21093 in your LyX document.
21094 Similarly for other keywords like Id, Date, Author, etc.
21095 Secondly svn output is dependent on your locales, so its very easy that
21096 svn would produce some problematic strings once Date is used.
21097 Thirdly you get the whole 'Rev: 59' string in your document instead of
21099 Until subversion implements user's custom keywords it will be hard to use
21100 this approach reliably or let LyX to support it directly.
21103 \begin_layout Subsection
21104 SVN and Windows Environment
21107 \begin_layout Quote
21108 My inclination is to say that if the user cannot figure out the command
21109 line operations on their own fairly quickly, they would be well advised
21110 to use TortoiseSVN.
21116 \begin_layout Subsubsection
21120 \begin_layout Standard
21121 In addition to installing LyX, and having access to a Subversion repository,
21122 the user will need to install the Subversion client program.
21123 A Windows installer for the client program is available from
21124 \begin_inset CommandInset href
21127 target "http://www.collab.net/nonav/downloads/subversion/"
21132 The user may also want to install
21133 \begin_inset CommandInset href
21136 target "http://tortoisesvn.tigris.org/"
21140 , which integrates Subversion operations into the context (rightclick) menu
21141 of Windows Explorer.
21142 Operations done outside LyX will typically be more convenient using the
21143 Explorer context menu.
21144 Note that TortoiseSVN is not a replacement for the client program, which
21145 is what LyX itself will use.
21148 \begin_layout Subsubsection
21149 Bringing a document under Subversion control
21152 \begin_layout Standard
21153 Before a LyX document can be brought under version control in Subversion,
21154 its parent directory needs to be under version control.
21155 If the document is being added to a project already in the repository,
21156 this is accomplished by checking the project out to the directory where
21157 the new document will be placed.
21158 If the project itself is not yet under version control (for instance, if
21159 this document starts a new project), the directory must be imported into
21161 This is done outside LyX.
21162 Both import and checkout are easily accomplished from the Explorer context
21163 menu using TortoiseSVN, or alternatively can be done using the command
21164 line client at a DOS prompt.
21165 The procedure for importing the project using TortoiseSVN is described
21166 below, assuming an existing repository and a new project being started
21174 For information on using the Subversion client program, run
21181 \begin_layout Enumerate
21188 in Windows Explorer, right click it, and select
21190 TortoiseSVN\SpecialChar \menuseparator
21194 If necessary, adjust the URL for the repository, then click OK.
21197 \begin_layout Enumerate
21198 Right click the level of the repository under which you want to place the
21199 new project folder (typically the top level) and click
21203 Supply a name for the project folder and click OK.
21204 Add a message for the log file if desired, then click OK again.
21205 The new project folder should appear in the repository.
21206 Finally, click OK again to exit the repository browser.
21209 \begin_layout Enumerate
21210 Once again right click
21216 , this time selecting SVN Checkout\SpecialChar \ldots{}
21217 Select the URL of the project folder
21218 you just created in the repository, and set the checkout directory to
21226 You will be warned about a non-empty folder; click OK to proceed.
21227 You should now have a
21238 \begin_layout Enumerate
21239 Create or open your document in LyX and click
21241 File\SpecialChar \menuseparator
21243 \begin_inset space ~
21246 Control\SpecialChar \menuseparator
21250 Add a log message and click OK to commit the document to version control.
21253 \begin_layout Standard
21254 From this point onward, you should have full functionality in the
21256 File\SpecialChar \menuseparator
21258 \begin_inset space ~
21264 You also have the option of checking the document in and out, viewing its
21266 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21267 client program from a command prompt.
21270 \begin_layout Subsubsection
21271 SSH tunnel used with SVN under Windows
21274 \begin_layout Standard
21275 Compared with Linux setting up an svn client to communicate over ssh under
21276 Windows is a rather troublesome task.
21277 We will at least offer some hints how to setup the client side but prior
21278 knowledge about ssh and the Windows command line is needed, also be prepared
21279 for a great deal of frustration\SpecialChar \ldots{}
21283 \begin_layout Enumerate
21284 Get an svn client for windows, as described in the previous sections.
21285 When it is a fresh install run some svn command (e.g.
21287 \begin_inset Flex Code
21290 \begin_layout Plain Layout
21296 ) to create config files, which you will need to change later on.
21299 \begin_layout Enumerate
21300 Choose an ssh client for Windows.
21301 There are several possibilities, we will use the one from Putty tools
21305 \begin_layout Plain Layout
21306 \begin_inset Flex URL
21309 \begin_layout Plain Layout
21311 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21322 You will need to set the connection up so that the client doesn't ask for
21323 any password from you.
21324 To keep things easy we will use only keys without any additional password
21329 \begin_layout Enumerate
21331 \begin_inset Flex Code
21334 \begin_layout Plain Layout
21341 Save your private .ppk key file and put the public one on the server side.
21342 If the SVN server runs on Linux, note that the format of the public key
21343 is not compatible with Linux openssh and you will need to direcly copy-paste
21346 Public key for pasting into OpenSSH authorized_keys file
21348 :” edit field into the server's
21349 \begin_inset Flex Code
21352 \begin_layout Plain Layout
21353 ~/.ssh/authorized_keys
21359 \begin_inset Flex Code
21362 \begin_layout Plain Layout
21371 \begin_layout Enumerate
21373 \begin_inset Flex Code
21376 \begin_layout Plain Layout
21383 In the SVN config file
21387 \begin_layout Plain Layout
21388 Exact path depends on Windows version, usually somewhere around
21389 \begin_inset Flex Code
21392 \begin_layout Plain Layout
21395 Documents and Settings
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21427 , section [tunnels], setup ssh command, e.g.
21429 \begin_inset Flex Code
21432 \begin_layout Plain Layout
21433 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21442 \begin_layout Plain Layout
21443 It will usually take a lot of time to get exact command right and it depends
21445 For example do not have some remote server saved as a default session in
21447 If things fail, try to connect via plink without SVN first.
21456 \begin_layout Enumerate
21457 Checkout the SVN archive, e.
21458 \begin_inset space \thinspace{}
21462 \begin_inset Newline newline
21466 \begin_inset Flex Code
21469 \begin_layout Plain Layout
21470 svn co svn+ssh://user@server/repository_path
21478 \begin_layout Subsubsection
21479 End-of-Line Conversions
21482 \begin_layout Standard
21483 When the collaborators are mixing Linux and Windows environments, LyX will
21484 use different line endings inside the .lyx files.
21485 This is not a problem as far as LyX functionality is concerned, but the
21486 commit diffs will be huge and merge-conflicts prone.
21487 Fortunately SVN itself knows
21491 \begin_layout Plain Layout
21492 \begin_inset Flex URL
21495 \begin_layout Plain Layout
21497 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21507 how to deal with CR/LF problems when switching .lyx files to the
21508 \begin_inset Flex Code
21511 \begin_layout Plain Layout
21521 \begin_layout Plain Layout
21523 \begin_inset Flex Code
21526 \begin_layout Plain Layout
21527 svn propset svn:eol-style native FILE_NAME
21540 \begin_layout Subsection
21541 GIT commands in LyX
21544 \begin_layout Standard
21545 A minimal subset of GIT commands is now supported by LyX.
21546 You can find the commands in the
21548 File\SpecialChar \menuseparator
21550 \begin_inset space ~
21556 Please note that if you use password protected access to repository via
21557 ssh, you will be asked in terminal window.
21558 LyX was tested against GIT 1.7.
21561 \begin_layout Standard
21562 One big difference of GIT and the other supported version control systems
21563 is the distributed nature of GIT: With traditional version control systems
21564 there is one central server which hosts the repository.
21565 Users commit their changes to the server, and get updates made by other
21567 With GIT, users commit to a local repository.
21568 The local repository can be synchronized with one or more remote repositories
21570 \begin_inset Flex Code
21573 \begin_layout Plain Layout
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21590 LyX does not interact in any way with remote GIT repositories.
21591 It works exclusively with the local repository in a very similar way as
21592 with a central CVS or SVN repository.
21593 If you use remote GIT repositories you need to do the
21594 \begin_inset Flex Code
21597 \begin_layout Plain Layout
21604 \begin_inset Flex Code
21607 \begin_layout Plain Layout
21613 operations with your favourite GIT client.
21616 \begin_layout Subsubsection
21622 \begin_layout Standard
21623 If your document is not under revision control, this is the only item shown
21625 And if it is under revision control, the
21632 item is not visible.
21635 \begin_layout Standard
21636 This command registers in GIT your document ONLY in case you have already
21637 the documents directory under GIT control (in particular
21642 This means you have to checkout the archive by yourself.
21645 \begin_layout Standard
21646 Then you are asked interactively to supply an initial description of the
21648 Don't forget that registered file is not yet commited.
21651 \begin_layout Standard
21652 GIT command that is run:
21655 \begin_inset Quotes eld
21659 \begin_inset Quotes erd
21665 \begin_layout Standard
21670 to understand the switches.
21673 \begin_layout Subsubsection
21679 \begin_layout Standard
21680 When you are finished editing a file, you commit your changes.
21681 When you do this, you are asked for a description of the changes.
21682 After that changes are commited.
21685 \begin_layout Standard
21688 git commit -q -m"<description>" <file-name>
21691 \begin_layout Subsubsection
21694 Revert To Repository Version
21697 \begin_layout Standard
21698 This will discard all changes made to the document since the last check
21700 You get a warning before changes are discarded.
21703 \begin_layout Standard
21707 \begin_inset Quotes eld
21711 \begin_inset Quotes erd
21717 \begin_layout Subsubsection
21723 \begin_layout Standard
21724 This will rename the current document including the version history.
21725 It requires a clean document without any changes since the last checkin.
21726 You are asked for a file name and a description of the rename operation.
21727 After that the document is renamed, both locally and in the repository.
21728 If the parent directories of the new and old file names differ, all relative
21729 paths of included files are adjusted (like in
21731 File\SpecialChar \menuseparator
21734 \SpecialChar \ldots{}
21736 Finally, the document is reloaded using the new name.
21739 \begin_layout Labeling
21740 \labelwidthstring 00.00.0000
21742 \begin_inset space ~
21746 \begin_inset space ~
21750 \begin_inset Newline newline
21754 \begin_inset Flex Code
21757 \begin_layout Plain Layout
21761 \begin_inset Quotes eld
21765 \begin_inset Quotes erd
21769 \begin_inset Quotes eld
21773 \begin_inset Quotes erd
21782 \begin_inset Newline newline
21786 \begin_inset Flex Code
21789 \begin_layout Plain Layout
21798 \begin_layout Subsubsection
21804 \begin_layout Standard
21805 This shows the complete history of the GIT document.
21809 \begin_inset Quotes eld
21813 \begin_inset Quotes erd
21818 is shown in a browser.
21821 \begin_layout Subsubsection
21825 \begin_layout Standard
21826 LyX supports GIT hash number of the last commit to the file, author name,
21827 date and time of last commit.
21828 All those are extracted from
21830 git log -n 1 --pretty=format:%H%n%an%n%ai
21833 Tree version information is obtained via
21835 git describe --abbrev --dirty --long
21839 \begin_inset CommandInset ref
21841 reference "sub:VCS-Revision-Information"
21848 \begin_layout Subsection
21852 \begin_layout Standard
21853 With the recent addition of the vc-command function LyX power users are
21854 allowed to create their own commands for revision control.
21857 \begin_layout Standard
21858 As an example you can see how two TortoiseSVN commands could be integrated
21862 \begin_layout Description
21864 \begin_inset Flex Code
21867 \begin_layout Plain Layout
21868 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21876 \begin_layout Description
21878 \begin_inset Flex Code
21881 \begin_layout Plain Layout
21882 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21890 \begin_layout Subsection
21891 Version control and Document comparison
21894 \begin_layout Standard
21895 One of the typical uses of version control is to inspect the changes between
21896 revisions, usually by creating
21897 \begin_inset Flex Code
21900 \begin_layout Plain Layout
21907 While this is useful for plain text files, it is much less useful in the
21908 case of LyX files, which have more a complicated structure.
21909 Hence we provide binding to the Document comparison feature.
21910 There are two ways of calling this feature - either by direct call of
21911 \begin_inset Flex Code
21914 \begin_layout Plain Layout
21920 LyX function (for details see LyX functions manual) or by icon/menu item
21922 \begin_inset Flex MenuItem
21925 \begin_layout Plain Layout
21926 Compare with older revision...
21932 One can either compare two chosen revisions of the document or he can simply
21933 compare the current version of edited text with older revisions (where
21935 \begin_inset Flex MenuItem
21938 \begin_layout Plain Layout
21944 ' revisions back means comparison of the edited file with last commited
21949 \begin_layout Standard
21950 This feature is supported for SVN and RCS though due to the more complicated
21951 versioning scheme of RCS there is a constraint -- when addressing the revisions
21952 in dialog, numbers always point to the last number in RCS revision number,
21955 We don't currently support GIT addressing of revisions, one can just compare
21956 edited document with its revision X steps backs, where X is addressed as
21960 \begin_layout Section
21961 Literate Programming
21964 \begin_layout Standard
21969 (kayvan@sylvan.com)
21973 original documentation written by
21975 Edmar Wienskoski Jr.
21978 (edmar-w-jr@technologist.com)
21981 \begin_layout Subsection
21985 \begin_layout Standard
21986 The main purpose of this documentation is to show you how to use LyX for
21987 literate programming, where it is assumed that you are familiar with this
21988 programming technique, and know what
21989 \begin_inset Quotes eld
21993 \begin_inset Quotes erd
21997 \begin_inset Quotes eld
22001 \begin_inset Quotes erd
22005 If that is not the case, please follow the web links provided in the following
22007 There is a lot of good documentation out there covering old development
22008 history to the latest tools tips.
22011 \begin_layout Standard
22012 It is also assumed that you are familiar with LyX itself to a point that
22013 you are comfortable changing your LyX preferences, and X resources file.
22014 If that is not the case please refer to other LyX documentation to cover
22015 your specific needs.
22018 \begin_layout Subsection
22019 Literate Programming
22022 \begin_layout Standard
22023 From the Literate Programming FAQ:
22026 \begin_layout Quotation
22027 Literate programming is the combination of documentation and source together
22028 in a fashion suited for reading by human beings.
22029 In fact, literate programs should be enjoyable reading, even inviting!
22030 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22031 and documentation in a single file.
22032 Literate programming tools then parse the file to produce either readable
22033 documentation or compilable source.
22034 The WEB style of literate programming was created by D.
22035 \begin_inset space \thinspace{}
22039 Knuth during the development of his TeX typesetting software.
22043 \begin_layout Standard
22044 Another excerpt says:
22047 \begin_layout Quotation
22050 How is literate programming different from verbose commenting?
22053 \begin_layout Quotation
22054 There are three distinguishing characteristics.
22055 In order of importance, they are:
22059 \begin_layout Itemize
22060 flexible order of elaboration
22063 \begin_layout Itemize
22064 automatic support for browsing
22067 \begin_layout Itemize
22068 typeset documentation, especially diagrams and mathematics
22072 \begin_layout Standard
22073 Now that I sparked your curiosity, take a look in the references.
22076 \begin_layout Subsubsection
22080 \begin_layout Standard
22081 The complete Literate Programming FAQ can be found at:
22084 \begin_layout Quote
22085 Literate Programming FAQ
22086 \begin_inset Flex URL
22089 \begin_layout Plain Layout
22091 http://www.literateprogramming.com/lpfaq.pdf
22099 \begin_layout Standard
22100 The FAQ lists 23 (twenty three!) different literate programming tools.
22101 Where some are specialized or
22102 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22109 for particular programming languages, while other have general scope.
22114 for my own use for several reasons:
22117 \begin_layout Itemize
22118 It can generate the documentation either in LaTeX or HTML.
22121 \begin_layout Itemize
22122 It has a open architecture, i.
22123 \begin_inset space \thinspace{}
22127 \begin_inset space \space{}
22130 it is easy to plug in new filters and to perform special processing that
22135 \begin_layout Itemize
22136 There is a good selection of filters available already (the HTML is one
22140 \begin_layout Itemize
22144 \begin_layout Standard
22145 The Noweb web page can be found at:
22148 \begin_layout Quote
22150 \begin_inset Flex URL
22153 \begin_layout Plain Layout
22155 http://www.cs.virginia.edu/~nr/noweb/
22163 \begin_layout Standard
22164 Starting from there you can reach many other interesting links and even
22165 some literate program examples.
22168 \begin_layout Subsection
22169 LyX and Literate Programming with Noweb
22172 \begin_layout Standard
22173 The LyX support for Literate Programming is provided by using the generic
22174 LyX converters mechanism.
22175 This support is provided in a
22176 \begin_inset Quotes eld
22180 \begin_inset Quotes erd
22184 \begin_inset space \thinspace{}
22188 \begin_inset space \space{}
22191 you will be able to use this new LyX feature with some other literate programmin
22192 g tool of your choice by just changing your LyX preferences.
22195 \begin_layout Subsubsection
22196 Generating documents and code (weaving and tangling)
22199 \begin_layout Paragraph
22200 Using the noweb module
22203 \begin_layout Standard
22204 If you have installed Noweb and LyX successfully, whenever you open a new
22205 document, after you have chosen its document class, use the Document->Settings
22207 \begin_inset Quotes eld
22211 \begin_inset Quotes erd
22215 If Noweb is correctly installed, when you click on the
22216 \begin_inset Quotes eld
22220 \begin_inset Quotes erd
22223 link, you will see the
22224 \begin_inset Quotes eld
22228 \begin_inset Quotes erd
22231 module in the available list and you can add it to your document.
22234 \begin_layout Paragraph
22238 \begin_layout Standard
22239 LyX enables you to write code with a layout named
22240 \begin_inset Flex Noun
22243 \begin_layout Plain Layout
22250 Noweb delimits chunks like this:
22253 \begin_layout LyX-Code
22257 \begin_layout LyX-Code
22261 \begin_layout LyX-Code
22265 \begin_layout LyX-Code
22269 \begin_layout LyX-Code
22273 \begin_layout Standard
22274 The problem is that whatever is written in between the << and the
22278 must be taken literally, i.
22279 \begin_inset space \thinspace{}
22283 \begin_inset space \space{}
22286 LyX should be prevented from making any special interpretation of what has
22288 This is also handled by
22289 \begin_inset Flex Noun
22292 \begin_layout Plain Layout
22298 , that works like a normal paragraph but has a free spacing capability.
22301 \begin_layout Standard
22302 As a special note, you can also use the
22303 \begin_inset Quotes eld
22307 \begin_inset Quotes erd
22310 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22314 \begin_layout LyX-Code
22318 \begin_layout LyX-Code
22319 def some_function(args):
22322 \begin_layout LyX-Code
22323 "This is the doc string for this function."
22326 \begin_layout LyX-Code
22327 print "My args: ", args
22330 \begin_layout LyX-Code
22331 @ %def some_function
22334 \begin_layout Standard
22335 For an example of this usage and the resulting cross-reference output, look
22336 at the Literate python program in
22338 LIBDIR/examples/listerrors.lyx
22340 which should make this all clear.
22343 \begin_layout Paragraph
22344 Generating the documentation
22347 \begin_layout Standard
22348 At this point you already have a new document file with a proper document
22349 class, and with some code and text on it.
22350 How do I print it? The answer is simple, you select
22352 View\SpecialChar \menuseparator
22356 Just like you would do for a plain document.
22357 No special procedure is required.
22360 \begin_layout Standard
22361 To help orientate you, I will now explain what happens inside LyX:
22364 \begin_layout Enumerate
22367 Update\SpecialChar \menuseparator
22370 menu option is chosen, a LaTeX file is generated.
22375 \begin_layout Standard
22376 If the document is of any literate class the generated file will be named
22377 with an extension name defined by the
22378 \begin_inset Quotes eld
22382 \begin_inset Quotes erd
22385 format (defined in the Preferences panel), otherwise the file will have
22394 \begin_layout Enumerate
22395 Note that the only difference so far is in the name of the file, no special
22396 processing is required by LyX.
22397 Given that you formatted the code using the
22398 \begin_inset Flex Noun
22401 \begin_layout Plain Layout
22407 layout that, by itself, takes care of the business.
22410 \begin_layout Enumerate
22411 If the document is of any literate class LyX will then use the internal
22412 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22416 \begin_layout Plain Layout
22417 The converters are defined in the
22419 Tools\SpecialChar \menuseparator
22423 \begin_inset Quotes eld
22427 \begin_inset Quotes erd
22439 manual for general information about converters.
22444 to generate the LaTeX file.
22448 \begin_layout Standard
22449 Otherwise it will just skip this step.
22453 \begin_layout Enumerate
22454 Finally, LaTeX is invoked and the regular post processing continues as in
22458 \begin_layout Standard
22459 Independence from a particular
22460 \begin_inset Quotes eld
22464 \begin_inset Quotes erd
22467 is easily achieved by changing the commands that are run by the various
22471 \begin_layout Paragraph
22472 Generating the code
22475 \begin_layout Standard
22476 When the build menu option is chosen or the corresponding button in the
22477 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22478 Next, LyX invokes the
22483 This converter needs to be defined by the user and is not installed by
22484 default, though the Program format is.
22485 This converter (like any other converter) will have two parts:
22488 \begin_layout Enumerate
22489 The converter program itself.
22490 This program performs the conversion from the one format to the other (in
22491 this case, from the Noweb format to the Program pseudo-format).
22494 \begin_layout Enumerate
22495 The error log parser.
22496 This is a program whose sole purpose is to rewrite error messages in a
22497 format that LyX understands.
22498 This makes it possible for LyX to place error boxes in the right places
22499 in the file buffer.
22502 \begin_layout Standard
22503 The first part, the
22504 \begin_inset Quotes eld
22508 \begin_inset Quotes erd
22511 setting, should be set to
22512 \begin_inset Newline newline
22516 \begin_inset Quotes eld
22524 \begin_inset Quotes erd
22528 \begin_inset Newline newline
22531 This basically means that LyX will call
22532 \begin_inset Quotes eld
22536 \begin_inset Quotes erd
22539 (a program or script) with the name of the Noweb file (normally a file
22540 in the LyX temp directory) and the directory path of the original LyX file.
22544 \begin_layout Standard
22545 This is an implementation of
22546 \begin_inset Quotes eld
22550 \begin_inset Quotes erd
22553 that you can place in a directory on your path:
22556 \begin_layout Standard
22557 \begin_inset VSpace defskip
22563 \begin_layout Standard
22564 \begin_inset Newpage pagebreak
22570 \begin_layout Standard
22576 \begin_layout Standard
22582 \begin_layout Standard
22585 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22588 \begin_layout Standard
22589 \begin_inset VSpace defskip
22595 \begin_layout Standard
22596 The next part of the converter setting is the
22597 \begin_inset Quotes eld
22601 \begin_inset Quotes erd
22604 which is to be set to
22605 \begin_inset Newline newline
22609 \begin_inset Quotes eld
22614 parselog=$$s/scripts/listerrors
22617 \begin_inset Quotes erd
22621 \begin_inset Newline newline
22624 This will run any errors that are generated by the
22625 \begin_inset Quotes eld
22629 \begin_inset Quotes erd
22632 process through the
22633 \begin_inset Quotes eld
22637 \begin_inset Quotes erd
22643 \begin_layout Standard
22644 The build will normally take place in LyX's temporary directory, so the
22645 files produced by the conversion will be in that directory.
22646 LyX will copy out what it regards as the `main' file, but the
22650 conversion may produce several files, and so most of these would then be
22651 deleted when LyX was closed.
22652 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22653 the build-script chunk can place the generated files in that location.
22656 \begin_layout Paragraph
22657 Build instructions in the document
22660 \begin_layout Standard
22661 The last piece of the integration between LyX and noweb is the
22662 \begin_inset Quotes eld
22666 \begin_inset Quotes erd
22670 Generally, the instructions for building your program should be embedded
22671 in a chunk of its own.
22673 \begin_inset Quotes eld
22677 \begin_inset Quotes erd
22680 above uses the notangle command to look for this chunk (called
22681 \begin_inset Quotes eld
22685 \begin_inset Quotes erd
22688 ) and runs its contents through
22689 \begin_inset Quotes eld
22693 \begin_inset Quotes erd
22699 \begin_layout Standard
22700 Typically, such a chunk would look something like this:
22703 \begin_layout LyX-Code
22707 \begin_layout LyX-Code
22709 \begin_inset Newline newline
22712 if [ -z "${NOWEB_SOURCE}" ]
22713 \begin_inset Newline newline
22719 \begin_layout LyX-Code
22720 NOWEB_SOURCE=myfile.nw
22721 \begin_inset Newline newline
22725 \begin_inset Newline newline
22729 code to extract files ...
22730 use NOWEB_OUTPUT_DIR here ...]
22731 \begin_inset Newline newline
22735 code to compile files ...]
22736 \begin_inset Newline newline
22742 \begin_layout Standard
22745 LIBDIR/examples/listerrors.lyx
22749 LIBDIR/examples/Literate.lyx
22751 which implement two versions of the
22752 \begin_inset Quotes eld
22756 \begin_inset Quotes erd
22759 program for some illustrations of how all of these pieces go together or
22762 LIBDIR/examples/noweb2lyx.lyx.
22765 Interestingly, these three files show off the language-indepence of the
22766 LyX literate programming support since they are written in Python, C and
22770 \begin_layout Subsubsection
22774 \begin_layout Standard
22775 All the Literate Programming support is configured by the
22777 Tools\SpecialChar \menuseparator
22781 \begin_inset Quotes eld
22785 \begin_inset Quotes erd
22789 The important parts are:
22792 \begin_layout Description
22794 \begin_inset space ~
22798 \begin_inset Quotes eld
22802 \begin_inset Quotes erd
22806 \begin_inset space ~
22809 format Set up via the File Formats tab, this is where the Noweb-specific
22819 , the file extension is set to
22824 This tells LyX to create a file with a
22828 extension in the first step of the conversion process.
22831 \begin_layout Description
22833 \begin_inset space ~
22841 \begin_inset space ~
22844 format This is an empty format whose sole purpose is to be the endpoint
22845 of a conversion (which then allows us to set up a converter for it).
22848 \begin_layout Description
22857 This converter performs the
22858 \begin_inset Quotes eld
22862 \begin_inset Quotes erd
22865 of the literate document.
22866 For Noweb, it is set to
22867 \begin_inset Quotes eld
22872 noweave -delay -index $$i > $$o
22875 \begin_inset Quotes erd
22881 \begin_layout Description
22891 \begin_inset Quotes eld
22895 \begin_inset Quotes erd
22899 As stated above, the Converter is set to
22900 \begin_inset Quotes eld
22908 \begin_inset Quotes erd
22911 , with Flags set to
22912 \begin_inset Newline newline
22916 \begin_inset Quotes eld
22921 parselog=$$s/scripts/listerrors
22924 \begin_inset Quotes erd
22930 \begin_layout Subsubsection
22934 \begin_layout Standard
22935 There is also a new function implemented in the LyX server, the
22936 \begin_inset Quotes eld
22939 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22943 \begin_layout Standard
22944 When debugging code with ddd/gdb, it is possible to invoke a text editor
22945 at the current execution position with a single key stroke.
22946 The default ddd configuration for that is shift-ctrl-V.
22947 It happens that you can define the editor command line invocation in ddd
22950 Edit\SpecialChar \menuseparator
22951 Preferences\SpecialChar \menuseparator
22954 dialog and changing the "Edit Sources" entry.
22957 \begin_layout Standard
22958 I take advantage of the newly created LyX server function and this ddd feature,
22960 \begin_inset Quotes eld
22964 \begin_inset Quotes erd
22970 \begin_layout Standard
22971 \begin_inset VSpace defskip
22977 \begin_layout Standard
22980 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22983 \begin_layout Standard
22984 \begin_inset VSpace defskip
22990 \begin_layout Standard
22991 With this, whenever you are using ddd and find a point in the program that
22992 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22993 ddd will forward this information to LyX through the LyX server and then
22994 the LyX window will show the same file with the cursor at the same position
22995 ddd was pointing to.
22996 No more guessing or long scrolling to locate a point in the program back
23000 \begin_layout Standard
23001 Note however that you must enable the LyX server to get this feature working
23002 (it is disabled by default).
23003 You can enable it in
23015 ) by entering in the
23020 \begin_inset Quotes eld
23025 /home/<your-home-directory>/.lyx/lyxpipe
23028 \begin_inset Quotes erd
23034 \begin_layout Standard
23035 Read the LyX server documentation in the
23037 Customization Manual
23039 for further information.
23042 \begin_layout Subsubsection
23046 \begin_layout Standard
23047 There are six new buttons that can be added to your LyX toolbar.
23048 Five of these buttons are short cuts to layout styles:
23069 The last one is a short cut to the
23070 \begin_inset Quotes eld
23074 \begin_inset Quotes erd
23081 \begin_layout Standard
23082 LyX has a range of buttons that are available for tool bar customization.
23083 In my toolbar I like to combine the six short cuts above with two more:
23088 \SpecialChar \menuseparator
23093 \SpecialChar \menuseparator
23100 Document\SpecialChar \menuseparator
23101 View\SpecialChar \menuseparator
23105 Here is how it looks like:
23108 \begin_layout LyX-Code
23112 \begin_layout LyX-Code
23116 \begin_layout LyX-Code
23117 Icon "layout Standard"
23120 \begin_layout LyX-Code
23121 Icon "layout Section"
23124 \begin_layout LyX-Code
23125 Icon "layout LaTeX"
23128 \begin_layout LyX-Code
23129 Icon "layout LyX-Code"
23132 \begin_layout LyX-Code
23133 Icon "layout Chunk"
23136 \begin_layout LyX-Code
23140 \begin_layout LyX-Code
23144 \begin_layout LyX-Code
23145 Icon "buffer-typeset"
23148 \begin_layout LyX-Code
23149 Icon "build-program"
23152 \begin_layout LyX-Code
23156 \begin_layout LyX-Code
23160 \begin_layout LyX-Code
23164 \begin_layout LyX-Code
23168 \begin_layout LyX-Code
23172 \begin_layout Subsubsection
23173 Colors customization
23176 \begin_layout Standard
23177 There are a number of colors in LyX that can be customized in
23182 One of the things that bothers people is the LaTeX font color.
23183 The default color is red, since the chunks uses LaTeX font, and there is
23184 a lot of chunks in literate documents, you may get tired of seeing everything
23186 You can change it by going to the tabs
23195 \begin_layout Standard
23196 The next thing is the visible presence of the newline character in the screen.
23197 You can choose the color of this particular character and make it blend
23199 I recommend you choosing a color that is close to the background but not
23200 equal, that way you still can see it is there, but it is not bothering
23204 \begin_layout Subsection
23205 LyX and knitr/Sweave
23208 \begin_layout Standard
23217 is documented in the
23221 example file and in the Sweave manual (menu
23223 Help\SpecialChar \menuseparator
23229 \begin_layout Chapter
23233 \begin_layout Standard
23234 You can do everything with LyX that you can do with LaTeX.
23235 However, LyX cannot support every LaTeX feature directly.
23236 But you can always use TeX Code.
23237 This chapter shows you some more special things you might want to use.
23238 For other special things you can do with figures, tables, floats, boxes
23239 and notes, have a look at the
23242 \begin_inset space ~
23250 \begin_layout Section
23251 Multiple Text Columns
23254 \begin_layout Standard
23255 This feature is independent of the option
23257 Two-column document
23259 in the document settings under
23264 If you want to have 2
23265 \begin_inset space ~
23268 columns for the whole document, it is recommended to use the
23270 Two-column document
23273 For all other cases use this feature.
23276 \begin_layout Standard
23277 To use multiple text columns in your document, you have to load the module
23284 Document\SpecialChar \menuseparator
23285 Settings\SpecialChar \menuseparator
23288 ) and must have the LaTeX-package
23295 \begin_layout Standard
23296 Footnotes within multiple columns will be placed at the bottom of the page
23297 and not under each column.
23298 Within the different columns you can use everything, with the limitation
23299 that for floats you need to use the float option
23306 \begin_layout Subsection
23310 \begin_layout Standard
23311 If you want to have 2
23312 \begin_inset space ~
23315 columns in your text, insert a multicolumn inset via the menu
23317 Insert\SpecialChar \menuseparator
23319 \begin_inset space ~
23322 Insets\SpecialChar \menuseparator
23324 \begin_inset space ~
23329 where the columns should start.
23330 Write all text that should be printed in 2
23331 \begin_inset space ~
23334 columns into this inset.
23337 \begin_layout Standard
23338 Here is an example:
23341 \begin_layout Standard
23343 \begin_inset Flex Multiple Columns
23346 \begin_layout Plain Layout
23351 The Adventure of the Empty House
23354 \begin_inset Newline newline
23357 by Sir Arthur Conan Doyle
23360 \begin_layout Plain Layout
23363 It was in the spring of the year 1894 that all London was interested, and
23364 the fashionable world dismayed, by the murder of the Honourable Ronald
23365 Adair under most unusual and inexplicable circumstances.
23366 The public has already learned those particulars of the crime which came
23367 out in the police investigation, but a good deal was suppressed upon that
23368 occasion, since the case for the prosecution was so overwhelmingly strong
23369 that it was not necessary to bring forward all the facts.
23370 Only now, at the end of nearly ten years, am I allowed to supply those
23371 missing links which make up the whole of that remarkable chain.
23372 The crime was of interest in itself, but that interest was as nothing to
23373 me compared to the inconceivable sequel, which afforded me the greatest
23374 shock and surprise of any event in my adventurous life.
23375 Even now, after this long interval, I find myself thrilling as I think
23376 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23377 ty which utterly submerged my mind.
23378 Let me say to that public, which has shown some interest in those glimpses
23379 which I have occasionally given them of the thoughts and actions of a very
23380 remarkable man, that they are not to blame me if I have not shared my knowledge
23381 with them, for I should have considered it my first duty to do so, had
23382 I not been barred by a positive prohibition from his own lips, which was
23383 only withdrawn upon the third of last month.
23391 \begin_layout Standard
23392 To get 3 or more columns, set the cursor into the multicolumn inset and
23395 Insert\SpecialChar \menuseparator
23397 \begin_inset space ~
23401 \begin_inset space ~
23407 The number of the desired columns is written into that inset (for 3
23408 \begin_inset space ~
23412 \begin_inset Quotes eld
23416 \begin_inset Quotes erd
23420 \begin_inset Newline newline
23423 Here is an example with 3
23424 \begin_inset space ~
23430 \begin_layout Standard
23431 \begin_inset Flex Multiple Columns
23434 \begin_layout Plain Layout
23437 \begin_inset Argument 1
23440 \begin_layout Plain Layout
23446 It can be imagined that my close intimacy with Sherlock Holmes had interested
23447 me deeply in crime, and that after his disappearance I never failed to
23448 read with care the various problems which came before the public.
23449 And I even attempted, more than once, for my own private satisfaction,
23450 to employ his methods in their solution, though with indifferent success.
23451 There was none, however, which appealed to me like this tragedy of Ronald
23453 As I read the evidence at the inquest, which led up to a verdict of willful
23454 murder against some person or persons unknown, I realized more clearly
23455 than I had ever done the loss which the community had sustained by the
23456 death of Sherlock Holmes.
23457 There were points about this strange business which would, I was sure,
23458 have specially appealed to him, and the efforts of the police would have
23459 been supplemented, or more probably anticipated, by the trained observation
23460 and the alert mind of the first criminal agent in Europe.
23461 All day, as I drove upon my round, I turned over the case in my mind and
23462 found no explanation which appeared to me to be adequate.
23463 At the risk of telling a twice-told tale, I will recapitulate the facts
23464 as they were known to the public at the conclusion of the inquest.
23472 \begin_layout Standard
23473 You can have up to 10
23474 \begin_inset space ~
23477 columns if you want to, but that might not be very pleasant for the readers
23481 \begin_layout Standard
23482 \begin_inset Newpage newpage
23488 \begin_layout Subsection
23489 Columns inside Columns
23492 \begin_layout Standard
23493 You can also have columns inside columns:
23496 \begin_layout Standard
23497 \begin_inset Flex Multiple Columns
23500 \begin_layout Plain Layout
23503 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23504 at that time governor of one of the Australian colonies.
23505 Adair's mother had returned from Australia to undergo the operation for
23506 cataract, and she, her son Ronald, and her daughter Hilda were living together
23510 \begin_layout Plain Layout
23511 \begin_inset Flex Multiple Columns
23514 \begin_layout Plain Layout
23517 The youth moved in the best society–had, so far as was known, no enemies
23518 and no particular vices.
23519 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23520 had been broken off by mutual consent some months before, and there was
23521 no sign that it had left any very profound feeling behind it.
23522 For the rest {sic} the man's life moved in a narrow and conventional circle,
23523 for his habits were quiet and his nature unemotional.
23524 Yet it was upon this easy-going young aristocrat that death came, in most
23525 strange and unexpected form, between the hours of ten and eleven-twenty
23526 on the night of March 30, 1894.
23534 \begin_layout Plain Layout
23537 Ronald Adair was fond of cards–playing continually, but never for such stakes
23539 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23540 It was shown that, after dinner on the day of his death, he had played
23541 a rubber of whist at the latter club.
23542 He had also played there in the afternoon.
23547 The evidence of those who had played with him– Mr.
23548 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23549 and that there was a fairly equal fall of the cards.
23550 Adair might have lost five pounds, but not more.
23551 His fortune was a considerable one, and such a loss could not in any way
23553 He had played nearly every day at one club or other, but he was a cautious
23554 player, and usually rose a winner.
23555 It came out in evidence that, in partnership with Colonel Moran, he had
23556 actually won as much as four hundred and twenty pounds in a sitting, some
23557 weeks before, from Godfrey Milner and Lord Balmoral.
23558 So much for his recent history as it came out at the inquest.
23566 \begin_layout Subsection
23570 \begin_layout Standard
23571 The examples in this section show some more special features of multiple
23575 \begin_layout Standard
23576 For more features of multiple columns, have a look at the documentation
23577 of the LaTeX-package
23582 \begin_inset CommandInset citation
23591 \begin_layout Subsubsection
23595 \begin_layout Standard
23596 To add a preface text for multiple columns, set the cursor into the multicolumn
23597 inset and use the menu
23599 Insert\SpecialChar \menuseparator
23603 Write your preface text into that inset.
23604 \begin_inset Newline newline
23607 This is an example with some preface text:
23610 \begin_layout Standard
23611 \begin_inset VSpace bigskip
23617 \begin_layout Standard
23618 \begin_inset Flex Multiple Columns
23621 \begin_layout Plain Layout
23622 \begin_inset Argument 2
23625 \begin_layout Plain Layout
23626 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23634 On the evening of the crime, he returned from the club exactly at ten.
23635 His mother and sister were out spending the evening with a relation.
23636 The servant deposed that she heard him enter the front room on the second
23637 floor, generally used as his sitting-room.
23638 She had lit a fire there, and as it smoked she had opened the window.
23639 No sound was heard from the room until eleven-twenty, the hour of the return
23640 of Lady Maynooth and her daughter.
23641 Desiring to say good-night, she attempted to enter her son's room.
23642 The door was locked on the inside, and no answer could be got to their
23643 cries and knocking.
23644 Help was obtained, and the door forced.
23645 The unfortunate young man was found lying near the table.
23646 His head had been horribly mutilated by an expanding revolver bullet, but
23647 no weapon of any sort was to be found in the room.
23655 \begin_layout Standard
23656 You can also use a section heading as the preface if you use a section command
23658 For example the command
23661 \begin_layout Standard
23666 subsection{subsection title}
23669 \begin_layout Standard
23670 creates a subsection.
23671 In this example the preface is a subsubsection:
23674 \begin_layout Standard
23675 \begin_inset Flex Multiple Columns
23678 \begin_layout Plain Layout
23679 \begin_inset Argument 2
23682 \begin_layout Plain Layout
23686 \begin_layout Plain Layout
23695 This is a subsubsection heading as a preface
23699 \begin_layout Plain Layout
23713 A minute examination of the circumstances served only to make the case more
23715 In the first place, no reason could be given why the young man should have
23716 fastened the door upon the inside.
23717 There was the possibility that the murderer had done this, and had afterwards
23718 escaped by the window.
23719 The drop was at least twenty feet, however, and a bed of crocuses in full
23721 Neither the flowers nor the earth showed any sign of having been disturbed,
23722 nor were there any marks upon the narrow strip of grass which separated
23723 the house from the road.
23724 Apparently, therefore, it was the young man himself who had fastened the
23726 But how did he come by his death? No one could have climbed up to the window
23727 without leaving traces.
23728 Suppose a man had fired through the window, he would indeed be a remarkable
23729 shot who could with a revolver inflict so deadly a wound.
23730 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23731 a hundred yards of the house.
23732 No one had heard a shot.
23740 \begin_layout Standard
23741 If there is less vertical space than 6
23742 \begin_inset space ~
23745 text lines is left on the page at the beginning of the multiple columns,
23746 a page break will be inserted before the multiple columns.
23747 Depending on the number of lines of the preface text, you might want to
23749 This is done by setting the cursor into the mulitcolumn inset behind the
23750 preface (if there is any) and using the menu
23752 Insert\SpecialChar \menuseparator
23754 \begin_inset space ~
23758 \begin_inset space ~
23762 \begin_inset space ~
23768 Insert into that inset the amount of space like e.
23769 \begin_inset space \thinspace{}
23773 \begin_inset space \space{}
23777 \begin_inset Quotes eld
23781 \begin_inset Quotes erd
23785 \begin_inset Newline newline
23788 In this example the space is set to 7
23789 \begin_inset space ~
23792 text lines by using
23793 \begin_inset Quotes eld
23799 \begin_inset Quotes erd
23808 needs to be inserted as TeX code):
23811 \begin_layout Standard
23812 \begin_inset Flex Multiple Columns
23815 \begin_layout Plain Layout
23816 \begin_inset Argument 3
23819 \begin_layout Plain Layout
23824 \begin_layout Plain Layout
23840 On the evening of the crime, he returned from the club exactly at ten.
23841 His mother and sister were out spending the evening with a relation.
23842 The servant deposed that she heard him enter the front room on the second
23843 floor, generally used as his sitting-room.
23844 She had lit a fire there, and as it smoked she had opened the window.
23845 No sound was heard from the room until eleven-twenty, the hour of the return
23846 of Lady Maynooth and her daughter.
23847 Desiring to say good-night, she attempted to enter her son's room.
23848 The door was locked on the inside, and no answer could be got to their
23849 cries and knocking.
23850 Help was obtained, and the door forced.
23851 The unfortunate young man was found lying near the table.
23852 His head had been horribly mutilated by an expanding revolver bullet, but
23853 no weapon of any sort was to be found in the room.
23861 \begin_layout Subsubsection
23865 \begin_layout Standard
23866 The amount of space before and after multiple columns can be changed by
23867 changing the length
23874 For example the command
23877 \begin_layout Standard
23887 \begin_layout Standard
23888 in TeX Code changes its value to 3
23889 \begin_inset space \thinspace{}
23893 The change must be made before the multiple columns' start.
23894 The predefined value is 13
23895 \begin_inset space \thinspace{}
23901 \begin_layout Standard
23909 \begin_inset space \thinspace{}
23915 \begin_layout Standard
23919 \begin_layout Plain Layout
23925 multicolsep}{2.5cm}
23933 \begin_layout Standard
23934 \begin_inset Flex Multiple Columns
23937 \begin_layout Plain Layout
23940 All day I turned these facts over in my mind, endeavouring to hit upon some
23941 theory which could reconcile them all, and to find that line of least resistanc
23942 e which my poor friend had declared to be the starting-point of every investigat
23944 I confess that I made little progress.
23945 In the evening I strolled across the Park, and found myself about six o'clock
23946 at the Oxford Street end of Park Lane.
23947 A group of loafers upon the pavements, all staring up at a particular window,
23948 directed me to the house which I had come to see.
23949 A tall, thin man with coloured glasses, whom I strongly suspected of being
23950 a plain-clothes detective, was pointing out some theory of his own, while
23951 the others crowded round to listen to what he said.
23952 I got as near him as I could, but his observations seemed to me to be absurd,
23953 so I withdrew again in some disgust.
23954 As I did so I struck against an elderly, deformed man, who had been behind
23955 me, and I knocked down several books which he was carrying.
23963 \begin_layout Standard
23964 \begin_inset Note Greyedout
23967 \begin_layout Plain Layout
23972 The values you set with
23978 will be used for all following multiple columns until you change them again.
23986 \begin_layout Standard
23990 \begin_layout Plain Layout
24002 \begin_inset Note Note
24005 \begin_layout Plain Layout
24006 go back to the default
24014 \begin_layout Standard
24015 \begin_inset Newpage newpage
24021 \begin_layout Subsubsection
24025 \begin_layout Standard
24026 A column break can be forced by inserting the command
24032 as TeX-Code to that position in the text where the column should be broken.
24033 Note that this leads in most cases to whitespace in the text.
24034 \begin_inset Newline newline
24037 Here is an example:
24040 \begin_layout Standard
24041 \begin_inset Flex Multiple Columns
24044 \begin_layout Plain Layout
24047 \begin_inset Quotes eld
24050 You're surprised to see me, sir,
24051 \begin_inset Quotes erd
24054 said he, in a strange, croaking voice.
24057 \begin_layout Plain Layout
24060 I acknowledged that I was.
24063 \begin_layout Plain Layout
24066 \begin_inset Quotes eld
24069 Well, I've a conscience, sir, and when I chanced to see you go into this
24070 house, as I came hobbling after you, I thought to myself, I'll just step
24071 in and see that kind gentleman, and tell him that if I was a bit gruff
24072 in my manner there was not any harm meant, and that I am much obliged to
24073 him for picking up my books.
24074 \begin_inset Quotes erd
24080 \begin_layout Plain Layout
24083 \begin_inset Quotes eld
24086 You make too much of a trifle,
24087 \begin_inset Quotes erd
24092 \begin_inset Quotes eld
24095 May I ask how you knew who I was?
24096 \begin_inset Quotes erd
24099 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24103 \begin_layout Plain Layout
24115 \begin_layout Plain Layout
24118 \begin_inset Quotes eld
24121 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24122 you'll find my little bookshop at the corner of Church Street, and very
24123 happy to see you, I am sure.
24124 Maybe you collect yourself, sir.
24128 \begin_inset space ~
24141 --a bargain, every one of them.
24142 With five volumes you could just fill that gap on that second shelf.
24143 It looks untidy, does it not, sir?
24144 \begin_inset Quotes erd
24155 \begin_layout Subsubsection
24159 \begin_layout Standard
24160 The width of the columns is automatically calculated, but you can modify
24161 the space between the columns.
24162 This is done by changing the length
24169 Its predefined value is 10
24170 \begin_inset space \thinspace{}
24174 Here is an example where
24181 \begin_inset space \thinspace{}
24187 \begin_layout Standard
24191 \begin_layout Plain Layout
24205 \begin_layout Standard
24206 \begin_inset Flex Multiple Columns
24209 \begin_layout Plain Layout
24212 My observations of No.
24213 \begin_inset space \space{}
24216 427 Park Lane did little to clear up the problem in which I was interested.
24217 The house was separated from the street by a low wall and railing, the
24218 whole not more than five feet high.
24219 It was perfectly easy, therefore, for anyone to get into the garden, but
24220 the window was entirely inaccessible, since there was no water pipe or
24221 anything which could help the most active man to climb it.
24222 More puzzled than ever, I retraced my steps to Kensington.
24223 I had not been in my study five minutes when the maid entered to say that
24224 a person desired to see me.
24225 To my astonishment it was none other than my strange old book collector,
24226 his sharp, wizened face peering out from a frame of white hair, and his
24227 precious volumes, a dozen of them at least, wedged under his right arm.
24235 \begin_layout Standard
24239 \begin_layout Plain Layout
24251 \begin_inset Note Note
24254 \begin_layout Plain Layout
24255 go back to the default
24263 \begin_layout Subsubsection
24267 \begin_layout Standard
24268 Between the columns a rule with a width of the length
24275 If this rule width is set to 0
24276 \begin_inset space \thinspace{}
24279 pt (this is the default), the rule is suppressed.
24280 In the following example the rule is 2
24281 \begin_inset space \thinspace{}
24287 \begin_layout Standard
24291 \begin_layout Plain Layout
24297 columnseprule}{2pt}
24305 \begin_layout Standard
24306 \begin_inset Flex Multiple Columns
24309 \begin_layout Plain Layout
24312 \begin_inset Quotes eld
24315 You're surprised to see me, sir,
24316 \begin_inset Quotes erd
24319 said he, in a strange, croaking voice.
24322 \begin_layout Plain Layout
24325 I acknowledged that I was.
24328 \begin_layout Plain Layout
24331 \begin_inset Quotes eld
24334 Well, I've a conscience, sir, and when I chanced to see you go into this
24335 house, as I came hobbling after you, I thought to myself, I'll just step
24336 in and see that kind gentleman, and tell him that if I was a bit gruff
24337 in my manner there was not any harm meant, and that I am much obliged to
24338 him for picking up my books.
24339 \begin_inset Quotes erd
24345 \begin_layout Plain Layout
24348 \begin_inset Quotes eld
24351 You make too much of a trifle,
24352 \begin_inset Quotes erd
24357 \begin_inset Quotes eld
24360 May I ask how you knew who I was?
24361 \begin_inset Quotes erd
24367 \begin_layout Plain Layout
24370 \begin_inset Quotes eld
24373 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24374 you'll find my little bookshop at the corner of Church Street, and very
24375 happy to see you, I am sure.
24376 Maybe you collect yourself, sir.
24380 \begin_inset space ~
24393 --a bargain, every one of them.
24394 With five volumes you could just fill that gap on that second shelf.
24395 It looks untidy, does it not, sir?
24396 \begin_inset Quotes erd
24407 \begin_layout Standard
24408 \begin_inset VSpace defskip
24414 \begin_layout Standard
24415 The rule can be colored by redefining the command
24422 This is done by inserting the command
24423 \begin_inset Newline newline
24432 columnseprulecolor}{
24437 \begin_inset Newline newline
24440 as TeX-Code before the multicolumn inset.
24445 in this command by a color of your choice.
24446 You can use all pre- and self-defined colors.
24454 \begin_inset space ~
24459 for more information about pre- and self-defined colors.
24460 To go back to the default color insert the command
24461 \begin_inset Newline newline
24470 columnseprulecolor}{
24475 \begin_inset Newline newline
24478 Here is the example with a cyan rule and 1
24479 \begin_inset space \thinspace{}
24482 cm column separation:
24485 \begin_layout Standard
24489 \begin_layout Plain Layout
24498 \begin_layout Plain Layout
24504 columnseprulecolor}{
24514 \begin_layout Standard
24515 \begin_inset Flex Multiple Columns
24518 \begin_layout Plain Layout
24521 \begin_inset Quotes eld
24524 You're surprised to see me, sir,
24525 \begin_inset Quotes erd
24528 said he, in a strange, croaking voice.
24531 \begin_layout Plain Layout
24534 I acknowledged that I was.
24537 \begin_layout Plain Layout
24540 \begin_inset Quotes eld
24543 Well, I've a conscience, sir, and when I chanced to see you go into this
24544 house, as I came hobbling after you, I thought to myself, I'll just step
24545 in and see that kind gentleman, and tell him that if I was a bit gruff
24546 in my manner there was not any harm meant, and that I am much obliged to
24547 him for picking up my books.
24548 \begin_inset Quotes erd
24554 \begin_layout Plain Layout
24557 \begin_inset Quotes eld
24560 You make too much of a trifle,
24561 \begin_inset Quotes erd
24566 \begin_inset Quotes eld
24569 May I ask how you knew who I was?
24570 \begin_inset Quotes erd
24576 \begin_layout Plain Layout
24579 \begin_inset Quotes eld
24582 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24583 you'll find my little bookshop at the corner of Church Street, and very
24584 happy to see you, I am sure.
24585 Maybe you collect yourself, sir.
24589 \begin_inset space ~
24602 --a bargain, every one of them.
24603 With five volumes you could just fill that gap on that second shelf.
24604 It looks untidy, does it not, sir?
24605 \begin_inset Quotes erd
24616 \begin_layout Standard
24620 \begin_layout Plain Layout
24626 columnseprule}{0pt}
24629 \begin_layout Plain Layout
24635 columnseprulecolor}{
24643 \begin_inset Note Note
24646 \begin_layout Plain Layout
24647 go back to the default
24655 \begin_layout Section
24656 Non-standard Paragraph Shapes
24659 \begin_layout Standard
24661 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24662 For special cases like for example posters, invitation cards or poems you
24663 can modify the paragraph shape to one of your choice.
24664 This can be done by using the LaTeX-package
24668 which is loaded by using in the document settings the module
24670 Custom paragraph shapes
24675 \begin_layout Subsection
24679 \begin_layout Standard
24684 provides the following shapes:
24687 \begin_layout Standard
24688 \begin_inset Tabular
24689 <lyxtabular version="3" rows="13" columns="3">
24690 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24691 <column alignment="center" valignment="middle" width="16col%">
24692 <column alignment="center" valignment="middle" width="40col%">
24693 <column alignment="center" valignment="middle" width="35col%">
24694 <row endhead="true">
24695 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24698 \begin_layout Plain Layout
24704 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24707 \begin_layout Plain Layout
24713 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24716 \begin_layout Plain Layout
24724 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24727 \begin_layout Plain Layout
24733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24736 \begin_layout Plain Layout
24737 Circle with circular hole (in the size of a CD/DVD)
24742 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24745 \begin_layout Plain Layout
24746 Cannot be scaled, take care there is not too much text
24753 <cell alignment="center" valignment="top" topline="true" usebox="none">
24756 \begin_layout Plain Layout
24762 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24765 \begin_layout Plain Layout
24771 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24774 \begin_layout Plain Layout
24775 Fragile, calculation might fail
24782 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24785 \begin_layout Plain Layout
24791 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24794 \begin_layout Plain Layout
24795 Rhomboid (symbolizing a
24796 \begin_inset Quotes eld
24800 \begin_inset Quotes erd
24808 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24811 \begin_layout Plain Layout
24819 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24822 \begin_layout Plain Layout
24828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24831 \begin_layout Plain Layout
24837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24840 \begin_layout Plain Layout
24848 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24851 \begin_layout Plain Layout
24857 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24860 \begin_layout Plain Layout
24866 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24869 \begin_layout Plain Layout
24877 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24880 \begin_layout Plain Layout
24886 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24889 \begin_layout Plain Layout
24890 Nut for bolt (hexagon with circular hole)
24895 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24898 \begin_layout Plain Layout
24906 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24927 \begin_layout Plain Layout
24935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24938 \begin_layout Plain Layout
24944 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24947 \begin_layout Plain Layout
24953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24956 \begin_layout Plain Layout
24964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24967 \begin_layout Plain Layout
24973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24976 \begin_layout Plain Layout
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24985 \begin_layout Plain Layout
24993 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24996 \begin_layout Plain Layout
25002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25005 \begin_layout Plain Layout
25006 Normal/reversed rain drop
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25014 \begin_layout Plain Layout
25015 Fragile, calculation might fail
25022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25025 \begin_layout Plain Layout
25031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25034 \begin_layout Plain Layout
25040 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25043 \begin_layout Plain Layout
25051 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25054 \begin_layout Plain Layout
25056 \begin_inset Newline newline
25064 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25067 \begin_layout Plain Layout
25068 Triangles in different orientations
25073 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25076 \begin_layout Plain Layout
25090 \begin_layout Standard
25091 To use a shape for your paragraph, simply select it in LyX's pull-down box
25092 for environments in the toolbar.
25095 \begin_layout Standard
25096 \begin_inset Newpage newpage
25102 \begin_layout Standard
25103 Here is an example paragraph in the shape of a nut:
25106 \begin_layout Standard
25107 \begin_inset VSpace bigskip
25116 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25117 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25119 At vero eos et accusam et justo duo dolores et ea rebum.
25120 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25122 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25123 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25127 \begin_layout Standard
25128 \begin_inset VSpace bigskip
25134 \begin_layout Standard
25135 \begin_inset Note Greyedout
25138 \begin_layout Plain Layout
25143 : shapepar paragraphs cannot run over a page break.
25151 \begin_layout Standard
25152 \begin_inset VSpace bigskip
25158 \begin_layout Standard
25163 takes care that the shape will always be preserved, no matter how much
25164 text is in the paragraph.
25165 Therefore the paragraph size changes with the amount of contained text.
25166 This can lead to paragraph sizes exceeding the page margins.
25167 To demonstrate the size scaling, here is the same example paragraph but
25168 with twice as much text:
25171 \begin_layout Standard
25172 \begin_inset Newpage newpage
25181 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25182 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25184 At vero eos et accusam et justo duo dolores et ea rebum.
25185 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
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 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25191 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25193 At vero eos et accusam et justo duo dolores et ea rebum.
25194 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25196 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25197 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25201 \begin_layout Standard
25202 \begin_inset VSpace bigskip
25208 \begin_layout Standard
25209 An exception is the shape
25214 It cannot be scaled because it must fit the size of a CD/DVD.
25215 Therefore the amount of text that fits into the shape is limited.
25216 \begin_inset Newline newline
25227 shape are fragile, meaning that the calculation of their size can fail,
25228 depending on the amount of text.
25229 You will then get the LaTeX error
25230 \begin_inset Quotes eld
25233 Arithmetic overflow
25234 \begin_inset Quotes erd
25238 In this case one can try to remove or add some text; if nothing works one
25239 has to use another shape.
25242 \begin_layout Standard
25243 \begin_inset VSpace bigskip
25249 \begin_layout Standard
25250 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25251 fails for text in the tips.
25252 Therefore it is often necessary to add hyphenation points
25257 arg "specialchar-insert hyphenation"
25262 ) to the corresponding text parts.
25265 \begin_layout Standard
25266 \begin_inset VSpace bigskip
25272 \begin_layout Standard
25273 Shapepar paragraphs are either always centered or placed on the page so
25274 that their left border touches the left page margin.
25275 You can therefore not use the paragraph dialog to align such paragraphs.
25276 A solution is to put the paragraph into a minipage or parbox and align
25278 The problem is hereby to find the right width for the box.
25279 Because if it is too wide and you center the box, the paragraph is not
25280 centered too because it sticks at the left side of the box.
25281 So you might have to play a bit with the width until it fits.
25282 Here are two heart-shaped paragraphs, the first one is not aligned, the
25283 second one is right-aligned:
25286 \begin_layout Standard
25287 \begin_inset Newpage newpage
25293 \begin_layout Heart
25298 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25299 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25301 At vero eos et accusam et justo duo dolores et ea rebum.
25302 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25306 \begin_layout Standard
25307 \begin_inset VSpace bigskip
25313 \begin_layout Standard
25316 \begin_inset Box Frameless
25326 height_special "totalheight"
25329 \begin_layout Heart
25334 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25335 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25337 At vero eos et accusam et justo duo dolores et ea rebum.
25338 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25347 \begin_layout Subsection
25351 \begin_layout Standard
25352 You can define any shape you want.
25353 Doing this manually is a lot of work because every coordinate must be specified.
25354 But there is a way to let the computer calculate the coordinates:
25357 \begin_layout Enumerate
25358 Install the program
25359 \begin_inset CommandInset href
25362 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25369 \begin_layout Enumerate
25380 \begin_layout Plain Layout
25391 \begin_layout Plain Layout
25398 eX\SpecialChar \menuseparator
25399 Settings\SpecialChar \menuseparator
25402 and select the font size you are using in your document.
25403 For example this document uses the size 12
25404 \begin_inset space \thinspace{}
25410 \begin_layout Enumerate
25414 \begin_layout Enumerate
25421 \begin_layout Plain Layout
25432 \begin_layout Plain Layout
25439 eX\SpecialChar \menuseparator
25442 to export the shape to coordinates.
25443 In the appearing dialog use either the outline of your shape for the coordinate
25444 s or the path itself.
25448 \begin_layout Plain Layout
25449 For more information see
25450 \begin_inset CommandInset href
25452 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25464 \begin_layout Standard
25465 The coordinates are written into a TeX-file.
25466 To use it for your LyX document
25469 \begin_layout Enumerate
25470 Place the cursor before the first character of your paragraph (or into a
25474 \begin_layout Enumerate
25475 Open in LyX the menu
25477 Insert\SpecialChar \menuseparator
25478 File\SpecialChar \menuseparator
25480 \begin_inset space ~
25485 , select the file and use
25494 \begin_layout Standard
25495 \begin_inset VSpace defskip
25501 \begin_layout Standard
25502 \begin_inset Note Greyedout
25505 \begin_layout Plain Layout
25510 : The changed shape only applies to the current paragraph; everything is
25511 reset to normal for the next paragraph.
25512 Therefore the shape definition file must be input into every paragraph
25513 with the desired shape.
25521 \begin_layout Standard
25522 \begin_inset VSpace bigskip
25528 \begin_layout Standard
25529 Here is an example:
25532 \begin_layout Standard
25533 \begin_inset VSpace bigskip
25539 \begin_layout Standard
25540 \begin_inset CommandInset include
25542 filename "SpecialParagraphShape.tex"
25548 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25549 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25551 At vero eos et accusam et justo duo dolores et ea rebum.
25552 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25554 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25555 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25559 \begin_layout Standard
25560 \begin_inset VSpace bigskip
25566 \begin_layout Standard
25571 to draw complexer shapes in
25575 you can draw the shape in a program of your choice and import the resulting
25581 Then you only need to draw a line or spline along the outline of the image.
25584 \begin_layout Standard
25585 \begin_inset VSpace bigskip
25591 \begin_layout Standard
25594 Custom paragraph shapes
25596 also provides the two commands
25604 which can be used to define custom shapes coordinate by coordinate.
25608 \begin_layout Plain Layout
25609 These commands are internally used for all shapes described here.
25614 For information how these styles are used and about further customization
25615 possibilities, have a look at the documentation of the package
25620 \begin_inset CommandInset citation
25629 \begin_layout Bibliography
25630 \begin_inset CommandInset bibitem
25631 LatexCommand bibitem
25636 Documentation of the LaTeX-package
25637 \begin_inset CommandInset href
25640 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25647 \begin_layout Bibliography
25648 \begin_inset CommandInset bibitem
25649 LatexCommand bibitem
25654 Documentation of the LaTeX-package
25655 \begin_inset CommandInset href
25658 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"