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
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 1
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
120 \notefontcolor #0000ff
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
132 \paperpagestyle headings
133 \tracking_changes false
134 \output_changes false
143 Additional LyX Features
146 \begin_layout Subtitle
155 \begin_layout Plain Layout
157 Principal maintainer of this file is
162 If you have comments or error corrections, please send them to the LyX
163 Documentation mailing list,
164 \begin_inset Flex Code
167 \begin_layout Plain Layout
169 <lyx-docs@lists.lyx.org>
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
191 \begin_layout Chapter
195 \begin_layout Standard
196 This manual is essentially Part II of the
198 User's Guide\SpecialChar \@.
201 The reason for separating the two documents is simple: the
205 is already quite lengthy, and it contains information on all of the basic
206 features one needs to know in order to prepare most documents.
207 However, the LyX Team has worked to make LyX extensible through various
208 configuration files and external packages.
209 That means that if you want to support the Fizzwizzle LaTeX package, you
210 can create a layout file (or module) for it without having to alter LyX
212 We've already had contributions of several new features this way, and some
213 of them are documented here.
214 There are also some more `advanced' features, such as how to control the
215 presentation of bibliographies and how to work with multi-part documents,
216 that are not covered in the
220 and are discussed here.
223 \begin_layout Standard
224 This manual also documents some special features, like fax support, version
225 control, and SGML support, which require additional software to work properly.
226 There is also a chapter on LyX's support for HTML.
227 And lastly, there's a chapter of LaTeX tools and tips, things you can use
228 to spruce up your documents by directly using the powerful features of
234 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
237 \begin_layout Standard
238 If you haven't read the
242 yet, you are definitely in the wrong manual.
247 is the first place to go, since it describes the notation and format of
249 You should also be thoroughly familiar with the
253 and all of the basic features of LyX before attempting to read this one.
256 \begin_layout Standard
257 Since many of the topics in this manual depend heavily on LyX's interaction
258 with LaTeX, this first chapter covers the inner workings of LyX and how
259 to direct LyX to generate exactly the LaTeX code you want.
260 It is obviously for more seasoned LyX users.
263 \begin_layout Chapter
267 \begin_layout Section
271 \begin_layout Standard
272 This chapter is for both TeX-nicians and the LaTeX-curious.
273 In it, we'll explain how LyX and LaTeX work together to produce printable
275 This is the only place in any of the manuals where we assume you know something
279 \begin_layout Standard
280 At one time, LyX was called a
281 \begin_inset Quotes eld
284 WYSIWYM frontend to LaTeX,
285 \begin_inset Quotes erd
288 but that's no longer true.
289 There are frontends to LaTeX out there.
293 \begin_layout Plain Layout
294 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
295 There are also the LaTeX modes for vi and emacs, of course.
300 These are basically text editors with the ability to run LaTeX and mark
301 any errors in the file you're editing.
310 run LaTeX, and it also indicates errors in the file, it also does much,
312 For one thing, you don't need to know LaTeX to use LyX effectively.
313 And LyX has added its own extensions to LaTeX.
314 Try the following sometime: select
315 \begin_inset Flex MenuItem
318 \begin_layout Plain Layout
319 Export\SpecialChar \menuseparator
326 \begin_inset Flex MenuItem
329 \begin_layout Plain Layout
336 \begin_inset Flex MenuItem
339 \begin_layout Plain Layout
340 View\SpecialChar \menuseparator
346 ), then look at the preamble of the resulting
347 \begin_inset Flex Code
350 \begin_layout Plain Layout
357 You'll notice a variety of new macros defined specifically by LyX.
358 These macros are defined automatically, according to the features you use
362 \begin_layout Standard
363 There are several commands that automatically invoke LaTeX.
367 \begin_layout Itemize
368 \begin_inset Flex MenuItem
371 \begin_layout Plain Layout
372 View\SpecialChar \menuseparator
381 \begin_layout Itemize
382 \begin_inset Flex MenuItem
385 \begin_layout Plain Layout
386 View\SpecialChar \menuseparator
395 \begin_layout Itemize
396 \begin_inset Flex MenuItem
399 \begin_layout Plain Layout
400 File\SpecialChar \menuseparator
409 \begin_layout Itemize
410 \begin_inset Flex MenuItem
413 \begin_layout Plain Layout
414 File\SpecialChar \menuseparator
423 \begin_layout Standard
424 They will only invoke LaTeX if the file has changed since the last time
429 \begin_layout Standard
430 When LyX runs LaTeX on the file you're editing, it performs these steps:
433 \begin_layout Enumerate
434 Convert the document to LaTeX and save to a file with the extension
435 \begin_inset Flex Code
438 \begin_layout Plain Layout
445 \begin_inset Flex Code
448 \begin_layout Plain Layout
457 \begin_layout Enumerate
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 file (maybe several times), and run any other commands (such as
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
479 \begin_inset Flex Code
482 \begin_layout Plain Layout
488 ) needed to compile the LaTeX file.
491 \begin_layout Enumerate
492 If there are any errors, show the error log.
495 \begin_layout Standard
496 If you have run LaTeX using
497 \begin_inset Flex MenuItem
500 \begin_layout Plain Layout
503 \SpecialChar \menuseparator
511 , LyX then runs a DVI viewer to display the DVI-file.
513 \begin_inset Flex MenuItem
516 \begin_layout Plain Layout
519 \SpecialChar \menuseparator
527 , LyX performs further steps:
530 \begin_layout Itemize
532 \begin_inset Flex Code
535 \begin_layout Plain Layout
541 to convert the DVI file to PostScript.
544 \begin_layout Itemize
545 Run a PostScript viewer, such as
546 \begin_inset Flex Code
549 \begin_layout Plain Layout
555 , to display the PostScript file.
558 \begin_layout Standard
559 LyX does similar things when viewing, or exporting, other formats.
562 \begin_layout Section
563 Translating LaTeX files into LyX
566 \begin_layout Standard
567 You can import a LaTeX file into LyX by using the
568 \begin_inset Flex MenuItem
571 \begin_layout Plain Layout
572 File\SpecialChar \menuseparator
573 Import\SpecialChar \menuseparator
580 This will call a program named
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
590 which will create a file
591 \begin_inset Flex Code
594 \begin_layout Plain Layout
601 \begin_inset Flex Code
604 \begin_layout Plain Layout
611 LyX will then open that file.
615 \begin_layout Plain Layout
616 \begin_inset Flex Code
619 \begin_layout Plain Layout
625 can also be run from the command line, of course.
633 \begin_layout Standard
634 \begin_inset Flex Code
637 \begin_layout Plain Layout
643 will translate most legal LaTeX, but not everything.
644 It will put things it doesn't understand into TeX code, so after translating
646 \begin_inset Flex Code
649 \begin_layout Plain Layout
655 , you can look for TeX code and hand-edit it until it looks right.
658 \begin_layout Standard
659 If you don't know what TeX code is, read the next section.
662 \begin_layout Section
663 \begin_inset CommandInset label
665 name "sec:Inserting-TeX-Code"
669 Inserting TeX Code into LyX Documents
672 \begin_layout Standard
673 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
674 You can always insert TeX code into any LyX document.
675 LyX cannot, and will never be able to, display every possible LaTeX construct.
676 If ever you need to insert LaTeX commands into your LyX document, you can
678 \begin_inset Flex Code
681 \begin_layout Plain Layout
687 box, which you can insert into your document with
688 \begin_inset Flex MenuItem
691 \begin_layout Plain Layout
692 Insert\SpecialChar \menuseparator
698 or the keyboard shortcut
707 \begin_layout Standard
708 Here's an example of inserting LaTeX commands in a LyX document.
709 The code looks like this:
712 \begin_layout LyX-Code
716 \begin_inset Newline newline
722 \begin_inset Newline newline
725 This is an example of a minipage environment.
727 \begin_inset Newline newline
730 can put nearly everything in it, even (non-floating)
731 \begin_inset Newline newline
736 \begin_inset Newline newline
742 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
781 \begin_inset Newline newline
787 \begin_inset Newline newline
795 \begin_layout LyX-Code
799 \begin_layout Standard
801 \begin_inset Flex Code
804 \begin_layout Plain Layout
810 box containing this text is directly after this paragraph.
811 Those of you reading the manual in LyX will only see the TeX code inset.
812 Those reading a printed version of the manuals will see the actual results:
813 \begin_inset VSpace bigskip
819 \begin_layout Standard
823 \begin_layout Plain Layout
830 \begin_layout Plain Layout
837 \begin_layout Plain Layout
839 This is an example of a minipage environment.
840 You can put nearly everything in it, even (non-floating) figures and tables.
844 \begin_layout Plain Layout
851 \begin_layout Plain Layout
856 \begin_layout Plain Layout
863 \begin_layout Plain Layout
870 \begin_layout Plain Layout
877 \begin_layout Plain Layout
883 \begin_layout Plain Layout
890 \begin_layout Plain Layout
897 \begin_layout Plain Layout
904 \begin_layout Plain Layout
914 \begin_inset VSpace bigskip
920 \begin_layout Standard
921 In addition to using TeX code, you can also create a separate file containing
922 some complex LaTeX structure and then use
923 \begin_inset Flex MenuItem
926 \begin_layout Plain Layout
927 Insert\SpecialChar \menuseparator
937 to include your file (you should select the type
938 \begin_inset Flex Code
941 \begin_layout Plain Layout
948 We recommend that you only do this if you have a
949 \begin_inset Flex Code
952 \begin_layout Plain Layout
963 Otherwise, you'll have a big job tracking down LaTeX errors.
966 \begin_layout Standard
967 There are a few last points to emphasize:
970 \begin_layout Itemize
975 check if your LaTeX code is correct.
978 \begin_layout Itemize
979 Beware of reinventing the wheel.
982 \begin_layout Standard
983 On that last point, LyX does have quite a few features tucked into it, and
985 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
986 feature before you decide you have to do it by hand.
987 Moreover, there are numerous LaTeX packages out there to do all sorts of
988 things, from labels to envelopes to fancy multipage tables.
990 \begin_inset CommandInset href
993 target "http://www.ctan.org/"
1000 \begin_layout Standard
1001 If you do need to do some wild and fancy things within your document, be
1002 sure to check out a good LaTeX book for assistance.
1003 There are a number of them listed in the bibliography of the
1010 \begin_layout Section
1011 LyX and the LaTeX Preamble
1014 \begin_layout Subsection
1015 About the LaTeX Preamble
1018 \begin_layout Standard
1019 If you already know LaTeX, there is no need to explain here what the preamble
1021 If you don't, the following will give you some ideas—we recommend again
1022 that you consult a LaTeX book for further information.
1023 In any case, you should read the points below, because they explain what
1024 you can do and what you don't need to do in the LaTeX preamble of a LyX
1028 \begin_layout Standard
1029 The LaTeX preamble comes at the very beginning of a document,
1037 \begin_layout Itemize
1038 Declare the document class.
1040 \begin_inset Newline newline
1043 LyX already does this for you.
1044 If you're a seasoned LaTeX-nician, and you have a custom document class
1045 you want to use, check out the
1047 Customization Manual
1049 for information on how to make LyX interface to it.
1052 \begin_layout Itemize
1053 Declare the usage of packages.
1055 \begin_inset Newline newline
1058 LaTeX packages provide special commands, which are only available within
1059 a document when the package has been declared in the preamble.
1060 In addition to providing special commands, the inclusion of a package can
1061 change the document.
1062 For example, the package
1063 \begin_inset Flex Code
1066 \begin_layout Plain Layout
1072 forces all paragraphs to be indented.
1073 There are other packages for labels, envelopes, margins, etc.
1077 \begin_layout Itemize
1078 Set counters, variables, lengths and widths.
1080 \begin_inset Newline newline
1083 There are several LaTeX counters and variables that
1087 be set globally from within the preamble in order to have the desired effect.
1088 (There are variables that you can set and reset inside the document, too.)
1089 Margins are a good example of something that must be set in the preamble.
1090 Another example is the label format for lists.
1091 You can actually set these just about anywhere, but it's best to do it
1092 just once, inside the preamble.
1095 \begin_layout Itemize
1096 Declare user defined commands (with
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1109 \begin_inset Flex Code
1112 \begin_layout Plain Layout
1121 \begin_inset Newline newline
1124 These are abbreviations for LaTeX commands which appear very often inside
1126 Although the preamble is a good place to declare such commands, they
1130 be declared anywhere (before they are used for the first time, of course).
1131 This can be useful if there is a lot of raw LaTeX code in your document,
1132 which normally should not be the case.
1135 \begin_layout Standard
1136 LyX adds its own set of definitions to the preamble of the
1137 \begin_inset Flex Code
1140 \begin_layout Plain Layout
1147 This makes LaTeX files generated by LyX portable.
1150 \begin_layout Subsection
1151 Changing the Preamble
1154 \begin_layout Standard
1155 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1156 can't change them without patching LyX itself.
1157 You can, however, add your own stuff to the preamble by selecting
1158 \begin_inset Flex MenuItem
1161 \begin_layout Plain Layout
1163 \begin_inset space ~
1172 \begin_inset Flex MenuItem
1175 \begin_layout Plain Layout
1176 Document\SpecialChar \menuseparator
1183 LyX adds anything in the
1184 \begin_inset Flex MenuItem
1187 \begin_layout Plain Layout
1193 dialog to its own built-in preamble.
1194 Before adding your own declarations in the preamble, you should make sure
1195 that LyX doesn't already support what you want to do.
1196 (Remember what we said about reinventing the wheel?) Also,
1198 make sure your preamble code is correct
1201 LyX doesn't check it for you.
1202 If there is an error, you're likely to get an error like
1203 \begin_inset Quotes eld
1207 \begin_inset Flex Code
1210 \begin_layout Plain Layout
1219 \begin_inset Quotes erd
1223 If you see this error, check your preamble.
1226 \begin_layout Subsection
1230 \begin_layout Standard
1231 Here are some examples of what you can add to a preamble, and what they
1235 \begin_layout Subsubsection
1239 \begin_layout Standard
1240 There are two variables under LaTeX that control page position:
1241 \begin_inset Flex Code
1244 \begin_layout Plain Layout
1253 \begin_inset Flex Code
1256 \begin_layout Plain Layout
1265 Their names should be self-explanatory.
1266 These variables are useful if you think for a moment about computer labels.
1267 Sometimes, the size of a print medium and the area of the medium that you
1268 can actually print on aren't the same.
1270 \begin_inset Flex Code
1273 \begin_layout Plain Layout
1282 \begin_inset Flex Code
1285 \begin_layout Plain Layout
1296 \begin_layout Standard
1297 The default values for
1298 \begin_inset Flex Code
1301 \begin_layout Plain Layout
1310 \begin_inset Flex Code
1313 \begin_layout Plain Layout
1322 \begin_inset space \thinspace{}
1326 \begin_inset space \thinspace{}
1330 \begin_inset space \space{}
1333 the page isn't shifted.
1334 Unfortunately, some DVI drivers always seem to shift the page.
1335 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1336 If you're using LyX on a system that you don't personally maintain, and
1337 your sysadmin is a doofus,
1338 \begin_inset Flex Code
1341 \begin_layout Plain Layout
1350 \begin_inset Flex Code
1353 \begin_layout Plain Layout
1362 Suppose your left and top margins are always 0.5
1363 \begin_inset space \thinspace{}
1367 You can add this to the preamble:
1370 \begin_layout LyX-Code
1378 \begin_layout LyX-Code
1386 \begin_layout Standard
1387 and your margins should now be correct.
1390 \begin_layout Subsubsection
1394 \begin_layout Standard
1395 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1396 There's a rather nice package, available at your nearest CTAN archive,
1397 for printing sheets of labels:
1398 \begin_inset Flex Code
1401 \begin_layout Plain Layout
1408 Now, your system may not have this package installed by default.
1409 We leave that up to you to check.
1410 You'll also want to read the documentation for it; we're not going to do
1412 Since this is an example, however, we'll give you an example of how you
1416 \begin_layout Standard
1417 First, make sure you're using the
1418 \begin_inset Flex Code
1421 \begin_layout Plain Layout
1428 Next, you need to put the following in your preamble:
1431 \begin_layout LyX-Code
1437 \begin_layout LyX-Code
1443 \begin_layout LyX-Code
1449 \begin_layout LyX-Code
1455 \begin_layout LyX-Code
1461 \begin_layout LyX-Code
1467 \begin_layout LyX-Code
1473 \begin_layout Standard
1474 This sets things up for Avery label sheets, stock #5360.
1475 You're now ready to print labels, but you'll need to insert LaTeX code,
1476 placing the commands
1477 \begin_inset Flex Code
1480 \begin_layout Plain Layout
1489 \begin_inset Flex Code
1492 \begin_layout Plain Layout
1500 around each label text.
1501 This and other special features of
1502 \begin_inset Flex Code
1505 \begin_layout Plain Layout
1511 are explained in its documentation.
1514 \begin_layout Standard
1515 Someday, someone may write a LyX layout file to support this package directly.
1516 Maybe that someone is you.
1519 \begin_layout Subsubsection
1520 Example #3: Paragraph Indentation
1523 \begin_layout Standard
1524 Americans are trained to indent the first line of
1529 As with all of their other weird quirks, most Americans will whine and
1530 moan until they can have their way and indent the first line of all paragraphs.
1539 \begin_layout Standard
1540 Of course, this behavior isn't standard typography.
1541 In books, you typically only indent the first line of a paragraph
1545 it follows another one.
1546 The idea behind indenting the first line of a paragraph is to distinguish
1547 neighboring paragraphs from one another.
1548 If there is no previous paragraph—for example, if it follows a figure or
1549 is the first paragraph in a section—then there is no need for indentation.
1553 \begin_layout Standard
1554 If you're a typical American (we're still joking!), though, you don't care
1555 about such esoteric things; you want your indentation! Add this to the
1559 \begin_layout LyX-Code
1562 usepackage{indentfirst}
1565 \begin_layout Standard
1566 If your TeX distribution isn't braindead, you'll have this package, and
1567 all of your paragraphs will get the indentation the Founding Fathers intended
1571 \begin_layout Subsubsection
1572 Example #4: This Document
1575 \begin_layout Standard
1576 You can also check out the preamble of this document to get an idea of some
1577 of the advanced things you can do.
1580 \begin_layout Section
1581 LyX and LaTeX Errors
1584 \begin_layout Standard
1585 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1587 It then uses the logfile from the LaTeX run to do a post-mortem.
1588 After analyzing the logfile, LyX displays a dialog listing the errors.
1589 Clicking on any one of them will take you to the position in your LyX file
1590 where the error occurred.
1594 \begin_layout Plain Layout
1596 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1598 There are also cases where LaTeX reports the error on one line, but the
1599 actual error is earlier.
1600 This is not unlike forgetting a closing brace in a program: You'll get
1601 an error, but only later.
1609 \begin_layout Standard
1610 Some folks also like to look at the log file directly: It is available from
1612 \begin_inset Flex MenuItem
1615 \begin_layout Plain Layout
1618 \SpecialChar \menuseparator
1622 \begin_inset space ~
1631 There are some fairly common error messages and warnings.
1632 We'll cover those here.
1633 You should look at a good LaTeX book for a complete listing.
1636 \begin_layout Itemize
1637 \begin_inset Flex Code
1640 \begin_layout Plain Layout
1647 \begin_inset Newline newline
1650 Anything beginning with these words is a warning message for the purpose
1652 \begin_inset Quotes eld
1656 \begin_inset Quotes erd
1659 the LaTeX code itself.
1660 You'll get messages like this if you added or changed cross-references
1661 or bibliography entries, in which case, LaTeX is trying to tell you that
1662 you need to make another run.
1663 You can by-and-large ignore these.
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1670 \begin_layout Plain Layout
1677 \begin_inset Newline newline
1680 Another warning message, this time about fonts which LaTeX couldn't find.
1681 The rest of the message will often say something about a replacement font
1683 You can safely ignore these, too.
1686 \begin_layout Itemize
1687 \begin_inset Flex Code
1690 \begin_layout Plain Layout
1699 \begin_inset Newline newline
1707 They are warnings about lines that were too long and run past the right
1709 Almost always, this is unnoticeable in the final output.
1710 (It can be just a point or two.) Or, only one or two characters extend past
1712 LaTeX seems to generate at least one of these messages for just about any
1714 \begin_inset Newline newline
1717 You can ignore these messages.
1718 Your eyes will tell you if there's a problem with something that's too
1719 wide; just look at the output.
1723 \begin_layout Plain Layout
1724 You can also enable the `draft' option in
1725 \begin_inset Flex MenuItem
1728 \begin_layout Plain Layout
1731 \SpecialChar \menuseparator
1739 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1751 \begin_layout Plain Layout
1760 \begin_inset Newline newline
1763 Not quite as common as its cousin.
1764 LaTeX seems to like to print lines that are a bit too wide as opposed to
1765 ones that are a bit too narrow.
1766 We have no idea why.
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1773 \begin_layout Plain Layout
1782 \begin_inset Flex Code
1785 \begin_layout Plain Layout
1794 \begin_inset Newline newline
1797 Warnings about troubles breaking the page.
1798 Once again, just look at the output.
1799 Your eyes will tell you where something has gone wrong.
1802 \begin_layout Itemize
1803 \begin_inset Flex Code
1806 \begin_layout Plain Layout
1808 \begin_inset Quotes els
1812 \begin_inset Quotes ers
1821 \begin_inset Newline newline
1825 \begin_inset Quotes eld
1829 \begin_inset Quotes erd
1832 isn't installed on this system.
1833 This usually appears because some package your document needs isn't installed.
1834 If you didn't touch the preamble or didn't use the
1835 \begin_inset Flex Code
1838 \begin_layout Plain Layout
1846 command, then one of the packages LyX tried to load is missing.
1848 \begin_inset Flex MenuItem
1851 \begin_layout Plain Layout
1852 Help\SpecialChar \menuseparator
1858 to get a list of packages that LyX knows about.
1859 This file is updated whenever you reconfigure LyX (using
1860 \begin_inset Flex MenuItem
1863 \begin_layout Plain Layout
1864 Tools\SpecialChar \menuseparator
1870 ) and tells you which packages have been detected and what they do.
1871 \begin_inset Newline newline
1875 \begin_inset Flex Code
1878 \begin_layout Plain Layout
1886 command and the package in question isn't installed, then you'll need to
1887 install it yourself.
1890 \begin_layout Itemize
1891 \begin_inset Flex Code
1894 \begin_layout Plain Layout
1895 LaTeX Error: Unknown option
1901 \begin_inset Newline newline
1904 Error messages beginning with this are trying to tell you that you specified
1905 a bad or undefined option to a package.
1906 Check the package's documentation.
1909 \begin_layout Itemize
1910 \begin_inset Flex Code
1913 \begin_layout Plain Layout
1914 Undefined control sequence
1920 \begin_inset Newline newline
1923 If you've inserted LaTeX code into your document, but made a typo, you'll
1925 You may have forgotten to load a package.
1926 In any case, this error message usually means that you used an undefined
1931 \begin_layout Standard
1932 There are other error and warning messages.
1933 Some are self-explanatory.
1934 These are usually LaTeX messages.
1935 Others are downright cryptic.
1936 These are usually TeX error messages, and we really have
1940 what they mean or how to decipher them.
1944 \begin_layout Standard
1945 There's a general sequence you should follow if you get error messages:
1948 \begin_layout Enumerate
1949 Look at the LaTeX code you inserted for typos.
1952 \begin_layout Enumerate
1953 If there are no typos, check that you used the command(s) correctly.
1956 \begin_layout Enumerate
1957 If you get a bunch of error boxes piled up at the very top of the document—and
1958 especially if you see a
1959 \begin_inset Quotes eld
1963 \begin_inset Flex Code
1966 \begin_layout Plain Layout
1975 \begin_inset Quotes erd
1978 error—it means that there are errors in the preamble.
1979 Start debugging your preamble.
1982 \begin_layout Enumerate
1983 If you didn't add anything to the preamble and didn't add any LaTeX code
1984 to the document, the first suspect is your LaTeX distribution itself.
1985 Check for missing packages and install them.
1988 \begin_layout Enumerate
1989 Okay, so there are no missing packages.
1990 Did you use any of the fine-tuning options in LyX? Specifically, did you
1995 any of them, like trying to manually insert lots of
1996 \begin_inset Flex Code
1999 \begin_layout Plain Layout
2001 \begin_inset space ~
2010 \begin_inset Flex Code
2013 \begin_layout Plain Layout
2020 \begin_inset Flex Code
2023 \begin_layout Plain Layout
2029 ? Did you try to kludge something together with these instead of using the
2030 appropriate paragraph environment?
2033 \begin_layout Enumerate
2034 All right, you didn't use any of the fine-tuning options, you played by
2036 Did you try to pull a fancy maneuver? Did you do something funky inside
2037 a table or an equation, like inserting a graphic into a table cell?
2040 \begin_layout Enumerate
2041 Do you have long sections of text where LaTeX cannot find a place to break
2042 a line? By default, LaTeX is rather strict about how much extra inter-word
2043 spacing it will add in order to break a line.
2044 Preferably, you should rework the paragraph to avoid the problem.
2045 If this isn't an option, you can wrap your text in
2046 \begin_inset Flex Code
2049 \begin_layout Plain Layout
2057 to make LaTeX's line breaking more, well, sloppy.
2060 \begin_layout Enumerate
2061 Did you go overboard with the nesting? LyX (currently) doesn't check to
2062 make sure you're in the limits for nesting environments.
2063 If you nested a bunch of environments to the
2064 \begin_inset Formula $17^{\mathrm{th}}$
2067 level, that's the problem.
2068 (The limit in LaTeX is five.)
2071 \begin_layout Enumerate
2072 Okay, you didn't get any error messages, but your output looks awful.
2073 If you have a table or figure that's too wide or long for the page, you
2078 \begin_layout Enumerate
2079 rescale the figure so it fits.
2082 \begin_layout Enumerate
2083 trim down the table so it fits.
2087 \begin_layout Enumerate
2088 If something else is wrong with the output, and you didn't try to pull anything
2089 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2092 \begin_layout Standard
2093 If all this doesn't help—well, then
2097 you might have found a bug in LyX\SpecialChar \ldots{}
2101 \begin_layout Chapter
2105 \begin_layout Section
2106 Customizing Bibliographies with BibTeX
2109 \begin_layout Standard
2110 The most basic information about how to use BibTeX with LyX is contained
2113 Bibliography databases (BibTeX)
2120 The following subsections explain special bibliography features supported
2124 \begin_layout Subsection
2125 Alternative Citation Styles
2128 \begin_layout Standard
2129 Standard BibTeX uses numbers (e.
2130 \begin_inset space \thinspace{}
2134 \begin_inset space \space{}
2138 \begin_inset Quotes eld
2142 \begin_inset Quotes erd
2145 ) to refer to a cited work.
2146 However, in many scientific disciplines, other citation styles are in use.
2147 The most common one is the author-year style (e.
2148 \begin_inset space \thinspace{}
2152 \begin_inset space \space{}
2156 \begin_inset Quotes eld
2160 \begin_inset Quotes erd
2164 LyX supports two packages that provide this style,
2165 \begin_inset Flex Code
2168 \begin_layout Plain Layout
2175 \begin_inset Flex Code
2178 \begin_layout Plain Layout
2185 Both packages have their pros and cons, which cannot be listed in detail.
2186 If you only want to have simple author-year (or author-numerical) style,
2187 or if you want to use one of the countless style files for
2188 \begin_inset Flex Code
2191 \begin_layout Plain Layout
2197 , then the established
2198 \begin_inset Flex Code
2201 \begin_layout Plain Layout
2207 package is probably your choice.
2208 If you need special features like short title references, ibidem etc., you
2210 \begin_inset Flex Code
2213 \begin_layout Plain Layout
2222 \begin_layout Standard
2223 The handling of both packages in LyX is basically the same.
2225 \begin_inset Flex MenuItem
2228 \begin_layout Plain Layout
2229 Document\SpecialChar \menuseparator
2236 \begin_inset Flex MenuItem
2239 \begin_layout Plain Layout
2246 \begin_inset Flex MenuItem
2249 \begin_layout Plain Layout
2256 \begin_inset Flex MenuItem
2259 \begin_layout Plain Layout
2266 With both packages, you will get some extra features in the citation dialog
2267 and you can select the style of the reference (
2268 \begin_inset Quotes eld
2272 \begin_inset Quotes erd
2276 \begin_inset Quotes eld
2280 \begin_inset Quotes erd
2284 \begin_inset Quotes eld
2288 \begin_inset Quotes erd
2292 \begin_inset Quotes eld
2296 \begin_inset Quotes erd
2300 Note that both packages need specifically designed style files.
2301 They both ship their own, but there are lots of additional style files,
2302 and there is even an interactive style file builder
2306 \begin_layout Plain Layout
2308 \begin_inset Flex URL
2311 \begin_layout Plain Layout
2313 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2324 \begin_inset Flex Code
2327 \begin_layout Plain Layout
2336 \begin_layout Subsection
2337 Sectioned Bibliographies
2340 \begin_layout Standard
2341 Sometimes you might need to divide your bibliography into several sections.
2342 If you are for instance a historian, the possibility to separate sources
2343 and scientific works is most likely a
2344 \begin_inset Quotes eld
2348 \begin_inset Quotes erd
2352 Unfortunately, BibTeX itself does not allow you to do this.
2353 But with the help of some LaTeX packages, BibTeX can be extended to fit
2357 \begin_layout Standard
2358 LyX provides native support for one of these packages,
2366 \begin_layout Plain Layout
2368 \begin_inset Flex URL
2371 \begin_layout Plain Layout
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2383 The advantage of this package (compared to other packages like
2387 ) is that you don't need to define new citation commands.
2388 Instead, you need to prepare different bibliographic databases which include
2389 the entries for the different sections of the bibliography.
2390 For example: If you want to divide your bibliography into the sections
2392 \begin_inset Quotes eld
2396 \begin_inset Quotes erd
2400 \begin_inset Quotes eld
2404 \begin_inset Quotes erd
2407 , you first need to create two bibliographic databases, e.
2408 \begin_inset space \thinspace{}
2412 \begin_inset space \space{}
2416 \begin_inset Flex Code
2419 \begin_layout Plain Layout
2426 \begin_inset Flex Code
2429 \begin_layout Plain Layout
2439 \begin_layout Standard
2441 \begin_inset Flex MenuItem
2444 \begin_layout Plain Layout
2445 Document\SpecialChar \menuseparator
2452 \begin_inset Flex MenuItem
2455 \begin_layout Plain Layout
2462 \begin_inset Flex MenuItem
2465 \begin_layout Plain Layout
2466 Sectioned bibliography
2472 Now you can insert multiple BibTeX bibliographies, one for each section
2473 of your bibliography.
2474 Returning to our example: Insert the BibTeX bibliography
2475 \begin_inset Flex Code
2478 \begin_layout Plain Layout
2484 and a second one for the database
2485 \begin_inset Flex Code
2488 \begin_layout Plain Layout
2495 You are free to use the same or different styles for each section.
2496 Additionally, you can choose if the bibliography section should contain
2498 \begin_inset Quotes eld
2501 all cited references
2502 \begin_inset Quotes erd
2505 of the specified database(s) (which is the default),
2506 \begin_inset Quotes eld
2509 all uncited references
2510 \begin_inset Quotes erd
2514 \begin_inset Quotes eld
2518 \begin_inset Quotes erd
2522 This might be useful if you would like to separate your bibliography into
2524 \begin_inset Quotes eld
2528 \begin_inset Quotes erd
2532 \begin_inset Quotes eld
2536 \begin_inset Quotes erd
2540 \begin_inset Quotes eld
2544 \begin_inset Quotes erd
2548 The titles for the sections can be added as ordinary sections or subsections.
2550 \begin_inset Flex Code
2553 \begin_layout Plain Layout
2559 removes the bibliography title, you have to manually re-add that, too (as
2560 a chapter* or section*, for instance).
2563 \begin_layout Subsection
2564 Multiple Bibliographies
2567 \begin_layout Standard
2568 Multiple bibliographies, e.
2569 \begin_inset space \thinspace{}
2573 \begin_inset space \space{}
2576 a bibliography for each section or chapter of the document, are not supported
2579 \begin_inset Flex Code
2582 \begin_layout Plain Layout
2588 package, which is used for the creation of sectioned bibliographies in
2589 LyX (see the previous section), provides an easy way to solve this task,
2590 if you are willing to use some
2591 \begin_inset Flex MenuItem
2594 \begin_layout Plain Layout
2601 \begin_inset space ~
2605 \begin_inset CommandInset ref
2607 reference "sec:Inserting-TeX-Code"
2615 \begin_layout Plain Layout
2616 An alternative approach is to use the
2617 \begin_inset Flex Code
2620 \begin_layout Plain Layout
2627 \begin_inset Flex Code
2630 \begin_layout Plain Layout
2636 package, respectively.
2644 \begin_layout Standard
2646 \begin_inset Flex MenuItem
2649 \begin_layout Plain Layout
2650 Document\SpecialChar \menuseparator
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2671 Sectioned bibliography
2677 In the document, you have to enclose the sections, which shall contain
2678 their own bibliography (including the BibTeX bibliography itself), between
2680 \begin_inset Flex Code
2683 \begin_layout Plain Layout
2692 \begin_inset Flex Code
2695 \begin_layout Plain Layout
2703 (those commands have to be inserted as TeX code).
2704 The bibliography will contain all references that have been cited in the
2706 \begin_inset Flex Code
2709 \begin_layout Plain Layout
2720 If you are using this approach, then every citation reference has to be
2722 \begin_inset Flex Code
2725 \begin_layout Plain Layout
2733 \begin_inset Flex Code
2736 \begin_layout Plain Layout
2745 \begin_layout Section
2749 \begin_layout Subsection
2753 \begin_layout Standard
2754 When you are working on a large file with many sections, it is often convenient
2755 to break up the document into several files, or perhaps you have something
2756 where a table may change from time to time, but the preceding text does
2758 In these cases, you should seriously consider using multipart documents.
2759 For example, scientific papers often have five major sections: the introduction
2760 , observations, results, discussion, and conclusion.
2761 Each of these could be its own separate LyX file, with one
2762 \begin_inset Quotes eld
2766 \begin_inset Quotes erd
2769 file which contains the title, authors, abstract, references, etc., plus
2770 the five included files.
2771 It is important to note that each of these files is a full LyX file which
2772 can be formatted and printed on its own, as well as included in a master
2774 Each of these files must have the same document class, however—don't attempt
2775 to mix book classes with article classes.
2776 You may also include LaTeX files; however, these files must not have their
2778 \begin_inset space \thinspace{}
2782 \begin_inset space \space{}
2785 everything up to and including the
2786 \begin_inset Flex Code
2789 \begin_layout Plain Layout
2798 \begin_inset Flex Code
2801 \begin_layout Plain Layout
2809 line must be deleted) or else errors will be generated when you try to
2813 \begin_layout Standard
2814 LyX allows you to include files quite easily with
2815 \begin_inset Flex MenuItem
2818 \begin_layout Plain Layout
2819 Insert\SpecialChar \menuseparator
2821 \begin_inset space ~
2830 When you click on this selection a small box is inserted into the file
2831 at the current cursor location.
2832 Clicking on the box raises a dialog which allows you to select the file
2833 to be included, and the method of its inclusion.
2837 \begin_layout Standard
2838 The file selection box should by now be obvious.
2839 The three inclusion methods are
2840 \begin_inset Quotes eld
2844 \begin_inset Quotes erd
2848 \begin_inset Quotes eld
2852 \begin_inset Quotes erd
2856 \begin_inset Quotes eld
2860 \begin_inset Quotes erd
2864 The difference between
2865 \begin_inset Quotes eld
2869 \begin_inset Quotes erd
2873 \begin_inset Quotes eld
2877 \begin_inset Quotes erd
2880 is really only meaningful to LaTeXperts, but the practical difference is
2882 \begin_inset Quotes eld
2886 \begin_inset Quotes erd
2889 are typeset beginning on a new page, while files that are
2890 \begin_inset Quotes eld
2894 \begin_inset Quotes erd
2897 are typeset starting on the current page.
2900 \begin_layout Standard
2901 Generally, the master file is converted into a full LaTeX file before typesettin
2902 g, while the included files are converted to LaTeX files that do not have
2903 all the preamble information.
2906 \begin_layout Standard
2908 \begin_inset Quotes eld
2912 \begin_inset Quotes erd
2915 included file allows you to include a file typeset exactly as it appears
2917 \begin_inset space \thinspace{}
2921 \begin_inset space \space{}
2925 \begin_inset Flex Code
2928 \begin_layout Plain Layout
2934 mode, with the characters set in a fixed-width typewriter font.
2935 Normally, spaces in this file are invisible, though two consecutive spaces
2936 are conserved, unlike LyX's normal treatment of spaces.
2937 However, setting the
2938 \begin_inset Flex MenuItem
2941 \begin_layout Plain Layout
2943 \begin_inset space ~
2947 \begin_inset space ~
2951 \begin_inset space ~
2959 checkbox typesets a mark to unambiguously define the presence of a space.
2963 \begin_layout Subsection
2964 Cross-References Between Files
2967 \begin_layout Standard
2968 \begin_inset Box Shadowbox
2978 height_special "totalheight"
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983 Need to describe default master documents and how children are opened when
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995 First, open all the files in question: let's call them A and B in a two
2996 file example, where B is included in A.
2997 Let's say you insert a label in A, then want to reference it in B.
2998 Open the cross-reference dialog whilst in document B, and you can select
3000 \begin_inset Quotes eld
3004 \begin_inset Quotes erd
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3025 height_special "totalheight"
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030 There is now material about this on the wiki, and it could be copied here.
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3041 This way LyX will find the
3042 \begin_inset Flex Code
3045 \begin_layout Plain Layout
3051 -files and you can easily insert references without making the bibliography
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use it and the references
3057 will look like this: [?], instead of like this: [1].
3058 One solution is to use the LaTeX-package
3059 \begin_inset Flex Code
3062 \begin_layout Plain Layout
3068 that will only include comments by processing the files separately.
3069 To do this, add in the LaTeX preamble of every subdocument the following:
3072 \begin_layout LyX-Code
3078 \begin_layout LyX-Code
3081 includecomment{comment}
3084 \begin_layout Standard
3086 \begin_inset Flex URL
3089 \begin_layout Plain Layout
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \begin_layout Section
3103 \begin_layout Standard
3104 Users sometimes need to be able to
3105 \begin_inset Quotes eld
3109 \begin_inset Quotes erd
3112 a LyX file together with all the images (and other files) on which it depends,
3113 either for sending to a publisher or for sharing with a co-author.
3114 LyX 2.0 includes a Python script (
3115 \begin_inset Flex Code
3118 \begin_layout Plain Layout
3124 ) that automates this process.
3125 To use it, you must have either the
3126 \begin_inset Flex Code
3129 \begin_layout Plain Layout
3136 \begin_inset Flex Code
3139 \begin_layout Plain Layout
3145 python modules installed on your system.
3146 By default, the script prefers the
3147 \begin_inset Flex Code
3150 \begin_layout Plain Layout
3157 \begin_inset Flex Code
3160 \begin_layout Plain Layout
3166 format on Unix-like systems and the
3167 \begin_inset Flex Code
3170 \begin_layout Plain Layout
3179 \begin_layout Standard
3180 LyX's configuration process will set the script up to export a `LyX Archive',
3181 and this format will then be available under
3182 \begin_inset Flex Code
3185 \begin_layout Plain Layout
3186 File\SpecialChar \menuseparator
3195 \begin_layout Standard
3196 Independently of the platform, the generation of a particular archive format
3197 can be forced by adding either the
3198 \begin_inset Flex Code
3201 \begin_layout Plain Layout
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3228 \begin_inset Flex Code
3231 \begin_layout Plain Layout
3237 format) switch to the
3238 \begin_inset Flex Code
3241 \begin_layout Plain Layout
3242 LyX\SpecialChar \menuseparator
3249 \begin_inset Flex Code
3252 \begin_layout Plain Layout
3253 Tools\SpecialChar \menuseparator
3254 Preferences\SpecialChar \menuseparator
3255 File Handling\SpecialChar \menuseparator
3262 (Make sure you add the switch after the script name, not before it.)
3265 \begin_layout Section
3266 Fancy Headers and Footers
3269 \begin_layout Standard
3270 The default page layout is rather plain; for an
3271 \begin_inset Flex Code
3274 \begin_layout Plain Layout
3280 document class, all you get is a centered page number at the bottom of
3282 This document uses KOMA-script's book class, so it appears to be a bit
3284 But to really put on a show, you need to set the document page style to
3286 \begin_inset Quotes eld
3290 \begin_inset Quotes erd
3293 , as mentioned in the
3298 This section describes the LaTeX code you need to insert in your LaTeX
3299 preamble in order to get the desired effects.
3302 \begin_layout Standard
3303 For more information on fancy headers, see the
3304 \begin_inset Flex Code
3307 \begin_layout Plain Layout
3313 package documentation.
3315 \begin_inset Flex URL
3318 \begin_layout Plain Layout
3320 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3328 \begin_layout Standard
3329 The page header is divided into three fields, not surprisingly labeled
3330 \begin_inset Quotes eld
3334 \begin_inset Quotes erd
3338 \begin_inset Quotes eld
3342 \begin_inset Quotes erd
3346 \begin_inset Quotes eld
3350 \begin_inset Quotes erd
3354 The footer is also divided into these three fields.
3355 The LaTeX commands to set these fields in the simplest manner are
3356 \begin_inset Flex Code
3359 \begin_layout Plain Layout
3368 \begin_inset Flex Code
3371 \begin_layout Plain Layout
3380 \begin_inset Flex Code
3383 \begin_layout Plain Layout
3392 \begin_inset Flex Code
3395 \begin_layout Plain Layout
3404 Suppose you wish to put your name in the upper left hand corner of each
3406 Simply insert the following command in the preamble:
3409 \begin_layout Standard
3418 \begin_layout Standard
3419 You will now see your name in the upper left.
3420 If a field has a default entry that you would like to get rid of (often
3421 the page number appears in the central footer) simply include a command
3422 with a blank argument, e.
3423 \begin_inset space \thinspace{}
3429 \begin_layout Standard
3437 \begin_layout Standard
3438 Let's get really fancy: lets put the section number with the word
3439 \begin_inset Quotes eld
3443 \begin_inset Quotes erd
3447 \begin_inset space \thinspace{}
3451 \begin_inset space \space{}
3454 Section 3) in the upper left, the page number (e.
3455 \begin_inset space \thinspace{}
3459 \begin_inset space \space{}
3462 Page 4) in the upper right, your name in the lower left, and the date in
3464 The following commands should now appear in the preamble:
3467 \begin_layout Standard
3477 \begin_layout Standard
3485 \begin_layout Standard
3495 \begin_layout Standard
3504 \begin_layout Standard
3512 \begin_layout Standard
3522 \begin_layout Standard
3524 \begin_inset Flex Code
3527 \begin_layout Plain Layout
3536 \begin_inset Flex Code
3539 \begin_layout Plain Layout
3547 access LaTeX's section and page counters, and so print out the current
3548 section and page numbers.
3550 \begin_inset Flex Code
3553 \begin_layout Plain Layout
3561 simply prints out today's date.
3564 \begin_layout Standard
3565 The thicknesses of the horizontal rules drawn beneath the header and above
3566 the footer can also be modified.
3567 If you don't want one of the rules, set its thickness to 0.
3568 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3574 \begin_inset Flex Code
3577 \begin_layout Plain Layout
3582 headrulewidth}{0.4pt}
3588 \begin_inset Flex Code
3591 \begin_layout Plain Layout
3596 footrulewidth}{0.4pt}
3601 to set the thicknesses.
3604 \begin_layout Standard
3605 You can switch the header/footer settings on and off for individual pages
3607 \begin_inset Flex Code
3610 \begin_layout Plain Layout
3613 thispagestyle{empty}
3619 \begin_inset Flex Code
3622 \begin_layout Plain Layout
3625 thispagestyle{plain}
3631 \begin_inset Flex Code
3634 \begin_layout Plain Layout
3637 thispagestyle{fancy}
3643 Simply insert them in the text on the page you want changed and mark them
3645 In fact, title pages are marked as plain by default, while following pages
3646 are marked fancy when using the global fancy setting.
3649 \begin_layout Standard
3650 As a final example, it is possible to include an image in the header or
3652 Suppose you want to put a company logo in the upper lefthand corner.
3653 You might try something like
3656 \begin_layout Standard
3665 includegraphics{logo.eps}}}
3668 \begin_layout Standard
3670 (you may need to preface this with
3671 \begin_inset Flex Code
3674 \begin_layout Plain Layout
3678 usepackage{graphics}
3683 if you don't include graphics elsewhere in your document).
3686 \begin_layout Section
3687 Itemize Bullet Selection
3688 \begin_inset CommandInset label
3697 \begin_layout Standard
3703 \begin_layout Subsection
3707 \begin_layout Standard
3708 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3709 Using this dialog you can easily specify what bullet shape to use at each
3710 level of an itemized list.
3711 These settings are document-wide so you won't be able to specify different
3712 sets of bullets for different paragraphs.
3716 \begin_layout Plain Layout
3717 Well, actually you can but you'll have to do it by hand.
3725 \begin_layout Subsection
3729 \begin_layout Standard
3730 Open the dialog by selecting the
3731 \begin_inset Flex MenuItem
3734 \begin_layout Plain Layout
3735 Document\SpecialChar \menuseparator
3741 menu item and then select the
3742 \begin_inset Flex MenuItem
3745 \begin_layout Plain Layout
3754 \begin_layout Standard
3755 The dialog provides you with a table of bullet shapes.
3756 A column of buttons on the left of the table provides access to the six
3757 different panels of bullet shapes.
3758 The row of buttons across the top is used to select which bullet depth
3760 A text entry under the table shows the currently selected bullet shape's
3761 LaTeX equivalent and this can be edited if desired.
3762 If you do modify the text you will also need to specify any needed packages
3763 in the LaTeX preamble.
3766 \begin_layout Standard
3767 The six panels are divided up by the packages they require.
3768 The following table shows the mappings from button name to LaTeX package.
3771 \begin_layout Standard
3773 \begin_inset Tabular
3774 <lyxtabular version="3" rows="7" columns="2">
3775 <features rotate="0" tabularvalignment="middle">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <column alignment="center" valignment="top" width="0pt">
3779 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3782 \begin_layout Plain Layout
3797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3800 \begin_layout Plain Layout
3817 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3820 \begin_layout Plain Layout
3835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3838 \begin_layout Plain Layout
3854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3857 \begin_layout Plain Layout
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3875 \begin_layout Plain Layout
3892 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3895 \begin_layout Plain Layout
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3913 \begin_layout Plain Layout
3930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3933 \begin_layout Plain Layout
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3951 \begin_layout Plain Layout
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3971 \begin_layout Plain Layout
3986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3989 \begin_layout Plain Layout
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4009 \begin_layout Plain Layout
4024 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4027 \begin_layout Plain Layout
4050 \begin_layout Standard
4051 LyX doesn't stop you using bullets from packages you don't have.
4052 If you get errors from LaTeX when you try to view or print the file, then
4053 it is likely you are missing a package.
4057 \begin_layout Plain Layout
4058 LyX doesn't restrict your use since you may be editing locally and exporting
4067 \begin_layout Subsection
4071 \begin_layout Standard
4072 Select which bullet depth you want to change then select the bullet shape
4074 Any changes will not be visible in LyX, but are visible when viewing the
4078 \begin_layout Standard
4079 You can reset a bullet shape to the default simply by clicking your right
4080 mouse button on the appropriate bullet depth button.
4084 \begin_layout Plain Layout
4089 want to have multiple sets of paragraphs with different sets of bullets
4090 in each, then you're going to have to get your hands dirty with TeX code.
4091 The bullet selection dialog can help though because it provides you with
4092 the LaTeX code for a wide range of bullet shapes.
4093 To make your own custom paragraphs you have the following options:
4096 \begin_layout Plain Layout
4100 \begin_layout Plain Layout
4116 \begin_layout Plain Layout
4120 \begin_layout Plain Layout
4142 \begin_layout Itemize
4143 Use the LaTeX command
4144 \begin_inset Flex Code
4147 \begin_layout Plain Layout
4155 to specify a new bullet shape for a given depth.
4156 You'll also need to save the current bullet shape so you can restore it
4158 In this itemized list the following LaTeX code was used to change the bullet
4159 used for the first depth.
4163 \begin_layout LyX-Code
4173 \begin_layout LyX-Code
4190 \begin_layout Itemize
4191 Note that the itemize depth is specified in Roman numerals as part of the
4201 \begin_layout Itemize
4205 \begin_layout Plain Layout
4218 Specify each individual entry by starting each item with the bullet shape
4219 enclosed in square brackets and set as
4220 \begin_inset Flex MenuItem
4223 \begin_layout Plain Layout
4230 For example, this item was started with
4231 \begin_inset Flex Code
4234 \begin_layout Plain Layout
4249 \begin_layout Plain Layout
4253 \begin_layout Plain Layout
4269 \begin_layout Plain Layout
4270 You'll also need to revert the labelitem back to its previous setting for
4271 the global bullet shape settings to remain in effect.
4272 The way used here was:
4275 \begin_layout LyX-Code
4290 \begin_layout Chapter
4291 LyX and the World Wide Web
4294 \begin_layout Standard
4295 LyX has long supported the export of documents to various web-friendly formats,
4297 Before verson 2.0, however, HTML export was always accomplished by the use
4298 of external converters.
4302 \begin_layout Plain Layout
4303 For details on the use of external converters with LyX, see the
4307 section of the Customization manual.
4312 These fall into two large groups: there are converters that use LaTeX as
4313 an intermediate format, such as
4314 \begin_inset Flex Code
4317 \begin_layout Plain Layout
4324 \begin_inset Flex Code
4327 \begin_layout Plain Layout
4334 \begin_inset Flex Code
4337 \begin_layout Plain Layout
4343 , relying upon LyX to produce the LaTeX; and there is a converter that works
4344 directly on LyX files,
4345 \begin_inset Flex Code
4348 \begin_layout Plain Layout
4355 All of these have different advantages and disadvantages.
4359 \begin_layout Standard
4360 The LaTeX-based converters have the advantage that, in principle, they know
4361 everything about the exported document that LaTeX does.
4362 Such converters do not care, for example, if a certain block of code was
4363 produced by LyX or was Evil Red Text.
4364 These converters know about
4365 \begin_inset Flex Code
4368 \begin_layout Plain Layout
4374 files, counters, and references, and can often make use of the
4375 \begin_inset Flex Code
4378 \begin_layout Plain Layout
4384 files generated by BibTeX.
4385 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4386 said that only TeX itself understands TeX---and LaTeX-based converters
4387 will often choke on what seem to be quite simple constructs; complex ones
4388 can throw them completely, and as of this writing, for example, the
4392 manual will not export with
4393 \begin_inset Flex Code
4396 \begin_layout Plain Layout
4402 , though the others will.
4403 The other issue concerns how math is handled.
4404 These converters typically convert the formulae into little pictures that
4405 are then linked from the HTML document.
4406 Since these are actually generated by LaTeX, they are accurate.
4407 But they do not scale well, and just getting them to look as if they are
4408 actually meant to be in your document---so that the font sizes seem to
4409 be roughly the same---can be a challenge.
4412 \begin_layout Standard
4414 \begin_inset Flex Code
4417 \begin_layout Plain Layout
4424 \begin_inset CommandInset href
4426 name "http://elyxer.nongnu.org/"
4427 target "http://elyxer.nongnu.org/"
4431 ) solves some of these problems.
4432 In particular, the formulae it produces scale perfectly, since it renders
4433 math using a combination of HTML and CSS rather than converting the formulae
4435 But even moderately complex formula are rendered less well than with
4436 \begin_inset Flex Code
4439 \begin_layout Plain Layout
4445 ; this reflects the limitations of HTML.
4449 \begin_layout Plain Layout
4451 \begin_inset Flex Code
4454 \begin_layout Plain Layout
4460 can also use jsMath and MathJax for equations, but this setting is only
4461 available globally and requires one to have access to a server that runs
4467 More importantly (as of version 1.1.1, at least),
4468 \begin_inset Flex Code
4471 \begin_layout Plain Layout
4477 has limited support for math macros and no support for user-defined paragraph
4478 or character styles.
4479 These limitations make
4480 \begin_inset Flex Code
4483 \begin_layout Plain Layout
4489 unsuitable for many of the documents LyX users produce.
4490 In principle, of course, these problems could be solved, but the LyX developers
4491 have decided to follow a different path and have made LyX itself capable
4492 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4496 \begin_layout Standard
4497 As of this writing, XHTML output remains under development and should probably
4499 \begin_inset Quotes eld
4503 \begin_inset Quotes erd
4510 \begin_layout Plain Layout
4512 \begin_inset Flex Code
4515 \begin_layout Plain Layout
4516 development/HTML.notes
4521 , which can be found in the LyX source tree or
4522 \begin_inset CommandInset href
4524 name "accessed online"
4525 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4529 , usually contains up-to-date information about the state of XHTML output.
4530 See also the list of XHTML bugs on
4531 \begin_inset CommandInset href
4533 name "the bug tracker"
4534 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"
4543 Still, the developers have chosen this approach because it has several
4544 potential advantages over the other two.
4547 \begin_layout Standard
4548 These advantages are primarily due to the fact that the XHTML output routines,
4549 since they are part of LyX, know everything LyX knows about the document
4554 \begin_layout Plain Layout
4555 Another advantage is that, since these routines are internal to LyX, they
4556 are immune to changes in LyX's file format, or to changes in the semantics
4562 So they know about the table of contents (as displayed in the outline),
4563 about the counters associated with different paragraph styles, and about
4564 user-defined styles.
4565 The XHTML output routines know what LyX knows about internationalization,
4566 too, so they will output
4567 \begin_inset Quotes eld
4571 \begin_inset Quotes erd
4575 \begin_inset Quotes eld
4583 \begin_inset Quotes erd
4586 , depending upon the language in effect at the time.
4590 \begin_layout Standard
4591 Quite generally, the output routines know what LyX knows about document
4592 layout, that is, about how the document is to be rendered on screen.
4593 We use this information when we output the document as XHTML.
4598 generates CSS style information corresponding to the layout information
4599 it uses to render the document on screen: if section headings are supposed
4600 to be sans-serif and bold as seen in LyX, then (by default) they will be
4601 sans-serif and bold when viewed in a web browser, too.
4602 And this is true not just for pre-defined styles, like Section, but for
4603 any style, including user-defined styles.
4604 Indeed, the XHTML output routines make no distinction between user-defined
4605 paragraph and character styles and LyX's own pre-defined styles: in each
4606 case, everything LyX knows about the styles is contained in the layout
4608 And much the same is true as regards pre-defined textual insets, such as
4609 footnotes, and various custom insets.
4613 \begin_layout Standard
4614 The result is that XHTML output can be customized and extended in exactly
4615 the same way LaTeX output can be customized and extended: through layout
4617 See chapter five of the
4621 manual for the details.
4624 \begin_layout Standard
4625 The remainder of this chapter contains more detailed information on XHTML
4626 output, its limitations, and ways to work around those limitations.
4629 \begin_layout Section
4630 Math Output in XHTML
4633 \begin_layout Standard
4634 LyX offers four choices for how math is rendered.
4635 These have various advantages and disadvantages:
4638 \begin_layout Itemize
4640 \begin_inset Newline newline
4643 MathML is a dialect of XML designed specifically for mathematics on the
4644 web, and it typically renders very well in browsers that support it.
4645 The disadvantage is that not all browsers support MathML, and support is
4646 not complete even in the Gecko-based browsers, such as Firefox.
4647 \begin_inset Newline newline
4650 If LyX is unable to render a formula as MathML---for example, if the formula
4652 \begin_inset Flex Code
4655 \begin_layout Plain Layout
4661 package or ERT---then it will instead output the formula as an image.
4665 \begin_layout Itemize
4667 \begin_inset Newline newline
4671 \begin_inset Flex Code
4674 \begin_layout Plain Layout
4680 outputs math as HTML, styled by CSS.
4684 \begin_layout Plain Layout
4685 LyX has borrowed some of the CSS for its HTML output from
4686 \begin_inset Flex Code
4689 \begin_layout Plain Layout
4700 For simple formulae, this can work quite well, though with more complicated
4701 formulae it tends to break down.
4702 Still, this method has the advantage that it is very widely supported and
4703 so it may be appropriate for documents that contain only a little, fairly
4705 \begin_inset Newline newline
4708 If Lyx is unable to render a formula as HTML---for example, if the formula
4710 \begin_inset Flex Code
4713 \begin_layout Plain Layout
4719 package or ERT---then it will instead output the formula as an image.
4723 \begin_layout Itemize
4725 \begin_inset Newline newline
4729 \begin_inset Flex Code
4732 \begin_layout Plain Layout
4738 , LyX will output formulae as images, the very same images, in fact, that
4739 are used for instant preview.
4743 \begin_layout Plain Layout
4744 Instant preview does
4748 have to be on for images to be output, however.
4753 The advantage to this method is that the images are simply generated by
4754 LaTeX, so they are very accurate.
4755 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4756 so they do not scale terribly well, and one cannot copy them, etc.
4757 (As of this writing, there are also problems about equation numbering.
4759 \begin_inset CommandInset href
4762 target "http://www.lyx.org/trac/ticket/6894"
4767 \begin_inset Newline newline
4770 The size of the images can be controlled by setting the
4771 \begin_inset Quotes eld
4775 \begin_inset Quotes erd
4779 \begin_inset Flex MenuItem
4782 \begin_layout Plain Layout
4783 Document\SpecialChar \menuseparator
4784 Settings\SpecialChar \menuseparator
4794 \begin_layout Plain Layout
4795 For those who want to know, this controls the resolution of the image in
4796 dots per inch and is based upon a default of 75 dpi.
4802 \begin_inset Newline newline
4805 If LyX for some reason fails to create an image for a formula (e.g., if a
4806 required LaTeX package is not installed), then it will fall back to outputing
4810 \begin_layout Itemize
4812 \begin_inset Newline newline
4815 Finally, LyX will happily output math as LaTeX.
4816 As well as being the output of last resort, this method can be used with
4818 \begin_inset CommandInset href
4821 target "http://www.math.union.edu/~dpvc/jsMath/"
4825 , which uses JavaScript to render LaTeX embedded in HTML documents.
4826 LyX wraps the LaTeX in either a
4827 \begin_inset Flex Code
4830 \begin_layout Plain Layout
4836 (for inline formulas) or
4837 \begin_inset Flex Code
4840 \begin_layout Plain Layout
4846 (for displayed formulas) with
4847 \begin_inset Flex Code
4850 \begin_layout Plain Layout
4856 , as is required for jsMath.
4859 \begin_layout Standard
4860 One of these output methods must be selected under
4861 \begin_inset Flex MenuItem
4864 \begin_layout Plain Layout
4865 Document\SpecialChar \menuseparator
4866 Settings\SpecialChar \menuseparator
4873 By default, LyX outputs MathML.
4874 This is a document-wide setting, therefore.
4877 \begin_layout Standard
4878 Eventually, LyX will offer the user the option to select an alternate output
4879 method for a particular inset, say, one that isn't being rendered very
4884 \begin_layout Plain Layout
4885 That said, since LyX falls back to images if the inset contains ERT, then
4886 one can force output as an image by putting some harmless ERT into the
4888 \begin_inset Formula $a=b\relax$
4899 \begin_layout Section
4900 Bibliography and Citations
4903 \begin_layout Standard
4904 XHTML output fully supports bibliographies and citations.
4908 \begin_layout Standard
4909 Citation labels are generated by the same machinery that generates LyX's
4910 on-screen labels, so the labels will look in the output much as they do
4911 in LyX, though better.
4912 If you are using numerical citations, then LyX will output numerical labels,
4913 such as [1] or [17], rather than simply showing the citation key in square
4914 brackets, as it does on-screen.
4915 If you are using author-year citations, then LyX will add lowercase letters
4916 to the years, just as BibTeX does, if it finds more than one citation for
4917 a given author-year combination.
4918 The labels will be printed with the bibliography entries.
4919 Note that there is, at present, no way to customize the appearance of the
4920 labels, for example, to choose between square brackets and parentheses.
4923 \begin_layout Standard
4924 Bibliography output is handled by the same machinery that handles the presentati
4925 on of reference information in the citation dialog, so you will see in the
4926 XHTML output pretty much what you would see if you were to look at a given
4927 entry in the citation dialog.
4928 The formatting can be customized in your layout file or, preferably, in
4934 manual for the details.
4937 \begin_layout Standard
4938 The main defect at present is that cross-referenced information is printed
4939 with every entry with which it is associated.
4940 So you can see things like this:
4945 \begin_inset Quotes eld
4948 Context and Logical Form
4949 \begin_inset Quotes erd
4954 Language in Context: Selected Essays
4956 (Oxford: Oxford University Press, 2007), pp.
4962 \begin_inset Quotes eld
4965 Semantics in Context
4966 \begin_inset Quotes erd
4971 Language in Context: Selected Essays
4973 (Oxford: Oxford University Press, 2007), pp.
4977 \begin_layout Standard
4978 This should be fixed before long.
4981 \begin_layout Standard
4982 There is no support at present for sectioned bibliographies.
4983 If you have multiple bibliographies, then LyX will print the same bibliography
4987 \begin_layout Section
4991 \begin_layout Standard
4992 LyX will happily export indexes as XHTML, but with certain limitations at
4996 \begin_layout Standard
4997 Index export will be most reliable when you do not attempt to use the fancy
4998 constructs that are described in the section on indexes in the
5006 \begin_layout Plain Layout
5007 The main issue here is that LyX itself does not really handle these.
5008 It just lets you enter what you would have to enter in raw LaTeX.
5013 We'll describe how they are handled using the subsection headings from
5017 \begin_layout Itemize
5018 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5019 these, but the entries must be separated by
5020 \begin_inset Quotes eld
5024 \begin_inset Quotes erd
5027 , that is, there must be spaces around the exclamation point.
5028 This is because it is otherwise too difficult to check for escaped exclamation
5029 points, ones in math, and so forth.
5032 \begin_layout Itemize
5033 Page Ranges: There is no support at all for page ranges, since these make
5034 no sense with XHMTL.
5035 Instead, you will just get two index entries, one at either end.
5038 \begin_layout Itemize
5039 Cross-referencing: There is no support for cross-referencing.
5040 If LyX finds an entry containing the
5041 \begin_inset Quotes eld
5044 |see\SpecialChar \ldots{}
5046 \begin_inset Quotes erd
5049 construct, it is just dropped, and the rest is treated as an ordinary index
5053 \begin_layout Itemize
5054 Index Entry Order: LyX does support attempts to fix the sorting order.
5055 It will take what is before the first `@' it finds and use that for sorting,
5056 taking what follows the first `@' to be the actual entry.
5057 At present, LyX does not check for escaped `@', so do not try to index
5061 \begin_layout Itemize
5062 Index Entry Layout: You can format entries by using the text style dialog,
5063 or by using any other method available within LyX itself.
5064 There is no support for constructs like:
5065 \begin_inset Quotes eld
5069 \begin_inset Quotes erd
5073 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5074 and everything that follows it.
5077 \begin_layout Itemize
5078 Multiple Indexes: There is no support for multiple indexes.
5079 Rather, all index entries will be printed as one large index.
5080 To avoid our printing several versions of the index, we print only the
5081 main index, so make sure you have one.
5084 \begin_layout Section
5085 Nomenclature and Glossary
5088 \begin_layout Standard
5089 There is at present no support for glossaries.
5090 Adding it would be fairly trivial, and welcome.
5093 \begin_layout Chapter
5097 \begin_layout Section
5101 \begin_layout Standard
5102 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5103 and retrieve information about the LyX internal state.
5104 This is only intended for advanced users, but they should find it useful.
5105 It is by writing to the LyX server, for example, that bibliography managers,
5106 such as JabRef, are able to
5107 \begin_inset Quotes eld
5111 \begin_inset Quotes erd
5117 \begin_layout Section
5118 Starting the LyX Server
5121 \begin_layout Standard
5122 The LyX server works through the use of a pair of named pipes.
5123 These are usually located in
5124 \begin_inset Flex Code
5127 \begin_layout Plain Layout
5133 , (except on Windows, where
5137 named pipes are special objects located in
5138 \begin_inset Flex Code
5141 \begin_layout Plain Layout
5153 ) and have the names
5154 \begin_inset Quotes eld
5158 \begin_inset Flex Code
5161 \begin_layout Plain Layout
5168 \begin_inset Quotes erd
5172 \begin_inset Quotes eld
5176 \begin_inset Flex Code
5179 \begin_layout Plain Layout
5186 \begin_inset Quotes erd
5190 External programs write into
5191 \begin_inset Flex Code
5194 \begin_layout Plain Layout
5200 and read back data from
5201 \begin_inset Flex Code
5204 \begin_layout Plain Layout
5211 The stem of the pipe names can be defined in the
5212 \begin_inset Flex MenuItem
5215 \begin_layout Plain Layout
5216 Tools\SpecialChar \menuseparator
5223 \begin_inset Flex Code
5226 \begin_layout Plain Layout
5227 "/home/myhome/lyxpipe"
5233 \begin_inset Flex Code
5236 \begin_layout Plain Layout
5250 on Windows (but any working path can be used).
5255 configure this manually in order for the server to start.
5258 \begin_layout Standard
5260 \begin_inset Flex Code
5263 \begin_layout Plain Layout
5270 \begin_inset Flex Code
5273 \begin_layout Plain Layout
5279 ' to create the pipes.
5280 If one of the pipes already exists, LyX will assume that another LyX process
5281 is already running and will not start the server.
5282 On POSIX (Unix like) systems, if for some other reason, an unused
5283 \begin_inset Quotes eld
5287 \begin_inset Quotes erd
5290 pipe is left in existence when LyX closes, then LyX will try to delete
5292 If this fails for some reason, you will need to delete the pipes manually
5293 and then restart LyX.
5294 On Windows, pipes are deleted by the OS on program termination or crash,
5296 \begin_inset Quotes eld
5300 \begin_inset Quotes erd
5303 pipes should not be possible.
5306 \begin_layout Standard
5307 To have several LyX processes with servers at the same time, you have to
5308 use different configurations, perhaps by using separate user directories,
5310 \begin_inset Flex Code
5313 \begin_layout Plain Layout
5319 file, for each process.
5322 \begin_layout Standard
5323 If you are developing a client program, you might find it useful to enable
5324 debugging information from the LyX server.
5325 Do this by starting LyX as
5326 \begin_inset Flex Code
5329 \begin_layout Plain Layout
5338 \begin_layout Standard
5339 You can find a complete example client written in C in the source distribution
5341 \begin_inset Flex Code
5344 \begin_layout Plain Layout
5345 development/lyxserver/server_monitor.c
5353 \begin_layout Standard
5354 Another useful tool is the command-line based clientfound in
5355 \begin_inset Flex Code
5358 \begin_layout Plain Layout
5359 src/client/lyxclient
5367 \begin_layout Section
5368 Normal communication
5371 \begin_layout Standard
5372 To issue a LyX call, the client writes a line of ASCII text into the input
5374 This line has the following format:
5391 \begin_layout Description
5392 clientname is a name that the client can choose arbitrarily.
5393 Its only use is that LyX will echo it if it sends an answer—so a client
5394 can dispatch results from different requesters.
5397 \begin_layout Description
5398 function is the function you want LyX to perform.
5399 It is the same as the commands you'd use in the minibuffer.
5402 \begin_layout Description
5403 argument is an optional argument which is meaningful only to some functions
5405 \begin_inset Quotes eld
5409 \begin_inset Quotes erd
5412 LFUN will insert the argument as text at the cursor position).
5415 \begin_layout Standard
5416 The answer from LyX will arrive in the output pipe and be of the form
5433 \begin_layout Standard
5442 are just echoed from the command request, while
5446 is more or less useful information filled according to how the command
5447 execution worked out.
5448 Some commands, such as
5449 \begin_inset Quotes eld
5453 \begin_inset Quotes erd
5456 , will return information about the internal state of LyX, while other will
5457 return an empty data-response.
5458 This means that the command execution went fine.
5461 \begin_layout Standard
5462 In case of errors, the response from LyX will have this form
5479 \begin_layout Standard
5484 should contain an explanation of why the command failed.
5487 \begin_layout Standard
5491 \begin_layout LyX-Code
5492 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5493 \begin_inset Newline newline
5496 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5497 \begin_inset Newline newline
5500 read a <~/.lyxpipe.out
5501 \begin_inset Newline newline
5507 \begin_layout Section
5511 \begin_layout Standard
5512 LyX can notify clients of events going on asynchronously.
5513 Currently it will only do this if the user binds a key sequence with the
5515 \begin_inset Quotes eld
5519 \begin_inset Quotes erd
5523 The format of the string LyX sends is as follows:
5527 \begin_inset Flex Code
5530 \begin_layout Plain Layout
5541 \begin_layout Standard
5546 is the printed representation of the key sequence that was actually typed
5550 \begin_layout Standard
5551 This mechanism can be used to extend LyX's command set and implement macros.
5552 Bind some key sequence to
5553 \begin_inset Quotes eld
5557 \begin_inset Quotes erd
5561 Then start a client that listens on the output pipe, dispatches the command
5562 according to the sequence, and starts a function that may use LyX calls
5563 and LyX requests to issue a command or a series of commands to LyX.
5566 \begin_layout Section
5567 The simple LyX Server Protocol
5570 \begin_layout Standard
5571 LyX implements a simple protocol that can be used for session management.
5572 All messages are of the form
5585 \begin_layout Standard
5591 \begin_inset Quotes eld
5595 \begin_inset Quotes erd
5599 \begin_inset Quotes eld
5603 \begin_inset Quotes erd
5608 \begin_inset Quotes eld
5612 \begin_inset Quotes erd
5615 is received from a client, LyX will report back to inform the client that
5616 it's listening to it's messages, while
5617 \begin_inset Quotes eld
5621 \begin_inset Quotes erd
5624 sent from LyX will inform clients that LyX is closing.
5627 \begin_layout Section
5628 Reverse DVI/PDF search
5631 \begin_layout Standard
5632 Some DVI/PDF viewers
5636 \begin_layout Plain Layout
5637 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5638 Skim on Mac OSX and SumatraPDF on Windows.
5647 facility (also called
5652 This means that you can tell LyX to put the cursor to a specific line in
5653 the document by clicking at the respective position in the DVI/PDF output.
5654 To achieve this, the viewer must be able to communicate with LyX.
5655 This is done via the LyX server either by using the named pipe (
5659 ), or the UNIX domain socket (
5663 ) that LyX creates in its temporary directory (this is the way the
5664 \begin_inset Flex Code
5667 \begin_layout Plain Layout
5673 program communicates with LyX).
5674 In some cases, you need a helper script that mediates between the viewer
5675 and LyX, in others, the viewer can communicate with LyX directly.
5676 This depends on the selected viewer and on your operating system.
5677 The same applies to the way viewers need to be configured and the way the
5678 reverse search is actually performed.
5679 In what follows, we will thus describe how to setup reverse search for
5681 Before we turn to this, though, we will explain what needs to be done generally
5682 to enable reverse search in the DVI/PDF output.
5685 \begin_layout Subsection
5687 \begin_inset CommandInset label
5689 name "sub:rev-search"
5696 \begin_layout Standard
5697 In most cases LyX will do the work for you by enabling the option
5698 \begin_inset Flex MenuItem
5701 \begin_layout Plain Layout
5702 Synchronize with Output
5708 \begin_inset Flex MenuItem
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings\SpecialChar \menuseparator
5720 In such a case LyX will automatically insert the necessary SyncTeX macro
5721 (for PDF) or load the srcltx package (for DVI) respectively.
5722 This option can be easily reached also on
5723 \begin_inset Flex Code
5726 \begin_layout Plain Layout
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737 from the drop down box just below
5738 \begin_inset Flex MenuItem
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5753 \begin_layout Standard
5754 Note that the method
5755 \begin_inset Flex Code
5758 \begin_layout Plain Layout
5766 enables gzip compression.
5767 If your viewer does not support it, you should instead use
5768 \begin_inset Flex Code
5771 \begin_layout Plain Layout
5782 \begin_layout Standard
5783 Please aöso note that including the
5784 \begin_inset Flex Code
5787 \begin_layout Plain Layout
5794 \begin_inset Flex Code
5797 \begin_layout Plain Layout
5803 sometimes has an undesired impact on the typesetting.
5804 Thus, you should switch output synchronization off for the final typesetting
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5816 \begin_inset Flex Code
5819 \begin_layout Plain Layout
5829 \begin_layout Standard
5830 In case you need some more special settings that are not covered by the
5831 automatic settings, read the next section about how to set up output synchroniz
5833 If the automatic setup suits your needs, you can readily jump to section
5834 \begin_inset space ~
5838 \begin_inset CommandInset ref
5840 reference "sub:configuring-viewers"
5844 , where the necessary configuration steps in your viewer -- needed both
5845 with the automatic and the manual setup -- are described.
5848 \begin_layout Subsection
5852 \begin_layout Standard
5853 LaTeX provides several different methods for reverse search.
5854 Some are built-in in the
5855 \begin_inset Flex Code
5858 \begin_layout Plain Layout
5864 program, some are provided by external packages.
5865 Your choice depends on whether your LaTeX distribution already provides
5866 a given method (the built-in methods are rather new) and whether your viewer
5868 The available methods are described in the following.
5871 \begin_layout Subsubsection*
5872 Built-in DVI-search via src-specials (DVI only)
5875 \begin_layout Standard
5876 This method provides the DVI file with the necessary information for reverse
5878 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5879 distribution should include it), and it works reliably.
5880 To enable it, change the
5881 \begin_inset Flex MenuItem
5884 \begin_layout Plain Layout
5889 \begin_layout Plain Layout
5902 \begin_inset Flex MenuItem
5905 \begin_layout Plain Layout
5910 \begin_layout Plain Layout
5917 eX (plain)->DraftDVI
5923 \begin_inset Flex MenuItem
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5935 \begin_inset Flex Code
5938 \begin_layout Plain Layout
5939 latex -src-specials $$i
5945 If this doesn't work, check if your TeX engine needs different options
5946 (the syntax might differ in some distributions).
5949 \begin_layout Subsubsection*
5950 External Packages (PDFSync and scrltx)
5953 \begin_layout Standard
5962 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5964 In order to enable it, load the packages in the LyX preamble:
5967 \begin_layout Itemize
5968 \begin_inset Flex Code
5971 \begin_layout Plain Layout
5979 for reverse PDF search,
5982 \begin_layout Itemize
5983 \begin_inset Flex Code
5986 \begin_layout Plain Layout
5989 usepackage[active]{srcltx}
5994 for reverse DVI search.
5997 \begin_layout Standard
5998 If you want to be able to perform both DVI and PDF reverse searches, you
5999 can also insert in the preamble the following lines
6002 \begin_layout LyX-Code
6006 \begin_inset Newline newline
6012 \begin_inset Newline newline
6018 \begin_inset Newline newline
6024 \begin_inset Newline newline
6029 usepackage[active]{srcltx}
6030 \begin_inset Newline newline
6038 \begin_layout Standard
6039 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6040 right package will be used.
6043 \begin_layout Standard
6044 Note that PDFSync might affect the output layout of your document.
6045 It is therefore advised to disable PDFsync for final documents.
6048 \begin_layout Subsubsection*
6049 Built-in reverse search via SyncTeX (DVI and PDF)
6052 \begin_layout Standard
6054 \begin_inset Flex Code
6057 \begin_layout Plain Layout
6063 have built-in support for both PDF and DVI reverse search.
6068 facility is basically the result of the integration of the PDFSync package
6069 to the pdftex program and its merge with the
6074 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6076 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6077 already provide SyncTeX support.
6080 \begin_layout Standard
6081 To enable SyncTeX for DVI output, change the
6082 \begin_inset Flex MenuItem
6085 \begin_layout Plain Layout
6090 \begin_layout Plain Layout
6103 \begin_inset Flex MenuItem
6106 \begin_layout Plain Layout
6111 \begin_layout Plain Layout
6118 eX (plain) -> DraftDVI
6124 \begin_inset Flex MenuItem
6127 \begin_layout Plain Layout
6128 Preferences\SpecialChar \menuseparator
6129 File Handling\SpecialChar \menuseparator
6136 \begin_inset Flex Code
6139 \begin_layout Plain Layout
6140 latex -synctex=1 $$i
6145 , and for PDF output, change the
6146 \begin_inset Flex MenuItem
6149 \begin_layout Plain Layout
6154 \begin_layout Plain Layout
6161 eX (pdflatex) -> PDF (pdflatex)
6167 \begin_inset Flex Code
6170 \begin_layout Plain Layout
6171 pdflatex -synctex=1 $$i
6177 Check the documentation of your viewer whether the viewer needs to be configure
6178 d for the use with SyncTeX.
6182 \begin_layout Plain Layout
6183 Note that the option
6184 \begin_inset Flex Code
6187 \begin_layout Plain Layout
6193 option enables gzip compression.
6194 If your viewer does not support it, you should instead use
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6212 \begin_layout Subsection
6213 Configuring and using specific viewers
6214 \begin_inset CommandInset label
6216 name "sub:configuring-viewers"
6223 \begin_layout Subsubsection*
6224 Xdvi (all platforms)
6227 \begin_layout Standard
6229 \begin_inset Flex Code
6232 \begin_layout Plain Layout
6238 , you don't need to do anything else for performing a reverse DVI search,
6239 as LyX already provides the necessary hooks for automatically using the
6241 \begin_inset Flex Code
6244 \begin_layout Plain Layout
6251 Just setup your document as described above (reverse search is triggered
6252 by Ctrl-click or Alt-click on Mac OSX, respectively).
6255 \begin_layout Standard
6256 However, if for whatever reason you want to use the named pipe instead of
6257 the socket for communicating with LyX, simply change the DVI viewer in
6259 \begin_inset Flex MenuItem
6262 \begin_layout Plain Layout
6263 Preferences\SpecialChar \menuseparator
6264 File Handling\SpecialChar \menuseparator
6274 \begin_layout Plain Layout
6275 On Mac OSX you have to use
6276 \begin_inset Flex Code
6279 \begin_layout Plain Layout
6280 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6291 \begin_inset Flex Code
6294 \begin_layout Plain Layout
6295 xdvi -editor 'lyxeditor.sh %f %l'
6301 \begin_inset Flex Code
6304 \begin_layout Plain Layout
6310 is a suitable script.
6311 For example, a minimal shell script is the following one:
6314 \begin_layout LyX-Code
6316 \begin_inset Newline newline
6319 LYXPIPE="/path/to/lyxpipe"
6320 \begin_inset Newline newline
6323 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6324 \begin_inset Newline newline
6327 echo "$COMMAND" > "${LYXPIPE}".in || exit
6328 \begin_inset Newline newline
6331 read < "${LYXPIPE}".out || exit
6334 \begin_layout Standard
6336 \begin_inset Flex Code
6339 \begin_layout Plain Layout
6349 \begin_layout Plain Layout
6356 XServer pipe path specified in
6357 \begin_inset Flex MenuItem
6360 \begin_layout Plain Layout
6361 Preferences\SpecialChar \menuseparator
6371 \begin_layout Plain Layout
6373 \begin_inset Flex Code
6376 \begin_layout Plain Layout
6382 folder of a source distribution you can find a
6383 \begin_inset Flex Code
6386 \begin_layout Plain Layout
6392 script which is able to locate the
6396 based on your preferences.
6404 \begin_layout Subsubsection*
6408 \begin_layout Standard
6410 \begin_inset Flex Code
6413 \begin_layout Plain Layout
6414 /Applications/MacDviX_Folder/calleditor.script
6419 , add the following lines:
6422 \begin_layout LyX-Code
6427 \begin_layout Plain Layout
6434 X.app/Contents/MacOS/lyxeditor "$2" $1
6435 \begin_inset Newline newline
6441 \begin_layout Standard
6442 Modify the lines accordingly if you install LyX somewhere else than in the
6443 Applications folder.
6446 \begin_layout Standard
6447 Reverse search is triggered by Alt-click (OPTION-click).
6450 \begin_layout Subsubsection*
6454 \begin_layout Standard
6456 \begin_inset Flex Code
6459 \begin_layout Plain Layout
6460 open -a Skim.app $$i
6465 to the viewer setting in
6466 \begin_inset Flex MenuItem
6469 \begin_layout Plain Layout
6470 Preferences\SpecialChar \menuseparator
6471 File Handling\SpecialChar \menuseparator
6472 File formats\SpecialChar \menuseparator
6479 \begin_inset Flex MenuItem
6482 \begin_layout Plain Layout
6483 Skim\SpecialChar \menuseparator
6484 Preferences\SpecialChar \menuseparator
6491 \begin_inset Flex MenuItem
6494 \begin_layout Plain Layout
6500 preset and enter command
6501 \begin_inset Flex MenuItem
6504 \begin_layout Plain Layout
6505 /Applications/LyX.app/Contents/MacOS/lyxeditor
6513 \begin_layout Standard
6514 Reverse search is triggered by COMMAND-SHIFT-click
6517 \begin_layout Subsubsection*
6521 \begin_layout Standard
6523 \begin_inset Flex MenuItem
6526 \begin_layout Plain Layout
6527 Settings\SpecialChar \menuseparator
6528 Configure Okular\SpecialChar \ldots{}
6529 \SpecialChar \menuseparator
6536 \begin_inset Quotes eld
6540 \begin_inset Quotes erd
6544 \begin_inset Flex Code
6547 \begin_layout Plain Layout
6556 \begin_layout Standard
6557 Reverse search is triggered by SHIFT-click.
6560 \begin_layout Subsubsection*
6564 \begin_layout Standard
6565 Launch yap, choose its
6566 \begin_inset Flex MenuItem
6569 \begin_layout Plain Layout
6570 View\SpecialChar \menuseparator
6577 \begin_inset Quotes eld
6581 \begin_inset Quotes erd
6586 \begin_inset Quotes eld
6589 New\SpecialChar \ldots{}
6591 \begin_inset Quotes erd
6594 button and, in the window that opens, enter
6595 \begin_inset Quotes eld
6599 \begin_inset Quotes erd
6602 (or any other name you like) in the
6603 \begin_inset Quotes eld
6607 \begin_inset Quotes erd
6611 Now click on the button labeled
6612 \begin_inset Quotes eld
6615 \SpecialChar \ldots{}
6617 \begin_inset Quotes erd
6620 to open a file dialog and navigate to the directory containing the batch
6622 \begin_inset Flex Code
6625 \begin_layout Plain Layout
6633 \begin_inset Flex Code
6636 \begin_layout Plain Layout
6642 and then specify the program arguments as
6643 \begin_inset Flex Code
6646 \begin_layout Plain Layout
6654 \begin_inset Flex Code
6657 \begin_layout Plain Layout
6663 wrapper is used for communicating with LyX through the
6670 \begin_layout LyX-Code
6672 \begin_inset Newline newline
6675 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6684 \begin_inset Newline newline
6698 \begin_layout Standard
6699 Make sure that the LyXServer pipe path you specified in LyX is
6700 \begin_inset Flex Code
6703 \begin_layout Plain Layout
6717 , otherwise change the
6718 \begin_inset Flex Code
6721 \begin_layout Plain Layout
6727 wrapper accordingly.
6730 \begin_layout Standard
6731 In yap, reverse search is triggered by double-click.
6734 \begin_layout Subsubsection*
6735 SumatraPDF (Windows)
6738 \begin_layout Standard
6739 In order to use SumatraPDF for inverse search, enter
6740 \begin_inset Flex Code
6743 \begin_layout Plain Layout
6744 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6749 in the viewer setting in
6750 \begin_inset Flex MenuItem
6753 \begin_layout Plain Layout
6754 Preferences\SpecialChar \menuseparator
6755 File Handling\SpecialChar \menuseparator
6756 File formats\SpecialChar \menuseparator
6763 \begin_inset Flex Code
6766 \begin_layout Plain Layout
6772 is the previous wrapper.
6773 If SumatraPDF.exe is not in your command PATH, use its full file name.
6776 \begin_layout Standard
6777 Reverse search is triggered by double-click.
6780 \begin_layout Subsubsection*
6784 \begin_layout Standard
6785 First of all, make sure that yap is your default DVI viewer in the Windows
6786 environment, then launch it, choose its
6787 \begin_inset Flex MenuItem
6790 \begin_layout Plain Layout
6791 View\SpecialChar \menuseparator
6798 \begin_inset Quotes eld
6802 \begin_inset Quotes erd
6807 \begin_inset Quotes eld
6810 New\SpecialChar \ldots{}
6812 \begin_inset Quotes erd
6815 button and, in the window that opens, enter
6816 \begin_inset Quotes eld
6820 \begin_inset Quotes erd
6823 (or any other name you like) in the
6824 \begin_inset Quotes eld
6828 \begin_inset Quotes erd
6832 Now click on the button labeled
6833 \begin_inset Quotes eld
6836 \SpecialChar \ldots{}
6838 \begin_inset Quotes erd
6841 to open a file dialog and navigate to the directory containing the
6842 \begin_inset Flex Code
6845 \begin_layout Plain Layout
6851 program (which is installed by default on Cygwin along with the LyX executable).
6853 \begin_inset Flex Code
6856 \begin_layout Plain Layout
6862 and then specify the program arguments as
6863 \begin_inset Flex Code
6866 \begin_layout Plain Layout
6873 In this way, you will be using the
6877 for communicating with LyX.
6878 If, for whatever reason, you want to use the
6883 \begin_inset Flex Code
6886 \begin_layout Plain Layout
6892 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6895 \begin_layout Standard
6896 In yap, reverse search is triggered by double-click.
6899 \begin_layout Subsubsection*
6903 \begin_layout Standard
6904 In order to use SumatraPDF for inverse search, enter
6905 \begin_inset Flex Code
6908 \begin_layout Plain Layout
6909 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6914 in the viewer setting in
6915 \begin_inset Flex MenuItem
6918 \begin_layout Plain Layout
6919 Preferences\SpecialChar \menuseparator
6920 File Handling\SpecialChar \menuseparator
6921 File formats\SpecialChar \menuseparator
6928 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6930 \begin_inset Flex Code
6933 \begin_layout Plain Layout
6939 enables communication via the
6945 \begin_inset Flex Code
6948 \begin_layout Plain Layout
6954 option if you want to use the
6958 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6961 \begin_layout Standard
6962 Reverse search is triggered by double-click.
6965 \begin_layout Section
6969 \begin_layout Standard
6970 Forward search is, as the name implies, in a sense the
6971 \begin_inset Quotes eld
6975 \begin_inset Quotes erd
6979 It allows you to let the viewer jump to a given position from within LyX.
6980 If forward search is set up (as described in what follows), you can put
6981 the cursor anywhere in your LyX document, and hit
6982 \begin_inset Flex MenuItem
6985 \begin_layout Plain Layout
6986 Navigate\SpecialChar \menuseparator
6993 \begin_inset Flex MenuItem
6996 \begin_layout Plain Layout
7002 in the context menu via right mouse click), and then the viewer will jump
7003 to that position as well.
7004 This implies, of course, that your viewer supports this function.
7007 \begin_layout Standard
7008 To make forward search possible, you first need to provide the generated
7009 output PDF/DVI file with additional information about the TeX sources.
7010 This can be done via the methods described in the section
7011 \begin_inset CommandInset ref
7013 reference "sub:rev-search"
7020 \begin_layout Standard
7021 Additionally, you need to configure LyX for using your viewers in
7022 \begin_inset Flex MenuItem
7025 \begin_layout Plain Layout
7026 Tools\SpecialChar \menuseparator
7027 Preferences\SpecialChar \menuseparator
7028 Output\SpecialChar \menuseparator
7035 We provide a range of tested configurations for some viewers, which you
7036 can select from the drop down list.
7037 If none of these configurations suits you, you have to find out and enter
7038 a suitable configuration yourself.
7039 The definition syntax uses the following placeholders:
7042 \begin_layout Itemize
7044 \begin_inset Flex Code
7047 \begin_layout Plain Layout
7056 \begin_layout Itemize
7058 \begin_inset Flex Code
7061 \begin_layout Plain Layout
7067 : name of the (temporary) exported .tex file (without path)
7070 \begin_layout Itemize
7072 \begin_inset Flex Code
7075 \begin_layout Plain Layout
7081 : name of the (temporary) exported .tex file (including path)
7084 \begin_layout Itemize
7086 \begin_inset Flex Code
7089 \begin_layout Plain Layout
7095 : name of the exported output file (either dvi or pdf, depending on which
7096 one exists in the temporary directory)
7099 \begin_layout Standard
7100 Note that only some of the viewers provide full forward search functionality,
7101 among them yap, xdvi, okular and Sumatra PDF.
7105 \begin_layout Plain Layout
7106 For Sumatra CMCDDE is needed --- downloadable from
7107 \begin_inset CommandInset href
7109 target "http://www.istri.fr/zip/CMCDDE.zip"
7118 While many of the widespread PDF viewers (most notably Adobe Reader) do
7119 not support forward search at all, some other viewers -- e.
7120 \begin_inset space \thinspace{}
7124 evince and xpdf -- allow at least to reload the document and jump to a
7125 specific page of the file, so you can at least navigate
7126 \begin_inset Quotes eld
7130 \begin_inset Quotes erd
7134 This latter functionality is provided by an external call of synctex (see
7135 the predefined example configurations).
7139 \begin_layout Standard
7140 Forward search works both with DVI and PDF output.
7141 LyX simply checks which preview format you have used before (i.
7142 \begin_inset space \thinspace{}
7145 e., which format is already there in the temporary directory) and chooses
7146 the appropriate configuration for the respective format.
7149 \begin_layout Chapter
7150 Special Document Classes
7153 \begin_layout Section
7157 \begin_layout Standard
7163 \begin_layout Subsection
7167 \begin_layout Standard
7168 This section describes how LyX can be used to write articles for submission
7169 to the scientific journal
7171 Astronomy and Astrophysics
7173 (www.edpsciences.fr/aa/
7174 \begin_inset Flex URL
7177 \begin_layout Plain Layout
7179 http://www.edpsciences.fr/aa/
7184 ) using Version 5.01 of the document class
7189 This package can be downloaded from the ftp site
7192 \begin_layout Standard
7193 \begin_inset VSpace medskip
7199 \begin_layout Standard
7201 \begin_inset Flex URL
7204 \begin_layout Plain Layout
7206 ftp://ftp.edpsciences.org/pub/aa/readme.html
7214 \begin_layout Standard
7215 \begin_inset VSpace medskip
7221 \begin_layout Standard
7222 A manual comes together with that package, and this text is not meant to
7223 replace the original manual but is merely a short guide in how to realize
7224 the correct form of your paper.
7228 \begin_layout Standard
7229 Please note that the publisher of the journal was changed from Springer
7230 to EDP Sciences starting January 1, 2001.
7231 That change involved also some slight changes to the style files, namely
7232 the removal of the thesaurus command.
7233 The LyX class aa supports the newest version of these style files, V 5.01.
7234 If you have an older version installed, please upgrade.
7235 For compatibility, the old (version 4) layout has been kept as
7240 Please refer to the comments in
7242 LyXDir/layouts/aapaper.layout
7247 \begin_layout Subsection
7251 \begin_layout Standard
7252 It is recommended you start from the example template distributed with LyX.
7253 If you are not using a template, note the following settings:
7256 \begin_layout Itemize
7263 Document\SpecialChar \menuseparator
7266 dialog (OK, that one was obvious).
7269 \begin_layout Itemize
7270 Don't change the option
7273 \begin_inset space ~
7283 The whole layout is done by the macros, you shouldn't change anything.
7286 \begin_layout Subsection
7290 \begin_layout Standard
7291 First thing to enter is the header information.
7292 It consists of seven entries, of which some are optional.
7296 \begin_layout Itemize
7304 \begin_layout Itemize
7312 \begin_layout Itemize
7320 \begin_layout Itemize
7328 \begin_layout Itemize
7333 : [optional] if more than one author: whom to contact for offprint requests.
7336 \begin_layout Itemize
7341 : [optional] mail address for contacts.
7344 \begin_layout Itemize
7352 Received: <date>; Accepted <date>
7355 \begin_layout Standard
7356 There is no need to issue the
7362 command, this is done automatically by LyX when the header is finished.
7363 Although the order of the single header entries doesn't matter it is advised
7364 to keep the above sequence, just to get the best optics and meets the layout
7365 of the real document.
7368 \begin_layout Standard
7369 If you want to place footnotes in the header block, e.
7370 \begin_inset space \thinspace{}
7374 \begin_inset space \space{}
7377 to state your present address, just use the standard footnote via the menu
7380 Insert\SpecialChar \menuseparator
7384 LyX will automagically use the term
7393 \begin_layout Standard
7394 In addition to these topics, the macros use three additional LaTeX commands
7395 that have no counterpart in LyX:
7398 \begin_layout Itemize
7405 to separate different names for more than one author and institute, respectivel
7409 \begin_layout Itemize
7416 to mark corresponding author/institute pairs.
7417 The institutes are numbered sequentially as they appear in the
7421 field, so you have to put a marker to each author.
7424 \begin_layout Itemize
7431 to supply an email address for fast contact.
7434 \begin_layout Standard
7435 In all cases, the appropriate command has to be entered in LyX and marked
7441 \begin_layout Subsection
7445 \begin_layout Standard
7446 The abstract should immediately follow the header block.
7447 With version 5 the abstract environment was changed to a command, and there
7448 is now a resctriction to only one paragraph.
7449 In addition, it should contain an entry with the keywords.
7450 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7457 by hand and mark it as LaTeX code.
7458 Refer to the example paper.
7461 \begin_layout Subsection
7462 Supported environments
7465 \begin_layout Standard
7466 The A&A paper layout supports the following environments for structuring
7470 \begin_layout Itemize
7476 \begin_layout Itemize
7482 \begin_layout Itemize
7488 \begin_layout Itemize
7494 \begin_layout Itemize
7500 \begin_layout Itemize
7506 \begin_layout Itemize
7512 \begin_layout Itemize
7518 \begin_layout Itemize
7524 \begin_layout Itemize
7530 \begin_layout Itemize
7536 \begin_layout Itemize
7542 \begin_layout Subsection
7543 Commands not supported by LyX
7546 \begin_layout Standard
7547 Some commands are not yet supported by the
7552 Some have already been mentioned.
7553 For the sake of completeness, they are listed all together here:
7556 \begin_layout Itemize
7564 \begin_layout Itemize
7572 \begin_layout Itemize
7580 \begin_layout Itemize
7588 \begin_layout Itemize
7596 \begin_layout Itemize
7604 \begin_layout Itemize
7612 \begin_layout Itemize
7620 \begin_layout Standard
7621 If you want to use any of these commands, you have to enter them yourself.
7624 Do not forget to mark them as LaTeX code!
7627 \begin_layout Subsection
7628 Figure and Table Floats
7631 \begin_layout Standard
7632 LyX provides support for the necessary float environments
7634 figure, figure*, table
7640 , therefore we won't tell much about it here.
7644 \begin_inset space ~
7650 Just remember that tables should be left-aligned.
7651 For that, select the table and change the alignment in
7653 Edit\SpecialChar \menuseparator
7655 \begin_inset space ~
7661 \begin_layout Standard
7662 There is only one special thing: the figures with caption besides the figure.
7663 To create such a figure, you have to do the following:
7666 \begin_layout Enumerate
7667 Create a wide figure float:
7669 Insert\SpecialChar \menuseparator
7670 Float\SpecialChar \menuseparator
7673 , then right click in the figure and select
7679 \begin_inset space ~
7687 \begin_layout Enumerate
7688 Enter your caption text.
7691 \begin_layout Enumerate
7696 to move the cursor above the caption.
7699 \begin_layout Enumerate
7703 \begin_layout Enumerate
7704 Position the cursor behind the figure and insert a horizontal fill:
7706 Insert\SpecialChar \menuseparator
7708 \begin_inset space ~
7711 Character\SpecialChar \menuseparator
7713 \begin_inset space ~
7721 \begin_layout Enumerate
7722 Switch to LaTeX mode:
7725 \begin_inset space ~
7733 \begin_layout Enumerate
7743 Do not close the brace!
7746 \begin_layout Enumerate
7747 Position the cursor behind the caption text, switch to LaTeX mode and insert
7751 \begin_inset space ~
7763 \begin_layout Standard
7764 Also, refer to the figures in the example paper.
7767 \begin_layout Subsection
7771 \begin_layout Standard
7772 For submission, the paper has to be formated in a special double-spacing
7774 For this purpose, you have to give the option
7778 to the documentclass.
7779 This must be done using the extra class options field in the
7781 Document\SpecialChar \menuseparator
7785 Just enter the string
7792 \begin_layout Subsection
7796 \begin_layout Standard
7801 directory contains an example paper written with LyX.
7802 It is the example paper from the original macro package, translated to
7804 Use it for inspiration, and compare the original LaTeX code with LyX way
7808 \begin_layout Section
7812 \begin_layout Standard
7818 \begin_layout Subsection
7822 \begin_layout Standard
7823 AASTeX is a set of macros produced by the American Astronomical Society
7824 to facilitate electronic manuscript submission to the three journals they
7825 publish: the Astrophysical Journal (including the Letters and Supplement),
7826 the Astronomical Journal, and the Publications of the Astronomical Society
7828 LyX has proven to be an excellent tool for generating these documents,
7829 especially given its equation, citation, and figure handling capabilities.
7830 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7831 is the version described here, or higher.
7832 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7833 incompatible with LyX.
7834 The AASTeX package may be downloaded from the AASTeX Web site
7837 \begin_layout Standard
7838 \begin_inset VSpace medskip
7844 \begin_layout Standard
7846 \begin_inset Flex URL
7849 \begin_layout Plain Layout
7851 http://www.journals.uchicago.edu/AAS/AASTeX
7859 \begin_layout Standard
7860 \begin_inset VSpace medskip
7866 \begin_layout Standard
7867 A complete user guide is contained in that package and you should familiarize
7868 yourself with it thoroughly before embarking on writing a paper in LyX.
7869 LyX will not reduce the need to figure out all the AASTeX commands, it
7870 will only reduce the drudgery of typing everything in.
7871 It is your responsibility to ensure that the final exported LaTeX document
7872 conforms completely to the requirements of the journal to which you are
7873 submitting your paper.
7876 \begin_layout Subsection
7877 Starting a New Paper
7880 \begin_layout Standard
7881 I strongly suggest that you start with the AASTeX template file.
7884 File\SpecialChar \menuseparator
7891 , enter the new file name, then choose the
7896 This will show the most common fields found in a manuscript.
7897 Simply overwrite the existing text (including the brackets,
7901 ) with the correct information.
7902 Many of the AASTeX commands and environments can be implemented directly
7903 in LyX, but some cannot: most noticeably
7915 , which should stick out like a sore thumb if you actually just opened the
7917 For commands such as these, the LaTeX code must be entered directly and
7919 Such commands are referred to as TeX code, or Evil Red Text.
7920 I tried to minimize the amount of TeX code needed in an AASTeX document,
7921 but there is still a bit more required than any of us would like.
7924 \begin_layout Subsection
7925 Finishing Your Paper
7928 \begin_layout Standard
7929 When the paper is finished to your satisfaction and previews/prints correctly,
7931 \begin_inset Quotes eld
7935 \begin_inset Quotes erd
7938 actions which need to be done before you submit it to the journals.
7942 \begin_layout Enumerate
7943 Export your paper as a LaTeX file (
7945 File\SpecialChar \menuseparator
7946 Export\SpecialChar \menuseparator
7953 \begin_layout Enumerate
7958 file with your favorite text editor
7962 \begin_layout Enumerate
7963 remove the comment lines before the
7972 \begin_layout Enumerate
7977 usepackage...{fontenc}
7979 line if it appears (usually just after
7994 \begin_layout Enumerate
7995 remove everything between (and including) the
8007 commands, except for any commands you specifically put into the LaTeX preamble
8008 (which should appear immediately after the
8009 \begin_inset Quotes eld
8012 User specified LaTeX commands
8013 \begin_inset Quotes erd
8024 \begin_layout Enumerate
8025 Run the resulting file through LaTeX to make sure it still processes correctly.
8028 \begin_layout Enumerate
8029 Reread the journal requirements to make sure your filenames and formats
8033 \begin_layout Enumerate
8037 \begin_layout Subsection
8038 Comments On Specific Commands
8041 \begin_layout Standard
8042 I will not describe the detailed usage of the individual AASTeX commands:
8043 the AASTeX User Guide (
8047 ) gives a good description of each.
8048 Thus it's probably easiest for me to go down the list as found in the guide
8049 and offer comments where necessary.
8050 So let's begin \SpecialChar \ldots{}
8054 \begin_layout Subsubsection
8055 Things that work as expected
8058 \begin_layout Standard
8059 Because they work as you might expect, I simply list them and the section
8160 begin{thebibliography}
8168 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8169 graphicx figure commands (2.14.1),
8193 (2.15.4, amongst other places),
8220 \begin_layout Standard
8221 The following style options also work correctly:
8242 Simply put them in the
8248 Layout\SpecialChar \menuseparator
8254 \begin_layout Subsubsection
8255 Things that work, but require more comment
8258 \begin_layout Standard
8259 The following items work, but require a little more discussion:
8262 \begin_layout Itemize
8263 These items are reserved for use by the journal editors, but you can put
8264 them into the LaTeX preamble if you feel compelled to do so:
8297 \begin_layout Itemize
8298 These items may be placed in the LaTeX preamble, and are included as blanks
8299 in the template file:
8320 \begin_layout Itemize
8327 (2.3) – can only be used
8328 \begin_inset Quotes eld
8332 \begin_inset Quotes erd
8335 , not in the middle of a paragraph.
8336 Use TeX code if you need to embed it.
8339 \begin_layout Itemize
8346 (2.3) – will have extra {} after it.
8347 This should not cause an error.
8350 \begin_layout Itemize
8357 (2.6) – can only be used
8358 \begin_inset Quotes eld
8362 \begin_inset Quotes erd
8365 , not in the middle of a paragraph.
8366 Use TeX code if you need to embed it.
8369 \begin_layout Itemize
8376 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8380 \begin_layout Itemize
8394 \begin_layout Itemize
8401 (2.9) – will have extra {} after it.
8402 This should not cause an error.
8405 \begin_layout Itemize
8412 (2.11) – will have extra {} after it.
8413 This should not cause an error.
8416 \begin_layout Itemize
8423 (2.14.2) – you can insert an optional filename argument by placing the cursor
8424 at the beginning of the text and selecting
8426 Insert\SpecialChar \menuseparator
8431 \begin_inset Quotes eld
8435 \begin_inset Quotes erd
8438 inserts an optional argument of the type needed by
8445 Hopefully it will be renamed someday.
8448 \begin_layout Itemize
8461 for the catalog ID optional parameter
8464 \begin_layout Itemize
8477 for the catalog ID optional parameter
8480 \begin_layout Subsubsection
8481 Things not implemented, use TeX code
8484 \begin_layout Standard
8507 setcounter{equation}
8509 (2.12), Journal name abbreviations (2.13.4),
8545 (2.15.4, insert it as the first element in the lefthand cell after where
8547 Don't use any of LyX's rules in the table),
8559 (2.15.5), much of Misc (2.17, except
8610 \begin_layout Subsubsection
8611 Things that cannot be implemented
8614 \begin_layout Standard
8615 \SpecialChar \ldots{}
8616 at least in any meaningful sort of way, so I suggest ignoring them.
8617 They are the references environment (2.13.3), and the deluxetable environment
8619 If you really, really need to use deluxetable, I suggest editing it in
8620 a separate file with a text editor, then using
8622 Insert\SpecialChar \menuseparator
8624 \begin_inset space ~
8629 to include it in your LyX document.
8634 file to see an example of this.
8637 \begin_layout Subsection
8638 FAQs, Tips, Tricks, and Other Ruminations
8641 \begin_layout Subsubsection
8642 Getting LyX and AASTeX to cooperate
8645 \begin_layout Standard
8646 It can be a bit tricky to get LyX to recognize a new layout and document
8648 When all else fails, do this:
8651 \begin_layout Enumerate
8652 Make certain that LaTeX can find AASTeX.
8653 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8654 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8661 \begin_layout Enumerate
8673 \begin_layout Enumerate
8676 Tools\SpecialChar \menuseparator
8679 in LyX, then restart LyX.
8682 \begin_layout Enumerate
8683 Open a regular new file, not from a template.
8684 Does AASTeX appear in the class list in
8686 Document\SpecialChar \menuseparator
8692 \begin_layout Standard
8693 If you get a warning from an existing AASTeX document about not being able
8694 to find the AASTeX layout or a message about
8695 \begin_inset Quotes eld
8698 You should not mix title layouts with normal ones
8699 \begin_inset Quotes erd
8702 , things haven't been installed correctly.
8705 \begin_layout Subsubsection
8706 LaTeX error processing a table
8709 \begin_layout Standard
8710 LyX, by default, attempts to center the table caption/title.
8711 This seems to produce a bad interaction in AASTeX so you should click somewhere
8712 in the caption/title, then select
8714 Edit\SpecialChar \menuseparator
8716 \begin_inset space ~
8730 This took care of it for me.
8733 \begin_layout Subsubsection
8737 \begin_layout Standard
8738 A couple of things: 1) I have noticed some funny spacing in the reference
8739 entries in the text.
8740 When you enter the bibliography item data, make sure their is
8744 space between the last author and the parenthesis setting off the year;
8748 \begin_inset space \thinspace{}
8752 \begin_inset space \space{}
8766 2) Entering the references at all is not obvious.
8767 The easiest thing is to start typing your first reference at the end of
8768 the document, then mark it as type
8773 That will put a small gray box in front of what you just typed.
8774 Click on the box to fill in the rest of the information.
8775 For new references, go to the end of an existing reference and press return.
8776 That will create a new line with its own box, etc.
8779 \begin_layout Subsubsection
8783 \begin_layout Standard
8784 Even though AASTeX provides its own figure commands (
8790 , for example), I much prefer LaTeX's standard figure commands (with the
8799 \begin_inset space ~
8802 commands as TeX code into a Figure Float box if you desire, but I never
8803 have much luck getting the layout right.
8804 With the standard graphics, LyX will insert a
8808 usepackage{graphicx}
8810 command into the LaTeX preamble and handle the figures in the standard
8811 LaTeX2e way, interspersing the figures in the text.
8812 I believe ApJ accepts figures exactly this way now; AJ might still use
8814 \begin_inset Quotes eld
8817 stack everything at the end
8818 \begin_inset Quotes erd
8824 \begin_layout Subsubsection
8825 Things I could have done, but didn't
8828 \begin_layout Standard
8830 \begin_inset Quotes eld
8834 \begin_inset Quotes erd
8837 things I could have implemented, but chose not to.
8838 For instance, I saw no point in double-spacing the text in the LyX window,
8839 even though it is double-spaced in the paper manuscript.
8840 Also, I chose not to make separate layouts for the preprint and preprint2
8842 Since I assume you will spend most of your time in the plain manuscript
8843 mode anyway, I decided not to chew up more disk space with this.
8847 \begin_layout Subsection
8851 \begin_layout Standard
8852 Your mileage may vary.
8853 I've now had papers published by both ApJ and AJ that have had 98% of the
8854 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8856 I have had no trouble with the submission process, and I'm sure the journals
8857 were never aware that there might be a difference.
8858 So, go forth and publish!
8861 \begin_layout Section
8865 \begin_layout Standard
8875 \begin_layout Standard
8876 \begin_inset VSpace bigskip
8882 \begin_layout Standard
8884 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8885 papers to be submitted to American Mathematical Society publications.
8886 The layouts are not tailored to a specific journal, but easily can be.
8887 You should refer to the AMS documentation for specific instructions for
8888 each journal (usually it will entail only changing a single line in the
8890 That documentation is available on the Web at
8891 \begin_inset Flex URL
8894 \begin_layout Plain Layout
8902 \begin_inset Flex URL
8905 \begin_layout Plain Layout
8907 ftp://ftp.ams.org/pub/tex/amslatex/
8913 These layouts are appropriate, and useful, for any mathematical writing.
8917 \begin_layout Standard
8918 There are two basic AMS LaTeX layouts:
8921 \begin_layout Itemize
8922 amsart: The standard AMS article format.
8925 \begin_layout Itemize
8926 amsbook: the standard AMS book (really, monograph) format.
8930 \begin_layout Standard
8931 The layouts themselves contain only the minimum necessary to use the AMS
8933 They do not, in particular, contain any of the `theorem' environments used
8934 for setting theorems, lemmas, and the like.
8935 These are contained, instead, in the
8936 \begin_inset Flex Code
8939 \begin_layout Plain Layout
8945 module, which is loaded by default when you select one of the AMS classes.
8946 (It can also be used with other classes and can be removed, if you would
8947 rather use something else.) Less commonly used environments are in the
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8952 Theorems (AMS-Extended)
8957 module, which must be loaded manually.
8960 \begin_layout Standard
8961 By default, theorems and the like are numbered consecutively throughout
8962 the document, but this may be modified by loading the module
8963 \begin_inset Flex Code
8966 \begin_layout Plain Layout
8967 Theorems (Order by Section)
8972 or, if you are using
8973 \begin_inset Flex Code
8976 \begin_layout Plain Layout
8983 \begin_inset Flex Code
8986 \begin_layout Plain Layout
8987 Theorems (Order by Chapter)
8993 These will number the results as
8994 \begin_inset Formula $n.m$
8997 , where the first number refers to the section (or chapter) and the second
8998 refers to the total number of results so far in that section (or chapter).
8999 Many environments are also available unnumbered.
9000 These are indicated by an asterisk at the end.
9001 If you happen to want
9005 unnumbered results, the module
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 provides that option.
9018 \begin_layout Standard
9019 Note that these modules do not
9023 to be used with the AMS classes.
9024 It is perfectly possible to use the
9025 \begin_inset Flex Code
9028 \begin_layout Plain Layout
9034 module, and the others mentioned, with other classes, such as
9035 \begin_inset Flex Code
9038 \begin_layout Plain Layout
9045 \begin_inset Flex Code
9048 \begin_layout Plain Layout
9055 \begin_inset Flex Code
9058 \begin_layout Plain Layout
9067 \begin_layout Subsection
9068 What these layouts provide
9071 \begin_layout Standard
9072 There is a long list of included environments provided by these layouts.
9073 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9074 variety of `theorem' environments.
9075 However, the AMS recommends the environments that are available in LyX.
9079 \begin_layout Standard
9080 The following environments—as well as the standard environments, such as
9082 \begin_inset Flex Noun
9085 \begin_layout Plain Layout
9092 \begin_inset Flex Noun
9095 \begin_layout Plain Layout
9102 \begin_inset Flex Noun
9105 \begin_layout Plain Layout
9112 \begin_inset Flex Noun
9115 \begin_layout Plain Layout
9122 \begin_inset Flex Noun
9125 \begin_layout Plain Layout
9132 \begin_inset Flex Code
9135 \begin_layout Plain Layout
9142 \begin_inset Flex Code
9145 \begin_layout Plain Layout
9154 \begin_layout Description
9155 Address This should be the author's permanent address.
9158 \begin_layout Description
9160 \begin_inset space ~
9163 Address This should be the author's temporary address at the time of submission,
9164 if different from the Address.
9167 \begin_layout Description
9168 Email Author's e-mail address
9171 \begin_layout Description
9172 URL Author's Web address, if desired.
9175 \begin_layout Description
9176 Keywords Key words or phrases used to identify specific topics discussed
9180 \begin_layout Description
9181 Subjectclass These refer to the AMS Subject Classifications, published and
9184 Mathematical Reviews
9187 These are also available online at the AMS cites listed above.
9190 \begin_layout Description
9194 \begin_layout Description
9198 \begin_layout Description
9202 \begin_layout Standard
9203 The following environments are provided by both the
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9214 \begin_inset Flex Code
9217 \begin_layout Plain Layout
9223 modules, in the latter case in both starred (unnumbered) and unstarred
9224 (numbered) versions.
9225 These same environments are provided only in the starred versions by the
9227 \begin_inset Flex Code
9230 \begin_layout Plain Layout
9239 \begin_layout Theorem
9240 This is typically used for the statements of major results.
9244 \begin_layout Corollary*
9245 This is used for statements which follow fairly directly from previous statement
9247 Again, these can be major results.
9252 These are smaller results needed to prove other statements.
9255 \begin_layout Proposition
9256 These are less major results which (hopefully) add to the general theory
9260 \begin_layout Conjecture
9261 These are statements provided without justification, which the author does
9262 not know how to prove, but which seem to be true (to the author, at least).
9265 \begin_layout Definition*
9266 Guess what this is for.
9267 The font is different for this environment than for the previous ones.
9271 \begin_layout Example*
9272 Used for examples illustrating proven results.
9275 \begin_layout Problem
9276 It's not really known what this is for.
9277 You should figure it out.
9280 \begin_layout Exercise*
9281 Write a description for this one.
9284 \begin_layout Remark
9285 This environment is also a type of theorem, usually a lesser sort of observation.
9288 \begin_layout Claim*
9289 Often used in the course of giving a proof of a larger result.
9293 Generally, these are used to break up long arguments, using specific instances
9299 The numbering scheme for cases is on its own, not together with other numbered
9305 At the end of this environment, a QED symbol (usually a square, but it can
9306 vary with different styles) is placed.
9307 If you want to have other environments within this one—for example, Case
9308 environments—and have the QED symbol appear only after them, then the other
9309 environments need to be nested within the proof environment.
9312 Nesting Environments
9318 for information on nesting.
9321 \begin_layout Standard
9322 And these environments are provided by
9323 \begin_inset Flex Code
9326 \begin_layout Plain Layout
9327 Theorems (AMS-Extended)
9335 \begin_layout Criterion*
9336 A required condition.
9339 \begin_layout Algorithm*
9340 A general procedure to be used.
9343 \begin_layout Axiom*
9344 This is a property or statement taken as true within the system being discussed.
9347 \begin_layout Condition*
9348 Sometimes used to state a condition assumed within the present context of
9353 Similar to a Remark.
9356 \begin_layout Notation*
9357 Used for the explanation of, yes, notation.
9360 \begin_layout Summary
9361 Do we really need to tell you?
9364 \begin_layout Acknowledgement*
9368 \begin_layout Conclusion*
9369 Sometimes used at the end of a long train of argument.
9373 Used in a way similar to Proposition, though perhaps lower on the scale.
9376 \begin_layout Standard
9377 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9379 They need to be available on your system in order to use these environments.
9382 \begin_layout Section
9390 \begin_layout Standard
9396 \begin_layout Subsection
9400 \begin_layout Standard
9401 These are the layout files for some of the journals of the American Geophysical
9403 It is assumed that you have both the AGU's own class files and AGUplus
9404 installed (everything to be found at
9405 \begin_inset Flex URL
9408 \begin_layout Plain Layout
9410 ftp://ftp.agu.org/journals/latex/journals
9418 \begin_layout Subsection
9422 \begin_layout Standard
9432 They are still called this in the LyX GUI, though their LaTeX equivalents
9433 in the AGU classes are
9444 \begin_layout Standard
9445 Newly defined styles are
9482 These are mostly manuscript attributes and defined in the AGU class documentati
9486 \begin_layout Standard
9487 I suspect this is still badly incomplete.
9490 \begin_layout Subsection
9494 \begin_layout Standard
9511 \begin_layout Subsection
9515 \begin_layout Itemize
9518 Journal of Geophysical Research
9527 \begin_layout Standard
9528 Add your own, it isn't so hard! Look at the
9539 \begin_layout Subsection
9540 Bugs and things to remember
9543 \begin_layout Standard
9544 In order to use the new layouts, you must remember to do the following for
9548 \begin_layout Enumerate
9554 This can be done in the
9556 Layout\SpecialChar \menuseparator
9561 Document\SpecialChar \menuseparator
9565 (AGU articles are always in English, right? So
9572 \begin_layout Enumerate
9582 (Yes, this is a bug.)
9585 \begin_layout Enumerate
9586 Make sure you use the
9590 bibliography style, by entering
9594 into the second field of the BibTeX inset.
9595 None of the standard styles will do.
9598 \begin_layout Section
9602 \begin_layout Standard
9608 \begin_layout Subsection
9612 \begin_layout Standard
9613 Broadway is for writing plays.
9614 The format is more decorative than Hollywood, and much less standardized.
9615 This format should be suitable for workshops.
9618 \begin_layout Subsection
9622 \begin_layout Standard
9623 The same as in Hollywood.
9626 \begin_layout Subsection
9630 \begin_layout Standard
9635 names as labels then cross-reference the label to insert the name.
9636 The cross-reference dialog will show the current cast of characters.
9639 \begin_layout Subsection
9640 Paper size and Margins
9643 \begin_layout Standard
9644 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9647 \begin_layout Subsection
9651 \begin_layout Standard
9652 The following environments are available.
9653 You can use broadway.bind to get the bind keys shown at the right.
9656 \begin_layout Itemize
9660 \begin_inset Newline newline
9665 You should not have to use this, but it is here for anything that does not
9669 \begin_layout Itemize
9673 \begin_inset space \hfill{}
9677 \begin_inset Newline newline
9682 Used to describe stage setting and the action.
9683 First use of speaker names in all CAPs.
9686 \begin_layout Itemize
9690 \begin_inset space \hfill{}
9694 \begin_inset Newline newline
9699 Automatically numbered.
9700 On screen it will be arabic, but will print as Roman.
9703 \begin_layout Itemize
9707 \begin_inset space \hfill{}
9711 \begin_inset Newline newline
9721 It is just centered text.
9724 \begin_layout Itemize
9728 \begin_inset space \hfill{}
9732 \begin_inset Newline newline
9737 Not automatically numbered.
9738 You supply the number.
9739 This is because I couldn't figure out how.
9742 \begin_layout Itemize
9746 \begin_inset space \hfill{}
9750 \begin_inset Newline newline
9755 A special case of Narrative to describe the setting and action as the curtain
9759 \begin_layout Itemize
9763 \begin_inset space \hfill{}
9767 \begin_inset Newline newline
9772 The speaker's (actor's) title, centered in all CAPS.
9775 \begin_layout Itemize
9779 \begin_inset space \hfill{}
9783 \begin_inset Newline newline
9788 Instructions to the speaker.
9789 The parentheses are automatically inserted.
9790 The ( will appear on screen, but both will be in the printed play.
9791 This environment is only used within
9798 \begin_layout Itemize
9802 \begin_inset space \hfill{}
9806 \begin_inset Newline newline
9811 What the Speaker says.
9814 \begin_layout Itemize
9818 \begin_inset space \hfill{}
9822 \begin_inset Newline newline
9827 The curtain comes down.
9830 \begin_layout Itemize
9834 \begin_inset space \hfill{}
9840 \begin_layout Itemize
9844 \begin_inset space \hfill{}
9850 \begin_layout Itemize
9854 \begin_inset space \hfill{}
9860 \begin_layout Standard
9864 \begin_layout Section
9868 \begin_layout Standard
9873 can be used to type letters according to German conventions.
9874 A template file is included in
9876 .../lyx/share/templates
9878 for you to use as a starting point.
9881 \begin_layout Section
9889 \begin_layout Standard
9895 \begin_layout Subsection
9899 \begin_layout Standard
9900 This is the layout file for the European Geophysical Society journals.
9905 can be downloaded from the web site of the EGS under
9906 \begin_inset Flex URL
9909 \begin_layout Plain Layout
9919 \begin_layout Subsection
9923 \begin_layout Standard
9926 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9934 The current layout file is unfortunately very unmodular and would benefit
9935 from using the various
9942 \begin_layout Section
9946 \begin_layout Standard
9947 See the LyX template file
9952 It contains all infos you need.
9955 \begin_layout Section
9961 \begin_inset CommandInset label
9970 \begin_layout Standard
9976 \begin_layout Subsection
9980 \begin_layout Standard
9981 This section describes how to use LyX to make slides for overhead projectors.
9982 There are two document classes that can do this: the default slides class
9988 This section documents the latter.
9991 \begin_layout Standard
9992 I'm going to say this again, nice and clear, so that there's no misunderstanding
9996 \begin_layout Standard
9997 \begin_inset VSpace bigskip
10003 \begin_layout Standard
10007 This section documents the class
10008 \begin_inset Quotes eld
10016 \begin_inset Quotes erd
10024 \begin_layout Standard
10025 \begin_inset VSpace bigskip
10031 \begin_layout Standard
10032 If you're looking for the documentation for
10033 \begin_inset Quotes eld
10041 \begin_inset Quotes erd
10044 , check out section
10045 \begin_inset space ~
10049 \begin_inset CommandInset ref
10051 reference "sec:slitex"
10056 If your machine doesn't have the
10061 \begin_inset Quotes eld
10069 \begin_inset Quotes erd
10072 ] installed, you'll probably have to use the default
10076 class, which isn't quite as good as
10081 \begin_layout Standard
10086 class is designed for use with version 2.1 of the
10090 LaTeX class file which is now an integral part of LaTeX2e.
10093 \begin_layout Subsection
10097 \begin_layout Standard
10098 Obviously, to use this document class, you need to select
10099 \begin_inset Quotes eld
10107 \begin_inset Quotes erd
10117 \begin_inset space ~
10123 There are some settings in the
10126 \begin_inset space ~
10131 dialog that you should know about that are specific to this class:
10134 \begin_layout Itemize
10135 Don't change the options
10146 \begin_inset space ~
10152 They're ignored by the
10159 \begin_layout Itemize
10160 The default font size is 20
10161 \begin_inset space \thinspace{}
10164 pt with the other options being 17
10165 \begin_inset space \thinspace{}
10169 \begin_inset space \thinspace{}
10173 \begin_inset space \thinspace{}
10179 \begin_layout Itemize
10180 The default font is
10188 but all math equations are still typeset in the usual roman font.
10191 \begin_layout Itemize
10196 supports A4 and Letter paper sizes as well as a special size for working
10198 \begin_inset space \thinspace{}
10202 It doesn't support A5, B5, legal or executive paper sizes.
10205 \begin_layout Itemize
10206 Don't bother changing the
10210 settings because they are ignored anyway.
10211 All floats appear where they are defined in the text.
10214 \begin_layout Itemize
10219 setting behaves a bit differently for this class.
10224 provides extensive footer and header capabilities including a user-defined
10227 \begin_inset space ~
10231 \begin_inset CommandInset ref
10233 reference "sec:foilfoot"
10238 The title page is treated differently to all other pages in the document
10247 has the logo centered at the bottom of the page (if one is defined).
10248 The possible page style choices and what they do are as follows:
10252 \begin_layout Labeling
10253 \labelwidthstring MMMMMMM
10260 The final output contains no page numbers, or other headers or footers
10261 (except footnotes of course).
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10273 The final output contains page numbers centered at the bottom of the page.
10274 No other headings or footers (other than footnotes).
10277 \begin_layout Labeling
10278 \labelwidthstring MMMMMMM
10283 Page numbers in lower right corner.
10284 Additional headers and footers are also shown.
10285 This is also the default.
10288 \begin_layout Labeling
10289 \labelwidthstring MMMMMMM
10294 Gives you access to the
10298 package although its use with
10302 is discouraged by the writer of the
10306 package because of some potential page layout clashes.
10310 \begin_layout Subsubsection
10314 \begin_layout Standard
10315 The following options may be used in the extra class options in the
10317 Document\SpecialChar \menuseparator
10323 \begin_layout Labeling
10324 \labelwidthstring MMMMMMx
10329 This sets up the page layout for 7.33
10330 \begin_inset space \thinspace{}
10334 \begin_inset space \thinspace{}
10337 in paper, which is about the same aspect ratio as a 35
10338 \begin_inset space \thinspace{}
10341 mm slide, making it a bit easier to work with this medium.
10344 \begin_layout Labeling
10345 \labelwidthstring MMMMMMx
10350 Places a rule across the page below the header on every page except the
10354 \begin_layout Labeling
10355 \labelwidthstring MMMMMMx
10360 Places a rule across the page above the footer on every page except the
10364 \begin_layout Labeling
10365 \labelwidthstring MMMMMMx
10370 This is automatically set each time you create a new
10379 to use the dvips driver to rotate those pages that are set as landscape
10383 \begin_layout Labeling
10384 \labelwidthstring MMMMMMx
10389 Simply changes the page dimensions to those of a landscape page but doesn't
10391 Thus if you use this option you need to use an external program to rotate
10392 each page or feed your paper through your printer as landscape.
10393 Note that this option effectively reverses the roles of the
10401 environments (don't worry these are described in the next section).
10404 \begin_layout Labeling
10405 \labelwidthstring MMMMMMx
10410 Equation numbers on the left.
10413 \begin_layout Labeling
10414 \labelwidthstring MMMMMMx
10419 Flush-left equations.
10422 \begin_layout Subsection
10423 Supported Environments
10426 \begin_layout Standard
10427 Most of the environments commonly supported in other classes are also supported
10433 There are several additional environments provided by
10437 as well as a couple added by LyX.
10438 The following environments are shared with other classes:
10441 \begin_layout Standard
10445 \begin_layout Plain Layout
10449 begin{multicols}{2}
10457 \begin_layout Itemize
10463 \begin_layout Itemize
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Itemize
10487 \begin_layout Itemize
10493 \begin_layout Itemize
10499 \begin_layout Itemize
10505 \begin_layout Itemize
10511 \begin_layout Itemize
10517 \begin_layout Itemize
10523 \begin_layout Itemize
10529 \begin_layout Itemize
10535 \begin_layout Itemize
10541 \begin_layout Itemize
10547 \begin_layout Itemize
10553 \begin_layout Itemize
10559 \begin_layout Itemize
10565 \begin_layout Standard
10569 \begin_layout Plain Layout
10581 \begin_layout Standard
10582 That is, all the major environments apart from the sectioning environments.
10583 Since foils are essentially self-contained sections, with a title and body,
10588 provides specific commands for starting new foils and these are:
10591 \begin_layout Itemize
10597 \begin_layout Itemize
10603 \begin_layout Standard
10604 LyX also provides slightly modified versions of these two environments called:
10607 \begin_layout Itemize
10613 \begin_layout Itemize
10616 ShortRotatefoilhead
10619 \begin_layout Standard
10620 and the differences will be explained in the next section.
10623 \begin_layout Standard
10624 Since foils are often used in presenting ideas or new theorems and such
10629 also provides a comprehensive box of goodies for presenting them:
10632 \begin_layout Standard
10636 \begin_layout Plain Layout
10640 begin{multicols}{2}
10648 \begin_layout Itemize
10654 \begin_layout Itemize
10660 \begin_layout Itemize
10666 \begin_layout Itemize
10672 \begin_layout Itemize
10678 \begin_layout Itemize
10684 \begin_layout Itemize
10690 \begin_layout Itemize
10696 \begin_layout Itemize
10702 \begin_layout Itemize
10708 \begin_layout Itemize
10714 \begin_layout Standard
10718 \begin_layout Plain Layout
10730 \begin_layout Standard
10731 The starred versions are unnumbered while the unstarred versions are numbered.
10732 There are also two list environments added by LyX and these are:
10735 \begin_layout Itemize
10741 \begin_layout Itemize
10747 \begin_layout Standard
10752 provides some powerful header and footer capabilities that are best set
10753 in the preamble although they may be set at any point in a document.
10754 If you want to change these settings in your document the best place to
10755 do so is at the very top of a foil, i.
10756 \begin_inset space \thinspace{}
10762 \begin_inset space \space{}
10767 straight after the foilhead.
10770 \begin_layout Standard
10771 For this purpose, the following command styles are provided [
10778 \begin_layout Standard
10782 \begin_layout Plain Layout
10786 begin{multicols}{2}
10794 \begin_layout Itemize
10798 \begin_inset space ~
10804 \begin_layout Itemize
10810 \begin_layout Itemize
10814 \begin_inset space ~
10820 \begin_layout Itemize
10824 \begin_inset space ~
10830 \begin_layout Itemize
10834 \begin_inset space ~
10841 \begin_layout Standard
10842 \begin_inset space ~
10849 \begin_layout Standard
10853 \begin_layout Plain Layout
10865 \begin_layout Standard
10866 There are also a few commands provided by
10870 that aren't directly supported by LyX but I'll tell you what they do and
10871 how to use them in section
10872 \begin_inset space ~
10876 \begin_inset CommandInset ref
10878 reference "sec:unsuppfoils"
10885 \begin_layout Subsection
10886 Building a Set of Foils
10889 \begin_layout Standard
10890 This section will give a simple introduction to using the different environments
10891 to build a set of foils.
10892 If you want to see an example set of foils, take a look at the
10896 file you find in LyX's
10903 \begin_layout Subsubsection
10904 Give It a Title Page
10907 \begin_layout Standard
10908 Unlike other classes that provide
10928 creates the title on a page of its own.
10929 If you leave out the
10933 environment LaTeX will substitute the current date (every time you regenerate
10937 \begin_layout Subsubsection
10941 \begin_layout Standard
10942 As I mentioned earlier, there are four ways of starting a new foil.
10943 For portrait foils you should use
10952 The difference between these two environments is the amount of space between
10953 the title of the foil (the foilhead) and the body of the foil.
10956 \begin_layout Standard
10957 Landscape foils are generated using the
10963 ShortRotatefoilhead
10966 Again the only difference is the spacing between foilhead and body.
10967 Both of the short versions have 0.5 inches less separation between the foilhead
10972 \begin_layout Standard
10973 One problem with the support for landscape foils is the requirement that
10974 you have to use the
10978 driver to generate the PostScript output otherwise the foils won't be rotated.
10979 It is possible to get landscape foils even if you haven't got the
10983 driver provided you can feed your foils sideways through your printer ;-)
10986 \begin_layout Subsubsection
10987 Theorems, Lemmas, Proofs and more
10990 \begin_layout Standard
10991 Due to a small bug in LyX you can't have two of the same type of these environme
10992 nts directly following each other.
10993 They must be separated by something.
10994 If you try, you will just be extending the previous environment as if you
10995 had merged the two environments together.
10996 So, how do you get around this problem? The simplest option is to insert
10997 some text between the two environments or add a
11001 environment between the two with just a
11002 \begin_inset Quotes eld
11010 \begin_inset Quotes erd
11014 This will force LyX to produce two separate environments and hence the
11015 correct LaTeX output.
11016 An example is provided in the example file included with the LyX distribution.
11017 Remember, this problem only occurs if you are trying to place two of the
11018 same type of theorem-like environments one directly after the other.
11021 \begin_layout Subsubsection
11025 \begin_layout Standard
11026 You get all the commonly supported list styles found in other classes as
11027 well as two new ones.
11028 I'll only describe the new ones here.
11029 If you want to find out more about the other list environments check out
11035 If you intend to use itemized lists you might also want to read about the
11039 \begin_inset space ~
11043 \begin_inset space ~
11048 dialog described above in section
11049 \begin_inset space ~
11053 \begin_inset CommandInset ref
11055 reference "sec:bullet"
11062 \begin_layout Standard
11063 The two new list styles,
11071 , are designed to make it easier for you to create lists of do's and don'ts
11072 or right and wrong by providing dedicated environments that use a tick
11073 or a cross as the label of the list.
11074 These lists are in fact dedicated variants of the
11079 They do however require that you have the
11083 packages installed.
11086 \begin_layout Subsubsection
11090 \begin_layout Standard
11095 redefines the floating tables and figures so that they appear exactly where
11096 they are in the text rather than pushing them to the top of the page or
11097 to some user specified location.
11098 In fact if you change the float placement settings they are simply ignored.
11101 \begin_layout Subsubsection
11102 Page Headers and Footers
11103 \begin_inset CommandInset label
11105 name "sec:foilfoot"
11112 \begin_layout Standard
11116 \begin_inset space ~
11125 are two commands used to control the left-footer text string.
11126 The first is meant to allow you to include a graphic logo on your foils
11128 \begin_inset Quotes eld
11136 \begin_inset Quotes erd
11140 While the second is meant to provide a classification for the audience,
11144 \begin_inset space \thinspace{}
11150 \begin_inset space \space{}
11154 It is empty by default.
11157 \begin_layout Standard
11158 The remaining page corners can be filled by
11161 \begin_inset space ~
11166 (which defaults to page numbers),
11169 \begin_inset space ~
11177 \begin_inset space ~
11185 \begin_layout Subsection
11191 \begin_inset CommandInset label
11193 name "sec:unsuppfoils"
11200 \begin_layout Standard
11201 All the commands mentioned below need to be set in a
11209 within another environment.
11212 \begin_layout Subsubsection
11216 \begin_layout Standard
11217 All lengths are adjusted using the
11240 should be replaced by the name given to the length you want to change and
11245 is the length value.
11246 All lengths should be specified in units of length such as inches (
11258 ) or relative to some document or font-based length such as
11268 \begin_layout Standard
11269 It's possible to change the spacing between a foilhead and the body of the
11270 foil by adjusting the length specified by
11277 For example, to make
11282 \begin_inset space \space{}
11285 in closer to their bodies put the following in the preamble:
11291 foilheadskip}{-0.5in}
11294 \begin_layout Standard
11295 The spacings around floats can be adjusted by setting these lengths:
11298 \begin_layout Labeling
11299 \labelwidthstring MMMMMMMMMMM
11306 Separation between the text and the top of the float
11309 \begin_layout Labeling
11310 \labelwidthstring MMMMMMMMMMM
11317 Separation between the float and the caption
11320 \begin_layout Labeling
11321 \labelwidthstring MMMMMMMMMMM
11328 Separation between the caption and the following text
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMMMMMM
11339 You can make the captions narrower than the surrounding text by adjusting
11341 Best done relative to
11350 \begin_layout Standard
11351 There are also several title page related lengths that you may find useful
11352 if you have a long title or several authors:
11355 \begin_layout Labeling
11356 \labelwidthstring MMMMMMMMMMM
11363 Separation from headers to
11368 \begin_layout Labeling
11369 \labelwidthstring MMMMMMMMMMM
11387 \begin_layout Labeling
11388 \labelwidthstring MMMMMMMMMMM
11402 \begin_layout Labeling
11403 \labelwidthstring MMMMMMMMMMM
11419 \begin_layout Labeling
11420 \labelwidthstring MMMMMMMMMMM
11436 \begin_layout Standard
11437 The last length related command affects all the list environments.
11448 a list environment then all the vertical spacing between the list items
11450 Note that this is a command not a length so it doesn't require
11456 like the stuff mentioned above.
11459 \begin_layout Subsubsection
11460 Headers and Footers
11463 \begin_layout Standard
11476 commands control whether the logo in the
11480 definition appear on a given page.
11487 in the preamble then none of the foils will have the logo on them.
11488 If you don't want the logo on a particular page place the
11494 directly after the foilhead of that page and the
11500 directly after the next foilhead.
11503 \begin_layout Standard
11504 If you decide to use the
11508 page style setting in the
11511 \begin_inset space ~
11516 dialog you should probably add
11526 to your preamble so headers and footers on landscape pages are correctly
11527 placed when rotated.
11528 This is due to some clashes between the page layouts provided by the
11539 \begin_layout Section
11540 Hollywood (Hollywood spec scripts)
11543 \begin_layout Standard
11549 \begin_layout Subsection
11553 \begin_layout Standard
11554 Getting the format of a Hollywood script right is a
11555 \begin_inset Quotes eld
11559 \begin_inset Quotes erd
11562 It is designed to make the readers focus on content and to be easy and
11563 familiar for the actors to read.
11564 Each page of a script should be one minute of film.
11565 Nothing goes in a script that you cannot see or hear on screen.
11566 The courier 12 pt font should be used throughout.
11570 \begin_layout Subsection
11574 \begin_layout Standard
11575 Speakers' lines should NEVER break in mid-sentence.
11576 If a speaker's lines continue over a page break, repeat the
11580 title followed by (Cont'd).
11583 \begin_layout Subsection
11587 \begin_layout Standard
11592 names as labels then cross-reference the label to insert the name.
11593 The cross-reference dialog will show the current cast of characters.
11594 You can use this to insert the speaker name in narratives also.
11597 \begin_layout Subsection
11598 Paper size and Margins
11601 \begin_layout Standard
11602 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11605 \begin_layout Subsection
11609 \begin_layout Standard
11610 The following environments are available.
11611 You can use hollywood.bind to get the bind keys shown at the right.
11614 \begin_layout Itemize
11618 \begin_inset Newline newline
11623 Used where nothing else works.
11627 \begin_layout Itemize
11633 \begin_inset space \hfill{}
11641 \begin_inset Newline newline
11644 Usually followed by something like
11645 \begin_inset Quotes eld
11648 on Sally waking up.
11649 \begin_inset Quotes erd
11655 \begin_layout Itemize
11659 \begin_inset space \hfill{}
11663 \begin_inset Newline newline
11668 Introduces a new INTERIOR camera set-up.
11669 Always followed by DAY or NIGHT, or something similar to define the lighting
11671 Everthing on this line in CAPS.
11674 \begin_layout Itemize
11678 \begin_inset space \hfill{}
11682 \begin_inset Newline newline
11687 Introduces a new EXTERIOR camera set-up.
11688 Everthing on this line in CAPS.
11691 \begin_layout Itemize
11695 \begin_inset space \hfill{}
11699 \begin_inset Newline newline
11704 The character speaking.
11707 \begin_layout Itemize
11711 \begin_inset space \hfill{}
11715 \begin_inset Newline newline
11720 Instructions to the speaker.
11721 The () are automatically inserted, but only the ( will show in LyX.
11722 Both will be printed.
11725 \begin_layout Itemize
11729 \begin_inset space \hfill{}
11733 \begin_inset Newline newline
11745 \begin_layout Itemize
11749 \begin_inset space \hfill{}
11753 \begin_inset Newline newline
11758 Camera movement instruction.
11760 \begin_inset space \thinspace{}
11764 \begin_inset space \space{}
11770 \begin_layout Itemize
11774 \begin_inset space \hfill{}
11780 \begin_layout Itemize
11784 \begin_inset space \hfill{}
11790 \begin_layout Itemize
11794 \begin_inset space \hfill{}
11800 \begin_layout Itemize
11804 \begin_inset space \hfill{}
11810 \begin_layout Subsection
11814 \begin_layout Itemize
11818 \begin_layout Itemize
11822 \begin_layout Itemize
11824 \begin_inset space \thinspace{}
11831 \begin_layout Itemize
11836 \begin_layout Itemize
11837 PAN — camera movement
11840 \begin_layout Itemize
11841 INSERT — cut to close-up of
11844 \begin_layout Section
11848 \begin_layout Standard
11851 Panayotis Papasotiriou
11854 \begin_layout Subsection
11858 \begin_layout Standard
11859 The ijmpc package is a set of macros that facilitates electronic manuscript
11862 International Journal of Modern Physics C
11865 Similarly, the ijmpd package is for creating manuscripts to be submitted
11868 International Journal of Modern Physics D
11871 Both journals are published by World Scientific.
11872 The corresponding document classes are named
11881 These files, together with instructions for the authors, can be downloaded
11883 \begin_inset Flex URL
11886 \begin_layout Plain Layout
11888 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11894 \begin_inset Flex URL
11897 \begin_layout Plain Layout
11899 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11905 Both packages are modified versions of the standard
11906 \begin_inset Quotes eld
11910 \begin_inset Quotes erd
11913 package, and they are almost (but not exactly) identical.
11914 Most of their features are supported by LyX.
11915 I have used LyX successfully to write articles submitted to both journals
11916 without any problem.
11919 \begin_layout Subsection
11923 \begin_layout Standard
11924 As usual, the easiest way to write a paper is to start with a template.
11927 File\SpecialChar \menuseparator
11946 This will give an (almost) empty document that includes the most common
11947 fields found in a manuscript.
11948 Simply overwrite the existing text (including the brackets,
11953 You should keep in mind the following remarks.
11956 \begin_layout Enumerate
11957 LyX won't let you change the font size and the page style of the document,
11958 because such modifications are not allowed by both packages.
11961 \begin_layout Enumerate
11962 The language of the document should not be changed.
11963 Before previewing your paper, be sure that the babel package is not used.
11964 To do this, click on
11966 Tools\SpecialChar \menuseparator
11977 checkbox in the language settings, and click on
11985 , if you wish to make this change permanent).
11988 \begin_layout Enumerate
11990 \begin_inset Quotes eld
11994 \begin_inset Quotes erd
11997 style must be used to define keywords.
12000 \begin_layout Enumerate
12001 The ijmpc package provides a style named
12002 \begin_inset Quotes eld
12005 Classification Codes
12006 \begin_inset Quotes erd
12009 , which can be used to define classification codes, such as PACS numbers.
12010 Note that this facility is not supported by the ijmpd package.
12013 \begin_layout Enumerate
12014 Several new environments are available:
12015 \begin_inset Quotes eld
12019 \begin_inset Quotes erd
12023 \begin_inset Quotes eld
12027 \begin_inset Quotes erd
12031 \begin_inset Quotes eld
12035 \begin_inset Quotes erd
12039 \begin_inset Quotes eld
12043 \begin_inset Quotes erd
12047 \begin_inset Quotes eld
12051 \begin_inset Quotes erd
12055 \begin_inset Quotes eld
12059 \begin_inset Quotes erd
12063 \begin_inset Quotes eld
12067 \begin_inset Quotes erd
12071 \begin_inset Quotes eld
12075 \begin_inset Quotes erd
12079 \begin_inset Quotes eld
12083 \begin_inset Quotes erd
12087 \begin_inset Quotes eld
12091 \begin_inset Quotes erd
12095 \begin_inset Quotes eld
12099 \begin_inset Quotes erd
12103 \begin_inset Quotes eld
12107 \begin_inset Quotes erd
12111 \begin_inset Quotes eld
12115 \begin_inset Quotes erd
12119 \begin_inset Quotes eld
12123 \begin_inset Quotes erd
12127 Their use is more or less obvious.
12128 LyX supports all these environments; it will use the proper label, text
12129 style, and numbering scheme for each of them.
12132 \begin_layout Enumerate
12133 Both packages use basic citations; the natbib package should not be used.
12134 In LyX, citation references are shown as usual; in the output, citations
12135 are shown as superscripts.
12136 If you want to use a citation as normal text, you should use the
12141 \begin_inset space \thinspace{}
12145 \begin_inset space \space{}
12149 \begin_inset Quotes eld
12153 \begin_inset space \space{}
12163 \begin_inset Quotes erd
12169 \begin_layout Enumerate
12171 \begin_inset Quotes eld
12175 \begin_inset Quotes erd
12178 section in both packages.
12179 To put acknowledgments, just use the
12180 \begin_inset Quotes eld
12184 \begin_inset Quotes erd
12190 \begin_layout Enumerate
12191 Appendices may be added to the paper,
12195 the Acknowledgments and
12200 LyX provides a special environment, called
12201 \begin_inset Quotes eld
12205 \begin_inset Quotes erd
12208 which marks the beginning of the appendices.
12209 This environment should be left blank; it just sends a LaTeX command, but
12210 nothing is really printed.
12212 \begin_inset Quotes eld
12216 \begin_inset Quotes erd
12219 is printed with blue letters, as a signal that all sections after that
12220 point are appendices.
12221 To write an appendix, use the
12222 \begin_inset Quotes eld
12226 \begin_inset Quotes erd
12230 LyX will number each appendix with capital letters, as required by both
12233 \begin_inset Quotes eld
12237 \begin_inset Quotes erd
12244 be present before the first appendix; if not, all appendices will be numbered
12245 as normal sections in the output.
12248 \begin_layout Enumerate
12249 The ijmpc and the ijmpd packages use the
12253 command to implement table captions.
12254 As a result, a table created by LyX is printed correctly, but its caption
12256 However, you can use some TeX code to overcome this problem, so that captions
12257 are printed as expected.
12258 To do so, create a float table as usual, remove the caption, and replace
12259 it with the TeX code
12269 (sic); you must also the TeX code
12273 immediately after the tabular material.
12274 Study the example table included in the template files to see how this
12275 trick is implemented.
12276 Alternatively, If you need table captions, you should implement the whole
12281 file, then include this file to the LyX document (
12283 Insert\SpecialChar \menuseparator
12284 File\SpecialChar \menuseparator
12286 \begin_inset space ~
12292 Details on how to create a table float can be found in the files
12300 , included in the corresponding packages.
12303 \begin_layout Subsection
12304 Preparing a paper for submission
12307 \begin_layout Standard
12308 Before you submit your paper you must export the LyX document as a LaTeX
12311 File\SpecialChar \menuseparator
12312 Export\SpecialChar \menuseparator
12319 \begin_layout Plain Layout
12320 Actually you have the choice between LaTeX (plain) and pdflatex.
12321 If you intend to use pdflatex to prepare the paper, you should use the
12322 pdflatex option so that included graphics are converted to PDF format,
12323 ready for use by pdflatex.
12328 , then make the following changes to the resulting
12335 \begin_layout Enumerate
12336 Remove the comment lines before the
12345 \begin_layout Enumerate
12346 Remove everything between (and including) the
12358 commands, except for any commands you specifically put into the LaTeX preamble.
12361 \begin_layout Standard
12366 file should be saved and processed through LaTeX as many times as necessary.
12367 You may also want to check the resulting
12374 \begin_layout Subsection
12378 \begin_layout Standard
12379 The use of TeX code is reduced to two commands, which must be placed at
12380 the top of the document.
12381 If you started writing your paper by using the
12389 template, the TeX code needed is already in its place; you usually don't
12391 You may only modify the first TeX code to specify the information printed
12392 to the top of odd and even pages (authors' names and short paper's title,
12394 This TeX code must have the form
12398 markboth{Authors' Names}{Short Paper's Title}
12403 \begin_layout Section
12407 \begin_layout Standard
12413 \begin_layout Subsection
12417 \begin_layout Standard
12418 The iopart package provides a document class to create electronic manuscript
12419 submission to the journals published by the Institute of Physics.
12420 Instructions for the authors how to create a paper using the iopart class
12421 can be downloaded together with the iopart package from the site
12422 \begin_inset Flex URL
12425 \begin_layout Plain Layout
12427 ftp://ftp.iop.org/pub/journals/latex2e
12435 \begin_layout Subsection
12439 \begin_layout Standard
12440 The easiest way to write a paper is to start with the file
12444 that is available in LyX's examples files folder.
12445 Open this file, save it under a new name, and start writing.
12446 The example file explains how to use the special text environments.
12447 Here are the most important advices:
12450 \begin_layout Itemize
12451 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12454 Use AMS math package
12456 in the document settings under
12463 \begin_layout Itemize
12466 The title environment defines the kind of your paper.
12467 So use one of the following environments for the title:
12471 \begin_layout Itemize
12480 \begin_layout Itemize
12489 \begin_layout Itemize
12495 for a Topical review
12498 \begin_layout Itemize
12507 \begin_layout Itemize
12516 \begin_layout Itemize
12522 for a Paper (same as Title)
12525 \begin_layout Itemize
12531 for a Preliminary communication
12534 \begin_layout Itemize
12540 for a Rapid communication
12543 \begin_layout Itemize
12549 for a Letter to the editor
12553 \begin_layout Itemize
12556 All title environments except of
12560 can have an optional short title.
12563 \begin_layout Itemize
12564 There is a general title environment
12568 which is not directly supported by the LyX.
12569 This can be used as TeX code when your document doesn't fit into one of
12570 the other title types.
12573 \begin_layout Standard
12574 For more informations like hints for special table and formula formatting,
12575 look at the IOP author guidelines.
12578 \begin_layout Section
12582 \begin_layout Standard
12585 Panayotis Papasotiriou
12588 \begin_layout Subsection
12592 \begin_layout Standard
12593 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12594 that facilitates electronic manuscript submission to the journals they
12596 Most known of them (at least in my domain of interest) are
12598 Astrophysics and Space Science
12604 , but there are many others (see a complete list at
12605 \begin_inset Flex URL
12608 \begin_layout Plain Layout
12610 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12616 The Kluwer package may be downloaded from the site
12617 \begin_inset Flex URL
12620 \begin_layout Plain Layout
12622 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12628 A complete user guide is contained in that package (but it can also be
12629 downloaded separately).
12632 \begin_layout Standard
12633 LyX supports many features of the package but not everything.
12634 However, the TeX code needed is reduced to some
12635 \begin_inset Quotes eld
12639 \begin_inset Quotes erd
12642 commands of the package (see
12643 \begin_inset space ~
12647 \begin_inset CommandInset ref
12649 reference "subsec:kluwer_peculiarities"
12654 I have recently used LyX to write an article submitted to the
12656 Astrophysics and Space Science
12658 without any problem.
12661 \begin_layout Subsection
12665 \begin_layout Standard
12666 The easiest way to write a paper is to start with the Kluwer template file.
12669 File\SpecialChar \menuseparator
12681 This will give an (almost) empty document that includes the most common
12682 fields found in a manuscript and a short description of their use.
12683 As in most templates, simply overwrite the existing text (including the
12688 ) with the correct information.
12691 \begin_layout Subsection
12692 Preparing a paper for submission
12695 \begin_layout Standard
12696 As in the AASTeX package, before you submit your paper to a journal you
12698 \begin_inset Quotes eld
12702 \begin_inset Quotes erd
12708 \begin_layout Enumerate
12709 Export your paper as a LaTeX file.
12710 To do this, click on
12712 File\SpecialChar \menuseparator
12713 Export\SpecialChar \menuseparator
12720 \begin_layout Enumerate
12725 file with a text editor and make the following changes
12729 \begin_layout Enumerate
12730 remove the comment lines before the
12739 \begin_layout Enumerate
12740 remove everything between (and including) the
12752 commands, except for any commands you specifically put into the LaTeX preamble.
12755 \begin_layout Standard
12764 \begin_layout Enumerate
12769 file through LaTeX as many times as necessary (usually up to three).
12772 \begin_layout Enumerate
12778 \begin_inset space \thinspace{}
12782 \begin_inset space \space{}
12789 , and check if everything is OK (it should, if you didn't make any mistake).
12792 \begin_layout Subsection
12793 \begin_inset Quotes eld
12797 \begin_inset Quotes erd
12800 of the Kluwer package
12801 \begin_inset CommandInset label
12803 name "subsec:kluwer_peculiarities"
12810 \begin_layout Standard
12811 The Kluwer package has the following
12812 \begin_inset Quotes eld
12816 \begin_inset Quotes erd
12822 \begin_layout Enumerate
12823 It is possible to write multiple articles in the same LaTeX file
12827 \begin_layout Plain Layout
12828 I can't imagine any good reason to do this.
12834 Each article must be included in the environment
12835 \begin_inset Quotes eld
12839 \begin_inset Quotes erd
12843 Unfortunately, this environment cannot be omitted, even if you write just
12845 Therefore, each article starts with the command
12851 and, obviously, ends with the command
12858 Although this can be implemented in LyX, I didn't included it, since it
12859 looks ugly and can confuse the novice user.
12860 Therefore, you need to enter them directly and mark them as LaTeX code
12862 \begin_inset Quotes eld
12866 \begin_inset Quotes erd
12872 \begin_layout Enumerate
12873 Information given at the beginning of the article (i.
12874 \begin_inset space \thinspace{}
12878 \begin_inset space \space{}
12881 title, subtitle, author, institution, running title, running author, abstract
12882 and keywords) must be included in an environment called
12883 \begin_inset Quotes eld
12887 \begin_inset Quotes erd
12891 This is not implemented in LyX, so you must enter title, subtitle etc.
12892 \begin_inset space ~
12895 between two TeX code lines (
12910 \begin_layout Enumerate
12911 According to the user manual, the label of each bibliography item must be
12935 \begin_layout Standard
12940 template takes care of all these
12941 \begin_inset Quotes eld
12945 \begin_inset Quotes erd
12949 If you start a new paper using this template you don't need to do anything
12954 \begin_layout Enumerate
12955 don't delete the TeX code included in the template, and
12958 \begin_layout Enumerate
12959 copy the example bibliography item included in the template and modify it
12960 as necessary to enter new bibliography items.
12963 \begin_layout Section
12967 \begin_layout Standard
12973 \begin_layout Subsection
12977 \begin_layout Standard
12978 The LyX document classes
12980 article (koma-script)
12984 report (koma-script)
13002 correspond to the LaTeX document classes
13019 \begin_inset space ~
13022 of the Koma-Script family.
13023 They are replacements for the standard document classes
13039 , resp., and fit better to European typography conventions in a number of
13043 \begin_layout Itemize
13044 Standard character size is 11pt in
13046 article (koma-script)
13050 report (koma-script)
13058 letter (koma-script)
13063 \begin_layout Itemize
13064 Headings, labels of the description environment, and a number of elements
13067 letter (koma-script)
13069 document class are set in a bold sans serif font.
13073 \begin_layout Plain Layout
13074 There is a big difference between the bold sans serif old cm fonts and new
13075 ec fonts, especially in the appearance of headings.
13076 In comparison, the ec bold sans serif fonts look a bit thin.
13077 Here the LaTeX package
13085 helps to produce the
13086 \begin_inset Quotes eld
13090 \begin_inset Quotes erd
13093 appearance when using the ec fonts.
13098 The numbering of chapter headings is made in the same way as the numbering
13099 of section headings, that is without the extra line
13100 \begin_inset Quotes eld
13103 Chapter\SpecialChar \ldots{}
13105 \begin_inset Quotes erd
13109 In addition, the appearance of the headings can be modified by using a
13110 number of options (in LyX to be entered in the field
13113 \begin_inset space ~
13120 Layout\SpecialChar \menuseparator
13127 \begin_layout Itemize
13128 The main means in the Koma-Script document classes to design the type area
13137 (in LyX to be entered in the extra class options field in the dialog
13139 Document\SpecialChar \menuseparator
13143 They make a clearer modification of page margins possible as do the options
13146 Document\SpecialChar \menuseparator
13153 \begin_layout Itemize
13154 The LaTeX document classes of the Koma-Script family define a number of
13155 additional commands.
13156 Those part of it which makes sense in LyX is implemented in corresponding
13160 \begin_layout Standard
13161 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13162 can be found in the Koma-Script documentation
13173 \begin_layout Subsection
13174 article (koma-script), report (koma-script), and book (koma-script)
13177 \begin_layout Standard
13178 The document classes
13180 article (koma-script)
13184 report (koma-script)
13194 are implemented in the layout files
13207 They contain all the paragraph types of the corresponding standard document
13220 , resp., partly modified, with the exception of the LyX specific
13224 -type, which is replaced by the new
13228 -type having the same functionality.
13233 -Type there is a number of new paragraph types added.
13240 letter (koma-script)
13245 \begin_layout Itemize
13254 : are equivalents to
13262 , resp., additionally inserting an entry in the table of contents.
13271 are not contained in
13273 article (koma-script)
13278 \begin_layout Itemize
13287 : behave exactly as
13295 , resp., additionally clearing running heads.
13300 is not contained in
13302 article (koma-script)
13308 \begin_layout Plain Layout
13321 report (koma-script)
13323 , but since this is identical to
13327 , is has not been implemented in LyX.
13335 \begin_layout Itemize
13340 : generates a heading directly above the following paragraph in the standard
13341 character size without affecting the structure of the document.
13344 \begin_layout Itemize
13353 are special captions which respect the different space settings needed
13354 for captions placed above or below an element (if you follow strict typographic
13355 rules, you might want to place table captions always above the table).
13356 You can also use the class option
13360 , which will switch
13373 You need at least Koma-Script version 2.8q to use this.
13376 \begin_layout Itemize
13381 : can be used to set a bonmot, e.
13382 \begin_inset space \thinspace{}
13386 \begin_inset space \space{}
13389 at the beginning of a chapter.
13390 If you use the optional argument (
13392 Insert\SpecialChar \menuseparator
13394 \begin_inset space ~
13399 ), you can insert the dictum's author there.
13400 Dictum and author are separated by a line.
13401 You need at least Koma-Script version 2.8q to use this.
13406 is not contained in
13408 article (koma-script)
13413 \begin_layout Standard
13414 The following types, together with the standard types
13426 , form the title area of the document.
13427 They must be entered ahead of the first
13428 \begin_inset Quotes eld
13432 \begin_inset Quotes erd
13439 \begin_layout Plain Layout
13440 The corresponding LaTeX commands must appear before the
13451 When such a type is used more than once, the latter usage overwrites the
13452 former one, that means, for every type only the latest usage is valid.
13453 The order of the different types however has, like
13465 , no effect on the appearance of the produced document.
13468 \begin_layout Itemize
13473 : produces a centered paragraph above the ordinary title (
13485 ) for the subject of the document.
13488 \begin_layout Itemize
13493 : produces a centered paragraph below the ordinary title (
13505 ) for the publishers' name.
13508 \begin_layout Itemize
13515 report (koma-script)
13521 produces a centered paragraph on its own page behind the title page, or
13524 article (koma-script)
13526 produces a centered paragraph below the ordinary title (
13542 ) for a dedication.
13545 \begin_layout Itemize
13550 : produces a left aligned paragraph above the ordinary title (
13566 ) for a document`s head.
13569 \begin_layout Itemize
13574 : produces in a double-sided print in
13576 report (koma-script)
13582 a left-aligned paragraph at the top of the title page`s back or has no
13583 effect in a single-sided print or in
13585 article (koma-script)
13590 \begin_layout Itemize
13595 : produces in a double-sided print in
13597 report (koma-script)
13603 a left-aligned paragraph at the bottom of the title page`s back or has
13604 no effect in a single-sided print or in
13606 article (koma-script)
13611 \begin_layout Itemize
13616 : produces a special
13617 \begin_inset Quotes eld
13621 \begin_inset Quotes erd
13624 page ahead of the actual document containing a paragraph without special
13628 \begin_layout Standard
13629 The layout files for the document classes
13631 article (koma-script)
13635 report (koma-script)
13641 do include the file
13646 This is thought of as a place to define your own types.
13651 in your personal layout directory and edit the file!
13654 \begin_layout Subsection
13655 letter (koma-script)
13658 \begin_layout Standard
13662 letter (koma-script)
13664 is implemented in the layout file
13669 It contains all the paragraph types of the corresponding standard document
13674 , partly modified, with the exception of the LyX specific types
13686 type, which is replaced by the new
13691 In addition, it contains, in contrast to the standard document class, the
13709 Furthermore, there are a number of new letter specific types.
13712 \begin_layout Standard
13713 The appearance of the letter produced by this document class can be controlled
13714 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13718 \begin_layout Plain Layout
13719 For example, the standard appearance of the letter`s heading, consisting
13720 of name and address, is quite self-willed.
13722 \begin_inset Quotes eld
13726 \begin_inset Quotes erd
13729 heading is produced by the following LaTeX commands in the preamble:
13732 \begin_layout LyX-Code
13742 \begin_layout LyX-Code
13758 \begin_layout LyX-Code
13768 \begin_layout LyX-Code
13788 A detailed German description of such LaTeX commands can be found in the
13789 Koma-Script documentation
13794 With it, the letter's author can produce his personal letter layout.
13797 \begin_layout Standard
13806 define the beginning of the letter and must be used in every letter.
13807 To emphasize them in the LyX document class, they are marked with the letter
13817 \begin_inset space ~
13820 in the left margin.
13821 It is possible to write any number of letters in one file.
13826 type produces a new letter using the same addressee and a
13830 type produces a new addressee.
13847 are ordinary paragraph types and can also be used several times in one
13848 and the same letter.
13851 \begin_layout Itemize
13856 : produces a paragraph for the addressee and implicitly defines the beginning
13860 \begin_layout Itemize
13865 : produces a paragraph for the form of address and implicitly produces a
13869 \begin_layout Itemize
13874 : produces a paragraph for a close.
13877 \begin_layout Itemize
13882 : produces a paragraph for a postscript.
13885 \begin_layout Itemize
13890 : produces a paragraph for a distribution list.
13893 \begin_layout Itemize
13898 : produces a paragraph for enclosures.
13901 \begin_layout Standard
13942 are input types provided with a label to enter information, which will
13943 be processed by the document class.
13947 \begin_layout Plain Layout
13948 It could be seen as a matter of inconsequence, that the types
13956 described above are not such input types as well.
13957 Because of the special meaning of those types, however, I have implemented
13958 them as ordinary paragraph types with a one letter mark in the left margin.
13959 Moreover, it would affect my feeling of symmetry, if the
13967 type had such a serious different appearance.
13972 The types must be used ahead of the corresponding
13979 \begin_layout Standard
13980 An implementation of these types in a WYSIWYG fashion does not seem to make
13981 sense, because the real appearance of the produced letter does not only
13982 depend on the usage of the particular type, but also on other factors.
13983 For example, a signature entered in the
13987 type will in the standard behavior appear in the produced letter only,
13988 when in the same letter also a
13993 The entered value of the
13997 type will in the standard behavior not appear in the produced letter at
13999 The possibility to design the letter`s heading freely is already indicated
14000 in a footnote above.
14003 \begin_layout Standard
14004 The input types can also be used as empty paragraphs.
14005 This makes sense e.
14006 \begin_inset space \thinspace{}
14010 \begin_inset space \space{}
14022 type is not used at all, in the standard behavior the value of the
14026 type is used as signature, whereas if an empty
14030 type is used, no signature value is defined.
14033 \begin_layout Standard
14034 By using the input types it is possible to write a letter template, containing
14035 filled input types with your personal dates (name, address, etc.) and empty
14036 input types for other dates you want to enter.
14039 \begin_layout Itemize
14044 : sender's name, in the standard behavior appears as a centered paragraph
14045 in small caps in the letter`s heading.
14048 \begin_layout Itemize
14053 : sender's signature, in the standard behavior appears below the
14062 type is used, the value of the
14066 type appears instead.
14069 \begin_layout Itemize
14074 : sender's address, in the standard behavior appears in a centered paragraph
14075 in the letter`s heading below the sender's name.
14078 \begin_layout Itemize
14083 : sender's telephone number, in the standard behavior only sets the LaTeX
14093 \begin_layout Itemize
14098 : place of the letter`s making.
14101 \begin_layout Itemize
14106 : date of the letter`s making.
14115 , in the standard behavior, produce the place and the date in a right-aligned
14116 line below the addressee's field.
14121 type is used, neither place nor date appear, independent of the value of
14131 type is used, the date of the letter `s production is used.
14134 \begin_layout Itemize
14139 : sender`s back address, in the standard behavior appears above the addressee's
14140 field in a small sans serif font.
14143 \begin_layout Itemize
14148 : special mail information, in the standard behavior appears underlined
14149 above the addressee's field below the back address.
14152 \begin_layout Itemize
14157 : additional information, in the standard behavior appears on right side
14158 below the addressee`s field.
14161 \begin_layout Itemize
14166 : the letter's title, in the standard behavior appears in a big, bold, sans
14167 serif font above the subject.
14170 \begin_layout Itemize
14175 : the letter's subject, in the standard behavior appears in a bold font
14183 \begin_layout Standard
14204 produce a business letter like line above the
14208 line containing the fields
14209 \begin_inset Quotes eld
14213 \begin_inset Quotes erd
14217 \begin_inset Quotes eld
14221 \begin_inset Quotes erd
14225 \begin_inset Quotes eld
14229 \begin_inset Quotes erd
14233 \begin_inset Quotes eld
14237 \begin_inset Quotes erd
14241 \begin_inset Quotes eld
14245 \begin_inset Quotes erd
14249 \begin_inset Quotes eld
14253 \begin_inset Quotes erd
14257 For the date field, the value of the
14263 \begin_inset Quotes eld
14266 business letter types
14267 \begin_inset Quotes erd
14270 is used, the value of the
14274 type however does not appear, but only the LaTeX variable
14281 The ordinary output of place and date in a right-aligned line below the
14282 addressee`s field is suppressed.
14283 The types are implemented as input types provided with a label and must
14284 be used ahead of the corresponding
14291 \begin_layout Itemize
14299 \begin_layout Itemize
14307 \begin_layout Itemize
14315 \begin_layout Itemize
14323 \begin_layout Itemize
14331 \begin_layout Subsection
14332 The new letter class: letter (koma-script v.2)
14335 \begin_layout Standard
14341 \begin_layout Standard
14342 \begin_inset VSpace medskip
14348 \begin_layout Standard
14350 Koma-Script version 2.8 has introduced a new letter class
14354 which supersedes the now unsupported
14359 It has — on the LaTeX side — a completely new interface and is not compatible
14360 with the old class.
14361 Therefore, LyX supports both, though it is recommended you use the new
14365 \begin_layout Standard
14366 This class covers the same functionality as
14368 letter (koma-script),
14371 The basic items are
14375 (receiver's address, same as
14379 in the old layout),
14392 will start a new letter (i.
14393 \begin_inset space \thinspace{}
14397 \begin_inset space \space{}
14400 you can write several letters per document).
14401 New elements are sender's
14417 and the possibility to use a
14423 Insert\SpecialChar \menuseparator
14429 \begin_layout Standard
14430 The biggest improvement is, though, that the letter's layout is configurable
14431 to meet almost any needs.
14432 This can be done via the preamble or with a special style file (Letter
14433 Class Option, extension
14437 ), that will be read in as a class option.
14441 \begin_layout Plain Layout
14442 The KOMA package comes with some default
14447 There is, for instance, a
14451 file that follows german typesetting rules, or a
14455 that provides the default layout of the old
14460 The latter can be loaded with the class option
14469 ayout\SpecialChar \menuseparator
14474 ocument\SpecialChar \menuseparator
14486 template that is included in LyX for examples.
14487 A detailed description is to be found in the Koma-Script documentation
14495 \begin_layout Subsection
14499 \begin_layout Standard
14500 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14504 \begin_layout Itemize
14505 The chapter number of a
14509 type appears on a line of its own above the chapter heading instead of
14510 appearing in the same line ahead of it.
14511 The cause for that is the LyX internal behavior for the labeltype
14515 in the layout file.
14518 \begin_layout Itemize
14519 The headings of the types
14527 are only put in the
14528 \begin_inset Quotes eld
14532 \begin_inset Quotes erd
14535 LaTeX table of contents, but not in the LyX table of contents (
14537 Document\SpecialChar \menuseparator
14539 \begin_inset space ~
14543 \begin_inset space ~
14551 \begin_layout Itemize
14552 The paragraphs in a
14556 document class appear in a skip separation mode, not indented.
14557 This is the standard behavior, no special LaTeX commands are needed for
14561 Document\SpecialChar \menuseparator
14564 dialog the corresponding radio button indicates
14573 value always has the effect that extra LaTeX commands are inserted in the
14574 document to produce the gap, which is not what is wanted in this case.
14577 \begin_layout Section
14581 \begin_layout Standard
14587 \begin_layout Subsection
14591 \begin_layout Standard
14592 Memoir is a very powerful and constantly evolving class.
14593 It has been designed with regard to fictional and non-fictional literature.
14594 Its aim is to let the user have maximum control over the typesetting of
14596 Memoir is based on the standard book class, but it can also emulate the
14597 article class (see below).
14600 \begin_layout Standard
14601 Peter Wilson, the developer of Memoir, is known as the author of lots of
14602 useful packages in the LaTeX world.
14603 Most of them have been merged with Memoir.
14604 Therefore, it is much easier to layout the table of contents, appendices,
14605 chapter designs and such.
14606 LyX, though, does not support all of these goodies natively.
14607 Some of them might be added to forthcoming releases
14611 \begin_layout Plain Layout
14612 You are invited to send suggestions to
14613 \begin_inset Flex URL
14616 \begin_layout Plain Layout
14618 lyx-devel@lists.lyx.org
14628 , lots will probably never be supported, due to the limitations of LyX's
14630 Of course you can still use all features with the help of some native LaTeX
14635 \begin_layout Plain Layout
14640 \begin_layout Plain Layout
14650 \begin_inset space ~
14654 \begin_inset CommandInset ref
14656 reference "sec:Inserting-TeX-Code"
14666 In this section, we can only list those features that are natively supported
14668 For detailed descriptions (and for the rest of features) we recommend you
14669 have a look at the detailed manual of the Memoir class
14673 \begin_layout Plain Layout
14678 \begin_layout Plain Layout
14688 \begin_inset Flex URL
14691 \begin_layout Plain Layout
14693 CTAN:/macros/latex/memoir/memman.pdf
14703 , which is not only a user guide for the class, but also both a comprehensive
14704 description on good typesetting and a superb example for good typesetting
14708 \begin_layout Subsection
14709 Basic features and restrictions
14712 \begin_layout Standard
14713 Memoir supports basically all features of the standard book classes.
14714 There are, however, some differences, as follows:
14717 \begin_layout Description
14719 \begin_inset space ~
14722 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14725 \begin_layout Description
14727 \begin_inset space ~
14730 style: The fancy page style is not supported, due to a command clash between
14731 Memoir and the fancyhdr package (they both define a command with the same
14732 name, which confuses LaTeX).
14733 Instead, Memoir comes with a number of its own page styles (see
14735 Layout\SpecialChar \menuseparator
14736 Document\SpecialChar \menuseparator
14738 \begin_inset space ~
14744 If you want to use these for the chapter pages, you have to use the command
14751 in the main text or in preamble (e.
14752 \begin_inset space \thinspace{}
14756 \begin_inset space \space{}
14763 chapterstyle{companion}
14768 \begin_layout Description
14769 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14770 optional argument in the standard classes.
14771 With this, you can specify an alternative version of the title for the
14772 table of contents and the headers (for instance, if the title is too long).
14773 In LyX, you can do this via
14775 Insert\SpecialChar \menuseparator
14777 \begin_inset space ~
14782 at the beginning of a chapter/section.
14783 Memoir features a second optional argument and thus separates the table
14784 of contents from the header.
14785 You can define three variants of a title with this: one for the main text,
14786 one for the table of contents, and one for the headers.
14787 Simply insert two optional arguments if you need this feature, the first
14788 one containing the short title for the Table of Contents, the second one
14789 containing an alternative short title for the headers.
14792 \begin_layout Description
14793 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14794 of contents, the list of figures and the list of table start a new page
14796 Memoir does not follow this route.
14797 You have to insert a page break yourself, if you want to have one.
14800 \begin_layout Description
14801 Titlepage: For some unknown reason, Memoir uses pagination on the title
14802 page (in the standard classes, title pages are
14803 \begin_inset Quotes eld
14807 \begin_inset Quotes erd
14811 If you want an empty title page, type
14815 aliaspagestyle{title}{empty}
14820 \begin_layout Description
14821 Article: With the class option
14827 Layout\SpecialChar \menuseparator
14828 Document\SpecialChar \menuseparator
14830 \begin_inset space ~
14835 ), you can emulate article style.
14836 That is, counters (footnotes, figures, tables etc.) will not be reset on
14837 new chapters, chapters don't start a new page (but are—in contrary to
14838 \begin_inset Quotes eld
14842 \begin_inset Quotes erd
14845 article classes—still allowed), parts, though, use their own page, as in
14849 \begin_layout Description
14850 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14851 font commands, which have been used in the old LaTeX version 2.09 (e.
14852 \begin_inset space \thinspace{}
14856 \begin_inset space \space{}
14872 It produces an error and stops LaTeX whenever such a command appears.
14877 reallows the commands and spits out warnings instead (which does at least
14879 Since a lot of packages and particularly BibTeX style files are still using
14880 those commands, we have decided to use this option by default.
14883 \begin_layout Subsection
14887 \begin_layout Standard
14888 We will only describe the features supported by LyX (which is not much currently
14890 Please consult the Memoir manual
14894 \begin_layout Plain Layout
14899 \begin_layout Plain Layout
14909 \begin_inset Flex URL
14912 \begin_layout Plain Layout
14914 CTAN:/macros/latex/memoir/memman.pdf
14927 \begin_layout Description
14928 Abstract: You may wonder why an abstract is an extra feature.
14929 Well, it is in book class.
14930 Usually books don't have abstracts.
14931 Memoir, however, has.
14932 You can use it wherever and how often you like.
14935 \begin_layout Description
14936 Chapterprecis: You may know this older typesetting style: The contents of
14937 a chapter are summarized below the title and also in the table of contents
14939 \begin_inset space \thinspace{}
14943 \begin_inset space \space{}
14948 Our hero arrives in Troia; he loses some friends; he finds others
14951 Chapterprecis does exactly this.
14952 It is therefore only sensible below a chapter.
14955 \begin_layout Description
14956 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14957 The epigraph environment provides an elegant way of typesetting such a
14959 The motto itself (text) and its author (source) are divided by a short
14961 Unfortunately, we have to fool LyX a bit here again, since the environment
14962 needs two arguments (text and source).
14963 In this case, we have to use curly brackets (in TeX mode) between the two
14974 <author of the slogan>.
14977 \begin_layout Description
14978 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14979 complex figurative poems).
14980 LyX can only support a few of them.
14981 One is poemtitle, which is a centered title for poems, which will also
14982 be added to the table of contents (verse is the standard environment for
14984 Memoir has some enhanced versions of verse, but you need to use TeX code,
14985 because they have to be nested inside regular verse environments, which
14986 is not possible with LyX).
14989 \begin_layout Description
14990 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14993 \begin_layout Section
14994 Article (mwart), book (mwbk) and report (mwrep)
14995 \begin_inset Argument status
14998 \begin_layout Plain Layout
15011 \begin_layout Standard
15017 \begin_layout Standard
15018 The LyX document classes
15034 correspond to the LaTeX document classes
15047 They are replacements for the standard document classes
15059 , resp., and fit better to Polish typography conventions in a number of points.
15063 \begin_layout Standard
15067 \begin_layout Itemize
15068 Unnumbered titles (with star, e.
15069 \begin_inset space \thinspace{}
15073 \begin_inset space \space{}
15080 ) are added into table of contents,
15083 \begin_layout Itemize
15084 Additional page styles:
15088 \begin_layout Description
15089 uheadings header with separated lines,
15092 \begin_layout Description
15093 myheadings custom header, contents headers via commands:
15108 \begin_layout Description
15109 myuheadings custom header with separated lines,
15112 \begin_layout Description
15113 outer page number is placed on outer side of page
15117 \begin_layout Itemize
15122 \begin_layout Description
15123 rmheadings serif titles — default,
15126 \begin_layout Description
15127 sfheadings sansserif titles,
15130 \begin_layout Description
15131 authortitle on title page first placed is author next title — default,
15134 \begin_layout Description
15135 titleauthor on title page first placed is title next author,
15138 \begin_layout Description
15139 withmarginpar reserve place on page for margins.
15143 \begin_layout Section
15147 \begin_layout Standard
15152 provides an alternative to the standard
15157 It provides similar functionality, but you might prefer this layout with
15158 sans serif sections, headings, and more.
15161 \begin_layout Section
15165 \begin_layout Standard
15171 \begin_layout Standard
15172 \begin_inset VSpace bigskip
15178 \begin_layout Standard
15183 \begin_inset space ~
15188 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15189 \begin_inset Formula $\beta$
15192 release of May, 1999) class.
15195 \begin_layout Standard
15200 textclass, which works with RevTeX 3.1.
15201 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15202 That means that it doesn't interact very well with LyX, which requires
15203 LaTeX2e, although it has been kludged to work.
15204 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15208 \begin_inset space ~
15213 textclass should also be pretty easy to use.
15216 \begin_layout Standard
15217 These documents are supposed to be used in
15221 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15222 macros, and assume you'll know what to put in the preamble if necessary.
15225 \begin_layout Subsection
15229 \begin_layout Standard
15230 All you need to do is install RevTeX 4, as described in the package's README
15232 The package can be found at The RevTeX 4 Web Site
15233 \begin_inset Flex URL
15236 \begin_layout Plain Layout
15238 http://publish.aps.org/revtex4/
15244 Install it somewhere that LaTeX can see it.
15245 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15247 \begin_inset space \thinspace{}
15251 \begin_inset space \space{}
15254 not the directory where you installed the class file.) Then, if you reconfigure
15255 LyX, it will find the class file and let you use the RevTeX4 textclass.
15258 \begin_layout Standard
15259 Probably the easiest way to get started is either to import a RevTeX 4 document
15267 \begin_inset space ~
15272 template, found in the templates directory.
15275 \begin_layout Subsection
15279 \begin_layout Standard
15280 Optional arguments to
15287 \begin_inset Quotes eld
15291 \begin_inset Quotes erd
15295 \begin_inset Quotes eld
15299 \begin_inset Quotes erd
15309 \begin_inset space ~
15317 \begin_inset space ~
15323 Remember that in RevTeX, at least one optional argument is required!
15326 \begin_layout Standard
15327 Other preamble matter, like
15334 \begin_inset space ~
15340 \begin_inset space ~
15345 dialog, also as usual.
15348 \begin_layout Subsection
15352 \begin_layout Standard
15353 The layouts basically correspond to the commands in RevTeX4.0.
15354 For example, the Email layout corresponds to
15361 Note that (at least as of RevTeX 4.0 Beta), the
15369 layouts are exactly equivalent, so you shouldn't need to use both.
15373 \begin_layout Plain Layout
15374 In case you're curious, both were included so that
15378 would be able to translate both
15398 \begin_layout Subsection
15402 \begin_layout Standard
15403 There are a couple of important unique aspects of RevTeX 4 which might cause
15404 bugs that will be even more confusing in LyX.
15407 \begin_layout Standard
15425 The LyX equivalent is that there is a separate Thanks layout.
15430 write footnotes in the
15434 layout, or weird things may happen.
15435 See the RevTeX 4 documentation for more details.
15438 \begin_layout Standard
15442 \begin_inset space ~
15450 \begin_inset space ~
15459 layouts must be placed
15467 layout and the corresponding
15484 , the LaTeX won't compile.
15487 \begin_layout Subsection
15491 \begin_layout Standard
15492 The main problem with this layout is that you can't use the optional arguments
15493 to layouts like Email and Title.
15494 (The problem is not unique to this layout; you can't use optional arguments
15495 to the Section layouts either.) This means that after you export that file
15496 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15497 need to edit the LaTeX file with a text editor to add the optional arguments
15499 \begin_inset space \thinspace{}
15503 \begin_inset space \space{}
15506 the running title for the page headers.
15507 Lacking these layouts makes the
15513 (and the equivalent
15519 ) useless, so the corresponding layouts don't exist, and will have to be
15524 \begin_layout Plain Layout
15529 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15530 has not been updated yet to take advantage of it.
15538 \begin_layout Section
15539 Springer Journals (
15546 \begin_layout Standard
15552 \begin_layout Subsection
15556 \begin_layout Standard
15557 These are the layout files for some of the journal formats used by Springer
15558 Verlag and listed on
15559 \begin_inset Flex URL
15562 \begin_layout Plain Layout
15564 http://www.springer.de/author/tex/help-journals.html
15569 , where you should also go to fetch the class files (yes, these are LaTeX2e
15571 It is a modular system: the things common to all journals are implemented
15576 , which journal-specific layout files (such as, e.
15577 \begin_inset space \thinspace{}
15581 \begin_inset space \space{}
15588 for Journal of Geodesy) can include.
15591 \begin_layout Standard
15592 This means that implementing support for any other Springer journal on this
15593 list is as simple as writing your own
15601 file following the outline given in
15609 \begin_layout Standard
15610 It is reasonably well tested only for the Journal of Geodesy.
15619 come with the standard LyX distribution.
15620 Install the relevant class file (downloaded from Springer) in a proper
15621 directory, reconfigure LaTeX (in the teTeX case by running
15625 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15626 and it should work.
15629 \begin_layout Subsection
15633 \begin_layout Standard
15634 A large number of theorem-like styles —
15640 \SpecialChar \ldots{}
15646 \begin_layout Standard
15649 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15650 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15653 See the Springer class file documentation for details.
15656 \begin_layout Subsection
15660 \begin_layout Itemize
15672 \begin_layout Itemize
15675 Probability Theory and Related Fields
15681 — Jean-Marc Lasgouttes
15684 \begin_layout Standard
15685 Add your own, it isn't so hard!
15688 \begin_layout Subsection
15692 \begin_layout Standard
15693 These files are partly based on the older
15697 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15698 file from Springer.
15703 layout, are now defunct.
15704 Jean-Marc Lasgouttes helped out big in making me find my way around the
15705 LyX layout file mechanism.
15708 \begin_layout Subsection
15712 \begin_layout Standard
15714 But probably less than in the old hacked-LaTeX
15721 \begin_layout Standard
15723 \begin_inset space \thinspace{}
15726 g.: does not display the number for theorem-like layouts, just #.
15729 \begin_layout Section
15735 \begin_inset CommandInset label
15744 \begin_layout Standard
15752 \begin_layout Subsection
15756 \begin_layout Standard
15757 This section describes how to use LyX to make slides for overhead projectors.
15758 There are two document classes that can do this: the default slides class
15764 This section documents the former.
15767 \begin_layout Standard
15768 I'm going to say this again, nice and clear, so that there's no misunderstanding
15772 \begin_layout Standard
15773 \begin_inset VSpace bigskip
15779 \begin_layout Standard
15783 This section documents the class
15784 \begin_inset Quotes eld
15792 \begin_inset Quotes erd
15800 \begin_layout Standard
15801 \begin_inset VSpace bigskip
15807 \begin_layout Standard
15808 If you're looking for the documentation for
15809 \begin_inset Quotes eld
15817 \begin_inset Quotes erd
15820 , check out section
15821 \begin_inset space ~
15825 \begin_inset CommandInset ref
15827 reference "sec:foiltex"
15837 \begin_inset Quotes eld
15845 \begin_inset Quotes erd
15848 ] is actually somewhat better than the default
15856 \begin_layout Plain Layout
15857 \SpecialChar \ldots{}
15858 or so I've been told repeatedly by its advocates.
15859 Having never used it, I have no idea if this claim is true or not.
15864 which this section documents.
15867 \begin_layout Standard
15868 This class is the LaTeX2e improvement of the old
15873 Every LaTeX2e distribution includes this class [which I'll just refer to
15875 \begin_inset Quotes eld
15883 \begin_inset Quotes erd
15886 from now on], so you're bound to have it.
15887 As I noted earlier, there are other classes, such as
15891 , which also produce slides for overhead projectors and do a better job
15893 However, there are some things which
15897 can do which the others can't, such as generate overlays.
15898 Read on to learn more!
15901 \begin_layout Subsection
15903 \begin_inset CommandInset label
15905 name "sec:slidesetup"
15912 \begin_layout Standard
15913 Obviously, to use this document class, you need to select
15914 \begin_inset Quotes eld
15922 \begin_inset Quotes erd
15925 from the class list in the
15927 Document\SpecialChar \menuseparator
15931 There are some other special things you should know about this class:
15934 \begin_layout Itemize
15935 Don't bother changing the options
15940 They're not supported by the
15947 \begin_layout Itemize
15951 \begin_inset space ~
15956 behaves a bit differently for this class.
15957 The possible choices and what they do are as follows:
15961 \begin_layout Description
15966 The final output contains page numbers in the lower right corner.
15969 \begin_layout Description
15978 , but also prints out any time markers you've put in.
15979 This is the default.
15982 \begin_layout Description
15987 The final output contains no page numbers, time markers, or alignment markers.
15991 \begin_layout Itemize
15996 class has an extra option:
16002 \begin_inset Quotes eld
16010 \begin_inset Quotes erd
16013 in the extra class options.
16017 \begin_layout Standard
16018 Using this options allows you to add time markers to
16024 \begin_inset space ~
16028 \begin_inset CommandInset ref
16030 reference "sec:slideNote"
16038 \begin_layout Standard
16039 You can also use the template file
16040 \begin_inset Quotes eld
16048 \begin_inset Quotes erd
16051 to automatically set up a document to use the
16057 File\SpecialChar \menuseparator
16059 \begin_inset space ~
16063 \begin_inset space ~
16068 to open your new document].
16069 The template file also contains some examples of the special paragraph
16070 environments used by this class.
16071 I'll describe those next.
16074 \begin_layout Subsection
16075 Paragraph Environments
16078 \begin_layout Subsubsection
16079 Supported Environments
16082 \begin_layout Standard
16083 The first thing you'll notice when you start up a new
16087 document is the font size and type: it's the equivalent of the size
16088 \begin_inset Quotes eld
16096 \begin_inset Quotes erd
16102 \begin_inset space ~
16108 This is also what's used in the output.
16110 \begin_inset Quotes eld
16114 \begin_inset Quotes erd
16117 to remind you that this is a slide.
16118 Your final slides will use a larger font; ergo, you'll have less space.
16119 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16122 \begin_layout Standard
16123 The next thing that becomes obvious is the changes to the paragraph environment
16124 pull-down box [at the far-left end of the toolbar].
16125 Most of the paragraph environments you're used to seeing are missing.
16126 There are also five new ones.
16131 class itself only supports certain paragraph environments:
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Itemize
16152 \begin_layout Itemize
16158 \begin_layout Itemize
16164 \begin_layout Itemize
16170 \begin_layout Itemize
16176 \begin_layout Itemize
16182 \begin_layout Itemize
16188 \begin_layout Itemize
16194 \begin_layout Itemize
16200 \begin_layout Standard
16201 All of the other standard environments, including the section-heading environmen
16202 ts, aren't used in the
16209 \begin_layout Standard
16210 On the other hand, you'll notice the following new environments:
16213 \begin_layout Itemize
16219 \begin_layout Itemize
16225 \begin_layout Itemize
16231 \begin_layout Itemize
16237 \begin_layout Itemize
16243 \begin_layout Standard
16244 These five are kind of quirky, due to a
16245 \begin_inset Quotes eld
16249 \begin_inset Quotes erd
16253 You see, LyX doesn't permit you to nest any other paragraph environment
16254 into an empty environment.
16255 Now, that's fine and dandy, but it means that you wouldn't be able to start
16256 a slide with anything except plain text.
16257 To deal with this, I've performed a little
16258 \begin_inset Quotes eld
16262 \begin_inset Quotes erd
16268 \begin_layout Subsubsection
16269 Quirks of the New Environments
16270 \begin_inset CommandInset label
16272 name "sec:slideQuirk"
16279 \begin_layout Standard
16280 All five of the new paragraph environments are somewhat quirky due to inherent
16281 limitiations in the current version of LyX.
16282 As I just mentioned, LyX forbids environments that begin with another environme
16284 To get around this, the
16288 environment isn't a paragraph environment as described in the
16296 \begin_layout Standard
16297 You should consider
16310 \begin_inset Quotes eld
16313 pseudo-environments.
16314 \begin_inset Quotes erd
16317 They look like a section heading or a
16318 \begin_inset Quotes eld
16326 \begin_inset Quotes erd
16329 but really begin a [and, if necessary, end the previous] paragraph environment.
16339 \begin_inset Quotes eld
16343 \begin_inset Quotes erd
16346 These two perform some action.
16349 \begin_layout Standard
16350 A common feature of all five environments,
16370 , is a rather long-ish label.
16371 The text following this label — ordinarily the contents of the paragraph
16372 environment — is utterly irrelevant for
16393 LyX completely ignores it.
16394 In fact, you can leave these five environments completely empty.
16398 \begin_layout Standard
16403 to put any text after the rather long-ish label, you might want to.
16404 This could be a short description of the contents of the
16409 In that case, enter your descriptive comment and hit
16413 as you normally would.
16416 \begin_layout Standard
16417 If, on the other hand, you don't want to enter any descriptive text, you'll
16418 hit another LyX quirk.
16419 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16420 environment until you put something in the old one.
16424 \begin_layout Itemize
16425 Start entering the text that will
16453 \begin_layout Itemize
16454 Now move to the beginning of that paragraph.
16458 \begin_layout Itemize
16467 \begin_layout Itemize
16468 Finally, change this new, empty paragraph to a
16492 \begin_layout Standard
16493 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16497 \begin_layout Subsection
16498 Making a Presentation with
16511 \begin_layout Subsubsection
16519 \begin_layout Standard
16520 If you're expecting this section to teach you how to actually make a presentatio
16521 n, you'll be sorely disappointed.
16522 Naturally, I'll describe all of the ways the
16526 class can assist you in preparing the materials for a presentation.
16527 Filling in the contents, however, is up to you.
16532 the LyX philosophy.]
16535 \begin_layout Standard
16540 environment [in the manner described in section
16541 \begin_inset space ~
16545 \begin_inset CommandInset ref
16547 reference "sec:slideQuirk"
16551 ] tells LyX to begin a new slide [duh].
16552 The label for this environment/
16553 \begin_inset Quotes erd
16557 \begin_inset Quotes erd
16561 \begin_inset Quotes eld
16565 \begin_inset Quotes erd
16568 in cool blue, followed by the label,
16569 \begin_inset Quotes eld
16573 \begin_inset Quotes erd
16577 Any text or paragraph environments that follow this one go on the new slide.
16581 \begin_layout Standard
16582 Slides are probably the only time you'll need to forcibly end pages in LyX
16583 (this can be specified in the
16588 In fact, you'll want to, once you finish entering the contents of one slide.
16589 If you've entered more text than can physically fit on a slide, the extra
16590 overflows onto a new slide.
16591 I don't recommend doing this, however, since the overflow slide won't have
16592 any page number on it.
16593 Furthermore, it may interfere with any
16597 you've made to accompany the oversized
16604 \begin_layout Standard
16613 environments work the same way as the
16618 They both create an
16619 \begin_inset Quotes eld
16623 \begin_inset Quotes erd
16626 followed by a label [
16627 \begin_inset Quotes eld
16631 \begin_inset Quotes erd
16635 \begin_inset Quotes eld
16639 \begin_inset Quotes erd
16643 The color is a stunning magenta instead of blue, and the
16644 \begin_inset Quotes eld
16648 \begin_inset Quotes erd
16651 will look different, in style and in length.
16652 The label fonts of all three also differ from one another.
16655 \begin_layout Standard
16660 , if the contents of a
16668 exceed the physical size of a slide or sheet of paper, the extra will overflow
16670 Again, you should avoid this.
16671 It defeats the whole purpose of
16682 \begin_layout Subsubsection
16692 \begin_layout Standard
16697 is a slide that sits atop another slide.
16698 Perhaps you wish to discuss a figure on the main
16702 before displaying the text associated with it.
16703 One way to accomplish this is tape a flap of dark paper over the part of
16708 you want to display later.
16709 This method fails, however, if you wish to overlap one graph with another,
16711 You would then have to fumble while speaking to align the two separate,
16716 s to align the two graphs.
16721 environment in both cases makes life much easier.
16724 \begin_layout Standard
16729 receives the page number of its
16730 \begin_inset Quotes eld
16734 \begin_inset Quotes erd
16742 \begin_inset Quotes eld
16750 \begin_inset Quotes erd
16757 \begin_layout Plain Layout
16758 Presumably, mutliple
16763 \begin_inset Quotes eld
16771 \begin_inset Quotes erd
16775 \begin_inset Quotes eld
16783 \begin_inset Quotes erd
16787 \begin_inset Quotes eld
16795 \begin_inset Quotes erd
16799 \begin_inset space ~
16802 appended to the page number of the parent
16812 Clearly, you want the contents of both the
16820 to each fit on a single physical slide! You should probably consider an
16826 \begin_inset Quotes eld
16830 \begin_inset Quotes erd
16842 class provides a visual cue for this: the label at the start of an
16846 is shorter than that at the start of a
16851 Lastly, when you generate printable output, you'll find alignment markers
16852 in all four corners of both the
16856 page and its parent
16861 These will assist you in lining up the two physical slides.
16864 \begin_layout Standard
16865 The major problem in overlaying two slides is aligning the contents of the
16866 two transparencies.
16867 How much space should you leave for that graph on the second slide? Worse
16868 still, what if you want a graph and a sentence on second slide, but there
16869 is text on the main transparency that goes in between them? You could try
16870 and insert vertical space of the right size.
16871 The better way is to use
16882 \begin_layout Standard
16883 As their names imply,
16891 are two command-like paragraph environments that make all subsequent text
16892 invisible and visible, respectively.
16894 \begin_inset space ~
16898 \begin_inset CommandInset ref
16900 reference "sec:slideQuirk"
16904 that you don't place anything
16908 these two environments, however.
16913 , it inserts a centered, sky-blue label into the page reading
16914 \begin_inset Quotes eld
16917 <Invisible Text Follows>
16918 \begin_inset Quotes erd
16922 For paragraphs following this label, the parts of the
16930 ; it doesn't matter which] where they would be contain instead blank space.
16934 \begin_layout Standard
16939 , the corresponding centered label is
16940 \begin_inset Quotes eld
16943 <Visible Text Follows>
16944 \begin_inset Quotes erd
16948 Paragraphs following this label behave normally.
16949 Note that the beginning of a new
16961 automatically shuts off an
16966 It's therefore not necessary to use
16977 \begin_layout Standard
16978 By now, it should be obvious how to create overlay transparencies using
16979 the proper combination of
16998 \begin_layout Enumerate
17003 , including everything that will appear on it, whether on the main slide
17011 \begin_layout Enumerate
17012 Before each figure or paragraph that will appear only on the
17021 If necessary, insert a
17025 environment after the
17032 \begin_layout Enumerate
17037 immediately following the
17044 \begin_layout Enumerate
17045 Copy the contents of this
17056 \begin_layout Enumerate
17061 , change all of the
17072 \begin_layout Standard
17074 You've just made an
17081 \begin_layout Standard
17082 There's one problem with the way I've designed the LyX
17086 class: you can't make text in the middle of a paragraph invisible, nor
17087 make text in the middle of an invisible paragraph visible again.
17088 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17092 \begin_layout Plain Layout
17093 The commands of interest are:
17096 \begin_layout Itemize
17101 invisible \SpecialChar \ldots{}
17105 \begin_layout Itemize
17110 visible \SpecialChar \ldots{}
17114 \begin_layout Plain Layout
17115 \SpecialChar \ldots{}
17116 and need to be marked as TeX.
17118 \begin_inset Quotes eld
17122 \begin_inset Quotes erd
17125 you wish to change goes in between the brackets [and after the
17138 If you don't know how to mark text as TeX, see the appropriate section
17151 \begin_layout Subsubsection
17161 \begin_inset CommandInset label
17163 name "sec:slideNote"
17170 \begin_layout Standard
17179 is associated with a
17180 \begin_inset Quotes eld
17184 \begin_inset Quotes erd
17196 class provides visual cues.
17201 is shorter than that of a
17205 [yet longer than that of an
17209 ] and, like the label of an
17213 is shockingly magenta.
17214 Additionally, the printed
17218 has the page number of its
17219 \begin_inset Quotes eld
17223 \begin_inset Quotes erd
17231 \begin_inset Quotes eld
17239 \begin_inset Quotes erd
17243 \begin_inset Quotes eld
17251 \begin_inset Quotes erd
17255 \begin_inset Quotes eld
17263 \begin_inset Quotes erd
17267 You can have multiple
17271 s associated with a single
17283 , you'll probably want to break up long
17287 s so that they fit on a single sheet of paper.
17290 \begin_layout Standard
17295 is obvious: it contains anything additional you might want to say about
17301 It could also be used as a sheet of reminders for a particular
17306 In the case of the latter, you might want to make use of time markers.
17312 \begin_inset Quotes eld
17316 \begin_inset Quotes erd
17319 support for time markers, a
17324 So, you'll have to resort to using the LaTeX codes.
17327 \begin_layout Standard
17328 To use time markers, you'll need to specify the extra class option
17329 \begin_inset Quotes eld
17337 \begin_inset Quotes erd
17341 \begin_inset space ~
17345 \begin_inset CommandInset ref
17347 reference "sec:slidesetup"
17352 This option turns on timing marks, which will appear in the lower-left-hand
17358 To set what appears in the time marker, you use the LaTeX commands
17359 \begin_inset Quotes eld
17369 \begin_inset Quotes erd
17373 \begin_inset Quotes eld
17383 \begin_inset Quotes erd
17387 The arguments of both commands are time measured in seconds.
17389 \begin_inset Quotes eld
17399 \begin_inset Quotes erd
17402 sets the time marker to a given time.
17404 \begin_inset Quotes eld
17414 \begin_inset Quotes erd
17417 increments the time marker by the specified amount.
17418 Using time markers and
17422 s in this fashion, you can remind yourself how much time to spend on a particula
17430 \begin_layout Standard
17431 There's one last feature to describe.
17432 Clearly, you'd like to print out all of your
17440 s on transparencies while printing all of your
17457 with which it is associated.
17458 What's a person to do?
17461 \begin_layout Standard
17462 Luckily, there are two LaTeX commands that allow you to select what to print
17464 Both must be placed into the preamble of your document.
17466 \begin_inset Quotes eld
17478 \begin_inset Quotes erd
17481 will cause the output to contain only the
17490 Correspondingly, the command
17491 \begin_inset Quotes eld
17503 \begin_inset Quotes erd
17506 prevents the output of anything but
17511 I'd advise placing both commands in the preamble and initially comment
17513 You can then preview your entire presentation as you write.
17514 When you're done writing, you can then uncomment one of the two to select
17515 what you want to print.
17516 I like to uncomment
17517 \begin_inset Quotes eld
17529 \begin_inset Quotes erd
17532 , print to a file with
17533 \begin_inset Quotes eld
17541 \begin_inset Quotes erd
17544 in its name, comment it back out, then uncomment
17545 \begin_inset Quotes eld
17557 \begin_inset Quotes erd
17561 \begin_inset Quotes eld
17569 \begin_inset Quotes erd
17573 I can then send either file to a printer, loading transparencies or plain
17574 paper as appropriate.
17577 \begin_layout Standard
17578 You can also provide other arguments to the
17579 \begin_inset Quotes eld
17589 \begin_inset Quotes erd
17593 \begin_inset Quotes eld
17603 \begin_inset Quotes erd
17607 See a good LaTeX book for details.
17610 \begin_layout Subsection
17615 Class Template File
17618 \begin_layout Standard
17619 I have also provided a template file,
17620 \begin_inset Quotes eld
17628 \begin_inset Quotes erd
17636 To use it, begin your new presentation with
17641 ile\SpecialChar \menuseparator
17643 \begin_inset space ~
17647 \begin_inset space ~
17657 Your new LyX presentation file will contain an example
17678 additionally contain an example of the use of
17687 Lastly, the preamble will contain:
17690 \begin_layout LyX-Code
17691 % Uncomment to print out only slides and overlays
17694 \begin_layout LyX-Code
17698 \begin_layout LyX-Code
17704 \begin_inset Newline newline
17710 \begin_layout LyX-Code
17711 % Uncomment to print out only notes
17714 \begin_layout LyX-Code
17718 \begin_layout LyX-Code
17726 \begin_layout Standard
17727 One final thing: I created this class to support the LaTeX2e
17728 \begin_inset Quotes eld
17736 \begin_inset Quotes erd
17739 class, one of the built-in LaTeX2e classes.
17740 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17741 built-in slide class.
17742 It's here if you want it or need it.
17743 There exist other LaTeX2e classes for creating presentations, such as the
17749 \begin_inset space ~
17753 \begin_inset CommandInset ref
17755 reference "sec:foiltex"
17760 \begin_inset Quotes eld
17768 \begin_inset Quotes erd
17771 package [present on some TeX distributions].
17772 The latter is not yet supported under LyX.
17776 \begin_layout Plain Layout
17777 Perhaps you can take on the task\SpecialChar \ldots{}
17783 I know nothing about these other classes.
17784 Try them out to see what sort of alternative they provide.
17787 \begin_layout Chapter
17788 LyX Features needing Extra Software
17791 \begin_layout Section
17795 \begin_layout Standard
17801 \begin_layout Subsection
17805 \begin_layout Standard
17814 \begin_layout Plain Layout
17819 is not yet available when you are using the LaTeX distribution MiKTeX.
17824 , you'll find in the
17831 \begin_inset space ~
17842 \begin_inset Newline newline
17846 \begin_inset CommandInset href
17848 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17855 \begin_layout Standard
17860 package is a program that was written by
17861 \begin_inset Flex Noun
17864 \begin_layout Plain Layout
17866 \begin_inset space ~
17874 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17875 and easy to forget.
17876 The program runs over your LaTeX file, checks the integrity of the file,
17877 and flags some common errors.
17878 In other technical words, it is
17885 \begin_layout Standard
17886 Well, what is a syntax checker doing in LyX which is supposed to produce
17887 correct LaTeX anyways? The answer is simple: Just as
17891 not only checks the
17895 of C programs, but also does
17899 checks for type-errors,
17903 catches some common
17907 errors, in addition to the syntactical ones.
17912 is capable of detecting several common errors, such as
17915 \begin_layout Itemize
17916 Ellipsis detection:
17917 \begin_inset Newline newline
17920 Use \SpecialChar \ldots{}
17924 \begin_layout Itemize
17925 No space in front of/after parenthesis:
17926 \begin_inset Newline newline
17932 \begin_layout Itemize
17933 Enforcement of normal space after common abbreviations:
17934 \begin_inset Newline newline
17938 \begin_inset space \thinspace{}
17942 \begin_inset space \space{}
17945 is too wide spacing.
17948 \begin_layout Itemize
17949 Enforcement of end-of-sentence space when the last sentence ends with a
17951 \begin_inset Newline newline
17955 And this is wrong spacing.
17958 \begin_layout Itemize
17959 Space in front of labels and similar commands:
17960 \begin_inset Newline newline
17963 The label should stick right up to the text to avoid falling to a wrong
17966 \begin_inset CommandInset label
17976 \begin_layout Plain Layout
17977 This footnote is in danger of falling off to a wrong page
17982 The label is separated too much.
17985 \begin_layout Itemize
17986 Space in front of references, instead of hard spaces:
17987 \begin_inset Newline newline
17990 If you have bad luck, the text will break right between the referenced text
17991 and reference number, and that's a pity.
17993 \begin_inset CommandInset ref
17995 reference "sec:chktex"
18002 \begin_layout Itemize
18004 \begin_inset Quotes eld
18008 \begin_inset Quotes erd
18012 \begin_inset Formula $\times$
18016 \begin_inset Newline newline
18019 2x2 looks cheap compared to
18020 \begin_inset Formula $2\times2$
18026 \begin_layout Standard
18027 and more \SpecialChar \ldots{}
18028 It is an invaluable tool when you are
18029 \begin_inset Quotes eld
18033 \begin_inset Quotes erd
18036 your document before printing, and you should run it right after the obligatory
18037 spelling check, and before you go fine tuning the typesetting.
18040 \begin_layout Subsection
18044 \begin_layout Standard
18045 If you have the program installed, usage is as simple as choosing
18047 Tools\SpecialChar \menuseparator
18049 \begin_inset space ~
18055 This will make LyX generate a LaTeX file of your document, start
18059 to check it, and then make LyX insert
18060 \begin_inset Quotes eld
18064 \begin_inset Quotes erd
18067 with the warnings from
18071 , if there were any.
18072 The warnings will be placed close to the point of the mistake, and you
18073 can quickly find them by using the
18075 Navigate\SpecialChar \menuseparator
18078 menu item, or the shortcut key
18087 Open the error boxes by clicking on them with the mouse, or use the shortcut
18096 bindings, or the corresponding
18105 Read the warning and correct the mistake, if it is a mistake.
18106 If you have trouble understanding what the warning is about, you can safely
18108 Remember that there is a hidden layer between the document on screen and
18109 the technical details in invoking
18113 , and this gap can make some warnings seem arcane or just plain silly.
18116 \begin_layout Standard
18117 This document is an excellent testing bed for the feature, and it should
18118 provide quite a few warnings for you to fiddle with.
18119 Since computers are only so smart, expect most of the warnings to be false
18123 \begin_layout Subsection
18124 How to fine tune it
18127 \begin_layout Standard
18128 Sometimes, you'll find that
18132 makes more noise than suits your mood.
18133 Then you can choose not to use it, wait until your mood changes, or try
18138 to get better along with you.
18141 \begin_layout Standard
18150 very configurable and extensible, you shouldn't expect to solve all problems
18156 Since LyX has to generate a somewhat special LaTeX file to be able to match
18157 the line numbers from the
18165 \begin_layout Plain Layout
18166 You can inspect the specific output from
18172 Edit\SpecialChar \menuseparator
18174 \begin_inset space ~
18178 \begin_inset space ~
18192 to the internal document structure, some of the warnings will not appear
18194 There are two things you can do about this:
18197 \begin_layout Itemize
18202 invocation command line in
18203 \begin_inset Flex MenuItem
18206 \begin_layout Plain Layout
18207 Tools\SpecialChar \menuseparator
18208 Preferences\SpecialChar \menuseparator
18209 Output\SpecialChar \menuseparator
18210 LaTeX\SpecialChar \menuseparator
18220 installation configuration file (usually with the file
18225 See below to learn what warnings can be enabled and disabled on the command
18229 \begin_layout Itemize
18230 Export your document as a raw LaTeX file using
18232 File\SpecialChar \menuseparator
18233 Export\SpecialChar \menuseparator
18241 Invoked in this way, it can be a hassle to find the corresponding place
18242 in the document inside LyX, but with a little patience, you should be able
18246 \begin_layout Standard
18247 Here follows the warning messages that can be enabled and disabled in
18256 to disable a warning, and
18260 to enable a warning.
18261 The emphasized entries are disabled by default, because the default is
18264 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18269 \begin_layout Standard
18270 Notice that you should only use the options that enable and disable warnings,
18271 because LyX relies on some of the other command line parameters to be set
18272 in a specific way to have a chance to communicate with
18279 \begin_layout Enumerate
18283 Command terminated with space.
18286 \begin_layout Enumerate
18289 Non-breaking space (
18290 \begin_inset Quotes eld
18298 \begin_inset Quotes erd
18301 ) should have been used.
18304 \begin_layout Enumerate
18308 You should enclose the previous parenthesis with
18309 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18323 \begin_layout Enumerate
18326 Italic correction (
18327 \begin_inset Quotes eld
18337 \begin_inset Quotes erd
18340 ) found in non-italic buffer.
18343 \begin_layout Enumerate
18346 Italic correction (
18347 \begin_inset Quotes eld
18357 \begin_inset Quotes erd
18360 ) found more than once.
18363 \begin_layout Enumerate
18367 No italic correction (
18368 \begin_inset Quotes eld
18378 \begin_inset Quotes erd
18384 \begin_layout Enumerate
18388 \begin_inset Quotes eld
18396 \begin_inset Quotes erd
18400 \begin_inset Quotes eld
18408 \begin_inset Quotes erd
18414 \begin_layout Enumerate
18417 Wrong length of dash may have been used.
18420 \begin_layout Enumerate
18424 \begin_inset Quotes eld
18432 \begin_inset Quotes erd
18436 \begin_inset Quotes eld
18444 \begin_inset Quotes erd
18450 \begin_layout Enumerate
18454 \begin_inset Quotes eld
18462 \begin_inset Quotes erd
18468 \begin_layout Enumerate
18472 \begin_inset Quotes eld
18480 \begin_inset Quotes erd
18483 to achieve an ellipsis.
18486 \begin_layout Enumerate
18489 Inter-word spacing (
18490 \begin_inset Quotes eld
18500 \begin_inset Quotes eld
18503 ) should perhaps be used.
18506 \begin_layout Enumerate
18509 Inter-sentence spacing (
18510 \begin_inset Quotes eld
18520 \begin_inset Quotes erd
18523 ) should perhaps be used.
18526 \begin_layout Enumerate
18529 Could not find argument for command.
18532 \begin_layout Enumerate
18536 \begin_inset Quotes eld
18544 \begin_inset Quotes erd
18550 \begin_layout Enumerate
18553 Math mode still on at end of LaTeX file.
18556 \begin_layout Enumerate
18560 \begin_inset Quotes eld
18568 \begin_inset Quotes erd
18571 doesn't match the number of
18572 \begin_inset Quotes eld
18580 \begin_inset Quotes erd
18586 \begin_layout Enumerate
18589 You should use either
18592 \begin_inset Quotes eld
18600 \begin_inset Quotes erd
18605 as an alternative to
18606 \begin_inset Quotes eld
18614 \begin_inset Quotes erd
18620 \begin_layout Enumerate
18627 " (ASCII 39) instead of "
18634 \begin_layout Enumerate
18637 User-specified pattern found.
18640 \begin_layout Enumerate
18643 This command might not be intended.
18646 \begin_layout Enumerate
18653 \begin_layout Enumerate
18671 \begin_layout Enumerate
18674 Delete this space to maintain correct page references.
18677 \begin_layout Enumerate
18681 You might wish to put this between a pair of
18682 \begin_inset Quotes eld
18690 \begin_inset Quotes erd
18696 \begin_layout Enumerate
18699 You ought to remove spaces in front of punctuation.
18702 \begin_layout Enumerate
18705 Could not execute LaTeX command.
18708 \begin_layout Enumerate
18717 in front of small punctuation.
18720 \begin_layout Enumerate
18728 may look prettier here.
18731 \begin_layout Enumerate
18735 Multiple spaces detected in output.
18738 \begin_layout Enumerate
18741 This text may be ignored.
18744 \begin_layout Enumerate
18750 \begin_inset Quotes eld
18755 to begin quotation, not
18762 \begin_layout Enumerate
18769 to end quotation, not
18772 \begin_inset Quotes eld
18780 \begin_layout Enumerate
18786 \begin_layout Enumerate
18789 You should perhaps use
18790 \begin_inset Quotes eld
18798 \begin_inset Quotes erd
18804 \begin_layout Enumerate
18807 You should put a space in front of/after parenthesis.
18810 \begin_layout Enumerate
18813 You should avoid spaces in front of/after parenthesis.
18816 \begin_layout Enumerate
18820 You should not use punctuation in front of/after quotes.
18823 \begin_layout Enumerate
18826 Double space found.
18829 \begin_layout Enumerate
18832 You should put punctuation outside inner/inside display math mode.
18835 \begin_layout Enumerate
18838 You ought to not use primitive TeX in LaTeX code.
18841 \begin_layout Enumerate
18844 You should remove spaces in front of
18845 \begin_inset Quotes eld
18853 \begin_inset Quotes erd
18859 \begin_layout Enumerate
18862 \begin_inset Quotes eld
18870 \begin_inset Quotes erd
18873 is normally not followed by
18874 \begin_inset Quotes eld
18882 \begin_inset Quotes erd
18888 \begin_layout Standard
18889 In later versions of LyX, we hope to provide a more complete interface to
18890 this tool (and it's smaller cousin
18894 ) to exploit the full power of it.
18895 But it's not exactly useless as it is now: go try it on one of your existing
18896 documents of a certain length and be surprised.
18899 \begin_layout Section
18900 Version Control in LyX
18903 \begin_layout Standard
18906 Lars Gullik Bjønnes
18913 \begin_layout Subsection
18917 \begin_layout Standard
18918 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18919 If you need something a bit more sophisticated you will have to do that
18920 manually in a terminal.
18923 \begin_layout Standard
18924 Also note that CVS support is not as good as subversion support so we advise
18926 A good place to start learning Subversion is SVN Book
18930 \begin_layout Plain Layout
18931 \begin_inset CommandInset href
18933 target "http://svnbook.red-bean.com/"
18943 In the case of RCS you should read
18944 \begin_inset Quotes eld
18948 \begin_inset Quotes erd
18951 (a man file, read it with
18956 This file describes all the basic features of RCS.
18957 You should especially notice the comment about a RCS directory, and the
18958 notion of a master RCS file (the file ending in
18965 \begin_layout Standard
18966 Before you begin to use the version control features in LyX, you should
18967 be familiar with RCS/CVS/SVN/GIT usage.
18968 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18969 package — no guarantees are made for older versions.
18970 Most of the log messages are not currently displayed after operations —
18971 you can check them in the Messages pane if unsure.
18972 Regular users of version control will appreciate VC toolbar, which can
18975 View\SpecialChar \menuseparator
18976 Toolbars\SpecialChar \menuseparator
18978 \begin_inset space ~
18986 \begin_layout Standard
18987 For introducing your own external commands consult vc-command in the manual
18991 \begin_layout Subsection
18992 RCS commands in LyX
18995 \begin_layout Standard
18996 The following sections describe the RCS commands supported by LyX.
18997 You can find them in the
18999 File\SpecialChar \menuseparator
19001 \begin_inset space ~
19007 LyX was tested against RCS 5.7/5.8
19011 \begin_layout Plain Layout
19012 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19013 in order to work properly with LyX.
19014 In particular time zone (TZ) should be set and more importantly RCSINIT
19015 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19016 expects archive to be found in file.lyx,v within the original document directory.
19017 See also README shipped with Windows RCS binaries.
19025 \begin_layout Subsubsection
19031 \begin_layout Standard
19032 If your document is not under revision control, this is the only item shown
19034 And if it is under revision control, the
19038 item is not visible.
19042 \begin_layout Standard
19043 This command registers your document with RCS (unless you are under the
19044 directory managed by CVS)\SpecialChar \@.
19045 You are asked interactively to supply an initial
19046 description of the document.
19047 The document is now set in Read-Only mode and you have to
19050 \begin_inset space ~
19054 \begin_inset space ~
19058 \begin_inset space ~
19063 , before making any changes to it.
19064 A document under revision control has a
19065 \begin_inset Quotes eld
19068 [RCS:<version> <locker>]
19069 \begin_inset Quotes erd
19072 item tagged to the filename in the minibuffer.
19075 \begin_layout Standard
19076 RCS command that is run:
19078 ci -q -u -i -t-"<initial description>" <file-name>
19081 \begin_layout Standard
19086 to understand the switches.
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 When you are finished editing a file, you check in your changes.
19098 When you do this, you are asked for a description of the changes.
19099 This is stored in the history log.
19100 The version number is bumped, your changes are applied to the master RCS
19101 file, the document is unlocked and set to Read-Only mode.
19104 \begin_layout Standard
19107 ci -q -u -m"<description>" <file-name>
19110 \begin_layout Subsubsection
19116 \begin_layout Standard
19117 By doing this you lock the document so that only you can edit it.
19118 This will also make the document Read-Write only for you.
19119 You will usually continue editing for a while and when you are finished
19120 you check in your changes.
19121 The status line is changed to reflect that you have locked the file.
19124 \begin_layout Standard
19127 co -q -l <file-name>
19130 \begin_layout Subsubsection
19133 Revert To Repository Version
19136 \begin_layout Standard
19137 This will discard all changes made to the document since the last check
19139 You get a warning before changes are discarded.
19142 \begin_layout Standard
19145 co -f -u<version> <file-name>
19148 \begin_layout Subsubsection
19154 \begin_layout Standard
19155 This will create a copy of the current document.
19156 Since RCS does not support copy operations natively, the version history
19157 is not preserved, and the copy is added as a new file.
19158 It requires a clean document without any changes since the last checkin.
19159 You are asked for a file name and a description of the copy operation.
19160 After that the copy is created, both locally and in the repository.
19161 If the parent directories of the copied and original document differ, all
19162 relative paths of included files of the copy are adjusted (like in
19164 File\SpecialChar \menuseparator
19167 \SpecialChar \ldots{}
19169 Finally, the copy is loaded instead of the original document.
19172 \begin_layout Labeling
19173 \labelwidthstring 00.00.0000
19175 \begin_inset space ~
19179 \begin_inset space ~
19183 \begin_inset Newline newline
19187 \begin_inset Flex Code
19190 \begin_layout Plain Layout
19193 \begin_inset Quotes eld
19197 \begin_inset Quotes erd
19206 \begin_inset Flex Code
19209 \begin_layout Plain Layout
19212 \begin_inset Quotes eld
19216 \begin_inset Quotes erd
19225 \begin_inset Newline newline
19229 \begin_inset Flex Code
19232 \begin_layout Plain Layout
19236 \begin_inset Quotes eld
19240 \begin_inset Quotes erd
19251 \begin_layout Subsubsection
19257 \begin_layout Standard
19258 This makes as if the last check in never happened.
19259 No changes are made to the document loaded into LyX, but the last version
19260 is removed from the master RCS file.
19263 \begin_layout Standard
19266 rcs -o<version> <file-name>
19269 \begin_layout Subsubsection
19275 \begin_layout Standard
19276 This shows the complete history of the RCS document.
19281 is shown in a browser.
19289 \begin_layout Subsubsection
19293 \begin_layout Standard
19294 LyX supports RCS version number, author name, date and time of last commit.
19295 All those are extracted from
19297 rlog -r <file-name>
19301 \begin_inset CommandInset ref
19303 reference "sub:VCS-Revision-Information"
19310 \begin_layout Subsection
19311 CVS commands in LyX
19314 \begin_layout Standard
19315 A subset of CVS operations is supported by LyX.
19316 You can find the commands in the
19318 File\SpecialChar \menuseparator
19320 \begin_inset space ~
19326 The version control system SVN is more powerful, so please use it instead
19327 of CVS if possible.
19330 \begin_layout Subsubsection
19336 \begin_layout Standard
19337 If you start from scratch with CVS you have to create your repository and
19338 checkout the working copy with external tools.
19339 If you're using a client-server setup you may need to login before doing
19340 the first repository checkout.
19343 \begin_layout Standard
19344 If your documents are under revision control and others are using the same
19345 repository problems arise when different changes to the same document at
19346 the same location happen.
19347 Standard CVS repositories don't operate with a file locking mechanism.
19348 This may be surprising, but conflicts only occur if people disagree on
19349 the proper content of the same part of a document.
19350 So, if co-workers are used to communicate regularly, these conflicts occur
19352 If they don't communicate they have a fundamental problem anyway.
19353 Nevertheless some people like to work with so called
19354 \begin_inset Quotes eld
19358 \begin_inset Quotes erd
19362 If they do so the working copy of all files is readonly when checked out
19363 first and the user starts editing after using a special command to make
19364 the working copy writable.
19365 When the changes are checked in the working copy returns to readonly state.
19366 With LyX one has to edit the
19367 \begin_inset Flex Code
19370 \begin_layout Plain Layout
19376 file and add the line
19377 \begin_inset Flex Code
19380 \begin_layout Plain Layout
19386 to work with reserved checkouts.
19387 The benefit is the possibility to see who is using a writable copy of some
19389 It's not guaranteed only one user makes a copy writable.
19392 \begin_layout Standard
19393 LyX tries to guess if you're using reserved or non-reserved checkouts.
19394 If your working copy is readonly or it is writable and an additional copy
19395 of your document exists in the CVS/Base sub-directory a reserved otherwise
19396 a non-reserved checkout is assumed.
19397 When a reserved checkout is detected you have to use
19398 \begin_inset Flex MenuItem
19401 \begin_layout Plain Layout
19407 to make your working copy writable if it's readonly.
19409 \begin_inset Flex MenuItem
19412 \begin_layout Plain Layout
19418 operation is possible and that makes your working copy readonly again after
19419 transferring your changes to the repository.
19422 \begin_layout Standard
19423 More information about CVS can be found here
19424 \begin_inset Flex URL
19427 \begin_layout Plain Layout
19429 http://www.nongnu.org/cvs
19435 \begin_inset Flex URL
19438 \begin_layout Plain Layout
19440 http://ximbiot.com/cvs
19448 \begin_layout Standard
19453 to understand the sub-commands and the switches mentioned below.
19456 \begin_layout Subsubsection
19462 \begin_layout Standard
19463 If your document is not under revision control, this is the only item shown
19465 And if it is under revision control, the
19472 item is not visible.
19476 \begin_layout Standard
19477 This command registers in CVS your document
19478 \begin_inset Flex Strong
19481 \begin_layout Plain Layout
19489 in the case you have already the documents directory under CVS control
19495 This means you have to create or checkout the archive by yourself using
19497 (In case you forget that step LyX registers the document with RCS.)
19500 \begin_layout Standard
19501 Then you are asked interactively to supply an initial description of the
19503 Don't forget that registered file is not yet checked in.
19506 \begin_layout Standard
19507 CVS command that is run:
19509 cvs -q add -m"<entered message>" "<file-name>"
19512 \begin_layout Standard
19517 above and for all other CVS commands is an abbreviation for
19518 \begin_inset Quotes eld
19521 change the current working directory to file location and use the file name
19522 without path component as argument
19523 \begin_inset Quotes erd
19529 \begin_layout Subsubsection
19535 \begin_layout Standard
19536 When you are finished editing a file, you commit your changes.
19537 When you do this and you had changed the document, you are asked for a
19538 description of the changes.
19539 After that changes are written to the repository.
19540 In case you didn't change the document and a reserved checkout is detected
19541 the reservation made on
19542 \begin_inset Flex MenuItem
19545 \begin_layout Plain Layout
19554 \begin_layout Labeling
19555 \labelwidthstring 00.00.0000
19557 \begin_inset space ~
19561 \begin_inset space ~
19565 \begin_inset Newline newline
19569 \begin_inset Flex Code
19572 \begin_layout Plain Layout
19575 -q commit -m"<description>" "<file-name>"
19581 \begin_inset Newline newline
19585 \begin_inset Flex Code
19588 \begin_layout Plain Layout
19599 \begin_layout Subsubsection
19605 \begin_layout Standard
19606 When you are sharing a repository with others, you may have to incorporate
19607 their changes into your working copy.
19610 \begin_layout Standard
19613 cvs -q update "<file-name>"
19616 \begin_layout Standard
19617 If a readonly checkout is detected the working copy is made writable and
19621 \begin_layout Standard
19624 cvs -q edit "<file-name>"
19627 \begin_layout Subsubsection
19630 Revert To Repository Version
19633 \begin_layout Standard
19634 This will discard all changes made to the document since the last check
19636 You get a warning before changes are discarded.
19637 Firstly the file is deleted, secondly CVS update command is run.
19640 \begin_layout Standard
19643 cvs -q update "<file-name>"
19646 \begin_layout Standard
19647 If a reserved checkout is detected and the working copy has no changes only
19648 the reservation is undone.
19651 \begin_layout Standard
19654 cvs -q unedit "<file-name>"
19657 \begin_layout Subsubsection
19663 \begin_layout Standard
19664 This will create a copy of the current document.
19665 Since CVS does not support copy operations natively, the version history
19666 is not preserved, and the copy is added as a new file.
19667 It requires a clean document without any changes since the last checkin.
19668 You are asked for a file name and a description of the copy operation.
19669 After that the copy is created, both locally and in the repository.
19670 If the parent directories of the copied and original document differ, all
19671 relative paths of included files of the copy are adjusted (like in
19673 File\SpecialChar \menuseparator
19676 \SpecialChar \ldots{}
19678 Finally, the copy is loaded instead of the original document.
19681 \begin_layout Labeling
19682 \labelwidthstring 00.00.0000
19684 \begin_inset space ~
19688 \begin_inset space ~
19692 \begin_inset Newline newline
19696 \begin_inset Flex Code
19699 \begin_layout Plain Layout
19702 \begin_inset Quotes eld
19706 \begin_inset Quotes erd
19715 \begin_inset Flex Code
19718 \begin_layout Plain Layout
19721 \begin_inset Quotes eld
19725 \begin_inset Quotes erd
19734 \begin_inset Newline newline
19738 \begin_inset Flex Code
19741 \begin_layout Plain Layout
19745 \begin_inset Quotes eld
19749 \begin_inset Quotes erd
19760 \begin_layout Subsubsection
19766 \begin_layout Standard
19767 This will rename the current document.
19768 Since CVS does not support rename operations natively, the version history
19769 is not preserved, the renamed document is added as a new file, and the
19770 original document is deleted.
19771 It requires a clean document without any changes since the last checkin.
19772 You are asked for a file name and a description of the rename operation.
19773 After that the document is renamed, both locally and in the repository.
19774 If the parent directories of the new and old file names differ, all relative
19775 paths of included files are adjusted (like in
19777 File\SpecialChar \menuseparator
19780 \SpecialChar \ldots{}
19782 Finally, the document is reloaded using the new name.
19785 \begin_layout Labeling
19786 \labelwidthstring 00.00.0000
19788 \begin_inset space ~
19792 \begin_inset space ~
19796 \begin_inset Newline newline
19800 \begin_inset Flex Code
19803 \begin_layout Plain Layout
19806 \begin_inset Quotes eld
19810 \begin_inset Quotes erd
19819 \begin_inset Flex Code
19822 \begin_layout Plain Layout
19825 \begin_inset Quotes eld
19829 \begin_inset Quotes erd
19838 \begin_inset Newline newline
19842 \begin_inset Flex Code
19845 \begin_layout Plain Layout
19849 \begin_inset Quotes eld
19853 \begin_inset Quotes erd
19862 \begin_inset Newline newline
19866 \begin_inset Flex Code
19869 \begin_layout Plain Layout
19873 \begin_inset Quotes eld
19877 \begin_inset Quotes erd
19888 \begin_layout Subsubsection
19889 Update of the local directory checkout from repository
19892 \begin_layout Standard
19893 Once your documents gets more complex, containing sub-documents and pictures,
19895 \begin_inset Flex Code
19898 \begin_layout Plain Layout
19904 files and so on using version control becomes more complicated.
19905 LyX supports updating the whole tree in which resides the document.
19906 This become especially useful once you cooperate with people which neither
19907 have detailed knowledge about CVS usage nor they have ambition to commit
19908 additional material to the repository.
19909 You have to organize the files structure so that all external files are
19910 in the same directory or subdirectories of the document.
19911 It's good practice anyway to store multipart documents in an extra directory.
19914 \begin_layout Standard
19916 \begin_inset Flex Code
19919 \begin_layout Plain Layout
19920 Update local directory from repository
19925 command updates the whole directory.
19926 If local changes are detected user is warned before update starts.
19927 In case of merge conflicts both versions of the conflicting document parts
19928 are placed in the final document.
19929 You have to review and correct the result of the merge.
19930 You'll find the conflicts enclosed in pairs of
19931 \begin_inset Flex Code
19934 \begin_layout Plain Layout
19941 \begin_inset Flex Code
19944 \begin_layout Plain Layout
19951 \begin_inset Flex Code
19954 \begin_layout Plain Layout
19961 The first part is your version as before the update operation with the
19962 document name prepended.
19963 The second one is the repository version with the version number after
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19977 \begin_layout Labeling
19978 \labelwidthstring 00.00.0000
19980 \begin_inset space ~
19984 \begin_inset space ~
19988 \begin_inset Newline newline
19992 \begin_inset Flex Code
19995 \begin_layout Plain Layout
20003 (Ask if changes are detected.)
20004 \begin_inset Newline newline
20008 \begin_inset Flex Code
20011 \begin_layout Plain Layout
20012 cd $path; cvs -q update
20022 \begin_layout Standard
20024 \begin_inset Flex Code
20027 \begin_layout Plain Layout
20033 stands for the path to the document.
20036 \begin_layout Subsubsection
20042 \begin_layout Standard
20043 This shows the complete history of the CVS document.
20046 cvs log "<file-name>"
20048 is shown in a browser.
20051 \begin_layout Subsubsection
20055 \begin_layout Standard
20056 LyX supports CVS version number, author name, date and time of last commit.
20057 All those are extracted from
20059 cvs log -r <file-name>
20063 \begin_inset CommandInset ref
20065 reference "sub:VCS-Revision-Information"
20072 \begin_layout Subsection
20073 SVN commands in LyX
20076 \begin_layout Standard
20077 SVN is now partially supported by LyX.
20078 You can find the commands in the
20080 File\SpecialChar \menuseparator
20082 \begin_inset space ~
20088 Please note that if you use password protected access to repository via
20089 ssh, you will be asked in terminal window.
20090 LyX was tested against SVN 1.5 and 1.6
20094 \begin_layout Plain Layout
20095 Most of the commands will work with 1.4 too, see
20096 \begin_inset CommandInset ref
20098 reference "sub:SVN-Repo-Update"
20110 \begin_layout Subsubsection
20116 \begin_layout Standard
20117 If your document is not under revision control, this is the only item shown
20119 And if it is under revision control, the
20126 item is not visible.
20129 \begin_layout Standard
20130 This command registers in SVN your document ONLY in case you have already
20131 the documents directory under SVN control (in particular
20136 This means you have to checkout the archive by yourself.
20139 \begin_layout Standard
20140 Then you are asked interactively to supply an initial description of the
20142 Don't forget that registered file is not yet commited.
20145 \begin_layout Standard
20146 SVN command that is run:
20149 \begin_inset Quotes eld
20153 \begin_inset Quotes erd
20159 \begin_layout Standard
20164 to understand the switches.
20167 \begin_layout Subsubsection
20173 \begin_layout Standard
20174 When you are finished editing a file, you commit your changes.
20175 When you do this, you are asked for a description of the changes.
20176 After that changes are commited.
20179 \begin_layout Standard
20184 \begin_layout Plain Layout
20185 In case locking is not enabled.
20187 \begin_inset CommandInset ref
20189 reference "subsec:SVN-File-Locking"
20200 svn commit -q -m"<description>" <file-name>
20203 \begin_layout Subsubsection
20209 \begin_layout Standard
20210 Updates the changes of this file from the repository.
20211 Be sure you understand SVN merging and conflicts resolving before using
20212 this function, because all conflicts has to be resolved manually by you!
20215 \begin_layout Standard
20220 \begin_layout Plain Layout
20228 svn update --non-interactive
20229 \begin_inset Quotes eld
20233 \begin_inset Quotes erd
20239 \begin_layout Subsubsection
20242 Revert To Repository Version
20245 \begin_layout Standard
20246 This will discard all changes made to the document since the last check
20248 You get a warning before changes are discarded.
20251 \begin_layout Standard
20255 \begin_inset Quotes eld
20259 \begin_inset Quotes erd
20265 \begin_layout Subsubsection
20271 \begin_layout Standard
20272 This will create a copy of the current document including the version history.
20273 It requires a clean document without any changes since the last checkin.
20274 You are asked for a file name and a description of the copy operation.
20275 After that the copy is created, both locally and in the repository.
20276 If the parent directories of the copied and original document differ, all
20277 relative paths of included files of the copy are adjusted (like in
20279 File\SpecialChar \menuseparator
20282 \SpecialChar \ldots{}
20284 Finally, the copy is loaded instead of the original document.
20287 \begin_layout Labeling
20288 \labelwidthstring 00.00.0000
20290 \begin_inset space ~
20294 \begin_inset space ~
20298 \begin_inset Newline newline
20302 \begin_inset Flex Code
20305 \begin_layout Plain Layout
20309 \begin_inset Quotes eld
20313 \begin_inset Quotes erd
20317 \begin_inset Quotes eld
20321 \begin_inset Quotes erd
20330 \begin_inset Newline newline
20334 \begin_inset Flex Code
20337 \begin_layout Plain Layout
20346 \begin_layout Subsubsection
20352 \begin_layout Standard
20353 This will rename the current document including the version history.
20354 It requires a clean document without any changes since the last checkin.
20355 You are asked for a file name and a description of the rename operation.
20356 After that the document is renamed, both locally and in the repository.
20357 If the parent directories of the new and old file names differ, all relative
20358 paths of included files are adjusted (like in
20360 File\SpecialChar \menuseparator
20363 \SpecialChar \ldots{}
20365 Finally, the document is reloaded using the new name.
20368 \begin_layout Labeling
20369 \labelwidthstring 00.00.0000
20371 \begin_inset space ~
20375 \begin_inset space ~
20379 \begin_inset Newline newline
20383 \begin_inset Flex Code
20386 \begin_layout Plain Layout
20390 \begin_inset Quotes eld
20394 \begin_inset Quotes erd
20398 \begin_inset Quotes eld
20402 \begin_inset Quotes erd
20411 \begin_inset Newline newline
20415 \begin_inset Flex Code
20418 \begin_layout Plain Layout
20427 \begin_layout Subsubsection
20428 \begin_inset CommandInset label
20430 name "sub:SVN-Repo-Update"
20434 Update of the local directory checkout from repository
20438 \begin_layout Plain Layout
20439 Note that this command will work only with subversion
20440 \begin_inset Formula $\geqq1.5$
20451 \begin_layout Standard
20452 All the commands above have one shortcomming - they deal with the current
20454 Once your document contains pictures, includes external
20455 \begin_inset Flex Code
20458 \begin_layout Plain Layout
20464 files and so on administration becomes more complicated.
20465 LyX now supports updating the whole tree in which resides the document
20469 \begin_layout Plain Layout
20470 One need to organize the files structure so that all external files are
20471 in the same directory or subdirectories of the document.
20478 This become especially useful once you cooperate with people which neither
20479 know about subversion management nor they have ambition to commit additional
20480 material to the repository.
20484 \begin_layout Standard
20485 \begin_inset Flex Code
20488 \begin_layout Plain Layout
20489 Update local directory from repository
20494 command updates the whole directory and in case of merge conflicts local
20495 version of the files are left, so no unintended data loss occurs.
20496 If local changes are detected user is warned before update starts.
20499 \begin_layout Labeling
20500 \labelwidthstring 00.00.0000
20502 \begin_inset space ~
20506 \begin_inset space ~
20510 \begin_inset Newline newline
20514 \begin_inset Flex Code
20517 \begin_layout Plain Layout
20523 (Ask if changes are detected.)
20524 \begin_inset Newline newline
20528 \begin_inset Flex Code
20531 \begin_layout Plain Layout
20532 svn update --accept mine-full $path
20540 \begin_layout Standard
20542 \begin_inset Flex Code
20545 \begin_layout Plain Layout
20551 stands for the path to the document.
20554 \begin_layout Subsubsection
20560 \begin_layout Standard
20561 This shows the complete history of the SVN document.
20565 \begin_inset Quotes eld
20569 \begin_inset Quotes erd
20574 is shown in a browser.
20577 \begin_layout Subsubsection
20579 \begin_inset CommandInset label
20581 name "subsec:SVN-File-Locking"
20588 \begin_layout Standard
20589 The file exchange through various revision control systems brings the problem
20590 of merge conflicts in case two different users try to edit the same (parts
20592 When such a conflict happens it needs manual resolving and one reasonable
20593 alternative is to provide some kind of locking mechanism, which guarantees
20594 that only one user is allowed to edit file at the given time.
20597 \begin_layout Standard
20598 SVN has two such mechanisms to provide mutual exclusivity for file access
20599 - locks and automatic setting of write permissions (see sec.
20601 \begin_inset CommandInset ref
20603 reference "subsec:Automatical-Locking-Property"
20608 \begin_inset Flex Code
20611 \begin_layout Plain Layout
20621 \begin_layout Plain Layout
20622 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20628 If this property is detected for a given document LyX starts to use SVN
20629 locks for document editing automatically and the whole check-in/out mechanism
20630 switches to the same regimen as for RCS.
20631 This in particular means there are two different modes of file use in LyX:
20634 \begin_layout Itemize
20636 The loaded file is in the read-only mode.
20637 For editing on needs to check-out.
20642 consists of updating from the repository and gaining write lock.
20643 If the lock is not possible to obtain, we remain in unlocked state.
20646 \begin_layout Itemize
20648 The loaded file is in the 'normal' edit mode.
20649 No other user is allowed to edit the file.
20654 consists of commiting changes and releasing write-lock.
20655 If no changes have been made to the document, no commit will be produced
20659 \begin_layout Plain Layout
20660 Don't be puzzled by the fact that you will be asked for commit message anyway.
20665 and only the write-lock will be released.
20668 \begin_layout Standard
20672 \begin_layout Labeling
20673 \labelwidthstring 00.00.0000
20676 svn commit -q -m"<description>" "<file-name>"
20677 \begin_inset Newline newline
20680 svn unlock "<file-name>"
20683 \begin_layout Labeling
20684 \labelwidthstring 00.00.0000
20687 svn update "<file-name>"
20688 \begin_inset Newline newline
20691 svn lock "<file-name>"
20694 \begin_layout Subsubsection
20697 \begin_inset CommandInset label
20699 name "subsec:Automatical-Locking-Property"
20705 Automatic Locking Property
20708 \begin_layout Standard
20709 The above mentioned automatic setting of write permissions of the .lyx file
20715 ile\SpecialChar \menuseparator
20721 \begin_inset space ~
20724 Control\SpecialChar \menuseparator
20729 oggle locking property
20732 This command is active only when the file is not locked on the svn server
20734 you need to check-out before proceeding).
20737 \begin_layout Labeling
20738 \labelwidthstring 00.00.0000
20740 \begin_inset space ~
20746 \begin_layout Labeling
20747 \labelwidthstring 00.00.0000
20750 svn propset svn:needs-lock ON "<file-name>"
20753 \begin_layout Labeling
20754 \labelwidthstring 00.00.0000
20757 svn propdel svn:needs-lock "<file-name>"
20760 \begin_layout Subsubsection
20761 \begin_inset CommandInset label
20763 name "sub:VCS-Revision-Information"
20767 Revision Information in Documents
20770 \begin_layout Standard
20771 There are more possibilities how to activate revision information in our
20775 \begin_layout Itemize
20776 LyX supports directly:
20780 \begin_layout Itemize
20781 tree revision information (
20782 \begin_inset Flex Code
20785 \begin_layout Plain Layout
20792 The result is the output of the
20793 \begin_inset Flex Code
20796 \begin_layout Plain Layout
20802 command, the following table gives you an idea, how to read the results.
20805 \begin_layout Standard
20807 \begin_inset Tabular
20808 <lyxtabular version="3" rows="6" columns="2">
20809 <features rotate="0" tabularvalignment="middle">
20810 <column alignment="center" valignment="top" width="0">
20811 <column alignment="center" valignment="top" width="0">
20813 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20816 \begin_layout Plain Layout
20822 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20825 \begin_layout Plain Layout
20833 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20836 \begin_layout Plain Layout
20842 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20845 \begin_layout Plain Layout
20846 mixed revision working copy
20853 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20856 \begin_layout Plain Layout
20862 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20865 \begin_layout Plain Layout
20866 modified working copy
20873 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20876 \begin_layout Plain Layout
20882 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20885 \begin_layout Plain Layout
20886 switched working copy
20893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20896 \begin_layout Plain Layout
20902 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20905 \begin_layout Plain Layout
20906 partial working copy, from a sparse checkout
20913 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20916 \begin_layout Plain Layout
20922 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20925 \begin_layout Plain Layout
20926 mixed revision, modified, switched working copy
20939 \begin_layout Itemize
20940 file revision information.
20941 The result comes from parsing the output of
20942 \begin_inset Flex Code
20945 \begin_layout Plain Layout
20947 \begin_inset space ~
20951 \begin_inset space ~
20955 \begin_inset space ~
20964 Supported flags are:
20968 \begin_layout Itemize
20969 version number of the last commit (
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20982 \begin_layout Itemize
20983 author of the last commit (
20984 \begin_inset Flex Code
20987 \begin_layout Plain Layout
20996 \begin_layout Itemize
20997 date of the last commit (
20998 \begin_inset Flex Code
21001 \begin_layout Plain Layout
21010 \begin_layout Itemize
21011 time of the last commit (
21012 \begin_inset Flex Code
21015 \begin_layout Plain Layout
21025 \begin_layout Standard
21026 You can obtain this info via InsetInfo (e.g.
21028 \begin_inset Flex Code
21031 \begin_layout Plain Layout
21032 info-insert buffer vcs-date
21038 The information will be available only when you have the file stored under
21039 svn managment (i.e.
21041 \begin_inset Flex Code
21044 \begin_layout Plain Layout
21050 directory is available with your document).
21054 \begin_layout Itemize
21055 Another---a hacking one---possibility is to use svn keywords
21059 \begin_layout Plain Layout
21060 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21066 In short -- you set file keywords property (e.g.
21069 svn propset svn:keywords 'Rev' file.lyx
21071 ) and then paste keyword TeX code
21075 \begin_layout Plain Layout
21076 This is an easy way how to ensure that LyX won't break the line in the middle
21082 tag in your document (e.g.
21087 \begin_layout Plain Layout
21095 This way svn client will automatically substitute revision number (e.g.
21100 \begin_layout Plain Layout
21107 ) after each update and commit.
21108 There are more problems with this approach.
21109 Firstly, the '$' character is used in TeX world for math equations, so
21110 any occurence of math formula
21111 \begin_inset Formula $Rev$
21115 \begin_inset Formula $Rev:59$
21118 in your LyX document.
21119 Similarly for other keywords like Id, Date, Author, etc.
21120 Secondly svn output is dependent on your locales, so its very easy that
21121 svn would produce some problematic strings once Date is used.
21122 Thirdly you get the whole 'Rev: 59' string in your document instead of
21124 Until subversion implements user's custom keywords it will be hard to use
21125 this approach reliably or let LyX to support it directly.
21128 \begin_layout Subsection
21129 SVN and Windows Environment
21132 \begin_layout Quote
21133 My inclination is to say that if the user cannot figure out the command
21134 line operations on their own fairly quickly, they would be well advised
21135 to use TortoiseSVN.
21141 \begin_layout Subsubsection
21145 \begin_layout Standard
21146 In addition to installing LyX, and having access to a Subversion repository,
21147 the user will need to install the Subversion client program.
21148 A Windows installer for the client program is available from
21149 \begin_inset CommandInset href
21152 target "http://www.collab.net/nonav/downloads/subversion/"
21157 The user may also want to install
21158 \begin_inset CommandInset href
21161 target "http://tortoisesvn.tigris.org/"
21165 , which integrates Subversion operations into the context (rightclick) menu
21166 of Windows Explorer.
21167 Operations done outside LyX will typically be more convenient using the
21168 Explorer context menu.
21169 Note that TortoiseSVN is not a replacement for the client program, which
21170 is what LyX itself will use.
21173 \begin_layout Subsubsection
21174 Bringing a document under Subversion control
21177 \begin_layout Standard
21178 Before a LyX document can be brought under version control in Subversion,
21179 its parent directory needs to be under version control.
21180 If the document is being added to a project already in the repository,
21181 this is accomplished by checking the project out to the directory where
21182 the new document will be placed.
21183 If the project itself is not yet under version control (for instance, if
21184 this document starts a new project), the directory must be imported into
21186 This is done outside LyX.
21187 Both import and checkout are easily accomplished from the Explorer context
21188 menu using TortoiseSVN, or alternatively can be done using the command
21189 line client at a DOS prompt.
21190 The procedure for importing the project using TortoiseSVN is described
21191 below, assuming an existing repository and a new project being started
21199 For information on using the Subversion client program, run
21206 \begin_layout Enumerate
21213 in Windows Explorer, right click it, and select
21215 TortoiseSVN\SpecialChar \menuseparator
21219 If necessary, adjust the URL for the repository, then click OK.
21222 \begin_layout Enumerate
21223 Right click the level of the repository under which you want to place the
21224 new project folder (typically the top level) and click
21228 Supply a name for the project folder and click OK.
21229 Add a message for the log file if desired, then click OK again.
21230 The new project folder should appear in the repository.
21231 Finally, click OK again to exit the repository browser.
21234 \begin_layout Enumerate
21235 Once again right click
21241 , this time selecting SVN Checkout\SpecialChar \ldots{}
21242 Select the URL of the project folder
21243 you just created in the repository, and set the checkout directory to
21251 You will be warned about a non-empty folder; click OK to proceed.
21252 You should now have a
21263 \begin_layout Enumerate
21264 Create or open your document in LyX and click
21266 File\SpecialChar \menuseparator
21268 \begin_inset space ~
21271 Control\SpecialChar \menuseparator
21275 Add a log message and click OK to commit the document to version control.
21278 \begin_layout Standard
21279 From this point onward, you should have full functionality in the
21281 File\SpecialChar \menuseparator
21283 \begin_inset space ~
21289 You also have the option of checking the document in and out, viewing its
21291 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21292 client program from a command prompt.
21295 \begin_layout Subsubsection
21296 SSH tunnel used with SVN under Windows
21299 \begin_layout Standard
21300 Compared with Linux setting up an svn client to communicate over ssh under
21301 Windows is a rather troublesome task.
21302 We will at least offer some hints how to setup the client side but prior
21303 knowledge about ssh and the Windows command line is needed, also be prepared
21304 for a great deal of frustration\SpecialChar \ldots{}
21308 \begin_layout Enumerate
21309 Get an svn client for windows, as described in the previous sections.
21310 When it is a fresh install run some svn command (e.g.
21312 \begin_inset Flex Code
21315 \begin_layout Plain Layout
21321 ) to create config files, which you will need to change later on.
21324 \begin_layout Enumerate
21325 Choose an ssh client for Windows.
21326 There are several possibilities, we will use the one from Putty tools
21330 \begin_layout Plain Layout
21331 \begin_inset Flex URL
21334 \begin_layout Plain Layout
21336 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21347 You will need to set the connection up so that the client doesn't ask for
21348 any password from you.
21349 To keep things easy we will use only keys without any additional password
21354 \begin_layout Enumerate
21356 \begin_inset Flex Code
21359 \begin_layout Plain Layout
21366 Save your private .ppk key file and put the public one on the server side.
21367 If the SVN server runs on Linux, note that the format of the public key
21368 is not compatible with Linux openssh and you will need to direcly copy-paste
21371 Public key for pasting into OpenSSH authorized_keys file
21373 :” edit field into the server's
21374 \begin_inset Flex Code
21377 \begin_layout Plain Layout
21378 ~/.ssh/authorized_keys
21384 \begin_inset Flex Code
21387 \begin_layout Plain Layout
21396 \begin_layout Enumerate
21398 \begin_inset Flex Code
21401 \begin_layout Plain Layout
21408 In the SVN config file
21412 \begin_layout Plain Layout
21413 Exact path depends on Windows version, usually somewhere around
21414 \begin_inset Flex Code
21417 \begin_layout Plain Layout
21420 Documents and Settings
21434 \begin_inset Flex Code
21437 \begin_layout Plain Layout
21452 , section [tunnels], setup ssh command, e.g.
21454 \begin_inset Flex Code
21457 \begin_layout Plain Layout
21458 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21467 \begin_layout Plain Layout
21468 It will usually take a lot of time to get exact command right and it depends
21470 For example do not have some remote server saved as a default session in
21472 If things fail, try to connect via plink without SVN first.
21481 \begin_layout Enumerate
21482 Checkout the SVN archive, e.
21483 \begin_inset space \thinspace{}
21487 \begin_inset Newline newline
21491 \begin_inset Flex Code
21494 \begin_layout Plain Layout
21495 svn co svn+ssh://user@server/repository_path
21503 \begin_layout Subsubsection
21504 End-of-Line Conversions
21507 \begin_layout Standard
21508 When the collaborators are mixing Linux and Windows environments, LyX will
21509 use different line endings inside the .lyx files.
21510 This is not a problem as far as LyX functionality is concerned, but the
21511 commit diffs will be huge and merge-conflicts prone.
21512 Fortunately SVN itself knows
21516 \begin_layout Plain Layout
21517 \begin_inset Flex URL
21520 \begin_layout Plain Layout
21522 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21532 how to deal with CR/LF problems when switching .lyx files to the
21533 \begin_inset Flex Code
21536 \begin_layout Plain Layout
21546 \begin_layout Plain Layout
21548 \begin_inset Flex Code
21551 \begin_layout Plain Layout
21552 svn propset svn:eol-style native FILE_NAME
21565 \begin_layout Subsection
21566 GIT commands in LyX
21569 \begin_layout Standard
21570 A minimal subset of GIT commands is now supported by LyX.
21571 You can find the commands in the
21573 File\SpecialChar \menuseparator
21575 \begin_inset space ~
21581 Please note that if you use password protected access to repository via
21582 ssh, you will be asked in terminal window.
21583 LyX was tested against GIT 1.7.
21586 \begin_layout Standard
21587 One big difference of GIT and the other supported version control systems
21588 is the distributed nature of GIT: With traditional version control systems
21589 there is one central server which hosts the repository.
21590 Users commit their changes to the server, and get updates made by other
21592 With GIT, users commit to a local repository.
21593 The local repository can be synchronized with one or more remote repositories
21595 \begin_inset Flex Code
21598 \begin_layout Plain Layout
21605 \begin_inset Flex Code
21608 \begin_layout Plain Layout
21615 LyX does not interact in any way with remote GIT repositories.
21616 It works exclusively with the local repository in a very similar way as
21617 with a central CVS or SVN repository.
21618 If you use remote GIT repositories you need to do the
21619 \begin_inset Flex Code
21622 \begin_layout Plain Layout
21629 \begin_inset Flex Code
21632 \begin_layout Plain Layout
21638 operations with your favourite GIT client.
21641 \begin_layout Subsubsection
21647 \begin_layout Standard
21648 If your document is not under revision control, this is the only item shown
21650 And if it is under revision control, the
21657 item is not visible.
21660 \begin_layout Standard
21661 This command registers in GIT your document ONLY in case you have already
21662 the documents directory under GIT control (in particular
21667 This means you have to checkout the archive by yourself.
21670 \begin_layout Standard
21671 Then you are asked interactively to supply an initial description of the
21673 Don't forget that registered file is not yet commited.
21676 \begin_layout Standard
21677 GIT command that is run:
21680 \begin_inset Quotes eld
21684 \begin_inset Quotes erd
21690 \begin_layout Standard
21695 to understand the switches.
21698 \begin_layout Subsubsection
21704 \begin_layout Standard
21705 When you are finished editing a file, you commit your changes.
21706 When you do this, you are asked for a description of the changes.
21707 After that changes are commited.
21710 \begin_layout Standard
21713 git commit -q -m"<description>" <file-name>
21716 \begin_layout Subsubsection
21719 Revert To Repository Version
21722 \begin_layout Standard
21723 This will discard all changes made to the document since the last check
21725 You get a warning before changes are discarded.
21728 \begin_layout Standard
21732 \begin_inset Quotes eld
21736 \begin_inset Quotes erd
21742 \begin_layout Subsubsection
21748 \begin_layout Standard
21749 This will rename the current document including the version history.
21750 It requires a clean document without any changes since the last checkin.
21751 You are asked for a file name and a description of the rename operation.
21752 After that the document is renamed, both locally and in the repository.
21753 If the parent directories of the new and old file names differ, all relative
21754 paths of included files are adjusted (like in
21756 File\SpecialChar \menuseparator
21759 \SpecialChar \ldots{}
21761 Finally, the document is reloaded using the new name.
21764 \begin_layout Labeling
21765 \labelwidthstring 00.00.0000
21767 \begin_inset space ~
21771 \begin_inset space ~
21775 \begin_inset Newline newline
21779 \begin_inset Flex Code
21782 \begin_layout Plain Layout
21786 \begin_inset Quotes eld
21790 \begin_inset Quotes erd
21794 \begin_inset Quotes eld
21798 \begin_inset Quotes erd
21807 \begin_inset Newline newline
21811 \begin_inset Flex Code
21814 \begin_layout Plain Layout
21823 \begin_layout Subsubsection
21829 \begin_layout Standard
21830 This shows the complete history of the GIT document.
21834 \begin_inset Quotes eld
21838 \begin_inset Quotes erd
21843 is shown in a browser.
21846 \begin_layout Subsection
21850 \begin_layout Standard
21851 With the recent addition of the vc-command function LyX power users are
21852 allowed to create their own commands for revision control.
21855 \begin_layout Standard
21856 As an example you can see how two TortoiseSVN commands could be integrated
21860 \begin_layout Description
21862 \begin_inset Flex Code
21865 \begin_layout Plain Layout
21866 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21874 \begin_layout Description
21876 \begin_inset Flex Code
21879 \begin_layout Plain Layout
21880 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21888 \begin_layout Subsection
21889 Version control and Document comparison
21892 \begin_layout Standard
21893 One of the typical uses of version control is to inspect the changes between
21894 revisions, usually by creating
21895 \begin_inset Flex Code
21898 \begin_layout Plain Layout
21905 While this is useful for plain text files, it is much less useful in the
21906 case of LyX files, which have more a complicated structure.
21907 Hence we provide binding to the Document comparison feature.
21908 There are two ways of calling this feature - either by direct call of
21909 \begin_inset Flex Code
21912 \begin_layout Plain Layout
21918 LyX function (for details see LyX functions manual) or by icon/menu item
21920 \begin_inset Flex MenuItem
21923 \begin_layout Plain Layout
21924 Compare with older revision...
21930 One can either compare two chosen revisions of the document or he can simply
21931 compare the current version of edited text with older revisions (where
21933 \begin_inset Flex MenuItem
21936 \begin_layout Plain Layout
21942 ' revisions back means comparison of the edited file with last commited
21947 \begin_layout Standard
21948 This feature is supported for SVN and RCS though due to the more complicated
21949 versioning scheme of RCS there is a constraint -- when addressing the revisions
21950 in dialog, numbers always point to the last number in RCS revision number,
21953 We don't currently support GIT addressing of revisions, one can just compare
21954 edited document with its revision X steps backs, where X is addressed as
21958 \begin_layout Section
21959 Literate Programming
21962 \begin_layout Standard
21967 (kayvan@sylvan.com)
21971 original documentation written by
21973 Edmar Wienskoski Jr.
21976 (edmar-w-jr@technologist.com)
21979 \begin_layout Subsection
21983 \begin_layout Standard
21984 The main purpose of this documentation is to show you how to use LyX for
21985 literate programming, where it is assumed that you are familiar with this
21986 programming technique, and know what
21987 \begin_inset Quotes eld
21991 \begin_inset Quotes erd
21995 \begin_inset Quotes eld
21999 \begin_inset Quotes erd
22003 If that is not the case, please follow the web links provided in the following
22005 There is a lot of good documentation out there covering old development
22006 history to the latest tools tips.
22009 \begin_layout Standard
22010 It is also assumed that you are familiar with LyX itself to a point that
22011 you are comfortable changing your LyX preferences, and X resources file.
22012 If that is not the case please refer to other LyX documentation to cover
22013 your specific needs.
22016 \begin_layout Subsection
22017 Literate Programming
22020 \begin_layout Standard
22021 From the Literate Programming FAQ:
22024 \begin_layout Quotation
22025 Literate programming is the combination of documentation and source together
22026 in a fashion suited for reading by human beings.
22027 In fact, literate programs should be enjoyable reading, even inviting!
22028 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22029 and documentation in a single file.
22030 Literate programming tools then parse the file to produce either readable
22031 documentation or compilable source.
22032 The WEB style of literate programming was created by D.
22033 \begin_inset space \thinspace{}
22037 Knuth during the development of his TeX typesetting software.
22041 \begin_layout Standard
22042 Another excerpt says:
22045 \begin_layout Quotation
22048 How is literate programming different from verbose commenting?
22051 \begin_layout Quotation
22052 There are three distinguishing characteristics.
22053 In order of importance, they are:
22057 \begin_layout Itemize
22058 flexible order of elaboration
22061 \begin_layout Itemize
22062 automatic support for browsing
22065 \begin_layout Itemize
22066 typeset documentation, especially diagrams and mathematics
22070 \begin_layout Standard
22071 Now that I sparked your curiosity, take a look in the references.
22074 \begin_layout Subsubsection
22078 \begin_layout Standard
22079 The complete Literate Programming FAQ can be found at:
22082 \begin_layout Quote
22083 Literate Programming FAQ
22084 \begin_inset Flex URL
22087 \begin_layout Plain Layout
22089 http://www.literateprogramming.com/lpfaq.pdf
22097 \begin_layout Standard
22098 The FAQ lists 23 (twenty three!) different literate programming tools.
22099 Where some are specialized or
22100 \begin_inset Quotes eld
22104 \begin_inset Quotes erd
22107 for particular programming languages, while other have general scope.
22112 for my own use for several reasons:
22115 \begin_layout Itemize
22116 It can generate the documentation either in LaTeX or HTML.
22119 \begin_layout Itemize
22120 It has a open architecture, i.
22121 \begin_inset space \thinspace{}
22125 \begin_inset space \space{}
22128 it is easy to plug in new filters and to perform special processing that
22133 \begin_layout Itemize
22134 There is a good selection of filters available already (the HTML is one
22138 \begin_layout Itemize
22142 \begin_layout Standard
22143 The Noweb web page can be found at:
22146 \begin_layout Quote
22148 \begin_inset Flex URL
22151 \begin_layout Plain Layout
22153 http://www.cs.virginia.edu/~nr/noweb/
22161 \begin_layout Standard
22162 Starting from there you can reach many other interesting links and even
22163 some literate program examples.
22166 \begin_layout Subsection
22167 LyX and Literate Programming with Noweb
22170 \begin_layout Standard
22171 The LyX support for Literate Programming is provided by using the generic
22172 LyX converters mechanism.
22173 This support is provided in a
22174 \begin_inset Quotes eld
22178 \begin_inset Quotes erd
22182 \begin_inset space \thinspace{}
22186 \begin_inset space \space{}
22189 you will be able to use this new LyX feature with some other literate programmin
22190 g tool of your choice by just changing your LyX preferences.
22193 \begin_layout Subsubsection
22194 Generating documents and code (weaving and tangling)
22197 \begin_layout Paragraph
22198 Using the noweb module
22201 \begin_layout Standard
22202 If you have installed Noweb and LyX successfully, whenever you open a new
22203 document, after you have chosen its document class, use the Document->Settings
22205 \begin_inset Quotes eld
22209 \begin_inset Quotes erd
22213 If Noweb is correctly installed, when you click on the
22214 \begin_inset Quotes eld
22218 \begin_inset Quotes erd
22221 link, you will see the
22222 \begin_inset Quotes eld
22226 \begin_inset Quotes erd
22229 module in the available list and you can add it to your document.
22232 \begin_layout Paragraph
22236 \begin_layout Standard
22237 LyX enables you to write code with a layout named
22238 \begin_inset Flex Noun
22241 \begin_layout Plain Layout
22248 Noweb delimits chunks like this:
22251 \begin_layout LyX-Code
22255 \begin_layout LyX-Code
22259 \begin_layout LyX-Code
22263 \begin_layout LyX-Code
22267 \begin_layout LyX-Code
22271 \begin_layout Standard
22272 The problem is that whatever is written in between the << and the
22276 must be taken literally, i.
22277 \begin_inset space \thinspace{}
22281 \begin_inset space \space{}
22284 LyX should be prevented from making any special interpretation of what has
22286 This is also handled by
22287 \begin_inset Flex Noun
22290 \begin_layout Plain Layout
22296 , that works like a normal paragraph but has a free spacing capability.
22299 \begin_layout Standard
22300 As a special note, you can also use the
22301 \begin_inset Quotes eld
22305 \begin_inset Quotes erd
22308 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22312 \begin_layout LyX-Code
22316 \begin_layout LyX-Code
22317 def some_function(args):
22320 \begin_layout LyX-Code
22321 "This is the doc string for this function."
22324 \begin_layout LyX-Code
22325 print "My args: ", args
22328 \begin_layout LyX-Code
22329 @ %def some_function
22332 \begin_layout Standard
22333 For an example of this usage and the resulting cross-reference output, look
22334 at the Literate python program in
22336 LIBDIR/examples/listerrors.lyx
22338 which should make this all clear.
22341 \begin_layout Paragraph
22342 Generating the documentation
22345 \begin_layout Standard
22346 At this point you already have a new document file with a proper document
22347 class, and with some code and text on it.
22348 How do I print it? The answer is simple, you select
22350 View\SpecialChar \menuseparator
22354 Just like you would do for a plain document.
22355 No special procedure is required.
22358 \begin_layout Standard
22359 To help orientate you, I will now explain what happens inside LyX:
22362 \begin_layout Enumerate
22365 Update\SpecialChar \menuseparator
22368 menu option is chosen, a LaTeX file is generated.
22373 \begin_layout Standard
22374 If the document is of any literate class the generated file will be named
22375 with an extension name defined by the
22376 \begin_inset Quotes eld
22380 \begin_inset Quotes erd
22383 format (defined in the Preferences panel), otherwise the file will have
22392 \begin_layout Enumerate
22393 Note that the only difference so far is in the name of the file, no special
22394 processing is required by LyX.
22395 Given that you formatted the code using the
22396 \begin_inset Flex Noun
22399 \begin_layout Plain Layout
22405 layout that, by itself, takes care of the business.
22408 \begin_layout Enumerate
22409 If the document is of any literate class LyX will then use the internal
22410 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22414 \begin_layout Plain Layout
22415 The converters are defined in the
22417 Tools\SpecialChar \menuseparator
22421 \begin_inset Quotes eld
22425 \begin_inset Quotes erd
22437 manual for general information about converters.
22442 to generate the LaTeX file.
22446 \begin_layout Standard
22447 Otherwise it will just skip this step.
22451 \begin_layout Enumerate
22452 Finally, LaTeX is invoked and the regular post processing continues as in
22456 \begin_layout Standard
22457 Independence from a particular
22458 \begin_inset Quotes eld
22462 \begin_inset Quotes erd
22465 is easily achieved by changing the commands that are run by the various
22469 \begin_layout Paragraph
22470 Generating the code
22473 \begin_layout Standard
22474 When the build menu option is chosen or the corresponding button in the
22475 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22476 Next, LyX invokes the
22481 This converter needs to be defined by the user and is not installed by
22482 default, though the Program format is.
22483 This converter (like any other converter) will have two parts:
22486 \begin_layout Enumerate
22487 The converter program itself.
22488 This program performs the conversion from the one format to the other (in
22489 this case, from the Noweb format to the Program pseudo-format).
22492 \begin_layout Enumerate
22493 The error log parser.
22494 This is a program whose sole purpose is to rewrite error messages in a
22495 format that LyX understands.
22496 This makes it possible for LyX to place error boxes in the right places
22497 in the file buffer.
22500 \begin_layout Standard
22501 The first part, the
22502 \begin_inset Quotes eld
22506 \begin_inset Quotes erd
22509 setting, should be set to
22510 \begin_inset Newline newline
22514 \begin_inset Quotes eld
22522 \begin_inset Quotes erd
22526 \begin_inset Newline newline
22529 This basically means that LyX will call
22530 \begin_inset Quotes eld
22534 \begin_inset Quotes erd
22537 (a program or script) with the name of the Noweb file (normally a file
22538 in the LyX temp directory) and the directory path of the original LyX file.
22542 \begin_layout Standard
22543 This is an implementation of
22544 \begin_inset Quotes eld
22548 \begin_inset Quotes erd
22551 that you can place in a directory on your path:
22554 \begin_layout Standard
22555 \begin_inset VSpace defskip
22561 \begin_layout Standard
22562 \begin_inset Newpage pagebreak
22568 \begin_layout Standard
22574 \begin_layout Standard
22580 \begin_layout Standard
22583 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22586 \begin_layout Standard
22587 \begin_inset VSpace defskip
22593 \begin_layout Standard
22594 The next part of the converter setting is the
22595 \begin_inset Quotes eld
22599 \begin_inset Quotes erd
22602 which is to be set to
22603 \begin_inset Newline newline
22607 \begin_inset Quotes eld
22612 parselog=$$s/scripts/listerrors
22615 \begin_inset Quotes erd
22619 \begin_inset Newline newline
22622 This will run any errors that are generated by the
22623 \begin_inset Quotes eld
22627 \begin_inset Quotes erd
22630 process through the
22631 \begin_inset Quotes eld
22635 \begin_inset Quotes erd
22641 \begin_layout Standard
22642 The build will normally take place in LyX's temporary directory, so the
22643 files produced by the conversion will be in that directory.
22644 LyX will copy out what it regards as the `main' file, but the
22648 conversion may produce several files, and so most of these would then be
22649 deleted when LyX was closed.
22650 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22651 the build-script chunk can place the generated files in that location.
22654 \begin_layout Paragraph
22655 Build instructions in the document
22658 \begin_layout Standard
22659 The last piece of the integration between LyX and noweb is the
22660 \begin_inset Quotes eld
22664 \begin_inset Quotes erd
22668 Generally, the instructions for building your program should be embedded
22669 in a chunk of its own.
22671 \begin_inset Quotes eld
22675 \begin_inset Quotes erd
22678 above uses the notangle command to look for this chunk (called
22679 \begin_inset Quotes eld
22683 \begin_inset Quotes erd
22686 ) and runs its contents through
22687 \begin_inset Quotes eld
22691 \begin_inset Quotes erd
22697 \begin_layout Standard
22698 Typically, such a chunk would look something like this:
22701 \begin_layout LyX-Code
22705 \begin_layout LyX-Code
22707 \begin_inset Newline newline
22710 if [ -z "${NOWEB_SOURCE}" ]
22711 \begin_inset Newline newline
22717 \begin_layout LyX-Code
22718 NOWEB_SOURCE=myfile.nw
22719 \begin_inset Newline newline
22723 \begin_inset Newline newline
22727 code to extract files ...
22728 use NOWEB_OUTPUT_DIR here ...]
22729 \begin_inset Newline newline
22733 code to compile files ...]
22734 \begin_inset Newline newline
22740 \begin_layout Standard
22743 LIBDIR/examples/listerrors.lyx
22747 LIBDIR/examples/Literate.lyx
22749 which implement two versions of the
22750 \begin_inset Quotes eld
22754 \begin_inset Quotes erd
22757 program for some illustrations of how all of these pieces go together or
22760 LIBDIR/examples/noweb2lyx.lyx.
22763 Interestingly, these three files show off the language-indepence of the
22764 LyX literate programming support since they are written in Python, C and
22768 \begin_layout Subsubsection
22772 \begin_layout Standard
22773 All the Literate Programming support is configured by the
22775 Tools\SpecialChar \menuseparator
22779 \begin_inset Quotes eld
22783 \begin_inset Quotes erd
22787 The important parts are:
22790 \begin_layout Description
22792 \begin_inset space ~
22796 \begin_inset Quotes eld
22800 \begin_inset Quotes erd
22804 \begin_inset space ~
22807 format Set up via the File Formats tab, this is where the Noweb-specific
22817 , the file extension is set to
22822 This tells LyX to create a file with a
22826 extension in the first step of the conversion process.
22829 \begin_layout Description
22831 \begin_inset space ~
22839 \begin_inset space ~
22842 format This is an empty format whose sole purpose is to be the endpoint
22843 of a conversion (which then allows us to set up a converter for it).
22846 \begin_layout Description
22855 This converter performs the
22856 \begin_inset Quotes eld
22860 \begin_inset Quotes erd
22863 of the literate document.
22864 For Noweb, it is set to
22865 \begin_inset Quotes eld
22870 noweave -delay -index $$i > $$o
22873 \begin_inset Quotes erd
22879 \begin_layout Description
22889 \begin_inset Quotes eld
22893 \begin_inset Quotes erd
22897 As stated above, the Converter is set to
22898 \begin_inset Quotes eld
22906 \begin_inset Quotes erd
22909 , with Flags set to
22910 \begin_inset Newline newline
22914 \begin_inset Quotes eld
22919 parselog=$$s/scripts/listerrors
22922 \begin_inset Quotes erd
22928 \begin_layout Subsubsection
22932 \begin_layout Standard
22933 There is also a new function implemented in the LyX server, the
22934 \begin_inset Quotes eld
22937 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22941 \begin_layout Standard
22942 When debugging code with ddd/gdb, it is possible to invoke a text editor
22943 at the current execution position with a single key stroke.
22944 The default ddd configuration for that is shift-ctrl-V.
22945 It happens that you can define the editor command line invocation in ddd
22948 Edit\SpecialChar \menuseparator
22949 Preferences\SpecialChar \menuseparator
22952 dialog and changing the "Edit Sources" entry.
22955 \begin_layout Standard
22956 I take advantage of the newly created LyX server function and this ddd feature,
22958 \begin_inset Quotes eld
22962 \begin_inset Quotes erd
22968 \begin_layout Standard
22969 \begin_inset VSpace defskip
22975 \begin_layout Standard
22978 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22981 \begin_layout Standard
22982 \begin_inset VSpace defskip
22988 \begin_layout Standard
22989 With this, whenever you are using ddd and find a point in the program that
22990 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22991 ddd will forward this information to LyX through the LyX server and then
22992 the LyX window will show the same file with the cursor at the same position
22993 ddd was pointing to.
22994 No more guessing or long scrolling to locate a point in the program back
22998 \begin_layout Standard
22999 Note however that you must enable the LyX server to get this feature working
23000 (it is disabled by default).
23001 You can enable it in
23013 ) by entering in the
23018 \begin_inset Quotes eld
23023 /home/<your-home-directory>/.lyx/lyxpipe
23026 \begin_inset Quotes erd
23032 \begin_layout Standard
23033 Read the LyX server documentation in the
23035 Customization Manual
23037 for further information.
23040 \begin_layout Subsubsection
23044 \begin_layout Standard
23045 There are six new buttons that can be added to your LyX toolbar.
23046 Five of these buttons are short cuts to layout styles:
23067 The last one is a short cut to the
23068 \begin_inset Quotes eld
23072 \begin_inset Quotes erd
23079 \begin_layout Standard
23080 LyX has a range of buttons that are available for tool bar customization.
23081 In my toolbar I like to combine the six short cuts above with two more:
23086 \SpecialChar \menuseparator
23091 \SpecialChar \menuseparator
23098 View\SpecialChar \menuseparator
23102 Here is how it looks like:
23105 \begin_layout LyX-Code
23109 \begin_layout LyX-Code
23113 \begin_layout LyX-Code
23114 Icon "layout Standard"
23117 \begin_layout LyX-Code
23118 Icon "layout Section"
23121 \begin_layout LyX-Code
23122 Icon "layout LaTeX"
23125 \begin_layout LyX-Code
23126 Icon "layout LyX-Code"
23129 \begin_layout LyX-Code
23130 Icon "layout Chunk"
23133 \begin_layout LyX-Code
23137 \begin_layout LyX-Code
23141 \begin_layout LyX-Code
23142 Icon "buffer-typeset"
23145 \begin_layout LyX-Code
23146 Icon "build-program"
23149 \begin_layout LyX-Code
23153 \begin_layout LyX-Code
23157 \begin_layout LyX-Code
23161 \begin_layout LyX-Code
23165 \begin_layout LyX-Code
23169 \begin_layout Subsubsection
23170 Colors customization
23173 \begin_layout Standard
23174 There are a number of colors in LyX that can be customized in
23179 One of the things that bothers people is the LaTeX font color.
23180 The default color is red, since the chunks uses LaTeX font, and there is
23181 a lot of chunks in literate documents, you may get tired of seeing everything
23183 You can change it by going to the tabs
23192 \begin_layout Standard
23193 The next thing is the visible presence of the newline character in the screen.
23194 You can choose the color of this particular character and make it blend
23196 I recommend you choosing a color that is close to the background but not
23197 equal, that way you still can see it is there, but it is not bothering
23201 \begin_layout Subsection
23202 LyX and knitr/Sweave
23205 \begin_layout Standard
23214 is documented in the
23218 example file and in the Sweave manual (menu
23220 Help\SpecialChar \menuseparator
23226 \begin_layout Chapter
23230 \begin_layout Standard
23231 You can do everything with LyX that you can do with LaTeX.
23232 However, LyX cannot support every LaTeX feature directly.
23233 But you can always use TeX Code.
23234 This chapter shows you some more special things you might want to use.
23235 For other special things you can do with figures, tables, floats, boxes
23236 and notes, have a look at the
23239 \begin_inset space ~
23247 \begin_layout Section
23248 Multiple Text Columns
23251 \begin_layout Standard
23252 This feature is independent of the option
23254 Two-column document
23256 in the document settings under
23261 If you want to have 2
23262 \begin_inset space ~
23265 columns for the whole document, it is recommended to use the
23267 Two-column document
23270 For all other cases use this feature.
23273 \begin_layout Standard
23274 To use multiple text columns in your document, you have to load the module
23281 Document\SpecialChar \menuseparator
23282 Settings\SpecialChar \menuseparator
23285 ) and must have the LaTeX-package
23292 \begin_layout Standard
23293 Footnotes within multiple columns will be placed at the bottom of the page
23294 and not under each column.
23295 Within the different columns you can use everything, with the limitation
23296 that for floats you need to use the float option
23303 \begin_layout Subsection
23307 \begin_layout Standard
23308 If you want to have 2
23309 \begin_inset space ~
23312 columns in your text, use the style
23314 Begin Multiple Columns
23316 where the columns should start.
23317 The content of the style is the number of the columns, so in this case
23319 \begin_inset Quotes eld
23323 \begin_inset Quotes erd
23327 At the point where the columns should end use the style
23329 End Multiple Columns
23334 \begin_layout Standard
23335 Here is an example:
23338 \begin_layout Begin Multiple Columns
23342 \begin_layout Standard
23347 The Adventure of the Empty House
23350 \begin_inset Newline newline
23355 Sir Arthur Conan Doyle
23358 \begin_layout Standard
23361 It was in the spring of the year 1894 that all London was interested, and
23362 the fashionable world dismayed, by the murder of the Honourable Ronald
23363 Adair under most unusual and inexplicable circumstances.
23364 The public has already learned those particulars of the crime which came
23365 out in the police investigation, but a good deal was suppressed upon that
23366 occasion, since the case for the prosecution was so overwhelmingly strong
23367 that it was not necessary to bring forward all the facts.
23368 Only now, at the end of nearly ten years, am I allowed to supply those
23369 missing links which make up the whole of that remarkable chain.
23370 The crime was of interest in itself, but that interest was as nothing to
23371 me compared to the inconceivable sequel, which afforded me the greatest
23372 shock and surprise of any event in my adventurous life.
23373 Even now, after this long interval, I find myself thrilling as I think
23374 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23375 ty which utterly submerged my mind.
23376 Let me say to that public, which has shown some interest in those glimpses
23377 which I have occasionally given them of the thoughts and actions of a very
23378 remarkable man, that they are not to blame me if I have not shared my knowledge
23379 with them, for I should have considered it my first duty to do so, had
23380 I not been barred by a positive prohibition from his own lips, which was
23381 only withdrawn upon the third of last month.
23384 \begin_layout End Multiple Columns
23388 \begin_layout Standard
23389 Here is an example with 3
23390 \begin_inset space ~
23396 \begin_layout Begin Multiple Columns
23400 \begin_layout Standard
23403 It can be imagined that my close intimacy with Sherlock Holmes had interested
23404 me deeply in crime, and that after his disappearance I never failed to
23405 read with care the various problems which came before the public.
23406 And I even attempted, more than once, for my own private satisfaction,
23407 to employ his methods in their solution, though with indifferent success.
23408 There was none, however, which appealed to me like this tragedy of Ronald
23410 As I read the evidence at the inquest, which led up to a verdict of willful
23411 murder against some person or persons unknown, I realized more clearly
23412 than I had ever done the loss which the community had sustained by the
23413 death of Sherlock Holmes.
23414 There were points about this strange business which would, I was sure,
23415 have specially appealed to him, and the efforts of the police would have
23416 been supplemented, or more probably anticipated, by the trained observation
23417 and the alert mind of the first criminal agent in Europe.
23418 All day, as I drove upon my round, I turned over the case in my mind and
23419 found no explanation which appeared to me to be adequate.
23420 At the risk of telling a twice-told tale, I will recapitulate the facts
23421 as they were known to the public at the conclusion of the inquest.
23424 \begin_layout End Multiple Columns
23428 \begin_layout Standard
23429 You can have up to 10
23430 \begin_inset space ~
23433 columns if you want to, but that might not be very pleasant for the readers
23437 \begin_layout Standard
23438 \begin_inset Newpage newpage
23444 \begin_layout Subsection
23445 Columns inside Columns
23448 \begin_layout Standard
23449 You can also have columns inside columns:
23452 \begin_layout Begin Multiple Columns
23456 \begin_layout Standard
23459 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23460 at that time governor of one of the Australian colonies.
23461 Adair's mother had returned from Australia to undergo the operation for
23462 cataract, and she, her son Ronald, and her daughter Hilda were living together
23466 \begin_layout Begin Multiple Columns
23470 \begin_layout Standard
23473 The youth moved in the best society–had, so far as was known, no enemies
23474 and no particular vices.
23475 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23476 had been broken off by mutual consent some months before, and there was
23477 no sign that it had left any very profound feeling behind it.
23478 For the rest {sic} the man's life moved in a narrow and conventional circle,
23479 for his habits were quiet and his nature unemotional.
23480 Yet it was upon this easy-going young aristocrat that death came, in most
23481 strange and unexpected form, between the hours of ten and eleven-twenty
23482 on the night of March 30, 1894.
23485 \begin_layout End Multiple Columns
23489 \begin_layout Standard
23492 Ronald Adair was fond of cards–playing continually, but never for such stakes
23494 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23495 It was shown that, after dinner on the day of his death, he had played
23496 a rubber of whist at the latter club.
23497 He had also played there in the afternoon.
23502 The evidence of those who had played with him– Mr.
23503 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23504 and that there was a fairly equal fall of the cards.
23505 Adair might have lost five pounds, but not more.
23506 His fortune was a considerable one, and such a loss could not in any way
23508 He had played nearly every day at one club or other, but he was a cautious
23509 player, and usually rose a winner.
23510 It came out in evidence that, in partnership with Colonel Moran, he had
23511 actually won as much as four hundred and twenty pounds in a sitting, some
23512 weeks before, from Godfrey Milner and Lord Balmoral.
23513 So much for his recent history as it came out at the inquest.
23516 \begin_layout End Multiple Columns
23520 \begin_layout Subsection
23524 \begin_layout Standard
23525 The examples in this section show some more special features of multiple
23529 \begin_layout Standard
23530 For more features of multiple columns, have a look at the documentation
23531 of the LaTeX-package
23536 \begin_inset CommandInset citation
23545 \begin_layout Subsubsection
23549 \begin_layout Standard
23550 To add a preface text for multiple columns, add the optional parameter
23554 behind the number of columns in the
23556 Begin Multiple Columns
23559 Write in there your preface.
23560 An example with some preface text:
23563 \begin_layout Standard
23564 \begin_inset VSpace bigskip
23570 \begin_layout Begin Multiple Columns
23572 \begin_inset Argument post:1
23575 \begin_layout Plain Layout
23576 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23585 \begin_layout Standard
23588 On the evening of the crime, he returned from the club exactly at ten.
23589 His mother and sister were out spending the evening with a relation.
23590 The servant deposed that she heard him enter the front room on the second
23591 floor, generally used as his sitting-room.
23592 She had lit a fire there, and as it smoked she had opened the window.
23593 No sound was heard from the room until eleven-twenty, the hour of the return
23594 of Lady Maynooth and her daughter.
23595 Desiring to say good-night, she attempted to enter her son's room.
23596 The door was locked on the inside, and no answer could be got to their
23597 cries and knocking.
23598 Help was obtained, and the door forced.
23599 The unfortunate young man was found lying near the table.
23600 His head had been horribly mutilated by an expanding revolver bullet, but
23601 no weapon of any sort was to be found in the room.
23604 \begin_layout End Multiple Columns
23608 \begin_layout Standard
23609 You can also use a section heading as the preface if you use a section command
23611 For example the command
23614 \begin_layout Standard
23619 subsection{subsection title}
23622 \begin_layout Standard
23623 creates a subsection.
23624 In this example the preface is a subsubsection:
23627 \begin_layout Begin Multiple Columns
23629 \begin_inset Argument post:1
23632 \begin_layout Plain Layout
23636 \begin_layout Plain Layout
23645 This is a subsubsection heading as a preface
23649 \begin_layout Plain Layout
23664 \begin_layout Standard
23667 A minute examination of the circumstances served only to make the case more
23669 In the first place, no reason could be given why the young man should have
23670 fastened the door upon the inside.
23671 There was the possibility that the murderer had done this, and had afterwards
23672 escaped by the window.
23673 The drop was at least twenty feet, however, and a bed of crocuses in full
23675 Neither the flowers nor the earth showed any sign of having been disturbed,
23676 nor were there any marks upon the narrow strip of grass which separated
23677 the house from the road.
23678 Apparently, therefore, it was the young man himself who had fastened the
23680 But how did he come by his death? No one could have climbed up to the window
23681 without leaving traces.
23682 Suppose a man had fired through the window, he would indeed be a remarkable
23683 shot who could with a revolver inflict so deadly a wound.
23684 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23685 a hundred yards of the house.
23686 No one had heard a shot.
23689 \begin_layout End Multiple Columns
23693 \begin_layout Standard
23694 If there is less vertical space than 6
23695 \begin_inset space ~
23698 text lines is left on the page at the beginning of the multiple columns,
23699 a page break will be inserted before the multiple columns.
23700 Depending on the number of lines of the preface text, you might want to
23702 This is done by inserting the optional parameter
23704 Space before page break
23706 behind the preface.
23707 There insert the amount of space like e.
23708 \begin_inset space \thinspace{}
23712 \begin_inset space \space{}
23716 \begin_inset Quotes eld
23720 \begin_inset Quotes erd
23724 In this example the space is set to 7
23725 \begin_inset space ~
23728 text lines by using
23729 \begin_inset Quotes eld
23735 \begin_inset Quotes erd
23744 needs to be inserted as TeX code):
23747 \begin_layout Begin Multiple Columns
23749 \begin_inset Argument post:1
23752 \begin_layout Plain Layout
23756 \begin_layout Plain Layout
23765 This is the sectioning command
23766 \begin_inset Newline newline
23770 \begin_inset Newline newline
23773 with multiple text lines
23777 \begin_layout Plain Layout
23790 \begin_inset Argument post:2
23793 \begin_layout Plain Layout
23798 \begin_layout Plain Layout
23815 \begin_layout Standard
23818 On the evening of the crime, he returned from the club exactly at ten.
23819 His mother and sister were out spending the evening with a relation.
23820 The servant deposed that she heard him enter the front room on the second
23821 floor, generally used as his sitting-room.
23822 She had lit a fire there, and as it smoked she had opened the window.
23823 No sound was heard from the room until eleven-twenty, the hour of the return
23824 of Lady Maynooth and her daughter.
23825 Desiring to say good-night, she attempted to enter her son's room.
23826 The door was locked on the inside, and no answer could be got to their
23827 cries and knocking.
23828 Help was obtained, and the door forced.
23829 The unfortunate young man was found lying near the table.
23830 His head had been horribly mutilated by an expanding revolver bullet, but
23831 no weapon of any sort was to be found in the room.
23834 \begin_layout End Multiple Columns
23838 \begin_layout Subsubsection
23842 \begin_layout Standard
23843 The amount of space before and after multiple columns can be changed by
23844 changing the length
23851 For example the command
23854 \begin_layout Standard
23864 \begin_layout Standard
23865 in TeX Code changes its value to 3
23866 \begin_inset space \thinspace{}
23870 The change must be made before the multiple columns' start.
23871 The predefined value is 13
23872 \begin_inset space \thinspace{}
23878 \begin_layout Standard
23886 \begin_inset space \thinspace{}
23892 \begin_layout Standard
23896 \begin_layout Plain Layout
23902 multicolsep}{2.5cm}
23910 \begin_layout Begin Multiple Columns
23914 \begin_layout Standard
23917 All day I turned these facts over in my mind, endeavouring to hit upon some
23918 theory which could reconcile them all, and to find that line of least resistanc
23919 e which my poor friend had declared to be the starting-point of every investigat
23921 I confess that I made little progress.
23922 In the evening I strolled across the Park, and found myself about six o'clock
23923 at the Oxford Street end of Park Lane.
23924 A group of loafers upon the pavements, all staring up at a particular window,
23925 directed me to the house which I had come to see.
23926 A tall, thin man with coloured glasses, whom I strongly suspected of being
23927 a plain-clothes detective, was pointing out some theory of his own, while
23928 the others crowded round to listen to what he said.
23929 I got as near him as I could, but his observations seemed to me to be absurd,
23930 so I withdrew again in some disgust.
23931 As I did so I struck against an elderly, deformed man, who had been behind
23932 me, and I knocked down several books which he was carrying.
23935 \begin_layout End Multiple Columns
23939 \begin_layout Standard
23940 \begin_inset Note Greyedout
23943 \begin_layout Plain Layout
23948 The values you set with
23954 will be used for all following multiple columns until you change them again.
23962 \begin_layout Standard
23966 \begin_layout Plain Layout
23978 \begin_inset Note Note
23981 \begin_layout Plain Layout
23982 go back to the default
23990 \begin_layout Standard
23991 \begin_inset Newpage newpage
23997 \begin_layout Subsubsection
24001 \begin_layout Standard
24002 The width of the columns is automatically calculated, but you can modify
24003 the space between the columns.
24004 This is done by changing the length
24011 Its predefined value is 10
24012 \begin_inset space \thinspace{}
24016 Here is an example where
24023 \begin_inset space \thinspace{}
24029 \begin_layout Standard
24033 \begin_layout Plain Layout
24047 \begin_layout Begin Multiple Columns
24051 \begin_layout Standard
24054 My observations of No.
24055 \begin_inset space \space{}
24058 427 Park Lane did little to clear up the problem in which I was interested.
24059 The house was separated from the street by a low wall and railing, the
24060 whole not more than five feet high.
24061 It was perfectly easy, therefore, for anyone to get into the garden, but
24062 the window was entirely inaccessible, since there was no water pipe or
24063 anything which could help the most active man to climb it.
24064 More puzzled than ever, I retraced my steps to Kensington.
24065 I had not been in my study five minutes when the maid entered to say that
24066 a person desired to see me.
24067 To my astonishment it was none other than my strange old book collector,
24068 his sharp, wizened face peering out from a frame of white hair, and his
24069 precious volumes, a dozen of them at least, wedged under his right arm.
24072 \begin_layout End Multiple Columns
24076 \begin_layout Standard
24080 \begin_layout Plain Layout
24092 \begin_inset Note Note
24095 \begin_layout Plain Layout
24096 go back to the default
24104 \begin_layout Subsubsection
24108 \begin_layout Standard
24109 Between the columns a rule with a width of the length
24116 If this rule width is set to 0
24117 \begin_inset space \thinspace{}
24120 pt (this is the default), the rule is suppressed.
24121 In the following example the line is 2
24122 \begin_inset space \thinspace{}
24128 \begin_layout Standard
24132 \begin_layout Plain Layout
24138 columnseprule}{2pt}
24146 \begin_layout Begin Multiple Columns
24150 \begin_layout Standard
24153 \begin_inset Quotes eld
24156 You're surprised to see me, sir,
24157 \begin_inset Quotes erd
24160 said he, in a strange, croaking voice.
24163 \begin_layout Standard
24166 I acknowledged that I was.
24169 \begin_layout Standard
24172 \begin_inset Quotes eld
24175 Well, I've a conscience, sir, and when I chanced to see you go into this
24176 house, as I came hobbling after you, I thought to myself, I'll just step
24177 in and see that kind gentleman, and tell him that if I was a bit gruff
24178 in my manner there was not any harm meant, and that I am much obliged to
24179 him for picking up my books.
24180 \begin_inset Quotes erd
24186 \begin_layout Standard
24189 \begin_inset Quotes eld
24192 You make too much of a trifle,
24193 \begin_inset Quotes erd
24198 \begin_inset Quotes eld
24201 May I ask how you knew who I was?
24202 \begin_inset Quotes erd
24208 \begin_layout Standard
24211 \begin_inset Quotes eld
24214 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24215 you'll find my little bookshop at the corner of Church Street, and very
24216 happy to see you, I am sure.
24217 Maybe you collect yourself, sir.
24221 \begin_inset space ~
24234 --a bargain, every one of them.
24235 With five volumes you could just fill that gap on that second shelf.
24236 It looks untidy, does it not, sir?
24237 \begin_inset Quotes erd
24243 \begin_layout End Multiple Columns
24247 \begin_layout Standard
24251 \begin_layout Plain Layout
24257 columnseprule}{0pt}
24263 \begin_inset Note Note
24266 \begin_layout Plain Layout
24267 go back to the default
24275 \begin_layout Standard
24276 \begin_inset Newpage newpage
24282 \begin_layout Section
24283 Non-standard Paragraph Shapes
24286 \begin_layout Standard
24288 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24289 For special cases like for example posters, invitation cards or poems you
24290 can modify the paragraph shape to one of your choice.
24291 This can be done by using the LaTeX-package
24295 which is loaded by using in the document settings the module
24297 Custom paragraph shapes
24302 \begin_layout Subsection
24306 \begin_layout Standard
24311 provides the following shapes:
24314 \begin_layout Standard
24315 \begin_inset Tabular
24316 <lyxtabular version="3" rows="13" columns="3">
24317 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24318 <column alignment="center" valignment="middle" width="16col%">
24319 <column alignment="center" valignment="middle" width="40col%">
24320 <column alignment="center" valignment="middle" width="35col%">
24321 <row endhead="true">
24322 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24325 \begin_layout Plain Layout
24331 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24334 \begin_layout Plain Layout
24340 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24343 \begin_layout Plain Layout
24351 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24354 \begin_layout Plain Layout
24360 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24363 \begin_layout Plain Layout
24364 Circle with circular hole (in the size of a CD/DVD)
24369 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24372 \begin_layout Plain Layout
24373 Cannot be scaled, take care there is not too much text
24380 <cell alignment="center" valignment="top" topline="true" usebox="none">
24383 \begin_layout Plain Layout
24389 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24392 \begin_layout Plain Layout
24398 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24401 \begin_layout Plain Layout
24402 Fragile, calculation might fail
24409 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24412 \begin_layout Plain Layout
24418 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24421 \begin_layout Plain Layout
24422 Rhomboid (symbolizing a
24423 \begin_inset Quotes eld
24427 \begin_inset Quotes erd
24435 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24438 \begin_layout Plain Layout
24446 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24449 \begin_layout Plain Layout
24455 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24458 \begin_layout Plain Layout
24464 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24467 \begin_layout Plain Layout
24475 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24478 \begin_layout Plain Layout
24484 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24487 \begin_layout Plain Layout
24493 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24496 \begin_layout Plain Layout
24504 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24507 \begin_layout Plain Layout
24513 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24516 \begin_layout Plain Layout
24517 Nut for bolt (hexagon with circular hole)
24522 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24525 \begin_layout Plain Layout
24533 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24536 \begin_layout Plain Layout
24542 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24545 \begin_layout Plain Layout
24551 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24554 \begin_layout Plain Layout
24562 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24565 \begin_layout Plain Layout
24571 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24574 \begin_layout Plain Layout
24580 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24583 \begin_layout Plain Layout
24591 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24594 \begin_layout Plain Layout
24600 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24603 \begin_layout Plain Layout
24609 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24612 \begin_layout Plain Layout
24620 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24623 \begin_layout Plain Layout
24629 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24632 \begin_layout Plain Layout
24633 Normal/reversed rain drop
24638 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24641 \begin_layout Plain Layout
24642 Fragile, calculation might fail
24649 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24652 \begin_layout Plain Layout
24658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24661 \begin_layout Plain Layout
24667 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24670 \begin_layout Plain Layout
24678 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24681 \begin_layout Plain Layout
24683 \begin_inset Newline newline
24691 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24694 \begin_layout Plain Layout
24695 Triangles in different orientations
24700 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24703 \begin_layout Plain Layout
24717 \begin_layout Standard
24718 To use a shape for your paragraph, simply select it in LyX's pull-down box
24719 for environments in the toolbar.
24722 \begin_layout Standard
24723 \begin_inset Newpage newpage
24729 \begin_layout Standard
24730 Here is an example paragraph in the shape of a nut:
24733 \begin_layout Standard
24734 \begin_inset VSpace bigskip
24743 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24744 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24746 At vero eos et accusam et justo duo dolores et ea rebum.
24747 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24749 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24750 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24754 \begin_layout Standard
24755 \begin_inset VSpace bigskip
24761 \begin_layout Standard
24762 \begin_inset Note Greyedout
24765 \begin_layout Plain Layout
24770 : shapepar paragraphs cannot run over a page break.
24778 \begin_layout Standard
24779 \begin_inset VSpace bigskip
24785 \begin_layout Standard
24790 takes care that the shape will always be preserved, no matter how much
24791 text is in the paragraph.
24792 Therefore the paragraph size changes with the amount of contained text.
24793 This can lead to paragraph sizes exceeding the page margins.
24794 To demonstrate the size scaling, here is the same example paragraph but
24795 with twice as much text:
24798 \begin_layout Standard
24799 \begin_inset Newpage newpage
24808 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24809 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24811 At vero eos et accusam et justo duo dolores et ea rebum.
24812 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24814 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24815 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24817 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24818 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24820 At vero eos et accusam et justo duo dolores et ea rebum.
24821 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24823 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24824 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24828 \begin_layout Standard
24829 \begin_inset VSpace bigskip
24835 \begin_layout Standard
24836 An exception is the shape
24841 It cannot be scaled because it must fit the size of a CD/DVD.
24842 Therefore the amount of text that fits into the shape is limited.
24843 \begin_inset Newline newline
24854 shape are fragile, meaning that the calculation of their size can fail,
24855 depending on the amount of text.
24856 You will then get the LaTeX error
24857 \begin_inset Quotes eld
24860 Arithmetic overflow
24861 \begin_inset Quotes erd
24865 In this case one can try to remove or add some text; if nothing works one
24866 has to use another shape.
24869 \begin_layout Standard
24870 \begin_inset VSpace bigskip
24876 \begin_layout Standard
24877 For shapes with tips you will maybe see that LaTeX's hyphenation routine
24878 fails for text in the tips.
24879 Therefore it is often necessary to add hyphenation points
24884 arg "specialchar-insert hyphenation"
24889 ) to the corresponding text parts.
24892 \begin_layout Standard
24893 \begin_inset VSpace bigskip
24899 \begin_layout Standard
24900 Shapepar paragraphs are either always centered or placed on the page so
24901 that their left border touches the left page margin.
24902 You can therefore not use the paragraph dialog to align such paragraphs.
24903 A solution is to put the paragraph into a minipage or parbox and align
24905 The problem is hereby to find the right width for the box.
24906 Because if it is too wide and you center the box, the paragraph is not
24907 centered too because it sticks at the left side of the box.
24908 So you might have to play a bit with the width until it fits.
24909 Here are two heart-shaped paragraphs, the first one is not aligned, the
24910 second one is right-aligned:
24913 \begin_layout Standard
24914 \begin_inset Newpage newpage
24920 \begin_layout Heart
24925 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24926 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24928 At vero eos et accusam et justo duo dolores et ea rebum.
24929 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24933 \begin_layout Standard
24934 \begin_inset VSpace bigskip
24940 \begin_layout Standard
24943 \begin_inset Box Frameless
24953 height_special "totalheight"
24956 \begin_layout Heart
24961 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24962 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24964 At vero eos et accusam et justo duo dolores et ea rebum.
24965 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24974 \begin_layout Subsection
24978 \begin_layout Standard
24979 You can define any shape you want.
24980 Doing this manually is a lot of work because every coordinate must be specified.
24981 But there is a way to let the computer calculate the coordinates:
24984 \begin_layout Enumerate
24985 Install the program
24986 \begin_inset CommandInset href
24989 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
24996 \begin_layout Enumerate
25007 \begin_layout Plain Layout
25018 \begin_layout Plain Layout
25025 eX\SpecialChar \menuseparator
25026 Settings\SpecialChar \menuseparator
25029 and select the font size you are using in your document.
25030 For example this document uses the size 12
25031 \begin_inset space \thinspace{}
25037 \begin_layout Enumerate
25041 \begin_layout Enumerate
25048 \begin_layout Plain Layout
25059 \begin_layout Plain Layout
25066 eX\SpecialChar \menuseparator
25069 to export the shape to coordinates.
25070 In the appearing dialog use either the outline of your shape for the coordinate
25071 s or the path itself.
25075 \begin_layout Plain Layout
25076 For more information see
25077 \begin_inset CommandInset href
25079 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25091 \begin_layout Standard
25092 The coordinates are written into a TeX-file.
25093 To use it for your LyX document
25096 \begin_layout Enumerate
25097 Place the cursor before the first character of your paragraph (or into a
25101 \begin_layout Enumerate
25102 Open in LyX the menu
25104 Insert\SpecialChar \menuseparator
25105 File\SpecialChar \menuseparator
25107 \begin_inset space ~
25112 , select the file and use
25121 \begin_layout Standard
25122 \begin_inset VSpace defskip
25128 \begin_layout Standard
25129 \begin_inset Note Greyedout
25132 \begin_layout Plain Layout
25137 : The changed shape only applies to the current paragraph; everything is
25138 reset to normal for the next paragraph.
25139 Therefore the shape definition file must be input into every paragraph
25140 with the desired shape.
25148 \begin_layout Standard
25149 \begin_inset VSpace bigskip
25155 \begin_layout Standard
25156 Here is an example:
25159 \begin_layout Standard
25160 \begin_inset VSpace bigskip
25166 \begin_layout Standard
25167 \begin_inset CommandInset include
25169 filename "SpecialParagraphShape.tex"
25175 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25176 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25178 At vero eos et accusam et justo duo dolores et ea rebum.
25179 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25181 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25182 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25186 \begin_layout Standard
25187 \begin_inset VSpace bigskip
25193 \begin_layout Standard
25198 to draw complexer shapes in
25202 you can draw the shape in a program of your choice and import the resulting
25208 Then you only need to draw a line or spline along the outline of the image.
25211 \begin_layout Standard
25212 \begin_inset VSpace bigskip
25218 \begin_layout Standard
25221 Custom paragraph shapes
25223 also provides the two commands
25231 which can be used to define custom shapes coordinate by coordinate.
25235 \begin_layout Plain Layout
25236 These commands are internally used for all shapes described here.
25241 For information how these styles are used and about further customization
25242 possibilities, have a look at the documentation of the package
25247 \begin_inset CommandInset citation
25256 \begin_layout Bibliography
25257 \begin_inset CommandInset bibitem
25258 LatexCommand bibitem
25263 Documentation of the LaTeX-package
25264 \begin_inset CommandInset href
25267 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25274 \begin_layout Bibliography
25275 \begin_inset CommandInset bibitem
25276 LatexCommand bibitem
25281 Documentation of the LaTeX-package
25282 \begin_inset CommandInset href
25285 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"