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 -1762856967 "Benjamin Piwowarski"
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
5256 on Windows (but any working path can be used).
5261 configure this manually in order for the server to start.
5264 \begin_layout Standard
5266 \begin_inset Flex Code
5269 \begin_layout Plain Layout
5276 \begin_inset Flex Code
5279 \begin_layout Plain Layout
5285 ' to create the pipes.
5286 If one of the pipes already exists, LyX will assume that another LyX process
5287 is already running and will not start the server.
5288 On POSIX (Unix like) systems, if for some other reason, an unused
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 pipe is left in existence when LyX closes, then LyX will try to delete
5298 If this fails for some reason, you will need to delete the pipes manually
5299 and then restart LyX.
5300 On Windows, pipes are deleted by the OS on program termination or crash,
5302 \begin_inset Quotes eld
5306 \begin_inset Quotes erd
5309 pipes should not be possible.
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314 use different configurations, perhaps by using separate user directories,
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 file, for each process.
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330 debugging information from the LyX server.
5331 Do this by starting LyX as
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5359 \begin_layout Standard
5360 Another useful tool is the command-line based clientfound in
5361 \begin_inset Flex Code
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5373 \begin_layout Section
5374 Normal communication
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5380 This line has the following format:
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399 Its only use is that LyX will echo it if it sends an answer—so a client
5400 can dispatch results from different requesters.
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405 It is the same as the commands you'd use in the minibuffer.
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 LFUN will insert the argument as text at the cursor position).
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5439 \begin_layout Standard
5448 are just echoed from the command request, while
5452 is more or less useful information filled according to how the command
5453 execution worked out.
5454 Some commands, such as
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 , will return information about the internal state of LyX, while other will
5463 return an empty data-response.
5464 This means that the command execution went fine.
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5485 \begin_layout Standard
5490 should contain an explanation of why the command failed.
5493 \begin_layout Standard
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5511 \change_inserted -1762856967 1393941760
5515 \begin_layout Subsection
5517 \change_inserted -1762856967 1393941776
5518 AppleScript (Mac OS X)
5521 \begin_layout Standard
5523 \change_inserted -1762856967 1393941776
5524 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5525 communication through the command run.
5526 This command takes a direct argument (the
5530 to perform) and an optional argument.
5531 It either returns the output of the function or triggers an error with
5532 the error message and code.
5535 \begin_layout Standard
5537 \change_inserted -1762856967 1393941776
5541 \begin_layout LyX-Code
5543 \change_inserted -1762856967 1393941776
5544 tell application "LyX"
5547 \begin_layout LyX-Code
5549 \change_inserted -1762856967 1393941776
5553 \begin_layout LyX-Code
5555 \change_inserted -1762856967 1393941776
5556 -- Stores the current file name into f
5559 \begin_layout LyX-Code
5561 \change_inserted -1762856967 1393941776
5562 set f to (run "server-get-filename" with argument "")
5565 \begin_layout LyX-Code
5567 \change_inserted -1762856967 1393941776
5568 on error the error_message number the error_number
5571 \begin_layout LyX-Code
5573 \change_inserted -1762856967 1393941776
5574 display dialog "Error: " & the error_number & ".
5578 \begin_layout LyX-Code
5580 \change_inserted -1762856967 1393941776
5581 & the error_message buttons {"OK"} default button 1
5584 \begin_layout LyX-Code
5586 \change_inserted -1762856967 1393941776
5590 \begin_layout LyX-Code
5592 \change_inserted -1762856967 1393941776
5598 \begin_layout Section
5602 \begin_layout Standard
5603 LyX can notify clients of events going on asynchronously.
5604 Currently it will only do this if the user binds a key sequence with the
5606 \begin_inset Quotes eld
5610 \begin_inset Quotes erd
5614 The format of the string LyX sends is as follows:
5618 \begin_inset Flex Code
5621 \begin_layout Plain Layout
5632 \begin_layout Standard
5637 is the printed representation of the key sequence that was actually typed
5641 \begin_layout Standard
5642 This mechanism can be used to extend LyX's command set and implement macros.
5643 Bind some key sequence to
5644 \begin_inset Quotes eld
5648 \begin_inset Quotes erd
5652 Then start a client that listens on the output pipe, dispatches the command
5653 according to the sequence, and starts a function that may use LyX calls
5654 and LyX requests to issue a command or a series of commands to LyX.
5657 \begin_layout Section
5658 The simple LyX Server Protocol
5661 \begin_layout Standard
5662 LyX implements a simple protocol that can be used for session management.
5663 All messages are of the form
5676 \begin_layout Standard
5682 \begin_inset Quotes eld
5686 \begin_inset Quotes erd
5690 \begin_inset Quotes eld
5694 \begin_inset Quotes erd
5699 \begin_inset Quotes eld
5703 \begin_inset Quotes erd
5706 is received from a client, LyX will report back to inform the client that
5707 it's listening to it's messages, while
5708 \begin_inset Quotes eld
5712 \begin_inset Quotes erd
5715 sent from LyX will inform clients that LyX is closing.
5718 \begin_layout Section
5719 Reverse DVI/PDF search
5722 \begin_layout Standard
5723 Some DVI/PDF viewers
5727 \begin_layout Plain Layout
5728 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5729 Skim on Mac OSX and SumatraPDF on Windows.
5738 facility (also called
5743 This means that you can tell LyX to put the cursor to a specific line in
5744 the document by clicking at the respective position in the DVI/PDF output.
5745 To achieve this, the viewer must be able to communicate with LyX.
5746 This is done via the LyX server either by using the named pipe (
5750 ), or the UNIX domain socket (
5754 ) that LyX creates in its temporary directory (this is the way the
5755 \begin_inset Flex Code
5758 \begin_layout Plain Layout
5764 program communicates with LyX).
5765 In some cases, you need a helper script that mediates between the viewer
5766 and LyX, in others, the viewer can communicate with LyX directly.
5767 This depends on the selected viewer and on your operating system.
5768 The same applies to the way viewers need to be configured and the way the
5769 reverse search is actually performed.
5770 In what follows, we will thus describe how to setup reverse search for
5772 Before we turn to this, though, we will explain what needs to be done generally
5773 to enable reverse search in the DVI/PDF output.
5776 \begin_layout Subsection
5778 \begin_inset CommandInset label
5780 name "sub:rev-search"
5787 \begin_layout Standard
5788 In most cases LyX will do the work for you by enabling the option
5789 \begin_inset Flex MenuItem
5792 \begin_layout Plain Layout
5793 Synchronize with Output
5799 \begin_inset Flex MenuItem
5802 \begin_layout Plain Layout
5803 Document\SpecialChar \menuseparator
5804 Settings\SpecialChar \menuseparator
5811 In such a case LyX will automatically insert the necessary SyncTeX macro
5812 (for PDF) or load the srcltx package (for DVI) respectively.
5813 This option can be easily reached also on
5814 \begin_inset Flex Code
5817 \begin_layout Plain Layout
5826 \begin_layout Standard
5827 If you need a different setting, you can select or input a custom macro
5828 from the drop down box just below
5829 \begin_inset Flex MenuItem
5832 \begin_layout Plain Layout
5833 Document\SpecialChar \menuseparator
5834 Settings\SpecialChar \menuseparator
5835 Output\SpecialChar \menuseparator
5836 Synchronize with Output
5844 \begin_layout Standard
5845 Note that the method
5846 \begin_inset Flex Code
5849 \begin_layout Plain Layout
5857 enables gzip compression.
5858 If your viewer does not support it, you should instead use
5859 \begin_inset Flex Code
5862 \begin_layout Plain Layout
5873 \begin_layout Standard
5874 Please aöso note that including the
5875 \begin_inset Flex Code
5878 \begin_layout Plain Layout
5885 \begin_inset Flex Code
5888 \begin_layout Plain Layout
5894 sometimes has an undesired impact on the typesetting.
5895 Thus, you should switch output synchronization off for the final typesetting
5897 \begin_inset Flex Code
5900 \begin_layout Plain Layout
5907 \begin_inset Flex Code
5910 \begin_layout Plain Layout
5920 \begin_layout Standard
5921 In case you need some more special settings that are not covered by the
5922 automatic settings, read the next section about how to set up output synchroniz
5924 If the automatic setup suits your needs, you can readily jump to section
5925 \begin_inset space ~
5929 \begin_inset CommandInset ref
5931 reference "sub:configuring-viewers"
5935 , where the necessary configuration steps in your viewer -- needed both
5936 with the automatic and the manual setup -- are described.
5939 \begin_layout Subsection
5943 \begin_layout Standard
5944 LaTeX provides several different methods for reverse search.
5945 Some are built-in in the
5946 \begin_inset Flex Code
5949 \begin_layout Plain Layout
5955 program, some are provided by external packages.
5956 Your choice depends on whether your LaTeX distribution already provides
5957 a given method (the built-in methods are rather new) and whether your viewer
5959 The available methods are described in the following.
5962 \begin_layout Subsubsection*
5963 Built-in DVI-search via src-specials (DVI only)
5966 \begin_layout Standard
5967 This method provides the DVI file with the necessary information for reverse
5969 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5970 distribution should include it), and it works reliably.
5971 To enable it, change the
5972 \begin_inset Flex MenuItem
5975 \begin_layout Plain Layout
5980 \begin_layout Plain Layout
5993 \begin_inset Flex MenuItem
5996 \begin_layout Plain Layout
6001 \begin_layout Plain Layout
6008 eX (plain)->DraftDVI
6014 \begin_inset Flex MenuItem
6017 \begin_layout Plain Layout
6018 Preferences\SpecialChar \menuseparator
6019 File Handling\SpecialChar \menuseparator
6026 \begin_inset Flex Code
6029 \begin_layout Plain Layout
6030 latex -src-specials $$i
6036 If this doesn't work, check if your TeX engine needs different options
6037 (the syntax might differ in some distributions).
6040 \begin_layout Subsubsection*
6041 External Packages (PDFSync and scrltx)
6044 \begin_layout Standard
6053 provide reverse search facility for PDF output (via pdflatex) and DVI output,
6055 In order to enable it, load the packages in the LyX preamble:
6058 \begin_layout Itemize
6059 \begin_inset Flex Code
6062 \begin_layout Plain Layout
6070 for reverse PDF search,
6073 \begin_layout Itemize
6074 \begin_inset Flex Code
6077 \begin_layout Plain Layout
6080 usepackage[active]{srcltx}
6085 for reverse DVI search.
6088 \begin_layout Standard
6089 If you want to be able to perform both DVI and PDF reverse searches, you
6090 can also insert in the preamble the following lines
6093 \begin_layout LyX-Code
6097 \begin_inset Newline newline
6103 \begin_inset Newline newline
6109 \begin_inset Newline newline
6115 \begin_inset Newline newline
6120 usepackage[active]{srcltx}
6121 \begin_inset Newline newline
6129 \begin_layout Standard
6130 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6131 right package will be used.
6134 \begin_layout Standard
6135 Note that PDFSync might affect the output layout of your document.
6136 It is therefore advised to disable PDFsync for final documents.
6139 \begin_layout Subsubsection*
6140 Built-in reverse search via SyncTeX (DVI and PDF)
6143 \begin_layout Standard
6145 \begin_inset Flex Code
6148 \begin_layout Plain Layout
6154 have built-in support for both PDF and DVI reverse search.
6159 facility is basically the result of the integration of the PDFSync package
6160 to the pdftex program and its merge with the
6165 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6170 \begin_layout Plain Layout
6171 For some reason, MikTeX does not understand/obey the command LyX inserts
6172 into the preamble when you check the "Enable Forward/Reverse Search" button
6173 in the toolbar and does not generate the necessary info.
6176 \begin_layout Plain Layout
6177 The generation of the required info can be forced by changing the converter
6178 "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6179 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6180 the -synctex=1 switch).
6186 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6187 already provide SyncTeX support.
6190 \begin_layout Standard
6191 To enable SyncTeX for DVI output, change the
6192 \begin_inset Flex MenuItem
6195 \begin_layout Plain Layout
6200 \begin_layout Plain Layout
6213 \begin_inset Flex MenuItem
6216 \begin_layout Plain Layout
6221 \begin_layout Plain Layout
6228 eX (plain) -> DraftDVI
6234 \begin_inset Flex MenuItem
6237 \begin_layout Plain Layout
6238 Preferences\SpecialChar \menuseparator
6239 File Handling\SpecialChar \menuseparator
6246 \begin_inset Flex Code
6249 \begin_layout Plain Layout
6250 latex -synctex=1 $$i
6255 , and for PDF output, change the
6256 \begin_inset Flex MenuItem
6259 \begin_layout Plain Layout
6264 \begin_layout Plain Layout
6271 eX (pdflatex) -> PDF (pdflatex)
6277 \begin_inset Flex Code
6280 \begin_layout Plain Layout
6281 pdflatex -synctex=1 $$i
6287 Check the documentation of your viewer whether the viewer needs to be configure
6288 d for the use with SyncTeX.
6292 \begin_layout Plain Layout
6293 Note that the option
6294 \begin_inset Flex Code
6297 \begin_layout Plain Layout
6303 option enables gzip compression.
6304 If your viewer does not support it, you should instead use
6305 \begin_inset Flex Code
6308 \begin_layout Plain Layout
6322 \begin_layout Subsection
6323 Configuring and using specific viewers
6324 \begin_inset CommandInset label
6326 name "sub:configuring-viewers"
6333 \begin_layout Subsubsection*
6334 Xdvi (all platforms)
6337 \begin_layout Standard
6339 \begin_inset Flex Code
6342 \begin_layout Plain Layout
6348 , you don't need to do anything else for performing a reverse DVI search,
6349 as LyX already provides the necessary hooks for automatically using the
6351 \begin_inset Flex Code
6354 \begin_layout Plain Layout
6361 Just setup your document as described above (reverse search is triggered
6362 by Ctrl-click or Alt-click on Mac OSX, respectively).
6365 \begin_layout Standard
6366 However, if for whatever reason you want to use the named pipe instead of
6367 the socket for communicating with LyX, simply change the DVI viewer in
6369 \begin_inset Flex MenuItem
6372 \begin_layout Plain Layout
6373 Preferences\SpecialChar \menuseparator
6374 File Handling\SpecialChar \menuseparator
6384 \begin_layout Plain Layout
6385 On Mac OSX you have to use
6386 \begin_inset Flex Code
6389 \begin_layout Plain Layout
6390 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6401 \begin_inset Flex Code
6404 \begin_layout Plain Layout
6405 xdvi -editor "lyxeditor.sh %f %l"
6411 \begin_inset Flex Code
6414 \begin_layout Plain Layout
6420 is a suitable script.
6421 For example, a minimal shell script is the following one:
6424 \begin_layout LyX-Code
6426 \begin_inset Newline newline
6429 LYXPIPE="/path/to/lyxpipe"
6430 \begin_inset Newline newline
6433 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6434 \begin_inset Newline newline
6437 echo "$COMMAND" > "${LYXPIPE}".in || exit
6438 \begin_inset Newline newline
6441 read TMP < "${LYXPIPE}".out || exit
6444 \begin_layout Standard
6446 \begin_inset Flex Code
6449 \begin_layout Plain Layout
6459 \begin_layout Plain Layout
6466 XServer pipe path specified in
6467 \begin_inset Flex MenuItem
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6481 \begin_layout Plain Layout
6483 \begin_inset Flex Code
6486 \begin_layout Plain Layout
6492 folder of a source distribution you can find a
6493 \begin_inset Flex Code
6496 \begin_layout Plain Layout
6502 script which is able to locate the
6506 based on your preferences.
6514 \begin_layout Subsubsection*
6518 \begin_layout Standard
6520 \begin_inset Flex Code
6523 \begin_layout Plain Layout
6524 /Applications/MacDviX_Folder/calleditor.script
6529 , add the following lines:
6532 \begin_layout LyX-Code
6537 \begin_layout Plain Layout
6544 X.app/Contents/MacOS/lyxeditor "$2" $1
6545 \begin_inset Newline newline
6551 \begin_layout Standard
6552 Modify the lines accordingly if you install LyX somewhere else than in the
6553 Applications folder.
6556 \begin_layout Standard
6557 Reverse search is triggered by Alt-click (OPTION-click).
6560 \begin_layout Subsubsection*
6564 \begin_layout Standard
6566 \begin_inset Flex Code
6569 \begin_layout Plain Layout
6570 open -a Skim.app $$i
6575 to the viewer setting in
6576 \begin_inset Flex MenuItem
6579 \begin_layout Plain Layout
6580 Preferences\SpecialChar \menuseparator
6581 File Handling\SpecialChar \menuseparator
6582 File formats\SpecialChar \menuseparator
6589 \begin_inset Flex MenuItem
6592 \begin_layout Plain Layout
6593 Skim\SpecialChar \menuseparator
6594 Preferences\SpecialChar \menuseparator
6601 \begin_inset Flex MenuItem
6604 \begin_layout Plain Layout
6610 preset and enter command
6611 \begin_inset Flex MenuItem
6614 \begin_layout Plain Layout
6615 /Applications/LyX.app/Contents/MacOS/lyxeditor
6623 \begin_layout Standard
6624 Reverse search is triggered by COMMAND-SHIFT-click
6627 \begin_layout Subsubsection*
6631 \begin_layout Standard
6633 \begin_inset Flex MenuItem
6636 \begin_layout Plain Layout
6637 Settings\SpecialChar \menuseparator
6638 Configure Okular\SpecialChar \ldots{}
6639 \SpecialChar \menuseparator
6646 \begin_inset Quotes eld
6650 \begin_inset Quotes erd
6654 \begin_inset Flex Code
6657 \begin_layout Plain Layout
6666 \begin_layout Standard
6667 Reverse search is triggered by SHIFT-click.
6670 \begin_layout Subsubsection*
6674 \begin_layout Standard
6675 Launch yap, choose its
6676 \begin_inset Flex MenuItem
6679 \begin_layout Plain Layout
6680 View\SpecialChar \menuseparator
6687 \begin_inset Quotes eld
6691 \begin_inset Quotes erd
6696 \begin_inset Quotes eld
6699 New\SpecialChar \ldots{}
6701 \begin_inset Quotes erd
6704 button and, in the window that opens, enter
6705 \begin_inset Quotes eld
6709 \begin_inset Quotes erd
6712 (or any other name you like) in the
6713 \begin_inset Quotes eld
6717 \begin_inset Quotes erd
6721 Now click on the button labeled
6722 \begin_inset Quotes eld
6725 \SpecialChar \ldots{}
6727 \begin_inset Quotes erd
6730 to open a file dialog and navigate to the directory containing the batch
6732 \begin_inset Flex Code
6735 \begin_layout Plain Layout
6743 \begin_inset Flex Code
6746 \begin_layout Plain Layout
6752 and then specify the program arguments as
6753 \begin_inset Flex Code
6756 \begin_layout Plain Layout
6764 \begin_inset Flex Code
6767 \begin_layout Plain Layout
6773 wrapper is used for communicating with LyX through the
6780 \begin_layout LyX-Code
6782 \begin_inset Newline newline
6785 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6794 \begin_inset Newline newline
6808 \begin_layout Standard
6809 Make sure that the LyXServer pipe path you specified in LyX is
6810 \begin_inset Flex Code
6813 \begin_layout Plain Layout
6827 , otherwise change the
6828 \begin_inset Flex Code
6831 \begin_layout Plain Layout
6837 wrapper accordingly.
6840 \begin_layout Standard
6841 In yap, reverse search is triggered by double-click.
6844 \begin_layout Subsubsection*
6845 SumatraPDF (Windows)
6848 \begin_layout Standard
6849 In order to use SumatraPDF for inverse search, enter
6850 \begin_inset Flex Code
6853 \begin_layout Plain Layout
6854 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6859 in the viewer setting in
6860 \begin_inset Flex MenuItem
6863 \begin_layout Plain Layout
6864 Preferences\SpecialChar \menuseparator
6865 File Handling\SpecialChar \menuseparator
6866 File formats\SpecialChar \menuseparator
6873 \begin_inset Flex Code
6876 \begin_layout Plain Layout
6882 is the previous wrapper.
6883 If SumatraPDF.exe is not in your command PATH, use its full file name.
6886 \begin_layout Standard
6887 Reverse search is triggered by double-click.
6890 \begin_layout Subsubsection*
6894 \begin_layout Standard
6895 First of all, make sure that yap is your default DVI viewer in the Windows
6896 environment, then launch it, choose its
6897 \begin_inset Flex MenuItem
6900 \begin_layout Plain Layout
6901 View\SpecialChar \menuseparator
6908 \begin_inset Quotes eld
6912 \begin_inset Quotes erd
6917 \begin_inset Quotes eld
6920 New\SpecialChar \ldots{}
6922 \begin_inset Quotes erd
6925 button and, in the window that opens, enter
6926 \begin_inset Quotes eld
6930 \begin_inset Quotes erd
6933 (or any other name you like) in the
6934 \begin_inset Quotes eld
6938 \begin_inset Quotes erd
6942 Now click on the button labeled
6943 \begin_inset Quotes eld
6946 \SpecialChar \ldots{}
6948 \begin_inset Quotes erd
6951 to open a file dialog and navigate to the directory containing the
6952 \begin_inset Flex Code
6955 \begin_layout Plain Layout
6961 program (which is installed by default on Cygwin along with the LyX executable).
6963 \begin_inset Flex Code
6966 \begin_layout Plain Layout
6972 and then specify the program arguments as
6973 \begin_inset Flex Code
6976 \begin_layout Plain Layout
6983 In this way, you will be using the
6987 for communicating with LyX.
6988 If, for whatever reason, you want to use the
6993 \begin_inset Flex Code
6996 \begin_layout Plain Layout
7002 option and be sure to specify the LyXServer pipe path in the LyX preferences.
7005 \begin_layout Standard
7006 In yap, reverse search is triggered by double-click.
7009 \begin_layout Subsubsection*
7013 \begin_layout Standard
7014 In order to use SumatraPDF for inverse search, enter
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7019 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7024 in the viewer setting in
7025 \begin_inset Flex MenuItem
7028 \begin_layout Plain Layout
7029 Preferences\SpecialChar \menuseparator
7030 File Handling\SpecialChar \menuseparator
7031 File formats\SpecialChar \menuseparator
7038 If SumatraPDF.exe is not in your command PATH, use its full posix path.
7040 \begin_inset Flex Code
7043 \begin_layout Plain Layout
7049 enables communication via the
7055 \begin_inset Flex Code
7058 \begin_layout Plain Layout
7064 option if you want to use the
7068 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7071 \begin_layout Standard
7072 Reverse search is triggered by double-click.
7075 \begin_layout Section
7079 \begin_layout Standard
7080 Forward search is, as the name implies, in a sense the
7081 \begin_inset Quotes eld
7085 \begin_inset Quotes erd
7089 It allows you to let the viewer jump to a given position from within LyX.
7090 If forward search is set up (as described in what follows), you can put
7091 the cursor anywhere in your LyX document, and hit
7092 \begin_inset Flex MenuItem
7095 \begin_layout Plain Layout
7096 Navigate\SpecialChar \menuseparator
7103 \begin_inset Flex MenuItem
7106 \begin_layout Plain Layout
7112 in the context menu via right mouse click), and then the viewer will jump
7113 to that position as well.
7114 This implies, of course, that your viewer supports this function.
7117 \begin_layout Standard
7118 To make forward search possible, you first need to provide the generated
7119 output PDF/DVI file with additional information about the TeX sources.
7120 This can be done via the methods described in the section
7121 \begin_inset CommandInset ref
7123 reference "sub:rev-search"
7130 \begin_layout Standard
7131 Additionally, you need to configure LyX for using your viewers in
7132 \begin_inset Flex MenuItem
7135 \begin_layout Plain Layout
7136 Tools\SpecialChar \menuseparator
7137 Preferences\SpecialChar \menuseparator
7138 Output\SpecialChar \menuseparator
7145 We provide a range of tested configurations for some viewers, which you
7146 can select from the drop down list.
7147 If none of these configurations suits you, you have to find out and enter
7148 a suitable configuration yourself.
7149 The definition syntax uses the following placeholders:
7152 \begin_layout Itemize
7154 \begin_inset Flex Code
7157 \begin_layout Plain Layout
7166 \begin_layout Itemize
7168 \begin_inset Flex Code
7171 \begin_layout Plain Layout
7177 : name of the (temporary) exported .tex file (without path)
7180 \begin_layout Itemize
7182 \begin_inset Flex Code
7185 \begin_layout Plain Layout
7191 : name of the (temporary) exported .tex file (including path)
7194 \begin_layout Itemize
7196 \begin_inset Flex Code
7199 \begin_layout Plain Layout
7205 : name of the exported output file (either dvi or pdf, depending on which
7206 one exists in the temporary directory)
7209 \begin_layout Standard
7210 Note that only some of the viewers provide full forward search functionality,
7211 among them yap, xdvi, okular
7215 \begin_layout Plain Layout
7216 You might want to set
7217 \begin_inset Flex Code
7220 \begin_layout Plain Layout
7227 \begin_inset Flex MenuItem
7230 \begin_layout Plain Layout
7231 Tools\SpecialChar \menuseparator
7232 Preferences\SpecialChar \menuseparator
7233 File Handling\SpecialChar \menuseparator
7235 \begin_inset space ~
7252 \begin_layout Plain Layout
7253 For Sumatra CMCDDE is needed --- downloadable from
7254 \begin_inset CommandInset href
7256 target "http://www.istri.fr/zip/CMCDDE.zip"
7266 While many of the widespread PDF viewers (most notably Adobe Reader) do
7267 not support forward search at all, some other viewers -- e.
7268 \begin_inset space \thinspace{}
7272 evince and xpdf -- allow at least to reload the document and jump to a
7273 specific page of the file, so you can at least navigate
7274 \begin_inset Quotes eld
7278 \begin_inset Quotes erd
7282 This latter functionality is provided by an external call of synctex (see
7283 the predefined example configurations).
7287 \begin_layout Standard
7288 Forward search works both with DVI and PDF output.
7289 LyX simply checks which preview format you have used before (i.
7290 \begin_inset space \thinspace{}
7293 e., which format is already there in the temporary directory) and chooses
7294 the appropriate configuration for the respective format.
7297 \begin_layout Chapter
7298 Special Document Classes
7301 \begin_layout Section
7305 \begin_layout Standard
7311 \begin_layout Subsection
7315 \begin_layout Standard
7316 This section describes how LyX can be used to write articles for submission
7317 to the scientific journal
7319 Astronomy and Astrophysics
7321 (www.edpsciences.fr/aa/
7322 \begin_inset Flex URL
7325 \begin_layout Plain Layout
7327 http://www.edpsciences.fr/aa/
7332 ) using Version 5.01 of the document class
7337 This package can be downloaded from the ftp site
7340 \begin_layout Standard
7341 \begin_inset VSpace medskip
7347 \begin_layout Standard
7349 \begin_inset Flex URL
7352 \begin_layout Plain Layout
7354 ftp://ftp.edpsciences.org/pub/aa/readme.html
7362 \begin_layout Standard
7363 \begin_inset VSpace medskip
7369 \begin_layout Standard
7370 A manual comes together with that package, and this text is not meant to
7371 replace the original manual but is merely a short guide in how to realize
7372 the correct form of your paper.
7376 \begin_layout Standard
7377 Please note that the publisher of the journal was changed from Springer
7378 to EDP Sciences starting January 1, 2001.
7379 That change involved also some slight changes to the style files, namely
7380 the removal of the thesaurus command.
7381 The LyX class aa supports the newest version of these style files, V 5.01.
7382 If you have an older version installed, please upgrade.
7383 For compatibility, the old (version 4) layout has been kept as
7388 Please refer to the comments in
7390 LyXDir/layouts/aapaper.layout
7395 \begin_layout Subsection
7399 \begin_layout Standard
7400 It is recommended you start from the example template distributed with LyX.
7401 If you are not using a template, note the following settings:
7404 \begin_layout Itemize
7411 Document\SpecialChar \menuseparator
7414 dialog (OK, that one was obvious).
7417 \begin_layout Itemize
7418 Don't change the option
7421 \begin_inset space ~
7431 The whole layout is done by the macros, you shouldn't change anything.
7434 \begin_layout Subsection
7438 \begin_layout Standard
7439 First thing to enter is the header information.
7440 It consists of seven entries, of which some are optional.
7444 \begin_layout Itemize
7452 \begin_layout Itemize
7460 \begin_layout Itemize
7468 \begin_layout Itemize
7476 \begin_layout Itemize
7481 : [optional] if more than one author: whom to contact for offprint requests.
7484 \begin_layout Itemize
7489 : [optional] mail address for contacts.
7492 \begin_layout Itemize
7500 Received: <date>; Accepted <date>
7503 \begin_layout Standard
7504 There is no need to issue the
7510 command, this is done automatically by LyX when the header is finished.
7511 Although the order of the single header entries doesn't matter it is advised
7512 to keep the above sequence, just to get the best optics and meets the layout
7513 of the real document.
7516 \begin_layout Standard
7517 If you want to place footnotes in the header block, e.
7518 \begin_inset space \thinspace{}
7522 \begin_inset space \space{}
7525 to state your present address, just use the standard footnote via the menu
7528 Insert\SpecialChar \menuseparator
7532 LyX will automagically use the term
7541 \begin_layout Standard
7542 In addition to these topics, the macros use three additional LaTeX commands
7543 that have no counterpart in LyX:
7546 \begin_layout Itemize
7553 to separate different names for more than one author and institute, respectivel
7557 \begin_layout Itemize
7564 to mark corresponding author/institute pairs.
7565 The institutes are numbered sequentially as they appear in the
7569 field, so you have to put a marker to each author.
7572 \begin_layout Itemize
7579 to supply an email address for fast contact.
7582 \begin_layout Standard
7583 In all cases, the appropriate command has to be entered in LyX and marked
7589 \begin_layout Subsection
7593 \begin_layout Standard
7594 The abstract should immediately follow the header block.
7595 With version 5 the abstract environment was changed to a command, and there
7596 is now a resctriction to only one paragraph.
7597 In addition, it should contain an entry with the keywords.
7598 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7605 by hand and mark it as LaTeX code.
7606 Refer to the example paper.
7609 \begin_layout Subsection
7610 Supported environments
7613 \begin_layout Standard
7614 The A&A paper layout supports the following environments for structuring
7618 \begin_layout Itemize
7624 \begin_layout Itemize
7630 \begin_layout Itemize
7636 \begin_layout Itemize
7642 \begin_layout Itemize
7648 \begin_layout Itemize
7654 \begin_layout Itemize
7660 \begin_layout Itemize
7666 \begin_layout Itemize
7672 \begin_layout Itemize
7678 \begin_layout Itemize
7684 \begin_layout Itemize
7690 \begin_layout Subsection
7691 Commands not supported by LyX
7694 \begin_layout Standard
7695 Some commands are not yet supported by the
7700 Some have already been mentioned.
7701 For the sake of completeness, they are listed all together here:
7704 \begin_layout Itemize
7712 \begin_layout Itemize
7720 \begin_layout Itemize
7728 \begin_layout Itemize
7736 \begin_layout Itemize
7744 \begin_layout Itemize
7752 \begin_layout Itemize
7760 \begin_layout Itemize
7768 \begin_layout Standard
7769 If you want to use any of these commands, you have to enter them yourself.
7772 Do not forget to mark them as LaTeX code!
7775 \begin_layout Subsection
7776 Figure and Table Floats
7779 \begin_layout Standard
7780 LyX provides support for the necessary float environments
7782 figure, figure*, table
7788 , therefore we won't tell much about it here.
7792 \begin_inset space ~
7798 Just remember that tables should be left-aligned.
7799 For that, select the table and change the alignment in
7801 Edit\SpecialChar \menuseparator
7803 \begin_inset space ~
7809 \begin_layout Standard
7810 There is only one special thing: the figures with caption besides the figure.
7811 To create such a figure, you have to do the following:
7814 \begin_layout Enumerate
7815 Create a wide figure float:
7817 Insert\SpecialChar \menuseparator
7818 Float\SpecialChar \menuseparator
7821 , then right click in the figure and select
7827 \begin_inset space ~
7835 \begin_layout Enumerate
7836 Enter your caption text.
7839 \begin_layout Enumerate
7844 to move the cursor above the caption.
7847 \begin_layout Enumerate
7851 \begin_layout Enumerate
7852 Position the cursor behind the figure and insert a horizontal fill:
7854 Insert\SpecialChar \menuseparator
7856 \begin_inset space ~
7859 Character\SpecialChar \menuseparator
7861 \begin_inset space ~
7869 \begin_layout Enumerate
7870 Switch to LaTeX mode:
7873 \begin_inset space ~
7881 \begin_layout Enumerate
7891 Do not close the brace!
7894 \begin_layout Enumerate
7895 Position the cursor behind the caption text, switch to LaTeX mode and insert
7899 \begin_inset space ~
7911 \begin_layout Standard
7912 Also, refer to the figures in the example paper.
7915 \begin_layout Subsection
7919 \begin_layout Standard
7920 For submission, the paper has to be formated in a special double-spacing
7922 For this purpose, you have to give the option
7926 to the documentclass.
7927 This must be done using the extra class options field in the
7929 Document\SpecialChar \menuseparator
7933 Just enter the string
7940 \begin_layout Subsection
7944 \begin_layout Standard
7949 directory contains an example paper written with LyX.
7950 It is the example paper from the original macro package, translated to
7952 Use it for inspiration, and compare the original LaTeX code with LyX way
7956 \begin_layout Section
7960 \begin_layout Standard
7966 \begin_layout Subsection
7970 \begin_layout Standard
7971 AASTeX is a set of macros produced by the American Astronomical Society
7972 to facilitate electronic manuscript submission to the three journals they
7973 publish: the Astrophysical Journal (including the Letters and Supplement),
7974 the Astronomical Journal, and the Publications of the Astronomical Society
7976 LyX has proven to be an excellent tool for generating these documents,
7977 especially given its equation, citation, and figure handling capabilities.
7978 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7979 is the version described here, or higher.
7980 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7981 incompatible with LyX.
7982 The AASTeX package may be downloaded from the AASTeX Web site
7985 \begin_layout Standard
7986 \begin_inset VSpace medskip
7992 \begin_layout Standard
7994 \begin_inset Flex URL
7997 \begin_layout Plain Layout
7999 http://www.journals.uchicago.edu/AAS/AASTeX
8007 \begin_layout Standard
8008 \begin_inset VSpace medskip
8014 \begin_layout Standard
8015 A complete user guide is contained in that package and you should familiarize
8016 yourself with it thoroughly before embarking on writing a paper in LyX.
8017 LyX will not reduce the need to figure out all the AASTeX commands, it
8018 will only reduce the drudgery of typing everything in.
8019 It is your responsibility to ensure that the final exported LaTeX document
8020 conforms completely to the requirements of the journal to which you are
8021 submitting your paper.
8024 \begin_layout Subsection
8025 Starting a New Paper
8028 \begin_layout Standard
8029 I strongly suggest that you start with the AASTeX template file.
8032 File\SpecialChar \menuseparator
8039 , enter the new file name, then choose the
8044 This will show the most common fields found in a manuscript.
8045 Simply overwrite the existing text (including the brackets,
8049 ) with the correct information.
8050 Many of the AASTeX commands and environments can be implemented directly
8051 in LyX, but some cannot: most noticeably
8063 , which should stick out like a sore thumb if you actually just opened the
8065 For commands such as these, the LaTeX code must be entered directly and
8067 Such commands are referred to as TeX code, or Evil Red Text.
8068 I tried to minimize the amount of TeX code needed in an AASTeX document,
8069 but there is still a bit more required than any of us would like.
8072 \begin_layout Subsection
8073 Finishing Your Paper
8076 \begin_layout Standard
8077 When the paper is finished to your satisfaction and previews/prints correctly,
8079 \begin_inset Quotes eld
8083 \begin_inset Quotes erd
8086 actions which need to be done before you submit it to the journals.
8090 \begin_layout Enumerate
8091 Export your paper as a LaTeX file (
8093 File\SpecialChar \menuseparator
8094 Export\SpecialChar \menuseparator
8101 \begin_layout Enumerate
8106 file with your favorite text editor
8110 \begin_layout Enumerate
8111 remove the comment lines before the
8120 \begin_layout Enumerate
8125 usepackage...{fontenc}
8127 line if it appears (usually just after
8142 \begin_layout Enumerate
8143 remove everything between (and including) the
8155 commands, except for any commands you specifically put into the LaTeX preamble
8156 (which should appear immediately after the
8157 \begin_inset Quotes eld
8160 User specified LaTeX commands
8161 \begin_inset Quotes erd
8172 \begin_layout Enumerate
8173 Run the resulting file through LaTeX to make sure it still processes correctly.
8176 \begin_layout Enumerate
8177 Reread the journal requirements to make sure your filenames and formats
8181 \begin_layout Enumerate
8185 \begin_layout Subsection
8186 Comments On Specific Commands
8189 \begin_layout Standard
8190 I will not describe the detailed usage of the individual AASTeX commands:
8191 the AASTeX User Guide (
8195 ) gives a good description of each.
8196 Thus it's probably easiest for me to go down the list as found in the guide
8197 and offer comments where necessary.
8198 So let's begin \SpecialChar \ldots{}
8202 \begin_layout Subsubsection
8203 Things that work as expected
8206 \begin_layout Standard
8207 Because they work as you might expect, I simply list them and the section
8308 begin{thebibliography}
8316 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8317 graphicx figure commands (2.14.1),
8341 (2.15.4, amongst other places),
8368 \begin_layout Standard
8369 The following style options also work correctly:
8390 Simply put them in the
8396 Layout\SpecialChar \menuseparator
8402 \begin_layout Subsubsection
8403 Things that work, but require more comment
8406 \begin_layout Standard
8407 The following items work, but require a little more discussion:
8410 \begin_layout Itemize
8411 These items are reserved for use by the journal editors, but you can put
8412 them into the LaTeX preamble if you feel compelled to do so:
8445 \begin_layout Itemize
8446 These items may be placed in the LaTeX preamble, and are included as blanks
8447 in the template file:
8468 \begin_layout Itemize
8475 (2.3) – can only be used
8476 \begin_inset Quotes eld
8480 \begin_inset Quotes erd
8483 , not in the middle of a paragraph.
8484 Use TeX code if you need to embed it.
8487 \begin_layout Itemize
8494 (2.3) – will have extra {} after it.
8495 This should not cause an error.
8498 \begin_layout Itemize
8505 (2.6) – can only be used
8506 \begin_inset Quotes eld
8510 \begin_inset Quotes erd
8513 , not in the middle of a paragraph.
8514 Use TeX code if you need to embed it.
8517 \begin_layout Itemize
8524 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8528 \begin_layout Itemize
8542 \begin_layout Itemize
8549 (2.9) – will have extra {} after it.
8550 This should not cause an error.
8553 \begin_layout Itemize
8560 (2.11) – will have extra {} after it.
8561 This should not cause an error.
8564 \begin_layout Itemize
8571 (2.14.2) – you can insert an optional filename argument by placing the cursor
8572 at the beginning of the text and selecting
8574 Insert\SpecialChar \menuseparator
8579 \begin_inset Quotes eld
8583 \begin_inset Quotes erd
8586 inserts an optional argument of the type needed by
8593 Hopefully it will be renamed someday.
8596 \begin_layout Itemize
8609 for the catalog ID optional parameter
8612 \begin_layout Itemize
8625 for the catalog ID optional parameter
8628 \begin_layout Subsubsection
8629 Things not implemented, use TeX code
8632 \begin_layout Standard
8655 setcounter{equation}
8657 (2.12), Journal name abbreviations (2.13.4),
8693 (2.15.4, insert it as the first element in the lefthand cell after where
8695 Don't use any of LyX's rules in the table),
8707 (2.15.5), much of Misc (2.17, except
8758 \begin_layout Subsubsection
8759 Things that cannot be implemented
8762 \begin_layout Standard
8763 \SpecialChar \ldots{}
8764 at least in any meaningful sort of way, so I suggest ignoring them.
8765 They are the references environment (2.13.3), and the deluxetable environment
8767 If you really, really need to use deluxetable, I suggest editing it in
8768 a separate file with a text editor, then using
8770 Insert\SpecialChar \menuseparator
8772 \begin_inset space ~
8777 to include it in your LyX document.
8782 file to see an example of this.
8785 \begin_layout Subsection
8786 FAQs, Tips, Tricks, and Other Ruminations
8789 \begin_layout Subsubsection
8790 Getting LyX and AASTeX to cooperate
8793 \begin_layout Standard
8794 It can be a bit tricky to get LyX to recognize a new layout and document
8796 When all else fails, do this:
8799 \begin_layout Enumerate
8800 Make certain that LaTeX can find AASTeX.
8801 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8802 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8809 \begin_layout Enumerate
8821 \begin_layout Enumerate
8824 Tools\SpecialChar \menuseparator
8827 in LyX, then restart LyX.
8830 \begin_layout Enumerate
8831 Open a regular new file, not from a template.
8832 Does AASTeX appear in the class list in
8834 Document\SpecialChar \menuseparator
8840 \begin_layout Standard
8841 If you get a warning from an existing AASTeX document about not being able
8842 to find the AASTeX layout or a message about
8843 \begin_inset Quotes eld
8846 You should not mix title layouts with normal ones
8847 \begin_inset Quotes erd
8850 , things haven't been installed correctly.
8853 \begin_layout Subsubsection
8854 LaTeX error processing a table
8857 \begin_layout Standard
8858 LyX, by default, attempts to center the table caption/title.
8859 This seems to produce a bad interaction in AASTeX so you should click somewhere
8860 in the caption/title, then select
8862 Edit\SpecialChar \menuseparator
8864 \begin_inset space ~
8878 This took care of it for me.
8881 \begin_layout Subsubsection
8885 \begin_layout Standard
8886 A couple of things: 1) I have noticed some funny spacing in the reference
8887 entries in the text.
8888 When you enter the bibliography item data, make sure their is
8892 space between the last author and the parenthesis setting off the year;
8896 \begin_inset space \thinspace{}
8900 \begin_inset space \space{}
8914 2) Entering the references at all is not obvious.
8915 The easiest thing is to start typing your first reference at the end of
8916 the document, then mark it as type
8921 That will put a small gray box in front of what you just typed.
8922 Click on the box to fill in the rest of the information.
8923 For new references, go to the end of an existing reference and press return.
8924 That will create a new line with its own box, etc.
8927 \begin_layout Subsubsection
8931 \begin_layout Standard
8932 Even though AASTeX provides its own figure commands (
8938 , for example), I much prefer LaTeX's standard figure commands (with the
8947 \begin_inset space ~
8950 commands as TeX code into a Figure Float box if you desire, but I never
8951 have much luck getting the layout right.
8952 With the standard graphics, LyX will insert a
8956 usepackage{graphicx}
8958 command into the LaTeX preamble and handle the figures in the standard
8959 LaTeX2e way, interspersing the figures in the text.
8960 I believe ApJ accepts figures exactly this way now; AJ might still use
8962 \begin_inset Quotes eld
8965 stack everything at the end
8966 \begin_inset Quotes erd
8972 \begin_layout Subsubsection
8973 Things I could have done, but didn't
8976 \begin_layout Standard
8978 \begin_inset Quotes eld
8982 \begin_inset Quotes erd
8985 things I could have implemented, but chose not to.
8986 For instance, I saw no point in double-spacing the text in the LyX window,
8987 even though it is double-spaced in the paper manuscript.
8988 Also, I chose not to make separate layouts for the preprint and preprint2
8990 Since I assume you will spend most of your time in the plain manuscript
8991 mode anyway, I decided not to chew up more disk space with this.
8995 \begin_layout Subsection
8999 \begin_layout Standard
9000 Your mileage may vary.
9001 I've now had papers published by both ApJ and AJ that have had 98% of the
9002 effort done in LyX; the last 2% was the LaTeX post-processing and a few
9004 I have had no trouble with the submission process, and I'm sure the journals
9005 were never aware that there might be a difference.
9006 So, go forth and publish!
9009 \begin_layout Section
9013 \begin_layout Standard
9023 \begin_layout Standard
9024 \begin_inset VSpace bigskip
9030 \begin_layout Standard
9032 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9033 papers to be submitted to American Mathematical Society publications.
9034 The layouts are not tailored to a specific journal, but easily can be.
9035 You should refer to the AMS documentation for specific instructions for
9036 each journal (usually it will entail only changing a single line in the
9038 That documentation is available on the Web at
9039 \begin_inset Flex URL
9042 \begin_layout Plain Layout
9050 \begin_inset Flex URL
9053 \begin_layout Plain Layout
9055 ftp://ftp.ams.org/pub/tex/amslatex/
9061 These layouts are appropriate, and useful, for any mathematical writing.
9065 \begin_layout Standard
9066 There are two basic AMS LaTeX layouts:
9069 \begin_layout Itemize
9070 amsart: The standard AMS article format.
9073 \begin_layout Itemize
9074 amsbook: the standard AMS book (really, monograph) format.
9078 \begin_layout Standard
9079 The layouts themselves contain only the minimum necessary to use the AMS
9081 They do not, in particular, contain any of the `theorem' environments used
9082 for setting theorems, lemmas, and the like.
9083 These are contained, instead, in the
9084 \begin_inset Flex Code
9087 \begin_layout Plain Layout
9093 module, which is loaded by default when you select one of the AMS classes.
9094 (It can also be used with other classes and can be removed, if you would
9095 rather use something else.) Less commonly used environments are in the
9096 \begin_inset Flex Code
9099 \begin_layout Plain Layout
9100 Theorems (AMS-Extended)
9105 module, which must be loaded manually.
9108 \begin_layout Standard
9109 By default, theorems and the like are numbered consecutively throughout
9110 the document, but this may be modified by loading the module
9111 \begin_inset Flex Code
9114 \begin_layout Plain Layout
9115 Theorems (Order by Section)
9120 or, if you are using
9121 \begin_inset Flex Code
9124 \begin_layout Plain Layout
9131 \begin_inset Flex Code
9134 \begin_layout Plain Layout
9135 Theorems (Order by Chapter)
9141 These will number the results as
9142 \begin_inset Formula $n.m$
9145 , where the first number refers to the section (or chapter) and the second
9146 refers to the total number of results so far in that section (or chapter).
9147 Many environments are also available unnumbered.
9148 These are indicated by an asterisk at the end.
9149 If you happen to want
9153 unnumbered results, the module
9154 \begin_inset Flex Code
9157 \begin_layout Plain Layout
9163 provides that option.
9166 \begin_layout Standard
9167 Note that these modules do not
9171 to be used with the AMS classes.
9172 It is perfectly possible to use the
9173 \begin_inset Flex Code
9176 \begin_layout Plain Layout
9182 module, and the others mentioned, with other classes, such as
9183 \begin_inset Flex Code
9186 \begin_layout Plain Layout
9193 \begin_inset Flex Code
9196 \begin_layout Plain Layout
9203 \begin_inset Flex Code
9206 \begin_layout Plain Layout
9215 \begin_layout Subsection
9216 What these layouts provide
9219 \begin_layout Standard
9220 There is a long list of included environments provided by these layouts.
9221 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9222 variety of `theorem' environments.
9223 However, the AMS recommends the environments that are available in LyX.
9227 \begin_layout Standard
9228 The following environments—as well as the standard environments, such as
9230 \begin_inset Flex Noun
9233 \begin_layout Plain Layout
9240 \begin_inset Flex Noun
9243 \begin_layout Plain Layout
9250 \begin_inset Flex Noun
9253 \begin_layout Plain Layout
9260 \begin_inset Flex Noun
9263 \begin_layout Plain Layout
9270 \begin_inset Flex Noun
9273 \begin_layout Plain Layout
9280 \begin_inset Flex Code
9283 \begin_layout Plain Layout
9290 \begin_inset Flex Code
9293 \begin_layout Plain Layout
9302 \begin_layout Description
9303 Address This should be the author's permanent address.
9306 \begin_layout Description
9308 \begin_inset space ~
9311 Address This should be the author's temporary address at the time of submission,
9312 if different from the Address.
9315 \begin_layout Description
9316 Email Author's e-mail address
9319 \begin_layout Description
9320 URL Author's Web address, if desired.
9323 \begin_layout Description
9324 Keywords Key words or phrases used to identify specific topics discussed
9328 \begin_layout Description
9329 Subjectclass These refer to the AMS Subject Classifications, published and
9332 Mathematical Reviews
9335 These are also available online at the AMS cites listed above.
9338 \begin_layout Description
9342 \begin_layout Description
9346 \begin_layout Description
9350 \begin_layout Standard
9351 The following environments are provided by both the
9352 \begin_inset Flex Code
9355 \begin_layout Plain Layout
9362 \begin_inset Flex Code
9365 \begin_layout Plain Layout
9371 modules, in the latter case in both starred (unnumbered) and unstarred
9372 (numbered) versions.
9373 These same environments are provided only in the starred versions by the
9375 \begin_inset Flex Code
9378 \begin_layout Plain Layout
9387 \begin_layout Theorem
9388 This is typically used for the statements of major results.
9392 \begin_layout Corollary*
9393 This is used for statements which follow fairly directly from previous statement
9395 Again, these can be major results.
9400 These are smaller results needed to prove other statements.
9403 \begin_layout Proposition
9404 These are less major results which (hopefully) add to the general theory
9408 \begin_layout Conjecture
9409 These are statements provided without justification, which the author does
9410 not know how to prove, but which seem to be true (to the author, at least).
9413 \begin_layout Definition*
9414 Guess what this is for.
9415 The font is different for this environment than for the previous ones.
9419 \begin_layout Example*
9420 Used for examples illustrating proven results.
9423 \begin_layout Problem
9424 It's not really known what this is for.
9425 You should figure it out.
9428 \begin_layout Exercise*
9429 Write a description for this one.
9432 \begin_layout Remark
9433 This environment is also a type of theorem, usually a lesser sort of observation.
9436 \begin_layout Claim*
9437 Often used in the course of giving a proof of a larger result.
9441 Generally, these are used to break up long arguments, using specific instances
9447 The numbering scheme for cases is on its own, not together with other numbered
9453 At the end of this environment, a QED symbol (usually a square, but it can
9454 vary with different styles) is placed.
9455 If you want to have other environments within this one—for example, Case
9456 environments—and have the QED symbol appear only after them, then the other
9457 environments need to be nested within the proof environment.
9460 Nesting Environments
9466 for information on nesting.
9469 \begin_layout Standard
9470 And these environments are provided by
9471 \begin_inset Flex Code
9474 \begin_layout Plain Layout
9475 Theorems (AMS-Extended)
9483 \begin_layout Criterion*
9484 A required condition.
9487 \begin_layout Algorithm*
9488 A general procedure to be used.
9491 \begin_layout Axiom*
9492 This is a property or statement taken as true within the system being discussed.
9495 \begin_layout Condition*
9496 Sometimes used to state a condition assumed within the present context of
9501 Similar to a Remark.
9504 \begin_layout Notation*
9505 Used for the explanation of, yes, notation.
9508 \begin_layout Summary
9509 Do we really need to tell you?
9512 \begin_layout Acknowledgement*
9516 \begin_layout Conclusion*
9517 Sometimes used at the end of a long train of argument.
9521 Used in a way similar to Proposition, though perhaps lower on the scale.
9524 \begin_layout Standard
9525 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9527 They need to be available on your system in order to use these environments.
9530 \begin_layout Section
9538 \begin_layout Standard
9544 \begin_layout Subsection
9548 \begin_layout Standard
9549 These are the layout files for some of the journals of the American Geophysical
9551 It is assumed that you have both the AGU's own class files and AGUplus
9552 installed (everything to be found at
9553 \begin_inset Flex URL
9556 \begin_layout Plain Layout
9558 ftp://ftp.agu.org/journals/latex/journals
9566 \begin_layout Subsection
9570 \begin_layout Standard
9580 They are still called this in the LyX GUI, though their LaTeX equivalents
9581 in the AGU classes are
9592 \begin_layout Standard
9593 Newly defined styles are
9630 These are mostly manuscript attributes and defined in the AGU class documentati
9634 \begin_layout Standard
9635 I suspect this is still badly incomplete.
9638 \begin_layout Subsection
9642 \begin_layout Standard
9659 \begin_layout Subsection
9663 \begin_layout Itemize
9666 Journal of Geophysical Research
9675 \begin_layout Standard
9676 Add your own, it isn't so hard! Look at the
9687 \begin_layout Subsection
9688 Bugs and things to remember
9691 \begin_layout Standard
9692 In order to use the new layouts, you must remember to do the following for
9696 \begin_layout Enumerate
9702 This can be done in the
9704 Layout\SpecialChar \menuseparator
9709 Document\SpecialChar \menuseparator
9713 (AGU articles are always in English, right? So
9720 \begin_layout Enumerate
9730 (Yes, this is a bug.)
9733 \begin_layout Enumerate
9734 Make sure you use the
9738 bibliography style, by entering
9742 into the second field of the BibTeX inset.
9743 None of the standard styles will do.
9746 \begin_layout Section
9750 \begin_layout Standard
9756 \begin_layout Subsection
9760 \begin_layout Standard
9761 Broadway is for writing plays.
9762 The format is more decorative than Hollywood, and much less standardized.
9763 This format should be suitable for workshops.
9766 \begin_layout Subsection
9770 \begin_layout Standard
9771 The same as in Hollywood.
9774 \begin_layout Subsection
9778 \begin_layout Standard
9783 names as labels then cross-reference the label to insert the name.
9784 The cross-reference dialog will show the current cast of characters.
9787 \begin_layout Subsection
9788 Paper size and Margins
9791 \begin_layout Standard
9792 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9795 \begin_layout Subsection
9799 \begin_layout Standard
9800 The following environments are available.
9801 You can use broadway.bind to get the bind keys shown at the right.
9804 \begin_layout Itemize
9808 \begin_inset Newline newline
9813 You should not have to use this, but it is here for anything that does not
9817 \begin_layout Itemize
9821 \begin_inset space \hfill{}
9825 \begin_inset Newline newline
9830 Used to describe stage setting and the action.
9831 First use of speaker names in all CAPs.
9834 \begin_layout Itemize
9838 \begin_inset space \hfill{}
9842 \begin_inset Newline newline
9847 Automatically numbered.
9848 On screen it will be arabic, but will print as Roman.
9851 \begin_layout Itemize
9855 \begin_inset space \hfill{}
9859 \begin_inset Newline newline
9869 It is just centered text.
9872 \begin_layout Itemize
9876 \begin_inset space \hfill{}
9880 \begin_inset Newline newline
9885 Not automatically numbered.
9886 You supply the number.
9887 This is because I couldn't figure out how.
9890 \begin_layout Itemize
9894 \begin_inset space \hfill{}
9898 \begin_inset Newline newline
9903 A special case of Narrative to describe the setting and action as the curtain
9907 \begin_layout Itemize
9911 \begin_inset space \hfill{}
9915 \begin_inset Newline newline
9920 The speaker's (actor's) title, centered in all CAPS.
9923 \begin_layout Itemize
9927 \begin_inset space \hfill{}
9931 \begin_inset Newline newline
9936 Instructions to the speaker.
9937 The parentheses are automatically inserted.
9938 The ( will appear on screen, but both will be in the printed play.
9939 This environment is only used within
9946 \begin_layout Itemize
9950 \begin_inset space \hfill{}
9954 \begin_inset Newline newline
9959 What the Speaker says.
9962 \begin_layout Itemize
9966 \begin_inset space \hfill{}
9970 \begin_inset Newline newline
9975 The curtain comes down.
9978 \begin_layout Itemize
9982 \begin_inset space \hfill{}
9988 \begin_layout Itemize
9992 \begin_inset space \hfill{}
9998 \begin_layout Itemize
10002 \begin_inset space \hfill{}
10008 \begin_layout Standard
10012 \begin_layout Section
10016 \begin_layout Standard
10021 can be used to type letters according to German conventions.
10022 A template file is included in
10024 .../lyx/share/templates
10026 for you to use as a starting point.
10029 \begin_layout Section
10037 \begin_layout Standard
10043 \begin_layout Subsection
10047 \begin_layout Standard
10048 This is the layout file for the European Geophysical Society journals.
10053 can be downloaded from the web site of the EGS under
10054 \begin_inset Flex URL
10057 \begin_layout Plain Layout
10067 \begin_layout Subsection
10071 \begin_layout Standard
10074 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10082 The current layout file is unfortunately very unmodular and would benefit
10083 from using the various
10090 \begin_layout Section
10094 \begin_layout Standard
10095 See the LyX template file
10100 It contains all infos you need.
10103 \begin_layout Section
10109 \begin_inset CommandInset label
10118 \begin_layout Standard
10124 \begin_layout Subsection
10128 \begin_layout Standard
10129 This section describes how to use LyX to make slides for overhead projectors.
10130 There are two document classes that can do this: the default slides class
10136 This section documents the latter.
10139 \begin_layout Standard
10140 I'm going to say this again, nice and clear, so that there's no misunderstanding
10144 \begin_layout Standard
10145 \begin_inset VSpace bigskip
10151 \begin_layout Standard
10155 This section documents the class
10156 \begin_inset Quotes eld
10164 \begin_inset Quotes erd
10172 \begin_layout Standard
10173 \begin_inset VSpace bigskip
10179 \begin_layout Standard
10180 If you're looking for the documentation for
10181 \begin_inset Quotes eld
10189 \begin_inset Quotes erd
10192 , check out section
10193 \begin_inset space ~
10197 \begin_inset CommandInset ref
10199 reference "sec:slitex"
10204 If your machine doesn't have the
10209 \begin_inset Quotes eld
10217 \begin_inset Quotes erd
10220 ] installed, you'll probably have to use the default
10224 class, which isn't quite as good as
10229 \begin_layout Standard
10234 class is designed for use with version 2.1 of the
10238 LaTeX class file which is now an integral part of LaTeX2e.
10241 \begin_layout Subsection
10245 \begin_layout Standard
10246 Obviously, to use this document class, you need to select
10247 \begin_inset Quotes eld
10255 \begin_inset Quotes erd
10265 \begin_inset space ~
10271 There are some settings in the
10274 \begin_inset space ~
10279 dialog that you should know about that are specific to this class:
10282 \begin_layout Itemize
10283 Don't change the options
10294 \begin_inset space ~
10300 They're ignored by the
10307 \begin_layout Itemize
10308 The default font size is 20
10309 \begin_inset space \thinspace{}
10312 pt with the other options being 17
10313 \begin_inset space \thinspace{}
10317 \begin_inset space \thinspace{}
10321 \begin_inset space \thinspace{}
10327 \begin_layout Itemize
10328 The default font is
10336 but all math equations are still typeset in the usual roman font.
10339 \begin_layout Itemize
10344 supports A4 and Letter paper sizes as well as a special size for working
10346 \begin_inset space \thinspace{}
10350 It doesn't support A5, B5, legal or executive paper sizes.
10353 \begin_layout Itemize
10354 Don't bother changing the
10358 settings because they are ignored anyway.
10359 All floats appear where they are defined in the text.
10362 \begin_layout Itemize
10367 setting behaves a bit differently for this class.
10372 provides extensive footer and header capabilities including a user-defined
10375 \begin_inset space ~
10379 \begin_inset CommandInset ref
10381 reference "sec:foilfoot"
10386 The title page is treated differently to all other pages in the document
10395 has the logo centered at the bottom of the page (if one is defined).
10396 The possible page style choices and what they do are as follows:
10400 \begin_layout Labeling
10401 \labelwidthstring MMMMMMM
10408 The final output contains no page numbers, or other headers or footers
10409 (except footnotes of course).
10413 \begin_layout Labeling
10414 \labelwidthstring MMMMMMM
10421 The final output contains page numbers centered at the bottom of the page.
10422 No other headings or footers (other than footnotes).
10425 \begin_layout Labeling
10426 \labelwidthstring MMMMMMM
10431 Page numbers in lower right corner.
10432 Additional headers and footers are also shown.
10433 This is also the default.
10436 \begin_layout Labeling
10437 \labelwidthstring MMMMMMM
10442 Gives you access to the
10446 package although its use with
10450 is discouraged by the writer of the
10454 package because of some potential page layout clashes.
10458 \begin_layout Subsubsection
10462 \begin_layout Standard
10463 The following options may be used in the extra class options in the
10465 Document\SpecialChar \menuseparator
10471 \begin_layout Labeling
10472 \labelwidthstring MMMMMMx
10477 This sets up the page layout for 7.33
10478 \begin_inset space \thinspace{}
10482 \begin_inset space \thinspace{}
10485 in paper, which is about the same aspect ratio as a 35
10486 \begin_inset space \thinspace{}
10489 mm slide, making it a bit easier to work with this medium.
10492 \begin_layout Labeling
10493 \labelwidthstring MMMMMMx
10498 Places a rule across the page below the header on every page except the
10502 \begin_layout Labeling
10503 \labelwidthstring MMMMMMx
10508 Places a rule across the page above the footer on every page except the
10512 \begin_layout Labeling
10513 \labelwidthstring MMMMMMx
10518 This is automatically set each time you create a new
10527 to use the dvips driver to rotate those pages that are set as landscape
10531 \begin_layout Labeling
10532 \labelwidthstring MMMMMMx
10537 Simply changes the page dimensions to those of a landscape page but doesn't
10539 Thus if you use this option you need to use an external program to rotate
10540 each page or feed your paper through your printer as landscape.
10541 Note that this option effectively reverses the roles of the
10549 environments (don't worry these are described in the next section).
10552 \begin_layout Labeling
10553 \labelwidthstring MMMMMMx
10558 Equation numbers on the left.
10561 \begin_layout Labeling
10562 \labelwidthstring MMMMMMx
10567 Flush-left equations.
10570 \begin_layout Subsection
10571 Supported Environments
10574 \begin_layout Standard
10575 Most of the environments commonly supported in other classes are also supported
10581 There are several additional environments provided by
10585 as well as a couple added by LyX.
10586 The following environments are shared with other classes:
10589 \begin_layout Standard
10590 \begin_inset Flex Multiple Columns
10593 \begin_layout Itemize
10599 \begin_layout Itemize
10605 \begin_layout Itemize
10611 \begin_layout Itemize
10617 \begin_layout Itemize
10623 \begin_layout Itemize
10629 \begin_layout Itemize
10635 \begin_layout Itemize
10641 \begin_layout Itemize
10647 \begin_layout Itemize
10653 \begin_layout Itemize
10659 \begin_layout Itemize
10665 \begin_layout Itemize
10671 \begin_layout Itemize
10677 \begin_layout Itemize
10683 \begin_layout Itemize
10689 \begin_layout Itemize
10695 \begin_layout Itemize
10706 \begin_layout Standard
10707 That is, all the major environments apart from the sectioning environments.
10708 Since foils are essentially self-contained sections, with a title and body,
10713 provides specific commands for starting new foils and these are:
10716 \begin_layout Itemize
10722 \begin_layout Itemize
10728 \begin_layout Standard
10729 LyX also provides slightly modified versions of these two environments called:
10732 \begin_layout Itemize
10738 \begin_layout Itemize
10741 ShortRotatefoilhead
10744 \begin_layout Standard
10745 and the differences will be explained in the next section.
10748 \begin_layout Standard
10749 Since foils are often used in presenting ideas or new theorems and such
10754 also provides a comprehensive box of goodies for presenting them:
10757 \begin_layout Standard
10758 \begin_inset Flex Multiple Columns
10761 \begin_layout Itemize
10767 \begin_layout Itemize
10773 \begin_layout Itemize
10779 \begin_layout Itemize
10785 \begin_layout Itemize
10791 \begin_layout Itemize
10797 \begin_layout Itemize
10803 \begin_layout Itemize
10809 \begin_layout Itemize
10815 \begin_layout Itemize
10821 \begin_layout Itemize
10832 \begin_layout Standard
10833 The starred versions are unnumbered while the unstarred versions are numbered.
10834 There are also two list environments added by LyX and these are:
10837 \begin_layout Itemize
10843 \begin_layout Itemize
10849 \begin_layout Standard
10854 provides some powerful header and footer capabilities that are best set
10855 in the preamble although they may be set at any point in a document.
10856 If you want to change these settings in your document the best place to
10857 do so is at the very top of a foil, i.
10858 \begin_inset space \thinspace{}
10864 \begin_inset space \space{}
10869 straight after the foilhead.
10872 \begin_layout Standard
10873 For this purpose, the following command styles are provided [
10880 \begin_layout Standard
10881 \begin_inset Flex Multiple Columns
10884 \begin_layout Itemize
10888 \begin_inset space ~
10894 \begin_layout Itemize
10900 \begin_layout Itemize
10904 \begin_inset space ~
10910 \begin_layout Itemize
10914 \begin_inset space ~
10920 \begin_layout Itemize
10924 \begin_inset space ~
10931 \begin_layout Plain Layout
10932 \begin_inset space ~
10944 \begin_layout Standard
10945 There are also a few commands provided by
10949 that aren't directly supported by LyX but I'll tell you what they do and
10950 how to use them in section
10951 \begin_inset space ~
10955 \begin_inset CommandInset ref
10957 reference "sec:unsuppfoils"
10964 \begin_layout Subsection
10965 Building a Set of Foils
10968 \begin_layout Standard
10969 This section will give a simple introduction to using the different environments
10970 to build a set of foils.
10971 If you want to see an example set of foils, take a look at the
10975 file you find in LyX's
10982 \begin_layout Subsubsection
10983 Give It a Title Page
10986 \begin_layout Standard
10987 Unlike other classes that provide
11007 creates the title on a page of its own.
11008 If you leave out the
11012 environment LaTeX will substitute the current date (every time you regenerate
11016 \begin_layout Subsubsection
11020 \begin_layout Standard
11021 As I mentioned earlier, there are four ways of starting a new foil.
11022 For portrait foils you should use
11031 The difference between these two environments is the amount of space between
11032 the title of the foil (the foilhead) and the body of the foil.
11035 \begin_layout Standard
11036 Landscape foils are generated using the
11042 ShortRotatefoilhead
11045 Again the only difference is the spacing between foilhead and body.
11046 Both of the short versions have 0.5
11047 \begin_inset space ~
11050 inches less separation between the foilhead and the body.
11054 \begin_layout Standard
11055 One problem with the support for landscape foils is the requirement that
11056 you have to use the
11060 driver to generate the PostScript output otherwise the foils won't be rotated.
11061 It is possible to get landscape foils even if you haven't got the
11065 driver provided you can feed your foils sideways through your printer ;-)
11068 \begin_layout Subsubsection
11069 Theorems, Lemmas, Proofs and more
11072 \begin_layout Standard
11073 Due to a small bug in LyX you can't have two of the same type of these environme
11074 nts directly following each other.
11075 They must be separated by something.
11076 If you try, you will just be extending the previous environment as if you
11077 had merged the two environments together.
11078 So, how do you get around this problem? The simplest option is to insert
11079 some text between the two environments or add a
11083 environment between the two with just a
11084 \begin_inset Quotes eld
11092 \begin_inset Quotes erd
11096 This will force LyX to produce two separate environments and hence the
11097 correct LaTeX output.
11098 An example is provided in the example file included with the LyX distribution.
11099 Remember, this problem only occurs if you are trying to place two of the
11100 same type of theorem-like environments one directly after the other.
11103 \begin_layout Subsubsection
11107 \begin_layout Standard
11108 You get all the commonly supported list styles found in other classes as
11109 well as two new ones.
11110 I'll only describe the new ones here.
11111 If you want to find out more about the other list environments check out
11117 If you intend to use itemized lists you might also want to read about the
11121 \begin_inset space ~
11125 \begin_inset space ~
11130 dialog described above in section
11131 \begin_inset space ~
11135 \begin_inset CommandInset ref
11137 reference "sec:bullet"
11144 \begin_layout Standard
11145 The two new list styles,
11153 , are designed to make it easier for you to create lists of do's and don'ts
11154 or right and wrong by providing dedicated environments that use a tick
11155 or a cross as the label of the list.
11156 These lists are in fact dedicated variants of the
11161 They do however require that you have the
11165 packages installed.
11168 \begin_layout Subsubsection
11172 \begin_layout Standard
11177 redefines the floating tables and figures so that they appear exactly where
11178 they are in the text rather than pushing them to the top of the page or
11179 to some user specified location.
11180 In fact if you change the float placement settings they are simply ignored.
11183 \begin_layout Subsubsection
11184 Page Headers and Footers
11185 \begin_inset CommandInset label
11187 name "sec:foilfoot"
11194 \begin_layout Standard
11198 \begin_inset space ~
11207 are two commands used to control the left-footer text string.
11208 The first is meant to allow you to include a graphic logo on your foils
11210 \begin_inset Quotes eld
11218 \begin_inset Quotes erd
11222 While the second is meant to provide a classification for the audience,
11226 \begin_inset space \thinspace{}
11232 \begin_inset space \space{}
11236 It is empty by default.
11239 \begin_layout Standard
11240 The remaining page corners can be filled by
11243 \begin_inset space ~
11248 (which defaults to page numbers),
11251 \begin_inset space ~
11259 \begin_inset space ~
11267 \begin_layout Subsection
11273 \begin_inset CommandInset label
11275 name "sec:unsuppfoils"
11282 \begin_layout Standard
11283 All the commands mentioned below need to be set in a
11291 within another environment.
11294 \begin_layout Subsubsection
11298 \begin_layout Standard
11299 All lengths are adjusted using the
11322 should be replaced by the name given to the length you want to change and
11327 is the length value.
11328 All lengths should be specified in units of length such as inches (
11340 ) or relative to some document or font-based length such as
11350 \begin_layout Standard
11351 It's possible to change the spacing between a foilhead and the body of the
11352 foil by adjusting the length specified by
11359 For example, to make
11364 \begin_inset space \space{}
11367 in closer to their bodies put the following in the preamble:
11373 foilheadskip}{-0.5in}
11376 \begin_layout Standard
11377 The spacings around floats can be adjusted by setting these lengths:
11380 \begin_layout Labeling
11381 \labelwidthstring MMMMMMMMMMM
11388 Separation between the text and the top of the float
11391 \begin_layout Labeling
11392 \labelwidthstring MMMMMMMMMMM
11399 Separation between the float and the caption
11402 \begin_layout Labeling
11403 \labelwidthstring MMMMMMMMMMM
11410 Separation between the caption and the following text
11413 \begin_layout Labeling
11414 \labelwidthstring MMMMMMMMMMM
11421 You can make the captions narrower than the surrounding text by adjusting
11423 Best done relative to
11432 \begin_layout Standard
11433 There are also several title page related lengths that you may find useful
11434 if you have a long title or several authors:
11437 \begin_layout Labeling
11438 \labelwidthstring MMMMMMMMMMM
11445 Separation from headers to
11450 \begin_layout Labeling
11451 \labelwidthstring MMMMMMMMMMM
11469 \begin_layout Labeling
11470 \labelwidthstring MMMMMMMMMMM
11484 \begin_layout Labeling
11485 \labelwidthstring MMMMMMMMMMM
11501 \begin_layout Labeling
11502 \labelwidthstring MMMMMMMMMMM
11518 \begin_layout Standard
11519 The last length related command affects all the list environments.
11530 a list environment then all the vertical spacing between the list items
11532 Note that this is a command not a length so it doesn't require
11538 like the stuff mentioned above.
11541 \begin_layout Subsubsection
11542 Headers and Footers
11545 \begin_layout Standard
11558 commands control whether the logo in the
11562 definition appear on a given page.
11569 in the preamble then none of the foils will have the logo on them.
11570 If you don't want the logo on a particular page place the
11576 directly after the foilhead of that page and the
11582 directly after the next foilhead.
11585 \begin_layout Standard
11586 If you decide to use the
11590 page style setting in the
11593 \begin_inset space ~
11598 dialog you should probably add
11608 to your preamble so headers and footers on landscape pages are correctly
11609 placed when rotated.
11610 This is due to some clashes between the page layouts provided by the
11621 \begin_layout Section
11622 Hollywood (Hollywood spec scripts)
11625 \begin_layout Standard
11631 \begin_layout Subsection
11635 \begin_layout Standard
11636 Getting the format of a Hollywood script right is a
11637 \begin_inset Quotes eld
11641 \begin_inset Quotes erd
11644 It is designed to make the readers focus on content and to be easy and
11645 familiar for the actors to read.
11646 Each page of a script should be one minute of film.
11647 Nothing goes in a script that you cannot see or hear on screen.
11648 The courier 12 pt font should be used throughout.
11652 \begin_layout Subsection
11656 \begin_layout Standard
11657 Speakers' lines should NEVER break in mid-sentence.
11658 If a speaker's lines continue over a page break, repeat the
11662 title followed by (Cont'd).
11665 \begin_layout Subsection
11669 \begin_layout Standard
11674 names as labels then cross-reference the label to insert the name.
11675 The cross-reference dialog will show the current cast of characters.
11676 You can use this to insert the speaker name in narratives also.
11679 \begin_layout Subsection
11680 Paper size and Margins
11683 \begin_layout Standard
11684 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11687 \begin_layout Subsection
11691 \begin_layout Standard
11692 The following environments are available.
11693 You can use hollywood.bind to get the bind keys shown at the right.
11696 \begin_layout Itemize
11700 \begin_inset Newline newline
11705 Used where nothing else works.
11709 \begin_layout Itemize
11715 \begin_inset space \hfill{}
11723 \begin_inset Newline newline
11726 Usually followed by something like
11727 \begin_inset Quotes eld
11730 on Sally waking up.
11731 \begin_inset Quotes erd
11737 \begin_layout Itemize
11741 \begin_inset space \hfill{}
11745 \begin_inset Newline newline
11750 Introduces a new INTERIOR camera set-up.
11751 Always followed by DAY or NIGHT, or something similar to define the lighting
11753 Everthing on this line in CAPS.
11756 \begin_layout Itemize
11760 \begin_inset space \hfill{}
11764 \begin_inset Newline newline
11769 Introduces a new EXTERIOR camera set-up.
11770 Everthing on this line in CAPS.
11773 \begin_layout Itemize
11777 \begin_inset space \hfill{}
11781 \begin_inset Newline newline
11786 The character speaking.
11789 \begin_layout Itemize
11793 \begin_inset space \hfill{}
11797 \begin_inset Newline newline
11802 Instructions to the speaker.
11803 The () are automatically inserted, but only the ( will show in LyX.
11804 Both will be printed.
11807 \begin_layout Itemize
11811 \begin_inset space \hfill{}
11815 \begin_inset Newline newline
11827 \begin_layout Itemize
11831 \begin_inset space \hfill{}
11835 \begin_inset Newline newline
11840 Camera movement instruction.
11842 \begin_inset space \thinspace{}
11846 \begin_inset space \space{}
11852 \begin_layout Itemize
11856 \begin_inset space \hfill{}
11862 \begin_layout Itemize
11866 \begin_inset space \hfill{}
11872 \begin_layout Itemize
11876 \begin_inset space \hfill{}
11882 \begin_layout Itemize
11886 \begin_inset space \hfill{}
11892 \begin_layout Subsection
11896 \begin_layout Itemize
11900 \begin_layout Itemize
11904 \begin_layout Itemize
11906 \begin_inset space \thinspace{}
11913 \begin_layout Itemize
11918 \begin_layout Itemize
11919 PAN — camera movement
11922 \begin_layout Itemize
11923 INSERT — cut to close-up of
11926 \begin_layout Section
11930 \begin_layout Standard
11933 Panayotis Papasotiriou
11936 \begin_layout Subsection
11940 \begin_layout Standard
11941 The ijmpc package is a set of macros that facilitates electronic manuscript
11944 International Journal of Modern Physics C
11947 Similarly, the ijmpd package is for creating manuscripts to be submitted
11950 International Journal of Modern Physics D
11953 Both journals are published by World Scientific.
11954 The corresponding document classes are named
11963 These files, together with instructions for the authors, can be downloaded
11965 \begin_inset Flex URL
11968 \begin_layout Plain Layout
11970 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11976 \begin_inset Flex URL
11979 \begin_layout Plain Layout
11981 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11987 Both packages are modified versions of the standard
11988 \begin_inset Quotes eld
11992 \begin_inset Quotes erd
11995 package, and they are almost (but not exactly) identical.
11996 Most of their features are supported by LyX.
11997 I have used LyX successfully to write articles submitted to both journals
11998 without any problem.
12001 \begin_layout Subsection
12005 \begin_layout Standard
12006 As usual, the easiest way to write a paper is to start with a template.
12009 File\SpecialChar \menuseparator
12028 This will give an (almost) empty document that includes the most common
12029 fields found in a manuscript.
12030 Simply overwrite the existing text (including the brackets,
12035 You should keep in mind the following remarks.
12038 \begin_layout Enumerate
12039 LyX won't let you change the font size and the page style of the document,
12040 because such modifications are not allowed by both packages.
12043 \begin_layout Enumerate
12044 The language of the document should not be changed.
12045 Before previewing your paper, be sure that the babel package is not used.
12046 To do this, click on
12048 Tools\SpecialChar \menuseparator
12059 checkbox in the language settings, and click on
12067 , if you wish to make this change permanent).
12070 \begin_layout Enumerate
12072 \begin_inset Quotes eld
12076 \begin_inset Quotes erd
12079 style must be used to define keywords.
12082 \begin_layout Enumerate
12083 The ijmpc package provides a style named
12084 \begin_inset Quotes eld
12087 Classification Codes
12088 \begin_inset Quotes erd
12091 , which can be used to define classification codes, such as PACS numbers.
12092 Note that this facility is not supported by the ijmpd package.
12095 \begin_layout Enumerate
12096 Several new environments are available:
12097 \begin_inset Quotes eld
12101 \begin_inset Quotes erd
12105 \begin_inset Quotes eld
12109 \begin_inset Quotes erd
12113 \begin_inset Quotes eld
12117 \begin_inset Quotes erd
12121 \begin_inset Quotes eld
12125 \begin_inset Quotes erd
12129 \begin_inset Quotes eld
12133 \begin_inset Quotes erd
12137 \begin_inset Quotes eld
12141 \begin_inset Quotes erd
12145 \begin_inset Quotes eld
12149 \begin_inset Quotes erd
12153 \begin_inset Quotes eld
12157 \begin_inset Quotes erd
12161 \begin_inset Quotes eld
12165 \begin_inset Quotes erd
12169 \begin_inset Quotes eld
12173 \begin_inset Quotes erd
12177 \begin_inset Quotes eld
12181 \begin_inset Quotes erd
12185 \begin_inset Quotes eld
12189 \begin_inset Quotes erd
12193 \begin_inset Quotes eld
12197 \begin_inset Quotes erd
12201 \begin_inset Quotes eld
12205 \begin_inset Quotes erd
12209 Their use is more or less obvious.
12210 LyX supports all these environments; it will use the proper label, text
12211 style, and numbering scheme for each of them.
12214 \begin_layout Enumerate
12215 Both packages use basic citations; the natbib package should not be used.
12216 In LyX, citation references are shown as usual; in the output, citations
12217 are shown as superscripts.
12218 If you want to use a citation as normal text, you should use the
12223 \begin_inset space \thinspace{}
12227 \begin_inset space \space{}
12231 \begin_inset Quotes eld
12235 \begin_inset space \space{}
12245 \begin_inset Quotes erd
12251 \begin_layout Enumerate
12253 \begin_inset Quotes eld
12257 \begin_inset Quotes erd
12260 section in both packages.
12261 To put acknowledgments, just use the
12262 \begin_inset Quotes eld
12266 \begin_inset Quotes erd
12272 \begin_layout Enumerate
12273 Appendices may be added to the paper,
12277 the Acknowledgments and
12282 LyX provides a special environment, called
12283 \begin_inset Quotes eld
12287 \begin_inset Quotes erd
12290 which marks the beginning of the appendices.
12291 This environment should be left blank; it just sends a LaTeX command, but
12292 nothing is really printed.
12294 \begin_inset Quotes eld
12298 \begin_inset Quotes erd
12301 is printed with blue letters, as a signal that all sections after that
12302 point are appendices.
12303 To write an appendix, use the
12304 \begin_inset Quotes eld
12308 \begin_inset Quotes erd
12312 LyX will number each appendix with capital letters, as required by both
12315 \begin_inset Quotes eld
12319 \begin_inset Quotes erd
12326 be present before the first appendix; if not, all appendices will be numbered
12327 as normal sections in the output.
12330 \begin_layout Enumerate
12331 The ijmpc and the ijmpd packages use the
12335 command to implement table captions.
12336 As a result, a table created by LyX is printed correctly, but its caption
12338 However, you can use some TeX code to overcome this problem, so that captions
12339 are printed as expected.
12340 To do so, create a float table as usual, remove the caption, and replace
12341 it with the TeX code
12351 (sic); you must also the TeX code
12355 immediately after the tabular material.
12356 Study the example table included in the template files to see how this
12357 trick is implemented.
12358 Alternatively, If you need table captions, you should implement the whole
12363 file, then include this file to the LyX document (
12365 Insert\SpecialChar \menuseparator
12366 File\SpecialChar \menuseparator
12368 \begin_inset space ~
12374 Details on how to create a table float can be found in the files
12382 , included in the corresponding packages.
12385 \begin_layout Subsection
12386 Preparing a paper for submission
12389 \begin_layout Standard
12390 Before you submit your paper you must export the LyX document as a LaTeX
12393 File\SpecialChar \menuseparator
12394 Export\SpecialChar \menuseparator
12401 \begin_layout Plain Layout
12402 Actually you have the choice between LaTeX (plain) and pdflatex.
12403 If you intend to use pdflatex to prepare the paper, you should use the
12404 pdflatex option so that included graphics are converted to PDF format,
12405 ready for use by pdflatex.
12410 , then make the following changes to the resulting
12417 \begin_layout Enumerate
12418 Remove the comment lines before the
12427 \begin_layout Enumerate
12428 Remove everything between (and including) the
12440 commands, except for any commands you specifically put into the LaTeX preamble.
12443 \begin_layout Standard
12448 file should be saved and processed through LaTeX as many times as necessary.
12449 You may also want to check the resulting
12456 \begin_layout Subsection
12460 \begin_layout Standard
12461 The use of TeX code is reduced to two commands, which must be placed at
12462 the top of the document.
12463 If you started writing your paper by using the
12471 template, the TeX code needed is already in its place; you usually don't
12473 You may only modify the first TeX code to specify the information printed
12474 to the top of odd and even pages (authors' names and short paper's title,
12476 This TeX code must have the form
12480 markboth{Authors' Names}{Short Paper's Title}
12485 \begin_layout Section
12489 \begin_layout Standard
12495 \begin_layout Subsection
12499 \begin_layout Standard
12500 The iopart package provides a document class to create electronic manuscript
12501 submission to the journals published by the Institute of Physics.
12502 Instructions for the authors how to create a paper using the iopart class
12503 can be downloaded together with the iopart package from the site
12504 \begin_inset Flex URL
12507 \begin_layout Plain Layout
12509 ftp://ftp.iop.org/pub/journals/latex2e
12517 \begin_layout Subsection
12521 \begin_layout Standard
12522 The easiest way to write a paper is to start with the file
12526 that is available in LyX's examples files folder.
12527 Open this file, save it under a new name, and start writing.
12528 The example file explains how to use the special text environments.
12529 Here are the most important advices:
12532 \begin_layout Itemize
12533 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12536 Use AMS math package
12538 in the document settings under
12545 \begin_layout Itemize
12548 The title environment defines the kind of your paper.
12549 So use one of the following environments for the title:
12553 \begin_layout Itemize
12562 \begin_layout Itemize
12571 \begin_layout Itemize
12577 for a Topical review
12580 \begin_layout Itemize
12589 \begin_layout Itemize
12598 \begin_layout Itemize
12604 for a Paper (same as Title)
12607 \begin_layout Itemize
12613 for a Preliminary communication
12616 \begin_layout Itemize
12622 for a Rapid communication
12625 \begin_layout Itemize
12631 for a Letter to the editor
12635 \begin_layout Itemize
12638 All title environments except of
12642 can have an optional short title.
12645 \begin_layout Itemize
12646 There is a general title environment
12650 which is not directly supported by the LyX.
12651 This can be used as TeX code when your document doesn't fit into one of
12652 the other title types.
12655 \begin_layout Standard
12656 For more informations like hints for special table and formula formatting,
12657 look at the IOP author guidelines.
12660 \begin_layout Section
12664 \begin_layout Standard
12667 Panayotis Papasotiriou
12670 \begin_layout Subsection
12674 \begin_layout Standard
12675 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12676 that facilitates electronic manuscript submission to the journals they
12678 Most known of them (at least in my domain of interest) are
12680 Astrophysics and Space Science
12686 , but there are many others (see a complete list at
12687 \begin_inset Flex URL
12690 \begin_layout Plain Layout
12692 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12698 The Kluwer package may be downloaded from the site
12699 \begin_inset Flex URL
12702 \begin_layout Plain Layout
12704 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12710 A complete user guide is contained in that package (but it can also be
12711 downloaded separately).
12714 \begin_layout Standard
12715 LyX supports many features of the package but not everything.
12716 However, the TeX code needed is reduced to some
12717 \begin_inset Quotes eld
12721 \begin_inset Quotes erd
12724 commands of the package (see
12725 \begin_inset space ~
12729 \begin_inset CommandInset ref
12731 reference "subsec:kluwer_peculiarities"
12736 I have recently used LyX to write an article submitted to the
12738 Astrophysics and Space Science
12740 without any problem.
12743 \begin_layout Subsection
12747 \begin_layout Standard
12748 The easiest way to write a paper is to start with the Kluwer template file.
12751 File\SpecialChar \menuseparator
12763 This will give an (almost) empty document that includes the most common
12764 fields found in a manuscript and a short description of their use.
12765 As in most templates, simply overwrite the existing text (including the
12770 ) with the correct information.
12773 \begin_layout Subsection
12774 Preparing a paper for submission
12777 \begin_layout Standard
12778 As in the AASTeX package, before you submit your paper to a journal you
12780 \begin_inset Quotes eld
12784 \begin_inset Quotes erd
12790 \begin_layout Enumerate
12791 Export your paper as a LaTeX file.
12792 To do this, click on
12794 File\SpecialChar \menuseparator
12795 Export\SpecialChar \menuseparator
12802 \begin_layout Enumerate
12807 file with a text editor and make the following changes
12811 \begin_layout Enumerate
12812 remove the comment lines before the
12821 \begin_layout Enumerate
12822 remove everything between (and including) the
12834 commands, except for any commands you specifically put into the LaTeX preamble.
12837 \begin_layout Standard
12846 \begin_layout Enumerate
12851 file through LaTeX as many times as necessary (usually up to three).
12854 \begin_layout Enumerate
12860 \begin_inset space \thinspace{}
12864 \begin_inset space \space{}
12871 , and check if everything is OK (it should, if you didn't make any mistake).
12874 \begin_layout Subsection
12875 \begin_inset Quotes eld
12879 \begin_inset Quotes erd
12882 of the Kluwer package
12883 \begin_inset CommandInset label
12885 name "subsec:kluwer_peculiarities"
12892 \begin_layout Standard
12893 The Kluwer package has the following
12894 \begin_inset Quotes eld
12898 \begin_inset Quotes erd
12904 \begin_layout Enumerate
12905 It is possible to write multiple articles in the same LaTeX file
12909 \begin_layout Plain Layout
12910 I can't imagine any good reason to do this.
12916 Each article must be included in the environment
12917 \begin_inset Quotes eld
12921 \begin_inset Quotes erd
12925 Unfortunately, this environment cannot be omitted, even if you write just
12927 Therefore, each article starts with the command
12933 and, obviously, ends with the command
12940 Although this can be implemented in LyX, I didn't included it, since it
12941 looks ugly and can confuse the novice user.
12942 Therefore, you need to enter them directly and mark them as LaTeX code
12944 \begin_inset Quotes eld
12948 \begin_inset Quotes erd
12954 \begin_layout Enumerate
12955 Information given at the beginning of the article (i.
12956 \begin_inset space \thinspace{}
12960 \begin_inset space \space{}
12963 title, subtitle, author, institution, running title, running author, abstract
12964 and keywords) must be included in an environment called
12965 \begin_inset Quotes eld
12969 \begin_inset Quotes erd
12973 This is not implemented in LyX, so you must enter title, subtitle etc.
12974 \begin_inset space ~
12977 between two TeX code lines (
12992 \begin_layout Enumerate
12993 According to the user manual, the label of each bibliography item must be
13017 \begin_layout Standard
13022 template takes care of all these
13023 \begin_inset Quotes eld
13027 \begin_inset Quotes erd
13031 If you start a new paper using this template you don't need to do anything
13036 \begin_layout Enumerate
13037 don't delete the TeX code included in the template, and
13040 \begin_layout Enumerate
13041 copy the example bibliography item included in the template and modify it
13042 as necessary to enter new bibliography items.
13045 \begin_layout Section
13049 \begin_layout Standard
13055 \begin_layout Subsection
13059 \begin_layout Standard
13060 The LyX document classes
13062 article (koma-script)
13066 report (koma-script)
13084 correspond to the LaTeX document classes
13101 \begin_inset space ~
13104 of the Koma-Script family.
13105 They are replacements for the standard document classes
13121 , resp., and fit better to European typography conventions in a number of
13125 \begin_layout Itemize
13126 Standard character size is 11pt in
13128 article (koma-script)
13132 report (koma-script)
13140 letter (koma-script)
13145 \begin_layout Itemize
13146 Headings, labels of the description environment, and a number of elements
13149 letter (koma-script)
13151 document class are set in a bold sans serif font.
13155 \begin_layout Plain Layout
13156 There is a big difference between the bold sans serif old cm fonts and new
13157 ec fonts, especially in the appearance of headings.
13158 In comparison, the ec bold sans serif fonts look a bit thin.
13159 Here the LaTeX package
13167 helps to produce the
13168 \begin_inset Quotes eld
13172 \begin_inset Quotes erd
13175 appearance when using the ec fonts.
13180 The numbering of chapter headings is made in the same way as the numbering
13181 of section headings, that is without the extra line
13182 \begin_inset Quotes eld
13185 Chapter\SpecialChar \ldots{}
13187 \begin_inset Quotes erd
13191 In addition, the appearance of the headings can be modified by using a
13192 number of options (in LyX to be entered in the field
13195 \begin_inset space ~
13202 Layout\SpecialChar \menuseparator
13209 \begin_layout Itemize
13210 The main means in the Koma-Script document classes to design the type area
13219 (in LyX to be entered in the extra class options field in the dialog
13221 Document\SpecialChar \menuseparator
13225 They make a clearer modification of page margins possible as do the options
13228 Document\SpecialChar \menuseparator
13235 \begin_layout Itemize
13236 The LaTeX document classes of the Koma-Script family define a number of
13237 additional commands.
13238 Those part of it which makes sense in LyX is implemented in corresponding
13242 \begin_layout Standard
13243 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13244 can be found in the Koma-Script documentation
13255 \begin_layout Subsection
13256 article (koma-script), report (koma-script), and book (koma-script)
13259 \begin_layout Standard
13260 The document classes
13262 article (koma-script)
13266 report (koma-script)
13276 are implemented in the layout files
13289 They contain all the paragraph types of the corresponding standard document
13302 , resp., partly modified, with the exception of the LyX specific
13306 -type, which is replaced by the new
13310 -type having the same functionality.
13315 -Type there is a number of new paragraph types added.
13322 letter (koma-script)
13327 \begin_layout Itemize
13336 : are equivalents to
13344 , resp., additionally inserting an entry in the table of contents.
13353 are not contained in
13355 article (koma-script)
13360 \begin_layout Itemize
13369 : behave exactly as
13377 , resp., additionally clearing running heads.
13382 is not contained in
13384 article (koma-script)
13390 \begin_layout Plain Layout
13403 report (koma-script)
13405 , but since this is identical to
13409 , is has not been implemented in LyX.
13417 \begin_layout Itemize
13422 : generates a heading directly above the following paragraph in the standard
13423 character size without affecting the structure of the document.
13426 \begin_layout Itemize
13435 are special captions which respect the different space settings needed
13436 for captions placed above or below an element (if you follow strict typographic
13437 rules, you might want to place table captions always above the table).
13438 You can also use the class option
13442 , which will switch
13455 You need at least Koma-Script version 2.8q to use this.
13458 \begin_layout Itemize
13463 : can be used to set a bonmot, e.
13464 \begin_inset space \thinspace{}
13468 \begin_inset space \space{}
13471 at the beginning of a chapter.
13472 If you use the optional argument (
13474 Insert\SpecialChar \menuseparator
13476 \begin_inset space ~
13481 ), you can insert the dictum's author there.
13482 Dictum and author are separated by a line.
13483 You need at least Koma-Script version 2.8q to use this.
13488 is not contained in
13490 article (koma-script)
13495 \begin_layout Standard
13496 The following types, together with the standard types
13508 , form the title area of the document.
13509 They must be entered ahead of the first
13510 \begin_inset Quotes eld
13514 \begin_inset Quotes erd
13521 \begin_layout Plain Layout
13522 The corresponding LaTeX commands must appear before the
13533 When such a type is used more than once, the latter usage overwrites the
13534 former one, that means, for every type only the latest usage is valid.
13535 The order of the different types however has, like
13547 , no effect on the appearance of the produced document.
13550 \begin_layout Itemize
13555 : produces a centered paragraph above the ordinary title (
13567 ) for the subject of the document.
13570 \begin_layout Itemize
13575 : produces a centered paragraph below the ordinary title (
13587 ) for the publishers' name.
13590 \begin_layout Itemize
13597 report (koma-script)
13603 produces a centered paragraph on its own page behind the title page, or
13606 article (koma-script)
13608 produces a centered paragraph below the ordinary title (
13624 ) for a dedication.
13627 \begin_layout Itemize
13632 : produces a left aligned paragraph above the ordinary title (
13648 ) for a document`s head.
13651 \begin_layout Itemize
13656 : produces in a double-sided print in
13658 report (koma-script)
13664 a left-aligned paragraph at the top of the title page`s back or has no
13665 effect in a single-sided print or in
13667 article (koma-script)
13672 \begin_layout Itemize
13677 : produces in a double-sided print in
13679 report (koma-script)
13685 a left-aligned paragraph at the bottom of the title page`s back or has
13686 no effect in a single-sided print or in
13688 article (koma-script)
13693 \begin_layout Itemize
13698 : produces a special
13699 \begin_inset Quotes eld
13703 \begin_inset Quotes erd
13706 page ahead of the actual document containing a paragraph without special
13710 \begin_layout Standard
13711 The layout files for the document classes
13713 article (koma-script)
13717 report (koma-script)
13723 do include the file
13728 This is thought of as a place to define your own types.
13733 in your personal layout directory and edit the file!
13736 \begin_layout Subsection
13737 letter (koma-script)
13740 \begin_layout Standard
13744 letter (koma-script)
13746 is implemented in the layout file
13751 It contains all the paragraph types of the corresponding standard document
13756 , partly modified, with the exception of the LyX specific types
13768 type, which is replaced by the new
13773 In addition, it contains, in contrast to the standard document class, the
13791 Furthermore, there are a number of new letter specific types.
13794 \begin_layout Standard
13795 The appearance of the letter produced by this document class can be controlled
13796 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13800 \begin_layout Plain Layout
13801 For example, the standard appearance of the letter`s heading, consisting
13802 of name and address, is quite self-willed.
13804 \begin_inset Quotes eld
13808 \begin_inset Quotes erd
13811 heading is produced by the following LaTeX commands in the preamble:
13814 \begin_layout LyX-Code
13824 \begin_layout LyX-Code
13840 \begin_layout LyX-Code
13850 \begin_layout LyX-Code
13870 A detailed German description of such LaTeX commands can be found in the
13871 Koma-Script documentation
13876 With it, the letter's author can produce his personal letter layout.
13879 \begin_layout Standard
13888 define the beginning of the letter and must be used in every letter.
13889 To emphasize them in the LyX document class, they are marked with the letter
13899 \begin_inset space ~
13902 in the left margin.
13903 It is possible to write any number of letters in one file.
13908 type produces a new letter using the same addressee and a
13912 type produces a new addressee.
13929 are ordinary paragraph types and can also be used several times in one
13930 and the same letter.
13933 \begin_layout Itemize
13938 : produces a paragraph for the addressee and implicitly defines the beginning
13942 \begin_layout Itemize
13947 : produces a paragraph for the form of address and implicitly produces a
13951 \begin_layout Itemize
13956 : produces a paragraph for a close.
13959 \begin_layout Itemize
13964 : produces a paragraph for a postscript.
13967 \begin_layout Itemize
13972 : produces a paragraph for a distribution list.
13975 \begin_layout Itemize
13980 : produces a paragraph for enclosures.
13983 \begin_layout Standard
14024 are input types provided with a label to enter information, which will
14025 be processed by the document class.
14029 \begin_layout Plain Layout
14030 It could be seen as a matter of inconsequence, that the types
14038 described above are not such input types as well.
14039 Because of the special meaning of those types, however, I have implemented
14040 them as ordinary paragraph types with a one letter mark in the left margin.
14041 Moreover, it would affect my feeling of symmetry, if the
14049 type had such a serious different appearance.
14054 The types must be used ahead of the corresponding
14061 \begin_layout Standard
14062 An implementation of these types in a WYSIWYG fashion does not seem to make
14063 sense, because the real appearance of the produced letter does not only
14064 depend on the usage of the particular type, but also on other factors.
14065 For example, a signature entered in the
14069 type will in the standard behavior appear in the produced letter only,
14070 when in the same letter also a
14075 The entered value of the
14079 type will in the standard behavior not appear in the produced letter at
14081 The possibility to design the letter`s heading freely is already indicated
14082 in a footnote above.
14085 \begin_layout Standard
14086 The input types can also be used as empty paragraphs.
14087 This makes sense e.
14088 \begin_inset space \thinspace{}
14092 \begin_inset space \space{}
14104 type is not used at all, in the standard behavior the value of the
14108 type is used as signature, whereas if an empty
14112 type is used, no signature value is defined.
14115 \begin_layout Standard
14116 By using the input types it is possible to write a letter template, containing
14117 filled input types with your personal dates (name, address, etc.) and empty
14118 input types for other dates you want to enter.
14121 \begin_layout Itemize
14126 : sender's name, in the standard behavior appears as a centered paragraph
14127 in small caps in the letter`s heading.
14130 \begin_layout Itemize
14135 : sender's signature, in the standard behavior appears below the
14144 type is used, the value of the
14148 type appears instead.
14151 \begin_layout Itemize
14156 : sender's address, in the standard behavior appears in a centered paragraph
14157 in the letter`s heading below the sender's name.
14160 \begin_layout Itemize
14165 : sender's telephone number, in the standard behavior only sets the LaTeX
14175 \begin_layout Itemize
14180 : place of the letter`s making.
14183 \begin_layout Itemize
14188 : date of the letter`s making.
14197 , in the standard behavior, produce the place and the date in a right-aligned
14198 line below the addressee's field.
14203 type is used, neither place nor date appear, independent of the value of
14213 type is used, the date of the letter `s production is used.
14216 \begin_layout Itemize
14221 : sender`s back address, in the standard behavior appears above the addressee's
14222 field in a small sans serif font.
14225 \begin_layout Itemize
14230 : special mail information, in the standard behavior appears underlined
14231 above the addressee's field below the back address.
14234 \begin_layout Itemize
14239 : additional information, in the standard behavior appears on right side
14240 below the addressee`s field.
14243 \begin_layout Itemize
14248 : the letter's title, in the standard behavior appears in a big, bold, sans
14249 serif font above the subject.
14252 \begin_layout Itemize
14257 : the letter's subject, in the standard behavior appears in a bold font
14265 \begin_layout Standard
14286 produce a business letter like line above the
14290 line containing the fields
14291 \begin_inset Quotes eld
14295 \begin_inset Quotes erd
14299 \begin_inset Quotes eld
14303 \begin_inset Quotes erd
14307 \begin_inset Quotes eld
14311 \begin_inset Quotes erd
14315 \begin_inset Quotes eld
14319 \begin_inset Quotes erd
14323 \begin_inset Quotes eld
14327 \begin_inset Quotes erd
14331 \begin_inset Quotes eld
14335 \begin_inset Quotes erd
14339 For the date field, the value of the
14345 \begin_inset Quotes eld
14348 business letter types
14349 \begin_inset Quotes erd
14352 is used, the value of the
14356 type however does not appear, but only the LaTeX variable
14363 The ordinary output of place and date in a right-aligned line below the
14364 addressee`s field is suppressed.
14365 The types are implemented as input types provided with a label and must
14366 be used ahead of the corresponding
14373 \begin_layout Itemize
14381 \begin_layout Itemize
14389 \begin_layout Itemize
14397 \begin_layout Itemize
14405 \begin_layout Itemize
14413 \begin_layout Subsection
14414 The new letter class: letter (koma-script v.2)
14417 \begin_layout Standard
14423 \begin_layout Standard
14424 \begin_inset VSpace medskip
14430 \begin_layout Standard
14432 Koma-Script version 2.8 has introduced a new letter class
14436 which supersedes the now unsupported
14441 It has — on the LaTeX side — a completely new interface and is not compatible
14442 with the old class.
14443 Therefore, LyX supports both, though it is recommended you use the new
14447 \begin_layout Standard
14448 This class covers the same functionality as
14450 letter (koma-script),
14453 The basic items are
14457 (receiver's address, same as
14461 in the old layout),
14474 will start a new letter (i.
14475 \begin_inset space \thinspace{}
14479 \begin_inset space \space{}
14482 you can write several letters per document).
14483 New elements are sender's
14499 and the possibility to use a
14505 Insert\SpecialChar \menuseparator
14511 \begin_layout Standard
14512 The biggest improvement is, though, that the letter's layout is configurable
14513 to meet almost any needs.
14514 This can be done via the preamble or with a special style file (Letter
14515 Class Option, extension
14519 ), that will be read in as a class option.
14523 \begin_layout Plain Layout
14524 The KOMA package comes with some default
14529 There is, for instance, a
14533 file that follows german typesetting rules, or a
14537 that provides the default layout of the old
14542 The latter can be loaded with the class option
14551 ayout\SpecialChar \menuseparator
14556 ocument\SpecialChar \menuseparator
14568 template that is included in LyX for examples.
14569 A detailed description is to be found in the Koma-Script documentation
14577 \begin_layout Subsection
14581 \begin_layout Standard
14582 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14586 \begin_layout Itemize
14587 The chapter number of a
14591 type appears on a line of its own above the chapter heading instead of
14592 appearing in the same line ahead of it.
14593 The cause for that is the LyX internal behavior for the labeltype
14597 in the layout file.
14600 \begin_layout Itemize
14601 The headings of the types
14609 are only put in the
14610 \begin_inset Quotes eld
14614 \begin_inset Quotes erd
14617 LaTeX table of contents, but not in the LyX table of contents (
14619 Document\SpecialChar \menuseparator
14621 \begin_inset space ~
14625 \begin_inset space ~
14633 \begin_layout Itemize
14634 The paragraphs in a
14638 document class appear in a skip separation mode, not indented.
14639 This is the standard behavior, no special LaTeX commands are needed for
14643 Document\SpecialChar \menuseparator
14646 dialog the corresponding radio button indicates
14655 value always has the effect that extra LaTeX commands are inserted in the
14656 document to produce the gap, which is not what is wanted in this case.
14659 \begin_layout Section
14663 \begin_layout Standard
14669 \begin_layout Subsection
14673 \begin_layout Standard
14674 Memoir is a very powerful and constantly evolving class.
14675 It has been designed with regard to fictional and non-fictional literature.
14676 Its aim is to let the user have maximum control over the typesetting of
14678 Memoir is based on the standard book class, but it can also emulate the
14679 article class (see below).
14682 \begin_layout Standard
14683 Peter Wilson, the developer of Memoir, is known as the author of lots of
14684 useful packages in the LaTeX world.
14685 Most of them have been merged with Memoir.
14686 Therefore, it is much easier to layout the table of contents, appendices,
14687 chapter designs and such.
14688 LyX, though, does not support all of these goodies natively.
14689 Some of them might be added to forthcoming releases
14693 \begin_layout Plain Layout
14694 You are invited to send suggestions to
14695 \begin_inset Flex URL
14698 \begin_layout Plain Layout
14700 lyx-devel@lists.lyx.org
14710 , lots will probably never be supported, due to the limitations of LyX's
14712 Of course you can still use all features with the help of some native LaTeX
14717 \begin_layout Plain Layout
14722 \begin_layout Plain Layout
14732 \begin_inset space ~
14736 \begin_inset CommandInset ref
14738 reference "sec:Inserting-TeX-Code"
14748 In this section, we can only list those features that are natively supported
14750 For detailed descriptions (and for the rest of features) we recommend you
14751 have a look at the detailed manual of the Memoir class
14755 \begin_layout Plain Layout
14760 \begin_layout Plain Layout
14770 \begin_inset Flex URL
14773 \begin_layout Plain Layout
14775 CTAN:/macros/latex/memoir/memman.pdf
14785 , which is not only a user guide for the class, but also both a comprehensive
14786 description on good typesetting and a superb example for good typesetting
14790 \begin_layout Subsection
14791 Basic features and restrictions
14794 \begin_layout Standard
14795 Memoir supports basically all features of the standard book classes.
14796 There are, however, some differences, as follows:
14799 \begin_layout Description
14801 \begin_inset space ~
14804 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14807 \begin_layout Description
14809 \begin_inset space ~
14812 style: The fancy page style is not supported, due to a command clash between
14813 Memoir and the fancyhdr package (they both define a command with the same
14814 name, which confuses LaTeX).
14815 Instead, Memoir comes with a number of its own page styles (see
14817 Layout\SpecialChar \menuseparator
14818 Document\SpecialChar \menuseparator
14820 \begin_inset space ~
14826 If you want to use these for the chapter pages, you have to use the command
14833 in the main text or in preamble (e.
14834 \begin_inset space \thinspace{}
14838 \begin_inset space \space{}
14845 chapterstyle{companion}
14850 \begin_layout Description
14851 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14852 optional argument in the standard classes.
14853 With this, you can specify an alternative version of the title for the
14854 table of contents and the headers (for instance, if the title is too long).
14855 In LyX, you can do this via
14857 Insert\SpecialChar \menuseparator
14859 \begin_inset space ~
14864 at the beginning of a chapter/section.
14865 Memoir features a second optional argument and thus separates the table
14866 of contents from the header.
14867 You can define three variants of a title with this: one for the main text,
14868 one for the table of contents, and one for the headers.
14869 Simply insert two optional arguments if you need this feature, the first
14870 one containing the short title for the Table of Contents, the second one
14871 containing an alternative short title for the headers.
14874 \begin_layout Description
14875 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14876 of contents, the list of figures and the list of table start a new page
14878 Memoir does not follow this route.
14879 You have to insert a page break yourself, if you want to have one.
14882 \begin_layout Description
14883 Titlepage: For some unknown reason, Memoir uses pagination on the title
14884 page (in the standard classes, title pages are
14885 \begin_inset Quotes eld
14889 \begin_inset Quotes erd
14893 If you want an empty title page, type
14897 aliaspagestyle{title}{empty}
14902 \begin_layout Description
14903 Article: With the class option
14909 Layout\SpecialChar \menuseparator
14910 Document\SpecialChar \menuseparator
14912 \begin_inset space ~
14917 ), you can emulate article style.
14918 That is, counters (footnotes, figures, tables etc.) will not be reset on
14919 new chapters, chapters don't start a new page (but are—in contrary to
14920 \begin_inset Quotes eld
14924 \begin_inset Quotes erd
14927 article classes—still allowed), parts, though, use their own page, as in
14931 \begin_layout Description
14932 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14933 font commands, which have been used in the old LaTeX version 2.09 (e.
14934 \begin_inset space \thinspace{}
14938 \begin_inset space \space{}
14954 It produces an error and stops LaTeX whenever such a command appears.
14959 reallows the commands and spits out warnings instead (which does at least
14961 Since a lot of packages and particularly BibTeX style files are still using
14962 those commands, we have decided to use this option by default.
14965 \begin_layout Subsection
14969 \begin_layout Standard
14970 We will only describe the features supported by LyX (which is not much currently
14972 Please consult the Memoir manual
14976 \begin_layout Plain Layout
14981 \begin_layout Plain Layout
14991 \begin_inset Flex URL
14994 \begin_layout Plain Layout
14996 CTAN:/macros/latex/memoir/memman.pdf
15009 \begin_layout Description
15010 Abstract: You may wonder why an abstract is an extra feature.
15011 Well, it is in book class.
15012 Usually books don't have abstracts.
15013 Memoir, however, has.
15014 You can use it wherever and how often you like.
15017 \begin_layout Description
15018 Chapterprecis: You may know this older typesetting style: The contents of
15019 a chapter are summarized below the title and also in the table of contents
15021 \begin_inset space \thinspace{}
15025 \begin_inset space \space{}
15030 Our hero arrives in Troia; he loses some friends; he finds others
15033 Chapterprecis does exactly this.
15034 It is therefore only sensible below a chapter.
15037 \begin_layout Description
15038 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15039 The epigraph environment provides an elegant way of typesetting such a
15041 The motto itself (text) and its author (source) are divided by a short
15043 Unfortunately, we have to fool LyX a bit here again, since the environment
15044 needs two arguments (text and source).
15045 In this case, we have to use curly brackets (in TeX mode) between the two
15056 <author of the slogan>.
15059 \begin_layout Description
15060 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15061 complex figurative poems).
15062 LyX can only support a few of them.
15063 One is poemtitle, which is a centered title for poems, which will also
15064 be added to the table of contents (verse is the standard environment for
15066 Memoir has some enhanced versions of verse, but you need to use TeX code,
15067 because they have to be nested inside regular verse environments, which
15068 is not possible with LyX).
15071 \begin_layout Description
15072 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15075 \begin_layout Section
15076 Article (mwart), book (mwbk) and report (mwrep)
15077 \begin_inset Argument status
15080 \begin_layout Plain Layout
15093 \begin_layout Standard
15099 \begin_layout Standard
15100 The LyX document classes
15116 correspond to the LaTeX document classes
15129 They are replacements for the standard document classes
15141 , resp., and fit better to Polish typography conventions in a number of points.
15145 \begin_layout Standard
15149 \begin_layout Itemize
15150 Unnumbered titles (with star, e.
15151 \begin_inset space \thinspace{}
15155 \begin_inset space \space{}
15162 ) are added into table of contents,
15165 \begin_layout Itemize
15166 Additional page styles:
15170 \begin_layout Description
15171 uheadings header with separated lines,
15174 \begin_layout Description
15175 myheadings custom header, contents headers via commands:
15190 \begin_layout Description
15191 myuheadings custom header with separated lines,
15194 \begin_layout Description
15195 outer page number is placed on outer side of page
15199 \begin_layout Itemize
15204 \begin_layout Description
15205 rmheadings serif titles — default,
15208 \begin_layout Description
15209 sfheadings sansserif titles,
15212 \begin_layout Description
15213 authortitle on title page first placed is author next title — default,
15216 \begin_layout Description
15217 titleauthor on title page first placed is title next author,
15220 \begin_layout Description
15221 withmarginpar reserve place on page for margins.
15225 \begin_layout Section
15229 \begin_layout Standard
15234 provides an alternative to the standard
15239 It provides similar functionality, but you might prefer this layout with
15240 sans serif sections, headings, and more.
15243 \begin_layout Section
15247 \begin_layout Standard
15253 \begin_layout Standard
15254 \begin_inset VSpace bigskip
15260 \begin_layout Standard
15265 \begin_inset space ~
15270 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15271 \begin_inset Formula $\beta$
15274 release of May, 1999) class.
15277 \begin_layout Standard
15282 textclass, which works with RevTeX 3.1.
15283 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15284 That means that it doesn't interact very well with LyX, which requires
15285 LaTeX2e, although it has been kludged to work.
15286 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15290 \begin_inset space ~
15295 textclass should also be pretty easy to use.
15298 \begin_layout Standard
15299 These documents are supposed to be used in
15303 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15304 macros, and assume you'll know what to put in the preamble if necessary.
15307 \begin_layout Subsection
15311 \begin_layout Standard
15312 All you need to do is install RevTeX 4, as described in the package's README
15314 The package can be found at The RevTeX 4 Web Site
15315 \begin_inset Flex URL
15318 \begin_layout Plain Layout
15320 http://publish.aps.org/revtex4/
15326 Install it somewhere that LaTeX can see it.
15327 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15329 \begin_inset space \thinspace{}
15333 \begin_inset space \space{}
15336 not the directory where you installed the class file.) Then, if you reconfigure
15337 LyX, it will find the class file and let you use the RevTeX4 textclass.
15340 \begin_layout Standard
15341 Probably the easiest way to get started is either to import a RevTeX 4 document
15349 \begin_inset space ~
15354 template, found in the templates directory.
15357 \begin_layout Subsection
15361 \begin_layout Standard
15362 Optional arguments to
15369 \begin_inset Quotes eld
15373 \begin_inset Quotes erd
15377 \begin_inset Quotes eld
15381 \begin_inset Quotes erd
15391 \begin_inset space ~
15399 \begin_inset space ~
15405 Remember that in RevTeX, at least one optional argument is required!
15408 \begin_layout Standard
15409 Other preamble matter, like
15416 \begin_inset space ~
15422 \begin_inset space ~
15427 dialog, also as usual.
15430 \begin_layout Subsection
15434 \begin_layout Standard
15435 The layouts basically correspond to the commands in RevTeX4.0.
15436 For example, the Email layout corresponds to
15443 Note that (at least as of RevTeX 4.0 Beta), the
15451 layouts are exactly equivalent, so you shouldn't need to use both.
15455 \begin_layout Plain Layout
15456 In case you're curious, both were included so that
15460 would be able to translate both
15480 \begin_layout Subsection
15484 \begin_layout Standard
15485 There are a couple of important unique aspects of RevTeX 4 which might cause
15486 bugs that will be even more confusing in LyX.
15489 \begin_layout Standard
15507 The LyX equivalent is that there is a separate Thanks layout.
15512 write footnotes in the
15516 layout, or weird things may happen.
15517 See the RevTeX 4 documentation for more details.
15520 \begin_layout Standard
15524 \begin_inset space ~
15532 \begin_inset space ~
15541 layouts must be placed
15549 layout and the corresponding
15566 , the LaTeX won't compile.
15569 \begin_layout Subsection
15573 \begin_layout Standard
15574 The main problem with this layout is that you can't use the optional arguments
15575 to layouts like Email and Title.
15576 (The problem is not unique to this layout; you can't use optional arguments
15577 to the Section layouts either.) This means that after you export that file
15578 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15579 need to edit the LaTeX file with a text editor to add the optional arguments
15581 \begin_inset space \thinspace{}
15585 \begin_inset space \space{}
15588 the running title for the page headers.
15589 Lacking these layouts makes the
15595 (and the equivalent
15601 ) useless, so the corresponding layouts don't exist, and will have to be
15606 \begin_layout Plain Layout
15611 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15612 has not been updated yet to take advantage of it.
15620 \begin_layout Section
15621 Springer Journals (
15628 \begin_layout Standard
15634 \begin_layout Subsection
15638 \begin_layout Standard
15639 These are the layout files for some of the journal formats used by Springer
15640 Verlag and listed on
15641 \begin_inset Flex URL
15644 \begin_layout Plain Layout
15646 http://www.springer.de/author/tex/help-journals.html
15651 , where you should also go to fetch the class files (yes, these are LaTeX2e
15653 It is a modular system: the things common to all journals are implemented
15658 , which journal-specific layout files (such as, e.
15659 \begin_inset space \thinspace{}
15663 \begin_inset space \space{}
15670 for Journal of Geodesy) can include.
15673 \begin_layout Standard
15674 This means that implementing support for any other Springer journal on this
15675 list is as simple as writing your own
15683 file following the outline given in
15691 \begin_layout Standard
15692 It is reasonably well tested only for the Journal of Geodesy.
15701 come with the standard LyX distribution.
15702 Install the relevant class file (downloaded from Springer) in a proper
15703 directory, reconfigure LaTeX (in the teTeX case by running
15707 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15708 and it should work.
15711 \begin_layout Subsection
15715 \begin_layout Standard
15716 A large number of theorem-like styles —
15722 \SpecialChar \ldots{}
15728 \begin_layout Standard
15731 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15732 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15735 See the Springer class file documentation for details.
15738 \begin_layout Subsection
15742 \begin_layout Itemize
15754 \begin_layout Itemize
15757 Probability Theory and Related Fields
15763 — Jean-Marc Lasgouttes
15766 \begin_layout Standard
15767 Add your own, it isn't so hard!
15770 \begin_layout Subsection
15774 \begin_layout Standard
15775 These files are partly based on the older
15779 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15780 file from Springer.
15785 layout, are now defunct.
15786 Jean-Marc Lasgouttes helped out big in making me find my way around the
15787 LyX layout file mechanism.
15790 \begin_layout Subsection
15794 \begin_layout Standard
15796 But probably less than in the old hacked-LaTeX
15803 \begin_layout Standard
15805 \begin_inset space \thinspace{}
15808 g.: does not display the number for theorem-like layouts, just #.
15811 \begin_layout Section
15817 \begin_inset CommandInset label
15826 \begin_layout Standard
15834 \begin_layout Subsection
15838 \begin_layout Standard
15839 This section describes how to use LyX to make slides for overhead projectors.
15840 There are two document classes that can do this: the default slides class
15846 This section documents the former.
15849 \begin_layout Standard
15850 I'm going to say this again, nice and clear, so that there's no misunderstanding
15854 \begin_layout Standard
15855 \begin_inset VSpace bigskip
15861 \begin_layout Standard
15865 This section documents the class
15866 \begin_inset Quotes eld
15874 \begin_inset Quotes erd
15882 \begin_layout Standard
15883 \begin_inset VSpace bigskip
15889 \begin_layout Standard
15890 If you're looking for the documentation for
15891 \begin_inset Quotes eld
15899 \begin_inset Quotes erd
15902 , check out section
15903 \begin_inset space ~
15907 \begin_inset CommandInset ref
15909 reference "sec:foiltex"
15919 \begin_inset Quotes eld
15927 \begin_inset Quotes erd
15930 ] is actually somewhat better than the default
15938 \begin_layout Plain Layout
15939 \SpecialChar \ldots{}
15940 or so I've been told repeatedly by its advocates.
15941 Having never used it, I have no idea if this claim is true or not.
15946 which this section documents.
15949 \begin_layout Standard
15950 This class is the LaTeX2e improvement of the old
15955 Every LaTeX2e distribution includes this class [which I'll just refer to
15957 \begin_inset Quotes eld
15965 \begin_inset Quotes erd
15968 from now on], so you're bound to have it.
15969 As I noted earlier, there are other classes, such as
15973 , which also produce slides for overhead projectors and do a better job
15975 However, there are some things which
15979 can do which the others can't, such as generate overlays.
15980 Read on to learn more!
15983 \begin_layout Subsection
15985 \begin_inset CommandInset label
15987 name "sec:slidesetup"
15994 \begin_layout Standard
15995 Obviously, to use this document class, you need to select
15996 \begin_inset Quotes eld
16004 \begin_inset Quotes erd
16007 from the class list in the
16009 Document\SpecialChar \menuseparator
16013 There are some other special things you should know about this class:
16016 \begin_layout Itemize
16017 Don't bother changing the options
16022 They're not supported by the
16029 \begin_layout Itemize
16033 \begin_inset space ~
16038 behaves a bit differently for this class.
16039 The possible choices and what they do are as follows:
16043 \begin_layout Description
16048 The final output contains page numbers in the lower right corner.
16051 \begin_layout Description
16060 , but also prints out any time markers you've put in.
16061 This is the default.
16064 \begin_layout Description
16069 The final output contains no page numbers, time markers, or alignment markers.
16073 \begin_layout Itemize
16078 class has an extra option:
16084 \begin_inset Quotes eld
16092 \begin_inset Quotes erd
16095 in the extra class options.
16099 \begin_layout Standard
16100 Using this options allows you to add time markers to
16106 \begin_inset space ~
16110 \begin_inset CommandInset ref
16112 reference "sec:slideNote"
16120 \begin_layout Standard
16121 You can also use the template file
16122 \begin_inset Quotes eld
16130 \begin_inset Quotes erd
16133 to automatically set up a document to use the
16139 File\SpecialChar \menuseparator
16141 \begin_inset space ~
16145 \begin_inset space ~
16150 to open your new document].
16151 The template file also contains some examples of the special paragraph
16152 environments used by this class.
16153 I'll describe those next.
16156 \begin_layout Subsection
16157 Paragraph Environments
16160 \begin_layout Subsubsection
16161 Supported Environments
16164 \begin_layout Standard
16165 The first thing you'll notice when you start up a new
16169 document is the font size and type: it's the equivalent of the size
16170 \begin_inset Quotes eld
16178 \begin_inset Quotes erd
16184 \begin_inset space ~
16190 This is also what's used in the output.
16192 \begin_inset Quotes eld
16196 \begin_inset Quotes erd
16199 to remind you that this is a slide.
16200 Your final slides will use a larger font; ergo, you'll have less space.
16201 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16204 \begin_layout Standard
16205 The next thing that becomes obvious is the changes to the paragraph environment
16206 pull-down box [at the far-left end of the toolbar].
16207 Most of the paragraph environments you're used to seeing are missing.
16208 There are also five new ones.
16213 class itself only supports certain paragraph environments:
16216 \begin_layout Itemize
16222 \begin_layout Itemize
16228 \begin_layout Itemize
16234 \begin_layout Itemize
16240 \begin_layout Itemize
16246 \begin_layout Itemize
16252 \begin_layout Itemize
16258 \begin_layout Itemize
16264 \begin_layout Itemize
16270 \begin_layout Itemize
16276 \begin_layout Itemize
16282 \begin_layout Standard
16283 All of the other standard environments, including the section-heading environmen
16284 ts, aren't used in the
16291 \begin_layout Standard
16292 On the other hand, you'll notice the following new environments:
16295 \begin_layout Itemize
16301 \begin_layout Itemize
16307 \begin_layout Itemize
16313 \begin_layout Itemize
16319 \begin_layout Itemize
16325 \begin_layout Standard
16326 These five are kind of quirky, due to a
16327 \begin_inset Quotes eld
16331 \begin_inset Quotes erd
16335 You see, LyX doesn't permit you to nest any other paragraph environment
16336 into an empty environment.
16337 Now, that's fine and dandy, but it means that you wouldn't be able to start
16338 a slide with anything except plain text.
16339 To deal with this, I've performed a little
16340 \begin_inset Quotes eld
16344 \begin_inset Quotes erd
16350 \begin_layout Subsubsection
16351 Quirks of the New Environments
16352 \begin_inset CommandInset label
16354 name "sec:slideQuirk"
16361 \begin_layout Standard
16362 All five of the new paragraph environments are somewhat quirky due to inherent
16363 limitiations in the current version of LyX.
16364 As I just mentioned, LyX forbids environments that begin with another environme
16366 To get around this, the
16370 environment isn't a paragraph environment as described in the
16378 \begin_layout Standard
16379 You should consider
16392 \begin_inset Quotes eld
16395 pseudo-environments.
16396 \begin_inset Quotes erd
16399 They look like a section heading or a
16400 \begin_inset Quotes eld
16408 \begin_inset Quotes erd
16411 but really begin a [and, if necessary, end the previous] paragraph environment.
16421 \begin_inset Quotes eld
16425 \begin_inset Quotes erd
16428 These two perform some action.
16431 \begin_layout Standard
16432 A common feature of all five environments,
16452 , is a rather long-ish label.
16453 The text following this label — ordinarily the contents of the paragraph
16454 environment — is utterly irrelevant for
16475 LyX completely ignores it.
16476 In fact, you can leave these five environments completely empty.
16480 \begin_layout Standard
16485 to put any text after the rather long-ish label, you might want to.
16486 This could be a short description of the contents of the
16491 In that case, enter your descriptive comment and hit
16495 as you normally would.
16498 \begin_layout Standard
16499 If, on the other hand, you don't want to enter any descriptive text, you'll
16500 hit another LyX quirk.
16501 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16502 environment until you put something in the old one.
16506 \begin_layout Itemize
16507 Start entering the text that will
16535 \begin_layout Itemize
16536 Now move to the beginning of that paragraph.
16540 \begin_layout Itemize
16549 \begin_layout Itemize
16550 Finally, change this new, empty paragraph to a
16574 \begin_layout Standard
16575 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16579 \begin_layout Subsection
16580 Making a Presentation with
16593 \begin_layout Subsubsection
16601 \begin_layout Standard
16602 If you're expecting this section to teach you how to actually make a presentatio
16603 n, you'll be sorely disappointed.
16604 Naturally, I'll describe all of the ways the
16608 class can assist you in preparing the materials for a presentation.
16609 Filling in the contents, however, is up to you.
16614 the LyX philosophy.]
16617 \begin_layout Standard
16622 environment [in the manner described in section
16623 \begin_inset space ~
16627 \begin_inset CommandInset ref
16629 reference "sec:slideQuirk"
16633 ] tells LyX to begin a new slide [duh].
16634 The label for this environment/
16635 \begin_inset Quotes erd
16639 \begin_inset Quotes erd
16643 \begin_inset Quotes eld
16647 \begin_inset Quotes erd
16650 in cool blue, followed by the label,
16651 \begin_inset Quotes eld
16655 \begin_inset Quotes erd
16659 Any text or paragraph environments that follow this one go on the new slide.
16663 \begin_layout Standard
16664 Slides are probably the only time you'll need to forcibly end pages in LyX
16665 (this can be specified in the
16670 In fact, you'll want to, once you finish entering the contents of one slide.
16671 If you've entered more text than can physically fit on a slide, the extra
16672 overflows onto a new slide.
16673 I don't recommend doing this, however, since the overflow slide won't have
16674 any page number on it.
16675 Furthermore, it may interfere with any
16679 you've made to accompany the oversized
16686 \begin_layout Standard
16695 environments work the same way as the
16700 They both create an
16701 \begin_inset Quotes eld
16705 \begin_inset Quotes erd
16708 followed by a label [
16709 \begin_inset Quotes eld
16713 \begin_inset Quotes erd
16717 \begin_inset Quotes eld
16721 \begin_inset Quotes erd
16725 The color is a stunning magenta instead of blue, and the
16726 \begin_inset Quotes eld
16730 \begin_inset Quotes erd
16733 will look different, in style and in length.
16734 The label fonts of all three also differ from one another.
16737 \begin_layout Standard
16742 , if the contents of a
16750 exceed the physical size of a slide or sheet of paper, the extra will overflow
16752 Again, you should avoid this.
16753 It defeats the whole purpose of
16764 \begin_layout Subsubsection
16774 \begin_layout Standard
16779 is a slide that sits atop another slide.
16780 Perhaps you wish to discuss a figure on the main
16784 before displaying the text associated with it.
16785 One way to accomplish this is tape a flap of dark paper over the part of
16790 you want to display later.
16791 This method fails, however, if you wish to overlap one graph with another,
16793 You would then have to fumble while speaking to align the two separate,
16798 s to align the two graphs.
16803 environment in both cases makes life much easier.
16806 \begin_layout Standard
16811 receives the page number of its
16812 \begin_inset Quotes eld
16816 \begin_inset Quotes erd
16824 \begin_inset Quotes eld
16832 \begin_inset Quotes erd
16839 \begin_layout Plain Layout
16840 Presumably, mutliple
16845 \begin_inset Quotes eld
16853 \begin_inset Quotes erd
16857 \begin_inset Quotes eld
16865 \begin_inset Quotes erd
16869 \begin_inset Quotes eld
16877 \begin_inset Quotes erd
16881 \begin_inset space ~
16884 appended to the page number of the parent
16894 Clearly, you want the contents of both the
16902 to each fit on a single physical slide! You should probably consider an
16908 \begin_inset Quotes eld
16912 \begin_inset Quotes erd
16924 class provides a visual cue for this: the label at the start of an
16928 is shorter than that at the start of a
16933 Lastly, when you generate printable output, you'll find alignment markers
16934 in all four corners of both the
16938 page and its parent
16943 These will assist you in lining up the two physical slides.
16946 \begin_layout Standard
16947 The major problem in overlaying two slides is aligning the contents of the
16948 two transparencies.
16949 How much space should you leave for that graph on the second slide? Worse
16950 still, what if you want a graph and a sentence on second slide, but there
16951 is text on the main transparency that goes in between them? You could try
16952 and insert vertical space of the right size.
16953 The better way is to use
16964 \begin_layout Standard
16965 As their names imply,
16973 are two command-like paragraph environments that make all subsequent text
16974 invisible and visible, respectively.
16976 \begin_inset space ~
16980 \begin_inset CommandInset ref
16982 reference "sec:slideQuirk"
16986 that you don't place anything
16990 these two environments, however.
16995 , it inserts a centered, sky-blue label into the page reading
16996 \begin_inset Quotes eld
16999 <Invisible Text Follows>
17000 \begin_inset Quotes erd
17004 For paragraphs following this label, the parts of the
17012 ; it doesn't matter which] where they would be contain instead blank space.
17016 \begin_layout Standard
17021 , the corresponding centered label is
17022 \begin_inset Quotes eld
17025 <Visible Text Follows>
17026 \begin_inset Quotes erd
17030 Paragraphs following this label behave normally.
17031 Note that the beginning of a new
17043 automatically shuts off an
17048 It's therefore not necessary to use
17059 \begin_layout Standard
17060 By now, it should be obvious how to create overlay transparencies using
17061 the proper combination of
17080 \begin_layout Enumerate
17085 , including everything that will appear on it, whether on the main slide
17093 \begin_layout Enumerate
17094 Before each figure or paragraph that will appear only on the
17103 If necessary, insert a
17107 environment after the
17114 \begin_layout Enumerate
17119 immediately following the
17126 \begin_layout Enumerate
17127 Copy the contents of this
17138 \begin_layout Enumerate
17143 , change all of the
17154 \begin_layout Standard
17156 You've just made an
17163 \begin_layout Standard
17164 There's one problem with the way I've designed the LyX
17168 class: you can't make text in the middle of a paragraph invisible, nor
17169 make text in the middle of an invisible paragraph visible again.
17170 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17174 \begin_layout Plain Layout
17175 The commands of interest are:
17178 \begin_layout Itemize
17183 invisible \SpecialChar \ldots{}
17187 \begin_layout Itemize
17192 visible \SpecialChar \ldots{}
17196 \begin_layout Plain Layout
17197 \SpecialChar \ldots{}
17198 and need to be marked as TeX.
17200 \begin_inset Quotes eld
17204 \begin_inset Quotes erd
17207 you wish to change goes in between the brackets [and after the
17220 If you don't know how to mark text as TeX, see the appropriate section
17233 \begin_layout Subsubsection
17243 \begin_inset CommandInset label
17245 name "sec:slideNote"
17252 \begin_layout Standard
17261 is associated with a
17262 \begin_inset Quotes eld
17266 \begin_inset Quotes erd
17278 class provides visual cues.
17283 is shorter than that of a
17287 [yet longer than that of an
17291 ] and, like the label of an
17295 is shockingly magenta.
17296 Additionally, the printed
17300 has the page number of its
17301 \begin_inset Quotes eld
17305 \begin_inset Quotes erd
17313 \begin_inset Quotes eld
17321 \begin_inset Quotes erd
17325 \begin_inset Quotes eld
17333 \begin_inset Quotes erd
17337 \begin_inset Quotes eld
17345 \begin_inset Quotes erd
17349 You can have multiple
17353 s associated with a single
17365 , you'll probably want to break up long
17369 s so that they fit on a single sheet of paper.
17372 \begin_layout Standard
17377 is obvious: it contains anything additional you might want to say about
17383 It could also be used as a sheet of reminders for a particular
17388 In the case of the latter, you might want to make use of time markers.
17394 \begin_inset Quotes eld
17398 \begin_inset Quotes erd
17401 support for time markers, a
17406 So, you'll have to resort to using the LaTeX codes.
17409 \begin_layout Standard
17410 To use time markers, you'll need to specify the extra class option
17411 \begin_inset Quotes eld
17419 \begin_inset Quotes erd
17423 \begin_inset space ~
17427 \begin_inset CommandInset ref
17429 reference "sec:slidesetup"
17434 This option turns on timing marks, which will appear in the lower-left-hand
17440 To set what appears in the time marker, you use the LaTeX commands
17441 \begin_inset Quotes eld
17451 \begin_inset Quotes erd
17455 \begin_inset Quotes eld
17465 \begin_inset Quotes erd
17469 The arguments of both commands are time measured in seconds.
17471 \begin_inset Quotes eld
17481 \begin_inset Quotes erd
17484 sets the time marker to a given time.
17486 \begin_inset Quotes eld
17496 \begin_inset Quotes erd
17499 increments the time marker by the specified amount.
17500 Using time markers and
17504 s in this fashion, you can remind yourself how much time to spend on a particula
17512 \begin_layout Standard
17513 There's one last feature to describe.
17514 Clearly, you'd like to print out all of your
17522 s on transparencies while printing all of your
17539 with which it is associated.
17540 What's a person to do?
17543 \begin_layout Standard
17544 Luckily, there are two LaTeX commands that allow you to select what to print
17546 Both must be placed into the preamble of your document.
17548 \begin_inset Quotes eld
17560 \begin_inset Quotes erd
17563 will cause the output to contain only the
17572 Correspondingly, the command
17573 \begin_inset Quotes eld
17585 \begin_inset Quotes erd
17588 prevents the output of anything but
17593 I'd advise placing both commands in the preamble and initially comment
17595 You can then preview your entire presentation as you write.
17596 When you're done writing, you can then uncomment one of the two to select
17597 what you want to print.
17598 I like to uncomment
17599 \begin_inset Quotes eld
17611 \begin_inset Quotes erd
17614 , print to a file with
17615 \begin_inset Quotes eld
17623 \begin_inset Quotes erd
17626 in its name, comment it back out, then uncomment
17627 \begin_inset Quotes eld
17639 \begin_inset Quotes erd
17643 \begin_inset Quotes eld
17651 \begin_inset Quotes erd
17655 I can then send either file to a printer, loading transparencies or plain
17656 paper as appropriate.
17659 \begin_layout Standard
17660 You can also provide other arguments to the
17661 \begin_inset Quotes eld
17671 \begin_inset Quotes erd
17675 \begin_inset Quotes eld
17685 \begin_inset Quotes erd
17689 See a good LaTeX book for details.
17692 \begin_layout Subsection
17697 Class Template File
17700 \begin_layout Standard
17701 I have also provided a template file,
17702 \begin_inset Quotes eld
17710 \begin_inset Quotes erd
17718 To use it, begin your new presentation with
17723 ile\SpecialChar \menuseparator
17725 \begin_inset space ~
17729 \begin_inset space ~
17739 Your new LyX presentation file will contain an example
17760 additionally contain an example of the use of
17769 Lastly, the preamble will contain:
17772 \begin_layout LyX-Code
17773 % Uncomment to print out only slides and overlays
17776 \begin_layout LyX-Code
17780 \begin_layout LyX-Code
17786 \begin_inset Newline newline
17792 \begin_layout LyX-Code
17793 % Uncomment to print out only notes
17796 \begin_layout LyX-Code
17800 \begin_layout LyX-Code
17808 \begin_layout Standard
17809 One final thing: I created this class to support the LaTeX2e
17810 \begin_inset Quotes eld
17818 \begin_inset Quotes erd
17821 class, one of the built-in LaTeX2e classes.
17822 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17823 built-in slide class.
17824 It's here if you want it or need it.
17825 There exist other LaTeX2e classes for creating presentations, such as the
17831 \begin_inset space ~
17835 \begin_inset CommandInset ref
17837 reference "sec:foiltex"
17842 \begin_inset Quotes eld
17850 \begin_inset Quotes erd
17853 package [present on some TeX distributions].
17854 The latter is not yet supported under LyX.
17858 \begin_layout Plain Layout
17859 Perhaps you can take on the task\SpecialChar \ldots{}
17865 I know nothing about these other classes.
17866 Try them out to see what sort of alternative they provide.
17869 \begin_layout Chapter
17870 LyX Features needing Extra Software
17873 \begin_layout Section
17877 \begin_layout Standard
17883 \begin_layout Subsection
17887 \begin_layout Standard
17896 \begin_layout Plain Layout
17901 is not yet available when you are using the LaTeX distribution MiKTeX.
17906 , you'll find in the
17913 \begin_inset space ~
17924 \begin_inset Newline newline
17928 \begin_inset CommandInset href
17930 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17937 \begin_layout Standard
17942 package is a program that was written by
17943 \begin_inset Flex Noun
17946 \begin_layout Plain Layout
17948 \begin_inset space ~
17956 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17957 and easy to forget.
17958 The program runs over your LaTeX file, checks the integrity of the file,
17959 and flags some common errors.
17960 In other technical words, it is
17967 \begin_layout Standard
17968 Well, what is a syntax checker doing in LyX which is supposed to produce
17969 correct LaTeX anyways? The answer is simple: Just as
17973 not only checks the
17977 of C programs, but also does
17981 checks for type-errors,
17985 catches some common
17989 errors, in addition to the syntactical ones.
17994 is capable of detecting several common errors, such as
17997 \begin_layout Itemize
17998 Ellipsis detection:
17999 \begin_inset Newline newline
18002 Use \SpecialChar \ldots{}
18006 \begin_layout Itemize
18007 No space in front of/after parenthesis:
18008 \begin_inset Newline newline
18014 \begin_layout Itemize
18015 Enforcement of normal space after common abbreviations:
18016 \begin_inset Newline newline
18020 \begin_inset space \thinspace{}
18024 \begin_inset space \space{}
18027 is too wide spacing.
18030 \begin_layout Itemize
18031 Enforcement of end-of-sentence space when the last sentence ends with a
18033 \begin_inset Newline newline
18037 And this is wrong spacing.
18040 \begin_layout Itemize
18041 Space in front of labels and similar commands:
18042 \begin_inset Newline newline
18045 The label should stick right up to the text to avoid falling to a wrong
18048 \begin_inset CommandInset label
18058 \begin_layout Plain Layout
18059 This footnote is in danger of falling off to a wrong page
18064 The label is separated too much.
18067 \begin_layout Itemize
18068 Space in front of references, instead of hard spaces:
18069 \begin_inset Newline newline
18072 If you have bad luck, the text will break right between the referenced text
18073 and reference number, and that's a pity.
18075 \begin_inset CommandInset ref
18077 reference "sec:chktex"
18084 \begin_layout Itemize
18086 \begin_inset Quotes eld
18090 \begin_inset Quotes erd
18094 \begin_inset Formula $\times$
18098 \begin_inset Newline newline
18101 2x2 looks cheap compared to
18102 \begin_inset Formula $2\times2$
18108 \begin_layout Standard
18109 and more \SpecialChar \ldots{}
18110 It is an invaluable tool when you are
18111 \begin_inset Quotes eld
18115 \begin_inset Quotes erd
18118 your document before printing, and you should run it right after the obligatory
18119 spelling check, and before you go fine tuning the typesetting.
18122 \begin_layout Subsection
18126 \begin_layout Standard
18127 If you have the program installed, usage is as simple as choosing
18129 Tools\SpecialChar \menuseparator
18131 \begin_inset space ~
18137 This will make LyX generate a LaTeX file of your document, start
18141 to check it, and then make LyX insert
18142 \begin_inset Quotes eld
18146 \begin_inset Quotes erd
18149 with the warnings from
18153 , if there were any.
18154 The warnings will be placed close to the point of the mistake, and you
18155 can quickly find them by using the
18157 Navigate\SpecialChar \menuseparator
18160 menu item, or the shortcut key
18169 Open the error boxes by clicking on them with the mouse, or use the shortcut
18178 bindings, or the corresponding
18187 Read the warning and correct the mistake, if it is a mistake.
18188 If you have trouble understanding what the warning is about, you can safely
18190 Remember that there is a hidden layer between the document on screen and
18191 the technical details in invoking
18195 , and this gap can make some warnings seem arcane or just plain silly.
18198 \begin_layout Standard
18199 This document is an excellent testing bed for the feature, and it should
18200 provide quite a few warnings for you to fiddle with.
18201 Since computers are only so smart, expect most of the warnings to be false
18205 \begin_layout Subsection
18206 How to fine tune it
18209 \begin_layout Standard
18210 Sometimes, you'll find that
18214 makes more noise than suits your mood.
18215 Then you can choose not to use it, wait until your mood changes, or try
18220 to get better along with you.
18223 \begin_layout Standard
18232 very configurable and extensible, you should not expect to solve all problems
18238 Since LyX has to generate a somewhat special LaTeX file to be able to match
18239 the line numbers from the
18247 \begin_layout Plain Layout
18248 You can inspect the specific output from
18254 Document\SpecialChar \menuseparator
18256 \begin_inset space ~
18270 to the internal document structure, some of the warnings will not appear
18272 There are two things you can do about this:
18275 \begin_layout Itemize
18280 invocation command line in
18281 \begin_inset Flex MenuItem
18284 \begin_layout Plain Layout
18285 Tools\SpecialChar \menuseparator
18286 Preferences\SpecialChar \menuseparator
18287 Output\SpecialChar \menuseparator
18288 LaTeX\SpecialChar \menuseparator
18298 installation configuration file (usually with the file
18303 See below to learn what warnings can be enabled and disabled on the command
18307 \begin_layout Itemize
18308 Export your document as a raw LaTeX file using
18310 File\SpecialChar \menuseparator
18311 Export\SpecialChar \menuseparator
18319 Invoked in this way, it can be a hassle to find the corresponding place
18320 in the document inside LyX, but with a little patience, you should be able
18324 \begin_layout Standard
18325 Here follows the warning messages that can be enabled and disabled in
18334 to disable a warning, and
18338 to enable a warning.
18339 The emphasized entries are disabled by default, because the default is
18342 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18347 \begin_layout Standard
18348 Notice that you should only use the options that enable and disable warnings,
18349 because LyX relies on some of the other command line parameters to be set
18350 in a specific way to have a chance to communicate with
18357 \begin_layout Enumerate
18361 Command terminated with space.
18364 \begin_layout Enumerate
18367 Non-breaking space (
18368 \begin_inset Quotes eld
18376 \begin_inset Quotes erd
18379 ) should have been used.
18382 \begin_layout Enumerate
18386 You should enclose the previous parenthesis with
18387 \begin_inset Quotes eld
18395 \begin_inset Quotes erd
18401 \begin_layout Enumerate
18404 Italic correction (
18405 \begin_inset Quotes eld
18415 \begin_inset Quotes erd
18418 ) found in non-italic buffer.
18421 \begin_layout Enumerate
18424 Italic correction (
18425 \begin_inset Quotes eld
18435 \begin_inset Quotes erd
18438 ) found more than once.
18441 \begin_layout Enumerate
18445 No italic correction (
18446 \begin_inset Quotes eld
18456 \begin_inset Quotes erd
18462 \begin_layout Enumerate
18466 \begin_inset Quotes eld
18474 \begin_inset Quotes erd
18478 \begin_inset Quotes eld
18486 \begin_inset Quotes erd
18492 \begin_layout Enumerate
18495 Wrong length of dash may have been used.
18498 \begin_layout Enumerate
18502 \begin_inset Quotes eld
18510 \begin_inset Quotes erd
18514 \begin_inset Quotes eld
18522 \begin_inset Quotes erd
18528 \begin_layout Enumerate
18532 \begin_inset Quotes eld
18540 \begin_inset Quotes erd
18546 \begin_layout Enumerate
18550 \begin_inset Quotes eld
18558 \begin_inset Quotes erd
18561 to achieve an ellipsis.
18564 \begin_layout Enumerate
18567 Inter-word spacing (
18568 \begin_inset Quotes eld
18578 \begin_inset Quotes eld
18581 ) should perhaps be used.
18584 \begin_layout Enumerate
18587 Inter-sentence spacing (
18588 \begin_inset Quotes eld
18598 \begin_inset Quotes erd
18601 ) should perhaps be used.
18604 \begin_layout Enumerate
18607 Could not find argument for command.
18610 \begin_layout Enumerate
18614 \begin_inset Quotes eld
18622 \begin_inset Quotes erd
18628 \begin_layout Enumerate
18631 Math mode still on at end of LaTeX file.
18634 \begin_layout Enumerate
18638 \begin_inset Quotes eld
18646 \begin_inset Quotes erd
18649 doesn't match the number of
18650 \begin_inset Quotes eld
18658 \begin_inset Quotes erd
18664 \begin_layout Enumerate
18667 You should use either
18670 \begin_inset Quotes eld
18678 \begin_inset Quotes erd
18683 as an alternative to
18684 \begin_inset Quotes eld
18692 \begin_inset Quotes erd
18698 \begin_layout Enumerate
18705 " (ASCII 39) instead of "
18712 \begin_layout Enumerate
18715 User-specified pattern found.
18718 \begin_layout Enumerate
18721 This command might not be intended.
18724 \begin_layout Enumerate
18731 \begin_layout Enumerate
18749 \begin_layout Enumerate
18752 Delete this space to maintain correct page references.
18755 \begin_layout Enumerate
18759 You might wish to put this between a pair of
18760 \begin_inset Quotes eld
18768 \begin_inset Quotes erd
18774 \begin_layout Enumerate
18777 You ought to remove spaces in front of punctuation.
18780 \begin_layout Enumerate
18783 Could not execute LaTeX command.
18786 \begin_layout Enumerate
18795 in front of small punctuation.
18798 \begin_layout Enumerate
18806 may look prettier here.
18809 \begin_layout Enumerate
18813 Multiple spaces detected in output.
18816 \begin_layout Enumerate
18819 This text may be ignored.
18822 \begin_layout Enumerate
18828 \begin_inset Quotes eld
18833 to begin quotation, not
18840 \begin_layout Enumerate
18847 to end quotation, not
18850 \begin_inset Quotes eld
18858 \begin_layout Enumerate
18864 \begin_layout Enumerate
18867 You should perhaps use
18868 \begin_inset Quotes eld
18876 \begin_inset Quotes erd
18882 \begin_layout Enumerate
18885 You should put a space in front of/after parenthesis.
18888 \begin_layout Enumerate
18891 You should avoid spaces in front of/after parenthesis.
18894 \begin_layout Enumerate
18898 You should not use punctuation in front of/after quotes.
18901 \begin_layout Enumerate
18904 Double space found.
18907 \begin_layout Enumerate
18910 You should put punctuation outside inner/inside display math mode.
18913 \begin_layout Enumerate
18916 You ought to not use primitive TeX in LaTeX code.
18919 \begin_layout Enumerate
18922 You should remove spaces in front of
18923 \begin_inset Quotes eld
18931 \begin_inset Quotes erd
18937 \begin_layout Enumerate
18940 \begin_inset Quotes eld
18948 \begin_inset Quotes erd
18951 is normally not followed by
18952 \begin_inset Quotes eld
18960 \begin_inset Quotes erd
18966 \begin_layout Standard
18967 In later versions of LyX, we hope to provide a more complete interface to
18968 this tool (and it's smaller cousin
18972 ) to exploit the full power of it.
18973 But it's not exactly useless as it is now: go try it on one of your existing
18974 documents of a certain length and be surprised.
18977 \begin_layout Section
18978 Version Control in LyX
18981 \begin_layout Standard
18984 Lars Gullik Bjønnes
18991 \begin_layout Subsection
18995 \begin_layout Standard
18996 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18997 If you need something a bit more sophisticated you will have to do that
18998 manually in a terminal.
19001 \begin_layout Standard
19002 Also note that CVS support is not as good as subversion support so we advise
19004 A good place to start learning Subversion is SVN Book
19008 \begin_layout Plain Layout
19009 \begin_inset CommandInset href
19011 target "http://svnbook.red-bean.com/"
19021 In the case of RCS you should read
19022 \begin_inset Quotes eld
19026 \begin_inset Quotes erd
19029 (a man file, read it with
19034 This file describes all the basic features of RCS.
19035 You should especially notice the comment about a RCS directory, and the
19036 notion of a master RCS file (the file ending in
19043 \begin_layout Standard
19044 Before you begin to use the version control features in LyX, you should
19045 be familiar with RCS/CVS/SVN/GIT usage.
19046 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19047 package — no guarantees are made for older versions.
19048 Most of the log messages are not currently displayed after operations —
19049 you can check them in the Messages pane if unsure.
19050 Regular users of version control will appreciate VC toolbar, which can
19053 View\SpecialChar \menuseparator
19054 Toolbars\SpecialChar \menuseparator
19056 \begin_inset space ~
19064 \begin_layout Standard
19065 For introducing your own external commands consult vc-command in the manual
19069 \begin_layout Subsection
19070 RCS commands in LyX
19073 \begin_layout Standard
19074 The following sections describe the RCS commands supported by LyX.
19075 You can find them in the
19077 File\SpecialChar \menuseparator
19079 \begin_inset space ~
19085 LyX was tested against RCS 5.7/5.8
19089 \begin_layout Plain Layout
19090 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19091 in order to work properly with LyX.
19092 In particular time zone (TZ) should be set and more importantly RCSINIT
19093 in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19094 expects archive to be found in file.lyx,v within the original document directory.
19095 See also README shipped with Windows RCS binaries.
19103 \begin_layout Subsubsection
19109 \begin_layout Standard
19110 If your document is not under revision control, this is the only item shown
19112 And if it is under revision control, the
19116 item is not visible.
19120 \begin_layout Standard
19121 This command registers your document with RCS (unless you are under the
19122 directory managed by CVS)\SpecialChar \@.
19123 You are asked interactively to supply an initial
19124 description of the document.
19125 The document is now set in Read-Only mode and you have to
19128 \begin_inset space ~
19132 \begin_inset space ~
19136 \begin_inset space ~
19141 , before making any changes to it.
19142 A document under revision control has a
19143 \begin_inset Quotes eld
19146 [RCS:<version> <locker>]
19147 \begin_inset Quotes erd
19150 item tagged to the filename in the minibuffer.
19153 \begin_layout Standard
19154 RCS command that is run:
19156 ci -q -u -i -t-"<initial description>" <file-name>
19159 \begin_layout Standard
19164 to understand the switches.
19168 \begin_layout Subsubsection
19174 \begin_layout Standard
19175 When you are finished editing a file, you check in your changes.
19176 When you do this, you are asked for a description of the changes.
19177 This is stored in the history log.
19178 The version number is bumped, your changes are applied to the master RCS
19179 file, the document is unlocked and set to Read-Only mode.
19182 \begin_layout Standard
19185 ci -q -u -m"<description>" <file-name>
19188 \begin_layout Subsubsection
19194 \begin_layout Standard
19195 By doing this you lock the document so that only you can edit it.
19196 This will also make the document Read-Write only for you.
19197 You will usually continue editing for a while and when you are finished
19198 you check in your changes.
19199 The status line is changed to reflect that you have locked the file.
19202 \begin_layout Standard
19205 co -q -l <file-name>
19208 \begin_layout Subsubsection
19211 Revert To Repository Version
19214 \begin_layout Standard
19215 This will discard all changes made to the document since the last check
19217 You get a warning before changes are discarded.
19220 \begin_layout Standard
19223 co -f -u<version> <file-name>
19226 \begin_layout Subsubsection
19232 \begin_layout Standard
19233 This will create a copy of the current document.
19234 Since RCS does not support copy operations natively, the version history
19235 is not preserved, and the copy is added as a new file.
19236 It requires a clean document without any changes since the last checkin.
19237 You are asked for a file name and a description of the copy operation.
19238 After that the copy is created, both locally and in the repository.
19239 If the parent directories of the copied and original document differ, all
19240 relative paths of included files of the copy are adjusted (like in
19242 File\SpecialChar \menuseparator
19245 \SpecialChar \ldots{}
19247 Finally, the copy is loaded instead of the original document.
19250 \begin_layout Labeling
19251 \labelwidthstring 00.00.0000
19253 \begin_inset space ~
19257 \begin_inset space ~
19261 \begin_inset Newline newline
19265 \begin_inset Flex Code
19268 \begin_layout Plain Layout
19271 \begin_inset Quotes eld
19275 \begin_inset Quotes erd
19284 \begin_inset Flex Code
19287 \begin_layout Plain Layout
19290 \begin_inset Quotes eld
19294 \begin_inset Quotes erd
19303 \begin_inset Newline newline
19307 \begin_inset Flex Code
19310 \begin_layout Plain Layout
19314 \begin_inset Quotes eld
19318 \begin_inset Quotes erd
19329 \begin_layout Subsubsection
19335 \begin_layout Standard
19336 This makes as if the last check in never happened.
19337 No changes are made to the document loaded into LyX, but the last version
19338 is removed from the master RCS file.
19341 \begin_layout Standard
19344 rcs -o<version> <file-name>
19347 \begin_layout Subsubsection
19353 \begin_layout Standard
19354 This shows the complete history of the RCS document.
19359 is shown in a browser.
19367 \begin_layout Subsubsection
19371 \begin_layout Standard
19372 LyX supports RCS version number, author name, date and time of last commit.
19373 All those are extracted from
19375 rlog -r <file-name>
19379 \begin_inset CommandInset ref
19381 reference "sub:VCS-Revision-Information"
19388 \begin_layout Subsection
19389 CVS commands in LyX
19392 \begin_layout Standard
19393 A subset of CVS operations is supported by LyX.
19394 You can find the commands in the
19396 File\SpecialChar \menuseparator
19398 \begin_inset space ~
19404 The version control system SVN is more powerful, so please use it instead
19405 of CVS if possible.
19408 \begin_layout Subsubsection
19414 \begin_layout Standard
19415 If you start from scratch with CVS you have to create your repository and
19416 checkout the working copy with external tools.
19417 If you're using a client-server setup you may need to login before doing
19418 the first repository checkout.
19421 \begin_layout Standard
19422 If your documents are under revision control and others are using the same
19423 repository problems arise when different changes to the same document at
19424 the same location happen.
19425 Standard CVS repositories don't operate with a file locking mechanism.
19426 This may be surprising, but conflicts only occur if people disagree on
19427 the proper content of the same part of a document.
19428 So, if co-workers are used to communicate regularly, these conflicts occur
19430 If they don't communicate they have a fundamental problem anyway.
19431 Nevertheless some people like to work with so called
19432 \begin_inset Quotes eld
19436 \begin_inset Quotes erd
19440 If they do so the working copy of all files is readonly when checked out
19441 first and the user starts editing after using a special command to make
19442 the working copy writable.
19443 When the changes are checked in the working copy returns to readonly state.
19444 With LyX one has to edit the
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19454 file and add the line
19455 \begin_inset Flex Code
19458 \begin_layout Plain Layout
19464 to work with reserved checkouts.
19465 The benefit is the possibility to see who is using a writable copy of some
19467 It's not guaranteed only one user makes a copy writable.
19470 \begin_layout Standard
19471 LyX tries to guess if you're using reserved or non-reserved checkouts.
19472 If your working copy is readonly or it is writable and an additional copy
19473 of your document exists in the CVS/Base sub-directory a reserved otherwise
19474 a non-reserved checkout is assumed.
19475 When a reserved checkout is detected you have to use
19476 \begin_inset Flex MenuItem
19479 \begin_layout Plain Layout
19485 to make your working copy writable if it's readonly.
19487 \begin_inset Flex MenuItem
19490 \begin_layout Plain Layout
19496 operation is possible and that makes your working copy readonly again after
19497 transferring your changes to the repository.
19500 \begin_layout Standard
19501 More information about CVS can be found here
19502 \begin_inset Flex URL
19505 \begin_layout Plain Layout
19507 http://www.nongnu.org/cvs
19513 \begin_inset Flex URL
19516 \begin_layout Plain Layout
19518 http://ximbiot.com/cvs
19526 \begin_layout Standard
19531 to understand the sub-commands and the switches mentioned below.
19534 \begin_layout Subsubsection
19540 \begin_layout Standard
19541 If your document is not under revision control, this is the only item shown
19543 And if it is under revision control, the
19550 item is not visible.
19554 \begin_layout Standard
19555 This command registers in CVS your document
19556 \begin_inset Flex Strong
19559 \begin_layout Plain Layout
19567 in the case you have already the documents directory under CVS control
19573 This means you have to create or checkout the archive by yourself using
19575 (In case you forget that step LyX registers the document with RCS.)
19578 \begin_layout Standard
19579 Then you are asked interactively to supply an initial description of the
19581 Don't forget that registered file is not yet checked in.
19584 \begin_layout Standard
19585 CVS command that is run:
19587 cvs -q add -m"<entered message>" "<file-name>"
19590 \begin_layout Standard
19595 above and for all other CVS commands is an abbreviation for
19596 \begin_inset Quotes eld
19599 change the current working directory to file location and use the file name
19600 without path component as argument
19601 \begin_inset Quotes erd
19607 \begin_layout Subsubsection
19613 \begin_layout Standard
19614 When you are finished editing a file, you commit your changes.
19615 When you do this and you had changed the document, you are asked for a
19616 description of the changes.
19617 After that changes are written to the repository.
19618 In case you didn't change the document and a reserved checkout is detected
19619 the reservation made on
19620 \begin_inset Flex MenuItem
19623 \begin_layout Plain Layout
19632 \begin_layout Labeling
19633 \labelwidthstring 00.00.0000
19635 \begin_inset space ~
19639 \begin_inset space ~
19643 \begin_inset Newline newline
19647 \begin_inset Flex Code
19650 \begin_layout Plain Layout
19653 -q commit -m"<description>" "<file-name>"
19659 \begin_inset Newline newline
19663 \begin_inset Flex Code
19666 \begin_layout Plain Layout
19677 \begin_layout Subsubsection
19683 \begin_layout Standard
19684 When you are sharing a repository with others, you may have to incorporate
19685 their changes into your working copy.
19688 \begin_layout Standard
19691 cvs -q update "<file-name>"
19694 \begin_layout Standard
19695 If a readonly checkout is detected the working copy is made writable and
19699 \begin_layout Standard
19702 cvs -q edit "<file-name>"
19705 \begin_layout Subsubsection
19708 Revert To Repository Version
19711 \begin_layout Standard
19712 This will discard all changes made to the document since the last check
19714 You get a warning before changes are discarded.
19715 Firstly the file is deleted, secondly CVS update command is run.
19718 \begin_layout Standard
19721 cvs -q update "<file-name>"
19724 \begin_layout Standard
19725 If a reserved checkout is detected and the working copy has no changes only
19726 the reservation is undone.
19729 \begin_layout Standard
19732 cvs -q unedit "<file-name>"
19735 \begin_layout Subsubsection
19741 \begin_layout Standard
19742 This will create a copy of the current document.
19743 Since CVS does not support copy operations natively, the version history
19744 is not preserved, and the copy is added as a new file.
19745 It requires a clean document without any changes since the last checkin.
19746 You are asked for a file name and a description of the copy operation.
19747 After that the copy is created, both locally and in the repository.
19748 If the parent directories of the copied and original document differ, all
19749 relative paths of included files of the copy are adjusted (like in
19751 File\SpecialChar \menuseparator
19754 \SpecialChar \ldots{}
19756 Finally, the copy is loaded instead of the original document.
19759 \begin_layout Labeling
19760 \labelwidthstring 00.00.0000
19762 \begin_inset space ~
19766 \begin_inset space ~
19770 \begin_inset Newline newline
19774 \begin_inset Flex Code
19777 \begin_layout Plain Layout
19780 \begin_inset Quotes eld
19784 \begin_inset Quotes erd
19793 \begin_inset Flex Code
19796 \begin_layout Plain Layout
19799 \begin_inset Quotes eld
19803 \begin_inset Quotes erd
19812 \begin_inset Newline newline
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19823 \begin_inset Quotes eld
19827 \begin_inset Quotes erd
19838 \begin_layout Subsubsection
19844 \begin_layout Standard
19845 This will rename the current document.
19846 Since CVS does not support rename operations natively, the version history
19847 is not preserved, the renamed document is added as a new file, and the
19848 original document is deleted.
19849 It requires a clean document without any changes since the last checkin.
19850 You are asked for a file name and a description of the rename operation.
19851 After that the document is renamed, both locally and in the repository.
19852 If the parent directories of the new and old file names differ, all relative
19853 paths of included files are adjusted (like in
19855 File\SpecialChar \menuseparator
19858 \SpecialChar \ldots{}
19860 Finally, the document is reloaded using the new name.
19863 \begin_layout Labeling
19864 \labelwidthstring 00.00.0000
19866 \begin_inset space ~
19870 \begin_inset space ~
19874 \begin_inset Newline newline
19878 \begin_inset Flex Code
19881 \begin_layout Plain Layout
19884 \begin_inset Quotes eld
19888 \begin_inset Quotes erd
19897 \begin_inset Flex Code
19900 \begin_layout Plain Layout
19903 \begin_inset Quotes eld
19907 \begin_inset Quotes erd
19916 \begin_inset Newline newline
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19927 \begin_inset Quotes eld
19931 \begin_inset Quotes erd
19940 \begin_inset Newline newline
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19951 \begin_inset Quotes eld
19955 \begin_inset Quotes erd
19966 \begin_layout Subsubsection
19967 Update of the local directory checkout from repository
19970 \begin_layout Standard
19971 Once your documents gets more complex, containing sub-documents and pictures,
19973 \begin_inset Flex Code
19976 \begin_layout Plain Layout
19982 files and so on using version control becomes more complicated.
19983 LyX supports updating the whole tree in which resides the document.
19984 This become especially useful once you cooperate with people which neither
19985 have detailed knowledge about CVS usage nor they have ambition to commit
19986 additional material to the repository.
19987 You have to organize the files structure so that all external files are
19988 in the same directory or subdirectories of the document.
19989 It's good practice anyway to store multipart documents in an extra directory.
19992 \begin_layout Standard
19994 \begin_inset Flex Code
19997 \begin_layout Plain Layout
19998 Update local directory from repository
20003 command updates the whole directory.
20004 If local changes are detected user is warned before update starts.
20005 In case of merge conflicts both versions of the conflicting document parts
20006 are placed in the final document.
20007 You have to review and correct the result of the merge.
20008 You'll find the conflicts enclosed in pairs of
20009 \begin_inset Flex Code
20012 \begin_layout Plain Layout
20019 \begin_inset Flex Code
20022 \begin_layout Plain Layout
20029 \begin_inset Flex Code
20032 \begin_layout Plain Layout
20039 The first part is your version as before the update operation with the
20040 document name prepended.
20041 The second one is the repository version with the version number after
20043 \begin_inset Flex Code
20046 \begin_layout Plain Layout
20055 \begin_layout Labeling
20056 \labelwidthstring 00.00.0000
20058 \begin_inset space ~
20062 \begin_inset space ~
20066 \begin_inset Newline newline
20070 \begin_inset Flex Code
20073 \begin_layout Plain Layout
20081 (Ask if changes are detected.)
20082 \begin_inset Newline newline
20086 \begin_inset Flex Code
20089 \begin_layout Plain Layout
20090 cd $path; cvs -q update
20100 \begin_layout Standard
20102 \begin_inset Flex Code
20105 \begin_layout Plain Layout
20111 stands for the path to the document.
20114 \begin_layout Subsubsection
20120 \begin_layout Standard
20121 This shows the complete history of the CVS document.
20124 cvs log "<file-name>"
20126 is shown in a browser.
20129 \begin_layout Subsubsection
20133 \begin_layout Standard
20134 LyX supports CVS version number, author name, date and time of last commit.
20135 All those are extracted from
20137 cvs log -r <file-name>
20141 \begin_inset CommandInset ref
20143 reference "sub:VCS-Revision-Information"
20150 \begin_layout Subsection
20151 SVN commands in LyX
20154 \begin_layout Standard
20155 SVN is now partially supported by LyX.
20156 You can find the commands in the
20158 File\SpecialChar \menuseparator
20160 \begin_inset space ~
20166 Please note that if you use password protected access to repository via
20167 ssh, you will be asked in terminal window.
20168 LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20172 \begin_layout Plain Layout
20173 Most of the commands will work with 1.4 too, see
20174 \begin_inset CommandInset ref
20176 reference "sub:SVN-Repo-Update"
20181 There seems to be currently unresolved permissions problem under SVN 1.8
20182 with reverting changes when file is locked.
20190 \begin_layout Subsubsection
20196 \begin_layout Standard
20197 If your document is not under revision control, this is the only item shown
20199 And if it is under revision control, the
20206 item is not visible.
20209 \begin_layout Standard
20210 This command registers in SVN your document ONLY in case you have already
20211 the documents directory under SVN control (in particular
20216 This means you have to checkout the archive by yourself.
20219 \begin_layout Standard
20220 Then you are asked interactively to supply an initial description of the
20222 Don't forget that registered file is not yet commited.
20225 \begin_layout Standard
20226 SVN command that is run:
20229 \begin_inset Quotes eld
20233 \begin_inset Quotes erd
20239 \begin_layout Standard
20244 to understand the switches.
20247 \begin_layout Subsubsection
20253 \begin_layout Standard
20254 When you are finished editing a file, you commit your changes.
20255 When you do this, you are asked for a description of the changes.
20256 After that changes are commited.
20259 \begin_layout Standard
20264 \begin_layout Plain Layout
20265 In case locking is not enabled.
20267 \begin_inset CommandInset ref
20269 reference "subsec:SVN-File-Locking"
20280 svn commit -q -m"<description>" <file-name>
20283 \begin_layout Subsubsection
20289 \begin_layout Standard
20290 Updates the changes of this file from the repository.
20291 Be sure you understand SVN merging and conflicts resolving before using
20292 this function, because all conflicts has to be resolved manually by you!
20295 \begin_layout Standard
20300 \begin_layout Plain Layout
20308 svn update --non-interactive
20309 \begin_inset Quotes eld
20313 \begin_inset Quotes erd
20319 \begin_layout Subsubsection
20322 Revert To Repository Version
20325 \begin_layout Standard
20326 This will discard all changes made to the document since the last check
20328 You get a warning before changes are discarded.
20331 \begin_layout Standard
20335 \begin_inset Quotes eld
20339 \begin_inset Quotes erd
20345 \begin_layout Subsubsection
20351 \begin_layout Standard
20352 This will create a copy of the current document including the version history.
20353 It requires a clean document without any changes since the last checkin.
20354 You are asked for a file name and a description of the copy operation.
20355 After that the copy is created, both locally and in the repository.
20356 If the parent directories of the copied and original document differ, all
20357 relative paths of included files of the copy are adjusted (like in
20359 File\SpecialChar \menuseparator
20362 \SpecialChar \ldots{}
20364 Finally, the copy is loaded instead of the original document.
20367 \begin_layout Labeling
20368 \labelwidthstring 00.00.0000
20370 \begin_inset space ~
20374 \begin_inset space ~
20378 \begin_inset Newline newline
20382 \begin_inset Flex Code
20385 \begin_layout Plain Layout
20389 \begin_inset Quotes eld
20393 \begin_inset Quotes erd
20397 \begin_inset Quotes eld
20401 \begin_inset Quotes erd
20410 \begin_inset Newline newline
20414 \begin_inset Flex Code
20417 \begin_layout Plain Layout
20426 \begin_layout Subsubsection
20432 \begin_layout Standard
20433 This will rename the current document including the version history.
20434 It requires a clean document without any changes since the last checkin.
20435 You are asked for a file name and a description of the rename operation.
20436 After that the document is renamed, both locally and in the repository.
20437 If the parent directories of the new and old file names differ, all relative
20438 paths of included files are adjusted (like in
20440 File\SpecialChar \menuseparator
20443 \SpecialChar \ldots{}
20445 Finally, the document is reloaded using the new name.
20448 \begin_layout Labeling
20449 \labelwidthstring 00.00.0000
20451 \begin_inset space ~
20455 \begin_inset space ~
20459 \begin_inset Newline newline
20463 \begin_inset Flex Code
20466 \begin_layout Plain Layout
20470 \begin_inset Quotes eld
20474 \begin_inset Quotes erd
20478 \begin_inset Quotes eld
20482 \begin_inset Quotes erd
20491 \begin_inset Newline newline
20495 \begin_inset Flex Code
20498 \begin_layout Plain Layout
20507 \begin_layout Subsubsection
20508 \begin_inset CommandInset label
20510 name "sub:SVN-Repo-Update"
20514 Update of the local directory checkout from repository
20518 \begin_layout Plain Layout
20519 Note that this command will work only with subversion
20520 \begin_inset Formula $\geqq1.5$
20531 \begin_layout Standard
20532 All the commands above have one shortcomming - they deal with the current
20534 Once your document contains pictures, includes external
20535 \begin_inset Flex Code
20538 \begin_layout Plain Layout
20544 files and so on administration becomes more complicated.
20545 LyX now supports updating the whole tree in which resides the document
20549 \begin_layout Plain Layout
20550 One need to organize the files structure so that all external files are
20551 in the same directory or subdirectories of the document.
20558 This become especially useful once you cooperate with people which neither
20559 know about subversion management nor they have ambition to commit additional
20560 material to the repository.
20564 \begin_layout Standard
20565 \begin_inset Flex Code
20568 \begin_layout Plain Layout
20569 Update local directory from repository
20574 command updates the whole directory and in case of merge conflicts local
20575 version of the files are left, so no unintended data loss occurs.
20576 If local changes are detected user is warned before update starts.
20579 \begin_layout Labeling
20580 \labelwidthstring 00.00.0000
20582 \begin_inset space ~
20586 \begin_inset space ~
20590 \begin_inset Newline newline
20594 \begin_inset Flex Code
20597 \begin_layout Plain Layout
20603 (Ask if changes are detected.)
20604 \begin_inset Newline newline
20608 \begin_inset Flex Code
20611 \begin_layout Plain Layout
20612 svn update --accept mine-full $path
20620 \begin_layout Standard
20622 \begin_inset Flex Code
20625 \begin_layout Plain Layout
20631 stands for the path to the document.
20634 \begin_layout Subsubsection
20640 \begin_layout Standard
20641 This shows the complete history of the SVN document.
20645 \begin_inset Quotes eld
20649 \begin_inset Quotes erd
20654 is shown in a browser.
20657 \begin_layout Subsubsection
20659 \begin_inset CommandInset label
20661 name "subsec:SVN-File-Locking"
20668 \begin_layout Standard
20669 The file exchange through various revision control systems brings the problem
20670 of merge conflicts in case two different users try to edit the same (parts
20672 When such a conflict happens it needs manual resolving and one reasonable
20673 alternative is to provide some kind of locking mechanism, which guarantees
20674 that only one user is allowed to edit file at the given time.
20677 \begin_layout Standard
20678 SVN has two such mechanisms to provide mutual exclusivity for file access
20679 - locks and automatic setting of write permissions (see sec.
20681 \begin_inset CommandInset ref
20683 reference "subsec:Automatical-Locking-Property"
20688 \begin_inset Flex Code
20691 \begin_layout Plain Layout
20701 \begin_layout Plain Layout
20702 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20708 If this property is detected for a given document LyX starts to use SVN
20709 locks for document editing automatically and the whole check-in/out mechanism
20710 switches to the same regimen as for RCS.
20711 This in particular means there are two different modes of file use in LyX:
20714 \begin_layout Itemize
20716 The loaded file is in the read-only mode.
20717 For editing on needs to check-out.
20722 consists of updating from the repository and gaining write lock.
20723 If the lock is not possible to obtain, we remain in unlocked state.
20726 \begin_layout Itemize
20728 The loaded file is in the 'normal' edit mode.
20729 No other user is allowed to edit the file.
20734 consists of commiting changes and releasing write-lock.
20735 If no changes have been made to the document, no commit will be produced
20739 \begin_layout Plain Layout
20740 Don't be puzzled by the fact that you will be asked for commit message anyway.
20745 and only the write-lock will be released.
20748 \begin_layout Standard
20752 \begin_layout Labeling
20753 \labelwidthstring 00.00.0000
20756 svn commit -q -m"<description>" "<file-name>"
20757 \begin_inset Newline newline
20760 svn unlock "<file-name>"
20763 \begin_layout Labeling
20764 \labelwidthstring 00.00.0000
20767 svn update "<file-name>"
20768 \begin_inset Newline newline
20771 svn lock "<file-name>"
20774 \begin_layout Subsubsection
20777 \begin_inset CommandInset label
20779 name "subsec:Automatical-Locking-Property"
20785 Automatic Locking Property
20788 \begin_layout Standard
20789 The above mentioned automatic setting of write permissions of the .lyx file
20795 ile\SpecialChar \menuseparator
20801 \begin_inset space ~
20804 Control\SpecialChar \menuseparator
20809 oggle locking property
20812 This command is active only when the file is not locked on the svn server
20814 you need to check-out before proceeding).
20817 \begin_layout Labeling
20818 \labelwidthstring 00.00.0000
20820 \begin_inset space ~
20826 \begin_layout Labeling
20827 \labelwidthstring 00.00.0000
20830 svn propset svn:needs-lock ON "<file-name>"
20833 \begin_layout Labeling
20834 \labelwidthstring 00.00.0000
20837 svn propdel svn:needs-lock "<file-name>"
20840 \begin_layout Subsubsection
20841 \begin_inset CommandInset label
20843 name "sub:VCS-Revision-Information"
20847 Revision Information in Documents
20850 \begin_layout Standard
20851 There are more possibilities how to activate revision information in our
20855 \begin_layout Itemize
20856 LyX supports directly:
20860 \begin_layout Itemize
20861 tree revision information (
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20872 The result is the output of the
20873 \begin_inset Flex Code
20876 \begin_layout Plain Layout
20882 command, the following table gives you an idea, how to read the results.
20885 \begin_layout Standard
20887 \begin_inset Tabular
20888 <lyxtabular version="3" rows="6" columns="2">
20889 <features rotate="0" tabularvalignment="middle">
20890 <column alignment="center" valignment="top">
20891 <column alignment="center" valignment="top">
20893 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20896 \begin_layout Plain Layout
20902 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20905 \begin_layout Plain Layout
20913 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20916 \begin_layout Plain Layout
20922 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20925 \begin_layout Plain Layout
20926 mixed revision working copy
20933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20936 \begin_layout Plain Layout
20942 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20945 \begin_layout Plain Layout
20946 modified working copy
20953 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20956 \begin_layout Plain Layout
20962 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20965 \begin_layout Plain Layout
20966 switched working copy
20973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20976 \begin_layout Plain Layout
20982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20985 \begin_layout Plain Layout
20986 partial working copy, from a sparse checkout
20993 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20996 \begin_layout Plain Layout
21002 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21005 \begin_layout Plain Layout
21006 mixed revision, modified, switched working copy
21019 \begin_layout Itemize
21020 file revision information.
21021 The result comes from parsing the output of
21022 \begin_inset Flex Code
21025 \begin_layout Plain Layout
21027 \begin_inset space ~
21031 \begin_inset space ~
21035 \begin_inset space ~
21044 Supported flags are:
21048 \begin_layout Itemize
21049 version number of the last commit (
21050 \begin_inset Flex Code
21053 \begin_layout Plain Layout
21062 \begin_layout Itemize
21063 author of the last commit (
21064 \begin_inset Flex Code
21067 \begin_layout Plain Layout
21076 \begin_layout Itemize
21077 date of the last commit (
21078 \begin_inset Flex Code
21081 \begin_layout Plain Layout
21090 \begin_layout Itemize
21091 time of the last commit (
21092 \begin_inset Flex Code
21095 \begin_layout Plain Layout
21105 \begin_layout Standard
21106 You can obtain this info via InsetInfo (e.g.
21108 \begin_inset Flex Code
21111 \begin_layout Plain Layout
21112 info-insert buffer vcs-date
21118 The information will be available only when you have the file stored under
21119 svn managment (i.e.
21121 \begin_inset Flex Code
21124 \begin_layout Plain Layout
21130 directory is available with your document).
21134 \begin_layout Itemize
21135 Another---a hacking one---possibility is to use svn keywords
21139 \begin_layout Plain Layout
21140 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21146 In short -- you set file keywords property (e.g.
21149 svn propset svn:keywords 'Rev' file.lyx
21151 ) and then paste keyword TeX code
21155 \begin_layout Plain Layout
21156 This is an easy way how to ensure that LyX won't break the line in the middle
21162 tag in your document (e.g.
21167 \begin_layout Plain Layout
21175 This way svn client will automatically substitute revision number (e.g.
21180 \begin_layout Plain Layout
21187 ) after each update and commit.
21188 There are more problems with this approach.
21189 Firstly, the '$' character is used in TeX world for math equations, so
21190 any occurence of math formula
21191 \begin_inset Formula $Rev$
21195 \begin_inset Formula $Rev:59$
21198 in your LyX document.
21199 Similarly for other keywords like Id, Date, Author, etc.
21200 Secondly svn output is dependent on your locales, so its very easy that
21201 svn would produce some problematic strings once Date is used.
21202 Thirdly you get the whole 'Rev: 59' string in your document instead of
21204 Until subversion implements user's custom keywords it will be hard to use
21205 this approach reliably or let LyX to support it directly.
21208 \begin_layout Subsection
21209 SVN and Windows Environment
21212 \begin_layout Quote
21213 My inclination is to say that if the user cannot figure out the command
21214 line operations on their own fairly quickly, they would be well advised
21215 to use TortoiseSVN.
21221 \begin_layout Subsubsection
21225 \begin_layout Standard
21226 In addition to installing LyX, and having access to a Subversion repository,
21227 the user will need to install the Subversion client program.
21228 A Windows installer for the client program is available from
21229 \begin_inset CommandInset href
21232 target "http://www.collab.net/nonav/downloads/subversion/"
21237 The user may also want to install
21238 \begin_inset CommandInset href
21241 target "http://tortoisesvn.tigris.org/"
21245 , which integrates Subversion operations into the context (rightclick) menu
21246 of Windows Explorer.
21247 Operations done outside LyX will typically be more convenient using the
21248 Explorer context menu.
21249 Note that TortoiseSVN is not a replacement for the client program, which
21250 is what LyX itself will use.
21253 \begin_layout Subsubsection
21254 Bringing a document under Subversion control
21257 \begin_layout Standard
21258 Before a LyX document can be brought under version control in Subversion,
21259 its parent directory needs to be under version control.
21260 If the document is being added to a project already in the repository,
21261 this is accomplished by checking the project out to the directory where
21262 the new document will be placed.
21263 If the project itself is not yet under version control (for instance, if
21264 this document starts a new project), the directory must be imported into
21266 This is done outside LyX.
21267 Both import and checkout are easily accomplished from the Explorer context
21268 menu using TortoiseSVN, or alternatively can be done using the command
21269 line client at a DOS prompt.
21270 The procedure for importing the project using TortoiseSVN is described
21271 below, assuming an existing repository and a new project being started
21279 For information on using the Subversion client program, run
21286 \begin_layout Enumerate
21293 in Windows Explorer, right click it, and select
21295 TortoiseSVN\SpecialChar \menuseparator
21299 If necessary, adjust the URL for the repository, then click OK.
21302 \begin_layout Enumerate
21303 Right click the level of the repository under which you want to place the
21304 new project folder (typically the top level) and click
21308 Supply a name for the project folder and click OK.
21309 Add a message for the log file if desired, then click OK again.
21310 The new project folder should appear in the repository.
21311 Finally, click OK again to exit the repository browser.
21314 \begin_layout Enumerate
21315 Once again right click
21321 , this time selecting SVN Checkout\SpecialChar \ldots{}
21322 Select the URL of the project folder
21323 you just created in the repository, and set the checkout directory to
21331 You will be warned about a non-empty folder; click OK to proceed.
21332 You should now have a
21343 \begin_layout Enumerate
21344 Create or open your document in LyX and click
21346 File\SpecialChar \menuseparator
21348 \begin_inset space ~
21351 Control\SpecialChar \menuseparator
21355 Add a log message and click OK to commit the document to version control.
21358 \begin_layout Standard
21359 From this point onward, you should have full functionality in the
21361 File\SpecialChar \menuseparator
21363 \begin_inset space ~
21369 You also have the option of checking the document in and out, viewing its
21371 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21372 client program from a command prompt.
21375 \begin_layout Subsubsection
21376 SSH tunnel used with SVN under Windows
21379 \begin_layout Standard
21380 Compared with Linux setting up an svn client to communicate over ssh under
21381 Windows is a rather troublesome task.
21382 We will at least offer some hints how to setup the client side but prior
21383 knowledge about ssh and the Windows command line is needed, also be prepared
21384 for a great deal of frustration\SpecialChar \ldots{}
21388 \begin_layout Enumerate
21389 Get an svn client for windows, as described in the previous sections.
21390 When it is a fresh install run some svn command (e.g.
21392 \begin_inset Flex Code
21395 \begin_layout Plain Layout
21401 ) to create config files, which you will need to change later on.
21404 \begin_layout Enumerate
21405 Choose an ssh client for Windows.
21406 There are several possibilities, we will use the one from Putty tools
21410 \begin_layout Plain Layout
21411 \begin_inset Flex URL
21414 \begin_layout Plain Layout
21416 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21427 You will need to set the connection up so that the client doesn't ask for
21428 any password from you.
21429 To keep things easy we will use only keys without any additional password
21434 \begin_layout Enumerate
21436 \begin_inset Flex Code
21439 \begin_layout Plain Layout
21446 Save your private .ppk key file and put the public one on the server side.
21447 If the SVN server runs on Linux, note that the format of the public key
21448 is not compatible with Linux openssh and you will need to direcly copy-paste
21451 Public key for pasting into OpenSSH authorized_keys file
21453 :” edit field into the server's
21454 \begin_inset Flex Code
21457 \begin_layout Plain Layout
21458 ~/.ssh/authorized_keys
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21476 \begin_layout Enumerate
21478 \begin_inset Flex Code
21481 \begin_layout Plain Layout
21488 In the SVN config file
21492 \begin_layout Plain Layout
21493 Exact path depends on Windows version, usually somewhere around
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21500 Documents and Settings
21514 \begin_inset Flex Code
21517 \begin_layout Plain Layout
21532 , section [tunnels], setup ssh command, e.g.
21534 \begin_inset Flex Code
21537 \begin_layout Plain Layout
21538 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21547 \begin_layout Plain Layout
21548 It will usually take a lot of time to get exact command right and it depends
21550 For example do not have some remote server saved as a default session in
21552 If things fail, try to connect via plink without SVN first.
21561 \begin_layout Enumerate
21562 Checkout the SVN archive, e.
21563 \begin_inset space \thinspace{}
21567 \begin_inset Newline newline
21571 \begin_inset Flex Code
21574 \begin_layout Plain Layout
21575 svn co svn+ssh://user@server/repository_path
21583 \begin_layout Subsubsection
21584 End-of-Line Conversions
21587 \begin_layout Standard
21588 When the collaborators are mixing Linux and Windows environments, LyX will
21589 use different line endings inside the .lyx files.
21590 This is not a problem as far as LyX functionality is concerned, but the
21591 commit diffs will be huge and merge-conflicts prone.
21592 Fortunately SVN itself knows
21596 \begin_layout Plain Layout
21597 \begin_inset Flex URL
21600 \begin_layout Plain Layout
21602 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21612 how to deal with CR/LF problems when switching .lyx files to the
21613 \begin_inset Flex Code
21616 \begin_layout Plain Layout
21626 \begin_layout Plain Layout
21628 \begin_inset Flex Code
21631 \begin_layout Plain Layout
21632 svn propset svn:eol-style native FILE_NAME
21645 \begin_layout Subsection
21646 GIT commands in LyX
21649 \begin_layout Standard
21650 A minimal subset of GIT commands is now supported by LyX.
21651 You can find the commands in the
21653 File\SpecialChar \menuseparator
21655 \begin_inset space ~
21661 Please note that if you use password protected access to repository via
21662 ssh, you will be asked in terminal window.
21663 LyX was tested against GIT 1.7.
21666 \begin_layout Standard
21667 One big difference of GIT and the other supported version control systems
21668 is the distributed nature of GIT: With traditional version control systems
21669 there is one central server which hosts the repository.
21670 Users commit their changes to the server, and get updates made by other
21672 With GIT, users commit to a local repository.
21673 The local repository can be synchronized with one or more remote repositories
21675 \begin_inset Flex Code
21678 \begin_layout Plain Layout
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21695 LyX does not interact in any way with remote GIT repositories.
21696 It works exclusively with the local repository in a very similar way as
21697 with a central CVS or SVN repository.
21698 If you use remote GIT repositories you need to do the
21699 \begin_inset Flex Code
21702 \begin_layout Plain Layout
21709 \begin_inset Flex Code
21712 \begin_layout Plain Layout
21718 operations with your favourite GIT client.
21721 \begin_layout Subsubsection
21727 \begin_layout Standard
21728 If your document is not under revision control, this is the only item shown
21730 And if it is under revision control, the
21737 item is not visible.
21740 \begin_layout Standard
21741 This command registers in GIT your document ONLY in case you have already
21742 the documents directory under GIT control (in particular
21747 This means you have to checkout the archive by yourself.
21750 \begin_layout Standard
21751 Then you are asked interactively to supply an initial description of the
21753 Don't forget that registered file is not yet commited.
21756 \begin_layout Standard
21757 GIT command that is run:
21760 \begin_inset Quotes eld
21764 \begin_inset Quotes erd
21770 \begin_layout Standard
21775 to understand the switches.
21778 \begin_layout Subsubsection
21784 \begin_layout Standard
21785 When you are finished editing a file, you commit your changes.
21786 When you do this, you are asked for a description of the changes.
21787 After that changes are commited.
21790 \begin_layout Standard
21793 git commit -q -m"<description>" <file-name>
21796 \begin_layout Subsubsection
21799 Revert To Repository Version
21802 \begin_layout Standard
21803 This will discard all changes made to the document since the last check
21805 You get a warning before changes are discarded.
21808 \begin_layout Standard
21812 \begin_inset Quotes eld
21816 \begin_inset Quotes erd
21822 \begin_layout Subsubsection
21828 \begin_layout Standard
21829 This will rename the current document including the version history.
21830 It requires a clean document without any changes since the last checkin.
21831 You are asked for a file name and a description of the rename operation.
21832 After that the document is renamed, both locally and in the repository.
21833 If the parent directories of the new and old file names differ, all relative
21834 paths of included files are adjusted (like in
21836 File\SpecialChar \menuseparator
21839 \SpecialChar \ldots{}
21841 Finally, the document is reloaded using the new name.
21844 \begin_layout Labeling
21845 \labelwidthstring 00.00.0000
21847 \begin_inset space ~
21851 \begin_inset space ~
21855 \begin_inset Newline newline
21859 \begin_inset Flex Code
21862 \begin_layout Plain Layout
21866 \begin_inset Quotes eld
21870 \begin_inset Quotes erd
21874 \begin_inset Quotes eld
21878 \begin_inset Quotes erd
21887 \begin_inset Newline newline
21891 \begin_inset Flex Code
21894 \begin_layout Plain Layout
21903 \begin_layout Subsubsection
21909 \begin_layout Standard
21910 This shows the complete history of the GIT document.
21914 \begin_inset Quotes eld
21918 \begin_inset Quotes erd
21923 is shown in a browser.
21926 \begin_layout Subsubsection
21930 \begin_layout Standard
21931 LyX supports GIT hash number of the last commit to the file, author name,
21932 date and time of last commit.
21933 All those are extracted from
21935 git log -n 1 --pretty=format:%H%n%an%n%ai
21938 Tree version information is obtained via
21940 git describe --abbrev --dirty --long
21944 \begin_inset CommandInset ref
21946 reference "sub:VCS-Revision-Information"
21953 \begin_layout Subsection
21957 \begin_layout Standard
21958 With the recent addition of the vc-command function LyX power users are
21959 allowed to create their own commands for revision control.
21962 \begin_layout Standard
21963 As an example you can see how two TortoiseSVN commands could be integrated
21967 \begin_layout Description
21969 \begin_inset Flex Code
21972 \begin_layout Plain Layout
21973 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21981 \begin_layout Description
21983 \begin_inset Flex Code
21986 \begin_layout Plain Layout
21987 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21995 \begin_layout Subsection
21996 Version control and Document comparison
21999 \begin_layout Standard
22000 One of the typical uses of version control is to inspect the changes between
22001 revisions, usually by creating
22002 \begin_inset Flex Code
22005 \begin_layout Plain Layout
22012 While this is useful for plain text files, it is much less useful in the
22013 case of LyX files, which have more a complicated structure.
22014 Hence we provide binding to the Document comparison feature.
22015 There are two ways of calling this feature - either by direct call of
22016 \begin_inset Flex Code
22019 \begin_layout Plain Layout
22025 LyX function (for details see LyX functions manual) or by icon/menu item
22027 \begin_inset Flex MenuItem
22030 \begin_layout Plain Layout
22031 Compare with older revision...
22037 One can either compare two chosen revisions of the document or he can simply
22038 compare the current version of edited text with older revisions (where
22040 \begin_inset Flex MenuItem
22043 \begin_layout Plain Layout
22049 ' revisions back means comparison of the edited file with last commited
22054 \begin_layout Standard
22055 This feature is supported for SVN and RCS though due to the more complicated
22056 versioning scheme of RCS there is a constraint -- when addressing the revisions
22057 in dialog, numbers always point to the last number in RCS revision number,
22060 We don't currently support GIT addressing of revisions, one can just compare
22061 edited document with its revision X steps backs, where X is addressed as
22065 \begin_layout Section
22066 Literate Programming
22069 \begin_layout Standard
22074 (kayvan@sylvan.com)
22078 original documentation written by
22080 Edmar Wienskoski Jr.
22083 (edmar-w-jr@technologist.com)
22086 \begin_layout Subsection
22090 \begin_layout Standard
22091 The main purpose of this documentation is to show you how to use LyX for
22092 literate programming, where it is assumed that you are familiar with this
22093 programming technique, and know what
22094 \begin_inset Quotes eld
22098 \begin_inset Quotes erd
22102 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22110 If that is not the case, please follow the web links provided in the following
22112 There is a lot of good documentation out there covering old development
22113 history to the latest tools tips.
22116 \begin_layout Standard
22117 It is also assumed that you are familiar with LyX itself to a point that
22118 you are comfortable changing your LyX preferences, and X resources file.
22119 If that is not the case please refer to other LyX documentation to cover
22120 your specific needs.
22123 \begin_layout Subsection
22124 Literate Programming
22127 \begin_layout Standard
22128 From the Literate Programming FAQ:
22131 \begin_layout Quotation
22132 Literate programming is the combination of documentation and source together
22133 in a fashion suited for reading by human beings.
22134 In fact, literate programs should be enjoyable reading, even inviting!
22135 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22136 and documentation in a single file.
22137 Literate programming tools then parse the file to produce either readable
22138 documentation or compilable source.
22139 The WEB style of literate programming was created by D.
22140 \begin_inset space \thinspace{}
22144 Knuth during the development of his TeX typesetting software.
22148 \begin_layout Standard
22149 Another excerpt says:
22152 \begin_layout Quotation
22155 How is literate programming different from verbose commenting?
22158 \begin_layout Quotation
22159 There are three distinguishing characteristics.
22160 In order of importance, they are:
22164 \begin_layout Itemize
22165 flexible order of elaboration
22168 \begin_layout Itemize
22169 automatic support for browsing
22172 \begin_layout Itemize
22173 typeset documentation, especially diagrams and mathematics
22177 \begin_layout Standard
22178 Now that I sparked your curiosity, take a look in the references.
22181 \begin_layout Subsubsection
22185 \begin_layout Standard
22186 The complete Literate Programming FAQ can be found at:
22189 \begin_layout Quote
22190 Literate Programming FAQ
22191 \begin_inset Flex URL
22194 \begin_layout Plain Layout
22196 http://www.literateprogramming.com/lpfaq.pdf
22204 \begin_layout Standard
22205 The FAQ lists 23 (twenty three!) different literate programming tools.
22206 Where some are specialized or
22207 \begin_inset Quotes eld
22211 \begin_inset Quotes erd
22214 for particular programming languages, while other have general scope.
22219 for my own use for several reasons:
22222 \begin_layout Itemize
22223 It can generate the documentation either in LaTeX or HTML.
22226 \begin_layout Itemize
22227 It has a open architecture, i.
22228 \begin_inset space \thinspace{}
22232 \begin_inset space \space{}
22235 it is easy to plug in new filters and to perform special processing that
22240 \begin_layout Itemize
22241 There is a good selection of filters available already (the HTML is one
22245 \begin_layout Itemize
22249 \begin_layout Standard
22250 The Noweb web page can be found at:
22253 \begin_layout Quote
22255 \begin_inset Flex URL
22258 \begin_layout Plain Layout
22260 http://www.cs.virginia.edu/~nr/noweb/
22268 \begin_layout Standard
22269 Starting from there you can reach many other interesting links and even
22270 some literate program examples.
22273 \begin_layout Subsection
22274 LyX and Literate Programming with Noweb
22277 \begin_layout Standard
22278 The LyX support for Literate Programming is provided by using the generic
22279 LyX converters mechanism.
22280 This support is provided in a
22281 \begin_inset Quotes eld
22285 \begin_inset Quotes erd
22289 \begin_inset space \thinspace{}
22293 \begin_inset space \space{}
22296 you will be able to use this new LyX feature with some other literate programmin
22297 g tool of your choice by just changing your LyX preferences.
22300 \begin_layout Subsubsection
22301 Generating documents and code (weaving and tangling)
22304 \begin_layout Paragraph
22305 Using the noweb module
22308 \begin_layout Standard
22309 If you have installed Noweb and LyX successfully, whenever you open a new
22310 document, after you have chosen its document class, use the Document->Settings
22312 \begin_inset Quotes eld
22316 \begin_inset Quotes erd
22320 If Noweb is correctly installed, when you click on the
22321 \begin_inset Quotes eld
22325 \begin_inset Quotes erd
22328 link, you will see the
22329 \begin_inset Quotes eld
22333 \begin_inset Quotes erd
22336 module in the available list and you can add it to your document.
22339 \begin_layout Paragraph
22343 \begin_layout Standard
22344 LyX enables you to write code with a layout named
22345 \begin_inset Flex Noun
22348 \begin_layout Plain Layout
22355 Noweb delimits chunks like this:
22358 \begin_layout LyX-Code
22362 \begin_layout LyX-Code
22366 \begin_layout LyX-Code
22370 \begin_layout LyX-Code
22374 \begin_layout LyX-Code
22378 \begin_layout Standard
22379 The problem is that whatever is written in between the << and the
22383 must be taken literally, i.
22384 \begin_inset space \thinspace{}
22388 \begin_inset space \space{}
22391 LyX should be prevented from making any special interpretation of what has
22393 This is also handled by
22394 \begin_inset Flex Noun
22397 \begin_layout Plain Layout
22403 , that works like a normal paragraph but has a free spacing capability.
22406 \begin_layout Standard
22407 As a special note, you can also use the
22408 \begin_inset Quotes eld
22412 \begin_inset Quotes erd
22415 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22419 \begin_layout LyX-Code
22423 \begin_layout LyX-Code
22424 def some_function(args):
22427 \begin_layout LyX-Code
22428 "This is the doc string for this function."
22431 \begin_layout LyX-Code
22432 print "My args: ", args
22435 \begin_layout LyX-Code
22436 @ %def some_function
22439 \begin_layout Standard
22440 For an example of this usage and the resulting cross-reference output, look
22441 at the Literate python program in
22443 LIBDIR/examples/listerrors.lyx
22445 which should make this all clear.
22448 \begin_layout Paragraph
22449 Generating the documentation
22452 \begin_layout Standard
22453 At this point you already have a new document file with a proper document
22454 class, and with some code and text on it.
22455 How do I print it? The answer is simple, you select
22457 View\SpecialChar \menuseparator
22461 Just like you would do for a plain document.
22462 No special procedure is required.
22465 \begin_layout Standard
22466 To help orientate you, I will now explain what happens inside LyX:
22469 \begin_layout Enumerate
22472 Update\SpecialChar \menuseparator
22475 menu option is chosen, a LaTeX file is generated.
22480 \begin_layout Standard
22481 If the document is of any literate class the generated file will be named
22482 with an extension name defined by the
22483 \begin_inset Quotes eld
22487 \begin_inset Quotes erd
22490 format (defined in the Preferences panel), otherwise the file will have
22499 \begin_layout Enumerate
22500 Note that the only difference so far is in the name of the file, no special
22501 processing is required by LyX.
22502 Given that you formatted the code using the
22503 \begin_inset Flex Noun
22506 \begin_layout Plain Layout
22512 layout that, by itself, takes care of the business.
22515 \begin_layout Enumerate
22516 If the document is of any literate class LyX will then use the internal
22517 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22521 \begin_layout Plain Layout
22522 The converters are defined in the
22524 Tools\SpecialChar \menuseparator
22528 \begin_inset Quotes eld
22532 \begin_inset Quotes erd
22544 manual for general information about converters.
22549 to generate the LaTeX file.
22553 \begin_layout Standard
22554 Otherwise it will just skip this step.
22558 \begin_layout Enumerate
22559 Finally, LaTeX is invoked and the regular post processing continues as in
22563 \begin_layout Standard
22564 Independence from a particular
22565 \begin_inset Quotes eld
22569 \begin_inset Quotes erd
22572 is easily achieved by changing the commands that are run by the various
22576 \begin_layout Paragraph
22577 Generating the code
22580 \begin_layout Standard
22581 When the build menu option is chosen or the corresponding button in the
22582 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22583 Next, LyX invokes the
22588 This converter needs to be defined by the user and is not installed by
22589 default, though the Program format is.
22590 This converter (like any other converter) will have two parts:
22593 \begin_layout Enumerate
22594 The converter program itself.
22595 This program performs the conversion from the one format to the other (in
22596 this case, from the Noweb format to the Program pseudo-format).
22599 \begin_layout Enumerate
22600 The error log parser.
22601 This is a program whose sole purpose is to rewrite error messages in a
22602 format that LyX understands.
22603 This makes it possible for LyX to place error boxes in the right places
22604 in the file buffer.
22607 \begin_layout Standard
22608 The first part, the
22609 \begin_inset Quotes eld
22613 \begin_inset Quotes erd
22616 setting, should be set to
22617 \begin_inset Newline newline
22621 \begin_inset Quotes eld
22629 \begin_inset Quotes erd
22633 \begin_inset Newline newline
22636 This basically means that LyX will call
22637 \begin_inset Quotes eld
22641 \begin_inset Quotes erd
22644 (a program or script) with the name of the Noweb file (normally a file
22645 in the LyX temp directory) and the directory path of the original LyX file.
22649 \begin_layout Standard
22650 This is an implementation of
22651 \begin_inset Quotes eld
22655 \begin_inset Quotes erd
22658 that you can place in a directory on your path:
22661 \begin_layout Standard
22662 \begin_inset VSpace defskip
22668 \begin_layout Standard
22669 \begin_inset Newpage pagebreak
22675 \begin_layout Standard
22681 \begin_layout Standard
22687 \begin_layout Standard
22690 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22693 \begin_layout Standard
22694 \begin_inset VSpace defskip
22700 \begin_layout Standard
22701 The next part of the converter setting is the
22702 \begin_inset Quotes eld
22706 \begin_inset Quotes erd
22709 which is to be set to
22710 \begin_inset Newline newline
22714 \begin_inset Quotes eld
22719 parselog=$$s/scripts/listerrors
22722 \begin_inset Quotes erd
22726 \begin_inset Newline newline
22729 This will run any errors that are generated by the
22730 \begin_inset Quotes eld
22734 \begin_inset Quotes erd
22737 process through the
22738 \begin_inset Quotes eld
22742 \begin_inset Quotes erd
22748 \begin_layout Standard
22749 The build will normally take place in LyX's temporary directory, so the
22750 files produced by the conversion will be in that directory.
22751 LyX will copy out what it regards as the `main' file, but the
22755 conversion may produce several files, and so most of these would then be
22756 deleted when LyX was closed.
22757 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22758 the build-script chunk can place the generated files in that location.
22761 \begin_layout Paragraph
22762 Build instructions in the document
22765 \begin_layout Standard
22766 The last piece of the integration between LyX and noweb is the
22767 \begin_inset Quotes eld
22771 \begin_inset Quotes erd
22775 Generally, the instructions for building your program should be embedded
22776 in a chunk of its own.
22778 \begin_inset Quotes eld
22782 \begin_inset Quotes erd
22785 above uses the notangle command to look for this chunk (called
22786 \begin_inset Quotes eld
22790 \begin_inset Quotes erd
22793 ) and runs its contents through
22794 \begin_inset Quotes eld
22798 \begin_inset Quotes erd
22804 \begin_layout Standard
22805 Typically, such a chunk would look something like this:
22808 \begin_layout LyX-Code
22812 \begin_layout LyX-Code
22814 \begin_inset Newline newline
22817 if [ -z "${NOWEB_SOURCE}" ]
22818 \begin_inset Newline newline
22824 \begin_layout LyX-Code
22825 NOWEB_SOURCE=myfile.nw
22826 \begin_inset Newline newline
22830 \begin_inset Newline newline
22834 code to extract files ...
22835 use NOWEB_OUTPUT_DIR here ...]
22836 \begin_inset Newline newline
22840 code to compile files ...]
22841 \begin_inset Newline newline
22847 \begin_layout Standard
22850 LIBDIR/examples/listerrors.lyx
22854 LIBDIR/examples/Literate.lyx
22856 which implement two versions of the
22857 \begin_inset Quotes eld
22861 \begin_inset Quotes erd
22864 program for some illustrations of how all of these pieces go together or
22867 LIBDIR/examples/noweb2lyx.lyx.
22870 Interestingly, these three files show off the language-indepence of the
22871 LyX literate programming support since they are written in Python, C and
22875 \begin_layout Subsubsection
22879 \begin_layout Standard
22880 All the Literate Programming support is configured by the
22882 Tools\SpecialChar \menuseparator
22886 \begin_inset Quotes eld
22890 \begin_inset Quotes erd
22894 The important parts are:
22897 \begin_layout Description
22899 \begin_inset space ~
22903 \begin_inset Quotes eld
22907 \begin_inset Quotes erd
22911 \begin_inset space ~
22914 format Set up via the File Formats tab, this is where the Noweb-specific
22924 , the file extension is set to
22929 This tells LyX to create a file with a
22933 extension in the first step of the conversion process.
22936 \begin_layout Description
22938 \begin_inset space ~
22946 \begin_inset space ~
22949 format This is an empty format whose sole purpose is to be the endpoint
22950 of a conversion (which then allows us to set up a converter for it).
22953 \begin_layout Description
22962 This converter performs the
22963 \begin_inset Quotes eld
22967 \begin_inset Quotes erd
22970 of the literate document.
22971 For Noweb, it is set to
22972 \begin_inset Quotes eld
22977 noweave -delay -index $$i > $$o
22980 \begin_inset Quotes erd
22986 \begin_layout Description
22996 \begin_inset Quotes eld
23000 \begin_inset Quotes erd
23004 As stated above, the Converter is set to
23005 \begin_inset Quotes eld
23013 \begin_inset Quotes erd
23016 , with Flags set to
23017 \begin_inset Newline newline
23021 \begin_inset Quotes eld
23026 parselog=$$s/scripts/listerrors
23029 \begin_inset Quotes erd
23035 \begin_layout Subsubsection
23039 \begin_layout Standard
23040 There is also a new function implemented in the LyX server, the
23041 \begin_inset Quotes eld
23044 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23048 \begin_layout Standard
23049 When debugging code with ddd/gdb, it is possible to invoke a text editor
23050 at the current execution position with a single key stroke.
23051 The default ddd configuration for that is shift-ctrl-V.
23052 It happens that you can define the editor command line invocation in ddd
23055 Edit\SpecialChar \menuseparator
23056 Preferences\SpecialChar \menuseparator
23059 dialog and changing the "Edit Sources" entry.
23062 \begin_layout Standard
23063 I take advantage of the newly created LyX server function and this ddd feature,
23065 \begin_inset Quotes eld
23069 \begin_inset Quotes erd
23075 \begin_layout Standard
23076 \begin_inset VSpace defskip
23082 \begin_layout Standard
23085 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23088 \begin_layout Standard
23089 \begin_inset VSpace defskip
23095 \begin_layout Standard
23096 With this, whenever you are using ddd and find a point in the program that
23097 you want to edit, you just press shift-ctrl-V (in the ddd window), and
23098 ddd will forward this information to LyX through the LyX server and then
23099 the LyX window will show the same file with the cursor at the same position
23100 ddd was pointing to.
23101 No more guessing or long scrolling to locate a point in the program back
23105 \begin_layout Standard
23106 Note however that you must enable the LyX server to get this feature working
23107 (it is disabled by default).
23108 You can enable it in
23120 ) by entering in the
23125 \begin_inset Quotes eld
23130 /home/<your-home-directory>/.lyx/lyxpipe
23133 \begin_inset Quotes erd
23139 \begin_layout Standard
23140 Read the LyX server documentation in the
23142 Customization Manual
23144 for further information.
23147 \begin_layout Subsubsection
23151 \begin_layout Standard
23152 There are six new buttons that can be added to your LyX toolbar.
23153 Five of these buttons are short cuts to layout styles:
23174 The last one is a short cut to the
23175 \begin_inset Quotes eld
23179 \begin_inset Quotes erd
23186 \begin_layout Standard
23187 LyX has a range of buttons that are available for tool bar customization.
23188 In my toolbar I like to combine the six short cuts above with two more:
23193 \SpecialChar \menuseparator
23198 \SpecialChar \menuseparator
23205 Document\SpecialChar \menuseparator
23206 View\SpecialChar \menuseparator
23210 Here is how it looks like:
23213 \begin_layout LyX-Code
23217 \begin_layout LyX-Code
23221 \begin_layout LyX-Code
23222 Icon "layout Standard"
23225 \begin_layout LyX-Code
23226 Icon "layout Section"
23229 \begin_layout LyX-Code
23230 Icon "layout LaTeX"
23233 \begin_layout LyX-Code
23234 Icon "layout LyX-Code"
23237 \begin_layout LyX-Code
23238 Icon "layout Chunk"
23241 \begin_layout LyX-Code
23245 \begin_layout LyX-Code
23249 \begin_layout LyX-Code
23250 Icon "buffer-typeset"
23253 \begin_layout LyX-Code
23254 Icon "build-program"
23257 \begin_layout LyX-Code
23261 \begin_layout LyX-Code
23265 \begin_layout LyX-Code
23269 \begin_layout LyX-Code
23273 \begin_layout LyX-Code
23277 \begin_layout Subsubsection
23278 Colors customization
23281 \begin_layout Standard
23282 There are a number of colors in LyX that can be customized in
23287 One of the things that bothers people is the LaTeX font color.
23288 The default color is red, since the chunks uses LaTeX font, and there is
23289 a lot of chunks in literate documents, you may get tired of seeing everything
23291 You can change it by going to the tabs
23300 \begin_layout Standard
23301 The next thing is the visible presence of the newline character in the screen.
23302 You can choose the color of this particular character and make it blend
23304 I recommend you choosing a color that is close to the background but not
23305 equal, that way you still can see it is there, but it is not bothering
23309 \begin_layout Subsection
23310 LyX and knitr/Sweave
23313 \begin_layout Standard
23322 is documented in the
23326 example file and in the Sweave manual (menu
23328 Help\SpecialChar \menuseparator
23334 \begin_layout Chapter
23338 \begin_layout Standard
23339 You can do everything with LyX that you can do with LaTeX.
23340 However, LyX cannot support every LaTeX feature directly.
23341 But you can always use TeX Code.
23342 This chapter shows you some more special things you might want to use.
23343 For other special things you can do with figures, tables, floats, boxes
23344 and notes, have a look at the
23347 \begin_inset space ~
23355 \begin_layout Section
23356 Multiple Text Columns
23359 \begin_layout Standard
23360 This feature is independent of the option
23362 Two-column document
23364 in the document settings under
23369 If you want to have 2
23370 \begin_inset space ~
23373 columns for the whole document, it is recommended to use the
23375 Two-column document
23378 For all other cases use this feature.
23381 \begin_layout Standard
23382 To use multiple text columns in your document, you have to load the module
23389 Document\SpecialChar \menuseparator
23390 Settings\SpecialChar \menuseparator
23393 ) and must have the LaTeX-package
23400 \begin_layout Standard
23401 Footnotes within multiple columns will be placed at the bottom of the page
23402 and not under each column.
23403 Within the different columns you can use everything, with the limitation
23404 that for floats you need to use the float option
23411 \begin_layout Subsection
23415 \begin_layout Standard
23416 If you want to have 2
23417 \begin_inset space ~
23420 columns in your text, insert a multicolumn inset via the menu
23422 Insert\SpecialChar \menuseparator
23424 \begin_inset space ~
23427 Insets\SpecialChar \menuseparator
23429 \begin_inset space ~
23434 where the columns should start.
23435 Write all text that should be printed in 2
23436 \begin_inset space ~
23439 columns into this inset.
23442 \begin_layout Standard
23443 Here is an example:
23446 \begin_layout Standard
23448 \begin_inset Flex Multiple Columns
23451 \begin_layout Plain Layout
23456 The Adventure of the Empty House
23459 \begin_inset Newline newline
23462 by Sir Arthur Conan Doyle
23465 \begin_layout Plain Layout
23468 It was in the spring of the year 1894 that all London was interested, and
23469 the fashionable world dismayed, by the murder of the Honourable Ronald
23470 Adair under most unusual and inexplicable circumstances.
23471 The public has already learned those particulars of the crime which came
23472 out in the police investigation, but a good deal was suppressed upon that
23473 occasion, since the case for the prosecution was so overwhelmingly strong
23474 that it was not necessary to bring forward all the facts.
23475 Only now, at the end of nearly ten years, am I allowed to supply those
23476 missing links which make up the whole of that remarkable chain.
23477 The crime was of interest in itself, but that interest was as nothing to
23478 me compared to the inconceivable sequel, which afforded me the greatest
23479 shock and surprise of any event in my adventurous life.
23480 Even now, after this long interval, I find myself thrilling as I think
23481 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23482 ty which utterly submerged my mind.
23483 Let me say to that public, which has shown some interest in those glimpses
23484 which I have occasionally given them of the thoughts and actions of a very
23485 remarkable man, that they are not to blame me if I have not shared my knowledge
23486 with them, for I should have considered it my first duty to do so, had
23487 I not been barred by a positive prohibition from his own lips, which was
23488 only withdrawn upon the third of last month.
23496 \begin_layout Standard
23497 To get 3 or more columns, set the cursor into the multicolumn inset and
23500 Insert\SpecialChar \menuseparator
23502 \begin_inset space ~
23506 \begin_inset space ~
23512 The number of the desired columns is written into that inset (for 3
23513 \begin_inset space ~
23517 \begin_inset Quotes eld
23521 \begin_inset Quotes erd
23525 \begin_inset Newline newline
23528 Here is an example with 3
23529 \begin_inset space ~
23535 \begin_layout Standard
23536 \begin_inset Flex Multiple Columns
23539 \begin_layout Plain Layout
23542 \begin_inset Argument 1
23545 \begin_layout Plain Layout
23551 It can be imagined that my close intimacy with Sherlock Holmes had interested
23552 me deeply in crime, and that after his disappearance I never failed to
23553 read with care the various problems which came before the public.
23554 And I even attempted, more than once, for my own private satisfaction,
23555 to employ his methods in their solution, though with indifferent success.
23556 There was none, however, which appealed to me like this tragedy of Ronald
23558 As I read the evidence at the inquest, which led up to a verdict of willful
23559 murder against some person or persons unknown, I realized more clearly
23560 than I had ever done the loss which the community had sustained by the
23561 death of Sherlock Holmes.
23562 There were points about this strange business which would, I was sure,
23563 have specially appealed to him, and the efforts of the police would have
23564 been supplemented, or more probably anticipated, by the trained observation
23565 and the alert mind of the first criminal agent in Europe.
23566 All day, as I drove upon my round, I turned over the case in my mind and
23567 found no explanation which appeared to me to be adequate.
23568 At the risk of telling a twice-told tale, I will recapitulate the facts
23569 as they were known to the public at the conclusion of the inquest.
23577 \begin_layout Standard
23578 You can have up to 10
23579 \begin_inset space ~
23582 columns if you want to, but that might not be very pleasant for the readers
23586 \begin_layout Standard
23587 \begin_inset Newpage newpage
23593 \begin_layout Subsection
23594 Columns inside Columns
23597 \begin_layout Standard
23598 You can also have columns inside columns:
23601 \begin_layout Standard
23602 \begin_inset Flex Multiple Columns
23605 \begin_layout Plain Layout
23608 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23609 at that time governor of one of the Australian colonies.
23610 Adair's mother had returned from Australia to undergo the operation for
23611 cataract, and she, her son Ronald, and her daughter Hilda were living together
23615 \begin_layout Plain Layout
23616 \begin_inset Flex Multiple Columns
23619 \begin_layout Plain Layout
23622 The youth moved in the best society–had, so far as was known, no enemies
23623 and no particular vices.
23624 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23625 had been broken off by mutual consent some months before, and there was
23626 no sign that it had left any very profound feeling behind it.
23627 For the rest {sic} the man's life moved in a narrow and conventional circle,
23628 for his habits were quiet and his nature unemotional.
23629 Yet it was upon this easy-going young aristocrat that death came, in most
23630 strange and unexpected form, between the hours of ten and eleven-twenty
23631 on the night of March 30, 1894.
23639 \begin_layout Plain Layout
23642 Ronald Adair was fond of cards–playing continually, but never for such stakes
23644 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23645 It was shown that, after dinner on the day of his death, he had played
23646 a rubber of whist at the latter club.
23647 He had also played there in the afternoon.
23652 The evidence of those who had played with him– Mr.
23653 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23654 and that there was a fairly equal fall of the cards.
23655 Adair might have lost five pounds, but not more.
23656 His fortune was a considerable one, and such a loss could not in any way
23658 He had played nearly every day at one club or other, but he was a cautious
23659 player, and usually rose a winner.
23660 It came out in evidence that, in partnership with Colonel Moran, he had
23661 actually won as much as four hundred and twenty pounds in a sitting, some
23662 weeks before, from Godfrey Milner and Lord Balmoral.
23663 So much for his recent history as it came out at the inquest.
23671 \begin_layout Subsection
23675 \begin_layout Standard
23676 The examples in this section show some more special features of multiple
23680 \begin_layout Standard
23681 For more features of multiple columns, have a look at the documentation
23682 of the LaTeX-package
23687 \begin_inset CommandInset citation
23696 \begin_layout Subsubsection
23700 \begin_layout Standard
23701 To add a preface text for multiple columns, set the cursor into the multicolumn
23702 inset and use the menu
23704 Insert\SpecialChar \menuseparator
23708 Write your preface text into that inset.
23709 \begin_inset Newline newline
23712 This is an example with some preface text:
23715 \begin_layout Standard
23716 \begin_inset VSpace bigskip
23722 \begin_layout Standard
23723 \begin_inset Flex Multiple Columns
23726 \begin_layout Plain Layout
23727 \begin_inset Argument 2
23730 \begin_layout Plain Layout
23731 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23739 On the evening of the crime, he returned from the club exactly at ten.
23740 His mother and sister were out spending the evening with a relation.
23741 The servant deposed that she heard him enter the front room on the second
23742 floor, generally used as his sitting-room.
23743 She had lit a fire there, and as it smoked she had opened the window.
23744 No sound was heard from the room until eleven-twenty, the hour of the return
23745 of Lady Maynooth and her daughter.
23746 Desiring to say good-night, she attempted to enter her son's room.
23747 The door was locked on the inside, and no answer could be got to their
23748 cries and knocking.
23749 Help was obtained, and the door forced.
23750 The unfortunate young man was found lying near the table.
23751 His head had been horribly mutilated by an expanding revolver bullet, but
23752 no weapon of any sort was to be found in the room.
23760 \begin_layout Standard
23761 You can also use a section heading as the preface if you use a section command
23763 For example the command
23766 \begin_layout Standard
23771 subsection{subsection title}
23774 \begin_layout Standard
23775 creates a subsection.
23776 In this example the preface is a subsubsection:
23779 \begin_layout Standard
23780 \begin_inset Flex Multiple Columns
23783 \begin_layout Plain Layout
23784 \begin_inset Argument 2
23787 \begin_layout Plain Layout
23791 \begin_layout Plain Layout
23800 This is a subsubsection heading as a preface
23804 \begin_layout Plain Layout
23818 A minute examination of the circumstances served only to make the case more
23820 In the first place, no reason could be given why the young man should have
23821 fastened the door upon the inside.
23822 There was the possibility that the murderer had done this, and had afterwards
23823 escaped by the window.
23824 The drop was at least twenty feet, however, and a bed of crocuses in full
23826 Neither the flowers nor the earth showed any sign of having been disturbed,
23827 nor were there any marks upon the narrow strip of grass which separated
23828 the house from the road.
23829 Apparently, therefore, it was the young man himself who had fastened the
23831 But how did he come by his death? No one could have climbed up to the window
23832 without leaving traces.
23833 Suppose a man had fired through the window, he would indeed be a remarkable
23834 shot who could with a revolver inflict so deadly a wound.
23835 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23836 a hundred yards of the house.
23837 No one had heard a shot.
23845 \begin_layout Standard
23846 If there is less vertical space than 6
23847 \begin_inset space ~
23850 text lines is left on the page at the beginning of the multiple columns,
23851 a page break will be inserted before the multiple columns.
23852 Depending on the number of lines of the preface text, you might want to
23854 This is done by setting the cursor into the mulitcolumn inset behind the
23855 preface (if there is any) and using the menu
23857 Insert\SpecialChar \menuseparator
23859 \begin_inset space ~
23863 \begin_inset space ~
23867 \begin_inset space ~
23873 Insert into that inset the amount of space like e.
23874 \begin_inset space \thinspace{}
23878 \begin_inset space \space{}
23882 \begin_inset Quotes eld
23886 \begin_inset Quotes erd
23890 \begin_inset Newline newline
23893 In this example the space is set to 7
23894 \begin_inset space ~
23897 text lines by using
23898 \begin_inset Quotes eld
23904 \begin_inset Quotes erd
23913 needs to be inserted as TeX code):
23916 \begin_layout Standard
23917 \begin_inset Flex Multiple Columns
23920 \begin_layout Plain Layout
23921 \begin_inset Argument 3
23924 \begin_layout Plain Layout
23929 \begin_layout Plain Layout
23945 On the evening of the crime, he returned from the club exactly at ten.
23946 His mother and sister were out spending the evening with a relation.
23947 The servant deposed that she heard him enter the front room on the second
23948 floor, generally used as his sitting-room.
23949 She had lit a fire there, and as it smoked she had opened the window.
23950 No sound was heard from the room until eleven-twenty, the hour of the return
23951 of Lady Maynooth and her daughter.
23952 Desiring to say good-night, she attempted to enter her son's room.
23953 The door was locked on the inside, and no answer could be got to their
23954 cries and knocking.
23955 Help was obtained, and the door forced.
23956 The unfortunate young man was found lying near the table.
23957 His head had been horribly mutilated by an expanding revolver bullet, but
23958 no weapon of any sort was to be found in the room.
23966 \begin_layout Subsubsection
23970 \begin_layout Standard
23971 The amount of space before and after multiple columns can be changed by
23972 changing the length
23979 For example the command
23982 \begin_layout Standard
23992 \begin_layout Standard
23993 in TeX Code changes its value to 3
23994 \begin_inset space \thinspace{}
23998 The change must be made before the multiple columns' start.
23999 The predefined value is 13
24000 \begin_inset space \thinspace{}
24006 \begin_layout Standard
24014 \begin_inset space \thinspace{}
24020 \begin_layout Standard
24024 \begin_layout Plain Layout
24030 multicolsep}{2.5cm}
24038 \begin_layout Standard
24039 \begin_inset Flex Multiple Columns
24042 \begin_layout Plain Layout
24045 All day I turned these facts over in my mind, endeavouring to hit upon some
24046 theory which could reconcile them all, and to find that line of least resistanc
24047 e which my poor friend had declared to be the starting-point of every investigat
24049 I confess that I made little progress.
24050 In the evening I strolled across the Park, and found myself about six o'clock
24051 at the Oxford Street end of Park Lane.
24052 A group of loafers upon the pavements, all staring up at a particular window,
24053 directed me to the house which I had come to see.
24054 A tall, thin man with coloured glasses, whom I strongly suspected of being
24055 a plain-clothes detective, was pointing out some theory of his own, while
24056 the others crowded round to listen to what he said.
24057 I got as near him as I could, but his observations seemed to me to be absurd,
24058 so I withdrew again in some disgust.
24059 As I did so I struck against an elderly, deformed man, who had been behind
24060 me, and I knocked down several books which he was carrying.
24068 \begin_layout Standard
24069 \begin_inset Note Greyedout
24072 \begin_layout Plain Layout
24077 The values you set with
24083 will be used for all following multiple columns until you change them again.
24091 \begin_layout Standard
24095 \begin_layout Plain Layout
24107 \begin_inset Note Note
24110 \begin_layout Plain Layout
24111 go back to the default
24119 \begin_layout Standard
24120 \begin_inset Newpage newpage
24126 \begin_layout Subsubsection
24130 \begin_layout Standard
24131 A column break can be forced by inserting the command
24137 as TeX-Code to that position in the text where the column should be broken.
24138 Note that this leads in most cases to whitespace in the text.
24139 \begin_inset Newline newline
24142 Here is an example:
24145 \begin_layout Standard
24146 \begin_inset Flex Multiple Columns
24149 \begin_layout Plain Layout
24152 \begin_inset Quotes eld
24155 You're surprised to see me, sir,
24156 \begin_inset Quotes erd
24159 said he, in a strange, croaking voice.
24162 \begin_layout Plain Layout
24165 I acknowledged that I was.
24168 \begin_layout Plain Layout
24171 \begin_inset Quotes eld
24174 Well, I've a conscience, sir, and when I chanced to see you go into this
24175 house, as I came hobbling after you, I thought to myself, I'll just step
24176 in and see that kind gentleman, and tell him that if I was a bit gruff
24177 in my manner there was not any harm meant, and that I am much obliged to
24178 him for picking up my books.
24179 \begin_inset Quotes erd
24185 \begin_layout Plain Layout
24188 \begin_inset Quotes eld
24191 You make too much of a trifle,
24192 \begin_inset Quotes erd
24197 \begin_inset Quotes eld
24200 May I ask how you knew who I was?
24201 \begin_inset Quotes erd
24204 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24208 \begin_layout Plain Layout
24220 \begin_layout Plain Layout
24223 \begin_inset Quotes eld
24226 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24227 you'll find my little bookshop at the corner of Church Street, and very
24228 happy to see you, I am sure.
24229 Maybe you collect yourself, sir.
24233 \begin_inset space ~
24246 --a bargain, every one of them.
24247 With five volumes you could just fill that gap on that second shelf.
24248 It looks untidy, does it not, sir?
24249 \begin_inset Quotes erd
24260 \begin_layout Subsubsection
24264 \begin_layout Standard
24265 The width of the columns is automatically calculated, but you can modify
24266 the space between the columns.
24267 This is done by changing the length
24274 Its predefined value is 10
24275 \begin_inset space \thinspace{}
24279 Here is an example where
24286 \begin_inset space \thinspace{}
24292 \begin_layout Standard
24296 \begin_layout Plain Layout
24310 \begin_layout Standard
24311 \begin_inset Flex Multiple Columns
24314 \begin_layout Plain Layout
24317 My observations of No.
24318 \begin_inset space \space{}
24321 427 Park Lane did little to clear up the problem in which I was interested.
24322 The house was separated from the street by a low wall and railing, the
24323 whole not more than five feet high.
24324 It was perfectly easy, therefore, for anyone to get into the garden, but
24325 the window was entirely inaccessible, since there was no water pipe or
24326 anything which could help the most active man to climb it.
24327 More puzzled than ever, I retraced my steps to Kensington.
24328 I had not been in my study five minutes when the maid entered to say that
24329 a person desired to see me.
24330 To my astonishment it was none other than my strange old book collector,
24331 his sharp, wizened face peering out from a frame of white hair, and his
24332 precious volumes, a dozen of them at least, wedged under his right arm.
24340 \begin_layout Standard
24344 \begin_layout Plain Layout
24356 \begin_inset Note Note
24359 \begin_layout Plain Layout
24360 go back to the default
24368 \begin_layout Subsubsection
24372 \begin_layout Standard
24373 Between the columns a rule with a width of the length
24380 If this rule width is set to 0
24381 \begin_inset space \thinspace{}
24384 pt (this is the default), the rule is suppressed.
24385 In the following example the rule is 2
24386 \begin_inset space \thinspace{}
24392 \begin_layout Standard
24396 \begin_layout Plain Layout
24402 columnseprule}{2pt}
24410 \begin_layout Standard
24411 \begin_inset Flex Multiple Columns
24414 \begin_layout Plain Layout
24417 \begin_inset Quotes eld
24420 You're surprised to see me, sir,
24421 \begin_inset Quotes erd
24424 said he, in a strange, croaking voice.
24427 \begin_layout Plain Layout
24430 I acknowledged that I was.
24433 \begin_layout Plain Layout
24436 \begin_inset Quotes eld
24439 Well, I've a conscience, sir, and when I chanced to see you go into this
24440 house, as I came hobbling after you, I thought to myself, I'll just step
24441 in and see that kind gentleman, and tell him that if I was a bit gruff
24442 in my manner there was not any harm meant, and that I am much obliged to
24443 him for picking up my books.
24444 \begin_inset Quotes erd
24450 \begin_layout Plain Layout
24453 \begin_inset Quotes eld
24456 You make too much of a trifle,
24457 \begin_inset Quotes erd
24462 \begin_inset Quotes eld
24465 May I ask how you knew who I was?
24466 \begin_inset Quotes erd
24472 \begin_layout Plain Layout
24475 \begin_inset Quotes eld
24478 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24479 you'll find my little bookshop at the corner of Church Street, and very
24480 happy to see you, I am sure.
24481 Maybe you collect yourself, sir.
24485 \begin_inset space ~
24498 --a bargain, every one of them.
24499 With five volumes you could just fill that gap on that second shelf.
24500 It looks untidy, does it not, sir?
24501 \begin_inset Quotes erd
24512 \begin_layout Standard
24513 \begin_inset VSpace defskip
24519 \begin_layout Standard
24520 The rule can be colored by redefining the command
24527 This is done by inserting the command
24528 \begin_inset Newline newline
24537 columnseprulecolor}{
24542 \begin_inset Newline newline
24545 as TeX-Code before the multicolumn inset.
24550 in this command by a color of your choice.
24551 You can use all pre- and self-defined colors.
24559 \begin_inset space ~
24564 for more information about pre- and self-defined colors.
24565 To go back to the default color insert the command
24566 \begin_inset Newline newline
24575 columnseprulecolor}{
24580 \begin_inset Newline newline
24583 Here is the example with a cyan rule and 1
24584 \begin_inset space \thinspace{}
24587 cm column separation:
24590 \begin_layout Standard
24594 \begin_layout Plain Layout
24603 \begin_layout Plain Layout
24609 columnseprulecolor}{
24619 \begin_layout Standard
24620 \begin_inset Flex Multiple Columns
24623 \begin_layout Plain Layout
24626 \begin_inset Quotes eld
24629 You're surprised to see me, sir,
24630 \begin_inset Quotes erd
24633 said he, in a strange, croaking voice.
24636 \begin_layout Plain Layout
24639 I acknowledged that I was.
24642 \begin_layout Plain Layout
24645 \begin_inset Quotes eld
24648 Well, I've a conscience, sir, and when I chanced to see you go into this
24649 house, as I came hobbling after you, I thought to myself, I'll just step
24650 in and see that kind gentleman, and tell him that if I was a bit gruff
24651 in my manner there was not any harm meant, and that I am much obliged to
24652 him for picking up my books.
24653 \begin_inset Quotes erd
24659 \begin_layout Plain Layout
24662 \begin_inset Quotes eld
24665 You make too much of a trifle,
24666 \begin_inset Quotes erd
24671 \begin_inset Quotes eld
24674 May I ask how you knew who I was?
24675 \begin_inset Quotes erd
24681 \begin_layout Plain Layout
24684 \begin_inset Quotes eld
24687 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24688 you'll find my little bookshop at the corner of Church Street, and very
24689 happy to see you, I am sure.
24690 Maybe you collect yourself, sir.
24694 \begin_inset space ~
24707 --a bargain, every one of them.
24708 With five volumes you could just fill that gap on that second shelf.
24709 It looks untidy, does it not, sir?
24710 \begin_inset Quotes erd
24721 \begin_layout Standard
24725 \begin_layout Plain Layout
24731 columnseprule}{0pt}
24734 \begin_layout Plain Layout
24740 columnseprulecolor}{
24748 \begin_inset Note Note
24751 \begin_layout Plain Layout
24752 go back to the default
24760 \begin_layout Section
24761 Non-standard Paragraph Shapes
24764 \begin_layout Standard
24766 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24767 For special cases like for example posters, invitation cards or poems you
24768 can modify the paragraph shape to one of your choice.
24769 This can be done by using the LaTeX-package
24773 which is loaded by using in the document settings the module
24775 Custom paragraph shapes
24780 \begin_layout Subsection
24784 \begin_layout Standard
24789 provides the following shapes:
24792 \begin_layout Standard
24793 \begin_inset Tabular
24794 <lyxtabular version="3" rows="13" columns="3">
24795 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24796 <column alignment="center" valignment="middle" width="16col%">
24797 <column alignment="center" valignment="middle" width="40col%">
24798 <column alignment="center" valignment="middle" width="35col%">
24799 <row endhead="true">
24800 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24803 \begin_layout Plain Layout
24809 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24812 \begin_layout Plain Layout
24818 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24821 \begin_layout Plain Layout
24829 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24832 \begin_layout Plain Layout
24838 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24841 \begin_layout Plain Layout
24842 Circle with circular hole (in the size of a CD/DVD)
24847 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24850 \begin_layout Plain Layout
24851 Cannot be scaled, take care there is not too much text
24858 <cell alignment="center" valignment="top" topline="true" usebox="none">
24861 \begin_layout Plain Layout
24867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24870 \begin_layout Plain Layout
24876 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24879 \begin_layout Plain Layout
24880 Fragile, calculation might fail
24887 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24890 \begin_layout Plain Layout
24896 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24899 \begin_layout Plain Layout
24900 Rhomboid (symbolizing a
24901 \begin_inset Quotes eld
24905 \begin_inset Quotes erd
24913 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24916 \begin_layout Plain Layout
24924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24945 \begin_layout Plain Layout
24953 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24956 \begin_layout Plain Layout
24962 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24965 \begin_layout Plain Layout
24971 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24974 \begin_layout Plain Layout
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24985 \begin_layout Plain Layout
24991 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24994 \begin_layout Plain Layout
24995 Nut for bolt (hexagon with circular hole)
25000 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25003 \begin_layout Plain Layout
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25014 \begin_layout Plain Layout
25020 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25023 \begin_layout Plain Layout
25029 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25032 \begin_layout Plain Layout
25040 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25043 \begin_layout Plain Layout
25049 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25052 \begin_layout Plain Layout
25058 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25061 \begin_layout Plain Layout
25069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25072 \begin_layout Plain Layout
25078 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25081 \begin_layout Plain Layout
25087 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25090 \begin_layout Plain Layout
25098 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25101 \begin_layout Plain Layout
25107 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25110 \begin_layout Plain Layout
25111 Normal/reversed rain drop
25116 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25119 \begin_layout Plain Layout
25120 Fragile, calculation might fail
25127 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25130 \begin_layout Plain Layout
25136 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25139 \begin_layout Plain Layout
25145 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25148 \begin_layout Plain Layout
25156 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25159 \begin_layout Plain Layout
25161 \begin_inset Newline newline
25169 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25172 \begin_layout Plain Layout
25173 Triangles in different orientations
25178 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25181 \begin_layout Plain Layout
25195 \begin_layout Standard
25196 To use a shape for your paragraph, simply select it in LyX's pull-down box
25197 for environments in the toolbar.
25200 \begin_layout Standard
25201 \begin_inset Newpage newpage
25207 \begin_layout Standard
25208 Here is an example paragraph in the shape of a nut:
25211 \begin_layout Standard
25212 \begin_inset VSpace bigskip
25221 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25222 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25224 At vero eos et accusam et justo duo dolores et ea rebum.
25225 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25227 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25228 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25232 \begin_layout Standard
25233 \begin_inset VSpace bigskip
25239 \begin_layout Standard
25240 \begin_inset Note Greyedout
25243 \begin_layout Plain Layout
25248 : shapepar paragraphs cannot run over a page break.
25256 \begin_layout Standard
25257 \begin_inset VSpace bigskip
25263 \begin_layout Standard
25268 takes care that the shape will always be preserved, no matter how much
25269 text is in the paragraph.
25270 Therefore the paragraph size changes with the amount of contained text.
25271 This can lead to paragraph sizes exceeding the page margins.
25272 To demonstrate the size scaling, here is the same example paragraph but
25273 with twice as much text:
25276 \begin_layout Standard
25277 \begin_inset Newpage newpage
25286 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25287 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25289 At vero eos et accusam et justo duo dolores et ea rebum.
25290 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25292 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25293 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25295 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25296 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25298 At vero eos et accusam et justo duo dolores et ea rebum.
25299 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25301 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25302 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25306 \begin_layout Standard
25307 \begin_inset VSpace bigskip
25313 \begin_layout Standard
25314 An exception is the shape
25319 It cannot be scaled because it must fit the size of a CD/DVD.
25320 Therefore the amount of text that fits into the shape is limited.
25321 \begin_inset Newline newline
25332 shape are fragile, meaning that the calculation of their size can fail,
25333 depending on the amount of text.
25334 You will then get the LaTeX error
25335 \begin_inset Quotes eld
25338 Arithmetic overflow
25339 \begin_inset Quotes erd
25343 In this case one can try to remove or add some text; if nothing works one
25344 has to use another shape.
25347 \begin_layout Standard
25348 \begin_inset VSpace bigskip
25354 \begin_layout Standard
25355 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25356 fails for text in the tips.
25357 Therefore it is often necessary to add hyphenation points
25362 arg "specialchar-insert hyphenation"
25367 ) to the corresponding text parts.
25370 \begin_layout Standard
25371 \begin_inset VSpace bigskip
25377 \begin_layout Standard
25378 Shapepar paragraphs are either always centered or placed on the page so
25379 that their left border touches the left page margin.
25380 You can therefore not use the paragraph dialog to align such paragraphs.
25381 A solution is to put the paragraph into a minipage or parbox and align
25383 The problem is hereby to find the right width for the box.
25384 Because if it is too wide and you center the box, the paragraph is not
25385 centered too because it sticks at the left side of the box.
25386 So you might have to play a bit with the width until it fits.
25387 Here are two heart-shaped paragraphs, the first one is not aligned, the
25388 second one is right-aligned:
25391 \begin_layout Standard
25392 \begin_inset Newpage newpage
25398 \begin_layout Heart
25403 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25404 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25406 At vero eos et accusam et justo duo dolores et ea rebum.
25407 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25411 \begin_layout Standard
25412 \begin_inset VSpace bigskip
25418 \begin_layout Standard
25421 \begin_inset Box Frameless
25431 height_special "totalheight"
25434 \begin_layout Heart
25439 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25440 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25442 At vero eos et accusam et justo duo dolores et ea rebum.
25443 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25452 \begin_layout Subsection
25456 \begin_layout Standard
25457 You can define any shape you want.
25458 Doing this manually is a lot of work because every coordinate must be specified.
25459 But there is a way to let the computer calculate the coordinates:
25462 \begin_layout Enumerate
25463 Install the program
25464 \begin_inset CommandInset href
25467 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25474 \begin_layout Enumerate
25485 \begin_layout Plain Layout
25496 \begin_layout Plain Layout
25503 eX\SpecialChar \menuseparator
25504 Settings\SpecialChar \menuseparator
25507 and select the font size you are using in your document.
25508 For example this document uses the size 12
25509 \begin_inset space \thinspace{}
25515 \begin_layout Enumerate
25519 \begin_layout Enumerate
25526 \begin_layout Plain Layout
25537 \begin_layout Plain Layout
25544 eX\SpecialChar \menuseparator
25547 to export the shape to coordinates.
25548 In the appearing dialog use either the outline of your shape for the coordinate
25549 s or the path itself.
25553 \begin_layout Plain Layout
25554 For more information see
25555 \begin_inset CommandInset href
25557 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25569 \begin_layout Standard
25570 The coordinates are written into a TeX-file.
25571 To use it for your LyX document
25574 \begin_layout Enumerate
25575 Place the cursor before the first character of your paragraph (or into a
25579 \begin_layout Enumerate
25580 Open in LyX the menu
25582 Insert\SpecialChar \menuseparator
25583 File\SpecialChar \menuseparator
25585 \begin_inset space ~
25590 , select the file and use
25599 \begin_layout Standard
25600 \begin_inset VSpace defskip
25606 \begin_layout Standard
25607 \begin_inset Note Greyedout
25610 \begin_layout Plain Layout
25615 : The changed shape only applies to the current paragraph; everything is
25616 reset to normal for the next paragraph.
25617 Therefore the shape definition file must be input into every paragraph
25618 with the desired shape.
25626 \begin_layout Standard
25627 \begin_inset VSpace bigskip
25633 \begin_layout Standard
25634 Here is an example:
25637 \begin_layout Standard
25638 \begin_inset VSpace bigskip
25644 \begin_layout Standard
25645 \begin_inset CommandInset include
25647 filename "SpecialParagraphShape.tex"
25653 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25654 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25656 At vero eos et accusam et justo duo dolores et ea rebum.
25657 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25659 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25660 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25664 \begin_layout Standard
25665 \begin_inset VSpace bigskip
25671 \begin_layout Standard
25676 to draw complexer shapes in
25680 you can draw the shape in a program of your choice and import the resulting
25686 Then you only need to draw a line or spline along the outline of the image.
25689 \begin_layout Standard
25690 \begin_inset VSpace bigskip
25696 \begin_layout Standard
25699 Custom paragraph shapes
25701 also provides the two commands
25709 which can be used to define custom shapes coordinate by coordinate.
25713 \begin_layout Plain Layout
25714 These commands are internally used for all shapes described here.
25719 For information how these styles are used and about further customization
25720 possibilities, have a look at the documentation of the package
25725 \begin_inset CommandInset citation
25734 \begin_layout Bibliography
25735 \begin_inset CommandInset bibitem
25736 LatexCommand bibitem
25741 Documentation of the LaTeX-package
25742 \begin_inset CommandInset href
25745 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25752 \begin_layout Bibliography
25753 \begin_inset CommandInset bibitem
25754 LatexCommand bibitem
25759 Documentation of the LaTeX-package
25760 \begin_inset CommandInset href
25763 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"