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 Subsection
5513 AppleScript (Mac OS X)
5516 \begin_layout Standard
5517 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5518 communication through the command run.
5519 This command takes a direct argument (the
5523 to perform) and an optional argument.
5524 It either returns the output of the function or triggers an error with
5525 the error message and code.
5528 \begin_layout Standard
5532 \begin_layout LyX-Code
5533 tell application "LyX"
5536 \begin_layout LyX-Code
5540 \begin_layout LyX-Code
5541 -- Stores the current file name into f
5544 \begin_layout LyX-Code
5545 set f to (run "server-get-filename" with argument "")
5548 \begin_layout LyX-Code
5549 on error the error_message number the error_number
5552 \begin_layout LyX-Code
5553 display dialog "Error: " & the error_number & ".
5557 \begin_layout LyX-Code
5558 & the error_message buttons {"OK"} default button 1
5561 \begin_layout LyX-Code
5565 \begin_layout LyX-Code
5569 \begin_layout Section
5573 \begin_layout Standard
5574 LyX can notify clients of events going on asynchronously.
5575 Currently it will only do this if the user binds a key sequence with the
5577 \begin_inset Quotes eld
5581 \begin_inset Quotes erd
5585 The format of the string LyX sends is as follows:
5589 \begin_inset Flex Code
5592 \begin_layout Plain Layout
5603 \begin_layout Standard
5608 is the printed representation of the key sequence that was actually typed
5612 \begin_layout Standard
5613 This mechanism can be used to extend LyX's command set and implement macros.
5614 Bind some key sequence to
5615 \begin_inset Quotes eld
5619 \begin_inset Quotes erd
5623 Then start a client that listens on the output pipe, dispatches the command
5624 according to the sequence, and starts a function that may use LyX calls
5625 and LyX requests to issue a command or a series of commands to LyX.
5628 \begin_layout Section
5629 The simple LyX Server Protocol
5632 \begin_layout Standard
5633 LyX implements a simple protocol that can be used for session management.
5634 All messages are of the form
5647 \begin_layout Standard
5653 \begin_inset Quotes eld
5657 \begin_inset Quotes erd
5661 \begin_inset Quotes eld
5665 \begin_inset Quotes erd
5670 \begin_inset Quotes eld
5674 \begin_inset Quotes erd
5677 is received from a client, LyX will report back to inform the client that
5678 it's listening to it's messages, while
5679 \begin_inset Quotes eld
5683 \begin_inset Quotes erd
5686 sent from LyX will inform clients that LyX is closing.
5689 \begin_layout Section
5690 Reverse DVI/PDF search
5693 \begin_layout Standard
5694 Some DVI/PDF viewers
5698 \begin_layout Plain Layout
5699 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5700 Skim on Mac OSX and SumatraPDF on Windows.
5709 facility (also called
5714 This means that you can tell LyX to put the cursor to a specific line in
5715 the document by clicking at the respective position in the DVI/PDF output.
5716 To achieve this, the viewer must be able to communicate with LyX.
5717 This is done via the LyX server either by using the named pipe (
5721 ), or the UNIX domain socket (
5725 ) that LyX creates in its temporary directory (this is the way the
5726 \begin_inset Flex Code
5729 \begin_layout Plain Layout
5735 program communicates with LyX).
5736 In some cases, you need a helper script that mediates between the viewer
5737 and LyX, in others, the viewer can communicate with LyX directly.
5738 This depends on the selected viewer and on your operating system.
5739 The same applies to the way viewers need to be configured and the way the
5740 reverse search is actually performed.
5741 In what follows, we will thus describe how to setup reverse search for
5743 Before we turn to this, though, we will explain what needs to be done generally
5744 to enable reverse search in the DVI/PDF output.
5747 \begin_layout Subsection
5749 \begin_inset CommandInset label
5751 name "sub:rev-search"
5758 \begin_layout Standard
5759 In most cases LyX will do the work for you by enabling the option
5760 \begin_inset Flex MenuItem
5763 \begin_layout Plain Layout
5764 Synchronize with Output
5770 \begin_inset Flex MenuItem
5773 \begin_layout Plain Layout
5774 Document\SpecialChar \menuseparator
5775 Settings\SpecialChar \menuseparator
5782 In such a case LyX will automatically insert the necessary SyncTeX macro
5783 (for PDF) or load the srcltx package (for DVI) respectively.
5784 This option can be easily reached also on
5785 \begin_inset Flex Code
5788 \begin_layout Plain Layout
5797 \begin_layout Standard
5798 If you need a different setting, you can select or input a custom macro
5799 from the drop down box just below
5800 \begin_inset Flex MenuItem
5803 \begin_layout Plain Layout
5804 Document\SpecialChar \menuseparator
5805 Settings\SpecialChar \menuseparator
5806 Output\SpecialChar \menuseparator
5807 Synchronize with Output
5815 \begin_layout Standard
5816 Note that the method
5817 \begin_inset Flex Code
5820 \begin_layout Plain Layout
5828 enables gzip compression.
5829 If your viewer does not support it, you should instead use
5830 \begin_inset Flex Code
5833 \begin_layout Plain Layout
5844 \begin_layout Standard
5845 Please aöso note that including the
5846 \begin_inset Flex Code
5849 \begin_layout Plain Layout
5856 \begin_inset Flex Code
5859 \begin_layout Plain Layout
5865 sometimes has an undesired impact on the typesetting.
5866 Thus, you should switch output synchronization off for the final typesetting
5868 \begin_inset Flex Code
5871 \begin_layout Plain Layout
5878 \begin_inset Flex Code
5881 \begin_layout Plain Layout
5891 \begin_layout Standard
5892 In case you need some more special settings that are not covered by the
5893 automatic settings, read the next section about how to set up output synchroniz
5895 If the automatic setup suits your needs, you can readily jump to section
5896 \begin_inset space ~
5900 \begin_inset CommandInset ref
5902 reference "sub:configuring-viewers"
5906 , where the necessary configuration steps in your viewer -- needed both
5907 with the automatic and the manual setup -- are described.
5910 \begin_layout Subsection
5914 \begin_layout Standard
5915 LaTeX provides several different methods for reverse search.
5916 Some are built-in in the
5917 \begin_inset Flex Code
5920 \begin_layout Plain Layout
5926 program, some are provided by external packages.
5927 Your choice depends on whether your LaTeX distribution already provides
5928 a given method (the built-in methods are rather new) and whether your viewer
5930 The available methods are described in the following.
5933 \begin_layout Subsubsection*
5934 Built-in DVI-search via src-specials (DVI only)
5937 \begin_layout Standard
5938 This method provides the DVI file with the necessary information for reverse
5940 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5941 distribution should include it), and it works reliably.
5942 To enable it, change the
5943 \begin_inset Flex MenuItem
5946 \begin_layout Plain Layout
5951 \begin_layout Plain Layout
5964 \begin_inset Flex MenuItem
5967 \begin_layout Plain Layout
5972 \begin_layout Plain Layout
5979 eX (plain)->DraftDVI
5985 \begin_inset Flex MenuItem
5988 \begin_layout Plain Layout
5989 Preferences\SpecialChar \menuseparator
5990 File Handling\SpecialChar \menuseparator
5997 \begin_inset Flex Code
6000 \begin_layout Plain Layout
6001 latex -src-specials $$i
6007 If this doesn't work, check if your TeX engine needs different options
6008 (the syntax might differ in some distributions).
6011 \begin_layout Subsubsection*
6012 External Packages (PDFSync and scrltx)
6015 \begin_layout Standard
6024 provide reverse search facility for PDF output (via pdflatex) and DVI output,
6026 In order to enable it, load the packages in the LyX preamble:
6029 \begin_layout Itemize
6030 \begin_inset Flex Code
6033 \begin_layout Plain Layout
6041 for reverse PDF search,
6044 \begin_layout Itemize
6045 \begin_inset Flex Code
6048 \begin_layout Plain Layout
6051 usepackage[active]{srcltx}
6056 for reverse DVI search.
6059 \begin_layout Standard
6060 If you want to be able to perform both DVI and PDF reverse searches, you
6061 can also insert in the preamble the following lines
6064 \begin_layout LyX-Code
6068 \begin_inset Newline newline
6074 \begin_inset Newline newline
6080 \begin_inset Newline newline
6086 \begin_inset Newline newline
6091 usepackage[active]{srcltx}
6092 \begin_inset Newline newline
6100 \begin_layout Standard
6101 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6102 right package will be used.
6105 \begin_layout Standard
6106 Note that PDFSync might affect the output layout of your document.
6107 It is therefore advised to disable PDFsync for final documents.
6110 \begin_layout Subsubsection*
6111 Built-in reverse search via SyncTeX (DVI and PDF)
6114 \begin_layout Standard
6116 \begin_inset Flex Code
6119 \begin_layout Plain Layout
6125 have built-in support for both PDF and DVI reverse search.
6130 facility is basically the result of the integration of the PDFSync package
6131 to the pdftex program and its merge with the
6136 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6141 \begin_layout Plain Layout
6142 For some reason, MikTeX does not understand/obey the command LyX inserts
6143 into the preamble when you check the "Enable Forward/Reverse Search" button
6144 in the toolbar and does not generate the necessary info.
6147 \begin_layout Plain Layout
6148 The generation of the required info can be forced by changing the converter
6149 "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6150 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6151 the -synctex=1 switch).
6157 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6158 already provide SyncTeX support.
6161 \begin_layout Standard
6162 To enable SyncTeX for DVI output, change the
6163 \begin_inset Flex MenuItem
6166 \begin_layout Plain Layout
6171 \begin_layout Plain Layout
6184 \begin_inset Flex MenuItem
6187 \begin_layout Plain Layout
6192 \begin_layout Plain Layout
6199 eX (plain) -> DraftDVI
6205 \begin_inset Flex MenuItem
6208 \begin_layout Plain Layout
6209 Preferences\SpecialChar \menuseparator
6210 File Handling\SpecialChar \menuseparator
6217 \begin_inset Flex Code
6220 \begin_layout Plain Layout
6221 latex -synctex=1 $$i
6226 , and for PDF output, change the
6227 \begin_inset Flex MenuItem
6230 \begin_layout Plain Layout
6235 \begin_layout Plain Layout
6242 eX (pdflatex) -> PDF (pdflatex)
6248 \begin_inset Flex Code
6251 \begin_layout Plain Layout
6252 pdflatex -synctex=1 $$i
6258 Check the documentation of your viewer whether the viewer needs to be configure
6259 d for the use with SyncTeX.
6263 \begin_layout Plain Layout
6264 Note that the option
6265 \begin_inset Flex Code
6268 \begin_layout Plain Layout
6274 option enables gzip compression.
6275 If your viewer does not support it, you should instead use
6276 \begin_inset Flex Code
6279 \begin_layout Plain Layout
6293 \begin_layout Subsection
6294 Configuring and using specific viewers
6295 \begin_inset CommandInset label
6297 name "sub:configuring-viewers"
6304 \begin_layout Subsubsection*
6305 Xdvi (all platforms)
6308 \begin_layout Standard
6310 \begin_inset Flex Code
6313 \begin_layout Plain Layout
6319 , you don't need to do anything else for performing a reverse DVI search,
6320 as LyX already provides the necessary hooks for automatically using the
6322 \begin_inset Flex Code
6325 \begin_layout Plain Layout
6332 Just setup your document as described above (reverse search is triggered
6333 by Ctrl-click or Alt-click on Mac OSX, respectively).
6336 \begin_layout Standard
6337 However, if for whatever reason you want to use the named pipe instead of
6338 the socket for communicating with LyX, simply change the DVI viewer in
6340 \begin_inset Flex MenuItem
6343 \begin_layout Plain Layout
6344 Preferences\SpecialChar \menuseparator
6345 File Handling\SpecialChar \menuseparator
6355 \begin_layout Plain Layout
6356 On Mac OSX you have to use
6357 \begin_inset Flex Code
6360 \begin_layout Plain Layout
6361 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6376 xdvi -editor "lyxeditor.sh %f %l"
6382 \begin_inset Flex Code
6385 \begin_layout Plain Layout
6391 is a suitable script.
6392 For example, a minimal shell script is the following one:
6395 \begin_layout LyX-Code
6397 \begin_inset Newline newline
6400 LYXPIPE="/path/to/lyxpipe"
6401 \begin_inset Newline newline
6404 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6405 \begin_inset Newline newline
6408 echo "$COMMAND" > "${LYXPIPE}".in || exit
6409 \begin_inset Newline newline
6412 read TMP < "${LYXPIPE}".out || exit
6415 \begin_layout Standard
6417 \begin_inset Flex Code
6420 \begin_layout Plain Layout
6430 \begin_layout Plain Layout
6437 XServer pipe path specified in
6438 \begin_inset Flex MenuItem
6441 \begin_layout Plain Layout
6442 Preferences\SpecialChar \menuseparator
6452 \begin_layout Plain Layout
6454 \begin_inset Flex Code
6457 \begin_layout Plain Layout
6463 folder of a source distribution you can find a
6464 \begin_inset Flex Code
6467 \begin_layout Plain Layout
6473 script which is able to locate the
6477 based on your preferences.
6485 \begin_layout Subsubsection*
6489 \begin_layout Standard
6491 \begin_inset Flex Code
6494 \begin_layout Plain Layout
6495 /Applications/MacDviX_Folder/calleditor.script
6500 , add the following lines:
6503 \begin_layout LyX-Code
6508 \begin_layout Plain Layout
6515 X.app/Contents/MacOS/lyxeditor "$2" $1
6516 \begin_inset Newline newline
6522 \begin_layout Standard
6523 Modify the lines accordingly if you install LyX somewhere else than in the
6524 Applications folder.
6527 \begin_layout Standard
6528 Reverse search is triggered by Alt-click (OPTION-click).
6531 \begin_layout Subsubsection*
6535 \begin_layout Standard
6537 \begin_inset Flex Code
6540 \begin_layout Plain Layout
6541 open -a Skim.app $$i
6546 to the viewer setting in
6547 \begin_inset Flex MenuItem
6550 \begin_layout Plain Layout
6551 Preferences\SpecialChar \menuseparator
6552 File Handling\SpecialChar \menuseparator
6553 File formats\SpecialChar \menuseparator
6560 \begin_inset Flex MenuItem
6563 \begin_layout Plain Layout
6564 Skim\SpecialChar \menuseparator
6565 Preferences\SpecialChar \menuseparator
6572 \begin_inset Flex MenuItem
6575 \begin_layout Plain Layout
6581 preset and enter command
6582 \begin_inset Flex MenuItem
6585 \begin_layout Plain Layout
6586 /Applications/LyX.app/Contents/MacOS/lyxeditor
6594 \begin_layout Standard
6595 Reverse search is triggered by COMMAND-SHIFT-click
6598 \begin_layout Subsubsection*
6602 \begin_layout Standard
6604 \begin_inset Flex MenuItem
6607 \begin_layout Plain Layout
6608 Settings\SpecialChar \menuseparator
6609 Configure Okular\SpecialChar \ldots{}
6610 \SpecialChar \menuseparator
6617 \begin_inset Quotes eld
6621 \begin_inset Quotes erd
6625 \begin_inset Flex Code
6628 \begin_layout Plain Layout
6637 \begin_layout Standard
6638 Reverse search is triggered by SHIFT-click.
6641 \begin_layout Subsubsection*
6645 \begin_layout Standard
6646 Launch yap, choose its
6647 \begin_inset Flex MenuItem
6650 \begin_layout Plain Layout
6651 View\SpecialChar \menuseparator
6658 \begin_inset Quotes eld
6662 \begin_inset Quotes erd
6667 \begin_inset Quotes eld
6670 New\SpecialChar \ldots{}
6672 \begin_inset Quotes erd
6675 button and, in the window that opens, enter
6676 \begin_inset Quotes eld
6680 \begin_inset Quotes erd
6683 (or any other name you like) in the
6684 \begin_inset Quotes eld
6688 \begin_inset Quotes erd
6692 Now click on the button labeled
6693 \begin_inset Quotes eld
6696 \SpecialChar \ldots{}
6698 \begin_inset Quotes erd
6701 to open a file dialog and navigate to the directory containing the batch
6703 \begin_inset Flex Code
6706 \begin_layout Plain Layout
6714 \begin_inset Flex Code
6717 \begin_layout Plain Layout
6723 and then specify the program arguments as
6724 \begin_inset Flex Code
6727 \begin_layout Plain Layout
6735 \begin_inset Flex Code
6738 \begin_layout Plain Layout
6744 wrapper is used for communicating with LyX through the
6751 \begin_layout LyX-Code
6753 \begin_inset Newline newline
6756 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6765 \begin_inset Newline newline
6779 \begin_layout Standard
6780 Make sure that the LyXServer pipe path you specified in LyX is
6781 \begin_inset Flex Code
6784 \begin_layout Plain Layout
6798 , otherwise change the
6799 \begin_inset Flex Code
6802 \begin_layout Plain Layout
6808 wrapper accordingly.
6811 \begin_layout Standard
6812 In yap, reverse search is triggered by double-click.
6815 \begin_layout Subsubsection*
6816 SumatraPDF (Windows)
6819 \begin_layout Standard
6820 In order to use SumatraPDF for inverse search, enter
6821 \begin_inset Flex Code
6824 \begin_layout Plain Layout
6825 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6830 in the viewer setting in
6831 \begin_inset Flex MenuItem
6834 \begin_layout Plain Layout
6835 Preferences\SpecialChar \menuseparator
6836 File Handling\SpecialChar \menuseparator
6837 File formats\SpecialChar \menuseparator
6844 \begin_inset Flex Code
6847 \begin_layout Plain Layout
6853 is the previous wrapper.
6854 If SumatraPDF.exe is not in your command PATH, use its full file name.
6857 \begin_layout Standard
6858 Reverse search is triggered by double-click.
6861 \begin_layout Subsubsection*
6865 \begin_layout Standard
6866 First of all, make sure that yap is your default DVI viewer in the Windows
6867 environment, then launch it, choose its
6868 \begin_inset Flex MenuItem
6871 \begin_layout Plain Layout
6872 View\SpecialChar \menuseparator
6879 \begin_inset Quotes eld
6883 \begin_inset Quotes erd
6888 \begin_inset Quotes eld
6891 New\SpecialChar \ldots{}
6893 \begin_inset Quotes erd
6896 button and, in the window that opens, enter
6897 \begin_inset Quotes eld
6901 \begin_inset Quotes erd
6904 (or any other name you like) in the
6905 \begin_inset Quotes eld
6909 \begin_inset Quotes erd
6913 Now click on the button labeled
6914 \begin_inset Quotes eld
6917 \SpecialChar \ldots{}
6919 \begin_inset Quotes erd
6922 to open a file dialog and navigate to the directory containing the
6923 \begin_inset Flex Code
6926 \begin_layout Plain Layout
6932 program (which is installed by default on Cygwin along with the LyX executable).
6934 \begin_inset Flex Code
6937 \begin_layout Plain Layout
6943 and then specify the program arguments as
6944 \begin_inset Flex Code
6947 \begin_layout Plain Layout
6954 In this way, you will be using the
6958 for communicating with LyX.
6959 If, for whatever reason, you want to use the
6964 \begin_inset Flex Code
6967 \begin_layout Plain Layout
6973 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6976 \begin_layout Standard
6977 In yap, reverse search is triggered by double-click.
6980 \begin_layout Subsubsection*
6984 \begin_layout Standard
6985 In order to use SumatraPDF for inverse search, enter
6986 \begin_inset Flex Code
6989 \begin_layout Plain Layout
6990 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6995 in the viewer setting in
6996 \begin_inset Flex MenuItem
6999 \begin_layout Plain Layout
7000 Preferences\SpecialChar \menuseparator
7001 File Handling\SpecialChar \menuseparator
7002 File formats\SpecialChar \menuseparator
7009 If SumatraPDF.exe is not in your command PATH, use its full posix path.
7011 \begin_inset Flex Code
7014 \begin_layout Plain Layout
7020 enables communication via the
7026 \begin_inset Flex Code
7029 \begin_layout Plain Layout
7035 option if you want to use the
7039 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7042 \begin_layout Standard
7043 Reverse search is triggered by double-click.
7046 \begin_layout Section
7050 \begin_layout Standard
7051 Forward search is, as the name implies, in a sense the
7052 \begin_inset Quotes eld
7056 \begin_inset Quotes erd
7060 It allows you to let the viewer jump to a given position from within LyX.
7061 If forward search is set up (as described in what follows), you can put
7062 the cursor anywhere in your LyX document, and hit
7063 \begin_inset Flex MenuItem
7066 \begin_layout Plain Layout
7067 Navigate\SpecialChar \menuseparator
7074 \begin_inset Flex MenuItem
7077 \begin_layout Plain Layout
7083 in the context menu via right mouse click), and then the viewer will jump
7084 to that position as well.
7085 This implies, of course, that your viewer supports this function.
7088 \begin_layout Standard
7089 To make forward search possible, you first need to provide the generated
7090 output PDF/DVI file with additional information about the TeX sources.
7091 This can be done via the methods described in the section
7092 \begin_inset CommandInset ref
7094 reference "sub:rev-search"
7101 \begin_layout Standard
7102 Additionally, you need to configure LyX for using your viewers in
7103 \begin_inset Flex MenuItem
7106 \begin_layout Plain Layout
7107 Tools\SpecialChar \menuseparator
7108 Preferences\SpecialChar \menuseparator
7109 Output\SpecialChar \menuseparator
7116 We provide a range of tested configurations for some viewers, which you
7117 can select from the drop down list.
7118 If none of these configurations suits you, you have to find out and enter
7119 a suitable configuration yourself.
7120 The definition syntax uses the following placeholders:
7123 \begin_layout Itemize
7125 \begin_inset Flex Code
7128 \begin_layout Plain Layout
7137 \begin_layout Itemize
7139 \begin_inset Flex Code
7142 \begin_layout Plain Layout
7148 : name of the (temporary) exported .tex file (without path)
7151 \begin_layout Itemize
7153 \begin_inset Flex Code
7156 \begin_layout Plain Layout
7162 : name of the (temporary) exported .tex file (including path)
7165 \begin_layout Itemize
7167 \begin_inset Flex Code
7170 \begin_layout Plain Layout
7176 : name of the exported output file (either dvi or pdf, depending on which
7177 one exists in the temporary directory)
7180 \begin_layout Standard
7181 Note that only some of the viewers provide full forward search functionality,
7182 among them yap, xdvi, okular
7186 \begin_layout Plain Layout
7187 You might want to set
7188 \begin_inset Flex Code
7191 \begin_layout Plain Layout
7198 \begin_inset Flex MenuItem
7201 \begin_layout Plain Layout
7202 Tools\SpecialChar \menuseparator
7203 Preferences\SpecialChar \menuseparator
7204 File Handling\SpecialChar \menuseparator
7206 \begin_inset space ~
7223 \begin_layout Plain Layout
7224 For Sumatra CMCDDE is needed --- downloadable from
7225 \begin_inset CommandInset href
7227 target "http://www.istri.fr/zip/CMCDDE.zip"
7237 While many of the widespread PDF viewers (most notably Adobe Reader) do
7238 not support forward search at all, some other viewers -- e.
7239 \begin_inset space \thinspace{}
7243 evince and xpdf -- allow at least to reload the document and jump to a
7244 specific page of the file, so you can at least navigate
7245 \begin_inset Quotes eld
7249 \begin_inset Quotes erd
7253 This latter functionality is provided by an external call of synctex (see
7254 the predefined example configurations).
7258 \begin_layout Standard
7259 Forward search works both with DVI and PDF output.
7260 LyX simply checks which preview format you have used before (i.
7261 \begin_inset space \thinspace{}
7264 e., which format is already there in the temporary directory) and chooses
7265 the appropriate configuration for the respective format.
7268 \begin_layout Chapter
7269 Special Document Classes
7272 \begin_layout Section
7276 \begin_layout Standard
7282 \begin_layout Subsection
7286 \begin_layout Standard
7287 This section describes how LyX can be used to write articles for submission
7288 to the scientific journal
7290 Astronomy and Astrophysics
7292 (www.edpsciences.fr/aa/
7293 \begin_inset Flex URL
7296 \begin_layout Plain Layout
7298 http://www.edpsciences.fr/aa/
7303 ) using Version 5.01 of the document class
7308 This package can be downloaded from the ftp site
7311 \begin_layout Standard
7312 \begin_inset VSpace medskip
7318 \begin_layout Standard
7320 \begin_inset Flex URL
7323 \begin_layout Plain Layout
7325 ftp://ftp.edpsciences.org/pub/aa/readme.html
7333 \begin_layout Standard
7334 \begin_inset VSpace medskip
7340 \begin_layout Standard
7341 A manual comes together with that package, and this text is not meant to
7342 replace the original manual but is merely a short guide in how to realize
7343 the correct form of your paper.
7347 \begin_layout Standard
7348 Please note that the publisher of the journal was changed from Springer
7349 to EDP Sciences starting January 1, 2001.
7350 That change involved also some slight changes to the style files, namely
7351 the removal of the thesaurus command.
7352 The LyX class aa supports the newest version of these style files, V 5.01.
7353 If you have an older version installed, please upgrade.
7354 For compatibility, the old (version 4) layout has been kept as
7359 Please refer to the comments in
7361 LyXDir/layouts/aapaper.layout
7366 \begin_layout Subsection
7370 \begin_layout Standard
7371 It is recommended you start from the example template distributed with LyX.
7372 If you are not using a template, note the following settings:
7375 \begin_layout Itemize
7382 Document\SpecialChar \menuseparator
7385 dialog (OK, that one was obvious).
7388 \begin_layout Itemize
7389 Don't change the option
7392 \begin_inset space ~
7402 The whole layout is done by the macros, you shouldn't change anything.
7405 \begin_layout Subsection
7409 \begin_layout Standard
7410 First thing to enter is the header information.
7411 It consists of seven entries, of which some are optional.
7415 \begin_layout Itemize
7423 \begin_layout Itemize
7431 \begin_layout Itemize
7439 \begin_layout Itemize
7447 \begin_layout Itemize
7452 : [optional] if more than one author: whom to contact for offprint requests.
7455 \begin_layout Itemize
7460 : [optional] mail address for contacts.
7463 \begin_layout Itemize
7471 Received: <date>; Accepted <date>
7474 \begin_layout Standard
7475 There is no need to issue the
7481 command, this is done automatically by LyX when the header is finished.
7482 Although the order of the single header entries doesn't matter it is advised
7483 to keep the above sequence, just to get the best optics and meets the layout
7484 of the real document.
7487 \begin_layout Standard
7488 If you want to place footnotes in the header block, e.
7489 \begin_inset space \thinspace{}
7493 \begin_inset space \space{}
7496 to state your present address, just use the standard footnote via the menu
7499 Insert\SpecialChar \menuseparator
7503 LyX will automagically use the term
7512 \begin_layout Standard
7513 In addition to these topics, the macros use three additional LaTeX commands
7514 that have no counterpart in LyX:
7517 \begin_layout Itemize
7524 to separate different names for more than one author and institute, respectivel
7528 \begin_layout Itemize
7535 to mark corresponding author/institute pairs.
7536 The institutes are numbered sequentially as they appear in the
7540 field, so you have to put a marker to each author.
7543 \begin_layout Itemize
7550 to supply an email address for fast contact.
7553 \begin_layout Standard
7554 In all cases, the appropriate command has to be entered in LyX and marked
7560 \begin_layout Subsection
7564 \begin_layout Standard
7565 The abstract should immediately follow the header block.
7566 With version 5 the abstract environment was changed to a command, and there
7567 is now a resctriction to only one paragraph.
7568 In addition, it should contain an entry with the keywords.
7569 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7576 by hand and mark it as LaTeX code.
7577 Refer to the example paper.
7580 \begin_layout Subsection
7581 Supported environments
7584 \begin_layout Standard
7585 The A&A paper layout supports the following environments for structuring
7589 \begin_layout Itemize
7595 \begin_layout Itemize
7601 \begin_layout Itemize
7607 \begin_layout Itemize
7613 \begin_layout Itemize
7619 \begin_layout Itemize
7625 \begin_layout Itemize
7631 \begin_layout Itemize
7637 \begin_layout Itemize
7643 \begin_layout Itemize
7649 \begin_layout Itemize
7655 \begin_layout Itemize
7661 \begin_layout Subsection
7662 Commands not supported by LyX
7665 \begin_layout Standard
7666 Some commands are not yet supported by the
7671 Some have already been mentioned.
7672 For the sake of completeness, they are listed all together here:
7675 \begin_layout Itemize
7683 \begin_layout Itemize
7691 \begin_layout Itemize
7699 \begin_layout Itemize
7707 \begin_layout Itemize
7715 \begin_layout Itemize
7723 \begin_layout Itemize
7731 \begin_layout Itemize
7739 \begin_layout Standard
7740 If you want to use any of these commands, you have to enter them yourself.
7743 Do not forget to mark them as LaTeX code!
7746 \begin_layout Subsection
7747 Figure and Table Floats
7750 \begin_layout Standard
7751 LyX provides support for the necessary float environments
7753 figure, figure*, table
7759 , therefore we won't tell much about it here.
7763 \begin_inset space ~
7769 Just remember that tables should be left-aligned.
7770 For that, select the table and change the alignment in
7772 Edit\SpecialChar \menuseparator
7774 \begin_inset space ~
7780 \begin_layout Standard
7781 There is only one special thing: the figures with caption besides the figure.
7782 To create such a figure, you have to do the following:
7785 \begin_layout Enumerate
7786 Create a wide figure float:
7788 Insert\SpecialChar \menuseparator
7789 Float\SpecialChar \menuseparator
7792 , then right click in the figure and select
7798 \begin_inset space ~
7806 \begin_layout Enumerate
7807 Enter your caption text.
7810 \begin_layout Enumerate
7815 to move the cursor above the caption.
7818 \begin_layout Enumerate
7822 \begin_layout Enumerate
7823 Position the cursor behind the figure and insert a horizontal fill:
7825 Insert\SpecialChar \menuseparator
7827 \begin_inset space ~
7830 Character\SpecialChar \menuseparator
7832 \begin_inset space ~
7840 \begin_layout Enumerate
7841 Switch to LaTeX mode:
7844 \begin_inset space ~
7852 \begin_layout Enumerate
7862 Do not close the brace!
7865 \begin_layout Enumerate
7866 Position the cursor behind the caption text, switch to LaTeX mode and insert
7870 \begin_inset space ~
7882 \begin_layout Standard
7883 Also, refer to the figures in the example paper.
7886 \begin_layout Subsection
7890 \begin_layout Standard
7891 For submission, the paper has to be formated in a special double-spacing
7893 For this purpose, you have to give the option
7897 to the documentclass.
7898 This must be done using the extra class options field in the
7900 Document\SpecialChar \menuseparator
7904 Just enter the string
7911 \begin_layout Subsection
7915 \begin_layout Standard
7920 directory contains an example paper written with LyX.
7921 It is the example paper from the original macro package, translated to
7923 Use it for inspiration, and compare the original LaTeX code with LyX way
7927 \begin_layout Section
7931 \begin_layout Standard
7937 \begin_layout Subsection
7941 \begin_layout Standard
7942 AASTeX is a set of macros produced by the American Astronomical Society
7943 to facilitate electronic manuscript submission to the three journals they
7944 publish: the Astrophysical Journal (including the Letters and Supplement),
7945 the Astronomical Journal, and the Publications of the Astronomical Society
7947 LyX has proven to be an excellent tool for generating these documents,
7948 especially given its equation, citation, and figure handling capabilities.
7949 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7950 is the version described here, or higher.
7951 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7952 incompatible with LyX.
7953 The AASTeX package may be downloaded from the AASTeX Web site
7956 \begin_layout Standard
7957 \begin_inset VSpace medskip
7963 \begin_layout Standard
7965 \begin_inset Flex URL
7968 \begin_layout Plain Layout
7970 http://www.journals.uchicago.edu/AAS/AASTeX
7978 \begin_layout Standard
7979 \begin_inset VSpace medskip
7985 \begin_layout Standard
7986 A complete user guide is contained in that package and you should familiarize
7987 yourself with it thoroughly before embarking on writing a paper in LyX.
7988 LyX will not reduce the need to figure out all the AASTeX commands, it
7989 will only reduce the drudgery of typing everything in.
7990 It is your responsibility to ensure that the final exported LaTeX document
7991 conforms completely to the requirements of the journal to which you are
7992 submitting your paper.
7995 \begin_layout Subsection
7996 Starting a New Paper
7999 \begin_layout Standard
8000 I strongly suggest that you start with the AASTeX template file.
8003 File\SpecialChar \menuseparator
8010 , enter the new file name, then choose the
8015 This will show the most common fields found in a manuscript.
8016 Simply overwrite the existing text (including the brackets,
8020 ) with the correct information.
8021 Many of the AASTeX commands and environments can be implemented directly
8022 in LyX, but some cannot: most noticeably
8034 , which should stick out like a sore thumb if you actually just opened the
8036 For commands such as these, the LaTeX code must be entered directly and
8038 Such commands are referred to as TeX code, or Evil Red Text.
8039 I tried to minimize the amount of TeX code needed in an AASTeX document,
8040 but there is still a bit more required than any of us would like.
8043 \begin_layout Subsection
8044 Finishing Your Paper
8047 \begin_layout Standard
8048 When the paper is finished to your satisfaction and previews/prints correctly,
8050 \begin_inset Quotes eld
8054 \begin_inset Quotes erd
8057 actions which need to be done before you submit it to the journals.
8061 \begin_layout Enumerate
8062 Export your paper as a LaTeX file (
8064 File\SpecialChar \menuseparator
8065 Export\SpecialChar \menuseparator
8072 \begin_layout Enumerate
8077 file with your favorite text editor
8081 \begin_layout Enumerate
8082 remove the comment lines before the
8091 \begin_layout Enumerate
8096 usepackage...{fontenc}
8098 line if it appears (usually just after
8113 \begin_layout Enumerate
8114 remove everything between (and including) the
8126 commands, except for any commands you specifically put into the LaTeX preamble
8127 (which should appear immediately after the
8128 \begin_inset Quotes eld
8131 User specified LaTeX commands
8132 \begin_inset Quotes erd
8143 \begin_layout Enumerate
8144 Run the resulting file through LaTeX to make sure it still processes correctly.
8147 \begin_layout Enumerate
8148 Reread the journal requirements to make sure your filenames and formats
8152 \begin_layout Enumerate
8156 \begin_layout Subsection
8157 Comments On Specific Commands
8160 \begin_layout Standard
8161 I will not describe the detailed usage of the individual AASTeX commands:
8162 the AASTeX User Guide (
8166 ) gives a good description of each.
8167 Thus it's probably easiest for me to go down the list as found in the guide
8168 and offer comments where necessary.
8169 So let's begin \SpecialChar \ldots{}
8173 \begin_layout Subsubsection
8174 Things that work as expected
8177 \begin_layout Standard
8178 Because they work as you might expect, I simply list them and the section
8279 begin{thebibliography}
8287 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8288 graphicx figure commands (2.14.1),
8312 (2.15.4, amongst other places),
8339 \begin_layout Standard
8340 The following style options also work correctly:
8361 Simply put them in the
8367 Layout\SpecialChar \menuseparator
8373 \begin_layout Subsubsection
8374 Things that work, but require more comment
8377 \begin_layout Standard
8378 The following items work, but require a little more discussion:
8381 \begin_layout Itemize
8382 These items are reserved for use by the journal editors, but you can put
8383 them into the LaTeX preamble if you feel compelled to do so:
8416 \begin_layout Itemize
8417 These items may be placed in the LaTeX preamble, and are included as blanks
8418 in the template file:
8439 \begin_layout Itemize
8446 (2.3) – can only be used
8447 \begin_inset Quotes eld
8451 \begin_inset Quotes erd
8454 , not in the middle of a paragraph.
8455 Use TeX code if you need to embed it.
8458 \begin_layout Itemize
8465 (2.3) – will have extra {} after it.
8466 This should not cause an error.
8469 \begin_layout Itemize
8476 (2.6) – can only be used
8477 \begin_inset Quotes eld
8481 \begin_inset Quotes erd
8484 , not in the middle of a paragraph.
8485 Use TeX code if you need to embed it.
8488 \begin_layout Itemize
8495 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8499 \begin_layout Itemize
8513 \begin_layout Itemize
8520 (2.9) – will have extra {} after it.
8521 This should not cause an error.
8524 \begin_layout Itemize
8531 (2.11) – will have extra {} after it.
8532 This should not cause an error.
8535 \begin_layout Itemize
8542 (2.14.2) – you can insert an optional filename argument by placing the cursor
8543 at the beginning of the text and selecting
8545 Insert\SpecialChar \menuseparator
8550 \begin_inset Quotes eld
8554 \begin_inset Quotes erd
8557 inserts an optional argument of the type needed by
8564 Hopefully it will be renamed someday.
8567 \begin_layout Itemize
8580 for the catalog ID optional parameter
8583 \begin_layout Itemize
8596 for the catalog ID optional parameter
8599 \begin_layout Subsubsection
8600 Things not implemented, use TeX code
8603 \begin_layout Standard
8626 setcounter{equation}
8628 (2.12), Journal name abbreviations (2.13.4),
8664 (2.15.4, insert it as the first element in the lefthand cell after where
8666 Don't use any of LyX's rules in the table),
8678 (2.15.5), much of Misc (2.17, except
8729 \begin_layout Subsubsection
8730 Things that cannot be implemented
8733 \begin_layout Standard
8734 \SpecialChar \ldots{}
8735 at least in any meaningful sort of way, so I suggest ignoring them.
8736 They are the references environment (2.13.3), and the deluxetable environment
8738 If you really, really need to use deluxetable, I suggest editing it in
8739 a separate file with a text editor, then using
8741 Insert\SpecialChar \menuseparator
8743 \begin_inset space ~
8748 to include it in your LyX document.
8753 file to see an example of this.
8756 \begin_layout Subsection
8757 FAQs, Tips, Tricks, and Other Ruminations
8760 \begin_layout Subsubsection
8761 Getting LyX and AASTeX to cooperate
8764 \begin_layout Standard
8765 It can be a bit tricky to get LyX to recognize a new layout and document
8767 When all else fails, do this:
8770 \begin_layout Enumerate
8771 Make certain that LaTeX can find AASTeX.
8772 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8773 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8780 \begin_layout Enumerate
8792 \begin_layout Enumerate
8795 Tools\SpecialChar \menuseparator
8798 in LyX, then restart LyX.
8801 \begin_layout Enumerate
8802 Open a regular new file, not from a template.
8803 Does AASTeX appear in the class list in
8805 Document\SpecialChar \menuseparator
8811 \begin_layout Standard
8812 If you get a warning from an existing AASTeX document about not being able
8813 to find the AASTeX layout or a message about
8814 \begin_inset Quotes eld
8817 You should not mix title layouts with normal ones
8818 \begin_inset Quotes erd
8821 , things haven't been installed correctly.
8824 \begin_layout Subsubsection
8825 LaTeX error processing a table
8828 \begin_layout Standard
8829 LyX, by default, attempts to center the table caption/title.
8830 This seems to produce a bad interaction in AASTeX so you should click somewhere
8831 in the caption/title, then select
8833 Edit\SpecialChar \menuseparator
8835 \begin_inset space ~
8849 This took care of it for me.
8852 \begin_layout Subsubsection
8856 \begin_layout Standard
8857 A couple of things: 1) I have noticed some funny spacing in the reference
8858 entries in the text.
8859 When you enter the bibliography item data, make sure their is
8863 space between the last author and the parenthesis setting off the year;
8867 \begin_inset space \thinspace{}
8871 \begin_inset space \space{}
8885 2) Entering the references at all is not obvious.
8886 The easiest thing is to start typing your first reference at the end of
8887 the document, then mark it as type
8892 That will put a small gray box in front of what you just typed.
8893 Click on the box to fill in the rest of the information.
8894 For new references, go to the end of an existing reference and press return.
8895 That will create a new line with its own box, etc.
8898 \begin_layout Subsubsection
8902 \begin_layout Standard
8903 Even though AASTeX provides its own figure commands (
8909 , for example), I much prefer LaTeX's standard figure commands (with the
8918 \begin_inset space ~
8921 commands as TeX code into a Figure Float box if you desire, but I never
8922 have much luck getting the layout right.
8923 With the standard graphics, LyX will insert a
8927 usepackage{graphicx}
8929 command into the LaTeX preamble and handle the figures in the standard
8930 LaTeX2e way, interspersing the figures in the text.
8931 I believe ApJ accepts figures exactly this way now; AJ might still use
8933 \begin_inset Quotes eld
8936 stack everything at the end
8937 \begin_inset Quotes erd
8943 \begin_layout Subsubsection
8944 Things I could have done, but didn't
8947 \begin_layout Standard
8949 \begin_inset Quotes eld
8953 \begin_inset Quotes erd
8956 things I could have implemented, but chose not to.
8957 For instance, I saw no point in double-spacing the text in the LyX window,
8958 even though it is double-spaced in the paper manuscript.
8959 Also, I chose not to make separate layouts for the preprint and preprint2
8961 Since I assume you will spend most of your time in the plain manuscript
8962 mode anyway, I decided not to chew up more disk space with this.
8966 \begin_layout Subsection
8970 \begin_layout Standard
8971 Your mileage may vary.
8972 I've now had papers published by both ApJ and AJ that have had 98% of the
8973 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8975 I have had no trouble with the submission process, and I'm sure the journals
8976 were never aware that there might be a difference.
8977 So, go forth and publish!
8980 \begin_layout Section
8984 \begin_layout Standard
8994 \begin_layout Standard
8995 \begin_inset VSpace bigskip
9001 \begin_layout Standard
9003 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9004 papers to be submitted to American Mathematical Society publications.
9005 The layouts are not tailored to a specific journal, but easily can be.
9006 You should refer to the AMS documentation for specific instructions for
9007 each journal (usually it will entail only changing a single line in the
9009 That documentation is available on the Web at
9010 \begin_inset Flex URL
9013 \begin_layout Plain Layout
9021 \begin_inset Flex URL
9024 \begin_layout Plain Layout
9026 ftp://ftp.ams.org/pub/tex/amslatex/
9032 These layouts are appropriate, and useful, for any mathematical writing.
9036 \begin_layout Standard
9037 There are two basic AMS LaTeX layouts:
9040 \begin_layout Itemize
9041 amsart: The standard AMS article format.
9044 \begin_layout Itemize
9045 amsbook: the standard AMS book (really, monograph) format.
9049 \begin_layout Standard
9050 The layouts themselves contain only the minimum necessary to use the AMS
9052 They do not, in particular, contain any of the `theorem' environments used
9053 for setting theorems, lemmas, and the like.
9054 These are contained, instead, in the
9055 \begin_inset Flex Code
9058 \begin_layout Plain Layout
9064 module, which is loaded by default when you select one of the AMS classes.
9065 (It can also be used with other classes and can be removed, if you would
9066 rather use something else.) Less commonly used environments are in the
9067 \begin_inset Flex Code
9070 \begin_layout Plain Layout
9071 Theorems (AMS-Extended)
9076 module, which must be loaded manually.
9079 \begin_layout Standard
9080 By default, theorems and the like are numbered consecutively throughout
9081 the document, but this may be modified by loading the module
9082 \begin_inset Flex Code
9085 \begin_layout Plain Layout
9086 Theorems (Order by Section)
9091 or, if you are using
9092 \begin_inset Flex Code
9095 \begin_layout Plain Layout
9102 \begin_inset Flex Code
9105 \begin_layout Plain Layout
9106 Theorems (Order by Chapter)
9112 These will number the results as
9113 \begin_inset Formula $n.m$
9116 , where the first number refers to the section (or chapter) and the second
9117 refers to the total number of results so far in that section (or chapter).
9118 Many environments are also available unnumbered.
9119 These are indicated by an asterisk at the end.
9120 If you happen to want
9124 unnumbered results, the module
9125 \begin_inset Flex Code
9128 \begin_layout Plain Layout
9134 provides that option.
9137 \begin_layout Standard
9138 Note that these modules do not
9142 to be used with the AMS classes.
9143 It is perfectly possible to use the
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9153 module, and the others mentioned, with other classes, such as
9154 \begin_inset Flex Code
9157 \begin_layout Plain Layout
9164 \begin_inset Flex Code
9167 \begin_layout Plain Layout
9174 \begin_inset Flex Code
9177 \begin_layout Plain Layout
9186 \begin_layout Subsection
9187 What these layouts provide
9190 \begin_layout Standard
9191 There is a long list of included environments provided by these layouts.
9192 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9193 variety of `theorem' environments.
9194 However, the AMS recommends the environments that are available in LyX.
9198 \begin_layout Standard
9199 The following environments—as well as the standard environments, such as
9201 \begin_inset Flex Noun
9204 \begin_layout Plain Layout
9211 \begin_inset Flex Noun
9214 \begin_layout Plain Layout
9221 \begin_inset Flex Noun
9224 \begin_layout Plain Layout
9231 \begin_inset Flex Noun
9234 \begin_layout Plain Layout
9241 \begin_inset Flex Noun
9244 \begin_layout Plain Layout
9251 \begin_inset Flex Code
9254 \begin_layout Plain Layout
9261 \begin_inset Flex Code
9264 \begin_layout Plain Layout
9273 \begin_layout Description
9274 Address This should be the author's permanent address.
9277 \begin_layout Description
9279 \begin_inset space ~
9282 Address This should be the author's temporary address at the time of submission,
9283 if different from the Address.
9286 \begin_layout Description
9287 Email Author's e-mail address
9290 \begin_layout Description
9291 URL Author's Web address, if desired.
9294 \begin_layout Description
9295 Keywords Key words or phrases used to identify specific topics discussed
9299 \begin_layout Description
9300 Subjectclass These refer to the AMS Subject Classifications, published and
9303 Mathematical Reviews
9306 These are also available online at the AMS cites listed above.
9309 \begin_layout Description
9313 \begin_layout Description
9317 \begin_layout Description
9321 \begin_layout Standard
9322 The following environments are provided by both the
9323 \begin_inset Flex Code
9326 \begin_layout Plain Layout
9333 \begin_inset Flex Code
9336 \begin_layout Plain Layout
9342 modules, in the latter case in both starred (unnumbered) and unstarred
9343 (numbered) versions.
9344 These same environments are provided only in the starred versions by the
9346 \begin_inset Flex Code
9349 \begin_layout Plain Layout
9358 \begin_layout Theorem
9359 This is typically used for the statements of major results.
9363 \begin_layout Corollary*
9364 This is used for statements which follow fairly directly from previous statement
9366 Again, these can be major results.
9371 These are smaller results needed to prove other statements.
9374 \begin_layout Proposition
9375 These are less major results which (hopefully) add to the general theory
9379 \begin_layout Conjecture
9380 These are statements provided without justification, which the author does
9381 not know how to prove, but which seem to be true (to the author, at least).
9384 \begin_layout Definition*
9385 Guess what this is for.
9386 The font is different for this environment than for the previous ones.
9390 \begin_layout Example*
9391 Used for examples illustrating proven results.
9394 \begin_layout Problem
9395 It's not really known what this is for.
9396 You should figure it out.
9399 \begin_layout Exercise*
9400 Write a description for this one.
9403 \begin_layout Remark
9404 This environment is also a type of theorem, usually a lesser sort of observation.
9407 \begin_layout Claim*
9408 Often used in the course of giving a proof of a larger result.
9412 Generally, these are used to break up long arguments, using specific instances
9418 The numbering scheme for cases is on its own, not together with other numbered
9424 At the end of this environment, a QED symbol (usually a square, but it can
9425 vary with different styles) is placed.
9426 If you want to have other environments within this one—for example, Case
9427 environments—and have the QED symbol appear only after them, then the other
9428 environments need to be nested within the proof environment.
9431 Nesting Environments
9437 for information on nesting.
9440 \begin_layout Standard
9441 And these environments are provided by
9442 \begin_inset Flex Code
9445 \begin_layout Plain Layout
9446 Theorems (AMS-Extended)
9454 \begin_layout Criterion*
9455 A required condition.
9458 \begin_layout Algorithm*
9459 A general procedure to be used.
9462 \begin_layout Axiom*
9463 This is a property or statement taken as true within the system being discussed.
9466 \begin_layout Condition*
9467 Sometimes used to state a condition assumed within the present context of
9472 Similar to a Remark.
9475 \begin_layout Notation*
9476 Used for the explanation of, yes, notation.
9479 \begin_layout Summary
9480 Do we really need to tell you?
9483 \begin_layout Acknowledgement*
9487 \begin_layout Conclusion*
9488 Sometimes used at the end of a long train of argument.
9492 Used in a way similar to Proposition, though perhaps lower on the scale.
9495 \begin_layout Standard
9496 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9498 They need to be available on your system in order to use these environments.
9501 \begin_layout Section
9509 \begin_layout Standard
9515 \begin_layout Subsection
9519 \begin_layout Standard
9520 These are the layout files for some of the journals of the American Geophysical
9522 It is assumed that you have both the AGU's own class files and AGUplus
9523 installed (everything to be found at
9524 \begin_inset Flex URL
9527 \begin_layout Plain Layout
9529 ftp://ftp.agu.org/journals/latex/journals
9537 \begin_layout Subsection
9541 \begin_layout Standard
9551 They are still called this in the LyX GUI, though their LaTeX equivalents
9552 in the AGU classes are
9563 \begin_layout Standard
9564 Newly defined styles are
9601 These are mostly manuscript attributes and defined in the AGU class documentati
9605 \begin_layout Standard
9606 I suspect this is still badly incomplete.
9609 \begin_layout Subsection
9613 \begin_layout Standard
9630 \begin_layout Subsection
9634 \begin_layout Itemize
9637 Journal of Geophysical Research
9646 \begin_layout Standard
9647 Add your own, it isn't so hard! Look at the
9658 \begin_layout Subsection
9659 Bugs and things to remember
9662 \begin_layout Standard
9663 In order to use the new layouts, you must remember to do the following for
9667 \begin_layout Enumerate
9673 This can be done in the
9675 Layout\SpecialChar \menuseparator
9680 Document\SpecialChar \menuseparator
9684 (AGU articles are always in English, right? So
9691 \begin_layout Enumerate
9701 (Yes, this is a bug.)
9704 \begin_layout Enumerate
9705 Make sure you use the
9709 bibliography style, by entering
9713 into the second field of the BibTeX inset.
9714 None of the standard styles will do.
9717 \begin_layout Section
9721 \begin_layout Standard
9727 \begin_layout Subsection
9731 \begin_layout Standard
9732 Broadway is for writing plays.
9733 The format is more decorative than Hollywood, and much less standardized.
9734 This format should be suitable for workshops.
9737 \begin_layout Subsection
9741 \begin_layout Standard
9742 The same as in Hollywood.
9745 \begin_layout Subsection
9749 \begin_layout Standard
9754 names as labels then cross-reference the label to insert the name.
9755 The cross-reference dialog will show the current cast of characters.
9758 \begin_layout Subsection
9759 Paper size and Margins
9762 \begin_layout Standard
9763 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9766 \begin_layout Subsection
9770 \begin_layout Standard
9771 The following environments are available.
9772 You can use broadway.bind to get the bind keys shown at the right.
9775 \begin_layout Itemize
9779 \begin_inset Newline newline
9784 You should not have to use this, but it is here for anything that does not
9788 \begin_layout Itemize
9792 \begin_inset space \hfill{}
9796 \begin_inset Newline newline
9801 Used to describe stage setting and the action.
9802 First use of speaker names in all CAPs.
9805 \begin_layout Itemize
9809 \begin_inset space \hfill{}
9813 \begin_inset Newline newline
9818 Automatically numbered.
9819 On screen it will be arabic, but will print as Roman.
9822 \begin_layout Itemize
9826 \begin_inset space \hfill{}
9830 \begin_inset Newline newline
9840 It is just centered text.
9843 \begin_layout Itemize
9847 \begin_inset space \hfill{}
9851 \begin_inset Newline newline
9856 Not automatically numbered.
9857 You supply the number.
9858 This is because I couldn't figure out how.
9861 \begin_layout Itemize
9865 \begin_inset space \hfill{}
9869 \begin_inset Newline newline
9874 A special case of Narrative to describe the setting and action as the curtain
9878 \begin_layout Itemize
9882 \begin_inset space \hfill{}
9886 \begin_inset Newline newline
9891 The speaker's (actor's) title, centered in all CAPS.
9894 \begin_layout Itemize
9898 \begin_inset space \hfill{}
9902 \begin_inset Newline newline
9907 Instructions to the speaker.
9908 The parentheses are automatically inserted.
9909 The ( will appear on screen, but both will be in the printed play.
9910 This environment is only used within
9917 \begin_layout Itemize
9921 \begin_inset space \hfill{}
9925 \begin_inset Newline newline
9930 What the Speaker says.
9933 \begin_layout Itemize
9937 \begin_inset space \hfill{}
9941 \begin_inset Newline newline
9946 The curtain comes down.
9949 \begin_layout Itemize
9953 \begin_inset space \hfill{}
9959 \begin_layout Itemize
9963 \begin_inset space \hfill{}
9969 \begin_layout Itemize
9973 \begin_inset space \hfill{}
9979 \begin_layout Standard
9983 \begin_layout Section
9987 \begin_layout Standard
9992 can be used to type letters according to German conventions.
9993 A template file is included in
9995 .../lyx/share/templates
9997 for you to use as a starting point.
10000 \begin_layout Section
10008 \begin_layout Standard
10014 \begin_layout Subsection
10018 \begin_layout Standard
10019 This is the layout file for the European Geophysical Society journals.
10024 can be downloaded from the web site of the EGS under
10025 \begin_inset Flex URL
10028 \begin_layout Plain Layout
10038 \begin_layout Subsection
10042 \begin_layout Standard
10045 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10053 The current layout file is unfortunately very unmodular and would benefit
10054 from using the various
10061 \begin_layout Section
10065 \begin_layout Standard
10066 See the LyX template file
10071 It contains all infos you need.
10074 \begin_layout Section
10080 \begin_inset CommandInset label
10089 \begin_layout Standard
10095 \begin_layout Subsection
10099 \begin_layout Standard
10100 This section describes how to use LyX to make slides for overhead projectors.
10101 There are two document classes that can do this: the default slides class
10107 This section documents the latter.
10110 \begin_layout Standard
10111 I'm going to say this again, nice and clear, so that there's no misunderstanding
10115 \begin_layout Standard
10116 \begin_inset VSpace bigskip
10122 \begin_layout Standard
10126 This section documents the class
10127 \begin_inset Quotes eld
10135 \begin_inset Quotes erd
10143 \begin_layout Standard
10144 \begin_inset VSpace bigskip
10150 \begin_layout Standard
10151 If you're looking for the documentation for
10152 \begin_inset Quotes eld
10160 \begin_inset Quotes erd
10163 , check out section
10164 \begin_inset space ~
10168 \begin_inset CommandInset ref
10170 reference "sec:slitex"
10175 If your machine doesn't have the
10180 \begin_inset Quotes eld
10188 \begin_inset Quotes erd
10191 ] installed, you'll probably have to use the default
10195 class, which isn't quite as good as
10200 \begin_layout Standard
10205 class is designed for use with version 2.1 of the
10209 LaTeX class file which is now an integral part of LaTeX2e.
10212 \begin_layout Subsection
10216 \begin_layout Standard
10217 Obviously, to use this document class, you need to select
10218 \begin_inset Quotes eld
10226 \begin_inset Quotes erd
10236 \begin_inset space ~
10242 There are some settings in the
10245 \begin_inset space ~
10250 dialog that you should know about that are specific to this class:
10253 \begin_layout Itemize
10254 Don't change the options
10265 \begin_inset space ~
10271 They're ignored by the
10278 \begin_layout Itemize
10279 The default font size is 20
10280 \begin_inset space \thinspace{}
10283 pt with the other options being 17
10284 \begin_inset space \thinspace{}
10288 \begin_inset space \thinspace{}
10292 \begin_inset space \thinspace{}
10298 \begin_layout Itemize
10299 The default font is
10307 but all math equations are still typeset in the usual roman font.
10310 \begin_layout Itemize
10315 supports A4 and Letter paper sizes as well as a special size for working
10317 \begin_inset space \thinspace{}
10321 It doesn't support A5, B5, legal or executive paper sizes.
10324 \begin_layout Itemize
10325 Don't bother changing the
10329 settings because they are ignored anyway.
10330 All floats appear where they are defined in the text.
10333 \begin_layout Itemize
10338 setting behaves a bit differently for this class.
10343 provides extensive footer and header capabilities including a user-defined
10346 \begin_inset space ~
10350 \begin_inset CommandInset ref
10352 reference "sec:foilfoot"
10357 The title page is treated differently to all other pages in the document
10366 has the logo centered at the bottom of the page (if one is defined).
10367 The possible page style choices and what they do are as follows:
10371 \begin_layout Labeling
10372 \labelwidthstring MMMMMMM
10379 The final output contains no page numbers, or other headers or footers
10380 (except footnotes of course).
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMM
10392 The final output contains page numbers centered at the bottom of the page.
10393 No other headings or footers (other than footnotes).
10396 \begin_layout Labeling
10397 \labelwidthstring MMMMMMM
10402 Page numbers in lower right corner.
10403 Additional headers and footers are also shown.
10404 This is also the default.
10407 \begin_layout Labeling
10408 \labelwidthstring MMMMMMM
10413 Gives you access to the
10417 package although its use with
10421 is discouraged by the writer of the
10425 package because of some potential page layout clashes.
10429 \begin_layout Subsubsection
10433 \begin_layout Standard
10434 The following options may be used in the extra class options in the
10436 Document\SpecialChar \menuseparator
10442 \begin_layout Labeling
10443 \labelwidthstring MMMMMMx
10448 This sets up the page layout for 7.33
10449 \begin_inset space \thinspace{}
10453 \begin_inset space \thinspace{}
10456 in paper, which is about the same aspect ratio as a 35
10457 \begin_inset space \thinspace{}
10460 mm slide, making it a bit easier to work with this medium.
10463 \begin_layout Labeling
10464 \labelwidthstring MMMMMMx
10469 Places a rule across the page below the header on every page except the
10473 \begin_layout Labeling
10474 \labelwidthstring MMMMMMx
10479 Places a rule across the page above the footer on every page except the
10483 \begin_layout Labeling
10484 \labelwidthstring MMMMMMx
10489 This is automatically set each time you create a new
10498 to use the dvips driver to rotate those pages that are set as landscape
10502 \begin_layout Labeling
10503 \labelwidthstring MMMMMMx
10508 Simply changes the page dimensions to those of a landscape page but doesn't
10510 Thus if you use this option you need to use an external program to rotate
10511 each page or feed your paper through your printer as landscape.
10512 Note that this option effectively reverses the roles of the
10520 environments (don't worry these are described in the next section).
10523 \begin_layout Labeling
10524 \labelwidthstring MMMMMMx
10529 Equation numbers on the left.
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMx
10538 Flush-left equations.
10541 \begin_layout Subsection
10542 Supported Environments
10545 \begin_layout Standard
10546 Most of the environments commonly supported in other classes are also supported
10552 There are several additional environments provided by
10556 as well as a couple added by LyX.
10557 The following environments are shared with other classes:
10560 \begin_layout Standard
10561 \begin_inset Flex Multiple Columns
10564 \begin_layout Itemize
10570 \begin_layout Itemize
10576 \begin_layout Itemize
10582 \begin_layout Itemize
10588 \begin_layout Itemize
10594 \begin_layout Itemize
10600 \begin_layout Itemize
10606 \begin_layout Itemize
10612 \begin_layout Itemize
10618 \begin_layout Itemize
10624 \begin_layout Itemize
10630 \begin_layout Itemize
10636 \begin_layout Itemize
10642 \begin_layout Itemize
10648 \begin_layout Itemize
10654 \begin_layout Itemize
10660 \begin_layout Itemize
10666 \begin_layout Itemize
10677 \begin_layout Standard
10678 That is, all the major environments apart from the sectioning environments.
10679 Since foils are essentially self-contained sections, with a title and body,
10684 provides specific commands for starting new foils and these are:
10687 \begin_layout Itemize
10693 \begin_layout Itemize
10699 \begin_layout Standard
10700 LyX also provides slightly modified versions of these two environments called:
10703 \begin_layout Itemize
10709 \begin_layout Itemize
10712 ShortRotatefoilhead
10715 \begin_layout Standard
10716 and the differences will be explained in the next section.
10719 \begin_layout Standard
10720 Since foils are often used in presenting ideas or new theorems and such
10725 also provides a comprehensive box of goodies for presenting them:
10728 \begin_layout Standard
10729 \begin_inset Flex Multiple Columns
10732 \begin_layout Itemize
10738 \begin_layout Itemize
10744 \begin_layout Itemize
10750 \begin_layout Itemize
10756 \begin_layout Itemize
10762 \begin_layout Itemize
10768 \begin_layout Itemize
10774 \begin_layout Itemize
10780 \begin_layout Itemize
10786 \begin_layout Itemize
10792 \begin_layout Itemize
10803 \begin_layout Standard
10804 The starred versions are unnumbered while the unstarred versions are numbered.
10805 There are also two list environments added by LyX and these are:
10808 \begin_layout Itemize
10814 \begin_layout Itemize
10820 \begin_layout Standard
10825 provides some powerful header and footer capabilities that are best set
10826 in the preamble although they may be set at any point in a document.
10827 If you want to change these settings in your document the best place to
10828 do so is at the very top of a foil, i.
10829 \begin_inset space \thinspace{}
10835 \begin_inset space \space{}
10840 straight after the foilhead.
10843 \begin_layout Standard
10844 For this purpose, the following command styles are provided [
10851 \begin_layout Standard
10852 \begin_inset Flex Multiple Columns
10855 \begin_layout Itemize
10859 \begin_inset space ~
10865 \begin_layout Itemize
10871 \begin_layout Itemize
10875 \begin_inset space ~
10881 \begin_layout Itemize
10885 \begin_inset space ~
10891 \begin_layout Itemize
10895 \begin_inset space ~
10902 \begin_layout Plain Layout
10903 \begin_inset space ~
10915 \begin_layout Standard
10916 There are also a few commands provided by
10920 that aren't directly supported by LyX but I'll tell you what they do and
10921 how to use them in section
10922 \begin_inset space ~
10926 \begin_inset CommandInset ref
10928 reference "sec:unsuppfoils"
10935 \begin_layout Subsection
10936 Building a Set of Foils
10939 \begin_layout Standard
10940 This section will give a simple introduction to using the different environments
10941 to build a set of foils.
10942 If you want to see an example set of foils, take a look at the
10946 file you find in LyX's
10953 \begin_layout Subsubsection
10954 Give It a Title Page
10957 \begin_layout Standard
10958 Unlike other classes that provide
10978 creates the title on a page of its own.
10979 If you leave out the
10983 environment LaTeX will substitute the current date (every time you regenerate
10987 \begin_layout Subsubsection
10991 \begin_layout Standard
10992 As I mentioned earlier, there are four ways of starting a new foil.
10993 For portrait foils you should use
11002 The difference between these two environments is the amount of space between
11003 the title of the foil (the foilhead) and the body of the foil.
11006 \begin_layout Standard
11007 Landscape foils are generated using the
11013 ShortRotatefoilhead
11016 Again the only difference is the spacing between foilhead and body.
11017 Both of the short versions have 0.5
11018 \begin_inset space ~
11021 inches less separation between the foilhead and the body.
11025 \begin_layout Standard
11026 One problem with the support for landscape foils is the requirement that
11027 you have to use the
11031 driver to generate the PostScript output otherwise the foils won't be rotated.
11032 It is possible to get landscape foils even if you haven't got the
11036 driver provided you can feed your foils sideways through your printer ;-)
11039 \begin_layout Subsubsection
11040 Theorems, Lemmas, Proofs and more
11043 \begin_layout Standard
11044 Due to a small bug in LyX you can't have two of the same type of these environme
11045 nts directly following each other.
11046 They must be separated by something.
11047 If you try, you will just be extending the previous environment as if you
11048 had merged the two environments together.
11049 So, how do you get around this problem? The simplest option is to insert
11050 some text between the two environments or add a
11054 environment between the two with just a
11055 \begin_inset Quotes eld
11063 \begin_inset Quotes erd
11067 This will force LyX to produce two separate environments and hence the
11068 correct LaTeX output.
11069 An example is provided in the example file included with the LyX distribution.
11070 Remember, this problem only occurs if you are trying to place two of the
11071 same type of theorem-like environments one directly after the other.
11074 \begin_layout Subsubsection
11078 \begin_layout Standard
11079 You get all the commonly supported list styles found in other classes as
11080 well as two new ones.
11081 I'll only describe the new ones here.
11082 If you want to find out more about the other list environments check out
11088 If you intend to use itemized lists you might also want to read about the
11092 \begin_inset space ~
11096 \begin_inset space ~
11101 dialog described above in section
11102 \begin_inset space ~
11106 \begin_inset CommandInset ref
11108 reference "sec:bullet"
11115 \begin_layout Standard
11116 The two new list styles,
11124 , are designed to make it easier for you to create lists of do's and don'ts
11125 or right and wrong by providing dedicated environments that use a tick
11126 or a cross as the label of the list.
11127 These lists are in fact dedicated variants of the
11132 They do however require that you have the
11136 packages installed.
11139 \begin_layout Subsubsection
11143 \begin_layout Standard
11148 redefines the floating tables and figures so that they appear exactly where
11149 they are in the text rather than pushing them to the top of the page or
11150 to some user specified location.
11151 In fact if you change the float placement settings they are simply ignored.
11154 \begin_layout Subsubsection
11155 Page Headers and Footers
11156 \begin_inset CommandInset label
11158 name "sec:foilfoot"
11165 \begin_layout Standard
11169 \begin_inset space ~
11178 are two commands used to control the left-footer text string.
11179 The first is meant to allow you to include a graphic logo on your foils
11181 \begin_inset Quotes eld
11189 \begin_inset Quotes erd
11193 While the second is meant to provide a classification for the audience,
11197 \begin_inset space \thinspace{}
11203 \begin_inset space \space{}
11207 It is empty by default.
11210 \begin_layout Standard
11211 The remaining page corners can be filled by
11214 \begin_inset space ~
11219 (which defaults to page numbers),
11222 \begin_inset space ~
11230 \begin_inset space ~
11238 \begin_layout Subsection
11244 \begin_inset CommandInset label
11246 name "sec:unsuppfoils"
11253 \begin_layout Standard
11254 All the commands mentioned below need to be set in a
11262 within another environment.
11265 \begin_layout Subsubsection
11269 \begin_layout Standard
11270 All lengths are adjusted using the
11293 should be replaced by the name given to the length you want to change and
11298 is the length value.
11299 All lengths should be specified in units of length such as inches (
11311 ) or relative to some document or font-based length such as
11321 \begin_layout Standard
11322 It's possible to change the spacing between a foilhead and the body of the
11323 foil by adjusting the length specified by
11330 For example, to make
11335 \begin_inset space \space{}
11338 in closer to their bodies put the following in the preamble:
11344 foilheadskip}{-0.5in}
11347 \begin_layout Standard
11348 The spacings around floats can be adjusted by setting these lengths:
11351 \begin_layout Labeling
11352 \labelwidthstring MMMMMMMMMMM
11359 Separation between the text and the top of the float
11362 \begin_layout Labeling
11363 \labelwidthstring MMMMMMMMMMM
11370 Separation between the float and the caption
11373 \begin_layout Labeling
11374 \labelwidthstring MMMMMMMMMMM
11381 Separation between the caption and the following text
11384 \begin_layout Labeling
11385 \labelwidthstring MMMMMMMMMMM
11392 You can make the captions narrower than the surrounding text by adjusting
11394 Best done relative to
11403 \begin_layout Standard
11404 There are also several title page related lengths that you may find useful
11405 if you have a long title or several authors:
11408 \begin_layout Labeling
11409 \labelwidthstring MMMMMMMMMMM
11416 Separation from headers to
11421 \begin_layout Labeling
11422 \labelwidthstring MMMMMMMMMMM
11440 \begin_layout Labeling
11441 \labelwidthstring MMMMMMMMMMM
11455 \begin_layout Labeling
11456 \labelwidthstring MMMMMMMMMMM
11472 \begin_layout Labeling
11473 \labelwidthstring MMMMMMMMMMM
11489 \begin_layout Standard
11490 The last length related command affects all the list environments.
11501 a list environment then all the vertical spacing between the list items
11503 Note that this is a command not a length so it doesn't require
11509 like the stuff mentioned above.
11512 \begin_layout Subsubsection
11513 Headers and Footers
11516 \begin_layout Standard
11529 commands control whether the logo in the
11533 definition appear on a given page.
11540 in the preamble then none of the foils will have the logo on them.
11541 If you don't want the logo on a particular page place the
11547 directly after the foilhead of that page and the
11553 directly after the next foilhead.
11556 \begin_layout Standard
11557 If you decide to use the
11561 page style setting in the
11564 \begin_inset space ~
11569 dialog you should probably add
11579 to your preamble so headers and footers on landscape pages are correctly
11580 placed when rotated.
11581 This is due to some clashes between the page layouts provided by the
11592 \begin_layout Section
11593 Hollywood (Hollywood spec scripts)
11596 \begin_layout Standard
11602 \begin_layout Subsection
11606 \begin_layout Standard
11607 Getting the format of a Hollywood script right is a
11608 \begin_inset Quotes eld
11612 \begin_inset Quotes erd
11615 It is designed to make the readers focus on content and to be easy and
11616 familiar for the actors to read.
11617 Each page of a script should be one minute of film.
11618 Nothing goes in a script that you cannot see or hear on screen.
11619 The courier 12 pt font should be used throughout.
11623 \begin_layout Subsection
11627 \begin_layout Standard
11628 Speakers' lines should NEVER break in mid-sentence.
11629 If a speaker's lines continue over a page break, repeat the
11633 title followed by (Cont'd).
11636 \begin_layout Subsection
11640 \begin_layout Standard
11645 names as labels then cross-reference the label to insert the name.
11646 The cross-reference dialog will show the current cast of characters.
11647 You can use this to insert the speaker name in narratives also.
11650 \begin_layout Subsection
11651 Paper size and Margins
11654 \begin_layout Standard
11655 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11658 \begin_layout Subsection
11662 \begin_layout Standard
11663 The following environments are available.
11664 You can use hollywood.bind to get the bind keys shown at the right.
11667 \begin_layout Itemize
11671 \begin_inset Newline newline
11676 Used where nothing else works.
11680 \begin_layout Itemize
11686 \begin_inset space \hfill{}
11694 \begin_inset Newline newline
11697 Usually followed by something like
11698 \begin_inset Quotes eld
11701 on Sally waking up.
11702 \begin_inset Quotes erd
11708 \begin_layout Itemize
11712 \begin_inset space \hfill{}
11716 \begin_inset Newline newline
11721 Introduces a new INTERIOR camera set-up.
11722 Always followed by DAY or NIGHT, or something similar to define the lighting
11724 Everthing on this line in CAPS.
11727 \begin_layout Itemize
11731 \begin_inset space \hfill{}
11735 \begin_inset Newline newline
11740 Introduces a new EXTERIOR camera set-up.
11741 Everthing on this line in CAPS.
11744 \begin_layout Itemize
11748 \begin_inset space \hfill{}
11752 \begin_inset Newline newline
11757 The character speaking.
11760 \begin_layout Itemize
11764 \begin_inset space \hfill{}
11768 \begin_inset Newline newline
11773 Instructions to the speaker.
11774 The () are automatically inserted, but only the ( will show in LyX.
11775 Both will be printed.
11778 \begin_layout Itemize
11782 \begin_inset space \hfill{}
11786 \begin_inset Newline newline
11798 \begin_layout Itemize
11802 \begin_inset space \hfill{}
11806 \begin_inset Newline newline
11811 Camera movement instruction.
11813 \begin_inset space \thinspace{}
11817 \begin_inset space \space{}
11823 \begin_layout Itemize
11827 \begin_inset space \hfill{}
11833 \begin_layout Itemize
11837 \begin_inset space \hfill{}
11843 \begin_layout Itemize
11847 \begin_inset space \hfill{}
11853 \begin_layout Itemize
11857 \begin_inset space \hfill{}
11863 \begin_layout Subsection
11867 \begin_layout Itemize
11871 \begin_layout Itemize
11875 \begin_layout Itemize
11877 \begin_inset space \thinspace{}
11884 \begin_layout Itemize
11889 \begin_layout Itemize
11890 PAN — camera movement
11893 \begin_layout Itemize
11894 INSERT — cut to close-up of
11897 \begin_layout Section
11901 \begin_layout Standard
11904 Panayotis Papasotiriou
11907 \begin_layout Subsection
11911 \begin_layout Standard
11912 The ijmpc package is a set of macros that facilitates electronic manuscript
11915 International Journal of Modern Physics C
11918 Similarly, the ijmpd package is for creating manuscripts to be submitted
11921 International Journal of Modern Physics D
11924 Both journals are published by World Scientific.
11925 The corresponding document classes are named
11934 These files, together with instructions for the authors, can be downloaded
11936 \begin_inset Flex URL
11939 \begin_layout Plain Layout
11941 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11947 \begin_inset Flex URL
11950 \begin_layout Plain Layout
11952 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11958 Both packages are modified versions of the standard
11959 \begin_inset Quotes eld
11963 \begin_inset Quotes erd
11966 package, and they are almost (but not exactly) identical.
11967 Most of their features are supported by LyX.
11968 I have used LyX successfully to write articles submitted to both journals
11969 without any problem.
11972 \begin_layout Subsection
11976 \begin_layout Standard
11977 As usual, the easiest way to write a paper is to start with a template.
11980 File\SpecialChar \menuseparator
11999 This will give an (almost) empty document that includes the most common
12000 fields found in a manuscript.
12001 Simply overwrite the existing text (including the brackets,
12006 You should keep in mind the following remarks.
12009 \begin_layout Enumerate
12010 LyX won't let you change the font size and the page style of the document,
12011 because such modifications are not allowed by both packages.
12014 \begin_layout Enumerate
12015 The language of the document should not be changed.
12016 Before previewing your paper, be sure that the babel package is not used.
12017 To do this, click on
12019 Tools\SpecialChar \menuseparator
12030 checkbox in the language settings, and click on
12038 , if you wish to make this change permanent).
12041 \begin_layout Enumerate
12043 \begin_inset Quotes eld
12047 \begin_inset Quotes erd
12050 style must be used to define keywords.
12053 \begin_layout Enumerate
12054 The ijmpc package provides a style named
12055 \begin_inset Quotes eld
12058 Classification Codes
12059 \begin_inset Quotes erd
12062 , which can be used to define classification codes, such as PACS numbers.
12063 Note that this facility is not supported by the ijmpd package.
12066 \begin_layout Enumerate
12067 Several new environments are available:
12068 \begin_inset Quotes eld
12072 \begin_inset Quotes erd
12076 \begin_inset Quotes eld
12080 \begin_inset Quotes erd
12084 \begin_inset Quotes eld
12088 \begin_inset Quotes erd
12092 \begin_inset Quotes eld
12096 \begin_inset Quotes erd
12100 \begin_inset Quotes eld
12104 \begin_inset Quotes erd
12108 \begin_inset Quotes eld
12112 \begin_inset Quotes erd
12116 \begin_inset Quotes eld
12120 \begin_inset Quotes erd
12124 \begin_inset Quotes eld
12128 \begin_inset Quotes erd
12132 \begin_inset Quotes eld
12136 \begin_inset Quotes erd
12140 \begin_inset Quotes eld
12144 \begin_inset Quotes erd
12148 \begin_inset Quotes eld
12152 \begin_inset Quotes erd
12156 \begin_inset Quotes eld
12160 \begin_inset Quotes erd
12164 \begin_inset Quotes eld
12168 \begin_inset Quotes erd
12172 \begin_inset Quotes eld
12176 \begin_inset Quotes erd
12180 Their use is more or less obvious.
12181 LyX supports all these environments; it will use the proper label, text
12182 style, and numbering scheme for each of them.
12185 \begin_layout Enumerate
12186 Both packages use basic citations; the natbib package should not be used.
12187 In LyX, citation references are shown as usual; in the output, citations
12188 are shown as superscripts.
12189 If you want to use a citation as normal text, you should use the
12194 \begin_inset space \thinspace{}
12198 \begin_inset space \space{}
12202 \begin_inset Quotes eld
12206 \begin_inset space \space{}
12216 \begin_inset Quotes erd
12222 \begin_layout Enumerate
12224 \begin_inset Quotes eld
12228 \begin_inset Quotes erd
12231 section in both packages.
12232 To put acknowledgments, just use the
12233 \begin_inset Quotes eld
12237 \begin_inset Quotes erd
12243 \begin_layout Enumerate
12244 Appendices may be added to the paper,
12248 the Acknowledgments and
12253 LyX provides a special environment, called
12254 \begin_inset Quotes eld
12258 \begin_inset Quotes erd
12261 which marks the beginning of the appendices.
12262 This environment should be left blank; it just sends a LaTeX command, but
12263 nothing is really printed.
12265 \begin_inset Quotes eld
12269 \begin_inset Quotes erd
12272 is printed with blue letters, as a signal that all sections after that
12273 point are appendices.
12274 To write an appendix, use the
12275 \begin_inset Quotes eld
12279 \begin_inset Quotes erd
12283 LyX will number each appendix with capital letters, as required by both
12286 \begin_inset Quotes eld
12290 \begin_inset Quotes erd
12297 be present before the first appendix; if not, all appendices will be numbered
12298 as normal sections in the output.
12301 \begin_layout Enumerate
12302 The ijmpc and the ijmpd packages use the
12306 command to implement table captions.
12307 As a result, a table created by LyX is printed correctly, but its caption
12309 However, you can use some TeX code to overcome this problem, so that captions
12310 are printed as expected.
12311 To do so, create a float table as usual, remove the caption, and replace
12312 it with the TeX code
12322 (sic); you must also the TeX code
12326 immediately after the tabular material.
12327 Study the example table included in the template files to see how this
12328 trick is implemented.
12329 Alternatively, If you need table captions, you should implement the whole
12334 file, then include this file to the LyX document (
12336 Insert\SpecialChar \menuseparator
12337 File\SpecialChar \menuseparator
12339 \begin_inset space ~
12345 Details on how to create a table float can be found in the files
12353 , included in the corresponding packages.
12356 \begin_layout Subsection
12357 Preparing a paper for submission
12360 \begin_layout Standard
12361 Before you submit your paper you must export the LyX document as a LaTeX
12364 File\SpecialChar \menuseparator
12365 Export\SpecialChar \menuseparator
12372 \begin_layout Plain Layout
12373 Actually you have the choice between LaTeX (plain) and pdflatex.
12374 If you intend to use pdflatex to prepare the paper, you should use the
12375 pdflatex option so that included graphics are converted to PDF format,
12376 ready for use by pdflatex.
12381 , then make the following changes to the resulting
12388 \begin_layout Enumerate
12389 Remove the comment lines before the
12398 \begin_layout Enumerate
12399 Remove everything between (and including) the
12411 commands, except for any commands you specifically put into the LaTeX preamble.
12414 \begin_layout Standard
12419 file should be saved and processed through LaTeX as many times as necessary.
12420 You may also want to check the resulting
12427 \begin_layout Subsection
12431 \begin_layout Standard
12432 The use of TeX code is reduced to two commands, which must be placed at
12433 the top of the document.
12434 If you started writing your paper by using the
12442 template, the TeX code needed is already in its place; you usually don't
12444 You may only modify the first TeX code to specify the information printed
12445 to the top of odd and even pages (authors' names and short paper's title,
12447 This TeX code must have the form
12451 markboth{Authors' Names}{Short Paper's Title}
12456 \begin_layout Section
12460 \begin_layout Standard
12466 \begin_layout Subsection
12470 \begin_layout Standard
12471 The iopart package provides a document class to create electronic manuscript
12472 submission to the journals published by the Institute of Physics.
12473 Instructions for the authors how to create a paper using the iopart class
12474 can be downloaded together with the iopart package from the site
12475 \begin_inset Flex URL
12478 \begin_layout Plain Layout
12480 ftp://ftp.iop.org/pub/journals/latex2e
12488 \begin_layout Subsection
12492 \begin_layout Standard
12493 The easiest way to write a paper is to start with the file
12497 that is available in LyX's examples files folder.
12498 Open this file, save it under a new name, and start writing.
12499 The example file explains how to use the special text environments.
12500 Here are the most important advices:
12503 \begin_layout Itemize
12504 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12507 Use AMS math package
12509 in the document settings under
12516 \begin_layout Itemize
12519 The title environment defines the kind of your paper.
12520 So use one of the following environments for the title:
12524 \begin_layout Itemize
12533 \begin_layout Itemize
12542 \begin_layout Itemize
12548 for a Topical review
12551 \begin_layout Itemize
12560 \begin_layout Itemize
12569 \begin_layout Itemize
12575 for a Paper (same as Title)
12578 \begin_layout Itemize
12584 for a Preliminary communication
12587 \begin_layout Itemize
12593 for a Rapid communication
12596 \begin_layout Itemize
12602 for a Letter to the editor
12606 \begin_layout Itemize
12609 All title environments except of
12613 can have an optional short title.
12616 \begin_layout Itemize
12617 There is a general title environment
12621 which is not directly supported by the LyX.
12622 This can be used as TeX code when your document doesn't fit into one of
12623 the other title types.
12626 \begin_layout Standard
12627 For more informations like hints for special table and formula formatting,
12628 look at the IOP author guidelines.
12631 \begin_layout Section
12635 \begin_layout Standard
12638 Panayotis Papasotiriou
12641 \begin_layout Subsection
12645 \begin_layout Standard
12646 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12647 that facilitates electronic manuscript submission to the journals they
12649 Most known of them (at least in my domain of interest) are
12651 Astrophysics and Space Science
12657 , but there are many others (see a complete list at
12658 \begin_inset Flex URL
12661 \begin_layout Plain Layout
12663 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12669 The Kluwer package may be downloaded from the site
12670 \begin_inset Flex URL
12673 \begin_layout Plain Layout
12675 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12681 A complete user guide is contained in that package (but it can also be
12682 downloaded separately).
12685 \begin_layout Standard
12686 LyX supports many features of the package but not everything.
12687 However, the TeX code needed is reduced to some
12688 \begin_inset Quotes eld
12692 \begin_inset Quotes erd
12695 commands of the package (see
12696 \begin_inset space ~
12700 \begin_inset CommandInset ref
12702 reference "subsec:kluwer_peculiarities"
12707 I have recently used LyX to write an article submitted to the
12709 Astrophysics and Space Science
12711 without any problem.
12714 \begin_layout Subsection
12718 \begin_layout Standard
12719 The easiest way to write a paper is to start with the Kluwer template file.
12722 File\SpecialChar \menuseparator
12734 This will give an (almost) empty document that includes the most common
12735 fields found in a manuscript and a short description of their use.
12736 As in most templates, simply overwrite the existing text (including the
12741 ) with the correct information.
12744 \begin_layout Subsection
12745 Preparing a paper for submission
12748 \begin_layout Standard
12749 As in the AASTeX package, before you submit your paper to a journal you
12751 \begin_inset Quotes eld
12755 \begin_inset Quotes erd
12761 \begin_layout Enumerate
12762 Export your paper as a LaTeX file.
12763 To do this, click on
12765 File\SpecialChar \menuseparator
12766 Export\SpecialChar \menuseparator
12773 \begin_layout Enumerate
12778 file with a text editor and make the following changes
12782 \begin_layout Enumerate
12783 remove the comment lines before the
12792 \begin_layout Enumerate
12793 remove everything between (and including) the
12805 commands, except for any commands you specifically put into the LaTeX preamble.
12808 \begin_layout Standard
12817 \begin_layout Enumerate
12822 file through LaTeX as many times as necessary (usually up to three).
12825 \begin_layout Enumerate
12831 \begin_inset space \thinspace{}
12835 \begin_inset space \space{}
12842 , and check if everything is OK (it should, if you didn't make any mistake).
12845 \begin_layout Subsection
12846 \begin_inset Quotes eld
12850 \begin_inset Quotes erd
12853 of the Kluwer package
12854 \begin_inset CommandInset label
12856 name "subsec:kluwer_peculiarities"
12863 \begin_layout Standard
12864 The Kluwer package has the following
12865 \begin_inset Quotes eld
12869 \begin_inset Quotes erd
12875 \begin_layout Enumerate
12876 It is possible to write multiple articles in the same LaTeX file
12880 \begin_layout Plain Layout
12881 I can't imagine any good reason to do this.
12887 Each article must be included in the environment
12888 \begin_inset Quotes eld
12892 \begin_inset Quotes erd
12896 Unfortunately, this environment cannot be omitted, even if you write just
12898 Therefore, each article starts with the command
12904 and, obviously, ends with the command
12911 Although this can be implemented in LyX, I didn't included it, since it
12912 looks ugly and can confuse the novice user.
12913 Therefore, you need to enter them directly and mark them as LaTeX code
12915 \begin_inset Quotes eld
12919 \begin_inset Quotes erd
12925 \begin_layout Enumerate
12926 Information given at the beginning of the article (i.
12927 \begin_inset space \thinspace{}
12931 \begin_inset space \space{}
12934 title, subtitle, author, institution, running title, running author, abstract
12935 and keywords) must be included in an environment called
12936 \begin_inset Quotes eld
12940 \begin_inset Quotes erd
12944 This is not implemented in LyX, so you must enter title, subtitle etc.
12945 \begin_inset space ~
12948 between two TeX code lines (
12963 \begin_layout Enumerate
12964 According to the user manual, the label of each bibliography item must be
12988 \begin_layout Standard
12993 template takes care of all these
12994 \begin_inset Quotes eld
12998 \begin_inset Quotes erd
13002 If you start a new paper using this template you don't need to do anything
13007 \begin_layout Enumerate
13008 don't delete the TeX code included in the template, and
13011 \begin_layout Enumerate
13012 copy the example bibliography item included in the template and modify it
13013 as necessary to enter new bibliography items.
13016 \begin_layout Section
13020 \begin_layout Standard
13026 \begin_layout Subsection
13030 \begin_layout Standard
13031 The LyX document classes
13033 article (koma-script)
13037 report (koma-script)
13055 correspond to the LaTeX document classes
13072 \begin_inset space ~
13075 of the Koma-Script family.
13076 They are replacements for the standard document classes
13092 , resp., and fit better to European typography conventions in a number of
13096 \begin_layout Itemize
13097 Standard character size is 11pt in
13099 article (koma-script)
13103 report (koma-script)
13111 letter (koma-script)
13116 \begin_layout Itemize
13117 Headings, labels of the description environment, and a number of elements
13120 letter (koma-script)
13122 document class are set in a bold sans serif font.
13126 \begin_layout Plain Layout
13127 There is a big difference between the bold sans serif old cm fonts and new
13128 ec fonts, especially in the appearance of headings.
13129 In comparison, the ec bold sans serif fonts look a bit thin.
13130 Here the LaTeX package
13138 helps to produce the
13139 \begin_inset Quotes eld
13143 \begin_inset Quotes erd
13146 appearance when using the ec fonts.
13151 The numbering of chapter headings is made in the same way as the numbering
13152 of section headings, that is without the extra line
13153 \begin_inset Quotes eld
13156 Chapter\SpecialChar \ldots{}
13158 \begin_inset Quotes erd
13162 In addition, the appearance of the headings can be modified by using a
13163 number of options (in LyX to be entered in the field
13166 \begin_inset space ~
13173 Layout\SpecialChar \menuseparator
13180 \begin_layout Itemize
13181 The main means in the Koma-Script document classes to design the type area
13190 (in LyX to be entered in the extra class options field in the dialog
13192 Document\SpecialChar \menuseparator
13196 They make a clearer modification of page margins possible as do the options
13199 Document\SpecialChar \menuseparator
13206 \begin_layout Itemize
13207 The LaTeX document classes of the Koma-Script family define a number of
13208 additional commands.
13209 Those part of it which makes sense in LyX is implemented in corresponding
13213 \begin_layout Standard
13214 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13215 can be found in the Koma-Script documentation
13226 \begin_layout Subsection
13227 article (koma-script), report (koma-script), and book (koma-script)
13230 \begin_layout Standard
13231 The document classes
13233 article (koma-script)
13237 report (koma-script)
13247 are implemented in the layout files
13260 They contain all the paragraph types of the corresponding standard document
13273 , resp., partly modified, with the exception of the LyX specific
13277 -type, which is replaced by the new
13281 -type having the same functionality.
13286 -Type there is a number of new paragraph types added.
13293 letter (koma-script)
13298 \begin_layout Itemize
13307 : are equivalents to
13315 , resp., additionally inserting an entry in the table of contents.
13324 are not contained in
13326 article (koma-script)
13331 \begin_layout Itemize
13340 : behave exactly as
13348 , resp., additionally clearing running heads.
13353 is not contained in
13355 article (koma-script)
13361 \begin_layout Plain Layout
13374 report (koma-script)
13376 , but since this is identical to
13380 , is has not been implemented in LyX.
13388 \begin_layout Itemize
13393 : generates a heading directly above the following paragraph in the standard
13394 character size without affecting the structure of the document.
13397 \begin_layout Itemize
13406 are special captions which respect the different space settings needed
13407 for captions placed above or below an element (if you follow strict typographic
13408 rules, you might want to place table captions always above the table).
13409 You can also use the class option
13413 , which will switch
13426 You need at least Koma-Script version 2.8q to use this.
13429 \begin_layout Itemize
13434 : can be used to set a bonmot, e.
13435 \begin_inset space \thinspace{}
13439 \begin_inset space \space{}
13442 at the beginning of a chapter.
13443 If you use the optional argument (
13445 Insert\SpecialChar \menuseparator
13447 \begin_inset space ~
13452 ), you can insert the dictum's author there.
13453 Dictum and author are separated by a line.
13454 You need at least Koma-Script version 2.8q to use this.
13459 is not contained in
13461 article (koma-script)
13466 \begin_layout Standard
13467 The following types, together with the standard types
13479 , form the title area of the document.
13480 They must be entered ahead of the first
13481 \begin_inset Quotes eld
13485 \begin_inset Quotes erd
13492 \begin_layout Plain Layout
13493 The corresponding LaTeX commands must appear before the
13504 When such a type is used more than once, the latter usage overwrites the
13505 former one, that means, for every type only the latest usage is valid.
13506 The order of the different types however has, like
13518 , no effect on the appearance of the produced document.
13521 \begin_layout Itemize
13526 : produces a centered paragraph above the ordinary title (
13538 ) for the subject of the document.
13541 \begin_layout Itemize
13546 : produces a centered paragraph below the ordinary title (
13558 ) for the publishers' name.
13561 \begin_layout Itemize
13568 report (koma-script)
13574 produces a centered paragraph on its own page behind the title page, or
13577 article (koma-script)
13579 produces a centered paragraph below the ordinary title (
13595 ) for a dedication.
13598 \begin_layout Itemize
13603 : produces a left aligned paragraph above the ordinary title (
13619 ) for a document`s head.
13622 \begin_layout Itemize
13627 : produces in a double-sided print in
13629 report (koma-script)
13635 a left-aligned paragraph at the top of the title page`s back or has no
13636 effect in a single-sided print or in
13638 article (koma-script)
13643 \begin_layout Itemize
13648 : produces in a double-sided print in
13650 report (koma-script)
13656 a left-aligned paragraph at the bottom of the title page`s back or has
13657 no effect in a single-sided print or in
13659 article (koma-script)
13664 \begin_layout Itemize
13669 : produces a special
13670 \begin_inset Quotes eld
13674 \begin_inset Quotes erd
13677 page ahead of the actual document containing a paragraph without special
13681 \begin_layout Standard
13682 The layout files for the document classes
13684 article (koma-script)
13688 report (koma-script)
13694 do include the file
13699 This is thought of as a place to define your own types.
13704 in your personal layout directory and edit the file!
13707 \begin_layout Subsection
13708 letter (koma-script)
13711 \begin_layout Standard
13715 letter (koma-script)
13717 is implemented in the layout file
13722 It contains all the paragraph types of the corresponding standard document
13727 , partly modified, with the exception of the LyX specific types
13739 type, which is replaced by the new
13744 In addition, it contains, in contrast to the standard document class, the
13762 Furthermore, there are a number of new letter specific types.
13765 \begin_layout Standard
13766 The appearance of the letter produced by this document class can be controlled
13767 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13771 \begin_layout Plain Layout
13772 For example, the standard appearance of the letter`s heading, consisting
13773 of name and address, is quite self-willed.
13775 \begin_inset Quotes eld
13779 \begin_inset Quotes erd
13782 heading is produced by the following LaTeX commands in the preamble:
13785 \begin_layout LyX-Code
13795 \begin_layout LyX-Code
13811 \begin_layout LyX-Code
13821 \begin_layout LyX-Code
13841 A detailed German description of such LaTeX commands can be found in the
13842 Koma-Script documentation
13847 With it, the letter's author can produce his personal letter layout.
13850 \begin_layout Standard
13859 define the beginning of the letter and must be used in every letter.
13860 To emphasize them in the LyX document class, they are marked with the letter
13870 \begin_inset space ~
13873 in the left margin.
13874 It is possible to write any number of letters in one file.
13879 type produces a new letter using the same addressee and a
13883 type produces a new addressee.
13900 are ordinary paragraph types and can also be used several times in one
13901 and the same letter.
13904 \begin_layout Itemize
13909 : produces a paragraph for the addressee and implicitly defines the beginning
13913 \begin_layout Itemize
13918 : produces a paragraph for the form of address and implicitly produces a
13922 \begin_layout Itemize
13927 : produces a paragraph for a close.
13930 \begin_layout Itemize
13935 : produces a paragraph for a postscript.
13938 \begin_layout Itemize
13943 : produces a paragraph for a distribution list.
13946 \begin_layout Itemize
13951 : produces a paragraph for enclosures.
13954 \begin_layout Standard
13995 are input types provided with a label to enter information, which will
13996 be processed by the document class.
14000 \begin_layout Plain Layout
14001 It could be seen as a matter of inconsequence, that the types
14009 described above are not such input types as well.
14010 Because of the special meaning of those types, however, I have implemented
14011 them as ordinary paragraph types with a one letter mark in the left margin.
14012 Moreover, it would affect my feeling of symmetry, if the
14020 type had such a serious different appearance.
14025 The types must be used ahead of the corresponding
14032 \begin_layout Standard
14033 An implementation of these types in a WYSIWYG fashion does not seem to make
14034 sense, because the real appearance of the produced letter does not only
14035 depend on the usage of the particular type, but also on other factors.
14036 For example, a signature entered in the
14040 type will in the standard behavior appear in the produced letter only,
14041 when in the same letter also a
14046 The entered value of the
14050 type will in the standard behavior not appear in the produced letter at
14052 The possibility to design the letter`s heading freely is already indicated
14053 in a footnote above.
14056 \begin_layout Standard
14057 The input types can also be used as empty paragraphs.
14058 This makes sense e.
14059 \begin_inset space \thinspace{}
14063 \begin_inset space \space{}
14075 type is not used at all, in the standard behavior the value of the
14079 type is used as signature, whereas if an empty
14083 type is used, no signature value is defined.
14086 \begin_layout Standard
14087 By using the input types it is possible to write a letter template, containing
14088 filled input types with your personal dates (name, address, etc.) and empty
14089 input types for other dates you want to enter.
14092 \begin_layout Itemize
14097 : sender's name, in the standard behavior appears as a centered paragraph
14098 in small caps in the letter`s heading.
14101 \begin_layout Itemize
14106 : sender's signature, in the standard behavior appears below the
14115 type is used, the value of the
14119 type appears instead.
14122 \begin_layout Itemize
14127 : sender's address, in the standard behavior appears in a centered paragraph
14128 in the letter`s heading below the sender's name.
14131 \begin_layout Itemize
14136 : sender's telephone number, in the standard behavior only sets the LaTeX
14146 \begin_layout Itemize
14151 : place of the letter`s making.
14154 \begin_layout Itemize
14159 : date of the letter`s making.
14168 , in the standard behavior, produce the place and the date in a right-aligned
14169 line below the addressee's field.
14174 type is used, neither place nor date appear, independent of the value of
14184 type is used, the date of the letter `s production is used.
14187 \begin_layout Itemize
14192 : sender`s back address, in the standard behavior appears above the addressee's
14193 field in a small sans serif font.
14196 \begin_layout Itemize
14201 : special mail information, in the standard behavior appears underlined
14202 above the addressee's field below the back address.
14205 \begin_layout Itemize
14210 : additional information, in the standard behavior appears on right side
14211 below the addressee`s field.
14214 \begin_layout Itemize
14219 : the letter's title, in the standard behavior appears in a big, bold, sans
14220 serif font above the subject.
14223 \begin_layout Itemize
14228 : the letter's subject, in the standard behavior appears in a bold font
14236 \begin_layout Standard
14257 produce a business letter like line above the
14261 line containing the fields
14262 \begin_inset Quotes eld
14266 \begin_inset Quotes erd
14270 \begin_inset Quotes eld
14274 \begin_inset Quotes erd
14278 \begin_inset Quotes eld
14282 \begin_inset Quotes erd
14286 \begin_inset Quotes eld
14290 \begin_inset Quotes erd
14294 \begin_inset Quotes eld
14298 \begin_inset Quotes erd
14302 \begin_inset Quotes eld
14306 \begin_inset Quotes erd
14310 For the date field, the value of the
14316 \begin_inset Quotes eld
14319 business letter types
14320 \begin_inset Quotes erd
14323 is used, the value of the
14327 type however does not appear, but only the LaTeX variable
14334 The ordinary output of place and date in a right-aligned line below the
14335 addressee`s field is suppressed.
14336 The types are implemented as input types provided with a label and must
14337 be used ahead of the corresponding
14344 \begin_layout Itemize
14352 \begin_layout Itemize
14360 \begin_layout Itemize
14368 \begin_layout Itemize
14376 \begin_layout Itemize
14384 \begin_layout Subsection
14385 The new letter class: letter (koma-script v.2)
14388 \begin_layout Standard
14394 \begin_layout Standard
14395 \begin_inset VSpace medskip
14401 \begin_layout Standard
14403 Koma-Script version 2.8 has introduced a new letter class
14407 which supersedes the now unsupported
14412 It has — on the LaTeX side — a completely new interface and is not compatible
14413 with the old class.
14414 Therefore, LyX supports both, though it is recommended you use the new
14418 \begin_layout Standard
14419 This class covers the same functionality as
14421 letter (koma-script),
14424 The basic items are
14428 (receiver's address, same as
14432 in the old layout),
14445 will start a new letter (i.
14446 \begin_inset space \thinspace{}
14450 \begin_inset space \space{}
14453 you can write several letters per document).
14454 New elements are sender's
14470 and the possibility to use a
14476 Insert\SpecialChar \menuseparator
14482 \begin_layout Standard
14483 The biggest improvement is, though, that the letter's layout is configurable
14484 to meet almost any needs.
14485 This can be done via the preamble or with a special style file (Letter
14486 Class Option, extension
14490 ), that will be read in as a class option.
14494 \begin_layout Plain Layout
14495 The KOMA package comes with some default
14500 There is, for instance, a
14504 file that follows german typesetting rules, or a
14508 that provides the default layout of the old
14513 The latter can be loaded with the class option
14522 ayout\SpecialChar \menuseparator
14527 ocument\SpecialChar \menuseparator
14539 template that is included in LyX for examples.
14540 A detailed description is to be found in the Koma-Script documentation
14548 \begin_layout Subsection
14552 \begin_layout Standard
14553 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14557 \begin_layout Itemize
14558 The chapter number of a
14562 type appears on a line of its own above the chapter heading instead of
14563 appearing in the same line ahead of it.
14564 The cause for that is the LyX internal behavior for the labeltype
14568 in the layout file.
14571 \begin_layout Itemize
14572 The headings of the types
14580 are only put in the
14581 \begin_inset Quotes eld
14585 \begin_inset Quotes erd
14588 LaTeX table of contents, but not in the LyX table of contents (
14590 Document\SpecialChar \menuseparator
14592 \begin_inset space ~
14596 \begin_inset space ~
14604 \begin_layout Itemize
14605 The paragraphs in a
14609 document class appear in a skip separation mode, not indented.
14610 This is the standard behavior, no special LaTeX commands are needed for
14614 Document\SpecialChar \menuseparator
14617 dialog the corresponding radio button indicates
14626 value always has the effect that extra LaTeX commands are inserted in the
14627 document to produce the gap, which is not what is wanted in this case.
14630 \begin_layout Section
14634 \begin_layout Standard
14640 \begin_layout Subsection
14644 \begin_layout Standard
14645 Memoir is a very powerful and constantly evolving class.
14646 It has been designed with regard to fictional and non-fictional literature.
14647 Its aim is to let the user have maximum control over the typesetting of
14649 Memoir is based on the standard book class, but it can also emulate the
14650 article class (see below).
14653 \begin_layout Standard
14654 Peter Wilson, the developer of Memoir, is known as the author of lots of
14655 useful packages in the LaTeX world.
14656 Most of them have been merged with Memoir.
14657 Therefore, it is much easier to layout the table of contents, appendices,
14658 chapter designs and such.
14659 LyX, though, does not support all of these goodies natively.
14660 Some of them might be added to forthcoming releases
14664 \begin_layout Plain Layout
14665 You are invited to send suggestions to
14666 \begin_inset Flex URL
14669 \begin_layout Plain Layout
14671 lyx-devel@lists.lyx.org
14681 , lots will probably never be supported, due to the limitations of LyX's
14683 Of course you can still use all features with the help of some native LaTeX
14688 \begin_layout Plain Layout
14693 \begin_layout Plain Layout
14703 \begin_inset space ~
14707 \begin_inset CommandInset ref
14709 reference "sec:Inserting-TeX-Code"
14719 In this section, we can only list those features that are natively supported
14721 For detailed descriptions (and for the rest of features) we recommend you
14722 have a look at the detailed manual of the Memoir class
14726 \begin_layout Plain Layout
14731 \begin_layout Plain Layout
14741 \begin_inset Flex URL
14744 \begin_layout Plain Layout
14746 CTAN:/macros/latex/memoir/memman.pdf
14756 , which is not only a user guide for the class, but also both a comprehensive
14757 description on good typesetting and a superb example for good typesetting
14761 \begin_layout Subsection
14762 Basic features and restrictions
14765 \begin_layout Standard
14766 Memoir supports basically all features of the standard book classes.
14767 There are, however, some differences, as follows:
14770 \begin_layout Description
14772 \begin_inset space ~
14775 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14778 \begin_layout Description
14780 \begin_inset space ~
14783 style: The fancy page style is not supported, due to a command clash between
14784 Memoir and the fancyhdr package (they both define a command with the same
14785 name, which confuses LaTeX).
14786 Instead, Memoir comes with a number of its own page styles (see
14788 Layout\SpecialChar \menuseparator
14789 Document\SpecialChar \menuseparator
14791 \begin_inset space ~
14797 If you want to use these for the chapter pages, you have to use the command
14804 in the main text or in preamble (e.
14805 \begin_inset space \thinspace{}
14809 \begin_inset space \space{}
14816 chapterstyle{companion}
14821 \begin_layout Description
14822 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14823 optional argument in the standard classes.
14824 With this, you can specify an alternative version of the title for the
14825 table of contents and the headers (for instance, if the title is too long).
14826 In LyX, you can do this via
14828 Insert\SpecialChar \menuseparator
14830 \begin_inset space ~
14835 at the beginning of a chapter/section.
14836 Memoir features a second optional argument and thus separates the table
14837 of contents from the header.
14838 You can define three variants of a title with this: one for the main text,
14839 one for the table of contents, and one for the headers.
14840 Simply insert two optional arguments if you need this feature, the first
14841 one containing the short title for the Table of Contents, the second one
14842 containing an alternative short title for the headers.
14845 \begin_layout Description
14846 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14847 of contents, the list of figures and the list of table start a new page
14849 Memoir does not follow this route.
14850 You have to insert a page break yourself, if you want to have one.
14853 \begin_layout Description
14854 Titlepage: For some unknown reason, Memoir uses pagination on the title
14855 page (in the standard classes, title pages are
14856 \begin_inset Quotes eld
14860 \begin_inset Quotes erd
14864 If you want an empty title page, type
14868 aliaspagestyle{title}{empty}
14873 \begin_layout Description
14874 Article: With the class option
14880 Layout\SpecialChar \menuseparator
14881 Document\SpecialChar \menuseparator
14883 \begin_inset space ~
14888 ), you can emulate article style.
14889 That is, counters (footnotes, figures, tables etc.) will not be reset on
14890 new chapters, chapters don't start a new page (but are—in contrary to
14891 \begin_inset Quotes eld
14895 \begin_inset Quotes erd
14898 article classes—still allowed), parts, though, use their own page, as in
14902 \begin_layout Description
14903 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14904 font commands, which have been used in the old LaTeX version 2.09 (e.
14905 \begin_inset space \thinspace{}
14909 \begin_inset space \space{}
14925 It produces an error and stops LaTeX whenever such a command appears.
14930 reallows the commands and spits out warnings instead (which does at least
14932 Since a lot of packages and particularly BibTeX style files are still using
14933 those commands, we have decided to use this option by default.
14936 \begin_layout Subsection
14940 \begin_layout Standard
14941 We will only describe the features supported by LyX (which is not much currently
14943 Please consult the Memoir manual
14947 \begin_layout Plain Layout
14952 \begin_layout Plain Layout
14962 \begin_inset Flex URL
14965 \begin_layout Plain Layout
14967 CTAN:/macros/latex/memoir/memman.pdf
14980 \begin_layout Description
14981 Abstract: You may wonder why an abstract is an extra feature.
14982 Well, it is in book class.
14983 Usually books don't have abstracts.
14984 Memoir, however, has.
14985 You can use it wherever and how often you like.
14988 \begin_layout Description
14989 Chapterprecis: You may know this older typesetting style: The contents of
14990 a chapter are summarized below the title and also in the table of contents
14992 \begin_inset space \thinspace{}
14996 \begin_inset space \space{}
15001 Our hero arrives in Troia; he loses some friends; he finds others
15004 Chapterprecis does exactly this.
15005 It is therefore only sensible below a chapter.
15008 \begin_layout Description
15009 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15010 The epigraph environment provides an elegant way of typesetting such a
15012 The motto itself (text) and its author (source) are divided by a short
15014 Unfortunately, we have to fool LyX a bit here again, since the environment
15015 needs two arguments (text and source).
15016 In this case, we have to use curly brackets (in TeX mode) between the two
15027 <author of the slogan>.
15030 \begin_layout Description
15031 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15032 complex figurative poems).
15033 LyX can only support a few of them.
15034 One is poemtitle, which is a centered title for poems, which will also
15035 be added to the table of contents (verse is the standard environment for
15037 Memoir has some enhanced versions of verse, but you need to use TeX code,
15038 because they have to be nested inside regular verse environments, which
15039 is not possible with LyX).
15042 \begin_layout Description
15043 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15046 \begin_layout Section
15047 Article (mwart), book (mwbk) and report (mwrep)
15048 \begin_inset Argument status
15051 \begin_layout Plain Layout
15064 \begin_layout Standard
15070 \begin_layout Standard
15071 The LyX document classes
15087 correspond to the LaTeX document classes
15100 They are replacements for the standard document classes
15112 , resp., and fit better to Polish typography conventions in a number of points.
15116 \begin_layout Standard
15120 \begin_layout Itemize
15121 Unnumbered titles (with star, e.
15122 \begin_inset space \thinspace{}
15126 \begin_inset space \space{}
15133 ) are added into table of contents,
15136 \begin_layout Itemize
15137 Additional page styles:
15141 \begin_layout Description
15142 uheadings header with separated lines,
15145 \begin_layout Description
15146 myheadings custom header, contents headers via commands:
15161 \begin_layout Description
15162 myuheadings custom header with separated lines,
15165 \begin_layout Description
15166 outer page number is placed on outer side of page
15170 \begin_layout Itemize
15175 \begin_layout Description
15176 rmheadings serif titles — default,
15179 \begin_layout Description
15180 sfheadings sansserif titles,
15183 \begin_layout Description
15184 authortitle on title page first placed is author next title — default,
15187 \begin_layout Description
15188 titleauthor on title page first placed is title next author,
15191 \begin_layout Description
15192 withmarginpar reserve place on page for margins.
15196 \begin_layout Section
15200 \begin_layout Standard
15205 provides an alternative to the standard
15210 It provides similar functionality, but you might prefer this layout with
15211 sans serif sections, headings, and more.
15214 \begin_layout Section
15218 \begin_layout Standard
15224 \begin_layout Standard
15225 \begin_inset VSpace bigskip
15231 \begin_layout Standard
15236 \begin_inset space ~
15241 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15242 \begin_inset Formula $\beta$
15245 release of May, 1999) class.
15248 \begin_layout Standard
15253 textclass, which works with RevTeX 3.1.
15254 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15255 That means that it doesn't interact very well with LyX, which requires
15256 LaTeX2e, although it has been kludged to work.
15257 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15261 \begin_inset space ~
15266 textclass should also be pretty easy to use.
15269 \begin_layout Standard
15270 These documents are supposed to be used in
15274 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15275 macros, and assume you'll know what to put in the preamble if necessary.
15278 \begin_layout Subsection
15282 \begin_layout Standard
15283 All you need to do is install RevTeX 4, as described in the package's README
15285 The package can be found at The RevTeX 4 Web Site
15286 \begin_inset Flex URL
15289 \begin_layout Plain Layout
15291 http://publish.aps.org/revtex4/
15297 Install it somewhere that LaTeX can see it.
15298 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15300 \begin_inset space \thinspace{}
15304 \begin_inset space \space{}
15307 not the directory where you installed the class file.) Then, if you reconfigure
15308 LyX, it will find the class file and let you use the RevTeX4 textclass.
15311 \begin_layout Standard
15312 Probably the easiest way to get started is either to import a RevTeX 4 document
15320 \begin_inset space ~
15325 template, found in the templates directory.
15328 \begin_layout Subsection
15332 \begin_layout Standard
15333 Optional arguments to
15340 \begin_inset Quotes eld
15344 \begin_inset Quotes erd
15348 \begin_inset Quotes eld
15352 \begin_inset Quotes erd
15362 \begin_inset space ~
15370 \begin_inset space ~
15376 Remember that in RevTeX, at least one optional argument is required!
15379 \begin_layout Standard
15380 Other preamble matter, like
15387 \begin_inset space ~
15393 \begin_inset space ~
15398 dialog, also as usual.
15401 \begin_layout Subsection
15405 \begin_layout Standard
15406 The layouts basically correspond to the commands in RevTeX4.0.
15407 For example, the Email layout corresponds to
15414 Note that (at least as of RevTeX 4.0 Beta), the
15422 layouts are exactly equivalent, so you shouldn't need to use both.
15426 \begin_layout Plain Layout
15427 In case you're curious, both were included so that
15431 would be able to translate both
15451 \begin_layout Subsection
15455 \begin_layout Standard
15456 There are a couple of important unique aspects of RevTeX 4 which might cause
15457 bugs that will be even more confusing in LyX.
15460 \begin_layout Standard
15478 The LyX equivalent is that there is a separate Thanks layout.
15483 write footnotes in the
15487 layout, or weird things may happen.
15488 See the RevTeX 4 documentation for more details.
15491 \begin_layout Standard
15495 \begin_inset space ~
15503 \begin_inset space ~
15512 layouts must be placed
15520 layout and the corresponding
15537 , the LaTeX won't compile.
15540 \begin_layout Subsection
15544 \begin_layout Standard
15545 The main problem with this layout is that you can't use the optional arguments
15546 to layouts like Email and Title.
15547 (The problem is not unique to this layout; you can't use optional arguments
15548 to the Section layouts either.) This means that after you export that file
15549 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15550 need to edit the LaTeX file with a text editor to add the optional arguments
15552 \begin_inset space \thinspace{}
15556 \begin_inset space \space{}
15559 the running title for the page headers.
15560 Lacking these layouts makes the
15566 (and the equivalent
15572 ) useless, so the corresponding layouts don't exist, and will have to be
15577 \begin_layout Plain Layout
15582 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15583 has not been updated yet to take advantage of it.
15591 \begin_layout Section
15592 Springer Journals (
15599 \begin_layout Standard
15605 \begin_layout Subsection
15609 \begin_layout Standard
15610 These are the layout files for some of the journal formats used by Springer
15611 Verlag and listed on
15612 \begin_inset Flex URL
15615 \begin_layout Plain Layout
15617 http://www.springer.de/author/tex/help-journals.html
15622 , where you should also go to fetch the class files (yes, these are LaTeX2e
15624 It is a modular system: the things common to all journals are implemented
15629 , which journal-specific layout files (such as, e.
15630 \begin_inset space \thinspace{}
15634 \begin_inset space \space{}
15641 for Journal of Geodesy) can include.
15644 \begin_layout Standard
15645 This means that implementing support for any other Springer journal on this
15646 list is as simple as writing your own
15654 file following the outline given in
15662 \begin_layout Standard
15663 It is reasonably well tested only for the Journal of Geodesy.
15672 come with the standard LyX distribution.
15673 Install the relevant class file (downloaded from Springer) in a proper
15674 directory, reconfigure LaTeX (in the teTeX case by running
15678 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15679 and it should work.
15682 \begin_layout Subsection
15686 \begin_layout Standard
15687 A large number of theorem-like styles —
15693 \SpecialChar \ldots{}
15699 \begin_layout Standard
15702 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15703 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15706 See the Springer class file documentation for details.
15709 \begin_layout Subsection
15713 \begin_layout Itemize
15725 \begin_layout Itemize
15728 Probability Theory and Related Fields
15734 — Jean-Marc Lasgouttes
15737 \begin_layout Standard
15738 Add your own, it isn't so hard!
15741 \begin_layout Subsection
15745 \begin_layout Standard
15746 These files are partly based on the older
15750 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15751 file from Springer.
15756 layout, are now defunct.
15757 Jean-Marc Lasgouttes helped out big in making me find my way around the
15758 LyX layout file mechanism.
15761 \begin_layout Subsection
15765 \begin_layout Standard
15767 But probably less than in the old hacked-LaTeX
15774 \begin_layout Standard
15776 \begin_inset space \thinspace{}
15779 g.: does not display the number for theorem-like layouts, just #.
15782 \begin_layout Section
15788 \begin_inset CommandInset label
15797 \begin_layout Standard
15805 \begin_layout Subsection
15809 \begin_layout Standard
15810 This section describes how to use LyX to make slides for overhead projectors.
15811 There are two document classes that can do this: the default slides class
15817 This section documents the former.
15820 \begin_layout Standard
15821 I'm going to say this again, nice and clear, so that there's no misunderstanding
15825 \begin_layout Standard
15826 \begin_inset VSpace bigskip
15832 \begin_layout Standard
15836 This section documents the class
15837 \begin_inset Quotes eld
15845 \begin_inset Quotes erd
15853 \begin_layout Standard
15854 \begin_inset VSpace bigskip
15860 \begin_layout Standard
15861 If you're looking for the documentation for
15862 \begin_inset Quotes eld
15870 \begin_inset Quotes erd
15873 , check out section
15874 \begin_inset space ~
15878 \begin_inset CommandInset ref
15880 reference "sec:foiltex"
15890 \begin_inset Quotes eld
15898 \begin_inset Quotes erd
15901 ] is actually somewhat better than the default
15909 \begin_layout Plain Layout
15910 \SpecialChar \ldots{}
15911 or so I've been told repeatedly by its advocates.
15912 Having never used it, I have no idea if this claim is true or not.
15917 which this section documents.
15920 \begin_layout Standard
15921 This class is the LaTeX2e improvement of the old
15926 Every LaTeX2e distribution includes this class [which I'll just refer to
15928 \begin_inset Quotes eld
15936 \begin_inset Quotes erd
15939 from now on], so you're bound to have it.
15940 As I noted earlier, there are other classes, such as
15944 , which also produce slides for overhead projectors and do a better job
15946 However, there are some things which
15950 can do which the others can't, such as generate overlays.
15951 Read on to learn more!
15954 \begin_layout Subsection
15956 \begin_inset CommandInset label
15958 name "sec:slidesetup"
15965 \begin_layout Standard
15966 Obviously, to use this document class, you need to select
15967 \begin_inset Quotes eld
15975 \begin_inset Quotes erd
15978 from the class list in the
15980 Document\SpecialChar \menuseparator
15984 There are some other special things you should know about this class:
15987 \begin_layout Itemize
15988 Don't bother changing the options
15993 They're not supported by the
16000 \begin_layout Itemize
16004 \begin_inset space ~
16009 behaves a bit differently for this class.
16010 The possible choices and what they do are as follows:
16014 \begin_layout Description
16019 The final output contains page numbers in the lower right corner.
16022 \begin_layout Description
16031 , but also prints out any time markers you've put in.
16032 This is the default.
16035 \begin_layout Description
16040 The final output contains no page numbers, time markers, or alignment markers.
16044 \begin_layout Itemize
16049 class has an extra option:
16055 \begin_inset Quotes eld
16063 \begin_inset Quotes erd
16066 in the extra class options.
16070 \begin_layout Standard
16071 Using this options allows you to add time markers to
16077 \begin_inset space ~
16081 \begin_inset CommandInset ref
16083 reference "sec:slideNote"
16091 \begin_layout Standard
16092 You can also use the template file
16093 \begin_inset Quotes eld
16101 \begin_inset Quotes erd
16104 to automatically set up a document to use the
16110 File\SpecialChar \menuseparator
16112 \begin_inset space ~
16116 \begin_inset space ~
16121 to open your new document].
16122 The template file also contains some examples of the special paragraph
16123 environments used by this class.
16124 I'll describe those next.
16127 \begin_layout Subsection
16128 Paragraph Environments
16131 \begin_layout Subsubsection
16132 Supported Environments
16135 \begin_layout Standard
16136 The first thing you'll notice when you start up a new
16140 document is the font size and type: it's the equivalent of the size
16141 \begin_inset Quotes eld
16149 \begin_inset Quotes erd
16155 \begin_inset space ~
16161 This is also what's used in the output.
16163 \begin_inset Quotes eld
16167 \begin_inset Quotes erd
16170 to remind you that this is a slide.
16171 Your final slides will use a larger font; ergo, you'll have less space.
16172 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16175 \begin_layout Standard
16176 The next thing that becomes obvious is the changes to the paragraph environment
16177 pull-down box [at the far-left end of the toolbar].
16178 Most of the paragraph environments you're used to seeing are missing.
16179 There are also five new ones.
16184 class itself only supports certain paragraph environments:
16187 \begin_layout Itemize
16193 \begin_layout Itemize
16199 \begin_layout Itemize
16205 \begin_layout Itemize
16211 \begin_layout Itemize
16217 \begin_layout Itemize
16223 \begin_layout Itemize
16229 \begin_layout Itemize
16235 \begin_layout Itemize
16241 \begin_layout Itemize
16247 \begin_layout Itemize
16253 \begin_layout Standard
16254 All of the other standard environments, including the section-heading environmen
16255 ts, aren't used in the
16262 \begin_layout Standard
16263 On the other hand, you'll notice the following new environments:
16266 \begin_layout Itemize
16272 \begin_layout Itemize
16278 \begin_layout Itemize
16284 \begin_layout Itemize
16290 \begin_layout Itemize
16296 \begin_layout Standard
16297 These five are kind of quirky, due to a
16298 \begin_inset Quotes eld
16302 \begin_inset Quotes erd
16306 You see, LyX doesn't permit you to nest any other paragraph environment
16307 into an empty environment.
16308 Now, that's fine and dandy, but it means that you wouldn't be able to start
16309 a slide with anything except plain text.
16310 To deal with this, I've performed a little
16311 \begin_inset Quotes eld
16315 \begin_inset Quotes erd
16321 \begin_layout Subsubsection
16322 Quirks of the New Environments
16323 \begin_inset CommandInset label
16325 name "sec:slideQuirk"
16332 \begin_layout Standard
16333 All five of the new paragraph environments are somewhat quirky due to inherent
16334 limitiations in the current version of LyX.
16335 As I just mentioned, LyX forbids environments that begin with another environme
16337 To get around this, the
16341 environment isn't a paragraph environment as described in the
16349 \begin_layout Standard
16350 You should consider
16363 \begin_inset Quotes eld
16366 pseudo-environments.
16367 \begin_inset Quotes erd
16370 They look like a section heading or a
16371 \begin_inset Quotes eld
16379 \begin_inset Quotes erd
16382 but really begin a [and, if necessary, end the previous] paragraph environment.
16392 \begin_inset Quotes eld
16396 \begin_inset Quotes erd
16399 These two perform some action.
16402 \begin_layout Standard
16403 A common feature of all five environments,
16423 , is a rather long-ish label.
16424 The text following this label — ordinarily the contents of the paragraph
16425 environment — is utterly irrelevant for
16446 LyX completely ignores it.
16447 In fact, you can leave these five environments completely empty.
16451 \begin_layout Standard
16456 to put any text after the rather long-ish label, you might want to.
16457 This could be a short description of the contents of the
16462 In that case, enter your descriptive comment and hit
16466 as you normally would.
16469 \begin_layout Standard
16470 If, on the other hand, you don't want to enter any descriptive text, you'll
16471 hit another LyX quirk.
16472 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16473 environment until you put something in the old one.
16477 \begin_layout Itemize
16478 Start entering the text that will
16506 \begin_layout Itemize
16507 Now move to the beginning of that paragraph.
16511 \begin_layout Itemize
16520 \begin_layout Itemize
16521 Finally, change this new, empty paragraph to a
16545 \begin_layout Standard
16546 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16550 \begin_layout Subsection
16551 Making a Presentation with
16564 \begin_layout Subsubsection
16572 \begin_layout Standard
16573 If you're expecting this section to teach you how to actually make a presentatio
16574 n, you'll be sorely disappointed.
16575 Naturally, I'll describe all of the ways the
16579 class can assist you in preparing the materials for a presentation.
16580 Filling in the contents, however, is up to you.
16585 the LyX philosophy.]
16588 \begin_layout Standard
16593 environment [in the manner described in section
16594 \begin_inset space ~
16598 \begin_inset CommandInset ref
16600 reference "sec:slideQuirk"
16604 ] tells LyX to begin a new slide [duh].
16605 The label for this environment/
16606 \begin_inset Quotes erd
16610 \begin_inset Quotes erd
16614 \begin_inset Quotes eld
16618 \begin_inset Quotes erd
16621 in cool blue, followed by the label,
16622 \begin_inset Quotes eld
16626 \begin_inset Quotes erd
16630 Any text or paragraph environments that follow this one go on the new slide.
16634 \begin_layout Standard
16635 Slides are probably the only time you'll need to forcibly end pages in LyX
16636 (this can be specified in the
16641 In fact, you'll want to, once you finish entering the contents of one slide.
16642 If you've entered more text than can physically fit on a slide, the extra
16643 overflows onto a new slide.
16644 I don't recommend doing this, however, since the overflow slide won't have
16645 any page number on it.
16646 Furthermore, it may interfere with any
16650 you've made to accompany the oversized
16657 \begin_layout Standard
16666 environments work the same way as the
16671 They both create an
16672 \begin_inset Quotes eld
16676 \begin_inset Quotes erd
16679 followed by a label [
16680 \begin_inset Quotes eld
16684 \begin_inset Quotes erd
16688 \begin_inset Quotes eld
16692 \begin_inset Quotes erd
16696 The color is a stunning magenta instead of blue, and the
16697 \begin_inset Quotes eld
16701 \begin_inset Quotes erd
16704 will look different, in style and in length.
16705 The label fonts of all three also differ from one another.
16708 \begin_layout Standard
16713 , if the contents of a
16721 exceed the physical size of a slide or sheet of paper, the extra will overflow
16723 Again, you should avoid this.
16724 It defeats the whole purpose of
16735 \begin_layout Subsubsection
16745 \begin_layout Standard
16750 is a slide that sits atop another slide.
16751 Perhaps you wish to discuss a figure on the main
16755 before displaying the text associated with it.
16756 One way to accomplish this is tape a flap of dark paper over the part of
16761 you want to display later.
16762 This method fails, however, if you wish to overlap one graph with another,
16764 You would then have to fumble while speaking to align the two separate,
16769 s to align the two graphs.
16774 environment in both cases makes life much easier.
16777 \begin_layout Standard
16782 receives the page number of its
16783 \begin_inset Quotes eld
16787 \begin_inset Quotes erd
16795 \begin_inset Quotes eld
16803 \begin_inset Quotes erd
16810 \begin_layout Plain Layout
16811 Presumably, mutliple
16816 \begin_inset Quotes eld
16824 \begin_inset Quotes erd
16828 \begin_inset Quotes eld
16836 \begin_inset Quotes erd
16840 \begin_inset Quotes eld
16848 \begin_inset Quotes erd
16852 \begin_inset space ~
16855 appended to the page number of the parent
16865 Clearly, you want the contents of both the
16873 to each fit on a single physical slide! You should probably consider an
16879 \begin_inset Quotes eld
16883 \begin_inset Quotes erd
16895 class provides a visual cue for this: the label at the start of an
16899 is shorter than that at the start of a
16904 Lastly, when you generate printable output, you'll find alignment markers
16905 in all four corners of both the
16909 page and its parent
16914 These will assist you in lining up the two physical slides.
16917 \begin_layout Standard
16918 The major problem in overlaying two slides is aligning the contents of the
16919 two transparencies.
16920 How much space should you leave for that graph on the second slide? Worse
16921 still, what if you want a graph and a sentence on second slide, but there
16922 is text on the main transparency that goes in between them? You could try
16923 and insert vertical space of the right size.
16924 The better way is to use
16935 \begin_layout Standard
16936 As their names imply,
16944 are two command-like paragraph environments that make all subsequent text
16945 invisible and visible, respectively.
16947 \begin_inset space ~
16951 \begin_inset CommandInset ref
16953 reference "sec:slideQuirk"
16957 that you don't place anything
16961 these two environments, however.
16966 , it inserts a centered, sky-blue label into the page reading
16967 \begin_inset Quotes eld
16970 <Invisible Text Follows>
16971 \begin_inset Quotes erd
16975 For paragraphs following this label, the parts of the
16983 ; it doesn't matter which] where they would be contain instead blank space.
16987 \begin_layout Standard
16992 , the corresponding centered label is
16993 \begin_inset Quotes eld
16996 <Visible Text Follows>
16997 \begin_inset Quotes erd
17001 Paragraphs following this label behave normally.
17002 Note that the beginning of a new
17014 automatically shuts off an
17019 It's therefore not necessary to use
17030 \begin_layout Standard
17031 By now, it should be obvious how to create overlay transparencies using
17032 the proper combination of
17051 \begin_layout Enumerate
17056 , including everything that will appear on it, whether on the main slide
17064 \begin_layout Enumerate
17065 Before each figure or paragraph that will appear only on the
17074 If necessary, insert a
17078 environment after the
17085 \begin_layout Enumerate
17090 immediately following the
17097 \begin_layout Enumerate
17098 Copy the contents of this
17109 \begin_layout Enumerate
17114 , change all of the
17125 \begin_layout Standard
17127 You've just made an
17134 \begin_layout Standard
17135 There's one problem with the way I've designed the LyX
17139 class: you can't make text in the middle of a paragraph invisible, nor
17140 make text in the middle of an invisible paragraph visible again.
17141 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17145 \begin_layout Plain Layout
17146 The commands of interest are:
17149 \begin_layout Itemize
17154 invisible \SpecialChar \ldots{}
17158 \begin_layout Itemize
17163 visible \SpecialChar \ldots{}
17167 \begin_layout Plain Layout
17168 \SpecialChar \ldots{}
17169 and need to be marked as TeX.
17171 \begin_inset Quotes eld
17175 \begin_inset Quotes erd
17178 you wish to change goes in between the brackets [and after the
17191 If you don't know how to mark text as TeX, see the appropriate section
17204 \begin_layout Subsubsection
17214 \begin_inset CommandInset label
17216 name "sec:slideNote"
17223 \begin_layout Standard
17232 is associated with a
17233 \begin_inset Quotes eld
17237 \begin_inset Quotes erd
17249 class provides visual cues.
17254 is shorter than that of a
17258 [yet longer than that of an
17262 ] and, like the label of an
17266 is shockingly magenta.
17267 Additionally, the printed
17271 has the page number of its
17272 \begin_inset Quotes eld
17276 \begin_inset Quotes erd
17284 \begin_inset Quotes eld
17292 \begin_inset Quotes erd
17296 \begin_inset Quotes eld
17304 \begin_inset Quotes erd
17308 \begin_inset Quotes eld
17316 \begin_inset Quotes erd
17320 You can have multiple
17324 s associated with a single
17336 , you'll probably want to break up long
17340 s so that they fit on a single sheet of paper.
17343 \begin_layout Standard
17348 is obvious: it contains anything additional you might want to say about
17354 It could also be used as a sheet of reminders for a particular
17359 In the case of the latter, you might want to make use of time markers.
17365 \begin_inset Quotes eld
17369 \begin_inset Quotes erd
17372 support for time markers, a
17377 So, you'll have to resort to using the LaTeX codes.
17380 \begin_layout Standard
17381 To use time markers, you'll need to specify the extra class option
17382 \begin_inset Quotes eld
17390 \begin_inset Quotes erd
17394 \begin_inset space ~
17398 \begin_inset CommandInset ref
17400 reference "sec:slidesetup"
17405 This option turns on timing marks, which will appear in the lower-left-hand
17411 To set what appears in the time marker, you use the LaTeX commands
17412 \begin_inset Quotes eld
17422 \begin_inset Quotes erd
17426 \begin_inset Quotes eld
17436 \begin_inset Quotes erd
17440 The arguments of both commands are time measured in seconds.
17442 \begin_inset Quotes eld
17452 \begin_inset Quotes erd
17455 sets the time marker to a given time.
17457 \begin_inset Quotes eld
17467 \begin_inset Quotes erd
17470 increments the time marker by the specified amount.
17471 Using time markers and
17475 s in this fashion, you can remind yourself how much time to spend on a particula
17483 \begin_layout Standard
17484 There's one last feature to describe.
17485 Clearly, you'd like to print out all of your
17493 s on transparencies while printing all of your
17510 with which it is associated.
17511 What's a person to do?
17514 \begin_layout Standard
17515 Luckily, there are two LaTeX commands that allow you to select what to print
17517 Both must be placed into the preamble of your document.
17519 \begin_inset Quotes eld
17531 \begin_inset Quotes erd
17534 will cause the output to contain only the
17543 Correspondingly, the command
17544 \begin_inset Quotes eld
17556 \begin_inset Quotes erd
17559 prevents the output of anything but
17564 I'd advise placing both commands in the preamble and initially comment
17566 You can then preview your entire presentation as you write.
17567 When you're done writing, you can then uncomment one of the two to select
17568 what you want to print.
17569 I like to uncomment
17570 \begin_inset Quotes eld
17582 \begin_inset Quotes erd
17585 , print to a file with
17586 \begin_inset Quotes eld
17594 \begin_inset Quotes erd
17597 in its name, comment it back out, then uncomment
17598 \begin_inset Quotes eld
17610 \begin_inset Quotes erd
17614 \begin_inset Quotes eld
17622 \begin_inset Quotes erd
17626 I can then send either file to a printer, loading transparencies or plain
17627 paper as appropriate.
17630 \begin_layout Standard
17631 You can also provide other arguments to the
17632 \begin_inset Quotes eld
17642 \begin_inset Quotes erd
17646 \begin_inset Quotes eld
17656 \begin_inset Quotes erd
17660 See a good LaTeX book for details.
17663 \begin_layout Subsection
17668 Class Template File
17671 \begin_layout Standard
17672 I have also provided a template file,
17673 \begin_inset Quotes eld
17681 \begin_inset Quotes erd
17689 To use it, begin your new presentation with
17694 ile\SpecialChar \menuseparator
17696 \begin_inset space ~
17700 \begin_inset space ~
17710 Your new LyX presentation file will contain an example
17731 additionally contain an example of the use of
17740 Lastly, the preamble will contain:
17743 \begin_layout LyX-Code
17744 % Uncomment to print out only slides and overlays
17747 \begin_layout LyX-Code
17751 \begin_layout LyX-Code
17757 \begin_inset Newline newline
17763 \begin_layout LyX-Code
17764 % Uncomment to print out only notes
17767 \begin_layout LyX-Code
17771 \begin_layout LyX-Code
17779 \begin_layout Standard
17780 One final thing: I created this class to support the LaTeX2e
17781 \begin_inset Quotes eld
17789 \begin_inset Quotes erd
17792 class, one of the built-in LaTeX2e classes.
17793 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17794 built-in slide class.
17795 It's here if you want it or need it.
17796 There exist other LaTeX2e classes for creating presentations, such as the
17802 \begin_inset space ~
17806 \begin_inset CommandInset ref
17808 reference "sec:foiltex"
17813 \begin_inset Quotes eld
17821 \begin_inset Quotes erd
17824 package [present on some TeX distributions].
17825 The latter is not yet supported under LyX.
17829 \begin_layout Plain Layout
17830 Perhaps you can take on the task\SpecialChar \ldots{}
17836 I know nothing about these other classes.
17837 Try them out to see what sort of alternative they provide.
17840 \begin_layout Chapter
17841 LyX Features needing Extra Software
17844 \begin_layout Section
17848 \begin_layout Standard
17854 \begin_layout Subsection
17858 \begin_layout Standard
17867 \begin_layout Plain Layout
17872 is not yet available when you are using the LaTeX distribution MiKTeX.
17877 , you'll find in the
17884 \begin_inset space ~
17895 \begin_inset Newline newline
17899 \begin_inset CommandInset href
17901 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17908 \begin_layout Standard
17913 package is a program that was written by
17914 \begin_inset Flex Noun
17917 \begin_layout Plain Layout
17919 \begin_inset space ~
17927 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17928 and easy to forget.
17929 The program runs over your LaTeX file, checks the integrity of the file,
17930 and flags some common errors.
17931 In other technical words, it is
17938 \begin_layout Standard
17939 Well, what is a syntax checker doing in LyX which is supposed to produce
17940 correct LaTeX anyways? The answer is simple: Just as
17944 not only checks the
17948 of C programs, but also does
17952 checks for type-errors,
17956 catches some common
17960 errors, in addition to the syntactical ones.
17965 is capable of detecting several common errors, such as
17968 \begin_layout Itemize
17969 Ellipsis detection:
17970 \begin_inset Newline newline
17973 Use \SpecialChar \ldots{}
17977 \begin_layout Itemize
17978 No space in front of/after parenthesis:
17979 \begin_inset Newline newline
17985 \begin_layout Itemize
17986 Enforcement of normal space after common abbreviations:
17987 \begin_inset Newline newline
17991 \begin_inset space \thinspace{}
17995 \begin_inset space \space{}
17998 is too wide spacing.
18001 \begin_layout Itemize
18002 Enforcement of end-of-sentence space when the last sentence ends with a
18004 \begin_inset Newline newline
18008 And this is wrong spacing.
18011 \begin_layout Itemize
18012 Space in front of labels and similar commands:
18013 \begin_inset Newline newline
18016 The label should stick right up to the text to avoid falling to a wrong
18019 \begin_inset CommandInset label
18029 \begin_layout Plain Layout
18030 This footnote is in danger of falling off to a wrong page
18035 The label is separated too much.
18038 \begin_layout Itemize
18039 Space in front of references, instead of hard spaces:
18040 \begin_inset Newline newline
18043 If you have bad luck, the text will break right between the referenced text
18044 and reference number, and that's a pity.
18046 \begin_inset CommandInset ref
18048 reference "sec:chktex"
18055 \begin_layout Itemize
18057 \begin_inset Quotes eld
18061 \begin_inset Quotes erd
18065 \begin_inset Formula $\times$
18069 \begin_inset Newline newline
18072 2x2 looks cheap compared to
18073 \begin_inset Formula $2\times2$
18079 \begin_layout Standard
18080 and more \SpecialChar \ldots{}
18081 It is an invaluable tool when you are
18082 \begin_inset Quotes eld
18086 \begin_inset Quotes erd
18089 your document before printing, and you should run it right after the obligatory
18090 spelling check, and before you go fine tuning the typesetting.
18093 \begin_layout Subsection
18097 \begin_layout Standard
18098 If you have the program installed, usage is as simple as choosing
18100 Tools\SpecialChar \menuseparator
18102 \begin_inset space ~
18108 This will make LyX generate a LaTeX file of your document, start
18112 to check it, and then make LyX insert
18113 \begin_inset Quotes eld
18117 \begin_inset Quotes erd
18120 with the warnings from
18124 , if there were any.
18125 The warnings will be placed close to the point of the mistake, and you
18126 can quickly find them by using the
18128 Navigate\SpecialChar \menuseparator
18131 menu item, or the shortcut key
18140 Open the error boxes by clicking on them with the mouse, or use the shortcut
18149 bindings, or the corresponding
18158 Read the warning and correct the mistake, if it is a mistake.
18159 If you have trouble understanding what the warning is about, you can safely
18161 Remember that there is a hidden layer between the document on screen and
18162 the technical details in invoking
18166 , and this gap can make some warnings seem arcane or just plain silly.
18169 \begin_layout Standard
18170 This document is an excellent testing bed for the feature, and it should
18171 provide quite a few warnings for you to fiddle with.
18172 Since computers are only so smart, expect most of the warnings to be false
18176 \begin_layout Subsection
18177 How to fine tune it
18180 \begin_layout Standard
18181 Sometimes, you'll find that
18185 makes more noise than suits your mood.
18186 Then you can choose not to use it, wait until your mood changes, or try
18191 to get better along with you.
18194 \begin_layout Standard
18203 very configurable and extensible, you should not expect to solve all problems
18209 Since LyX has to generate a somewhat special LaTeX file to be able to match
18210 the line numbers from the
18218 \begin_layout Plain Layout
18219 You can inspect the specific output from
18225 Document\SpecialChar \menuseparator
18227 \begin_inset space ~
18241 to the internal document structure, some of the warnings will not appear
18243 There are two things you can do about this:
18246 \begin_layout Itemize
18251 invocation command line in
18252 \begin_inset Flex MenuItem
18255 \begin_layout Plain Layout
18256 Tools\SpecialChar \menuseparator
18257 Preferences\SpecialChar \menuseparator
18258 Output\SpecialChar \menuseparator
18259 LaTeX\SpecialChar \menuseparator
18269 installation configuration file (usually with the file
18274 See below to learn what warnings can be enabled and disabled on the command
18278 \begin_layout Itemize
18279 Export your document as a raw LaTeX file using
18281 File\SpecialChar \menuseparator
18282 Export\SpecialChar \menuseparator
18290 Invoked in this way, it can be a hassle to find the corresponding place
18291 in the document inside LyX, but with a little patience, you should be able
18295 \begin_layout Standard
18296 Here follows the warning messages that can be enabled and disabled in
18305 to disable a warning, and
18309 to enable a warning.
18310 The emphasized entries are disabled by default, because the default is
18313 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18318 \begin_layout Standard
18319 Notice that you should only use the options that enable and disable warnings,
18320 because LyX relies on some of the other command line parameters to be set
18321 in a specific way to have a chance to communicate with
18328 \begin_layout Enumerate
18332 Command terminated with space.
18335 \begin_layout Enumerate
18338 Non-breaking space (
18339 \begin_inset Quotes eld
18347 \begin_inset Quotes erd
18350 ) should have been used.
18353 \begin_layout Enumerate
18357 You should enclose the previous parenthesis with
18358 \begin_inset Quotes eld
18366 \begin_inset Quotes erd
18372 \begin_layout Enumerate
18375 Italic correction (
18376 \begin_inset Quotes eld
18386 \begin_inset Quotes erd
18389 ) found in non-italic buffer.
18392 \begin_layout Enumerate
18395 Italic correction (
18396 \begin_inset Quotes eld
18406 \begin_inset Quotes erd
18409 ) found more than once.
18412 \begin_layout Enumerate
18416 No italic correction (
18417 \begin_inset Quotes eld
18427 \begin_inset Quotes erd
18433 \begin_layout Enumerate
18437 \begin_inset Quotes eld
18445 \begin_inset Quotes erd
18449 \begin_inset Quotes eld
18457 \begin_inset Quotes erd
18463 \begin_layout Enumerate
18466 Wrong length of dash may have been used.
18469 \begin_layout Enumerate
18473 \begin_inset Quotes eld
18481 \begin_inset Quotes erd
18485 \begin_inset Quotes eld
18493 \begin_inset Quotes erd
18499 \begin_layout Enumerate
18503 \begin_inset Quotes eld
18511 \begin_inset Quotes erd
18517 \begin_layout Enumerate
18521 \begin_inset Quotes eld
18529 \begin_inset Quotes erd
18532 to achieve an ellipsis.
18535 \begin_layout Enumerate
18538 Inter-word spacing (
18539 \begin_inset Quotes eld
18549 \begin_inset Quotes eld
18552 ) should perhaps be used.
18555 \begin_layout Enumerate
18558 Inter-sentence spacing (
18559 \begin_inset Quotes eld
18569 \begin_inset Quotes erd
18572 ) should perhaps be used.
18575 \begin_layout Enumerate
18578 Could not find argument for command.
18581 \begin_layout Enumerate
18585 \begin_inset Quotes eld
18593 \begin_inset Quotes erd
18599 \begin_layout Enumerate
18602 Math mode still on at end of LaTeX file.
18605 \begin_layout Enumerate
18609 \begin_inset Quotes eld
18617 \begin_inset Quotes erd
18620 doesn't match the number of
18621 \begin_inset Quotes eld
18629 \begin_inset Quotes erd
18635 \begin_layout Enumerate
18638 You should use either
18641 \begin_inset Quotes eld
18649 \begin_inset Quotes erd
18654 as an alternative to
18655 \begin_inset Quotes eld
18663 \begin_inset Quotes erd
18669 \begin_layout Enumerate
18676 " (ASCII 39) instead of "
18683 \begin_layout Enumerate
18686 User-specified pattern found.
18689 \begin_layout Enumerate
18692 This command might not be intended.
18695 \begin_layout Enumerate
18702 \begin_layout Enumerate
18720 \begin_layout Enumerate
18723 Delete this space to maintain correct page references.
18726 \begin_layout Enumerate
18730 You might wish to put this between a pair of
18731 \begin_inset Quotes eld
18739 \begin_inset Quotes erd
18745 \begin_layout Enumerate
18748 You ought to remove spaces in front of punctuation.
18751 \begin_layout Enumerate
18754 Could not execute LaTeX command.
18757 \begin_layout Enumerate
18766 in front of small punctuation.
18769 \begin_layout Enumerate
18777 may look prettier here.
18780 \begin_layout Enumerate
18784 Multiple spaces detected in output.
18787 \begin_layout Enumerate
18790 This text may be ignored.
18793 \begin_layout Enumerate
18799 \begin_inset Quotes eld
18804 to begin quotation, not
18811 \begin_layout Enumerate
18818 to end quotation, not
18821 \begin_inset Quotes eld
18829 \begin_layout Enumerate
18835 \begin_layout Enumerate
18838 You should perhaps use
18839 \begin_inset Quotes eld
18847 \begin_inset Quotes erd
18853 \begin_layout Enumerate
18856 You should put a space in front of/after parenthesis.
18859 \begin_layout Enumerate
18862 You should avoid spaces in front of/after parenthesis.
18865 \begin_layout Enumerate
18869 You should not use punctuation in front of/after quotes.
18872 \begin_layout Enumerate
18875 Double space found.
18878 \begin_layout Enumerate
18881 You should put punctuation outside inner/inside display math mode.
18884 \begin_layout Enumerate
18887 You ought to not use primitive TeX in LaTeX code.
18890 \begin_layout Enumerate
18893 You should remove spaces in front of
18894 \begin_inset Quotes eld
18902 \begin_inset Quotes erd
18908 \begin_layout Enumerate
18911 \begin_inset Quotes eld
18919 \begin_inset Quotes erd
18922 is normally not followed by
18923 \begin_inset Quotes eld
18931 \begin_inset Quotes erd
18937 \begin_layout Standard
18938 In later versions of LyX, we hope to provide a more complete interface to
18939 this tool (and it's smaller cousin
18943 ) to exploit the full power of it.
18944 But it's not exactly useless as it is now: go try it on one of your existing
18945 documents of a certain length and be surprised.
18948 \begin_layout Section
18949 Version Control in LyX
18952 \begin_layout Standard
18955 Lars Gullik Bjønnes
18962 \begin_layout Subsection
18966 \begin_layout Standard
18967 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18968 If you need something a bit more sophisticated you will have to do that
18969 manually in a terminal.
18972 \begin_layout Standard
18973 Also note that CVS support is not as good as subversion support so we advise
18975 A good place to start learning Subversion is SVN Book
18979 \begin_layout Plain Layout
18980 \begin_inset CommandInset href
18982 target "http://svnbook.red-bean.com/"
18992 In the case of RCS you should read
18993 \begin_inset Quotes eld
18997 \begin_inset Quotes erd
19000 (a man file, read it with
19005 This file describes all the basic features of RCS.
19006 You should especially notice the comment about a RCS directory, and the
19007 notion of a master RCS file (the file ending in
19014 \begin_layout Standard
19015 Before you begin to use the version control features in LyX, you should
19016 be familiar with RCS/CVS/SVN/GIT usage.
19017 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19018 package — no guarantees are made for older versions.
19019 Most of the log messages are not currently displayed after operations —
19020 you can check them in the Messages pane if unsure.
19021 Regular users of version control will appreciate VC toolbar, which can
19024 View\SpecialChar \menuseparator
19025 Toolbars\SpecialChar \menuseparator
19027 \begin_inset space ~
19035 \begin_layout Standard
19036 For introducing your own external commands consult vc-command in the manual
19040 \begin_layout Subsection
19041 RCS commands in LyX
19044 \begin_layout Standard
19045 The following sections describe the RCS commands supported by LyX.
19046 You can find them in the
19048 File\SpecialChar \menuseparator
19050 \begin_inset space ~
19056 LyX was tested against RCS 5.7/5.8
19060 \begin_layout Plain Layout
19061 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19062 in order to work properly with LyX.
19063 In particular time zone (TZ) should be set and more importantly RCSINIT
19064 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19065 expects archive to be found in file.lyx,v within the original document directory.
19066 See also README shipped with Windows RCS binaries.
19074 \begin_layout Subsubsection
19080 \begin_layout Standard
19081 If your document is not under revision control, this is the only item shown
19083 And if it is under revision control, the
19087 item is not visible.
19091 \begin_layout Standard
19092 This command registers your document with RCS (unless you are under the
19093 directory managed by CVS)\SpecialChar \@.
19094 You are asked interactively to supply an initial
19095 description of the document.
19096 The document is now set in Read-Only mode and you have to
19099 \begin_inset space ~
19103 \begin_inset space ~
19107 \begin_inset space ~
19112 , before making any changes to it.
19113 A document under revision control has a
19114 \begin_inset Quotes eld
19117 [RCS:<version> <locker>]
19118 \begin_inset Quotes erd
19121 item tagged to the filename in the minibuffer.
19124 \begin_layout Standard
19125 RCS command that is run:
19127 ci -q -u -i -t-"<initial description>" <file-name>
19130 \begin_layout Standard
19135 to understand the switches.
19139 \begin_layout Subsubsection
19145 \begin_layout Standard
19146 When you are finished editing a file, you check in your changes.
19147 When you do this, you are asked for a description of the changes.
19148 This is stored in the history log.
19149 The version number is bumped, your changes are applied to the master RCS
19150 file, the document is unlocked and set to Read-Only mode.
19153 \begin_layout Standard
19156 ci -q -u -m"<description>" <file-name>
19159 \begin_layout Subsubsection
19165 \begin_layout Standard
19166 By doing this you lock the document so that only you can edit it.
19167 This will also make the document Read-Write only for you.
19168 You will usually continue editing for a while and when you are finished
19169 you check in your changes.
19170 The status line is changed to reflect that you have locked the file.
19173 \begin_layout Standard
19176 co -q -l <file-name>
19179 \begin_layout Subsubsection
19182 Revert To Repository Version
19185 \begin_layout Standard
19186 This will discard all changes made to the document since the last check
19188 You get a warning before changes are discarded.
19191 \begin_layout Standard
19194 co -f -u<version> <file-name>
19197 \begin_layout Subsubsection
19203 \begin_layout Standard
19204 This will create a copy of the current document.
19205 Since RCS does not support copy operations natively, the version history
19206 is not preserved, and the copy is added as a new file.
19207 It requires a clean document without any changes since the last checkin.
19208 You are asked for a file name and a description of the copy operation.
19209 After that the copy is created, both locally and in the repository.
19210 If the parent directories of the copied and original document differ, all
19211 relative paths of included files of the copy are adjusted (like in
19213 File\SpecialChar \menuseparator
19216 \SpecialChar \ldots{}
19218 Finally, the copy is loaded instead of the original document.
19221 \begin_layout Labeling
19222 \labelwidthstring 00.00.0000
19224 \begin_inset space ~
19228 \begin_inset space ~
19232 \begin_inset Newline newline
19236 \begin_inset Flex Code
19239 \begin_layout Plain Layout
19242 \begin_inset Quotes eld
19246 \begin_inset Quotes erd
19255 \begin_inset Flex Code
19258 \begin_layout Plain Layout
19261 \begin_inset Quotes eld
19265 \begin_inset Quotes erd
19274 \begin_inset Newline newline
19278 \begin_inset Flex Code
19281 \begin_layout Plain Layout
19285 \begin_inset Quotes eld
19289 \begin_inset Quotes erd
19300 \begin_layout Subsubsection
19306 \begin_layout Standard
19307 This makes as if the last check in never happened.
19308 No changes are made to the document loaded into LyX, but the last version
19309 is removed from the master RCS file.
19312 \begin_layout Standard
19315 rcs -o<version> <file-name>
19318 \begin_layout Subsubsection
19324 \begin_layout Standard
19325 This shows the complete history of the RCS document.
19330 is shown in a browser.
19338 \begin_layout Subsubsection
19342 \begin_layout Standard
19343 LyX supports RCS version number, author name, date and time of last commit.
19344 All those are extracted from
19346 rlog -r <file-name>
19350 \begin_inset CommandInset ref
19352 reference "sub:VCS-Revision-Information"
19359 \begin_layout Subsection
19360 CVS commands in LyX
19363 \begin_layout Standard
19364 A subset of CVS operations is supported by LyX.
19365 You can find the commands in the
19367 File\SpecialChar \menuseparator
19369 \begin_inset space ~
19375 The version control system SVN is more powerful, so please use it instead
19376 of CVS if possible.
19379 \begin_layout Subsubsection
19385 \begin_layout Standard
19386 If you start from scratch with CVS you have to create your repository and
19387 checkout the working copy with external tools.
19388 If you're using a client-server setup you may need to login before doing
19389 the first repository checkout.
19392 \begin_layout Standard
19393 If your documents are under revision control and others are using the same
19394 repository problems arise when different changes to the same document at
19395 the same location happen.
19396 Standard CVS repositories don't operate with a file locking mechanism.
19397 This may be surprising, but conflicts only occur if people disagree on
19398 the proper content of the same part of a document.
19399 So, if co-workers are used to communicate regularly, these conflicts occur
19401 If they don't communicate they have a fundamental problem anyway.
19402 Nevertheless some people like to work with so called
19403 \begin_inset Quotes eld
19407 \begin_inset Quotes erd
19411 If they do so the working copy of all files is readonly when checked out
19412 first and the user starts editing after using a special command to make
19413 the working copy writable.
19414 When the changes are checked in the working copy returns to readonly state.
19415 With LyX one has to edit the
19416 \begin_inset Flex Code
19419 \begin_layout Plain Layout
19425 file and add the line
19426 \begin_inset Flex Code
19429 \begin_layout Plain Layout
19435 to work with reserved checkouts.
19436 The benefit is the possibility to see who is using a writable copy of some
19438 It's not guaranteed only one user makes a copy writable.
19441 \begin_layout Standard
19442 LyX tries to guess if you're using reserved or non-reserved checkouts.
19443 If your working copy is readonly or it is writable and an additional copy
19444 of your document exists in the CVS/Base sub-directory a reserved otherwise
19445 a non-reserved checkout is assumed.
19446 When a reserved checkout is detected you have to use
19447 \begin_inset Flex MenuItem
19450 \begin_layout Plain Layout
19456 to make your working copy writable if it's readonly.
19458 \begin_inset Flex MenuItem
19461 \begin_layout Plain Layout
19467 operation is possible and that makes your working copy readonly again after
19468 transferring your changes to the repository.
19471 \begin_layout Standard
19472 More information about CVS can be found here
19473 \begin_inset Flex URL
19476 \begin_layout Plain Layout
19478 http://www.nongnu.org/cvs
19484 \begin_inset Flex URL
19487 \begin_layout Plain Layout
19489 http://ximbiot.com/cvs
19497 \begin_layout Standard
19502 to understand the sub-commands and the switches mentioned below.
19505 \begin_layout Subsubsection
19511 \begin_layout Standard
19512 If your document is not under revision control, this is the only item shown
19514 And if it is under revision control, the
19521 item is not visible.
19525 \begin_layout Standard
19526 This command registers in CVS your document
19527 \begin_inset Flex Strong
19530 \begin_layout Plain Layout
19538 in the case you have already the documents directory under CVS control
19544 This means you have to create or checkout the archive by yourself using
19546 (In case you forget that step LyX registers the document with RCS.)
19549 \begin_layout Standard
19550 Then you are asked interactively to supply an initial description of the
19552 Don't forget that registered file is not yet checked in.
19555 \begin_layout Standard
19556 CVS command that is run:
19558 cvs -q add -m"<entered message>" "<file-name>"
19561 \begin_layout Standard
19566 above and for all other CVS commands is an abbreviation for
19567 \begin_inset Quotes eld
19570 change the current working directory to file location and use the file name
19571 without path component as argument
19572 \begin_inset Quotes erd
19578 \begin_layout Subsubsection
19584 \begin_layout Standard
19585 When you are finished editing a file, you commit your changes.
19586 When you do this and you had changed the document, you are asked for a
19587 description of the changes.
19588 After that changes are written to the repository.
19589 In case you didn't change the document and a reserved checkout is detected
19590 the reservation made on
19591 \begin_inset Flex MenuItem
19594 \begin_layout Plain Layout
19603 \begin_layout Labeling
19604 \labelwidthstring 00.00.0000
19606 \begin_inset space ~
19610 \begin_inset space ~
19614 \begin_inset Newline newline
19618 \begin_inset Flex Code
19621 \begin_layout Plain Layout
19624 -q commit -m"<description>" "<file-name>"
19630 \begin_inset Newline newline
19634 \begin_inset Flex Code
19637 \begin_layout Plain Layout
19648 \begin_layout Subsubsection
19654 \begin_layout Standard
19655 When you are sharing a repository with others, you may have to incorporate
19656 their changes into your working copy.
19659 \begin_layout Standard
19662 cvs -q update "<file-name>"
19665 \begin_layout Standard
19666 If a readonly checkout is detected the working copy is made writable and
19670 \begin_layout Standard
19673 cvs -q edit "<file-name>"
19676 \begin_layout Subsubsection
19679 Revert To Repository Version
19682 \begin_layout Standard
19683 This will discard all changes made to the document since the last check
19685 You get a warning before changes are discarded.
19686 Firstly the file is deleted, secondly CVS update command is run.
19689 \begin_layout Standard
19692 cvs -q update "<file-name>"
19695 \begin_layout Standard
19696 If a reserved checkout is detected and the working copy has no changes only
19697 the reservation is undone.
19700 \begin_layout Standard
19703 cvs -q unedit "<file-name>"
19706 \begin_layout Subsubsection
19712 \begin_layout Standard
19713 This will create a copy of the current document.
19714 Since CVS does not support copy operations natively, the version history
19715 is not preserved, and the copy is added as a new file.
19716 It requires a clean document without any changes since the last checkin.
19717 You are asked for a file name and a description of the copy operation.
19718 After that the copy is created, both locally and in the repository.
19719 If the parent directories of the copied and original document differ, all
19720 relative paths of included files of the copy are adjusted (like in
19722 File\SpecialChar \menuseparator
19725 \SpecialChar \ldots{}
19727 Finally, the copy is loaded instead of the original document.
19730 \begin_layout Labeling
19731 \labelwidthstring 00.00.0000
19733 \begin_inset space ~
19737 \begin_inset space ~
19741 \begin_inset Newline newline
19745 \begin_inset Flex Code
19748 \begin_layout Plain Layout
19751 \begin_inset Quotes eld
19755 \begin_inset Quotes erd
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19770 \begin_inset Quotes eld
19774 \begin_inset Quotes erd
19783 \begin_inset Newline newline
19787 \begin_inset Flex Code
19790 \begin_layout Plain Layout
19794 \begin_inset Quotes eld
19798 \begin_inset Quotes erd
19809 \begin_layout Subsubsection
19815 \begin_layout Standard
19816 This will rename the current document.
19817 Since CVS does not support rename operations natively, the version history
19818 is not preserved, the renamed document is added as a new file, and the
19819 original document is deleted.
19820 It requires a clean document without any changes since the last checkin.
19821 You are asked for a file name and a description of the rename operation.
19822 After that the document is renamed, both locally and in the repository.
19823 If the parent directories of the new and old file names differ, all relative
19824 paths of included files are adjusted (like in
19826 File\SpecialChar \menuseparator
19829 \SpecialChar \ldots{}
19831 Finally, the document is reloaded using the new name.
19834 \begin_layout Labeling
19835 \labelwidthstring 00.00.0000
19837 \begin_inset space ~
19841 \begin_inset space ~
19845 \begin_inset Newline newline
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19855 \begin_inset Quotes eld
19859 \begin_inset Quotes erd
19868 \begin_inset Flex Code
19871 \begin_layout Plain Layout
19874 \begin_inset Quotes eld
19878 \begin_inset Quotes erd
19887 \begin_inset Newline newline
19891 \begin_inset Flex Code
19894 \begin_layout Plain Layout
19898 \begin_inset Quotes eld
19902 \begin_inset Quotes erd
19911 \begin_inset Newline newline
19915 \begin_inset Flex Code
19918 \begin_layout Plain Layout
19922 \begin_inset Quotes eld
19926 \begin_inset Quotes erd
19937 \begin_layout Subsubsection
19938 Update of the local directory checkout from repository
19941 \begin_layout Standard
19942 Once your documents gets more complex, containing sub-documents and pictures,
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19953 files and so on using version control becomes more complicated.
19954 LyX supports updating the whole tree in which resides the document.
19955 This become especially useful once you cooperate with people which neither
19956 have detailed knowledge about CVS usage nor they have ambition to commit
19957 additional material to the repository.
19958 You have to organize the files structure so that all external files are
19959 in the same directory or subdirectories of the document.
19960 It's good practice anyway to store multipart documents in an extra directory.
19963 \begin_layout Standard
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19969 Update local directory from repository
19974 command updates the whole directory.
19975 If local changes are detected user is warned before update starts.
19976 In case of merge conflicts both versions of the conflicting document parts
19977 are placed in the final document.
19978 You have to review and correct the result of the merge.
19979 You'll find the conflicts enclosed in pairs of
19980 \begin_inset Flex Code
19983 \begin_layout Plain Layout
19990 \begin_inset Flex Code
19993 \begin_layout Plain Layout
20000 \begin_inset Flex Code
20003 \begin_layout Plain Layout
20010 The first part is your version as before the update operation with the
20011 document name prepended.
20012 The second one is the repository version with the version number after
20014 \begin_inset Flex Code
20017 \begin_layout Plain Layout
20026 \begin_layout Labeling
20027 \labelwidthstring 00.00.0000
20029 \begin_inset space ~
20033 \begin_inset space ~
20037 \begin_inset Newline newline
20041 \begin_inset Flex Code
20044 \begin_layout Plain Layout
20052 (Ask if changes are detected.)
20053 \begin_inset Newline newline
20057 \begin_inset Flex Code
20060 \begin_layout Plain Layout
20061 cd $path; cvs -q update
20071 \begin_layout Standard
20073 \begin_inset Flex Code
20076 \begin_layout Plain Layout
20082 stands for the path to the document.
20085 \begin_layout Subsubsection
20091 \begin_layout Standard
20092 This shows the complete history of the CVS document.
20095 cvs log "<file-name>"
20097 is shown in a browser.
20100 \begin_layout Subsubsection
20104 \begin_layout Standard
20105 LyX supports CVS version number, author name, date and time of last commit.
20106 All those are extracted from
20108 cvs log -r <file-name>
20112 \begin_inset CommandInset ref
20114 reference "sub:VCS-Revision-Information"
20121 \begin_layout Subsection
20122 SVN commands in LyX
20125 \begin_layout Standard
20126 SVN is now partially supported by LyX.
20127 You can find the commands in the
20129 File\SpecialChar \menuseparator
20131 \begin_inset space ~
20137 Please note that if you use password protected access to repository via
20138 ssh, you will be asked in terminal window.
20139 LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20143 \begin_layout Plain Layout
20144 Most of the commands will work with 1.4 too, see
20145 \begin_inset CommandInset ref
20147 reference "sub:SVN-Repo-Update"
20152 There seems to be currently unresolved permissions problem under SVN 1.8
20153 with reverting changes when file is locked.
20161 \begin_layout Subsubsection
20167 \begin_layout Standard
20168 If your document is not under revision control, this is the only item shown
20170 And if it is under revision control, the
20177 item is not visible.
20180 \begin_layout Standard
20181 This command registers in SVN your document ONLY in case you have already
20182 the documents directory under SVN control (in particular
20187 This means you have to checkout the archive by yourself.
20190 \begin_layout Standard
20191 Then you are asked interactively to supply an initial description of the
20193 Don't forget that registered file is not yet commited.
20196 \begin_layout Standard
20197 SVN command that is run:
20200 \begin_inset Quotes eld
20204 \begin_inset Quotes erd
20210 \begin_layout Standard
20215 to understand the switches.
20218 \begin_layout Subsubsection
20224 \begin_layout Standard
20225 When you are finished editing a file, you commit your changes.
20226 When you do this, you are asked for a description of the changes.
20227 After that changes are commited.
20230 \begin_layout Standard
20235 \begin_layout Plain Layout
20236 In case locking is not enabled.
20238 \begin_inset CommandInset ref
20240 reference "subsec:SVN-File-Locking"
20251 svn commit -q -m"<description>" <file-name>
20254 \begin_layout Subsubsection
20260 \begin_layout Standard
20261 Updates the changes of this file from the repository.
20262 Be sure you understand SVN merging and conflicts resolving before using
20263 this function, because all conflicts has to be resolved manually by you!
20266 \begin_layout Standard
20271 \begin_layout Plain Layout
20279 svn update --non-interactive
20280 \begin_inset Quotes eld
20284 \begin_inset Quotes erd
20290 \begin_layout Subsubsection
20293 Revert To Repository Version
20296 \begin_layout Standard
20297 This will discard all changes made to the document since the last check
20299 You get a warning before changes are discarded.
20302 \begin_layout Standard
20306 \begin_inset Quotes eld
20310 \begin_inset Quotes erd
20316 \begin_layout Subsubsection
20322 \begin_layout Standard
20323 This will create a copy of the current document including the version history.
20324 It requires a clean document without any changes since the last checkin.
20325 You are asked for a file name and a description of the copy operation.
20326 After that the copy is created, both locally and in the repository.
20327 If the parent directories of the copied and original document differ, all
20328 relative paths of included files of the copy are adjusted (like in
20330 File\SpecialChar \menuseparator
20333 \SpecialChar \ldots{}
20335 Finally, the copy is loaded instead of the original document.
20338 \begin_layout Labeling
20339 \labelwidthstring 00.00.0000
20341 \begin_inset space ~
20345 \begin_inset space ~
20349 \begin_inset Newline newline
20353 \begin_inset Flex Code
20356 \begin_layout Plain Layout
20360 \begin_inset Quotes eld
20364 \begin_inset Quotes erd
20368 \begin_inset Quotes eld
20372 \begin_inset Quotes erd
20381 \begin_inset Newline newline
20385 \begin_inset Flex Code
20388 \begin_layout Plain Layout
20397 \begin_layout Subsubsection
20403 \begin_layout Standard
20404 This will rename the current document including the version history.
20405 It requires a clean document without any changes since the last checkin.
20406 You are asked for a file name and a description of the rename operation.
20407 After that the document is renamed, both locally and in the repository.
20408 If the parent directories of the new and old file names differ, all relative
20409 paths of included files are adjusted (like in
20411 File\SpecialChar \menuseparator
20414 \SpecialChar \ldots{}
20416 Finally, the document is reloaded using the new name.
20419 \begin_layout Labeling
20420 \labelwidthstring 00.00.0000
20422 \begin_inset space ~
20426 \begin_inset space ~
20430 \begin_inset Newline newline
20434 \begin_inset Flex Code
20437 \begin_layout Plain Layout
20441 \begin_inset Quotes eld
20445 \begin_inset Quotes erd
20449 \begin_inset Quotes eld
20453 \begin_inset Quotes erd
20462 \begin_inset Newline newline
20466 \begin_inset Flex Code
20469 \begin_layout Plain Layout
20478 \begin_layout Subsubsection
20479 \begin_inset CommandInset label
20481 name "sub:SVN-Repo-Update"
20485 Update of the local directory checkout from repository
20489 \begin_layout Plain Layout
20490 Note that this command will work only with subversion
20491 \begin_inset Formula $\geqq1.5$
20502 \begin_layout Standard
20503 All the commands above have one shortcomming - they deal with the current
20505 Once your document contains pictures, includes external
20506 \begin_inset Flex Code
20509 \begin_layout Plain Layout
20515 files and so on administration becomes more complicated.
20516 LyX now supports updating the whole tree in which resides the document
20520 \begin_layout Plain Layout
20521 One need to organize the files structure so that all external files are
20522 in the same directory or subdirectories of the document.
20529 This become especially useful once you cooperate with people which neither
20530 know about subversion management nor they have ambition to commit additional
20531 material to the repository.
20535 \begin_layout Standard
20536 \begin_inset Flex Code
20539 \begin_layout Plain Layout
20540 Update local directory from repository
20545 command updates the whole directory and in case of merge conflicts local
20546 version of the files are left, so no unintended data loss occurs.
20547 If local changes are detected user is warned before update starts.
20550 \begin_layout Labeling
20551 \labelwidthstring 00.00.0000
20553 \begin_inset space ~
20557 \begin_inset space ~
20561 \begin_inset Newline newline
20565 \begin_inset Flex Code
20568 \begin_layout Plain Layout
20574 (Ask if changes are detected.)
20575 \begin_inset Newline newline
20579 \begin_inset Flex Code
20582 \begin_layout Plain Layout
20583 svn update --accept mine-full $path
20591 \begin_layout Standard
20593 \begin_inset Flex Code
20596 \begin_layout Plain Layout
20602 stands for the path to the document.
20605 \begin_layout Subsubsection
20611 \begin_layout Standard
20612 This shows the complete history of the SVN document.
20616 \begin_inset Quotes eld
20620 \begin_inset Quotes erd
20625 is shown in a browser.
20628 \begin_layout Subsubsection
20630 \begin_inset CommandInset label
20632 name "subsec:SVN-File-Locking"
20639 \begin_layout Standard
20640 The file exchange through various revision control systems brings the problem
20641 of merge conflicts in case two different users try to edit the same (parts
20643 When such a conflict happens it needs manual resolving and one reasonable
20644 alternative is to provide some kind of locking mechanism, which guarantees
20645 that only one user is allowed to edit file at the given time.
20648 \begin_layout Standard
20649 SVN has two such mechanisms to provide mutual exclusivity for file access
20650 - locks and automatic setting of write permissions (see sec.
20652 \begin_inset CommandInset ref
20654 reference "subsec:Automatical-Locking-Property"
20659 \begin_inset Flex Code
20662 \begin_layout Plain Layout
20672 \begin_layout Plain Layout
20673 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20679 If this property is detected for a given document LyX starts to use SVN
20680 locks for document editing automatically and the whole check-in/out mechanism
20681 switches to the same regimen as for RCS.
20682 This in particular means there are two different modes of file use in LyX:
20685 \begin_layout Itemize
20687 The loaded file is in the read-only mode.
20688 For editing on needs to check-out.
20693 consists of updating from the repository and gaining write lock.
20694 If the lock is not possible to obtain, we remain in unlocked state.
20697 \begin_layout Itemize
20699 The loaded file is in the 'normal' edit mode.
20700 No other user is allowed to edit the file.
20705 consists of commiting changes and releasing write-lock.
20706 If no changes have been made to the document, no commit will be produced
20710 \begin_layout Plain Layout
20711 Don't be puzzled by the fact that you will be asked for commit message anyway.
20716 and only the write-lock will be released.
20719 \begin_layout Standard
20723 \begin_layout Labeling
20724 \labelwidthstring 00.00.0000
20727 svn commit -q -m"<description>" "<file-name>"
20728 \begin_inset Newline newline
20731 svn unlock "<file-name>"
20734 \begin_layout Labeling
20735 \labelwidthstring 00.00.0000
20738 svn update "<file-name>"
20739 \begin_inset Newline newline
20742 svn lock "<file-name>"
20745 \begin_layout Subsubsection
20748 \begin_inset CommandInset label
20750 name "subsec:Automatical-Locking-Property"
20756 Automatic Locking Property
20759 \begin_layout Standard
20760 The above mentioned automatic setting of write permissions of the .lyx file
20766 ile\SpecialChar \menuseparator
20772 \begin_inset space ~
20775 Control\SpecialChar \menuseparator
20780 oggle locking property
20783 This command is active only when the file is not locked on the svn server
20785 you need to check-out before proceeding).
20788 \begin_layout Labeling
20789 \labelwidthstring 00.00.0000
20791 \begin_inset space ~
20797 \begin_layout Labeling
20798 \labelwidthstring 00.00.0000
20801 svn propset svn:needs-lock ON "<file-name>"
20804 \begin_layout Labeling
20805 \labelwidthstring 00.00.0000
20808 svn propdel svn:needs-lock "<file-name>"
20811 \begin_layout Subsubsection
20812 \begin_inset CommandInset label
20814 name "sub:VCS-Revision-Information"
20818 Revision Information in Documents
20821 \begin_layout Standard
20822 There are more possibilities how to activate revision information in our
20826 \begin_layout Itemize
20827 LyX supports directly:
20831 \begin_layout Itemize
20832 tree revision information (
20833 \begin_inset Flex Code
20836 \begin_layout Plain Layout
20843 The result is the output of the
20844 \begin_inset Flex Code
20847 \begin_layout Plain Layout
20853 command, the following table gives you an idea, how to read the results.
20856 \begin_layout Standard
20858 \begin_inset Tabular
20859 <lyxtabular version="3" rows="6" columns="2">
20860 <features rotate="0" tabularvalignment="middle">
20861 <column alignment="center" valignment="top">
20862 <column alignment="center" valignment="top">
20864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20867 \begin_layout Plain Layout
20873 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20876 \begin_layout Plain Layout
20884 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20887 \begin_layout Plain Layout
20893 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20896 \begin_layout Plain Layout
20897 mixed revision working copy
20904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20907 \begin_layout Plain Layout
20913 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20916 \begin_layout Plain Layout
20917 modified working copy
20924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20927 \begin_layout Plain Layout
20933 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20936 \begin_layout Plain Layout
20937 switched working copy
20944 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20947 \begin_layout Plain Layout
20953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20956 \begin_layout Plain Layout
20957 partial working copy, from a sparse checkout
20964 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20967 \begin_layout Plain Layout
20973 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20976 \begin_layout Plain Layout
20977 mixed revision, modified, switched working copy
20990 \begin_layout Itemize
20991 file revision information.
20992 The result comes from parsing the output of
20993 \begin_inset Flex Code
20996 \begin_layout Plain Layout
20998 \begin_inset space ~
21002 \begin_inset space ~
21006 \begin_inset space ~
21015 Supported flags are:
21019 \begin_layout Itemize
21020 version number of the last commit (
21021 \begin_inset Flex Code
21024 \begin_layout Plain Layout
21033 \begin_layout Itemize
21034 author of the last commit (
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21047 \begin_layout Itemize
21048 date of the last commit (
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21061 \begin_layout Itemize
21062 time of the last commit (
21063 \begin_inset Flex Code
21066 \begin_layout Plain Layout
21076 \begin_layout Standard
21077 You can obtain this info via InsetInfo (e.g.
21079 \begin_inset Flex Code
21082 \begin_layout Plain Layout
21083 info-insert buffer vcs-date
21089 The information will be available only when you have the file stored under
21090 svn managment (i.e.
21092 \begin_inset Flex Code
21095 \begin_layout Plain Layout
21101 directory is available with your document).
21105 \begin_layout Itemize
21106 Another---a hacking one---possibility is to use svn keywords
21110 \begin_layout Plain Layout
21111 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21117 In short -- you set file keywords property (e.g.
21120 svn propset svn:keywords 'Rev' file.lyx
21122 ) and then paste keyword TeX code
21126 \begin_layout Plain Layout
21127 This is an easy way how to ensure that LyX won't break the line in the middle
21133 tag in your document (e.g.
21138 \begin_layout Plain Layout
21146 This way svn client will automatically substitute revision number (e.g.
21151 \begin_layout Plain Layout
21158 ) after each update and commit.
21159 There are more problems with this approach.
21160 Firstly, the '$' character is used in TeX world for math equations, so
21161 any occurence of math formula
21162 \begin_inset Formula $Rev$
21166 \begin_inset Formula $Rev:59$
21169 in your LyX document.
21170 Similarly for other keywords like Id, Date, Author, etc.
21171 Secondly svn output is dependent on your locales, so its very easy that
21172 svn would produce some problematic strings once Date is used.
21173 Thirdly you get the whole 'Rev: 59' string in your document instead of
21175 Until subversion implements user's custom keywords it will be hard to use
21176 this approach reliably or let LyX to support it directly.
21179 \begin_layout Subsection
21180 SVN and Windows Environment
21183 \begin_layout Quote
21184 My inclination is to say that if the user cannot figure out the command
21185 line operations on their own fairly quickly, they would be well advised
21186 to use TortoiseSVN.
21192 \begin_layout Subsubsection
21196 \begin_layout Standard
21197 In addition to installing LyX, and having access to a Subversion repository,
21198 the user will need to install the Subversion client program.
21199 A Windows installer for the client program is available from
21200 \begin_inset CommandInset href
21203 target "http://www.collab.net/nonav/downloads/subversion/"
21208 The user may also want to install
21209 \begin_inset CommandInset href
21212 target "http://tortoisesvn.tigris.org/"
21216 , which integrates Subversion operations into the context (rightclick) menu
21217 of Windows Explorer.
21218 Operations done outside LyX will typically be more convenient using the
21219 Explorer context menu.
21220 Note that TortoiseSVN is not a replacement for the client program, which
21221 is what LyX itself will use.
21224 \begin_layout Subsubsection
21225 Bringing a document under Subversion control
21228 \begin_layout Standard
21229 Before a LyX document can be brought under version control in Subversion,
21230 its parent directory needs to be under version control.
21231 If the document is being added to a project already in the repository,
21232 this is accomplished by checking the project out to the directory where
21233 the new document will be placed.
21234 If the project itself is not yet under version control (for instance, if
21235 this document starts a new project), the directory must be imported into
21237 This is done outside LyX.
21238 Both import and checkout are easily accomplished from the Explorer context
21239 menu using TortoiseSVN, or alternatively can be done using the command
21240 line client at a DOS prompt.
21241 The procedure for importing the project using TortoiseSVN is described
21242 below, assuming an existing repository and a new project being started
21250 For information on using the Subversion client program, run
21257 \begin_layout Enumerate
21264 in Windows Explorer, right click it, and select
21266 TortoiseSVN\SpecialChar \menuseparator
21270 If necessary, adjust the URL for the repository, then click OK.
21273 \begin_layout Enumerate
21274 Right click the level of the repository under which you want to place the
21275 new project folder (typically the top level) and click
21279 Supply a name for the project folder and click OK.
21280 Add a message for the log file if desired, then click OK again.
21281 The new project folder should appear in the repository.
21282 Finally, click OK again to exit the repository browser.
21285 \begin_layout Enumerate
21286 Once again right click
21292 , this time selecting SVN Checkout\SpecialChar \ldots{}
21293 Select the URL of the project folder
21294 you just created in the repository, and set the checkout directory to
21302 You will be warned about a non-empty folder; click OK to proceed.
21303 You should now have a
21314 \begin_layout Enumerate
21315 Create or open your document in LyX and click
21317 File\SpecialChar \menuseparator
21319 \begin_inset space ~
21322 Control\SpecialChar \menuseparator
21326 Add a log message and click OK to commit the document to version control.
21329 \begin_layout Standard
21330 From this point onward, you should have full functionality in the
21332 File\SpecialChar \menuseparator
21334 \begin_inset space ~
21340 You also have the option of checking the document in and out, viewing its
21342 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21343 client program from a command prompt.
21346 \begin_layout Subsubsection
21347 SSH tunnel used with SVN under Windows
21350 \begin_layout Standard
21351 Compared with Linux setting up an svn client to communicate over ssh under
21352 Windows is a rather troublesome task.
21353 We will at least offer some hints how to setup the client side but prior
21354 knowledge about ssh and the Windows command line is needed, also be prepared
21355 for a great deal of frustration\SpecialChar \ldots{}
21359 \begin_layout Enumerate
21360 Get an svn client for windows, as described in the previous sections.
21361 When it is a fresh install run some svn command (e.g.
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21372 ) to create config files, which you will need to change later on.
21375 \begin_layout Enumerate
21376 Choose an ssh client for Windows.
21377 There are several possibilities, we will use the one from Putty tools
21381 \begin_layout Plain Layout
21382 \begin_inset Flex URL
21385 \begin_layout Plain Layout
21387 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21398 You will need to set the connection up so that the client doesn't ask for
21399 any password from you.
21400 To keep things easy we will use only keys without any additional password
21405 \begin_layout Enumerate
21407 \begin_inset Flex Code
21410 \begin_layout Plain Layout
21417 Save your private .ppk key file and put the public one on the server side.
21418 If the SVN server runs on Linux, note that the format of the public key
21419 is not compatible with Linux openssh and you will need to direcly copy-paste
21422 Public key for pasting into OpenSSH authorized_keys file
21424 :” edit field into the server's
21425 \begin_inset Flex Code
21428 \begin_layout Plain Layout
21429 ~/.ssh/authorized_keys
21435 \begin_inset Flex Code
21438 \begin_layout Plain Layout
21447 \begin_layout Enumerate
21449 \begin_inset Flex Code
21452 \begin_layout Plain Layout
21459 In the SVN config file
21463 \begin_layout Plain Layout
21464 Exact path depends on Windows version, usually somewhere around
21465 \begin_inset Flex Code
21468 \begin_layout Plain Layout
21471 Documents and Settings
21485 \begin_inset Flex Code
21488 \begin_layout Plain Layout
21503 , section [tunnels], setup ssh command, e.g.
21505 \begin_inset Flex Code
21508 \begin_layout Plain Layout
21509 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21518 \begin_layout Plain Layout
21519 It will usually take a lot of time to get exact command right and it depends
21521 For example do not have some remote server saved as a default session in
21523 If things fail, try to connect via plink without SVN first.
21532 \begin_layout Enumerate
21533 Checkout the SVN archive, e.
21534 \begin_inset space \thinspace{}
21538 \begin_inset Newline newline
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21546 svn co svn+ssh://user@server/repository_path
21554 \begin_layout Subsubsection
21555 End-of-Line Conversions
21558 \begin_layout Standard
21559 When the collaborators are mixing Linux and Windows environments, LyX will
21560 use different line endings inside the .lyx files.
21561 This is not a problem as far as LyX functionality is concerned, but the
21562 commit diffs will be huge and merge-conflicts prone.
21563 Fortunately SVN itself knows
21567 \begin_layout Plain Layout
21568 \begin_inset Flex URL
21571 \begin_layout Plain Layout
21573 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21583 how to deal with CR/LF problems when switching .lyx files to the
21584 \begin_inset Flex Code
21587 \begin_layout Plain Layout
21597 \begin_layout Plain Layout
21599 \begin_inset Flex Code
21602 \begin_layout Plain Layout
21603 svn propset svn:eol-style native FILE_NAME
21616 \begin_layout Subsection
21617 GIT commands in LyX
21620 \begin_layout Standard
21621 A minimal subset of GIT commands is now supported by LyX.
21622 You can find the commands in the
21624 File\SpecialChar \menuseparator
21626 \begin_inset space ~
21632 Please note that if you use password protected access to repository via
21633 ssh, you will be asked in terminal window.
21634 LyX was tested against GIT 1.7.
21638 \begin_layout Plain Layout
21639 Windows users please note that you need to ensure that git is on the path.
21640 This can be set from within LyX at
21642 Tools\SpecialChar \menuseparator
21643 Preferences\SpecialChar \menuseparator
21644 Paths\SpecialChar \menuseparator
21655 \begin_layout Standard
21656 One big difference of GIT and the other supported version control systems
21657 is the distributed nature of GIT: With traditional version control systems
21658 there is one central server which hosts the repository.
21659 Users commit their changes to the server, and get updates made by other
21661 With GIT, users commit to a local repository.
21662 The local repository can be synchronized with one or more remote repositories
21664 \begin_inset Flex Code
21667 \begin_layout Plain Layout
21674 \begin_inset Flex Code
21677 \begin_layout Plain Layout
21684 LyX does not interact in any way with remote GIT repositories.
21685 It works exclusively with the local repository in a very similar way as
21686 with a central CVS or SVN repository.
21687 If you use remote GIT repositories you need to do the
21688 \begin_inset Flex Code
21691 \begin_layout Plain Layout
21698 \begin_inset Flex Code
21701 \begin_layout Plain Layout
21707 operations with your favourite GIT client.
21710 \begin_layout Subsubsection
21716 \begin_layout Standard
21717 If your document is not under revision control, this is the only item shown
21719 And if it is under revision control, the
21726 item is not visible.
21729 \begin_layout Standard
21730 This command registers in GIT your document ONLY in case you have already
21731 the documents directory under GIT control (in particular
21736 This means you have to checkout the archive by yourself.
21739 \begin_layout Standard
21740 Then you are asked interactively to supply an initial description of the
21742 Don't forget that registered file is not yet commited.
21745 \begin_layout Standard
21746 GIT command that is run:
21749 \begin_inset Quotes eld
21753 \begin_inset Quotes erd
21759 \begin_layout Standard
21764 to understand the switches.
21767 \begin_layout Subsubsection
21773 \begin_layout Standard
21774 When you are finished editing a file, you commit your changes.
21775 When you do this, you are asked for a description of the changes.
21776 After that changes are commited.
21779 \begin_layout Standard
21782 git commit -q -m"<description>" <file-name>
21785 \begin_layout Subsubsection
21788 Revert To Repository Version
21791 \begin_layout Standard
21792 This will discard all changes made to the document since the last check
21794 You get a warning before changes are discarded.
21797 \begin_layout Standard
21801 \begin_inset Quotes eld
21805 \begin_inset Quotes erd
21811 \begin_layout Subsubsection
21817 \begin_layout Standard
21818 This will rename the current document including the version history.
21819 It requires a clean document without any changes since the last checkin.
21820 You are asked for a file name and a description of the rename operation.
21821 After that the document is renamed, both locally and in the repository.
21822 If the parent directories of the new and old file names differ, all relative
21823 paths of included files are adjusted (like in
21825 File\SpecialChar \menuseparator
21828 \SpecialChar \ldots{}
21830 Finally, the document is reloaded using the new name.
21833 \begin_layout Labeling
21834 \labelwidthstring 00.00.0000
21836 \begin_inset space ~
21840 \begin_inset space ~
21844 \begin_inset Newline newline
21848 \begin_inset Flex Code
21851 \begin_layout Plain Layout
21855 \begin_inset Quotes eld
21859 \begin_inset Quotes erd
21863 \begin_inset Quotes eld
21867 \begin_inset Quotes erd
21876 \begin_inset Newline newline
21880 \begin_inset Flex Code
21883 \begin_layout Plain Layout
21892 \begin_layout Subsubsection
21898 \begin_layout Standard
21899 This shows the complete history of the GIT document.
21903 \begin_inset Quotes eld
21907 \begin_inset Quotes erd
21912 is shown in a browser.
21915 \begin_layout Subsubsection
21919 \begin_layout Standard
21920 LyX supports GIT hash number of the last commit to the file, author name,
21921 date and time of last commit.
21922 All those are extracted from
21924 git log -n 1 --pretty=format:%H%n%an%n%ai
21927 Tree version information is obtained via
21929 git describe --abbrev --dirty --long
21933 \begin_inset CommandInset ref
21935 reference "sub:VCS-Revision-Information"
21942 \begin_layout Subsection
21946 \begin_layout Standard
21947 With the recent addition of the vc-command function LyX power users are
21948 allowed to create their own commands for revision control.
21951 \begin_layout Standard
21952 As an example you can see how two TortoiseSVN commands could be integrated
21956 \begin_layout Description
21958 \begin_inset Flex Code
21961 \begin_layout Plain Layout
21962 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21970 \begin_layout Description
21972 \begin_inset Flex Code
21975 \begin_layout Plain Layout
21976 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21984 \begin_layout Subsection
21985 Version control and Document comparison
21988 \begin_layout Standard
21989 One of the typical uses of version control is to inspect the changes between
21990 revisions, usually by creating
21991 \begin_inset Flex Code
21994 \begin_layout Plain Layout
22001 While this is useful for plain text files, it is much less useful in the
22002 case of LyX files, which have more a complicated structure.
22003 Hence we provide binding to the Document comparison feature.
22004 There are two ways of calling this feature - either by direct call of
22005 \begin_inset Flex Code
22008 \begin_layout Plain Layout
22014 LyX function (for details see LyX functions manual) or by icon/menu item
22016 \begin_inset Flex MenuItem
22019 \begin_layout Plain Layout
22020 Compare with older revision...
22026 One can either compare two chosen revisions of the document or he can simply
22027 compare the current version of edited text with older revisions (where
22029 \begin_inset Flex MenuItem
22032 \begin_layout Plain Layout
22038 ' revisions back means comparison of the edited file with last commited
22043 \begin_layout Standard
22044 This feature is supported for SVN and RCS though due to the more complicated
22045 versioning scheme of RCS there is a constraint -- when addressing the revisions
22046 in dialog, numbers always point to the last number in RCS revision number,
22049 We don't currently support GIT addressing of revisions, one can just compare
22050 edited document with its revision X steps backs, where X is addressed as
22054 \begin_layout Section
22055 Literate Programming
22058 \begin_layout Standard
22063 (kayvan@sylvan.com)
22067 original documentation written by
22069 Edmar Wienskoski Jr.
22072 (edmar-w-jr@technologist.com)
22075 \begin_layout Subsection
22079 \begin_layout Standard
22080 The main purpose of this documentation is to show you how to use LyX for
22081 literate programming, where it is assumed that you are familiar with this
22082 programming technique, and know what
22083 \begin_inset Quotes eld
22087 \begin_inset Quotes erd
22091 \begin_inset Quotes eld
22095 \begin_inset Quotes erd
22099 If that is not the case, please follow the web links provided in the following
22101 There is a lot of good documentation out there covering old development
22102 history to the latest tools tips.
22105 \begin_layout Standard
22106 It is also assumed that you are familiar with LyX itself to a point that
22107 you are comfortable changing your LyX preferences, and X resources file.
22108 If that is not the case please refer to other LyX documentation to cover
22109 your specific needs.
22112 \begin_layout Subsection
22113 Literate Programming
22116 \begin_layout Standard
22117 From the Literate Programming FAQ:
22120 \begin_layout Quotation
22121 Literate programming is the combination of documentation and source together
22122 in a fashion suited for reading by human beings.
22123 In fact, literate programs should be enjoyable reading, even inviting!
22124 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22125 and documentation in a single file.
22126 Literate programming tools then parse the file to produce either readable
22127 documentation or compilable source.
22128 The WEB style of literate programming was created by D.
22129 \begin_inset space \thinspace{}
22133 Knuth during the development of his TeX typesetting software.
22137 \begin_layout Standard
22138 Another excerpt says:
22141 \begin_layout Quotation
22144 How is literate programming different from verbose commenting?
22147 \begin_layout Quotation
22148 There are three distinguishing characteristics.
22149 In order of importance, they are:
22153 \begin_layout Itemize
22154 flexible order of elaboration
22157 \begin_layout Itemize
22158 automatic support for browsing
22161 \begin_layout Itemize
22162 typeset documentation, especially diagrams and mathematics
22166 \begin_layout Standard
22167 Now that I sparked your curiosity, take a look in the references.
22170 \begin_layout Subsubsection
22174 \begin_layout Standard
22175 The complete Literate Programming FAQ can be found at:
22178 \begin_layout Quote
22179 Literate Programming FAQ
22180 \begin_inset Flex URL
22183 \begin_layout Plain Layout
22185 http://www.literateprogramming.com/lpfaq.pdf
22193 \begin_layout Standard
22194 The FAQ lists 23 (twenty three!) different literate programming tools.
22195 Where some are specialized or
22196 \begin_inset Quotes eld
22200 \begin_inset Quotes erd
22203 for particular programming languages, while other have general scope.
22208 for my own use for several reasons:
22211 \begin_layout Itemize
22212 It can generate the documentation either in LaTeX or HTML.
22215 \begin_layout Itemize
22216 It has a open architecture, i.
22217 \begin_inset space \thinspace{}
22221 \begin_inset space \space{}
22224 it is easy to plug in new filters and to perform special processing that
22229 \begin_layout Itemize
22230 There is a good selection of filters available already (the HTML is one
22234 \begin_layout Itemize
22238 \begin_layout Standard
22239 The Noweb web page can be found at:
22242 \begin_layout Quote
22244 \begin_inset Flex URL
22247 \begin_layout Plain Layout
22249 http://www.cs.virginia.edu/~nr/noweb/
22257 \begin_layout Standard
22258 Starting from there you can reach many other interesting links and even
22259 some literate program examples.
22262 \begin_layout Subsection
22263 LyX and Literate Programming with Noweb
22266 \begin_layout Standard
22267 The LyX support for Literate Programming is provided by using the generic
22268 LyX converters mechanism.
22269 This support is provided in a
22270 \begin_inset Quotes eld
22274 \begin_inset Quotes erd
22278 \begin_inset space \thinspace{}
22282 \begin_inset space \space{}
22285 you will be able to use this new LyX feature with some other literate programmin
22286 g tool of your choice by just changing your LyX preferences.
22289 \begin_layout Subsubsection
22290 Generating documents and code (weaving and tangling)
22293 \begin_layout Paragraph
22294 Using the noweb module
22297 \begin_layout Standard
22298 If you have installed Noweb and LyX successfully, whenever you open a new
22299 document, after you have chosen its document class, use the Document->Settings
22301 \begin_inset Quotes eld
22305 \begin_inset Quotes erd
22309 If Noweb is correctly installed, when you click on the
22310 \begin_inset Quotes eld
22314 \begin_inset Quotes erd
22317 link, you will see the
22318 \begin_inset Quotes eld
22322 \begin_inset Quotes erd
22325 module in the available list and you can add it to your document.
22328 \begin_layout Paragraph
22332 \begin_layout Standard
22333 LyX enables you to write code with a layout named
22334 \begin_inset Flex Noun
22337 \begin_layout Plain Layout
22344 Noweb delimits chunks like this:
22347 \begin_layout LyX-Code
22351 \begin_layout LyX-Code
22355 \begin_layout LyX-Code
22359 \begin_layout LyX-Code
22363 \begin_layout LyX-Code
22367 \begin_layout Standard
22368 The problem is that whatever is written in between the << and the
22372 must be taken literally, i.
22373 \begin_inset space \thinspace{}
22377 \begin_inset space \space{}
22380 LyX should be prevented from making any special interpretation of what has
22382 This is also handled by
22383 \begin_inset Flex Noun
22386 \begin_layout Plain Layout
22392 , that works like a normal paragraph but has a free spacing capability.
22395 \begin_layout Standard
22396 As a special note, you can also use the
22397 \begin_inset Quotes eld
22401 \begin_inset Quotes erd
22404 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22408 \begin_layout LyX-Code
22412 \begin_layout LyX-Code
22413 def some_function(args):
22416 \begin_layout LyX-Code
22417 "This is the doc string for this function."
22420 \begin_layout LyX-Code
22421 print "My args: ", args
22424 \begin_layout LyX-Code
22425 @ %def some_function
22428 \begin_layout Standard
22429 For an example of this usage and the resulting cross-reference output, look
22430 at the Literate python program in
22432 LIBDIR/examples/listerrors.lyx
22434 which should make this all clear.
22437 \begin_layout Paragraph
22438 Generating the documentation
22441 \begin_layout Standard
22442 At this point you already have a new document file with a proper document
22443 class, and with some code and text on it.
22444 How do I print it? The answer is simple, you select
22446 View\SpecialChar \menuseparator
22450 Just like you would do for a plain document.
22451 No special procedure is required.
22454 \begin_layout Standard
22455 To help orientate you, I will now explain what happens inside LyX:
22458 \begin_layout Enumerate
22461 Update\SpecialChar \menuseparator
22464 menu option is chosen, a LaTeX file is generated.
22469 \begin_layout Standard
22470 If the document is of any literate class the generated file will be named
22471 with an extension name defined by the
22472 \begin_inset Quotes eld
22476 \begin_inset Quotes erd
22479 format (defined in the Preferences panel), otherwise the file will have
22488 \begin_layout Enumerate
22489 Note that the only difference so far is in the name of the file, no special
22490 processing is required by LyX.
22491 Given that you formatted the code using the
22492 \begin_inset Flex Noun
22495 \begin_layout Plain Layout
22501 layout that, by itself, takes care of the business.
22504 \begin_layout Enumerate
22505 If the document is of any literate class LyX will then use the internal
22506 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22510 \begin_layout Plain Layout
22511 The converters are defined in the
22513 Tools\SpecialChar \menuseparator
22517 \begin_inset Quotes eld
22521 \begin_inset Quotes erd
22533 manual for general information about converters.
22538 to generate the LaTeX file.
22542 \begin_layout Standard
22543 Otherwise it will just skip this step.
22547 \begin_layout Enumerate
22548 Finally, LaTeX is invoked and the regular post processing continues as in
22552 \begin_layout Standard
22553 Independence from a particular
22554 \begin_inset Quotes eld
22558 \begin_inset Quotes erd
22561 is easily achieved by changing the commands that are run by the various
22565 \begin_layout Paragraph
22566 Generating the code
22569 \begin_layout Standard
22570 When the build menu option is chosen or the corresponding button in the
22571 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22572 Next, LyX invokes the
22577 This converter needs to be defined by the user and is not installed by
22578 default, though the Program format is.
22579 This converter (like any other converter) will have two parts:
22582 \begin_layout Enumerate
22583 The converter program itself.
22584 This program performs the conversion from the one format to the other (in
22585 this case, from the Noweb format to the Program pseudo-format).
22588 \begin_layout Enumerate
22589 The error log parser.
22590 This is a program whose sole purpose is to rewrite error messages in a
22591 format that LyX understands.
22592 This makes it possible for LyX to place error boxes in the right places
22593 in the file buffer.
22596 \begin_layout Standard
22597 The first part, the
22598 \begin_inset Quotes eld
22602 \begin_inset Quotes erd
22605 setting, should be set to
22606 \begin_inset Newline newline
22610 \begin_inset Quotes eld
22618 \begin_inset Quotes erd
22622 \begin_inset Newline newline
22625 This basically means that LyX will call
22626 \begin_inset Quotes eld
22630 \begin_inset Quotes erd
22633 (a program or script) with the name of the Noweb file (normally a file
22634 in the LyX temp directory) and the directory path of the original LyX file.
22638 \begin_layout Standard
22639 This is an implementation of
22640 \begin_inset Quotes eld
22644 \begin_inset Quotes erd
22647 that you can place in a directory on your path:
22650 \begin_layout Standard
22651 \begin_inset VSpace defskip
22657 \begin_layout Standard
22658 \begin_inset Newpage pagebreak
22664 \begin_layout Standard
22670 \begin_layout Standard
22676 \begin_layout Standard
22679 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22682 \begin_layout Standard
22683 \begin_inset VSpace defskip
22689 \begin_layout Standard
22690 The next part of the converter setting is the
22691 \begin_inset Quotes eld
22695 \begin_inset Quotes erd
22698 which is to be set to
22699 \begin_inset Newline newline
22703 \begin_inset Quotes eld
22708 parselog=$$s/scripts/listerrors
22711 \begin_inset Quotes erd
22715 \begin_inset Newline newline
22718 This will run any errors that are generated by the
22719 \begin_inset Quotes eld
22723 \begin_inset Quotes erd
22726 process through the
22727 \begin_inset Quotes eld
22731 \begin_inset Quotes erd
22737 \begin_layout Standard
22738 The build will normally take place in LyX's temporary directory, so the
22739 files produced by the conversion will be in that directory.
22740 LyX will copy out what it regards as the `main' file, but the
22744 conversion may produce several files, and so most of these would then be
22745 deleted when LyX was closed.
22746 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22747 the build-script chunk can place the generated files in that location.
22750 \begin_layout Paragraph
22751 Build instructions in the document
22754 \begin_layout Standard
22755 The last piece of the integration between LyX and noweb is the
22756 \begin_inset Quotes eld
22760 \begin_inset Quotes erd
22764 Generally, the instructions for building your program should be embedded
22765 in a chunk of its own.
22767 \begin_inset Quotes eld
22771 \begin_inset Quotes erd
22774 above uses the notangle command to look for this chunk (called
22775 \begin_inset Quotes eld
22779 \begin_inset Quotes erd
22782 ) and runs its contents through
22783 \begin_inset Quotes eld
22787 \begin_inset Quotes erd
22793 \begin_layout Standard
22794 Typically, such a chunk would look something like this:
22797 \begin_layout LyX-Code
22801 \begin_layout LyX-Code
22803 \begin_inset Newline newline
22806 if [ -z "${NOWEB_SOURCE}" ]
22807 \begin_inset Newline newline
22813 \begin_layout LyX-Code
22814 NOWEB_SOURCE=myfile.nw
22815 \begin_inset Newline newline
22819 \begin_inset Newline newline
22823 code to extract files ...
22824 use NOWEB_OUTPUT_DIR here ...]
22825 \begin_inset Newline newline
22829 code to compile files ...]
22830 \begin_inset Newline newline
22836 \begin_layout Standard
22839 LIBDIR/examples/listerrors.lyx
22843 LIBDIR/examples/Literate.lyx
22845 which implement two versions of the
22846 \begin_inset Quotes eld
22850 \begin_inset Quotes erd
22853 program for some illustrations of how all of these pieces go together or
22856 LIBDIR/examples/noweb2lyx.lyx.
22859 Interestingly, these three files show off the language-indepence of the
22860 LyX literate programming support since they are written in Python, C and
22864 \begin_layout Subsubsection
22868 \begin_layout Standard
22869 All the Literate Programming support is configured by the
22871 Tools\SpecialChar \menuseparator
22875 \begin_inset Quotes eld
22879 \begin_inset Quotes erd
22883 The important parts are:
22886 \begin_layout Description
22888 \begin_inset space ~
22892 \begin_inset Quotes eld
22896 \begin_inset Quotes erd
22900 \begin_inset space ~
22903 format Set up via the File Formats tab, this is where the Noweb-specific
22913 , the file extension is set to
22918 This tells LyX to create a file with a
22922 extension in the first step of the conversion process.
22925 \begin_layout Description
22927 \begin_inset space ~
22935 \begin_inset space ~
22938 format This is an empty format whose sole purpose is to be the endpoint
22939 of a conversion (which then allows us to set up a converter for it).
22942 \begin_layout Description
22951 This converter performs the
22952 \begin_inset Quotes eld
22956 \begin_inset Quotes erd
22959 of the literate document.
22960 For Noweb, it is set to
22961 \begin_inset Quotes eld
22966 noweave -delay -index $$i > $$o
22969 \begin_inset Quotes erd
22975 \begin_layout Description
22985 \begin_inset Quotes eld
22989 \begin_inset Quotes erd
22993 As stated above, the Converter is set to
22994 \begin_inset Quotes eld
23002 \begin_inset Quotes erd
23005 , with Flags set to
23006 \begin_inset Newline newline
23010 \begin_inset Quotes eld
23015 parselog=$$s/scripts/listerrors
23018 \begin_inset Quotes erd
23024 \begin_layout Subsubsection
23028 \begin_layout Standard
23029 There is also a new function implemented in the LyX server, the
23030 \begin_inset Quotes eld
23033 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23037 \begin_layout Standard
23038 When debugging code with ddd/gdb, it is possible to invoke a text editor
23039 at the current execution position with a single key stroke.
23040 The default ddd configuration for that is shift-ctrl-V.
23041 It happens that you can define the editor command line invocation in ddd
23044 Edit\SpecialChar \menuseparator
23045 Preferences\SpecialChar \menuseparator
23048 dialog and changing the "Edit Sources" entry.
23051 \begin_layout Standard
23052 I take advantage of the newly created LyX server function and this ddd feature,
23054 \begin_inset Quotes eld
23058 \begin_inset Quotes erd
23064 \begin_layout Standard
23065 \begin_inset VSpace defskip
23071 \begin_layout Standard
23074 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23077 \begin_layout Standard
23078 \begin_inset VSpace defskip
23084 \begin_layout Standard
23085 With this, whenever you are using ddd and find a point in the program that
23086 you want to edit, you just press shift-ctrl-V (in the ddd window), and
23087 ddd will forward this information to LyX through the LyX server and then
23088 the LyX window will show the same file with the cursor at the same position
23089 ddd was pointing to.
23090 No more guessing or long scrolling to locate a point in the program back
23094 \begin_layout Standard
23095 Note however that you must enable the LyX server to get this feature working
23096 (it is disabled by default).
23097 You can enable it in
23109 ) by entering in the
23114 \begin_inset Quotes eld
23119 /home/<your-home-directory>/.lyx/lyxpipe
23122 \begin_inset Quotes erd
23128 \begin_layout Standard
23129 Read the LyX server documentation in the
23131 Customization Manual
23133 for further information.
23136 \begin_layout Subsubsection
23140 \begin_layout Standard
23141 There are six new buttons that can be added to your LyX toolbar.
23142 Five of these buttons are short cuts to layout styles:
23163 The last one is a short cut to the
23164 \begin_inset Quotes eld
23168 \begin_inset Quotes erd
23175 \begin_layout Standard
23176 LyX has a range of buttons that are available for tool bar customization.
23177 In my toolbar I like to combine the six short cuts above with two more:
23182 \SpecialChar \menuseparator
23187 \SpecialChar \menuseparator
23194 Document\SpecialChar \menuseparator
23195 View\SpecialChar \menuseparator
23199 Here is how it looks like:
23202 \begin_layout LyX-Code
23206 \begin_layout LyX-Code
23210 \begin_layout LyX-Code
23211 Icon "layout Standard"
23214 \begin_layout LyX-Code
23215 Icon "layout Section"
23218 \begin_layout LyX-Code
23219 Icon "layout LaTeX"
23222 \begin_layout LyX-Code
23223 Icon "layout LyX-Code"
23226 \begin_layout LyX-Code
23227 Icon "layout Chunk"
23230 \begin_layout LyX-Code
23234 \begin_layout LyX-Code
23238 \begin_layout LyX-Code
23239 Icon "buffer-typeset"
23242 \begin_layout LyX-Code
23243 Icon "build-program"
23246 \begin_layout LyX-Code
23250 \begin_layout LyX-Code
23254 \begin_layout LyX-Code
23258 \begin_layout LyX-Code
23262 \begin_layout LyX-Code
23266 \begin_layout Subsubsection
23267 Colors customization
23270 \begin_layout Standard
23271 There are a number of colors in LyX that can be customized in
23276 One of the things that bothers people is the LaTeX font color.
23277 The default color is red, since the chunks uses LaTeX font, and there is
23278 a lot of chunks in literate documents, you may get tired of seeing everything
23280 You can change it by going to the tabs
23289 \begin_layout Standard
23290 The next thing is the visible presence of the newline character in the screen.
23291 You can choose the color of this particular character and make it blend
23293 I recommend you choosing a color that is close to the background but not
23294 equal, that way you still can see it is there, but it is not bothering
23298 \begin_layout Subsection
23299 LyX and knitr/Sweave
23302 \begin_layout Standard
23311 is documented in the
23315 example file and in the Sweave manual (menu
23317 Help\SpecialChar \menuseparator
23323 \begin_layout Chapter
23327 \begin_layout Standard
23328 You can do everything with LyX that you can do with LaTeX.
23329 However, LyX cannot support every LaTeX feature directly.
23330 But you can always use TeX Code.
23331 This chapter shows you some more special things you might want to use.
23332 For other special things you can do with figures, tables, floats, boxes
23333 and notes, have a look at the
23336 \begin_inset space ~
23344 \begin_layout Section
23345 Multiple Text Columns
23348 \begin_layout Standard
23349 This feature is independent of the option
23351 Two-column document
23353 in the document settings under
23358 If you want to have 2
23359 \begin_inset space ~
23362 columns for the whole document, it is recommended to use the
23364 Two-column document
23367 For all other cases use this feature.
23370 \begin_layout Standard
23371 To use multiple text columns in your document, you have to load the module
23378 Document\SpecialChar \menuseparator
23379 Settings\SpecialChar \menuseparator
23382 ) and must have the LaTeX-package
23389 \begin_layout Standard
23390 Footnotes within multiple columns will be placed at the bottom of the page
23391 and not under each column.
23392 Within the different columns you can use everything, with the limitation
23393 that for floats you need to use the float option
23400 \begin_layout Subsection
23404 \begin_layout Standard
23405 If you want to have 2
23406 \begin_inset space ~
23409 columns in your text, insert a multicolumn inset via the menu
23411 Insert\SpecialChar \menuseparator
23413 \begin_inset space ~
23416 Insets\SpecialChar \menuseparator
23418 \begin_inset space ~
23423 where the columns should start.
23424 Write all text that should be printed in 2
23425 \begin_inset space ~
23428 columns into this inset.
23431 \begin_layout Standard
23432 Here is an example:
23435 \begin_layout Standard
23437 \begin_inset Flex Multiple Columns
23440 \begin_layout Plain Layout
23445 The Adventure of the Empty House
23448 \begin_inset Newline newline
23451 by Sir Arthur Conan Doyle
23454 \begin_layout Plain Layout
23457 It was in the spring of the year 1894 that all London was interested, and
23458 the fashionable world dismayed, by the murder of the Honourable Ronald
23459 Adair under most unusual and inexplicable circumstances.
23460 The public has already learned those particulars of the crime which came
23461 out in the police investigation, but a good deal was suppressed upon that
23462 occasion, since the case for the prosecution was so overwhelmingly strong
23463 that it was not necessary to bring forward all the facts.
23464 Only now, at the end of nearly ten years, am I allowed to supply those
23465 missing links which make up the whole of that remarkable chain.
23466 The crime was of interest in itself, but that interest was as nothing to
23467 me compared to the inconceivable sequel, which afforded me the greatest
23468 shock and surprise of any event in my adventurous life.
23469 Even now, after this long interval, I find myself thrilling as I think
23470 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23471 ty which utterly submerged my mind.
23472 Let me say to that public, which has shown some interest in those glimpses
23473 which I have occasionally given them of the thoughts and actions of a very
23474 remarkable man, that they are not to blame me if I have not shared my knowledge
23475 with them, for I should have considered it my first duty to do so, had
23476 I not been barred by a positive prohibition from his own lips, which was
23477 only withdrawn upon the third of last month.
23485 \begin_layout Standard
23486 To get 3 or more columns, set the cursor into the multicolumn inset and
23489 Insert\SpecialChar \menuseparator
23491 \begin_inset space ~
23495 \begin_inset space ~
23501 The number of the desired columns is written into that inset (for 3
23502 \begin_inset space ~
23506 \begin_inset Quotes eld
23510 \begin_inset Quotes erd
23514 \begin_inset Newline newline
23517 Here is an example with 3
23518 \begin_inset space ~
23524 \begin_layout Standard
23525 \begin_inset Flex Multiple Columns
23528 \begin_layout Plain Layout
23531 \begin_inset Argument 1
23534 \begin_layout Plain Layout
23540 It can be imagined that my close intimacy with Sherlock Holmes had interested
23541 me deeply in crime, and that after his disappearance I never failed to
23542 read with care the various problems which came before the public.
23543 And I even attempted, more than once, for my own private satisfaction,
23544 to employ his methods in their solution, though with indifferent success.
23545 There was none, however, which appealed to me like this tragedy of Ronald
23547 As I read the evidence at the inquest, which led up to a verdict of willful
23548 murder against some person or persons unknown, I realized more clearly
23549 than I had ever done the loss which the community had sustained by the
23550 death of Sherlock Holmes.
23551 There were points about this strange business which would, I was sure,
23552 have specially appealed to him, and the efforts of the police would have
23553 been supplemented, or more probably anticipated, by the trained observation
23554 and the alert mind of the first criminal agent in Europe.
23555 All day, as I drove upon my round, I turned over the case in my mind and
23556 found no explanation which appeared to me to be adequate.
23557 At the risk of telling a twice-told tale, I will recapitulate the facts
23558 as they were known to the public at the conclusion of the inquest.
23566 \begin_layout Standard
23567 You can have up to 10
23568 \begin_inset space ~
23571 columns if you want to, but that might not be very pleasant for the readers
23575 \begin_layout Standard
23576 \begin_inset Newpage newpage
23582 \begin_layout Subsection
23583 Columns inside Columns
23586 \begin_layout Standard
23587 You can also have columns inside columns:
23590 \begin_layout Standard
23591 \begin_inset Flex Multiple Columns
23594 \begin_layout Plain Layout
23597 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23598 at that time governor of one of the Australian colonies.
23599 Adair's mother had returned from Australia to undergo the operation for
23600 cataract, and she, her son Ronald, and her daughter Hilda were living together
23604 \begin_layout Plain Layout
23605 \begin_inset Flex Multiple Columns
23608 \begin_layout Plain Layout
23611 The youth moved in the best society–had, so far as was known, no enemies
23612 and no particular vices.
23613 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23614 had been broken off by mutual consent some months before, and there was
23615 no sign that it had left any very profound feeling behind it.
23616 For the rest {sic} the man's life moved in a narrow and conventional circle,
23617 for his habits were quiet and his nature unemotional.
23618 Yet it was upon this easy-going young aristocrat that death came, in most
23619 strange and unexpected form, between the hours of ten and eleven-twenty
23620 on the night of March 30, 1894.
23628 \begin_layout Plain Layout
23631 Ronald Adair was fond of cards–playing continually, but never for such stakes
23633 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23634 It was shown that, after dinner on the day of his death, he had played
23635 a rubber of whist at the latter club.
23636 He had also played there in the afternoon.
23641 The evidence of those who had played with him– Mr.
23642 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23643 and that there was a fairly equal fall of the cards.
23644 Adair might have lost five pounds, but not more.
23645 His fortune was a considerable one, and such a loss could not in any way
23647 He had played nearly every day at one club or other, but he was a cautious
23648 player, and usually rose a winner.
23649 It came out in evidence that, in partnership with Colonel Moran, he had
23650 actually won as much as four hundred and twenty pounds in a sitting, some
23651 weeks before, from Godfrey Milner and Lord Balmoral.
23652 So much for his recent history as it came out at the inquest.
23660 \begin_layout Subsection
23664 \begin_layout Standard
23665 The examples in this section show some more special features of multiple
23669 \begin_layout Standard
23670 For more features of multiple columns, have a look at the documentation
23671 of the LaTeX-package
23676 \begin_inset CommandInset citation
23685 \begin_layout Subsubsection
23689 \begin_layout Standard
23690 To add a preface text for multiple columns, set the cursor into the multicolumn
23691 inset and use the menu
23693 Insert\SpecialChar \menuseparator
23697 Write your preface text into that inset.
23698 \begin_inset Newline newline
23701 This is an example with some preface text:
23704 \begin_layout Standard
23705 \begin_inset VSpace bigskip
23711 \begin_layout Standard
23712 \begin_inset Flex Multiple Columns
23715 \begin_layout Plain Layout
23716 \begin_inset Argument 2
23719 \begin_layout Plain Layout
23720 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23728 On the evening of the crime, he returned from the club exactly at ten.
23729 His mother and sister were out spending the evening with a relation.
23730 The servant deposed that she heard him enter the front room on the second
23731 floor, generally used as his sitting-room.
23732 She had lit a fire there, and as it smoked she had opened the window.
23733 No sound was heard from the room until eleven-twenty, the hour of the return
23734 of Lady Maynooth and her daughter.
23735 Desiring to say good-night, she attempted to enter her son's room.
23736 The door was locked on the inside, and no answer could be got to their
23737 cries and knocking.
23738 Help was obtained, and the door forced.
23739 The unfortunate young man was found lying near the table.
23740 His head had been horribly mutilated by an expanding revolver bullet, but
23741 no weapon of any sort was to be found in the room.
23749 \begin_layout Standard
23750 You can also use a section heading as the preface if you use a section command
23752 For example the command
23755 \begin_layout Standard
23760 subsection{subsection title}
23763 \begin_layout Standard
23764 creates a subsection.
23765 In this example the preface is a subsubsection:
23768 \begin_layout Standard
23769 \begin_inset Flex Multiple Columns
23772 \begin_layout Plain Layout
23773 \begin_inset Argument 2
23776 \begin_layout Plain Layout
23780 \begin_layout Plain Layout
23789 This is a subsubsection heading as a preface
23793 \begin_layout Plain Layout
23807 A minute examination of the circumstances served only to make the case more
23809 In the first place, no reason could be given why the young man should have
23810 fastened the door upon the inside.
23811 There was the possibility that the murderer had done this, and had afterwards
23812 escaped by the window.
23813 The drop was at least twenty feet, however, and a bed of crocuses in full
23815 Neither the flowers nor the earth showed any sign of having been disturbed,
23816 nor were there any marks upon the narrow strip of grass which separated
23817 the house from the road.
23818 Apparently, therefore, it was the young man himself who had fastened the
23820 But how did he come by his death? No one could have climbed up to the window
23821 without leaving traces.
23822 Suppose a man had fired through the window, he would indeed be a remarkable
23823 shot who could with a revolver inflict so deadly a wound.
23824 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23825 a hundred yards of the house.
23826 No one had heard a shot.
23834 \begin_layout Standard
23835 If there is less vertical space than 6
23836 \begin_inset space ~
23839 text lines is left on the page at the beginning of the multiple columns,
23840 a page break will be inserted before the multiple columns.
23841 Depending on the number of lines of the preface text, you might want to
23843 This is done by setting the cursor into the mulitcolumn inset behind the
23844 preface (if there is any) and using the menu
23846 Insert\SpecialChar \menuseparator
23848 \begin_inset space ~
23852 \begin_inset space ~
23856 \begin_inset space ~
23862 Insert into that inset the amount of space like e.
23863 \begin_inset space \thinspace{}
23867 \begin_inset space \space{}
23871 \begin_inset Quotes eld
23875 \begin_inset Quotes erd
23879 \begin_inset Newline newline
23882 In this example the space is set to 7
23883 \begin_inset space ~
23886 text lines by using
23887 \begin_inset Quotes eld
23893 \begin_inset Quotes erd
23902 needs to be inserted as TeX code):
23905 \begin_layout Standard
23906 \begin_inset Flex Multiple Columns
23909 \begin_layout Plain Layout
23910 \begin_inset Argument 3
23913 \begin_layout Plain Layout
23918 \begin_layout Plain Layout
23934 On the evening of the crime, he returned from the club exactly at ten.
23935 His mother and sister were out spending the evening with a relation.
23936 The servant deposed that she heard him enter the front room on the second
23937 floor, generally used as his sitting-room.
23938 She had lit a fire there, and as it smoked she had opened the window.
23939 No sound was heard from the room until eleven-twenty, the hour of the return
23940 of Lady Maynooth and her daughter.
23941 Desiring to say good-night, she attempted to enter her son's room.
23942 The door was locked on the inside, and no answer could be got to their
23943 cries and knocking.
23944 Help was obtained, and the door forced.
23945 The unfortunate young man was found lying near the table.
23946 His head had been horribly mutilated by an expanding revolver bullet, but
23947 no weapon of any sort was to be found in the room.
23955 \begin_layout Subsubsection
23959 \begin_layout Standard
23960 The amount of space before and after multiple columns can be changed by
23961 changing the length
23968 For example the command
23971 \begin_layout Standard
23981 \begin_layout Standard
23982 in TeX Code changes its value to 3
23983 \begin_inset space \thinspace{}
23987 The change must be made before the multiple columns' start.
23988 The predefined value is 13
23989 \begin_inset space \thinspace{}
23995 \begin_layout Standard
24003 \begin_inset space \thinspace{}
24009 \begin_layout Standard
24013 \begin_layout Plain Layout
24019 multicolsep}{2.5cm}
24027 \begin_layout Standard
24028 \begin_inset Flex Multiple Columns
24031 \begin_layout Plain Layout
24034 All day I turned these facts over in my mind, endeavouring to hit upon some
24035 theory which could reconcile them all, and to find that line of least resistanc
24036 e which my poor friend had declared to be the starting-point of every investigat
24038 I confess that I made little progress.
24039 In the evening I strolled across the Park, and found myself about six o'clock
24040 at the Oxford Street end of Park Lane.
24041 A group of loafers upon the pavements, all staring up at a particular window,
24042 directed me to the house which I had come to see.
24043 A tall, thin man with coloured glasses, whom I strongly suspected of being
24044 a plain-clothes detective, was pointing out some theory of his own, while
24045 the others crowded round to listen to what he said.
24046 I got as near him as I could, but his observations seemed to me to be absurd,
24047 so I withdrew again in some disgust.
24048 As I did so I struck against an elderly, deformed man, who had been behind
24049 me, and I knocked down several books which he was carrying.
24057 \begin_layout Standard
24058 \begin_inset Note Greyedout
24061 \begin_layout Plain Layout
24066 The values you set with
24072 will be used for all following multiple columns until you change them again.
24080 \begin_layout Standard
24084 \begin_layout Plain Layout
24096 \begin_inset Note Note
24099 \begin_layout Plain Layout
24100 go back to the default
24108 \begin_layout Standard
24109 \begin_inset Newpage newpage
24115 \begin_layout Subsubsection
24119 \begin_layout Standard
24120 A column break can be forced by inserting the command
24126 as TeX-Code to that position in the text where the column should be broken.
24127 Note that this leads in most cases to whitespace in the text.
24128 \begin_inset Newline newline
24131 Here is an example:
24134 \begin_layout Standard
24135 \begin_inset Flex Multiple Columns
24138 \begin_layout Plain Layout
24141 \begin_inset Quotes eld
24144 You're surprised to see me, sir,
24145 \begin_inset Quotes erd
24148 said he, in a strange, croaking voice.
24151 \begin_layout Plain Layout
24154 I acknowledged that I was.
24157 \begin_layout Plain Layout
24160 \begin_inset Quotes eld
24163 Well, I've a conscience, sir, and when I chanced to see you go into this
24164 house, as I came hobbling after you, I thought to myself, I'll just step
24165 in and see that kind gentleman, and tell him that if I was a bit gruff
24166 in my manner there was not any harm meant, and that I am much obliged to
24167 him for picking up my books.
24168 \begin_inset Quotes erd
24174 \begin_layout Plain Layout
24177 \begin_inset Quotes eld
24180 You make too much of a trifle,
24181 \begin_inset Quotes erd
24186 \begin_inset Quotes eld
24189 May I ask how you knew who I was?
24190 \begin_inset Quotes erd
24193 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24197 \begin_layout Plain Layout
24209 \begin_layout Plain Layout
24212 \begin_inset Quotes eld
24215 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24216 you'll find my little bookshop at the corner of Church Street, and very
24217 happy to see you, I am sure.
24218 Maybe you collect yourself, sir.
24222 \begin_inset space ~
24235 --a bargain, every one of them.
24236 With five volumes you could just fill that gap on that second shelf.
24237 It looks untidy, does it not, sir?
24238 \begin_inset Quotes erd
24249 \begin_layout Subsubsection
24253 \begin_layout Standard
24254 The width of the columns is automatically calculated, but you can modify
24255 the space between the columns.
24256 This is done by changing the length
24263 Its predefined value is 10
24264 \begin_inset space \thinspace{}
24268 Here is an example where
24275 \begin_inset space \thinspace{}
24281 \begin_layout Standard
24285 \begin_layout Plain Layout
24299 \begin_layout Standard
24300 \begin_inset Flex Multiple Columns
24303 \begin_layout Plain Layout
24306 My observations of No.
24307 \begin_inset space \space{}
24310 427 Park Lane did little to clear up the problem in which I was interested.
24311 The house was separated from the street by a low wall and railing, the
24312 whole not more than five feet high.
24313 It was perfectly easy, therefore, for anyone to get into the garden, but
24314 the window was entirely inaccessible, since there was no water pipe or
24315 anything which could help the most active man to climb it.
24316 More puzzled than ever, I retraced my steps to Kensington.
24317 I had not been in my study five minutes when the maid entered to say that
24318 a person desired to see me.
24319 To my astonishment it was none other than my strange old book collector,
24320 his sharp, wizened face peering out from a frame of white hair, and his
24321 precious volumes, a dozen of them at least, wedged under his right arm.
24329 \begin_layout Standard
24333 \begin_layout Plain Layout
24345 \begin_inset Note Note
24348 \begin_layout Plain Layout
24349 go back to the default
24357 \begin_layout Subsubsection
24361 \begin_layout Standard
24362 Between the columns a rule with a width of the length
24369 If this rule width is set to 0
24370 \begin_inset space \thinspace{}
24373 pt (this is the default), the rule is suppressed.
24374 In the following example the rule is 2
24375 \begin_inset space \thinspace{}
24381 \begin_layout Standard
24385 \begin_layout Plain Layout
24391 columnseprule}{2pt}
24399 \begin_layout Standard
24400 \begin_inset Flex Multiple Columns
24403 \begin_layout Plain Layout
24406 \begin_inset Quotes eld
24409 You're surprised to see me, sir,
24410 \begin_inset Quotes erd
24413 said he, in a strange, croaking voice.
24416 \begin_layout Plain Layout
24419 I acknowledged that I was.
24422 \begin_layout Plain Layout
24425 \begin_inset Quotes eld
24428 Well, I've a conscience, sir, and when I chanced to see you go into this
24429 house, as I came hobbling after you, I thought to myself, I'll just step
24430 in and see that kind gentleman, and tell him that if I was a bit gruff
24431 in my manner there was not any harm meant, and that I am much obliged to
24432 him for picking up my books.
24433 \begin_inset Quotes erd
24439 \begin_layout Plain Layout
24442 \begin_inset Quotes eld
24445 You make too much of a trifle,
24446 \begin_inset Quotes erd
24451 \begin_inset Quotes eld
24454 May I ask how you knew who I was?
24455 \begin_inset Quotes erd
24461 \begin_layout Plain Layout
24464 \begin_inset Quotes eld
24467 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24468 you'll find my little bookshop at the corner of Church Street, and very
24469 happy to see you, I am sure.
24470 Maybe you collect yourself, sir.
24474 \begin_inset space ~
24487 --a bargain, every one of them.
24488 With five volumes you could just fill that gap on that second shelf.
24489 It looks untidy, does it not, sir?
24490 \begin_inset Quotes erd
24501 \begin_layout Standard
24502 \begin_inset VSpace defskip
24508 \begin_layout Standard
24509 The rule can be colored by redefining the command
24516 This is done by inserting the command
24517 \begin_inset Newline newline
24526 columnseprulecolor}{
24531 \begin_inset Newline newline
24534 as TeX-Code before the multicolumn inset.
24539 in this command by a color of your choice.
24540 You can use all pre- and self-defined colors.
24548 \begin_inset space ~
24553 for more information about pre- and self-defined colors.
24554 To go back to the default color insert the command
24555 \begin_inset Newline newline
24564 columnseprulecolor}{
24569 \begin_inset Newline newline
24572 Here is the example with a cyan rule and 1
24573 \begin_inset space \thinspace{}
24576 cm column separation:
24579 \begin_layout Standard
24583 \begin_layout Plain Layout
24592 \begin_layout Plain Layout
24598 columnseprulecolor}{
24608 \begin_layout Standard
24609 \begin_inset Flex Multiple Columns
24612 \begin_layout Plain Layout
24615 \begin_inset Quotes eld
24618 You're surprised to see me, sir,
24619 \begin_inset Quotes erd
24622 said he, in a strange, croaking voice.
24625 \begin_layout Plain Layout
24628 I acknowledged that I was.
24631 \begin_layout Plain Layout
24634 \begin_inset Quotes eld
24637 Well, I've a conscience, sir, and when I chanced to see you go into this
24638 house, as I came hobbling after you, I thought to myself, I'll just step
24639 in and see that kind gentleman, and tell him that if I was a bit gruff
24640 in my manner there was not any harm meant, and that I am much obliged to
24641 him for picking up my books.
24642 \begin_inset Quotes erd
24648 \begin_layout Plain Layout
24651 \begin_inset Quotes eld
24654 You make too much of a trifle,
24655 \begin_inset Quotes erd
24660 \begin_inset Quotes eld
24663 May I ask how you knew who I was?
24664 \begin_inset Quotes erd
24670 \begin_layout Plain Layout
24673 \begin_inset Quotes eld
24676 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24677 you'll find my little bookshop at the corner of Church Street, and very
24678 happy to see you, I am sure.
24679 Maybe you collect yourself, sir.
24683 \begin_inset space ~
24696 --a bargain, every one of them.
24697 With five volumes you could just fill that gap on that second shelf.
24698 It looks untidy, does it not, sir?
24699 \begin_inset Quotes erd
24710 \begin_layout Standard
24714 \begin_layout Plain Layout
24720 columnseprule}{0pt}
24723 \begin_layout Plain Layout
24729 columnseprulecolor}{
24737 \begin_inset Note Note
24740 \begin_layout Plain Layout
24741 go back to the default
24749 \begin_layout Section
24750 Non-standard Paragraph Shapes
24753 \begin_layout Standard
24755 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24756 For special cases like for example posters, invitation cards or poems you
24757 can modify the paragraph shape to one of your choice.
24758 This can be done by using the LaTeX-package
24762 which is loaded by using in the document settings the module
24764 Custom paragraph shapes
24769 \begin_layout Subsection
24773 \begin_layout Standard
24778 provides the following shapes:
24781 \begin_layout Standard
24782 \begin_inset Tabular
24783 <lyxtabular version="3" rows="13" columns="3">
24784 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24785 <column alignment="center" valignment="middle" width="16col%">
24786 <column alignment="center" valignment="middle" width="40col%">
24787 <column alignment="center" valignment="middle" width="35col%">
24788 <row endhead="true">
24789 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24792 \begin_layout Plain Layout
24798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24801 \begin_layout Plain Layout
24807 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24810 \begin_layout Plain Layout
24818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24821 \begin_layout Plain Layout
24827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24830 \begin_layout Plain Layout
24831 Circle with circular hole (in the size of a CD/DVD)
24836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24839 \begin_layout Plain Layout
24840 Cannot be scaled, take care there is not too much text
24847 <cell alignment="center" valignment="top" topline="true" usebox="none">
24850 \begin_layout Plain Layout
24856 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24859 \begin_layout Plain Layout
24865 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24868 \begin_layout Plain Layout
24869 Fragile, calculation might fail
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" usebox="none">
24888 \begin_layout Plain Layout
24889 Rhomboid (symbolizing a
24890 \begin_inset Quotes eld
24894 \begin_inset Quotes erd
24902 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24905 \begin_layout Plain Layout
24913 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24916 \begin_layout Plain Layout
24922 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24925 \begin_layout Plain Layout
24931 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24934 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24945 \begin_layout Plain Layout
24951 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24954 \begin_layout Plain Layout
24960 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24963 \begin_layout Plain Layout
24971 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24983 \begin_layout Plain Layout
24984 Nut for bolt (hexagon with circular hole)
24989 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24992 \begin_layout Plain Layout
25000 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25003 \begin_layout Plain Layout
25009 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25012 \begin_layout Plain Layout
25018 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25021 \begin_layout Plain Layout
25029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25032 \begin_layout Plain Layout
25038 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25041 \begin_layout Plain Layout
25047 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25050 \begin_layout Plain Layout
25058 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25061 \begin_layout Plain Layout
25067 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25070 \begin_layout Plain Layout
25076 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25079 \begin_layout Plain Layout
25087 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25090 \begin_layout Plain Layout
25096 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25099 \begin_layout Plain Layout
25100 Normal/reversed rain drop
25105 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25108 \begin_layout Plain Layout
25109 Fragile, calculation might fail
25116 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25119 \begin_layout Plain Layout
25125 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25128 \begin_layout Plain Layout
25134 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25137 \begin_layout Plain Layout
25145 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25148 \begin_layout Plain Layout
25150 \begin_inset Newline newline
25158 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25161 \begin_layout Plain Layout
25162 Triangles in different orientations
25167 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25170 \begin_layout Plain Layout
25184 \begin_layout Standard
25185 To use a shape for your paragraph, simply select it in LyX's pull-down box
25186 for environments in the toolbar.
25189 \begin_layout Standard
25190 \begin_inset Newpage newpage
25196 \begin_layout Standard
25197 Here is an example paragraph in the shape of a nut:
25200 \begin_layout Standard
25201 \begin_inset VSpace bigskip
25210 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25211 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25213 At vero eos et accusam et justo duo dolores et ea rebum.
25214 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25216 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25217 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25221 \begin_layout Standard
25222 \begin_inset VSpace bigskip
25228 \begin_layout Standard
25229 \begin_inset Note Greyedout
25232 \begin_layout Plain Layout
25237 : shapepar paragraphs cannot run over a page break.
25245 \begin_layout Standard
25246 \begin_inset VSpace bigskip
25252 \begin_layout Standard
25257 takes care that the shape will always be preserved, no matter how much
25258 text is in the paragraph.
25259 Therefore the paragraph size changes with the amount of contained text.
25260 This can lead to paragraph sizes exceeding the page margins.
25261 To demonstrate the size scaling, here is the same example paragraph but
25262 with twice as much text:
25265 \begin_layout Standard
25266 \begin_inset Newpage newpage
25275 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25276 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25278 At vero eos et accusam et justo duo dolores et ea rebum.
25279 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25281 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25282 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25284 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25285 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25287 At vero eos et accusam et justo duo dolores et ea rebum.
25288 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25290 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25291 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25295 \begin_layout Standard
25296 \begin_inset VSpace bigskip
25302 \begin_layout Standard
25303 An exception is the shape
25308 It cannot be scaled because it must fit the size of a CD/DVD.
25309 Therefore the amount of text that fits into the shape is limited.
25310 \begin_inset Newline newline
25321 shape are fragile, meaning that the calculation of their size can fail,
25322 depending on the amount of text.
25323 You will then get the LaTeX error
25324 \begin_inset Quotes eld
25327 Arithmetic overflow
25328 \begin_inset Quotes erd
25332 In this case one can try to remove or add some text; if nothing works one
25333 has to use another shape.
25336 \begin_layout Standard
25337 \begin_inset VSpace bigskip
25343 \begin_layout Standard
25344 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25345 fails for text in the tips.
25346 Therefore it is often necessary to add hyphenation points
25351 arg "specialchar-insert hyphenation"
25356 ) to the corresponding text parts.
25359 \begin_layout Standard
25360 \begin_inset VSpace bigskip
25366 \begin_layout Standard
25367 Shapepar paragraphs are either always centered or placed on the page so
25368 that their left border touches the left page margin.
25369 You can therefore not use the paragraph dialog to align such paragraphs.
25370 A solution is to put the paragraph into a minipage or parbox and align
25372 The problem is hereby to find the right width for the box.
25373 Because if it is too wide and you center the box, the paragraph is not
25374 centered too because it sticks at the left side of the box.
25375 So you might have to play a bit with the width until it fits.
25376 Here are two heart-shaped paragraphs, the first one is not aligned, the
25377 second one is right-aligned:
25380 \begin_layout Standard
25381 \begin_inset Newpage newpage
25387 \begin_layout Heart
25392 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25393 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25395 At vero eos et accusam et justo duo dolores et ea rebum.
25396 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25400 \begin_layout Standard
25401 \begin_inset VSpace bigskip
25407 \begin_layout Standard
25410 \begin_inset Box Frameless
25420 height_special "totalheight"
25423 \begin_layout Heart
25428 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25429 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25431 At vero eos et accusam et justo duo dolores et ea rebum.
25432 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25441 \begin_layout Subsection
25445 \begin_layout Standard
25446 You can define any shape you want.
25447 Doing this manually is a lot of work because every coordinate must be specified.
25448 But there is a way to let the computer calculate the coordinates:
25451 \begin_layout Enumerate
25452 Install the program
25453 \begin_inset CommandInset href
25456 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25463 \begin_layout Enumerate
25474 \begin_layout Plain Layout
25485 \begin_layout Plain Layout
25492 eX\SpecialChar \menuseparator
25493 Settings\SpecialChar \menuseparator
25496 and select the font size you are using in your document.
25497 For example this document uses the size 12
25498 \begin_inset space \thinspace{}
25504 \begin_layout Enumerate
25508 \begin_layout Enumerate
25515 \begin_layout Plain Layout
25526 \begin_layout Plain Layout
25533 eX\SpecialChar \menuseparator
25536 to export the shape to coordinates.
25537 In the appearing dialog use either the outline of your shape for the coordinate
25538 s or the path itself.
25542 \begin_layout Plain Layout
25543 For more information see
25544 \begin_inset CommandInset href
25546 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25558 \begin_layout Standard
25559 The coordinates are written into a TeX-file.
25560 To use it for your LyX document
25563 \begin_layout Enumerate
25564 Place the cursor before the first character of your paragraph (or into a
25568 \begin_layout Enumerate
25569 Open in LyX the menu
25571 Insert\SpecialChar \menuseparator
25572 File\SpecialChar \menuseparator
25574 \begin_inset space ~
25579 , select the file and use
25588 \begin_layout Standard
25589 \begin_inset VSpace defskip
25595 \begin_layout Standard
25596 \begin_inset Note Greyedout
25599 \begin_layout Plain Layout
25604 : The changed shape only applies to the current paragraph; everything is
25605 reset to normal for the next paragraph.
25606 Therefore the shape definition file must be input into every paragraph
25607 with the desired shape.
25615 \begin_layout Standard
25616 \begin_inset VSpace bigskip
25622 \begin_layout Standard
25623 Here is an example:
25626 \begin_layout Standard
25627 \begin_inset VSpace bigskip
25633 \begin_layout Standard
25634 \begin_inset CommandInset include
25636 filename "SpecialParagraphShape.tex"
25642 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25643 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25645 At vero eos et accusam et justo duo dolores et ea rebum.
25646 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25648 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25649 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25653 \begin_layout Standard
25654 \begin_inset VSpace bigskip
25660 \begin_layout Standard
25665 to draw complexer shapes in
25669 you can draw the shape in a program of your choice and import the resulting
25675 Then you only need to draw a line or spline along the outline of the image.
25678 \begin_layout Standard
25679 \begin_inset VSpace bigskip
25685 \begin_layout Standard
25688 Custom paragraph shapes
25690 also provides the two commands
25698 which can be used to define custom shapes coordinate by coordinate.
25702 \begin_layout Plain Layout
25703 These commands are internally used for all shapes described here.
25708 For information how these styles are used and about further customization
25709 possibilities, have a look at the documentation of the package
25714 \begin_inset CommandInset citation
25723 \begin_layout Bibliography
25724 \begin_inset CommandInset bibitem
25725 LatexCommand bibitem
25730 Documentation of the LaTeX-package
25731 \begin_inset CommandInset href
25734 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25741 \begin_layout Bibliography
25742 \begin_inset CommandInset bibitem
25743 LatexCommand bibitem
25748 Documentation of the LaTeX-package
25749 \begin_inset CommandInset href
25752 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"