1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
48 \maintain_unincluded_children false
51 InsetLayout CharStyle:MenuItem
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
113 \cite_engine_type default
117 \paperorientation portrait
121 \notefontcolor #0000ff
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
133 \paperpagestyle headings
134 \tracking_changes true
135 \output_changes false
139 \author 711066561 "Enrico Forestieri"
145 Additional LyX Features
148 \begin_layout Subtitle
157 \begin_layout Plain Layout
159 Principal maintainer of this file is
164 If you have comments or error corrections, please send them to the LyX
165 Documentation mailing list,
166 \begin_inset Flex Code
169 \begin_layout Plain Layout
171 <lyx-docs@lists.lyx.org>
184 \begin_layout Standard
185 \begin_inset CommandInset toc
186 LatexCommand tableofcontents
193 \begin_layout Chapter
197 \begin_layout Standard
198 This manual is essentially Part II of the
200 User's Guide\SpecialChar \@.
203 The reason for separating the two documents is simple: the
207 is already quite lengthy, and it contains information on all of the basic
208 features one needs to know in order to prepare most documents.
209 However, the LyX Team has worked to make LyX extensible through various
210 configuration files and external packages.
211 That means that if you want to support the Fizzwizzle LaTeX package, you
212 can create a layout file (or module) for it without having to alter LyX
214 We've already had contributions of several new features this way, and some
215 of them are documented here.
216 There are also some more `advanced' features, such as how to control the
217 presentation of bibliographies and how to work with multi-part documents,
218 that are not covered in the
222 and are discussed here.
225 \begin_layout Standard
226 This manual also documents some special features, like fax support, version
227 control, and SGML support, which require additional software to work properly.
228 There is also a chapter on LyX's support for HTML.
229 And lastly, there's a chapter of LaTeX tools and tips, things you can use
230 to spruce up your documents by directly using the powerful features of
236 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
239 \begin_layout Standard
240 If you haven't read the
244 yet, you are definitely in the wrong manual.
249 is the first place to go, since it describes the notation and format of
251 You should also be thoroughly familiar with the
255 and all of the basic features of LyX before attempting to read this one.
258 \begin_layout Standard
259 Since many of the topics in this manual depend heavily on LyX's interaction
260 with LaTeX, this first chapter covers the inner workings of LyX and how
261 to direct LyX to generate exactly the LaTeX code you want.
262 It is obviously for more seasoned LyX users.
265 \begin_layout Chapter
269 \begin_layout Section
273 \begin_layout Standard
274 This chapter is for both TeX-nicians and the LaTeX-curious.
275 In it, we'll explain how LyX and LaTeX work together to produce printable
277 This is the only place in any of the manuals where we assume you know something
281 \begin_layout Standard
282 At one time, LyX was called a
283 \begin_inset Quotes eld
286 WYSIWYM frontend to LaTeX,
287 \begin_inset Quotes erd
290 but that's no longer true.
291 There are frontends to LaTeX out there.
295 \begin_layout Plain Layout
296 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
297 There are also the LaTeX modes for vi and emacs, of course.
302 These are basically text editors with the ability to run LaTeX and mark
303 any errors in the file you're editing.
312 run LaTeX, and it also indicates errors in the file, it also does much,
314 For one thing, you don't need to know LaTeX to use LyX effectively.
315 And LyX has added its own extensions to LaTeX.
316 Try the following sometime: select
317 \begin_inset Flex MenuItem
320 \begin_layout Plain Layout
321 Export\SpecialChar \menuseparator
328 \begin_inset Flex MenuItem
331 \begin_layout Plain Layout
338 \begin_inset Flex MenuItem
341 \begin_layout Plain Layout
342 View\SpecialChar \menuseparator
352 ), then look at the preamble of the resulting
353 \begin_inset Flex Code
356 \begin_layout Plain Layout
363 You'll notice a variety of new macros defined specifically by LyX.
364 These macros are defined automatically, according to the features you use
368 \begin_layout Standard
369 There are several commands that automatically invoke LaTeX.
373 \begin_layout Itemize
374 \begin_inset Flex MenuItem
377 \begin_layout Plain Layout
378 Document\SpecialChar \menuseparator
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
391 \begin_layout Plain Layout
392 Document\SpecialChar \menuseparator
401 \begin_layout Itemize
402 \begin_inset Flex MenuItem
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
415 \begin_layout Itemize
416 \begin_inset Flex MenuItem
419 \begin_layout Plain Layout
420 File\SpecialChar \menuseparator
429 \begin_layout Standard
430 They will only invoke LaTeX if the file has changed since the last time
435 \begin_layout Standard
436 When LyX runs LaTeX on the file you're editing, it performs these steps:
439 \begin_layout Enumerate
440 Convert the document to LaTeX and save to a file with the extension
441 \begin_inset Flex Code
444 \begin_layout Plain Layout
451 \begin_inset Flex Code
454 \begin_layout Plain Layout
463 \begin_layout Enumerate
465 \begin_inset Flex Code
468 \begin_layout Plain Layout
474 file (maybe several times), and run any other commands (such as
475 \begin_inset Flex Code
478 \begin_layout Plain Layout
485 \begin_inset Flex Code
488 \begin_layout Plain Layout
494 ) needed to compile the LaTeX file.
497 \begin_layout Enumerate
498 If there are any errors, show the error log.
501 \begin_layout Standard
502 If you have run LaTeX using
503 \begin_inset Flex MenuItem
506 \begin_layout Plain Layout
509 \SpecialChar \menuseparator
517 , LyX then runs a DVI viewer to display the DVI-file.
519 \begin_inset Flex MenuItem
522 \begin_layout Plain Layout
525 \SpecialChar \menuseparator
533 , LyX performs further steps:
536 \begin_layout Itemize
538 \begin_inset Flex Code
541 \begin_layout Plain Layout
547 to convert the DVI file to PostScript.
550 \begin_layout Itemize
551 Run a PostScript viewer, such as
552 \begin_inset Flex Code
555 \begin_layout Plain Layout
561 , to display the PostScript file.
564 \begin_layout Standard
565 LyX does similar things when viewing, or exporting, other formats.
568 \begin_layout Section
569 Translating LaTeX files into LyX
572 \begin_layout Standard
573 You can import a LaTeX file into LyX by using the
574 \begin_inset Flex MenuItem
577 \begin_layout Plain Layout
578 File\SpecialChar \menuseparator
579 Import\SpecialChar \menuseparator
586 This will call a program named
587 \begin_inset Flex Code
590 \begin_layout Plain Layout
596 which will create a file
597 \begin_inset Flex Code
600 \begin_layout Plain Layout
607 \begin_inset Flex Code
610 \begin_layout Plain Layout
617 LyX will then open that file.
621 \begin_layout Plain Layout
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 can also be run from the command line, of course.
639 \begin_layout Standard
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 will translate most legal LaTeX, but not everything.
650 It will put things it doesn't understand into TeX code, so after translating
652 \begin_inset Flex Code
655 \begin_layout Plain Layout
661 , you can look for TeX code and hand-edit it until it looks right.
664 \begin_layout Standard
665 If you don't know what TeX code is, read the next section.
668 \begin_layout Section
669 \begin_inset CommandInset label
671 name "sec:Inserting-TeX-Code"
675 Inserting TeX Code into LyX Documents
678 \begin_layout Standard
679 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
680 You can always insert TeX code into any LyX document.
681 LyX cannot, and will never be able to, display every possible LaTeX construct.
682 If ever you need to insert LaTeX commands into your LyX document, you can
684 \begin_inset Flex Code
687 \begin_layout Plain Layout
693 box, which you can insert into your document with
694 \begin_inset Flex MenuItem
697 \begin_layout Plain Layout
698 Insert\SpecialChar \menuseparator
704 or the keyboard shortcut
713 \begin_layout Standard
714 Here's an example of inserting LaTeX commands in a LyX document.
715 The code looks like this:
718 \begin_layout LyX-Code
722 \begin_inset Newline newline
728 \begin_inset Newline newline
731 This is an example of a minipage environment.
733 \begin_inset Newline newline
736 can put nearly everything in it, even (non-floating)
737 \begin_inset Newline newline
742 \begin_inset Newline newline
748 \begin_inset Newline newline
752 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
775 \begin_inset Newline newline
781 \begin_inset Newline newline
787 \begin_inset Newline newline
793 \begin_inset Newline newline
801 \begin_layout LyX-Code
805 \begin_layout Standard
807 \begin_inset Flex Code
810 \begin_layout Plain Layout
816 box containing this text is directly after this paragraph.
817 Those of you reading the manual in LyX will only see the TeX code inset.
818 Those reading a printed version of the manuals will see the actual results:
819 \begin_inset VSpace bigskip
825 \begin_layout Standard
829 \begin_layout Plain Layout
836 \begin_layout Plain Layout
843 \begin_layout Plain Layout
845 This is an example of a minipage environment.
846 You can put nearly everything in it, even (non-floating) figures and tables.
850 \begin_layout Plain Layout
857 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
883 \begin_layout Plain Layout
889 \begin_layout Plain Layout
896 \begin_layout Plain Layout
903 \begin_layout Plain Layout
910 \begin_layout Plain Layout
920 \begin_inset VSpace bigskip
926 \begin_layout Standard
927 In addition to using TeX code, you can also create a separate file containing
928 some complex LaTeX structure and then use
929 \begin_inset Flex MenuItem
932 \begin_layout Plain Layout
933 Insert\SpecialChar \menuseparator
943 to include your file (you should select the type
944 \begin_inset Flex Code
947 \begin_layout Plain Layout
954 We recommend that you only do this if you have a
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
969 Otherwise, you'll have a big job tracking down LaTeX errors.
972 \begin_layout Standard
973 There are a few last points to emphasize:
976 \begin_layout Itemize
981 check if your LaTeX code is correct.
984 \begin_layout Itemize
985 Beware of reinventing the wheel.
988 \begin_layout Standard
989 On that last point, LyX does have quite a few features tucked into it, and
991 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
992 feature before you decide you have to do it by hand.
993 Moreover, there are numerous LaTeX packages out there to do all sorts of
994 things, from labels to envelopes to fancy multipage tables.
996 \begin_inset CommandInset href
999 target "http://www.ctan.org/"
1006 \begin_layout Standard
1007 If you do need to do some wild and fancy things within your document, be
1008 sure to check out a good LaTeX book for assistance.
1009 There are a number of them listed in the bibliography of the
1016 \begin_layout Section
1017 LyX and the LaTeX Preamble
1020 \begin_layout Subsection
1021 About the LaTeX Preamble
1024 \begin_layout Standard
1025 If you already know LaTeX, there is no need to explain here what the preamble
1027 If you don't, the following will give you some ideas—we recommend again
1028 that you consult a LaTeX book for further information.
1029 In any case, you should read the points below, because they explain what
1030 you can do and what you don't need to do in the LaTeX preamble of a LyX
1034 \begin_layout Standard
1035 The LaTeX preamble comes at the very beginning of a document,
1043 \begin_layout Itemize
1044 Declare the document class.
1046 \begin_inset Newline newline
1049 LyX already does this for you.
1050 If you're a seasoned LaTeX-nician, and you have a custom document class
1051 you want to use, check out the
1053 Customization Manual
1055 for information on how to make LyX interface to it.
1058 \begin_layout Itemize
1059 Declare the usage of packages.
1061 \begin_inset Newline newline
1064 LaTeX packages provide special commands, which are only available within
1065 a document when the package has been declared in the preamble.
1066 In addition to providing special commands, the inclusion of a package can
1067 change the document.
1068 For example, the package
1069 \begin_inset Flex Code
1072 \begin_layout Plain Layout
1078 forces all paragraphs to be indented.
1079 There are other packages for labels, envelopes, margins, etc.
1083 \begin_layout Itemize
1084 Set counters, variables, lengths and widths.
1086 \begin_inset Newline newline
1089 There are several LaTeX counters and variables that
1093 be set globally from within the preamble in order to have the desired effect.
1094 (There are variables that you can set and reset inside the document, too.)
1095 Margins are a good example of something that must be set in the preamble.
1096 Another example is the label format for lists.
1097 You can actually set these just about anywhere, but it's best to do it
1098 just once, inside the preamble.
1101 \begin_layout Itemize
1102 Declare user defined commands (with
1103 \begin_inset Flex Code
1106 \begin_layout Plain Layout
1115 \begin_inset Flex Code
1118 \begin_layout Plain Layout
1127 \begin_inset Newline newline
1130 These are abbreviations for LaTeX commands which appear very often inside
1132 Although the preamble is a good place to declare such commands, they
1136 be declared anywhere (before they are used for the first time, of course).
1137 This can be useful if there is a lot of raw LaTeX code in your document,
1138 which normally should not be the case.
1141 \begin_layout Standard
1142 LyX adds its own set of definitions to the preamble of the
1143 \begin_inset Flex Code
1146 \begin_layout Plain Layout
1153 This makes LaTeX files generated by LyX portable.
1156 \begin_layout Subsection
1157 Changing the Preamble
1160 \begin_layout Standard
1161 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1162 can't change them without patching LyX itself.
1163 You can, however, add your own stuff to the preamble by selecting
1164 \begin_inset Flex MenuItem
1167 \begin_layout Plain Layout
1169 \begin_inset space ~
1178 \begin_inset Flex MenuItem
1181 \begin_layout Plain Layout
1182 Document\SpecialChar \menuseparator
1189 LyX adds anything in the
1190 \begin_inset Flex MenuItem
1193 \begin_layout Plain Layout
1199 dialog to its own built-in preamble.
1200 Before adding your own declarations in the preamble, you should make sure
1201 that LyX doesn't already support what you want to do.
1202 (Remember what we said about reinventing the wheel?) Also,
1204 make sure your preamble code is correct
1207 LyX doesn't check it for you.
1208 If there is an error, you're likely to get an error like
1209 \begin_inset Quotes eld
1213 \begin_inset Flex Code
1216 \begin_layout Plain Layout
1225 \begin_inset Quotes erd
1229 If you see this error, check your preamble.
1232 \begin_layout Subsection
1236 \begin_layout Standard
1237 Here are some examples of what you can add to a preamble, and what they
1241 \begin_layout Subsubsection
1245 \begin_layout Standard
1246 There are two variables under LaTeX that control page position:
1247 \begin_inset Flex Code
1250 \begin_layout Plain Layout
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1271 Their names should be self-explanatory.
1272 These variables are useful if you think for a moment about computer labels.
1273 Sometimes, the size of a print medium and the area of the medium that you
1274 can actually print on aren't the same.
1276 \begin_inset Flex Code
1279 \begin_layout Plain Layout
1288 \begin_inset Flex Code
1291 \begin_layout Plain Layout
1302 \begin_layout Standard
1303 The default values for
1304 \begin_inset Flex Code
1307 \begin_layout Plain Layout
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1328 \begin_inset space \thinspace{}
1332 \begin_inset space \thinspace{}
1336 \begin_inset space \space{}
1339 the page isn't shifted.
1340 Unfortunately, some DVI drivers always seem to shift the page.
1341 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1342 If you're using LyX on a system that you don't personally maintain, and
1343 your sysadmin is a doofus,
1344 \begin_inset Flex Code
1347 \begin_layout Plain Layout
1356 \begin_inset Flex Code
1359 \begin_layout Plain Layout
1368 Suppose your left and top margins are always 0.5
1369 \begin_inset space \thinspace{}
1373 You can add this to the preamble:
1376 \begin_layout LyX-Code
1384 \begin_layout LyX-Code
1392 \begin_layout Standard
1393 and your margins should now be correct.
1396 \begin_layout Subsubsection
1400 \begin_layout Standard
1401 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1402 There's a rather nice package, available at your nearest CTAN archive,
1403 for printing sheets of labels:
1404 \begin_inset Flex Code
1407 \begin_layout Plain Layout
1414 Now, your system may not have this package installed by default.
1415 We leave that up to you to check.
1416 You'll also want to read the documentation for it; we're not going to do
1418 Since this is an example, however, we'll give you an example of how you
1422 \begin_layout Standard
1423 First, make sure you're using the
1424 \begin_inset Flex Code
1427 \begin_layout Plain Layout
1434 Next, you need to put the following in your preamble:
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 LyX-Code
1479 \begin_layout Standard
1480 This sets things up for Avery label sheets, stock #5360.
1481 You're now ready to print labels, but you'll need to insert LaTeX code,
1482 placing the commands
1483 \begin_inset Flex Code
1486 \begin_layout Plain Layout
1495 \begin_inset Flex Code
1498 \begin_layout Plain Layout
1506 around each label text.
1507 This and other special features of
1508 \begin_inset Flex Code
1511 \begin_layout Plain Layout
1517 are explained in its documentation.
1520 \begin_layout Standard
1521 Someday, someone may write a LyX layout file to support this package directly.
1522 Maybe that someone is you.
1525 \begin_layout Subsubsection
1526 Example #3: Paragraph Indentation
1529 \begin_layout Standard
1530 Americans are trained to indent the first line of
1535 As with all of their other weird quirks, most Americans will whine and
1536 moan until they can have their way and indent the first line of all paragraphs.
1545 \begin_layout Standard
1546 Of course, this behavior isn't standard typography.
1547 In books, you typically only indent the first line of a paragraph
1551 it follows another one.
1552 The idea behind indenting the first line of a paragraph is to distinguish
1553 neighboring paragraphs from one another.
1554 If there is no previous paragraph—for example, if it follows a figure or
1555 is the first paragraph in a section—then there is no need for indentation.
1559 \begin_layout Standard
1560 If you're a typical American (we're still joking!), though, you don't care
1561 about such esoteric things; you want your indentation! Add this to the
1565 \begin_layout LyX-Code
1568 usepackage{indentfirst}
1571 \begin_layout Standard
1572 If your TeX distribution isn't braindead, you'll have this package, and
1573 all of your paragraphs will get the indentation the Founding Fathers intended
1577 \begin_layout Subsubsection
1578 Example #4: This Document
1581 \begin_layout Standard
1582 You can also check out the preamble of this document to get an idea of some
1583 of the advanced things you can do.
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile, LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , then the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can choose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have to manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references that have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files that are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files that do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use it and the references
3063 will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3109 \begin_layout Standard
3110 Users sometimes need to be able to
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 a LyX file together with all the images (and other files) on which it depends,
3119 either for sending to a publisher or for sharing with a co-author.
3120 LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 ) that automates this process.
3131 To use it, you must have either the
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 python modules installed on your system.
3152 By default, the script prefers the
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 format on Unix-like systems and the
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187 and this format will then be available under
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203 can be forced by adding either the
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3214 \begin_inset Flex Code
3217 \begin_layout Plain Layout
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3234 \begin_inset Flex Code
3237 \begin_layout Plain Layout
3243 format) switch to the
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3268 (Make sure you add the switch after the script name, not before it.)
3271 \begin_layout Section
3272 Fancy Headers and Footers
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3286 document class, all you get is a centered page number at the bottom of
3288 This document uses KOMA-script's book class, so it appears to be a bit
3290 But to really put on a show, you need to set the document page style to
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3299 , as mentioned in the
3304 This section describes the LaTeX code you need to insert in your LaTeX
3305 preamble in order to get the desired effects.
3308 \begin_layout Standard
3309 For more information on fancy headers, see the
3310 \begin_inset Flex Code
3313 \begin_layout Plain Layout
3319 package documentation.
3321 \begin_inset Flex URL
3324 \begin_layout Plain Layout
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 \begin_inset Quotes eld
3356 \begin_inset Quotes erd
3360 The footer is also divided into these three fields.
3361 The LaTeX commands to set these fields in the simplest manner are
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_inset Flex Code
3401 \begin_layout Plain Layout
3410 Suppose you wish to put your name in the upper left hand corner of each
3412 Simply insert the following command in the preamble:
3415 \begin_layout Standard
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426 If a field has a default entry that you would like to get rid of (often
3427 the page number appears in the central footer) simply include a command
3428 with a blank argument, e.
3429 \begin_inset space \thinspace{}
3435 \begin_layout Standard
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3453 \begin_inset space \thinspace{}
3457 \begin_inset space \space{}
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3465 \begin_inset space \space{}
3468 Page 4) in the upper right, your name in the lower left, and the date in
3470 The following commands should now appear in the preamble:
3473 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3510 \begin_layout Standard
3518 \begin_layout Standard
3528 \begin_layout Standard
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3553 access LaTeX's section and page counters, and so print out the current
3554 section and page numbers.
3556 \begin_inset Flex Code
3559 \begin_layout Plain Layout
3567 simply prints out today's date.
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572 the footer can also be modified.
3573 If you don't want one of the rules, set its thickness to 0.
3574 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3588 headrulewidth}{0.4pt}
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3602 footrulewidth}{0.4pt}
3607 to set the thicknesses.
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3619 thispagestyle{empty}
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3631 thispagestyle{plain}
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3643 thispagestyle{fancy}
3649 Simply insert them in the text on the page you want changed and mark them
3651 In fact, title pages are marked as plain by default, while following pages
3652 are marked fancy when using the global fancy setting.
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3658 Suppose you want to put a company logo in the upper lefthand corner.
3659 You might try something like
3662 \begin_layout Standard
3671 includegraphics{logo.eps}}}
3674 \begin_layout Standard
3676 (you may need to preface this with
3677 \begin_inset Flex Code
3680 \begin_layout Plain Layout
3684 usepackage{graphics}
3689 if you don't include graphics elsewhere in your document).
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3703 \begin_layout Standard
3709 \begin_layout Subsection
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715 Using this dialog you can easily specify what bullet shape to use at each
3716 level of an itemized list.
3717 These settings are document-wide so you won't be able to specify different
3718 sets of bullets for different paragraphs.
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3731 \begin_layout Subsection
3735 \begin_layout Standard
3736 Open the dialog by selecting the
3737 \begin_inset Flex MenuItem
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3747 menu item and then select the
3748 \begin_inset Flex MenuItem
3751 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762 A column of buttons on the left of the table provides access to the six
3763 different panels of bullet shapes.
3764 The row of buttons across the top is used to select which bullet depth
3766 A text entry under the table shows the currently selected bullet shape's
3767 LaTeX equivalent and this can be edited if desired.
3768 If you do modify the text you will also need to specify any needed packages
3769 in the LaTeX preamble.
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774 The following table shows the mappings from button name to LaTeX package.
3777 \begin_layout Standard
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features rotate="0" tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3788 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3806 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3826 \begin_layout Plain Layout
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3863 \begin_layout Plain Layout
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_layout Plain Layout
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_layout Plain Layout
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_layout Plain Layout
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_layout Plain Layout
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_layout Plain Layout
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3995 \begin_layout Plain Layout
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4015 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4033 \begin_layout Plain Layout
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058 If you get errors from LaTeX when you try to view or print the file, then
4059 it is likely you are missing a package.
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4080 Any changes will not be visible in LyX, but are visible when viewing the
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086 mouse button on the appropriate bullet depth button.
4090 \begin_layout Plain Layout
4095 want to have multiple sets of paragraphs with different sets of bullets
4096 in each, then you're going to have to get your hands dirty with TeX code.
4097 The bullet selection dialog can help though because it provides you with
4098 the LaTeX code for a wide range of bullet shapes.
4099 To make your own custom paragraphs you have the following options:
4102 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4122 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4148 \begin_layout Itemize
4149 Use the LaTeX command
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4161 to specify a new bullet shape for a given depth.
4162 You'll also need to save the current bullet shape so you can restore it
4164 In this itemized list the following LaTeX code was used to change the bullet
4165 used for the first depth.
4169 \begin_layout LyX-Code
4179 \begin_layout LyX-Code
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4207 \begin_layout Itemize
4211 \begin_layout Plain Layout
4224 Specify each individual entry by starting each item with the bullet shape
4225 enclosed in square brackets and set as
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4236 For example, this item was started with
4237 \begin_inset Flex Code
4240 \begin_layout Plain Layout
4255 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277 the global bullet shape settings to remain in effect.
4278 The way used here was:
4281 \begin_layout LyX-Code
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4303 Before verson 2.0, however, HTML export was always accomplished by the use
4304 of external converters.
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the
4313 section of the Customization manual.
4318 These fall into two large groups: there are converters that use LaTeX as
4319 an intermediate format, such as
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350 directly on LyX files,
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4361 All of these have different advantages and disadvantages.
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367 everything about the exported document that LaTeX does.
4368 Such converters do not care, for example, if a certain block of code was
4369 produced by LyX or was Evil Red Text.
4370 These converters know about
4371 \begin_inset Flex Code
4374 \begin_layout Plain Layout
4380 files, counters, and references, and can often make use of the
4381 \begin_inset Flex Code
4384 \begin_layout Plain Layout
4390 files generated by BibTeX.
4391 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392 said that only TeX itself understands TeX---and LaTeX-based converters
4393 will often choke on what seem to be quite simple constructs; complex ones
4394 can throw them completely, and as of this writing, for example, the
4398 manual will not export with
4399 \begin_inset Flex Code
4402 \begin_layout Plain Layout
4408 , though the others will.
4409 The other issue concerns how math is handled.
4410 These converters typically convert the formulae into little pictures that
4411 are then linked from the HTML document.
4412 Since these are actually generated by LaTeX, they are accurate.
4413 But they do not scale well, and just getting them to look as if they are
4414 actually meant to be in your document---so that the font sizes seem to
4415 be roughly the same---can be a challenge.
4418 \begin_layout Standard
4420 \begin_inset Flex Code
4423 \begin_layout Plain Layout
4430 \begin_inset CommandInset href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4437 ) solves some of these problems.
4438 In particular, the formulae it produces scale perfectly, since it renders
4439 math using a combination of HTML and CSS rather than converting the formulae
4441 But even moderately complex formula are rendered less well than with
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 ; this reflects the limitations of HTML.
4455 \begin_layout Plain Layout
4457 \begin_inset Flex Code
4460 \begin_layout Plain Layout
4466 can also use jsMath and MathJax for equations, but this setting is only
4467 available globally and requires one to have access to a server that runs
4473 More importantly (as of version 1.1.1, at least),
4474 \begin_inset Flex Code
4477 \begin_layout Plain Layout
4483 has limited support for math macros and no support for user-defined paragraph
4484 or character styles.
4485 These limitations make
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4495 unsuitable for many of the documents LyX users produce.
4496 In principle, of course, these problems could be solved, but the LyX developers
4497 have decided to follow a different path and have made LyX itself capable
4498 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4516 \begin_layout Plain Layout
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4527 , which can be found in the LyX source tree or
4528 \begin_inset CommandInset href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4535 , usually contains up-to-date information about the state of XHTML output.
4536 See also the list of XHTML bugs on
4537 \begin_inset CommandInset href
4539 name "the bug tracker"
4540 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"
4549 Still, the developers have chosen this approach because it has several
4550 potential advantages over the other two.
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555 since they are part of LyX, know everything LyX knows about the document
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562 are immune to changes in LyX's file format, or to changes in the semantics
4568 So they know about the table of contents (as displayed in the outline),
4569 about the counters associated with different paragraph styles, and about
4570 user-defined styles.
4571 The XHTML output routines know what LyX knows about internationalization,
4572 too, so they will output
4573 \begin_inset Quotes eld
4577 \begin_inset Quotes erd
4581 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4592 , depending upon the language in effect at the time.
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598 layout, that is, about how the document is to be rendered on screen.
4599 We use this information when we output the document as XHTML.
4604 generates CSS style information corresponding to the layout information
4605 it uses to render the document on screen: if section headings are supposed
4606 to be sans-serif and bold as seen in LyX, then (by default) they will be
4607 sans-serif and bold when viewed in a web browser, too.
4608 And this is true not just for pre-defined styles, like Section, but for
4609 any style, including user-defined styles.
4610 Indeed, the XHTML output routines make no distinction between user-defined
4611 paragraph and character styles and LyX's own pre-defined styles: in each
4612 case, everything LyX knows about the styles is contained in the layout
4614 And much the same is true as regards pre-defined textual insets, such as
4615 footnotes, and various custom insets.
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621 the same way LaTeX output can be customized and extended: through layout
4623 See chapter five of the
4627 manual for the details.
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632 output, its limitations, and ways to work around those limitations.
4635 \begin_layout Section
4636 Math Output in XHTML
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641 These have various advantages and disadvantages:
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650 web, and it typically renders very well in browsers that support it.
4651 The disadvantage is that not all browsers support MathML, and support is
4652 not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 package or ERT---then it will instead output the formula as an image.
4671 \begin_layout Itemize
4673 \begin_inset Newline newline
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 outputs math as HTML, styled by CSS.
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from
4692 \begin_inset Flex Code
4695 \begin_layout Plain Layout
4706 For simple formulae, this can work quite well, though with more complicated
4707 formulae it tends to break down.
4708 Still, this method has the advantage that it is very widely supported and
4709 so it may be appropriate for documents that contain only a little, fairly
4711 \begin_inset Newline newline
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4716 \begin_inset Flex Code
4719 \begin_layout Plain Layout
4725 package or ERT---then it will instead output the formula as an image.
4729 \begin_layout Itemize
4731 \begin_inset Newline newline
4735 \begin_inset Flex Code
4738 \begin_layout Plain Layout
4744 , LyX will output formulae as images, the very same images, in fact, that
4745 are used for instant preview.
4749 \begin_layout Plain Layout
4750 Instant preview does
4754 have to be on for images to be output, however.
4759 The advantage to this method is that the images are simply generated by
4760 LaTeX, so they are very accurate.
4761 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762 so they do not scale terribly well, and one cannot copy them, etc.
4763 (As of this writing, there are also problems about equation numbering.
4765 \begin_inset CommandInset href
4768 target "http://www.lyx.org/trac/ticket/6894"
4773 \begin_inset Newline newline
4776 The size of the images can be controlled by setting the
4777 \begin_inset Quotes eld
4781 \begin_inset Quotes erd
4785 \begin_inset Flex MenuItem
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802 dots per inch and is based upon a default of 75 dpi.
4808 \begin_inset Newline newline
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812 required LaTeX package is not installed), then it will fall back to outputing
4816 \begin_layout Itemize
4818 \begin_inset Newline newline
4821 Finally, LyX will happily output math as LaTeX.
4822 As well as being the output of last resort, this method can be used with
4824 \begin_inset CommandInset href
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832 LyX wraps the LaTeX in either a
4833 \begin_inset Flex Code
4836 \begin_layout Plain Layout
4842 (for inline formulas) or
4843 \begin_inset Flex Code
4846 \begin_layout Plain Layout
4852 (for displayed formulas) with
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4862 , as is required for jsMath.
4865 \begin_layout Standard
4866 One of these output methods must be selected under
4867 \begin_inset Flex MenuItem
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4879 By default, LyX outputs MathML.
4880 This is a document-wide setting, therefore.
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885 method for a particular inset, say, one that isn't being rendered very
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892 one can force output as an image by putting some harmless ERT into the
4894 \begin_inset Formula $a=b\relax$
4905 \begin_layout Section
4906 Bibliography and Citations
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916 on-screen labels, so the labels will look in the output much as they do
4917 in LyX, though better.
4918 If you are using numerical citations, then LyX will output numerical labels,
4919 such as [1] or [17], rather than simply showing the citation key in square
4920 brackets, as it does on-screen.
4921 If you are using author-year citations, then LyX will add lowercase letters
4922 to the years, just as BibTeX does, if it finds more than one citation for
4923 a given author-year combination.
4924 The labels will be printed with the bibliography entries.
4925 Note that there is, at present, no way to customize the appearance of the
4926 labels, for example, to choose between square brackets and parentheses.
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932 XHTML output pretty much what you would see if you were to look at a given
4933 entry in the citation dialog.
4934 The formatting can be customized in your layout file or, preferably, in
4940 manual for the details.
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945 with every entry with which it is associated.
4946 So you can see things like this:
4951 \begin_inset Quotes eld
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4960 Language in Context: Selected Essays
4962 (Oxford: Oxford University Press, 2007), pp.
4968 \begin_inset Quotes eld
4971 Semantics in Context
4972 \begin_inset Quotes erd
4977 Language in Context: Selected Essays
4979 (Oxford: Oxford University Press, 2007), pp.
4983 \begin_layout Standard
4984 This should be fixed before long.
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989 If you have multiple bibliographies, then LyX will print the same bibliography
4993 \begin_layout Section
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004 constructs that are described in the section on indexes in the
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014 It just lets you enter what you would have to enter in raw LaTeX.
5019 We'll describe how they are handled using the subsection headings from
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025 these, but the entries must be separated by
5026 \begin_inset Quotes eld
5030 \begin_inset Quotes erd
5033 , that is, there must be spaces around the exclamation point.
5034 This is because it is otherwise too difficult to check for escaped exclamation
5035 points, ones in math, and so forth.
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040 no sense with XHMTL.
5041 Instead, you will just get two index entries, one at either end.
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046 If LyX finds an entry containing the
5047 \begin_inset Quotes eld
5050 |see\SpecialChar \ldots{}
5052 \begin_inset Quotes erd
5055 construct, it is just dropped, and the rest is treated as an ordinary index
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061 It will take what is before the first `@' it finds and use that for sorting,
5062 taking what follows the first `@' to be the actual entry.
5063 At present, LyX does not check for escaped `@', so do not try to index
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069 or by using any other method available within LyX itself.
5070 There is no support for constructs like:
5071 \begin_inset Quotes eld
5075 \begin_inset Quotes erd
5079 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080 and everything that follows it.
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085 Rather, all index entries will be printed as one large index.
5086 To avoid our printing several versions of the index, we print only the
5087 main index, so make sure you have one.
5090 \begin_layout Section
5091 Nomenclature and Glossary
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096 Adding it would be fairly trivial, and welcome.
5099 \begin_layout Chapter
5103 \begin_layout Section
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109 and retrieve information about the LyX internal state.
5110 This is only intended for advanced users, but they should find it useful.
5111 It is by writing to the LyX server, for example, that bibliography managers,
5112 such as JabRef, are able to
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5123 \begin_layout Section
5124 Starting the LyX Server
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129 These are usually located in
5130 \begin_inset Flex Code
5133 \begin_layout Plain Layout
5139 , (except on Windows, where
5143 named pipes are special objects located in
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5159 ) and have the names
5160 \begin_inset Quotes eld
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5174 \begin_inset Quotes erd
5178 \begin_inset Quotes eld
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5192 \begin_inset Quotes erd
5196 External programs write into
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5206 and read back data from
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5217 The stem of the pipe names can be defined in the
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5229 \begin_inset Flex Code
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5257 \change_deleted 711066561 1405258697
5259 \change_inserted 711066561 1405258701
5263 \change_inserted 711066561 1405258613
5267 \change_inserted 711066561 1405258962
5269 \begin_inset Flex Code
5272 \begin_layout Plain Layout
5274 \change_inserted 711066561 1405258868
5301 configure this manually in order for the server to start.
5304 \begin_layout Standard
5306 \begin_inset Flex Code
5309 \begin_layout Plain Layout
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 ' to create the pipes.
5326 If one of the pipes already exists, LyX will assume that another LyX process
5327 is already running and will not start the server.
5328 On POSIX (Unix like) systems, if for some other reason, an unused
5329 \begin_inset Quotes eld
5333 \begin_inset Quotes erd
5336 pipe is left in existence when LyX closes, then LyX will try to delete
5338 If this fails for some reason, you will need to delete the pipes manually
5339 and then restart LyX.
5340 On Windows, pipes are deleted by the OS on program termination or crash,
5342 \begin_inset Quotes eld
5346 \begin_inset Quotes erd
5349 pipes should not be possible.
5352 \begin_layout Standard
5353 To have several LyX processes with servers at the same time, you have to
5354 use different configurations, perhaps by using separate user directories,
5356 \begin_inset Flex Code
5359 \begin_layout Plain Layout
5365 file, for each process.
5368 \begin_layout Standard
5369 If you are developing a client program, you might find it useful to enable
5370 debugging information from the LyX server.
5371 Do this by starting LyX as
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5384 \begin_layout Standard
5385 You can find a complete example client written in C
5386 \change_inserted 711066561 1405258366
5389 in the source distribution as
5390 \begin_inset Flex Code
5393 \begin_layout Plain Layout
5394 development/lyxserver/server_monitor.c
5395 \change_inserted 711066561 1405258386
5406 \begin_layout Standard
5407 Another useful tool is the command-line based client
5408 \change_inserted 711066561 1405258403
5412 \begin_inset Flex Code
5415 \begin_layout Plain Layout
5416 src/client/lyxclient
5424 \begin_layout Section
5425 Normal communication
5428 \begin_layout Standard
5429 To issue a LyX call, the client writes a line of ASCII text into the input
5431 This line has the following format:
5448 \begin_layout Description
5449 clientname is a name that the client can choose arbitrarily.
5450 Its only use is that LyX will echo it if it sends an answer—so a client
5451 can dispatch results from different requesters.
5454 \begin_layout Description
5455 function is the function you want LyX to perform.
5456 It is the same as the commands you'd use in the minibuffer.
5459 \begin_layout Description
5460 argument is an optional argument which is meaningful only to some functions
5462 \begin_inset Quotes eld
5466 \begin_inset Quotes erd
5469 LFUN will insert the argument as text at the cursor position).
5472 \begin_layout Standard
5473 The answer from LyX will arrive in the output pipe and be of the form
5490 \begin_layout Standard
5499 are just echoed from the command request, while
5503 is more or less useful information filled according to how the command
5504 execution worked out.
5505 Some commands, such as
5506 \begin_inset Quotes eld
5510 \begin_inset Quotes erd
5513 , will return information about the internal state of LyX, while other will
5514 return an empty data-response.
5515 This means that the command execution went fine.
5518 \begin_layout Standard
5519 In case of errors, the response from LyX will have this form
5536 \begin_layout Standard
5541 should contain an explanation of why the command failed.
5544 \begin_layout Standard
5548 \begin_layout LyX-Code
5549 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5550 \begin_inset Newline newline
5553 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5554 \begin_inset Newline newline
5557 read a <~/.lyxpipe.out
5558 \begin_inset Newline newline
5564 \begin_layout Subsection
5565 AppleScript (Mac OS X)
5568 \begin_layout Standard
5569 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5570 communication through the command run.
5571 This command takes a direct argument (the
5575 to perform) and an optional argument.
5576 It either returns the output of the function or triggers an error with
5577 the error message and code.
5580 \begin_layout Standard
5584 \begin_layout LyX-Code
5585 tell application "LyX"
5588 \begin_layout LyX-Code
5592 \begin_layout LyX-Code
5593 -- Stores the current file name into f
5596 \begin_layout LyX-Code
5597 set f to (run "server-get-filename" with argument "")
5600 \begin_layout LyX-Code
5601 on error the error_message number the error_number
5604 \begin_layout LyX-Code
5605 display dialog "Error: " & the error_number & ".
5609 \begin_layout LyX-Code
5610 & the error_message buttons {"OK"} default button 1
5613 \begin_layout LyX-Code
5617 \begin_layout LyX-Code
5621 \begin_layout Section
5625 \begin_layout Standard
5626 LyX can notify clients of events going on asynchronously.
5627 Currently it will only do this if the user binds a key sequence with the
5629 \begin_inset Quotes eld
5633 \begin_inset Quotes erd
5637 The format of the string LyX sends is as follows:
5641 \begin_inset Flex Code
5644 \begin_layout Plain Layout
5655 \begin_layout Standard
5660 is the printed representation of the key sequence that was actually typed
5664 \begin_layout Standard
5665 This mechanism can be used to extend LyX's command set and implement macros.
5666 Bind some key sequence to
5667 \begin_inset Quotes eld
5671 \begin_inset Quotes erd
5675 Then start a client that listens on the output pipe, dispatches the command
5676 according to the sequence, and starts a function that may use LyX calls
5677 and LyX requests to issue a command or a series of commands to LyX.
5680 \begin_layout Section
5681 The simple LyX Server Protocol
5684 \begin_layout Standard
5685 LyX implements a simple protocol that can be used for session management.
5686 All messages are of the form
5699 \begin_layout Standard
5705 \begin_inset Quotes eld
5709 \begin_inset Quotes erd
5713 \begin_inset Quotes eld
5717 \begin_inset Quotes erd
5722 \begin_inset Quotes eld
5726 \begin_inset Quotes erd
5729 is received from a client, LyX will report back to inform the client that
5730 it's listening to it's messages, while
5731 \begin_inset Quotes eld
5735 \begin_inset Quotes erd
5738 sent from LyX will inform clients that LyX is closing.
5741 \begin_layout Section
5742 Reverse DVI/PDF search
5745 \begin_layout Standard
5746 Some DVI/PDF viewers
5750 \begin_layout Plain Layout
5751 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux
5752 \change_inserted 711066561 1405273809
5755 , Skim on Mac OSX and SumatraPDF on Windows.
5764 facility (also called
5769 This means that you can tell LyX to put the cursor to a specific line in
5770 the document by clicking at the respective position in the DVI/PDF output.
5771 To achieve this, the viewer must be able to communicate with LyX.
5772 This is done via the LyX server either by using the named pipe (
5776 ), or the UNIX domain socket (
5780 ) that LyX creates in its temporary directory (this is the way the
5781 \begin_inset Flex Code
5784 \begin_layout Plain Layout
5790 program communicates with LyX).
5791 In some cases, you need a helper script that mediates between the viewer
5792 and LyX, in others, the viewer can communicate with LyX directly.
5793 This depends on the selected viewer and on your operating system.
5794 The same applies to the way viewers need to be configured and the way the
5795 reverse search is actually performed.
5796 In what follows, we will thus describe how to setup reverse search for
5798 Before we turn to this, though, we will explain what needs to be done generally
5799 to enable reverse search in the DVI/PDF output.
5802 \begin_layout Subsection
5804 \begin_inset CommandInset label
5806 name "sub:rev-search"
5813 \begin_layout Standard
5814 In most cases LyX will do the work for you by enabling the option
5815 \begin_inset Flex MenuItem
5818 \begin_layout Plain Layout
5819 Synchronize with Output
5825 \begin_inset Flex MenuItem
5828 \begin_layout Plain Layout
5829 Document\SpecialChar \menuseparator
5830 Settings\SpecialChar \menuseparator
5837 In such a case LyX will automatically insert the necessary SyncTeX macro
5838 (for PDF) or load the srcltx package (for DVI) respectively.
5839 This option can be easily reached also on
5840 \begin_inset Flex Code
5843 \begin_layout Plain Layout
5852 \begin_layout Standard
5853 If you need a different setting, you can select or input a custom macro
5854 from the drop down box just below
5855 \begin_inset Flex MenuItem
5858 \begin_layout Plain Layout
5859 Document\SpecialChar \menuseparator
5860 Settings\SpecialChar \menuseparator
5861 Output\SpecialChar \menuseparator
5862 Synchronize with Output
5870 \begin_layout Standard
5871 Note that the method
5872 \begin_inset Flex Code
5875 \begin_layout Plain Layout
5883 enables gzip compression.
5884 If your viewer does not support it, you should instead use
5885 \begin_inset Flex Code
5888 \begin_layout Plain Layout
5899 \begin_layout Standard
5901 \change_deleted 711066561 1405259326
5903 \change_inserted 711066561 1405259326
5906 so note that including the
5907 \begin_inset Flex Code
5910 \begin_layout Plain Layout
5917 \begin_inset Flex Code
5920 \begin_layout Plain Layout
5926 sometimes has an undesired impact on the typesetting.
5927 Thus, you should switch output synchronization off for the final typesetting
5929 \begin_inset Flex Code
5932 \begin_layout Plain Layout
5939 \begin_inset Flex Code
5942 \begin_layout Plain Layout
5952 \begin_layout Standard
5953 In case you need some more special settings that are not covered by the
5954 automatic settings, read the next section about how to set up output synchroniz
5956 If the automatic setup suits your needs, you can readily jump to section
5957 \begin_inset space ~
5961 \begin_inset CommandInset ref
5963 reference "sub:configuring-viewers"
5967 , where the necessary configuration steps in your viewer -- needed both
5968 with the automatic and the manual setup -- are described.
5971 \begin_layout Subsection
5975 \begin_layout Standard
5976 LaTeX provides several different methods for reverse search.
5977 Some are built-in in the
5978 \begin_inset Flex Code
5981 \begin_layout Plain Layout
5987 program, some are provided by external packages.
5988 Your choice depends on whether your LaTeX distribution already provides
5989 a given method (the built-in methods are rather new) and whether your viewer
5991 The available methods are described in the following.
5994 \begin_layout Subsubsection*
5995 Built-in DVI-search via src-specials (DVI only)
5998 \begin_layout Standard
5999 This method provides the DVI file with the necessary information for reverse
6001 It is available in LaTeX since quite some time (any somewhat recent LaTeX
6002 distribution should include it), and it works reliably.
6003 To enable it, change the
6004 \begin_inset Flex MenuItem
6007 \begin_layout Plain Layout
6012 \begin_layout Plain Layout
6025 \begin_inset Flex MenuItem
6028 \begin_layout Plain Layout
6033 \begin_layout Plain Layout
6040 eX (plain)->DraftDVI
6046 \begin_inset Flex MenuItem
6049 \begin_layout Plain Layout
6050 Preferences\SpecialChar \menuseparator
6051 File Handling\SpecialChar \menuseparator
6058 \begin_inset Flex Code
6061 \begin_layout Plain Layout
6062 latex -src-specials $$i
6068 If this doesn't work, check if your TeX engine needs different options
6069 (the syntax might differ in some distributions).
6072 \begin_layout Subsubsection*
6073 External Packages (PDFSync and scrltx)
6076 \begin_layout Standard
6085 provide reverse search facility for PDF output (via pdflatex) and DVI output,
6087 In order to enable it, load the packages in the LyX preamble:
6090 \begin_layout Itemize
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6102 for reverse PDF search,
6105 \begin_layout Itemize
6106 \begin_inset Flex Code
6109 \begin_layout Plain Layout
6112 usepackage[active]{srcltx}
6117 for reverse DVI search.
6120 \begin_layout Standard
6121 If you want to be able to perform both DVI and PDF reverse searches, you
6122 can also insert in the preamble the following lines
6125 \begin_layout LyX-Code
6129 \begin_inset Newline newline
6135 \begin_inset Newline newline
6141 \begin_inset Newline newline
6147 \begin_inset Newline newline
6152 usepackage[active]{srcltx}
6153 \begin_inset Newline newline
6161 \begin_layout Standard
6162 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6163 right package will be used.
6166 \begin_layout Standard
6167 Note that PDFSync might affect the output layout of your document.
6168 It is therefore advised to disable PDFsync for final documents.
6171 \begin_layout Subsubsection*
6172 Built-in reverse search via SyncTeX (DVI and PDF)
6175 \begin_layout Standard
6177 \begin_inset Flex Code
6180 \begin_layout Plain Layout
6186 have built-in support for both PDF and DVI reverse search.
6191 facility is basically the result of the integration of the PDFSync package
6192 to the pdftex program and its merge with the
6197 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6202 \begin_layout Plain Layout
6203 For some reason, MikTeX does not understand/obey the command LyX inserts
6204 into the preamble when you check the "Enable Forward/Reverse Search" button
6205 in the toolbar and does not generate the necessary info.
6208 \begin_layout Plain Layout
6209 The generation of the required info can be forced by changing the converter
6210 "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6211 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6212 the -synctex=1 switch).
6218 Also note that only a few PDF viewers (
6219 \change_inserted 711066561 1405273879
6220 Okular and Qpdfview on Unix,
6222 Skim on the Mac, SumatraPDF on Windows) already provide SyncTeX support.
6225 \begin_layout Standard
6226 To enable SyncTeX for DVI output, change the
6227 \begin_inset Flex MenuItem
6230 \begin_layout Plain Layout
6235 \begin_layout Plain Layout
6248 \begin_inset Flex MenuItem
6251 \begin_layout Plain Layout
6256 \begin_layout Plain Layout
6263 eX (plain) -> DraftDVI
6269 \begin_inset Flex MenuItem
6272 \begin_layout Plain Layout
6273 Preferences\SpecialChar \menuseparator
6274 File Handling\SpecialChar \menuseparator
6281 \begin_inset Flex Code
6284 \begin_layout Plain Layout
6285 latex -synctex=1 $$i
6290 , and for PDF output, change the
6291 \begin_inset Flex MenuItem
6294 \begin_layout Plain Layout
6299 \begin_layout Plain Layout
6306 eX (pdflatex) -> PDF (pdflatex)
6312 \begin_inset Flex Code
6315 \begin_layout Plain Layout
6316 pdflatex -synctex=1 $$i
6322 Check the documentation of your viewer whether the viewer needs to be configure
6323 d for the use with SyncTeX.
6327 \begin_layout Plain Layout
6328 Note that the option
6329 \begin_inset Flex Code
6332 \begin_layout Plain Layout
6338 option enables gzip compression.
6339 If your viewer does not support it, you should instead use
6340 \begin_inset Flex Code
6343 \begin_layout Plain Layout
6357 \begin_layout Subsection
6358 Configuring and using specific viewers
6359 \begin_inset CommandInset label
6361 name "sub:configuring-viewers"
6368 \begin_layout Subsubsection*
6369 Xdvi (all platforms)
6372 \begin_layout Standard
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6383 , you don't need to do anything else for performing a reverse DVI search,
6384 as LyX already provides the necessary hooks for automatically using the
6386 \begin_inset Flex Code
6389 \begin_layout Plain Layout
6396 Just setup your document as described above (reverse search is triggered
6397 by Ctrl-click or Alt-click on Mac OSX, respectively).
6400 \begin_layout Standard
6401 However, if for whatever reason you want to use the named pipe instead of
6402 the socket for communicating with LyX, simply change the DVI viewer in
6404 \begin_inset Flex MenuItem
6407 \begin_layout Plain Layout
6408 Preferences\SpecialChar \menuseparator
6409 File Handling\SpecialChar \menuseparator
6419 \begin_layout Plain Layout
6420 On Mac OSX you have to use
6421 \begin_inset Flex Code
6424 \begin_layout Plain Layout
6425 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6436 \begin_inset Flex Code
6439 \begin_layout Plain Layout
6440 xdvi -editor "lyxeditor.sh %f %l"
6446 \begin_inset Flex Code
6449 \begin_layout Plain Layout
6455 is a suitable script.
6456 For example, a minimal shell script is the following one:
6459 \begin_layout LyX-Code
6461 \begin_inset Newline newline
6464 LYXPIPE="/path/to/lyxpipe"
6465 \begin_inset Newline newline
6468 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6469 \begin_inset Newline newline
6472 echo "$COMMAND" > "${LYXPIPE}".in || exit
6473 \begin_inset Newline newline
6476 read TMP < "${LYXPIPE}".out || exit
6479 \begin_layout Standard
6481 \begin_inset Flex Code
6484 \begin_layout Plain Layout
6494 \begin_layout Plain Layout
6501 XServer pipe path specified in
6502 \begin_inset Flex MenuItem
6505 \begin_layout Plain Layout
6506 Preferences\SpecialChar \menuseparator
6516 \begin_layout Plain Layout
6518 \begin_inset Flex Code
6521 \begin_layout Plain Layout
6527 folder of a source distribution you can find a
6528 \begin_inset Flex Code
6531 \begin_layout Plain Layout
6537 script which is able to locate the
6541 based on your preferences.
6549 \begin_layout Subsubsection*
6553 \begin_layout Standard
6555 \begin_inset Flex Code
6558 \begin_layout Plain Layout
6559 /Applications/MacDviX_Folder/calleditor.script
6564 , add the following lines:
6567 \begin_layout LyX-Code
6572 \begin_layout Plain Layout
6579 X.app/Contents/MacOS/lyxeditor "$2" $1
6580 \begin_inset Newline newline
6586 \begin_layout Standard
6587 Modify the lines accordingly if you install LyX somewhere else than in the
6588 Applications folder.
6591 \begin_layout Standard
6592 Reverse search is triggered by Alt-click (OPTION-click).
6595 \begin_layout Subsubsection*
6599 \begin_layout Standard
6601 \begin_inset Flex Code
6604 \begin_layout Plain Layout
6605 open -a Skim.app $$i
6610 to the viewer setting in
6611 \begin_inset Flex MenuItem
6614 \begin_layout Plain Layout
6615 Preferences\SpecialChar \menuseparator
6616 File Handling\SpecialChar \menuseparator
6617 File formats\SpecialChar \menuseparator
6624 \begin_inset Flex MenuItem
6627 \begin_layout Plain Layout
6628 Skim\SpecialChar \menuseparator
6629 Preferences\SpecialChar \menuseparator
6636 \begin_inset Flex MenuItem
6639 \begin_layout Plain Layout
6645 preset and enter command
6646 \begin_inset Flex MenuItem
6649 \begin_layout Plain Layout
6650 /Applications/LyX.app/Contents/MacOS/lyxeditor
6658 \begin_layout Standard
6659 Reverse search is triggered by COMMAND-SHIFT-click
6662 \begin_layout Subsubsection*
6666 \begin_layout Standard
6668 \begin_inset Flex MenuItem
6671 \begin_layout Plain Layout
6672 Settings\SpecialChar \menuseparator
6673 Configure Okular\SpecialChar \ldots{}
6674 \SpecialChar \menuseparator
6681 \begin_inset Quotes eld
6685 \begin_inset Quotes erd
6689 \begin_inset Flex Code
6692 \begin_layout Plain Layout
6701 \begin_layout Standard
6702 Reverse search is triggered by SHIFT-click.
6703 \change_inserted 711066561 1405259853
6707 \begin_layout Subsubsection*
6709 \change_inserted 711066561 1405273730
6713 \begin_layout Standard
6715 \change_inserted 711066561 1405263147
6716 Qpdfview supports SyncTeX since version 0.3.5.
6718 \begin_inset Flex MenuItem
6721 \begin_layout Plain Layout
6723 \change_inserted 711066561 1405260331
6724 Edit\SpecialChar \menuseparator
6725 Settings\SpecialChar \ldots{}
6726 \SpecialChar \menuseparator
6734 , click on the input field of the
6735 \begin_inset Quotes eld
6739 \begin_inset Quotes erd
6742 item and add the command
6743 \begin_inset Flex Code
6746 \begin_layout Plain Layout
6748 \change_inserted 711066561 1405260473
6759 \begin_layout Standard
6761 \change_inserted 711066561 1405260506
6762 Reverse search is triggered by double-click.
6767 \begin_layout Subsubsection*
6771 \begin_layout Standard
6772 Launch yap, choose its
6773 \begin_inset Flex MenuItem
6776 \begin_layout Plain Layout
6777 View\SpecialChar \menuseparator
6784 \begin_inset Quotes eld
6788 \begin_inset Quotes erd
6793 \begin_inset Quotes eld
6796 New\SpecialChar \ldots{}
6798 \begin_inset Quotes erd
6801 button and, in the window that opens, enter
6802 \begin_inset Quotes eld
6806 \begin_inset Quotes erd
6809 (or any other name you like) in the
6810 \begin_inset Quotes eld
6814 \begin_inset Quotes erd
6818 Now click on the button labeled
6819 \begin_inset Quotes eld
6822 \SpecialChar \ldots{}
6824 \begin_inset Quotes erd
6827 to open a file dialog and navigate to the directory containing the batch
6829 \begin_inset Flex Code
6832 \begin_layout Plain Layout
6840 \begin_inset Flex Code
6843 \begin_layout Plain Layout
6849 and then specify the program arguments as
6850 \begin_inset Flex Code
6853 \begin_layout Plain Layout
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6870 wrapper is used for communicating with LyX through the
6877 \begin_layout LyX-Code
6879 \begin_inset Newline newline
6882 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6891 \begin_inset Newline newline
6905 \begin_layout Standard
6906 Make sure that the LyXServer pipe path you specified in LyX is
6907 \begin_inset Flex Code
6910 \begin_layout Plain Layout
6924 , otherwise change the
6925 \begin_inset Flex Code
6928 \begin_layout Plain Layout
6934 wrapper accordingly.
6937 \begin_layout Standard
6938 In yap, reverse search is triggered by double-click.
6941 \begin_layout Subsubsection*
6942 SumatraPDF (Windows)
6945 \begin_layout Standard
6946 In order to use SumatraPDF for inverse search, enter
6947 \begin_inset Flex Code
6950 \begin_layout Plain Layout
6951 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6956 in the viewer setting in
6957 \begin_inset Flex MenuItem
6960 \begin_layout Plain Layout
6961 Preferences\SpecialChar \menuseparator
6962 File Handling\SpecialChar \menuseparator
6963 File formats\SpecialChar \menuseparator
6970 \begin_inset Flex Code
6973 \begin_layout Plain Layout
6979 is the previous wrapper.
6980 If SumatraPDF.exe is not in your command PATH, use its full file name.
6983 \begin_layout Standard
6984 Reverse search is triggered by double-click.
6987 \begin_layout Subsubsection*
6991 \begin_layout Standard
6992 First of all, make sure that yap is your default DVI viewer in the Windows
6993 environment, then launch it, choose its
6994 \begin_inset Flex MenuItem
6997 \begin_layout Plain Layout
6998 View\SpecialChar \menuseparator
7005 \begin_inset Quotes eld
7009 \begin_inset Quotes erd
7014 \begin_inset Quotes eld
7017 New\SpecialChar \ldots{}
7019 \begin_inset Quotes erd
7022 button and, in the window that opens, enter
7023 \begin_inset Quotes eld
7027 \begin_inset Quotes erd
7030 (or any other name you like) in the
7031 \begin_inset Quotes eld
7035 \begin_inset Quotes erd
7039 Now click on the button labeled
7040 \begin_inset Quotes eld
7043 \SpecialChar \ldots{}
7045 \begin_inset Quotes erd
7048 to open a file dialog and navigate to the directory containing the
7049 \begin_inset Flex Code
7052 \begin_layout Plain Layout
7058 program (which is installed by default on Cygwin along with the LyX executable).
7060 \begin_inset Flex Code
7063 \begin_layout Plain Layout
7069 and then specify the program arguments as
7070 \begin_inset Flex Code
7073 \begin_layout Plain Layout
7080 In this way, you will be using the
7084 for communicating with LyX.
7085 If, for whatever reason, you want to use the
7090 \begin_inset Flex Code
7093 \begin_layout Plain Layout
7099 option and be sure to specify the LyXServer pipe path in the LyX preferences.
7102 \begin_layout Standard
7103 In yap, reverse search is triggered by double-click.
7106 \begin_layout Subsubsection*
7110 \begin_layout Standard
7111 In order to use SumatraPDF for inverse search, enter
7112 \begin_inset Flex Code
7115 \begin_layout Plain Layout
7116 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7121 in the viewer setting in
7122 \begin_inset Flex MenuItem
7125 \begin_layout Plain Layout
7126 Preferences\SpecialChar \menuseparator
7127 File Handling\SpecialChar \menuseparator
7128 File formats\SpecialChar \menuseparator
7135 If SumatraPDF.exe is not in your command PATH, use its full posix path.
7137 \begin_inset Flex Code
7140 \begin_layout Plain Layout
7146 enables communication via the
7152 \begin_inset Flex Code
7155 \begin_layout Plain Layout
7161 option if you want to use the
7165 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7168 \begin_layout Standard
7169 Reverse search is triggered by double-click.
7172 \begin_layout Section
7176 \begin_layout Standard
7177 Forward search is, as the name implies, in a sense the
7178 \begin_inset Quotes eld
7182 \begin_inset Quotes erd
7186 It allows you to let the viewer jump to a given position from within LyX.
7187 If forward search is set up (as described in what follows), you can put
7188 the cursor anywhere in your LyX document, and hit
7189 \begin_inset Flex MenuItem
7192 \begin_layout Plain Layout
7193 Navigate\SpecialChar \menuseparator
7200 \begin_inset Flex MenuItem
7203 \begin_layout Plain Layout
7209 in the context menu via right mouse click), and then the viewer will jump
7210 to that position as well.
7211 This implies, of course, that your viewer supports this function.
7214 \begin_layout Standard
7215 To make forward search possible, you first need to provide the generated
7216 output PDF/DVI file with additional information about the TeX sources.
7217 This can be done via the methods described in the section
7218 \begin_inset CommandInset ref
7220 reference "sub:rev-search"
7227 \begin_layout Standard
7228 Additionally, you need to configure LyX for using your viewers in
7229 \begin_inset Flex MenuItem
7232 \begin_layout Plain Layout
7233 Tools\SpecialChar \menuseparator
7234 Preferences\SpecialChar \menuseparator
7235 Output\SpecialChar \menuseparator
7242 We provide a range of tested configurations for some viewers, which you
7243 can select from the drop down list.
7244 If none of these configurations suits you, you have to find out and enter
7245 a suitable configuration yourself.
7246 The definition syntax uses the following placeholders:
7249 \begin_layout Itemize
7251 \begin_inset Flex Code
7254 \begin_layout Plain Layout
7263 \begin_layout Itemize
7265 \begin_inset Flex Code
7268 \begin_layout Plain Layout
7274 : name of the (temporary) exported .tex file (without path)
7277 \begin_layout Itemize
7279 \begin_inset Flex Code
7282 \begin_layout Plain Layout
7288 : name of the (temporary) exported .tex file (including path)
7291 \begin_layout Itemize
7293 \begin_inset Flex Code
7296 \begin_layout Plain Layout
7302 : name of the exported output file (either dvi or pdf, depending on which
7303 one exists in the temporary directory)
7306 \begin_layout Standard
7307 Note that only some of the viewers provide full forward search functionality,
7308 among them yap, xdvi, okular
7312 \begin_layout Plain Layout
7313 You might want to set
7314 \begin_inset Flex Code
7317 \begin_layout Plain Layout
7324 \begin_inset Flex MenuItem
7327 \begin_layout Plain Layout
7328 Tools\SpecialChar \menuseparator
7329 Preferences\SpecialChar \menuseparator
7330 File Handling\SpecialChar \menuseparator
7332 \begin_inset space ~
7346 \change_inserted 711066561 1405264317
7350 \change_deleted 711066561 1405264282
7357 \begin_layout Plain Layout
7359 \change_deleted 711066561 1405264216
7363 \change_inserted 711066561 1405264265
7364 PDF can also use DDE commands through the external program
7367 \change_deleted 711066561 1405264271
7370 --- downloadable from
7371 \begin_inset CommandInset href
7373 target "ftp://ftp2.commence.com/pub/freebies/"
7383 While many of the widespread PDF viewers (most notably Adobe Reader) do
7384 not support forward search at all, some other viewers -- e.
7385 \begin_inset space \thinspace{}
7389 evince and xpdf -- allow at least to reload the document and jump to a
7390 specific page of the file, so you can at least navigate
7391 \begin_inset Quotes eld
7395 \begin_inset Quotes erd
7399 This latter functionality is provided by an external call of synctex (see
7400 the predefined example configurations).
7404 \begin_layout Standard
7405 Forward search works both with DVI and PDF output.
7406 LyX simply checks which preview format you have used before (i.
7407 \begin_inset space \thinspace{}
7410 e., which format is already there in the temporary directory) and chooses
7411 the appropriate configuration for the respective format.
7414 \begin_layout Chapter
7415 Special Document Classes
7418 \begin_layout Section
7422 \begin_layout Standard
7428 \begin_layout Subsection
7432 \begin_layout Standard
7433 This section describes how LyX can be used to write articles for submission
7434 to the scientific journal
7436 Astronomy and Astrophysics
7438 (www.edpsciences.fr/aa/
7439 \begin_inset Flex URL
7442 \begin_layout Plain Layout
7444 http://www.edpsciences.fr/aa/
7449 ) using Version 5.01 of the document class
7454 This package can be downloaded from the ftp site
7457 \begin_layout Standard
7458 \begin_inset VSpace medskip
7464 \begin_layout Standard
7466 \begin_inset Flex URL
7469 \begin_layout Plain Layout
7471 ftp://ftp.edpsciences.org/pub/aa/readme.html
7479 \begin_layout Standard
7480 \begin_inset VSpace medskip
7486 \begin_layout Standard
7487 A manual comes together with that package, and this text is not meant to
7488 replace the original manual but is merely a short guide in how to realize
7489 the correct form of your paper.
7493 \begin_layout Standard
7494 Please note that the publisher of the journal was changed from Springer
7495 to EDP Sciences starting January 1, 2001.
7496 That change involved also some slight changes to the style files, namely
7497 the removal of the thesaurus command.
7498 The LyX class aa supports the newest version of these style files, V 5.01.
7499 If you have an older version installed, please upgrade.
7500 For compatibility, the old (version 4) layout has been kept as
7505 Please refer to the comments in
7507 LyXDir/layouts/aapaper.layout
7512 \begin_layout Subsection
7516 \begin_layout Standard
7517 It is recommended you start from the example template distributed with LyX.
7518 If you are not using a template, note the following settings:
7521 \begin_layout Itemize
7528 Document\SpecialChar \menuseparator
7531 dialog (OK, that one was obvious).
7534 \begin_layout Itemize
7535 Don't change the option
7538 \begin_inset space ~
7548 The whole layout is done by the macros, you shouldn't change anything.
7551 \begin_layout Subsection
7555 \begin_layout Standard
7556 First thing to enter is the header information.
7557 It consists of seven entries, of which some are optional.
7561 \begin_layout Itemize
7569 \begin_layout Itemize
7577 \begin_layout Itemize
7585 \begin_layout Itemize
7593 \begin_layout Itemize
7598 : [optional] if more than one author: whom to contact for offprint requests.
7601 \begin_layout Itemize
7606 : [optional] mail address for contacts.
7609 \begin_layout Itemize
7617 Received: <date>; Accepted <date>
7620 \begin_layout Standard
7621 There is no need to issue the
7627 command, this is done automatically by LyX when the header is finished.
7628 Although the order of the single header entries doesn't matter it is advised
7629 to keep the above sequence, just to get the best optics and meets the layout
7630 of the real document.
7633 \begin_layout Standard
7634 If you want to place footnotes in the header block, e.
7635 \begin_inset space \thinspace{}
7639 \begin_inset space \space{}
7642 to state your present address, just use the standard footnote via the menu
7645 Insert\SpecialChar \menuseparator
7649 LyX will automagically use the term
7658 \begin_layout Standard
7659 In addition to these topics, the macros use three additional LaTeX commands
7660 that have no counterpart in LyX:
7663 \begin_layout Itemize
7670 to separate different names for more than one author and institute, respectivel
7674 \begin_layout Itemize
7681 to mark corresponding author/institute pairs.
7682 The institutes are numbered sequentially as they appear in the
7686 field, so you have to put a marker to each author.
7689 \begin_layout Itemize
7696 to supply an email address for fast contact.
7699 \begin_layout Standard
7700 In all cases, the appropriate command has to be entered in LyX and marked
7706 \begin_layout Subsection
7710 \begin_layout Standard
7711 The abstract should immediately follow the header block.
7712 With version 5 the abstract environment was changed to a command, and there
7713 is now a resctriction to only one paragraph.
7714 In addition, it should contain an entry with the keywords.
7715 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7722 by hand and mark it as LaTeX code.
7723 Refer to the example paper.
7726 \begin_layout Subsection
7727 Supported environments
7730 \begin_layout Standard
7731 The A&A paper layout supports the following environments for structuring
7735 \begin_layout Itemize
7741 \begin_layout Itemize
7747 \begin_layout Itemize
7753 \begin_layout Itemize
7759 \begin_layout Itemize
7765 \begin_layout Itemize
7771 \begin_layout Itemize
7777 \begin_layout Itemize
7783 \begin_layout Itemize
7789 \begin_layout Itemize
7795 \begin_layout Itemize
7801 \begin_layout Itemize
7807 \begin_layout Subsection
7808 Commands not supported by LyX
7811 \begin_layout Standard
7812 Some commands are not yet supported by the
7817 Some have already been mentioned.
7818 For the sake of completeness, they are listed all together here:
7821 \begin_layout Itemize
7829 \begin_layout Itemize
7837 \begin_layout Itemize
7845 \begin_layout Itemize
7853 \begin_layout Itemize
7861 \begin_layout Itemize
7869 \begin_layout Itemize
7877 \begin_layout Itemize
7885 \begin_layout Standard
7886 If you want to use any of these commands, you have to enter them yourself.
7889 Do not forget to mark them as LaTeX code!
7892 \begin_layout Subsection
7893 Figure and Table Floats
7896 \begin_layout Standard
7897 LyX provides support for the necessary float environments
7899 figure, figure*, table
7905 , therefore we won't tell much about it here.
7909 \begin_inset space ~
7915 Just remember that tables should be left-aligned.
7916 For that, select the table and change the alignment in
7918 Edit\SpecialChar \menuseparator
7920 \begin_inset space ~
7926 \begin_layout Standard
7927 There is only one special thing: the figures with caption besides the figure.
7928 To create such a figure, you have to do the following:
7931 \begin_layout Enumerate
7932 Create a wide figure float:
7934 Insert\SpecialChar \menuseparator
7935 Float\SpecialChar \menuseparator
7938 , then right click in the figure and select
7944 \begin_inset space ~
7952 \begin_layout Enumerate
7953 Enter your caption text.
7956 \begin_layout Enumerate
7961 to move the cursor above the caption.
7964 \begin_layout Enumerate
7968 \begin_layout Enumerate
7969 Position the cursor behind the figure and insert a horizontal fill:
7971 Insert\SpecialChar \menuseparator
7973 \begin_inset space ~
7976 Character\SpecialChar \menuseparator
7978 \begin_inset space ~
7986 \begin_layout Enumerate
7987 Switch to LaTeX mode:
7990 \begin_inset space ~
7998 \begin_layout Enumerate
8008 Do not close the brace!
8011 \begin_layout Enumerate
8012 Position the cursor behind the caption text, switch to LaTeX mode and insert
8016 \begin_inset space ~
8028 \begin_layout Standard
8029 Also, refer to the figures in the example paper.
8032 \begin_layout Subsection
8036 \begin_layout Standard
8037 For submission, the paper has to be formated in a special double-spacing
8039 For this purpose, you have to give the option
8043 to the documentclass.
8044 This must be done using the extra class options field in the
8046 Document\SpecialChar \menuseparator
8050 Just enter the string
8057 \begin_layout Subsection
8061 \begin_layout Standard
8066 directory contains an example paper written with LyX.
8067 It is the example paper from the original macro package, translated to
8069 Use it for inspiration, and compare the original LaTeX code with LyX way
8073 \begin_layout Section
8077 \begin_layout Standard
8083 \begin_layout Subsection
8087 \begin_layout Standard
8088 AASTeX is a set of macros produced by the American Astronomical Society
8089 to facilitate electronic manuscript submission to the three journals they
8090 publish: the Astrophysical Journal (including the Letters and Supplement),
8091 the Astronomical Journal, and the Publications of the Astronomical Society
8093 LyX has proven to be an excellent tool for generating these documents,
8094 especially given its equation, citation, and figure handling capabilities.
8095 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
8096 is the version described here, or higher.
8097 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
8098 incompatible with LyX.
8099 The AASTeX package may be downloaded from the AASTeX Web site
8102 \begin_layout Standard
8103 \begin_inset VSpace medskip
8109 \begin_layout Standard
8111 \begin_inset Flex URL
8114 \begin_layout Plain Layout
8116 http://www.journals.uchicago.edu/AAS/AASTeX
8124 \begin_layout Standard
8125 \begin_inset VSpace medskip
8131 \begin_layout Standard
8132 A complete user guide is contained in that package and you should familiarize
8133 yourself with it thoroughly before embarking on writing a paper in LyX.
8134 LyX will not reduce the need to figure out all the AASTeX commands, it
8135 will only reduce the drudgery of typing everything in.
8136 It is your responsibility to ensure that the final exported LaTeX document
8137 conforms completely to the requirements of the journal to which you are
8138 submitting your paper.
8141 \begin_layout Subsection
8142 Starting a New Paper
8145 \begin_layout Standard
8146 I strongly suggest that you start with the AASTeX template file.
8149 File\SpecialChar \menuseparator
8156 , enter the new file name, then choose the
8161 This will show the most common fields found in a manuscript.
8162 Simply overwrite the existing text (including the brackets,
8166 ) with the correct information.
8167 Many of the AASTeX commands and environments can be implemented directly
8168 in LyX, but some cannot: most noticeably
8180 , which should stick out like a sore thumb if you actually just opened the
8182 For commands such as these, the LaTeX code must be entered directly and
8184 Such commands are referred to as TeX code, or Evil Red Text.
8185 I tried to minimize the amount of TeX code needed in an AASTeX document,
8186 but there is still a bit more required than any of us would like.
8189 \begin_layout Subsection
8190 Finishing Your Paper
8193 \begin_layout Standard
8194 When the paper is finished to your satisfaction and previews/prints correctly,
8196 \begin_inset Quotes eld
8200 \begin_inset Quotes erd
8203 actions which need to be done before you submit it to the journals.
8207 \begin_layout Enumerate
8208 Export your paper as a LaTeX file (
8210 File\SpecialChar \menuseparator
8211 Export\SpecialChar \menuseparator
8218 \begin_layout Enumerate
8223 file with your favorite text editor
8227 \begin_layout Enumerate
8228 remove the comment lines before the
8237 \begin_layout Enumerate
8242 usepackage...{fontenc}
8244 line if it appears (usually just after
8259 \begin_layout Enumerate
8260 remove everything between (and including) the
8272 commands, except for any commands you specifically put into the LaTeX preamble
8273 (which should appear immediately after the
8274 \begin_inset Quotes eld
8277 User specified LaTeX commands
8278 \begin_inset Quotes erd
8289 \begin_layout Enumerate
8290 Run the resulting file through LaTeX to make sure it still processes correctly.
8293 \begin_layout Enumerate
8294 Reread the journal requirements to make sure your filenames and formats
8298 \begin_layout Enumerate
8302 \begin_layout Subsection
8303 Comments On Specific Commands
8306 \begin_layout Standard
8307 I will not describe the detailed usage of the individual AASTeX commands:
8308 the AASTeX User Guide (
8312 ) gives a good description of each.
8313 Thus it's probably easiest for me to go down the list as found in the guide
8314 and offer comments where necessary.
8315 So let's begin \SpecialChar \ldots{}
8319 \begin_layout Subsubsection
8320 Things that work as expected
8323 \begin_layout Standard
8324 Because they work as you might expect, I simply list them and the section
8425 begin{thebibliography}
8433 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8434 graphicx figure commands (2.14.1),
8458 (2.15.4, amongst other places),
8485 \begin_layout Standard
8486 The following style options also work correctly:
8507 Simply put them in the
8513 Layout\SpecialChar \menuseparator
8519 \begin_layout Subsubsection
8520 Things that work, but require more comment
8523 \begin_layout Standard
8524 The following items work, but require a little more discussion:
8527 \begin_layout Itemize
8528 These items are reserved for use by the journal editors, but you can put
8529 them into the LaTeX preamble if you feel compelled to do so:
8562 \begin_layout Itemize
8563 These items may be placed in the LaTeX preamble, and are included as blanks
8564 in the template file:
8585 \begin_layout Itemize
8592 (2.3) – can only be used
8593 \begin_inset Quotes eld
8597 \begin_inset Quotes erd
8600 , not in the middle of a paragraph.
8601 Use TeX code if you need to embed it.
8604 \begin_layout Itemize
8611 (2.3) – will have extra {} after it.
8612 This should not cause an error.
8615 \begin_layout Itemize
8622 (2.6) – can only be used
8623 \begin_inset Quotes eld
8627 \begin_inset Quotes erd
8630 , not in the middle of a paragraph.
8631 Use TeX code if you need to embed it.
8634 \begin_layout Itemize
8641 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8645 \begin_layout Itemize
8659 \begin_layout Itemize
8666 (2.9) – will have extra {} after it.
8667 This should not cause an error.
8670 \begin_layout Itemize
8677 (2.11) – will have extra {} after it.
8678 This should not cause an error.
8681 \begin_layout Itemize
8688 (2.14.2) – you can insert an optional filename argument by placing the cursor
8689 at the beginning of the text and selecting
8691 Insert\SpecialChar \menuseparator
8696 \begin_inset Quotes eld
8700 \begin_inset Quotes erd
8703 inserts an optional argument of the type needed by
8710 Hopefully it will be renamed someday.
8713 \begin_layout Itemize
8726 for the catalog ID optional parameter
8729 \begin_layout Itemize
8742 for the catalog ID optional parameter
8745 \begin_layout Subsubsection
8746 Things not implemented, use TeX code
8749 \begin_layout Standard
8772 setcounter{equation}
8774 (2.12), Journal name abbreviations (2.13.4),
8810 (2.15.4, insert it as the first element in the lefthand cell after where
8812 Don't use any of LyX's rules in the table),
8824 (2.15.5), much of Misc (2.17, except
8875 \begin_layout Subsubsection
8876 Things that cannot be implemented
8879 \begin_layout Standard
8880 \SpecialChar \ldots{}
8881 at least in any meaningful sort of way, so I suggest ignoring them.
8882 They are the references environment (2.13.3), and the deluxetable environment
8884 If you really, really need to use deluxetable, I suggest editing it in
8885 a separate file with a text editor, then using
8887 Insert\SpecialChar \menuseparator
8889 \begin_inset space ~
8894 to include it in your LyX document.
8899 file to see an example of this.
8902 \begin_layout Subsection
8903 FAQs, Tips, Tricks, and Other Ruminations
8906 \begin_layout Subsubsection
8907 Getting LyX and AASTeX to cooperate
8910 \begin_layout Standard
8911 It can be a bit tricky to get LyX to recognize a new layout and document
8913 When all else fails, do this:
8916 \begin_layout Enumerate
8917 Make certain that LaTeX can find AASTeX.
8918 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8919 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8926 \begin_layout Enumerate
8938 \begin_layout Enumerate
8941 Tools\SpecialChar \menuseparator
8944 in LyX, then restart LyX.
8947 \begin_layout Enumerate
8948 Open a regular new file, not from a template.
8949 Does AASTeX appear in the class list in
8951 Document\SpecialChar \menuseparator
8957 \begin_layout Standard
8958 If you get a warning from an existing AASTeX document about not being able
8959 to find the AASTeX layout or a message about
8960 \begin_inset Quotes eld
8963 You should not mix title layouts with normal ones
8964 \begin_inset Quotes erd
8967 , things haven't been installed correctly.
8970 \begin_layout Subsubsection
8971 LaTeX error processing a table
8974 \begin_layout Standard
8975 LyX, by default, attempts to center the table caption/title.
8976 This seems to produce a bad interaction in AASTeX so you should click somewhere
8977 in the caption/title, then select
8979 Edit\SpecialChar \menuseparator
8981 \begin_inset space ~
8995 This took care of it for me.
8998 \begin_layout Subsubsection
9002 \begin_layout Standard
9003 A couple of things: 1) I have noticed some funny spacing in the reference
9004 entries in the text.
9005 When you enter the bibliography item data, make sure their is
9009 space between the last author and the parenthesis setting off the year;
9013 \begin_inset space \thinspace{}
9017 \begin_inset space \space{}
9031 2) Entering the references at all is not obvious.
9032 The easiest thing is to start typing your first reference at the end of
9033 the document, then mark it as type
9038 That will put a small gray box in front of what you just typed.
9039 Click on the box to fill in the rest of the information.
9040 For new references, go to the end of an existing reference and press return.
9041 That will create a new line with its own box, etc.
9044 \begin_layout Subsubsection
9048 \begin_layout Standard
9049 Even though AASTeX provides its own figure commands (
9055 , for example), I much prefer LaTeX's standard figure commands (with the
9064 \begin_inset space ~
9067 commands as TeX code into a Figure Float box if you desire, but I never
9068 have much luck getting the layout right.
9069 With the standard graphics, LyX will insert a
9073 usepackage{graphicx}
9075 command into the LaTeX preamble and handle the figures in the standard
9076 LaTeX2e way, interspersing the figures in the text.
9077 I believe ApJ accepts figures exactly this way now; AJ might still use
9079 \begin_inset Quotes eld
9082 stack everything at the end
9083 \begin_inset Quotes erd
9089 \begin_layout Subsubsection
9090 Things I could have done, but didn't
9093 \begin_layout Standard
9095 \begin_inset Quotes eld
9099 \begin_inset Quotes erd
9102 things I could have implemented, but chose not to.
9103 For instance, I saw no point in double-spacing the text in the LyX window,
9104 even though it is double-spaced in the paper manuscript.
9105 Also, I chose not to make separate layouts for the preprint and preprint2
9107 Since I assume you will spend most of your time in the plain manuscript
9108 mode anyway, I decided not to chew up more disk space with this.
9112 \begin_layout Subsection
9116 \begin_layout Standard
9117 Your mileage may vary.
9118 I've now had papers published by both ApJ and AJ that have had 98% of the
9119 effort done in LyX; the last 2% was the LaTeX post-processing and a few
9121 I have had no trouble with the submission process, and I'm sure the journals
9122 were never aware that there might be a difference.
9123 So, go forth and publish!
9126 \begin_layout Section
9130 \begin_layout Standard
9140 \begin_layout Standard
9141 \begin_inset VSpace bigskip
9147 \begin_layout Standard
9149 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9150 papers to be submitted to American Mathematical Society publications.
9151 The layouts are not tailored to a specific journal, but easily can be.
9152 You should refer to the AMS documentation for specific instructions for
9153 each journal (usually it will entail only changing a single line in the
9155 That documentation is available on the Web at
9156 \begin_inset Flex URL
9159 \begin_layout Plain Layout
9167 \begin_inset Flex URL
9170 \begin_layout Plain Layout
9172 ftp://ftp.ams.org/pub/tex/amslatex/
9178 These layouts are appropriate, and useful, for any mathematical writing.
9182 \begin_layout Standard
9183 There are two basic AMS LaTeX layouts:
9186 \begin_layout Itemize
9187 amsart: The standard AMS article format.
9190 \begin_layout Itemize
9191 amsbook: the standard AMS book (really, monograph) format.
9195 \begin_layout Standard
9196 The layouts themselves contain only the minimum necessary to use the AMS
9198 They do not, in particular, contain any of the `theorem' environments used
9199 for setting theorems, lemmas, and the like.
9200 These are contained, instead, in the
9201 \begin_inset Flex Code
9204 \begin_layout Plain Layout
9210 module, which is loaded by default when you select one of the AMS classes.
9211 (It can also be used with other classes and can be removed, if you would
9212 rather use something else.) Less commonly used environments are in the
9213 \begin_inset Flex Code
9216 \begin_layout Plain Layout
9217 Theorems (AMS-Extended)
9222 module, which must be loaded manually.
9225 \begin_layout Standard
9226 By default, theorems and the like are numbered consecutively throughout
9227 the document, but this may be modified by loading the module
9228 \begin_inset Flex Code
9231 \begin_layout Plain Layout
9232 Theorems (Order by Section)
9237 or, if you are using
9238 \begin_inset Flex Code
9241 \begin_layout Plain Layout
9248 \begin_inset Flex Code
9251 \begin_layout Plain Layout
9252 Theorems (Order by Chapter)
9258 These will number the results as
9259 \begin_inset Formula $n.m$
9262 , where the first number refers to the section (or chapter) and the second
9263 refers to the total number of results so far in that section (or chapter).
9264 Many environments are also available unnumbered.
9265 These are indicated by an asterisk at the end.
9266 If you happen to want
9270 unnumbered results, the module
9271 \begin_inset Flex Code
9274 \begin_layout Plain Layout
9280 provides that option.
9283 \begin_layout Standard
9284 Note that these modules do not
9288 to be used with the AMS classes.
9289 It is perfectly possible to use the
9290 \begin_inset Flex Code
9293 \begin_layout Plain Layout
9299 module, and the others mentioned, with other classes, such as
9300 \begin_inset Flex Code
9303 \begin_layout Plain Layout
9310 \begin_inset Flex Code
9313 \begin_layout Plain Layout
9320 \begin_inset Flex Code
9323 \begin_layout Plain Layout
9332 \begin_layout Subsection
9333 What these layouts provide
9336 \begin_layout Standard
9337 There is a long list of included environments provided by these layouts.
9338 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9339 variety of `theorem' environments.
9340 However, the AMS recommends the environments that are available in LyX.
9344 \begin_layout Standard
9345 The following environments—as well as the standard environments, such as
9347 \begin_inset Flex Noun
9350 \begin_layout Plain Layout
9357 \begin_inset Flex Noun
9360 \begin_layout Plain Layout
9367 \begin_inset Flex Noun
9370 \begin_layout Plain Layout
9377 \begin_inset Flex Noun
9380 \begin_layout Plain Layout
9387 \begin_inset Flex Noun
9390 \begin_layout Plain Layout
9397 \begin_inset Flex Code
9400 \begin_layout Plain Layout
9407 \begin_inset Flex Code
9410 \begin_layout Plain Layout
9419 \begin_layout Description
9420 Address This should be the author's permanent address.
9423 \begin_layout Description
9425 \begin_inset space ~
9428 Address This should be the author's temporary address at the time of submission,
9429 if different from the Address.
9432 \begin_layout Description
9433 Email Author's e-mail address
9436 \begin_layout Description
9437 URL Author's Web address, if desired.
9440 \begin_layout Description
9441 Keywords Key words or phrases used to identify specific topics discussed
9445 \begin_layout Description
9446 Subjectclass These refer to the AMS Subject Classifications, published and
9449 Mathematical Reviews
9452 These are also available online at the AMS cites listed above.
9455 \begin_layout Description
9459 \begin_layout Description
9463 \begin_layout Description
9467 \begin_layout Standard
9468 The following environments are provided by both the
9469 \begin_inset Flex Code
9472 \begin_layout Plain Layout
9479 \begin_inset Flex Code
9482 \begin_layout Plain Layout
9488 modules, in the latter case in both starred (unnumbered) and unstarred
9489 (numbered) versions.
9490 These same environments are provided only in the starred versions by the
9492 \begin_inset Flex Code
9495 \begin_layout Plain Layout
9504 \begin_layout Theorem
9505 This is typically used for the statements of major results.
9509 \begin_layout Corollary*
9510 This is used for statements which follow fairly directly from previous statement
9512 Again, these can be major results.
9517 These are smaller results needed to prove other statements.
9520 \begin_layout Proposition
9521 These are less major results which (hopefully) add to the general theory
9525 \begin_layout Conjecture
9526 These are statements provided without justification, which the author does
9527 not know how to prove, but which seem to be true (to the author, at least).
9530 \begin_layout Definition*
9531 Guess what this is for.
9532 The font is different for this environment than for the previous ones.
9536 \begin_layout Example*
9537 Used for examples illustrating proven results.
9540 \begin_layout Problem
9541 It's not really known what this is for.
9542 You should figure it out.
9545 \begin_layout Exercise*
9546 Write a description for this one.
9549 \begin_layout Remark
9550 This environment is also a type of theorem, usually a lesser sort of observation.
9553 \begin_layout Claim*
9554 Often used in the course of giving a proof of a larger result.
9558 Generally, these are used to break up long arguments, using specific instances
9564 The numbering scheme for cases is on its own, not together with other numbered
9570 At the end of this environment, a QED symbol (usually a square, but it can
9571 vary with different styles) is placed.
9572 If you want to have other environments within this one—for example, Case
9573 environments—and have the QED symbol appear only after them, then the other
9574 environments need to be nested within the proof environment.
9577 Nesting Environments
9583 for information on nesting.
9586 \begin_layout Standard
9587 And these environments are provided by
9588 \begin_inset Flex Code
9591 \begin_layout Plain Layout
9592 Theorems (AMS-Extended)
9600 \begin_layout Criterion*
9601 A required condition.
9604 \begin_layout Algorithm*
9605 A general procedure to be used.
9608 \begin_layout Axiom*
9609 This is a property or statement taken as true within the system being discussed.
9612 \begin_layout Condition*
9613 Sometimes used to state a condition assumed within the present context of
9618 Similar to a Remark.
9621 \begin_layout Notation*
9622 Used for the explanation of, yes, notation.
9625 \begin_layout Summary
9626 Do we really need to tell you?
9629 \begin_layout Acknowledgement*
9633 \begin_layout Conclusion*
9634 Sometimes used at the end of a long train of argument.
9638 Used in a way similar to Proposition, though perhaps lower on the scale.
9641 \begin_layout Standard
9642 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9644 They need to be available on your system in order to use these environments.
9647 \begin_layout Section
9655 \begin_layout Standard
9661 \begin_layout Subsection
9665 \begin_layout Standard
9666 These are the layout files for some of the journals of the American Geophysical
9668 It is assumed that you have both the AGU's own class files and AGUplus
9669 installed (everything to be found at
9670 \begin_inset Flex URL
9673 \begin_layout Plain Layout
9675 ftp://ftp.agu.org/journals/latex/journals
9683 \begin_layout Subsection
9687 \begin_layout Standard
9697 They are still called this in the LyX GUI, though their LaTeX equivalents
9698 in the AGU classes are
9709 \begin_layout Standard
9710 Newly defined styles are
9747 These are mostly manuscript attributes and defined in the AGU class documentati
9751 \begin_layout Standard
9752 I suspect this is still badly incomplete.
9755 \begin_layout Subsection
9759 \begin_layout Standard
9776 \begin_layout Subsection
9780 \begin_layout Itemize
9783 Journal of Geophysical Research
9792 \begin_layout Standard
9793 Add your own, it isn't so hard! Look at the
9804 \begin_layout Subsection
9805 Bugs and things to remember
9808 \begin_layout Standard
9809 In order to use the new layouts, you must remember to do the following for
9813 \begin_layout Enumerate
9819 This can be done in the
9821 Layout\SpecialChar \menuseparator
9826 Document\SpecialChar \menuseparator
9830 (AGU articles are always in English, right? So
9837 \begin_layout Enumerate
9847 (Yes, this is a bug.)
9850 \begin_layout Enumerate
9851 Make sure you use the
9855 bibliography style, by entering
9859 into the second field of the BibTeX inset.
9860 None of the standard styles will do.
9863 \begin_layout Section
9867 \begin_layout Standard
9873 \begin_layout Subsection
9877 \begin_layout Standard
9878 Broadway is for writing plays.
9879 The format is more decorative than Hollywood, and much less standardized.
9880 This format should be suitable for workshops.
9883 \begin_layout Subsection
9887 \begin_layout Standard
9888 The same as in Hollywood.
9891 \begin_layout Subsection
9895 \begin_layout Standard
9900 names as labels then cross-reference the label to insert the name.
9901 The cross-reference dialog will show the current cast of characters.
9904 \begin_layout Subsection
9905 Paper size and Margins
9908 \begin_layout Standard
9909 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9912 \begin_layout Subsection
9916 \begin_layout Standard
9917 The following environments are available.
9918 You can use broadway.bind to get the bind keys shown at the right.
9921 \begin_layout Itemize
9925 \begin_inset Newline newline
9930 You should not have to use this, but it is here for anything that does not
9934 \begin_layout Itemize
9938 \begin_inset space \hfill{}
9942 \begin_inset Newline newline
9947 Used to describe stage setting and the action.
9948 First use of speaker names in all CAPs.
9951 \begin_layout Itemize
9955 \begin_inset space \hfill{}
9959 \begin_inset Newline newline
9964 Automatically numbered.
9965 On screen it will be arabic, but will print as Roman.
9968 \begin_layout Itemize
9972 \begin_inset space \hfill{}
9976 \begin_inset Newline newline
9986 It is just centered text.
9989 \begin_layout Itemize
9993 \begin_inset space \hfill{}
9997 \begin_inset Newline newline
10002 Not automatically numbered.
10003 You supply the number.
10004 This is because I couldn't figure out how.
10007 \begin_layout Itemize
10011 \begin_inset space \hfill{}
10015 \begin_inset Newline newline
10020 A special case of Narrative to describe the setting and action as the curtain
10024 \begin_layout Itemize
10028 \begin_inset space \hfill{}
10032 \begin_inset Newline newline
10037 The speaker's (actor's) title, centered in all CAPS.
10040 \begin_layout Itemize
10044 \begin_inset space \hfill{}
10048 \begin_inset Newline newline
10053 Instructions to the speaker.
10054 The parentheses are automatically inserted.
10055 The ( will appear on screen, but both will be in the printed play.
10056 This environment is only used within
10063 \begin_layout Itemize
10067 \begin_inset space \hfill{}
10071 \begin_inset Newline newline
10076 What the Speaker says.
10079 \begin_layout Itemize
10083 \begin_inset space \hfill{}
10087 \begin_inset Newline newline
10092 The curtain comes down.
10095 \begin_layout Itemize
10099 \begin_inset space \hfill{}
10105 \begin_layout Itemize
10109 \begin_inset space \hfill{}
10115 \begin_layout Itemize
10119 \begin_inset space \hfill{}
10125 \begin_layout Standard
10129 \begin_layout Section
10133 \begin_layout Standard
10138 can be used to type letters according to German conventions.
10139 A template file is included in
10141 .../lyx/share/templates
10143 for you to use as a starting point.
10146 \begin_layout Section
10154 \begin_layout Standard
10160 \begin_layout Subsection
10164 \begin_layout Standard
10165 This is the layout file for the European Geophysical Society journals.
10170 can be downloaded from the web site of the EGS under
10171 \begin_inset Flex URL
10174 \begin_layout Plain Layout
10184 \begin_layout Subsection
10188 \begin_layout Standard
10191 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10199 The current layout file is unfortunately very unmodular and would benefit
10200 from using the various
10207 \begin_layout Section
10211 \begin_layout Standard
10212 See the LyX template file
10217 It contains all infos you need.
10220 \begin_layout Section
10226 \begin_inset CommandInset label
10235 \begin_layout Standard
10241 \begin_layout Subsection
10245 \begin_layout Standard
10246 This section describes how to use LyX to make slides for overhead projectors.
10247 There are two document classes that can do this: the default slides class
10253 This section documents the latter.
10256 \begin_layout Standard
10257 I'm going to say this again, nice and clear, so that there's no misunderstanding
10261 \begin_layout Standard
10262 \begin_inset VSpace bigskip
10268 \begin_layout Standard
10272 This section documents the class
10273 \begin_inset Quotes eld
10281 \begin_inset Quotes erd
10289 \begin_layout Standard
10290 \begin_inset VSpace bigskip
10296 \begin_layout Standard
10297 If you're looking for the documentation for
10298 \begin_inset Quotes eld
10306 \begin_inset Quotes erd
10309 , check out section
10310 \begin_inset space ~
10314 \begin_inset CommandInset ref
10316 reference "sec:slitex"
10321 If your machine doesn't have the
10326 \begin_inset Quotes eld
10334 \begin_inset Quotes erd
10337 ] installed, you'll probably have to use the default
10341 class, which isn't quite as good as
10346 \begin_layout Standard
10351 class is designed for use with version 2.1 of the
10355 LaTeX class file which is now an integral part of LaTeX2e.
10358 \begin_layout Subsection
10362 \begin_layout Standard
10363 Obviously, to use this document class, you need to select
10364 \begin_inset Quotes eld
10372 \begin_inset Quotes erd
10382 \begin_inset space ~
10388 There are some settings in the
10391 \begin_inset space ~
10396 dialog that you should know about that are specific to this class:
10399 \begin_layout Itemize
10400 Don't change the options
10411 \begin_inset space ~
10417 They're ignored by the
10424 \begin_layout Itemize
10425 The default font size is 20
10426 \begin_inset space \thinspace{}
10429 pt with the other options being 17
10430 \begin_inset space \thinspace{}
10434 \begin_inset space \thinspace{}
10438 \begin_inset space \thinspace{}
10444 \begin_layout Itemize
10445 The default font is
10453 but all math equations are still typeset in the usual roman font.
10456 \begin_layout Itemize
10461 supports A4 and Letter paper sizes as well as a special size for working
10463 \begin_inset space \thinspace{}
10467 It doesn't support A5, B5, legal or executive paper sizes.
10470 \begin_layout Itemize
10471 Don't bother changing the
10475 settings because they are ignored anyway.
10476 All floats appear where they are defined in the text.
10479 \begin_layout Itemize
10484 setting behaves a bit differently for this class.
10489 provides extensive footer and header capabilities including a user-defined
10492 \begin_inset space ~
10496 \begin_inset CommandInset ref
10498 reference "sec:foilfoot"
10503 The title page is treated differently to all other pages in the document
10512 has the logo centered at the bottom of the page (if one is defined).
10513 The possible page style choices and what they do are as follows:
10517 \begin_layout Labeling
10518 \labelwidthstring MMMMMMM
10525 The final output contains no page numbers, or other headers or footers
10526 (except footnotes of course).
10530 \begin_layout Labeling
10531 \labelwidthstring MMMMMMM
10538 The final output contains page numbers centered at the bottom of the page.
10539 No other headings or footers (other than footnotes).
10542 \begin_layout Labeling
10543 \labelwidthstring MMMMMMM
10548 Page numbers in lower right corner.
10549 Additional headers and footers are also shown.
10550 This is also the default.
10553 \begin_layout Labeling
10554 \labelwidthstring MMMMMMM
10559 Gives you access to the
10563 package although its use with
10567 is discouraged by the writer of the
10571 package because of some potential page layout clashes.
10575 \begin_layout Subsubsection
10579 \begin_layout Standard
10580 The following options may be used in the extra class options in the
10582 Document\SpecialChar \menuseparator
10588 \begin_layout Labeling
10589 \labelwidthstring MMMMMMx
10594 This sets up the page layout for 7.33
10595 \begin_inset space \thinspace{}
10599 \begin_inset space \thinspace{}
10602 in paper, which is about the same aspect ratio as a 35
10603 \begin_inset space \thinspace{}
10606 mm slide, making it a bit easier to work with this medium.
10609 \begin_layout Labeling
10610 \labelwidthstring MMMMMMx
10615 Places a rule across the page below the header on every page except the
10619 \begin_layout Labeling
10620 \labelwidthstring MMMMMMx
10625 Places a rule across the page above the footer on every page except the
10629 \begin_layout Labeling
10630 \labelwidthstring MMMMMMx
10635 This is automatically set each time you create a new
10644 to use the dvips driver to rotate those pages that are set as landscape
10648 \begin_layout Labeling
10649 \labelwidthstring MMMMMMx
10654 Simply changes the page dimensions to those of a landscape page but doesn't
10656 Thus if you use this option you need to use an external program to rotate
10657 each page or feed your paper through your printer as landscape.
10658 Note that this option effectively reverses the roles of the
10666 environments (don't worry these are described in the next section).
10669 \begin_layout Labeling
10670 \labelwidthstring MMMMMMx
10675 Equation numbers on the left.
10678 \begin_layout Labeling
10679 \labelwidthstring MMMMMMx
10684 Flush-left equations.
10687 \begin_layout Subsection
10688 Supported Environments
10691 \begin_layout Standard
10692 Most of the environments commonly supported in other classes are also supported
10698 There are several additional environments provided by
10702 as well as a couple added by LyX.
10703 The following environments are shared with other classes:
10706 \begin_layout Standard
10707 \begin_inset Flex Multiple Columns
10710 \begin_layout Itemize
10716 \begin_layout Itemize
10722 \begin_layout Itemize
10728 \begin_layout Itemize
10734 \begin_layout Itemize
10740 \begin_layout Itemize
10746 \begin_layout Itemize
10752 \begin_layout Itemize
10758 \begin_layout Itemize
10764 \begin_layout Itemize
10770 \begin_layout Itemize
10776 \begin_layout Itemize
10782 \begin_layout Itemize
10788 \begin_layout Itemize
10794 \begin_layout Itemize
10800 \begin_layout Itemize
10806 \begin_layout Itemize
10812 \begin_layout Itemize
10823 \begin_layout Standard
10824 That is, all the major environments apart from the sectioning environments.
10825 Since foils are essentially self-contained sections, with a title and body,
10830 provides specific commands for starting new foils and these are:
10833 \begin_layout Itemize
10839 \begin_layout Itemize
10845 \begin_layout Standard
10846 LyX also provides slightly modified versions of these two environments called:
10849 \begin_layout Itemize
10855 \begin_layout Itemize
10858 ShortRotatefoilhead
10861 \begin_layout Standard
10862 and the differences will be explained in the next section.
10865 \begin_layout Standard
10866 Since foils are often used in presenting ideas or new theorems and such
10871 also provides a comprehensive box of goodies for presenting them:
10874 \begin_layout Standard
10875 \begin_inset Flex Multiple Columns
10878 \begin_layout Itemize
10884 \begin_layout Itemize
10890 \begin_layout Itemize
10896 \begin_layout Itemize
10902 \begin_layout Itemize
10908 \begin_layout Itemize
10914 \begin_layout Itemize
10920 \begin_layout Itemize
10926 \begin_layout Itemize
10932 \begin_layout Itemize
10938 \begin_layout Itemize
10949 \begin_layout Standard
10950 The starred versions are unnumbered while the unstarred versions are numbered.
10951 There are also two list environments added by LyX and these are:
10954 \begin_layout Itemize
10960 \begin_layout Itemize
10966 \begin_layout Standard
10971 provides some powerful header and footer capabilities that are best set
10972 in the preamble although they may be set at any point in a document.
10973 If you want to change these settings in your document the best place to
10974 do so is at the very top of a foil, i.
10975 \begin_inset space \thinspace{}
10981 \begin_inset space \space{}
10986 straight after the foilhead.
10989 \begin_layout Standard
10990 For this purpose, the following command styles are provided [
10997 \begin_layout Standard
10998 \begin_inset Flex Multiple Columns
11001 \begin_layout Itemize
11005 \begin_inset space ~
11011 \begin_layout Itemize
11017 \begin_layout Itemize
11021 \begin_inset space ~
11027 \begin_layout Itemize
11031 \begin_inset space ~
11037 \begin_layout Itemize
11041 \begin_inset space ~
11048 \begin_layout Plain Layout
11049 \begin_inset space ~
11061 \begin_layout Standard
11062 There are also a few commands provided by
11066 that aren't directly supported by LyX but I'll tell you what they do and
11067 how to use them in section
11068 \begin_inset space ~
11072 \begin_inset CommandInset ref
11074 reference "sec:unsuppfoils"
11081 \begin_layout Subsection
11082 Building a Set of Foils
11085 \begin_layout Standard
11086 This section will give a simple introduction to using the different environments
11087 to build a set of foils.
11088 If you want to see an example set of foils, take a look at the
11092 file you find in LyX's
11099 \begin_layout Subsubsection
11100 Give It a Title Page
11103 \begin_layout Standard
11104 Unlike other classes that provide
11124 creates the title on a page of its own.
11125 If you leave out the
11129 environment LaTeX will substitute the current date (every time you regenerate
11133 \begin_layout Subsubsection
11137 \begin_layout Standard
11138 As I mentioned earlier, there are four ways of starting a new foil.
11139 For portrait foils you should use
11148 The difference between these two environments is the amount of space between
11149 the title of the foil (the foilhead) and the body of the foil.
11152 \begin_layout Standard
11153 Landscape foils are generated using the
11159 ShortRotatefoilhead
11162 Again the only difference is the spacing between foilhead and body.
11163 Both of the short versions have 0.5
11164 \begin_inset space ~
11167 inches less separation between the foilhead and the body.
11171 \begin_layout Standard
11172 One problem with the support for landscape foils is the requirement that
11173 you have to use the
11177 driver to generate the PostScript output otherwise the foils won't be rotated.
11178 It is possible to get landscape foils even if you haven't got the
11182 driver provided you can feed your foils sideways through your printer ;-)
11185 \begin_layout Subsubsection
11186 Theorems, Lemmas, Proofs and more
11189 \begin_layout Standard
11190 Due to a small bug in LyX you can't have two of the same type of these environme
11191 nts directly following each other.
11192 They must be separated by something.
11193 If you try, you will just be extending the previous environment as if you
11194 had merged the two environments together.
11195 So, how do you get around this problem? The simplest option is to insert
11196 some text between the two environments or add a
11200 environment between the two with just a
11201 \begin_inset Quotes eld
11209 \begin_inset Quotes erd
11213 This will force LyX to produce two separate environments and hence the
11214 correct LaTeX output.
11215 An example is provided in the example file included with the LyX distribution.
11216 Remember, this problem only occurs if you are trying to place two of the
11217 same type of theorem-like environments one directly after the other.
11220 \begin_layout Subsubsection
11224 \begin_layout Standard
11225 You get all the commonly supported list styles found in other classes as
11226 well as two new ones.
11227 I'll only describe the new ones here.
11228 If you want to find out more about the other list environments check out
11234 If you intend to use itemized lists you might also want to read about the
11238 \begin_inset space ~
11242 \begin_inset space ~
11247 dialog described above in section
11248 \begin_inset space ~
11252 \begin_inset CommandInset ref
11254 reference "sec:bullet"
11261 \begin_layout Standard
11262 The two new list styles,
11270 , are designed to make it easier for you to create lists of do's and don'ts
11271 or right and wrong by providing dedicated environments that use a tick
11272 or a cross as the label of the list.
11273 These lists are in fact dedicated variants of the
11278 They do however require that you have the
11282 packages installed.
11285 \begin_layout Subsubsection
11289 \begin_layout Standard
11294 redefines the floating tables and figures so that they appear exactly where
11295 they are in the text rather than pushing them to the top of the page or
11296 to some user specified location.
11297 In fact if you change the float placement settings they are simply ignored.
11300 \begin_layout Subsubsection
11301 Page Headers and Footers
11302 \begin_inset CommandInset label
11304 name "sec:foilfoot"
11311 \begin_layout Standard
11315 \begin_inset space ~
11324 are two commands used to control the left-footer text string.
11325 The first is meant to allow you to include a graphic logo on your foils
11327 \begin_inset Quotes eld
11335 \begin_inset Quotes erd
11339 While the second is meant to provide a classification for the audience,
11343 \begin_inset space \thinspace{}
11349 \begin_inset space \space{}
11353 It is empty by default.
11356 \begin_layout Standard
11357 The remaining page corners can be filled by
11360 \begin_inset space ~
11365 (which defaults to page numbers),
11368 \begin_inset space ~
11376 \begin_inset space ~
11384 \begin_layout Subsection
11390 \begin_inset CommandInset label
11392 name "sec:unsuppfoils"
11399 \begin_layout Standard
11400 All the commands mentioned below need to be set in a
11408 within another environment.
11411 \begin_layout Subsubsection
11415 \begin_layout Standard
11416 All lengths are adjusted using the
11439 should be replaced by the name given to the length you want to change and
11444 is the length value.
11445 All lengths should be specified in units of length such as inches (
11457 ) or relative to some document or font-based length such as
11467 \begin_layout Standard
11468 It's possible to change the spacing between a foilhead and the body of the
11469 foil by adjusting the length specified by
11476 For example, to make
11481 \begin_inset space \space{}
11484 in closer to their bodies put the following in the preamble:
11490 foilheadskip}{-0.5in}
11493 \begin_layout Standard
11494 The spacings around floats can be adjusted by setting these lengths:
11497 \begin_layout Labeling
11498 \labelwidthstring MMMMMMMMMMM
11505 Separation between the text and the top of the float
11508 \begin_layout Labeling
11509 \labelwidthstring MMMMMMMMMMM
11516 Separation between the float and the caption
11519 \begin_layout Labeling
11520 \labelwidthstring MMMMMMMMMMM
11527 Separation between the caption and the following text
11530 \begin_layout Labeling
11531 \labelwidthstring MMMMMMMMMMM
11538 You can make the captions narrower than the surrounding text by adjusting
11540 Best done relative to
11549 \begin_layout Standard
11550 There are also several title page related lengths that you may find useful
11551 if you have a long title or several authors:
11554 \begin_layout Labeling
11555 \labelwidthstring MMMMMMMMMMM
11562 Separation from headers to
11567 \begin_layout Labeling
11568 \labelwidthstring MMMMMMMMMMM
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11601 \begin_layout Labeling
11602 \labelwidthstring MMMMMMMMMMM
11618 \begin_layout Labeling
11619 \labelwidthstring MMMMMMMMMMM
11635 \begin_layout Standard
11636 The last length related command affects all the list environments.
11647 a list environment then all the vertical spacing between the list items
11649 Note that this is a command not a length so it doesn't require
11655 like the stuff mentioned above.
11658 \begin_layout Subsubsection
11659 Headers and Footers
11662 \begin_layout Standard
11675 commands control whether the logo in the
11679 definition appear on a given page.
11686 in the preamble then none of the foils will have the logo on them.
11687 If you don't want the logo on a particular page place the
11693 directly after the foilhead of that page and the
11699 directly after the next foilhead.
11702 \begin_layout Standard
11703 If you decide to use the
11707 page style setting in the
11710 \begin_inset space ~
11715 dialog you should probably add
11725 to your preamble so headers and footers on landscape pages are correctly
11726 placed when rotated.
11727 This is due to some clashes between the page layouts provided by the
11738 \begin_layout Section
11739 Hollywood (Hollywood spec scripts)
11742 \begin_layout Standard
11748 \begin_layout Subsection
11752 \begin_layout Standard
11753 Getting the format of a Hollywood script right is a
11754 \begin_inset Quotes eld
11758 \begin_inset Quotes erd
11761 It is designed to make the readers focus on content and to be easy and
11762 familiar for the actors to read.
11763 Each page of a script should be one minute of film.
11764 Nothing goes in a script that you cannot see or hear on screen.
11765 The courier 12 pt font should be used throughout.
11769 \begin_layout Subsection
11773 \begin_layout Standard
11774 Speakers' lines should NEVER break in mid-sentence.
11775 If a speaker's lines continue over a page break, repeat the
11779 title followed by (Cont'd).
11782 \begin_layout Subsection
11786 \begin_layout Standard
11791 names as labels then cross-reference the label to insert the name.
11792 The cross-reference dialog will show the current cast of characters.
11793 You can use this to insert the speaker name in narratives also.
11796 \begin_layout Subsection
11797 Paper size and Margins
11800 \begin_layout Standard
11801 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11804 \begin_layout Subsection
11808 \begin_layout Standard
11809 The following environments are available.
11810 You can use hollywood.bind to get the bind keys shown at the right.
11813 \begin_layout Itemize
11817 \begin_inset Newline newline
11822 Used where nothing else works.
11826 \begin_layout Itemize
11832 \begin_inset space \hfill{}
11840 \begin_inset Newline newline
11843 Usually followed by something like
11844 \begin_inset Quotes eld
11847 on Sally waking up.
11848 \begin_inset Quotes erd
11854 \begin_layout Itemize
11858 \begin_inset space \hfill{}
11862 \begin_inset Newline newline
11867 Introduces a new INTERIOR camera set-up.
11868 Always followed by DAY or NIGHT, or something similar to define the lighting
11870 Everthing on this line in CAPS.
11873 \begin_layout Itemize
11877 \begin_inset space \hfill{}
11881 \begin_inset Newline newline
11886 Introduces a new EXTERIOR camera set-up.
11887 Everthing on this line in CAPS.
11890 \begin_layout Itemize
11894 \begin_inset space \hfill{}
11898 \begin_inset Newline newline
11903 The character speaking.
11906 \begin_layout Itemize
11910 \begin_inset space \hfill{}
11914 \begin_inset Newline newline
11919 Instructions to the speaker.
11920 The () are automatically inserted, but only the ( will show in LyX.
11921 Both will be printed.
11924 \begin_layout Itemize
11928 \begin_inset space \hfill{}
11932 \begin_inset Newline newline
11944 \begin_layout Itemize
11948 \begin_inset space \hfill{}
11952 \begin_inset Newline newline
11957 Camera movement instruction.
11959 \begin_inset space \thinspace{}
11963 \begin_inset space \space{}
11969 \begin_layout Itemize
11973 \begin_inset space \hfill{}
11979 \begin_layout Itemize
11983 \begin_inset space \hfill{}
11989 \begin_layout Itemize
11993 \begin_inset space \hfill{}
11999 \begin_layout Itemize
12003 \begin_inset space \hfill{}
12009 \begin_layout Subsection
12013 \begin_layout Itemize
12017 \begin_layout Itemize
12021 \begin_layout Itemize
12023 \begin_inset space \thinspace{}
12030 \begin_layout Itemize
12035 \begin_layout Itemize
12036 PAN — camera movement
12039 \begin_layout Itemize
12040 INSERT — cut to close-up of
12043 \begin_layout Section
12047 \begin_layout Standard
12050 Panayotis Papasotiriou
12053 \begin_layout Subsection
12057 \begin_layout Standard
12058 The ijmpc package is a set of macros that facilitates electronic manuscript
12061 International Journal of Modern Physics C
12064 Similarly, the ijmpd package is for creating manuscripts to be submitted
12067 International Journal of Modern Physics D
12070 Both journals are published by World Scientific.
12071 The corresponding document classes are named
12080 These files, together with instructions for the authors, can be downloaded
12082 \begin_inset Flex URL
12085 \begin_layout Plain Layout
12087 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12093 \begin_inset Flex URL
12096 \begin_layout Plain Layout
12098 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12104 Both packages are modified versions of the standard
12105 \begin_inset Quotes eld
12109 \begin_inset Quotes erd
12112 package, and they are almost (but not exactly) identical.
12113 Most of their features are supported by LyX.
12114 I have used LyX successfully to write articles submitted to both journals
12115 without any problem.
12118 \begin_layout Subsection
12122 \begin_layout Standard
12123 As usual, the easiest way to write a paper is to start with a template.
12126 File\SpecialChar \menuseparator
12145 This will give an (almost) empty document that includes the most common
12146 fields found in a manuscript.
12147 Simply overwrite the existing text (including the brackets,
12152 You should keep in mind the following remarks.
12155 \begin_layout Enumerate
12156 LyX won't let you change the font size and the page style of the document,
12157 because such modifications are not allowed by both packages.
12160 \begin_layout Enumerate
12161 The language of the document should not be changed.
12162 Before previewing your paper, be sure that the babel package is not used.
12163 To do this, click on
12165 Tools\SpecialChar \menuseparator
12176 checkbox in the language settings, and click on
12184 , if you wish to make this change permanent).
12187 \begin_layout Enumerate
12189 \begin_inset Quotes eld
12193 \begin_inset Quotes erd
12196 style must be used to define keywords.
12199 \begin_layout Enumerate
12200 The ijmpc package provides a style named
12201 \begin_inset Quotes eld
12204 Classification Codes
12205 \begin_inset Quotes erd
12208 , which can be used to define classification codes, such as PACS numbers.
12209 Note that this facility is not supported by the ijmpd package.
12212 \begin_layout Enumerate
12213 Several new environments are available:
12214 \begin_inset Quotes eld
12218 \begin_inset Quotes erd
12222 \begin_inset Quotes eld
12226 \begin_inset Quotes erd
12230 \begin_inset Quotes eld
12234 \begin_inset Quotes erd
12238 \begin_inset Quotes eld
12242 \begin_inset Quotes erd
12246 \begin_inset Quotes eld
12250 \begin_inset Quotes erd
12254 \begin_inset Quotes eld
12258 \begin_inset Quotes erd
12262 \begin_inset Quotes eld
12266 \begin_inset Quotes erd
12270 \begin_inset Quotes eld
12274 \begin_inset Quotes erd
12278 \begin_inset Quotes eld
12282 \begin_inset Quotes erd
12286 \begin_inset Quotes eld
12290 \begin_inset Quotes erd
12294 \begin_inset Quotes eld
12298 \begin_inset Quotes erd
12302 \begin_inset Quotes eld
12306 \begin_inset Quotes erd
12310 \begin_inset Quotes eld
12314 \begin_inset Quotes erd
12318 \begin_inset Quotes eld
12322 \begin_inset Quotes erd
12326 Their use is more or less obvious.
12327 LyX supports all these environments; it will use the proper label, text
12328 style, and numbering scheme for each of them.
12331 \begin_layout Enumerate
12332 Both packages use basic citations; the natbib package should not be used.
12333 In LyX, citation references are shown as usual; in the output, citations
12334 are shown as superscripts.
12335 If you want to use a citation as normal text, you should use the
12340 \begin_inset space \thinspace{}
12344 \begin_inset space \space{}
12348 \begin_inset Quotes eld
12352 \begin_inset space \space{}
12362 \begin_inset Quotes erd
12368 \begin_layout Enumerate
12370 \begin_inset Quotes eld
12374 \begin_inset Quotes erd
12377 section in both packages.
12378 To put acknowledgments, just use the
12379 \begin_inset Quotes eld
12383 \begin_inset Quotes erd
12389 \begin_layout Enumerate
12390 Appendices may be added to the paper,
12394 the Acknowledgments and
12399 LyX provides a special environment, called
12400 \begin_inset Quotes eld
12404 \begin_inset Quotes erd
12407 which marks the beginning of the appendices.
12408 This environment should be left blank; it just sends a LaTeX command, but
12409 nothing is really printed.
12411 \begin_inset Quotes eld
12415 \begin_inset Quotes erd
12418 is printed with blue letters, as a signal that all sections after that
12419 point are appendices.
12420 To write an appendix, use the
12421 \begin_inset Quotes eld
12425 \begin_inset Quotes erd
12429 LyX will number each appendix with capital letters, as required by both
12432 \begin_inset Quotes eld
12436 \begin_inset Quotes erd
12443 be present before the first appendix; if not, all appendices will be numbered
12444 as normal sections in the output.
12447 \begin_layout Enumerate
12448 The ijmpc and the ijmpd packages use the
12452 command to implement table captions.
12453 As a result, a table created by LyX is printed correctly, but its caption
12455 However, you can use some TeX code to overcome this problem, so that captions
12456 are printed as expected.
12457 To do so, create a float table as usual, remove the caption, and replace
12458 it with the TeX code
12468 (sic); you must also the TeX code
12472 immediately after the tabular material.
12473 Study the example table included in the template files to see how this
12474 trick is implemented.
12475 Alternatively, If you need table captions, you should implement the whole
12480 file, then include this file to the LyX document (
12482 Insert\SpecialChar \menuseparator
12483 File\SpecialChar \menuseparator
12485 \begin_inset space ~
12491 Details on how to create a table float can be found in the files
12499 , included in the corresponding packages.
12502 \begin_layout Subsection
12503 Preparing a paper for submission
12506 \begin_layout Standard
12507 Before you submit your paper you must export the LyX document as a LaTeX
12510 File\SpecialChar \menuseparator
12511 Export\SpecialChar \menuseparator
12518 \begin_layout Plain Layout
12519 Actually you have the choice between LaTeX (plain) and pdflatex.
12520 If you intend to use pdflatex to prepare the paper, you should use the
12521 pdflatex option so that included graphics are converted to PDF format,
12522 ready for use by pdflatex.
12527 , then make the following changes to the resulting
12534 \begin_layout Enumerate
12535 Remove the comment lines before the
12544 \begin_layout Enumerate
12545 Remove everything between (and including) the
12557 commands, except for any commands you specifically put into the LaTeX preamble.
12560 \begin_layout Standard
12565 file should be saved and processed through LaTeX as many times as necessary.
12566 You may also want to check the resulting
12573 \begin_layout Subsection
12577 \begin_layout Standard
12578 The use of TeX code is reduced to two commands, which must be placed at
12579 the top of the document.
12580 If you started writing your paper by using the
12588 template, the TeX code needed is already in its place; you usually don't
12590 You may only modify the first TeX code to specify the information printed
12591 to the top of odd and even pages (authors' names and short paper's title,
12593 This TeX code must have the form
12597 markboth{Authors' Names}{Short Paper's Title}
12602 \begin_layout Section
12606 \begin_layout Standard
12612 \begin_layout Subsection
12616 \begin_layout Standard
12617 The iopart package provides a document class to create electronic manuscript
12618 submission to the journals published by the Institute of Physics.
12619 Instructions for the authors how to create a paper using the iopart class
12620 can be downloaded together with the iopart package from the site
12621 \begin_inset Flex URL
12624 \begin_layout Plain Layout
12626 ftp://ftp.iop.org/pub/journals/latex2e
12634 \begin_layout Subsection
12638 \begin_layout Standard
12639 The easiest way to write a paper is to start with the file
12643 that is available in LyX's examples files folder.
12644 Open this file, save it under a new name, and start writing.
12645 The example file explains how to use the special text environments.
12646 Here are the most important advices:
12649 \begin_layout Itemize
12650 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12653 Use AMS math package
12655 in the document settings under
12662 \begin_layout Itemize
12665 The title environment defines the kind of your paper.
12666 So use one of the following environments for the title:
12670 \begin_layout Itemize
12679 \begin_layout Itemize
12688 \begin_layout Itemize
12694 for a Topical review
12697 \begin_layout Itemize
12706 \begin_layout Itemize
12715 \begin_layout Itemize
12721 for a Paper (same as Title)
12724 \begin_layout Itemize
12730 for a Preliminary communication
12733 \begin_layout Itemize
12739 for a Rapid communication
12742 \begin_layout Itemize
12748 for a Letter to the editor
12752 \begin_layout Itemize
12755 All title environments except of
12759 can have an optional short title.
12762 \begin_layout Itemize
12763 There is a general title environment
12767 which is not directly supported by the LyX.
12768 This can be used as TeX code when your document doesn't fit into one of
12769 the other title types.
12772 \begin_layout Standard
12773 For more informations like hints for special table and formula formatting,
12774 look at the IOP author guidelines.
12777 \begin_layout Section
12781 \begin_layout Standard
12784 Panayotis Papasotiriou
12787 \begin_layout Subsection
12791 \begin_layout Standard
12792 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12793 that facilitates electronic manuscript submission to the journals they
12795 Most known of them (at least in my domain of interest) are
12797 Astrophysics and Space Science
12803 , but there are many others (see a complete list at
12804 \begin_inset Flex URL
12807 \begin_layout Plain Layout
12809 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12815 The Kluwer package may be downloaded from the site
12816 \begin_inset Flex URL
12819 \begin_layout Plain Layout
12821 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12827 A complete user guide is contained in that package (but it can also be
12828 downloaded separately).
12831 \begin_layout Standard
12832 LyX supports many features of the package but not everything.
12833 However, the TeX code needed is reduced to some
12834 \begin_inset Quotes eld
12838 \begin_inset Quotes erd
12841 commands of the package (see
12842 \begin_inset space ~
12846 \begin_inset CommandInset ref
12848 reference "subsec:kluwer_peculiarities"
12853 I have recently used LyX to write an article submitted to the
12855 Astrophysics and Space Science
12857 without any problem.
12860 \begin_layout Subsection
12864 \begin_layout Standard
12865 The easiest way to write a paper is to start with the Kluwer template file.
12868 File\SpecialChar \menuseparator
12880 This will give an (almost) empty document that includes the most common
12881 fields found in a manuscript and a short description of their use.
12882 As in most templates, simply overwrite the existing text (including the
12887 ) with the correct information.
12890 \begin_layout Subsection
12891 Preparing a paper for submission
12894 \begin_layout Standard
12895 As in the AASTeX package, before you submit your paper to a journal you
12897 \begin_inset Quotes eld
12901 \begin_inset Quotes erd
12907 \begin_layout Enumerate
12908 Export your paper as a LaTeX file.
12909 To do this, click on
12911 File\SpecialChar \menuseparator
12912 Export\SpecialChar \menuseparator
12919 \begin_layout Enumerate
12924 file with a text editor and make the following changes
12928 \begin_layout Enumerate
12929 remove the comment lines before the
12938 \begin_layout Enumerate
12939 remove everything between (and including) the
12951 commands, except for any commands you specifically put into the LaTeX preamble.
12954 \begin_layout Standard
12963 \begin_layout Enumerate
12968 file through LaTeX as many times as necessary (usually up to three).
12971 \begin_layout Enumerate
12977 \begin_inset space \thinspace{}
12981 \begin_inset space \space{}
12988 , and check if everything is OK (it should, if you didn't make any mistake).
12991 \begin_layout Subsection
12992 \begin_inset Quotes eld
12996 \begin_inset Quotes erd
12999 of the Kluwer package
13000 \begin_inset CommandInset label
13002 name "subsec:kluwer_peculiarities"
13009 \begin_layout Standard
13010 The Kluwer package has the following
13011 \begin_inset Quotes eld
13015 \begin_inset Quotes erd
13021 \begin_layout Enumerate
13022 It is possible to write multiple articles in the same LaTeX file
13026 \begin_layout Plain Layout
13027 I can't imagine any good reason to do this.
13033 Each article must be included in the environment
13034 \begin_inset Quotes eld
13038 \begin_inset Quotes erd
13042 Unfortunately, this environment cannot be omitted, even if you write just
13044 Therefore, each article starts with the command
13050 and, obviously, ends with the command
13057 Although this can be implemented in LyX, I didn't included it, since it
13058 looks ugly and can confuse the novice user.
13059 Therefore, you need to enter them directly and mark them as LaTeX code
13061 \begin_inset Quotes eld
13065 \begin_inset Quotes erd
13071 \begin_layout Enumerate
13072 Information given at the beginning of the article (i.
13073 \begin_inset space \thinspace{}
13077 \begin_inset space \space{}
13080 title, subtitle, author, institution, running title, running author, abstract
13081 and keywords) must be included in an environment called
13082 \begin_inset Quotes eld
13086 \begin_inset Quotes erd
13090 This is not implemented in LyX, so you must enter title, subtitle etc.
13091 \begin_inset space ~
13094 between two TeX code lines (
13109 \begin_layout Enumerate
13110 According to the user manual, the label of each bibliography item must be
13134 \begin_layout Standard
13139 template takes care of all these
13140 \begin_inset Quotes eld
13144 \begin_inset Quotes erd
13148 If you start a new paper using this template you don't need to do anything
13153 \begin_layout Enumerate
13154 don't delete the TeX code included in the template, and
13157 \begin_layout Enumerate
13158 copy the example bibliography item included in the template and modify it
13159 as necessary to enter new bibliography items.
13162 \begin_layout Section
13166 \begin_layout Standard
13172 \begin_layout Subsection
13176 \begin_layout Standard
13177 The LyX document classes
13179 article (koma-script)
13183 report (koma-script)
13201 correspond to the LaTeX document classes
13218 \begin_inset space ~
13221 of the Koma-Script family.
13222 They are replacements for the standard document classes
13238 , resp., and fit better to European typography conventions in a number of
13242 \begin_layout Itemize
13243 Standard character size is 11pt in
13245 article (koma-script)
13249 report (koma-script)
13257 letter (koma-script)
13262 \begin_layout Itemize
13263 Headings, labels of the description environment, and a number of elements
13266 letter (koma-script)
13268 document class are set in a bold sans serif font.
13272 \begin_layout Plain Layout
13273 There is a big difference between the bold sans serif old cm fonts and new
13274 ec fonts, especially in the appearance of headings.
13275 In comparison, the ec bold sans serif fonts look a bit thin.
13276 Here the LaTeX package
13284 helps to produce the
13285 \begin_inset Quotes eld
13289 \begin_inset Quotes erd
13292 appearance when using the ec fonts.
13297 The numbering of chapter headings is made in the same way as the numbering
13298 of section headings, that is without the extra line
13299 \begin_inset Quotes eld
13302 Chapter\SpecialChar \ldots{}
13304 \begin_inset Quotes erd
13308 In addition, the appearance of the headings can be modified by using a
13309 number of options (in LyX to be entered in the field
13312 \begin_inset space ~
13319 Layout\SpecialChar \menuseparator
13326 \begin_layout Itemize
13327 The main means in the Koma-Script document classes to design the type area
13336 (in LyX to be entered in the extra class options field in the dialog
13338 Document\SpecialChar \menuseparator
13342 They make a clearer modification of page margins possible as do the options
13345 Document\SpecialChar \menuseparator
13352 \begin_layout Itemize
13353 The LaTeX document classes of the Koma-Script family define a number of
13354 additional commands.
13355 Those part of it which makes sense in LyX is implemented in corresponding
13359 \begin_layout Standard
13360 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13361 can be found in the Koma-Script documentation
13372 \begin_layout Subsection
13373 article (koma-script), report (koma-script), and book (koma-script)
13376 \begin_layout Standard
13377 The document classes
13379 article (koma-script)
13383 report (koma-script)
13393 are implemented in the layout files
13406 They contain all the paragraph types of the corresponding standard document
13419 , resp., partly modified, with the exception of the LyX specific
13423 -type, which is replaced by the new
13427 -type having the same functionality.
13432 -Type there is a number of new paragraph types added.
13439 letter (koma-script)
13444 \begin_layout Itemize
13453 : are equivalents to
13461 , resp., additionally inserting an entry in the table of contents.
13470 are not contained in
13472 article (koma-script)
13477 \begin_layout Itemize
13486 : behave exactly as
13494 , resp., additionally clearing running heads.
13499 is not contained in
13501 article (koma-script)
13507 \begin_layout Plain Layout
13520 report (koma-script)
13522 , but since this is identical to
13526 , is has not been implemented in LyX.
13534 \begin_layout Itemize
13539 : generates a heading directly above the following paragraph in the standard
13540 character size without affecting the structure of the document.
13543 \begin_layout Itemize
13552 are special captions which respect the different space settings needed
13553 for captions placed above or below an element (if you follow strict typographic
13554 rules, you might want to place table captions always above the table).
13555 You can also use the class option
13559 , which will switch
13572 You need at least Koma-Script version 2.8q to use this.
13575 \begin_layout Itemize
13580 : can be used to set a bonmot, e.
13581 \begin_inset space \thinspace{}
13585 \begin_inset space \space{}
13588 at the beginning of a chapter.
13589 If you use the optional argument (
13591 Insert\SpecialChar \menuseparator
13593 \begin_inset space ~
13598 ), you can insert the dictum's author there.
13599 Dictum and author are separated by a line.
13600 You need at least Koma-Script version 2.8q to use this.
13605 is not contained in
13607 article (koma-script)
13612 \begin_layout Standard
13613 The following types, together with the standard types
13625 , form the title area of the document.
13626 They must be entered ahead of the first
13627 \begin_inset Quotes eld
13631 \begin_inset Quotes erd
13638 \begin_layout Plain Layout
13639 The corresponding LaTeX commands must appear before the
13650 When such a type is used more than once, the latter usage overwrites the
13651 former one, that means, for every type only the latest usage is valid.
13652 The order of the different types however has, like
13664 , no effect on the appearance of the produced document.
13667 \begin_layout Itemize
13672 : produces a centered paragraph above the ordinary title (
13684 ) for the subject of the document.
13687 \begin_layout Itemize
13692 : produces a centered paragraph below the ordinary title (
13704 ) for the publishers' name.
13707 \begin_layout Itemize
13714 report (koma-script)
13720 produces a centered paragraph on its own page behind the title page, or
13723 article (koma-script)
13725 produces a centered paragraph below the ordinary title (
13741 ) for a dedication.
13744 \begin_layout Itemize
13749 : produces a left aligned paragraph above the ordinary title (
13765 ) for a document`s head.
13768 \begin_layout Itemize
13773 : produces in a double-sided print in
13775 report (koma-script)
13781 a left-aligned paragraph at the top of the title page`s back or has no
13782 effect in a single-sided print or in
13784 article (koma-script)
13789 \begin_layout Itemize
13794 : produces in a double-sided print in
13796 report (koma-script)
13802 a left-aligned paragraph at the bottom of the title page`s back or has
13803 no effect in a single-sided print or in
13805 article (koma-script)
13810 \begin_layout Itemize
13815 : produces a special
13816 \begin_inset Quotes eld
13820 \begin_inset Quotes erd
13823 page ahead of the actual document containing a paragraph without special
13827 \begin_layout Standard
13828 The layout files for the document classes
13830 article (koma-script)
13834 report (koma-script)
13840 do include the file
13845 This is thought of as a place to define your own types.
13850 in your personal layout directory and edit the file!
13853 \begin_layout Subsection
13854 letter (koma-script)
13857 \begin_layout Standard
13861 letter (koma-script)
13863 is implemented in the layout file
13868 It contains all the paragraph types of the corresponding standard document
13873 , partly modified, with the exception of the LyX specific types
13885 type, which is replaced by the new
13890 In addition, it contains, in contrast to the standard document class, the
13908 Furthermore, there are a number of new letter specific types.
13911 \begin_layout Standard
13912 The appearance of the letter produced by this document class can be controlled
13913 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13917 \begin_layout Plain Layout
13918 For example, the standard appearance of the letter`s heading, consisting
13919 of name and address, is quite self-willed.
13921 \begin_inset Quotes eld
13925 \begin_inset Quotes erd
13928 heading is produced by the following LaTeX commands in the preamble:
13931 \begin_layout LyX-Code
13941 \begin_layout LyX-Code
13957 \begin_layout LyX-Code
13967 \begin_layout LyX-Code
13987 A detailed German description of such LaTeX commands can be found in the
13988 Koma-Script documentation
13993 With it, the letter's author can produce his personal letter layout.
13996 \begin_layout Standard
14005 define the beginning of the letter and must be used in every letter.
14006 To emphasize them in the LyX document class, they are marked with the letter
14016 \begin_inset space ~
14019 in the left margin.
14020 It is possible to write any number of letters in one file.
14025 type produces a new letter using the same addressee and a
14029 type produces a new addressee.
14046 are ordinary paragraph types and can also be used several times in one
14047 and the same letter.
14050 \begin_layout Itemize
14055 : produces a paragraph for the addressee and implicitly defines the beginning
14059 \begin_layout Itemize
14064 : produces a paragraph for the form of address and implicitly produces a
14068 \begin_layout Itemize
14073 : produces a paragraph for a close.
14076 \begin_layout Itemize
14081 : produces a paragraph for a postscript.
14084 \begin_layout Itemize
14089 : produces a paragraph for a distribution list.
14092 \begin_layout Itemize
14097 : produces a paragraph for enclosures.
14100 \begin_layout Standard
14141 are input types provided with a label to enter information, which will
14142 be processed by the document class.
14146 \begin_layout Plain Layout
14147 It could be seen as a matter of inconsequence, that the types
14155 described above are not such input types as well.
14156 Because of the special meaning of those types, however, I have implemented
14157 them as ordinary paragraph types with a one letter mark in the left margin.
14158 Moreover, it would affect my feeling of symmetry, if the
14166 type had such a serious different appearance.
14171 The types must be used ahead of the corresponding
14178 \begin_layout Standard
14179 An implementation of these types in a WYSIWYG fashion does not seem to make
14180 sense, because the real appearance of the produced letter does not only
14181 depend on the usage of the particular type, but also on other factors.
14182 For example, a signature entered in the
14186 type will in the standard behavior appear in the produced letter only,
14187 when in the same letter also a
14192 The entered value of the
14196 type will in the standard behavior not appear in the produced letter at
14198 The possibility to design the letter`s heading freely is already indicated
14199 in a footnote above.
14202 \begin_layout Standard
14203 The input types can also be used as empty paragraphs.
14204 This makes sense e.
14205 \begin_inset space \thinspace{}
14209 \begin_inset space \space{}
14221 type is not used at all, in the standard behavior the value of the
14225 type is used as signature, whereas if an empty
14229 type is used, no signature value is defined.
14232 \begin_layout Standard
14233 By using the input types it is possible to write a letter template, containing
14234 filled input types with your personal dates (name, address, etc.) and empty
14235 input types for other dates you want to enter.
14238 \begin_layout Itemize
14243 : sender's name, in the standard behavior appears as a centered paragraph
14244 in small caps in the letter`s heading.
14247 \begin_layout Itemize
14252 : sender's signature, in the standard behavior appears below the
14261 type is used, the value of the
14265 type appears instead.
14268 \begin_layout Itemize
14273 : sender's address, in the standard behavior appears in a centered paragraph
14274 in the letter`s heading below the sender's name.
14277 \begin_layout Itemize
14282 : sender's telephone number, in the standard behavior only sets the LaTeX
14292 \begin_layout Itemize
14297 : place of the letter`s making.
14300 \begin_layout Itemize
14305 : date of the letter`s making.
14314 , in the standard behavior, produce the place and the date in a right-aligned
14315 line below the addressee's field.
14320 type is used, neither place nor date appear, independent of the value of
14330 type is used, the date of the letter `s production is used.
14333 \begin_layout Itemize
14338 : sender`s back address, in the standard behavior appears above the addressee's
14339 field in a small sans serif font.
14342 \begin_layout Itemize
14347 : special mail information, in the standard behavior appears underlined
14348 above the addressee's field below the back address.
14351 \begin_layout Itemize
14356 : additional information, in the standard behavior appears on right side
14357 below the addressee`s field.
14360 \begin_layout Itemize
14365 : the letter's title, in the standard behavior appears in a big, bold, sans
14366 serif font above the subject.
14369 \begin_layout Itemize
14374 : the letter's subject, in the standard behavior appears in a bold font
14382 \begin_layout Standard
14403 produce a business letter like line above the
14407 line containing the fields
14408 \begin_inset Quotes eld
14412 \begin_inset Quotes erd
14416 \begin_inset Quotes eld
14420 \begin_inset Quotes erd
14424 \begin_inset Quotes eld
14428 \begin_inset Quotes erd
14432 \begin_inset Quotes eld
14436 \begin_inset Quotes erd
14440 \begin_inset Quotes eld
14444 \begin_inset Quotes erd
14448 \begin_inset Quotes eld
14452 \begin_inset Quotes erd
14456 For the date field, the value of the
14462 \begin_inset Quotes eld
14465 business letter types
14466 \begin_inset Quotes erd
14469 is used, the value of the
14473 type however does not appear, but only the LaTeX variable
14480 The ordinary output of place and date in a right-aligned line below the
14481 addressee`s field is suppressed.
14482 The types are implemented as input types provided with a label and must
14483 be used ahead of the corresponding
14490 \begin_layout Itemize
14498 \begin_layout Itemize
14506 \begin_layout Itemize
14514 \begin_layout Itemize
14522 \begin_layout Itemize
14530 \begin_layout Subsection
14531 The new letter class: letter (koma-script v.2)
14534 \begin_layout Standard
14540 \begin_layout Standard
14541 \begin_inset VSpace medskip
14547 \begin_layout Standard
14549 Koma-Script version 2.8 has introduced a new letter class
14553 which supersedes the now unsupported
14558 It has — on the LaTeX side — a completely new interface and is not compatible
14559 with the old class.
14560 Therefore, LyX supports both, though it is recommended you use the new
14564 \begin_layout Standard
14565 This class covers the same functionality as
14567 letter (koma-script),
14570 The basic items are
14574 (receiver's address, same as
14578 in the old layout),
14591 will start a new letter (i.
14592 \begin_inset space \thinspace{}
14596 \begin_inset space \space{}
14599 you can write several letters per document).
14600 New elements are sender's
14616 and the possibility to use a
14622 Insert\SpecialChar \menuseparator
14628 \begin_layout Standard
14629 The biggest improvement is, though, that the letter's layout is configurable
14630 to meet almost any needs.
14631 This can be done via the preamble or with a special style file (Letter
14632 Class Option, extension
14636 ), that will be read in as a class option.
14640 \begin_layout Plain Layout
14641 The KOMA package comes with some default
14646 There is, for instance, a
14650 file that follows german typesetting rules, or a
14654 that provides the default layout of the old
14659 The latter can be loaded with the class option
14668 ayout\SpecialChar \menuseparator
14673 ocument\SpecialChar \menuseparator
14685 template that is included in LyX for examples.
14686 A detailed description is to be found in the Koma-Script documentation
14694 \begin_layout Subsection
14698 \begin_layout Standard
14699 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14703 \begin_layout Itemize
14704 The chapter number of a
14708 type appears on a line of its own above the chapter heading instead of
14709 appearing in the same line ahead of it.
14710 The cause for that is the LyX internal behavior for the labeltype
14714 in the layout file.
14717 \begin_layout Itemize
14718 The headings of the types
14726 are only put in the
14727 \begin_inset Quotes eld
14731 \begin_inset Quotes erd
14734 LaTeX table of contents, but not in the LyX table of contents (
14736 Document\SpecialChar \menuseparator
14738 \begin_inset space ~
14742 \begin_inset space ~
14750 \begin_layout Itemize
14751 The paragraphs in a
14755 document class appear in a skip separation mode, not indented.
14756 This is the standard behavior, no special LaTeX commands are needed for
14760 Document\SpecialChar \menuseparator
14763 dialog the corresponding radio button indicates
14772 value always has the effect that extra LaTeX commands are inserted in the
14773 document to produce the gap, which is not what is wanted in this case.
14776 \begin_layout Section
14780 \begin_layout Standard
14786 \begin_layout Subsection
14790 \begin_layout Standard
14791 Memoir is a very powerful and constantly evolving class.
14792 It has been designed with regard to fictional and non-fictional literature.
14793 Its aim is to let the user have maximum control over the typesetting of
14795 Memoir is based on the standard book class, but it can also emulate the
14796 article class (see below).
14799 \begin_layout Standard
14800 Peter Wilson, the developer of Memoir, is known as the author of lots of
14801 useful packages in the LaTeX world.
14802 Most of them have been merged with Memoir.
14803 Therefore, it is much easier to layout the table of contents, appendices,
14804 chapter designs and such.
14805 LyX, though, does not support all of these goodies natively.
14806 Some of them might be added to forthcoming releases
14810 \begin_layout Plain Layout
14811 You are invited to send suggestions to
14812 \begin_inset Flex URL
14815 \begin_layout Plain Layout
14817 lyx-devel@lists.lyx.org
14827 , lots will probably never be supported, due to the limitations of LyX's
14829 Of course you can still use all features with the help of some native LaTeX
14834 \begin_layout Plain Layout
14839 \begin_layout Plain Layout
14849 \begin_inset space ~
14853 \begin_inset CommandInset ref
14855 reference "sec:Inserting-TeX-Code"
14865 In this section, we can only list those features that are natively supported
14867 For detailed descriptions (and for the rest of features) we recommend you
14868 have a look at the detailed manual of the Memoir class
14872 \begin_layout Plain Layout
14877 \begin_layout Plain Layout
14887 \begin_inset Flex URL
14890 \begin_layout Plain Layout
14892 CTAN:/macros/latex/memoir/memman.pdf
14902 , which is not only a user guide for the class, but also both a comprehensive
14903 description on good typesetting and a superb example for good typesetting
14907 \begin_layout Subsection
14908 Basic features and restrictions
14911 \begin_layout Standard
14912 Memoir supports basically all features of the standard book classes.
14913 There are, however, some differences, as follows:
14916 \begin_layout Description
14918 \begin_inset space ~
14921 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14924 \begin_layout Description
14926 \begin_inset space ~
14929 style: The fancy page style is not supported, due to a command clash between
14930 Memoir and the fancyhdr package (they both define a command with the same
14931 name, which confuses LaTeX).
14932 Instead, Memoir comes with a number of its own page styles (see
14934 Layout\SpecialChar \menuseparator
14935 Document\SpecialChar \menuseparator
14937 \begin_inset space ~
14943 If you want to use these for the chapter pages, you have to use the command
14950 in the main text or in preamble (e.
14951 \begin_inset space \thinspace{}
14955 \begin_inset space \space{}
14962 chapterstyle{companion}
14967 \begin_layout Description
14968 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14969 optional argument in the standard classes.
14970 With this, you can specify an alternative version of the title for the
14971 table of contents and the headers (for instance, if the title is too long).
14972 In LyX, you can do this via
14974 Insert\SpecialChar \menuseparator
14976 \begin_inset space ~
14981 at the beginning of a chapter/section.
14982 Memoir features a second optional argument and thus separates the table
14983 of contents from the header.
14984 You can define three variants of a title with this: one for the main text,
14985 one for the table of contents, and one for the headers.
14986 Simply insert two optional arguments if you need this feature, the first
14987 one containing the short title for the Table of Contents, the second one
14988 containing an alternative short title for the headers.
14991 \begin_layout Description
14992 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14993 of contents, the list of figures and the list of table start a new page
14995 Memoir does not follow this route.
14996 You have to insert a page break yourself, if you want to have one.
14999 \begin_layout Description
15000 Titlepage: For some unknown reason, Memoir uses pagination on the title
15001 page (in the standard classes, title pages are
15002 \begin_inset Quotes eld
15006 \begin_inset Quotes erd
15010 If you want an empty title page, type
15014 aliaspagestyle{title}{empty}
15019 \begin_layout Description
15020 Article: With the class option
15026 Layout\SpecialChar \menuseparator
15027 Document\SpecialChar \menuseparator
15029 \begin_inset space ~
15034 ), you can emulate article style.
15035 That is, counters (footnotes, figures, tables etc.) will not be reset on
15036 new chapters, chapters don't start a new page (but are—in contrary to
15037 \begin_inset Quotes eld
15041 \begin_inset Quotes erd
15044 article classes—still allowed), parts, though, use their own page, as in
15048 \begin_layout Description
15049 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15050 font commands, which have been used in the old LaTeX version 2.09 (e.
15051 \begin_inset space \thinspace{}
15055 \begin_inset space \space{}
15071 It produces an error and stops LaTeX whenever such a command appears.
15076 reallows the commands and spits out warnings instead (which does at least
15078 Since a lot of packages and particularly BibTeX style files are still using
15079 those commands, we have decided to use this option by default.
15082 \begin_layout Subsection
15086 \begin_layout Standard
15087 We will only describe the features supported by LyX (which is not much currently
15089 Please consult the Memoir manual
15093 \begin_layout Plain Layout
15098 \begin_layout Plain Layout
15108 \begin_inset Flex URL
15111 \begin_layout Plain Layout
15113 CTAN:/macros/latex/memoir/memman.pdf
15126 \begin_layout Description
15127 Abstract: You may wonder why an abstract is an extra feature.
15128 Well, it is in book class.
15129 Usually books don't have abstracts.
15130 Memoir, however, has.
15131 You can use it wherever and how often you like.
15134 \begin_layout Description
15135 Chapterprecis: You may know this older typesetting style: The contents of
15136 a chapter are summarized below the title and also in the table of contents
15138 \begin_inset space \thinspace{}
15142 \begin_inset space \space{}
15147 Our hero arrives in Troia; he loses some friends; he finds others
15150 Chapterprecis does exactly this.
15151 It is therefore only sensible below a chapter.
15154 \begin_layout Description
15155 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15156 The epigraph environment provides an elegant way of typesetting such a
15158 The motto itself (text) and its author (source) are divided by a short
15160 Unfortunately, we have to fool LyX a bit here again, since the environment
15161 needs two arguments (text and source).
15162 In this case, we have to use curly brackets (in TeX mode) between the two
15173 <author of the slogan>.
15176 \begin_layout Description
15177 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15178 complex figurative poems).
15179 LyX can only support a few of them.
15180 One is poemtitle, which is a centered title for poems, which will also
15181 be added to the table of contents (verse is the standard environment for
15183 Memoir has some enhanced versions of verse, but you need to use TeX code,
15184 because they have to be nested inside regular verse environments, which
15185 is not possible with LyX).
15188 \begin_layout Description
15189 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15192 \begin_layout Section
15193 Article (mwart), book (mwbk) and report (mwrep)
15194 \begin_inset Argument status
15197 \begin_layout Plain Layout
15210 \begin_layout Standard
15216 \begin_layout Standard
15217 The LyX document classes
15233 correspond to the LaTeX document classes
15246 They are replacements for the standard document classes
15258 , resp., and fit better to Polish typography conventions in a number of points.
15262 \begin_layout Standard
15266 \begin_layout Itemize
15267 Unnumbered titles (with star, e.
15268 \begin_inset space \thinspace{}
15272 \begin_inset space \space{}
15279 ) are added into table of contents,
15282 \begin_layout Itemize
15283 Additional page styles:
15287 \begin_layout Description
15288 uheadings header with separated lines,
15291 \begin_layout Description
15292 myheadings custom header, contents headers via commands:
15307 \begin_layout Description
15308 myuheadings custom header with separated lines,
15311 \begin_layout Description
15312 outer page number is placed on outer side of page
15316 \begin_layout Itemize
15321 \begin_layout Description
15322 rmheadings serif titles — default,
15325 \begin_layout Description
15326 sfheadings sansserif titles,
15329 \begin_layout Description
15330 authortitle on title page first placed is author next title — default,
15333 \begin_layout Description
15334 titleauthor on title page first placed is title next author,
15337 \begin_layout Description
15338 withmarginpar reserve place on page for margins.
15342 \begin_layout Section
15346 \begin_layout Standard
15351 provides an alternative to the standard
15356 It provides similar functionality, but you might prefer this layout with
15357 sans serif sections, headings, and more.
15360 \begin_layout Section
15364 \begin_layout Standard
15370 \begin_layout Standard
15371 \begin_inset VSpace bigskip
15377 \begin_layout Standard
15382 \begin_inset space ~
15387 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15388 \begin_inset Formula $\beta$
15391 release of May, 1999) class.
15394 \begin_layout Standard
15399 textclass, which works with RevTeX 3.1.
15400 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15401 That means that it doesn't interact very well with LyX, which requires
15402 LaTeX2e, although it has been kludged to work.
15403 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15407 \begin_inset space ~
15412 textclass should also be pretty easy to use.
15415 \begin_layout Standard
15416 These documents are supposed to be used in
15420 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15421 macros, and assume you'll know what to put in the preamble if necessary.
15424 \begin_layout Subsection
15428 \begin_layout Standard
15429 All you need to do is install RevTeX 4, as described in the package's README
15431 The package can be found at The RevTeX 4 Web Site
15432 \begin_inset Flex URL
15435 \begin_layout Plain Layout
15437 http://publish.aps.org/revtex4/
15443 Install it somewhere that LaTeX can see it.
15444 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15446 \begin_inset space \thinspace{}
15450 \begin_inset space \space{}
15453 not the directory where you installed the class file.) Then, if you reconfigure
15454 LyX, it will find the class file and let you use the RevTeX4 textclass.
15457 \begin_layout Standard
15458 Probably the easiest way to get started is either to import a RevTeX 4 document
15466 \begin_inset space ~
15471 template, found in the templates directory.
15474 \begin_layout Subsection
15478 \begin_layout Standard
15479 Optional arguments to
15486 \begin_inset Quotes eld
15490 \begin_inset Quotes erd
15494 \begin_inset Quotes eld
15498 \begin_inset Quotes erd
15508 \begin_inset space ~
15516 \begin_inset space ~
15522 Remember that in RevTeX, at least one optional argument is required!
15525 \begin_layout Standard
15526 Other preamble matter, like
15533 \begin_inset space ~
15539 \begin_inset space ~
15544 dialog, also as usual.
15547 \begin_layout Subsection
15551 \begin_layout Standard
15552 The layouts basically correspond to the commands in RevTeX4.0.
15553 For example, the Email layout corresponds to
15560 Note that (at least as of RevTeX 4.0 Beta), the
15568 layouts are exactly equivalent, so you shouldn't need to use both.
15572 \begin_layout Plain Layout
15573 In case you're curious, both were included so that
15577 would be able to translate both
15597 \begin_layout Subsection
15601 \begin_layout Standard
15602 There are a couple of important unique aspects of RevTeX 4 which might cause
15603 bugs that will be even more confusing in LyX.
15606 \begin_layout Standard
15624 The LyX equivalent is that there is a separate Thanks layout.
15629 write footnotes in the
15633 layout, or weird things may happen.
15634 See the RevTeX 4 documentation for more details.
15637 \begin_layout Standard
15641 \begin_inset space ~
15649 \begin_inset space ~
15658 layouts must be placed
15666 layout and the corresponding
15683 , the LaTeX won't compile.
15686 \begin_layout Subsection
15690 \begin_layout Standard
15691 The main problem with this layout is that you can't use the optional arguments
15692 to layouts like Email and Title.
15693 (The problem is not unique to this layout; you can't use optional arguments
15694 to the Section layouts either.) This means that after you export that file
15695 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15696 need to edit the LaTeX file with a text editor to add the optional arguments
15698 \begin_inset space \thinspace{}
15702 \begin_inset space \space{}
15705 the running title for the page headers.
15706 Lacking these layouts makes the
15712 (and the equivalent
15718 ) useless, so the corresponding layouts don't exist, and will have to be
15723 \begin_layout Plain Layout
15728 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15729 has not been updated yet to take advantage of it.
15737 \begin_layout Section
15738 Springer Journals (
15745 \begin_layout Standard
15751 \begin_layout Subsection
15755 \begin_layout Standard
15756 These are the layout files for some of the journal formats used by Springer
15757 Verlag and listed on
15758 \begin_inset Flex URL
15761 \begin_layout Plain Layout
15763 http://www.springer.de/author/tex/help-journals.html
15768 , where you should also go to fetch the class files (yes, these are LaTeX2e
15770 It is a modular system: the things common to all journals are implemented
15775 , which journal-specific layout files (such as, e.
15776 \begin_inset space \thinspace{}
15780 \begin_inset space \space{}
15787 for Journal of Geodesy) can include.
15790 \begin_layout Standard
15791 This means that implementing support for any other Springer journal on this
15792 list is as simple as writing your own
15800 file following the outline given in
15808 \begin_layout Standard
15809 It is reasonably well tested only for the Journal of Geodesy.
15818 come with the standard LyX distribution.
15819 Install the relevant class file (downloaded from Springer) in a proper
15820 directory, reconfigure LaTeX (in the teTeX case by running
15824 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15825 and it should work.
15828 \begin_layout Subsection
15832 \begin_layout Standard
15833 A large number of theorem-like styles —
15839 \SpecialChar \ldots{}
15845 \begin_layout Standard
15848 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15849 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15852 See the Springer class file documentation for details.
15855 \begin_layout Subsection
15859 \begin_layout Itemize
15871 \begin_layout Itemize
15874 Probability Theory and Related Fields
15880 — Jean-Marc Lasgouttes
15883 \begin_layout Standard
15884 Add your own, it isn't so hard!
15887 \begin_layout Subsection
15891 \begin_layout Standard
15892 These files are partly based on the older
15896 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15897 file from Springer.
15902 layout, are now defunct.
15903 Jean-Marc Lasgouttes helped out big in making me find my way around the
15904 LyX layout file mechanism.
15907 \begin_layout Subsection
15911 \begin_layout Standard
15913 But probably less than in the old hacked-LaTeX
15920 \begin_layout Standard
15922 \begin_inset space \thinspace{}
15925 g.: does not display the number for theorem-like layouts, just #.
15928 \begin_layout Section
15934 \begin_inset CommandInset label
15943 \begin_layout Standard
15951 \begin_layout Subsection
15955 \begin_layout Standard
15956 This section describes how to use LyX to make slides for overhead projectors.
15957 There are two document classes that can do this: the default slides class
15963 This section documents the former.
15966 \begin_layout Standard
15967 I'm going to say this again, nice and clear, so that there's no misunderstanding
15971 \begin_layout Standard
15972 \begin_inset VSpace bigskip
15978 \begin_layout Standard
15982 This section documents the class
15983 \begin_inset Quotes eld
15991 \begin_inset Quotes erd
15999 \begin_layout Standard
16000 \begin_inset VSpace bigskip
16006 \begin_layout Standard
16007 If you're looking for the documentation for
16008 \begin_inset Quotes eld
16016 \begin_inset Quotes erd
16019 , check out section
16020 \begin_inset space ~
16024 \begin_inset CommandInset ref
16026 reference "sec:foiltex"
16036 \begin_inset Quotes eld
16044 \begin_inset Quotes erd
16047 ] is actually somewhat better than the default
16055 \begin_layout Plain Layout
16056 \SpecialChar \ldots{}
16057 or so I've been told repeatedly by its advocates.
16058 Having never used it, I have no idea if this claim is true or not.
16063 which this section documents.
16066 \begin_layout Standard
16067 This class is the LaTeX2e improvement of the old
16072 Every LaTeX2e distribution includes this class [which I'll just refer to
16074 \begin_inset Quotes eld
16082 \begin_inset Quotes erd
16085 from now on], so you're bound to have it.
16086 As I noted earlier, there are other classes, such as
16090 , which also produce slides for overhead projectors and do a better job
16092 However, there are some things which
16096 can do which the others can't, such as generate overlays.
16097 Read on to learn more!
16100 \begin_layout Subsection
16102 \begin_inset CommandInset label
16104 name "sec:slidesetup"
16111 \begin_layout Standard
16112 Obviously, to use this document class, you need to select
16113 \begin_inset Quotes eld
16121 \begin_inset Quotes erd
16124 from the class list in the
16126 Document\SpecialChar \menuseparator
16130 There are some other special things you should know about this class:
16133 \begin_layout Itemize
16134 Don't bother changing the options
16139 They're not supported by the
16146 \begin_layout Itemize
16150 \begin_inset space ~
16155 behaves a bit differently for this class.
16156 The possible choices and what they do are as follows:
16160 \begin_layout Description
16165 The final output contains page numbers in the lower right corner.
16168 \begin_layout Description
16177 , but also prints out any time markers you've put in.
16178 This is the default.
16181 \begin_layout Description
16186 The final output contains no page numbers, time markers, or alignment markers.
16190 \begin_layout Itemize
16195 class has an extra option:
16201 \begin_inset Quotes eld
16209 \begin_inset Quotes erd
16212 in the extra class options.
16216 \begin_layout Standard
16217 Using this options allows you to add time markers to
16223 \begin_inset space ~
16227 \begin_inset CommandInset ref
16229 reference "sec:slideNote"
16237 \begin_layout Standard
16238 You can also use the template file
16239 \begin_inset Quotes eld
16247 \begin_inset Quotes erd
16250 to automatically set up a document to use the
16256 File\SpecialChar \menuseparator
16258 \begin_inset space ~
16262 \begin_inset space ~
16267 to open your new document].
16268 The template file also contains some examples of the special paragraph
16269 environments used by this class.
16270 I'll describe those next.
16273 \begin_layout Subsection
16274 Paragraph Environments
16277 \begin_layout Subsubsection
16278 Supported Environments
16281 \begin_layout Standard
16282 The first thing you'll notice when you start up a new
16286 document is the font size and type: it's the equivalent of the size
16287 \begin_inset Quotes eld
16295 \begin_inset Quotes erd
16301 \begin_inset space ~
16307 This is also what's used in the output.
16309 \begin_inset Quotes eld
16313 \begin_inset Quotes erd
16316 to remind you that this is a slide.
16317 Your final slides will use a larger font; ergo, you'll have less space.
16318 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16321 \begin_layout Standard
16322 The next thing that becomes obvious is the changes to the paragraph environment
16323 pull-down box [at the far-left end of the toolbar].
16324 Most of the paragraph environments you're used to seeing are missing.
16325 There are also five new ones.
16330 class itself only supports certain paragraph environments:
16333 \begin_layout Itemize
16339 \begin_layout Itemize
16345 \begin_layout Itemize
16351 \begin_layout Itemize
16357 \begin_layout Itemize
16363 \begin_layout Itemize
16369 \begin_layout Itemize
16375 \begin_layout Itemize
16381 \begin_layout Itemize
16387 \begin_layout Itemize
16393 \begin_layout Itemize
16399 \begin_layout Standard
16400 All of the other standard environments, including the section-heading environmen
16401 ts, aren't used in the
16408 \begin_layout Standard
16409 On the other hand, you'll notice the following new environments:
16412 \begin_layout Itemize
16418 \begin_layout Itemize
16424 \begin_layout Itemize
16430 \begin_layout Itemize
16436 \begin_layout Itemize
16442 \begin_layout Standard
16443 These five are kind of quirky, due to a
16444 \begin_inset Quotes eld
16448 \begin_inset Quotes erd
16452 You see, LyX doesn't permit you to nest any other paragraph environment
16453 into an empty environment.
16454 Now, that's fine and dandy, but it means that you wouldn't be able to start
16455 a slide with anything except plain text.
16456 To deal with this, I've performed a little
16457 \begin_inset Quotes eld
16461 \begin_inset Quotes erd
16467 \begin_layout Subsubsection
16468 Quirks of the New Environments
16469 \begin_inset CommandInset label
16471 name "sec:slideQuirk"
16478 \begin_layout Standard
16479 All five of the new paragraph environments are somewhat quirky due to inherent
16480 limitiations in the current version of LyX.
16481 As I just mentioned, LyX forbids environments that begin with another environme
16483 To get around this, the
16487 environment isn't a paragraph environment as described in the
16495 \begin_layout Standard
16496 You should consider
16509 \begin_inset Quotes eld
16512 pseudo-environments.
16513 \begin_inset Quotes erd
16516 They look like a section heading or a
16517 \begin_inset Quotes eld
16525 \begin_inset Quotes erd
16528 but really begin a [and, if necessary, end the previous] paragraph environment.
16538 \begin_inset Quotes eld
16542 \begin_inset Quotes erd
16545 These two perform some action.
16548 \begin_layout Standard
16549 A common feature of all five environments,
16569 , is a rather long-ish label.
16570 The text following this label — ordinarily the contents of the paragraph
16571 environment — is utterly irrelevant for
16592 LyX completely ignores it.
16593 In fact, you can leave these five environments completely empty.
16597 \begin_layout Standard
16602 to put any text after the rather long-ish label, you might want to.
16603 This could be a short description of the contents of the
16608 In that case, enter your descriptive comment and hit
16612 as you normally would.
16615 \begin_layout Standard
16616 If, on the other hand, you don't want to enter any descriptive text, you'll
16617 hit another LyX quirk.
16618 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16619 environment until you put something in the old one.
16623 \begin_layout Itemize
16624 Start entering the text that will
16652 \begin_layout Itemize
16653 Now move to the beginning of that paragraph.
16657 \begin_layout Itemize
16666 \begin_layout Itemize
16667 Finally, change this new, empty paragraph to a
16691 \begin_layout Standard
16692 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16696 \begin_layout Subsection
16697 Making a Presentation with
16710 \begin_layout Subsubsection
16718 \begin_layout Standard
16719 If you're expecting this section to teach you how to actually make a presentatio
16720 n, you'll be sorely disappointed.
16721 Naturally, I'll describe all of the ways the
16725 class can assist you in preparing the materials for a presentation.
16726 Filling in the contents, however, is up to you.
16731 the LyX philosophy.]
16734 \begin_layout Standard
16739 environment [in the manner described in section
16740 \begin_inset space ~
16744 \begin_inset CommandInset ref
16746 reference "sec:slideQuirk"
16750 ] tells LyX to begin a new slide [duh].
16751 The label for this environment/
16752 \begin_inset Quotes erd
16756 \begin_inset Quotes erd
16760 \begin_inset Quotes eld
16764 \begin_inset Quotes erd
16767 in cool blue, followed by the label,
16768 \begin_inset Quotes eld
16772 \begin_inset Quotes erd
16776 Any text or paragraph environments that follow this one go on the new slide.
16780 \begin_layout Standard
16781 Slides are probably the only time you'll need to forcibly end pages in LyX
16782 (this can be specified in the
16787 In fact, you'll want to, once you finish entering the contents of one slide.
16788 If you've entered more text than can physically fit on a slide, the extra
16789 overflows onto a new slide.
16790 I don't recommend doing this, however, since the overflow slide won't have
16791 any page number on it.
16792 Furthermore, it may interfere with any
16796 you've made to accompany the oversized
16803 \begin_layout Standard
16812 environments work the same way as the
16817 They both create an
16818 \begin_inset Quotes eld
16822 \begin_inset Quotes erd
16825 followed by a label [
16826 \begin_inset Quotes eld
16830 \begin_inset Quotes erd
16834 \begin_inset Quotes eld
16838 \begin_inset Quotes erd
16842 The color is a stunning magenta instead of blue, and the
16843 \begin_inset Quotes eld
16847 \begin_inset Quotes erd
16850 will look different, in style and in length.
16851 The label fonts of all three also differ from one another.
16854 \begin_layout Standard
16859 , if the contents of a
16867 exceed the physical size of a slide or sheet of paper, the extra will overflow
16869 Again, you should avoid this.
16870 It defeats the whole purpose of
16881 \begin_layout Subsubsection
16891 \begin_layout Standard
16896 is a slide that sits atop another slide.
16897 Perhaps you wish to discuss a figure on the main
16901 before displaying the text associated with it.
16902 One way to accomplish this is tape a flap of dark paper over the part of
16907 you want to display later.
16908 This method fails, however, if you wish to overlap one graph with another,
16910 You would then have to fumble while speaking to align the two separate,
16915 s to align the two graphs.
16920 environment in both cases makes life much easier.
16923 \begin_layout Standard
16928 receives the page number of its
16929 \begin_inset Quotes eld
16933 \begin_inset Quotes erd
16941 \begin_inset Quotes eld
16949 \begin_inset Quotes erd
16956 \begin_layout Plain Layout
16957 Presumably, mutliple
16962 \begin_inset Quotes eld
16970 \begin_inset Quotes erd
16974 \begin_inset Quotes eld
16982 \begin_inset Quotes erd
16986 \begin_inset Quotes eld
16994 \begin_inset Quotes erd
16998 \begin_inset space ~
17001 appended to the page number of the parent
17011 Clearly, you want the contents of both the
17019 to each fit on a single physical slide! You should probably consider an
17025 \begin_inset Quotes eld
17029 \begin_inset Quotes erd
17041 class provides a visual cue for this: the label at the start of an
17045 is shorter than that at the start of a
17050 Lastly, when you generate printable output, you'll find alignment markers
17051 in all four corners of both the
17055 page and its parent
17060 These will assist you in lining up the two physical slides.
17063 \begin_layout Standard
17064 The major problem in overlaying two slides is aligning the contents of the
17065 two transparencies.
17066 How much space should you leave for that graph on the second slide? Worse
17067 still, what if you want a graph and a sentence on second slide, but there
17068 is text on the main transparency that goes in between them? You could try
17069 and insert vertical space of the right size.
17070 The better way is to use
17081 \begin_layout Standard
17082 As their names imply,
17090 are two command-like paragraph environments that make all subsequent text
17091 invisible and visible, respectively.
17093 \begin_inset space ~
17097 \begin_inset CommandInset ref
17099 reference "sec:slideQuirk"
17103 that you don't place anything
17107 these two environments, however.
17112 , it inserts a centered, sky-blue label into the page reading
17113 \begin_inset Quotes eld
17116 <Invisible Text Follows>
17117 \begin_inset Quotes erd
17121 For paragraphs following this label, the parts of the
17129 ; it doesn't matter which] where they would be contain instead blank space.
17133 \begin_layout Standard
17138 , the corresponding centered label is
17139 \begin_inset Quotes eld
17142 <Visible Text Follows>
17143 \begin_inset Quotes erd
17147 Paragraphs following this label behave normally.
17148 Note that the beginning of a new
17160 automatically shuts off an
17165 It's therefore not necessary to use
17176 \begin_layout Standard
17177 By now, it should be obvious how to create overlay transparencies using
17178 the proper combination of
17197 \begin_layout Enumerate
17202 , including everything that will appear on it, whether on the main slide
17210 \begin_layout Enumerate
17211 Before each figure or paragraph that will appear only on the
17220 If necessary, insert a
17224 environment after the
17231 \begin_layout Enumerate
17236 immediately following the
17243 \begin_layout Enumerate
17244 Copy the contents of this
17255 \begin_layout Enumerate
17260 , change all of the
17271 \begin_layout Standard
17273 You've just made an
17280 \begin_layout Standard
17281 There's one problem with the way I've designed the LyX
17285 class: you can't make text in the middle of a paragraph invisible, nor
17286 make text in the middle of an invisible paragraph visible again.
17287 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17291 \begin_layout Plain Layout
17292 The commands of interest are:
17295 \begin_layout Itemize
17300 invisible \SpecialChar \ldots{}
17304 \begin_layout Itemize
17309 visible \SpecialChar \ldots{}
17313 \begin_layout Plain Layout
17314 \SpecialChar \ldots{}
17315 and need to be marked as TeX.
17317 \begin_inset Quotes eld
17321 \begin_inset Quotes erd
17324 you wish to change goes in between the brackets [and after the
17337 If you don't know how to mark text as TeX, see the appropriate section
17350 \begin_layout Subsubsection
17360 \begin_inset CommandInset label
17362 name "sec:slideNote"
17369 \begin_layout Standard
17378 is associated with a
17379 \begin_inset Quotes eld
17383 \begin_inset Quotes erd
17395 class provides visual cues.
17400 is shorter than that of a
17404 [yet longer than that of an
17408 ] and, like the label of an
17412 is shockingly magenta.
17413 Additionally, the printed
17417 has the page number of its
17418 \begin_inset Quotes eld
17422 \begin_inset Quotes erd
17430 \begin_inset Quotes eld
17438 \begin_inset Quotes erd
17442 \begin_inset Quotes eld
17450 \begin_inset Quotes erd
17454 \begin_inset Quotes eld
17462 \begin_inset Quotes erd
17466 You can have multiple
17470 s associated with a single
17482 , you'll probably want to break up long
17486 s so that they fit on a single sheet of paper.
17489 \begin_layout Standard
17494 is obvious: it contains anything additional you might want to say about
17500 It could also be used as a sheet of reminders for a particular
17505 In the case of the latter, you might want to make use of time markers.
17511 \begin_inset Quotes eld
17515 \begin_inset Quotes erd
17518 support for time markers, a
17523 So, you'll have to resort to using the LaTeX codes.
17526 \begin_layout Standard
17527 To use time markers, you'll need to specify the extra class option
17528 \begin_inset Quotes eld
17536 \begin_inset Quotes erd
17540 \begin_inset space ~
17544 \begin_inset CommandInset ref
17546 reference "sec:slidesetup"
17551 This option turns on timing marks, which will appear in the lower-left-hand
17557 To set what appears in the time marker, you use the LaTeX commands
17558 \begin_inset Quotes eld
17568 \begin_inset Quotes erd
17572 \begin_inset Quotes eld
17582 \begin_inset Quotes erd
17586 The arguments of both commands are time measured in seconds.
17588 \begin_inset Quotes eld
17598 \begin_inset Quotes erd
17601 sets the time marker to a given time.
17603 \begin_inset Quotes eld
17613 \begin_inset Quotes erd
17616 increments the time marker by the specified amount.
17617 Using time markers and
17621 s in this fashion, you can remind yourself how much time to spend on a particula
17629 \begin_layout Standard
17630 There's one last feature to describe.
17631 Clearly, you'd like to print out all of your
17639 s on transparencies while printing all of your
17656 with which it is associated.
17657 What's a person to do?
17660 \begin_layout Standard
17661 Luckily, there are two LaTeX commands that allow you to select what to print
17663 Both must be placed into the preamble of your document.
17665 \begin_inset Quotes eld
17677 \begin_inset Quotes erd
17680 will cause the output to contain only the
17689 Correspondingly, the command
17690 \begin_inset Quotes eld
17702 \begin_inset Quotes erd
17705 prevents the output of anything but
17710 I'd advise placing both commands in the preamble and initially comment
17712 You can then preview your entire presentation as you write.
17713 When you're done writing, you can then uncomment one of the two to select
17714 what you want to print.
17715 I like to uncomment
17716 \begin_inset Quotes eld
17728 \begin_inset Quotes erd
17731 , print to a file with
17732 \begin_inset Quotes eld
17740 \begin_inset Quotes erd
17743 in its name, comment it back out, then uncomment
17744 \begin_inset Quotes eld
17756 \begin_inset Quotes erd
17760 \begin_inset Quotes eld
17768 \begin_inset Quotes erd
17772 I can then send either file to a printer, loading transparencies or plain
17773 paper as appropriate.
17776 \begin_layout Standard
17777 You can also provide other arguments to the
17778 \begin_inset Quotes eld
17788 \begin_inset Quotes erd
17792 \begin_inset Quotes eld
17802 \begin_inset Quotes erd
17806 See a good LaTeX book for details.
17809 \begin_layout Subsection
17814 Class Template File
17817 \begin_layout Standard
17818 I have also provided a template file,
17819 \begin_inset Quotes eld
17827 \begin_inset Quotes erd
17835 To use it, begin your new presentation with
17840 ile\SpecialChar \menuseparator
17842 \begin_inset space ~
17846 \begin_inset space ~
17856 Your new LyX presentation file will contain an example
17877 additionally contain an example of the use of
17886 Lastly, the preamble will contain:
17889 \begin_layout LyX-Code
17890 % Uncomment to print out only slides and overlays
17893 \begin_layout LyX-Code
17897 \begin_layout LyX-Code
17903 \begin_inset Newline newline
17909 \begin_layout LyX-Code
17910 % Uncomment to print out only notes
17913 \begin_layout LyX-Code
17917 \begin_layout LyX-Code
17925 \begin_layout Standard
17926 One final thing: I created this class to support the LaTeX2e
17927 \begin_inset Quotes eld
17935 \begin_inset Quotes erd
17938 class, one of the built-in LaTeX2e classes.
17939 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17940 built-in slide class.
17941 It's here if you want it or need it.
17942 There exist other LaTeX2e classes for creating presentations, such as the
17948 \begin_inset space ~
17952 \begin_inset CommandInset ref
17954 reference "sec:foiltex"
17959 \begin_inset Quotes eld
17967 \begin_inset Quotes erd
17970 package [present on some TeX distributions].
17971 The latter is not yet supported under LyX.
17975 \begin_layout Plain Layout
17976 Perhaps you can take on the task\SpecialChar \ldots{}
17982 I know nothing about these other classes.
17983 Try them out to see what sort of alternative they provide.
17986 \begin_layout Chapter
17987 LyX Features needing Extra Software
17990 \begin_layout Section
17994 \begin_layout Standard
18000 \begin_layout Subsection
18004 \begin_layout Standard
18013 \begin_layout Plain Layout
18018 is not yet available when you are using the LaTeX distribution MiKTeX.
18023 , you'll find in the
18030 \begin_inset space ~
18041 \begin_inset Newline newline
18045 \begin_inset CommandInset href
18047 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18054 \begin_layout Standard
18059 package is a program that was written by
18060 \begin_inset Flex Noun
18063 \begin_layout Plain Layout
18065 \begin_inset space ~
18073 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18074 and easy to forget.
18075 The program runs over your LaTeX file, checks the integrity of the file,
18076 and flags some common errors.
18077 In other technical words, it is
18084 \begin_layout Standard
18085 Well, what is a syntax checker doing in LyX which is supposed to produce
18086 correct LaTeX anyways? The answer is simple: Just as
18090 not only checks the
18094 of C programs, but also does
18098 checks for type-errors,
18102 catches some common
18106 errors, in addition to the syntactical ones.
18111 is capable of detecting several common errors, such as
18114 \begin_layout Itemize
18115 Ellipsis detection:
18116 \begin_inset Newline newline
18119 Use \SpecialChar \ldots{}
18123 \begin_layout Itemize
18124 No space in front of/after parenthesis:
18125 \begin_inset Newline newline
18131 \begin_layout Itemize
18132 Enforcement of normal space after common abbreviations:
18133 \begin_inset Newline newline
18137 \begin_inset space \thinspace{}
18141 \begin_inset space \space{}
18144 is too wide spacing.
18147 \begin_layout Itemize
18148 Enforcement of end-of-sentence space when the last sentence ends with a
18150 \begin_inset Newline newline
18154 And this is wrong spacing.
18157 \begin_layout Itemize
18158 Space in front of labels and similar commands:
18159 \begin_inset Newline newline
18162 The label should stick right up to the text to avoid falling to a wrong
18165 \begin_inset CommandInset label
18175 \begin_layout Plain Layout
18176 This footnote is in danger of falling off to a wrong page
18181 The label is separated too much.
18184 \begin_layout Itemize
18185 Space in front of references, instead of hard spaces:
18186 \begin_inset Newline newline
18189 If you have bad luck, the text will break right between the referenced text
18190 and reference number, and that's a pity.
18192 \begin_inset CommandInset ref
18194 reference "sec:chktex"
18201 \begin_layout Itemize
18203 \begin_inset Quotes eld
18207 \begin_inset Quotes erd
18211 \begin_inset Formula $\times$
18215 \begin_inset Newline newline
18218 2x2 looks cheap compared to
18219 \begin_inset Formula $2\times2$
18225 \begin_layout Standard
18226 and more \SpecialChar \ldots{}
18227 It is an invaluable tool when you are
18228 \begin_inset Quotes eld
18232 \begin_inset Quotes erd
18235 your document before printing, and you should run it right after the obligatory
18236 spelling check, and before you go fine tuning the typesetting.
18239 \begin_layout Subsection
18243 \begin_layout Standard
18244 If you have the program installed, usage is as simple as choosing
18246 Tools\SpecialChar \menuseparator
18248 \begin_inset space ~
18254 This will make LyX generate a LaTeX file of your document, start
18258 to check it, and then make LyX insert
18259 \begin_inset Quotes eld
18263 \begin_inset Quotes erd
18266 with the warnings from
18270 , if there were any.
18271 The warnings will be placed close to the point of the mistake, and you
18272 can quickly find them by using the
18274 Navigate\SpecialChar \menuseparator
18277 menu item, or the shortcut key
18286 Open the error boxes by clicking on them with the mouse, or use the shortcut
18295 bindings, or the corresponding
18304 Read the warning and correct the mistake, if it is a mistake.
18305 If you have trouble understanding what the warning is about, you can safely
18307 Remember that there is a hidden layer between the document on screen and
18308 the technical details in invoking
18312 , and this gap can make some warnings seem arcane or just plain silly.
18315 \begin_layout Standard
18316 This document is an excellent testing bed for the feature, and it should
18317 provide quite a few warnings for you to fiddle with.
18318 Since computers are only so smart, expect most of the warnings to be false
18322 \begin_layout Subsection
18323 How to fine tune it
18326 \begin_layout Standard
18327 Sometimes, you'll find that
18331 makes more noise than suits your mood.
18332 Then you can choose not to use it, wait until your mood changes, or try
18337 to get better along with you.
18340 \begin_layout Standard
18349 very configurable and extensible, you should not expect to solve all problems
18355 Since LyX has to generate a somewhat special LaTeX file to be able to match
18356 the line numbers from the
18364 \begin_layout Plain Layout
18365 You can inspect the specific output from
18371 Document\SpecialChar \menuseparator
18373 \begin_inset space ~
18387 to the internal document structure, some of the warnings will not appear
18389 There are two things you can do about this:
18392 \begin_layout Itemize
18397 invocation command line in
18398 \begin_inset Flex MenuItem
18401 \begin_layout Plain Layout
18402 Tools\SpecialChar \menuseparator
18403 Preferences\SpecialChar \menuseparator
18404 Output\SpecialChar \menuseparator
18405 LaTeX\SpecialChar \menuseparator
18415 installation configuration file (usually with the file
18420 See below to learn what warnings can be enabled and disabled on the command
18424 \begin_layout Itemize
18425 Export your document as a raw LaTeX file using
18427 File\SpecialChar \menuseparator
18428 Export\SpecialChar \menuseparator
18436 Invoked in this way, it can be a hassle to find the corresponding place
18437 in the document inside LyX, but with a little patience, you should be able
18441 \begin_layout Standard
18442 Here follows the warning messages that can be enabled and disabled in
18451 to disable a warning, and
18455 to enable a warning.
18456 The emphasized entries are disabled by default, because the default is
18459 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18464 \begin_layout Standard
18465 Notice that you should only use the options that enable and disable warnings,
18466 because LyX relies on some of the other command line parameters to be set
18467 in a specific way to have a chance to communicate with
18474 \begin_layout Enumerate
18478 Command terminated with space.
18481 \begin_layout Enumerate
18484 Non-breaking space (
18485 \begin_inset Quotes eld
18493 \begin_inset Quotes erd
18496 ) should have been used.
18499 \begin_layout Enumerate
18503 You should enclose the previous parenthesis with
18504 \begin_inset Quotes eld
18512 \begin_inset Quotes erd
18518 \begin_layout Enumerate
18521 Italic correction (
18522 \begin_inset Quotes eld
18532 \begin_inset Quotes erd
18535 ) found in non-italic buffer.
18538 \begin_layout Enumerate
18541 Italic correction (
18542 \begin_inset Quotes eld
18552 \begin_inset Quotes erd
18555 ) found more than once.
18558 \begin_layout Enumerate
18562 No italic correction (
18563 \begin_inset Quotes eld
18573 \begin_inset Quotes erd
18579 \begin_layout Enumerate
18583 \begin_inset Quotes eld
18591 \begin_inset Quotes erd
18595 \begin_inset Quotes eld
18603 \begin_inset Quotes erd
18609 \begin_layout Enumerate
18612 Wrong length of dash may have been used.
18615 \begin_layout Enumerate
18619 \begin_inset Quotes eld
18627 \begin_inset Quotes erd
18631 \begin_inset Quotes eld
18639 \begin_inset Quotes erd
18645 \begin_layout Enumerate
18649 \begin_inset Quotes eld
18657 \begin_inset Quotes erd
18663 \begin_layout Enumerate
18667 \begin_inset Quotes eld
18675 \begin_inset Quotes erd
18678 to achieve an ellipsis.
18681 \begin_layout Enumerate
18684 Inter-word spacing (
18685 \begin_inset Quotes eld
18695 \begin_inset Quotes eld
18698 ) should perhaps be used.
18701 \begin_layout Enumerate
18704 Inter-sentence spacing (
18705 \begin_inset Quotes eld
18715 \begin_inset Quotes erd
18718 ) should perhaps be used.
18721 \begin_layout Enumerate
18724 Could not find argument for command.
18727 \begin_layout Enumerate
18731 \begin_inset Quotes eld
18739 \begin_inset Quotes erd
18745 \begin_layout Enumerate
18748 Math mode still on at end of LaTeX file.
18751 \begin_layout Enumerate
18755 \begin_inset Quotes eld
18763 \begin_inset Quotes erd
18766 doesn't match the number of
18767 \begin_inset Quotes eld
18775 \begin_inset Quotes erd
18781 \begin_layout Enumerate
18784 You should use either
18787 \begin_inset Quotes eld
18795 \begin_inset Quotes erd
18800 as an alternative to
18801 \begin_inset Quotes eld
18809 \begin_inset Quotes erd
18815 \begin_layout Enumerate
18822 " (ASCII 39) instead of "
18829 \begin_layout Enumerate
18832 User-specified pattern found.
18835 \begin_layout Enumerate
18838 This command might not be intended.
18841 \begin_layout Enumerate
18848 \begin_layout Enumerate
18866 \begin_layout Enumerate
18869 Delete this space to maintain correct page references.
18872 \begin_layout Enumerate
18876 You might wish to put this between a pair of
18877 \begin_inset Quotes eld
18885 \begin_inset Quotes erd
18891 \begin_layout Enumerate
18894 You ought to remove spaces in front of punctuation.
18897 \begin_layout Enumerate
18900 Could not execute LaTeX command.
18903 \begin_layout Enumerate
18912 in front of small punctuation.
18915 \begin_layout Enumerate
18923 may look prettier here.
18926 \begin_layout Enumerate
18930 Multiple spaces detected in output.
18933 \begin_layout Enumerate
18936 This text may be ignored.
18939 \begin_layout Enumerate
18945 \begin_inset Quotes eld
18950 to begin quotation, not
18957 \begin_layout Enumerate
18964 to end quotation, not
18967 \begin_inset Quotes eld
18975 \begin_layout Enumerate
18981 \begin_layout Enumerate
18984 You should perhaps use
18985 \begin_inset Quotes eld
18993 \begin_inset Quotes erd
18999 \begin_layout Enumerate
19002 You should put a space in front of/after parenthesis.
19005 \begin_layout Enumerate
19008 You should avoid spaces in front of/after parenthesis.
19011 \begin_layout Enumerate
19015 You should not use punctuation in front of/after quotes.
19018 \begin_layout Enumerate
19021 Double space found.
19024 \begin_layout Enumerate
19027 You should put punctuation outside inner/inside display math mode.
19030 \begin_layout Enumerate
19033 You ought to not use primitive TeX in LaTeX code.
19036 \begin_layout Enumerate
19039 You should remove spaces in front of
19040 \begin_inset Quotes eld
19048 \begin_inset Quotes erd
19054 \begin_layout Enumerate
19057 \begin_inset Quotes eld
19065 \begin_inset Quotes erd
19068 is normally not followed by
19069 \begin_inset Quotes eld
19077 \begin_inset Quotes erd
19083 \begin_layout Standard
19084 In later versions of LyX, we hope to provide a more complete interface to
19085 this tool (and it's smaller cousin
19089 ) to exploit the full power of it.
19090 But it's not exactly useless as it is now: go try it on one of your existing
19091 documents of a certain length and be surprised.
19094 \begin_layout Section
19095 Version Control in LyX
19098 \begin_layout Standard
19101 Lars Gullik Bjønnes
19108 \begin_layout Subsection
19112 \begin_layout Standard
19113 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
19114 If you need something a bit more sophisticated you will have to do that
19115 manually in a terminal.
19118 \begin_layout Standard
19119 Also note that CVS support is not as good as subversion support so we advise
19121 A good place to start learning Subversion is SVN Book
19125 \begin_layout Plain Layout
19126 \begin_inset CommandInset href
19128 target "http://svnbook.red-bean.com/"
19138 In the case of RCS you should read
19139 \begin_inset Quotes eld
19143 \begin_inset Quotes erd
19146 (a man file, read it with
19151 This file describes all the basic features of RCS.
19152 You should especially notice the comment about a RCS directory, and the
19153 notion of a master RCS file (the file ending in
19160 \begin_layout Standard
19161 Before you begin to use the version control features in LyX, you should
19162 be familiar with RCS/CVS/SVN/GIT usage.
19163 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19164 package — no guarantees are made for older versions.
19165 Most of the log messages are not currently displayed after operations —
19166 you can check them in the Messages pane if unsure.
19167 Regular users of version control will appreciate VC toolbar, which can
19170 View\SpecialChar \menuseparator
19171 Toolbars\SpecialChar \menuseparator
19173 \begin_inset space ~
19181 \begin_layout Standard
19182 For introducing your own external commands consult vc-command in the manual
19186 \begin_layout Subsection
19187 RCS commands in LyX
19190 \begin_layout Standard
19191 The following sections describe the RCS commands supported by LyX.
19192 You can find them in the
19194 File\SpecialChar \menuseparator
19196 \begin_inset space ~
19202 LyX was tested against RCS 5.7/5.8
19206 \begin_layout Plain Layout
19207 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19208 in order to work properly with LyX.
19209 In particular time zone (TZ) should be set and more importantly RCSINIT
19210 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19211 expects archive to be found in file.lyx,v within the original document directory.
19212 See also README shipped with Windows RCS binaries.
19220 \begin_layout Subsubsection
19226 \begin_layout Standard
19227 If your document is not under revision control, this is the only item shown
19229 And if it is under revision control, the
19233 item is not visible.
19237 \begin_layout Standard
19238 This command registers your document with RCS (unless you are under the
19239 directory managed by CVS)\SpecialChar \@.
19240 You are asked interactively to supply an initial
19241 description of the document.
19242 The document is now set in Read-Only mode and you have to
19245 \begin_inset space ~
19249 \begin_inset space ~
19253 \begin_inset space ~
19258 , before making any changes to it.
19259 A document under revision control has a
19260 \begin_inset Quotes eld
19263 [RCS:<version> <locker>]
19264 \begin_inset Quotes erd
19267 item tagged to the filename in the minibuffer.
19270 \begin_layout Standard
19271 RCS command that is run:
19273 ci -q -u -i -t-"<initial description>" <file-name>
19276 \begin_layout Standard
19281 to understand the switches.
19285 \begin_layout Subsubsection
19291 \begin_layout Standard
19292 When you are finished editing a file, you check in your changes.
19293 When you do this, you are asked for a description of the changes.
19294 This is stored in the history log.
19295 The version number is bumped, your changes are applied to the master RCS
19296 file, the document is unlocked and set to Read-Only mode.
19299 \begin_layout Standard
19302 ci -q -u -m"<description>" <file-name>
19305 \begin_layout Subsubsection
19311 \begin_layout Standard
19312 By doing this you lock the document so that only you can edit it.
19313 This will also make the document Read-Write only for you.
19314 You will usually continue editing for a while and when you are finished
19315 you check in your changes.
19316 The status line is changed to reflect that you have locked the file.
19319 \begin_layout Standard
19322 co -q -l <file-name>
19325 \begin_layout Subsubsection
19328 Revert To Repository Version
19331 \begin_layout Standard
19332 This will discard all changes made to the document since the last check
19334 You get a warning before changes are discarded.
19337 \begin_layout Standard
19340 co -f -u<version> <file-name>
19343 \begin_layout Subsubsection
19349 \begin_layout Standard
19350 This will create a copy of the current document.
19351 Since RCS does not support copy operations natively, the version history
19352 is not preserved, and the copy is added as a new file.
19353 It requires a clean document without any changes since the last checkin.
19354 You are asked for a file name and a description of the copy operation.
19355 After that the copy is created, both locally and in the repository.
19356 If the parent directories of the copied and original document differ, all
19357 relative paths of included files of the copy are adjusted (like in
19359 File\SpecialChar \menuseparator
19362 \SpecialChar \ldots{}
19364 Finally, the copy is loaded instead of the original document.
19367 \begin_layout Labeling
19368 \labelwidthstring 00.00.0000
19370 \begin_inset space ~
19374 \begin_inset space ~
19378 \begin_inset Newline newline
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19388 \begin_inset Quotes eld
19392 \begin_inset Quotes erd
19401 \begin_inset Flex Code
19404 \begin_layout Plain Layout
19407 \begin_inset Quotes eld
19411 \begin_inset Quotes erd
19420 \begin_inset Newline newline
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19431 \begin_inset Quotes eld
19435 \begin_inset Quotes erd
19446 \begin_layout Subsubsection
19452 \begin_layout Standard
19453 This makes as if the last check in never happened.
19454 No changes are made to the document loaded into LyX, but the last version
19455 is removed from the master RCS file.
19458 \begin_layout Standard
19461 rcs -o<version> <file-name>
19464 \begin_layout Subsubsection
19470 \begin_layout Standard
19471 This shows the complete history of the RCS document.
19476 is shown in a browser.
19484 \begin_layout Subsubsection
19488 \begin_layout Standard
19489 LyX supports RCS version number, author name, date and time of last commit.
19490 All those are extracted from
19492 rlog -r <file-name>
19496 \begin_inset CommandInset ref
19498 reference "sub:VCS-Revision-Information"
19505 \begin_layout Subsection
19506 CVS commands in LyX
19509 \begin_layout Standard
19510 A subset of CVS operations is supported by LyX.
19511 You can find the commands in the
19513 File\SpecialChar \menuseparator
19515 \begin_inset space ~
19521 The version control system SVN is more powerful, so please use it instead
19522 of CVS if possible.
19525 \begin_layout Subsubsection
19531 \begin_layout Standard
19532 If you start from scratch with CVS you have to create your repository and
19533 checkout the working copy with external tools.
19534 If you're using a client-server setup you may need to login before doing
19535 the first repository checkout.
19538 \begin_layout Standard
19539 If your documents are under revision control and others are using the same
19540 repository problems arise when different changes to the same document at
19541 the same location happen.
19542 Standard CVS repositories don't operate with a file locking mechanism.
19543 This may be surprising, but conflicts only occur if people disagree on
19544 the proper content of the same part of a document.
19545 So, if co-workers are used to communicate regularly, these conflicts occur
19547 If they don't communicate they have a fundamental problem anyway.
19548 Nevertheless some people like to work with so called
19549 \begin_inset Quotes eld
19553 \begin_inset Quotes erd
19557 If they do so the working copy of all files is readonly when checked out
19558 first and the user starts editing after using a special command to make
19559 the working copy writable.
19560 When the changes are checked in the working copy returns to readonly state.
19561 With LyX one has to edit the
19562 \begin_inset Flex Code
19565 \begin_layout Plain Layout
19571 file and add the line
19572 \begin_inset Flex Code
19575 \begin_layout Plain Layout
19581 to work with reserved checkouts.
19582 The benefit is the possibility to see who is using a writable copy of some
19584 It's not guaranteed only one user makes a copy writable.
19587 \begin_layout Standard
19588 LyX tries to guess if you're using reserved or non-reserved checkouts.
19589 If your working copy is readonly or it is writable and an additional copy
19590 of your document exists in the CVS/Base sub-directory a reserved otherwise
19591 a non-reserved checkout is assumed.
19592 When a reserved checkout is detected you have to use
19593 \begin_inset Flex MenuItem
19596 \begin_layout Plain Layout
19602 to make your working copy writable if it's readonly.
19604 \begin_inset Flex MenuItem
19607 \begin_layout Plain Layout
19613 operation is possible and that makes your working copy readonly again after
19614 transferring your changes to the repository.
19617 \begin_layout Standard
19618 More information about CVS can be found here
19619 \begin_inset Flex URL
19622 \begin_layout Plain Layout
19624 http://www.nongnu.org/cvs
19630 \begin_inset Flex URL
19633 \begin_layout Plain Layout
19635 http://ximbiot.com/cvs
19643 \begin_layout Standard
19648 to understand the sub-commands and the switches mentioned below.
19651 \begin_layout Subsubsection
19657 \begin_layout Standard
19658 If your document is not under revision control, this is the only item shown
19660 And if it is under revision control, the
19667 item is not visible.
19671 \begin_layout Standard
19672 This command registers in CVS your document
19673 \begin_inset Flex Strong
19676 \begin_layout Plain Layout
19684 in the case you have already the documents directory under CVS control
19690 This means you have to create or checkout the archive by yourself using
19692 (In case you forget that step LyX registers the document with RCS.)
19695 \begin_layout Standard
19696 Then you are asked interactively to supply an initial description of the
19698 Don't forget that registered file is not yet checked in.
19701 \begin_layout Standard
19702 CVS command that is run:
19704 cvs -q add -m"<entered message>" "<file-name>"
19707 \begin_layout Standard
19712 above and for all other CVS commands is an abbreviation for
19713 \begin_inset Quotes eld
19716 change the current working directory to file location and use the file name
19717 without path component as argument
19718 \begin_inset Quotes erd
19724 \begin_layout Subsubsection
19730 \begin_layout Standard
19731 When you are finished editing a file, you commit your changes.
19732 When you do this and you had changed the document, you are asked for a
19733 description of the changes.
19734 After that changes are written to the repository.
19735 In case you didn't change the document and a reserved checkout is detected
19736 the reservation made on
19737 \begin_inset Flex MenuItem
19740 \begin_layout Plain Layout
19749 \begin_layout Labeling
19750 \labelwidthstring 00.00.0000
19752 \begin_inset space ~
19756 \begin_inset space ~
19760 \begin_inset Newline newline
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19770 -q commit -m"<description>" "<file-name>"
19776 \begin_inset Newline newline
19780 \begin_inset Flex Code
19783 \begin_layout Plain Layout
19794 \begin_layout Subsubsection
19800 \begin_layout Standard
19801 When you are sharing a repository with others, you may have to incorporate
19802 their changes into your working copy.
19805 \begin_layout Standard
19808 cvs -q update "<file-name>"
19811 \begin_layout Standard
19812 If a readonly checkout is detected the working copy is made writable and
19816 \begin_layout Standard
19819 cvs -q edit "<file-name>"
19822 \begin_layout Subsubsection
19825 Revert To Repository Version
19828 \begin_layout Standard
19829 This will discard all changes made to the document since the last check
19831 You get a warning before changes are discarded.
19832 Firstly the file is deleted, secondly CVS update command is run.
19835 \begin_layout Standard
19838 cvs -q update "<file-name>"
19841 \begin_layout Standard
19842 If a reserved checkout is detected and the working copy has no changes only
19843 the reservation is undone.
19846 \begin_layout Standard
19849 cvs -q unedit "<file-name>"
19852 \begin_layout Subsubsection
19858 \begin_layout Standard
19859 This will create a copy of the current document.
19860 Since CVS does not support copy operations natively, the version history
19861 is not preserved, and the copy is added as a new file.
19862 It requires a clean document without any changes since the last checkin.
19863 You are asked for a file name and a description of the copy operation.
19864 After that the copy is created, both locally and in the repository.
19865 If the parent directories of the copied and original document differ, all
19866 relative paths of included files of the copy are adjusted (like in
19868 File\SpecialChar \menuseparator
19871 \SpecialChar \ldots{}
19873 Finally, the copy is loaded instead of the original document.
19876 \begin_layout Labeling
19877 \labelwidthstring 00.00.0000
19879 \begin_inset space ~
19883 \begin_inset space ~
19887 \begin_inset Newline newline
19891 \begin_inset Flex Code
19894 \begin_layout Plain Layout
19897 \begin_inset Quotes eld
19901 \begin_inset Quotes erd
19910 \begin_inset Flex Code
19913 \begin_layout Plain Layout
19916 \begin_inset Quotes eld
19920 \begin_inset Quotes erd
19929 \begin_inset Newline newline
19933 \begin_inset Flex Code
19936 \begin_layout Plain Layout
19940 \begin_inset Quotes eld
19944 \begin_inset Quotes erd
19955 \begin_layout Subsubsection
19961 \begin_layout Standard
19962 This will rename the current document.
19963 Since CVS does not support rename operations natively, the version history
19964 is not preserved, the renamed document is added as a new file, and the
19965 original document is deleted.
19966 It requires a clean document without any changes since the last checkin.
19967 You are asked for a file name and a description of the rename operation.
19968 After that the document is renamed, both locally and in the repository.
19969 If the parent directories of the new and old file names differ, all relative
19970 paths of included files are adjusted (like in
19972 File\SpecialChar \menuseparator
19975 \SpecialChar \ldots{}
19977 Finally, the document is reloaded using the new name.
19980 \begin_layout Labeling
19981 \labelwidthstring 00.00.0000
19983 \begin_inset space ~
19987 \begin_inset space ~
19991 \begin_inset Newline newline
19995 \begin_inset Flex Code
19998 \begin_layout Plain Layout
20001 \begin_inset Quotes eld
20005 \begin_inset Quotes erd
20014 \begin_inset Flex Code
20017 \begin_layout Plain Layout
20020 \begin_inset Quotes eld
20024 \begin_inset Quotes erd
20033 \begin_inset Newline newline
20037 \begin_inset Flex Code
20040 \begin_layout Plain Layout
20044 \begin_inset Quotes eld
20048 \begin_inset Quotes erd
20057 \begin_inset Newline newline
20061 \begin_inset Flex Code
20064 \begin_layout Plain Layout
20068 \begin_inset Quotes eld
20072 \begin_inset Quotes erd
20083 \begin_layout Subsubsection
20084 Update of the local directory checkout from repository
20087 \begin_layout Standard
20088 Once your documents gets more complex, containing sub-documents and pictures,
20090 \begin_inset Flex Code
20093 \begin_layout Plain Layout
20099 files and so on using version control becomes more complicated.
20100 LyX supports updating the whole tree in which resides the document.
20101 This become especially useful once you cooperate with people which neither
20102 have detailed knowledge about CVS usage nor they have ambition to commit
20103 additional material to the repository.
20104 You have to organize the files structure so that all external files are
20105 in the same directory or subdirectories of the document.
20106 It's good practice anyway to store multipart documents in an extra directory.
20109 \begin_layout Standard
20111 \begin_inset Flex Code
20114 \begin_layout Plain Layout
20115 Update local directory from repository
20120 command updates the whole directory.
20121 If local changes are detected user is warned before update starts.
20122 In case of merge conflicts both versions of the conflicting document parts
20123 are placed in the final document.
20124 You have to review and correct the result of the merge.
20125 You'll find the conflicts enclosed in pairs of
20126 \begin_inset Flex Code
20129 \begin_layout Plain Layout
20136 \begin_inset Flex Code
20139 \begin_layout Plain Layout
20146 \begin_inset Flex Code
20149 \begin_layout Plain Layout
20156 The first part is your version as before the update operation with the
20157 document name prepended.
20158 The second one is the repository version with the version number after
20160 \begin_inset Flex Code
20163 \begin_layout Plain Layout
20172 \begin_layout Labeling
20173 \labelwidthstring 00.00.0000
20175 \begin_inset space ~
20179 \begin_inset space ~
20183 \begin_inset Newline newline
20187 \begin_inset Flex Code
20190 \begin_layout Plain Layout
20198 (Ask if changes are detected.)
20199 \begin_inset Newline newline
20203 \begin_inset Flex Code
20206 \begin_layout Plain Layout
20207 cd $path; cvs -q update
20217 \begin_layout Standard
20219 \begin_inset Flex Code
20222 \begin_layout Plain Layout
20228 stands for the path to the document.
20231 \begin_layout Subsubsection
20237 \begin_layout Standard
20238 This shows the complete history of the CVS document.
20241 cvs log "<file-name>"
20243 is shown in a browser.
20246 \begin_layout Subsubsection
20250 \begin_layout Standard
20251 LyX supports CVS version number, author name, date and time of last commit.
20252 All those are extracted from
20254 cvs log -r <file-name>
20258 \begin_inset CommandInset ref
20260 reference "sub:VCS-Revision-Information"
20267 \begin_layout Subsection
20268 SVN commands in LyX
20271 \begin_layout Standard
20272 SVN is now partially supported by LyX.
20273 You can find the commands in the
20275 File\SpecialChar \menuseparator
20277 \begin_inset space ~
20283 Please note that if you use password protected access to repository via
20284 ssh, you will be asked in terminal window.
20285 LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20289 \begin_layout Plain Layout
20290 Most of the commands will work with 1.4 too, see
20291 \begin_inset CommandInset ref
20293 reference "sub:SVN-Repo-Update"
20298 There seems to be currently unresolved permissions problem under SVN 1.8
20299 with reverting changes when file is locked.
20307 \begin_layout Subsubsection
20313 \begin_layout Standard
20314 If your document is not under revision control, this is the only item shown
20316 And if it is under revision control, the
20323 item is not visible.
20326 \begin_layout Standard
20327 This command registers in SVN your document ONLY in case you have already
20328 the documents directory under SVN control (in particular
20333 This means you have to checkout the archive by yourself.
20336 \begin_layout Standard
20337 Then you are asked interactively to supply an initial description of the
20339 Don't forget that registered file is not yet commited.
20342 \begin_layout Standard
20343 SVN command that is run:
20346 \begin_inset Quotes eld
20350 \begin_inset Quotes erd
20356 \begin_layout Standard
20361 to understand the switches.
20364 \begin_layout Subsubsection
20370 \begin_layout Standard
20371 When you are finished editing a file, you commit your changes.
20372 When you do this, you are asked for a description of the changes.
20373 After that changes are commited.
20376 \begin_layout Standard
20381 \begin_layout Plain Layout
20382 In case locking is not enabled.
20384 \begin_inset CommandInset ref
20386 reference "subsec:SVN-File-Locking"
20397 svn commit -q -m"<description>" <file-name>
20400 \begin_layout Subsubsection
20406 \begin_layout Standard
20407 Updates the changes of this file from the repository.
20408 Be sure you understand SVN merging and conflicts resolving before using
20409 this function, because all conflicts has to be resolved manually by you!
20412 \begin_layout Standard
20417 \begin_layout Plain Layout
20425 svn update --non-interactive
20426 \begin_inset Quotes eld
20430 \begin_inset Quotes erd
20436 \begin_layout Subsubsection
20439 Revert To Repository Version
20442 \begin_layout Standard
20443 This will discard all changes made to the document since the last check
20445 You get a warning before changes are discarded.
20448 \begin_layout Standard
20452 \begin_inset Quotes eld
20456 \begin_inset Quotes erd
20462 \begin_layout Subsubsection
20468 \begin_layout Standard
20469 This will create a copy of the current document including the version history.
20470 It requires a clean document without any changes since the last checkin.
20471 You are asked for a file name and a description of the copy operation.
20472 After that the copy is created, both locally and in the repository.
20473 If the parent directories of the copied and original document differ, all
20474 relative paths of included files of the copy are adjusted (like in
20476 File\SpecialChar \menuseparator
20479 \SpecialChar \ldots{}
20481 Finally, the copy is loaded instead of the original document.
20484 \begin_layout Labeling
20485 \labelwidthstring 00.00.0000
20487 \begin_inset space ~
20491 \begin_inset space ~
20495 \begin_inset Newline newline
20499 \begin_inset Flex Code
20502 \begin_layout Plain Layout
20506 \begin_inset Quotes eld
20510 \begin_inset Quotes erd
20514 \begin_inset Quotes eld
20518 \begin_inset Quotes erd
20527 \begin_inset Newline newline
20531 \begin_inset Flex Code
20534 \begin_layout Plain Layout
20543 \begin_layout Subsubsection
20549 \begin_layout Standard
20550 This will rename the current document including the version history.
20551 It requires a clean document without any changes since the last checkin.
20552 You are asked for a file name and a description of the rename operation.
20553 After that the document is renamed, both locally and in the repository.
20554 If the parent directories of the new and old file names differ, all relative
20555 paths of included files are adjusted (like in
20557 File\SpecialChar \menuseparator
20560 \SpecialChar \ldots{}
20562 Finally, the document is reloaded using the new name.
20565 \begin_layout Labeling
20566 \labelwidthstring 00.00.0000
20568 \begin_inset space ~
20572 \begin_inset space ~
20576 \begin_inset Newline newline
20580 \begin_inset Flex Code
20583 \begin_layout Plain Layout
20587 \begin_inset Quotes eld
20591 \begin_inset Quotes erd
20595 \begin_inset Quotes eld
20599 \begin_inset Quotes erd
20608 \begin_inset Newline newline
20612 \begin_inset Flex Code
20615 \begin_layout Plain Layout
20624 \begin_layout Subsubsection
20625 \begin_inset CommandInset label
20627 name "sub:SVN-Repo-Update"
20631 Update of the local directory checkout from repository
20635 \begin_layout Plain Layout
20636 Note that this command will work only with subversion
20637 \begin_inset Formula $\geqq1.5$
20648 \begin_layout Standard
20649 All the commands above have one shortcomming - they deal with the current
20651 Once your document contains pictures, includes external
20652 \begin_inset Flex Code
20655 \begin_layout Plain Layout
20661 files and so on administration becomes more complicated.
20662 LyX now supports updating the whole tree in which resides the document
20666 \begin_layout Plain Layout
20667 One need to organize the files structure so that all external files are
20668 in the same directory or subdirectories of the document.
20675 This become especially useful once you cooperate with people which neither
20676 know about subversion management nor they have ambition to commit additional
20677 material to the repository.
20681 \begin_layout Standard
20682 \begin_inset Flex Code
20685 \begin_layout Plain Layout
20686 Update local directory from repository
20691 command updates the whole directory and in case of merge conflicts local
20692 version of the files are left, so no unintended data loss occurs.
20693 If local changes are detected user is warned before update starts.
20696 \begin_layout Labeling
20697 \labelwidthstring 00.00.0000
20699 \begin_inset space ~
20703 \begin_inset space ~
20707 \begin_inset Newline newline
20711 \begin_inset Flex Code
20714 \begin_layout Plain Layout
20720 (Ask if changes are detected.)
20721 \begin_inset Newline newline
20725 \begin_inset Flex Code
20728 \begin_layout Plain Layout
20729 svn update --accept mine-full $path
20737 \begin_layout Standard
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20748 stands for the path to the document.
20751 \begin_layout Subsubsection
20757 \begin_layout Standard
20758 This shows the complete history of the SVN document.
20762 \begin_inset Quotes eld
20766 \begin_inset Quotes erd
20771 is shown in a browser.
20774 \begin_layout Subsubsection
20776 \begin_inset CommandInset label
20778 name "subsec:SVN-File-Locking"
20785 \begin_layout Standard
20786 The file exchange through various revision control systems brings the problem
20787 of merge conflicts in case two different users try to edit the same (parts
20789 When such a conflict happens it needs manual resolving and one reasonable
20790 alternative is to provide some kind of locking mechanism, which guarantees
20791 that only one user is allowed to edit file at the given time.
20794 \begin_layout Standard
20795 SVN has two such mechanisms to provide mutual exclusivity for file access
20796 - locks and automatic setting of write permissions (see sec.
20798 \begin_inset CommandInset ref
20800 reference "subsec:Automatical-Locking-Property"
20805 \begin_inset Flex Code
20808 \begin_layout Plain Layout
20818 \begin_layout Plain Layout
20819 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20825 If this property is detected for a given document LyX starts to use SVN
20826 locks for document editing automatically and the whole check-in/out mechanism
20827 switches to the same regimen as for RCS.
20828 This in particular means there are two different modes of file use in LyX:
20831 \begin_layout Itemize
20833 The loaded file is in the read-only mode.
20834 For editing on needs to check-out.
20839 consists of updating from the repository and gaining write lock.
20840 If the lock is not possible to obtain, we remain in unlocked state.
20843 \begin_layout Itemize
20845 The loaded file is in the 'normal' edit mode.
20846 No other user is allowed to edit the file.
20851 consists of commiting changes and releasing write-lock.
20852 If no changes have been made to the document, no commit will be produced
20856 \begin_layout Plain Layout
20857 Don't be puzzled by the fact that you will be asked for commit message anyway.
20862 and only the write-lock will be released.
20865 \begin_layout Standard
20869 \begin_layout Labeling
20870 \labelwidthstring 00.00.0000
20873 svn commit -q -m"<description>" "<file-name>"
20874 \begin_inset Newline newline
20877 svn unlock "<file-name>"
20880 \begin_layout Labeling
20881 \labelwidthstring 00.00.0000
20884 svn update "<file-name>"
20885 \begin_inset Newline newline
20888 svn lock "<file-name>"
20891 \begin_layout Subsubsection
20894 \begin_inset CommandInset label
20896 name "subsec:Automatical-Locking-Property"
20902 Automatic Locking Property
20905 \begin_layout Standard
20906 The above mentioned automatic setting of write permissions of the .lyx file
20912 ile\SpecialChar \menuseparator
20918 \begin_inset space ~
20921 Control\SpecialChar \menuseparator
20926 oggle locking property
20929 This command is active only when the file is not locked on the svn server
20931 you need to check-out before proceeding).
20934 \begin_layout Labeling
20935 \labelwidthstring 00.00.0000
20937 \begin_inset space ~
20943 \begin_layout Labeling
20944 \labelwidthstring 00.00.0000
20947 svn propset svn:needs-lock ON "<file-name>"
20950 \begin_layout Labeling
20951 \labelwidthstring 00.00.0000
20954 svn propdel svn:needs-lock "<file-name>"
20957 \begin_layout Subsubsection
20958 \begin_inset CommandInset label
20960 name "sub:VCS-Revision-Information"
20964 Revision Information in Documents
20967 \begin_layout Standard
20968 There are more possibilities how to activate revision information in our
20972 \begin_layout Itemize
20973 LyX supports directly:
20977 \begin_layout Itemize
20978 tree revision information (
20979 \begin_inset Flex Code
20982 \begin_layout Plain Layout
20989 The result is the output of the
20990 \begin_inset Flex Code
20993 \begin_layout Plain Layout
20999 command, the following table gives you an idea, how to read the results.
21002 \begin_layout Standard
21004 \begin_inset Tabular
21005 <lyxtabular version="3" rows="6" columns="2">
21006 <features rotate="0" tabularvalignment="middle">
21007 <column alignment="center" valignment="top">
21008 <column alignment="center" valignment="top">
21010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21013 \begin_layout Plain Layout
21019 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21022 \begin_layout Plain Layout
21030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21033 \begin_layout Plain Layout
21039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21042 \begin_layout Plain Layout
21043 mixed revision working copy
21050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21053 \begin_layout Plain Layout
21059 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21062 \begin_layout Plain Layout
21063 modified working copy
21070 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21073 \begin_layout Plain Layout
21079 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21082 \begin_layout Plain Layout
21083 switched working copy
21090 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21093 \begin_layout Plain Layout
21099 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21102 \begin_layout Plain Layout
21103 partial working copy, from a sparse checkout
21110 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21113 \begin_layout Plain Layout
21119 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21122 \begin_layout Plain Layout
21123 mixed revision, modified, switched working copy
21136 \begin_layout Itemize
21137 file revision information.
21138 The result comes from parsing the output of
21139 \begin_inset Flex Code
21142 \begin_layout Plain Layout
21144 \begin_inset space ~
21148 \begin_inset space ~
21152 \begin_inset space ~
21161 Supported flags are:
21165 \begin_layout Itemize
21166 version number of the last commit (
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21179 \begin_layout Itemize
21180 author of the last commit (
21181 \begin_inset Flex Code
21184 \begin_layout Plain Layout
21193 \begin_layout Itemize
21194 date of the last commit (
21195 \begin_inset Flex Code
21198 \begin_layout Plain Layout
21207 \begin_layout Itemize
21208 time of the last commit (
21209 \begin_inset Flex Code
21212 \begin_layout Plain Layout
21222 \begin_layout Standard
21223 You can obtain this info via InsetInfo (e.g.
21225 \begin_inset Flex Code
21228 \begin_layout Plain Layout
21229 info-insert buffer vcs-date
21235 The information will be available only when you have the file stored under
21236 svn managment (i.e.
21238 \begin_inset Flex Code
21241 \begin_layout Plain Layout
21247 directory is available with your document).
21251 \begin_layout Itemize
21252 Another---a hacking one---possibility is to use svn keywords
21256 \begin_layout Plain Layout
21257 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21263 In short -- you set file keywords property (e.g.
21266 svn propset svn:keywords 'Rev' file.lyx
21268 ) and then paste keyword TeX code
21272 \begin_layout Plain Layout
21273 This is an easy way how to ensure that LyX won't break the line in the middle
21279 tag in your document (e.g.
21284 \begin_layout Plain Layout
21292 This way svn client will automatically substitute revision number (e.g.
21297 \begin_layout Plain Layout
21304 ) after each update and commit.
21305 There are more problems with this approach.
21306 Firstly, the '$' character is used in TeX world for math equations, so
21307 any occurence of math formula
21308 \begin_inset Formula $Rev$
21312 \begin_inset Formula $Rev:59$
21315 in your LyX document.
21316 Similarly for other keywords like Id, Date, Author, etc.
21317 Secondly svn output is dependent on your locales, so its very easy that
21318 svn would produce some problematic strings once Date is used.
21319 Thirdly you get the whole 'Rev: 59' string in your document instead of
21321 Until subversion implements user's custom keywords it will be hard to use
21322 this approach reliably or let LyX to support it directly.
21325 \begin_layout Subsection
21326 SVN and Windows Environment
21329 \begin_layout Quote
21330 My inclination is to say that if the user cannot figure out the command
21331 line operations on their own fairly quickly, they would be well advised
21332 to use TortoiseSVN.
21338 \begin_layout Subsubsection
21342 \begin_layout Standard
21343 In addition to installing LyX, and having access to a Subversion repository,
21344 the user will need to install the Subversion client program.
21345 A Windows installer for the client program is available from
21346 \begin_inset CommandInset href
21349 target "http://www.collab.net/nonav/downloads/subversion/"
21354 The user may also want to install
21355 \begin_inset CommandInset href
21358 target "http://tortoisesvn.tigris.org/"
21362 , which integrates Subversion operations into the context (rightclick) menu
21363 of Windows Explorer.
21364 Operations done outside LyX will typically be more convenient using the
21365 Explorer context menu.
21366 Note that TortoiseSVN is not a replacement for the client program, which
21367 is what LyX itself will use.
21370 \begin_layout Subsubsection
21371 Bringing a document under Subversion control
21374 \begin_layout Standard
21375 Before a LyX document can be brought under version control in Subversion,
21376 its parent directory needs to be under version control.
21377 If the document is being added to a project already in the repository,
21378 this is accomplished by checking the project out to the directory where
21379 the new document will be placed.
21380 If the project itself is not yet under version control (for instance, if
21381 this document starts a new project), the directory must be imported into
21383 This is done outside LyX.
21384 Both import and checkout are easily accomplished from the Explorer context
21385 menu using TortoiseSVN, or alternatively can be done using the command
21386 line client at a DOS prompt.
21387 The procedure for importing the project using TortoiseSVN is described
21388 below, assuming an existing repository and a new project being started
21396 For information on using the Subversion client program, run
21403 \begin_layout Enumerate
21410 in Windows Explorer, right click it, and select
21412 TortoiseSVN\SpecialChar \menuseparator
21416 If necessary, adjust the URL for the repository, then click OK.
21419 \begin_layout Enumerate
21420 Right click the level of the repository under which you want to place the
21421 new project folder (typically the top level) and click
21425 Supply a name for the project folder and click OK.
21426 Add a message for the log file if desired, then click OK again.
21427 The new project folder should appear in the repository.
21428 Finally, click OK again to exit the repository browser.
21431 \begin_layout Enumerate
21432 Once again right click
21438 , this time selecting SVN Checkout\SpecialChar \ldots{}
21439 Select the URL of the project folder
21440 you just created in the repository, and set the checkout directory to
21448 You will be warned about a non-empty folder; click OK to proceed.
21449 You should now have a
21460 \begin_layout Enumerate
21461 Create or open your document in LyX and click
21463 File\SpecialChar \menuseparator
21465 \begin_inset space ~
21468 Control\SpecialChar \menuseparator
21472 Add a log message and click OK to commit the document to version control.
21475 \begin_layout Standard
21476 From this point onward, you should have full functionality in the
21478 File\SpecialChar \menuseparator
21480 \begin_inset space ~
21486 You also have the option of checking the document in and out, viewing its
21488 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21489 client program from a command prompt.
21492 \begin_layout Subsubsection
21493 SSH tunnel used with SVN under Windows
21496 \begin_layout Standard
21497 Compared with Linux setting up an svn client to communicate over ssh under
21498 Windows is a rather troublesome task.
21499 We will at least offer some hints how to setup the client side but prior
21500 knowledge about ssh and the Windows command line is needed, also be prepared
21501 for a great deal of frustration\SpecialChar \ldots{}
21505 \begin_layout Enumerate
21506 Get an svn client for windows, as described in the previous sections.
21507 When it is a fresh install run some svn command (e.g.
21509 \begin_inset Flex Code
21512 \begin_layout Plain Layout
21518 ) to create config files, which you will need to change later on.
21521 \begin_layout Enumerate
21522 Choose an ssh client for Windows.
21523 There are several possibilities, we will use the one from Putty tools
21527 \begin_layout Plain Layout
21528 \begin_inset Flex URL
21531 \begin_layout Plain Layout
21533 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21544 You will need to set the connection up so that the client doesn't ask for
21545 any password from you.
21546 To keep things easy we will use only keys without any additional password
21551 \begin_layout Enumerate
21553 \begin_inset Flex Code
21556 \begin_layout Plain Layout
21563 Save your private .ppk key file and put the public one on the server side.
21564 If the SVN server runs on Linux, note that the format of the public key
21565 is not compatible with Linux openssh and you will need to direcly copy-paste
21568 Public key for pasting into OpenSSH authorized_keys file
21570 :” edit field into the server's
21571 \begin_inset Flex Code
21574 \begin_layout Plain Layout
21575 ~/.ssh/authorized_keys
21581 \begin_inset Flex Code
21584 \begin_layout Plain Layout
21593 \begin_layout Enumerate
21595 \begin_inset Flex Code
21598 \begin_layout Plain Layout
21605 In the SVN config file
21609 \begin_layout Plain Layout
21610 Exact path depends on Windows version, usually somewhere around
21611 \begin_inset Flex Code
21614 \begin_layout Plain Layout
21617 Documents and Settings
21631 \begin_inset Flex Code
21634 \begin_layout Plain Layout
21649 , section [tunnels], setup ssh command, e.g.
21651 \begin_inset Flex Code
21654 \begin_layout Plain Layout
21655 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21664 \begin_layout Plain Layout
21665 It will usually take a lot of time to get exact command right and it depends
21667 For example do not have some remote server saved as a default session in
21669 If things fail, try to connect via plink without SVN first.
21678 \begin_layout Enumerate
21679 Checkout the SVN archive, e.
21680 \begin_inset space \thinspace{}
21684 \begin_inset Newline newline
21688 \begin_inset Flex Code
21691 \begin_layout Plain Layout
21692 svn co svn+ssh://user@server/repository_path
21700 \begin_layout Subsubsection
21701 End-of-Line Conversions
21704 \begin_layout Standard
21705 When the collaborators are mixing Linux and Windows environments, LyX will
21706 use different line endings inside the .lyx files.
21707 This is not a problem as far as LyX functionality is concerned, but the
21708 commit diffs will be huge and merge-conflicts prone.
21709 Fortunately SVN itself knows
21713 \begin_layout Plain Layout
21714 \begin_inset Flex URL
21717 \begin_layout Plain Layout
21719 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21729 how to deal with CR/LF problems when switching .lyx files to the
21730 \begin_inset Flex Code
21733 \begin_layout Plain Layout
21743 \begin_layout Plain Layout
21745 \begin_inset Flex Code
21748 \begin_layout Plain Layout
21749 svn propset svn:eol-style native FILE_NAME
21762 \begin_layout Subsection
21763 GIT commands in LyX
21766 \begin_layout Standard
21767 A minimal subset of GIT commands is now supported by LyX.
21768 You can find the commands in the
21770 File\SpecialChar \menuseparator
21772 \begin_inset space ~
21778 Please note that if you use password protected access to repository via
21779 ssh, you will be asked in terminal window.
21780 LyX was tested against GIT 1.7.
21784 \begin_layout Plain Layout
21785 Windows users please note that you need to ensure that git is on the path.
21786 This can be set from within LyX at
21788 Tools\SpecialChar \menuseparator
21789 Preferences\SpecialChar \menuseparator
21790 Paths\SpecialChar \menuseparator
21801 \begin_layout Standard
21802 One big difference of GIT and the other supported version control systems
21803 is the distributed nature of GIT: With traditional version control systems
21804 there is one central server which hosts the repository.
21805 Users commit their changes to the server, and get updates made by other
21807 With GIT, users commit to a local repository.
21808 The local repository can be synchronized with one or more remote repositories
21810 \begin_inset Flex Code
21813 \begin_layout Plain Layout
21820 \begin_inset Flex Code
21823 \begin_layout Plain Layout
21830 LyX does not interact in any way with remote GIT repositories.
21831 It works exclusively with the local repository in a very similar way as
21832 with a central CVS or SVN repository.
21833 If you use remote GIT repositories you need to do the
21834 \begin_inset Flex Code
21837 \begin_layout Plain Layout
21844 \begin_inset Flex Code
21847 \begin_layout Plain Layout
21853 operations with your favourite GIT client.
21856 \begin_layout Subsubsection
21862 \begin_layout Standard
21863 If your document is not under revision control, this is the only item shown
21865 And if it is under revision control, the
21872 item is not visible.
21875 \begin_layout Standard
21876 This command registers in GIT your document ONLY in case you have already
21877 the documents directory under GIT control (in particular
21882 This means you have to checkout the archive by yourself.
21885 \begin_layout Standard
21886 Then you are asked interactively to supply an initial description of the
21888 Don't forget that registered file is not yet commited.
21891 \begin_layout Standard
21892 GIT command that is run:
21895 \begin_inset Quotes eld
21899 \begin_inset Quotes erd
21905 \begin_layout Standard
21910 to understand the switches.
21913 \begin_layout Subsubsection
21919 \begin_layout Standard
21920 When you are finished editing a file, you commit your changes.
21921 When you do this, you are asked for a description of the changes.
21922 After that changes are commited.
21925 \begin_layout Standard
21928 git commit -q -m"<description>" <file-name>
21931 \begin_layout Subsubsection
21934 Revert To Repository Version
21937 \begin_layout Standard
21938 This will discard all changes made to the document since the last check
21940 You get a warning before changes are discarded.
21943 \begin_layout Standard
21947 \begin_inset Quotes eld
21951 \begin_inset Quotes erd
21957 \begin_layout Subsubsection
21963 \begin_layout Standard
21964 This will rename the current document including the version history.
21965 It requires a clean document without any changes since the last checkin.
21966 You are asked for a file name and a description of the rename operation.
21967 After that the document is renamed, both locally and in the repository.
21968 If the parent directories of the new and old file names differ, all relative
21969 paths of included files are adjusted (like in
21971 File\SpecialChar \menuseparator
21974 \SpecialChar \ldots{}
21976 Finally, the document is reloaded using the new name.
21979 \begin_layout Labeling
21980 \labelwidthstring 00.00.0000
21982 \begin_inset space ~
21986 \begin_inset space ~
21990 \begin_inset Newline newline
21994 \begin_inset Flex Code
21997 \begin_layout Plain Layout
22001 \begin_inset Quotes eld
22005 \begin_inset Quotes erd
22009 \begin_inset Quotes eld
22013 \begin_inset Quotes erd
22022 \begin_inset Newline newline
22026 \begin_inset Flex Code
22029 \begin_layout Plain Layout
22038 \begin_layout Subsubsection
22044 \begin_layout Standard
22045 This shows the complete history of the GIT document.
22049 \begin_inset Quotes eld
22053 \begin_inset Quotes erd
22058 is shown in a browser.
22061 \begin_layout Subsubsection
22065 \begin_layout Standard
22066 LyX supports GIT hash number of the last commit to the file, author name,
22067 date and time of last commit.
22068 All those are extracted from
22070 git log -n 1 --pretty=format:%H%n%an%n%ai
22073 Tree version information is obtained via
22075 git describe --abbrev --dirty --long
22079 \begin_inset CommandInset ref
22081 reference "sub:VCS-Revision-Information"
22088 \begin_layout Subsection
22092 \begin_layout Standard
22093 With the recent addition of the vc-command function LyX power users are
22094 allowed to create their own commands for revision control.
22097 \begin_layout Standard
22098 As an example you can see how two TortoiseSVN commands could be integrated
22102 \begin_layout Description
22104 \begin_inset Flex Code
22107 \begin_layout Plain Layout
22108 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
22116 \begin_layout Description
22118 \begin_inset Flex Code
22121 \begin_layout Plain Layout
22122 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
22130 \begin_layout Subsection
22131 Version control and Document comparison
22134 \begin_layout Standard
22135 One of the typical uses of version control is to inspect the changes between
22136 revisions, usually by creating
22137 \begin_inset Flex Code
22140 \begin_layout Plain Layout
22147 While this is useful for plain text files, it is much less useful in the
22148 case of LyX files, which have more a complicated structure.
22149 Hence we provide binding to the Document comparison feature.
22150 There are two ways of calling this feature - either by direct call of
22151 \begin_inset Flex Code
22154 \begin_layout Plain Layout
22160 LyX function (for details see LyX functions manual) or by icon/menu item
22162 \begin_inset Flex MenuItem
22165 \begin_layout Plain Layout
22166 Compare with older revision...
22172 One can either compare two chosen revisions of the document or he can simply
22173 compare the current version of edited text with older revisions (where
22175 \begin_inset Flex MenuItem
22178 \begin_layout Plain Layout
22184 ' revisions back means comparison of the edited file with last commited
22189 \begin_layout Standard
22190 This feature is supported for SVN and RCS though due to the more complicated
22191 versioning scheme of RCS there is a constraint -- when addressing the revisions
22192 in dialog, numbers always point to the last number in RCS revision number,
22195 We don't currently support GIT addressing of revisions, one can just compare
22196 edited document with its revision X steps backs, where X is addressed as
22200 \begin_layout Section
22201 Literate Programming
22204 \begin_layout Standard
22209 (kayvan@sylvan.com)
22213 original documentation written by
22215 Edmar Wienskoski Jr.
22218 (edmar-w-jr@technologist.com)
22221 \begin_layout Subsection
22225 \begin_layout Standard
22226 The main purpose of this documentation is to show you how to use LyX for
22227 literate programming, where it is assumed that you are familiar with this
22228 programming technique, and know what
22229 \begin_inset Quotes eld
22233 \begin_inset Quotes erd
22237 \begin_inset Quotes eld
22241 \begin_inset Quotes erd
22245 If that is not the case, please follow the web links provided in the following
22247 There is a lot of good documentation out there covering old development
22248 history to the latest tools tips.
22251 \begin_layout Standard
22252 It is also assumed that you are familiar with LyX itself to a point that
22253 you are comfortable changing your LyX preferences, and X resources file.
22254 If that is not the case please refer to other LyX documentation to cover
22255 your specific needs.
22258 \begin_layout Subsection
22259 Literate Programming
22262 \begin_layout Standard
22263 From the Literate Programming FAQ:
22266 \begin_layout Quotation
22267 Literate programming is the combination of documentation and source together
22268 in a fashion suited for reading by human beings.
22269 In fact, literate programs should be enjoyable reading, even inviting!
22270 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22271 and documentation in a single file.
22272 Literate programming tools then parse the file to produce either readable
22273 documentation or compilable source.
22274 The WEB style of literate programming was created by D.
22275 \begin_inset space \thinspace{}
22279 Knuth during the development of his TeX typesetting software.
22283 \begin_layout Standard
22284 Another excerpt says:
22287 \begin_layout Quotation
22290 How is literate programming different from verbose commenting?
22293 \begin_layout Quotation
22294 There are three distinguishing characteristics.
22295 In order of importance, they are:
22299 \begin_layout Itemize
22300 flexible order of elaboration
22303 \begin_layout Itemize
22304 automatic support for browsing
22307 \begin_layout Itemize
22308 typeset documentation, especially diagrams and mathematics
22312 \begin_layout Standard
22313 Now that I sparked your curiosity, take a look in the references.
22316 \begin_layout Subsubsection
22320 \begin_layout Standard
22321 The complete Literate Programming FAQ can be found at:
22324 \begin_layout Quote
22325 Literate Programming FAQ
22326 \begin_inset Flex URL
22329 \begin_layout Plain Layout
22331 http://www.literateprogramming.com/lpfaq.pdf
22339 \begin_layout Standard
22340 The FAQ lists 23 (twenty three!) different literate programming tools.
22341 Where some are specialized or
22342 \begin_inset Quotes eld
22346 \begin_inset Quotes erd
22349 for particular programming languages, while other have general scope.
22354 for my own use for several reasons:
22357 \begin_layout Itemize
22358 It can generate the documentation either in LaTeX or HTML.
22361 \begin_layout Itemize
22362 It has a open architecture, i.
22363 \begin_inset space \thinspace{}
22367 \begin_inset space \space{}
22370 it is easy to plug in new filters and to perform special processing that
22375 \begin_layout Itemize
22376 There is a good selection of filters available already (the HTML is one
22380 \begin_layout Itemize
22384 \begin_layout Standard
22385 The Noweb web page can be found at:
22388 \begin_layout Quote
22390 \begin_inset Flex URL
22393 \begin_layout Plain Layout
22395 http://www.cs.virginia.edu/~nr/noweb/
22403 \begin_layout Standard
22404 Starting from there you can reach many other interesting links and even
22405 some literate program examples.
22408 \begin_layout Subsection
22409 LyX and Literate Programming with Noweb
22412 \begin_layout Standard
22413 The LyX support for Literate Programming is provided by using the generic
22414 LyX converters mechanism.
22415 This support is provided in a
22416 \begin_inset Quotes eld
22420 \begin_inset Quotes erd
22424 \begin_inset space \thinspace{}
22428 \begin_inset space \space{}
22431 you will be able to use this new LyX feature with some other literate programmin
22432 g tool of your choice by just changing your LyX preferences.
22435 \begin_layout Subsubsection
22436 Generating documents and code (weaving and tangling)
22439 \begin_layout Paragraph
22440 Using the noweb module
22443 \begin_layout Standard
22444 If you have installed Noweb and LyX successfully, whenever you open a new
22445 document, after you have chosen its document class, use the Document->Settings
22447 \begin_inset Quotes eld
22451 \begin_inset Quotes erd
22455 If Noweb is correctly installed, when you click on the
22456 \begin_inset Quotes eld
22460 \begin_inset Quotes erd
22463 link, you will see the
22464 \begin_inset Quotes eld
22468 \begin_inset Quotes erd
22471 module in the available list and you can add it to your document.
22474 \begin_layout Paragraph
22478 \begin_layout Standard
22479 LyX enables you to write code with a layout named
22480 \begin_inset Flex Noun
22483 \begin_layout Plain Layout
22490 Noweb delimits chunks like this:
22493 \begin_layout LyX-Code
22497 \begin_layout LyX-Code
22501 \begin_layout LyX-Code
22505 \begin_layout LyX-Code
22509 \begin_layout LyX-Code
22513 \begin_layout Standard
22514 The problem is that whatever is written in between the << and the
22518 must be taken literally, i.
22519 \begin_inset space \thinspace{}
22523 \begin_inset space \space{}
22526 LyX should be prevented from making any special interpretation of what has
22528 This is also handled by
22529 \begin_inset Flex Noun
22532 \begin_layout Plain Layout
22538 , that works like a normal paragraph but has a free spacing capability.
22541 \begin_layout Standard
22542 As a special note, you can also use the
22543 \begin_inset Quotes eld
22547 \begin_inset Quotes erd
22550 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22554 \begin_layout LyX-Code
22558 \begin_layout LyX-Code
22559 def some_function(args):
22562 \begin_layout LyX-Code
22563 "This is the doc string for this function."
22566 \begin_layout LyX-Code
22567 print "My args: ", args
22570 \begin_layout LyX-Code
22571 @ %def some_function
22574 \begin_layout Standard
22575 For an example of this usage and the resulting cross-reference output, look
22576 at the Literate python program in
22578 LIBDIR/examples/listerrors.lyx
22580 which should make this all clear.
22583 \begin_layout Paragraph
22584 Generating the documentation
22587 \begin_layout Standard
22588 At this point you already have a new document file with a proper document
22589 class, and with some code and text on it.
22590 How do I print it? The answer is simple, you select
22592 View\SpecialChar \menuseparator
22596 Just like you would do for a plain document.
22597 No special procedure is required.
22600 \begin_layout Standard
22601 To help orientate you, I will now explain what happens inside LyX:
22604 \begin_layout Enumerate
22607 Update\SpecialChar \menuseparator
22610 menu option is chosen, a LaTeX file is generated.
22615 \begin_layout Standard
22616 If the document is of any literate class the generated file will be named
22617 with an extension name defined by the
22618 \begin_inset Quotes eld
22622 \begin_inset Quotes erd
22625 format (defined in the Preferences panel), otherwise the file will have
22634 \begin_layout Enumerate
22635 Note that the only difference so far is in the name of the file, no special
22636 processing is required by LyX.
22637 Given that you formatted the code using the
22638 \begin_inset Flex Noun
22641 \begin_layout Plain Layout
22647 layout that, by itself, takes care of the business.
22650 \begin_layout Enumerate
22651 If the document is of any literate class LyX will then use the internal
22652 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22656 \begin_layout Plain Layout
22657 The converters are defined in the
22659 Tools\SpecialChar \menuseparator
22663 \begin_inset Quotes eld
22667 \begin_inset Quotes erd
22679 manual for general information about converters.
22684 to generate the LaTeX file.
22688 \begin_layout Standard
22689 Otherwise it will just skip this step.
22693 \begin_layout Enumerate
22694 Finally, LaTeX is invoked and the regular post processing continues as in
22698 \begin_layout Standard
22699 Independence from a particular
22700 \begin_inset Quotes eld
22704 \begin_inset Quotes erd
22707 is easily achieved by changing the commands that are run by the various
22711 \begin_layout Paragraph
22712 Generating the code
22715 \begin_layout Standard
22716 When the build menu option is chosen or the corresponding button in the
22717 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22718 Next, LyX invokes the
22723 This converter needs to be defined by the user and is not installed by
22724 default, though the Program format is.
22725 This converter (like any other converter) will have two parts:
22728 \begin_layout Enumerate
22729 The converter program itself.
22730 This program performs the conversion from the one format to the other (in
22731 this case, from the Noweb format to the Program pseudo-format).
22734 \begin_layout Enumerate
22735 The error log parser.
22736 This is a program whose sole purpose is to rewrite error messages in a
22737 format that LyX understands.
22738 This makes it possible for LyX to place error boxes in the right places
22739 in the file buffer.
22742 \begin_layout Standard
22743 The first part, the
22744 \begin_inset Quotes eld
22748 \begin_inset Quotes erd
22751 setting, should be set to
22752 \begin_inset Newline newline
22756 \begin_inset Quotes eld
22764 \begin_inset Quotes erd
22768 \begin_inset Newline newline
22771 This basically means that LyX will call
22772 \begin_inset Quotes eld
22776 \begin_inset Quotes erd
22779 (a program or script) with the name of the Noweb file (normally a file
22780 in the LyX temp directory) and the directory path of the original LyX file.
22784 \begin_layout Standard
22785 This is an implementation of
22786 \begin_inset Quotes eld
22790 \begin_inset Quotes erd
22793 that you can place in a directory on your path:
22796 \begin_layout Standard
22797 \begin_inset VSpace defskip
22803 \begin_layout Standard
22804 \begin_inset Newpage pagebreak
22810 \begin_layout Standard
22816 \begin_layout Standard
22822 \begin_layout Standard
22825 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22828 \begin_layout Standard
22829 \begin_inset VSpace defskip
22835 \begin_layout Standard
22836 The next part of the converter setting is the
22837 \begin_inset Quotes eld
22841 \begin_inset Quotes erd
22844 which is to be set to
22845 \begin_inset Newline newline
22849 \begin_inset Quotes eld
22854 parselog=$$s/scripts/listerrors
22857 \begin_inset Quotes erd
22861 \begin_inset Newline newline
22864 This will run any errors that are generated by the
22865 \begin_inset Quotes eld
22869 \begin_inset Quotes erd
22872 process through the
22873 \begin_inset Quotes eld
22877 \begin_inset Quotes erd
22883 \begin_layout Standard
22884 The build will normally take place in LyX's temporary directory, so the
22885 files produced by the conversion will be in that directory.
22886 LyX will copy out what it regards as the `main' file, but the
22890 conversion may produce several files, and so most of these would then be
22891 deleted when LyX was closed.
22892 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22893 the build-script chunk can place the generated files in that location.
22896 \begin_layout Paragraph
22897 Build instructions in the document
22900 \begin_layout Standard
22901 The last piece of the integration between LyX and noweb is the
22902 \begin_inset Quotes eld
22906 \begin_inset Quotes erd
22910 Generally, the instructions for building your program should be embedded
22911 in a chunk of its own.
22913 \begin_inset Quotes eld
22917 \begin_inset Quotes erd
22920 above uses the notangle command to look for this chunk (called
22921 \begin_inset Quotes eld
22925 \begin_inset Quotes erd
22928 ) and runs its contents through
22929 \begin_inset Quotes eld
22933 \begin_inset Quotes erd
22939 \begin_layout Standard
22940 Typically, such a chunk would look something like this:
22943 \begin_layout LyX-Code
22947 \begin_layout LyX-Code
22949 \begin_inset Newline newline
22952 if [ -z "${NOWEB_SOURCE}" ]
22953 \begin_inset Newline newline
22959 \begin_layout LyX-Code
22960 NOWEB_SOURCE=myfile.nw
22961 \begin_inset Newline newline
22965 \begin_inset Newline newline
22969 code to extract files ...
22970 use NOWEB_OUTPUT_DIR here ...]
22971 \begin_inset Newline newline
22975 code to compile files ...]
22976 \begin_inset Newline newline
22982 \begin_layout Standard
22985 LIBDIR/examples/listerrors.lyx
22989 LIBDIR/examples/Literate.lyx
22991 which implement two versions of the
22992 \begin_inset Quotes eld
22996 \begin_inset Quotes erd
22999 program for some illustrations of how all of these pieces go together or
23002 LIBDIR/examples/noweb2lyx.lyx.
23005 Interestingly, these three files show off the language-indepence of the
23006 LyX literate programming support since they are written in Python, C and
23010 \begin_layout Subsubsection
23014 \begin_layout Standard
23015 All the Literate Programming support is configured by the
23017 Tools\SpecialChar \menuseparator
23021 \begin_inset Quotes eld
23025 \begin_inset Quotes erd
23029 The important parts are:
23032 \begin_layout Description
23034 \begin_inset space ~
23038 \begin_inset Quotes eld
23042 \begin_inset Quotes erd
23046 \begin_inset space ~
23049 format Set up via the File Formats tab, this is where the Noweb-specific
23059 , the file extension is set to
23064 This tells LyX to create a file with a
23068 extension in the first step of the conversion process.
23071 \begin_layout Description
23073 \begin_inset space ~
23081 \begin_inset space ~
23084 format This is an empty format whose sole purpose is to be the endpoint
23085 of a conversion (which then allows us to set up a converter for it).
23088 \begin_layout Description
23097 This converter performs the
23098 \begin_inset Quotes eld
23102 \begin_inset Quotes erd
23105 of the literate document.
23106 For Noweb, it is set to
23107 \begin_inset Quotes eld
23112 noweave -delay -index $$i > $$o
23115 \begin_inset Quotes erd
23121 \begin_layout Description
23131 \begin_inset Quotes eld
23135 \begin_inset Quotes erd
23139 As stated above, the Converter is set to
23140 \begin_inset Quotes eld
23148 \begin_inset Quotes erd
23151 , with Flags set to
23152 \begin_inset Newline newline
23156 \begin_inset Quotes eld
23161 parselog=$$s/scripts/listerrors
23164 \begin_inset Quotes erd
23170 \begin_layout Subsubsection
23174 \begin_layout Standard
23175 There is also a new function implemented in the LyX server, the
23176 \begin_inset Quotes eld
23179 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23183 \begin_layout Standard
23184 When debugging code with ddd/gdb, it is possible to invoke a text editor
23185 at the current execution position with a single key stroke.
23186 The default ddd configuration for that is shift-ctrl-V.
23187 It happens that you can define the editor command line invocation in ddd
23190 Edit\SpecialChar \menuseparator
23191 Preferences\SpecialChar \menuseparator
23194 dialog and changing the "Edit Sources" entry.
23197 \begin_layout Standard
23198 I take advantage of the newly created LyX server function and this ddd feature,
23200 \begin_inset Quotes eld
23204 \begin_inset Quotes erd
23210 \begin_layout Standard
23211 \begin_inset VSpace defskip
23217 \begin_layout Standard
23220 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23223 \begin_layout Standard
23224 \begin_inset VSpace defskip
23230 \begin_layout Standard
23231 With this, whenever you are using ddd and find a point in the program that
23232 you want to edit, you just press shift-ctrl-V (in the ddd window), and
23233 ddd will forward this information to LyX through the LyX server and then
23234 the LyX window will show the same file with the cursor at the same position
23235 ddd was pointing to.
23236 No more guessing or long scrolling to locate a point in the program back
23240 \begin_layout Standard
23241 Note however that you must enable the LyX server to get this feature working
23242 (it is disabled by default).
23243 You can enable it in
23255 ) by entering in the
23260 \begin_inset Quotes eld
23265 /home/<your-home-directory>/.lyx/lyxpipe
23268 \begin_inset Quotes erd
23274 \begin_layout Standard
23275 Read the LyX server documentation in the
23277 Customization Manual
23279 for further information.
23282 \begin_layout Subsubsection
23286 \begin_layout Standard
23287 There are six new buttons that can be added to your LyX toolbar.
23288 Five of these buttons are short cuts to layout styles:
23309 The last one is a short cut to the
23310 \begin_inset Quotes eld
23314 \begin_inset Quotes erd
23321 \begin_layout Standard
23322 LyX has a range of buttons that are available for tool bar customization.
23323 In my toolbar I like to combine the six short cuts above with two more:
23328 \SpecialChar \menuseparator
23333 \SpecialChar \menuseparator
23340 Document\SpecialChar \menuseparator
23341 View\SpecialChar \menuseparator
23345 Here is how it looks like:
23348 \begin_layout LyX-Code
23352 \begin_layout LyX-Code
23356 \begin_layout LyX-Code
23357 Icon "layout Standard"
23360 \begin_layout LyX-Code
23361 Icon "layout Section"
23364 \begin_layout LyX-Code
23365 Icon "layout LaTeX"
23368 \begin_layout LyX-Code
23369 Icon "layout LyX-Code"
23372 \begin_layout LyX-Code
23373 Icon "layout Chunk"
23376 \begin_layout LyX-Code
23380 \begin_layout LyX-Code
23384 \begin_layout LyX-Code
23385 Icon "buffer-typeset"
23388 \begin_layout LyX-Code
23389 Icon "build-program"
23392 \begin_layout LyX-Code
23396 \begin_layout LyX-Code
23400 \begin_layout LyX-Code
23404 \begin_layout LyX-Code
23408 \begin_layout LyX-Code
23412 \begin_layout Subsubsection
23413 Colors customization
23416 \begin_layout Standard
23417 There are a number of colors in LyX that can be customized in
23422 One of the things that bothers people is the LaTeX font color.
23423 The default color is red, since the chunks uses LaTeX font, and there is
23424 a lot of chunks in literate documents, you may get tired of seeing everything
23426 You can change it by going to the tabs
23435 \begin_layout Standard
23436 The next thing is the visible presence of the newline character in the screen.
23437 You can choose the color of this particular character and make it blend
23439 I recommend you choosing a color that is close to the background but not
23440 equal, that way you still can see it is there, but it is not bothering
23444 \begin_layout Subsection
23445 LyX and knitr/Sweave
23448 \begin_layout Standard
23457 is documented in the
23461 example file and in the Sweave manual (menu
23463 Help\SpecialChar \menuseparator
23469 \begin_layout Chapter
23473 \begin_layout Standard
23474 You can do everything with LyX that you can do with LaTeX.
23475 However, LyX cannot support every LaTeX feature directly.
23476 But you can always use TeX Code.
23477 This chapter shows you some more special things you might want to use.
23478 For other special things you can do with figures, tables, floats, boxes
23479 and notes, have a look at the
23482 \begin_inset space ~
23490 \begin_layout Section
23491 Multiple Text Columns
23494 \begin_layout Standard
23495 This feature is independent of the option
23497 Two-column document
23499 in the document settings under
23504 If you want to have 2
23505 \begin_inset space ~
23508 columns for the whole document, it is recommended to use the
23510 Two-column document
23513 For all other cases use this feature.
23516 \begin_layout Standard
23517 To use multiple text columns in your document, you have to load the module
23524 Document\SpecialChar \menuseparator
23525 Settings\SpecialChar \menuseparator
23528 ) and must have the LaTeX-package
23535 \begin_layout Standard
23536 Footnotes within multiple columns will be placed at the bottom of the page
23537 and not under each column.
23538 Within the different columns you can use everything, with the limitation
23539 that for floats you need to use the float option
23546 \begin_layout Subsection
23550 \begin_layout Standard
23551 If you want to have 2
23552 \begin_inset space ~
23555 columns in your text, insert a multicolumn inset via the menu
23557 Insert\SpecialChar \menuseparator
23559 \begin_inset space ~
23562 Insets\SpecialChar \menuseparator
23564 \begin_inset space ~
23569 where the columns should start.
23570 Write all text that should be printed in 2
23571 \begin_inset space ~
23574 columns into this inset.
23577 \begin_layout Standard
23578 Here is an example:
23581 \begin_layout Standard
23583 \begin_inset Flex Multiple Columns
23586 \begin_layout Plain Layout
23591 The Adventure of the Empty House
23594 \begin_inset Newline newline
23597 by Sir Arthur Conan Doyle
23600 \begin_layout Plain Layout
23603 It was in the spring of the year 1894 that all London was interested, and
23604 the fashionable world dismayed, by the murder of the Honourable Ronald
23605 Adair under most unusual and inexplicable circumstances.
23606 The public has already learned those particulars of the crime which came
23607 out in the police investigation, but a good deal was suppressed upon that
23608 occasion, since the case for the prosecution was so overwhelmingly strong
23609 that it was not necessary to bring forward all the facts.
23610 Only now, at the end of nearly ten years, am I allowed to supply those
23611 missing links which make up the whole of that remarkable chain.
23612 The crime was of interest in itself, but that interest was as nothing to
23613 me compared to the inconceivable sequel, which afforded me the greatest
23614 shock and surprise of any event in my adventurous life.
23615 Even now, after this long interval, I find myself thrilling as I think
23616 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23617 ty which utterly submerged my mind.
23618 Let me say to that public, which has shown some interest in those glimpses
23619 which I have occasionally given them of the thoughts and actions of a very
23620 remarkable man, that they are not to blame me if I have not shared my knowledge
23621 with them, for I should have considered it my first duty to do so, had
23622 I not been barred by a positive prohibition from his own lips, which was
23623 only withdrawn upon the third of last month.
23631 \begin_layout Standard
23632 To get 3 or more columns, set the cursor into the multicolumn inset and
23635 Insert\SpecialChar \menuseparator
23637 \begin_inset space ~
23641 \begin_inset space ~
23647 The number of the desired columns is written into that inset (for 3
23648 \begin_inset space ~
23652 \begin_inset Quotes eld
23656 \begin_inset Quotes erd
23660 \begin_inset Newline newline
23663 Here is an example with 3
23664 \begin_inset space ~
23670 \begin_layout Standard
23671 \begin_inset Flex Multiple Columns
23674 \begin_layout Plain Layout
23677 \begin_inset Argument 1
23680 \begin_layout Plain Layout
23686 It can be imagined that my close intimacy with Sherlock Holmes had interested
23687 me deeply in crime, and that after his disappearance I never failed to
23688 read with care the various problems which came before the public.
23689 And I even attempted, more than once, for my own private satisfaction,
23690 to employ his methods in their solution, though with indifferent success.
23691 There was none, however, which appealed to me like this tragedy of Ronald
23693 As I read the evidence at the inquest, which led up to a verdict of willful
23694 murder against some person or persons unknown, I realized more clearly
23695 than I had ever done the loss which the community had sustained by the
23696 death of Sherlock Holmes.
23697 There were points about this strange business which would, I was sure,
23698 have specially appealed to him, and the efforts of the police would have
23699 been supplemented, or more probably anticipated, by the trained observation
23700 and the alert mind of the first criminal agent in Europe.
23701 All day, as I drove upon my round, I turned over the case in my mind and
23702 found no explanation which appeared to me to be adequate.
23703 At the risk of telling a twice-told tale, I will recapitulate the facts
23704 as they were known to the public at the conclusion of the inquest.
23712 \begin_layout Standard
23713 You can have up to 10
23714 \begin_inset space ~
23717 columns if you want to, but that might not be very pleasant for the readers
23721 \begin_layout Standard
23722 \begin_inset Newpage newpage
23728 \begin_layout Subsection
23729 Columns inside Columns
23732 \begin_layout Standard
23733 You can also have columns inside columns:
23736 \begin_layout Standard
23737 \begin_inset Flex Multiple Columns
23740 \begin_layout Plain Layout
23743 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23744 at that time governor of one of the Australian colonies.
23745 Adair's mother had returned from Australia to undergo the operation for
23746 cataract, and she, her son Ronald, and her daughter Hilda were living together
23750 \begin_layout Plain Layout
23751 \begin_inset Flex Multiple Columns
23754 \begin_layout Plain Layout
23757 The youth moved in the best society–had, so far as was known, no enemies
23758 and no particular vices.
23759 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23760 had been broken off by mutual consent some months before, and there was
23761 no sign that it had left any very profound feeling behind it.
23762 For the rest {sic} the man's life moved in a narrow and conventional circle,
23763 for his habits were quiet and his nature unemotional.
23764 Yet it was upon this easy-going young aristocrat that death came, in most
23765 strange and unexpected form, between the hours of ten and eleven-twenty
23766 on the night of March 30, 1894.
23774 \begin_layout Plain Layout
23777 Ronald Adair was fond of cards–playing continually, but never for such stakes
23779 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23780 It was shown that, after dinner on the day of his death, he had played
23781 a rubber of whist at the latter club.
23782 He had also played there in the afternoon.
23787 The evidence of those who had played with him– Mr.
23788 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23789 and that there was a fairly equal fall of the cards.
23790 Adair might have lost five pounds, but not more.
23791 His fortune was a considerable one, and such a loss could not in any way
23793 He had played nearly every day at one club or other, but he was a cautious
23794 player, and usually rose a winner.
23795 It came out in evidence that, in partnership with Colonel Moran, he had
23796 actually won as much as four hundred and twenty pounds in a sitting, some
23797 weeks before, from Godfrey Milner and Lord Balmoral.
23798 So much for his recent history as it came out at the inquest.
23806 \begin_layout Subsection
23810 \begin_layout Standard
23811 The examples in this section show some more special features of multiple
23815 \begin_layout Standard
23816 For more features of multiple columns, have a look at the documentation
23817 of the LaTeX-package
23822 \begin_inset CommandInset citation
23831 \begin_layout Subsubsection
23835 \begin_layout Standard
23836 To add a preface text for multiple columns, set the cursor into the multicolumn
23837 inset and use the menu
23839 Insert\SpecialChar \menuseparator
23843 Write your preface text into that inset.
23844 \begin_inset Newline newline
23847 This is an example with some preface text:
23850 \begin_layout Standard
23851 \begin_inset VSpace bigskip
23857 \begin_layout Standard
23858 \begin_inset Flex Multiple Columns
23861 \begin_layout Plain Layout
23862 \begin_inset Argument 2
23865 \begin_layout Plain Layout
23866 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23874 On the evening of the crime, he returned from the club exactly at ten.
23875 His mother and sister were out spending the evening with a relation.
23876 The servant deposed that she heard him enter the front room on the second
23877 floor, generally used as his sitting-room.
23878 She had lit a fire there, and as it smoked she had opened the window.
23879 No sound was heard from the room until eleven-twenty, the hour of the return
23880 of Lady Maynooth and her daughter.
23881 Desiring to say good-night, she attempted to enter her son's room.
23882 The door was locked on the inside, and no answer could be got to their
23883 cries and knocking.
23884 Help was obtained, and the door forced.
23885 The unfortunate young man was found lying near the table.
23886 His head had been horribly mutilated by an expanding revolver bullet, but
23887 no weapon of any sort was to be found in the room.
23895 \begin_layout Standard
23896 You can also use a section heading as the preface if you use a section command
23898 For example the command
23901 \begin_layout Standard
23906 subsection{subsection title}
23909 \begin_layout Standard
23910 creates a subsection.
23911 In this example the preface is a subsubsection:
23914 \begin_layout Standard
23915 \begin_inset Flex Multiple Columns
23918 \begin_layout Plain Layout
23919 \begin_inset Argument 2
23922 \begin_layout Plain Layout
23926 \begin_layout Plain Layout
23935 This is a subsubsection heading as a preface
23939 \begin_layout Plain Layout
23953 A minute examination of the circumstances served only to make the case more
23955 In the first place, no reason could be given why the young man should have
23956 fastened the door upon the inside.
23957 There was the possibility that the murderer had done this, and had afterwards
23958 escaped by the window.
23959 The drop was at least twenty feet, however, and a bed of crocuses in full
23961 Neither the flowers nor the earth showed any sign of having been disturbed,
23962 nor were there any marks upon the narrow strip of grass which separated
23963 the house from the road.
23964 Apparently, therefore, it was the young man himself who had fastened the
23966 But how did he come by his death? No one could have climbed up to the window
23967 without leaving traces.
23968 Suppose a man had fired through the window, he would indeed be a remarkable
23969 shot who could with a revolver inflict so deadly a wound.
23970 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23971 a hundred yards of the house.
23972 No one had heard a shot.
23980 \begin_layout Standard
23981 If there is less vertical space than 6
23982 \begin_inset space ~
23985 text lines is left on the page at the beginning of the multiple columns,
23986 a page break will be inserted before the multiple columns.
23987 Depending on the number of lines of the preface text, you might want to
23989 This is done by setting the cursor into the mulitcolumn inset behind the
23990 preface (if there is any) and using the menu
23992 Insert\SpecialChar \menuseparator
23994 \begin_inset space ~
23998 \begin_inset space ~
24002 \begin_inset space ~
24008 Insert into that inset the amount of space like e.
24009 \begin_inset space \thinspace{}
24013 \begin_inset space \space{}
24017 \begin_inset Quotes eld
24021 \begin_inset Quotes erd
24025 \begin_inset Newline newline
24028 In this example the space is set to 7
24029 \begin_inset space ~
24032 text lines by using
24033 \begin_inset Quotes eld
24039 \begin_inset Quotes erd
24048 needs to be inserted as TeX code):
24051 \begin_layout Standard
24052 \begin_inset Flex Multiple Columns
24055 \begin_layout Plain Layout
24056 \begin_inset Argument 3
24059 \begin_layout Plain Layout
24064 \begin_layout Plain Layout
24080 On the evening of the crime, he returned from the club exactly at ten.
24081 His mother and sister were out spending the evening with a relation.
24082 The servant deposed that she heard him enter the front room on the second
24083 floor, generally used as his sitting-room.
24084 She had lit a fire there, and as it smoked she had opened the window.
24085 No sound was heard from the room until eleven-twenty, the hour of the return
24086 of Lady Maynooth and her daughter.
24087 Desiring to say good-night, she attempted to enter her son's room.
24088 The door was locked on the inside, and no answer could be got to their
24089 cries and knocking.
24090 Help was obtained, and the door forced.
24091 The unfortunate young man was found lying near the table.
24092 His head had been horribly mutilated by an expanding revolver bullet, but
24093 no weapon of any sort was to be found in the room.
24101 \begin_layout Subsubsection
24105 \begin_layout Standard
24106 The amount of space before and after multiple columns can be changed by
24107 changing the length
24114 For example the command
24117 \begin_layout Standard
24127 \begin_layout Standard
24128 in TeX Code changes its value to 3
24129 \begin_inset space \thinspace{}
24133 The change must be made before the multiple columns' start.
24134 The predefined value is 13
24135 \begin_inset space \thinspace{}
24141 \begin_layout Standard
24149 \begin_inset space \thinspace{}
24155 \begin_layout Standard
24159 \begin_layout Plain Layout
24165 multicolsep}{2.5cm}
24173 \begin_layout Standard
24174 \begin_inset Flex Multiple Columns
24177 \begin_layout Plain Layout
24180 All day I turned these facts over in my mind, endeavouring to hit upon some
24181 theory which could reconcile them all, and to find that line of least resistanc
24182 e which my poor friend had declared to be the starting-point of every investigat
24184 I confess that I made little progress.
24185 In the evening I strolled across the Park, and found myself about six o'clock
24186 at the Oxford Street end of Park Lane.
24187 A group of loafers upon the pavements, all staring up at a particular window,
24188 directed me to the house which I had come to see.
24189 A tall, thin man with coloured glasses, whom I strongly suspected of being
24190 a plain-clothes detective, was pointing out some theory of his own, while
24191 the others crowded round to listen to what he said.
24192 I got as near him as I could, but his observations seemed to me to be absurd,
24193 so I withdrew again in some disgust.
24194 As I did so I struck against an elderly, deformed man, who had been behind
24195 me, and I knocked down several books which he was carrying.
24203 \begin_layout Standard
24204 \begin_inset Note Greyedout
24207 \begin_layout Plain Layout
24212 The values you set with
24218 will be used for all following multiple columns until you change them again.
24226 \begin_layout Standard
24230 \begin_layout Plain Layout
24242 \begin_inset Note Note
24245 \begin_layout Plain Layout
24246 go back to the default
24254 \begin_layout Standard
24255 \begin_inset Newpage newpage
24261 \begin_layout Subsubsection
24265 \begin_layout Standard
24266 A column break can be forced by inserting the command
24272 as TeX-Code to that position in the text where the column should be broken.
24273 Note that this leads in most cases to whitespace in the text.
24274 \begin_inset Newline newline
24277 Here is an example:
24280 \begin_layout Standard
24281 \begin_inset Flex Multiple Columns
24284 \begin_layout Plain Layout
24287 \begin_inset Quotes eld
24290 You're surprised to see me, sir,
24291 \begin_inset Quotes erd
24294 said he, in a strange, croaking voice.
24297 \begin_layout Plain Layout
24300 I acknowledged that I was.
24303 \begin_layout Plain Layout
24306 \begin_inset Quotes eld
24309 Well, I've a conscience, sir, and when I chanced to see you go into this
24310 house, as I came hobbling after you, I thought to myself, I'll just step
24311 in and see that kind gentleman, and tell him that if I was a bit gruff
24312 in my manner there was not any harm meant, and that I am much obliged to
24313 him for picking up my books.
24314 \begin_inset Quotes erd
24320 \begin_layout Plain Layout
24323 \begin_inset Quotes eld
24326 You make too much of a trifle,
24327 \begin_inset Quotes erd
24332 \begin_inset Quotes eld
24335 May I ask how you knew who I was?
24336 \begin_inset Quotes erd
24339 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24343 \begin_layout Plain Layout
24355 \begin_layout Plain Layout
24358 \begin_inset Quotes eld
24361 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24362 you'll find my little bookshop at the corner of Church Street, and very
24363 happy to see you, I am sure.
24364 Maybe you collect yourself, sir.
24368 \begin_inset space ~
24381 --a bargain, every one of them.
24382 With five volumes you could just fill that gap on that second shelf.
24383 It looks untidy, does it not, sir?
24384 \begin_inset Quotes erd
24395 \begin_layout Subsubsection
24399 \begin_layout Standard
24400 The width of the columns is automatically calculated, but you can modify
24401 the space between the columns.
24402 This is done by changing the length
24409 Its predefined value is 10
24410 \begin_inset space \thinspace{}
24414 Here is an example where
24421 \begin_inset space \thinspace{}
24427 \begin_layout Standard
24431 \begin_layout Plain Layout
24445 \begin_layout Standard
24446 \begin_inset Flex Multiple Columns
24449 \begin_layout Plain Layout
24452 My observations of No.
24453 \begin_inset space \space{}
24456 427 Park Lane did little to clear up the problem in which I was interested.
24457 The house was separated from the street by a low wall and railing, the
24458 whole not more than five feet high.
24459 It was perfectly easy, therefore, for anyone to get into the garden, but
24460 the window was entirely inaccessible, since there was no water pipe or
24461 anything which could help the most active man to climb it.
24462 More puzzled than ever, I retraced my steps to Kensington.
24463 I had not been in my study five minutes when the maid entered to say that
24464 a person desired to see me.
24465 To my astonishment it was none other than my strange old book collector,
24466 his sharp, wizened face peering out from a frame of white hair, and his
24467 precious volumes, a dozen of them at least, wedged under his right arm.
24475 \begin_layout Standard
24479 \begin_layout Plain Layout
24491 \begin_inset Note Note
24494 \begin_layout Plain Layout
24495 go back to the default
24503 \begin_layout Subsubsection
24507 \begin_layout Standard
24508 Between the columns a rule with a width of the length
24515 If this rule width is set to 0
24516 \begin_inset space \thinspace{}
24519 pt (this is the default), the rule is suppressed.
24520 In the following example the rule is 2
24521 \begin_inset space \thinspace{}
24527 \begin_layout Standard
24531 \begin_layout Plain Layout
24537 columnseprule}{2pt}
24545 \begin_layout Standard
24546 \begin_inset Flex Multiple Columns
24549 \begin_layout Plain Layout
24552 \begin_inset Quotes eld
24555 You're surprised to see me, sir,
24556 \begin_inset Quotes erd
24559 said he, in a strange, croaking voice.
24562 \begin_layout Plain Layout
24565 I acknowledged that I was.
24568 \begin_layout Plain Layout
24571 \begin_inset Quotes eld
24574 Well, I've a conscience, sir, and when I chanced to see you go into this
24575 house, as I came hobbling after you, I thought to myself, I'll just step
24576 in and see that kind gentleman, and tell him that if I was a bit gruff
24577 in my manner there was not any harm meant, and that I am much obliged to
24578 him for picking up my books.
24579 \begin_inset Quotes erd
24585 \begin_layout Plain Layout
24588 \begin_inset Quotes eld
24591 You make too much of a trifle,
24592 \begin_inset Quotes erd
24597 \begin_inset Quotes eld
24600 May I ask how you knew who I was?
24601 \begin_inset Quotes erd
24607 \begin_layout Plain Layout
24610 \begin_inset Quotes eld
24613 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24614 you'll find my little bookshop at the corner of Church Street, and very
24615 happy to see you, I am sure.
24616 Maybe you collect yourself, sir.
24620 \begin_inset space ~
24633 --a bargain, every one of them.
24634 With five volumes you could just fill that gap on that second shelf.
24635 It looks untidy, does it not, sir?
24636 \begin_inset Quotes erd
24647 \begin_layout Standard
24648 \begin_inset VSpace defskip
24654 \begin_layout Standard
24655 The rule can be colored by redefining the command
24662 This is done by inserting the command
24663 \begin_inset Newline newline
24672 columnseprulecolor}{
24677 \begin_inset Newline newline
24680 as TeX-Code before the multicolumn inset.
24685 in this command by a color of your choice.
24686 You can use all pre- and self-defined colors.
24694 \begin_inset space ~
24699 for more information about pre- and self-defined colors.
24700 To go back to the default color insert the command
24701 \begin_inset Newline newline
24710 columnseprulecolor}{
24715 \begin_inset Newline newline
24718 Here is the example with a cyan rule and 1
24719 \begin_inset space \thinspace{}
24722 cm column separation:
24725 \begin_layout Standard
24729 \begin_layout Plain Layout
24738 \begin_layout Plain Layout
24744 columnseprulecolor}{
24754 \begin_layout Standard
24755 \begin_inset Flex Multiple Columns
24758 \begin_layout Plain Layout
24761 \begin_inset Quotes eld
24764 You're surprised to see me, sir,
24765 \begin_inset Quotes erd
24768 said he, in a strange, croaking voice.
24771 \begin_layout Plain Layout
24774 I acknowledged that I was.
24777 \begin_layout Plain Layout
24780 \begin_inset Quotes eld
24783 Well, I've a conscience, sir, and when I chanced to see you go into this
24784 house, as I came hobbling after you, I thought to myself, I'll just step
24785 in and see that kind gentleman, and tell him that if I was a bit gruff
24786 in my manner there was not any harm meant, and that I am much obliged to
24787 him for picking up my books.
24788 \begin_inset Quotes erd
24794 \begin_layout Plain Layout
24797 \begin_inset Quotes eld
24800 You make too much of a trifle,
24801 \begin_inset Quotes erd
24806 \begin_inset Quotes eld
24809 May I ask how you knew who I was?
24810 \begin_inset Quotes erd
24816 \begin_layout Plain Layout
24819 \begin_inset Quotes eld
24822 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24823 you'll find my little bookshop at the corner of Church Street, and very
24824 happy to see you, I am sure.
24825 Maybe you collect yourself, sir.
24829 \begin_inset space ~
24842 --a bargain, every one of them.
24843 With five volumes you could just fill that gap on that second shelf.
24844 It looks untidy, does it not, sir?
24845 \begin_inset Quotes erd
24856 \begin_layout Standard
24860 \begin_layout Plain Layout
24866 columnseprule}{0pt}
24869 \begin_layout Plain Layout
24875 columnseprulecolor}{
24883 \begin_inset Note Note
24886 \begin_layout Plain Layout
24887 go back to the default
24895 \begin_layout Section
24896 Non-standard Paragraph Shapes
24899 \begin_layout Standard
24901 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24902 For special cases like for example posters, invitation cards or poems you
24903 can modify the paragraph shape to one of your choice.
24904 This can be done by using the LaTeX-package
24908 which is loaded by using in the document settings the module
24910 Custom paragraph shapes
24915 \begin_layout Subsection
24919 \begin_layout Standard
24924 provides the following shapes:
24927 \begin_layout Standard
24928 \begin_inset Tabular
24929 <lyxtabular version="3" rows="13" columns="3">
24930 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24931 <column alignment="center" valignment="middle" width="16col%">
24932 <column alignment="center" valignment="middle" width="40col%">
24933 <column alignment="center" valignment="middle" width="35col%">
24934 <row endhead="true">
24935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24938 \begin_layout Plain Layout
24944 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24947 \begin_layout Plain Layout
24953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24956 \begin_layout Plain Layout
24964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24967 \begin_layout Plain Layout
24973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24976 \begin_layout Plain Layout
24977 Circle with circular hole (in the size of a CD/DVD)
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24985 \begin_layout Plain Layout
24986 Cannot be scaled, take care there is not too much text
24993 <cell alignment="center" valignment="top" topline="true" usebox="none">
24996 \begin_layout Plain Layout
25002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25005 \begin_layout Plain Layout
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25014 \begin_layout Plain Layout
25015 Fragile, calculation might fail
25022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25025 \begin_layout Plain Layout
25031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25034 \begin_layout Plain Layout
25035 Rhomboid (symbolizing a
25036 \begin_inset Quotes eld
25040 \begin_inset Quotes erd
25048 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25051 \begin_layout Plain Layout
25059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25062 \begin_layout Plain Layout
25068 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25071 \begin_layout Plain Layout
25077 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25080 \begin_layout Plain Layout
25088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25091 \begin_layout Plain Layout
25097 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25100 \begin_layout Plain Layout
25106 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25109 \begin_layout Plain Layout
25117 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25120 \begin_layout Plain Layout
25126 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25129 \begin_layout Plain Layout
25130 Nut for bolt (hexagon with circular hole)
25135 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25138 \begin_layout Plain Layout
25146 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25158 \begin_layout Plain Layout
25164 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25167 \begin_layout Plain Layout
25175 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25178 \begin_layout Plain Layout
25184 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25187 \begin_layout Plain Layout
25193 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25196 \begin_layout Plain Layout
25204 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25207 \begin_layout Plain Layout
25213 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25216 \begin_layout Plain Layout
25222 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25225 \begin_layout Plain Layout
25233 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25236 \begin_layout Plain Layout
25242 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25245 \begin_layout Plain Layout
25246 Normal/reversed rain drop
25251 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25254 \begin_layout Plain Layout
25255 Fragile, calculation might fail
25262 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25265 \begin_layout Plain Layout
25271 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25274 \begin_layout Plain Layout
25280 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25283 \begin_layout Plain Layout
25291 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25294 \begin_layout Plain Layout
25296 \begin_inset Newline newline
25304 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25307 \begin_layout Plain Layout
25308 Triangles in different orientations
25313 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25316 \begin_layout Plain Layout
25330 \begin_layout Standard
25331 To use a shape for your paragraph, simply select it in LyX's pull-down box
25332 for environments in the toolbar.
25335 \begin_layout Standard
25336 \begin_inset Newpage newpage
25342 \begin_layout Standard
25343 Here is an example paragraph in the shape of a nut:
25346 \begin_layout Standard
25347 \begin_inset VSpace bigskip
25356 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25357 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25359 At vero eos et accusam et justo duo dolores et ea rebum.
25360 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25362 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25363 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25367 \begin_layout Standard
25368 \begin_inset VSpace bigskip
25374 \begin_layout Standard
25375 \begin_inset Note Greyedout
25378 \begin_layout Plain Layout
25383 : shapepar paragraphs cannot run over a page break.
25391 \begin_layout Standard
25392 \begin_inset VSpace bigskip
25398 \begin_layout Standard
25403 takes care that the shape will always be preserved, no matter how much
25404 text is in the paragraph.
25405 Therefore the paragraph size changes with the amount of contained text.
25406 This can lead to paragraph sizes exceeding the page margins.
25407 To demonstrate the size scaling, here is the same example paragraph but
25408 with twice as much text:
25411 \begin_layout Standard
25412 \begin_inset Newpage newpage
25421 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25422 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25424 At vero eos et accusam et justo duo dolores et ea rebum.
25425 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25427 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25428 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25430 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25431 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25433 At vero eos et accusam et justo duo dolores et ea rebum.
25434 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25436 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25437 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25441 \begin_layout Standard
25442 \begin_inset VSpace bigskip
25448 \begin_layout Standard
25449 An exception is the shape
25454 It cannot be scaled because it must fit the size of a CD/DVD.
25455 Therefore the amount of text that fits into the shape is limited.
25456 \begin_inset Newline newline
25467 shape are fragile, meaning that the calculation of their size can fail,
25468 depending on the amount of text.
25469 You will then get the LaTeX error
25470 \begin_inset Quotes eld
25473 Arithmetic overflow
25474 \begin_inset Quotes erd
25478 In this case one can try to remove or add some text; if nothing works one
25479 has to use another shape.
25482 \begin_layout Standard
25483 \begin_inset VSpace bigskip
25489 \begin_layout Standard
25490 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25491 fails for text in the tips.
25492 Therefore it is often necessary to add hyphenation points
25497 arg "specialchar-insert hyphenation"
25502 ) to the corresponding text parts.
25505 \begin_layout Standard
25506 \begin_inset VSpace bigskip
25512 \begin_layout Standard
25513 Shapepar paragraphs are either always centered or placed on the page so
25514 that their left border touches the left page margin.
25515 You can therefore not use the paragraph dialog to align such paragraphs.
25516 A solution is to put the paragraph into a minipage or parbox and align
25518 The problem is hereby to find the right width for the box.
25519 Because if it is too wide and you center the box, the paragraph is not
25520 centered too because it sticks at the left side of the box.
25521 So you might have to play a bit with the width until it fits.
25522 Here are two heart-shaped paragraphs, the first one is not aligned, the
25523 second one is right-aligned:
25526 \begin_layout Standard
25527 \begin_inset Newpage newpage
25533 \begin_layout Heart
25538 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25539 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25541 At vero eos et accusam et justo duo dolores et ea rebum.
25542 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25546 \begin_layout Standard
25547 \begin_inset VSpace bigskip
25553 \begin_layout Standard
25556 \begin_inset Box Frameless
25566 height_special "totalheight"
25569 \begin_layout Heart
25574 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25575 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25577 At vero eos et accusam et justo duo dolores et ea rebum.
25578 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25587 \begin_layout Subsection
25591 \begin_layout Standard
25592 You can define any shape you want.
25593 Doing this manually is a lot of work because every coordinate must be specified.
25594 But there is a way to let the computer calculate the coordinates:
25597 \begin_layout Enumerate
25598 Install the program
25599 \begin_inset CommandInset href
25602 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25609 \begin_layout Enumerate
25620 \begin_layout Plain Layout
25631 \begin_layout Plain Layout
25638 eX\SpecialChar \menuseparator
25639 Settings\SpecialChar \menuseparator
25642 and select the font size you are using in your document.
25643 For example this document uses the size 12
25644 \begin_inset space \thinspace{}
25650 \begin_layout Enumerate
25654 \begin_layout Enumerate
25661 \begin_layout Plain Layout
25672 \begin_layout Plain Layout
25679 eX\SpecialChar \menuseparator
25682 to export the shape to coordinates.
25683 In the appearing dialog use either the outline of your shape for the coordinate
25684 s or the path itself.
25688 \begin_layout Plain Layout
25689 For more information see
25690 \begin_inset CommandInset href
25692 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25704 \begin_layout Standard
25705 The coordinates are written into a TeX-file.
25706 To use it for your LyX document
25709 \begin_layout Enumerate
25710 Place the cursor before the first character of your paragraph (or into a
25714 \begin_layout Enumerate
25715 Open in LyX the menu
25717 Insert\SpecialChar \menuseparator
25718 File\SpecialChar \menuseparator
25720 \begin_inset space ~
25725 , select the file and use
25734 \begin_layout Standard
25735 \begin_inset VSpace defskip
25741 \begin_layout Standard
25742 \begin_inset Note Greyedout
25745 \begin_layout Plain Layout
25750 : The changed shape only applies to the current paragraph; everything is
25751 reset to normal for the next paragraph.
25752 Therefore the shape definition file must be input into every paragraph
25753 with the desired shape.
25761 \begin_layout Standard
25762 \begin_inset VSpace bigskip
25768 \begin_layout Standard
25769 Here is an example:
25772 \begin_layout Standard
25773 \begin_inset VSpace bigskip
25779 \begin_layout Standard
25780 \begin_inset CommandInset include
25782 filename "SpecialParagraphShape.tex"
25788 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25789 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25791 At vero eos et accusam et justo duo dolores et ea rebum.
25792 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25794 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25795 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25799 \begin_layout Standard
25800 \begin_inset VSpace bigskip
25806 \begin_layout Standard
25811 to draw complexer shapes in
25815 you can draw the shape in a program of your choice and import the resulting
25821 Then you only need to draw a line or spline along the outline of the image.
25824 \begin_layout Standard
25825 \begin_inset VSpace bigskip
25831 \begin_layout Standard
25834 Custom paragraph shapes
25836 also provides the two commands
25844 which can be used to define custom shapes coordinate by coordinate.
25848 \begin_layout Plain Layout
25849 These commands are internally used for all shapes described here.
25854 For information how these styles are used and about further customization
25855 possibilities, have a look at the documentation of the package
25860 \begin_inset CommandInset citation
25869 \begin_layout Bibliography
25870 \begin_inset CommandInset bibitem
25871 LatexCommand bibitem
25876 Documentation of the LaTeX-package
25877 \begin_inset CommandInset href
25880 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25887 \begin_layout Bibliography
25888 \begin_inset CommandInset bibitem
25889 LatexCommand bibitem
25894 Documentation of the LaTeX-package
25895 \begin_inset CommandInset href
25898 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"