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
6084 \begin_layout Plain Layout
6085 For some reason, MikTeX does not understand/obey the command LyX inserts
6086 into the preamble when you check the "Enable Forward/Reverse Search" button
6087 in the toolbar and does not generate the necessary info.
6090 \begin_layout Plain Layout
6091 The generation of the required info can be forced by changing the converter
6092 "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6093 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6094 the -synctex=1 switch).
6100 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6101 already provide SyncTeX support.
6104 \begin_layout Standard
6105 To enable SyncTeX for DVI output, change the
6106 \begin_inset Flex MenuItem
6109 \begin_layout Plain Layout
6114 \begin_layout Plain Layout
6127 \begin_inset Flex MenuItem
6130 \begin_layout Plain Layout
6135 \begin_layout Plain Layout
6142 eX (plain) -> DraftDVI
6148 \begin_inset Flex MenuItem
6151 \begin_layout Plain Layout
6152 Preferences\SpecialChar \menuseparator
6153 File Handling\SpecialChar \menuseparator
6160 \begin_inset Flex Code
6163 \begin_layout Plain Layout
6164 latex -synctex=1 $$i
6169 , and for PDF output, change the
6170 \begin_inset Flex MenuItem
6173 \begin_layout Plain Layout
6178 \begin_layout Plain Layout
6185 eX (pdflatex) -> PDF (pdflatex)
6191 \begin_inset Flex Code
6194 \begin_layout Plain Layout
6195 pdflatex -synctex=1 $$i
6201 Check the documentation of your viewer whether the viewer needs to be configure
6202 d for the use with SyncTeX.
6206 \begin_layout Plain Layout
6207 Note that the option
6208 \begin_inset Flex Code
6211 \begin_layout Plain Layout
6217 option enables gzip compression.
6218 If your viewer does not support it, you should instead use
6219 \begin_inset Flex Code
6222 \begin_layout Plain Layout
6236 \begin_layout Subsection
6237 Configuring and using specific viewers
6238 \begin_inset CommandInset label
6240 name "sub:configuring-viewers"
6247 \begin_layout Subsubsection*
6248 Xdvi (all platforms)
6251 \begin_layout Standard
6253 \begin_inset Flex Code
6256 \begin_layout Plain Layout
6262 , you don't need to do anything else for performing a reverse DVI search,
6263 as LyX already provides the necessary hooks for automatically using the
6265 \begin_inset Flex Code
6268 \begin_layout Plain Layout
6275 Just setup your document as described above (reverse search is triggered
6276 by Ctrl-click or Alt-click on Mac OSX, respectively).
6279 \begin_layout Standard
6280 However, if for whatever reason you want to use the named pipe instead of
6281 the socket for communicating with LyX, simply change the DVI viewer in
6283 \begin_inset Flex MenuItem
6286 \begin_layout Plain Layout
6287 Preferences\SpecialChar \menuseparator
6288 File Handling\SpecialChar \menuseparator
6298 \begin_layout Plain Layout
6299 On Mac OSX you have to use
6300 \begin_inset Flex Code
6303 \begin_layout Plain Layout
6304 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6315 \begin_inset Flex Code
6318 \begin_layout Plain Layout
6319 xdvi -editor "lyxeditor.sh %f %l"
6325 \begin_inset Flex Code
6328 \begin_layout Plain Layout
6334 is a suitable script.
6335 For example, a minimal shell script is the following one:
6338 \begin_layout LyX-Code
6340 \begin_inset Newline newline
6343 LYXPIPE="/path/to/lyxpipe"
6344 \begin_inset Newline newline
6347 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6348 \begin_inset Newline newline
6351 echo "$COMMAND" > "${LYXPIPE}".in || exit
6352 \begin_inset Newline newline
6355 read TMP < "${LYXPIPE}".out || exit
6358 \begin_layout Standard
6360 \begin_inset Flex Code
6363 \begin_layout Plain Layout
6373 \begin_layout Plain Layout
6380 XServer pipe path specified in
6381 \begin_inset Flex MenuItem
6384 \begin_layout Plain Layout
6385 Preferences\SpecialChar \menuseparator
6395 \begin_layout Plain Layout
6397 \begin_inset Flex Code
6400 \begin_layout Plain Layout
6406 folder of a source distribution you can find a
6407 \begin_inset Flex Code
6410 \begin_layout Plain Layout
6416 script which is able to locate the
6420 based on your preferences.
6428 \begin_layout Subsubsection*
6432 \begin_layout Standard
6434 \begin_inset Flex Code
6437 \begin_layout Plain Layout
6438 /Applications/MacDviX_Folder/calleditor.script
6443 , add the following lines:
6446 \begin_layout LyX-Code
6451 \begin_layout Plain Layout
6458 X.app/Contents/MacOS/lyxeditor "$2" $1
6459 \begin_inset Newline newline
6465 \begin_layout Standard
6466 Modify the lines accordingly if you install LyX somewhere else than in the
6467 Applications folder.
6470 \begin_layout Standard
6471 Reverse search is triggered by Alt-click (OPTION-click).
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6480 \begin_inset Flex Code
6483 \begin_layout Plain Layout
6484 open -a Skim.app $$i
6489 to the viewer setting in
6490 \begin_inset Flex MenuItem
6493 \begin_layout Plain Layout
6494 Preferences\SpecialChar \menuseparator
6495 File Handling\SpecialChar \menuseparator
6496 File formats\SpecialChar \menuseparator
6503 \begin_inset Flex MenuItem
6506 \begin_layout Plain Layout
6507 Skim\SpecialChar \menuseparator
6508 Preferences\SpecialChar \menuseparator
6515 \begin_inset Flex MenuItem
6518 \begin_layout Plain Layout
6524 preset and enter command
6525 \begin_inset Flex MenuItem
6528 \begin_layout Plain Layout
6529 /Applications/LyX.app/Contents/MacOS/lyxeditor
6537 \begin_layout Standard
6538 Reverse search is triggered by COMMAND-SHIFT-click
6541 \begin_layout Subsubsection*
6545 \begin_layout Standard
6547 \begin_inset Flex MenuItem
6550 \begin_layout Plain Layout
6551 Settings\SpecialChar \menuseparator
6552 Configure Okular\SpecialChar \ldots{}
6553 \SpecialChar \menuseparator
6560 \begin_inset Quotes eld
6564 \begin_inset Quotes erd
6568 \begin_inset Flex Code
6571 \begin_layout Plain Layout
6580 \begin_layout Standard
6581 Reverse search is triggered by SHIFT-click.
6584 \begin_layout Subsubsection*
6588 \begin_layout Standard
6589 Launch yap, choose its
6590 \begin_inset Flex MenuItem
6593 \begin_layout Plain Layout
6594 View\SpecialChar \menuseparator
6601 \begin_inset Quotes eld
6605 \begin_inset Quotes erd
6610 \begin_inset Quotes eld
6613 New\SpecialChar \ldots{}
6615 \begin_inset Quotes erd
6618 button and, in the window that opens, enter
6619 \begin_inset Quotes eld
6623 \begin_inset Quotes erd
6626 (or any other name you like) in the
6627 \begin_inset Quotes eld
6631 \begin_inset Quotes erd
6635 Now click on the button labeled
6636 \begin_inset Quotes eld
6639 \SpecialChar \ldots{}
6641 \begin_inset Quotes erd
6644 to open a file dialog and navigate to the directory containing the batch
6646 \begin_inset Flex Code
6649 \begin_layout Plain Layout
6657 \begin_inset Flex Code
6660 \begin_layout Plain Layout
6666 and then specify the program arguments as
6667 \begin_inset Flex Code
6670 \begin_layout Plain Layout
6678 \begin_inset Flex Code
6681 \begin_layout Plain Layout
6687 wrapper is used for communicating with LyX through the
6694 \begin_layout LyX-Code
6696 \begin_inset Newline newline
6699 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6708 \begin_inset Newline newline
6722 \begin_layout Standard
6723 Make sure that the LyXServer pipe path you specified in LyX is
6724 \begin_inset Flex Code
6727 \begin_layout Plain Layout
6741 , otherwise change the
6742 \begin_inset Flex Code
6745 \begin_layout Plain Layout
6751 wrapper accordingly.
6754 \begin_layout Standard
6755 In yap, reverse search is triggered by double-click.
6758 \begin_layout Subsubsection*
6759 SumatraPDF (Windows)
6762 \begin_layout Standard
6763 In order to use SumatraPDF for inverse search, enter
6764 \begin_inset Flex Code
6767 \begin_layout Plain Layout
6768 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6773 in the viewer setting in
6774 \begin_inset Flex MenuItem
6777 \begin_layout Plain Layout
6778 Preferences\SpecialChar \menuseparator
6779 File Handling\SpecialChar \menuseparator
6780 File formats\SpecialChar \menuseparator
6787 \begin_inset Flex Code
6790 \begin_layout Plain Layout
6796 is the previous wrapper.
6797 If SumatraPDF.exe is not in your command PATH, use its full file name.
6800 \begin_layout Standard
6801 Reverse search is triggered by double-click.
6804 \begin_layout Subsubsection*
6808 \begin_layout Standard
6809 First of all, make sure that yap is your default DVI viewer in the Windows
6810 environment, then launch it, choose its
6811 \begin_inset Flex MenuItem
6814 \begin_layout Plain Layout
6815 View\SpecialChar \menuseparator
6822 \begin_inset Quotes eld
6826 \begin_inset Quotes erd
6831 \begin_inset Quotes eld
6834 New\SpecialChar \ldots{}
6836 \begin_inset Quotes erd
6839 button and, in the window that opens, enter
6840 \begin_inset Quotes eld
6844 \begin_inset Quotes erd
6847 (or any other name you like) in the
6848 \begin_inset Quotes eld
6852 \begin_inset Quotes erd
6856 Now click on the button labeled
6857 \begin_inset Quotes eld
6860 \SpecialChar \ldots{}
6862 \begin_inset Quotes erd
6865 to open a file dialog and navigate to the directory containing the
6866 \begin_inset Flex Code
6869 \begin_layout Plain Layout
6875 program (which is installed by default on Cygwin along with the LyX executable).
6877 \begin_inset Flex Code
6880 \begin_layout Plain Layout
6886 and then specify the program arguments as
6887 \begin_inset Flex Code
6890 \begin_layout Plain Layout
6897 In this way, you will be using the
6901 for communicating with LyX.
6902 If, for whatever reason, you want to use the
6907 \begin_inset Flex Code
6910 \begin_layout Plain Layout
6916 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6919 \begin_layout Standard
6920 In yap, reverse search is triggered by double-click.
6923 \begin_layout Subsubsection*
6927 \begin_layout Standard
6928 In order to use SumatraPDF for inverse search, enter
6929 \begin_inset Flex Code
6932 \begin_layout Plain Layout
6933 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6938 in the viewer setting in
6939 \begin_inset Flex MenuItem
6942 \begin_layout Plain Layout
6943 Preferences\SpecialChar \menuseparator
6944 File Handling\SpecialChar \menuseparator
6945 File formats\SpecialChar \menuseparator
6952 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6954 \begin_inset Flex Code
6957 \begin_layout Plain Layout
6963 enables communication via the
6969 \begin_inset Flex Code
6972 \begin_layout Plain Layout
6978 option if you want to use the
6982 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6985 \begin_layout Standard
6986 Reverse search is triggered by double-click.
6989 \begin_layout Section
6993 \begin_layout Standard
6994 Forward search is, as the name implies, in a sense the
6995 \begin_inset Quotes eld
6999 \begin_inset Quotes erd
7003 It allows you to let the viewer jump to a given position from within LyX.
7004 If forward search is set up (as described in what follows), you can put
7005 the cursor anywhere in your LyX document, and hit
7006 \begin_inset Flex MenuItem
7009 \begin_layout Plain Layout
7010 Navigate\SpecialChar \menuseparator
7017 \begin_inset Flex MenuItem
7020 \begin_layout Plain Layout
7026 in the context menu via right mouse click), and then the viewer will jump
7027 to that position as well.
7028 This implies, of course, that your viewer supports this function.
7031 \begin_layout Standard
7032 To make forward search possible, you first need to provide the generated
7033 output PDF/DVI file with additional information about the TeX sources.
7034 This can be done via the methods described in the section
7035 \begin_inset CommandInset ref
7037 reference "sub:rev-search"
7044 \begin_layout Standard
7045 Additionally, you need to configure LyX for using your viewers in
7046 \begin_inset Flex MenuItem
7049 \begin_layout Plain Layout
7050 Tools\SpecialChar \menuseparator
7051 Preferences\SpecialChar \menuseparator
7052 Output\SpecialChar \menuseparator
7059 We provide a range of tested configurations for some viewers, which you
7060 can select from the drop down list.
7061 If none of these configurations suits you, you have to find out and enter
7062 a suitable configuration yourself.
7063 The definition syntax uses the following placeholders:
7066 \begin_layout Itemize
7068 \begin_inset Flex Code
7071 \begin_layout Plain Layout
7080 \begin_layout Itemize
7082 \begin_inset Flex Code
7085 \begin_layout Plain Layout
7091 : name of the (temporary) exported .tex file (without path)
7094 \begin_layout Itemize
7096 \begin_inset Flex Code
7099 \begin_layout Plain Layout
7105 : name of the (temporary) exported .tex file (including path)
7108 \begin_layout Itemize
7110 \begin_inset Flex Code
7113 \begin_layout Plain Layout
7119 : name of the exported output file (either dvi or pdf, depending on which
7120 one exists in the temporary directory)
7123 \begin_layout Standard
7124 Note that only some of the viewers provide full forward search functionality,
7125 among them yap, xdvi, okular
7129 \begin_layout Plain Layout
7130 You might want to set
7131 \begin_inset Flex Code
7134 \begin_layout Plain Layout
7141 \begin_inset Flex MenuItem
7144 \begin_layout Plain Layout
7145 Tools\SpecialChar \menuseparator
7146 Preferences\SpecialChar \menuseparator
7147 File Handling\SpecialChar \menuseparator
7149 \begin_inset space ~
7166 \begin_layout Plain Layout
7167 For Sumatra CMCDDE is needed --- downloadable from
7168 \begin_inset CommandInset href
7170 target "http://www.istri.fr/zip/CMCDDE.zip"
7180 While many of the widespread PDF viewers (most notably Adobe Reader) do
7181 not support forward search at all, some other viewers -- e.
7182 \begin_inset space \thinspace{}
7186 evince and xpdf -- allow at least to reload the document and jump to a
7187 specific page of the file, so you can at least navigate
7188 \begin_inset Quotes eld
7192 \begin_inset Quotes erd
7196 This latter functionality is provided by an external call of synctex (see
7197 the predefined example configurations).
7201 \begin_layout Standard
7202 Forward search works both with DVI and PDF output.
7203 LyX simply checks which preview format you have used before (i.
7204 \begin_inset space \thinspace{}
7207 e., which format is already there in the temporary directory) and chooses
7208 the appropriate configuration for the respective format.
7211 \begin_layout Chapter
7212 Special Document Classes
7215 \begin_layout Section
7219 \begin_layout Standard
7225 \begin_layout Subsection
7229 \begin_layout Standard
7230 This section describes how LyX can be used to write articles for submission
7231 to the scientific journal
7233 Astronomy and Astrophysics
7235 (www.edpsciences.fr/aa/
7236 \begin_inset Flex URL
7239 \begin_layout Plain Layout
7241 http://www.edpsciences.fr/aa/
7246 ) using Version 5.01 of the document class
7251 This package can be downloaded from the ftp site
7254 \begin_layout Standard
7255 \begin_inset VSpace medskip
7261 \begin_layout Standard
7263 \begin_inset Flex URL
7266 \begin_layout Plain Layout
7268 ftp://ftp.edpsciences.org/pub/aa/readme.html
7276 \begin_layout Standard
7277 \begin_inset VSpace medskip
7283 \begin_layout Standard
7284 A manual comes together with that package, and this text is not meant to
7285 replace the original manual but is merely a short guide in how to realize
7286 the correct form of your paper.
7290 \begin_layout Standard
7291 Please note that the publisher of the journal was changed from Springer
7292 to EDP Sciences starting January 1, 2001.
7293 That change involved also some slight changes to the style files, namely
7294 the removal of the thesaurus command.
7295 The LyX class aa supports the newest version of these style files, V 5.01.
7296 If you have an older version installed, please upgrade.
7297 For compatibility, the old (version 4) layout has been kept as
7302 Please refer to the comments in
7304 LyXDir/layouts/aapaper.layout
7309 \begin_layout Subsection
7313 \begin_layout Standard
7314 It is recommended you start from the example template distributed with LyX.
7315 If you are not using a template, note the following settings:
7318 \begin_layout Itemize
7325 Document\SpecialChar \menuseparator
7328 dialog (OK, that one was obvious).
7331 \begin_layout Itemize
7332 Don't change the option
7335 \begin_inset space ~
7345 The whole layout is done by the macros, you shouldn't change anything.
7348 \begin_layout Subsection
7352 \begin_layout Standard
7353 First thing to enter is the header information.
7354 It consists of seven entries, of which some are optional.
7358 \begin_layout Itemize
7366 \begin_layout Itemize
7374 \begin_layout Itemize
7382 \begin_layout Itemize
7390 \begin_layout Itemize
7395 : [optional] if more than one author: whom to contact for offprint requests.
7398 \begin_layout Itemize
7403 : [optional] mail address for contacts.
7406 \begin_layout Itemize
7414 Received: <date>; Accepted <date>
7417 \begin_layout Standard
7418 There is no need to issue the
7424 command, this is done automatically by LyX when the header is finished.
7425 Although the order of the single header entries doesn't matter it is advised
7426 to keep the above sequence, just to get the best optics and meets the layout
7427 of the real document.
7430 \begin_layout Standard
7431 If you want to place footnotes in the header block, e.
7432 \begin_inset space \thinspace{}
7436 \begin_inset space \space{}
7439 to state your present address, just use the standard footnote via the menu
7442 Insert\SpecialChar \menuseparator
7446 LyX will automagically use the term
7455 \begin_layout Standard
7456 In addition to these topics, the macros use three additional LaTeX commands
7457 that have no counterpart in LyX:
7460 \begin_layout Itemize
7467 to separate different names for more than one author and institute, respectivel
7471 \begin_layout Itemize
7478 to mark corresponding author/institute pairs.
7479 The institutes are numbered sequentially as they appear in the
7483 field, so you have to put a marker to each author.
7486 \begin_layout Itemize
7493 to supply an email address for fast contact.
7496 \begin_layout Standard
7497 In all cases, the appropriate command has to be entered in LyX and marked
7503 \begin_layout Subsection
7507 \begin_layout Standard
7508 The abstract should immediately follow the header block.
7509 With version 5 the abstract environment was changed to a command, and there
7510 is now a resctriction to only one paragraph.
7511 In addition, it should contain an entry with the keywords.
7512 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7519 by hand and mark it as LaTeX code.
7520 Refer to the example paper.
7523 \begin_layout Subsection
7524 Supported environments
7527 \begin_layout Standard
7528 The A&A paper layout supports the following environments for structuring
7532 \begin_layout Itemize
7538 \begin_layout Itemize
7544 \begin_layout Itemize
7550 \begin_layout Itemize
7556 \begin_layout Itemize
7562 \begin_layout Itemize
7568 \begin_layout Itemize
7574 \begin_layout Itemize
7580 \begin_layout Itemize
7586 \begin_layout Itemize
7592 \begin_layout Itemize
7598 \begin_layout Itemize
7604 \begin_layout Subsection
7605 Commands not supported by LyX
7608 \begin_layout Standard
7609 Some commands are not yet supported by the
7614 Some have already been mentioned.
7615 For the sake of completeness, they are listed all together here:
7618 \begin_layout Itemize
7626 \begin_layout Itemize
7634 \begin_layout Itemize
7642 \begin_layout Itemize
7650 \begin_layout Itemize
7658 \begin_layout Itemize
7666 \begin_layout Itemize
7674 \begin_layout Itemize
7682 \begin_layout Standard
7683 If you want to use any of these commands, you have to enter them yourself.
7686 Do not forget to mark them as LaTeX code!
7689 \begin_layout Subsection
7690 Figure and Table Floats
7693 \begin_layout Standard
7694 LyX provides support for the necessary float environments
7696 figure, figure*, table
7702 , therefore we won't tell much about it here.
7706 \begin_inset space ~
7712 Just remember that tables should be left-aligned.
7713 For that, select the table and change the alignment in
7715 Edit\SpecialChar \menuseparator
7717 \begin_inset space ~
7723 \begin_layout Standard
7724 There is only one special thing: the figures with caption besides the figure.
7725 To create such a figure, you have to do the following:
7728 \begin_layout Enumerate
7729 Create a wide figure float:
7731 Insert\SpecialChar \menuseparator
7732 Float\SpecialChar \menuseparator
7735 , then right click in the figure and select
7741 \begin_inset space ~
7749 \begin_layout Enumerate
7750 Enter your caption text.
7753 \begin_layout Enumerate
7758 to move the cursor above the caption.
7761 \begin_layout Enumerate
7765 \begin_layout Enumerate
7766 Position the cursor behind the figure and insert a horizontal fill:
7768 Insert\SpecialChar \menuseparator
7770 \begin_inset space ~
7773 Character\SpecialChar \menuseparator
7775 \begin_inset space ~
7783 \begin_layout Enumerate
7784 Switch to LaTeX mode:
7787 \begin_inset space ~
7795 \begin_layout Enumerate
7805 Do not close the brace!
7808 \begin_layout Enumerate
7809 Position the cursor behind the caption text, switch to LaTeX mode and insert
7813 \begin_inset space ~
7825 \begin_layout Standard
7826 Also, refer to the figures in the example paper.
7829 \begin_layout Subsection
7833 \begin_layout Standard
7834 For submission, the paper has to be formated in a special double-spacing
7836 For this purpose, you have to give the option
7840 to the documentclass.
7841 This must be done using the extra class options field in the
7843 Document\SpecialChar \menuseparator
7847 Just enter the string
7854 \begin_layout Subsection
7858 \begin_layout Standard
7863 directory contains an example paper written with LyX.
7864 It is the example paper from the original macro package, translated to
7866 Use it for inspiration, and compare the original LaTeX code with LyX way
7870 \begin_layout Section
7874 \begin_layout Standard
7880 \begin_layout Subsection
7884 \begin_layout Standard
7885 AASTeX is a set of macros produced by the American Astronomical Society
7886 to facilitate electronic manuscript submission to the three journals they
7887 publish: the Astrophysical Journal (including the Letters and Supplement),
7888 the Astronomical Journal, and the Publications of the Astronomical Society
7890 LyX has proven to be an excellent tool for generating these documents,
7891 especially given its equation, citation, and figure handling capabilities.
7892 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7893 is the version described here, or higher.
7894 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7895 incompatible with LyX.
7896 The AASTeX package may be downloaded from the AASTeX Web site
7899 \begin_layout Standard
7900 \begin_inset VSpace medskip
7906 \begin_layout Standard
7908 \begin_inset Flex URL
7911 \begin_layout Plain Layout
7913 http://www.journals.uchicago.edu/AAS/AASTeX
7921 \begin_layout Standard
7922 \begin_inset VSpace medskip
7928 \begin_layout Standard
7929 A complete user guide is contained in that package and you should familiarize
7930 yourself with it thoroughly before embarking on writing a paper in LyX.
7931 LyX will not reduce the need to figure out all the AASTeX commands, it
7932 will only reduce the drudgery of typing everything in.
7933 It is your responsibility to ensure that the final exported LaTeX document
7934 conforms completely to the requirements of the journal to which you are
7935 submitting your paper.
7938 \begin_layout Subsection
7939 Starting a New Paper
7942 \begin_layout Standard
7943 I strongly suggest that you start with the AASTeX template file.
7946 File\SpecialChar \menuseparator
7953 , enter the new file name, then choose the
7958 This will show the most common fields found in a manuscript.
7959 Simply overwrite the existing text (including the brackets,
7963 ) with the correct information.
7964 Many of the AASTeX commands and environments can be implemented directly
7965 in LyX, but some cannot: most noticeably
7977 , which should stick out like a sore thumb if you actually just opened the
7979 For commands such as these, the LaTeX code must be entered directly and
7981 Such commands are referred to as TeX code, or Evil Red Text.
7982 I tried to minimize the amount of TeX code needed in an AASTeX document,
7983 but there is still a bit more required than any of us would like.
7986 \begin_layout Subsection
7987 Finishing Your Paper
7990 \begin_layout Standard
7991 When the paper is finished to your satisfaction and previews/prints correctly,
7993 \begin_inset Quotes eld
7997 \begin_inset Quotes erd
8000 actions which need to be done before you submit it to the journals.
8004 \begin_layout Enumerate
8005 Export your paper as a LaTeX file (
8007 File\SpecialChar \menuseparator
8008 Export\SpecialChar \menuseparator
8015 \begin_layout Enumerate
8020 file with your favorite text editor
8024 \begin_layout Enumerate
8025 remove the comment lines before the
8034 \begin_layout Enumerate
8039 usepackage...{fontenc}
8041 line if it appears (usually just after
8056 \begin_layout Enumerate
8057 remove everything between (and including) the
8069 commands, except for any commands you specifically put into the LaTeX preamble
8070 (which should appear immediately after the
8071 \begin_inset Quotes eld
8074 User specified LaTeX commands
8075 \begin_inset Quotes erd
8086 \begin_layout Enumerate
8087 Run the resulting file through LaTeX to make sure it still processes correctly.
8090 \begin_layout Enumerate
8091 Reread the journal requirements to make sure your filenames and formats
8095 \begin_layout Enumerate
8099 \begin_layout Subsection
8100 Comments On Specific Commands
8103 \begin_layout Standard
8104 I will not describe the detailed usage of the individual AASTeX commands:
8105 the AASTeX User Guide (
8109 ) gives a good description of each.
8110 Thus it's probably easiest for me to go down the list as found in the guide
8111 and offer comments where necessary.
8112 So let's begin \SpecialChar \ldots{}
8116 \begin_layout Subsubsection
8117 Things that work as expected
8120 \begin_layout Standard
8121 Because they work as you might expect, I simply list them and the section
8222 begin{thebibliography}
8230 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8231 graphicx figure commands (2.14.1),
8255 (2.15.4, amongst other places),
8282 \begin_layout Standard
8283 The following style options also work correctly:
8304 Simply put them in the
8310 Layout\SpecialChar \menuseparator
8316 \begin_layout Subsubsection
8317 Things that work, but require more comment
8320 \begin_layout Standard
8321 The following items work, but require a little more discussion:
8324 \begin_layout Itemize
8325 These items are reserved for use by the journal editors, but you can put
8326 them into the LaTeX preamble if you feel compelled to do so:
8359 \begin_layout Itemize
8360 These items may be placed in the LaTeX preamble, and are included as blanks
8361 in the template file:
8382 \begin_layout Itemize
8389 (2.3) – can only be used
8390 \begin_inset Quotes eld
8394 \begin_inset Quotes erd
8397 , not in the middle of a paragraph.
8398 Use TeX code if you need to embed it.
8401 \begin_layout Itemize
8408 (2.3) – will have extra {} after it.
8409 This should not cause an error.
8412 \begin_layout Itemize
8419 (2.6) – can only be used
8420 \begin_inset Quotes eld
8424 \begin_inset Quotes erd
8427 , not in the middle of a paragraph.
8428 Use TeX code if you need to embed it.
8431 \begin_layout Itemize
8438 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8442 \begin_layout Itemize
8456 \begin_layout Itemize
8463 (2.9) – will have extra {} after it.
8464 This should not cause an error.
8467 \begin_layout Itemize
8474 (2.11) – will have extra {} after it.
8475 This should not cause an error.
8478 \begin_layout Itemize
8485 (2.14.2) – you can insert an optional filename argument by placing the cursor
8486 at the beginning of the text and selecting
8488 Insert\SpecialChar \menuseparator
8493 \begin_inset Quotes eld
8497 \begin_inset Quotes erd
8500 inserts an optional argument of the type needed by
8507 Hopefully it will be renamed someday.
8510 \begin_layout Itemize
8523 for the catalog ID optional parameter
8526 \begin_layout Itemize
8539 for the catalog ID optional parameter
8542 \begin_layout Subsubsection
8543 Things not implemented, use TeX code
8546 \begin_layout Standard
8569 setcounter{equation}
8571 (2.12), Journal name abbreviations (2.13.4),
8607 (2.15.4, insert it as the first element in the lefthand cell after where
8609 Don't use any of LyX's rules in the table),
8621 (2.15.5), much of Misc (2.17, except
8672 \begin_layout Subsubsection
8673 Things that cannot be implemented
8676 \begin_layout Standard
8677 \SpecialChar \ldots{}
8678 at least in any meaningful sort of way, so I suggest ignoring them.
8679 They are the references environment (2.13.3), and the deluxetable environment
8681 If you really, really need to use deluxetable, I suggest editing it in
8682 a separate file with a text editor, then using
8684 Insert\SpecialChar \menuseparator
8686 \begin_inset space ~
8691 to include it in your LyX document.
8696 file to see an example of this.
8699 \begin_layout Subsection
8700 FAQs, Tips, Tricks, and Other Ruminations
8703 \begin_layout Subsubsection
8704 Getting LyX and AASTeX to cooperate
8707 \begin_layout Standard
8708 It can be a bit tricky to get LyX to recognize a new layout and document
8710 When all else fails, do this:
8713 \begin_layout Enumerate
8714 Make certain that LaTeX can find AASTeX.
8715 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8716 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8723 \begin_layout Enumerate
8735 \begin_layout Enumerate
8738 Tools\SpecialChar \menuseparator
8741 in LyX, then restart LyX.
8744 \begin_layout Enumerate
8745 Open a regular new file, not from a template.
8746 Does AASTeX appear in the class list in
8748 Document\SpecialChar \menuseparator
8754 \begin_layout Standard
8755 If you get a warning from an existing AASTeX document about not being able
8756 to find the AASTeX layout or a message about
8757 \begin_inset Quotes eld
8760 You should not mix title layouts with normal ones
8761 \begin_inset Quotes erd
8764 , things haven't been installed correctly.
8767 \begin_layout Subsubsection
8768 LaTeX error processing a table
8771 \begin_layout Standard
8772 LyX, by default, attempts to center the table caption/title.
8773 This seems to produce a bad interaction in AASTeX so you should click somewhere
8774 in the caption/title, then select
8776 Edit\SpecialChar \menuseparator
8778 \begin_inset space ~
8792 This took care of it for me.
8795 \begin_layout Subsubsection
8799 \begin_layout Standard
8800 A couple of things: 1) I have noticed some funny spacing in the reference
8801 entries in the text.
8802 When you enter the bibliography item data, make sure their is
8806 space between the last author and the parenthesis setting off the year;
8810 \begin_inset space \thinspace{}
8814 \begin_inset space \space{}
8828 2) Entering the references at all is not obvious.
8829 The easiest thing is to start typing your first reference at the end of
8830 the document, then mark it as type
8835 That will put a small gray box in front of what you just typed.
8836 Click on the box to fill in the rest of the information.
8837 For new references, go to the end of an existing reference and press return.
8838 That will create a new line with its own box, etc.
8841 \begin_layout Subsubsection
8845 \begin_layout Standard
8846 Even though AASTeX provides its own figure commands (
8852 , for example), I much prefer LaTeX's standard figure commands (with the
8861 \begin_inset space ~
8864 commands as TeX code into a Figure Float box if you desire, but I never
8865 have much luck getting the layout right.
8866 With the standard graphics, LyX will insert a
8870 usepackage{graphicx}
8872 command into the LaTeX preamble and handle the figures in the standard
8873 LaTeX2e way, interspersing the figures in the text.
8874 I believe ApJ accepts figures exactly this way now; AJ might still use
8876 \begin_inset Quotes eld
8879 stack everything at the end
8880 \begin_inset Quotes erd
8886 \begin_layout Subsubsection
8887 Things I could have done, but didn't
8890 \begin_layout Standard
8892 \begin_inset Quotes eld
8896 \begin_inset Quotes erd
8899 things I could have implemented, but chose not to.
8900 For instance, I saw no point in double-spacing the text in the LyX window,
8901 even though it is double-spaced in the paper manuscript.
8902 Also, I chose not to make separate layouts for the preprint and preprint2
8904 Since I assume you will spend most of your time in the plain manuscript
8905 mode anyway, I decided not to chew up more disk space with this.
8909 \begin_layout Subsection
8913 \begin_layout Standard
8914 Your mileage may vary.
8915 I've now had papers published by both ApJ and AJ that have had 98% of the
8916 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8918 I have had no trouble with the submission process, and I'm sure the journals
8919 were never aware that there might be a difference.
8920 So, go forth and publish!
8923 \begin_layout Section
8927 \begin_layout Standard
8937 \begin_layout Standard
8938 \begin_inset VSpace bigskip
8944 \begin_layout Standard
8946 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8947 papers to be submitted to American Mathematical Society publications.
8948 The layouts are not tailored to a specific journal, but easily can be.
8949 You should refer to the AMS documentation for specific instructions for
8950 each journal (usually it will entail only changing a single line in the
8952 That documentation is available on the Web at
8953 \begin_inset Flex URL
8956 \begin_layout Plain Layout
8964 \begin_inset Flex URL
8967 \begin_layout Plain Layout
8969 ftp://ftp.ams.org/pub/tex/amslatex/
8975 These layouts are appropriate, and useful, for any mathematical writing.
8979 \begin_layout Standard
8980 There are two basic AMS LaTeX layouts:
8983 \begin_layout Itemize
8984 amsart: The standard AMS article format.
8987 \begin_layout Itemize
8988 amsbook: the standard AMS book (really, monograph) format.
8992 \begin_layout Standard
8993 The layouts themselves contain only the minimum necessary to use the AMS
8995 They do not, in particular, contain any of the `theorem' environments used
8996 for setting theorems, lemmas, and the like.
8997 These are contained, instead, in the
8998 \begin_inset Flex Code
9001 \begin_layout Plain Layout
9007 module, which is loaded by default when you select one of the AMS classes.
9008 (It can also be used with other classes and can be removed, if you would
9009 rather use something else.) Less commonly used environments are in the
9010 \begin_inset Flex Code
9013 \begin_layout Plain Layout
9014 Theorems (AMS-Extended)
9019 module, which must be loaded manually.
9022 \begin_layout Standard
9023 By default, theorems and the like are numbered consecutively throughout
9024 the document, but this may be modified by loading the module
9025 \begin_inset Flex Code
9028 \begin_layout Plain Layout
9029 Theorems (Order by Section)
9034 or, if you are using
9035 \begin_inset Flex Code
9038 \begin_layout Plain Layout
9045 \begin_inset Flex Code
9048 \begin_layout Plain Layout
9049 Theorems (Order by Chapter)
9055 These will number the results as
9056 \begin_inset Formula $n.m$
9059 , where the first number refers to the section (or chapter) and the second
9060 refers to the total number of results so far in that section (or chapter).
9061 Many environments are also available unnumbered.
9062 These are indicated by an asterisk at the end.
9063 If you happen to want
9067 unnumbered results, the module
9068 \begin_inset Flex Code
9071 \begin_layout Plain Layout
9077 provides that option.
9080 \begin_layout Standard
9081 Note that these modules do not
9085 to be used with the AMS classes.
9086 It is perfectly possible to use the
9087 \begin_inset Flex Code
9090 \begin_layout Plain Layout
9096 module, and the others mentioned, with other classes, such as
9097 \begin_inset Flex Code
9100 \begin_layout Plain Layout
9107 \begin_inset Flex Code
9110 \begin_layout Plain Layout
9117 \begin_inset Flex Code
9120 \begin_layout Plain Layout
9129 \begin_layout Subsection
9130 What these layouts provide
9133 \begin_layout Standard
9134 There is a long list of included environments provided by these layouts.
9135 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9136 variety of `theorem' environments.
9137 However, the AMS recommends the environments that are available in LyX.
9141 \begin_layout Standard
9142 The following environments—as well as the standard environments, such as
9144 \begin_inset Flex Noun
9147 \begin_layout Plain Layout
9154 \begin_inset Flex Noun
9157 \begin_layout Plain Layout
9164 \begin_inset Flex Noun
9167 \begin_layout Plain Layout
9174 \begin_inset Flex Noun
9177 \begin_layout Plain Layout
9184 \begin_inset Flex Noun
9187 \begin_layout Plain Layout
9194 \begin_inset Flex Code
9197 \begin_layout Plain Layout
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9216 \begin_layout Description
9217 Address This should be the author's permanent address.
9220 \begin_layout Description
9222 \begin_inset space ~
9225 Address This should be the author's temporary address at the time of submission,
9226 if different from the Address.
9229 \begin_layout Description
9230 Email Author's e-mail address
9233 \begin_layout Description
9234 URL Author's Web address, if desired.
9237 \begin_layout Description
9238 Keywords Key words or phrases used to identify specific topics discussed
9242 \begin_layout Description
9243 Subjectclass These refer to the AMS Subject Classifications, published and
9246 Mathematical Reviews
9249 These are also available online at the AMS cites listed above.
9252 \begin_layout Description
9256 \begin_layout Description
9260 \begin_layout Description
9264 \begin_layout Standard
9265 The following environments are provided by both the
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9276 \begin_inset Flex Code
9279 \begin_layout Plain Layout
9285 modules, in the latter case in both starred (unnumbered) and unstarred
9286 (numbered) versions.
9287 These same environments are provided only in the starred versions by the
9289 \begin_inset Flex Code
9292 \begin_layout Plain Layout
9301 \begin_layout Theorem
9302 This is typically used for the statements of major results.
9306 \begin_layout Corollary*
9307 This is used for statements which follow fairly directly from previous statement
9309 Again, these can be major results.
9314 These are smaller results needed to prove other statements.
9317 \begin_layout Proposition
9318 These are less major results which (hopefully) add to the general theory
9322 \begin_layout Conjecture
9323 These are statements provided without justification, which the author does
9324 not know how to prove, but which seem to be true (to the author, at least).
9327 \begin_layout Definition*
9328 Guess what this is for.
9329 The font is different for this environment than for the previous ones.
9333 \begin_layout Example*
9334 Used for examples illustrating proven results.
9337 \begin_layout Problem
9338 It's not really known what this is for.
9339 You should figure it out.
9342 \begin_layout Exercise*
9343 Write a description for this one.
9346 \begin_layout Remark
9347 This environment is also a type of theorem, usually a lesser sort of observation.
9350 \begin_layout Claim*
9351 Often used in the course of giving a proof of a larger result.
9355 Generally, these are used to break up long arguments, using specific instances
9361 The numbering scheme for cases is on its own, not together with other numbered
9367 At the end of this environment, a QED symbol (usually a square, but it can
9368 vary with different styles) is placed.
9369 If you want to have other environments within this one—for example, Case
9370 environments—and have the QED symbol appear only after them, then the other
9371 environments need to be nested within the proof environment.
9374 Nesting Environments
9380 for information on nesting.
9383 \begin_layout Standard
9384 And these environments are provided by
9385 \begin_inset Flex Code
9388 \begin_layout Plain Layout
9389 Theorems (AMS-Extended)
9397 \begin_layout Criterion*
9398 A required condition.
9401 \begin_layout Algorithm*
9402 A general procedure to be used.
9405 \begin_layout Axiom*
9406 This is a property or statement taken as true within the system being discussed.
9409 \begin_layout Condition*
9410 Sometimes used to state a condition assumed within the present context of
9415 Similar to a Remark.
9418 \begin_layout Notation*
9419 Used for the explanation of, yes, notation.
9422 \begin_layout Summary
9423 Do we really need to tell you?
9426 \begin_layout Acknowledgement*
9430 \begin_layout Conclusion*
9431 Sometimes used at the end of a long train of argument.
9435 Used in a way similar to Proposition, though perhaps lower on the scale.
9438 \begin_layout Standard
9439 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9441 They need to be available on your system in order to use these environments.
9444 \begin_layout Section
9452 \begin_layout Standard
9458 \begin_layout Subsection
9462 \begin_layout Standard
9463 These are the layout files for some of the journals of the American Geophysical
9465 It is assumed that you have both the AGU's own class files and AGUplus
9466 installed (everything to be found at
9467 \begin_inset Flex URL
9470 \begin_layout Plain Layout
9472 ftp://ftp.agu.org/journals/latex/journals
9480 \begin_layout Subsection
9484 \begin_layout Standard
9494 They are still called this in the LyX GUI, though their LaTeX equivalents
9495 in the AGU classes are
9506 \begin_layout Standard
9507 Newly defined styles are
9544 These are mostly manuscript attributes and defined in the AGU class documentati
9548 \begin_layout Standard
9549 I suspect this is still badly incomplete.
9552 \begin_layout Subsection
9556 \begin_layout Standard
9573 \begin_layout Subsection
9577 \begin_layout Itemize
9580 Journal of Geophysical Research
9589 \begin_layout Standard
9590 Add your own, it isn't so hard! Look at the
9601 \begin_layout Subsection
9602 Bugs and things to remember
9605 \begin_layout Standard
9606 In order to use the new layouts, you must remember to do the following for
9610 \begin_layout Enumerate
9616 This can be done in the
9618 Layout\SpecialChar \menuseparator
9623 Document\SpecialChar \menuseparator
9627 (AGU articles are always in English, right? So
9634 \begin_layout Enumerate
9644 (Yes, this is a bug.)
9647 \begin_layout Enumerate
9648 Make sure you use the
9652 bibliography style, by entering
9656 into the second field of the BibTeX inset.
9657 None of the standard styles will do.
9660 \begin_layout Section
9664 \begin_layout Standard
9670 \begin_layout Subsection
9674 \begin_layout Standard
9675 Broadway is for writing plays.
9676 The format is more decorative than Hollywood, and much less standardized.
9677 This format should be suitable for workshops.
9680 \begin_layout Subsection
9684 \begin_layout Standard
9685 The same as in Hollywood.
9688 \begin_layout Subsection
9692 \begin_layout Standard
9697 names as labels then cross-reference the label to insert the name.
9698 The cross-reference dialog will show the current cast of characters.
9701 \begin_layout Subsection
9702 Paper size and Margins
9705 \begin_layout Standard
9706 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9709 \begin_layout Subsection
9713 \begin_layout Standard
9714 The following environments are available.
9715 You can use broadway.bind to get the bind keys shown at the right.
9718 \begin_layout Itemize
9722 \begin_inset Newline newline
9727 You should not have to use this, but it is here for anything that does not
9731 \begin_layout Itemize
9735 \begin_inset space \hfill{}
9739 \begin_inset Newline newline
9744 Used to describe stage setting and the action.
9745 First use of speaker names in all CAPs.
9748 \begin_layout Itemize
9752 \begin_inset space \hfill{}
9756 \begin_inset Newline newline
9761 Automatically numbered.
9762 On screen it will be arabic, but will print as Roman.
9765 \begin_layout Itemize
9769 \begin_inset space \hfill{}
9773 \begin_inset Newline newline
9783 It is just centered text.
9786 \begin_layout Itemize
9790 \begin_inset space \hfill{}
9794 \begin_inset Newline newline
9799 Not automatically numbered.
9800 You supply the number.
9801 This is because I couldn't figure out how.
9804 \begin_layout Itemize
9808 \begin_inset space \hfill{}
9812 \begin_inset Newline newline
9817 A special case of Narrative to describe the setting and action as the curtain
9821 \begin_layout Itemize
9825 \begin_inset space \hfill{}
9829 \begin_inset Newline newline
9834 The speaker's (actor's) title, centered in all CAPS.
9837 \begin_layout Itemize
9841 \begin_inset space \hfill{}
9845 \begin_inset Newline newline
9850 Instructions to the speaker.
9851 The parentheses are automatically inserted.
9852 The ( will appear on screen, but both will be in the printed play.
9853 This environment is only used within
9860 \begin_layout Itemize
9864 \begin_inset space \hfill{}
9868 \begin_inset Newline newline
9873 What the Speaker says.
9876 \begin_layout Itemize
9880 \begin_inset space \hfill{}
9884 \begin_inset Newline newline
9889 The curtain comes down.
9892 \begin_layout Itemize
9896 \begin_inset space \hfill{}
9902 \begin_layout Itemize
9906 \begin_inset space \hfill{}
9912 \begin_layout Itemize
9916 \begin_inset space \hfill{}
9922 \begin_layout Standard
9926 \begin_layout Section
9930 \begin_layout Standard
9935 can be used to type letters according to German conventions.
9936 A template file is included in
9938 .../lyx/share/templates
9940 for you to use as a starting point.
9943 \begin_layout Section
9951 \begin_layout Standard
9957 \begin_layout Subsection
9961 \begin_layout Standard
9962 This is the layout file for the European Geophysical Society journals.
9967 can be downloaded from the web site of the EGS under
9968 \begin_inset Flex URL
9971 \begin_layout Plain Layout
9981 \begin_layout Subsection
9985 \begin_layout Standard
9988 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9996 The current layout file is unfortunately very unmodular and would benefit
9997 from using the various
10004 \begin_layout Section
10008 \begin_layout Standard
10009 See the LyX template file
10014 It contains all infos you need.
10017 \begin_layout Section
10023 \begin_inset CommandInset label
10032 \begin_layout Standard
10038 \begin_layout Subsection
10042 \begin_layout Standard
10043 This section describes how to use LyX to make slides for overhead projectors.
10044 There are two document classes that can do this: the default slides class
10050 This section documents the latter.
10053 \begin_layout Standard
10054 I'm going to say this again, nice and clear, so that there's no misunderstanding
10058 \begin_layout Standard
10059 \begin_inset VSpace bigskip
10065 \begin_layout Standard
10069 This section documents the class
10070 \begin_inset Quotes eld
10078 \begin_inset Quotes erd
10086 \begin_layout Standard
10087 \begin_inset VSpace bigskip
10093 \begin_layout Standard
10094 If you're looking for the documentation for
10095 \begin_inset Quotes eld
10103 \begin_inset Quotes erd
10106 , check out section
10107 \begin_inset space ~
10111 \begin_inset CommandInset ref
10113 reference "sec:slitex"
10118 If your machine doesn't have the
10123 \begin_inset Quotes eld
10131 \begin_inset Quotes erd
10134 ] installed, you'll probably have to use the default
10138 class, which isn't quite as good as
10143 \begin_layout Standard
10148 class is designed for use with version 2.1 of the
10152 LaTeX class file which is now an integral part of LaTeX2e.
10155 \begin_layout Subsection
10159 \begin_layout Standard
10160 Obviously, to use this document class, you need to select
10161 \begin_inset Quotes eld
10169 \begin_inset Quotes erd
10179 \begin_inset space ~
10185 There are some settings in the
10188 \begin_inset space ~
10193 dialog that you should know about that are specific to this class:
10196 \begin_layout Itemize
10197 Don't change the options
10208 \begin_inset space ~
10214 They're ignored by the
10221 \begin_layout Itemize
10222 The default font size is 20
10223 \begin_inset space \thinspace{}
10226 pt with the other options being 17
10227 \begin_inset space \thinspace{}
10231 \begin_inset space \thinspace{}
10235 \begin_inset space \thinspace{}
10241 \begin_layout Itemize
10242 The default font is
10250 but all math equations are still typeset in the usual roman font.
10253 \begin_layout Itemize
10258 supports A4 and Letter paper sizes as well as a special size for working
10260 \begin_inset space \thinspace{}
10264 It doesn't support A5, B5, legal or executive paper sizes.
10267 \begin_layout Itemize
10268 Don't bother changing the
10272 settings because they are ignored anyway.
10273 All floats appear where they are defined in the text.
10276 \begin_layout Itemize
10281 setting behaves a bit differently for this class.
10286 provides extensive footer and header capabilities including a user-defined
10289 \begin_inset space ~
10293 \begin_inset CommandInset ref
10295 reference "sec:foilfoot"
10300 The title page is treated differently to all other pages in the document
10309 has the logo centered at the bottom of the page (if one is defined).
10310 The possible page style choices and what they do are as follows:
10314 \begin_layout Labeling
10315 \labelwidthstring MMMMMMM
10322 The final output contains no page numbers, or other headers or footers
10323 (except footnotes of course).
10327 \begin_layout Labeling
10328 \labelwidthstring MMMMMMM
10335 The final output contains page numbers centered at the bottom of the page.
10336 No other headings or footers (other than footnotes).
10339 \begin_layout Labeling
10340 \labelwidthstring MMMMMMM
10345 Page numbers in lower right corner.
10346 Additional headers and footers are also shown.
10347 This is also the default.
10350 \begin_layout Labeling
10351 \labelwidthstring MMMMMMM
10356 Gives you access to the
10360 package although its use with
10364 is discouraged by the writer of the
10368 package because of some potential page layout clashes.
10372 \begin_layout Subsubsection
10376 \begin_layout Standard
10377 The following options may be used in the extra class options in the
10379 Document\SpecialChar \menuseparator
10385 \begin_layout Labeling
10386 \labelwidthstring MMMMMMx
10391 This sets up the page layout for 7.33
10392 \begin_inset space \thinspace{}
10396 \begin_inset space \thinspace{}
10399 in paper, which is about the same aspect ratio as a 35
10400 \begin_inset space \thinspace{}
10403 mm slide, making it a bit easier to work with this medium.
10406 \begin_layout Labeling
10407 \labelwidthstring MMMMMMx
10412 Places a rule across the page below the header on every page except the
10416 \begin_layout Labeling
10417 \labelwidthstring MMMMMMx
10422 Places a rule across the page above the footer on every page except the
10426 \begin_layout Labeling
10427 \labelwidthstring MMMMMMx
10432 This is automatically set each time you create a new
10441 to use the dvips driver to rotate those pages that are set as landscape
10445 \begin_layout Labeling
10446 \labelwidthstring MMMMMMx
10451 Simply changes the page dimensions to those of a landscape page but doesn't
10453 Thus if you use this option you need to use an external program to rotate
10454 each page or feed your paper through your printer as landscape.
10455 Note that this option effectively reverses the roles of the
10463 environments (don't worry these are described in the next section).
10466 \begin_layout Labeling
10467 \labelwidthstring MMMMMMx
10472 Equation numbers on the left.
10475 \begin_layout Labeling
10476 \labelwidthstring MMMMMMx
10481 Flush-left equations.
10484 \begin_layout Subsection
10485 Supported Environments
10488 \begin_layout Standard
10489 Most of the environments commonly supported in other classes are also supported
10495 There are several additional environments provided by
10499 as well as a couple added by LyX.
10500 The following environments are shared with other classes:
10503 \begin_layout Standard
10504 \begin_inset Flex Multiple Columns
10507 \begin_layout Itemize
10513 \begin_layout Itemize
10519 \begin_layout Itemize
10525 \begin_layout Itemize
10531 \begin_layout Itemize
10537 \begin_layout Itemize
10543 \begin_layout Itemize
10549 \begin_layout Itemize
10555 \begin_layout Itemize
10561 \begin_layout Itemize
10567 \begin_layout Itemize
10573 \begin_layout Itemize
10579 \begin_layout Itemize
10585 \begin_layout Itemize
10591 \begin_layout Itemize
10597 \begin_layout Itemize
10603 \begin_layout Itemize
10609 \begin_layout Itemize
10620 \begin_layout Standard
10621 That is, all the major environments apart from the sectioning environments.
10622 Since foils are essentially self-contained sections, with a title and body,
10627 provides specific commands for starting new foils and these are:
10630 \begin_layout Itemize
10636 \begin_layout Itemize
10642 \begin_layout Standard
10643 LyX also provides slightly modified versions of these two environments called:
10646 \begin_layout Itemize
10652 \begin_layout Itemize
10655 ShortRotatefoilhead
10658 \begin_layout Standard
10659 and the differences will be explained in the next section.
10662 \begin_layout Standard
10663 Since foils are often used in presenting ideas or new theorems and such
10668 also provides a comprehensive box of goodies for presenting them:
10671 \begin_layout Standard
10672 \begin_inset Flex Multiple Columns
10675 \begin_layout Itemize
10681 \begin_layout Itemize
10687 \begin_layout Itemize
10693 \begin_layout Itemize
10699 \begin_layout Itemize
10705 \begin_layout Itemize
10711 \begin_layout Itemize
10717 \begin_layout Itemize
10723 \begin_layout Itemize
10729 \begin_layout Itemize
10735 \begin_layout Itemize
10746 \begin_layout Standard
10747 The starred versions are unnumbered while the unstarred versions are numbered.
10748 There are also two list environments added by LyX and these are:
10751 \begin_layout Itemize
10757 \begin_layout Itemize
10763 \begin_layout Standard
10768 provides some powerful header and footer capabilities that are best set
10769 in the preamble although they may be set at any point in a document.
10770 If you want to change these settings in your document the best place to
10771 do so is at the very top of a foil, i.
10772 \begin_inset space \thinspace{}
10778 \begin_inset space \space{}
10783 straight after the foilhead.
10786 \begin_layout Standard
10787 For this purpose, the following command styles are provided [
10794 \begin_layout Standard
10795 \begin_inset Flex Multiple Columns
10798 \begin_layout Itemize
10802 \begin_inset space ~
10808 \begin_layout Itemize
10814 \begin_layout Itemize
10818 \begin_inset space ~
10824 \begin_layout Itemize
10828 \begin_inset space ~
10834 \begin_layout Itemize
10838 \begin_inset space ~
10845 \begin_layout Plain Layout
10846 \begin_inset space ~
10858 \begin_layout Standard
10859 There are also a few commands provided by
10863 that aren't directly supported by LyX but I'll tell you what they do and
10864 how to use them in section
10865 \begin_inset space ~
10869 \begin_inset CommandInset ref
10871 reference "sec:unsuppfoils"
10878 \begin_layout Subsection
10879 Building a Set of Foils
10882 \begin_layout Standard
10883 This section will give a simple introduction to using the different environments
10884 to build a set of foils.
10885 If you want to see an example set of foils, take a look at the
10889 file you find in LyX's
10896 \begin_layout Subsubsection
10897 Give It a Title Page
10900 \begin_layout Standard
10901 Unlike other classes that provide
10921 creates the title on a page of its own.
10922 If you leave out the
10926 environment LaTeX will substitute the current date (every time you regenerate
10930 \begin_layout Subsubsection
10934 \begin_layout Standard
10935 As I mentioned earlier, there are four ways of starting a new foil.
10936 For portrait foils you should use
10945 The difference between these two environments is the amount of space between
10946 the title of the foil (the foilhead) and the body of the foil.
10949 \begin_layout Standard
10950 Landscape foils are generated using the
10956 ShortRotatefoilhead
10959 Again the only difference is the spacing between foilhead and body.
10960 Both of the short versions have 0.5
10961 \begin_inset space ~
10964 inches less separation between the foilhead and the body.
10968 \begin_layout Standard
10969 One problem with the support for landscape foils is the requirement that
10970 you have to use the
10974 driver to generate the PostScript output otherwise the foils won't be rotated.
10975 It is possible to get landscape foils even if you haven't got the
10979 driver provided you can feed your foils sideways through your printer ;-)
10982 \begin_layout Subsubsection
10983 Theorems, Lemmas, Proofs and more
10986 \begin_layout Standard
10987 Due to a small bug in LyX you can't have two of the same type of these environme
10988 nts directly following each other.
10989 They must be separated by something.
10990 If you try, you will just be extending the previous environment as if you
10991 had merged the two environments together.
10992 So, how do you get around this problem? The simplest option is to insert
10993 some text between the two environments or add a
10997 environment between the two with just a
10998 \begin_inset Quotes eld
11006 \begin_inset Quotes erd
11010 This will force LyX to produce two separate environments and hence the
11011 correct LaTeX output.
11012 An example is provided in the example file included with the LyX distribution.
11013 Remember, this problem only occurs if you are trying to place two of the
11014 same type of theorem-like environments one directly after the other.
11017 \begin_layout Subsubsection
11021 \begin_layout Standard
11022 You get all the commonly supported list styles found in other classes as
11023 well as two new ones.
11024 I'll only describe the new ones here.
11025 If you want to find out more about the other list environments check out
11031 If you intend to use itemized lists you might also want to read about the
11035 \begin_inset space ~
11039 \begin_inset space ~
11044 dialog described above in section
11045 \begin_inset space ~
11049 \begin_inset CommandInset ref
11051 reference "sec:bullet"
11058 \begin_layout Standard
11059 The two new list styles,
11067 , are designed to make it easier for you to create lists of do's and don'ts
11068 or right and wrong by providing dedicated environments that use a tick
11069 or a cross as the label of the list.
11070 These lists are in fact dedicated variants of the
11075 They do however require that you have the
11079 packages installed.
11082 \begin_layout Subsubsection
11086 \begin_layout Standard
11091 redefines the floating tables and figures so that they appear exactly where
11092 they are in the text rather than pushing them to the top of the page or
11093 to some user specified location.
11094 In fact if you change the float placement settings they are simply ignored.
11097 \begin_layout Subsubsection
11098 Page Headers and Footers
11099 \begin_inset CommandInset label
11101 name "sec:foilfoot"
11108 \begin_layout Standard
11112 \begin_inset space ~
11121 are two commands used to control the left-footer text string.
11122 The first is meant to allow you to include a graphic logo on your foils
11124 \begin_inset Quotes eld
11132 \begin_inset Quotes erd
11136 While the second is meant to provide a classification for the audience,
11140 \begin_inset space \thinspace{}
11146 \begin_inset space \space{}
11150 It is empty by default.
11153 \begin_layout Standard
11154 The remaining page corners can be filled by
11157 \begin_inset space ~
11162 (which defaults to page numbers),
11165 \begin_inset space ~
11173 \begin_inset space ~
11181 \begin_layout Subsection
11187 \begin_inset CommandInset label
11189 name "sec:unsuppfoils"
11196 \begin_layout Standard
11197 All the commands mentioned below need to be set in a
11205 within another environment.
11208 \begin_layout Subsubsection
11212 \begin_layout Standard
11213 All lengths are adjusted using the
11236 should be replaced by the name given to the length you want to change and
11241 is the length value.
11242 All lengths should be specified in units of length such as inches (
11254 ) or relative to some document or font-based length such as
11264 \begin_layout Standard
11265 It's possible to change the spacing between a foilhead and the body of the
11266 foil by adjusting the length specified by
11273 For example, to make
11278 \begin_inset space \space{}
11281 in closer to their bodies put the following in the preamble:
11287 foilheadskip}{-0.5in}
11290 \begin_layout Standard
11291 The spacings around floats can be adjusted by setting these lengths:
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11302 Separation between the text and the top of the float
11305 \begin_layout Labeling
11306 \labelwidthstring MMMMMMMMMMM
11313 Separation between the float and the caption
11316 \begin_layout Labeling
11317 \labelwidthstring MMMMMMMMMMM
11324 Separation between the caption and the following text
11327 \begin_layout Labeling
11328 \labelwidthstring MMMMMMMMMMM
11335 You can make the captions narrower than the surrounding text by adjusting
11337 Best done relative to
11346 \begin_layout Standard
11347 There are also several title page related lengths that you may find useful
11348 if you have a long title or several authors:
11351 \begin_layout Labeling
11352 \labelwidthstring MMMMMMMMMMM
11359 Separation from headers to
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11383 \begin_layout Labeling
11384 \labelwidthstring MMMMMMMMMMM
11398 \begin_layout Labeling
11399 \labelwidthstring MMMMMMMMMMM
11415 \begin_layout Labeling
11416 \labelwidthstring MMMMMMMMMMM
11432 \begin_layout Standard
11433 The last length related command affects all the list environments.
11444 a list environment then all the vertical spacing between the list items
11446 Note that this is a command not a length so it doesn't require
11452 like the stuff mentioned above.
11455 \begin_layout Subsubsection
11456 Headers and Footers
11459 \begin_layout Standard
11472 commands control whether the logo in the
11476 definition appear on a given page.
11483 in the preamble then none of the foils will have the logo on them.
11484 If you don't want the logo on a particular page place the
11490 directly after the foilhead of that page and the
11496 directly after the next foilhead.
11499 \begin_layout Standard
11500 If you decide to use the
11504 page style setting in the
11507 \begin_inset space ~
11512 dialog you should probably add
11522 to your preamble so headers and footers on landscape pages are correctly
11523 placed when rotated.
11524 This is due to some clashes between the page layouts provided by the
11535 \begin_layout Section
11536 Hollywood (Hollywood spec scripts)
11539 \begin_layout Standard
11545 \begin_layout Subsection
11549 \begin_layout Standard
11550 Getting the format of a Hollywood script right is a
11551 \begin_inset Quotes eld
11555 \begin_inset Quotes erd
11558 It is designed to make the readers focus on content and to be easy and
11559 familiar for the actors to read.
11560 Each page of a script should be one minute of film.
11561 Nothing goes in a script that you cannot see or hear on screen.
11562 The courier 12 pt font should be used throughout.
11566 \begin_layout Subsection
11570 \begin_layout Standard
11571 Speakers' lines should NEVER break in mid-sentence.
11572 If a speaker's lines continue over a page break, repeat the
11576 title followed by (Cont'd).
11579 \begin_layout Subsection
11583 \begin_layout Standard
11588 names as labels then cross-reference the label to insert the name.
11589 The cross-reference dialog will show the current cast of characters.
11590 You can use this to insert the speaker name in narratives also.
11593 \begin_layout Subsection
11594 Paper size and Margins
11597 \begin_layout Standard
11598 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11601 \begin_layout Subsection
11605 \begin_layout Standard
11606 The following environments are available.
11607 You can use hollywood.bind to get the bind keys shown at the right.
11610 \begin_layout Itemize
11614 \begin_inset Newline newline
11619 Used where nothing else works.
11623 \begin_layout Itemize
11629 \begin_inset space \hfill{}
11637 \begin_inset Newline newline
11640 Usually followed by something like
11641 \begin_inset Quotes eld
11644 on Sally waking up.
11645 \begin_inset Quotes erd
11651 \begin_layout Itemize
11655 \begin_inset space \hfill{}
11659 \begin_inset Newline newline
11664 Introduces a new INTERIOR camera set-up.
11665 Always followed by DAY or NIGHT, or something similar to define the lighting
11667 Everthing on this line in CAPS.
11670 \begin_layout Itemize
11674 \begin_inset space \hfill{}
11678 \begin_inset Newline newline
11683 Introduces a new EXTERIOR camera set-up.
11684 Everthing on this line in CAPS.
11687 \begin_layout Itemize
11691 \begin_inset space \hfill{}
11695 \begin_inset Newline newline
11700 The character speaking.
11703 \begin_layout Itemize
11707 \begin_inset space \hfill{}
11711 \begin_inset Newline newline
11716 Instructions to the speaker.
11717 The () are automatically inserted, but only the ( will show in LyX.
11718 Both will be printed.
11721 \begin_layout Itemize
11725 \begin_inset space \hfill{}
11729 \begin_inset Newline newline
11741 \begin_layout Itemize
11745 \begin_inset space \hfill{}
11749 \begin_inset Newline newline
11754 Camera movement instruction.
11756 \begin_inset space \thinspace{}
11760 \begin_inset space \space{}
11766 \begin_layout Itemize
11770 \begin_inset space \hfill{}
11776 \begin_layout Itemize
11780 \begin_inset space \hfill{}
11786 \begin_layout Itemize
11790 \begin_inset space \hfill{}
11796 \begin_layout Itemize
11800 \begin_inset space \hfill{}
11806 \begin_layout Subsection
11810 \begin_layout Itemize
11814 \begin_layout Itemize
11818 \begin_layout Itemize
11820 \begin_inset space \thinspace{}
11827 \begin_layout Itemize
11832 \begin_layout Itemize
11833 PAN — camera movement
11836 \begin_layout Itemize
11837 INSERT — cut to close-up of
11840 \begin_layout Section
11844 \begin_layout Standard
11847 Panayotis Papasotiriou
11850 \begin_layout Subsection
11854 \begin_layout Standard
11855 The ijmpc package is a set of macros that facilitates electronic manuscript
11858 International Journal of Modern Physics C
11861 Similarly, the ijmpd package is for creating manuscripts to be submitted
11864 International Journal of Modern Physics D
11867 Both journals are published by World Scientific.
11868 The corresponding document classes are named
11877 These files, together with instructions for the authors, can be downloaded
11879 \begin_inset Flex URL
11882 \begin_layout Plain Layout
11884 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11890 \begin_inset Flex URL
11893 \begin_layout Plain Layout
11895 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11901 Both packages are modified versions of the standard
11902 \begin_inset Quotes eld
11906 \begin_inset Quotes erd
11909 package, and they are almost (but not exactly) identical.
11910 Most of their features are supported by LyX.
11911 I have used LyX successfully to write articles submitted to both journals
11912 without any problem.
11915 \begin_layout Subsection
11919 \begin_layout Standard
11920 As usual, the easiest way to write a paper is to start with a template.
11923 File\SpecialChar \menuseparator
11942 This will give an (almost) empty document that includes the most common
11943 fields found in a manuscript.
11944 Simply overwrite the existing text (including the brackets,
11949 You should keep in mind the following remarks.
11952 \begin_layout Enumerate
11953 LyX won't let you change the font size and the page style of the document,
11954 because such modifications are not allowed by both packages.
11957 \begin_layout Enumerate
11958 The language of the document should not be changed.
11959 Before previewing your paper, be sure that the babel package is not used.
11960 To do this, click on
11962 Tools\SpecialChar \menuseparator
11973 checkbox in the language settings, and click on
11981 , if you wish to make this change permanent).
11984 \begin_layout Enumerate
11986 \begin_inset Quotes eld
11990 \begin_inset Quotes erd
11993 style must be used to define keywords.
11996 \begin_layout Enumerate
11997 The ijmpc package provides a style named
11998 \begin_inset Quotes eld
12001 Classification Codes
12002 \begin_inset Quotes erd
12005 , which can be used to define classification codes, such as PACS numbers.
12006 Note that this facility is not supported by the ijmpd package.
12009 \begin_layout Enumerate
12010 Several new environments are available:
12011 \begin_inset Quotes eld
12015 \begin_inset Quotes erd
12019 \begin_inset Quotes eld
12023 \begin_inset Quotes erd
12027 \begin_inset Quotes eld
12031 \begin_inset Quotes erd
12035 \begin_inset Quotes eld
12039 \begin_inset Quotes erd
12043 \begin_inset Quotes eld
12047 \begin_inset Quotes erd
12051 \begin_inset Quotes eld
12055 \begin_inset Quotes erd
12059 \begin_inset Quotes eld
12063 \begin_inset Quotes erd
12067 \begin_inset Quotes eld
12071 \begin_inset Quotes erd
12075 \begin_inset Quotes eld
12079 \begin_inset Quotes erd
12083 \begin_inset Quotes eld
12087 \begin_inset Quotes erd
12091 \begin_inset Quotes eld
12095 \begin_inset Quotes erd
12099 \begin_inset Quotes eld
12103 \begin_inset Quotes erd
12107 \begin_inset Quotes eld
12111 \begin_inset Quotes erd
12115 \begin_inset Quotes eld
12119 \begin_inset Quotes erd
12123 Their use is more or less obvious.
12124 LyX supports all these environments; it will use the proper label, text
12125 style, and numbering scheme for each of them.
12128 \begin_layout Enumerate
12129 Both packages use basic citations; the natbib package should not be used.
12130 In LyX, citation references are shown as usual; in the output, citations
12131 are shown as superscripts.
12132 If you want to use a citation as normal text, you should use the
12137 \begin_inset space \thinspace{}
12141 \begin_inset space \space{}
12145 \begin_inset Quotes eld
12149 \begin_inset space \space{}
12159 \begin_inset Quotes erd
12165 \begin_layout Enumerate
12167 \begin_inset Quotes eld
12171 \begin_inset Quotes erd
12174 section in both packages.
12175 To put acknowledgments, just use the
12176 \begin_inset Quotes eld
12180 \begin_inset Quotes erd
12186 \begin_layout Enumerate
12187 Appendices may be added to the paper,
12191 the Acknowledgments and
12196 LyX provides a special environment, called
12197 \begin_inset Quotes eld
12201 \begin_inset Quotes erd
12204 which marks the beginning of the appendices.
12205 This environment should be left blank; it just sends a LaTeX command, but
12206 nothing is really printed.
12208 \begin_inset Quotes eld
12212 \begin_inset Quotes erd
12215 is printed with blue letters, as a signal that all sections after that
12216 point are appendices.
12217 To write an appendix, use the
12218 \begin_inset Quotes eld
12222 \begin_inset Quotes erd
12226 LyX will number each appendix with capital letters, as required by both
12229 \begin_inset Quotes eld
12233 \begin_inset Quotes erd
12240 be present before the first appendix; if not, all appendices will be numbered
12241 as normal sections in the output.
12244 \begin_layout Enumerate
12245 The ijmpc and the ijmpd packages use the
12249 command to implement table captions.
12250 As a result, a table created by LyX is printed correctly, but its caption
12252 However, you can use some TeX code to overcome this problem, so that captions
12253 are printed as expected.
12254 To do so, create a float table as usual, remove the caption, and replace
12255 it with the TeX code
12265 (sic); you must also the TeX code
12269 immediately after the tabular material.
12270 Study the example table included in the template files to see how this
12271 trick is implemented.
12272 Alternatively, If you need table captions, you should implement the whole
12277 file, then include this file to the LyX document (
12279 Insert\SpecialChar \menuseparator
12280 File\SpecialChar \menuseparator
12282 \begin_inset space ~
12288 Details on how to create a table float can be found in the files
12296 , included in the corresponding packages.
12299 \begin_layout Subsection
12300 Preparing a paper for submission
12303 \begin_layout Standard
12304 Before you submit your paper you must export the LyX document as a LaTeX
12307 File\SpecialChar \menuseparator
12308 Export\SpecialChar \menuseparator
12315 \begin_layout Plain Layout
12316 Actually you have the choice between LaTeX (plain) and pdflatex.
12317 If you intend to use pdflatex to prepare the paper, you should use the
12318 pdflatex option so that included graphics are converted to PDF format,
12319 ready for use by pdflatex.
12324 , then make the following changes to the resulting
12331 \begin_layout Enumerate
12332 Remove the comment lines before the
12341 \begin_layout Enumerate
12342 Remove everything between (and including) the
12354 commands, except for any commands you specifically put into the LaTeX preamble.
12357 \begin_layout Standard
12362 file should be saved and processed through LaTeX as many times as necessary.
12363 You may also want to check the resulting
12370 \begin_layout Subsection
12374 \begin_layout Standard
12375 The use of TeX code is reduced to two commands, which must be placed at
12376 the top of the document.
12377 If you started writing your paper by using the
12385 template, the TeX code needed is already in its place; you usually don't
12387 You may only modify the first TeX code to specify the information printed
12388 to the top of odd and even pages (authors' names and short paper's title,
12390 This TeX code must have the form
12394 markboth{Authors' Names}{Short Paper's Title}
12399 \begin_layout Section
12403 \begin_layout Standard
12409 \begin_layout Subsection
12413 \begin_layout Standard
12414 The iopart package provides a document class to create electronic manuscript
12415 submission to the journals published by the Institute of Physics.
12416 Instructions for the authors how to create a paper using the iopart class
12417 can be downloaded together with the iopart package from the site
12418 \begin_inset Flex URL
12421 \begin_layout Plain Layout
12423 ftp://ftp.iop.org/pub/journals/latex2e
12431 \begin_layout Subsection
12435 \begin_layout Standard
12436 The easiest way to write a paper is to start with the file
12440 that is available in LyX's examples files folder.
12441 Open this file, save it under a new name, and start writing.
12442 The example file explains how to use the special text environments.
12443 Here are the most important advices:
12446 \begin_layout Itemize
12447 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12450 Use AMS math package
12452 in the document settings under
12459 \begin_layout Itemize
12462 The title environment defines the kind of your paper.
12463 So use one of the following environments for the title:
12467 \begin_layout Itemize
12476 \begin_layout Itemize
12485 \begin_layout Itemize
12491 for a Topical review
12494 \begin_layout Itemize
12503 \begin_layout Itemize
12512 \begin_layout Itemize
12518 for a Paper (same as Title)
12521 \begin_layout Itemize
12527 for a Preliminary communication
12530 \begin_layout Itemize
12536 for a Rapid communication
12539 \begin_layout Itemize
12545 for a Letter to the editor
12549 \begin_layout Itemize
12552 All title environments except of
12556 can have an optional short title.
12559 \begin_layout Itemize
12560 There is a general title environment
12564 which is not directly supported by the LyX.
12565 This can be used as TeX code when your document doesn't fit into one of
12566 the other title types.
12569 \begin_layout Standard
12570 For more informations like hints for special table and formula formatting,
12571 look at the IOP author guidelines.
12574 \begin_layout Section
12578 \begin_layout Standard
12581 Panayotis Papasotiriou
12584 \begin_layout Subsection
12588 \begin_layout Standard
12589 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12590 that facilitates electronic manuscript submission to the journals they
12592 Most known of them (at least in my domain of interest) are
12594 Astrophysics and Space Science
12600 , but there are many others (see a complete list at
12601 \begin_inset Flex URL
12604 \begin_layout Plain Layout
12606 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12612 The Kluwer package may be downloaded from the site
12613 \begin_inset Flex URL
12616 \begin_layout Plain Layout
12618 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12624 A complete user guide is contained in that package (but it can also be
12625 downloaded separately).
12628 \begin_layout Standard
12629 LyX supports many features of the package but not everything.
12630 However, the TeX code needed is reduced to some
12631 \begin_inset Quotes eld
12635 \begin_inset Quotes erd
12638 commands of the package (see
12639 \begin_inset space ~
12643 \begin_inset CommandInset ref
12645 reference "subsec:kluwer_peculiarities"
12650 I have recently used LyX to write an article submitted to the
12652 Astrophysics and Space Science
12654 without any problem.
12657 \begin_layout Subsection
12661 \begin_layout Standard
12662 The easiest way to write a paper is to start with the Kluwer template file.
12665 File\SpecialChar \menuseparator
12677 This will give an (almost) empty document that includes the most common
12678 fields found in a manuscript and a short description of their use.
12679 As in most templates, simply overwrite the existing text (including the
12684 ) with the correct information.
12687 \begin_layout Subsection
12688 Preparing a paper for submission
12691 \begin_layout Standard
12692 As in the AASTeX package, before you submit your paper to a journal you
12694 \begin_inset Quotes eld
12698 \begin_inset Quotes erd
12704 \begin_layout Enumerate
12705 Export your paper as a LaTeX file.
12706 To do this, click on
12708 File\SpecialChar \menuseparator
12709 Export\SpecialChar \menuseparator
12716 \begin_layout Enumerate
12721 file with a text editor and make the following changes
12725 \begin_layout Enumerate
12726 remove the comment lines before the
12735 \begin_layout Enumerate
12736 remove everything between (and including) the
12748 commands, except for any commands you specifically put into the LaTeX preamble.
12751 \begin_layout Standard
12760 \begin_layout Enumerate
12765 file through LaTeX as many times as necessary (usually up to three).
12768 \begin_layout Enumerate
12774 \begin_inset space \thinspace{}
12778 \begin_inset space \space{}
12785 , and check if everything is OK (it should, if you didn't make any mistake).
12788 \begin_layout Subsection
12789 \begin_inset Quotes eld
12793 \begin_inset Quotes erd
12796 of the Kluwer package
12797 \begin_inset CommandInset label
12799 name "subsec:kluwer_peculiarities"
12806 \begin_layout Standard
12807 The Kluwer package has the following
12808 \begin_inset Quotes eld
12812 \begin_inset Quotes erd
12818 \begin_layout Enumerate
12819 It is possible to write multiple articles in the same LaTeX file
12823 \begin_layout Plain Layout
12824 I can't imagine any good reason to do this.
12830 Each article must be included in the environment
12831 \begin_inset Quotes eld
12835 \begin_inset Quotes erd
12839 Unfortunately, this environment cannot be omitted, even if you write just
12841 Therefore, each article starts with the command
12847 and, obviously, ends with the command
12854 Although this can be implemented in LyX, I didn't included it, since it
12855 looks ugly and can confuse the novice user.
12856 Therefore, you need to enter them directly and mark them as LaTeX code
12858 \begin_inset Quotes eld
12862 \begin_inset Quotes erd
12868 \begin_layout Enumerate
12869 Information given at the beginning of the article (i.
12870 \begin_inset space \thinspace{}
12874 \begin_inset space \space{}
12877 title, subtitle, author, institution, running title, running author, abstract
12878 and keywords) must be included in an environment called
12879 \begin_inset Quotes eld
12883 \begin_inset Quotes erd
12887 This is not implemented in LyX, so you must enter title, subtitle etc.
12888 \begin_inset space ~
12891 between two TeX code lines (
12906 \begin_layout Enumerate
12907 According to the user manual, the label of each bibliography item must be
12931 \begin_layout Standard
12936 template takes care of all these
12937 \begin_inset Quotes eld
12941 \begin_inset Quotes erd
12945 If you start a new paper using this template you don't need to do anything
12950 \begin_layout Enumerate
12951 don't delete the TeX code included in the template, and
12954 \begin_layout Enumerate
12955 copy the example bibliography item included in the template and modify it
12956 as necessary to enter new bibliography items.
12959 \begin_layout Section
12963 \begin_layout Standard
12969 \begin_layout Subsection
12973 \begin_layout Standard
12974 The LyX document classes
12976 article (koma-script)
12980 report (koma-script)
12998 correspond to the LaTeX document classes
13015 \begin_inset space ~
13018 of the Koma-Script family.
13019 They are replacements for the standard document classes
13035 , resp., and fit better to European typography conventions in a number of
13039 \begin_layout Itemize
13040 Standard character size is 11pt in
13042 article (koma-script)
13046 report (koma-script)
13054 letter (koma-script)
13059 \begin_layout Itemize
13060 Headings, labels of the description environment, and a number of elements
13063 letter (koma-script)
13065 document class are set in a bold sans serif font.
13069 \begin_layout Plain Layout
13070 There is a big difference between the bold sans serif old cm fonts and new
13071 ec fonts, especially in the appearance of headings.
13072 In comparison, the ec bold sans serif fonts look a bit thin.
13073 Here the LaTeX package
13081 helps to produce the
13082 \begin_inset Quotes eld
13086 \begin_inset Quotes erd
13089 appearance when using the ec fonts.
13094 The numbering of chapter headings is made in the same way as the numbering
13095 of section headings, that is without the extra line
13096 \begin_inset Quotes eld
13099 Chapter\SpecialChar \ldots{}
13101 \begin_inset Quotes erd
13105 In addition, the appearance of the headings can be modified by using a
13106 number of options (in LyX to be entered in the field
13109 \begin_inset space ~
13116 Layout\SpecialChar \menuseparator
13123 \begin_layout Itemize
13124 The main means in the Koma-Script document classes to design the type area
13133 (in LyX to be entered in the extra class options field in the dialog
13135 Document\SpecialChar \menuseparator
13139 They make a clearer modification of page margins possible as do the options
13142 Document\SpecialChar \menuseparator
13149 \begin_layout Itemize
13150 The LaTeX document classes of the Koma-Script family define a number of
13151 additional commands.
13152 Those part of it which makes sense in LyX is implemented in corresponding
13156 \begin_layout Standard
13157 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13158 can be found in the Koma-Script documentation
13169 \begin_layout Subsection
13170 article (koma-script), report (koma-script), and book (koma-script)
13173 \begin_layout Standard
13174 The document classes
13176 article (koma-script)
13180 report (koma-script)
13190 are implemented in the layout files
13203 They contain all the paragraph types of the corresponding standard document
13216 , resp., partly modified, with the exception of the LyX specific
13220 -type, which is replaced by the new
13224 -type having the same functionality.
13229 -Type there is a number of new paragraph types added.
13236 letter (koma-script)
13241 \begin_layout Itemize
13250 : are equivalents to
13258 , resp., additionally inserting an entry in the table of contents.
13267 are not contained in
13269 article (koma-script)
13274 \begin_layout Itemize
13283 : behave exactly as
13291 , resp., additionally clearing running heads.
13296 is not contained in
13298 article (koma-script)
13304 \begin_layout Plain Layout
13317 report (koma-script)
13319 , but since this is identical to
13323 , is has not been implemented in LyX.
13331 \begin_layout Itemize
13336 : generates a heading directly above the following paragraph in the standard
13337 character size without affecting the structure of the document.
13340 \begin_layout Itemize
13349 are special captions which respect the different space settings needed
13350 for captions placed above or below an element (if you follow strict typographic
13351 rules, you might want to place table captions always above the table).
13352 You can also use the class option
13356 , which will switch
13369 You need at least Koma-Script version 2.8q to use this.
13372 \begin_layout Itemize
13377 : can be used to set a bonmot, e.
13378 \begin_inset space \thinspace{}
13382 \begin_inset space \space{}
13385 at the beginning of a chapter.
13386 If you use the optional argument (
13388 Insert\SpecialChar \menuseparator
13390 \begin_inset space ~
13395 ), you can insert the dictum's author there.
13396 Dictum and author are separated by a line.
13397 You need at least Koma-Script version 2.8q to use this.
13402 is not contained in
13404 article (koma-script)
13409 \begin_layout Standard
13410 The following types, together with the standard types
13422 , form the title area of the document.
13423 They must be entered ahead of the first
13424 \begin_inset Quotes eld
13428 \begin_inset Quotes erd
13435 \begin_layout Plain Layout
13436 The corresponding LaTeX commands must appear before the
13447 When such a type is used more than once, the latter usage overwrites the
13448 former one, that means, for every type only the latest usage is valid.
13449 The order of the different types however has, like
13461 , no effect on the appearance of the produced document.
13464 \begin_layout Itemize
13469 : produces a centered paragraph above the ordinary title (
13481 ) for the subject of the document.
13484 \begin_layout Itemize
13489 : produces a centered paragraph below the ordinary title (
13501 ) for the publishers' name.
13504 \begin_layout Itemize
13511 report (koma-script)
13517 produces a centered paragraph on its own page behind the title page, or
13520 article (koma-script)
13522 produces a centered paragraph below the ordinary title (
13538 ) for a dedication.
13541 \begin_layout Itemize
13546 : produces a left aligned paragraph above the ordinary title (
13562 ) for a document`s head.
13565 \begin_layout Itemize
13570 : produces in a double-sided print in
13572 report (koma-script)
13578 a left-aligned paragraph at the top of the title page`s back or has no
13579 effect in a single-sided print or in
13581 article (koma-script)
13586 \begin_layout Itemize
13591 : produces in a double-sided print in
13593 report (koma-script)
13599 a left-aligned paragraph at the bottom of the title page`s back or has
13600 no effect in a single-sided print or in
13602 article (koma-script)
13607 \begin_layout Itemize
13612 : produces a special
13613 \begin_inset Quotes eld
13617 \begin_inset Quotes erd
13620 page ahead of the actual document containing a paragraph without special
13624 \begin_layout Standard
13625 The layout files for the document classes
13627 article (koma-script)
13631 report (koma-script)
13637 do include the file
13642 This is thought of as a place to define your own types.
13647 in your personal layout directory and edit the file!
13650 \begin_layout Subsection
13651 letter (koma-script)
13654 \begin_layout Standard
13658 letter (koma-script)
13660 is implemented in the layout file
13665 It contains all the paragraph types of the corresponding standard document
13670 , partly modified, with the exception of the LyX specific types
13682 type, which is replaced by the new
13687 In addition, it contains, in contrast to the standard document class, the
13705 Furthermore, there are a number of new letter specific types.
13708 \begin_layout Standard
13709 The appearance of the letter produced by this document class can be controlled
13710 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13714 \begin_layout Plain Layout
13715 For example, the standard appearance of the letter`s heading, consisting
13716 of name and address, is quite self-willed.
13718 \begin_inset Quotes eld
13722 \begin_inset Quotes erd
13725 heading is produced by the following LaTeX commands in the preamble:
13728 \begin_layout LyX-Code
13738 \begin_layout LyX-Code
13754 \begin_layout LyX-Code
13764 \begin_layout LyX-Code
13784 A detailed German description of such LaTeX commands can be found in the
13785 Koma-Script documentation
13790 With it, the letter's author can produce his personal letter layout.
13793 \begin_layout Standard
13802 define the beginning of the letter and must be used in every letter.
13803 To emphasize them in the LyX document class, they are marked with the letter
13813 \begin_inset space ~
13816 in the left margin.
13817 It is possible to write any number of letters in one file.
13822 type produces a new letter using the same addressee and a
13826 type produces a new addressee.
13843 are ordinary paragraph types and can also be used several times in one
13844 and the same letter.
13847 \begin_layout Itemize
13852 : produces a paragraph for the addressee and implicitly defines the beginning
13856 \begin_layout Itemize
13861 : produces a paragraph for the form of address and implicitly produces a
13865 \begin_layout Itemize
13870 : produces a paragraph for a close.
13873 \begin_layout Itemize
13878 : produces a paragraph for a postscript.
13881 \begin_layout Itemize
13886 : produces a paragraph for a distribution list.
13889 \begin_layout Itemize
13894 : produces a paragraph for enclosures.
13897 \begin_layout Standard
13938 are input types provided with a label to enter information, which will
13939 be processed by the document class.
13943 \begin_layout Plain Layout
13944 It could be seen as a matter of inconsequence, that the types
13952 described above are not such input types as well.
13953 Because of the special meaning of those types, however, I have implemented
13954 them as ordinary paragraph types with a one letter mark in the left margin.
13955 Moreover, it would affect my feeling of symmetry, if the
13963 type had such a serious different appearance.
13968 The types must be used ahead of the corresponding
13975 \begin_layout Standard
13976 An implementation of these types in a WYSIWYG fashion does not seem to make
13977 sense, because the real appearance of the produced letter does not only
13978 depend on the usage of the particular type, but also on other factors.
13979 For example, a signature entered in the
13983 type will in the standard behavior appear in the produced letter only,
13984 when in the same letter also a
13989 The entered value of the
13993 type will in the standard behavior not appear in the produced letter at
13995 The possibility to design the letter`s heading freely is already indicated
13996 in a footnote above.
13999 \begin_layout Standard
14000 The input types can also be used as empty paragraphs.
14001 This makes sense e.
14002 \begin_inset space \thinspace{}
14006 \begin_inset space \space{}
14018 type is not used at all, in the standard behavior the value of the
14022 type is used as signature, whereas if an empty
14026 type is used, no signature value is defined.
14029 \begin_layout Standard
14030 By using the input types it is possible to write a letter template, containing
14031 filled input types with your personal dates (name, address, etc.) and empty
14032 input types for other dates you want to enter.
14035 \begin_layout Itemize
14040 : sender's name, in the standard behavior appears as a centered paragraph
14041 in small caps in the letter`s heading.
14044 \begin_layout Itemize
14049 : sender's signature, in the standard behavior appears below the
14058 type is used, the value of the
14062 type appears instead.
14065 \begin_layout Itemize
14070 : sender's address, in the standard behavior appears in a centered paragraph
14071 in the letter`s heading below the sender's name.
14074 \begin_layout Itemize
14079 : sender's telephone number, in the standard behavior only sets the LaTeX
14089 \begin_layout Itemize
14094 : place of the letter`s making.
14097 \begin_layout Itemize
14102 : date of the letter`s making.
14111 , in the standard behavior, produce the place and the date in a right-aligned
14112 line below the addressee's field.
14117 type is used, neither place nor date appear, independent of the value of
14127 type is used, the date of the letter `s production is used.
14130 \begin_layout Itemize
14135 : sender`s back address, in the standard behavior appears above the addressee's
14136 field in a small sans serif font.
14139 \begin_layout Itemize
14144 : special mail information, in the standard behavior appears underlined
14145 above the addressee's field below the back address.
14148 \begin_layout Itemize
14153 : additional information, in the standard behavior appears on right side
14154 below the addressee`s field.
14157 \begin_layout Itemize
14162 : the letter's title, in the standard behavior appears in a big, bold, sans
14163 serif font above the subject.
14166 \begin_layout Itemize
14171 : the letter's subject, in the standard behavior appears in a bold font
14179 \begin_layout Standard
14200 produce a business letter like line above the
14204 line containing the fields
14205 \begin_inset Quotes eld
14209 \begin_inset Quotes erd
14213 \begin_inset Quotes eld
14217 \begin_inset Quotes erd
14221 \begin_inset Quotes eld
14225 \begin_inset Quotes erd
14229 \begin_inset Quotes eld
14233 \begin_inset Quotes erd
14237 \begin_inset Quotes eld
14241 \begin_inset Quotes erd
14245 \begin_inset Quotes eld
14249 \begin_inset Quotes erd
14253 For the date field, the value of the
14259 \begin_inset Quotes eld
14262 business letter types
14263 \begin_inset Quotes erd
14266 is used, the value of the
14270 type however does not appear, but only the LaTeX variable
14277 The ordinary output of place and date in a right-aligned line below the
14278 addressee`s field is suppressed.
14279 The types are implemented as input types provided with a label and must
14280 be used ahead of the corresponding
14287 \begin_layout Itemize
14295 \begin_layout Itemize
14303 \begin_layout Itemize
14311 \begin_layout Itemize
14319 \begin_layout Itemize
14327 \begin_layout Subsection
14328 The new letter class: letter (koma-script v.2)
14331 \begin_layout Standard
14337 \begin_layout Standard
14338 \begin_inset VSpace medskip
14344 \begin_layout Standard
14346 Koma-Script version 2.8 has introduced a new letter class
14350 which supersedes the now unsupported
14355 It has — on the LaTeX side — a completely new interface and is not compatible
14356 with the old class.
14357 Therefore, LyX supports both, though it is recommended you use the new
14361 \begin_layout Standard
14362 This class covers the same functionality as
14364 letter (koma-script),
14367 The basic items are
14371 (receiver's address, same as
14375 in the old layout),
14388 will start a new letter (i.
14389 \begin_inset space \thinspace{}
14393 \begin_inset space \space{}
14396 you can write several letters per document).
14397 New elements are sender's
14413 and the possibility to use a
14419 Insert\SpecialChar \menuseparator
14425 \begin_layout Standard
14426 The biggest improvement is, though, that the letter's layout is configurable
14427 to meet almost any needs.
14428 This can be done via the preamble or with a special style file (Letter
14429 Class Option, extension
14433 ), that will be read in as a class option.
14437 \begin_layout Plain Layout
14438 The KOMA package comes with some default
14443 There is, for instance, a
14447 file that follows german typesetting rules, or a
14451 that provides the default layout of the old
14456 The latter can be loaded with the class option
14465 ayout\SpecialChar \menuseparator
14470 ocument\SpecialChar \menuseparator
14482 template that is included in LyX for examples.
14483 A detailed description is to be found in the Koma-Script documentation
14491 \begin_layout Subsection
14495 \begin_layout Standard
14496 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14500 \begin_layout Itemize
14501 The chapter number of a
14505 type appears on a line of its own above the chapter heading instead of
14506 appearing in the same line ahead of it.
14507 The cause for that is the LyX internal behavior for the labeltype
14511 in the layout file.
14514 \begin_layout Itemize
14515 The headings of the types
14523 are only put in the
14524 \begin_inset Quotes eld
14528 \begin_inset Quotes erd
14531 LaTeX table of contents, but not in the LyX table of contents (
14533 Document\SpecialChar \menuseparator
14535 \begin_inset space ~
14539 \begin_inset space ~
14547 \begin_layout Itemize
14548 The paragraphs in a
14552 document class appear in a skip separation mode, not indented.
14553 This is the standard behavior, no special LaTeX commands are needed for
14557 Document\SpecialChar \menuseparator
14560 dialog the corresponding radio button indicates
14569 value always has the effect that extra LaTeX commands are inserted in the
14570 document to produce the gap, which is not what is wanted in this case.
14573 \begin_layout Section
14577 \begin_layout Standard
14583 \begin_layout Subsection
14587 \begin_layout Standard
14588 Memoir is a very powerful and constantly evolving class.
14589 It has been designed with regard to fictional and non-fictional literature.
14590 Its aim is to let the user have maximum control over the typesetting of
14592 Memoir is based on the standard book class, but it can also emulate the
14593 article class (see below).
14596 \begin_layout Standard
14597 Peter Wilson, the developer of Memoir, is known as the author of lots of
14598 useful packages in the LaTeX world.
14599 Most of them have been merged with Memoir.
14600 Therefore, it is much easier to layout the table of contents, appendices,
14601 chapter designs and such.
14602 LyX, though, does not support all of these goodies natively.
14603 Some of them might be added to forthcoming releases
14607 \begin_layout Plain Layout
14608 You are invited to send suggestions to
14609 \begin_inset Flex URL
14612 \begin_layout Plain Layout
14614 lyx-devel@lists.lyx.org
14624 , lots will probably never be supported, due to the limitations of LyX's
14626 Of course you can still use all features with the help of some native LaTeX
14631 \begin_layout Plain Layout
14636 \begin_layout Plain Layout
14646 \begin_inset space ~
14650 \begin_inset CommandInset ref
14652 reference "sec:Inserting-TeX-Code"
14662 In this section, we can only list those features that are natively supported
14664 For detailed descriptions (and for the rest of features) we recommend you
14665 have a look at the detailed manual of the Memoir class
14669 \begin_layout Plain Layout
14674 \begin_layout Plain Layout
14684 \begin_inset Flex URL
14687 \begin_layout Plain Layout
14689 CTAN:/macros/latex/memoir/memman.pdf
14699 , which is not only a user guide for the class, but also both a comprehensive
14700 description on good typesetting and a superb example for good typesetting
14704 \begin_layout Subsection
14705 Basic features and restrictions
14708 \begin_layout Standard
14709 Memoir supports basically all features of the standard book classes.
14710 There are, however, some differences, as follows:
14713 \begin_layout Description
14715 \begin_inset space ~
14718 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14721 \begin_layout Description
14723 \begin_inset space ~
14726 style: The fancy page style is not supported, due to a command clash between
14727 Memoir and the fancyhdr package (they both define a command with the same
14728 name, which confuses LaTeX).
14729 Instead, Memoir comes with a number of its own page styles (see
14731 Layout\SpecialChar \menuseparator
14732 Document\SpecialChar \menuseparator
14734 \begin_inset space ~
14740 If you want to use these for the chapter pages, you have to use the command
14747 in the main text or in preamble (e.
14748 \begin_inset space \thinspace{}
14752 \begin_inset space \space{}
14759 chapterstyle{companion}
14764 \begin_layout Description
14765 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14766 optional argument in the standard classes.
14767 With this, you can specify an alternative version of the title for the
14768 table of contents and the headers (for instance, if the title is too long).
14769 In LyX, you can do this via
14771 Insert\SpecialChar \menuseparator
14773 \begin_inset space ~
14778 at the beginning of a chapter/section.
14779 Memoir features a second optional argument and thus separates the table
14780 of contents from the header.
14781 You can define three variants of a title with this: one for the main text,
14782 one for the table of contents, and one for the headers.
14783 Simply insert two optional arguments if you need this feature, the first
14784 one containing the short title for the Table of Contents, the second one
14785 containing an alternative short title for the headers.
14788 \begin_layout Description
14789 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14790 of contents, the list of figures and the list of table start a new page
14792 Memoir does not follow this route.
14793 You have to insert a page break yourself, if you want to have one.
14796 \begin_layout Description
14797 Titlepage: For some unknown reason, Memoir uses pagination on the title
14798 page (in the standard classes, title pages are
14799 \begin_inset Quotes eld
14803 \begin_inset Quotes erd
14807 If you want an empty title page, type
14811 aliaspagestyle{title}{empty}
14816 \begin_layout Description
14817 Article: With the class option
14823 Layout\SpecialChar \menuseparator
14824 Document\SpecialChar \menuseparator
14826 \begin_inset space ~
14831 ), you can emulate article style.
14832 That is, counters (footnotes, figures, tables etc.) will not be reset on
14833 new chapters, chapters don't start a new page (but are—in contrary to
14834 \begin_inset Quotes eld
14838 \begin_inset Quotes erd
14841 article classes—still allowed), parts, though, use their own page, as in
14845 \begin_layout Description
14846 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14847 font commands, which have been used in the old LaTeX version 2.09 (e.
14848 \begin_inset space \thinspace{}
14852 \begin_inset space \space{}
14868 It produces an error and stops LaTeX whenever such a command appears.
14873 reallows the commands and spits out warnings instead (which does at least
14875 Since a lot of packages and particularly BibTeX style files are still using
14876 those commands, we have decided to use this option by default.
14879 \begin_layout Subsection
14883 \begin_layout Standard
14884 We will only describe the features supported by LyX (which is not much currently
14886 Please consult the Memoir manual
14890 \begin_layout Plain Layout
14895 \begin_layout Plain Layout
14905 \begin_inset Flex URL
14908 \begin_layout Plain Layout
14910 CTAN:/macros/latex/memoir/memman.pdf
14923 \begin_layout Description
14924 Abstract: You may wonder why an abstract is an extra feature.
14925 Well, it is in book class.
14926 Usually books don't have abstracts.
14927 Memoir, however, has.
14928 You can use it wherever and how often you like.
14931 \begin_layout Description
14932 Chapterprecis: You may know this older typesetting style: The contents of
14933 a chapter are summarized below the title and also in the table of contents
14935 \begin_inset space \thinspace{}
14939 \begin_inset space \space{}
14944 Our hero arrives in Troia; he loses some friends; he finds others
14947 Chapterprecis does exactly this.
14948 It is therefore only sensible below a chapter.
14951 \begin_layout Description
14952 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14953 The epigraph environment provides an elegant way of typesetting such a
14955 The motto itself (text) and its author (source) are divided by a short
14957 Unfortunately, we have to fool LyX a bit here again, since the environment
14958 needs two arguments (text and source).
14959 In this case, we have to use curly brackets (in TeX mode) between the two
14970 <author of the slogan>.
14973 \begin_layout Description
14974 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14975 complex figurative poems).
14976 LyX can only support a few of them.
14977 One is poemtitle, which is a centered title for poems, which will also
14978 be added to the table of contents (verse is the standard environment for
14980 Memoir has some enhanced versions of verse, but you need to use TeX code,
14981 because they have to be nested inside regular verse environments, which
14982 is not possible with LyX).
14985 \begin_layout Description
14986 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14989 \begin_layout Section
14990 Article (mwart), book (mwbk) and report (mwrep)
14991 \begin_inset Argument status
14994 \begin_layout Plain Layout
15007 \begin_layout Standard
15013 \begin_layout Standard
15014 The LyX document classes
15030 correspond to the LaTeX document classes
15043 They are replacements for the standard document classes
15055 , resp., and fit better to Polish typography conventions in a number of points.
15059 \begin_layout Standard
15063 \begin_layout Itemize
15064 Unnumbered titles (with star, e.
15065 \begin_inset space \thinspace{}
15069 \begin_inset space \space{}
15076 ) are added into table of contents,
15079 \begin_layout Itemize
15080 Additional page styles:
15084 \begin_layout Description
15085 uheadings header with separated lines,
15088 \begin_layout Description
15089 myheadings custom header, contents headers via commands:
15104 \begin_layout Description
15105 myuheadings custom header with separated lines,
15108 \begin_layout Description
15109 outer page number is placed on outer side of page
15113 \begin_layout Itemize
15118 \begin_layout Description
15119 rmheadings serif titles — default,
15122 \begin_layout Description
15123 sfheadings sansserif titles,
15126 \begin_layout Description
15127 authortitle on title page first placed is author next title — default,
15130 \begin_layout Description
15131 titleauthor on title page first placed is title next author,
15134 \begin_layout Description
15135 withmarginpar reserve place on page for margins.
15139 \begin_layout Section
15143 \begin_layout Standard
15148 provides an alternative to the standard
15153 It provides similar functionality, but you might prefer this layout with
15154 sans serif sections, headings, and more.
15157 \begin_layout Section
15161 \begin_layout Standard
15167 \begin_layout Standard
15168 \begin_inset VSpace bigskip
15174 \begin_layout Standard
15179 \begin_inset space ~
15184 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15185 \begin_inset Formula $\beta$
15188 release of May, 1999) class.
15191 \begin_layout Standard
15196 textclass, which works with RevTeX 3.1.
15197 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15198 That means that it doesn't interact very well with LyX, which requires
15199 LaTeX2e, although it has been kludged to work.
15200 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15204 \begin_inset space ~
15209 textclass should also be pretty easy to use.
15212 \begin_layout Standard
15213 These documents are supposed to be used in
15217 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15218 macros, and assume you'll know what to put in the preamble if necessary.
15221 \begin_layout Subsection
15225 \begin_layout Standard
15226 All you need to do is install RevTeX 4, as described in the package's README
15228 The package can be found at The RevTeX 4 Web Site
15229 \begin_inset Flex URL
15232 \begin_layout Plain Layout
15234 http://publish.aps.org/revtex4/
15240 Install it somewhere that LaTeX can see it.
15241 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15243 \begin_inset space \thinspace{}
15247 \begin_inset space \space{}
15250 not the directory where you installed the class file.) Then, if you reconfigure
15251 LyX, it will find the class file and let you use the RevTeX4 textclass.
15254 \begin_layout Standard
15255 Probably the easiest way to get started is either to import a RevTeX 4 document
15263 \begin_inset space ~
15268 template, found in the templates directory.
15271 \begin_layout Subsection
15275 \begin_layout Standard
15276 Optional arguments to
15283 \begin_inset Quotes eld
15287 \begin_inset Quotes erd
15291 \begin_inset Quotes eld
15295 \begin_inset Quotes erd
15305 \begin_inset space ~
15313 \begin_inset space ~
15319 Remember that in RevTeX, at least one optional argument is required!
15322 \begin_layout Standard
15323 Other preamble matter, like
15330 \begin_inset space ~
15336 \begin_inset space ~
15341 dialog, also as usual.
15344 \begin_layout Subsection
15348 \begin_layout Standard
15349 The layouts basically correspond to the commands in RevTeX4.0.
15350 For example, the Email layout corresponds to
15357 Note that (at least as of RevTeX 4.0 Beta), the
15365 layouts are exactly equivalent, so you shouldn't need to use both.
15369 \begin_layout Plain Layout
15370 In case you're curious, both were included so that
15374 would be able to translate both
15394 \begin_layout Subsection
15398 \begin_layout Standard
15399 There are a couple of important unique aspects of RevTeX 4 which might cause
15400 bugs that will be even more confusing in LyX.
15403 \begin_layout Standard
15421 The LyX equivalent is that there is a separate Thanks layout.
15426 write footnotes in the
15430 layout, or weird things may happen.
15431 See the RevTeX 4 documentation for more details.
15434 \begin_layout Standard
15438 \begin_inset space ~
15446 \begin_inset space ~
15455 layouts must be placed
15463 layout and the corresponding
15480 , the LaTeX won't compile.
15483 \begin_layout Subsection
15487 \begin_layout Standard
15488 The main problem with this layout is that you can't use the optional arguments
15489 to layouts like Email and Title.
15490 (The problem is not unique to this layout; you can't use optional arguments
15491 to the Section layouts either.) This means that after you export that file
15492 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15493 need to edit the LaTeX file with a text editor to add the optional arguments
15495 \begin_inset space \thinspace{}
15499 \begin_inset space \space{}
15502 the running title for the page headers.
15503 Lacking these layouts makes the
15509 (and the equivalent
15515 ) useless, so the corresponding layouts don't exist, and will have to be
15520 \begin_layout Plain Layout
15525 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15526 has not been updated yet to take advantage of it.
15534 \begin_layout Section
15535 Springer Journals (
15542 \begin_layout Standard
15548 \begin_layout Subsection
15552 \begin_layout Standard
15553 These are the layout files for some of the journal formats used by Springer
15554 Verlag and listed on
15555 \begin_inset Flex URL
15558 \begin_layout Plain Layout
15560 http://www.springer.de/author/tex/help-journals.html
15565 , where you should also go to fetch the class files (yes, these are LaTeX2e
15567 It is a modular system: the things common to all journals are implemented
15572 , which journal-specific layout files (such as, e.
15573 \begin_inset space \thinspace{}
15577 \begin_inset space \space{}
15584 for Journal of Geodesy) can include.
15587 \begin_layout Standard
15588 This means that implementing support for any other Springer journal on this
15589 list is as simple as writing your own
15597 file following the outline given in
15605 \begin_layout Standard
15606 It is reasonably well tested only for the Journal of Geodesy.
15615 come with the standard LyX distribution.
15616 Install the relevant class file (downloaded from Springer) in a proper
15617 directory, reconfigure LaTeX (in the teTeX case by running
15621 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15622 and it should work.
15625 \begin_layout Subsection
15629 \begin_layout Standard
15630 A large number of theorem-like styles —
15636 \SpecialChar \ldots{}
15642 \begin_layout Standard
15645 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15646 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15649 See the Springer class file documentation for details.
15652 \begin_layout Subsection
15656 \begin_layout Itemize
15668 \begin_layout Itemize
15671 Probability Theory and Related Fields
15677 — Jean-Marc Lasgouttes
15680 \begin_layout Standard
15681 Add your own, it isn't so hard!
15684 \begin_layout Subsection
15688 \begin_layout Standard
15689 These files are partly based on the older
15693 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15694 file from Springer.
15699 layout, are now defunct.
15700 Jean-Marc Lasgouttes helped out big in making me find my way around the
15701 LyX layout file mechanism.
15704 \begin_layout Subsection
15708 \begin_layout Standard
15710 But probably less than in the old hacked-LaTeX
15717 \begin_layout Standard
15719 \begin_inset space \thinspace{}
15722 g.: does not display the number for theorem-like layouts, just #.
15725 \begin_layout Section
15731 \begin_inset CommandInset label
15740 \begin_layout Standard
15748 \begin_layout Subsection
15752 \begin_layout Standard
15753 This section describes how to use LyX to make slides for overhead projectors.
15754 There are two document classes that can do this: the default slides class
15760 This section documents the former.
15763 \begin_layout Standard
15764 I'm going to say this again, nice and clear, so that there's no misunderstanding
15768 \begin_layout Standard
15769 \begin_inset VSpace bigskip
15775 \begin_layout Standard
15779 This section documents the class
15780 \begin_inset Quotes eld
15788 \begin_inset Quotes erd
15796 \begin_layout Standard
15797 \begin_inset VSpace bigskip
15803 \begin_layout Standard
15804 If you're looking for the documentation for
15805 \begin_inset Quotes eld
15813 \begin_inset Quotes erd
15816 , check out section
15817 \begin_inset space ~
15821 \begin_inset CommandInset ref
15823 reference "sec:foiltex"
15833 \begin_inset Quotes eld
15841 \begin_inset Quotes erd
15844 ] is actually somewhat better than the default
15852 \begin_layout Plain Layout
15853 \SpecialChar \ldots{}
15854 or so I've been told repeatedly by its advocates.
15855 Having never used it, I have no idea if this claim is true or not.
15860 which this section documents.
15863 \begin_layout Standard
15864 This class is the LaTeX2e improvement of the old
15869 Every LaTeX2e distribution includes this class [which I'll just refer to
15871 \begin_inset Quotes eld
15879 \begin_inset Quotes erd
15882 from now on], so you're bound to have it.
15883 As I noted earlier, there are other classes, such as
15887 , which also produce slides for overhead projectors and do a better job
15889 However, there are some things which
15893 can do which the others can't, such as generate overlays.
15894 Read on to learn more!
15897 \begin_layout Subsection
15899 \begin_inset CommandInset label
15901 name "sec:slidesetup"
15908 \begin_layout Standard
15909 Obviously, to use this document class, you need to select
15910 \begin_inset Quotes eld
15918 \begin_inset Quotes erd
15921 from the class list in the
15923 Document\SpecialChar \menuseparator
15927 There are some other special things you should know about this class:
15930 \begin_layout Itemize
15931 Don't bother changing the options
15936 They're not supported by the
15943 \begin_layout Itemize
15947 \begin_inset space ~
15952 behaves a bit differently for this class.
15953 The possible choices and what they do are as follows:
15957 \begin_layout Description
15962 The final output contains page numbers in the lower right corner.
15965 \begin_layout Description
15974 , but also prints out any time markers you've put in.
15975 This is the default.
15978 \begin_layout Description
15983 The final output contains no page numbers, time markers, or alignment markers.
15987 \begin_layout Itemize
15992 class has an extra option:
15998 \begin_inset Quotes eld
16006 \begin_inset Quotes erd
16009 in the extra class options.
16013 \begin_layout Standard
16014 Using this options allows you to add time markers to
16020 \begin_inset space ~
16024 \begin_inset CommandInset ref
16026 reference "sec:slideNote"
16034 \begin_layout Standard
16035 You can also use the template file
16036 \begin_inset Quotes eld
16044 \begin_inset Quotes erd
16047 to automatically set up a document to use the
16053 File\SpecialChar \menuseparator
16055 \begin_inset space ~
16059 \begin_inset space ~
16064 to open your new document].
16065 The template file also contains some examples of the special paragraph
16066 environments used by this class.
16067 I'll describe those next.
16070 \begin_layout Subsection
16071 Paragraph Environments
16074 \begin_layout Subsubsection
16075 Supported Environments
16078 \begin_layout Standard
16079 The first thing you'll notice when you start up a new
16083 document is the font size and type: it's the equivalent of the size
16084 \begin_inset Quotes eld
16092 \begin_inset Quotes erd
16098 \begin_inset space ~
16104 This is also what's used in the output.
16106 \begin_inset Quotes eld
16110 \begin_inset Quotes erd
16113 to remind you that this is a slide.
16114 Your final slides will use a larger font; ergo, you'll have less space.
16115 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16118 \begin_layout Standard
16119 The next thing that becomes obvious is the changes to the paragraph environment
16120 pull-down box [at the far-left end of the toolbar].
16121 Most of the paragraph environments you're used to seeing are missing.
16122 There are also five new ones.
16127 class itself only supports certain paragraph environments:
16130 \begin_layout Itemize
16136 \begin_layout Itemize
16142 \begin_layout Itemize
16148 \begin_layout Itemize
16154 \begin_layout Itemize
16160 \begin_layout Itemize
16166 \begin_layout Itemize
16172 \begin_layout Itemize
16178 \begin_layout Itemize
16184 \begin_layout Itemize
16190 \begin_layout Itemize
16196 \begin_layout Standard
16197 All of the other standard environments, including the section-heading environmen
16198 ts, aren't used in the
16205 \begin_layout Standard
16206 On the other hand, you'll notice the following new environments:
16209 \begin_layout Itemize
16215 \begin_layout Itemize
16221 \begin_layout Itemize
16227 \begin_layout Itemize
16233 \begin_layout Itemize
16239 \begin_layout Standard
16240 These five are kind of quirky, due to a
16241 \begin_inset Quotes eld
16245 \begin_inset Quotes erd
16249 You see, LyX doesn't permit you to nest any other paragraph environment
16250 into an empty environment.
16251 Now, that's fine and dandy, but it means that you wouldn't be able to start
16252 a slide with anything except plain text.
16253 To deal with this, I've performed a little
16254 \begin_inset Quotes eld
16258 \begin_inset Quotes erd
16264 \begin_layout Subsubsection
16265 Quirks of the New Environments
16266 \begin_inset CommandInset label
16268 name "sec:slideQuirk"
16275 \begin_layout Standard
16276 All five of the new paragraph environments are somewhat quirky due to inherent
16277 limitiations in the current version of LyX.
16278 As I just mentioned, LyX forbids environments that begin with another environme
16280 To get around this, the
16284 environment isn't a paragraph environment as described in the
16292 \begin_layout Standard
16293 You should consider
16306 \begin_inset Quotes eld
16309 pseudo-environments.
16310 \begin_inset Quotes erd
16313 They look like a section heading or a
16314 \begin_inset Quotes eld
16322 \begin_inset Quotes erd
16325 but really begin a [and, if necessary, end the previous] paragraph environment.
16335 \begin_inset Quotes eld
16339 \begin_inset Quotes erd
16342 These two perform some action.
16345 \begin_layout Standard
16346 A common feature of all five environments,
16366 , is a rather long-ish label.
16367 The text following this label — ordinarily the contents of the paragraph
16368 environment — is utterly irrelevant for
16389 LyX completely ignores it.
16390 In fact, you can leave these five environments completely empty.
16394 \begin_layout Standard
16399 to put any text after the rather long-ish label, you might want to.
16400 This could be a short description of the contents of the
16405 In that case, enter your descriptive comment and hit
16409 as you normally would.
16412 \begin_layout Standard
16413 If, on the other hand, you don't want to enter any descriptive text, you'll
16414 hit another LyX quirk.
16415 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16416 environment until you put something in the old one.
16420 \begin_layout Itemize
16421 Start entering the text that will
16449 \begin_layout Itemize
16450 Now move to the beginning of that paragraph.
16454 \begin_layout Itemize
16463 \begin_layout Itemize
16464 Finally, change this new, empty paragraph to a
16488 \begin_layout Standard
16489 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16493 \begin_layout Subsection
16494 Making a Presentation with
16507 \begin_layout Subsubsection
16515 \begin_layout Standard
16516 If you're expecting this section to teach you how to actually make a presentatio
16517 n, you'll be sorely disappointed.
16518 Naturally, I'll describe all of the ways the
16522 class can assist you in preparing the materials for a presentation.
16523 Filling in the contents, however, is up to you.
16528 the LyX philosophy.]
16531 \begin_layout Standard
16536 environment [in the manner described in section
16537 \begin_inset space ~
16541 \begin_inset CommandInset ref
16543 reference "sec:slideQuirk"
16547 ] tells LyX to begin a new slide [duh].
16548 The label for this environment/
16549 \begin_inset Quotes erd
16553 \begin_inset Quotes erd
16557 \begin_inset Quotes eld
16561 \begin_inset Quotes erd
16564 in cool blue, followed by the label,
16565 \begin_inset Quotes eld
16569 \begin_inset Quotes erd
16573 Any text or paragraph environments that follow this one go on the new slide.
16577 \begin_layout Standard
16578 Slides are probably the only time you'll need to forcibly end pages in LyX
16579 (this can be specified in the
16584 In fact, you'll want to, once you finish entering the contents of one slide.
16585 If you've entered more text than can physically fit on a slide, the extra
16586 overflows onto a new slide.
16587 I don't recommend doing this, however, since the overflow slide won't have
16588 any page number on it.
16589 Furthermore, it may interfere with any
16593 you've made to accompany the oversized
16600 \begin_layout Standard
16609 environments work the same way as the
16614 They both create an
16615 \begin_inset Quotes eld
16619 \begin_inset Quotes erd
16622 followed by a label [
16623 \begin_inset Quotes eld
16627 \begin_inset Quotes erd
16631 \begin_inset Quotes eld
16635 \begin_inset Quotes erd
16639 The color is a stunning magenta instead of blue, and the
16640 \begin_inset Quotes eld
16644 \begin_inset Quotes erd
16647 will look different, in style and in length.
16648 The label fonts of all three also differ from one another.
16651 \begin_layout Standard
16656 , if the contents of a
16664 exceed the physical size of a slide or sheet of paper, the extra will overflow
16666 Again, you should avoid this.
16667 It defeats the whole purpose of
16678 \begin_layout Subsubsection
16688 \begin_layout Standard
16693 is a slide that sits atop another slide.
16694 Perhaps you wish to discuss a figure on the main
16698 before displaying the text associated with it.
16699 One way to accomplish this is tape a flap of dark paper over the part of
16704 you want to display later.
16705 This method fails, however, if you wish to overlap one graph with another,
16707 You would then have to fumble while speaking to align the two separate,
16712 s to align the two graphs.
16717 environment in both cases makes life much easier.
16720 \begin_layout Standard
16725 receives the page number of its
16726 \begin_inset Quotes eld
16730 \begin_inset Quotes erd
16738 \begin_inset Quotes eld
16746 \begin_inset Quotes erd
16753 \begin_layout Plain Layout
16754 Presumably, mutliple
16759 \begin_inset Quotes eld
16767 \begin_inset Quotes erd
16771 \begin_inset Quotes eld
16779 \begin_inset Quotes erd
16783 \begin_inset Quotes eld
16791 \begin_inset Quotes erd
16795 \begin_inset space ~
16798 appended to the page number of the parent
16808 Clearly, you want the contents of both the
16816 to each fit on a single physical slide! You should probably consider an
16822 \begin_inset Quotes eld
16826 \begin_inset Quotes erd
16838 class provides a visual cue for this: the label at the start of an
16842 is shorter than that at the start of a
16847 Lastly, when you generate printable output, you'll find alignment markers
16848 in all four corners of both the
16852 page and its parent
16857 These will assist you in lining up the two physical slides.
16860 \begin_layout Standard
16861 The major problem in overlaying two slides is aligning the contents of the
16862 two transparencies.
16863 How much space should you leave for that graph on the second slide? Worse
16864 still, what if you want a graph and a sentence on second slide, but there
16865 is text on the main transparency that goes in between them? You could try
16866 and insert vertical space of the right size.
16867 The better way is to use
16878 \begin_layout Standard
16879 As their names imply,
16887 are two command-like paragraph environments that make all subsequent text
16888 invisible and visible, respectively.
16890 \begin_inset space ~
16894 \begin_inset CommandInset ref
16896 reference "sec:slideQuirk"
16900 that you don't place anything
16904 these two environments, however.
16909 , it inserts a centered, sky-blue label into the page reading
16910 \begin_inset Quotes eld
16913 <Invisible Text Follows>
16914 \begin_inset Quotes erd
16918 For paragraphs following this label, the parts of the
16926 ; it doesn't matter which] where they would be contain instead blank space.
16930 \begin_layout Standard
16935 , the corresponding centered label is
16936 \begin_inset Quotes eld
16939 <Visible Text Follows>
16940 \begin_inset Quotes erd
16944 Paragraphs following this label behave normally.
16945 Note that the beginning of a new
16957 automatically shuts off an
16962 It's therefore not necessary to use
16973 \begin_layout Standard
16974 By now, it should be obvious how to create overlay transparencies using
16975 the proper combination of
16994 \begin_layout Enumerate
16999 , including everything that will appear on it, whether on the main slide
17007 \begin_layout Enumerate
17008 Before each figure or paragraph that will appear only on the
17017 If necessary, insert a
17021 environment after the
17028 \begin_layout Enumerate
17033 immediately following the
17040 \begin_layout Enumerate
17041 Copy the contents of this
17052 \begin_layout Enumerate
17057 , change all of the
17068 \begin_layout Standard
17070 You've just made an
17077 \begin_layout Standard
17078 There's one problem with the way I've designed the LyX
17082 class: you can't make text in the middle of a paragraph invisible, nor
17083 make text in the middle of an invisible paragraph visible again.
17084 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17088 \begin_layout Plain Layout
17089 The commands of interest are:
17092 \begin_layout Itemize
17097 invisible \SpecialChar \ldots{}
17101 \begin_layout Itemize
17106 visible \SpecialChar \ldots{}
17110 \begin_layout Plain Layout
17111 \SpecialChar \ldots{}
17112 and need to be marked as TeX.
17114 \begin_inset Quotes eld
17118 \begin_inset Quotes erd
17121 you wish to change goes in between the brackets [and after the
17134 If you don't know how to mark text as TeX, see the appropriate section
17147 \begin_layout Subsubsection
17157 \begin_inset CommandInset label
17159 name "sec:slideNote"
17166 \begin_layout Standard
17175 is associated with a
17176 \begin_inset Quotes eld
17180 \begin_inset Quotes erd
17192 class provides visual cues.
17197 is shorter than that of a
17201 [yet longer than that of an
17205 ] and, like the label of an
17209 is shockingly magenta.
17210 Additionally, the printed
17214 has the page number of its
17215 \begin_inset Quotes eld
17219 \begin_inset Quotes erd
17227 \begin_inset Quotes eld
17235 \begin_inset Quotes erd
17239 \begin_inset Quotes eld
17247 \begin_inset Quotes erd
17251 \begin_inset Quotes eld
17259 \begin_inset Quotes erd
17263 You can have multiple
17267 s associated with a single
17279 , you'll probably want to break up long
17283 s so that they fit on a single sheet of paper.
17286 \begin_layout Standard
17291 is obvious: it contains anything additional you might want to say about
17297 It could also be used as a sheet of reminders for a particular
17302 In the case of the latter, you might want to make use of time markers.
17308 \begin_inset Quotes eld
17312 \begin_inset Quotes erd
17315 support for time markers, a
17320 So, you'll have to resort to using the LaTeX codes.
17323 \begin_layout Standard
17324 To use time markers, you'll need to specify the extra class option
17325 \begin_inset Quotes eld
17333 \begin_inset Quotes erd
17337 \begin_inset space ~
17341 \begin_inset CommandInset ref
17343 reference "sec:slidesetup"
17348 This option turns on timing marks, which will appear in the lower-left-hand
17354 To set what appears in the time marker, you use the LaTeX commands
17355 \begin_inset Quotes eld
17365 \begin_inset Quotes erd
17369 \begin_inset Quotes eld
17379 \begin_inset Quotes erd
17383 The arguments of both commands are time measured in seconds.
17385 \begin_inset Quotes eld
17395 \begin_inset Quotes erd
17398 sets the time marker to a given time.
17400 \begin_inset Quotes eld
17410 \begin_inset Quotes erd
17413 increments the time marker by the specified amount.
17414 Using time markers and
17418 s in this fashion, you can remind yourself how much time to spend on a particula
17426 \begin_layout Standard
17427 There's one last feature to describe.
17428 Clearly, you'd like to print out all of your
17436 s on transparencies while printing all of your
17453 with which it is associated.
17454 What's a person to do?
17457 \begin_layout Standard
17458 Luckily, there are two LaTeX commands that allow you to select what to print
17460 Both must be placed into the preamble of your document.
17462 \begin_inset Quotes eld
17474 \begin_inset Quotes erd
17477 will cause the output to contain only the
17486 Correspondingly, the command
17487 \begin_inset Quotes eld
17499 \begin_inset Quotes erd
17502 prevents the output of anything but
17507 I'd advise placing both commands in the preamble and initially comment
17509 You can then preview your entire presentation as you write.
17510 When you're done writing, you can then uncomment one of the two to select
17511 what you want to print.
17512 I like to uncomment
17513 \begin_inset Quotes eld
17525 \begin_inset Quotes erd
17528 , print to a file with
17529 \begin_inset Quotes eld
17537 \begin_inset Quotes erd
17540 in its name, comment it back out, then uncomment
17541 \begin_inset Quotes eld
17553 \begin_inset Quotes erd
17557 \begin_inset Quotes eld
17565 \begin_inset Quotes erd
17569 I can then send either file to a printer, loading transparencies or plain
17570 paper as appropriate.
17573 \begin_layout Standard
17574 You can also provide other arguments to the
17575 \begin_inset Quotes eld
17585 \begin_inset Quotes erd
17589 \begin_inset Quotes eld
17599 \begin_inset Quotes erd
17603 See a good LaTeX book for details.
17606 \begin_layout Subsection
17611 Class Template File
17614 \begin_layout Standard
17615 I have also provided a template file,
17616 \begin_inset Quotes eld
17624 \begin_inset Quotes erd
17632 To use it, begin your new presentation with
17637 ile\SpecialChar \menuseparator
17639 \begin_inset space ~
17643 \begin_inset space ~
17653 Your new LyX presentation file will contain an example
17674 additionally contain an example of the use of
17683 Lastly, the preamble will contain:
17686 \begin_layout LyX-Code
17687 % Uncomment to print out only slides and overlays
17690 \begin_layout LyX-Code
17694 \begin_layout LyX-Code
17700 \begin_inset Newline newline
17706 \begin_layout LyX-Code
17707 % Uncomment to print out only notes
17710 \begin_layout LyX-Code
17714 \begin_layout LyX-Code
17722 \begin_layout Standard
17723 One final thing: I created this class to support the LaTeX2e
17724 \begin_inset Quotes eld
17732 \begin_inset Quotes erd
17735 class, one of the built-in LaTeX2e classes.
17736 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17737 built-in slide class.
17738 It's here if you want it or need it.
17739 There exist other LaTeX2e classes for creating presentations, such as the
17745 \begin_inset space ~
17749 \begin_inset CommandInset ref
17751 reference "sec:foiltex"
17756 \begin_inset Quotes eld
17764 \begin_inset Quotes erd
17767 package [present on some TeX distributions].
17768 The latter is not yet supported under LyX.
17772 \begin_layout Plain Layout
17773 Perhaps you can take on the task\SpecialChar \ldots{}
17779 I know nothing about these other classes.
17780 Try them out to see what sort of alternative they provide.
17783 \begin_layout Chapter
17784 LyX Features needing Extra Software
17787 \begin_layout Section
17791 \begin_layout Standard
17797 \begin_layout Subsection
17801 \begin_layout Standard
17810 \begin_layout Plain Layout
17815 is not yet available when you are using the LaTeX distribution MiKTeX.
17820 , you'll find in the
17827 \begin_inset space ~
17838 \begin_inset Newline newline
17842 \begin_inset CommandInset href
17844 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17851 \begin_layout Standard
17856 package is a program that was written by
17857 \begin_inset Flex Noun
17860 \begin_layout Plain Layout
17862 \begin_inset space ~
17870 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17871 and easy to forget.
17872 The program runs over your LaTeX file, checks the integrity of the file,
17873 and flags some common errors.
17874 In other technical words, it is
17881 \begin_layout Standard
17882 Well, what is a syntax checker doing in LyX which is supposed to produce
17883 correct LaTeX anyways? The answer is simple: Just as
17887 not only checks the
17891 of C programs, but also does
17895 checks for type-errors,
17899 catches some common
17903 errors, in addition to the syntactical ones.
17908 is capable of detecting several common errors, such as
17911 \begin_layout Itemize
17912 Ellipsis detection:
17913 \begin_inset Newline newline
17916 Use \SpecialChar \ldots{}
17920 \begin_layout Itemize
17921 No space in front of/after parenthesis:
17922 \begin_inset Newline newline
17928 \begin_layout Itemize
17929 Enforcement of normal space after common abbreviations:
17930 \begin_inset Newline newline
17934 \begin_inset space \thinspace{}
17938 \begin_inset space \space{}
17941 is too wide spacing.
17944 \begin_layout Itemize
17945 Enforcement of end-of-sentence space when the last sentence ends with a
17947 \begin_inset Newline newline
17951 And this is wrong spacing.
17954 \begin_layout Itemize
17955 Space in front of labels and similar commands:
17956 \begin_inset Newline newline
17959 The label should stick right up to the text to avoid falling to a wrong
17962 \begin_inset CommandInset label
17972 \begin_layout Plain Layout
17973 This footnote is in danger of falling off to a wrong page
17978 The label is separated too much.
17981 \begin_layout Itemize
17982 Space in front of references, instead of hard spaces:
17983 \begin_inset Newline newline
17986 If you have bad luck, the text will break right between the referenced text
17987 and reference number, and that's a pity.
17989 \begin_inset CommandInset ref
17991 reference "sec:chktex"
17998 \begin_layout Itemize
18000 \begin_inset Quotes eld
18004 \begin_inset Quotes erd
18008 \begin_inset Formula $\times$
18012 \begin_inset Newline newline
18015 2x2 looks cheap compared to
18016 \begin_inset Formula $2\times2$
18022 \begin_layout Standard
18023 and more \SpecialChar \ldots{}
18024 It is an invaluable tool when you are
18025 \begin_inset Quotes eld
18029 \begin_inset Quotes erd
18032 your document before printing, and you should run it right after the obligatory
18033 spelling check, and before you go fine tuning the typesetting.
18036 \begin_layout Subsection
18040 \begin_layout Standard
18041 If you have the program installed, usage is as simple as choosing
18043 Tools\SpecialChar \menuseparator
18045 \begin_inset space ~
18051 This will make LyX generate a LaTeX file of your document, start
18055 to check it, and then make LyX insert
18056 \begin_inset Quotes eld
18060 \begin_inset Quotes erd
18063 with the warnings from
18067 , if there were any.
18068 The warnings will be placed close to the point of the mistake, and you
18069 can quickly find them by using the
18071 Navigate\SpecialChar \menuseparator
18074 menu item, or the shortcut key
18083 Open the error boxes by clicking on them with the mouse, or use the shortcut
18092 bindings, or the corresponding
18101 Read the warning and correct the mistake, if it is a mistake.
18102 If you have trouble understanding what the warning is about, you can safely
18104 Remember that there is a hidden layer between the document on screen and
18105 the technical details in invoking
18109 , and this gap can make some warnings seem arcane or just plain silly.
18112 \begin_layout Standard
18113 This document is an excellent testing bed for the feature, and it should
18114 provide quite a few warnings for you to fiddle with.
18115 Since computers are only so smart, expect most of the warnings to be false
18119 \begin_layout Subsection
18120 How to fine tune it
18123 \begin_layout Standard
18124 Sometimes, you'll find that
18128 makes more noise than suits your mood.
18129 Then you can choose not to use it, wait until your mood changes, or try
18134 to get better along with you.
18137 \begin_layout Standard
18146 very configurable and extensible, you should not expect to solve all problems
18152 Since LyX has to generate a somewhat special LaTeX file to be able to match
18153 the line numbers from the
18161 \begin_layout Plain Layout
18162 You can inspect the specific output from
18168 Document\SpecialChar \menuseparator
18170 \begin_inset space ~
18184 to the internal document structure, some of the warnings will not appear
18186 There are two things you can do about this:
18189 \begin_layout Itemize
18194 invocation command line in
18195 \begin_inset Flex MenuItem
18198 \begin_layout Plain Layout
18199 Tools\SpecialChar \menuseparator
18200 Preferences\SpecialChar \menuseparator
18201 Output\SpecialChar \menuseparator
18202 LaTeX\SpecialChar \menuseparator
18212 installation configuration file (usually with the file
18217 See below to learn what warnings can be enabled and disabled on the command
18221 \begin_layout Itemize
18222 Export your document as a raw LaTeX file using
18224 File\SpecialChar \menuseparator
18225 Export\SpecialChar \menuseparator
18233 Invoked in this way, it can be a hassle to find the corresponding place
18234 in the document inside LyX, but with a little patience, you should be able
18238 \begin_layout Standard
18239 Here follows the warning messages that can be enabled and disabled in
18248 to disable a warning, and
18252 to enable a warning.
18253 The emphasized entries are disabled by default, because the default is
18256 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18261 \begin_layout Standard
18262 Notice that you should only use the options that enable and disable warnings,
18263 because LyX relies on some of the other command line parameters to be set
18264 in a specific way to have a chance to communicate with
18271 \begin_layout Enumerate
18275 Command terminated with space.
18278 \begin_layout Enumerate
18281 Non-breaking space (
18282 \begin_inset Quotes eld
18290 \begin_inset Quotes erd
18293 ) should have been used.
18296 \begin_layout Enumerate
18300 You should enclose the previous parenthesis with
18301 \begin_inset Quotes eld
18309 \begin_inset Quotes erd
18315 \begin_layout Enumerate
18318 Italic correction (
18319 \begin_inset Quotes eld
18329 \begin_inset Quotes erd
18332 ) found in non-italic buffer.
18335 \begin_layout Enumerate
18338 Italic correction (
18339 \begin_inset Quotes eld
18349 \begin_inset Quotes erd
18352 ) found more than once.
18355 \begin_layout Enumerate
18359 No italic correction (
18360 \begin_inset Quotes eld
18370 \begin_inset Quotes erd
18376 \begin_layout Enumerate
18380 \begin_inset Quotes eld
18388 \begin_inset Quotes erd
18392 \begin_inset Quotes eld
18400 \begin_inset Quotes erd
18406 \begin_layout Enumerate
18409 Wrong length of dash may have been used.
18412 \begin_layout Enumerate
18416 \begin_inset Quotes eld
18424 \begin_inset Quotes erd
18428 \begin_inset Quotes eld
18436 \begin_inset Quotes erd
18442 \begin_layout Enumerate
18446 \begin_inset Quotes eld
18454 \begin_inset Quotes erd
18460 \begin_layout Enumerate
18464 \begin_inset Quotes eld
18472 \begin_inset Quotes erd
18475 to achieve an ellipsis.
18478 \begin_layout Enumerate
18481 Inter-word spacing (
18482 \begin_inset Quotes eld
18492 \begin_inset Quotes eld
18495 ) should perhaps be used.
18498 \begin_layout Enumerate
18501 Inter-sentence spacing (
18502 \begin_inset Quotes eld
18512 \begin_inset Quotes erd
18515 ) should perhaps be used.
18518 \begin_layout Enumerate
18521 Could not find argument for command.
18524 \begin_layout Enumerate
18528 \begin_inset Quotes eld
18536 \begin_inset Quotes erd
18542 \begin_layout Enumerate
18545 Math mode still on at end of LaTeX file.
18548 \begin_layout Enumerate
18552 \begin_inset Quotes eld
18560 \begin_inset Quotes erd
18563 doesn't match the number of
18564 \begin_inset Quotes eld
18572 \begin_inset Quotes erd
18578 \begin_layout Enumerate
18581 You should use either
18584 \begin_inset Quotes eld
18592 \begin_inset Quotes erd
18597 as an alternative to
18598 \begin_inset Quotes eld
18606 \begin_inset Quotes erd
18612 \begin_layout Enumerate
18619 " (ASCII 39) instead of "
18626 \begin_layout Enumerate
18629 User-specified pattern found.
18632 \begin_layout Enumerate
18635 This command might not be intended.
18638 \begin_layout Enumerate
18645 \begin_layout Enumerate
18663 \begin_layout Enumerate
18666 Delete this space to maintain correct page references.
18669 \begin_layout Enumerate
18673 You might wish to put this between a pair of
18674 \begin_inset Quotes eld
18682 \begin_inset Quotes erd
18688 \begin_layout Enumerate
18691 You ought to remove spaces in front of punctuation.
18694 \begin_layout Enumerate
18697 Could not execute LaTeX command.
18700 \begin_layout Enumerate
18709 in front of small punctuation.
18712 \begin_layout Enumerate
18720 may look prettier here.
18723 \begin_layout Enumerate
18727 Multiple spaces detected in output.
18730 \begin_layout Enumerate
18733 This text may be ignored.
18736 \begin_layout Enumerate
18742 \begin_inset Quotes eld
18747 to begin quotation, not
18754 \begin_layout Enumerate
18761 to end quotation, not
18764 \begin_inset Quotes eld
18772 \begin_layout Enumerate
18778 \begin_layout Enumerate
18781 You should perhaps use
18782 \begin_inset Quotes eld
18790 \begin_inset Quotes erd
18796 \begin_layout Enumerate
18799 You should put a space in front of/after parenthesis.
18802 \begin_layout Enumerate
18805 You should avoid spaces in front of/after parenthesis.
18808 \begin_layout Enumerate
18812 You should not use punctuation in front of/after quotes.
18815 \begin_layout Enumerate
18818 Double space found.
18821 \begin_layout Enumerate
18824 You should put punctuation outside inner/inside display math mode.
18827 \begin_layout Enumerate
18830 You ought to not use primitive TeX in LaTeX code.
18833 \begin_layout Enumerate
18836 You should remove spaces in front of
18837 \begin_inset Quotes eld
18845 \begin_inset Quotes erd
18851 \begin_layout Enumerate
18854 \begin_inset Quotes eld
18862 \begin_inset Quotes erd
18865 is normally not followed by
18866 \begin_inset Quotes eld
18874 \begin_inset Quotes erd
18880 \begin_layout Standard
18881 In later versions of LyX, we hope to provide a more complete interface to
18882 this tool (and it's smaller cousin
18886 ) to exploit the full power of it.
18887 But it's not exactly useless as it is now: go try it on one of your existing
18888 documents of a certain length and be surprised.
18891 \begin_layout Section
18892 Version Control in LyX
18895 \begin_layout Standard
18898 Lars Gullik Bjønnes
18905 \begin_layout Subsection
18909 \begin_layout Standard
18910 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18911 If you need something a bit more sophisticated you will have to do that
18912 manually in a terminal.
18915 \begin_layout Standard
18916 Also note that CVS support is not as good as subversion support so we advise
18918 A good place to start learning Subversion is SVN Book
18922 \begin_layout Plain Layout
18923 \begin_inset CommandInset href
18925 target "http://svnbook.red-bean.com/"
18935 In the case of RCS you should read
18936 \begin_inset Quotes eld
18940 \begin_inset Quotes erd
18943 (a man file, read it with
18948 This file describes all the basic features of RCS.
18949 You should especially notice the comment about a RCS directory, and the
18950 notion of a master RCS file (the file ending in
18957 \begin_layout Standard
18958 Before you begin to use the version control features in LyX, you should
18959 be familiar with RCS/CVS/SVN/GIT usage.
18960 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18961 package — no guarantees are made for older versions.
18962 Most of the log messages are not currently displayed after operations —
18963 you can check them in the Messages pane if unsure.
18964 Regular users of version control will appreciate VC toolbar, which can
18967 View\SpecialChar \menuseparator
18968 Toolbars\SpecialChar \menuseparator
18970 \begin_inset space ~
18978 \begin_layout Standard
18979 For introducing your own external commands consult vc-command in the manual
18983 \begin_layout Subsection
18984 RCS commands in LyX
18987 \begin_layout Standard
18988 The following sections describe the RCS commands supported by LyX.
18989 You can find them in the
18991 File\SpecialChar \menuseparator
18993 \begin_inset space ~
18999 LyX was tested against RCS 5.7/5.8
19003 \begin_layout Plain Layout
19004 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19005 in order to work properly with LyX.
19006 In particular time zone (TZ) should be set and more importantly RCSINIT
19007 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19008 expects archive to be found in file.lyx,v within the original document directory.
19009 See also README shipped with Windows RCS binaries.
19017 \begin_layout Subsubsection
19023 \begin_layout Standard
19024 If your document is not under revision control, this is the only item shown
19026 And if it is under revision control, the
19030 item is not visible.
19034 \begin_layout Standard
19035 This command registers your document with RCS (unless you are under the
19036 directory managed by CVS)\SpecialChar \@.
19037 You are asked interactively to supply an initial
19038 description of the document.
19039 The document is now set in Read-Only mode and you have to
19042 \begin_inset space ~
19046 \begin_inset space ~
19050 \begin_inset space ~
19055 , before making any changes to it.
19056 A document under revision control has a
19057 \begin_inset Quotes eld
19060 [RCS:<version> <locker>]
19061 \begin_inset Quotes erd
19064 item tagged to the filename in the minibuffer.
19067 \begin_layout Standard
19068 RCS command that is run:
19070 ci -q -u -i -t-"<initial description>" <file-name>
19073 \begin_layout Standard
19078 to understand the switches.
19082 \begin_layout Subsubsection
19088 \begin_layout Standard
19089 When you are finished editing a file, you check in your changes.
19090 When you do this, you are asked for a description of the changes.
19091 This is stored in the history log.
19092 The version number is bumped, your changes are applied to the master RCS
19093 file, the document is unlocked and set to Read-Only mode.
19096 \begin_layout Standard
19099 ci -q -u -m"<description>" <file-name>
19102 \begin_layout Subsubsection
19108 \begin_layout Standard
19109 By doing this you lock the document so that only you can edit it.
19110 This will also make the document Read-Write only for you.
19111 You will usually continue editing for a while and when you are finished
19112 you check in your changes.
19113 The status line is changed to reflect that you have locked the file.
19116 \begin_layout Standard
19119 co -q -l <file-name>
19122 \begin_layout Subsubsection
19125 Revert To Repository Version
19128 \begin_layout Standard
19129 This will discard all changes made to the document since the last check
19131 You get a warning before changes are discarded.
19134 \begin_layout Standard
19137 co -f -u<version> <file-name>
19140 \begin_layout Subsubsection
19146 \begin_layout Standard
19147 This will create a copy of the current document.
19148 Since RCS does not support copy operations natively, the version history
19149 is not preserved, and the copy is added as a new file.
19150 It requires a clean document without any changes since the last checkin.
19151 You are asked for a file name and a description of the copy operation.
19152 After that the copy is created, both locally and in the repository.
19153 If the parent directories of the copied and original document differ, all
19154 relative paths of included files of the copy are adjusted (like in
19156 File\SpecialChar \menuseparator
19159 \SpecialChar \ldots{}
19161 Finally, the copy is loaded instead of the original document.
19164 \begin_layout Labeling
19165 \labelwidthstring 00.00.0000
19167 \begin_inset space ~
19171 \begin_inset space ~
19175 \begin_inset Newline newline
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19185 \begin_inset Quotes eld
19189 \begin_inset Quotes erd
19198 \begin_inset Flex Code
19201 \begin_layout Plain Layout
19204 \begin_inset Quotes eld
19208 \begin_inset Quotes erd
19217 \begin_inset Newline newline
19221 \begin_inset Flex Code
19224 \begin_layout Plain Layout
19228 \begin_inset Quotes eld
19232 \begin_inset Quotes erd
19243 \begin_layout Subsubsection
19249 \begin_layout Standard
19250 This makes as if the last check in never happened.
19251 No changes are made to the document loaded into LyX, but the last version
19252 is removed from the master RCS file.
19255 \begin_layout Standard
19258 rcs -o<version> <file-name>
19261 \begin_layout Subsubsection
19267 \begin_layout Standard
19268 This shows the complete history of the RCS document.
19273 is shown in a browser.
19281 \begin_layout Subsubsection
19285 \begin_layout Standard
19286 LyX supports RCS version number, author name, date and time of last commit.
19287 All those are extracted from
19289 rlog -r <file-name>
19293 \begin_inset CommandInset ref
19295 reference "sub:VCS-Revision-Information"
19302 \begin_layout Subsection
19303 CVS commands in LyX
19306 \begin_layout Standard
19307 A subset of CVS operations is supported by LyX.
19308 You can find the commands in the
19310 File\SpecialChar \menuseparator
19312 \begin_inset space ~
19318 The version control system SVN is more powerful, so please use it instead
19319 of CVS if possible.
19322 \begin_layout Subsubsection
19328 \begin_layout Standard
19329 If you start from scratch with CVS you have to create your repository and
19330 checkout the working copy with external tools.
19331 If you're using a client-server setup you may need to login before doing
19332 the first repository checkout.
19335 \begin_layout Standard
19336 If your documents are under revision control and others are using the same
19337 repository problems arise when different changes to the same document at
19338 the same location happen.
19339 Standard CVS repositories don't operate with a file locking mechanism.
19340 This may be surprising, but conflicts only occur if people disagree on
19341 the proper content of the same part of a document.
19342 So, if co-workers are used to communicate regularly, these conflicts occur
19344 If they don't communicate they have a fundamental problem anyway.
19345 Nevertheless some people like to work with so called
19346 \begin_inset Quotes eld
19350 \begin_inset Quotes erd
19354 If they do so the working copy of all files is readonly when checked out
19355 first and the user starts editing after using a special command to make
19356 the working copy writable.
19357 When the changes are checked in the working copy returns to readonly state.
19358 With LyX one has to edit the
19359 \begin_inset Flex Code
19362 \begin_layout Plain Layout
19368 file and add the line
19369 \begin_inset Flex Code
19372 \begin_layout Plain Layout
19378 to work with reserved checkouts.
19379 The benefit is the possibility to see who is using a writable copy of some
19381 It's not guaranteed only one user makes a copy writable.
19384 \begin_layout Standard
19385 LyX tries to guess if you're using reserved or non-reserved checkouts.
19386 If your working copy is readonly or it is writable and an additional copy
19387 of your document exists in the CVS/Base sub-directory a reserved otherwise
19388 a non-reserved checkout is assumed.
19389 When a reserved checkout is detected you have to use
19390 \begin_inset Flex MenuItem
19393 \begin_layout Plain Layout
19399 to make your working copy writable if it's readonly.
19401 \begin_inset Flex MenuItem
19404 \begin_layout Plain Layout
19410 operation is possible and that makes your working copy readonly again after
19411 transferring your changes to the repository.
19414 \begin_layout Standard
19415 More information about CVS can be found here
19416 \begin_inset Flex URL
19419 \begin_layout Plain Layout
19421 http://www.nongnu.org/cvs
19427 \begin_inset Flex URL
19430 \begin_layout Plain Layout
19432 http://ximbiot.com/cvs
19440 \begin_layout Standard
19445 to understand the sub-commands and the switches mentioned below.
19448 \begin_layout Subsubsection
19454 \begin_layout Standard
19455 If your document is not under revision control, this is the only item shown
19457 And if it is under revision control, the
19464 item is not visible.
19468 \begin_layout Standard
19469 This command registers in CVS your document
19470 \begin_inset Flex Strong
19473 \begin_layout Plain Layout
19481 in the case you have already the documents directory under CVS control
19487 This means you have to create or checkout the archive by yourself using
19489 (In case you forget that step LyX registers the document with RCS.)
19492 \begin_layout Standard
19493 Then you are asked interactively to supply an initial description of the
19495 Don't forget that registered file is not yet checked in.
19498 \begin_layout Standard
19499 CVS command that is run:
19501 cvs -q add -m"<entered message>" "<file-name>"
19504 \begin_layout Standard
19509 above and for all other CVS commands is an abbreviation for
19510 \begin_inset Quotes eld
19513 change the current working directory to file location and use the file name
19514 without path component as argument
19515 \begin_inset Quotes erd
19521 \begin_layout Subsubsection
19527 \begin_layout Standard
19528 When you are finished editing a file, you commit your changes.
19529 When you do this and you had changed the document, you are asked for a
19530 description of the changes.
19531 After that changes are written to the repository.
19532 In case you didn't change the document and a reserved checkout is detected
19533 the reservation made on
19534 \begin_inset Flex MenuItem
19537 \begin_layout Plain Layout
19546 \begin_layout Labeling
19547 \labelwidthstring 00.00.0000
19549 \begin_inset space ~
19553 \begin_inset space ~
19557 \begin_inset Newline newline
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19567 -q commit -m"<description>" "<file-name>"
19573 \begin_inset Newline newline
19577 \begin_inset Flex Code
19580 \begin_layout Plain Layout
19591 \begin_layout Subsubsection
19597 \begin_layout Standard
19598 When you are sharing a repository with others, you may have to incorporate
19599 their changes into your working copy.
19602 \begin_layout Standard
19605 cvs -q update "<file-name>"
19608 \begin_layout Standard
19609 If a readonly checkout is detected the working copy is made writable and
19613 \begin_layout Standard
19616 cvs -q edit "<file-name>"
19619 \begin_layout Subsubsection
19622 Revert To Repository Version
19625 \begin_layout Standard
19626 This will discard all changes made to the document since the last check
19628 You get a warning before changes are discarded.
19629 Firstly the file is deleted, secondly CVS update command is run.
19632 \begin_layout Standard
19635 cvs -q update "<file-name>"
19638 \begin_layout Standard
19639 If a reserved checkout is detected and the working copy has no changes only
19640 the reservation is undone.
19643 \begin_layout Standard
19646 cvs -q unedit "<file-name>"
19649 \begin_layout Subsubsection
19655 \begin_layout Standard
19656 This will create a copy of the current document.
19657 Since CVS does not support copy operations natively, the version history
19658 is not preserved, and the copy is added as a new file.
19659 It requires a clean document without any changes since the last checkin.
19660 You are asked for a file name and a description of the copy operation.
19661 After that the copy is created, both locally and in the repository.
19662 If the parent directories of the copied and original document differ, all
19663 relative paths of included files of the copy are adjusted (like in
19665 File\SpecialChar \menuseparator
19668 \SpecialChar \ldots{}
19670 Finally, the copy is loaded instead of the original document.
19673 \begin_layout Labeling
19674 \labelwidthstring 00.00.0000
19676 \begin_inset space ~
19680 \begin_inset space ~
19684 \begin_inset Newline newline
19688 \begin_inset Flex Code
19691 \begin_layout Plain Layout
19694 \begin_inset Quotes eld
19698 \begin_inset Quotes erd
19707 \begin_inset Flex Code
19710 \begin_layout Plain Layout
19713 \begin_inset Quotes eld
19717 \begin_inset Quotes erd
19726 \begin_inset Newline newline
19730 \begin_inset Flex Code
19733 \begin_layout Plain Layout
19737 \begin_inset Quotes eld
19741 \begin_inset Quotes erd
19752 \begin_layout Subsubsection
19758 \begin_layout Standard
19759 This will rename the current document.
19760 Since CVS does not support rename operations natively, the version history
19761 is not preserved, the renamed document is added as a new file, and the
19762 original document is deleted.
19763 It requires a clean document without any changes since the last checkin.
19764 You are asked for a file name and a description of the rename operation.
19765 After that the document is renamed, both locally and in the repository.
19766 If the parent directories of the new and old file names differ, all relative
19767 paths of included files are adjusted (like in
19769 File\SpecialChar \menuseparator
19772 \SpecialChar \ldots{}
19774 Finally, the document is reloaded using the new name.
19777 \begin_layout Labeling
19778 \labelwidthstring 00.00.0000
19780 \begin_inset space ~
19784 \begin_inset space ~
19788 \begin_inset Newline newline
19792 \begin_inset Flex Code
19795 \begin_layout Plain Layout
19798 \begin_inset Quotes eld
19802 \begin_inset Quotes erd
19811 \begin_inset Flex Code
19814 \begin_layout Plain Layout
19817 \begin_inset Quotes eld
19821 \begin_inset Quotes erd
19830 \begin_inset Newline newline
19834 \begin_inset Flex Code
19837 \begin_layout Plain Layout
19841 \begin_inset Quotes eld
19845 \begin_inset Quotes erd
19854 \begin_inset Newline newline
19858 \begin_inset Flex Code
19861 \begin_layout Plain Layout
19865 \begin_inset Quotes eld
19869 \begin_inset Quotes erd
19880 \begin_layout Subsubsection
19881 Update of the local directory checkout from repository
19884 \begin_layout Standard
19885 Once your documents gets more complex, containing sub-documents and pictures,
19887 \begin_inset Flex Code
19890 \begin_layout Plain Layout
19896 files and so on using version control becomes more complicated.
19897 LyX supports updating the whole tree in which resides the document.
19898 This become especially useful once you cooperate with people which neither
19899 have detailed knowledge about CVS usage nor they have ambition to commit
19900 additional material to the repository.
19901 You have to organize the files structure so that all external files are
19902 in the same directory or subdirectories of the document.
19903 It's good practice anyway to store multipart documents in an extra directory.
19906 \begin_layout Standard
19908 \begin_inset Flex Code
19911 \begin_layout Plain Layout
19912 Update local directory from repository
19917 command updates the whole directory.
19918 If local changes are detected user is warned before update starts.
19919 In case of merge conflicts both versions of the conflicting document parts
19920 are placed in the final document.
19921 You have to review and correct the result of the merge.
19922 You'll find the conflicts enclosed in pairs of
19923 \begin_inset Flex Code
19926 \begin_layout Plain Layout
19933 \begin_inset Flex Code
19936 \begin_layout Plain Layout
19943 \begin_inset Flex Code
19946 \begin_layout Plain Layout
19953 The first part is your version as before the update operation with the
19954 document name prepended.
19955 The second one is the repository version with the version number after
19957 \begin_inset Flex Code
19960 \begin_layout Plain Layout
19969 \begin_layout Labeling
19970 \labelwidthstring 00.00.0000
19972 \begin_inset space ~
19976 \begin_inset space ~
19980 \begin_inset Newline newline
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19995 (Ask if changes are detected.)
19996 \begin_inset Newline newline
20000 \begin_inset Flex Code
20003 \begin_layout Plain Layout
20004 cd $path; cvs -q update
20014 \begin_layout Standard
20016 \begin_inset Flex Code
20019 \begin_layout Plain Layout
20025 stands for the path to the document.
20028 \begin_layout Subsubsection
20034 \begin_layout Standard
20035 This shows the complete history of the CVS document.
20038 cvs log "<file-name>"
20040 is shown in a browser.
20043 \begin_layout Subsubsection
20047 \begin_layout Standard
20048 LyX supports CVS version number, author name, date and time of last commit.
20049 All those are extracted from
20051 cvs log -r <file-name>
20055 \begin_inset CommandInset ref
20057 reference "sub:VCS-Revision-Information"
20064 \begin_layout Subsection
20065 SVN commands in LyX
20068 \begin_layout Standard
20069 SVN is now partially supported by LyX.
20070 You can find the commands in the
20072 File\SpecialChar \menuseparator
20074 \begin_inset space ~
20080 Please note that if you use password protected access to repository via
20081 ssh, you will be asked in terminal window.
20082 LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20086 \begin_layout Plain Layout
20087 Most of the commands will work with 1.4 too, see
20088 \begin_inset CommandInset ref
20090 reference "sub:SVN-Repo-Update"
20095 There seems to be currently unresolved permissions problem under SVN 1.8
20096 with reverting changes when file is locked.
20104 \begin_layout Subsubsection
20110 \begin_layout Standard
20111 If your document is not under revision control, this is the only item shown
20113 And if it is under revision control, the
20120 item is not visible.
20123 \begin_layout Standard
20124 This command registers in SVN your document ONLY in case you have already
20125 the documents directory under SVN control (in particular
20130 This means you have to checkout the archive by yourself.
20133 \begin_layout Standard
20134 Then you are asked interactively to supply an initial description of the
20136 Don't forget that registered file is not yet commited.
20139 \begin_layout Standard
20140 SVN command that is run:
20143 \begin_inset Quotes eld
20147 \begin_inset Quotes erd
20153 \begin_layout Standard
20158 to understand the switches.
20161 \begin_layout Subsubsection
20167 \begin_layout Standard
20168 When you are finished editing a file, you commit your changes.
20169 When you do this, you are asked for a description of the changes.
20170 After that changes are commited.
20173 \begin_layout Standard
20178 \begin_layout Plain Layout
20179 In case locking is not enabled.
20181 \begin_inset CommandInset ref
20183 reference "subsec:SVN-File-Locking"
20194 svn commit -q -m"<description>" <file-name>
20197 \begin_layout Subsubsection
20203 \begin_layout Standard
20204 Updates the changes of this file from the repository.
20205 Be sure you understand SVN merging and conflicts resolving before using
20206 this function, because all conflicts has to be resolved manually by you!
20209 \begin_layout Standard
20214 \begin_layout Plain Layout
20222 svn update --non-interactive
20223 \begin_inset Quotes eld
20227 \begin_inset Quotes erd
20233 \begin_layout Subsubsection
20236 Revert To Repository Version
20239 \begin_layout Standard
20240 This will discard all changes made to the document since the last check
20242 You get a warning before changes are discarded.
20245 \begin_layout Standard
20249 \begin_inset Quotes eld
20253 \begin_inset Quotes erd
20259 \begin_layout Subsubsection
20265 \begin_layout Standard
20266 This will create a copy of the current document including the version history.
20267 It requires a clean document without any changes since the last checkin.
20268 You are asked for a file name and a description of the copy operation.
20269 After that the copy is created, both locally and in the repository.
20270 If the parent directories of the copied and original document differ, all
20271 relative paths of included files of the copy are adjusted (like in
20273 File\SpecialChar \menuseparator
20276 \SpecialChar \ldots{}
20278 Finally, the copy is loaded instead of the original document.
20281 \begin_layout Labeling
20282 \labelwidthstring 00.00.0000
20284 \begin_inset space ~
20288 \begin_inset space ~
20292 \begin_inset Newline newline
20296 \begin_inset Flex Code
20299 \begin_layout Plain Layout
20303 \begin_inset Quotes eld
20307 \begin_inset Quotes erd
20311 \begin_inset Quotes eld
20315 \begin_inset Quotes erd
20324 \begin_inset Newline newline
20328 \begin_inset Flex Code
20331 \begin_layout Plain Layout
20340 \begin_layout Subsubsection
20346 \begin_layout Standard
20347 This will rename the current document including the version history.
20348 It requires a clean document without any changes since the last checkin.
20349 You are asked for a file name and a description of the rename operation.
20350 After that the document is renamed, both locally and in the repository.
20351 If the parent directories of the new and old file names differ, all relative
20352 paths of included files are adjusted (like in
20354 File\SpecialChar \menuseparator
20357 \SpecialChar \ldots{}
20359 Finally, the document is reloaded using the new name.
20362 \begin_layout Labeling
20363 \labelwidthstring 00.00.0000
20365 \begin_inset space ~
20369 \begin_inset space ~
20373 \begin_inset Newline newline
20377 \begin_inset Flex Code
20380 \begin_layout Plain Layout
20384 \begin_inset Quotes eld
20388 \begin_inset Quotes erd
20392 \begin_inset Quotes eld
20396 \begin_inset Quotes erd
20405 \begin_inset Newline newline
20409 \begin_inset Flex Code
20412 \begin_layout Plain Layout
20421 \begin_layout Subsubsection
20422 \begin_inset CommandInset label
20424 name "sub:SVN-Repo-Update"
20428 Update of the local directory checkout from repository
20432 \begin_layout Plain Layout
20433 Note that this command will work only with subversion
20434 \begin_inset Formula $\geqq1.5$
20445 \begin_layout Standard
20446 All the commands above have one shortcomming - they deal with the current
20448 Once your document contains pictures, includes external
20449 \begin_inset Flex Code
20452 \begin_layout Plain Layout
20458 files and so on administration becomes more complicated.
20459 LyX now supports updating the whole tree in which resides the document
20463 \begin_layout Plain Layout
20464 One need to organize the files structure so that all external files are
20465 in the same directory or subdirectories of the document.
20472 This become especially useful once you cooperate with people which neither
20473 know about subversion management nor they have ambition to commit additional
20474 material to the repository.
20478 \begin_layout Standard
20479 \begin_inset Flex Code
20482 \begin_layout Plain Layout
20483 Update local directory from repository
20488 command updates the whole directory and in case of merge conflicts local
20489 version of the files are left, so no unintended data loss occurs.
20490 If local changes are detected user is warned before update starts.
20493 \begin_layout Labeling
20494 \labelwidthstring 00.00.0000
20496 \begin_inset space ~
20500 \begin_inset space ~
20504 \begin_inset Newline newline
20508 \begin_inset Flex Code
20511 \begin_layout Plain Layout
20517 (Ask if changes are detected.)
20518 \begin_inset Newline newline
20522 \begin_inset Flex Code
20525 \begin_layout Plain Layout
20526 svn update --accept mine-full $path
20534 \begin_layout Standard
20536 \begin_inset Flex Code
20539 \begin_layout Plain Layout
20545 stands for the path to the document.
20548 \begin_layout Subsubsection
20554 \begin_layout Standard
20555 This shows the complete history of the SVN document.
20559 \begin_inset Quotes eld
20563 \begin_inset Quotes erd
20568 is shown in a browser.
20571 \begin_layout Subsubsection
20573 \begin_inset CommandInset label
20575 name "subsec:SVN-File-Locking"
20582 \begin_layout Standard
20583 The file exchange through various revision control systems brings the problem
20584 of merge conflicts in case two different users try to edit the same (parts
20586 When such a conflict happens it needs manual resolving and one reasonable
20587 alternative is to provide some kind of locking mechanism, which guarantees
20588 that only one user is allowed to edit file at the given time.
20591 \begin_layout Standard
20592 SVN has two such mechanisms to provide mutual exclusivity for file access
20593 - locks and automatic setting of write permissions (see sec.
20595 \begin_inset CommandInset ref
20597 reference "subsec:Automatical-Locking-Property"
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20615 \begin_layout Plain Layout
20616 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20622 If this property is detected for a given document LyX starts to use SVN
20623 locks for document editing automatically and the whole check-in/out mechanism
20624 switches to the same regimen as for RCS.
20625 This in particular means there are two different modes of file use in LyX:
20628 \begin_layout Itemize
20630 The loaded file is in the read-only mode.
20631 For editing on needs to check-out.
20636 consists of updating from the repository and gaining write lock.
20637 If the lock is not possible to obtain, we remain in unlocked state.
20640 \begin_layout Itemize
20642 The loaded file is in the 'normal' edit mode.
20643 No other user is allowed to edit the file.
20648 consists of commiting changes and releasing write-lock.
20649 If no changes have been made to the document, no commit will be produced
20653 \begin_layout Plain Layout
20654 Don't be puzzled by the fact that you will be asked for commit message anyway.
20659 and only the write-lock will be released.
20662 \begin_layout Standard
20666 \begin_layout Labeling
20667 \labelwidthstring 00.00.0000
20670 svn commit -q -m"<description>" "<file-name>"
20671 \begin_inset Newline newline
20674 svn unlock "<file-name>"
20677 \begin_layout Labeling
20678 \labelwidthstring 00.00.0000
20681 svn update "<file-name>"
20682 \begin_inset Newline newline
20685 svn lock "<file-name>"
20688 \begin_layout Subsubsection
20691 \begin_inset CommandInset label
20693 name "subsec:Automatical-Locking-Property"
20699 Automatic Locking Property
20702 \begin_layout Standard
20703 The above mentioned automatic setting of write permissions of the .lyx file
20709 ile\SpecialChar \menuseparator
20715 \begin_inset space ~
20718 Control\SpecialChar \menuseparator
20723 oggle locking property
20726 This command is active only when the file is not locked on the svn server
20728 you need to check-out before proceeding).
20731 \begin_layout Labeling
20732 \labelwidthstring 00.00.0000
20734 \begin_inset space ~
20740 \begin_layout Labeling
20741 \labelwidthstring 00.00.0000
20744 svn propset svn:needs-lock ON "<file-name>"
20747 \begin_layout Labeling
20748 \labelwidthstring 00.00.0000
20751 svn propdel svn:needs-lock "<file-name>"
20754 \begin_layout Subsubsection
20755 \begin_inset CommandInset label
20757 name "sub:VCS-Revision-Information"
20761 Revision Information in Documents
20764 \begin_layout Standard
20765 There are more possibilities how to activate revision information in our
20769 \begin_layout Itemize
20770 LyX supports directly:
20774 \begin_layout Itemize
20775 tree revision information (
20776 \begin_inset Flex Code
20779 \begin_layout Plain Layout
20786 The result is the output of the
20787 \begin_inset Flex Code
20790 \begin_layout Plain Layout
20796 command, the following table gives you an idea, how to read the results.
20799 \begin_layout Standard
20801 \begin_inset Tabular
20802 <lyxtabular version="3" rows="6" columns="2">
20803 <features rotate="0" tabularvalignment="middle">
20804 <column alignment="center" valignment="top">
20805 <column alignment="center" valignment="top">
20807 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20810 \begin_layout Plain Layout
20816 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20819 \begin_layout Plain Layout
20827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20830 \begin_layout Plain Layout
20836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20839 \begin_layout Plain Layout
20840 mixed revision working copy
20847 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20850 \begin_layout Plain Layout
20856 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20859 \begin_layout Plain Layout
20860 modified working copy
20867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20870 \begin_layout Plain Layout
20876 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20879 \begin_layout Plain Layout
20880 switched working copy
20887 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20890 \begin_layout Plain Layout
20896 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20899 \begin_layout Plain Layout
20900 partial working copy, from a sparse checkout
20907 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20910 \begin_layout Plain Layout
20916 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20919 \begin_layout Plain Layout
20920 mixed revision, modified, switched working copy
20933 \begin_layout Itemize
20934 file revision information.
20935 The result comes from parsing the output of
20936 \begin_inset Flex Code
20939 \begin_layout Plain Layout
20941 \begin_inset space ~
20945 \begin_inset space ~
20949 \begin_inset space ~
20958 Supported flags are:
20962 \begin_layout Itemize
20963 version number of the last commit (
20964 \begin_inset Flex Code
20967 \begin_layout Plain Layout
20976 \begin_layout Itemize
20977 author of the last commit (
20978 \begin_inset Flex Code
20981 \begin_layout Plain Layout
20990 \begin_layout Itemize
20991 date of the last commit (
20992 \begin_inset Flex Code
20995 \begin_layout Plain Layout
21004 \begin_layout Itemize
21005 time of the last commit (
21006 \begin_inset Flex Code
21009 \begin_layout Plain Layout
21019 \begin_layout Standard
21020 You can obtain this info via InsetInfo (e.g.
21022 \begin_inset Flex Code
21025 \begin_layout Plain Layout
21026 info-insert buffer vcs-date
21032 The information will be available only when you have the file stored under
21033 svn managment (i.e.
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21044 directory is available with your document).
21048 \begin_layout Itemize
21049 Another---a hacking one---possibility is to use svn keywords
21053 \begin_layout Plain Layout
21054 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21060 In short -- you set file keywords property (e.g.
21063 svn propset svn:keywords 'Rev' file.lyx
21065 ) and then paste keyword TeX code
21069 \begin_layout Plain Layout
21070 This is an easy way how to ensure that LyX won't break the line in the middle
21076 tag in your document (e.g.
21081 \begin_layout Plain Layout
21089 This way svn client will automatically substitute revision number (e.g.
21094 \begin_layout Plain Layout
21101 ) after each update and commit.
21102 There are more problems with this approach.
21103 Firstly, the '$' character is used in TeX world for math equations, so
21104 any occurence of math formula
21105 \begin_inset Formula $Rev$
21109 \begin_inset Formula $Rev:59$
21112 in your LyX document.
21113 Similarly for other keywords like Id, Date, Author, etc.
21114 Secondly svn output is dependent on your locales, so its very easy that
21115 svn would produce some problematic strings once Date is used.
21116 Thirdly you get the whole 'Rev: 59' string in your document instead of
21118 Until subversion implements user's custom keywords it will be hard to use
21119 this approach reliably or let LyX to support it directly.
21122 \begin_layout Subsection
21123 SVN and Windows Environment
21126 \begin_layout Quote
21127 My inclination is to say that if the user cannot figure out the command
21128 line operations on their own fairly quickly, they would be well advised
21129 to use TortoiseSVN.
21135 \begin_layout Subsubsection
21139 \begin_layout Standard
21140 In addition to installing LyX, and having access to a Subversion repository,
21141 the user will need to install the Subversion client program.
21142 A Windows installer for the client program is available from
21143 \begin_inset CommandInset href
21146 target "http://www.collab.net/nonav/downloads/subversion/"
21151 The user may also want to install
21152 \begin_inset CommandInset href
21155 target "http://tortoisesvn.tigris.org/"
21159 , which integrates Subversion operations into the context (rightclick) menu
21160 of Windows Explorer.
21161 Operations done outside LyX will typically be more convenient using the
21162 Explorer context menu.
21163 Note that TortoiseSVN is not a replacement for the client program, which
21164 is what LyX itself will use.
21167 \begin_layout Subsubsection
21168 Bringing a document under Subversion control
21171 \begin_layout Standard
21172 Before a LyX document can be brought under version control in Subversion,
21173 its parent directory needs to be under version control.
21174 If the document is being added to a project already in the repository,
21175 this is accomplished by checking the project out to the directory where
21176 the new document will be placed.
21177 If the project itself is not yet under version control (for instance, if
21178 this document starts a new project), the directory must be imported into
21180 This is done outside LyX.
21181 Both import and checkout are easily accomplished from the Explorer context
21182 menu using TortoiseSVN, or alternatively can be done using the command
21183 line client at a DOS prompt.
21184 The procedure for importing the project using TortoiseSVN is described
21185 below, assuming an existing repository and a new project being started
21193 For information on using the Subversion client program, run
21200 \begin_layout Enumerate
21207 in Windows Explorer, right click it, and select
21209 TortoiseSVN\SpecialChar \menuseparator
21213 If necessary, adjust the URL for the repository, then click OK.
21216 \begin_layout Enumerate
21217 Right click the level of the repository under which you want to place the
21218 new project folder (typically the top level) and click
21222 Supply a name for the project folder and click OK.
21223 Add a message for the log file if desired, then click OK again.
21224 The new project folder should appear in the repository.
21225 Finally, click OK again to exit the repository browser.
21228 \begin_layout Enumerate
21229 Once again right click
21235 , this time selecting SVN Checkout\SpecialChar \ldots{}
21236 Select the URL of the project folder
21237 you just created in the repository, and set the checkout directory to
21245 You will be warned about a non-empty folder; click OK to proceed.
21246 You should now have a
21257 \begin_layout Enumerate
21258 Create or open your document in LyX and click
21260 File\SpecialChar \menuseparator
21262 \begin_inset space ~
21265 Control\SpecialChar \menuseparator
21269 Add a log message and click OK to commit the document to version control.
21272 \begin_layout Standard
21273 From this point onward, you should have full functionality in the
21275 File\SpecialChar \menuseparator
21277 \begin_inset space ~
21283 You also have the option of checking the document in and out, viewing its
21285 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21286 client program from a command prompt.
21289 \begin_layout Subsubsection
21290 SSH tunnel used with SVN under Windows
21293 \begin_layout Standard
21294 Compared with Linux setting up an svn client to communicate over ssh under
21295 Windows is a rather troublesome task.
21296 We will at least offer some hints how to setup the client side but prior
21297 knowledge about ssh and the Windows command line is needed, also be prepared
21298 for a great deal of frustration\SpecialChar \ldots{}
21302 \begin_layout Enumerate
21303 Get an svn client for windows, as described in the previous sections.
21304 When it is a fresh install run some svn command (e.g.
21306 \begin_inset Flex Code
21309 \begin_layout Plain Layout
21315 ) to create config files, which you will need to change later on.
21318 \begin_layout Enumerate
21319 Choose an ssh client for Windows.
21320 There are several possibilities, we will use the one from Putty tools
21324 \begin_layout Plain Layout
21325 \begin_inset Flex URL
21328 \begin_layout Plain Layout
21330 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21341 You will need to set the connection up so that the client doesn't ask for
21342 any password from you.
21343 To keep things easy we will use only keys without any additional password
21348 \begin_layout Enumerate
21350 \begin_inset Flex Code
21353 \begin_layout Plain Layout
21360 Save your private .ppk key file and put the public one on the server side.
21361 If the SVN server runs on Linux, note that the format of the public key
21362 is not compatible with Linux openssh and you will need to direcly copy-paste
21365 Public key for pasting into OpenSSH authorized_keys file
21367 :” edit field into the server's
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21372 ~/.ssh/authorized_keys
21378 \begin_inset Flex Code
21381 \begin_layout Plain Layout
21390 \begin_layout Enumerate
21392 \begin_inset Flex Code
21395 \begin_layout Plain Layout
21402 In the SVN config file
21406 \begin_layout Plain Layout
21407 Exact path depends on Windows version, usually somewhere around
21408 \begin_inset Flex Code
21411 \begin_layout Plain Layout
21414 Documents and Settings
21428 \begin_inset Flex Code
21431 \begin_layout Plain Layout
21446 , section [tunnels], setup ssh command, e.g.
21448 \begin_inset Flex Code
21451 \begin_layout Plain Layout
21452 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21461 \begin_layout Plain Layout
21462 It will usually take a lot of time to get exact command right and it depends
21464 For example do not have some remote server saved as a default session in
21466 If things fail, try to connect via plink without SVN first.
21475 \begin_layout Enumerate
21476 Checkout the SVN archive, e.
21477 \begin_inset space \thinspace{}
21481 \begin_inset Newline newline
21485 \begin_inset Flex Code
21488 \begin_layout Plain Layout
21489 svn co svn+ssh://user@server/repository_path
21497 \begin_layout Subsubsection
21498 End-of-Line Conversions
21501 \begin_layout Standard
21502 When the collaborators are mixing Linux and Windows environments, LyX will
21503 use different line endings inside the .lyx files.
21504 This is not a problem as far as LyX functionality is concerned, but the
21505 commit diffs will be huge and merge-conflicts prone.
21506 Fortunately SVN itself knows
21510 \begin_layout Plain Layout
21511 \begin_inset Flex URL
21514 \begin_layout Plain Layout
21516 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21526 how to deal with CR/LF problems when switching .lyx files to the
21527 \begin_inset Flex Code
21530 \begin_layout Plain Layout
21540 \begin_layout Plain Layout
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21546 svn propset svn:eol-style native FILE_NAME
21559 \begin_layout Subsection
21560 GIT commands in LyX
21563 \begin_layout Standard
21564 A minimal subset of GIT commands is now supported by LyX.
21565 You can find the commands in the
21567 File\SpecialChar \menuseparator
21569 \begin_inset space ~
21575 Please note that if you use password protected access to repository via
21576 ssh, you will be asked in terminal window.
21577 LyX was tested against GIT 1.7.
21580 \begin_layout Standard
21581 One big difference of GIT and the other supported version control systems
21582 is the distributed nature of GIT: With traditional version control systems
21583 there is one central server which hosts the repository.
21584 Users commit their changes to the server, and get updates made by other
21586 With GIT, users commit to a local repository.
21587 The local repository can be synchronized with one or more remote repositories
21589 \begin_inset Flex Code
21592 \begin_layout Plain Layout
21599 \begin_inset Flex Code
21602 \begin_layout Plain Layout
21609 LyX does not interact in any way with remote GIT repositories.
21610 It works exclusively with the local repository in a very similar way as
21611 with a central CVS or SVN repository.
21612 If you use remote GIT repositories you need to do the
21613 \begin_inset Flex Code
21616 \begin_layout Plain Layout
21623 \begin_inset Flex Code
21626 \begin_layout Plain Layout
21632 operations with your favourite GIT client.
21635 \begin_layout Subsubsection
21641 \begin_layout Standard
21642 If your document is not under revision control, this is the only item shown
21644 And if it is under revision control, the
21651 item is not visible.
21654 \begin_layout Standard
21655 This command registers in GIT your document ONLY in case you have already
21656 the documents directory under GIT control (in particular
21661 This means you have to checkout the archive by yourself.
21664 \begin_layout Standard
21665 Then you are asked interactively to supply an initial description of the
21667 Don't forget that registered file is not yet commited.
21670 \begin_layout Standard
21671 GIT command that is run:
21674 \begin_inset Quotes eld
21678 \begin_inset Quotes erd
21684 \begin_layout Standard
21689 to understand the switches.
21692 \begin_layout Subsubsection
21698 \begin_layout Standard
21699 When you are finished editing a file, you commit your changes.
21700 When you do this, you are asked for a description of the changes.
21701 After that changes are commited.
21704 \begin_layout Standard
21707 git commit -q -m"<description>" <file-name>
21710 \begin_layout Subsubsection
21713 Revert To Repository Version
21716 \begin_layout Standard
21717 This will discard all changes made to the document since the last check
21719 You get a warning before changes are discarded.
21722 \begin_layout Standard
21726 \begin_inset Quotes eld
21730 \begin_inset Quotes erd
21736 \begin_layout Subsubsection
21742 \begin_layout Standard
21743 This will rename the current document including the version history.
21744 It requires a clean document without any changes since the last checkin.
21745 You are asked for a file name and a description of the rename operation.
21746 After that the document is renamed, both locally and in the repository.
21747 If the parent directories of the new and old file names differ, all relative
21748 paths of included files are adjusted (like in
21750 File\SpecialChar \menuseparator
21753 \SpecialChar \ldots{}
21755 Finally, the document is reloaded using the new name.
21758 \begin_layout Labeling
21759 \labelwidthstring 00.00.0000
21761 \begin_inset space ~
21765 \begin_inset space ~
21769 \begin_inset Newline newline
21773 \begin_inset Flex Code
21776 \begin_layout Plain Layout
21780 \begin_inset Quotes eld
21784 \begin_inset Quotes erd
21788 \begin_inset Quotes eld
21792 \begin_inset Quotes erd
21801 \begin_inset Newline newline
21805 \begin_inset Flex Code
21808 \begin_layout Plain Layout
21817 \begin_layout Subsubsection
21823 \begin_layout Standard
21824 This shows the complete history of the GIT document.
21828 \begin_inset Quotes eld
21832 \begin_inset Quotes erd
21837 is shown in a browser.
21840 \begin_layout Subsubsection
21844 \begin_layout Standard
21845 LyX supports GIT hash number of the last commit to the file, author name,
21846 date and time of last commit.
21847 All those are extracted from
21849 git log -n 1 --pretty=format:%H%n%an%n%ai
21852 Tree version information is obtained via
21854 git describe --abbrev --dirty --long
21858 \begin_inset CommandInset ref
21860 reference "sub:VCS-Revision-Information"
21867 \begin_layout Subsection
21871 \begin_layout Standard
21872 With the recent addition of the vc-command function LyX power users are
21873 allowed to create their own commands for revision control.
21876 \begin_layout Standard
21877 As an example you can see how two TortoiseSVN commands could be integrated
21881 \begin_layout Description
21883 \begin_inset Flex Code
21886 \begin_layout Plain Layout
21887 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21895 \begin_layout Description
21897 \begin_inset Flex Code
21900 \begin_layout Plain Layout
21901 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21909 \begin_layout Subsection
21910 Version control and Document comparison
21913 \begin_layout Standard
21914 One of the typical uses of version control is to inspect the changes between
21915 revisions, usually by creating
21916 \begin_inset Flex Code
21919 \begin_layout Plain Layout
21926 While this is useful for plain text files, it is much less useful in the
21927 case of LyX files, which have more a complicated structure.
21928 Hence we provide binding to the Document comparison feature.
21929 There are two ways of calling this feature - either by direct call of
21930 \begin_inset Flex Code
21933 \begin_layout Plain Layout
21939 LyX function (for details see LyX functions manual) or by icon/menu item
21941 \begin_inset Flex MenuItem
21944 \begin_layout Plain Layout
21945 Compare with older revision...
21951 One can either compare two chosen revisions of the document or he can simply
21952 compare the current version of edited text with older revisions (where
21954 \begin_inset Flex MenuItem
21957 \begin_layout Plain Layout
21963 ' revisions back means comparison of the edited file with last commited
21968 \begin_layout Standard
21969 This feature is supported for SVN and RCS though due to the more complicated
21970 versioning scheme of RCS there is a constraint -- when addressing the revisions
21971 in dialog, numbers always point to the last number in RCS revision number,
21974 We don't currently support GIT addressing of revisions, one can just compare
21975 edited document with its revision X steps backs, where X is addressed as
21979 \begin_layout Section
21980 Literate Programming
21983 \begin_layout Standard
21988 (kayvan@sylvan.com)
21992 original documentation written by
21994 Edmar Wienskoski Jr.
21997 (edmar-w-jr@technologist.com)
22000 \begin_layout Subsection
22004 \begin_layout Standard
22005 The main purpose of this documentation is to show you how to use LyX for
22006 literate programming, where it is assumed that you are familiar with this
22007 programming technique, and know what
22008 \begin_inset Quotes eld
22012 \begin_inset Quotes erd
22016 \begin_inset Quotes eld
22020 \begin_inset Quotes erd
22024 If that is not the case, please follow the web links provided in the following
22026 There is a lot of good documentation out there covering old development
22027 history to the latest tools tips.
22030 \begin_layout Standard
22031 It is also assumed that you are familiar with LyX itself to a point that
22032 you are comfortable changing your LyX preferences, and X resources file.
22033 If that is not the case please refer to other LyX documentation to cover
22034 your specific needs.
22037 \begin_layout Subsection
22038 Literate Programming
22041 \begin_layout Standard
22042 From the Literate Programming FAQ:
22045 \begin_layout Quotation
22046 Literate programming is the combination of documentation and source together
22047 in a fashion suited for reading by human beings.
22048 In fact, literate programs should be enjoyable reading, even inviting!
22049 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22050 and documentation in a single file.
22051 Literate programming tools then parse the file to produce either readable
22052 documentation or compilable source.
22053 The WEB style of literate programming was created by D.
22054 \begin_inset space \thinspace{}
22058 Knuth during the development of his TeX typesetting software.
22062 \begin_layout Standard
22063 Another excerpt says:
22066 \begin_layout Quotation
22069 How is literate programming different from verbose commenting?
22072 \begin_layout Quotation
22073 There are three distinguishing characteristics.
22074 In order of importance, they are:
22078 \begin_layout Itemize
22079 flexible order of elaboration
22082 \begin_layout Itemize
22083 automatic support for browsing
22086 \begin_layout Itemize
22087 typeset documentation, especially diagrams and mathematics
22091 \begin_layout Standard
22092 Now that I sparked your curiosity, take a look in the references.
22095 \begin_layout Subsubsection
22099 \begin_layout Standard
22100 The complete Literate Programming FAQ can be found at:
22103 \begin_layout Quote
22104 Literate Programming FAQ
22105 \begin_inset Flex URL
22108 \begin_layout Plain Layout
22110 http://www.literateprogramming.com/lpfaq.pdf
22118 \begin_layout Standard
22119 The FAQ lists 23 (twenty three!) different literate programming tools.
22120 Where some are specialized or
22121 \begin_inset Quotes eld
22125 \begin_inset Quotes erd
22128 for particular programming languages, while other have general scope.
22133 for my own use for several reasons:
22136 \begin_layout Itemize
22137 It can generate the documentation either in LaTeX or HTML.
22140 \begin_layout Itemize
22141 It has a open architecture, i.
22142 \begin_inset space \thinspace{}
22146 \begin_inset space \space{}
22149 it is easy to plug in new filters and to perform special processing that
22154 \begin_layout Itemize
22155 There is a good selection of filters available already (the HTML is one
22159 \begin_layout Itemize
22163 \begin_layout Standard
22164 The Noweb web page can be found at:
22167 \begin_layout Quote
22169 \begin_inset Flex URL
22172 \begin_layout Plain Layout
22174 http://www.cs.virginia.edu/~nr/noweb/
22182 \begin_layout Standard
22183 Starting from there you can reach many other interesting links and even
22184 some literate program examples.
22187 \begin_layout Subsection
22188 LyX and Literate Programming with Noweb
22191 \begin_layout Standard
22192 The LyX support for Literate Programming is provided by using the generic
22193 LyX converters mechanism.
22194 This support is provided in a
22195 \begin_inset Quotes eld
22199 \begin_inset Quotes erd
22203 \begin_inset space \thinspace{}
22207 \begin_inset space \space{}
22210 you will be able to use this new LyX feature with some other literate programmin
22211 g tool of your choice by just changing your LyX preferences.
22214 \begin_layout Subsubsection
22215 Generating documents and code (weaving and tangling)
22218 \begin_layout Paragraph
22219 Using the noweb module
22222 \begin_layout Standard
22223 If you have installed Noweb and LyX successfully, whenever you open a new
22224 document, after you have chosen its document class, use the Document->Settings
22226 \begin_inset Quotes eld
22230 \begin_inset Quotes erd
22234 If Noweb is correctly installed, when you click on the
22235 \begin_inset Quotes eld
22239 \begin_inset Quotes erd
22242 link, you will see the
22243 \begin_inset Quotes eld
22247 \begin_inset Quotes erd
22250 module in the available list and you can add it to your document.
22253 \begin_layout Paragraph
22257 \begin_layout Standard
22258 LyX enables you to write code with a layout named
22259 \begin_inset Flex Noun
22262 \begin_layout Plain Layout
22269 Noweb delimits chunks like this:
22272 \begin_layout LyX-Code
22276 \begin_layout LyX-Code
22280 \begin_layout LyX-Code
22284 \begin_layout LyX-Code
22288 \begin_layout LyX-Code
22292 \begin_layout Standard
22293 The problem is that whatever is written in between the << and the
22297 must be taken literally, i.
22298 \begin_inset space \thinspace{}
22302 \begin_inset space \space{}
22305 LyX should be prevented from making any special interpretation of what has
22307 This is also handled by
22308 \begin_inset Flex Noun
22311 \begin_layout Plain Layout
22317 , that works like a normal paragraph but has a free spacing capability.
22320 \begin_layout Standard
22321 As a special note, you can also use the
22322 \begin_inset Quotes eld
22326 \begin_inset Quotes erd
22329 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22333 \begin_layout LyX-Code
22337 \begin_layout LyX-Code
22338 def some_function(args):
22341 \begin_layout LyX-Code
22342 "This is the doc string for this function."
22345 \begin_layout LyX-Code
22346 print "My args: ", args
22349 \begin_layout LyX-Code
22350 @ %def some_function
22353 \begin_layout Standard
22354 For an example of this usage and the resulting cross-reference output, look
22355 at the Literate python program in
22357 LIBDIR/examples/listerrors.lyx
22359 which should make this all clear.
22362 \begin_layout Paragraph
22363 Generating the documentation
22366 \begin_layout Standard
22367 At this point you already have a new document file with a proper document
22368 class, and with some code and text on it.
22369 How do I print it? The answer is simple, you select
22371 View\SpecialChar \menuseparator
22375 Just like you would do for a plain document.
22376 No special procedure is required.
22379 \begin_layout Standard
22380 To help orientate you, I will now explain what happens inside LyX:
22383 \begin_layout Enumerate
22386 Update\SpecialChar \menuseparator
22389 menu option is chosen, a LaTeX file is generated.
22394 \begin_layout Standard
22395 If the document is of any literate class the generated file will be named
22396 with an extension name defined by the
22397 \begin_inset Quotes eld
22401 \begin_inset Quotes erd
22404 format (defined in the Preferences panel), otherwise the file will have
22413 \begin_layout Enumerate
22414 Note that the only difference so far is in the name of the file, no special
22415 processing is required by LyX.
22416 Given that you formatted the code using the
22417 \begin_inset Flex Noun
22420 \begin_layout Plain Layout
22426 layout that, by itself, takes care of the business.
22429 \begin_layout Enumerate
22430 If the document is of any literate class LyX will then use the internal
22431 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22435 \begin_layout Plain Layout
22436 The converters are defined in the
22438 Tools\SpecialChar \menuseparator
22442 \begin_inset Quotes eld
22446 \begin_inset Quotes erd
22458 manual for general information about converters.
22463 to generate the LaTeX file.
22467 \begin_layout Standard
22468 Otherwise it will just skip this step.
22472 \begin_layout Enumerate
22473 Finally, LaTeX is invoked and the regular post processing continues as in
22477 \begin_layout Standard
22478 Independence from a particular
22479 \begin_inset Quotes eld
22483 \begin_inset Quotes erd
22486 is easily achieved by changing the commands that are run by the various
22490 \begin_layout Paragraph
22491 Generating the code
22494 \begin_layout Standard
22495 When the build menu option is chosen or the corresponding button in the
22496 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22497 Next, LyX invokes the
22502 This converter needs to be defined by the user and is not installed by
22503 default, though the Program format is.
22504 This converter (like any other converter) will have two parts:
22507 \begin_layout Enumerate
22508 The converter program itself.
22509 This program performs the conversion from the one format to the other (in
22510 this case, from the Noweb format to the Program pseudo-format).
22513 \begin_layout Enumerate
22514 The error log parser.
22515 This is a program whose sole purpose is to rewrite error messages in a
22516 format that LyX understands.
22517 This makes it possible for LyX to place error boxes in the right places
22518 in the file buffer.
22521 \begin_layout Standard
22522 The first part, the
22523 \begin_inset Quotes eld
22527 \begin_inset Quotes erd
22530 setting, should be set to
22531 \begin_inset Newline newline
22535 \begin_inset Quotes eld
22543 \begin_inset Quotes erd
22547 \begin_inset Newline newline
22550 This basically means that LyX will call
22551 \begin_inset Quotes eld
22555 \begin_inset Quotes erd
22558 (a program or script) with the name of the Noweb file (normally a file
22559 in the LyX temp directory) and the directory path of the original LyX file.
22563 \begin_layout Standard
22564 This is an implementation of
22565 \begin_inset Quotes eld
22569 \begin_inset Quotes erd
22572 that you can place in a directory on your path:
22575 \begin_layout Standard
22576 \begin_inset VSpace defskip
22582 \begin_layout Standard
22583 \begin_inset Newpage pagebreak
22589 \begin_layout Standard
22595 \begin_layout Standard
22601 \begin_layout Standard
22604 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22607 \begin_layout Standard
22608 \begin_inset VSpace defskip
22614 \begin_layout Standard
22615 The next part of the converter setting is the
22616 \begin_inset Quotes eld
22620 \begin_inset Quotes erd
22623 which is to be set to
22624 \begin_inset Newline newline
22628 \begin_inset Quotes eld
22633 parselog=$$s/scripts/listerrors
22636 \begin_inset Quotes erd
22640 \begin_inset Newline newline
22643 This will run any errors that are generated by the
22644 \begin_inset Quotes eld
22648 \begin_inset Quotes erd
22651 process through the
22652 \begin_inset Quotes eld
22656 \begin_inset Quotes erd
22662 \begin_layout Standard
22663 The build will normally take place in LyX's temporary directory, so the
22664 files produced by the conversion will be in that directory.
22665 LyX will copy out what it regards as the `main' file, but the
22669 conversion may produce several files, and so most of these would then be
22670 deleted when LyX was closed.
22671 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22672 the build-script chunk can place the generated files in that location.
22675 \begin_layout Paragraph
22676 Build instructions in the document
22679 \begin_layout Standard
22680 The last piece of the integration between LyX and noweb is the
22681 \begin_inset Quotes eld
22685 \begin_inset Quotes erd
22689 Generally, the instructions for building your program should be embedded
22690 in a chunk of its own.
22692 \begin_inset Quotes eld
22696 \begin_inset Quotes erd
22699 above uses the notangle command to look for this chunk (called
22700 \begin_inset Quotes eld
22704 \begin_inset Quotes erd
22707 ) and runs its contents through
22708 \begin_inset Quotes eld
22712 \begin_inset Quotes erd
22718 \begin_layout Standard
22719 Typically, such a chunk would look something like this:
22722 \begin_layout LyX-Code
22726 \begin_layout LyX-Code
22728 \begin_inset Newline newline
22731 if [ -z "${NOWEB_SOURCE}" ]
22732 \begin_inset Newline newline
22738 \begin_layout LyX-Code
22739 NOWEB_SOURCE=myfile.nw
22740 \begin_inset Newline newline
22744 \begin_inset Newline newline
22748 code to extract files ...
22749 use NOWEB_OUTPUT_DIR here ...]
22750 \begin_inset Newline newline
22754 code to compile files ...]
22755 \begin_inset Newline newline
22761 \begin_layout Standard
22764 LIBDIR/examples/listerrors.lyx
22768 LIBDIR/examples/Literate.lyx
22770 which implement two versions of the
22771 \begin_inset Quotes eld
22775 \begin_inset Quotes erd
22778 program for some illustrations of how all of these pieces go together or
22781 LIBDIR/examples/noweb2lyx.lyx.
22784 Interestingly, these three files show off the language-indepence of the
22785 LyX literate programming support since they are written in Python, C and
22789 \begin_layout Subsubsection
22793 \begin_layout Standard
22794 All the Literate Programming support is configured by the
22796 Tools\SpecialChar \menuseparator
22800 \begin_inset Quotes eld
22804 \begin_inset Quotes erd
22808 The important parts are:
22811 \begin_layout Description
22813 \begin_inset space ~
22817 \begin_inset Quotes eld
22821 \begin_inset Quotes erd
22825 \begin_inset space ~
22828 format Set up via the File Formats tab, this is where the Noweb-specific
22838 , the file extension is set to
22843 This tells LyX to create a file with a
22847 extension in the first step of the conversion process.
22850 \begin_layout Description
22852 \begin_inset space ~
22860 \begin_inset space ~
22863 format This is an empty format whose sole purpose is to be the endpoint
22864 of a conversion (which then allows us to set up a converter for it).
22867 \begin_layout Description
22876 This converter performs the
22877 \begin_inset Quotes eld
22881 \begin_inset Quotes erd
22884 of the literate document.
22885 For Noweb, it is set to
22886 \begin_inset Quotes eld
22891 noweave -delay -index $$i > $$o
22894 \begin_inset Quotes erd
22900 \begin_layout Description
22910 \begin_inset Quotes eld
22914 \begin_inset Quotes erd
22918 As stated above, the Converter is set to
22919 \begin_inset Quotes eld
22927 \begin_inset Quotes erd
22930 , with Flags set to
22931 \begin_inset Newline newline
22935 \begin_inset Quotes eld
22940 parselog=$$s/scripts/listerrors
22943 \begin_inset Quotes erd
22949 \begin_layout Subsubsection
22953 \begin_layout Standard
22954 There is also a new function implemented in the LyX server, the
22955 \begin_inset Quotes eld
22958 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22962 \begin_layout Standard
22963 When debugging code with ddd/gdb, it is possible to invoke a text editor
22964 at the current execution position with a single key stroke.
22965 The default ddd configuration for that is shift-ctrl-V.
22966 It happens that you can define the editor command line invocation in ddd
22969 Edit\SpecialChar \menuseparator
22970 Preferences\SpecialChar \menuseparator
22973 dialog and changing the "Edit Sources" entry.
22976 \begin_layout Standard
22977 I take advantage of the newly created LyX server function and this ddd feature,
22979 \begin_inset Quotes eld
22983 \begin_inset Quotes erd
22989 \begin_layout Standard
22990 \begin_inset VSpace defskip
22996 \begin_layout Standard
22999 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23002 \begin_layout Standard
23003 \begin_inset VSpace defskip
23009 \begin_layout Standard
23010 With this, whenever you are using ddd and find a point in the program that
23011 you want to edit, you just press shift-ctrl-V (in the ddd window), and
23012 ddd will forward this information to LyX through the LyX server and then
23013 the LyX window will show the same file with the cursor at the same position
23014 ddd was pointing to.
23015 No more guessing or long scrolling to locate a point in the program back
23019 \begin_layout Standard
23020 Note however that you must enable the LyX server to get this feature working
23021 (it is disabled by default).
23022 You can enable it in
23034 ) by entering in the
23039 \begin_inset Quotes eld
23044 /home/<your-home-directory>/.lyx/lyxpipe
23047 \begin_inset Quotes erd
23053 \begin_layout Standard
23054 Read the LyX server documentation in the
23056 Customization Manual
23058 for further information.
23061 \begin_layout Subsubsection
23065 \begin_layout Standard
23066 There are six new buttons that can be added to your LyX toolbar.
23067 Five of these buttons are short cuts to layout styles:
23088 The last one is a short cut to the
23089 \begin_inset Quotes eld
23093 \begin_inset Quotes erd
23100 \begin_layout Standard
23101 LyX has a range of buttons that are available for tool bar customization.
23102 In my toolbar I like to combine the six short cuts above with two more:
23107 \SpecialChar \menuseparator
23112 \SpecialChar \menuseparator
23119 Document\SpecialChar \menuseparator
23120 View\SpecialChar \menuseparator
23124 Here is how it looks like:
23127 \begin_layout LyX-Code
23131 \begin_layout LyX-Code
23135 \begin_layout LyX-Code
23136 Icon "layout Standard"
23139 \begin_layout LyX-Code
23140 Icon "layout Section"
23143 \begin_layout LyX-Code
23144 Icon "layout LaTeX"
23147 \begin_layout LyX-Code
23148 Icon "layout LyX-Code"
23151 \begin_layout LyX-Code
23152 Icon "layout Chunk"
23155 \begin_layout LyX-Code
23159 \begin_layout LyX-Code
23163 \begin_layout LyX-Code
23164 Icon "buffer-typeset"
23167 \begin_layout LyX-Code
23168 Icon "build-program"
23171 \begin_layout LyX-Code
23175 \begin_layout LyX-Code
23179 \begin_layout LyX-Code
23183 \begin_layout LyX-Code
23187 \begin_layout LyX-Code
23191 \begin_layout Subsubsection
23192 Colors customization
23195 \begin_layout Standard
23196 There are a number of colors in LyX that can be customized in
23201 One of the things that bothers people is the LaTeX font color.
23202 The default color is red, since the chunks uses LaTeX font, and there is
23203 a lot of chunks in literate documents, you may get tired of seeing everything
23205 You can change it by going to the tabs
23214 \begin_layout Standard
23215 The next thing is the visible presence of the newline character in the screen.
23216 You can choose the color of this particular character and make it blend
23218 I recommend you choosing a color that is close to the background but not
23219 equal, that way you still can see it is there, but it is not bothering
23223 \begin_layout Subsection
23224 LyX and knitr/Sweave
23227 \begin_layout Standard
23236 is documented in the
23240 example file and in the Sweave manual (menu
23242 Help\SpecialChar \menuseparator
23248 \begin_layout Chapter
23252 \begin_layout Standard
23253 You can do everything with LyX that you can do with LaTeX.
23254 However, LyX cannot support every LaTeX feature directly.
23255 But you can always use TeX Code.
23256 This chapter shows you some more special things you might want to use.
23257 For other special things you can do with figures, tables, floats, boxes
23258 and notes, have a look at the
23261 \begin_inset space ~
23269 \begin_layout Section
23270 Multiple Text Columns
23273 \begin_layout Standard
23274 This feature is independent of the option
23276 Two-column document
23278 in the document settings under
23283 If you want to have 2
23284 \begin_inset space ~
23287 columns for the whole document, it is recommended to use the
23289 Two-column document
23292 For all other cases use this feature.
23295 \begin_layout Standard
23296 To use multiple text columns in your document, you have to load the module
23303 Document\SpecialChar \menuseparator
23304 Settings\SpecialChar \menuseparator
23307 ) and must have the LaTeX-package
23314 \begin_layout Standard
23315 Footnotes within multiple columns will be placed at the bottom of the page
23316 and not under each column.
23317 Within the different columns you can use everything, with the limitation
23318 that for floats you need to use the float option
23325 \begin_layout Subsection
23329 \begin_layout Standard
23330 If you want to have 2
23331 \begin_inset space ~
23334 columns in your text, insert a multicolumn inset via the menu
23336 Insert\SpecialChar \menuseparator
23338 \begin_inset space ~
23341 Insets\SpecialChar \menuseparator
23343 \begin_inset space ~
23348 where the columns should start.
23349 Write all text that should be printed in 2
23350 \begin_inset space ~
23353 columns into this inset.
23356 \begin_layout Standard
23357 Here is an example:
23360 \begin_layout Standard
23362 \begin_inset Flex Multiple Columns
23365 \begin_layout Plain Layout
23370 The Adventure of the Empty House
23373 \begin_inset Newline newline
23376 by Sir Arthur Conan Doyle
23379 \begin_layout Plain Layout
23382 It was in the spring of the year 1894 that all London was interested, and
23383 the fashionable world dismayed, by the murder of the Honourable Ronald
23384 Adair under most unusual and inexplicable circumstances.
23385 The public has already learned those particulars of the crime which came
23386 out in the police investigation, but a good deal was suppressed upon that
23387 occasion, since the case for the prosecution was so overwhelmingly strong
23388 that it was not necessary to bring forward all the facts.
23389 Only now, at the end of nearly ten years, am I allowed to supply those
23390 missing links which make up the whole of that remarkable chain.
23391 The crime was of interest in itself, but that interest was as nothing to
23392 me compared to the inconceivable sequel, which afforded me the greatest
23393 shock and surprise of any event in my adventurous life.
23394 Even now, after this long interval, I find myself thrilling as I think
23395 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23396 ty which utterly submerged my mind.
23397 Let me say to that public, which has shown some interest in those glimpses
23398 which I have occasionally given them of the thoughts and actions of a very
23399 remarkable man, that they are not to blame me if I have not shared my knowledge
23400 with them, for I should have considered it my first duty to do so, had
23401 I not been barred by a positive prohibition from his own lips, which was
23402 only withdrawn upon the third of last month.
23410 \begin_layout Standard
23411 To get 3 or more columns, set the cursor into the multicolumn inset and
23414 Insert\SpecialChar \menuseparator
23416 \begin_inset space ~
23420 \begin_inset space ~
23426 The number of the desired columns is written into that inset (for 3
23427 \begin_inset space ~
23431 \begin_inset Quotes eld
23435 \begin_inset Quotes erd
23439 \begin_inset Newline newline
23442 Here is an example with 3
23443 \begin_inset space ~
23449 \begin_layout Standard
23450 \begin_inset Flex Multiple Columns
23453 \begin_layout Plain Layout
23456 \begin_inset Argument 1
23459 \begin_layout Plain Layout
23465 It can be imagined that my close intimacy with Sherlock Holmes had interested
23466 me deeply in crime, and that after his disappearance I never failed to
23467 read with care the various problems which came before the public.
23468 And I even attempted, more than once, for my own private satisfaction,
23469 to employ his methods in their solution, though with indifferent success.
23470 There was none, however, which appealed to me like this tragedy of Ronald
23472 As I read the evidence at the inquest, which led up to a verdict of willful
23473 murder against some person or persons unknown, I realized more clearly
23474 than I had ever done the loss which the community had sustained by the
23475 death of Sherlock Holmes.
23476 There were points about this strange business which would, I was sure,
23477 have specially appealed to him, and the efforts of the police would have
23478 been supplemented, or more probably anticipated, by the trained observation
23479 and the alert mind of the first criminal agent in Europe.
23480 All day, as I drove upon my round, I turned over the case in my mind and
23481 found no explanation which appeared to me to be adequate.
23482 At the risk of telling a twice-told tale, I will recapitulate the facts
23483 as they were known to the public at the conclusion of the inquest.
23491 \begin_layout Standard
23492 You can have up to 10
23493 \begin_inset space ~
23496 columns if you want to, but that might not be very pleasant for the readers
23500 \begin_layout Standard
23501 \begin_inset Newpage newpage
23507 \begin_layout Subsection
23508 Columns inside Columns
23511 \begin_layout Standard
23512 You can also have columns inside columns:
23515 \begin_layout Standard
23516 \begin_inset Flex Multiple Columns
23519 \begin_layout Plain Layout
23522 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23523 at that time governor of one of the Australian colonies.
23524 Adair's mother had returned from Australia to undergo the operation for
23525 cataract, and she, her son Ronald, and her daughter Hilda were living together
23529 \begin_layout Plain Layout
23530 \begin_inset Flex Multiple Columns
23533 \begin_layout Plain Layout
23536 The youth moved in the best society–had, so far as was known, no enemies
23537 and no particular vices.
23538 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23539 had been broken off by mutual consent some months before, and there was
23540 no sign that it had left any very profound feeling behind it.
23541 For the rest {sic} the man's life moved in a narrow and conventional circle,
23542 for his habits were quiet and his nature unemotional.
23543 Yet it was upon this easy-going young aristocrat that death came, in most
23544 strange and unexpected form, between the hours of ten and eleven-twenty
23545 on the night of March 30, 1894.
23553 \begin_layout Plain Layout
23556 Ronald Adair was fond of cards–playing continually, but never for such stakes
23558 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23559 It was shown that, after dinner on the day of his death, he had played
23560 a rubber of whist at the latter club.
23561 He had also played there in the afternoon.
23566 The evidence of those who had played with him– Mr.
23567 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23568 and that there was a fairly equal fall of the cards.
23569 Adair might have lost five pounds, but not more.
23570 His fortune was a considerable one, and such a loss could not in any way
23572 He had played nearly every day at one club or other, but he was a cautious
23573 player, and usually rose a winner.
23574 It came out in evidence that, in partnership with Colonel Moran, he had
23575 actually won as much as four hundred and twenty pounds in a sitting, some
23576 weeks before, from Godfrey Milner and Lord Balmoral.
23577 So much for his recent history as it came out at the inquest.
23585 \begin_layout Subsection
23589 \begin_layout Standard
23590 The examples in this section show some more special features of multiple
23594 \begin_layout Standard
23595 For more features of multiple columns, have a look at the documentation
23596 of the LaTeX-package
23601 \begin_inset CommandInset citation
23610 \begin_layout Subsubsection
23614 \begin_layout Standard
23615 To add a preface text for multiple columns, set the cursor into the multicolumn
23616 inset and use the menu
23618 Insert\SpecialChar \menuseparator
23622 Write your preface text into that inset.
23623 \begin_inset Newline newline
23626 This is an example with some preface text:
23629 \begin_layout Standard
23630 \begin_inset VSpace bigskip
23636 \begin_layout Standard
23637 \begin_inset Flex Multiple Columns
23640 \begin_layout Plain Layout
23641 \begin_inset Argument 2
23644 \begin_layout Plain Layout
23645 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23653 On the evening of the crime, he returned from the club exactly at ten.
23654 His mother and sister were out spending the evening with a relation.
23655 The servant deposed that she heard him enter the front room on the second
23656 floor, generally used as his sitting-room.
23657 She had lit a fire there, and as it smoked she had opened the window.
23658 No sound was heard from the room until eleven-twenty, the hour of the return
23659 of Lady Maynooth and her daughter.
23660 Desiring to say good-night, she attempted to enter her son's room.
23661 The door was locked on the inside, and no answer could be got to their
23662 cries and knocking.
23663 Help was obtained, and the door forced.
23664 The unfortunate young man was found lying near the table.
23665 His head had been horribly mutilated by an expanding revolver bullet, but
23666 no weapon of any sort was to be found in the room.
23674 \begin_layout Standard
23675 You can also use a section heading as the preface if you use a section command
23677 For example the command
23680 \begin_layout Standard
23685 subsection{subsection title}
23688 \begin_layout Standard
23689 creates a subsection.
23690 In this example the preface is a subsubsection:
23693 \begin_layout Standard
23694 \begin_inset Flex Multiple Columns
23697 \begin_layout Plain Layout
23698 \begin_inset Argument 2
23701 \begin_layout Plain Layout
23705 \begin_layout Plain Layout
23714 This is a subsubsection heading as a preface
23718 \begin_layout Plain Layout
23732 A minute examination of the circumstances served only to make the case more
23734 In the first place, no reason could be given why the young man should have
23735 fastened the door upon the inside.
23736 There was the possibility that the murderer had done this, and had afterwards
23737 escaped by the window.
23738 The drop was at least twenty feet, however, and a bed of crocuses in full
23740 Neither the flowers nor the earth showed any sign of having been disturbed,
23741 nor were there any marks upon the narrow strip of grass which separated
23742 the house from the road.
23743 Apparently, therefore, it was the young man himself who had fastened the
23745 But how did he come by his death? No one could have climbed up to the window
23746 without leaving traces.
23747 Suppose a man had fired through the window, he would indeed be a remarkable
23748 shot who could with a revolver inflict so deadly a wound.
23749 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23750 a hundred yards of the house.
23751 No one had heard a shot.
23759 \begin_layout Standard
23760 If there is less vertical space than 6
23761 \begin_inset space ~
23764 text lines is left on the page at the beginning of the multiple columns,
23765 a page break will be inserted before the multiple columns.
23766 Depending on the number of lines of the preface text, you might want to
23768 This is done by setting the cursor into the mulitcolumn inset behind the
23769 preface (if there is any) and using the menu
23771 Insert\SpecialChar \menuseparator
23773 \begin_inset space ~
23777 \begin_inset space ~
23781 \begin_inset space ~
23787 Insert into that inset the amount of space like e.
23788 \begin_inset space \thinspace{}
23792 \begin_inset space \space{}
23796 \begin_inset Quotes eld
23800 \begin_inset Quotes erd
23804 \begin_inset Newline newline
23807 In this example the space is set to 7
23808 \begin_inset space ~
23811 text lines by using
23812 \begin_inset Quotes eld
23818 \begin_inset Quotes erd
23827 needs to be inserted as TeX code):
23830 \begin_layout Standard
23831 \begin_inset Flex Multiple Columns
23834 \begin_layout Plain Layout
23835 \begin_inset Argument 3
23838 \begin_layout Plain Layout
23843 \begin_layout Plain Layout
23859 On the evening of the crime, he returned from the club exactly at ten.
23860 His mother and sister were out spending the evening with a relation.
23861 The servant deposed that she heard him enter the front room on the second
23862 floor, generally used as his sitting-room.
23863 She had lit a fire there, and as it smoked she had opened the window.
23864 No sound was heard from the room until eleven-twenty, the hour of the return
23865 of Lady Maynooth and her daughter.
23866 Desiring to say good-night, she attempted to enter her son's room.
23867 The door was locked on the inside, and no answer could be got to their
23868 cries and knocking.
23869 Help was obtained, and the door forced.
23870 The unfortunate young man was found lying near the table.
23871 His head had been horribly mutilated by an expanding revolver bullet, but
23872 no weapon of any sort was to be found in the room.
23880 \begin_layout Subsubsection
23884 \begin_layout Standard
23885 The amount of space before and after multiple columns can be changed by
23886 changing the length
23893 For example the command
23896 \begin_layout Standard
23906 \begin_layout Standard
23907 in TeX Code changes its value to 3
23908 \begin_inset space \thinspace{}
23912 The change must be made before the multiple columns' start.
23913 The predefined value is 13
23914 \begin_inset space \thinspace{}
23920 \begin_layout Standard
23928 \begin_inset space \thinspace{}
23934 \begin_layout Standard
23938 \begin_layout Plain Layout
23944 multicolsep}{2.5cm}
23952 \begin_layout Standard
23953 \begin_inset Flex Multiple Columns
23956 \begin_layout Plain Layout
23959 All day I turned these facts over in my mind, endeavouring to hit upon some
23960 theory which could reconcile them all, and to find that line of least resistanc
23961 e which my poor friend had declared to be the starting-point of every investigat
23963 I confess that I made little progress.
23964 In the evening I strolled across the Park, and found myself about six o'clock
23965 at the Oxford Street end of Park Lane.
23966 A group of loafers upon the pavements, all staring up at a particular window,
23967 directed me to the house which I had come to see.
23968 A tall, thin man with coloured glasses, whom I strongly suspected of being
23969 a plain-clothes detective, was pointing out some theory of his own, while
23970 the others crowded round to listen to what he said.
23971 I got as near him as I could, but his observations seemed to me to be absurd,
23972 so I withdrew again in some disgust.
23973 As I did so I struck against an elderly, deformed man, who had been behind
23974 me, and I knocked down several books which he was carrying.
23982 \begin_layout Standard
23983 \begin_inset Note Greyedout
23986 \begin_layout Plain Layout
23991 The values you set with
23997 will be used for all following multiple columns until you change them again.
24005 \begin_layout Standard
24009 \begin_layout Plain Layout
24021 \begin_inset Note Note
24024 \begin_layout Plain Layout
24025 go back to the default
24033 \begin_layout Standard
24034 \begin_inset Newpage newpage
24040 \begin_layout Subsubsection
24044 \begin_layout Standard
24045 A column break can be forced by inserting the command
24051 as TeX-Code to that position in the text where the column should be broken.
24052 Note that this leads in most cases to whitespace in the text.
24053 \begin_inset Newline newline
24056 Here is an example:
24059 \begin_layout Standard
24060 \begin_inset Flex Multiple Columns
24063 \begin_layout Plain Layout
24066 \begin_inset Quotes eld
24069 You're surprised to see me, sir,
24070 \begin_inset Quotes erd
24073 said he, in a strange, croaking voice.
24076 \begin_layout Plain Layout
24079 I acknowledged that I was.
24082 \begin_layout Plain Layout
24085 \begin_inset Quotes eld
24088 Well, I've a conscience, sir, and when I chanced to see you go into this
24089 house, as I came hobbling after you, I thought to myself, I'll just step
24090 in and see that kind gentleman, and tell him that if I was a bit gruff
24091 in my manner there was not any harm meant, and that I am much obliged to
24092 him for picking up my books.
24093 \begin_inset Quotes erd
24099 \begin_layout Plain Layout
24102 \begin_inset Quotes eld
24105 You make too much of a trifle,
24106 \begin_inset Quotes erd
24111 \begin_inset Quotes eld
24114 May I ask how you knew who I was?
24115 \begin_inset Quotes erd
24118 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24122 \begin_layout Plain Layout
24134 \begin_layout Plain Layout
24137 \begin_inset Quotes eld
24140 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24141 you'll find my little bookshop at the corner of Church Street, and very
24142 happy to see you, I am sure.
24143 Maybe you collect yourself, sir.
24147 \begin_inset space ~
24160 --a bargain, every one of them.
24161 With five volumes you could just fill that gap on that second shelf.
24162 It looks untidy, does it not, sir?
24163 \begin_inset Quotes erd
24174 \begin_layout Subsubsection
24178 \begin_layout Standard
24179 The width of the columns is automatically calculated, but you can modify
24180 the space between the columns.
24181 This is done by changing the length
24188 Its predefined value is 10
24189 \begin_inset space \thinspace{}
24193 Here is an example where
24200 \begin_inset space \thinspace{}
24206 \begin_layout Standard
24210 \begin_layout Plain Layout
24224 \begin_layout Standard
24225 \begin_inset Flex Multiple Columns
24228 \begin_layout Plain Layout
24231 My observations of No.
24232 \begin_inset space \space{}
24235 427 Park Lane did little to clear up the problem in which I was interested.
24236 The house was separated from the street by a low wall and railing, the
24237 whole not more than five feet high.
24238 It was perfectly easy, therefore, for anyone to get into the garden, but
24239 the window was entirely inaccessible, since there was no water pipe or
24240 anything which could help the most active man to climb it.
24241 More puzzled than ever, I retraced my steps to Kensington.
24242 I had not been in my study five minutes when the maid entered to say that
24243 a person desired to see me.
24244 To my astonishment it was none other than my strange old book collector,
24245 his sharp, wizened face peering out from a frame of white hair, and his
24246 precious volumes, a dozen of them at least, wedged under his right arm.
24254 \begin_layout Standard
24258 \begin_layout Plain Layout
24270 \begin_inset Note Note
24273 \begin_layout Plain Layout
24274 go back to the default
24282 \begin_layout Subsubsection
24286 \begin_layout Standard
24287 Between the columns a rule with a width of the length
24294 If this rule width is set to 0
24295 \begin_inset space \thinspace{}
24298 pt (this is the default), the rule is suppressed.
24299 In the following example the rule is 2
24300 \begin_inset space \thinspace{}
24306 \begin_layout Standard
24310 \begin_layout Plain Layout
24316 columnseprule}{2pt}
24324 \begin_layout Standard
24325 \begin_inset Flex Multiple Columns
24328 \begin_layout Plain Layout
24331 \begin_inset Quotes eld
24334 You're surprised to see me, sir,
24335 \begin_inset Quotes erd
24338 said he, in a strange, croaking voice.
24341 \begin_layout Plain Layout
24344 I acknowledged that I was.
24347 \begin_layout Plain Layout
24350 \begin_inset Quotes eld
24353 Well, I've a conscience, sir, and when I chanced to see you go into this
24354 house, as I came hobbling after you, I thought to myself, I'll just step
24355 in and see that kind gentleman, and tell him that if I was a bit gruff
24356 in my manner there was not any harm meant, and that I am much obliged to
24357 him for picking up my books.
24358 \begin_inset Quotes erd
24364 \begin_layout Plain Layout
24367 \begin_inset Quotes eld
24370 You make too much of a trifle,
24371 \begin_inset Quotes erd
24376 \begin_inset Quotes eld
24379 May I ask how you knew who I was?
24380 \begin_inset Quotes erd
24386 \begin_layout Plain Layout
24389 \begin_inset Quotes eld
24392 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24393 you'll find my little bookshop at the corner of Church Street, and very
24394 happy to see you, I am sure.
24395 Maybe you collect yourself, sir.
24399 \begin_inset space ~
24412 --a bargain, every one of them.
24413 With five volumes you could just fill that gap on that second shelf.
24414 It looks untidy, does it not, sir?
24415 \begin_inset Quotes erd
24426 \begin_layout Standard
24427 \begin_inset VSpace defskip
24433 \begin_layout Standard
24434 The rule can be colored by redefining the command
24441 This is done by inserting the command
24442 \begin_inset Newline newline
24451 columnseprulecolor}{
24456 \begin_inset Newline newline
24459 as TeX-Code before the multicolumn inset.
24464 in this command by a color of your choice.
24465 You can use all pre- and self-defined colors.
24473 \begin_inset space ~
24478 for more information about pre- and self-defined colors.
24479 To go back to the default color insert the command
24480 \begin_inset Newline newline
24489 columnseprulecolor}{
24494 \begin_inset Newline newline
24497 Here is the example with a cyan rule and 1
24498 \begin_inset space \thinspace{}
24501 cm column separation:
24504 \begin_layout Standard
24508 \begin_layout Plain Layout
24517 \begin_layout Plain Layout
24523 columnseprulecolor}{
24533 \begin_layout Standard
24534 \begin_inset Flex Multiple Columns
24537 \begin_layout Plain Layout
24540 \begin_inset Quotes eld
24543 You're surprised to see me, sir,
24544 \begin_inset Quotes erd
24547 said he, in a strange, croaking voice.
24550 \begin_layout Plain Layout
24553 I acknowledged that I was.
24556 \begin_layout Plain Layout
24559 \begin_inset Quotes eld
24562 Well, I've a conscience, sir, and when I chanced to see you go into this
24563 house, as I came hobbling after you, I thought to myself, I'll just step
24564 in and see that kind gentleman, and tell him that if I was a bit gruff
24565 in my manner there was not any harm meant, and that I am much obliged to
24566 him for picking up my books.
24567 \begin_inset Quotes erd
24573 \begin_layout Plain Layout
24576 \begin_inset Quotes eld
24579 You make too much of a trifle,
24580 \begin_inset Quotes erd
24585 \begin_inset Quotes eld
24588 May I ask how you knew who I was?
24589 \begin_inset Quotes erd
24595 \begin_layout Plain Layout
24598 \begin_inset Quotes eld
24601 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24602 you'll find my little bookshop at the corner of Church Street, and very
24603 happy to see you, I am sure.
24604 Maybe you collect yourself, sir.
24608 \begin_inset space ~
24621 --a bargain, every one of them.
24622 With five volumes you could just fill that gap on that second shelf.
24623 It looks untidy, does it not, sir?
24624 \begin_inset Quotes erd
24635 \begin_layout Standard
24639 \begin_layout Plain Layout
24645 columnseprule}{0pt}
24648 \begin_layout Plain Layout
24654 columnseprulecolor}{
24662 \begin_inset Note Note
24665 \begin_layout Plain Layout
24666 go back to the default
24674 \begin_layout Section
24675 Non-standard Paragraph Shapes
24678 \begin_layout Standard
24680 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24681 For special cases like for example posters, invitation cards or poems you
24682 can modify the paragraph shape to one of your choice.
24683 This can be done by using the LaTeX-package
24687 which is loaded by using in the document settings the module
24689 Custom paragraph shapes
24694 \begin_layout Subsection
24698 \begin_layout Standard
24703 provides the following shapes:
24706 \begin_layout Standard
24707 \begin_inset Tabular
24708 <lyxtabular version="3" rows="13" columns="3">
24709 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24710 <column alignment="center" valignment="middle" width="16col%">
24711 <column alignment="center" valignment="middle" width="40col%">
24712 <column alignment="center" valignment="middle" width="35col%">
24713 <row endhead="true">
24714 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24717 \begin_layout Plain Layout
24723 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24726 \begin_layout Plain Layout
24732 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24735 \begin_layout Plain Layout
24743 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24746 \begin_layout Plain Layout
24752 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24755 \begin_layout Plain Layout
24756 Circle with circular hole (in the size of a CD/DVD)
24761 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24764 \begin_layout Plain Layout
24765 Cannot be scaled, take care there is not too much text
24772 <cell alignment="center" valignment="top" topline="true" usebox="none">
24775 \begin_layout Plain Layout
24781 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24784 \begin_layout Plain Layout
24790 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24793 \begin_layout Plain Layout
24794 Fragile, calculation might fail
24801 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24804 \begin_layout Plain Layout
24810 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24813 \begin_layout Plain Layout
24814 Rhomboid (symbolizing a
24815 \begin_inset Quotes eld
24819 \begin_inset Quotes erd
24827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24830 \begin_layout Plain Layout
24838 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24841 \begin_layout Plain Layout
24847 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24850 \begin_layout Plain Layout
24856 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24859 \begin_layout Plain Layout
24867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24870 \begin_layout Plain Layout
24876 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24879 \begin_layout Plain Layout
24885 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24888 \begin_layout Plain Layout
24896 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24899 \begin_layout Plain Layout
24905 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24908 \begin_layout Plain Layout
24909 Nut for bolt (hexagon with circular hole)
24914 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24917 \begin_layout Plain Layout
24925 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24928 \begin_layout Plain Layout
24934 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24937 \begin_layout Plain Layout
24943 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24946 \begin_layout Plain Layout
24954 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24957 \begin_layout Plain Layout
24963 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24966 \begin_layout Plain Layout
24972 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24975 \begin_layout Plain Layout
24983 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24986 \begin_layout Plain Layout
24992 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24995 \begin_layout Plain Layout
25001 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25004 \begin_layout Plain Layout
25012 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25015 \begin_layout Plain Layout
25021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25024 \begin_layout Plain Layout
25025 Normal/reversed rain drop
25030 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25033 \begin_layout Plain Layout
25034 Fragile, calculation might fail
25041 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25044 \begin_layout Plain Layout
25050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25053 \begin_layout Plain Layout
25059 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25062 \begin_layout Plain Layout
25070 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25073 \begin_layout Plain Layout
25075 \begin_inset Newline newline
25083 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25086 \begin_layout Plain Layout
25087 Triangles in different orientations
25092 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25095 \begin_layout Plain Layout
25109 \begin_layout Standard
25110 To use a shape for your paragraph, simply select it in LyX's pull-down box
25111 for environments in the toolbar.
25114 \begin_layout Standard
25115 \begin_inset Newpage newpage
25121 \begin_layout Standard
25122 Here is an example paragraph in the shape of a nut:
25125 \begin_layout Standard
25126 \begin_inset VSpace bigskip
25135 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25136 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25138 At vero eos et accusam et justo duo dolores et ea rebum.
25139 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25141 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25142 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25146 \begin_layout Standard
25147 \begin_inset VSpace bigskip
25153 \begin_layout Standard
25154 \begin_inset Note Greyedout
25157 \begin_layout Plain Layout
25162 : shapepar paragraphs cannot run over a page break.
25170 \begin_layout Standard
25171 \begin_inset VSpace bigskip
25177 \begin_layout Standard
25182 takes care that the shape will always be preserved, no matter how much
25183 text is in the paragraph.
25184 Therefore the paragraph size changes with the amount of contained text.
25185 This can lead to paragraph sizes exceeding the page margins.
25186 To demonstrate the size scaling, here is the same example paragraph but
25187 with twice as much text:
25190 \begin_layout Standard
25191 \begin_inset Newpage newpage
25200 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25201 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25203 At vero eos et accusam et justo duo dolores et ea rebum.
25204 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25206 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25207 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25209 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25210 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25212 At vero eos et accusam et justo duo dolores et ea rebum.
25213 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25215 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25216 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25220 \begin_layout Standard
25221 \begin_inset VSpace bigskip
25227 \begin_layout Standard
25228 An exception is the shape
25233 It cannot be scaled because it must fit the size of a CD/DVD.
25234 Therefore the amount of text that fits into the shape is limited.
25235 \begin_inset Newline newline
25246 shape are fragile, meaning that the calculation of their size can fail,
25247 depending on the amount of text.
25248 You will then get the LaTeX error
25249 \begin_inset Quotes eld
25252 Arithmetic overflow
25253 \begin_inset Quotes erd
25257 In this case one can try to remove or add some text; if nothing works one
25258 has to use another shape.
25261 \begin_layout Standard
25262 \begin_inset VSpace bigskip
25268 \begin_layout Standard
25269 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25270 fails for text in the tips.
25271 Therefore it is often necessary to add hyphenation points
25276 arg "specialchar-insert hyphenation"
25281 ) to the corresponding text parts.
25284 \begin_layout Standard
25285 \begin_inset VSpace bigskip
25291 \begin_layout Standard
25292 Shapepar paragraphs are either always centered or placed on the page so
25293 that their left border touches the left page margin.
25294 You can therefore not use the paragraph dialog to align such paragraphs.
25295 A solution is to put the paragraph into a minipage or parbox and align
25297 The problem is hereby to find the right width for the box.
25298 Because if it is too wide and you center the box, the paragraph is not
25299 centered too because it sticks at the left side of the box.
25300 So you might have to play a bit with the width until it fits.
25301 Here are two heart-shaped paragraphs, the first one is not aligned, the
25302 second one is right-aligned:
25305 \begin_layout Standard
25306 \begin_inset Newpage newpage
25312 \begin_layout Heart
25317 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25318 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25320 At vero eos et accusam et justo duo dolores et ea rebum.
25321 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25325 \begin_layout Standard
25326 \begin_inset VSpace bigskip
25332 \begin_layout Standard
25335 \begin_inset Box Frameless
25345 height_special "totalheight"
25348 \begin_layout Heart
25353 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25354 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25356 At vero eos et accusam et justo duo dolores et ea rebum.
25357 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25366 \begin_layout Subsection
25370 \begin_layout Standard
25371 You can define any shape you want.
25372 Doing this manually is a lot of work because every coordinate must be specified.
25373 But there is a way to let the computer calculate the coordinates:
25376 \begin_layout Enumerate
25377 Install the program
25378 \begin_inset CommandInset href
25381 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25388 \begin_layout Enumerate
25399 \begin_layout Plain Layout
25410 \begin_layout Plain Layout
25417 eX\SpecialChar \menuseparator
25418 Settings\SpecialChar \menuseparator
25421 and select the font size you are using in your document.
25422 For example this document uses the size 12
25423 \begin_inset space \thinspace{}
25429 \begin_layout Enumerate
25433 \begin_layout Enumerate
25440 \begin_layout Plain Layout
25451 \begin_layout Plain Layout
25458 eX\SpecialChar \menuseparator
25461 to export the shape to coordinates.
25462 In the appearing dialog use either the outline of your shape for the coordinate
25463 s or the path itself.
25467 \begin_layout Plain Layout
25468 For more information see
25469 \begin_inset CommandInset href
25471 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25483 \begin_layout Standard
25484 The coordinates are written into a TeX-file.
25485 To use it for your LyX document
25488 \begin_layout Enumerate
25489 Place the cursor before the first character of your paragraph (or into a
25493 \begin_layout Enumerate
25494 Open in LyX the menu
25496 Insert\SpecialChar \menuseparator
25497 File\SpecialChar \menuseparator
25499 \begin_inset space ~
25504 , select the file and use
25513 \begin_layout Standard
25514 \begin_inset VSpace defskip
25520 \begin_layout Standard
25521 \begin_inset Note Greyedout
25524 \begin_layout Plain Layout
25529 : The changed shape only applies to the current paragraph; everything is
25530 reset to normal for the next paragraph.
25531 Therefore the shape definition file must be input into every paragraph
25532 with the desired shape.
25540 \begin_layout Standard
25541 \begin_inset VSpace bigskip
25547 \begin_layout Standard
25548 Here is an example:
25551 \begin_layout Standard
25552 \begin_inset VSpace bigskip
25558 \begin_layout Standard
25559 \begin_inset CommandInset include
25561 filename "SpecialParagraphShape.tex"
25567 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25568 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25570 At vero eos et accusam et justo duo dolores et ea rebum.
25571 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25573 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25574 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25578 \begin_layout Standard
25579 \begin_inset VSpace bigskip
25585 \begin_layout Standard
25590 to draw complexer shapes in
25594 you can draw the shape in a program of your choice and import the resulting
25600 Then you only need to draw a line or spline along the outline of the image.
25603 \begin_layout Standard
25604 \begin_inset VSpace bigskip
25610 \begin_layout Standard
25613 Custom paragraph shapes
25615 also provides the two commands
25623 which can be used to define custom shapes coordinate by coordinate.
25627 \begin_layout Plain Layout
25628 These commands are internally used for all shapes described here.
25633 For information how these styles are used and about further customization
25634 possibilities, have a look at the documentation of the package
25639 \begin_inset CommandInset citation
25648 \begin_layout Bibliography
25649 \begin_inset CommandInset bibitem
25650 LatexCommand bibitem
25655 Documentation of the LaTeX-package
25656 \begin_inset CommandInset href
25659 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25666 \begin_layout Bibliography
25667 \begin_inset CommandInset bibitem
25668 LatexCommand bibitem
25673 Documentation of the LaTeX-package
25674 \begin_inset CommandInset href
25677 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"