1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 % This preamble is designed to ensure that the manual prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the manual may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23 \pdfbookmark[1]{\contentsname}{}
26 \pagenumbering{arabic}}
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
31 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
40 \maintain_unincluded_children false
42 \language_package default
45 \font_roman "lmodern" "default"
46 \font_sans "lmss" "default"
47 \font_typewriter "lmtt" "default"
48 \font_math "auto" "auto"
49 \font_default_family default
50 \use_non_tex_fonts false
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
57 \default_output_format pdf2
59 \bibtex_command default
60 \index_command default
64 \pdf_title "LyX's Additional Features manual"
65 \pdf_author "LyX Team"
66 \pdf_subject "LyX's additional features documentation"
67 \pdf_keywords "LyX, Documentation, Additional"
69 \pdf_bookmarksnumbered true
70 \pdf_bookmarksopen false
71 \pdf_bookmarksopenlevel 1
76 \pdf_pdfusetitle false
77 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
80 \use_package amsmath 1
81 \use_package amssymb 1
84 \use_package mathdots 1
85 \use_package mathtools 0
87 \use_package stackrel 0
88 \use_package stmaryrd 0
89 \use_package undertilde 0
91 \cite_engine_type default
95 \paperorientation portrait
99 \notefontcolor #0000ff
106 \paragraph_separation indent
107 \paragraph_indentation default
108 \quotes_language english
111 \paperpagestyle headings
112 \tracking_changes true
113 \output_changes false
117 \author 893223064 "John Robert Hudson" j.r.hudson@virginmedia.com
123 Additional \SpecialChar LyX
127 \begin_layout Subtitle
132 by the \SpecialChar LyX
137 \begin_layout Plain Layout
139 Principal maintainer of this file is
144 If you have comments or error corrections, please send them to the \SpecialChar LyX
147 \begin_inset Flex Code
150 \begin_layout Plain Layout
152 <lyx-docs@lists.lyx.org>
165 \begin_layout Standard
166 \begin_inset CommandInset toc
167 LatexCommand tableofcontents
174 \begin_layout Chapter
178 \begin_layout Standard
179 This manual is essentially Part II of the
181 User's Guide\SpecialChar endofsentence
184 The reason for separating the two documents is simple: the
188 is already quite lengthy, and it contains information on all of the basic
189 features one needs to know in order to prepare most documents.
190 However, the \SpecialChar LyX
191 Team has worked to make \SpecialChar LyX
192 extensible through various configuration
193 files and external packages.
194 That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
196 create a layout file (or module) for it without having to alter \SpecialChar LyX
198 We've already had contributions of several new features this way, and some
199 of them are documented here.
200 There are also some more `advanced' features, such as how to control the
201 presentation of bibliographies and how to work with multi-part documents,
202 that are not covered in the
206 and are discussed here.
209 \begin_layout Standard
210 This manual also documents some special features, like fax support, version
211 control, and SGML support, which require additional software to work properly.
212 There is also a chapter on \SpecialChar LyX
214 And lastly, there's a chapter of \SpecialChar LaTeX
215 tools and tips, things you can use to
216 spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
218 After all, \SpecialChar LyX
223 only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
227 \begin_layout Standard
228 If you haven't read the
232 yet, you are definitely in the wrong manual.
237 is the first place to go, since it describes the notation and format of
239 You should also be thoroughly familiar with the
243 and all of the basic features of \SpecialChar LyX
244 before attempting to read this one.
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on \SpecialChar LyX
250 with \SpecialChar LaTeX
251 , this first chapter covers the inner workings of \SpecialChar LyX
254 to generate exactly the \SpecialChar LaTeX
256 It is obviously for more seasoned \SpecialChar LyX
260 \begin_layout Chapter
262 and \SpecialChar LaTeX
266 \begin_layout Section
268 Uses \SpecialChar LaTeX
272 \begin_layout Standard
273 This chapter is for both \SpecialChar TeX
274 -nicians and the \SpecialChar LaTeX
276 In it, we'll explain how \SpecialChar LyX
277 and \SpecialChar LaTeX
278 work together to produce printable output.
279 This is the only place in any of the manuals where we assume you know something
280 about \SpecialChar LaTeX
284 \begin_layout Standard
285 At one time, \SpecialChar LyX
287 \begin_inset Quotes eld
290 WYSIWYM frontend to \SpecialChar LaTeX
292 \begin_inset Quotes erd
295 but that's no longer true.
296 There are frontends to \SpecialChar LaTeX
301 \begin_layout Plain Layout
302 Some familar ones are \SpecialChar TeX
303 maker and kile, on Linux, and \SpecialChar TeX
305 There are also the \SpecialChar LaTeX
306 modes for vi and emacs, of course.
311 These are basically text editors with the ability to run \SpecialChar LaTeX
313 errors in the file you're editing.
314 Although \SpecialChar LyX
323 run \SpecialChar LaTeX
324 , and it also indicates errors in the file, it also does much, much
326 For one thing, you don't need to know \SpecialChar LaTeX
327 to use \SpecialChar LyX
330 has added its own extensions to \SpecialChar LaTeX
332 Try the following sometime: select
333 \begin_inset Flex Noun
336 \begin_layout Plain Layout
337 Export\SpecialChar menuseparator
344 \begin_inset Flex Noun
347 \begin_layout Plain Layout
354 \begin_inset Flex Noun
357 \begin_layout Plain Layout
358 View\SpecialChar menuseparator
368 ), then look at the preamble of the resulting
369 \begin_inset Flex Code
372 \begin_layout Plain Layout
379 You'll notice a variety of new macros defined specifically by \SpecialChar LyX
381 These macros are defined automatically, according to the features you use
385 \begin_layout Standard
386 There are several commands that automatically invoke \SpecialChar LaTeX
391 \begin_layout Itemize
392 \begin_inset Flex Noun
395 \begin_layout Plain Layout
396 Document\SpecialChar menuseparator
405 \begin_layout Itemize
406 \begin_inset Flex Noun
409 \begin_layout Plain Layout
410 Document\SpecialChar menuseparator
419 \begin_layout Standard
420 They will only invoke \SpecialChar LaTeX
421 if the file has changed since the last time \SpecialChar LaTeX
427 \begin_layout Standard
428 When \SpecialChar LyX
429 runs \SpecialChar LaTeX
430 on the file you're editing, it performs these steps:
433 \begin_layout Enumerate
434 Convert the document to \SpecialChar LaTeX
435 and save to a file with the extension
436 \begin_inset Flex Code
439 \begin_layout Plain Layout
446 \begin_inset Flex Code
449 \begin_layout Plain Layout
458 \begin_layout Enumerate
459 Run \SpecialChar LaTeX
461 \begin_inset Flex Code
464 \begin_layout Plain Layout
470 file (maybe several times), and run any other commands (such as
471 \begin_inset Flex Code
474 \begin_layout Plain Layout
481 \begin_inset Flex Code
484 \begin_layout Plain Layout
490 ) needed to compile the \SpecialChar LaTeX
494 \begin_layout Enumerate
495 If there are any errors, show the error log.
498 \begin_layout Standard
499 If you have run \SpecialChar LaTeX
501 \begin_inset Flex Noun
504 \begin_layout Plain Layout
505 View\SpecialChar menuseparator
512 then runs a DVI viewer to display the DVI-file.
514 \begin_inset Flex Noun
517 \begin_layout Plain Layout
518 View\SpecialChar menuseparator
525 performs further steps:
528 \begin_layout Itemize
530 \begin_inset Flex Code
533 \begin_layout Plain Layout
539 to convert the DVI file to PostScript.
542 \begin_layout Itemize
543 Run a PostScript viewer, such as
544 \begin_inset Flex Code
547 \begin_layout Plain Layout
553 , to display the PostScript file.
556 \begin_layout Standard
558 does similar things when viewing, or exporting, other formats.
561 \begin_layout Section
562 Translating \SpecialChar LaTeX
563 files into \SpecialChar LyX
567 \begin_layout Standard
568 You can import a \SpecialChar LaTeX
569 file into \SpecialChar LyX
571 \begin_inset Flex Noun
574 \begin_layout Plain Layout
575 File\SpecialChar menuseparator
576 Import\SpecialChar menuseparator
582 command in \SpecialChar LyX
584 This will call a program named
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
594 which will create a file
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 \begin_inset Flex Code
608 \begin_layout Plain Layout
616 will then open that file.
620 \begin_layout Plain Layout
621 \begin_inset Flex Code
624 \begin_layout Plain Layout
630 can also be run from the command line, of course.
638 \begin_layout Standard
639 \begin_inset Flex Code
642 \begin_layout Plain Layout
648 will translate most legal \SpecialChar LaTeX
649 , but not everything.
650 It will put things it doesn't understand into \SpecialChar TeX
651 code, so after translating
653 \begin_inset Flex Code
656 \begin_layout Plain Layout
662 , you can look for \SpecialChar TeX
663 code and hand-edit it until it looks right.
666 \begin_layout Standard
667 If you don't know what \SpecialChar TeX
668 code is, read the next section.
671 \begin_layout Section
672 \begin_inset CommandInset label
674 name "sec:Inserting-TeX-Code"
678 Inserting \SpecialChar TeX
679 Code into \SpecialChar LyX
683 \begin_layout Standard
684 Anything you can do in \SpecialChar LaTeX
685 you can do in \SpecialChar LyX
686 , for a very simple reason: You can
687 always insert \SpecialChar TeX
688 code into any \SpecialChar LyX
691 cannot, and will never be able to, display every possible \SpecialChar LaTeX
693 If ever you need to insert \SpecialChar LaTeX
694 commands into your \SpecialChar LyX
695 document, you can use the
697 \begin_inset Flex Code
700 \begin_layout Plain Layout
707 box, which you can insert into your document with
708 \begin_inset Flex Noun
711 \begin_layout Plain Layout
712 Insert\SpecialChar menuseparator
722 or the keyboard shortcut
731 \begin_layout Standard
732 Here's an example of inserting \SpecialChar LaTeX
733 commands in a \SpecialChar LyX
735 The code looks like this:
738 \begin_layout LyX-Code
742 \begin_inset Newline newline
748 \begin_inset Newline newline
751 This is an example of a minipage environment.
753 \begin_inset Newline newline
756 can put nearly everything in it, even (non-floating)
757 \begin_inset Newline newline
762 \begin_inset Newline newline
768 \begin_inset Newline newline
772 \begin_inset Newline newline
778 \begin_inset Newline newline
784 \begin_inset Newline newline
790 \begin_inset Newline newline
795 \begin_inset Newline newline
801 \begin_inset Newline newline
807 \begin_inset Newline newline
813 \begin_inset Newline newline
821 \begin_layout LyX-Code
825 \begin_layout Standard
827 \begin_inset Flex Code
830 \begin_layout Plain Layout
837 box containing this text is directly after this paragraph.
838 Those of you reading the manual in \SpecialChar LyX
839 will only see the \SpecialChar TeX
841 Those reading a printed version of the manuals will see the actual results:
842 \begin_inset VSpace bigskip
848 \begin_layout Standard
852 \begin_layout Plain Layout
859 \begin_layout Plain Layout
866 \begin_layout Plain Layout
868 This is an example of a minipage environment.
869 You can put nearly everything in it, even (non-floating) figures and tables.
873 \begin_layout Plain Layout
880 \begin_layout Plain Layout
885 \begin_layout Plain Layout
892 \begin_layout Plain Layout
899 \begin_layout Plain Layout
906 \begin_layout Plain Layout
912 \begin_layout Plain Layout
919 \begin_layout Plain Layout
926 \begin_layout Plain Layout
933 \begin_layout Plain Layout
943 \begin_inset VSpace bigskip
949 \begin_layout Standard
950 In addition to using \SpecialChar TeX
951 code, you can also create a separate file containing
952 some complex \SpecialChar LaTeX
953 structure and then use
954 \begin_inset Flex Noun
957 \begin_layout Plain Layout
958 Insert\SpecialChar menuseparator
968 to include your file (you should select the type
969 \begin_inset Flex Code
972 \begin_layout Plain Layout
979 We recommend that you only do this if you have a
980 \begin_inset Flex Code
983 \begin_layout Plain Layout
994 Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
998 \begin_layout Standard
999 There are a few last points to emphasize:
1002 \begin_layout Itemize
1008 check if your \SpecialChar LaTeX
1012 \begin_layout Itemize
1013 Beware of reinventing the wheel.
1016 \begin_layout Standard
1017 On that last point, \SpecialChar LyX
1018 does have quite a few features tucked into it, and
1020 Be sure to check the manuals to make sure that \SpecialChar LyX
1021 doesn't have such-and-such
1022 feature before you decide you have to do it by hand.
1023 Moreover, there are numerous \SpecialChar LaTeX
1024 packages out there to do all sorts of things,
1025 from labels to envelopes to fancy multipage tables.
1027 \begin_inset CommandInset href
1030 target "http://www.ctan.org/"
1037 \begin_layout Standard
1038 If you do need to do some wild and fancy things within your document, be
1039 sure to check out a good \SpecialChar LaTeX
1040 book for assistance.
1041 There are a number of them listed in the bibliography of the
1048 \begin_layout Section
1050 and the \SpecialChar LaTeX
1054 \begin_layout Subsection
1055 About the \SpecialChar LaTeX
1059 \begin_layout Standard
1060 If you already know \SpecialChar LaTeX
1061 , there is no need to explain here what the preamble
1063 If you don't, the following will give you some ideas—we recommend again
1064 that you consult a \SpecialChar LaTeX
1065 book for further information.
1066 In any case, you should read the points below, because they explain what
1067 you can do and what you don't need to do in the \SpecialChar LaTeX
1068 preamble of a \SpecialChar LyX
1072 \begin_layout Standard
1073 The \SpecialChar LaTeX
1074 preamble comes at the very beginning of a document,
1082 \begin_layout Itemize
1083 Declare the document class.
1085 \begin_inset Newline newline
1089 already does this for you.
1090 If you're a seasoned \SpecialChar LaTeX
1091 -nician, and you have a custom document class you
1092 want to use, check out the
1094 Customization Manual
1096 for information on how to make \SpecialChar LyX
1100 \begin_layout Itemize
1101 Declare the usage of packages.
1103 \begin_inset Newline newline
1107 packages provide special commands, which are only available within a document
1108 when the package has been declared in the preamble.
1109 In addition to providing special commands, the inclusion of a package can
1110 change the document.
1111 For example, the package
1112 \begin_inset Flex Code
1115 \begin_layout Plain Layout
1121 forces all paragraphs to be indented.
1122 There are other packages for labels, envelopes, margins, etc.
1126 \begin_layout Itemize
1127 Set counters, variables, lengths and widths.
1129 \begin_inset Newline newline
1132 There are several \SpecialChar LaTeX
1133 counters and variables that
1137 be set globally from within the preamble in order to have the desired effect.
1138 (There are variables that you can set and reset inside the document, too.)
1139 Margins are a good example of something that must be set in the preamble.
1140 Another example is the label format for lists.
1141 You can actually set these just about anywhere, but it's best to do it
1142 just once, inside the preamble.
1145 \begin_layout Itemize
1146 Declare user defined commands (with
1147 \begin_inset Flex Code
1150 \begin_layout Plain Layout
1159 \begin_inset Flex Code
1162 \begin_layout Plain Layout
1171 \begin_inset Newline newline
1174 These are abbreviations for \SpecialChar LaTeX
1175 commands which appear very often inside a document.
1176 Although the preamble is a good place to declare such commands, they
1180 be declared anywhere (before they are used for the first time, of course).
1181 This can be useful if there is a lot of raw \SpecialChar LaTeX
1182 code in your document, which
1183 normally should not be the case.
1186 \begin_layout Standard
1188 adds its own set of definitions to the preamble of the
1189 \begin_inset Flex Code
1192 \begin_layout Plain Layout
1199 This makes \SpecialChar LaTeX
1200 files generated by \SpecialChar LyX
1204 \begin_layout Subsection
1205 Changing the Preamble
1208 \begin_layout Standard
1209 The commands which \SpecialChar LyX
1210 adds to the preamble of a \SpecialChar LaTeX
1211 file are fixed; you can't
1212 change them without patching \SpecialChar LyX
1214 You can, however, add your own stuff to the preamble by selecting
1215 \begin_inset Flex Noun
1218 \begin_layout Plain Layout
1221 \begin_inset space ~
1230 \begin_inset Flex Noun
1233 \begin_layout Plain Layout
1234 Document\SpecialChar menuseparator
1242 adds anything in the
1243 \begin_inset Flex Noun
1246 \begin_layout Plain Layout
1252 dialog to its own built-in preamble.
1253 Before adding your own declarations in the preamble, you should make sure
1254 that \SpecialChar LyX
1255 doesn't already support what you want to do.
1256 (Remember what we said about reinventing the wheel?) Also,
1258 make sure your preamble code is correct
1262 doesn't check it for you.
1263 If there is an error, you're likely to get an error like
1264 \begin_inset Quotes eld
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1280 \begin_inset Quotes erd
1284 If you see this error, check your preamble.
1287 \begin_layout Subsection
1291 \begin_layout Standard
1292 Here are some examples of what you can add to a preamble, and what they
1296 \begin_layout Subsubsection
1300 \begin_layout Standard
1301 There are two variables under \SpecialChar LaTeX
1302 that control page position:
1303 \begin_inset Flex Code
1306 \begin_layout Plain Layout
1315 \begin_inset Flex Code
1318 \begin_layout Plain Layout
1327 Their names should be self-explanatory.
1328 These variables are useful if you think for a moment about computer labels.
1329 Sometimes, the size of a print medium and the area of the medium that you
1330 can actually print on aren't the same.
1332 \begin_inset Flex Code
1335 \begin_layout Plain Layout
1344 \begin_inset Flex Code
1347 \begin_layout Plain Layout
1358 \begin_layout Standard
1359 The default values for
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1372 \begin_inset Flex Code
1375 \begin_layout Plain Layout
1384 \begin_inset space \thinspace{}
1388 \begin_inset space \thinspace{}
1392 \begin_inset space \space{}
1395 the page isn't shifted.
1396 Unfortunately, some DVI drivers always seem to shift the page.
1397 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1398 If you're using \SpecialChar LyX
1399 on a system that you don't personally maintain, and your
1400 sysadmin is a doofus,
1401 \begin_inset Flex Code
1404 \begin_layout Plain Layout
1413 \begin_inset Flex Code
1416 \begin_layout Plain Layout
1425 Suppose your left and top margins are always 0.5
1426 \begin_inset space \thinspace{}
1430 You can add this to the preamble:
1433 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1449 \begin_layout Standard
1450 and your margins should now be correct.
1453 \begin_layout Subsubsection
1457 \begin_layout Standard
1458 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1459 There's a rather nice package, available at your nearest CTAN archive,
1460 for printing sheets of labels:
1461 \begin_inset Flex Code
1464 \begin_layout Plain Layout
1471 Now, your system may not have this package installed by default.
1472 We leave that up to you to check.
1473 You'll also want to read the documentation for it; we're not going to do
1475 Since this is an example, however, we'll give you an example of how you
1479 \begin_layout Standard
1480 First, make sure you're using the
1481 \begin_inset Flex Code
1484 \begin_layout Plain Layout
1491 Next, you need to put the following in your preamble:
1494 \begin_layout LyX-Code
1500 \begin_layout LyX-Code
1506 \begin_layout LyX-Code
1512 \begin_layout LyX-Code
1518 \begin_layout LyX-Code
1524 \begin_layout LyX-Code
1530 \begin_layout LyX-Code
1536 \begin_layout Standard
1537 This sets things up for Avery label sheets, stock #5360.
1538 You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1541 \begin_inset Flex Code
1544 \begin_layout Plain Layout
1553 \begin_inset Flex Code
1556 \begin_layout Plain Layout
1564 around each label text.
1565 This and other special features of
1566 \begin_inset Flex Code
1569 \begin_layout Plain Layout
1575 are explained in its documentation.
1578 \begin_layout Standard
1579 Someday, someone may write a \SpecialChar LyX
1580 layout file to support this package directly.
1581 Maybe that someone is you.
1584 \begin_layout Subsubsection
1585 Example #3: Paragraph Indentation
1588 \begin_layout Standard
1589 Americans are trained to indent the first line of
1594 As with all of their other weird quirks, most Americans will whine and
1595 moan until they can have their way and indent the first line of all paragraphs.
1604 \begin_layout Standard
1605 Of course, this behavior isn't standard typography.
1606 In books, you typically only indent the first line of a paragraph
1610 it follows another one.
1611 The idea behind indenting the first line of a paragraph is to distinguish
1612 neighboring paragraphs from one another.
1613 If there is no previous paragraph—for example, if it follows a figure or
1614 is the first paragraph in a section—then there is no need for indentation.
1618 \begin_layout Standard
1619 If you're a typical American (we're still joking!), though, you don't care
1620 about such esoteric things; you want your indentation! Add this to the
1624 \begin_layout LyX-Code
1627 usepackage{indentfirst}
1630 \begin_layout Standard
1631 If your \SpecialChar TeX
1632 distribution isn't braindead, you'll have this package, and all
1633 of your paragraphs will get the indentation the Founding Fathers intended
1637 \begin_layout Subsubsection
1638 Example #4: This Document
1641 \begin_layout Standard
1642 You can also check out the preamble of this document to get an idea of some
1643 of the advanced things you can do.
1646 \begin_layout Section
1648 and \SpecialChar LaTeX
1652 \begin_layout Standard
1653 When \SpecialChar LyX
1654 calls \SpecialChar LaTeX
1655 , it tells \SpecialChar LaTeX
1656 to blithely ignore any errors and keep going.
1657 It then uses the logfile from the \SpecialChar LaTeX
1658 run to do a post-mortem.
1659 After analyzing the logfile, \SpecialChar LyX
1660 displays a dialog listing the errors.
1661 Clicking on any one of them will take you to the position in your \SpecialChar LyX
1663 where the error occurred.
1667 \begin_layout Plain Layout
1669 Analyzing the logfile is a tough job, and \SpecialChar LyX
1670 doesn't always go to the right
1672 There are also cases where \SpecialChar LaTeX
1673 reports the error on one line, but the actual
1675 This is not unlike forgetting a closing brace in a program: You'll get
1676 an error, but only later.
1684 \begin_layout Standard
1685 Some folks also like to look at the log file directly: It is available from
1687 \begin_inset Flex Noun
1690 \begin_layout Plain Layout
1691 Document\SpecialChar menuseparator
1693 \begin_inset space ~
1702 There are some fairly common error messages and warnings.
1703 We'll cover those here.
1704 You should look at a good \SpecialChar LaTeX
1705 book for a complete listing.
1708 \begin_layout Itemize
1709 \begin_inset Flex Code
1712 \begin_layout Plain Layout
1719 \begin_inset Newline newline
1722 Anything beginning with these words is a warning message for the purpose
1724 \begin_inset Quotes eld
1728 \begin_inset Quotes erd
1731 the \SpecialChar LaTeX
1733 You'll get messages like this if you added or changed cross-references
1734 or bibliography entries, in which case, \SpecialChar LaTeX
1735 is trying to tell you that you
1736 need to make another run.
1737 You can by-and-large ignore these.
1740 \begin_layout Itemize
1741 \begin_inset Flex Code
1744 \begin_layout Plain Layout
1751 \begin_inset Newline newline
1754 Another warning message, this time about fonts which \SpecialChar LaTeX
1756 The rest of the message will often say something about a replacement font
1757 that \SpecialChar LaTeX
1759 You can safely ignore these, too.
1762 \begin_layout Itemize
1763 \begin_inset Flex Code
1766 \begin_layout Plain Layout
1775 \begin_inset Newline newline
1784 They are warnings about lines that were too long and run past the right
1786 Almost always, this is unnoticeable in the final output.
1787 (It can be just a point or two.) Or, only one or two characters extend past
1790 seems to generate at least one of these messages for just about any document
1792 \begin_inset Newline newline
1795 You can ignore these messages.
1796 Your eyes will tell you if there's a problem with something that's too
1797 wide; just look at the output.
1801 \begin_layout Plain Layout
1802 You can also enable the `draft' option in
1803 \begin_inset Flex Noun
1806 \begin_layout Plain Layout
1807 Document\SpecialChar menuseparator
1813 , and then \SpecialChar LaTeX
1814 will draw a black box in the margin of lines that are overfull.
1822 \begin_layout Itemize
1823 \begin_inset Flex Code
1826 \begin_layout Plain Layout
1835 \begin_inset Newline newline
1838 Not quite as common as its cousin.
1840 seems to like to print lines that are a bit too wide as opposed to ones
1841 that are a bit too narrow.
1842 We have no idea why.
1845 \begin_layout Itemize
1846 \begin_inset Flex Code
1849 \begin_layout Plain Layout
1858 \begin_inset Flex Code
1861 \begin_layout Plain Layout
1870 \begin_inset Newline newline
1873 Warnings about troubles breaking the page.
1874 Once again, just look at the output.
1875 Your eyes will tell you where something has gone wrong.
1878 \begin_layout Itemize
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1884 \begin_inset Quotes els
1888 \begin_inset Quotes ers
1897 \begin_inset Newline newline
1901 \begin_inset Quotes eld
1905 \begin_inset Quotes erd
1908 isn't installed on this system.
1909 This usually appears because some package your document needs isn't installed.
1910 If you didn't touch the preamble or didn't use the
1911 \begin_inset Flex Code
1914 \begin_layout Plain Layout
1922 command, then one of the packages \SpecialChar LyX
1923 tried to load is missing.
1925 \begin_inset Flex Noun
1928 \begin_layout Plain Layout
1929 Help\SpecialChar menuseparator
1936 to get a list of packages that \SpecialChar LyX
1938 This file is updated whenever you reconfigure \SpecialChar LyX
1940 \begin_inset Flex Noun
1943 \begin_layout Plain Layout
1944 Tools\SpecialChar menuseparator
1950 ) and tells you which packages have been detected and what they do.
1951 \begin_inset Newline newline
1955 \begin_inset Flex Code
1958 \begin_layout Plain Layout
1966 command and the package in question isn't installed, then you'll need to
1967 install it yourself.
1970 \begin_layout Itemize
1971 \begin_inset Flex Code
1974 \begin_layout Plain Layout
1975 LaTeX Error: Unknown option
1981 \begin_inset Newline newline
1984 Error messages beginning with this are trying to tell you that you specified
1985 a bad or undefined option to a package.
1986 Check the package's documentation.
1989 \begin_layout Itemize
1990 \begin_inset Flex Code
1993 \begin_layout Plain Layout
1994 Undefined control sequence
2000 \begin_inset Newline newline
2003 If you've inserted \SpecialChar LaTeX
2004 code into your document, but made a typo, you'll get
2006 You may have forgotten to load a package.
2007 In any case, this error message usually means that you used an undefined
2012 \begin_layout Standard
2013 There are other error and warning messages.
2014 Some are self-explanatory.
2015 These are usually \SpecialChar LaTeX
2017 Others are downright cryptic.
2018 These are usually \SpecialChar TeX
2019 error messages, and we really have
2023 what they mean or how to decipher them.
2027 \begin_layout Standard
2028 There's a general sequence you should follow if you get error messages:
2031 \begin_layout Enumerate
2032 Look at the \SpecialChar LaTeX
2033 code you inserted for typos.
2036 \begin_layout Enumerate
2037 If there are no typos, check that you used the command(s) correctly.
2040 \begin_layout Enumerate
2041 If you get a bunch of error boxes piled up at the very top of the document—and
2042 especially if you see a
2043 \begin_inset Quotes eld
2047 \begin_inset Flex Code
2050 \begin_layout Plain Layout
2059 \begin_inset Quotes erd
2062 error—it means that there are errors in the preamble.
2063 Start debugging your preamble.
2066 \begin_layout Enumerate
2067 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2069 document, the first suspect is your \SpecialChar LaTeX
2070 distribution itself.
2071 Check for missing packages and install them.
2074 \begin_layout Enumerate
2075 Okay, so there are no missing packages.
2076 Did you use any of the fine-tuning options in \SpecialChar LyX
2077 ? Specifically, did you
2081 any of them, like trying to manually insert lots of
2082 \begin_inset Flex Code
2085 \begin_layout Plain Layout
2087 \begin_inset space ~
2096 \begin_inset Flex Code
2099 \begin_layout Plain Layout
2106 \begin_inset Flex Code
2109 \begin_layout Plain Layout
2115 ? Did you try to kludge something together with these instead of using the
2116 appropriate paragraph environment?
2119 \begin_layout Enumerate
2120 All right, you didn't use any of the fine-tuning options, you played by
2122 Did you try to pull a fancy maneuver? Did you do something funky inside
2123 a table or an equation, like inserting a graphic into a table cell?
2126 \begin_layout Enumerate
2127 Do you have long sections of text where \SpecialChar LaTeX
2128 cannot find a place to break a
2129 line? By default, \SpecialChar LaTeX
2130 is rather strict about how much extra inter-word spacing
2131 it will add in order to break a line.
2132 Preferably, you should rework the paragraph to avoid the problem.
2135 \begin_layout Enumerate
2136 Did you go overboard with the nesting? \SpecialChar LyX
2137 (currently) doesn't check to make
2138 sure you're in the limits for nesting environments.
2139 If you nested a bunch of environments to the
2140 \begin_inset Formula $17^{\mathrm{th}}$
2143 level, that's the problem.
2144 (The limit in \SpecialChar LaTeX
2148 \begin_layout Enumerate
2149 Okay, you didn't get any error messages, but your output looks awful.
2150 If you have a table or figure that's too wide or long for the page, you
2155 \begin_layout Enumerate
2156 rescale the figure so it fits.
2159 \begin_layout Enumerate
2160 trim down the table so it fits.
2164 \begin_layout Enumerate
2165 If something else is wrong with the output, and you didn't try to pull anything
2166 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2169 \begin_layout Standard
2170 If all this doesn't help—well, then
2174 you might have found a bug in \SpecialChar LyX
2179 \begin_layout Chapter
2181 \change_inserted 893223064 1464851738
2185 \begin_layout Standard
2187 \change_inserted 893223064 1464852146
2188 This section will be updated in due course.
2191 \begin_layout Standard
2192 Special Document Classes
2195 \begin_layout Section
2199 \begin_layout Standard
2205 \begin_layout Subsection
2209 \begin_layout Standard
2210 This section describes how \SpecialChar LyX
2211 can be used to write articles for submission
2212 to the scientific journal
2214 Astronomy and Astrophysics
2217 \begin_inset Flex URL
2220 \begin_layout Plain Layout
2222 http://www.edpsciences.fr/aa/
2227 ) using Version 5.01 of the document class
2232 This package can be downloaded from the ftp site
2235 \begin_layout Standard
2236 \begin_inset VSpace medskip
2242 \begin_layout Standard
2244 \begin_inset Flex URL
2247 \begin_layout Plain Layout
2249 ftp://ftp.edpsciences.org/pub/aa/readme.html
2257 \begin_layout Standard
2258 \begin_inset VSpace medskip
2264 \begin_layout Standard
2265 A manual comes together with that package, and this text is not meant to
2266 replace the original manual but is merely a short guide in how to realize
2267 the correct form of your paper.
2271 \begin_layout Standard
2272 Please note that the publisher of the journal was changed from Springer
2273 to EDP Sciences starting January 1, 2001.
2274 That change involved also some slight changes to the style files, namely
2275 the removal of the thesaurus command.
2276 The \SpecialChar LyX
2277 class aa supports the newest version of these style files, V 5.01.
2278 If you have an older version installed, please upgrade.
2279 For compatibility, the old (version 4) layout has been kept as
2284 Please refer to the comments in
2287 Dir/layouts/aapaper.layout
2292 \begin_layout Subsection
2296 \begin_layout Standard
2297 It is recommended you start from the example template distributed with \SpecialChar LyX
2299 If you are not using a template, note the following settings:
2302 \begin_layout Itemize
2309 Document\SpecialChar menuseparator
2312 dialog (OK, that one was obvious).
2315 \begin_layout Itemize
2316 Don't change the option
2319 \begin_inset space ~
2329 The whole layout is done by the macros, you shouldn't change anything.
2332 \begin_layout Subsection
2336 \begin_layout Standard
2337 First thing to enter is the header information.
2338 It consists of seven entries, of which some are optional.
2342 \begin_layout Itemize
2350 \begin_layout Itemize
2358 \begin_layout Itemize
2366 \begin_layout Itemize
2374 \begin_layout Itemize
2379 : [optional] if more than one author: whom to contact for offprint requests.
2382 \begin_layout Itemize
2387 : [optional] mail address for contacts.
2390 \begin_layout Itemize
2398 Received: <date>; Accepted <date>
2401 \begin_layout Standard
2402 There is no need to issue the
2408 command, this is done automatically by \SpecialChar LyX
2409 when the header is finished.
2410 Although the order of the single header entries doesn't matter it is advised
2411 to keep the above sequence, just to get the best optics and meets the layout
2412 of the real document.
2415 \begin_layout Standard
2416 If you want to place footnotes in the header block, e.
2417 \begin_inset space \thinspace{}
2421 \begin_inset space \space{}
2424 to state your present address, just use the standard footnote via the menu
2427 Insert\SpecialChar menuseparator
2432 will automagically use the term
2441 \begin_layout Standard
2442 In addition to these topics, the macros use three additional \SpecialChar LaTeX
2444 have no counterpart in \SpecialChar LyX
2448 \begin_layout Itemize
2455 to separate different names for more than one author and institute, respectivel
2459 \begin_layout Itemize
2466 to mark corresponding author/institute pairs.
2467 The institutes are numbered sequentially as they appear in the
2471 field, so you have to put a marker to each author.
2474 \begin_layout Itemize
2481 to supply an email address for fast contact.
2484 \begin_layout Standard
2485 In all cases, the appropriate command has to be entered in \SpecialChar LyX
2493 \begin_layout Subsection
2497 \begin_layout Standard
2498 The abstract should immediately follow the header block.
2499 With version 5 the abstract environment was changed to a command, and there
2500 is now a resctriction to only one paragraph.
2501 In addition, it should contain an entry with the keywords.
2502 This is not yet implemented for \SpecialChar LyX
2503 , therefore you have to enter the \SpecialChar LaTeX
2511 by hand and mark it as \SpecialChar LaTeX
2513 Refer to the example paper.
2516 \begin_layout Subsection
2517 Supported environments
2520 \begin_layout Standard
2521 The A&A paper layout supports the following environments for structuring
2525 \begin_layout Itemize
2531 \begin_layout Itemize
2537 \begin_layout Itemize
2543 \begin_layout Itemize
2549 \begin_layout Itemize
2555 \begin_layout Itemize
2561 \begin_layout Itemize
2567 \begin_layout Itemize
2573 \begin_layout Itemize
2579 \begin_layout Itemize
2585 \begin_layout Itemize
2591 \begin_layout Itemize
2598 \begin_layout Subsection
2599 Commands not supported by \SpecialChar LyX
2603 \begin_layout Standard
2604 Some commands are not yet supported by the
2608 layout for \SpecialChar LyX
2610 Some have already been mentioned.
2611 For the sake of completeness, they are listed all together here:
2614 \begin_layout Itemize
2622 \begin_layout Itemize
2630 \begin_layout Itemize
2638 \begin_layout Itemize
2646 \begin_layout Itemize
2654 \begin_layout Itemize
2662 \begin_layout Itemize
2670 \begin_layout Itemize
2678 \begin_layout Standard
2679 If you want to use any of these commands, you have to enter them yourself.
2682 Do not forget to mark them as \SpecialChar LaTeX
2686 \begin_layout Subsection
2687 Figure and Table Floats
2690 \begin_layout Standard
2692 provides support for the necessary float environments
2694 figure, figure*, table
2700 , therefore we won't tell much about it here.
2704 \begin_inset space ~
2710 Just remember that tables should be left-aligned.
2711 For that, select the table and change the alignment in
2713 Edit\SpecialChar menuseparator
2715 \begin_inset space ~
2721 \begin_layout Standard
2722 There is only one special thing: the figures with caption besides the figure.
2723 To create such a figure, you have to do the following:
2726 \begin_layout Enumerate
2727 Create a wide figure float:
2729 Insert\SpecialChar menuseparator
2730 Float\SpecialChar menuseparator
2733 , then right click in the figure and select
2736 \begin_inset space ~
2744 \begin_layout Enumerate
2745 Enter your caption text.
2748 \begin_layout Enumerate
2753 to move the cursor above the caption.
2756 \begin_layout Enumerate
2760 \begin_layout Enumerate
2761 Position the cursor behind the figure and insert a horizontal fill:
2763 Insert\SpecialChar menuseparator
2765 \begin_inset space ~
2768 Character\SpecialChar menuseparator
2770 \begin_inset space ~
2778 \begin_layout Enumerate
2779 Switch to \SpecialChar LaTeX
2783 \begin_inset space ~
2791 \begin_layout Enumerate
2801 Do not close the brace!
2804 \begin_layout Enumerate
2805 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
2810 \begin_inset space ~
2822 \begin_layout Standard
2823 Also, refer to the figures in the example paper.
2826 \begin_layout Subsection
2830 \begin_layout Standard
2831 For submission, the paper has to be formated in a special double-spacing
2833 For this purpose, you have to give the option
2837 to the documentclass.
2838 This must be done using the extra class options field in the
2840 Document\SpecialChar menuseparator
2844 Just enter the string
2851 \begin_layout Subsection
2855 \begin_layout Standard
2860 directory contains an example paper written with \SpecialChar LyX
2862 It is the example paper from the original macro package, translated to
2865 Use it for inspiration, and compare the original \SpecialChar LaTeX
2866 code with \SpecialChar LyX
2870 \begin_layout Section
2875 \begin_layout Standard
2881 \begin_layout Subsection
2885 \begin_layout Standard
2887 is a set of macros produced by the American Astronomical Society to
2888 facilitate electronic manuscript submission to the three journals they
2889 publish: the Astrophysical Journal (including the Letters and Supplement),
2890 the Astronomical Journal, and the Publications of the Astronomical Society
2893 has proven to be an excellent tool for generating these documents, especially
2894 given its equation, citation, and figure handling capabilities.
2896 requires version 5.0 (or higher) of these macros; preferably 5.2, which
2897 is the version described here, or higher.
2898 Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
2899 2.09 and are fundamentally
2900 incompatible with \SpecialChar LyX
2902 The AAS\SpecialChar TeX
2903 package may be downloaded from the AAS\SpecialChar TeX
2907 \begin_layout Standard
2908 \begin_inset VSpace medskip
2914 \begin_layout Standard
2916 \begin_inset Flex URL
2919 \begin_layout Plain Layout
2921 https://aas.org/aastex/aastex-downloads
2929 \begin_layout Standard
2930 \begin_inset VSpace medskip
2936 \begin_layout Standard
2937 A complete user guide is contained in that package and you should familiarize
2938 yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
2941 will not reduce the need to figure out all the AAS\SpecialChar TeX
2942 commands, it will only
2943 reduce the drudgery of typing everything in.
2944 It is your responsibility to ensure that the final exported \SpecialChar LaTeX
2946 completely to the requirements of the journal to which you are submitting
2950 \begin_layout Subsection
2951 Starting a New Paper
2954 \begin_layout Standard
2955 I strongly suggest that you start with the AAS\SpecialChar TeX
2959 File\SpecialChar menuseparator
2966 , enter the new file name, then choose the
2971 This will show the most common fields found in a manuscript.
2972 Simply overwrite the existing text (including the brackets,
2976 ) with the correct information.
2977 Many of the AAS\SpecialChar TeX
2978 commands and environments can be implemented directly in
2980 , but some cannot: most noticeably
2992 , which should stick out like a sore thumb if you actually just opened the
2994 For commands such as these, the \SpecialChar LaTeX
2995 code must be entered directly and marked
2997 Such commands are referred to as \SpecialChar TeX
2998 code, or Evil Red Text.
2999 I tried to minimize the amount of \SpecialChar TeX
3000 code needed in an AAS\SpecialChar TeX
3002 there is still a bit more required than any of us would like.
3005 \begin_layout Subsection
3006 Finishing Your Paper
3009 \begin_layout Standard
3010 When the paper is finished to your satisfaction and previews/prints correctly,
3012 \begin_inset Quotes eld
3016 \begin_inset Quotes erd
3019 actions which need to be done before you submit it to the journals.
3023 \begin_layout Enumerate
3024 Export your paper as a \SpecialChar LaTeX
3027 File\SpecialChar menuseparator
3028 Export\SpecialChar menuseparator
3036 \begin_layout Enumerate
3041 file with your favorite text editor
3045 \begin_layout Enumerate
3046 remove the comment lines before the
3055 \begin_layout Enumerate
3060 usepackage...{fontenc}
3062 line if it appears (usually just after
3077 \begin_layout Enumerate
3078 remove everything between (and including) the
3090 commands, except for any commands you specifically put into the \SpecialChar LaTeX
3092 (which should appear immediately after the
3093 \begin_inset Quotes eld
3096 User specified \SpecialChar LaTeX
3098 \begin_inset Quotes erd
3109 \begin_layout Enumerate
3110 Run the resulting file through \SpecialChar LaTeX
3111 to make sure it still processes correctly.
3114 \begin_layout Enumerate
3115 Reread the journal requirements to make sure your filenames and formats
3119 \begin_layout Enumerate
3123 \begin_layout Subsection
3124 Comments On Specific Commands
3127 \begin_layout Standard
3128 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
3135 ) gives a good description of each.
3136 Thus it's probably easiest for me to go down the list as found in the guide
3137 and offer comments where necessary.
3138 So let's begin \SpecialChar ldots
3142 \begin_layout Subsubsection
3143 Things that work as expected
3146 \begin_layout Standard
3147 Because they work as you might expect, I simply list them and the section
3248 begin{thebibliography}
3256 (2.13.2), all the cite commands and their variations (2.13.2), the generic
3257 graphicx figure commands (2.14.1),
3281 (2.15.4, amongst other places),
3308 \begin_layout Standard
3309 The following style options also work correctly:
3330 Simply put them in the
3336 Layout\SpecialChar menuseparator
3342 \begin_layout Subsubsection
3343 Things that work, but require more comment
3346 \begin_layout Standard
3347 The following items work, but require a little more discussion:
3350 \begin_layout Itemize
3351 These items are reserved for use by the journal editors, but you can put
3352 them into the \SpecialChar LaTeX
3353 preamble if you feel compelled to do so:
3386 \begin_layout Itemize
3387 These items may be placed in the \SpecialChar LaTeX
3388 preamble, and are included as blanks in
3410 \begin_layout Itemize
3417 (2.3) – can only be used
3418 \begin_inset Quotes eld
3422 \begin_inset Quotes erd
3425 , not in the middle of a paragraph.
3426 Use \SpecialChar TeX
3427 code if you need to embed it.
3430 \begin_layout Itemize
3437 (2.3) – will have extra {} after it.
3438 This should not cause an error.
3441 \begin_layout Itemize
3448 (2.6) – can only be used
3449 \begin_inset Quotes eld
3453 \begin_inset Quotes erd
3456 , not in the middle of a paragraph.
3457 Use \SpecialChar TeX
3458 code if you need to embed it.
3461 \begin_layout Itemize
3468 (2.8) – can't insert a cross-reference tag, you must type the tag name by
3472 \begin_layout Itemize
3486 \begin_layout Itemize
3493 (2.9) – will have extra {} after it.
3494 This should not cause an error.
3497 \begin_layout Itemize
3504 (2.11) – will have extra {} after it.
3505 This should not cause an error.
3508 \begin_layout Itemize
3515 (2.14.2) – you can insert an optional filename argument by placing the cursor
3516 at the beginning of the text and selecting
3518 Insert\SpecialChar menuseparator
3523 \begin_inset Quotes eld
3527 \begin_inset Quotes erd
3530 inserts an optional argument of the type needed by
3537 Hopefully it will be renamed someday.
3540 \begin_layout Itemize
3553 for the catalog ID optional parameter
3556 \begin_layout Itemize
3569 for the catalog ID optional parameter
3572 \begin_layout Subsubsection
3573 Things not implemented, use \SpecialChar TeX
3577 \begin_layout Standard
3600 setcounter{equation}
3602 (2.12), Journal name abbreviations (2.13.4),
3638 (2.15.4, insert it as the first element in the lefthand cell after where
3640 Don't use any of \SpecialChar LyX
3641 's rules in the table),
3653 (2.15.5), much of Misc (2.17, except
3704 \begin_layout Subsubsection
3705 Things that cannot be implemented
3708 \begin_layout Standard
3710 at least in any meaningful sort of way, so I suggest ignoring them.
3711 They are the references environment (2.13.3), and the deluxetable environment
3713 If you really, really need to use deluxetable, I suggest editing it in
3714 a separate file with a text editor, then using
3716 Insert\SpecialChar menuseparator
3718 \begin_inset space ~
3723 to include it in your \SpecialChar LyX
3729 file to see an example of this.
3732 \begin_layout Subsection
3733 FAQs, Tips, Tricks, and Other Ruminations
3736 \begin_layout Subsubsection
3737 Getting \SpecialChar LyX
3738 and AAS\SpecialChar TeX
3742 \begin_layout Standard
3743 It can be a bit tricky to get \SpecialChar LyX
3744 to recognize a new layout and document class.
3745 When all else fails, do this:
3748 \begin_layout Enumerate
3749 Make certain that \SpecialChar LaTeX
3750 can find AAS\SpecialChar TeX
3752 Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
3754 directory completely unrelated to \SpecialChar LaTeX
3755 or AAS\SpecialChar TeX
3756 and run \SpecialChar LaTeX
3764 \begin_layout Enumerate
3769 appears in \SpecialChar LyX
3777 \begin_layout Enumerate
3780 Tools\SpecialChar menuseparator
3784 , then restart \SpecialChar LyX
3788 \begin_layout Enumerate
3789 Open a regular new file, not from a template.
3790 Does AAS\SpecialChar TeX
3791 appear in the class list in
3793 Document\SpecialChar menuseparator
3799 \begin_layout Standard
3800 If you get a warning from an existing AAS\SpecialChar TeX
3801 document about not being able
3802 to find the AAS\SpecialChar TeX
3803 layout or a message about
3804 \begin_inset Quotes eld
3807 You should not mix title layouts with normal ones
3808 \begin_inset Quotes erd
3811 , things haven't been installed correctly.
3814 \begin_layout Subsubsection
3816 error processing a table
3819 \begin_layout Standard
3821 , by default, attempts to center the table caption/title.
3822 This seems to produce a bad interaction in AAS\SpecialChar TeX
3823 so you should click somewhere
3824 in the caption/title, then select
3826 Edit\SpecialChar menuseparator
3828 \begin_inset space ~
3842 This took care of it for me.
3845 \begin_layout Subsubsection
3849 \begin_layout Standard
3850 A couple of things: 1) I have noticed some funny spacing in the reference
3851 entries in the text.
3852 When you enter the bibliography item data, make sure their is
3856 space between the last author and the parenthesis setting off the year;
3860 \begin_inset space \thinspace{}
3864 \begin_inset space \space{}
3878 2) Entering the references at all is not obvious.
3879 The easiest thing is to start typing your first reference at the end of
3880 the document, then mark it as type
3885 That will put a small gray box in front of what you just typed.
3886 Click on the box to fill in the rest of the information.
3887 For new references, go to the end of an existing reference and press return.
3888 That will create a new line with its own box, etc.
3891 \begin_layout Subsubsection
3895 \begin_layout Standard
3896 Even though AAS\SpecialChar TeX
3897 provides its own figure commands (
3903 , for example), I much prefer \SpecialChar LaTeX
3904 's standard figure commands (with the default
3913 \begin_inset space ~
3916 commands as \SpecialChar TeX
3917 code into a Figure Float box if you desire, but I never have
3918 much luck getting the layout right.
3919 With the standard graphics, \SpecialChar LyX
3924 usepackage{graphicx}
3926 command into the \SpecialChar LaTeX
3927 preamble and handle the figures in the standard \SpecialChar LaTeX2e
3929 interspersing the figures in the text.
3930 I believe ApJ accepts figures exactly this way now; AJ might still use
3932 \begin_inset Quotes eld
3935 stack everything at the end
3936 \begin_inset Quotes erd
3942 \begin_layout Subsubsection
3943 Things I could have done, but didn't
3946 \begin_layout Standard
3948 \begin_inset Quotes eld
3952 \begin_inset Quotes erd
3955 things I could have implemented, but chose not to.
3956 For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
3958 even though it is double-spaced in the paper manuscript.
3959 Also, I chose not to make separate layouts for the preprint and preprint2
3961 Since I assume you will spend most of your time in the plain manuscript
3962 mode anyway, I decided not to chew up more disk space with this.
3966 \begin_layout Subsection
3970 \begin_layout Standard
3971 Your mileage may vary.
3972 I've now had papers published by both ApJ and AJ that have had 98% of the
3973 effort done in \SpecialChar LyX
3974 ; the last 2% was the \SpecialChar LaTeX
3975 post-processing and a few cleanups.
3976 I have had no trouble with the submission process, and I'm sure the journals
3977 were never aware that there might be a difference.
3978 So, go forth and publish!
3981 \begin_layout Section
3982 AMS \SpecialChar LaTeX
3986 \begin_layout Standard
3996 \begin_layout Standard
3997 \begin_inset VSpace bigskip
4003 \begin_layout Standard
4005 The AMS \SpecialChar LaTeX
4006 layouts are set up to conform to suggested styles for mathematical
4007 papers to be submitted to American Mathematical Society publications.
4008 The layouts are not tailored to a specific journal, but easily can be.
4009 You should refer to the AMS documentation for specific instructions for
4010 each journal (usually it will entail only changing a single line in the
4013 That documentation is available on the Web at
4014 \begin_inset Flex URL
4017 \begin_layout Plain Layout
4025 \begin_inset Flex URL
4028 \begin_layout Plain Layout
4030 ftp://ftp.ams.org/pub/tex/amslatex/
4036 These layouts are appropriate, and useful, for any mathematical writing.
4040 \begin_layout Standard
4041 There are two basic AMS \SpecialChar LaTeX
4045 \begin_layout Itemize
4046 amsart: The standard AMS article format.
4049 \begin_layout Itemize
4050 amsbook: the standard AMS book (really, monograph) format.
4054 \begin_layout Standard
4055 The layouts themselves contain only the minimum necessary to use the AMS
4057 They do not, in particular, contain any of the `theorem' environments used
4058 for setting theorems, lemmas, and the like.
4059 These are contained, instead, in the
4060 \begin_inset Flex Code
4063 \begin_layout Plain Layout
4069 module, which is loaded by default when you select one of the AMS classes.
4070 (It can also be used with other classes and can be removed, if you would
4071 rather use something else.) Less commonly used environments are in the
4072 \begin_inset Flex Code
4075 \begin_layout Plain Layout
4076 Theorems (AMS-Extended)
4081 module, which must be loaded manually.
4084 \begin_layout Standard
4085 By default, theorems and the like are numbered consecutively throughout
4086 the document, but this may be modified by loading the module
4087 \begin_inset Flex Code
4090 \begin_layout Plain Layout
4091 Theorems (Order by Section)
4096 or, if you are using
4097 \begin_inset Flex Code
4100 \begin_layout Plain Layout
4107 \begin_inset Flex Code
4110 \begin_layout Plain Layout
4111 Theorems (Order by Chapter)
4117 These will number the results as
4118 \begin_inset Formula $n.m$
4121 , where the first number refers to the section (or chapter) and the second
4122 refers to the total number of results so far in that section (or chapter).
4123 Many environments are also available unnumbered.
4124 These are indicated by an asterisk at the end.
4125 If you happen to want
4129 unnumbered results, the module
4130 \begin_inset Flex Code
4133 \begin_layout Plain Layout
4139 provides that option.
4142 \begin_layout Standard
4143 Note that these modules do not
4147 to be used with the AMS classes.
4148 It is perfectly possible to use the
4149 \begin_inset Flex Code
4152 \begin_layout Plain Layout
4158 module, and the others mentioned, with other classes, such as
4159 \begin_inset Flex Code
4162 \begin_layout Plain Layout
4169 \begin_inset Flex Code
4172 \begin_layout Plain Layout
4179 \begin_inset Flex Code
4182 \begin_layout Plain Layout
4191 \begin_layout Subsection
4192 What these layouts provide
4195 \begin_layout Standard
4196 There is a long list of included environments provided by these layouts.
4197 In AMS-\SpecialChar LaTeX
4198 , there is, in fact, an opportunity to define an unlimited variety
4199 of `theorem' environments.
4200 However, the AMS recommends the environments that are available in \SpecialChar LyX
4205 \begin_layout Standard
4206 The following environments—as well as the standard environments, such as
4208 \begin_inset Flex Noun
4211 \begin_layout Plain Layout
4218 \begin_inset Flex Noun
4221 \begin_layout Plain Layout
4228 \begin_inset Flex Noun
4231 \begin_layout Plain Layout
4238 \begin_inset Flex Noun
4241 \begin_layout Plain Layout
4248 \begin_inset Flex Noun
4251 \begin_layout Plain Layout
4258 \begin_inset Flex Code
4261 \begin_layout Plain Layout
4268 \begin_inset Flex Code
4271 \begin_layout Plain Layout
4280 \begin_layout Description
4281 Address This should be the author's permanent address.
4284 \begin_layout Description
4286 \begin_inset space ~
4289 Address This should be the author's temporary address at the time of submission,
4290 if different from the Address.
4293 \begin_layout Description
4294 Email Author's e-mail address
4297 \begin_layout Description
4298 URL Author's Web address, if desired.
4301 \begin_layout Description
4302 Keywords Key words or phrases used to identify specific topics discussed
4306 \begin_layout Description
4307 Subjectclass These refer to the AMS Subject Classifications, published and
4310 Mathematical Reviews
4313 These are also available online at the AMS cites listed above.
4316 \begin_layout Description
4320 \begin_layout Description
4324 \begin_layout Description
4328 \begin_layout Standard
4329 The following environments are provided by both the
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 modules, in the latter case in both starred (unnumbered) and unstarred
4350 (numbered) versions.
4351 These same environments are provided only in the starred versions by the
4353 \begin_inset Flex Code
4356 \begin_layout Plain Layout
4365 \begin_layout Theorem
4366 This is typically used for the statements of major results.
4370 \begin_layout Corollary*
4371 This is used for statements which follow fairly directly from previous statement
4373 Again, these can be major results.
4378 These are smaller results needed to prove other statements.
4381 \begin_layout Proposition
4382 These are less major results which (hopefully) add to the general theory
4386 \begin_layout Conjecture
4387 These are statements provided without justification, which the author does
4388 not know how to prove, but which seem to be true (to the author, at least).
4391 \begin_layout Definition*
4392 Guess what this is for.
4393 The font is different for this environment than for the previous ones.
4397 \begin_layout Example*
4398 Used for examples illustrating proven results.
4401 \begin_layout Problem
4402 It's not really known what this is for.
4403 You should figure it out.
4406 \begin_layout Exercise*
4407 Write a description for this one.
4410 \begin_layout Remark
4411 This environment is also a type of theorem, usually a lesser sort of observation.
4414 \begin_layout Claim*
4415 Often used in the course of giving a proof of a larger result.
4419 Generally, these are used to break up long arguments, using specific instances
4425 The numbering scheme for cases is on its own, not together with other numbered
4431 At the end of this environment, a QED symbol (usually a square, but it can
4432 vary with different styles) is placed.
4433 If you want to have other environments within this one—for example, Case
4434 environments—and have the QED symbol appear only after them, then the other
4435 environments need to be nested within the proof environment.
4438 Nesting Environments
4444 for information on nesting.
4447 \begin_layout Standard
4448 And these environments are provided by
4449 \begin_inset Flex Code
4452 \begin_layout Plain Layout
4453 Theorems (AMS-Extended)
4461 \begin_layout Criterion*
4462 A required condition.
4465 \begin_layout Algorithm*
4466 A general procedure to be used.
4469 \begin_layout Axiom*
4470 This is a property or statement taken as true within the system being discussed.
4473 \begin_layout Condition*
4474 Sometimes used to state a condition assumed within the present context of
4479 Similar to a Remark.
4482 \begin_layout Notation*
4483 Used for the explanation of, yes, notation.
4486 \begin_layout Summary
4487 Do we really need to tell you?
4490 \begin_layout Acknowledgement*
4494 \begin_layout Conclusion*
4495 Sometimes used at the end of a long train of argument.
4499 Used in a way similar to Proposition, though perhaps lower on the scale.
4502 \begin_layout Standard
4503 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
4506 They need to be available on your system in order to use these environments.
4509 \begin_layout Section
4517 \begin_layout Standard
4523 \begin_layout Subsection
4527 \begin_layout Standard
4528 These are the layout files for some of the journals of the American Geophysical
4530 It is assumed that you have both the AGU's own class files and AGUplus
4531 installed (everything to be found at
4532 \begin_inset Flex URL
4535 \begin_layout Plain Layout
4537 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
4545 \begin_layout Subsection
4549 \begin_layout Standard
4559 They are still called this in the \SpecialChar LyX
4560 GUI, though their \SpecialChar LaTeX
4573 \begin_layout Standard
4574 Newly defined styles are
4611 These are mostly manuscript attributes and defined in the AGU class documentati
4615 \begin_layout Standard
4616 I suspect this is still badly incomplete.
4619 \begin_layout Subsection
4623 \begin_layout Standard
4640 \begin_layout Subsection
4644 \begin_layout Itemize
4647 Journal of Geophysical Research
4656 \begin_layout Standard
4657 Add your own, it isn't so hard! Look at the
4668 \begin_layout Subsection
4669 Bugs and things to remember
4672 \begin_layout Standard
4673 In order to use the new layouts, you must remember to do the following for
4677 \begin_layout Enumerate
4683 This can be done in the
4685 Layout\SpecialChar menuseparator
4690 Document\SpecialChar menuseparator
4694 (AGU articles are always in English, right? So
4701 \begin_layout Enumerate
4711 (Yes, this is a bug.)
4714 \begin_layout Enumerate
4715 Make sure you use the
4719 bibliography style, by entering
4723 into the second field of the Bib\SpecialChar TeX
4725 None of the standard styles will do.
4728 \begin_layout Section
4732 \begin_layout Standard
4738 \begin_layout Subsection
4742 \begin_layout Standard
4743 Broadway is for writing plays.
4744 The format is more decorative than Hollywood, and much less standardized.
4745 This format should be suitable for workshops.
4748 \begin_layout Subsection
4752 \begin_layout Standard
4753 The same as in Hollywood.
4756 \begin_layout Subsection
4760 \begin_layout Standard
4765 names as labels then cross-reference the label to insert the name.
4766 The cross-reference dialog will show the current cast of characters.
4769 \begin_layout Subsection
4770 Paper size and Margins
4773 \begin_layout Standard
4774 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
4777 \begin_layout Subsection
4781 \begin_layout Standard
4782 The following environments are available.
4783 You can use broadway.bind to get the bind keys shown at the right.
4786 \begin_layout Itemize
4790 \begin_inset Newline newline
4795 You should not have to use this, but it is here for anything that does not
4799 \begin_layout Itemize
4803 \begin_inset space \hfill{}
4807 \begin_inset Newline newline
4812 Used to describe stage setting and the action.
4813 First use of speaker names in all CAPs.
4816 \begin_layout Itemize
4820 \begin_inset space \hfill{}
4824 \begin_inset Newline newline
4829 Automatically numbered.
4830 On screen it will be arabic, but will print as Roman.
4833 \begin_layout Itemize
4837 \begin_inset space \hfill{}
4841 \begin_inset Newline newline
4851 It is just centered text.
4854 \begin_layout Itemize
4858 \begin_inset space \hfill{}
4862 \begin_inset Newline newline
4867 Not automatically numbered.
4868 You supply the number.
4869 This is because I couldn't figure out how.
4872 \begin_layout Itemize
4876 \begin_inset space \hfill{}
4880 \begin_inset Newline newline
4885 A special case of Narrative to describe the setting and action as the curtain
4889 \begin_layout Itemize
4893 \begin_inset space \hfill{}
4897 \begin_inset Newline newline
4902 The speaker's (actor's) title, centered in all CAPS.
4905 \begin_layout Itemize
4909 \begin_inset space \hfill{}
4913 \begin_inset Newline newline
4918 Instructions to the speaker.
4919 The parentheses are automatically inserted.
4920 The ( will appear on screen, but both will be in the printed play.
4921 This environment is only used within
4928 \begin_layout Itemize
4932 \begin_inset space \hfill{}
4936 \begin_inset Newline newline
4941 What the Speaker says.
4944 \begin_layout Itemize
4948 \begin_inset space \hfill{}
4952 \begin_inset Newline newline
4957 The curtain comes down.
4960 \begin_layout Itemize
4964 \begin_inset space \hfill{}
4970 \begin_layout Itemize
4974 \begin_inset space \hfill{}
4980 \begin_layout Itemize
4984 \begin_inset space \hfill{}
4990 \begin_layout Standard
4994 \begin_layout Section
4998 \begin_layout Standard
5003 can be used to type letters according to German conventions.
5004 A template file is included in
5006 .../lyx/share/templates
5008 for you to use as a starting point.
5011 \begin_layout Section
5019 \begin_layout Standard
5025 \begin_layout Subsection
5029 \begin_layout Standard
5030 This is the layout file for the European Geophysical Society journals.
5035 can be downloaded from the web site of the EGS under
5036 \begin_inset Flex URL
5039 \begin_layout Plain Layout
5049 \begin_layout Subsection
5053 \begin_layout Standard
5056 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
5064 The current layout file is unfortunately very unmodular and would benefit
5065 from using the various
5072 \begin_layout Section
5076 \begin_layout Standard
5077 See the \SpecialChar LyX
5083 It contains all infos you need.
5086 \begin_layout Section
5089 Foil\SpecialChar TeX
5093 \begin_inset CommandInset label
5102 \begin_layout Standard
5108 \begin_layout Subsection
5112 \begin_layout Standard
5113 This section describes how to use \SpecialChar LyX
5114 to make slides for overhead projectors.
5115 There are two document classes that can do this: the default slides class
5118 Foil\SpecialChar TeX
5122 This section documents the latter.
5125 \begin_layout Standard
5126 I'm going to say this again, nice and clear, so that there's no misunderstanding
5130 \begin_layout Standard
5131 \begin_inset VSpace bigskip
5137 \begin_layout Standard
5141 This section documents the class
5142 \begin_inset Quotes eld
5150 \begin_inset Quotes erd
5158 \begin_layout Standard
5159 \begin_inset VSpace bigskip
5165 \begin_layout Standard
5166 If you're looking for the documentation for
5167 \begin_inset Quotes eld
5175 \begin_inset Quotes erd
5179 \begin_inset space ~
5183 \begin_inset CommandInset ref
5185 reference "sec:slitex"
5190 If your machine doesn't have the
5198 installed, you'll probably have to use the default
5202 class, which isn't quite as good as
5207 \begin_layout Standard
5212 class is designed for use with version
5213 \begin_inset space ~
5221 class file which is now an integral part of \SpecialChar LaTeX2e
5225 \begin_layout Subsection
5229 \begin_layout Standard
5230 Obviously, to use this document class, you need to select
5241 \begin_inset space ~
5247 There are some settings in the
5250 \begin_inset space ~
5255 dialog that you should know about that are specific to this class:
5258 \begin_layout Itemize
5259 Don't change the options
5270 \begin_inset space ~
5276 They're ignored by the
5283 \begin_layout Itemize
5284 The default font size is 20
5285 \begin_inset space \thinspace{}
5288 pt with the other options being 17
5289 \begin_inset space \thinspace{}
5293 \begin_inset space \thinspace{}
5297 \begin_inset space \thinspace{}
5303 \begin_layout Itemize
5312 but all math equations are still typeset in the usual roman font.
5315 \begin_layout Itemize
5318 Foil\SpecialChar TeX
5321 supports A4 and Letter paper sizes as well as a special size for working
5323 \begin_inset space \thinspace{}
5327 It doesn't support A5, B5, legal or executive paper sizes.
5330 \begin_layout Itemize
5331 Don't bother changing the
5335 settings because they are ignored anyway.
5336 All floats appear where they are defined in the text.
5339 \begin_layout Itemize
5344 setting behaves a bit differently for this class.
5347 Foil\SpecialChar TeX
5350 provides extensive footer and header capabilities including a user-defined
5353 \begin_inset space ~
5357 \begin_inset CommandInset ref
5359 reference "sec:foilfoot"
5364 The title page is treated differently to all other pages in the document
5373 has the logo centered at the bottom of the page (if one is defined).
5374 The possible page style choices and what they do are as follows:
5378 \begin_layout Labeling
5379 \labelwidthstring MMMMMMM
5386 The final output contains no page numbers, or other headers or footers
5387 (except footnotes of course).
5391 \begin_layout Labeling
5392 \labelwidthstring MMMMMMM
5399 The final output contains page numbers centered at the bottom of the page.
5400 No other headings or footers (other than footnotes).
5403 \begin_layout Labeling
5404 \labelwidthstring MMMMMMM
5409 Page numbers in lower right corner.
5410 Additional headers and footers are also shown.
5411 This is also the default.
5414 \begin_layout Labeling
5415 \labelwidthstring MMMMMMM
5420 Gives you access to the
5424 package although its use with
5426 Foil\SpecialChar TeX
5429 is discouraged by the writer of the
5431 Foil\SpecialChar TeX
5434 package because of some potential page layout clashes.
5438 \begin_layout Subsubsection
5442 \begin_layout Standard
5443 The following options may be used in the extra class options in the
5445 Document\SpecialChar menuseparator
5451 \begin_layout Labeling
5452 \labelwidthstring MMMMMMx
5457 This sets up the page layout for 7.33
5458 \begin_inset space \thinspace{}
5462 \begin_inset space \thinspace{}
5465 in paper, which is about the same aspect ratio as a 35
5466 \begin_inset space \thinspace{}
5469 mm slide, making it a bit easier to work with this medium.
5472 \begin_layout Labeling
5473 \labelwidthstring MMMMMMx
5478 Places a rule across the page below the header on every page except the
5482 \begin_layout Labeling
5483 \labelwidthstring MMMMMMx
5488 Places a rule across the page above the footer on every page except the
5492 \begin_layout Labeling
5493 \labelwidthstring MMMMMMx
5498 This is automatically set each time you create a new
5505 Foil\SpecialChar TeX
5508 to use the dvips driver to rotate those pages that are set as landscape
5512 \begin_layout Labeling
5513 \labelwidthstring MMMMMMx
5518 Simply changes the page dimensions to those of a landscape page but doesn't
5520 Thus if you use this option you need to use an external program to rotate
5521 each page or feed your paper through your printer as landscape.
5522 Note that this option effectively reverses the roles of the
5530 environments (don't worry these are described in the next section).
5533 \begin_layout Labeling
5534 \labelwidthstring MMMMMMx
5539 Equation numbers on the left.
5542 \begin_layout Labeling
5543 \labelwidthstring MMMMMMx
5548 Flush-left equations.
5551 \begin_layout Subsection
5552 Supported Environments
5555 \begin_layout Standard
5556 Most of the environments commonly supported in other classes are also supported
5562 There are several additional environments provided by
5564 Foil\SpecialChar TeX
5567 as well as a couple added by \SpecialChar LyX
5569 The following environments are shared with other classes:
5572 \begin_layout Standard
5573 \begin_inset Flex Multiple Columns
5576 \begin_layout Itemize
5582 \begin_layout Itemize
5588 \begin_layout Itemize
5594 \begin_layout Itemize
5600 \begin_layout Itemize
5606 \begin_layout Itemize
5613 \begin_layout Itemize
5619 \begin_layout Itemize
5625 \begin_layout Itemize
5631 \begin_layout Itemize
5637 \begin_layout Itemize
5643 \begin_layout Itemize
5649 \begin_layout Itemize
5655 \begin_layout Itemize
5661 \begin_layout Itemize
5667 \begin_layout Itemize
5673 \begin_layout Itemize
5679 \begin_layout Itemize
5690 \begin_layout Standard
5691 That is, all the major environments apart from the sectioning environments.
5692 Since foils are essentially self-contained sections, with a title and body,
5695 Foil\SpecialChar TeX
5698 provides specific commands for starting new foils and these are:
5701 \begin_layout Itemize
5707 \begin_layout Itemize
5713 \begin_layout Standard
5715 also provides slightly modified versions of these two environments called:
5718 \begin_layout Itemize
5724 \begin_layout Itemize
5730 \begin_layout Standard
5731 and the differences will be explained in the next section.
5734 \begin_layout Standard
5735 Since foils are often used in presenting ideas or new theorems and such
5738 Foil\SpecialChar TeX
5741 also provides a comprehensive box of goodies for presenting them:
5744 \begin_layout Standard
5745 \begin_inset Flex Multiple Columns
5748 \begin_layout Itemize
5754 \begin_layout Itemize
5760 \begin_layout Itemize
5766 \begin_layout Itemize
5772 \begin_layout Itemize
5778 \begin_layout Itemize
5784 \begin_layout Itemize
5790 \begin_layout Itemize
5796 \begin_layout Itemize
5802 \begin_layout Itemize
5808 \begin_layout Itemize
5819 \begin_layout Standard
5820 The starred versions are unnumbered while the unstarred versions are numbered.
5821 There are also two list environments added by \SpecialChar LyX
5825 \begin_layout Itemize
5831 \begin_layout Itemize
5837 \begin_layout Standard
5840 Foil\SpecialChar TeX
5843 provides some powerful header and footer capabilities that are best set
5844 in the preamble although they may be set at any point in a document.
5845 If you want to change these settings in your document the best place to
5846 do so is at the very top of a foil, i.
5847 \begin_inset space \thinspace{}
5853 \begin_inset space \space{}
5858 straight after the foilhead.
5861 \begin_layout Standard
5862 For this purpose, the following command styles are provided [
5869 \begin_layout Standard
5870 \begin_inset Flex Multiple Columns
5873 \begin_layout Itemize
5877 \begin_inset space ~
5883 \begin_layout Itemize
5889 \begin_layout Itemize
5893 \begin_inset space ~
5899 \begin_layout Itemize
5903 \begin_inset space ~
5909 \begin_layout Itemize
5913 \begin_inset space ~
5920 \begin_layout Plain Layout
5921 \begin_inset space ~
5933 \begin_layout Standard
5934 There are also a few commands provided by
5936 Foil\SpecialChar TeX
5939 that aren't directly supported by \SpecialChar LyX
5940 but I'll tell you what they do and how
5941 to use them in section
5942 \begin_inset space ~
5946 \begin_inset CommandInset ref
5948 reference "sec:unsuppfoils"
5955 \begin_layout Subsection
5956 Building a Set of Foils
5959 \begin_layout Standard
5960 This section will give a simple introduction to using the different environments
5961 to build a set of foils.
5962 If you want to see an example set of foils, take a look at the
5966 file you find in \SpecialChar LyX
5974 \begin_layout Subsubsection
5975 Give It a Title Page
5978 \begin_layout Standard
5979 Unlike other classes that provide
5999 creates the title on a page of its own.
6000 If you leave out the
6004 environment \SpecialChar LaTeX
6005 will substitute the current date (every time you regenerate
6009 \begin_layout Subsubsection
6013 \begin_layout Standard
6014 As I mentioned earlier, there are four ways of starting a new foil.
6015 For portrait foils you should use
6024 The difference between these two environments is the amount of space between
6025 the title of the foil (the foilhead) and the body of the foil.
6028 \begin_layout Standard
6029 Landscape foils are generated using the
6038 Again the only difference is the spacing between foilhead and body.
6039 Both of the short versions have 0.5
6040 \begin_inset space ~
6043 inches less separation between the foilhead and the body.
6047 \begin_layout Standard
6048 One problem with the support for landscape foils is the requirement that
6053 driver to generate the PostScript output otherwise the foils won't be rotated.
6054 It is possible to get landscape foils even if you haven't got the
6058 driver provided you can feed your foils sideways through your printer ;-)
6061 \begin_layout Subsubsection
6062 Theorems, Lemmas, Proofs and more
6065 \begin_layout Standard
6066 Due to a small bug in \SpecialChar LyX
6067 you can't have two of the same type of these environments
6068 directly following each other.
6069 They must be separated by something.
6070 If you try, you will just be extending the previous environment as if you
6071 had merged the two environments together.
6072 So, how do you get around this problem? The simplest option is to insert
6073 some text between the two environments or add a
6078 environment between the two with just a
6079 \begin_inset Quotes eld
6087 \begin_inset Quotes erd
6091 This will force \SpecialChar LyX
6092 to produce two separate environments and hence the correct
6095 An example is provided in the example file included with the \SpecialChar LyX
6097 Remember, this problem only occurs if you are trying to place two of the
6098 same type of theorem-like environments one directly after the other.
6101 \begin_layout Subsubsection
6105 \begin_layout Standard
6106 You get all the commonly supported list styles found in other classes as
6107 well as two new ones.
6108 I'll only describe the new ones here.
6109 If you want to find out more about the other list environments check out
6115 If you intend to use itemized lists you might also want to read about the
6119 \begin_inset space ~
6123 \begin_inset space ~
6128 dialog described above in section
6129 \begin_inset space ~
6133 \begin_inset CommandInset ref
6135 reference "sec:bullet"
6142 \begin_layout Standard
6143 The two new list styles,
6151 , are designed to make it easier for you to create lists of do's and don'ts
6152 or right and wrong by providing dedicated environments that use a tick
6153 or a cross as the label of the list.
6154 These lists are in fact dedicated variants of the
6159 They do however require that you have the
6166 \begin_layout Subsubsection
6170 \begin_layout Standard
6173 Foil\SpecialChar TeX
6176 redefines the floating tables and figures so that they appear exactly where
6177 they are in the text rather than pushing them to the top of the page or
6178 to some user specified location.
6179 In fact if you change the float placement settings they are simply ignored.
6182 \begin_layout Subsubsection
6183 Page Headers and Footers
6184 \begin_inset CommandInset label
6193 \begin_layout Standard
6197 \begin_inset space ~
6206 are two commands used to control the left-footer text string.
6207 The first is meant to allow you to include a graphic logo on your foils
6209 \begin_inset Quotes eld
6214 Foil\SpecialChar TeX
6218 \begin_inset Quotes erd
6222 While the second is meant to provide a classification for the audience,
6226 \begin_inset space \thinspace{}
6232 \begin_inset space \space{}
6236 It is empty by default.
6239 \begin_layout Standard
6240 The remaining page corners can be filled by
6243 \begin_inset space ~
6248 (which defaults to page numbers),
6251 \begin_inset space ~
6259 \begin_inset space ~
6267 \begin_layout Subsection
6270 Foil\SpecialChar TeX
6274 \begin_inset CommandInset label
6276 name "sec:unsuppfoils"
6283 \begin_layout Standard
6284 All the commands mentioned below need to be set in a
6294 within another environment.
6297 \begin_layout Subsubsection
6301 \begin_layout Standard
6302 All lengths are adjusted using the
6325 should be replaced by the name given to the length you want to change and
6330 is the length value.
6331 All lengths should be specified in units of length such as inches (
6343 ) or relative to some document or font-based length such as
6353 \begin_layout Standard
6354 It's possible to change the spacing between a foilhead and the body of the
6355 foil by adjusting the length specified by
6362 For example, to make
6367 \begin_inset space \space{}
6370 in closer to their bodies put the following in the preamble:
6376 foilheadskip}{-0.5in}
6379 \begin_layout Standard
6380 The spacings around floats can be adjusted by setting these lengths:
6383 \begin_layout Labeling
6384 \labelwidthstring MMMMMMMMMMM
6391 Separation between the text and the top of the float
6394 \begin_layout Labeling
6395 \labelwidthstring MMMMMMMMMMM
6402 Separation between the float and the caption
6405 \begin_layout Labeling
6406 \labelwidthstring MMMMMMMMMMM
6413 Separation between the caption and the following text
6416 \begin_layout Labeling
6417 \labelwidthstring MMMMMMMMMMM
6424 You can make the captions narrower than the surrounding text by adjusting
6426 Best done relative to
6435 \begin_layout Standard
6436 There are also several title page related lengths that you may find useful
6437 if you have a long title or several authors:
6440 \begin_layout Labeling
6441 \labelwidthstring MMMMMMMMMMM
6448 Separation from headers to
6453 \begin_layout Labeling
6454 \labelwidthstring MMMMMMMMMMM
6472 \begin_layout Labeling
6473 \labelwidthstring MMMMMMMMMMM
6487 \begin_layout Labeling
6488 \labelwidthstring MMMMMMMMMMM
6504 \begin_layout Labeling
6505 \labelwidthstring MMMMMMMMMMM
6521 \begin_layout Standard
6522 The last length related command affects all the list environments.
6533 a list environment then all the vertical spacing between the list items
6535 Note that this is a command not a length so it doesn't require
6541 like the stuff mentioned above.
6544 \begin_layout Subsubsection
6548 \begin_layout Standard
6561 commands control whether the logo in the
6565 definition appear on a given page.
6572 in the preamble then none of the foils will have the logo on them.
6573 If you don't want the logo on a particular page place the
6579 directly after the foilhead of that page and the
6585 directly after the next foilhead.
6588 \begin_layout Standard
6589 If you decide to use the
6593 page style setting in the
6596 \begin_inset space ~
6601 dialog you should probably add
6611 to your preamble so headers and footers on landscape pages are correctly
6612 placed when rotated.
6613 This is due to some clashes between the page layouts provided by the
6624 \begin_layout Section
6625 Hollywood (Hollywood spec scripts)
6628 \begin_layout Standard
6634 \begin_layout Subsection
6638 \begin_layout Standard
6639 Getting the format of a Hollywood script right is a
6640 \begin_inset Quotes eld
6644 \begin_inset Quotes erd
6647 It is designed to make the readers focus on content and to be easy and
6648 familiar for the actors to read.
6649 Each page of a script should be one minute of film.
6650 Nothing goes in a script that you cannot see or hear on screen.
6651 The courier 12 pt font should be used throughout.
6655 \begin_layout Subsection
6659 \begin_layout Standard
6660 Speakers' lines should NEVER break in mid-sentence.
6661 If a speaker's lines continue over a page break, repeat the
6665 title followed by (Cont'd).
6668 \begin_layout Subsection
6672 \begin_layout Standard
6677 names as labels then cross-reference the label to insert the name.
6678 The cross-reference dialog will show the current cast of characters.
6679 You can use this to insert the speaker name in narratives also.
6682 \begin_layout Subsection
6683 Paper size and Margins
6686 \begin_layout Standard
6687 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
6690 \begin_layout Subsection
6694 \begin_layout Standard
6695 The following environments are available.
6696 You can use hollywood.bind to get the bind keys shown at the right.
6699 \begin_layout Itemize
6703 \begin_inset Newline newline
6708 Used where nothing else works.
6712 \begin_layout Itemize
6718 \begin_inset space \hfill{}
6726 \begin_inset Newline newline
6729 Usually followed by something like
6730 \begin_inset Quotes eld
6734 \begin_inset Quotes erd
6740 \begin_layout Itemize
6744 \begin_inset space \hfill{}
6748 \begin_inset Newline newline
6753 Introduces a new INTERIOR camera set-up.
6754 Always followed by DAY or NIGHT, or something similar to define the lighting
6756 Everthing on this line in CAPS.
6759 \begin_layout Itemize
6763 \begin_inset space \hfill{}
6767 \begin_inset Newline newline
6772 Introduces a new EXTERIOR camera set-up.
6773 Everthing on this line in CAPS.
6776 \begin_layout Itemize
6780 \begin_inset space \hfill{}
6784 \begin_inset Newline newline
6789 The character speaking.
6792 \begin_layout Itemize
6796 \begin_inset space \hfill{}
6800 \begin_inset Newline newline
6805 Instructions to the speaker.
6806 The () are automatically inserted, but only the ( will show in \SpecialChar LyX
6808 Both will be printed.
6811 \begin_layout Itemize
6815 \begin_inset space \hfill{}
6819 \begin_inset Newline newline
6831 \begin_layout Itemize
6835 \begin_inset space \hfill{}
6839 \begin_inset Newline newline
6844 Camera movement instruction.
6846 \begin_inset space \thinspace{}
6850 \begin_inset space \space{}
6856 \begin_layout Itemize
6860 \begin_inset space \hfill{}
6866 \begin_layout Itemize
6870 \begin_inset space \hfill{}
6876 \begin_layout Itemize
6880 \begin_inset space \hfill{}
6886 \begin_layout Itemize
6890 \begin_inset space \hfill{}
6896 \begin_layout Subsection
6900 \begin_layout Itemize
6904 \begin_layout Itemize
6908 \begin_layout Itemize
6910 \begin_inset space \thinspace{}
6917 \begin_layout Itemize
6922 \begin_layout Itemize
6923 PAN — camera movement
6926 \begin_layout Itemize
6927 INSERT — cut to close-up of
6930 \begin_layout Section
6934 \begin_layout Standard
6937 Panayotis Papasotiriou
6940 \begin_layout Subsection
6944 \begin_layout Standard
6945 The ijmpc package is a set of macros that facilitates electronic manuscript
6948 International Journal of Modern Physics C
6951 Similarly, the ijmpd package is for creating manuscripts to be submitted
6954 International Journal of Modern Physics D
6957 Both journals are published by World Scientific.
6958 The corresponding document classes are named
6967 These files, together with instructions for the authors, can be downloaded
6969 \begin_inset Flex URL
6972 \begin_layout Plain Layout
6974 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
6980 \begin_inset Flex URL
6983 \begin_layout Plain Layout
6985 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
6991 Both packages are modified versions of the standard
6992 \begin_inset Quotes eld
6996 \begin_inset Quotes erd
6999 package, and they are almost (but not exactly) identical.
7000 Most of their features are supported by \SpecialChar LyX
7002 I have used \SpecialChar LyX
7003 successfully to write articles submitted to both journals
7004 without any problem.
7007 \begin_layout Subsection
7011 \begin_layout Standard
7012 As usual, the easiest way to write a paper is to start with a template.
7015 File\SpecialChar menuseparator
7031 This will give an (almost) empty document that includes the most common
7032 fields found in a manuscript.
7033 Simply overwrite the existing text (including the brackets,
7038 You should keep in mind the following remarks.
7041 \begin_layout Enumerate
7043 won't let you change the font size and the page style of the document,
7044 because such modifications are not allowed by both packages.
7047 \begin_layout Enumerate
7048 The language of the document should not be changed.
7049 Before previewing your paper, be sure that the babel package is not used.
7050 To do this, click on
7052 Tools\SpecialChar menuseparator
7063 checkbox in the language settings, and click on
7071 , if you wish to make this change permanent).
7074 \begin_layout Enumerate
7076 \begin_inset Quotes eld
7080 \begin_inset Quotes erd
7083 style must be used to define keywords.
7086 \begin_layout Enumerate
7087 The ijmpc package provides a style named
7088 \begin_inset Quotes eld
7091 Classification Codes
7092 \begin_inset Quotes erd
7095 , which can be used to define classification codes, such as PACS numbers.
7096 Note that this facility is not supported by the ijmpd package.
7099 \begin_layout Enumerate
7100 Several new environments are available:
7101 \begin_inset Quotes eld
7105 \begin_inset Quotes erd
7109 \begin_inset Quotes eld
7113 \begin_inset Quotes erd
7117 \begin_inset Quotes eld
7121 \begin_inset Quotes erd
7125 \begin_inset Quotes eld
7129 \begin_inset Quotes erd
7133 \begin_inset Quotes eld
7137 \begin_inset Quotes erd
7141 \begin_inset Quotes eld
7145 \begin_inset Quotes erd
7149 \begin_inset Quotes eld
7153 \begin_inset Quotes erd
7157 \begin_inset Quotes eld
7161 \begin_inset Quotes erd
7165 \begin_inset Quotes eld
7169 \begin_inset Quotes erd
7173 \begin_inset Quotes eld
7177 \begin_inset Quotes erd
7181 \begin_inset Quotes eld
7185 \begin_inset Quotes erd
7189 \begin_inset Quotes eld
7193 \begin_inset Quotes erd
7197 \begin_inset Quotes eld
7201 \begin_inset Quotes erd
7205 \begin_inset Quotes eld
7209 \begin_inset Quotes erd
7213 Their use is more or less obvious.
7215 supports all these environments; it will use the proper label, text style,
7216 and numbering scheme for each of them.
7219 \begin_layout Enumerate
7220 Both packages use basic citations; the natbib package should not be used.
7222 , citation references are shown as usual; in the output, citations are
7223 shown as superscripts.
7224 If you want to use a citation as normal text, you should use the
7229 \begin_inset space \thinspace{}
7233 \begin_inset space \space{}
7237 \begin_inset Quotes eld
7241 \begin_inset space \space{}
7251 \begin_inset Quotes erd
7257 \begin_layout Enumerate
7259 \begin_inset Quotes eld
7263 \begin_inset Quotes erd
7266 section in both packages.
7267 To put acknowledgments, just use the
7268 \begin_inset Quotes eld
7272 \begin_inset Quotes erd
7278 \begin_layout Enumerate
7279 Appendices may be added to the paper,
7283 the Acknowledgments and
7289 provides a special environment, called
7290 \begin_inset Quotes eld
7294 \begin_inset Quotes erd
7297 which marks the beginning of the appendices.
7298 This environment should be left blank; it just sends a \SpecialChar LaTeX
7299 command, but nothing
7303 \begin_inset Quotes eld
7307 \begin_inset Quotes erd
7310 is printed with blue letters, as a signal that all sections after that
7311 point are appendices.
7312 To write an appendix, use the
7313 \begin_inset Quotes eld
7317 \begin_inset Quotes erd
7322 will number each appendix with capital letters, as required by both journals.
7324 \begin_inset Quotes eld
7328 \begin_inset Quotes erd
7335 be present before the first appendix; if not, all appendices will be numbered
7336 as normal sections in the output.
7339 \begin_layout Enumerate
7340 The ijmpc and the ijmpd packages use the
7344 command to implement table captions.
7345 As a result, a table created by \SpecialChar LyX
7346 is printed correctly, but its caption
7348 However, you can use some \SpecialChar TeX
7349 code to overcome this problem, so that captions
7350 are printed as expected.
7351 To do so, create a float table as usual, remove the caption, and replace
7352 it with the \SpecialChar TeX
7363 (sic); you must also the \SpecialChar TeX
7368 immediately after the tabular material.
7369 Study the example table included in the template files to see how this
7370 trick is implemented.
7371 Alternatively, If you need table captions, you should implement the whole
7376 file, then include this file to the \SpecialChar LyX
7379 Insert\SpecialChar menuseparator
7380 File\SpecialChar menuseparator
7382 \begin_inset space ~
7388 Details on how to create a table float can be found in the files
7396 , included in the corresponding packages.
7399 \begin_layout Subsection
7400 Preparing a paper for submission
7403 \begin_layout Standard
7404 Before you submit your paper you must export the \SpecialChar LyX
7405 document as a \SpecialChar LaTeX
7408 File\SpecialChar menuseparator
7409 Export\SpecialChar menuseparator
7417 \begin_layout Plain Layout
7418 Actually you have the choice between \SpecialChar LaTeX
7419 (plain) and pdflatex.
7420 If you intend to use pdflatex to prepare the paper, you should use the
7421 pdflatex option so that included graphics are converted to PDF format,
7422 ready for use by pdflatex.
7427 , then make the following changes to the resulting
7434 \begin_layout Enumerate
7435 Remove the comment lines before the
7444 \begin_layout Enumerate
7445 Remove everything between (and including) the
7457 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7461 \begin_layout Standard
7466 file should be saved and processed through \SpecialChar LaTeX
7467 as many times as necessary.
7468 You may also want to check the resulting
7475 \begin_layout Subsection
7476 Use of \SpecialChar TeX
7480 \begin_layout Standard
7481 The use of \SpecialChar TeX
7482 code is reduced to two commands, which must be placed at the
7483 top of the document.
7484 If you started writing your paper by using the
7492 template, the \SpecialChar TeX
7493 code needed is already in its place; you usually don't need
7495 You may only modify the first \SpecialChar TeX
7496 code to specify the information printed
7497 to the top of odd and even pages (authors' names and short paper's title,
7499 This \SpecialChar TeX
7500 code must have the form
7504 markboth{Authors' Names}{Short Paper's Title}
7509 \begin_layout Section
7513 \begin_layout Standard
7519 \begin_layout Subsection
7523 \begin_layout Standard
7524 The iopart package provides a document class to create electronic manuscript
7525 submission to the journals published by the Institute of Physics.
7526 Instructions for the authors how to create a paper using the iopart class
7527 can be downloaded together with the iopart package from the site
7528 \begin_inset Flex URL
7531 \begin_layout Plain Layout
7533 ftp://ftp.iop.org/pub/journals/latex2e
7541 \begin_layout Subsection
7545 \begin_layout Standard
7546 The easiest way to write a paper is to start with the file
7550 that is available in \SpecialChar LyX
7551 's examples files folder.
7552 Open this file, save it under a new name, and start writing.
7553 The example file explains how to use the special text environments.
7554 Here are the most important advices:
7557 \begin_layout Itemize
7558 To be able to compile your document to a PDF, PS, or DVI, ensure that the
7561 Use AMS math package
7563 in the document settings under
7570 \begin_layout Itemize
7573 The title environment defines the kind of your paper.
7574 So use one of the following environments for the title:
7578 \begin_layout Itemize
7587 \begin_layout Itemize
7596 \begin_layout Itemize
7602 for a Topical review
7605 \begin_layout Itemize
7614 \begin_layout Itemize
7623 \begin_layout Itemize
7629 for a Paper (same as Title)
7632 \begin_layout Itemize
7638 for a Preliminary communication
7641 \begin_layout Itemize
7647 for a Rapid communication
7650 \begin_layout Itemize
7656 for a Letter to the editor
7660 \begin_layout Itemize
7663 All title environments except of
7667 can have an optional short title.
7670 \begin_layout Itemize
7671 There is a general title environment
7675 which is not directly supported by the \SpecialChar LyX
7677 This can be used as \SpecialChar TeX
7678 code when your document doesn't fit into one of the
7682 \begin_layout Standard
7683 For more informations like hints for special table and formula formatting,
7684 look at the IOP author guidelines.
7687 \begin_layout Section
7691 \begin_layout Standard
7694 Panayotis Papasotiriou
7697 \begin_layout Subsection
7701 \begin_layout Standard
7702 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7703 that facilitates electronic manuscript submission to the journals they
7705 Most known of them (at least in my domain of interest) are
7707 Astrophysics and Space Science
7713 , but there are many others (see a complete list at
7714 \begin_inset Flex URL
7717 \begin_layout Plain Layout
7719 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7725 The Kluwer package may be downloaded from the site
7726 \begin_inset Flex URL
7729 \begin_layout Plain Layout
7731 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7737 A complete user guide is contained in that package (but it can also be
7738 downloaded separately).
7741 \begin_layout Standard
7743 supports many features of the package but not everything.
7744 However, the \SpecialChar TeX
7745 code needed is reduced to some
7746 \begin_inset Quotes eld
7750 \begin_inset Quotes erd
7753 commands of the package (see
7754 \begin_inset space ~
7758 \begin_inset CommandInset ref
7760 reference "subsec:kluwer_peculiarities"
7765 I have recently used \SpecialChar LyX
7766 to write an article submitted to the
7768 Astrophysics and Space Science
7770 without any problem.
7773 \begin_layout Subsection
7777 \begin_layout Standard
7778 The easiest way to write a paper is to start with the Kluwer template file.
7781 File\SpecialChar menuseparator
7793 This will give an (almost) empty document that includes the most common
7794 fields found in a manuscript and a short description of their use.
7795 As in most templates, simply overwrite the existing text (including the
7800 ) with the correct information.
7803 \begin_layout Subsection
7804 Preparing a paper for submission
7807 \begin_layout Standard
7808 As in the AAS\SpecialChar TeX
7809 package, before you submit your paper to a journal you must
7811 \begin_inset Quotes eld
7815 \begin_inset Quotes erd
7821 \begin_layout Enumerate
7822 Export your paper as a \SpecialChar LaTeX
7824 To do this, click on
7826 File\SpecialChar menuseparator
7827 Export\SpecialChar menuseparator
7835 \begin_layout Enumerate
7840 file with a text editor and make the following changes
7844 \begin_layout Enumerate
7845 remove the comment lines before the
7854 \begin_layout Enumerate
7855 remove everything between (and including) the
7867 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7871 \begin_layout Standard
7880 \begin_layout Enumerate
7885 file through \SpecialChar LaTeX
7886 as many times as necessary (usually up to three).
7889 \begin_layout Enumerate
7895 \begin_inset space \thinspace{}
7899 \begin_inset space \space{}
7906 , and check if everything is OK (it should, if you didn't make any mistake).
7909 \begin_layout Subsection
7910 \begin_inset Quotes eld
7914 \begin_inset Quotes erd
7917 of the Kluwer package
7918 \begin_inset CommandInset label
7920 name "subsec:kluwer_peculiarities"
7927 \begin_layout Standard
7928 The Kluwer package has the following
7929 \begin_inset Quotes eld
7933 \begin_inset Quotes erd
7939 \begin_layout Enumerate
7940 It is possible to write multiple articles in the same \SpecialChar LaTeX
7945 \begin_layout Plain Layout
7946 I can't imagine any good reason to do this.
7952 Each article must be included in the environment
7953 \begin_inset Quotes eld
7957 \begin_inset Quotes erd
7961 Unfortunately, this environment cannot be omitted, even if you write just
7963 Therefore, each article starts with the command
7969 and, obviously, ends with the command
7976 Although this can be implemented in \SpecialChar LyX
7977 , I didn't included it, since it looks
7978 ugly and can confuse the novice user.
7979 Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
7982 \begin_inset Quotes eld
7987 \begin_inset Quotes erd
7993 \begin_layout Enumerate
7994 Information given at the beginning of the article (i.
7995 \begin_inset space \thinspace{}
7999 \begin_inset space \space{}
8002 title, subtitle, author, institution, running title, running author, abstract
8003 and keywords) must be included in an environment called
8004 \begin_inset Quotes eld
8008 \begin_inset Quotes erd
8012 This is not implemented in \SpecialChar LyX
8013 , so you must enter title, subtitle etc.
8014 \begin_inset space ~
8017 between two \SpecialChar TeX
8033 \begin_layout Enumerate
8034 According to the user manual, the label of each bibliography item must be
8058 \begin_layout Standard
8063 template takes care of all these
8064 \begin_inset Quotes eld
8068 \begin_inset Quotes erd
8072 If you start a new paper using this template you don't need to do anything
8077 \begin_layout Enumerate
8078 don't delete the \SpecialChar TeX
8079 code included in the template, and
8082 \begin_layout Enumerate
8083 copy the example bibliography item included in the template and modify it
8084 as necessary to enter new bibliography items.
8087 \begin_layout Section
8091 \begin_layout Standard
8097 \begin_layout Subsection
8101 \begin_layout Standard
8102 The \SpecialChar LyX
8105 article (koma-script)
8109 report (koma-script)
8127 correspond to the \SpecialChar LaTeX
8145 \begin_inset space ~
8148 of the Koma-Script family.
8149 They are replacements for the standard document classes
8165 , resp., and fit better to European typography conventions in a number of
8169 \begin_layout Itemize
8170 Standard character size is 11pt in
8172 article (koma-script)
8176 report (koma-script)
8184 letter (koma-script)
8189 \begin_layout Itemize
8190 Headings, labels of the description environment, and a number of elements
8193 letter (koma-script)
8195 document class are set in a bold sans serif font.
8199 \begin_layout Plain Layout
8200 There is a big difference between the bold sans serif old cm fonts and new
8201 ec fonts, especially in the appearance of headings.
8202 In comparison, the ec bold sans serif fonts look a bit thin.
8203 Here the \SpecialChar LaTeX
8212 helps to produce the
8213 \begin_inset Quotes eld
8217 \begin_inset Quotes erd
8220 appearance when using the ec fonts.
8225 The numbering of chapter headings is made in the same way as the numbering
8226 of section headings, that is without the extra line
8227 \begin_inset Quotes eld
8230 Chapter\SpecialChar ldots
8232 \begin_inset Quotes erd
8236 In addition, the appearance of the headings can be modified by using a
8237 number of options (in \SpecialChar LyX
8238 to be entered in the field
8241 \begin_inset space ~
8248 Layout\SpecialChar menuseparator
8255 \begin_layout Itemize
8256 The main means in the Koma-Script document classes to design the type area
8265 (in \SpecialChar LyX
8266 to be entered in the extra class options field in the dialog
8268 Document\SpecialChar menuseparator
8272 They make a clearer modification of page margins possible as do the options
8275 Document\SpecialChar menuseparator
8282 \begin_layout Itemize
8283 The \SpecialChar LaTeX
8284 document classes of the Koma-Script family define a number of additional
8286 Those part of it which makes sense in \SpecialChar LyX
8287 is implemented in corresponding
8291 \begin_layout Standard
8292 Detailed descriptions of the \SpecialChar LaTeX
8293 document classes of the Koma-Script family
8294 can be found in the Koma-Script documentation
8305 \begin_layout Subsection
8306 article (koma-script), report (koma-script), and book (koma-script)
8309 \begin_layout Standard
8310 The document classes
8312 article (koma-script)
8316 report (koma-script)
8326 are implemented in the layout files
8339 They contain all the paragraph types of the corresponding standard document
8352 , resp., partly modified, with the exception of the \SpecialChar LyX
8357 -type, which is replaced by the new
8361 -type having the same functionality.
8366 -Type there is a number of new paragraph types added.
8373 letter (koma-script)
8378 \begin_layout Itemize
8387 : are equivalents to
8395 , resp., additionally inserting an entry in the table of contents.
8404 are not contained in
8406 article (koma-script)
8411 \begin_layout Itemize
8428 , resp., additionally clearing running heads.
8435 article (koma-script)
8441 \begin_layout Plain Layout
8454 report (koma-script)
8456 , but since this is identical to
8460 , is has not been implemented in \SpecialChar LyX
8469 \begin_layout Itemize
8474 : generates a heading directly above the following paragraph in the standard
8475 character size without affecting the structure of the document.
8478 \begin_layout Itemize
8487 are special captions which respect the different space settings needed
8488 for captions placed above or below an element (if you follow strict typographic
8489 rules, you might want to place table captions always above the table).
8490 You can also use the class option
8507 You need at least Koma-Script version 2.8q to use this.
8510 \begin_layout Itemize
8515 : can be used to set a bonmot, e.
8516 \begin_inset space \thinspace{}
8520 \begin_inset space \space{}
8523 at the beginning of a chapter.
8524 If you use the optional argument (
8526 Insert\SpecialChar menuseparator
8528 \begin_inset space ~
8533 ), you can insert the dictum's author there.
8534 Dictum and author are separated by a line.
8535 You need at least Koma-Script version 2.8q to use this.
8542 article (koma-script)
8547 \begin_layout Standard
8548 The following types, together with the standard types
8560 , form the title area of the document.
8561 They must be entered ahead of the first
8562 \begin_inset Quotes eld
8566 \begin_inset Quotes erd
8573 \begin_layout Plain Layout
8574 The corresponding \SpecialChar LaTeX
8575 commands must appear before the
8586 When such a type is used more than once, the latter usage overwrites the
8587 former one, that means, for every type only the latest usage is valid.
8588 The order of the different types however has, like
8600 , no effect on the appearance of the produced document.
8603 \begin_layout Itemize
8608 : produces a centered paragraph above the ordinary title (
8620 ) for the subject of the document.
8623 \begin_layout Itemize
8628 : produces a centered paragraph below the ordinary title (
8640 ) for the publishers' name.
8643 \begin_layout Itemize
8650 report (koma-script)
8656 produces a centered paragraph on its own page behind the title page, or
8659 article (koma-script)
8661 produces a centered paragraph below the ordinary title (
8680 \begin_layout Itemize
8685 : produces a left aligned paragraph above the ordinary title (
8701 ) for a document`s head.
8704 \begin_layout Itemize
8709 : produces in a double-sided print in
8711 report (koma-script)
8717 a left-aligned paragraph at the top of the title page`s back or has no
8718 effect in a single-sided print or in
8720 article (koma-script)
8725 \begin_layout Itemize
8730 : produces in a double-sided print in
8732 report (koma-script)
8738 a left-aligned paragraph at the bottom of the title page`s back or has
8739 no effect in a single-sided print or in
8741 article (koma-script)
8746 \begin_layout Itemize
8751 : produces a special
8752 \begin_inset Quotes eld
8756 \begin_inset Quotes erd
8759 page ahead of the actual document containing a paragraph without special
8763 \begin_layout Standard
8764 The layout files for the document classes
8766 article (koma-script)
8770 report (koma-script)
8781 This is thought of as a place to define your own types.
8786 in your personal layout directory and edit the file!
8789 \begin_layout Subsection
8790 letter (koma-script)
8793 \begin_layout Standard
8797 letter (koma-script)
8799 is implemented in the layout file
8804 It contains all the paragraph types of the corresponding standard document
8809 , partly modified, with the exception of the \SpecialChar LyX
8823 type, which is replaced by the new
8828 In addition, it contains, in contrast to the standard document class, the
8847 Furthermore, there are a number of new letter specific types.
8850 \begin_layout Standard
8851 The appearance of the letter produced by this document class can be controlled
8852 by a number of \SpecialChar LaTeX
8853 commands, which you can put in the \SpecialChar LaTeX
8858 \begin_layout Plain Layout
8859 For example, the standard appearance of the letter`s heading, consisting
8860 of name and address, is quite self-willed.
8862 \begin_inset Quotes eld
8866 \begin_inset Quotes erd
8869 heading is produced by the following \SpecialChar LaTeX
8870 commands in the preamble:
8873 \begin_layout LyX-Code
8883 \begin_layout LyX-Code
8899 \begin_layout LyX-Code
8909 \begin_layout LyX-Code
8929 A detailed German description of such \SpecialChar LaTeX
8930 commands can be found in the Koma-Script
8936 With it, the letter's author can produce his personal letter layout.
8939 \begin_layout Standard
8948 define the beginning of the letter and must be used in every letter.
8949 To emphasize them in the \SpecialChar LyX
8950 document class, they are marked with the letter
8960 \begin_inset space ~
8964 It is possible to write any number of letters in one file.
8969 type produces a new letter using the same addressee and a
8973 type produces a new addressee.
8990 are ordinary paragraph types and can also be used several times in one
8991 and the same letter.
8994 \begin_layout Itemize
8999 : produces a paragraph for the addressee and implicitly defines the beginning
9003 \begin_layout Itemize
9008 : produces a paragraph for the form of address and implicitly produces a
9012 \begin_layout Itemize
9017 : produces a paragraph for a close.
9020 \begin_layout Itemize
9025 : produces a paragraph for a postscript.
9028 \begin_layout Itemize
9033 : produces a paragraph for a distribution list.
9036 \begin_layout Itemize
9041 : produces a paragraph for enclosures.
9044 \begin_layout Standard
9085 are input types provided with a label to enter information, which will
9086 be processed by the document class.
9090 \begin_layout Plain Layout
9091 It could be seen as a matter of inconsequence, that the types
9099 described above are not such input types as well.
9100 Because of the special meaning of those types, however, I have implemented
9101 them as ordinary paragraph types with a one letter mark in the left margin.
9102 Moreover, it would affect my feeling of symmetry, if the
9110 type had such a serious different appearance.
9115 The types must be used ahead of the corresponding
9122 \begin_layout Standard
9123 An implementation of these types in a WYSIWYG fashion does not seem to make
9124 sense, because the real appearance of the produced letter does not only
9125 depend on the usage of the particular type, but also on other factors.
9126 For example, a signature entered in the
9130 type will in the standard behavior appear in the produced letter only,
9131 when in the same letter also a
9136 The entered value of the
9140 type will in the standard behavior not appear in the produced letter at
9142 The possibility to design the letter`s heading freely is already indicated
9143 in a footnote above.
9146 \begin_layout Standard
9147 The input types can also be used as empty paragraphs.
9149 \begin_inset space \thinspace{}
9153 \begin_inset space \space{}
9165 type is not used at all, in the standard behavior the value of the
9169 type is used as signature, whereas if an empty
9173 type is used, no signature value is defined.
9176 \begin_layout Standard
9177 By using the input types it is possible to write a letter template, containing
9178 filled input types with your personal dates (name, address, etc.) and empty
9179 input types for other dates you want to enter.
9182 \begin_layout Itemize
9187 : sender's name, in the standard behavior appears as a centered paragraph
9188 in small caps in the letter`s heading.
9191 \begin_layout Itemize
9196 : sender's signature, in the standard behavior appears below the
9205 type is used, the value of the
9209 type appears instead.
9212 \begin_layout Itemize
9217 : sender's address, in the standard behavior appears in a centered paragraph
9218 in the letter`s heading below the sender's name.
9221 \begin_layout Itemize
9226 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
9237 \begin_layout Itemize
9242 : place of the letter`s making.
9245 \begin_layout Itemize
9250 : date of the letter`s making.
9259 , in the standard behavior, produce the place and the date in a right-aligned
9260 line below the addressee's field.
9265 type is used, neither place nor date appear, independent of the value of
9275 type is used, the date of the letter `s production is used.
9278 \begin_layout Itemize
9283 : sender`s back address, in the standard behavior appears above the addressee's
9284 field in a small sans serif font.
9287 \begin_layout Itemize
9292 : special mail information, in the standard behavior appears underlined
9293 above the addressee's field below the back address.
9296 \begin_layout Itemize
9301 : additional information, in the standard behavior appears on right side
9302 below the addressee`s field.
9305 \begin_layout Itemize
9310 : the letter's title, in the standard behavior appears in a big, bold, sans
9311 serif font above the subject.
9314 \begin_layout Itemize
9319 : the letter's subject, in the standard behavior appears in a bold font
9327 \begin_layout Standard
9348 produce a business letter like line above the
9352 line containing the fields
9353 \begin_inset Quotes eld
9357 \begin_inset Quotes erd
9361 \begin_inset Quotes eld
9365 \begin_inset Quotes erd
9369 \begin_inset Quotes eld
9373 \begin_inset Quotes erd
9377 \begin_inset Quotes eld
9381 \begin_inset Quotes erd
9385 \begin_inset Quotes eld
9389 \begin_inset Quotes erd
9393 \begin_inset Quotes eld
9397 \begin_inset Quotes erd
9401 For the date field, the value of the
9407 \begin_inset Quotes eld
9410 business letter types
9411 \begin_inset Quotes erd
9414 is used, the value of the
9418 type however does not appear, but only the \SpecialChar LaTeX
9426 The ordinary output of place and date in a right-aligned line below the
9427 addressee`s field is suppressed.
9428 The types are implemented as input types provided with a label and must
9429 be used ahead of the corresponding
9436 \begin_layout Itemize
9444 \begin_layout Itemize
9452 \begin_layout Itemize
9460 \begin_layout Itemize
9468 \begin_layout Itemize
9476 \begin_layout Subsection
9477 The new letter class: letter (koma-script v.2)
9480 \begin_layout Standard
9486 \begin_layout Standard
9487 \begin_inset VSpace medskip
9493 \begin_layout Standard
9495 Koma-Script version 2.8 has introduced a new letter class
9499 which supersedes the now unsupported
9504 It has — on the \SpecialChar LaTeX
9505 side — a completely new interface and is not compatible
9507 Therefore, \SpecialChar LyX
9508 supports both, though it is recommended you use the new class.
9511 \begin_layout Standard
9512 This class covers the same functionality as
9514 letter (koma-script),
9521 (receiver's address, same as
9538 will start a new letter (i.
9539 \begin_inset space \thinspace{}
9543 \begin_inset space \space{}
9546 you can write several letters per document).
9547 New elements are sender's
9563 and the possibility to use a
9569 Insert\SpecialChar menuseparator
9575 \begin_layout Standard
9576 The biggest improvement is, though, that the letter's layout is configurable
9577 to meet almost any needs.
9578 This can be done via the preamble or with a special style file (Letter
9579 Class Option, extension
9583 ), that will be read in as a class option.
9587 \begin_layout Plain Layout
9588 The KOMA package comes with some default
9593 There is, for instance, a
9597 file that follows german typesetting rules, or a
9601 that provides the default layout of the old
9606 The latter can be loaded with the class option
9612 Layout\SpecialChar menuseparator
9613 Document\SpecialChar menuseparator
9625 template that is included in \SpecialChar LyX
9627 A detailed description is to be found in the Koma-Script documentation
9635 \begin_layout Subsection
9639 \begin_layout Standard
9640 Visualizing the Koma-Script document classes in \SpecialChar LyX
9641 , the \SpecialChar LyX
9642 internals cause some
9646 \begin_layout Itemize
9647 The chapter number of a
9651 type appears on a line of its own above the chapter heading instead of
9652 appearing in the same line ahead of it.
9653 The cause for that is the \SpecialChar LyX
9654 internal behavior for the labeltype
9661 \begin_layout Itemize
9662 The headings of the types
9671 \begin_inset Quotes eld
9675 \begin_inset Quotes erd
9679 table of contents, but not in the \SpecialChar LyX
9682 Document\SpecialChar menuseparator
9684 \begin_inset space ~
9688 \begin_inset space ~
9696 \begin_layout Itemize
9701 document class appear in a skip separation mode, not indented.
9702 This is the standard behavior, no special \SpecialChar LaTeX
9703 commands are needed for that.
9706 Document\SpecialChar menuseparator
9709 dialog the corresponding radio button indicates
9718 value always has the effect that extra \SpecialChar LaTeX
9719 commands are inserted in the document
9720 to produce the gap, which is not what is wanted in this case.
9723 \begin_layout Section
9727 \begin_layout Standard
9733 \begin_layout Subsection
9737 \begin_layout Standard
9738 Memoir is a very powerful and constantly evolving class.
9739 It has been designed with regard to fictional and non-fictional literature.
9740 Its aim is to let the user have maximum control over the typesetting of
9742 Memoir is based on the standard book class, but it can also emulate the
9743 article class (see below).
9746 \begin_layout Standard
9747 Peter Wilson, the developer of Memoir, is known as the author of lots of
9748 useful packages in the \SpecialChar LaTeX
9750 Most of them have been merged with Memoir.
9751 Therefore, it is much easier to layout the table of contents, appendices,
9752 chapter designs and such.
9754 , though, does not support all of these goodies natively.
9755 Some of them might be added to forthcoming releases
9759 \begin_layout Plain Layout
9760 You are invited to send suggestions to
9761 \begin_inset Flex URL
9764 \begin_layout Plain Layout
9766 lyx-devel@lists.lyx.org
9776 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
9778 Of course you can still use all features with the help of some native \SpecialChar LaTeX
9780 commands (\SpecialChar TeX
9785 \begin_layout Plain Layout
9790 \begin_layout Plain Layout
9800 \begin_inset space ~
9804 \begin_inset CommandInset ref
9806 reference "sec:Inserting-TeX-Code"
9816 In this section, we can only list those features that are natively supported
9819 For detailed descriptions (and for the rest of features) we recommend you
9820 have a look at the detailed manual of the Memoir class
9824 \begin_layout Plain Layout
9829 \begin_layout Plain Layout
9839 \begin_inset Flex URL
9842 \begin_layout Plain Layout
9844 CTAN:/macros/latex/memoir/memman.pdf
9854 , which is not only a user guide for the class, but also both a comprehensive
9855 description on good typesetting and a superb example for good typesetting
9859 \begin_layout Subsection
9860 Basic features and restrictions
9863 \begin_layout Standard
9864 Memoir supports basically all features of the standard book classes.
9865 There are, however, some differences, as follows:
9868 \begin_layout Description
9870 \begin_inset space ~
9873 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
9876 \begin_layout Description
9878 \begin_inset space ~
9881 style: The fancy page style is not supported, due to a command clash between
9882 Memoir and the fancyhdr package (they both define a command with the same
9883 name, which confuses \SpecialChar LaTeX
9885 Instead, Memoir comes with a number of its own page styles (see
9887 Layout\SpecialChar menuseparator
9888 Document\SpecialChar menuseparator
9890 \begin_inset space ~
9896 If you want to use these for the chapter pages, you have to use the command
9903 in the main text or in preamble (e.
9904 \begin_inset space \thinspace{}
9908 \begin_inset space \space{}
9915 chapterstyle{companion}
9920 \begin_layout Description
9921 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
9922 optional argument in the standard classes.
9923 With this, you can specify an alternative version of the title for the
9924 table of contents and the headers (for instance, if the title is too long).
9926 , you can do this via
9928 Insert\SpecialChar menuseparator
9930 \begin_inset space ~
9935 at the beginning of a chapter/section.
9936 Memoir features a second optional argument and thus separates the table
9937 of contents from the header.
9938 You can define three variants of a title with this: one for the main text,
9939 one for the table of contents, and one for the headers.
9940 Simply insert two optional arguments if you need this feature, the first
9941 one containing the short title for the Table of Contents, the second one
9942 containing an alternative short title for the headers.
9945 \begin_layout Description
9946 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
9947 of contents, the list of figures and the list of table start a new page
9949 Memoir does not follow this route.
9950 You have to insert a page break yourself, if you want to have one.
9953 \begin_layout Description
9954 Titlepage: For some unknown reason, Memoir uses pagination on the title
9955 page (in the standard classes, title pages are
9956 \begin_inset Quotes eld
9960 \begin_inset Quotes erd
9964 If you want an empty title page, type
9968 aliaspagestyle{title}{empty}
9973 \begin_layout Description
9974 Article: With the class option
9980 Layout\SpecialChar menuseparator
9981 Document\SpecialChar menuseparator
9983 \begin_inset space ~
9988 ), you can emulate article style.
9989 That is, counters (footnotes, figures, tables etc.) will not be reset on
9990 new chapters, chapters don't start a new page (but are—in contrary to
9991 \begin_inset Quotes eld
9995 \begin_inset Quotes erd
9998 article classes—still allowed), parts, though, use their own page, as in
10002 \begin_layout Description
10003 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
10004 font commands, which have been used in the old \SpecialChar LaTeX
10006 \begin_inset space \thinspace{}
10010 \begin_inset space \space{}
10026 It produces an error and stops \SpecialChar LaTeX
10027 whenever such a command appears.
10032 reallows the commands and spits out warnings instead (which does at least
10033 not stop \SpecialChar LaTeX
10035 Since a lot of packages and particularly Bib\SpecialChar TeX
10036 style files are still using
10037 those commands, we have decided to use this option by default.
10040 \begin_layout Subsection
10044 \begin_layout Standard
10045 We will only describe the features supported by \SpecialChar LyX
10046 (which is not much currently).
10047 Please consult the Memoir manual
10051 \begin_layout Plain Layout
10056 \begin_layout Plain Layout
10066 \begin_inset Flex URL
10069 \begin_layout Plain Layout
10071 CTAN:/macros/latex/memoir/memman.pdf
10084 \begin_layout Description
10085 Abstract: You may wonder why an abstract is an extra feature.
10086 Well, it is in book class.
10087 Usually books don't have abstracts.
10088 Memoir, however, has.
10089 You can use it wherever and how often you like.
10092 \begin_layout Description
10093 Chapterprecis: You may know this older typesetting style: The contents of
10094 a chapter are summarized below the title and also in the table of contents
10096 \begin_inset space \thinspace{}
10100 \begin_inset space \space{}
10105 Our hero arrives in Troia; he loses some friends; he finds others
10108 Chapterprecis does exactly this.
10109 It is therefore only sensible below a chapter.
10112 \begin_layout Description
10113 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
10114 The epigraph environment provides an elegant way of typesetting such a
10116 The motto itself (text) and its author (source) are divided by a short
10118 Unfortunately, we have to fool \SpecialChar LyX
10119 a bit here again, since the environment
10120 needs two arguments (text and source).
10121 In this case, we have to use curly brackets (in \SpecialChar TeX
10122 mode) between the two
10133 <author of the slogan>.
10136 \begin_layout Description
10137 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
10138 complex figurative poems).
10140 can only support a few of them.
10141 One is poemtitle, which is a centered title for poems, which will also
10142 be added to the table of contents (verse is the standard environment for
10144 Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
10146 because they have to be nested inside regular verse environments, which
10147 is not possible with \SpecialChar LyX
10151 \begin_layout Description
10152 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
10155 \begin_layout Section
10156 Article (mwart), book (mwbk) and report (mwrep)
10157 \begin_inset Argument status
10160 \begin_layout Plain Layout
10173 \begin_layout Standard
10179 \begin_layout Standard
10180 The \SpecialChar LyX
10197 correspond to the \SpecialChar LaTeX
10211 They are replacements for the standard document classes
10223 , resp., and fit better to Polish typography conventions in a number of points.
10227 \begin_layout Standard
10231 \begin_layout Itemize
10232 Unnumbered titles (with star, e.
10233 \begin_inset space \thinspace{}
10237 \begin_inset space \space{}
10244 ) are added into table of contents,
10247 \begin_layout Itemize
10248 Additional page styles:
10252 \begin_layout Description
10253 uheadings header with separated lines,
10256 \begin_layout Description
10257 myheadings custom header, contents headers via commands:
10272 \begin_layout Description
10273 myuheadings custom header with separated lines,
10276 \begin_layout Description
10277 outer page number is placed on outer side of page
10281 \begin_layout Itemize
10286 \begin_layout Description
10287 rmheadings serif titles — default,
10290 \begin_layout Description
10291 sfheadings sansserif titles,
10294 \begin_layout Description
10295 authortitle on title page first placed is author next title — default,
10298 \begin_layout Description
10299 titleauthor on title page first placed is title next author,
10302 \begin_layout Description
10303 withmarginpar reserve place on page for margins.
10307 \begin_layout Section
10311 \begin_layout Standard
10316 provides an alternative to the standard
10321 It provides similar functionality, but you might prefer this layout with
10322 sans serif sections, headings, and more.
10325 \begin_layout Section
10326 Rev\SpecialChar TeX
10330 \begin_layout Standard
10336 \begin_layout Standard
10337 \begin_inset VSpace bigskip
10343 \begin_layout Standard
10348 \begin_inset space ~
10353 textclass works with the American Physical Sociey's Rev\SpecialChar TeX
10355 \begin_inset Formula $\beta$
10358 release of May, 1999) class.
10361 \begin_layout Standard
10367 textclass, which works with Rev\SpecialChar TeX
10369 However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
10371 That means that it doesn't interact very well with \SpecialChar LyX
10372 , which requires \SpecialChar LaTeX2e
10374 it has been kludged to work.
10375 Since Rev\SpecialChar TeX
10376 4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
10381 Rev\SpecialChar TeX
10383 \begin_inset space ~
10388 textclass should also be pretty easy to use.
10391 \begin_layout Standard
10392 These documents are supposed to be used in
10396 to the Rev\SpecialChar TeX
10397 4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
10399 and assume you'll know what to put in the preamble if necessary.
10402 \begin_layout Subsection
10406 \begin_layout Standard
10407 All you need to do is install Rev\SpecialChar TeX
10408 4, as described in the package's README
10410 The package can be found at The Rev\SpecialChar TeX
10412 \begin_inset Flex URL
10415 \begin_layout Plain Layout
10417 http://publish.aps.org/revtex4/
10423 Install it somewhere that \SpecialChar LaTeX
10425 Test it by trying to \SpecialChar LaTeX
10426 a short Rev\SpecialChar TeX
10427 4 document in some random directory (i.
10428 \begin_inset space \thinspace{}
10432 \begin_inset space \space{}
10435 not the directory where you installed the class file.) Then, if you reconfigure
10437 , it will find the class file and let you use the Rev\SpecialChar TeX
10441 \begin_layout Standard
10442 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
10451 \begin_inset space ~
10456 template, found in the templates directory.
10459 \begin_layout Subsection
10463 \begin_layout Standard
10464 Optional arguments to
10471 \begin_inset Quotes eld
10475 \begin_inset Quotes erd
10479 \begin_inset Quotes eld
10483 \begin_inset Quotes erd
10489 \begin_inset space ~
10497 \begin_inset space ~
10503 Remember that in Rev\SpecialChar TeX
10504 , at least one optional argument is required!
10507 \begin_layout Standard
10508 Other preamble matter, like
10515 \begin_inset space ~
10522 \begin_inset space ~
10527 dialog, also as usual.
10530 \begin_layout Subsection
10534 \begin_layout Standard
10535 The layouts basically correspond to the commands in Rev\SpecialChar TeX
10537 For example, the Email layout corresponds to
10544 Note that (at least as of Rev\SpecialChar TeX
10553 layouts are exactly equivalent, so you shouldn't need to use both.
10557 \begin_layout Plain Layout
10558 In case you're curious, both were included so that
10562 would be able to translate both
10582 \begin_layout Subsection
10586 \begin_layout Standard
10587 There are a couple of important unique aspects of Rev\SpecialChar TeX
10588 4 which might cause
10589 bugs that will be even more confusing in \SpecialChar LyX
10593 \begin_layout Standard
10594 In Rev\SpecialChar TeX
10612 The \SpecialChar LyX
10613 equivalent is that there is a separate Thanks layout.
10618 write footnotes in the
10622 layout, or weird things may happen.
10623 See the Rev\SpecialChar TeX
10624 4 documentation for more details.
10627 \begin_layout Standard
10631 \begin_inset space ~
10639 \begin_inset space ~
10648 layouts must be placed
10656 layout and the corresponding
10673 , the \SpecialChar LaTeX
10677 \begin_layout Subsection
10681 \begin_layout Standard
10682 The main problem with this layout is that you can't use the optional arguments
10683 to layouts like Email and Title.
10684 (The problem is not unique to this layout; you can't use optional arguments
10685 to the Section layouts either.) This means that after you export that file
10686 to \SpecialChar LaTeX
10687 (which you'll need to do eventually to send it in to APS), you'll need
10688 to edit the \SpecialChar LaTeX
10689 file with a text editor to add the optional arguments to set,
10691 \begin_inset space \thinspace{}
10695 \begin_inset space \space{}
10698 the running title for the page headers.
10699 Lacking these layouts makes the
10705 (and the equivalent
10711 ) useless, so the corresponding layouts don't exist, and will have to be
10716 \begin_layout Plain Layout
10721 actually, \SpecialChar LyX
10722 1.3.0 supports some forms of optional arguments, but this layout
10723 has not been updated yet to take advantage of it.
10731 \begin_layout Section
10732 Springer Journals (
10739 \begin_layout Standard
10745 \begin_layout Subsection
10749 \begin_layout Standard
10750 These are the layout files for some of the journal formats used by Springer
10751 Verlag and listed on
10752 \begin_inset Flex URL
10755 \begin_layout Plain Layout
10757 http://www.springer.de/author/tex/help-journals.html
10762 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
10764 It is a modular system: the things common to all journals are implemented
10769 , which journal-specific layout files (such as, e.
10770 \begin_inset space \thinspace{}
10774 \begin_inset space \space{}
10781 for Journal of Geodesy) can include.
10784 \begin_layout Standard
10785 This means that implementing support for any other Springer journal on this
10786 list is as simple as writing your own
10794 file following the outline given in
10802 \begin_layout Standard
10803 It is reasonably well tested only for the Journal of Geodesy.
10812 come with the standard \SpecialChar LyX
10814 Install the relevant class file (downloaded from Springer) in a proper
10815 directory, reconfigure \SpecialChar LaTeX
10816 (in the te\SpecialChar TeX
10821 , as root if necessary — doesn't \SpecialChar LyX
10822 take care of this?), reconfigure \SpecialChar LyX
10827 \begin_layout Subsection
10831 \begin_layout Standard
10832 A large number of theorem-like styles —
10844 \begin_layout Standard
10847 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
10848 _Title, Author_Running, Institute,
10849 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10852 See the Springer class file documentation for details.
10855 \begin_layout Subsection
10859 \begin_layout Itemize
10871 \begin_layout Itemize
10874 Probability Theory and Related Fields
10880 — Jean-Marc Lasgouttes
10883 \begin_layout Standard
10884 Add your own, it isn't so hard!
10887 \begin_layout Subsection
10891 \begin_layout Standard
10892 These files are partly based on the older
10896 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
10898 file from Springer.
10903 layout, are now defunct.
10904 Jean-Marc Lasgouttes helped out big in making me find my way around the
10906 layout file mechanism.
10909 \begin_layout Subsection
10913 \begin_layout Standard
10915 But probably less than in the old hacked-\SpecialChar LaTeX
10923 \begin_layout Standard
10925 \begin_inset space \thinspace{}
10928 g.: does not display the number for theorem-like layouts, just #.
10931 \begin_layout Section
10934 Sli\SpecialChar TeX
10938 \begin_inset CommandInset label
10947 \begin_layout Standard
10955 \begin_layout Subsection
10959 \begin_layout Standard
10960 This section describes how to use \SpecialChar LyX
10961 to make slides for overhead projectors.
10962 There are two document classes that can do this: the default slides class
10965 Foil\SpecialChar TeX
10969 This section documents the former.
10972 \begin_layout Standard
10973 I'm going to say this again, nice and clear, so that there's no misunderstanding
10977 \begin_layout Standard
10978 \begin_inset VSpace bigskip
10984 \begin_layout Standard
10988 This section documents the class
10989 \begin_inset Quotes eld
10997 \begin_inset Quotes erd
11005 \begin_layout Standard
11006 \begin_inset VSpace bigskip
11012 \begin_layout Standard
11013 If you're looking for the documentation for
11014 \begin_inset Quotes eld
11019 slides (Foil\SpecialChar TeX
11023 \begin_inset Quotes erd
11026 , check out section
11027 \begin_inset space ~
11031 \begin_inset CommandInset ref
11033 reference "sec:foiltex"
11043 \begin_inset Quotes eld
11048 slides (Foil\SpecialChar TeX
11052 \begin_inset Quotes erd
11055 ] is actually somewhat better than the default
11063 \begin_layout Plain Layout
11065 or so I've been told repeatedly by its advocates.
11066 Having never used it, I have no idea if this claim is true or not.
11071 which this section documents.
11074 \begin_layout Standard
11075 This class is the \SpecialChar LaTeX2e
11076 improvement of the old
11078 Sli\SpecialChar TeX
11082 Every \SpecialChar LaTeX2e
11083 distribution includes this class [which I'll just refer to as
11084 \begin_inset Quotes eld
11092 \begin_inset Quotes erd
11095 from now on], so you're bound to have it.
11096 As I noted earlier, there are other classes, such as
11100 , which also produce slides for overhead projectors and do a better job
11102 However, there are some things which
11106 can do which the others can't, such as generate overlays.
11107 Read on to learn more!
11110 \begin_layout Subsection
11112 \begin_inset CommandInset label
11114 name "sec:slidesetup"
11121 \begin_layout Standard
11122 Obviously, to use this document class, you need to select
11123 \begin_inset Quotes eld
11131 \begin_inset Quotes erd
11134 from the class list in the
11136 Document\SpecialChar menuseparator
11140 There are some other special things you should know about this class:
11143 \begin_layout Itemize
11144 Don't bother changing the options
11149 They're not supported by the
11156 \begin_layout Itemize
11160 \begin_inset space ~
11165 behaves a bit differently for this class.
11166 The possible choices and what they do are as follows:
11170 \begin_layout Description
11175 The final output contains page numbers in the lower right corner.
11178 \begin_layout Description
11187 , but also prints out any time markers you've put in.
11188 This is the default.
11191 \begin_layout Description
11196 The final output contains no page numbers, time markers, or alignment markers.
11200 \begin_layout Itemize
11205 class has an extra option:
11211 \begin_inset Quotes eld
11219 \begin_inset Quotes erd
11222 in the extra class options.
11226 \begin_layout Standard
11227 Using this options allows you to add time markers to
11233 \begin_inset space ~
11237 \begin_inset CommandInset ref
11239 reference "sec:slideNote"
11247 \begin_layout Standard
11248 You can also use the template file
11249 \begin_inset Quotes eld
11257 \begin_inset Quotes erd
11260 to automatically set up a document to use the
11266 File\SpecialChar menuseparator
11268 \begin_inset space ~
11272 \begin_inset space ~
11277 to open your new document].
11278 The template file also contains some examples of the special paragraph
11279 environments used by this class.
11280 I'll describe those next.
11283 \begin_layout Subsection
11284 Paragraph Environments
11287 \begin_layout Subsubsection
11288 Supported Environments
11291 \begin_layout Standard
11292 The first thing you'll notice when you start up a new
11296 document is the font size and type: it's the equivalent of the size
11297 \begin_inset Quotes eld
11305 \begin_inset Quotes erd
11311 \begin_inset space ~
11317 This is also what's used in the output.
11319 \begin_inset Quotes eld
11323 \begin_inset Quotes erd
11326 to remind you that this is a slide.
11327 Your final slides will use a larger font; ergo, you'll have less space.
11328 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11331 \begin_layout Standard
11332 The next thing that becomes obvious is the changes to the paragraph environment
11333 pull-down box [at the far-left end of the toolbar].
11334 Most of the paragraph environments you're used to seeing are missing.
11335 There are also five new ones.
11340 class itself only supports certain paragraph environments:
11343 \begin_layout Itemize
11349 \begin_layout Itemize
11355 \begin_layout Itemize
11361 \begin_layout Itemize
11367 \begin_layout Itemize
11373 \begin_layout Itemize
11379 \begin_layout Itemize
11385 \begin_layout Itemize
11391 \begin_layout Itemize
11397 \begin_layout Itemize
11404 \begin_layout Itemize
11410 \begin_layout Standard
11411 All of the other standard environments, including the section-heading environmen
11412 ts, aren't used in the
11419 \begin_layout Standard
11420 On the other hand, you'll notice the following new environments:
11423 \begin_layout Itemize
11429 \begin_layout Itemize
11435 \begin_layout Itemize
11441 \begin_layout Itemize
11447 \begin_layout Itemize
11453 \begin_layout Standard
11454 These five are kind of quirky, due to a
11455 \begin_inset Quotes eld
11459 \begin_inset Quotes erd
11462 in \SpecialChar LyX
11464 You see, \SpecialChar LyX
11465 doesn't permit you to nest any other paragraph environment into
11466 an empty environment.
11467 Now, that's fine and dandy, but it means that you wouldn't be able to start
11468 a slide with anything except plain text.
11469 To deal with this, I've performed a little
11470 \begin_inset Quotes eld
11475 \begin_inset Quotes erd
11481 \begin_layout Subsubsection
11482 Quirks of the New Environments
11483 \begin_inset CommandInset label
11485 name "sec:slideQuirk"
11492 \begin_layout Standard
11493 All five of the new paragraph environments are somewhat quirky due to inherent
11494 limitiations in the current version of \SpecialChar LyX
11496 As I just mentioned, \SpecialChar LyX
11497 forbids environments that begin with another environment.
11498 To get around this, the
11502 environment isn't a paragraph environment as described in the
11510 \begin_layout Standard
11511 You should consider
11524 \begin_inset Quotes eld
11527 pseudo-environments.
11528 \begin_inset Quotes erd
11531 They look like a section heading or a
11532 \begin_inset Quotes eld
11540 \begin_inset Quotes erd
11543 but really begin a [and, if necessary, end the previous] paragraph environment.
11553 \begin_inset Quotes eld
11557 \begin_inset Quotes erd
11560 These two perform some action.
11563 \begin_layout Standard
11564 A common feature of all five environments,
11584 , is a rather long-ish label.
11585 The text following this label — ordinarily the contents of the paragraph
11586 environment — is utterly irrelevant for
11608 completely ignores it.
11609 In fact, you can leave these five environments completely empty.
11613 \begin_layout Standard
11618 to put any text after the rather long-ish label, you might want to.
11619 This could be a short description of the contents of the
11624 In that case, enter your descriptive comment and hit
11628 as you normally would.
11631 \begin_layout Standard
11632 If, on the other hand, you don't want to enter any descriptive text, you'll
11633 hit another \SpecialChar LyX
11636 , like nature, abhors a vacuum, and will not let you start a new paragraph
11637 environment until you put something in the old one.
11641 \begin_layout Itemize
11642 Start entering the text that will
11670 \begin_layout Itemize
11671 Now move to the beginning of that paragraph.
11675 \begin_layout Itemize
11684 \begin_layout Itemize
11685 Finally, change this new, empty paragraph to a
11709 \begin_layout Standard
11710 Some future version of \SpecialChar LyX
11711 will, hopefully, resolve this quirkiness\SpecialChar ldots
11715 \begin_layout Subsection
11716 Making a Presentation with
11729 \begin_layout Subsubsection
11737 \begin_layout Standard
11738 If you're expecting this section to teach you how to actually make a presentatio
11739 n, you'll be sorely disappointed.
11740 Naturally, I'll describe all of the ways the
11744 class can assist you in preparing the materials for a presentation.
11745 Filling in the contents, however, is up to you.
11750 the \SpecialChar LyX
11754 \begin_layout Standard
11759 environment [in the manner described in section
11760 \begin_inset space ~
11764 \begin_inset CommandInset ref
11766 reference "sec:slideQuirk"
11770 ] tells \SpecialChar LyX
11771 to begin a new slide [duh].
11772 The label for this environment/
11773 \begin_inset Quotes erd
11777 \begin_inset Quotes erd
11781 \begin_inset Quotes eld
11785 \begin_inset Quotes erd
11788 in cool blue, followed by the label,
11789 \begin_inset Quotes eld
11793 \begin_inset Quotes erd
11797 Any text or paragraph environments that follow this one go on the new slide.
11801 \begin_layout Standard
11802 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
11804 (this can be specified in the
11809 In fact, you'll want to, once you finish entering the contents of one slide.
11810 If you've entered more text than can physically fit on a slide, the extra
11811 overflows onto a new slide.
11812 I don't recommend doing this, however, since the overflow slide won't have
11813 any page number on it.
11814 Furthermore, it may interfere with any
11818 you've made to accompany the oversized
11825 \begin_layout Standard
11834 environments work the same way as the
11839 They both create an
11840 \begin_inset Quotes eld
11844 \begin_inset Quotes erd
11847 followed by a label [
11848 \begin_inset Quotes eld
11852 \begin_inset Quotes erd
11856 \begin_inset Quotes eld
11860 \begin_inset Quotes erd
11864 The color is a stunning magenta instead of blue, and the
11865 \begin_inset Quotes eld
11869 \begin_inset Quotes erd
11872 will look different, in style and in length.
11873 The label fonts of all three also differ from one another.
11876 \begin_layout Standard
11881 , if the contents of a
11889 exceed the physical size of a slide or sheet of paper, the extra will overflow
11891 Again, you should avoid this.
11892 It defeats the whole purpose of
11903 \begin_layout Subsubsection
11913 \begin_layout Standard
11918 is a slide that sits atop another slide.
11919 Perhaps you wish to discuss a figure on the main
11923 before displaying the text associated with it.
11924 One way to accomplish this is tape a flap of dark paper over the part of
11929 you want to display later.
11930 This method fails, however, if you wish to overlap one graph with another,
11932 You would then have to fumble while speaking to align the two separate,
11937 s to align the two graphs.
11942 environment in both cases makes life much easier.
11945 \begin_layout Standard
11950 receives the page number of its
11951 \begin_inset Quotes eld
11955 \begin_inset Quotes erd
11963 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11978 \begin_layout Plain Layout
11979 Presumably, mutliple
11984 \begin_inset Quotes eld
11992 \begin_inset Quotes erd
11996 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12008 \begin_inset Quotes eld
12016 \begin_inset Quotes erd
12020 \begin_inset space ~
12023 appended to the page number of the parent
12033 Clearly, you want the contents of both the
12041 to each fit on a single physical slide! You should probably consider an
12047 \begin_inset Quotes eld
12051 \begin_inset Quotes erd
12059 Indeed, the \SpecialChar LyX
12064 class provides a visual cue for this: the label at the start of an
12068 is shorter than that at the start of a
12073 Lastly, when you generate printable output, you'll find alignment markers
12074 in all four corners of both the
12078 page and its parent
12083 These will assist you in lining up the two physical slides.
12086 \begin_layout Standard
12087 The major problem in overlaying two slides is aligning the contents of the
12088 two transparencies.
12089 How much space should you leave for that graph on the second slide? Worse
12090 still, what if you want a graph and a sentence on second slide, but there
12091 is text on the main transparency that goes in between them? You could try
12092 and insert vertical space of the right size.
12093 The better way is to use
12104 \begin_layout Standard
12105 As their names imply,
12113 are two command-like paragraph environments that make all subsequent text
12114 invisible and visible, respectively.
12116 \begin_inset space ~
12120 \begin_inset CommandInset ref
12122 reference "sec:slideQuirk"
12126 that you don't place anything
12130 these two environments, however.
12135 , it inserts a centered, sky-blue label into the page reading
12136 \begin_inset Quotes eld
12139 <Invisible Text Follows>
12140 \begin_inset Quotes erd
12144 For paragraphs following this label, the parts of the
12152 ; it doesn't matter which] where they would be contain instead blank space.
12156 \begin_layout Standard
12161 , the corresponding centered label is
12162 \begin_inset Quotes eld
12165 <Visible Text Follows>
12166 \begin_inset Quotes erd
12170 Paragraphs following this label behave normally.
12171 Note that the beginning of a new
12183 automatically shuts off an
12188 It's therefore not necessary to use
12199 \begin_layout Standard
12200 By now, it should be obvious how to create overlay transparencies using
12201 the proper combination of
12220 \begin_layout Enumerate
12225 , including everything that will appear on it, whether on the main slide
12233 \begin_layout Enumerate
12234 Before each figure or paragraph that will appear only on the
12243 If necessary, insert a
12247 environment after the
12254 \begin_layout Enumerate
12259 immediately following the
12266 \begin_layout Enumerate
12267 Copy the contents of this
12278 \begin_layout Enumerate
12283 , change all of the
12294 \begin_layout Standard
12296 You've just made an
12303 \begin_layout Standard
12304 There's one problem with the way I've designed the \SpecialChar LyX
12309 class: you can't make text in the middle of a paragraph invisible, nor
12310 make text in the middle of an invisible paragraph visible again.
12311 To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
12316 \begin_layout Plain Layout
12317 The commands of interest are:
12320 \begin_layout Itemize
12325 invisible \SpecialChar ldots
12329 \begin_layout Itemize
12334 visible \SpecialChar ldots
12338 \begin_layout Plain Layout
12340 and need to be marked as \SpecialChar TeX
12343 \begin_inset Quotes eld
12347 \begin_inset Quotes erd
12350 you wish to change goes in between the brackets [and after the
12363 If you don't know how to mark text as \SpecialChar TeX
12364 , see the appropriate section of
12377 \begin_layout Subsubsection
12387 \begin_inset CommandInset label
12389 name "sec:slideNote"
12396 \begin_layout Standard
12405 is associated with a
12406 \begin_inset Quotes eld
12410 \begin_inset Quotes erd
12418 Here, too, the \SpecialChar LyX
12423 class provides visual cues.
12428 is shorter than that of a
12432 [yet longer than that of an
12436 ] and, like the label of an
12440 is shockingly magenta.
12441 Additionally, the printed
12445 has the page number of its
12446 \begin_inset Quotes eld
12450 \begin_inset Quotes erd
12458 \begin_inset Quotes eld
12466 \begin_inset Quotes erd
12470 \begin_inset Quotes eld
12478 \begin_inset Quotes erd
12482 \begin_inset Quotes eld
12490 \begin_inset Quotes erd
12494 You can have multiple
12498 s associated with a single
12510 , you'll probably want to break up long
12514 s so that they fit on a single sheet of paper.
12517 \begin_layout Standard
12522 is obvious: it contains anything additional you might want to say about
12528 It could also be used as a sheet of reminders for a particular
12533 In the case of the latter, you might want to make use of time markers.
12534 Currently, the \SpecialChar LyX
12540 \begin_inset Quotes eld
12544 \begin_inset Quotes erd
12547 support for time markers, a
12549 Sli\SpecialChar TeX
12553 So, you'll have to resort to using the \SpecialChar LaTeX
12557 \begin_layout Standard
12558 To use time markers, you'll need to specify the extra class option
12559 \begin_inset Quotes eld
12567 \begin_inset Quotes erd
12571 \begin_inset space ~
12575 \begin_inset CommandInset ref
12577 reference "sec:slidesetup"
12582 This option turns on timing marks, which will appear in the lower-left-hand
12588 To set what appears in the time marker, you use the \SpecialChar LaTeX
12590 \begin_inset Quotes eld
12600 \begin_inset Quotes erd
12604 \begin_inset Quotes eld
12614 \begin_inset Quotes erd
12618 The arguments of both commands are time measured in seconds.
12620 \begin_inset Quotes eld
12630 \begin_inset Quotes erd
12633 sets the time marker to a given time.
12635 \begin_inset Quotes eld
12645 \begin_inset Quotes erd
12648 increments the time marker by the specified amount.
12649 Using time markers and
12653 s in this fashion, you can remind yourself how much time to spend on a particula
12661 \begin_layout Standard
12662 There's one last feature to describe.
12663 Clearly, you'd like to print out all of your
12671 s on transparencies while printing all of your
12688 with which it is associated.
12689 What's a person to do?
12692 \begin_layout Standard
12693 Luckily, there are two \SpecialChar LaTeX
12694 commands that allow you to select what to print
12696 Both must be placed into the preamble of your document.
12698 \begin_inset Quotes eld
12710 \begin_inset Quotes erd
12713 will cause the output to contain only the
12722 Correspondingly, the command
12723 \begin_inset Quotes eld
12735 \begin_inset Quotes erd
12738 prevents the output of anything but
12743 I'd advise placing both commands in the preamble and initially comment
12745 You can then preview your entire presentation as you write.
12746 When you're done writing, you can then uncomment one of the two to select
12747 what you want to print.
12748 I like to uncomment
12749 \begin_inset Quotes eld
12761 \begin_inset Quotes erd
12764 , print to a file with
12765 \begin_inset Quotes eld
12773 \begin_inset Quotes erd
12776 in its name, comment it back out, then uncomment
12777 \begin_inset Quotes eld
12789 \begin_inset Quotes erd
12793 \begin_inset Quotes eld
12801 \begin_inset Quotes erd
12805 I can then send either file to a printer, loading transparencies or plain
12806 paper as appropriate.
12809 \begin_layout Standard
12810 You can also provide other arguments to the
12811 \begin_inset Quotes eld
12821 \begin_inset Quotes erd
12825 \begin_inset Quotes eld
12835 \begin_inset Quotes erd
12839 See a good \SpecialChar LaTeX
12843 \begin_layout Subsection
12848 Class Template File
12851 \begin_layout Standard
12852 I have also provided a template file,
12853 \begin_inset Quotes eld
12861 \begin_inset Quotes erd
12869 To use it, begin your new presentation with
12871 File\SpecialChar menuseparator
12873 \begin_inset space ~
12877 \begin_inset space ~
12883 Your new \SpecialChar LyX
12884 presentation file will contain an example
12905 additionally contain an example of the use of
12914 Lastly, the preamble will contain:
12917 \begin_layout LyX-Code
12918 % Uncomment to print out only slides and overlays
12921 \begin_layout LyX-Code
12925 \begin_layout LyX-Code
12931 \begin_inset Newline newline
12937 \begin_layout LyX-Code
12938 % Uncomment to print out only notes
12941 \begin_layout LyX-Code
12945 \begin_layout LyX-Code
12953 \begin_layout Standard
12954 One final thing: I created this class to support the \SpecialChar LaTeX2e
12956 \begin_inset Quotes eld
12961 Sli\SpecialChar TeX
12965 \begin_inset Quotes erd
12968 class, one of the built-in \SpecialChar LaTeX2e
12970 Neither I nor the rest of the \SpecialChar LyX
12971 Team endorse or oppose the use of this built-in
12973 It's here if you want it or need it.
12974 There exist other \SpecialChar LaTeX2e
12975 classes for creating presentations, such as the
12980 \begin_inset space ~
12984 \begin_inset CommandInset ref
12986 reference "sec:foiltex"
12991 \begin_inset Quotes eld
12999 \begin_inset Quotes erd
13002 package [present on some \SpecialChar TeX
13004 The latter is not yet supported under \SpecialChar LyX
13009 \begin_layout Plain Layout
13010 Perhaps you can take on the task\SpecialChar ldots
13016 I know nothing about these other classes.
13017 Try them out to see what sort of alternative they provide.
13020 \begin_layout Chapter
13022 \change_inserted 893223064 1464851900
13026 \begin_layout Standard
13028 \change_inserted 893223064 1464851910
13029 This is a holder for prepared text.
13032 \begin_layout Chapter
13034 \change_inserted 893223064 1464851939
13038 \begin_layout Standard
13040 \change_inserted 893223064 1464851945
13041 This is a holder for prepared text.
13044 \begin_layout Section
13048 \begin_layout Standard
13049 You can do everything with \SpecialChar LyX
13050 that you can do with \SpecialChar LaTeX
13052 However, \SpecialChar LyX
13053 cannot support every \SpecialChar LaTeX
13055 But you can always use \SpecialChar TeX
13057 This chapter shows you some more special things you might want to use.
13058 For other special things you can do with figures, tables, floats, boxes
13059 and notes, have a look at the
13062 \begin_inset space ~
13070 \begin_layout Section
13071 Fancy Headers and Footers
13074 \begin_layout Standard
13075 The default page layout is rather plain; for an
13076 \begin_inset Flex Code
13079 \begin_layout Plain Layout
13085 document class, all you get is a centered page number at the bottom of
13087 This document uses KOMA-script's book class, so it appears to be a bit
13089 But to really put on a show, you need to set the document page style to
13091 \begin_inset Quotes eld
13095 \begin_inset Quotes erd
13098 , as mentioned in the
13103 This section describes the \SpecialChar LaTeX
13104 code you need to insert in your \SpecialChar LaTeX
13106 order to get the desired effects.
13109 \begin_layout Standard
13110 For more information on fancy headers, see the
13111 \begin_inset Flex Code
13114 \begin_layout Plain Layout
13120 package documentation.
13122 \begin_inset Flex URL
13125 \begin_layout Plain Layout
13127 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
13135 \begin_layout Standard
13136 The page header is divided into three fields, not surprisingly labeled
13137 \begin_inset Quotes eld
13141 \begin_inset Quotes erd
13145 \begin_inset Quotes eld
13149 \begin_inset Quotes erd
13153 \begin_inset Quotes eld
13157 \begin_inset Quotes erd
13161 The footer is also divided into these three fields.
13162 The \SpecialChar LaTeX
13163 commands to set these fields in the simplest manner are
13164 \begin_inset Flex Code
13167 \begin_layout Plain Layout
13176 \begin_inset Flex Code
13179 \begin_layout Plain Layout
13188 \begin_inset Flex Code
13191 \begin_layout Plain Layout
13200 \begin_inset Flex Code
13203 \begin_layout Plain Layout
13212 Suppose you wish to put your name in the upper left hand corner of each
13214 Simply insert the following command in the preamble:
13217 \begin_layout Standard
13226 \begin_layout Standard
13227 You will now see your name in the upper left.
13228 If a field has a default entry that you would like to get rid of (often
13229 the page number appears in the central footer) simply include a command
13230 with a blank argument, e.
13231 \begin_inset space \thinspace{}
13237 \begin_layout Standard
13245 \begin_layout Standard
13246 Let's get really fancy: lets put the section number with the word
13247 \begin_inset Quotes eld
13251 \begin_inset Quotes erd
13255 \begin_inset space \thinspace{}
13259 \begin_inset space \space{}
13262 Section 3) in the upper left, the page number (e.
13263 \begin_inset space \thinspace{}
13267 \begin_inset space \space{}
13270 Page 4) in the upper right, your name in the lower left, and the date in
13272 The following commands should now appear in the preamble:
13275 \begin_layout Standard
13285 \begin_layout Standard
13293 \begin_layout Standard
13303 \begin_layout Standard
13312 \begin_layout Standard
13320 \begin_layout Standard
13330 \begin_layout Standard
13332 \begin_inset Flex Code
13335 \begin_layout Plain Layout
13344 \begin_inset Flex Code
13347 \begin_layout Plain Layout
13355 access \SpecialChar LaTeX
13356 's section and page counters, and so print out the current section
13359 \begin_inset Flex Code
13362 \begin_layout Plain Layout
13370 simply prints out today's date.
13373 \begin_layout Standard
13374 The thicknesses of the horizontal rules drawn beneath the header and above
13375 the footer can also be modified.
13376 If you don't want one of the rules, set its thickness to 0.
13377 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
13383 \begin_inset Flex Code
13386 \begin_layout Plain Layout
13391 headrulewidth}{0.4pt}
13397 \begin_inset Flex Code
13400 \begin_layout Plain Layout
13405 footrulewidth}{0.4pt}
13410 to set the thicknesses.
13413 \begin_layout Standard
13414 You can switch the header/footer settings on and off for individual pages
13415 using commands like
13416 \begin_inset Flex Code
13419 \begin_layout Plain Layout
13422 thispagestyle{empty}
13428 \begin_inset Flex Code
13431 \begin_layout Plain Layout
13434 thispagestyle{plain}
13440 \begin_inset Flex Code
13443 \begin_layout Plain Layout
13446 thispagestyle{fancy}
13452 Simply insert them in the text on the page you want changed and mark them
13453 as \SpecialChar TeX
13455 In fact, title pages are marked as plain by default, while following pages
13456 are marked fancy when using the global fancy setting.
13459 \begin_layout Standard
13460 As a final example, it is possible to include an image in the header or
13462 Suppose you want to put a company logo in the upper lefthand corner.
13463 You might try something like
13466 \begin_layout Standard
13475 includegraphics{logo.eps}}}
13478 \begin_layout Standard
13480 (you may need to preface this with
13481 \begin_inset Flex Code
13484 \begin_layout Plain Layout
13488 usepackage{graphics}
13493 if you don't include graphics elsewhere in your document).
13496 \begin_layout Section
13497 Multiple Text Columns
13500 \begin_layout Standard
13501 This feature is independent of the option
13503 Two-column document
13505 in the document settings under
13510 If you want to have 2
13511 \begin_inset space ~
13514 columns for the whole document, it is recommended to use the
13516 Two-column document
13519 For all other cases use this feature.
13522 \begin_layout Standard
13523 To use multiple text columns in your document, you have to load the module
13530 Document\SpecialChar menuseparator
13531 Settings\SpecialChar menuseparator
13534 ) and must have the \SpecialChar LaTeX
13542 \begin_layout Standard
13543 Footnotes within multiple columns will be placed at the bottom of the page
13544 and not under each column.
13545 Within the different columns you can use everything, with the limitation
13546 that for floats you need to use the float option
13553 \begin_layout Subsection
13557 \begin_layout Standard
13558 If you want to have 2
13559 \begin_inset space ~
13562 columns in your text, insert a multicolumn inset via the menu
13564 Insert\SpecialChar menuseparator
13566 \begin_inset space ~
13569 Insets\SpecialChar menuseparator
13571 \begin_inset space ~
13576 where the columns should start.
13577 Write all text that should be printed in 2
13578 \begin_inset space ~
13581 columns into this inset.
13584 \begin_layout Standard
13585 Here is an example:
13588 \begin_layout Standard
13590 \begin_inset Flex Multiple Columns
13593 \begin_layout Plain Layout
13598 The Adventure of the Empty House
13601 \begin_inset Newline newline
13604 by Sir Arthur Conan Doyle
13607 \begin_layout Plain Layout
13610 It was in the spring of the year 1894 that all London was interested, and
13611 the fashionable world dismayed, by the murder of the Honourable Ronald
13612 Adair under most unusual and inexplicable circumstances.
13613 The public has already learned those particulars of the crime which came
13614 out in the police investigation, but a good deal was suppressed upon that
13615 occasion, since the case for the prosecution was so overwhelmingly strong
13616 that it was not necessary to bring forward all the facts.
13617 Only now, at the end of nearly ten years, am I allowed to supply those
13618 missing links which make up the whole of that remarkable chain.
13619 The crime was of interest in itself, but that interest was as nothing to
13620 me compared to the inconceivable sequel, which afforded me the greatest
13621 shock and surprise of any event in my adventurous life.
13622 Even now, after this long interval, I find myself thrilling as I think
13623 of it, and feeling once more that sudden flood of joy, amazement, and increduli
13624 ty which utterly submerged my mind.
13625 Let me say to that public, which has shown some interest in those glimpses
13626 which I have occasionally given them of the thoughts and actions of a very
13627 remarkable man, that they are not to blame me if I have not shared my knowledge
13628 with them, for I should have considered it my first duty to do so, had
13629 I not been barred by a positive prohibition from his own lips, which was
13630 only withdrawn upon the third of last month.
13638 \begin_layout Standard
13639 To get 3 or more columns, set the cursor into the multicolumn inset and
13642 Insert\SpecialChar menuseparator
13644 \begin_inset space ~
13648 \begin_inset space ~
13654 The number of the desired columns is written into that inset (for 3
13655 \begin_inset space ~
13659 \begin_inset Quotes eld
13663 \begin_inset Quotes erd
13667 \begin_inset Newline newline
13670 Here is an example with 3
13671 \begin_inset space ~
13677 \begin_layout Standard
13678 \begin_inset Flex Multiple Columns
13681 \begin_layout Plain Layout
13684 \begin_inset Argument 1
13687 \begin_layout Plain Layout
13693 It can be imagined that my close intimacy with Sherlock Holmes had interested
13694 me deeply in crime, and that after his disappearance I never failed to
13695 read with care the various problems which came before the public.
13696 And I even attempted, more than once, for my own private satisfaction,
13697 to employ his methods in their solution, though with indifferent success.
13698 There was none, however, which appealed to me like this tragedy of Ronald
13700 As I read the evidence at the inquest, which led up to a verdict of willful
13701 murder against some person or persons unknown, I realized more clearly
13702 than I had ever done the loss which the community had sustained by the
13703 death of Sherlock Holmes.
13704 There were points about this strange business which would, I was sure,
13705 have specially appealed to him, and the efforts of the police would have
13706 been supplemented, or more probably anticipated, by the trained observation
13707 and the alert mind of the first criminal agent in Europe.
13708 All day, as I drove upon my round, I turned over the case in my mind and
13709 found no explanation which appeared to me to be adequate.
13710 At the risk of telling a twice-told tale, I will recapitulate the facts
13711 as they were known to the public at the conclusion of the inquest.
13719 \begin_layout Standard
13720 You can have up to 10
13721 \begin_inset space ~
13724 columns if you want to, but that might not be very pleasant for the readers
13728 \begin_layout Standard
13729 \begin_inset Newpage newpage
13735 \begin_layout Subsection
13736 Columns inside Columns
13739 \begin_layout Standard
13740 You can also have columns inside columns:
13743 \begin_layout Standard
13744 \begin_inset Flex Multiple Columns
13747 \begin_layout Plain Layout
13750 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
13751 at that time governor of one of the Australian colonies.
13752 Adair's mother had returned from Australia to undergo the operation for
13753 cataract, and she, her son Ronald, and her daughter Hilda were living together
13757 \begin_layout Plain Layout
13758 \begin_inset Flex Multiple Columns
13761 \begin_layout Plain Layout
13764 The youth moved in the best society–had, so far as was known, no enemies
13765 and no particular vices.
13766 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
13767 had been broken off by mutual consent some months before, and there was
13768 no sign that it had left any very profound feeling behind it.
13769 For the rest {sic} the man's life moved in a narrow and conventional circle,
13770 for his habits were quiet and his nature unemotional.
13771 Yet it was upon this easy-going young aristocrat that death came, in most
13772 strange and unexpected form, between the hours of ten and eleven-twenty
13773 on the night of March 30, 1894.
13781 \begin_layout Plain Layout
13784 Ronald Adair was fond of cards–playing continually, but never for such stakes
13786 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
13787 It was shown that, after dinner on the day of his death, he had played
13788 a rubber of whist at the latter club.
13789 He had also played there in the afternoon.
13794 The evidence of those who had played with him– Mr.
13795 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
13796 and that there was a fairly equal fall of the cards.
13797 Adair might have lost five pounds, but not more.
13798 His fortune was a considerable one, and such a loss could not in any way
13800 He had played nearly every day at one club or other, but he was a cautious
13801 player, and usually rose a winner.
13802 It came out in evidence that, in partnership with Colonel Moran, he had
13803 actually won as much as four hundred and twenty pounds in a sitting, some
13804 weeks before, from Godfrey Milner and Lord Balmoral.
13805 So much for his recent history as it came out at the inquest.
13813 \begin_layout Subsection
13817 \begin_layout Standard
13818 The examples in this section show some more special features of multiple
13822 \begin_layout Standard
13823 For more features of multiple columns, have a look at the documentation
13824 of the \SpecialChar LaTeX
13830 \begin_inset CommandInset citation
13839 \begin_layout Subsubsection
13843 \begin_layout Standard
13844 To add a preface text for multiple columns, set the cursor into the multicolumn
13845 inset and use the menu
13847 Insert\SpecialChar menuseparator
13851 Write your preface text into that inset.
13852 \begin_inset Newline newline
13855 This is an example with some preface text:
13858 \begin_layout Standard
13859 \begin_inset VSpace bigskip
13865 \begin_layout Standard
13866 \begin_inset Flex Multiple Columns
13869 \begin_layout Plain Layout
13870 \begin_inset Argument 2
13873 \begin_layout Plain Layout
13874 And the story continues and continues and continues and continues\SpecialChar ldots
13882 On the evening of the crime, he returned from the club exactly at ten.
13883 His mother and sister were out spending the evening with a relation.
13884 The servant deposed that she heard him enter the front room on the second
13885 floor, generally used as his sitting-room.
13886 She had lit a fire there, and as it smoked she had opened the window.
13887 No sound was heard from the room until eleven-twenty, the hour of the return
13888 of Lady Maynooth and her daughter.
13889 Desiring to say good-night, she attempted to enter her son's room.
13890 The door was locked on the inside, and no answer could be got to their
13891 cries and knocking.
13892 Help was obtained, and the door forced.
13893 The unfortunate young man was found lying near the table.
13894 His head had been horribly mutilated by an expanding revolver bullet, but
13895 no weapon of any sort was to be found in the room.
13903 \begin_layout Standard
13904 You can also use a section heading as the preface if you use a section command
13905 as \SpecialChar TeX
13907 For example the command
13910 \begin_layout Standard
13915 subsection{subsection title}
13918 \begin_layout Standard
13919 creates a subsection.
13920 In this example the preface is a subsubsection:
13923 \begin_layout Standard
13924 \begin_inset Flex Multiple Columns
13927 \begin_layout Plain Layout
13928 \begin_inset Argument 2
13931 \begin_layout Plain Layout
13935 \begin_layout Plain Layout
13944 This is a subsubsection heading as a preface
13948 \begin_layout Plain Layout
13962 A minute examination of the circumstances served only to make the case more
13964 In the first place, no reason could be given why the young man should have
13965 fastened the door upon the inside.
13966 There was the possibility that the murderer had done this, and had afterwards
13967 escaped by the window.
13968 The drop was at least twenty feet, however, and a bed of crocuses in full
13970 Neither the flowers nor the earth showed any sign of having been disturbed,
13971 nor were there any marks upon the narrow strip of grass which separated
13972 the house from the road.
13973 Apparently, therefore, it was the young man himself who had fastened the
13975 But how did he come by his death? No one could have climbed up to the window
13976 without leaving traces.
13977 Suppose a man had fired through the window, he would indeed be a remarkable
13978 shot who could with a revolver inflict so deadly a wound.
13979 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
13980 a hundred yards of the house.
13981 No one had heard a shot.
13989 \begin_layout Standard
13990 If there is less vertical space than 6
13991 \begin_inset space ~
13994 text lines is left on the page at the beginning of the multiple columns,
13995 a page break will be inserted before the multiple columns.
13996 Depending on the number of lines of the preface text, you might want to
13998 This is done by setting the cursor into the mulitcolumn inset behind the
13999 preface (if there is any) and using the menu
14001 Insert\SpecialChar menuseparator
14003 \begin_inset space ~
14007 \begin_inset space ~
14011 \begin_inset space ~
14017 Insert into that inset the amount of space like e.
14018 \begin_inset space \thinspace{}
14022 \begin_inset space \space{}
14026 \begin_inset Quotes eld
14030 \begin_inset Quotes erd
14034 \begin_inset Newline newline
14037 In this example the space is set to 7
14038 \begin_inset space ~
14041 text lines by using
14042 \begin_inset Quotes eld
14048 \begin_inset Quotes erd
14057 needs to be inserted as \SpecialChar TeX
14061 \begin_layout Standard
14062 \begin_inset Flex Multiple Columns
14065 \begin_layout Plain Layout
14066 \begin_inset Argument 3
14069 \begin_layout Plain Layout
14074 \begin_layout Plain Layout
14090 On the evening of the crime, he returned from the club exactly at ten.
14091 His mother and sister were out spending the evening with a relation.
14092 The servant deposed that she heard him enter the front room on the second
14093 floor, generally used as his sitting-room.
14094 She had lit a fire there, and as it smoked she had opened the window.
14095 No sound was heard from the room until eleven-twenty, the hour of the return
14096 of Lady Maynooth and her daughter.
14097 Desiring to say good-night, she attempted to enter her son's room.
14098 The door was locked on the inside, and no answer could be got to their
14099 cries and knocking.
14100 Help was obtained, and the door forced.
14101 The unfortunate young man was found lying near the table.
14102 His head had been horribly mutilated by an expanding revolver bullet, but
14103 no weapon of any sort was to be found in the room.
14111 \begin_layout Subsubsection
14115 \begin_layout Standard
14116 The amount of space before and after multiple columns can be changed by
14117 changing the length
14124 For example the command
14127 \begin_layout Standard
14137 \begin_layout Standard
14138 in \SpecialChar TeX
14139 Code changes its value to 3
14140 \begin_inset space \thinspace{}
14144 The change must be made before the multiple columns' start.
14145 The predefined value is 13
14146 \begin_inset space \thinspace{}
14152 \begin_layout Standard
14160 \begin_inset space \thinspace{}
14166 \begin_layout Standard
14170 \begin_layout Plain Layout
14176 multicolsep}{2.5cm}
14184 \begin_layout Standard
14185 \begin_inset Flex Multiple Columns
14188 \begin_layout Plain Layout
14191 All day I turned these facts over in my mind, endeavouring to hit upon some
14192 theory which could reconcile them all, and to find that line of least resistanc
14193 e which my poor friend had declared to be the starting-point of every investigat
14195 I confess that I made little progress.
14196 In the evening I strolled across the Park, and found myself about six o'clock
14197 at the Oxford Street end of Park Lane.
14198 A group of loafers upon the pavements, all staring up at a particular window,
14199 directed me to the house which I had come to see.
14200 A tall, thin man with coloured glasses, whom I strongly suspected of being
14201 a plain-clothes detective, was pointing out some theory of his own, while
14202 the others crowded round to listen to what he said.
14203 I got as near him as I could, but his observations seemed to me to be absurd,
14204 so I withdrew again in some disgust.
14205 As I did so I struck against an elderly, deformed man, who had been behind
14206 me, and I knocked down several books which he was carrying.
14214 \begin_layout Standard
14215 \begin_inset Note Greyedout
14218 \begin_layout Plain Layout
14223 The values you set with
14229 will be used for all following multiple columns until you change them again.
14237 \begin_layout Standard
14241 \begin_layout Plain Layout
14253 \begin_inset Note Note
14256 \begin_layout Plain Layout
14257 go back to the default
14265 \begin_layout Standard
14266 \begin_inset Newpage newpage
14272 \begin_layout Subsubsection
14276 \begin_layout Standard
14277 A column break can be forced by inserting the command
14283 as \SpecialChar TeX
14284 Code to that position in the text where the column should be broken.
14285 Note that this leads in most cases to whitespace in the text.
14286 \begin_inset Newline newline
14289 Here is an example:
14292 \begin_layout Standard
14293 \begin_inset Flex Multiple Columns
14296 \begin_layout Plain Layout
14299 \begin_inset Quotes eld
14302 You're surprised to see me, sir,
14303 \begin_inset Quotes erd
14306 said he, in a strange, croaking voice.
14309 \begin_layout Plain Layout
14312 I acknowledged that I was.
14315 \begin_layout Plain Layout
14318 \begin_inset Quotes eld
14321 Well, I've a conscience, sir, and when I chanced to see you go into this
14322 house, as I came hobbling after you, I thought to myself, I'll just step
14323 in and see that kind gentleman, and tell him that if I was a bit gruff
14324 in my manner there was not any harm meant, and that I am much obliged to
14325 him for picking up my books.
14326 \begin_inset Quotes erd
14332 \begin_layout Plain Layout
14335 \begin_inset Quotes eld
14338 You make too much of a trifle,
14339 \begin_inset Quotes erd
14344 \begin_inset Quotes eld
14347 May I ask how you knew who I was?
14348 \begin_inset Quotes erd
14351 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
14355 \begin_layout Plain Layout
14367 \begin_layout Plain Layout
14370 \begin_inset Quotes eld
14373 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14374 you'll find my little bookshop at the corner of Church Street, and very
14375 happy to see you, I am sure.
14376 Maybe you collect yourself, sir.
14380 \begin_inset space ~
14393 –a bargain, every one of them.
14394 With five volumes you could just fill that gap on that second shelf.
14395 It looks untidy, does it not, sir?
14396 \begin_inset Quotes erd
14407 \begin_layout Subsubsection
14411 \begin_layout Standard
14412 The width of the columns is automatically calculated, but you can modify
14413 the space between the columns.
14414 This is done by changing the length
14421 Its predefined value is 10
14422 \begin_inset space \thinspace{}
14426 Here is an example where
14433 \begin_inset space \thinspace{}
14439 \begin_layout Standard
14443 \begin_layout Plain Layout
14457 \begin_layout Standard
14458 \begin_inset Flex Multiple Columns
14461 \begin_layout Plain Layout
14464 My observations of No.
14465 \begin_inset space \space{}
14468 427 Park Lane did little to clear up the problem in which I was interested.
14469 The house was separated from the street by a low wall and railing, the
14470 whole not more than five feet high.
14471 It was perfectly easy, therefore, for anyone to get into the garden, but
14472 the window was entirely inaccessible, since there was no water pipe or
14473 anything which could help the most active man to climb it.
14474 More puzzled than ever, I retraced my steps to Kensington.
14475 I had not been in my study five minutes when the maid entered to say that
14476 a person desired to see me.
14477 To my astonishment it was none other than my strange old book collector,
14478 his sharp, wizened face peering out from a frame of white hair, and his
14479 precious volumes, a dozen of them at least, wedged under his right arm.
14487 \begin_layout Standard
14491 \begin_layout Plain Layout
14503 \begin_inset Note Note
14506 \begin_layout Plain Layout
14507 go back to the default
14515 \begin_layout Subsubsection
14519 \begin_layout Standard
14520 Between the columns a rule with a width of the length
14527 If this rule width is set to 0
14528 \begin_inset space \thinspace{}
14531 pt (this is the default), the rule is suppressed.
14532 In the following example the rule is 2
14533 \begin_inset space \thinspace{}
14539 \begin_layout Standard
14543 \begin_layout Plain Layout
14549 columnseprule}{2pt}
14557 \begin_layout Standard
14558 \begin_inset Flex Multiple Columns
14561 \begin_layout Plain Layout
14564 \begin_inset Quotes eld
14567 You're surprised to see me, sir,
14568 \begin_inset Quotes erd
14571 said he, in a strange, croaking voice.
14574 \begin_layout Plain Layout
14577 I acknowledged that I was.
14580 \begin_layout Plain Layout
14583 \begin_inset Quotes eld
14586 Well, I've a conscience, sir, and when I chanced to see you go into this
14587 house, as I came hobbling after you, I thought to myself, I'll just step
14588 in and see that kind gentleman, and tell him that if I was a bit gruff
14589 in my manner there was not any harm meant, and that I am much obliged to
14590 him for picking up my books.
14591 \begin_inset Quotes erd
14597 \begin_layout Plain Layout
14600 \begin_inset Quotes eld
14603 You make too much of a trifle,
14604 \begin_inset Quotes erd
14609 \begin_inset Quotes eld
14612 May I ask how you knew who I was?
14613 \begin_inset Quotes erd
14619 \begin_layout Plain Layout
14622 \begin_inset Quotes eld
14625 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14626 you'll find my little bookshop at the corner of Church Street, and very
14627 happy to see you, I am sure.
14628 Maybe you collect yourself, sir.
14632 \begin_inset space ~
14645 –a bargain, every one of them.
14646 With five volumes you could just fill that gap on that second shelf.
14647 It looks untidy, does it not, sir?
14648 \begin_inset Quotes erd
14659 \begin_layout Standard
14660 \begin_inset VSpace defskip
14666 \begin_layout Standard
14667 The rule can be colored by redefining the command
14674 This is done by inserting the command
14675 \begin_inset Newline newline
14684 columnseprulecolor}{
14689 \begin_inset Newline newline
14692 as \SpecialChar TeX
14693 Code before the multicolumn inset.
14698 in this command by a color of your choice.
14699 You can use all pre- and self-defined colors.
14707 \begin_inset space ~
14712 for more information about pre- and self-defined colors.
14713 To go back to the default color insert the command
14714 \begin_inset Newline newline
14723 columnseprulecolor}{
14728 \begin_inset Newline newline
14731 Here is the example with a cyan rule and 1
14732 \begin_inset space \thinspace{}
14735 cm column separation:
14738 \begin_layout Standard
14742 \begin_layout Plain Layout
14751 \begin_layout Plain Layout
14757 columnseprulecolor}{
14767 \begin_layout Standard
14768 \begin_inset Flex Multiple Columns
14771 \begin_layout Plain Layout
14774 \begin_inset Quotes eld
14777 You're surprised to see me, sir,
14778 \begin_inset Quotes erd
14781 said he, in a strange, croaking voice.
14784 \begin_layout Plain Layout
14787 I acknowledged that I was.
14790 \begin_layout Plain Layout
14793 \begin_inset Quotes eld
14796 Well, I've a conscience, sir, and when I chanced to see you go into this
14797 house, as I came hobbling after you, I thought to myself, I'll just step
14798 in and see that kind gentleman, and tell him that if I was a bit gruff
14799 in my manner there was not any harm meant, and that I am much obliged to
14800 him for picking up my books.
14801 \begin_inset Quotes erd
14807 \begin_layout Plain Layout
14810 \begin_inset Quotes eld
14813 You make too much of a trifle,
14814 \begin_inset Quotes erd
14819 \begin_inset Quotes eld
14822 May I ask how you knew who I was?
14823 \begin_inset Quotes erd
14829 \begin_layout Plain Layout
14832 \begin_inset Quotes eld
14835 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14836 you'll find my little bookshop at the corner of Church Street, and very
14837 happy to see you, I am sure.
14838 Maybe you collect yourself, sir.
14842 \begin_inset space ~
14855 –a bargain, every one of them.
14856 With five volumes you could just fill that gap on that second shelf.
14857 It looks untidy, does it not, sir?
14858 \begin_inset Quotes erd
14869 \begin_layout Standard
14873 \begin_layout Plain Layout
14879 columnseprule}{0pt}
14882 \begin_layout Plain Layout
14888 columnseprulecolor}{
14896 \begin_inset Note Note
14899 \begin_layout Plain Layout
14900 go back to the default
14908 \begin_layout Chapter
14910 \change_inserted 893223064 1464852301
14914 \begin_layout Section
14915 Non-standard Paragraph Shapes
14918 \begin_layout Standard
14921 as well as any other text processor uses by default rectangular paragraphs.
14922 For special cases like for example posters, invitation cards or poems you
14923 can modify the paragraph shape to one of your choice.
14924 This can be done by using the \SpecialChar LaTeX
14929 which is loaded by using in the document settings the module
14931 Custom paragraph shapes
14936 \begin_layout Subsection
14940 \begin_layout Standard
14945 provides the following shapes:
14948 \begin_layout Standard
14949 \begin_inset Tabular
14950 <lyxtabular version="3" rows="13" columns="3">
14951 <features booktabs="true" islongtable="true" longtabularalignment="center">
14952 <column alignment="center" valignment="middle" width="16col%">
14953 <column alignment="center" valignment="middle" width="40col%">
14954 <column alignment="center" valignment="middle" width="35col%">
14955 <row endhead="true">
14956 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14959 \begin_layout Plain Layout
14965 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14968 \begin_layout Plain Layout
14974 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
14977 \begin_layout Plain Layout
14985 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14988 \begin_layout Plain Layout
14994 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14997 \begin_layout Plain Layout
14998 Circle with circular hole (in the size of a CD/DVD)
15003 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15006 \begin_layout Plain Layout
15007 Cannot be scaled, take care there is not too much text
15014 <cell alignment="center" valignment="top" topline="true" usebox="none">
15017 \begin_layout Plain Layout
15023 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15026 \begin_layout Plain Layout
15032 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15035 \begin_layout Plain Layout
15036 Fragile, calculation might fail
15043 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15046 \begin_layout Plain Layout
15052 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15055 \begin_layout Plain Layout
15056 Rhomboid (symbolizing a
15057 \begin_inset Quotes eld
15061 \begin_inset Quotes erd
15069 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15072 \begin_layout Plain Layout
15080 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15083 \begin_layout Plain Layout
15089 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15092 \begin_layout Plain Layout
15098 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15101 \begin_layout Plain Layout
15109 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15112 \begin_layout Plain Layout
15118 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15121 \begin_layout Plain Layout
15127 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15130 \begin_layout Plain Layout
15138 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15141 \begin_layout Plain Layout
15147 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15150 \begin_layout Plain Layout
15151 Nut for bolt (hexagon with circular hole)
15156 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15159 \begin_layout Plain Layout
15167 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15170 \begin_layout Plain Layout
15176 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15179 \begin_layout Plain Layout
15185 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15188 \begin_layout Plain Layout
15196 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15199 \begin_layout Plain Layout
15205 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15208 \begin_layout Plain Layout
15214 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15217 \begin_layout Plain Layout
15225 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15228 \begin_layout Plain Layout
15234 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15237 \begin_layout Plain Layout
15243 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15246 \begin_layout Plain Layout
15254 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15257 \begin_layout Plain Layout
15263 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15266 \begin_layout Plain Layout
15267 Normal/reversed rain drop
15272 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15275 \begin_layout Plain Layout
15276 Fragile, calculation might fail
15283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15286 \begin_layout Plain Layout
15293 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15296 \begin_layout Plain Layout
15297 The \SpecialChar TeX
15303 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15306 \begin_layout Plain Layout
15314 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15317 \begin_layout Plain Layout
15319 \begin_inset Newline newline
15327 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15330 \begin_layout Plain Layout
15331 Triangles in different orientations
15336 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15339 \begin_layout Plain Layout
15353 \begin_layout Standard
15354 To use a shape for your paragraph, simply select it in \SpecialChar LyX
15356 for environments in the toolbar.
15359 \begin_layout Standard
15360 \begin_inset Newpage newpage
15366 \begin_layout Standard
15367 Here is an example paragraph in the shape of a nut:
15370 \begin_layout Standard
15371 \begin_inset VSpace bigskip
15380 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15381 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15383 At vero eos et accusam et justo duo dolores et ea rebum.
15384 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15386 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15387 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15391 \begin_layout Standard
15392 \begin_inset VSpace bigskip
15398 \begin_layout Standard
15399 \begin_inset Note Greyedout
15402 \begin_layout Plain Layout
15407 : shapepar paragraphs cannot run over a page break.
15415 \begin_layout Standard
15416 \begin_inset VSpace bigskip
15422 \begin_layout Standard
15427 takes care that the shape will always be preserved, no matter how much
15428 text is in the paragraph.
15429 Therefore the paragraph size changes with the amount of contained text.
15430 This can lead to paragraph sizes exceeding the page margins.
15431 To demonstrate the size scaling, here is the same example paragraph but
15432 with twice as much text:
15435 \begin_layout Standard
15436 \begin_inset Newpage newpage
15445 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15446 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15448 At vero eos et accusam et justo duo dolores et ea rebum.
15449 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15451 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15452 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15454 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15455 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15457 At vero eos et accusam et justo duo dolores et ea rebum.
15458 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15460 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15461 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15465 \begin_layout Standard
15466 \begin_inset VSpace bigskip
15472 \begin_layout Standard
15473 An exception is the shape
15478 It cannot be scaled because it must fit the size of a CD/DVD.
15479 Therefore the amount of text that fits into the shape is limited.
15480 \begin_inset Newline newline
15491 shape are fragile, meaning that the calculation of their size can fail,
15492 depending on the amount of text.
15493 You will then get the \SpecialChar LaTeX
15495 \begin_inset Quotes eld
15498 Arithmetic overflow
15499 \begin_inset Quotes erd
15503 In this case one can try to remove or add some text; if nothing works one
15504 has to use another shape.
15507 \begin_layout Standard
15508 \begin_inset VSpace bigskip
15514 \begin_layout Standard
15515 For shapes with tips you will maybe see that \SpecialChar LaTeX
15516 's hyphenation routine fails
15517 for text in the tips.
15518 Therefore it is often necessary to add hyphenation points
15523 arg "specialchar-insert hyphenation"
15528 ) to the corresponding text parts.
15531 \begin_layout Standard
15532 \begin_inset VSpace bigskip
15538 \begin_layout Standard
15539 Shapepar paragraphs are either always centered or placed on the page so
15540 that their left border touches the left page margin.
15541 You can therefore not use the paragraph dialog to align such paragraphs.
15542 A solution is to put the paragraph into a minipage or parbox and align
15544 The problem is hereby to find the right width for the box.
15545 Because if it is too wide and you center the box, the paragraph is not
15546 centered too because it sticks at the left side of the box.
15547 So you might have to play a bit with the width until it fits.
15548 Here are two heart-shaped paragraphs, the first one is not aligned, the
15549 second one is right-aligned:
15552 \begin_layout Standard
15553 \begin_inset Newpage newpage
15559 \begin_layout Heart
15563 Lo\SpecialChar softhyphen
15564 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15565 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15567 At vero eos et accusam et justo duo dolores et ea rebum.
15568 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15572 \begin_layout Standard
15573 \begin_inset VSpace bigskip
15579 \begin_layout Standard
15582 \begin_inset Box Frameless
15592 height_special "totalheight"
15597 backgroundcolor "none"
15600 \begin_layout Heart
15604 Lo\SpecialChar softhyphen
15605 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15606 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15608 At vero eos et accusam et justo duo dolores et ea rebum.
15609 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15618 \begin_layout Subsection
15622 \begin_layout Standard
15623 You can define any shape you want.
15624 Doing this manually is a lot of work because every coordinate must be specified.
15625 But there is a way to let the computer calculate the coordinates:
15628 \begin_layout Enumerate
15629 Install the program
15630 \begin_inset CommandInset href
15633 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
15640 \begin_layout Enumerate
15647 TeX/LaTeX\SpecialChar menuseparator
15648 Settings\SpecialChar menuseparator
15651 and select the font size you are using in your document.
15652 For example this document uses the size 12
15653 \begin_inset space \thinspace{}
15659 \begin_layout Enumerate
15663 \begin_layout Enumerate
15666 TeX/LaTeX\SpecialChar menuseparator
15669 to export the shape to coordinates.
15670 In the appearing dialog use either the outline of your shape for the coordinate
15671 s or the path itself.
15675 \begin_layout Plain Layout
15676 For more information see
15677 \begin_inset CommandInset href
15679 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
15691 \begin_layout Standard
15692 The coordinates are written into a \SpecialChar TeX
15694 To use it for your \SpecialChar LyX
15698 \begin_layout Enumerate
15699 Place the cursor before the first character of your paragraph (or into a
15703 \begin_layout Enumerate
15704 Open in \SpecialChar LyX
15707 Insert\SpecialChar menuseparator
15708 File\SpecialChar menuseparator
15710 \begin_inset space ~
15715 , select the file and use
15724 \begin_layout Standard
15725 \begin_inset VSpace defskip
15731 \begin_layout Standard
15732 \begin_inset Note Greyedout
15735 \begin_layout Plain Layout
15740 : The changed shape only applies to the current paragraph; everything is
15741 reset to normal for the next paragraph.
15742 Therefore the shape definition file must be input into every paragraph
15743 with the desired shape.
15751 \begin_layout Standard
15752 \begin_inset VSpace bigskip
15758 \begin_layout Standard
15759 Here is an example:
15762 \begin_layout Standard
15763 \begin_inset VSpace bigskip
15769 \begin_layout Standard
15770 \begin_inset CommandInset include
15772 filename "/usr/share/lyx/doc/SpecialParagraphShape.tex"
15778 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15779 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15781 At vero eos et accusam et justo duo dolores et ea rebum.
15782 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15784 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15785 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15789 \begin_layout Standard
15790 \begin_inset VSpace bigskip
15796 \begin_layout Standard
15801 to draw complexer shapes in
15805 you can draw the shape in a program of your choice and import the resulting
15811 Then you only need to draw a line or spline along the outline of the image.
15814 \begin_layout Standard
15815 \begin_inset VSpace bigskip
15821 \begin_layout Standard
15824 Custom paragraph shapes
15826 also provides the two commands
15834 which can be used to define custom shapes coordinate by coordinate.
15838 \begin_layout Plain Layout
15839 These commands are internally used for all shapes described here.
15844 For information how these styles are used and about further customization
15845 possibilities, have a look at the documentation of the package
15850 \begin_inset CommandInset citation
15859 \begin_layout Bibliography
15860 \begin_inset CommandInset bibitem
15861 LatexCommand bibitem
15866 Documentation of the \SpecialChar LaTeX
15868 \begin_inset CommandInset href
15871 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
15878 \begin_layout Bibliography
15879 \begin_inset CommandInset bibitem
15880 LatexCommand bibitem
15885 Documentation of the \SpecialChar LaTeX
15887 \begin_inset CommandInset href
15890 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
15897 \begin_layout Chapter
15899 \change_inserted 893223064 1464852414
15900 Bibliographic databases
15901 \change_deleted 893223064 1464852406
15907 \begin_layout Section
15908 Customizing Bibliographies with Bib\SpecialChar TeX
15912 \begin_layout Standard
15913 The most basic information about how to use Bib\SpecialChar TeX
15914 with \SpecialChar LyX
15915 is contained in the
15918 Bibliography databases (Bib\SpecialChar TeX
15926 The following subsections explain special bibliography features supported
15927 by \SpecialChar LyX
15931 \begin_layout Subsection
15932 Alternative Citation Styles
15935 \begin_layout Standard
15936 Standard Bib\SpecialChar TeX
15938 \begin_inset space \thinspace{}
15942 \begin_inset space \space{}
15946 \begin_inset Quotes eld
15950 \begin_inset Quotes erd
15953 ) to refer to a cited work.
15954 However, in many scientific disciplines, other citation styles are in use.
15955 The most common one is the author-year style (e.
15956 \begin_inset space \thinspace{}
15960 \begin_inset space \space{}
15964 \begin_inset Quotes eld
15968 \begin_inset Quotes erd
15973 supports two packages that provide this style,
15974 \begin_inset Flex Code
15977 \begin_layout Plain Layout
15984 \begin_inset Flex Code
15987 \begin_layout Plain Layout
15994 Both packages have their pros and cons, which cannot be listed in detail.
15995 If you only want to have simple author-year (or author-numerical) style,
15996 or if you want to use one of the countless style files for
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16006 , then the established
16007 \begin_inset Flex Code
16010 \begin_layout Plain Layout
16016 package is probably your choice.
16017 If you need special features like short title references, ibidem etc., you
16019 \begin_inset Flex Code
16022 \begin_layout Plain Layout
16031 \begin_layout Standard
16032 The handling of both packages in \SpecialChar LyX
16033 is basically the same.
16035 \begin_inset Flex Noun
16038 \begin_layout Plain Layout
16039 Document\SpecialChar menuseparator
16046 \begin_inset Flex Noun
16049 \begin_layout Plain Layout
16056 \begin_inset Flex Noun
16059 \begin_layout Plain Layout
16066 \begin_inset Flex Noun
16069 \begin_layout Plain Layout
16076 With both packages, you will get some extra features in the citation dialog
16077 and you can select the style of the reference (
16078 \begin_inset Quotes eld
16082 \begin_inset Quotes erd
16086 \begin_inset Quotes eld
16090 \begin_inset Quotes erd
16094 \begin_inset Quotes eld
16098 \begin_inset Quotes erd
16102 \begin_inset Quotes eld
16106 \begin_inset Quotes erd
16110 Note that both packages need specifically designed style files.
16111 They both ship their own, but there are lots of additional style files,
16112 and there is even an interactive style file builder
16116 \begin_layout Plain Layout
16118 \begin_inset Flex URL
16121 \begin_layout Plain Layout
16123 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16146 \begin_layout Subsection
16147 Sectioned Bibliographies
16150 \begin_layout Standard
16151 Sometimes you might need to divide your bibliography into several sections.
16152 If you are for instance a historian, the possibility to separate sources
16153 and scientific works is most likely a
16154 \begin_inset Quotes eld
16158 \begin_inset Quotes erd
16162 Unfortunately, Bib\SpecialChar TeX
16163 itself does not allow you to do this.
16164 But with the help of some \SpecialChar LaTeX
16165 packages, Bib\SpecialChar TeX
16166 can be extended to fit your needs.
16169 \begin_layout Standard
16171 provides native support for one of these packages,
16179 \begin_layout Plain Layout
16181 \begin_inset Flex URL
16184 \begin_layout Plain Layout
16186 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
16196 The advantage of this package (compared to other packages like
16200 ) is that you don't need to define new citation commands.
16201 Instead, you need to prepare different bibliographic databases which include
16202 the entries for the different sections of the bibliography.
16203 For example: If you want to divide your bibliography into the sections
16205 \begin_inset Quotes eld
16209 \begin_inset Quotes erd
16213 \begin_inset Quotes eld
16217 \begin_inset Quotes erd
16220 , you first need to create two bibliographic databases, e.
16221 \begin_inset space \thinspace{}
16225 \begin_inset space \space{}
16229 \begin_inset Flex Code
16232 \begin_layout Plain Layout
16239 \begin_inset Flex Code
16242 \begin_layout Plain Layout
16252 \begin_layout Standard
16254 \begin_inset Flex Noun
16257 \begin_layout Plain Layout
16258 Document\SpecialChar menuseparator
16265 \begin_inset Flex Noun
16268 \begin_layout Plain Layout
16275 \begin_inset Flex Noun
16278 \begin_layout Plain Layout
16279 Sectioned bibliography
16285 Now you can insert multiple Bib\SpecialChar TeX
16286 bibliographies, one for each section of
16288 Returning to our example: Insert the Bib\SpecialChar TeX
16290 \begin_inset Flex Code
16293 \begin_layout Plain Layout
16299 and a second one for the database
16300 \begin_inset Flex Code
16303 \begin_layout Plain Layout
16310 You are free to use the same or different styles for each section.
16311 Additionally, you can choose if the bibliography section should contain
16313 \begin_inset Quotes eld
16316 all cited references
16317 \begin_inset Quotes erd
16320 of the specified database(s) (which is the default),
16321 \begin_inset Quotes eld
16324 all uncited references
16325 \begin_inset Quotes erd
16329 \begin_inset Quotes eld
16333 \begin_inset Quotes erd
16337 This might be useful if you would like to separate your bibliography into
16339 \begin_inset Quotes eld
16343 \begin_inset Quotes erd
16347 \begin_inset Quotes eld
16351 \begin_inset Quotes erd
16355 \begin_inset Quotes eld
16359 \begin_inset Quotes erd
16363 The titles for the sections can be added as ordinary sections or subsections.
16365 \begin_inset Flex Code
16368 \begin_layout Plain Layout
16374 removes the bibliography title, you have to manually re-add that, too (as
16375 a chapter* or section*, for instance).
16378 \begin_layout Subsection
16379 Multiple Bibliographies
16382 \begin_layout Standard
16383 Multiple bibliographies, e.
16384 \begin_inset space \thinspace{}
16388 \begin_inset space \space{}
16391 a bibliography for each section or chapter of the document, are not supported
16392 by Bib\SpecialChar TeX
16395 \begin_inset Flex Code
16398 \begin_layout Plain Layout
16404 package, which is used for the creation of sectioned bibliographies in
16406 (see the previous section), provides an easy way to solve this task, if
16407 you are willing to use some
16408 \begin_inset Flex Noun
16411 \begin_layout Plain Layout
16419 \begin_inset space ~
16423 \begin_inset CommandInset ref
16425 reference "sec:Inserting-TeX-Code"
16433 \begin_layout Plain Layout
16434 An alternative approach is to use the
16435 \begin_inset Flex Code
16438 \begin_layout Plain Layout
16445 \begin_inset Flex Code
16448 \begin_layout Plain Layout
16454 package, respectively.
16462 \begin_layout Standard
16464 \begin_inset Flex Noun
16467 \begin_layout Plain Layout
16468 Document\SpecialChar menuseparator
16475 \begin_inset Flex Noun
16478 \begin_layout Plain Layout
16485 \begin_inset Flex Noun
16488 \begin_layout Plain Layout
16489 Sectioned bibliography
16495 In the document, you have to enclose the sections, which shall contain
16496 their own bibliography (including the Bib\SpecialChar TeX
16497 bibliography itself), between
16499 \begin_inset Flex Code
16502 \begin_layout Plain Layout
16511 \begin_inset Flex Code
16514 \begin_layout Plain Layout
16522 (those commands have to be inserted as \SpecialChar TeX
16524 The bibliography will contain all references that have been cited in the
16526 \begin_inset Flex Code
16529 \begin_layout Plain Layout
16540 If you are using this approach, then every citation reference has to be
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16553 \begin_inset Flex Code
16556 \begin_layout Plain Layout
16562 s cannot be nested.
16565 \begin_layout Chapter
16566 Multipart Documents
16569 \begin_layout Section
16573 \begin_layout Standard
16574 When you are working on a large file with many sections, it is often convenient
16575 to break up the document into several files, or perhaps you have something
16576 where a table may change from time to time, but the preceding text does
16578 In these cases, you should seriously consider using multipart documents.
16579 For example, scientific papers often have five major sections: the introduction
16580 , observations, results, discussion, and conclusion.
16581 Each of these could be its own separate \SpecialChar LyX
16583 \begin_inset Quotes eld
16587 \begin_inset Quotes erd
16590 file which contains the title, authors, abstract, references, etc., plus
16591 the five included files.
16592 It is important to note that each of these files is a full \SpecialChar LyX
16594 can be formatted and printed on its own, as well as included in a master
16596 Each of these files must have the same document class, however—don't attempt
16597 to mix book classes with article classes.
16598 You may also include \SpecialChar LaTeX
16599 files; however, these files must not have their own
16601 \begin_inset space \thinspace{}
16605 \begin_inset space \space{}
16608 everything up to and including the
16609 \begin_inset Flex Code
16612 \begin_layout Plain Layout
16620 line as well as the
16621 \begin_inset Flex Code
16624 \begin_layout Plain Layout
16632 line must be deleted) or else errors will be generated when you try to
16636 \begin_layout Standard
16638 allows you to include files quite easily with
16639 \begin_inset Flex Noun
16642 \begin_layout Plain Layout
16643 Insert\SpecialChar menuseparator
16645 \begin_inset space ~
16654 When you click on this selection a small box is inserted into the file
16655 at the current cursor location.
16656 Clicking on the box raises a dialog which allows you to select the file
16657 to be included, and the method of its inclusion.
16661 \begin_layout Standard
16662 The file selection box should by now be obvious.
16663 The three inclusion methods are
16664 \begin_inset Quotes eld
16668 \begin_inset Quotes erd
16672 \begin_inset Quotes eld
16676 \begin_inset Quotes erd
16680 \begin_inset Quotes eld
16684 \begin_inset Quotes erd
16688 The difference between
16689 \begin_inset Quotes eld
16693 \begin_inset Quotes erd
16697 \begin_inset Quotes eld
16701 \begin_inset Quotes erd
16704 is really only meaningful to \SpecialChar LaTeX
16705 perts, but the practical difference is that
16707 \begin_inset Quotes eld
16711 \begin_inset Quotes erd
16714 are typeset beginning on a new page, while files that are
16715 \begin_inset Quotes eld
16719 \begin_inset Quotes erd
16722 are typeset starting on the current page.
16725 \begin_layout Standard
16726 Generally, the master file is converted into a full \SpecialChar LaTeX
16727 file before typesetting,
16728 while the included files are converted to \SpecialChar LaTeX
16729 files that do not have all the
16730 preamble information.
16733 \begin_layout Standard
16735 \begin_inset Quotes eld
16739 \begin_inset Quotes erd
16742 included file allows you to include a file typeset exactly as it appears
16744 \begin_inset space \thinspace{}
16748 \begin_inset space \space{}
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16761 mode, with the characters set in a fixed-width typewriter font.
16762 Normally, spaces in this file are invisible, though two consecutive spaces
16763 are conserved, unlike \SpecialChar LyX
16764 's normal treatment of spaces.
16765 However, setting the
16766 \begin_inset Flex Noun
16769 \begin_layout Plain Layout
16771 \begin_inset space ~
16775 \begin_inset space ~
16779 \begin_inset space ~
16787 checkbox typesets a mark to unambiguously define the presence of a space.
16791 \begin_layout Section
16792 Cross-References Between Files
16795 \begin_layout Standard
16796 \begin_inset Box Shadowbox
16806 height_special "totalheight"
16811 backgroundcolor "none"
16814 \begin_layout Plain Layout
16815 This section is somewhat out of date.
16816 Need to describe default master documents and how children are opened when
16826 \begin_layout Standard
16827 It is possible to set up cross-references between the different files.
16828 First, open all the files in question: let's call them A and B in a two
16829 file example, where B is included in A.
16830 Let's say you insert a label in A, then want to reference it in B.
16831 Open the cross-reference dialog whilst in document B, and you can select
16833 \begin_inset Quotes eld
16837 \begin_inset Quotes erd
16843 \begin_layout Section
16844 Bibliography Lists in all Subdocuments
16847 \begin_layout Standard
16848 \begin_inset Box Frameless
16858 height_special "totalheight"
16863 backgroundcolor "none"
16866 \begin_layout Plain Layout
16867 This section also needs updating.
16868 There is now material about this on the wiki, and it could be copied here.
16876 \begin_layout Standard
16877 Copy the bibliography list with all entries to all subdocuments and transform
16879 This way \SpecialChar LyX
16881 \begin_inset Flex Code
16884 \begin_layout Plain Layout
16890 -files and you can easily insert references without making the bibliography
16894 \begin_layout Standard
16895 As the bibliography list is in a comment, \SpecialChar LaTeX
16896 won't use it and the references
16897 will look like this: [?], instead of like this: [1].
16898 One solution is to use the \SpecialChar LaTeX
16900 \begin_inset Flex Code
16903 \begin_layout Plain Layout
16909 that will only include comments by processing the files separately.
16910 To do this, add in the \SpecialChar LaTeX
16911 preamble of every subdocument the following:
16914 \begin_layout LyX-Code
16917 usepackage{comment}
16920 \begin_layout LyX-Code
16923 includecomment{comment}
16926 \begin_layout Standard
16928 \begin_inset Flex URL
16931 \begin_layout Plain Layout
16933 http://wiki.lyx.org/FAQ/Unsorted#toc31
16941 \begin_layout Section
16942 Itemize Bullet Selection
16943 \begin_inset CommandInset label
16952 \begin_layout Standard
16958 \begin_layout Subsection
16962 \begin_layout Standard
16964 provides 216 bullet shapes that can be accessed from a simple dialog.
16965 Using this dialog you can easily specify what bullet shape to use at each
16966 level of an itemized list.
16967 These settings are document-wide so you won't be able to specify different
16968 sets of bullets for different paragraphs.
16972 \begin_layout Plain Layout
16973 Well, actually you can but you'll have to do it by hand.
16981 \begin_layout Subsection
16985 \begin_layout Standard
16986 Open the dialog by selecting the
16987 \begin_inset Flex Noun
16990 \begin_layout Plain Layout
16991 Document\SpecialChar menuseparator
16997 menu item and then select the
16998 \begin_inset Flex Noun
17001 \begin_layout Plain Layout
17010 \begin_layout Standard
17011 The dialog provides you with a table of bullet shapes.
17012 A column of buttons on the left of the table provides access to the six
17013 different panels of bullet shapes.
17014 The row of buttons across the top is used to select which bullet depth
17016 A text entry under the table shows the currently selected bullet shape's
17018 equivalent and this can be edited if desired.
17019 If you do modify the text you will also need to specify any needed packages
17020 in the \SpecialChar LaTeX
17024 \begin_layout Standard
17025 The six panels are divided up by the packages they require.
17026 The following table shows the mappings from button name to \SpecialChar LaTeX
17028 \begin_inset Separator latexpar
17034 \begin_layout Standard
17036 \begin_inset Tabular
17037 <lyxtabular version="3" rows="7" columns="2">
17038 <features tabularvalignment="middle">
17039 <column alignment="center" valignment="top" width="0pt">
17040 <column alignment="center" valignment="top" width="0pt">
17042 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17045 \begin_layout Plain Layout
17060 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17063 \begin_layout Plain Layout
17080 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17083 \begin_layout Plain Layout
17098 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17101 \begin_layout Plain Layout
17110 base \SpecialChar LaTeX
17118 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17121 \begin_layout Plain Layout
17136 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17139 \begin_layout Plain Layout
17156 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17159 \begin_layout Plain Layout
17174 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17177 \begin_layout Plain Layout
17194 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17197 \begin_layout Plain Layout
17212 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17215 \begin_layout Plain Layout
17232 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17235 \begin_layout Plain Layout
17250 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17253 \begin_layout Plain Layout
17270 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17273 \begin_layout Plain Layout
17288 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17291 \begin_layout Plain Layout
17314 \begin_layout Standard
17316 doesn't stop you using bullets from packages you don't have.
17317 If you get errors from \SpecialChar LaTeX
17318 when you try to view or print the file, then it
17319 is likely you are missing a package.
17323 \begin_layout Plain Layout
17325 doesn't restrict your use since you may be editing locally and exporting
17334 \begin_layout Subsection
17338 \begin_layout Standard
17339 Select which bullet depth you want to change then select the bullet shape
17341 Any changes will not be visible in \SpecialChar LyX
17342 , but are visible when viewing the document.
17345 \begin_layout Standard
17346 You can reset a bullet shape to the default simply by clicking your right
17347 mouse button on the appropriate bullet depth button.
17351 \begin_layout Plain Layout
17356 want to have multiple sets of paragraphs with different sets of bullets
17357 in each, then you're going to have to get your hands dirty with \SpecialChar TeX
17359 The bullet selection dialog can help though because it provides you with
17360 the \SpecialChar LaTeX
17361 code for a wide range of bullet shapes.
17362 To make your own custom paragraphs you have the following options:
17365 \begin_layout Plain Layout
17369 \begin_layout Plain Layout
17385 \begin_layout Plain Layout
17389 \begin_layout Plain Layout
17411 \begin_layout Itemize
17412 Use the \SpecialChar LaTeX
17414 \begin_inset Flex Code
17417 \begin_layout Plain Layout
17425 to specify a new bullet shape for a given depth.
17426 You'll also need to save the current bullet shape so you can restore it
17428 In this itemized list the following \SpecialChar LaTeX
17429 code was used to change the bullet
17430 used for the first depth.
17431 \begin_inset Separator latexpar
17438 \begin_layout LyX-Code
17448 \begin_layout LyX-Code
17465 \begin_layout Itemize
17466 Note that the itemize depth is specified in Roman numerals as part of the
17476 \begin_layout Itemize
17480 \begin_layout Plain Layout
17493 Specify each individual entry by starting each item with the bullet shape
17494 enclosed in square brackets and set as
17495 \begin_inset Flex Noun
17498 \begin_layout Plain Layout
17506 For example, this item was started with
17507 \begin_inset Flex Code
17510 \begin_layout Plain Layout
17525 \begin_layout Plain Layout
17529 \begin_layout Plain Layout
17545 \begin_layout Plain Layout
17546 You'll also need to revert the labelitem back to its previous setting for
17547 the global bullet shape settings to remain in effect.
17548 The way used here was:
17551 \begin_layout LyX-Code
17566 \begin_layout Chapter
17568 Features needing Extra Software
17571 \begin_layout Section
17572 Checking \SpecialChar TeX
17576 \begin_layout Standard
17582 \begin_layout Subsection
17586 \begin_layout Standard
17595 \begin_layout Plain Layout
17600 is not yet available when you are using the \SpecialChar LaTeX
17601 distribution MiK\SpecialChar TeX
17607 , you'll find in the
17614 \begin_inset space ~
17625 \begin_inset Newline newline
17629 \begin_inset CommandInset href
17631 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17638 \begin_layout Standard
17641 Chk\SpecialChar TeX
17644 package is a program that was written by
17645 \begin_inset Flex Noun
17648 \begin_layout Plain Layout
17650 \begin_inset space ~
17658 in frustration because some constructs in \SpecialChar LaTeX
17659 are sometimes non-intuitive,
17660 and easy to forget.
17661 The program runs over your \SpecialChar LaTeX
17662 file, checks the integrity of the file, and
17663 flags some common errors.
17664 In other technical words, it is
17668 for \SpecialChar LaTeX
17672 \begin_layout Standard
17673 Well, what is a syntax checker doing in \SpecialChar LyX
17674 which is supposed to produce correct
17676 anyways? The answer is simple: Just as
17680 not only checks the
17684 of C programs, but also does
17688 checks for type-errors,
17690 Chk\SpecialChar TeX
17693 catches some common
17697 errors, in addition to the syntactical ones.
17700 Chk\SpecialChar TeX
17703 is capable of detecting several common errors, such as
17706 \begin_layout Itemize
17707 Ellipsis detection:
17708 \begin_inset Newline newline
17711 Use \SpecialChar ldots
17715 \begin_layout Itemize
17716 No space in front of/after parenthesis:
17717 \begin_inset Newline newline
17723 \begin_layout Itemize
17724 Enforcement of normal space after common abbreviations:
17725 \begin_inset Newline newline
17729 \begin_inset space \thinspace{}
17733 \begin_inset space \space{}
17736 is too wide spacing.
17739 \begin_layout Itemize
17740 Enforcement of end-of-sentence space when the last sentence ends with a
17742 \begin_inset Newline newline
17746 And this is wrong spacing.
17749 \begin_layout Itemize
17750 Space in front of labels and similar commands:
17751 \begin_inset Newline newline
17754 The label should stick right up to the text to avoid falling to a wrong
17757 \begin_inset CommandInset label
17767 \begin_layout Plain Layout
17768 This footnote is in danger of falling off to a wrong page
17773 The label is separated too much.
17776 \begin_layout Itemize
17777 Space in front of references, instead of hard spaces:
17778 \begin_inset Newline newline
17781 If you have bad luck, the text will break right between the referenced text
17782 and reference number, and that's a pity.
17784 \begin_inset CommandInset ref
17786 reference "sec:chktex"
17793 \begin_layout Itemize
17795 \begin_inset Quotes eld
17799 \begin_inset Quotes erd
17803 \begin_inset Formula $\times$
17807 \begin_inset Newline newline
17810 2x2 looks cheap compared to
17811 \begin_inset Formula $2\times2$
17817 \begin_layout Standard
17818 and more \SpecialChar ldots
17819 It is an invaluable tool when you are
17820 \begin_inset Quotes eld
17824 \begin_inset Quotes erd
17827 your document before printing, and you should run it right after the obligatory
17828 spelling check, and before you go fine tuning the typesetting.
17831 \begin_layout Subsection
17835 \begin_layout Standard
17836 If you have the program installed, usage is as simple as choosing
17838 Tools\SpecialChar menuseparator
17840 \begin_inset space ~
17846 This will make \SpecialChar LyX
17847 generate a \SpecialChar LaTeX
17848 file of your document, start
17850 Chk\SpecialChar TeX
17853 to check it, and then make \SpecialChar LyX
17855 \begin_inset Quotes eld
17859 \begin_inset Quotes erd
17862 with the warnings from
17864 Chk\SpecialChar TeX
17867 , if there were any.
17868 The warnings will be placed close to the point of the mistake, and you
17869 can quickly find them by using the
17871 Navigate\SpecialChar menuseparator
17874 menu item, or the shortcut key
17883 Open the error boxes by clicking on them with the mouse, or use the shortcut
17892 bindings, or the corresponding
17901 Read the warning and correct the mistake, if it is a mistake.
17902 If you have trouble understanding what the warning is about, you can safely
17904 Remember that there is a hidden layer between the document on screen and
17905 the technical details in invoking
17907 Chk\SpecialChar TeX
17910 , and this gap can make some warnings seem arcane or just plain silly.
17913 \begin_layout Standard
17914 This document is an excellent testing bed for the feature, and it should
17915 provide quite a few warnings for you to fiddle with.
17916 Since computers are only so smart, expect most of the warnings to be false
17920 \begin_layout Subsection
17921 How to fine tune it
17924 \begin_layout Standard
17925 Sometimes, you'll find that
17927 Chk\SpecialChar TeX
17930 makes more noise than suits your mood.
17931 Then you can choose not to use it, wait until your mood changes, or try
17934 Chk\SpecialChar TeX
17937 to get better along with you.
17940 \begin_layout Standard
17943 Chk\SpecialChar TeX
17950 very configurable and extensible, you should not expect to solve all problems
17953 Chk\SpecialChar TeX
17956 in \SpecialChar LyX
17958 Since \SpecialChar LyX
17959 has to generate a somewhat special \SpecialChar LaTeX
17960 file to be able to match the
17961 line numbers from the
17963 Chk\SpecialChar TeX
17970 \begin_layout Plain Layout
17971 You can inspect the specific output from
17977 Document\SpecialChar menuseparator
17980 \begin_inset space ~
17994 to the internal document structure, some of the warnings will not appear
17996 There are two things you can do about this:
17999 \begin_layout Itemize
18002 Chk\SpecialChar TeX
18005 invocation command line in
18006 \begin_inset Flex Noun
18009 \begin_layout Plain Layout
18010 Tools\SpecialChar menuseparator
18011 Preferences\SpecialChar menuseparator
18012 Output\SpecialChar menuseparator
18013 LaTeX\SpecialChar menuseparator
18021 Chk\SpecialChar TeX
18024 installation configuration file (usually with the file
18029 See below to learn what warnings can be enabled and disabled on the command
18033 \begin_layout Itemize
18034 Export your document as a raw \SpecialChar LaTeX
18037 File\SpecialChar menuseparator
18038 Export\SpecialChar menuseparator
18047 Invoked in this way, it can be a hassle to find the corresponding place
18048 in the document inside \SpecialChar LyX
18049 , but with a little patience, you should be able
18053 \begin_layout Standard
18054 Here follows the warning messages that can be enabled and disabled in
18063 to disable a warning, and
18067 to enable a warning.
18068 The emphasized entries are disabled by default, because the default is
18071 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18076 \begin_layout Standard
18077 Notice that you should only use the options that enable and disable warnings,
18078 because \SpecialChar LyX
18079 relies on some of the other command line parameters to be set
18080 in a specific way to have a chance to communicate with
18087 \begin_layout Enumerate
18091 Command terminated with space.
18094 \begin_layout Enumerate
18097 Non-breaking space (
18098 \begin_inset Quotes eld
18106 \begin_inset Quotes erd
18109 ) should have been used.
18112 \begin_layout Enumerate
18116 You should enclose the previous parenthesis with
18117 \begin_inset Quotes eld
18125 \begin_inset Quotes erd
18131 \begin_layout Enumerate
18134 Italic correction (
18135 \begin_inset Quotes eld
18145 \begin_inset Quotes erd
18148 ) found in non-italic buffer.
18151 \begin_layout Enumerate
18154 Italic correction (
18155 \begin_inset Quotes eld
18165 \begin_inset Quotes erd
18168 ) found more than once.
18171 \begin_layout Enumerate
18175 No italic correction (
18176 \begin_inset Quotes eld
18186 \begin_inset Quotes erd
18192 \begin_layout Enumerate
18196 \begin_inset Quotes eld
18204 \begin_inset Quotes erd
18208 \begin_inset Quotes eld
18216 \begin_inset Quotes erd
18222 \begin_layout Enumerate
18225 Wrong length of dash may have been used.
18228 \begin_layout Enumerate
18232 \begin_inset Quotes eld
18240 \begin_inset Quotes erd
18244 \begin_inset Quotes eld
18252 \begin_inset Quotes erd
18258 \begin_layout Enumerate
18262 \begin_inset Quotes eld
18270 \begin_inset Quotes erd
18276 \begin_layout Enumerate
18280 \begin_inset Quotes eld
18288 \begin_inset Quotes erd
18291 to achieve an ellipsis.
18294 \begin_layout Enumerate
18297 Inter-word spacing (
18298 \begin_inset Quotes eld
18308 \begin_inset Quotes eld
18311 ) should perhaps be used.
18314 \begin_layout Enumerate
18317 Inter-sentence spacing (
18318 \begin_inset Quotes eld
18328 \begin_inset Quotes erd
18331 ) should perhaps be used.
18334 \begin_layout Enumerate
18337 Could not find argument for command.
18340 \begin_layout Enumerate
18344 \begin_inset Quotes eld
18352 \begin_inset Quotes erd
18358 \begin_layout Enumerate
18361 Math mode still on at end of \SpecialChar LaTeX
18365 \begin_layout Enumerate
18369 \begin_inset Quotes eld
18377 \begin_inset Quotes erd
18380 doesn't match the number of
18381 \begin_inset Quotes eld
18389 \begin_inset Quotes erd
18395 \begin_layout Enumerate
18398 You should use either
18401 \begin_inset Quotes eld
18409 \begin_inset Quotes erd
18414 as an alternative to
18415 \begin_inset Quotes eld
18423 \begin_inset Quotes erd
18429 \begin_layout Enumerate
18436 " (ASCII 39) instead of "
18443 \begin_layout Enumerate
18446 User-specified pattern found.
18449 \begin_layout Enumerate
18452 This command might not be intended.
18455 \begin_layout Enumerate
18462 \begin_layout Enumerate
18480 \begin_layout Enumerate
18483 Delete this space to maintain correct page references.
18486 \begin_layout Enumerate
18490 You might wish to put this between a pair of
18491 \begin_inset Quotes eld
18499 \begin_inset Quotes erd
18505 \begin_layout Enumerate
18508 You ought to remove spaces in front of punctuation.
18511 \begin_layout Enumerate
18514 Could not execute \SpecialChar LaTeX
18518 \begin_layout Enumerate
18527 in front of small punctuation.
18530 \begin_layout Enumerate
18538 may look prettier here.
18541 \begin_layout Enumerate
18545 Multiple spaces detected in output.
18548 \begin_layout Enumerate
18551 This text may be ignored.
18554 \begin_layout Enumerate
18560 \begin_inset Quotes eld
18565 to begin quotation, not
18572 \begin_layout Enumerate
18579 to end quotation, not
18582 \begin_inset Quotes eld
18590 \begin_layout Enumerate
18596 \begin_layout Enumerate
18599 You should perhaps use
18600 \begin_inset Quotes eld
18608 \begin_inset Quotes erd
18614 \begin_layout Enumerate
18617 You should put a space in front of/after parenthesis.
18620 \begin_layout Enumerate
18623 You should avoid spaces in front of/after parenthesis.
18626 \begin_layout Enumerate
18630 You should not use punctuation in front of/after quotes.
18633 \begin_layout Enumerate
18636 Double space found.
18639 \begin_layout Enumerate
18642 You should put punctuation outside inner/inside display math mode.
18645 \begin_layout Enumerate
18648 You ought to not use primitive \SpecialChar TeX
18649 in \SpecialChar LaTeX
18653 \begin_layout Enumerate
18656 You should remove spaces in front of
18657 \begin_inset Quotes eld
18665 \begin_inset Quotes erd
18671 \begin_layout Enumerate
18674 \begin_inset Quotes eld
18682 \begin_inset Quotes erd
18685 is normally not followed by
18686 \begin_inset Quotes eld
18694 \begin_inset Quotes erd
18700 \begin_layout Standard
18701 In later versions of \SpecialChar LyX
18702 , we hope to provide a more complete interface to this
18703 tool (and it's smaller cousin
18707 ) to exploit the full power of it.
18708 But it's not exactly useless as it is now: go try it on one of your existing
18709 documents of a certain length and be surprised.
18712 \begin_layout Section
18713 Version Control in \SpecialChar LyX
18717 \begin_layout Standard
18720 Lars Gullik Bjønnes
18727 \begin_layout Subsection
18731 \begin_layout Standard
18733 supports some of the most basic RCS/CVS/SVN/GIT commands.
18734 If you need something a bit more sophisticated you will have to do that
18735 manually in a terminal.
18738 \begin_layout Standard
18739 Also note that CVS support is not as good as subversion support so we advise
18741 A good place to start learning Subversion is SVN Book
18745 \begin_layout Plain Layout
18746 \begin_inset CommandInset href
18748 target "http://svnbook.red-bean.com/"
18758 In the case of RCS you should read
18759 \begin_inset Quotes eld
18763 \begin_inset Quotes erd
18766 (a man file, read it with
18771 This file describes all the basic features of RCS.
18772 You should especially notice the comment about a RCS directory, and the
18773 notion of a master RCS file (the file ending in
18780 \begin_layout Standard
18781 Before you begin to use the version control features in \SpecialChar LyX
18783 familiar with RCS/CVS/SVN/GIT usage.
18784 The implementation in \SpecialChar LyX
18785 assumes a recent version of the GNU RCS or CVS/SVN
18786 package — no guarantees are made for older versions.
18787 Most of the log messages are not currently displayed after operations —
18788 you can check them in the Messages pane if unsure.
18789 Regular users of version control will appreciate VC toolbar, which can
18792 View\SpecialChar menuseparator
18793 Toolbars\SpecialChar menuseparator
18795 \begin_inset space ~
18803 \begin_layout Standard
18804 For introducing your own external commands consult vc-command in the manual
18805 of \SpecialChar LyX
18809 \begin_layout Standard
18810 It is strongly recommended to store documents in uncompressed format if
18811 using version control (uncheck
18813 Document\SpecialChar menuseparator
18816 if it is checked): Uncompressed LyX documents are text files and therefore
18817 for merging two different versions by version control systems.
18818 Compressed LyX documents are binary files, which cannot be merged by version
18822 \begin_layout Subsection
18823 RCS commands in \SpecialChar LyX
18827 \begin_layout Standard
18828 The following sections describe the RCS commands supported by \SpecialChar LyX
18830 You can find them in the
18832 File\SpecialChar menuseparator
18834 \begin_inset space ~
18841 was tested against RCS 5.7/5.8.
18844 \begin_layout Subsubsection
18850 \begin_layout Standard
18851 If your document is not under revision control, this is the only item shown
18853 And if it is under revision control, the
18857 item is not visible.
18861 \begin_layout Standard
18862 This command registers your document with RCS (unless you are under the
18863 directory managed by CVS)\SpecialChar endofsentence
18864 You are asked interactively to supply an initial
18865 description of the document.
18866 The document is now set in Read-Only mode and you have to
18869 \begin_inset space ~
18873 \begin_inset space ~
18877 \begin_inset space ~
18882 , before making any changes to it.
18883 A document under revision control has a
18884 \begin_inset Quotes eld
18887 [RCS:<version> <locker>]
18888 \begin_inset Quotes erd
18891 item tagged to the filename in the minibuffer.
18894 \begin_layout Standard
18895 RCS command that is run:
18897 ci -q -u -i -t-"<initial description>" <file-name>
18900 \begin_layout Standard
18905 to understand the switches.
18909 \begin_layout Subsubsection
18915 \begin_layout Standard
18916 When you are finished editing a file, you check in your changes.
18917 When you do this, you are asked for a description of the changes.
18918 This is stored in the history log.
18919 The version number is bumped, your changes are applied to the master RCS
18920 file, the document is unlocked and set to Read-Only mode.
18923 \begin_layout Standard
18926 ci -q -u -m"<description>" <file-name>
18929 \begin_layout Subsubsection
18935 \begin_layout Standard
18936 By doing this you lock the document so that only you can edit it.
18937 This will also make the document Read-Write only for you.
18938 You will usually continue editing for a while and when you are finished
18939 you check in your changes.
18940 The status line is changed to reflect that you have locked the file.
18943 \begin_layout Standard
18946 co -q -l <file-name>
18949 \begin_layout Subsubsection
18952 Revert To Repository Version
18955 \begin_layout Standard
18956 This will discard all changes made to the document since the last check
18958 You get a warning before changes are discarded.
18961 \begin_layout Standard
18964 co -f -u<version> <file-name>
18967 \begin_layout Subsubsection
18973 \begin_layout Standard
18974 This will create a copy of the current document.
18975 Since RCS does not support copy operations natively, the version history
18976 is not preserved, and the copy is added as a new file.
18977 It requires a clean document without any changes since the last checkin.
18978 You are asked for a file name and a description of the copy operation.
18979 After that the copy is created, both locally and in the repository.
18980 If the parent directories of the copied and original document differ, all
18981 relative paths of included files of the copy are adjusted (like in
18983 File\SpecialChar menuseparator
18988 Finally, the copy is loaded instead of the original document.
18991 \begin_layout Labeling
18992 \labelwidthstring 00.00.0000
18994 \begin_inset space ~
18998 \begin_inset space ~
19002 \begin_inset Newline newline
19006 \begin_inset Flex Code
19009 \begin_layout Plain Layout
19012 \begin_inset Quotes eld
19016 \begin_inset Quotes erd
19025 \begin_inset Flex Code
19028 \begin_layout Plain Layout
19031 \begin_inset Quotes eld
19035 \begin_inset Quotes erd
19044 \begin_inset Newline newline
19048 \begin_inset Flex Code
19051 \begin_layout Plain Layout
19055 \begin_inset Quotes eld
19059 \begin_inset Quotes erd
19070 \begin_layout Subsubsection
19076 \begin_layout Standard
19077 This makes as if the last check in never happened.
19078 No changes are made to the document loaded into \SpecialChar LyX
19079 , but the last version
19080 is removed from the master RCS file.
19083 \begin_layout Standard
19086 rcs -o<version> <file-name>
19089 \begin_layout Subsubsection
19095 \begin_layout Standard
19096 This shows the complete history of the RCS document.
19101 is shown in a browser.
19109 \begin_layout Subsubsection
19113 \begin_layout Standard
19115 supports RCS version number, author name, date and time of last commit.
19116 All those are extracted from
19118 rlog -r <file-name>
19122 \begin_inset CommandInset ref
19124 reference "subsec:VCS-Revision-Information"
19131 \begin_layout Subsection
19132 CVS commands in \SpecialChar LyX
19136 \begin_layout Standard
19137 A subset of CVS operations is supported by \SpecialChar LyX
19139 You can find the commands in the
19141 File\SpecialChar menuseparator
19143 \begin_inset space ~
19149 The version control system SVN is more powerful, so please use it instead
19150 of CVS if possible.
19153 \begin_layout Subsubsection
19159 \begin_layout Standard
19160 If you start from scratch with CVS you have to create your repository and
19161 checkout the working copy with external tools.
19162 If you're using a client-server setup you may need to login before doing
19163 the first repository checkout.
19166 \begin_layout Standard
19167 If your documents are under revision control and others are using the same
19168 repository problems arise when different changes to the same document at
19169 the same location happen.
19170 Standard CVS repositories don't operate with a file locking mechanism.
19171 This may be surprising, but conflicts only occur if people disagree on
19172 the proper content of the same part of a document.
19173 So, if co-workers are used to communicate regularly, these conflicts occur
19175 If they don't communicate they have a fundamental problem anyway.
19176 Nevertheless some people like to work with so called
19177 \begin_inset Quotes eld
19181 \begin_inset Quotes erd
19185 If they do so the working copy of all files is readonly when checked out
19186 first and the user starts editing after using a special command to make
19187 the working copy writable.
19188 When the changes are checked in the working copy returns to readonly state.
19189 With \SpecialChar LyX
19190 one has to edit the
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19200 file and add the line
19201 \begin_inset Flex Code
19204 \begin_layout Plain Layout
19210 to work with reserved checkouts.
19211 The benefit is the possibility to see who is using a writable copy of some
19213 It's not guaranteed only one user makes a copy writable.
19216 \begin_layout Standard
19218 tries to guess if you're using reserved or non-reserved checkouts.
19219 If your working copy is readonly or it is writable and an additional copy
19220 of your document exists in the CVS/Base sub-directory a reserved otherwise
19221 a non-reserved checkout is assumed.
19222 When a reserved checkout is detected you have to use
19223 \begin_inset Flex Noun
19226 \begin_layout Plain Layout
19232 to make your working copy writable if it's readonly.
19234 \begin_inset Flex Noun
19237 \begin_layout Plain Layout
19243 operation is possible and that makes your working copy readonly again after
19244 transferring your changes to the repository.
19247 \begin_layout Standard
19248 More information about CVS can be found here
19249 \begin_inset Flex URL
19252 \begin_layout Plain Layout
19254 http://www.nongnu.org/cvs
19260 \begin_inset Flex URL
19263 \begin_layout Plain Layout
19265 http://ximbiot.com/cvs
19273 \begin_layout Standard
19278 to understand the sub-commands and the switches mentioned below.
19281 \begin_layout Subsubsection
19287 \begin_layout Standard
19288 If your document is not under revision control, this is the only item shown
19290 And if it is under revision control, the
19294 item is not visible.
19298 \begin_layout Standard
19299 This command registers in CVS your document
19300 \begin_inset Flex Strong
19303 \begin_layout Plain Layout
19311 in the case you have already the documents directory under CVS control
19317 This means you have to create or checkout the archive by yourself using
19319 (In case you forget that step \SpecialChar LyX
19320 registers the document with RCS.)
19323 \begin_layout Standard
19324 Then you are asked interactively to supply an initial description of the
19326 Don't forget that registered file is not yet checked in.
19329 \begin_layout Standard
19330 CVS command that is run:
19332 cvs -q add -m"<entered message>" "<file-name>"
19335 \begin_layout Standard
19340 above and for all other CVS commands is an abbreviation for
19341 \begin_inset Quotes eld
19344 change the current working directory to file location and use the file name
19345 without path component as argument
19346 \begin_inset Quotes erd
19352 \begin_layout Subsubsection
19358 \begin_layout Standard
19359 When you are finished editing a file, you commit your changes.
19360 When you do this and you had changed the document, you are asked for a
19361 description of the changes.
19362 After that changes are written to the repository.
19363 In case you didn't change the document and a reserved checkout is detected
19364 the reservation made on
19365 \begin_inset Flex Noun
19368 \begin_layout Plain Layout
19377 \begin_layout Labeling
19378 \labelwidthstring 00.00.0000
19380 \begin_inset space ~
19384 \begin_inset space ~
19388 \begin_inset Newline newline
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19398 -q commit -m"<description>" "<file-name>"
19404 \begin_inset Newline newline
19408 \begin_inset Flex Code
19411 \begin_layout Plain Layout
19422 \begin_layout Subsubsection
19428 \begin_layout Standard
19429 When you are sharing a repository with others, you may have to incorporate
19430 their changes into your working copy.
19433 \begin_layout Standard
19436 cvs -q update "<file-name>"
19439 \begin_layout Standard
19440 If a readonly checkout is detected the working copy is made writable and
19444 \begin_layout Standard
19447 cvs -q edit "<file-name>"
19450 \begin_layout Subsubsection
19453 Revert To Repository Version
19456 \begin_layout Standard
19457 This will discard all changes made to the document since the last check
19459 You get a warning before changes are discarded.
19460 Firstly the file is deleted, secondly CVS update command is run.
19463 \begin_layout Standard
19466 cvs -q update "<file-name>"
19469 \begin_layout Standard
19470 If a reserved checkout is detected and the working copy has no changes only
19471 the reservation is undone.
19474 \begin_layout Standard
19477 cvs -q unedit "<file-name>"
19480 \begin_layout Subsubsection
19486 \begin_layout Standard
19487 This will create a copy of the current document.
19488 Since CVS does not support copy operations natively, the version history
19489 is not preserved, and the copy is added as a new file.
19490 It requires a clean document without any changes since the last checkin.
19491 You are asked for a file name and a description of the copy operation.
19492 After that the copy is created, both locally and in the repository.
19493 If the parent directories of the copied and original document differ, all
19494 relative paths of included files of the copy are adjusted (like in
19496 File\SpecialChar menuseparator
19501 Finally, the copy is loaded instead of the original document.
19504 \begin_layout Labeling
19505 \labelwidthstring 00.00.0000
19507 \begin_inset space ~
19511 \begin_inset space ~
19515 \begin_inset Newline newline
19519 \begin_inset Flex Code
19522 \begin_layout Plain Layout
19525 \begin_inset Quotes eld
19529 \begin_inset Quotes erd
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19544 \begin_inset Quotes eld
19548 \begin_inset Quotes erd
19557 \begin_inset Newline newline
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19568 \begin_inset Quotes eld
19572 \begin_inset Quotes erd
19583 \begin_layout Subsubsection
19589 \begin_layout Standard
19590 This will rename the current document.
19591 Since CVS does not support rename operations natively, the version history
19592 is not preserved, the renamed document is added as a new file, and the
19593 original document is deleted.
19594 It requires a clean document without any changes since the last checkin.
19595 You are asked for a file name and a description of the rename operation.
19596 After that the document is renamed, both locally and in the repository.
19597 If the parent directories of the new and old file names differ, all relative
19598 paths of included files are adjusted (like in
19600 File\SpecialChar menuseparator
19605 Finally, the document is reloaded using the new name.
19608 \begin_layout Labeling
19609 \labelwidthstring 00.00.0000
19611 \begin_inset space ~
19615 \begin_inset space ~
19619 \begin_inset Newline newline
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19629 \begin_inset Quotes eld
19633 \begin_inset Quotes erd
19642 \begin_inset Flex Code
19645 \begin_layout Plain Layout
19648 \begin_inset Quotes eld
19652 \begin_inset Quotes erd
19661 \begin_inset Newline newline
19665 \begin_inset Flex Code
19668 \begin_layout Plain Layout
19672 \begin_inset Quotes eld
19676 \begin_inset Quotes erd
19685 \begin_inset Newline newline
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19696 \begin_inset Quotes eld
19700 \begin_inset Quotes erd
19711 \begin_layout Subsubsection
19712 Update of the local directory checkout from repository
19715 \begin_layout Standard
19716 Once your documents gets more complex, containing sub-documents and pictures,
19718 \begin_inset Flex Code
19721 \begin_layout Plain Layout
19727 files and so on using version control becomes more complicated.
19729 supports updating the whole tree in which resides the document.
19730 This become especially useful once you cooperate with people which neither
19731 have detailed knowledge about CVS usage nor they have ambition to commit
19732 additional material to the repository.
19733 You have to organize the files structure so that all external files are
19734 in the same directory or subdirectories of the document.
19735 It's good practice anyway to store multipart documents in an extra directory.
19738 \begin_layout Standard
19740 \begin_inset Flex Code
19743 \begin_layout Plain Layout
19744 Update local directory from repository
19749 command updates the whole directory.
19750 If local changes are detected user is warned before update starts.
19751 In case of merge conflicts both versions of the conflicting document parts
19752 are placed in the final document.
19753 You have to review and correct the result of the merge.
19754 You'll find the conflicts enclosed in pairs of
19755 \begin_inset Flex Code
19758 \begin_layout Plain Layout
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19785 The first part is your version as before the update operation with the
19786 document name prepended.
19787 The second one is the repository version with the version number after
19789 \begin_inset Flex Code
19792 \begin_layout Plain Layout
19801 \begin_layout Labeling
19802 \labelwidthstring 00.00.0000
19804 \begin_inset space ~
19808 \begin_inset space ~
19812 \begin_inset Newline newline
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19827 (Ask if changes are detected.)
19828 \begin_inset Newline newline
19832 \begin_inset Flex Code
19835 \begin_layout Plain Layout
19836 cd $path; cvs -q update
19846 \begin_layout Standard
19848 \begin_inset Flex Code
19851 \begin_layout Plain Layout
19857 stands for the path to the document.
19860 \begin_layout Subsubsection
19866 \begin_layout Standard
19867 This shows the complete history of the CVS document.
19870 cvs log "<file-name>"
19872 is shown in a browser.
19875 \begin_layout Subsubsection
19879 \begin_layout Standard
19881 supports CVS version number, author name, date and time of last commit.
19882 All those are extracted from
19884 cvs log -r <file-name>
19888 \begin_inset CommandInset ref
19890 reference "subsec:VCS-Revision-Information"
19897 \begin_layout Subsection
19898 SVN commands in \SpecialChar LyX
19902 \begin_layout Standard
19903 SVN is now partially supported by \SpecialChar LyX
19905 You can find the commands in the
19907 File\SpecialChar menuseparator
19909 \begin_inset space ~
19915 Please note that if you use password protected access to repository via
19916 ssh, you will be asked in terminal window.
19918 was tested against SVN 1.5, 1.6, 1.7 and 1.8
19922 \begin_layout Plain Layout
19923 Most of the commands will work with 1.4 too, see
19924 \begin_inset CommandInset ref
19926 reference "subsec:SVN-Repo-Update"
19931 There seems to be currently unresolved permissions problem under SVN 1.8
19932 with reverting changes when file is locked.
19940 \begin_layout Subsubsection
19946 \begin_layout Standard
19947 If your document is not under revision control, this is the only item shown
19949 And if it is under revision control, the
19953 item is not visible.
19956 \begin_layout Standard
19957 This command registers in SVN your document ONLY in case you have already
19958 the documents directory under SVN control (in particular
19963 This means you have to checkout the archive by yourself.
19966 \begin_layout Standard
19967 Then you are asked interactively to supply an initial description of the
19969 Don't forget that registered file is not yet commited.
19972 \begin_layout Standard
19973 SVN command that is run:
19976 \begin_inset Quotes eld
19980 \begin_inset Quotes erd
19986 \begin_layout Standard
19991 to understand the switches.
19994 \begin_layout Subsubsection
20000 \begin_layout Standard
20001 When you are finished editing a file, you commit your changes.
20002 When you do this, you are asked for a description of the changes.
20003 After that changes are commited.
20006 \begin_layout Standard
20011 \begin_layout Plain Layout
20012 In case locking is not enabled.
20014 \begin_inset CommandInset ref
20016 reference "subsec:SVN-File-Locking"
20027 svn commit -q -m"<description>" <file-name>
20030 \begin_layout Subsubsection
20036 \begin_layout Standard
20037 Updates the changes of this file from the repository.
20038 Be sure you understand SVN merging and conflicts resolving before using
20039 this function, because all conflicts has to be resolved manually by you!
20042 \begin_layout Standard
20047 \begin_layout Plain Layout
20055 svn update --non-interactive
20056 \begin_inset Quotes eld
20060 \begin_inset Quotes erd
20066 \begin_layout Subsubsection
20069 Revert To Repository Version
20072 \begin_layout Standard
20073 This will discard all changes made to the document since the last check
20075 You get a warning before changes are discarded.
20078 \begin_layout Standard
20082 \begin_inset Quotes eld
20086 \begin_inset Quotes erd
20092 \begin_layout Subsubsection
20098 \begin_layout Standard
20099 This will create a copy of the current document including the version history.
20100 It requires a clean document without any changes since the last checkin.
20101 You are asked for a file name and a description of the copy operation.
20102 After that the copy is created, both locally and in the repository.
20103 If the parent directories of the copied and original document differ, all
20104 relative paths of included files of the copy are adjusted (like in
20106 File\SpecialChar menuseparator
20111 Finally, the copy is loaded instead of the original document.
20114 \begin_layout Labeling
20115 \labelwidthstring 00.00.0000
20117 \begin_inset space ~
20121 \begin_inset space ~
20125 \begin_inset Newline newline
20129 \begin_inset Flex Code
20132 \begin_layout Plain Layout
20136 \begin_inset Quotes eld
20140 \begin_inset Quotes erd
20144 \begin_inset Quotes eld
20148 \begin_inset Quotes erd
20157 \begin_inset Newline newline
20161 \begin_inset Flex Code
20164 \begin_layout Plain Layout
20173 \begin_layout Subsubsection
20179 \begin_layout Standard
20180 This will rename the current document including the version history.
20181 It requires a clean document without any changes since the last checkin.
20182 You are asked for a file name and a description of the rename operation.
20183 After that the document is renamed, both locally and in the repository.
20184 If the parent directories of the new and old file names differ, all relative
20185 paths of included files are adjusted (like in
20187 File\SpecialChar menuseparator
20192 Finally, the document is reloaded using the new name.
20195 \begin_layout Labeling
20196 \labelwidthstring 00.00.0000
20198 \begin_inset space ~
20202 \begin_inset space ~
20206 \begin_inset Newline newline
20210 \begin_inset Flex Code
20213 \begin_layout Plain Layout
20217 \begin_inset Quotes eld
20221 \begin_inset Quotes erd
20225 \begin_inset Quotes eld
20229 \begin_inset Quotes erd
20238 \begin_inset Newline newline
20242 \begin_inset Flex Code
20245 \begin_layout Plain Layout
20254 \begin_layout Subsubsection
20255 \begin_inset CommandInset label
20257 name "subsec:SVN-Repo-Update"
20261 Update of the local directory checkout from repository
20265 \begin_layout Plain Layout
20266 Note that this command will work only with subversion
20267 \begin_inset Formula $\geqq1.5$
20278 \begin_layout Standard
20279 All the commands above have one shortcomming - they deal with the current
20281 Once your document contains pictures, includes external
20282 \begin_inset Flex Code
20285 \begin_layout Plain Layout
20291 files and so on administration becomes more complicated.
20293 now supports updating the whole tree in which resides the document
20297 \begin_layout Plain Layout
20298 One need to organize the files structure so that all external files are
20299 in the same directory or subdirectories of the document.
20306 This become especially useful once you cooperate with people which neither
20307 know about subversion management nor they have ambition to commit additional
20308 material to the repository.
20312 \begin_layout Standard
20313 \begin_inset Flex Code
20316 \begin_layout Plain Layout
20317 Update local directory from repository
20322 command updates the whole directory and in case of merge conflicts local
20323 version of the files are left, so no unintended data loss occurs.
20324 If local changes are detected user is warned before update starts.
20327 \begin_layout Labeling
20328 \labelwidthstring 00.00.0000
20330 \begin_inset space ~
20334 \begin_inset space ~
20338 \begin_inset Newline newline
20342 \begin_inset Flex Code
20345 \begin_layout Plain Layout
20351 (Ask if changes are detected.)
20352 \begin_inset Newline newline
20356 \begin_inset Flex Code
20359 \begin_layout Plain Layout
20360 svn update –accept mine-full $path
20368 \begin_layout Standard
20370 \begin_inset Flex Code
20373 \begin_layout Plain Layout
20379 stands for the path to the document.
20382 \begin_layout Subsubsection
20388 \begin_layout Standard
20389 This shows the complete history of the SVN document.
20393 \begin_inset Quotes eld
20397 \begin_inset Quotes erd
20402 is shown in a browser.
20405 \begin_layout Subsubsection
20407 \begin_inset CommandInset label
20409 name "subsec:SVN-File-Locking"
20416 \begin_layout Standard
20417 The file exchange through various revision control systems brings the problem
20418 of merge conflicts in case two different users try to edit the same (parts
20420 When such a conflict happens it needs manual resolving and one reasonable
20421 alternative is to provide some kind of locking mechanism, which guarantees
20422 that only one user is allowed to edit file at the given time.
20425 \begin_layout Standard
20426 SVN has two such mechanisms to provide mutual exclusivity for file access
20427 - locks and automatic setting of write permissions (see sec.
20429 \begin_inset CommandInset ref
20431 reference "subsec:Automatical-Locking-Property"
20436 \begin_inset Flex Code
20439 \begin_layout Plain Layout
20449 \begin_layout Plain Layout
20450 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20456 If this property is detected for a given document \SpecialChar LyX
20457 starts to use SVN locks
20458 for document editing automatically and the whole check-in/out mechanism
20459 switches to the same regimen as for RCS.
20460 This in particular means there are two different modes of file use in \SpecialChar LyX
20464 \begin_layout Itemize
20466 The loaded file is in the read-only mode.
20467 For editing on needs to check-out.
20472 consists of updating from the repository and gaining write lock.
20473 If the lock is not possible to obtain, we remain in unlocked state.
20476 \begin_layout Itemize
20478 The loaded file is in the 'normal' edit mode.
20479 No other user is allowed to edit the file.
20484 consists of commiting changes and releasing write-lock.
20485 If no changes have been made to the document, no commit will be produced
20489 \begin_layout Plain Layout
20490 Don't be puzzled by the fact that you will be asked for commit message anyway.
20495 and only the write-lock will be released.
20498 \begin_layout Standard
20502 \begin_layout Labeling
20503 \labelwidthstring 00.00.0000
20506 svn commit -q -m"<description>" "<file-name>"
20507 \begin_inset Newline newline
20510 svn unlock "<file-name>"
20513 \begin_layout Labeling
20514 \labelwidthstring 00.00.0000
20517 svn update "<file-name>"
20518 \begin_inset Newline newline
20521 svn lock "<file-name>"
20524 \begin_layout Subsubsection
20527 \begin_inset CommandInset label
20529 name "subsec:Automatical-Locking-Property"
20535 Automatic Locking Property
20538 \begin_layout Standard
20539 The above mentioned automatic setting of write permissions of the .lyx file
20542 File\SpecialChar menuseparator
20544 \begin_inset space ~
20547 Control\SpecialChar menuseparator
20548 Toggle locking property
20551 This command is active only when the file is not locked on the svn server
20553 you need to check-out before proceeding).
20556 \begin_layout Labeling
20557 \labelwidthstring 00.00.0000
20559 \begin_inset space ~
20565 \begin_layout Labeling
20566 \labelwidthstring 00.00.0000
20569 svn propset svn:needs-lock ON "<file-name>"
20572 \begin_layout Labeling
20573 \labelwidthstring 00.00.0000
20576 svn propdel svn:needs-lock "<file-name>"
20579 \begin_layout Subsubsection
20580 \begin_inset CommandInset label
20582 name "subsec:VCS-Revision-Information"
20586 Revision Information in Documents
20589 \begin_layout Standard
20590 There are more possibilities how to activate revision information in our
20594 \begin_layout Itemize
20600 \begin_layout Itemize
20601 tree revision information (
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20612 The result is the output of the
20613 \begin_inset Flex Code
20616 \begin_layout Plain Layout
20622 command, the following table gives you an idea, how to read the results.
20625 \begin_layout Standard
20627 \begin_inset Tabular
20628 <lyxtabular version="3" rows="6" columns="2">
20629 <features tabularvalignment="middle">
20630 <column alignment="center" valignment="top">
20631 <column alignment="center" valignment="top">
20633 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20636 \begin_layout Plain Layout
20642 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20645 \begin_layout Plain Layout
20653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20656 \begin_layout Plain Layout
20662 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20665 \begin_layout Plain Layout
20666 mixed revision working copy
20673 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20676 \begin_layout Plain Layout
20682 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20685 \begin_layout Plain Layout
20686 modified working copy
20693 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20696 \begin_layout Plain Layout
20702 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20705 \begin_layout Plain Layout
20706 switched working copy
20713 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20716 \begin_layout Plain Layout
20722 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20725 \begin_layout Plain Layout
20726 partial working copy, from a sparse checkout
20733 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20736 \begin_layout Plain Layout
20742 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20745 \begin_layout Plain Layout
20746 mixed revision, modified, switched working copy
20759 \begin_layout Itemize
20760 file revision information.
20761 The result comes from parsing the output of
20762 \begin_inset Flex Code
20765 \begin_layout Plain Layout
20767 \begin_inset space ~
20771 \begin_inset space ~
20775 \begin_inset space ~
20784 Supported flags are:
20788 \begin_layout Itemize
20789 version number of the last commit (
20790 \begin_inset Flex Code
20793 \begin_layout Plain Layout
20802 \begin_layout Itemize
20803 author of the last commit (
20804 \begin_inset Flex Code
20807 \begin_layout Plain Layout
20816 \begin_layout Itemize
20817 date of the last commit (
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20830 \begin_layout Itemize
20831 time of the last commit (
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20845 \begin_layout Standard
20846 You can obtain this info via InsetInfo (e.g.
20848 \begin_inset Flex Code
20851 \begin_layout Plain Layout
20852 info-insert buffer vcs-date
20858 The information will be available only when you have the file stored under
20859 svn managment (i.e.
20861 \begin_inset Flex Code
20864 \begin_layout Plain Layout
20870 directory is available with your document).
20874 \begin_layout Itemize
20875 Another—a hacking one—possibility is to use svn keywords
20879 \begin_layout Plain Layout
20880 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20886 In short – you set file keywords property (e.g.
20889 svn propset svn:keywords 'Rev' file.lyx
20891 ) and then paste keyword \SpecialChar TeX
20896 \begin_layout Plain Layout
20897 This is an easy way how to ensure that \SpecialChar LyX
20898 won't break the line in the middle
20904 tag in your document (e.g.
20909 \begin_layout Plain Layout
20917 This way svn client will automatically substitute revision number (e.g.
20922 \begin_layout Plain Layout
20929 ) after each update and commit.
20930 There are more problems with this approach.
20931 Firstly, the '$' character is used in \SpecialChar TeX
20932 world for math equations, so any
20933 occurence of math formula
20934 \begin_inset Formula $Rev$
20938 \begin_inset Formula $Rev:59$
20941 in your \SpecialChar LyX
20943 Similarly for other keywords like Id, Date, Author, etc.
20944 Secondly svn output is dependent on your locales, so its very easy that
20945 svn would produce some problematic strings once Date is used.
20946 Thirdly you get the whole 'Rev: 59' string in your document instead of
20948 Until subversion implements user's custom keywords it will be hard to use
20949 this approach reliably or let \SpecialChar LyX
20950 to support it directly.
20953 \begin_layout Subsection
20954 SVN and Windows Environment
20957 \begin_layout Quote
20958 My inclination is to say that if the user cannot figure out the command
20959 line operations on their own fairly quickly, they would be well advised
20960 to use TortoiseSVN.
20966 \begin_layout Subsubsection
20970 \begin_layout Standard
20971 In addition to installing \SpecialChar LyX
20972 , and having access to a Subversion repository,
20973 the user will need to install the Subversion client program.
20974 A Windows installer for the client program is available from
20975 \begin_inset CommandInset href
20978 target "http://www.collab.net/nonav/downloads/subversion/"
20983 The user may also want to install
20984 \begin_inset CommandInset href
20987 target "http://tortoisesvn.tigris.org/"
20991 , which integrates Subversion operations into the context (rightclick) menu
20992 of Windows Explorer.
20993 Operations done outside \SpecialChar LyX
20994 will typically be more convenient using the Explorer
20996 Note that TortoiseSVN is not a replacement for the client program, which
20997 is what \SpecialChar LyX
21001 \begin_layout Subsubsection
21002 Bringing a document under Subversion control
21005 \begin_layout Standard
21006 Before a \SpecialChar LyX
21007 document can be brought under version control in Subversion, its
21008 parent directory needs to be under version control.
21009 If the document is being added to a project already in the repository,
21010 this is accomplished by checking the project out to the directory where
21011 the new document will be placed.
21012 If the project itself is not yet under version control (for instance, if
21013 this document starts a new project), the directory must be imported into
21015 This is done outside \SpecialChar LyX
21017 Both import and checkout are easily accomplished from the Explorer context
21018 menu using TortoiseSVN, or alternatively can be done using the command
21019 line client at a DOS prompt.
21020 The procedure for importing the project using TortoiseSVN is described
21021 below, assuming an existing repository and a new project being started
21029 For information on using the Subversion client program, run
21036 \begin_layout Enumerate
21043 in Windows Explorer, right click it, and select
21045 TortoiseSVN\SpecialChar menuseparator
21049 If necessary, adjust the URL for the repository, then click OK.
21052 \begin_layout Enumerate
21053 Right click the level of the repository under which you want to place the
21054 new project folder (typically the top level) and click
21058 Supply a name for the project folder and click OK.
21059 Add a message for the log file if desired, then click OK again.
21060 The new project folder should appear in the repository.
21061 Finally, click OK again to exit the repository browser.
21064 \begin_layout Enumerate
21065 Once again right click
21071 , this time selecting SVN Checkout\SpecialChar ldots
21072 Select the URL of the project folder
21073 you just created in the repository, and set the checkout directory to
21081 You will be warned about a non-empty folder; click OK to proceed.
21082 You should now have a
21093 \begin_layout Enumerate
21094 Create or open your document in \SpecialChar LyX
21097 File\SpecialChar menuseparator
21099 \begin_inset space ~
21102 Control\SpecialChar menuseparator
21106 Add a log message and click OK to commit the document to version control.
21109 \begin_layout Standard
21110 From this point onward, you should have full functionality in the
21112 File\SpecialChar menuseparator
21114 \begin_inset space ~
21120 You also have the option of checking the document in and out, viewing its
21122 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21123 client program from a command prompt.
21126 \begin_layout Subsubsection
21127 SSH tunnel used with SVN under Windows
21130 \begin_layout Standard
21131 Compared with Linux setting up an svn client to communicate over ssh under
21132 Windows is a rather troublesome task.
21133 We will at least offer some hints how to setup the client side but prior
21134 knowledge about ssh and the Windows command line is needed, also be prepared
21135 for a great deal of frustration\SpecialChar ldots
21139 \begin_layout Enumerate
21140 Get an svn client for windows, as described in the previous sections.
21141 When it is a fresh install run some svn command (e.g.
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21152 ) to create config files, which you will need to change later on.
21155 \begin_layout Enumerate
21156 Choose an ssh client for Windows.
21157 There are several possibilities, we will use the one from Putty tools
21161 \begin_layout Plain Layout
21162 \begin_inset Flex URL
21165 \begin_layout Plain Layout
21167 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21178 You will need to set the connection up so that the client doesn't ask for
21179 any password from you.
21180 To keep things easy we will use only keys without any additional password
21185 \begin_layout Enumerate
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21197 Save your private .ppk key file and put the public one on the server side.
21198 If the SVN server runs on Linux, note that the format of the public key
21199 is not compatible with Linux openssh and you will need to direcly copy-paste
21202 Public key for pasting into OpenSSH authorized_keys file
21204 :” edit field into the server's
21205 \begin_inset Flex Code
21208 \begin_layout Plain Layout
21209 ~/.ssh/authorized_keys
21215 \begin_inset Flex Code
21218 \begin_layout Plain Layout
21227 \begin_layout Enumerate
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21239 In the SVN config file
21243 \begin_layout Plain Layout
21244 Exact path depends on Windows version, usually somewhere around
21245 \begin_inset Flex Code
21248 \begin_layout Plain Layout
21251 Documents and Settings
21265 \begin_inset Flex Code
21268 \begin_layout Plain Layout
21283 , section [tunnels], setup ssh command, e.g.
21285 \begin_inset Flex Code
21288 \begin_layout Plain Layout
21289 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21298 \begin_layout Plain Layout
21299 It will usually take a lot of time to get exact command right and it depends
21301 For example do not have some remote server saved as a default session in
21303 If things fail, try to connect via plink without SVN first.
21312 \begin_layout Enumerate
21313 Checkout the SVN archive, e.
21314 \begin_inset space \thinspace{}
21318 \begin_inset Newline newline
21322 \begin_inset Flex Code
21325 \begin_layout Plain Layout
21326 svn co svn+ssh://user@server/repository_path
21334 \begin_layout Subsubsection
21335 End-of-Line Conversions
21338 \begin_layout Standard
21339 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
21341 use different line endings inside the .lyx files.
21342 This is not a problem as far as \SpecialChar LyX
21343 functionality is concerned, but the commit
21344 diffs will be huge and merge-conflicts prone.
21345 Fortunately SVN itself knows
21349 \begin_layout Plain Layout
21350 \begin_inset Flex URL
21353 \begin_layout Plain Layout
21355 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21365 how to deal with CR/LF problems when switching .lyx files to the
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21379 \begin_layout Plain Layout
21381 \begin_inset Flex Code
21384 \begin_layout Plain Layout
21385 svn propset svn:eol-style native FILE_NAME
21398 \begin_layout Subsection
21399 GIT commands in \SpecialChar LyX
21403 \begin_layout Standard
21404 A minimal subset of GIT commands is now supported by \SpecialChar LyX
21406 You can find the commands in the
21408 File\SpecialChar menuseparator
21410 \begin_inset space ~
21416 Please note that if you use password protected access to repository via
21417 ssh, you will be asked in terminal window.
21419 was tested against GIT 1.7.
21423 \begin_layout Plain Layout
21424 Windows users please note that you need to ensure that git is on the path.
21425 This can be set from within \SpecialChar LyX
21428 Tools\SpecialChar menuseparator
21429 Preferences\SpecialChar menuseparator
21430 Paths\SpecialChar menuseparator
21441 \begin_layout Standard
21442 One big difference of GIT and the other supported version control systems
21443 is the distributed nature of GIT: With traditional version control systems
21444 there is one central server which hosts the repository.
21445 Users commit their changes to the server, and get updates made by other
21447 With GIT, users commit to a local repository.
21448 The local repository can be synchronized with one or more remote repositories
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21460 \begin_inset Flex Code
21463 \begin_layout Plain Layout
21471 does not interact in any way with remote GIT repositories.
21472 It works exclusively with the local repository in a very similar way as
21473 with a central CVS or SVN repository.
21474 If you use remote GIT repositories you need to do the
21475 \begin_inset Flex Code
21478 \begin_layout Plain Layout
21485 \begin_inset Flex Code
21488 \begin_layout Plain Layout
21494 operations with your favourite GIT client.
21497 \begin_layout Subsubsection
21503 \begin_layout Standard
21504 If your document is not under revision control, this is the only item shown
21506 And if it is under revision control, the
21510 item is not visible.
21513 \begin_layout Standard
21514 This command registers in GIT your document ONLY in case you have already
21515 the documents directory under GIT control (in particular
21520 This means you have to checkout the archive by yourself.
21523 \begin_layout Standard
21524 Then you are asked interactively to supply an initial description of the
21526 Don't forget that registered file is not yet commited.
21529 \begin_layout Standard
21530 GIT command that is run:
21533 \begin_inset Quotes eld
21537 \begin_inset Quotes erd
21543 \begin_layout Standard
21548 to understand the switches.
21551 \begin_layout Subsubsection
21557 \begin_layout Standard
21558 When you are finished editing a file, you commit your changes.
21559 When you do this, you are asked for a description of the changes.
21560 After that changes are commited.
21563 \begin_layout Standard
21566 git commit -q -m"<description>" <file-name>
21569 \begin_layout Subsubsection
21572 Revert To Repository Version
21575 \begin_layout Standard
21576 This will discard all changes made to the document since the last check
21578 You get a warning before changes are discarded.
21581 \begin_layout Standard
21585 \begin_inset Quotes eld
21589 \begin_inset Quotes erd
21595 \begin_layout Subsubsection
21601 \begin_layout Standard
21602 This will rename the current document including the version history.
21603 It requires a clean document without any changes since the last checkin.
21604 You are asked for a file name and a description of the rename operation.
21605 After that the document is renamed, both locally and in the repository.
21606 If the parent directories of the new and old file names differ, all relative
21607 paths of included files are adjusted (like in
21609 File\SpecialChar menuseparator
21614 Finally, the document is reloaded using the new name.
21617 \begin_layout Labeling
21618 \labelwidthstring 00.00.0000
21620 \begin_inset space ~
21624 \begin_inset space ~
21628 \begin_inset Newline newline
21632 \begin_inset Flex Code
21635 \begin_layout Plain Layout
21639 \begin_inset Quotes eld
21643 \begin_inset Quotes erd
21647 \begin_inset Quotes eld
21651 \begin_inset Quotes erd
21660 \begin_inset Newline newline
21664 \begin_inset Flex Code
21667 \begin_layout Plain Layout
21676 \begin_layout Subsubsection
21682 \begin_layout Standard
21683 This shows the complete history of the GIT document.
21687 \begin_inset Quotes eld
21691 \begin_inset Quotes erd
21696 is shown in a browser.
21699 \begin_layout Subsubsection
21703 \begin_layout Standard
21705 supports GIT hash number of the last commit to the file, author name, date
21706 and time of last commit.
21707 All those are extracted from
21709 git log -n 1 --pretty=format:%H%n%an%n%ai
21712 Tree version information is obtained via
21714 git describe --abbrev --dirty --long
21718 \begin_inset CommandInset ref
21720 reference "subsec:VCS-Revision-Information"
21727 \begin_layout Subsection
21731 \begin_layout Standard
21732 With the recent addition of the vc-command function \SpecialChar LyX
21733 power users are allowed
21734 to create their own commands for revision control.
21737 \begin_layout Standard
21738 As an example you can see how two TortoiseSVN commands could be integrated
21742 \begin_layout Description
21744 \begin_inset Flex Code
21747 \begin_layout Plain Layout
21748 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21756 \begin_layout Description
21758 \begin_inset Flex Code
21761 \begin_layout Plain Layout
21762 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21770 \begin_layout Subsection
21771 Version control and Document comparison
21774 \begin_layout Standard
21775 One of the typical uses of version control is to inspect the changes between
21776 revisions, usually by creating
21777 \begin_inset Flex Code
21780 \begin_layout Plain Layout
21787 While this is useful for plain text files, it is much less useful in the
21788 case of \SpecialChar LyX
21789 files, which have more a complicated structure.
21790 Hence we provide binding to the Document comparison feature.
21791 There are two ways of calling this feature - either by direct call of
21792 \begin_inset Flex Code
21795 \begin_layout Plain Layout
21802 function (for details see \SpecialChar LyX
21803 functions manual) or by icon/menu item
21804 \begin_inset Flex Noun
21807 \begin_layout Plain Layout
21808 Compare with older revision...
21814 One can either compare two chosen revisions of the document or he can simply
21815 compare the current version of edited text with older revisions (where
21817 \begin_inset Flex Noun
21820 \begin_layout Plain Layout
21826 ' revisions back means comparison of the edited file with last commited
21831 \begin_layout Standard
21832 This feature is supported for SVN and RCS though due to the more complicated
21833 versioning scheme of RCS there is a constraint – when addressing the revisions
21834 in dialog, numbers always point to the last number in RCS revision number,
21837 We don't currently support GIT addressing of revisions, one can just compare
21838 edited document with its revision X steps backs, where X is addressed as
21842 \begin_layout Section
21843 Literate Programming
21846 \begin_layout Standard
21851 (kayvan@sylvan.com)
21855 original documentation written by
21857 Edmar Wienskoski Jr.
21860 (edmar-w-jr@technologist.com)
21863 \begin_layout Subsection
21867 \begin_layout Standard
21868 The main purpose of this documentation is to show you how to use \SpecialChar LyX
21870 programming, where it is assumed that you are familiar with this programming
21871 technique, and know what
21872 \begin_inset Quotes eld
21876 \begin_inset Quotes erd
21880 \begin_inset Quotes eld
21884 \begin_inset Quotes erd
21888 If that is not the case, please follow the web links provided in the following
21890 There is a lot of good documentation out there covering old development
21891 history to the latest tools tips.
21894 \begin_layout Standard
21895 It is also assumed that you are familiar with \SpecialChar LyX
21896 itself to a point that you
21897 are comfortable changing your \SpecialChar LyX
21898 preferences, and X resources file.
21899 If that is not the case please refer to other \SpecialChar LyX
21900 documentation to cover your
21904 \begin_layout Subsection
21905 Literate Programming
21908 \begin_layout Standard
21909 From the Literate Programming FAQ:
21912 \begin_layout Quotation
21913 Literate programming is the combination of documentation and source together
21914 in a fashion suited for reading by human beings.
21915 In fact, literate programs should be enjoyable reading, even inviting!
21916 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21917 and documentation in a single file.
21918 Literate programming tools then parse the file to produce either readable
21919 documentation or compilable source.
21920 The WEB style of literate programming was created by D.
21921 \begin_inset space \thinspace{}
21925 Knuth during the development of his \SpecialChar TeX
21926 typesetting software.
21930 \begin_layout Standard
21931 Another excerpt says:
21934 \begin_layout Quotation
21937 How is literate programming different from verbose commenting?
21940 \begin_layout Quotation
21941 There are three distinguishing characteristics.
21942 In order of importance, they are:
21946 \begin_layout Itemize
21947 flexible order of elaboration
21950 \begin_layout Itemize
21951 automatic support for browsing
21954 \begin_layout Itemize
21955 typeset documentation, especially diagrams and mathematics
21959 \begin_layout Standard
21960 Now that I sparked your curiosity, take a look in the references.
21963 \begin_layout Subsubsection
21967 \begin_layout Standard
21968 The complete Literate Programming FAQ can be found at:
21971 \begin_layout Quote
21972 Literate Programming FAQ
21973 \begin_inset Flex URL
21976 \begin_layout Plain Layout
21978 http://www.literateprogramming.com/lpfaq.pdf
21986 \begin_layout Standard
21987 The FAQ lists 23 (twenty three!) different literate programming tools.
21988 Where some are specialized or
21989 \begin_inset Quotes eld
21993 \begin_inset Quotes erd
21996 for particular programming languages, while other have general scope.
22001 for my own use for several reasons:
22004 \begin_layout Itemize
22005 It can generate the documentation either in \SpecialChar LaTeX
22009 \begin_layout Itemize
22010 It has a open architecture, i.
22011 \begin_inset space \thinspace{}
22015 \begin_inset space \space{}
22018 it is easy to plug in new filters and to perform special processing that
22023 \begin_layout Itemize
22024 There is a good selection of filters available already (the HTML is one
22028 \begin_layout Itemize
22032 \begin_layout Standard
22033 The Noweb web page can be found at:
22036 \begin_layout Quote
22038 \begin_inset Flex URL
22041 \begin_layout Plain Layout
22043 http://www.cs.virginia.edu/~nr/noweb/
22051 \begin_layout Standard
22052 Starting from there you can reach many other interesting links and even
22053 some literate program examples.
22056 \begin_layout Subsection
22058 and Literate Programming with Noweb
22061 \begin_layout Standard
22062 The \SpecialChar LyX
22063 support for Literate Programming is provided by using the generic \SpecialChar LyX
22065 converters mechanism.
22066 This support is provided in a
22067 \begin_inset Quotes eld
22071 \begin_inset Quotes erd
22075 \begin_inset space \thinspace{}
22079 \begin_inset space \space{}
22082 you will be able to use this new \SpecialChar LyX
22083 feature with some other literate programming
22084 tool of your choice by just changing your \SpecialChar LyX
22088 \begin_layout Subsubsection
22089 Generating documents and code (weaving and tangling)
22092 \begin_layout Paragraph
22093 Using the noweb module
22096 \begin_layout Standard
22097 If you have installed Noweb and \SpecialChar LyX
22098 successfully, whenever you open a new document,
22099 after you have chosen its document class, use the Document->Settings menu
22101 \begin_inset Quotes eld
22105 \begin_inset Quotes erd
22109 If Noweb is correctly installed, when you click on the
22110 \begin_inset Quotes eld
22114 \begin_inset Quotes erd
22117 link, you will see the
22118 \begin_inset Quotes eld
22122 \begin_inset Quotes erd
22125 module in the available list and you can add it to your document.
22128 \begin_layout Paragraph
22132 \begin_layout Standard
22134 enables you to write code with a layout named
22135 \begin_inset Flex Noun
22138 \begin_layout Plain Layout
22145 Noweb delimits chunks like this:
22148 \begin_layout LyX-Code
22152 \begin_layout LyX-Code
22156 \begin_layout LyX-Code
22160 \begin_layout LyX-Code
22164 \begin_layout LyX-Code
22168 \begin_layout Standard
22169 The problem is that whatever is written in between the << and the
22173 must be taken literally, i.
22174 \begin_inset space \thinspace{}
22178 \begin_inset space \space{}
22182 should be prevented from making any special interpretation of what has
22184 This is also handled by
22185 \begin_inset Flex Noun
22188 \begin_layout Plain Layout
22194 , that works like a normal paragraph but has a free spacing capability.
22197 \begin_layout Standard
22198 As a special note, you can also use the
22199 \begin_inset Quotes eld
22203 \begin_inset Quotes erd
22206 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22210 \begin_layout LyX-Code
22214 \begin_layout LyX-Code
22215 def some_function(args):
22218 \begin_layout LyX-Code
22219 "This is the doc string for this function."
22222 \begin_layout LyX-Code
22223 print "My args: ", args
22226 \begin_layout LyX-Code
22227 @ %def some_function
22230 \begin_layout Standard
22231 For an example of this usage and the resulting cross-reference output, look
22232 at the Literate python program in
22234 LIBDIR/examples/listerrors.lyx
22236 which should make this all clear.
22239 \begin_layout Paragraph
22240 Generating the documentation
22243 \begin_layout Standard
22244 At this point you already have a new document file with a proper document
22245 class, and with some code and text on it.
22246 How do I print it? The answer is simple, you select
22248 View\SpecialChar menuseparator
22252 Just like you would do for a plain document.
22253 No special procedure is required.
22256 \begin_layout Standard
22257 To help orientate you, I will now explain what happens inside \SpecialChar LyX
22261 \begin_layout Enumerate
22264 Update\SpecialChar menuseparator
22267 menu option is chosen, a \SpecialChar LaTeX
22273 \begin_layout Standard
22274 If the document is of any literate class the generated file will be named
22275 with an extension name defined by the
22276 \begin_inset Quotes eld
22280 \begin_inset Quotes erd
22283 format (defined in the Preferences panel), otherwise the file will have
22292 \begin_layout Enumerate
22293 Note that the only difference so far is in the name of the file, no special
22294 processing is required by \SpecialChar LyX
22296 Given that you formatted the code using the
22297 \begin_inset Flex Noun
22300 \begin_layout Plain Layout
22306 layout that, by itself, takes care of the business.
22309 \begin_layout Enumerate
22310 If the document is of any literate class \SpecialChar LyX
22311 will then use the internal \SpecialChar LyX
22313 Noweb converter, followed by the Noweb to \SpecialChar LaTeX
22318 \begin_layout Plain Layout
22319 The converters are defined in the
22321 Tools\SpecialChar menuseparator
22325 \begin_inset Quotes eld
22329 \begin_inset Quotes erd
22341 manual for general information about converters.
22346 to generate the \SpecialChar LaTeX
22351 \begin_layout Standard
22352 Otherwise it will just skip this step.
22356 \begin_layout Enumerate
22357 Finally, \SpecialChar LaTeX
22358 is invoked and the regular post processing continues as in a plain
22362 \begin_layout Standard
22363 Independence from a particular
22364 \begin_inset Quotes eld
22368 \begin_inset Quotes erd
22371 is easily achieved by changing the commands that are run by the various
22375 \begin_layout Paragraph
22376 Generating the code
22379 \begin_layout Standard
22380 When the build menu option is chosen or the corresponding button in the
22381 toolbar is pressed, a \SpecialChar LaTeX
22382 file is generated just like step 1 above.
22383 Next, \SpecialChar LyX
22389 This converter needs to be defined by the user and is not installed by
22390 default, though the Program format is.
22391 This converter (like any other converter) will have two parts:
22394 \begin_layout Enumerate
22395 The converter program itself.
22396 This program performs the conversion from the one format to the other (in
22397 this case, from the Noweb format to the Program pseudo-format).
22400 \begin_layout Enumerate
22401 The error log parser.
22402 This is a program whose sole purpose is to rewrite error messages in a
22403 format that \SpecialChar LyX
22405 This makes it possible for \SpecialChar LyX
22406 to place error boxes in the right places in
22410 \begin_layout Standard
22411 The first part, the
22412 \begin_inset Quotes eld
22416 \begin_inset Quotes erd
22419 setting, should be set to
22420 \begin_inset Newline newline
22424 \begin_inset Quotes eld
22432 \begin_inset Quotes erd
22436 \begin_inset Newline newline
22439 This basically means that \SpecialChar LyX
22441 \begin_inset Quotes eld
22445 \begin_inset Quotes erd
22448 (a program or script) with the name of the Noweb file (normally a file
22449 in the \SpecialChar LyX
22450 temp directory) and the directory path of the original \SpecialChar LyX
22455 \begin_layout Standard
22456 This is an implementation of
22457 \begin_inset Quotes eld
22461 \begin_inset Quotes erd
22464 that you can place in a directory on your path:
22467 \begin_layout Standard
22468 \begin_inset VSpace defskip
22474 \begin_layout Standard
22475 \begin_inset Newpage pagebreak
22481 \begin_layout Standard
22487 \begin_layout Standard
22493 \begin_layout Standard
22496 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22499 \begin_layout Standard
22500 \begin_inset VSpace defskip
22506 \begin_layout Standard
22507 The next part of the converter setting is the
22508 \begin_inset Quotes eld
22512 \begin_inset Quotes erd
22515 which is to be set to
22516 \begin_inset Newline newline
22520 \begin_inset Quotes eld
22525 parselog=$$s/scripts/listerrors
22528 \begin_inset Quotes erd
22532 \begin_inset Newline newline
22535 This will run any errors that are generated by the
22536 \begin_inset Quotes eld
22540 \begin_inset Quotes erd
22543 process through the
22544 \begin_inset Quotes eld
22548 \begin_inset Quotes erd
22554 \begin_layout Standard
22555 The build will normally take place in \SpecialChar LyX
22556 's temporary directory, so the files
22557 produced by the conversion will be in that directory.
22559 will copy out what it regards as the `main' file, but the
22563 conversion may produce several files, and so most of these would then be
22564 deleted when \SpecialChar LyX
22566 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22567 the build-script chunk can place the generated files in that location.
22570 \begin_layout Paragraph
22571 Build instructions in the document
22574 \begin_layout Standard
22575 The last piece of the integration between \SpecialChar LyX
22577 \begin_inset Quotes eld
22581 \begin_inset Quotes erd
22585 Generally, the instructions for building your program should be embedded
22586 in a chunk of its own.
22588 \begin_inset Quotes eld
22592 \begin_inset Quotes erd
22595 above uses the notangle command to look for this chunk (called
22596 \begin_inset Quotes eld
22600 \begin_inset Quotes erd
22603 ) and runs its contents through
22604 \begin_inset Quotes eld
22608 \begin_inset Quotes erd
22614 \begin_layout Standard
22615 Typically, such a chunk would look something like this:
22618 \begin_layout LyX-Code
22622 \begin_layout LyX-Code
22624 \begin_inset Newline newline
22627 if [ -z "${NOWEB_SOURCE}" ]
22628 \begin_inset Newline newline
22634 \begin_layout LyX-Code
22635 NOWEB_SOURCE=myfile.nw
22636 \begin_inset Newline newline
22640 \begin_inset Newline newline
22644 code to extract files ...
22645 use NOWEB_OUTPUT_DIR here ...]
22646 \begin_inset Newline newline
22650 code to compile files ...]
22651 \begin_inset Newline newline
22657 \begin_layout Standard
22660 LIBDIR/examples/listerrors.lyx
22664 LIBDIR/examples/Literate.lyx
22666 which implement two versions of the
22667 \begin_inset Quotes eld
22671 \begin_inset Quotes erd
22674 program for some illustrations of how all of these pieces go together or
22677 LIBDIR/examples/noweb2lyx.lyx.
22680 Interestingly, these three files show off the language-indepence of the
22682 literate programming support since they are written in Python, C and Perl
22686 \begin_layout Subsubsection
22687 Configuring \SpecialChar LyX
22691 \begin_layout Standard
22692 All the Literate Programming support is configured by the
22694 Tools\SpecialChar menuseparator
22698 \begin_inset Quotes eld
22702 \begin_inset Quotes erd
22706 The important parts are:
22709 \begin_layout Description
22711 \begin_inset space ~
22715 \begin_inset Quotes eld
22719 \begin_inset Quotes erd
22723 \begin_inset space ~
22726 format Set up via the File Formats tab, this is where the Noweb-specific
22736 , the file extension is set to
22741 This tells \SpecialChar LyX
22742 to create a file with a
22746 extension in the first step of the conversion process.
22749 \begin_layout Description
22751 \begin_inset space ~
22759 \begin_inset space ~
22762 format This is an empty format whose sole purpose is to be the endpoint
22763 of a conversion (which then allows us to set up a converter for it).
22766 \begin_layout Description
22776 This converter performs the
22777 \begin_inset Quotes eld
22781 \begin_inset Quotes erd
22784 of the literate document.
22785 For Noweb, it is set to
22786 \begin_inset Quotes eld
22791 noweave -delay -index $$i > $$o
22794 \begin_inset Quotes erd
22800 \begin_layout Description
22810 \begin_inset Quotes eld
22814 \begin_inset Quotes erd
22818 As stated above, the Converter is set to
22819 \begin_inset Quotes eld
22827 \begin_inset Quotes erd
22830 , with Flags set to
22831 \begin_inset Newline newline
22835 \begin_inset Quotes eld
22840 parselog=$$s/scripts/listerrors
22843 \begin_inset Quotes erd
22849 \begin_layout Subsubsection
22853 \begin_layout Standard
22854 There is also a new function implemented in the \SpecialChar LyX
22856 \begin_inset Quotes eld
22859 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22863 \begin_layout Standard
22864 When debugging code with ddd/gdb, it is possible to invoke a text editor
22865 at the current execution position with a single key stroke.
22866 The default ddd configuration for that is shift-ctrl-V.
22867 It happens that you can define the editor command line invocation in ddd
22870 Edit\SpecialChar menuseparator
22871 Preferences\SpecialChar menuseparator
22874 dialog and changing the "Edit Sources" entry.
22877 \begin_layout Standard
22878 I take advantage of the newly created \SpecialChar LyX
22879 server function and this ddd feature,
22881 \begin_inset Quotes eld
22885 \begin_inset Quotes erd
22891 \begin_layout Standard
22892 \begin_inset VSpace defskip
22898 \begin_layout Standard
22901 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22904 \begin_layout Standard
22905 \begin_inset VSpace defskip
22911 \begin_layout Standard
22912 With this, whenever you are using ddd and find a point in the program that
22913 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22914 ddd will forward this information to \SpecialChar LyX
22915 through the \SpecialChar LyX
22916 server and then the
22918 window will show the same file with the cursor at the same position ddd
22920 No more guessing or long scrolling to locate a point in the program back
22924 \begin_layout Standard
22925 Note however that you must enable the \SpecialChar LyX
22926 server to get this feature working
22927 (it is disabled by default).
22928 You can enable it in
22940 ) by entering in the
22946 \begin_inset Quotes eld
22951 /home/<your-home-directory>/.lyx/lyxpipe
22954 \begin_inset Quotes erd
22960 \begin_layout Standard
22961 Read the \SpecialChar LyX
22962 server documentation in the
22964 Customization Manual
22966 for further information.
22969 \begin_layout Subsubsection
22973 \begin_layout Standard
22974 There are six new buttons that can be added to your \SpecialChar LyX
22976 Five of these buttons are short cuts to layout styles:
22999 The last one is a short cut to the
23000 \begin_inset Quotes eld
23004 \begin_inset Quotes erd
23011 \begin_layout Standard
23013 has a range of buttons that are available for tool bar customization.
23014 In my toolbar I like to combine the six short cuts above with two more:
23019 \SpecialChar menuseparator
23024 \SpecialChar menuseparator
23031 Document\SpecialChar menuseparator
23032 View\SpecialChar menuseparator
23036 Here is how it looks like:
23039 \begin_layout LyX-Code
23043 \begin_layout LyX-Code
23047 \begin_layout LyX-Code
23048 Icon "layout Standard"
23051 \begin_layout LyX-Code
23052 Icon "layout Section"
23055 \begin_layout LyX-Code
23056 Icon "layout \SpecialChar LaTeX
23060 \begin_layout LyX-Code
23061 Icon "layout \SpecialChar LyX
23065 \begin_layout LyX-Code
23066 Icon "layout Chunk"
23069 \begin_layout LyX-Code
23073 \begin_layout LyX-Code
23077 \begin_layout LyX-Code
23078 Icon "buffer-typeset"
23081 \begin_layout LyX-Code
23082 Icon "build-program"
23085 \begin_layout LyX-Code
23089 \begin_layout LyX-Code
23093 \begin_layout LyX-Code
23097 \begin_layout LyX-Code
23101 \begin_layout LyX-Code
23105 \begin_layout Subsubsection
23106 Colors customization
23109 \begin_layout Standard
23110 There are a number of colors in \SpecialChar LyX
23111 that can be customized in
23116 One of the things that bothers people is the \SpecialChar LaTeX
23118 The default color is red, since the chunks uses \SpecialChar LaTeX
23119 font, and there is a lot
23120 of chunks in literate documents, you may get tired of seeing everything
23122 You can change it by going to the tabs
23131 \begin_layout Standard
23132 The next thing is the visible presence of the newline character in the screen.
23133 You can choose the color of this particular character and make it blend
23135 I recommend you choosing a color that is close to the background but not
23136 equal, that way you still can see it is there, but it is not bothering
23140 \begin_layout Subsection
23145 \begin_layout Standard
23154 is documented in the
23158 example file and in the Sweave manual (menu
23160 Help\SpecialChar menuseparator
23166 \begin_layout Chapter
23171 \begin_layout Standard
23172 Users sometimes need to be able to
23173 \begin_inset Quotes eld
23177 \begin_inset Quotes erd
23181 file together with all the images (and other files) on which it depends,
23182 either for sending to a publisher or for sharing with a co-author.
23184 2.0 includes a Python script (
23185 \begin_inset Flex Code
23188 \begin_layout Plain Layout
23194 ) that automates this process.
23195 To use it, you must have either the
23196 \begin_inset Flex Code
23199 \begin_layout Plain Layout
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23215 python modules installed on your system.
23216 By default, the script prefers the
23217 \begin_inset Flex Code
23220 \begin_layout Plain Layout
23227 \begin_inset Flex Code
23230 \begin_layout Plain Layout
23236 format on Unix-like systems and the
23237 \begin_inset Flex Code
23240 \begin_layout Plain Layout
23249 \begin_layout Standard
23251 's configuration process will set the script up to export a `\SpecialChar LyX
23253 and this format will then be available under
23254 \begin_inset Flex Code
23257 \begin_layout Plain Layout
23258 File\SpecialChar menuseparator
23267 \begin_layout Standard
23268 Independently of the platform, the generation of a particular archive format
23269 can be forced by adding either the
23270 \begin_inset Flex Code
23273 \begin_layout Plain Layout
23280 \begin_inset Flex Code
23283 \begin_layout Plain Layout
23290 \begin_inset Flex Code
23293 \begin_layout Plain Layout
23300 \begin_inset Flex Code
23303 \begin_layout Plain Layout
23309 format) switch to the
23310 \begin_inset Flex Code
23313 \begin_layout Plain Layout
23315 \SpecialChar menuseparator
23323 \begin_inset Flex Code
23326 \begin_layout Plain Layout
23327 Tools\SpecialChar menuseparator
23328 Preferences\SpecialChar menuseparator
23329 File Handling\SpecialChar menuseparator
23336 (Make sure you add the switch after the script name, not before it.)
23339 \begin_layout Chapter
23341 and the World Wide Web
23344 \begin_layout Standard
23346 has long supported the export of documents to various web-friendly formats,
23348 Before verson 2.0, however, HTML export was always accomplished by the use
23349 of external converters.
23353 \begin_layout Plain Layout
23354 For details on the use of external converters with \SpecialChar LyX
23359 section of the Customization manual.
23364 These fall into two large groups: there are converters that use \SpecialChar LaTeX
23366 intermediate format, such as
23367 \begin_inset Flex Code
23370 \begin_layout Plain Layout
23377 \begin_inset Flex Code
23380 \begin_layout Plain Layout
23387 \begin_inset Flex Code
23390 \begin_layout Plain Layout
23396 , relying upon \SpecialChar LyX
23397 to produce the \SpecialChar LaTeX
23398 ; and there is a converter that works directly
23399 on \SpecialChar LyX
23401 \begin_inset Flex Code
23404 \begin_layout Plain Layout
23412 All of these have different advantages and disadvantages.
23416 \begin_layout Standard
23417 The \SpecialChar LaTeX
23418 -based converters have the advantage that, in principle, they know everythin
23419 g about the exported document that \SpecialChar LaTeX
23421 Such converters do not care, for example, if a certain block of code was
23422 produced by \SpecialChar LyX
23423 or was Evil Red Text.
23424 These converters know about
23425 \begin_inset Flex Code
23428 \begin_layout Plain Layout
23434 files, counters, and references, and can often make use of the
23435 \begin_inset Flex Code
23438 \begin_layout Plain Layout
23444 files generated by Bib\SpecialChar TeX
23446 On the other hand, \SpecialChar LaTeX
23447 is a very hard language to parse—it is sometimes said
23448 that only \SpecialChar TeX
23449 itself understands \SpecialChar TeX
23450 —and \SpecialChar LaTeX
23451 -based converters will often choke on
23452 what seem to be quite simple constructs; complex ones can throw them completely
23453 , and as of this writing, for example, the
23457 manual will not export with
23458 \begin_inset Flex Code
23461 \begin_layout Plain Layout
23467 , though the others will.
23468 The other issue concerns how math is handled.
23469 These converters typically convert the formulae into little pictures that
23470 are then linked from the HTML document.
23471 Since these are actually generated by \SpecialChar LaTeX
23472 , they are accurate.
23473 But they do not scale well, and just getting them to look as if they are
23474 actually meant to be in your document—so that the font sizes seem to be
23475 roughly the same—can be a challenge.
23478 \begin_layout Standard
23480 \begin_inset Flex Code
23483 \begin_layout Plain Layout
23491 \begin_inset CommandInset href
23493 name "http://elyxer.nongnu.org/"
23494 target "http://elyxer.nongnu.org/"
23498 ) solves some of these problems.
23499 In particular, the formulae it produces scale perfectly, since it renders
23500 math using a combination of HTML and CSS rather than converting the formulae
23502 But even moderately complex formula are rendered less well than with
23503 \begin_inset Flex Code
23506 \begin_layout Plain Layout
23512 ; this reflects the limitations of HTML.
23516 \begin_layout Plain Layout
23518 \begin_inset Flex Code
23521 \begin_layout Plain Layout
23528 can also use jsMath and MathJax for equations, but this setting is only
23529 available globally and requires one to have access to a server that runs
23535 More importantly (as of version 1.1.1, at least),
23536 \begin_inset Flex Code
23539 \begin_layout Plain Layout
23546 has limited support for math macros and no support for user-defined paragraph
23547 or character styles.
23548 These limitations make
23549 \begin_inset Flex Code
23552 \begin_layout Plain Layout
23559 unsuitable for many of the documents \SpecialChar LyX
23561 In principle, of course, these problems could be solved, but the \SpecialChar LyX
23563 have decided to follow a different path and have made \SpecialChar LyX
23565 writing XHTML, just as it is capable of writing \SpecialChar LaTeX
23566 , DocBook, and plaintext.
23569 \begin_layout Standard
23570 As of this writing, XHTML output remains under development and should probably
23572 \begin_inset Quotes eld
23576 \begin_inset Quotes erd
23583 \begin_layout Plain Layout
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23589 development/HTML.notes
23594 , which can be found in the \SpecialChar LyX
23596 \begin_inset CommandInset href
23598 name "accessed online"
23599 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
23603 , usually contains up-to-date information about the state of XHTML output.
23604 See also the list of XHTML bugs on
23605 \begin_inset CommandInset href
23607 name "the bug tracker"
23608 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"
23617 Still, the developers have chosen this approach because it has several
23618 potential advantages over the other two.
23621 \begin_layout Standard
23622 These advantages are primarily due to the fact that the XHTML output routines,
23623 since they are part of \SpecialChar LyX
23624 , know everything \SpecialChar LyX
23625 knows about the document being
23630 \begin_layout Plain Layout
23631 Another advantage is that, since these routines are internal to \SpecialChar LyX
23633 immune to changes in \SpecialChar LyX
23634 's file format, or to changes in the semantics of
23640 So they know about the table of contents (as displayed in the outline),
23641 about the counters associated with different paragraph styles, and about
23642 user-defined styles.
23643 The XHTML output routines know what \SpecialChar LyX
23644 knows about internationalization,
23645 too, so they will output
23646 \begin_inset Quotes eld
23650 \begin_inset Quotes erd
23654 \begin_inset Quotes eld
23662 \begin_inset Quotes erd
23665 , depending upon the language in effect at the time.
23669 \begin_layout Standard
23670 Quite generally, the output routines know what \SpecialChar LyX
23671 knows about document layout,
23672 that is, about how the document is to be rendered on screen.
23673 We use this information when we output the document as XHTML.
23674 In particular, \SpecialChar LyX
23679 generates CSS style information corresponding to the layout information
23680 it uses to render the document on screen: if section headings are supposed
23681 to be sans-serif and bold as seen in \SpecialChar LyX
23682 , then (by default) they will be sans-seri
23683 f and bold when viewed in a web browser, too.
23684 And this is true not just for pre-defined styles, like Section, but for
23685 any style, including user-defined styles.
23686 Indeed, the XHTML output routines make no distinction between user-defined
23687 paragraph and character styles and \SpecialChar LyX
23688 's own pre-defined styles: in each case,
23689 everything \SpecialChar LyX
23690 knows about the styles is contained in the layout files.
23691 And much the same is true as regards pre-defined textual insets, such as
23692 footnotes, and various custom insets.
23696 \begin_layout Standard
23697 The result is that XHTML output can be customized and extended in exactly
23698 the same way \SpecialChar LaTeX
23699 output can be customized and extended: through layout files
23701 See chapter five of the
23705 manual for the details.
23708 \begin_layout Standard
23709 The remainder of this chapter contains more detailed information on XHTML
23710 output, its limitations, and ways to work around those limitations.
23713 \begin_layout Section
23714 Math Output in XHTML
23717 \begin_layout Standard
23719 offers four choices for how math is rendered.
23720 These have various advantages and disadvantages:
23723 \begin_layout Itemize
23725 \begin_inset Newline newline
23728 MathML is a dialect of XML designed specifically for mathematics on the
23729 web, and it typically renders very well in browsers that support it.
23730 The disadvantage is that not all browsers support MathML, and support is
23731 not complete even in the Gecko-based browsers, such as Firefox.
23732 \begin_inset Newline newline
23735 If \SpecialChar LyX
23736 is unable to render a formula as MathML—for example, if the formula
23738 \begin_inset Flex Code
23741 \begin_layout Plain Layout
23747 package or ERT—then it will instead output the formula as an image.
23751 \begin_layout Itemize
23753 \begin_inset Newline newline
23756 As mentioned above,
23757 \begin_inset Flex Code
23760 \begin_layout Plain Layout
23766 outputs math as HTML, styled by CSS.
23770 \begin_layout Plain Layout
23772 has borrowed some of the CSS for its HTML output from
23773 \begin_inset Flex Code
23776 \begin_layout Plain Layout
23787 For simple formulae, this can work quite well, though with more complicated
23788 formulae it tends to break down.
23789 Still, this method has the advantage that it is very widely supported and
23790 so it may be appropriate for documents that contain only a little, fairly
23792 \begin_inset Newline newline
23795 If Lyx is unable to render a formula as HTML—for example, if the formula
23797 \begin_inset Flex Code
23800 \begin_layout Plain Layout
23806 package or ERT—then it will instead output the formula as an image.
23810 \begin_layout Itemize
23812 \begin_inset Newline newline
23816 \begin_inset Flex Code
23819 \begin_layout Plain Layout
23826 will output formulae as images, the very same images, in fact, that are
23827 used for instant preview.
23831 \begin_layout Plain Layout
23832 Instant preview does
23836 have to be on for images to be output, however.
23841 The advantage to this method is that the images are simply generated by
23843 , so they are very accurate.
23844 The disadvantage, as mentioned earlier, is that these are bitmapped images,
23845 so they do not scale terribly well, and one cannot copy them, etc.
23846 (As of this writing, there are also problems about equation numbering.
23848 \begin_inset CommandInset href
23851 target "http://www.lyx.org/trac/ticket/6894"
23856 \begin_inset Newline newline
23859 The size of the images can be controlled by setting the
23860 \begin_inset Quotes eld
23863 Math Images Scaling
23864 \begin_inset Quotes erd
23868 \begin_inset Flex Noun
23871 \begin_layout Plain Layout
23872 Document\SpecialChar menuseparator
23873 Settings\SpecialChar menuseparator
23883 \begin_layout Plain Layout
23884 For those who want to know, this controls the resolution of the image in
23885 dots per inch and is based upon a default of 75 dpi.
23891 \begin_inset Newline newline
23894 If \SpecialChar LyX
23895 for some reason fails to create an image for a formula (e.g., if a required
23897 package is not installed), then it will fall back to outputing the raw
23902 \begin_layout Itemize
23905 \begin_inset Newline newline
23908 Finally, \SpecialChar LyX
23909 will happily output math as \SpecialChar LaTeX
23911 As well as being the output of last resort, this method can be used with
23913 \begin_inset CommandInset href
23916 target "http://www.math.union.edu/~dpvc/jsMath/"
23920 , which uses JavaScript to render \SpecialChar LaTeX
23921 embedded in HTML documents.
23923 wraps the \SpecialChar LaTeX
23925 \begin_inset Flex Code
23928 \begin_layout Plain Layout
23934 (for inline formulas) or
23935 \begin_inset Flex Code
23938 \begin_layout Plain Layout
23944 (for displayed formulas) with
23945 \begin_inset Flex Code
23948 \begin_layout Plain Layout
23954 , as is required for jsMath.
23957 \begin_layout Standard
23958 One of these output methods must be selected under
23959 \begin_inset Flex Noun
23962 \begin_layout Plain Layout
23963 Document\SpecialChar menuseparator
23964 Settings\SpecialChar menuseparator
23971 By default, \SpecialChar LyX
23973 This is a document-wide setting, therefore.
23976 \begin_layout Standard
23977 Eventually, \SpecialChar LyX
23978 will offer the user the option to select an alternate output
23979 method for a particular inset, say, one that isn't being rendered very
23984 \begin_layout Plain Layout
23985 That said, since \SpecialChar LyX
23986 falls back to images if the inset contains ERT, then one
23987 can force output as an image by putting some harmless ERT into the math,
23989 \begin_inset Formula $a=b\relax$
24000 \begin_layout Section
24001 Bibliography and Citations
24004 \begin_layout Standard
24005 XHTML output fully supports bibliographies and citations.
24009 \begin_layout Standard
24010 Citation labels are generated by the same machinery that generates \SpecialChar LyX
24012 labels, so the labels will look in the output much as they do in \SpecialChar LyX
24015 If you are using numerical citations, then \SpecialChar LyX
24016 will output numerical labels,
24017 such as [1] or [17], rather than simply showing the citation key in square
24018 brackets, as it does on-screen.
24019 If you are using author-year citations, then \SpecialChar LyX
24020 will add lowercase letters
24021 to the years, just as Bib\SpecialChar TeX
24022 does, if it finds more than one citation for
24023 a given author-year combination.
24024 The labels will be printed with the bibliography entries.
24025 Note that there is, at present, no way to customize the appearance of the
24026 labels, for example, to choose between square brackets and parentheses.
24029 \begin_layout Standard
24030 Bibliography output is handled by the same machinery that handles the presentati
24031 on of reference information in the citation dialog, so you will see in the
24032 XHTML output pretty much what you would see if you were to look at a given
24033 entry in the citation dialog.
24034 The formatting can be customized in your layout file or, preferably, in
24040 manual for the details.
24043 \begin_layout Standard
24044 The main defect at present is that cross-referenced information is printed
24045 with every entry with which it is associated.
24046 So you can see things like this:
24049 \begin_layout Quote
24051 \begin_inset Quotes eld
24054 Context and Logical Form
24055 \begin_inset Quotes erd
24060 Language in Context: Selected Essays
24062 (Oxford: Oxford University Press, 2007), pp.
24066 \begin_layout Quote
24068 \begin_inset Quotes eld
24071 Semantics in Context
24072 \begin_inset Quotes erd
24077 Language in Context: Selected Essays
24079 (Oxford: Oxford University Press, 2007), pp.
24083 \begin_layout Standard
24084 This should be fixed before long.
24087 \begin_layout Standard
24088 There is no support at present for sectioned bibliographies.
24089 If you have multiple bibliographies, then \SpecialChar LyX
24090 will print the same bibliography
24094 \begin_layout Section
24098 \begin_layout Standard
24100 will happily export indexes as XHTML, but with certain limitations at the
24104 \begin_layout Standard
24105 Index export will be most reliable when you do not attempt to use the fancy
24106 constructs that are described in the section on indexes in the
24114 \begin_layout Plain Layout
24115 The main issue here is that \SpecialChar LyX
24116 itself does not really handle these.
24117 It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
24123 We'll describe how they are handled using the subsection headings from
24127 \begin_layout Itemize
24128 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
24129 makes an effort to support these,
24130 but the entries must be separated by
24131 \begin_inset Quotes eld
24135 \begin_inset Quotes erd
24138 , that is, there must be spaces around the exclamation point.
24139 This is because it is otherwise too difficult to check for escaped exclamation
24140 points, ones in math, and so forth.
24143 \begin_layout Itemize
24144 Page Ranges: There is no support at all for page ranges, since these make
24145 no sense with XHMTL.
24146 Instead, you will just get two index entries, one at either end.
24149 \begin_layout Itemize
24150 Cross-referencing: There is no support for cross-referencing.
24151 If \SpecialChar LyX
24152 finds an entry containing the
24153 \begin_inset Quotes eld
24156 |see\SpecialChar ldots
24158 \begin_inset Quotes erd
24161 construct, it is just dropped, and the rest is treated as an ordinary index
24165 \begin_layout Itemize
24166 Index Entry Order: \SpecialChar LyX
24167 does support attempts to fix the sorting order.
24168 It will take what is before the first `@' it finds and use that for sorting,
24169 taking what follows the first `@' to be the actual entry.
24170 At present, \SpecialChar LyX
24171 does not check for escaped `@', so do not try to index email
24175 \begin_layout Itemize
24176 Index Entry Layout: You can format entries by using the text style dialog,
24177 or by using any other method available within \SpecialChar LyX
24179 There is no support for constructs like:
24180 \begin_inset Quotes eld
24184 \begin_inset Quotes erd
24188 Indeed, if \SpecialChar LyX
24189 finds a pipe symbol, `|', in an entry, it will delete it and
24190 everything that follows it.
24193 \begin_layout Itemize
24194 Multiple Indexes: There is no support for multiple indexes.
24195 Rather, all index entries will be printed as one large index.
24196 To avoid our printing several versions of the index, we print only the
24197 main index, so make sure you have one.
24200 \begin_layout Section
24201 Nomenclature and Glossary
24204 \begin_layout Standard
24205 There is at present no support for glossaries.
24206 Adding it would be fairly trivial, and welcome.
24209 \begin_layout Chapter
24210 The \SpecialChar LyX
24214 \begin_layout Section
24218 \begin_layout Standard
24219 The `\SpecialChar LyX
24220 server' allows other programs to talk to \SpecialChar LyX
24221 , invoke \SpecialChar LyX
24222 commands, and retrieve
24223 information about the \SpecialChar LyX
24225 This is only intended for advanced users, but they should find it useful.
24226 It is by writing to the \SpecialChar LyX
24227 server, for example, that bibliography managers,
24228 such as JabRef, are able to
24229 \begin_inset Quotes eld
24233 \begin_inset Quotes erd
24236 citations to \SpecialChar LyX
24240 \begin_layout Section
24241 Starting the \SpecialChar LyX
24245 \begin_layout Standard
24246 The \SpecialChar LyX
24247 server works through the use of a pair of named pipes.
24248 These are usually located in
24249 \begin_inset Flex Code
24252 \begin_layout Plain Layout
24258 , (except on Windows, where
24262 named pipes are special objects located in
24263 \begin_inset Flex Code
24266 \begin_layout Plain Layout
24278 ) and have the names
24279 \begin_inset Quotes eld
24283 \begin_inset Flex Code
24286 \begin_layout Plain Layout
24293 \begin_inset Quotes erd
24297 \begin_inset Quotes eld
24301 \begin_inset Flex Code
24304 \begin_layout Plain Layout
24311 \begin_inset Quotes erd
24315 External programs write into
24316 \begin_inset Flex Code
24319 \begin_layout Plain Layout
24325 and read back data from
24326 \begin_inset Flex Code
24329 \begin_layout Plain Layout
24336 The stem of the pipe names can be defined in the
24337 \begin_inset Flex Noun
24340 \begin_layout Plain Layout
24341 Tools\SpecialChar menuseparator
24347 dialog, for example
24348 \begin_inset Flex Code
24351 \begin_layout Plain Layout
24352 "/home/myhome/lyxpipe"
24358 \begin_inset Flex Code
24361 \begin_layout Plain Layout
24375 on Windows (where any working path instead of lyxpipe can be used, for
24377 \begin_inset Flex Code
24380 \begin_layout Plain Layout
24403 configure this manually in order for the server to start.
24406 \begin_layout Standard
24409 \begin_inset Flex Code
24412 \begin_layout Plain Layout
24419 \begin_inset Flex Code
24422 \begin_layout Plain Layout
24428 ' to create the pipes.
24429 If one of the pipes already exists, \SpecialChar LyX
24430 will assume that another \SpecialChar LyX
24432 is already running and will not start the server.
24433 On POSIX (Unix like) systems, if for some other reason, an unused
24434 \begin_inset Quotes eld
24438 \begin_inset Quotes erd
24441 pipe is left in existence when \SpecialChar LyX
24442 closes, then \SpecialChar LyX
24443 will try to delete it.
24444 If this fails for some reason, you will need to delete the pipes manually
24445 and then restart \SpecialChar LyX
24447 On Windows, pipes are deleted by the OS on program termination or crash,
24449 \begin_inset Quotes eld
24453 \begin_inset Quotes erd
24456 pipes should not be possible.
24459 \begin_layout Standard
24460 To have several \SpecialChar LyX
24461 processes with servers at the same time, you have to use
24462 different configurations, perhaps by using separate user directories, each
24464 \begin_inset Flex Code
24467 \begin_layout Plain Layout
24473 file, for each process.
24476 \begin_layout Standard
24477 If you are developing a client program, you might find it useful to enable
24478 debugging information from the \SpecialChar LyX
24480 Do this by starting \SpecialChar LyX
24482 \begin_inset Flex Code
24485 \begin_layout Plain Layout
24494 \begin_layout Standard
24495 You can find a complete example client written in C++ in the source distribution
24497 \begin_inset Flex Code
24500 \begin_layout Plain Layout
24501 development/lyxserver/server_monitor.cpp
24509 \begin_layout Standard
24510 Another useful tool is the command-line based client found in
24511 \begin_inset Flex Code
24514 \begin_layout Plain Layout
24515 src/client/lyxclient
24523 \begin_layout Section
24524 Normal communication
24527 \begin_layout Standard
24528 To issue a \SpecialChar LyX
24529 call, the client writes a line of ASCII text into the input
24531 This line has the following format:
24534 \begin_layout Quote
24548 \begin_layout Description
24549 clientname is a name that the client can choose arbitrarily.
24550 Its only use is that \SpecialChar LyX
24551 will echo it if it sends an answer—so a client can
24552 dispatch results from different requesters.
24555 \begin_layout Description
24556 function is the function you want \SpecialChar LyX
24558 It is the same as the commands you'd use in the minibuffer.
24561 \begin_layout Description
24562 argument is an optional argument which is meaningful only to some functions
24564 \begin_inset Quotes eld
24568 \begin_inset Quotes erd
24571 LFUN will insert the argument as text at the cursor position).
24574 \begin_layout Standard
24575 The answer from \SpecialChar LyX
24576 will arrive in the output pipe and be of the form
24579 \begin_layout Quote
24593 \begin_layout Standard
24602 are just echoed from the command request, while
24606 is more or less useful information filled according to how the command
24607 execution worked out.
24608 Some commands, such as
24609 \begin_inset Quotes eld
24613 \begin_inset Quotes erd
24616 , will return information about the internal state of \SpecialChar LyX
24618 return an empty data-response.
24619 This means that the command execution went fine.
24622 \begin_layout Standard
24623 In case of errors, the response from \SpecialChar LyX
24624 will have this form
24627 \begin_layout Quote
24641 \begin_layout Standard
24646 should contain an explanation of why the command failed.
24649 \begin_layout Standard
24653 \begin_layout LyX-Code
24654 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
24655 \begin_inset Newline newline
24658 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
24659 \begin_inset Newline newline
24662 read a <~/.lyxpipe.out
24663 \begin_inset Newline newline
24669 \begin_layout Subsection
24670 AppleScript (Mac OS X)
24673 \begin_layout Standard
24674 Since \SpecialChar LyX
24675 2.1, \SpecialChar LyX
24676 supports basic interactions with AppleScript for normal communicatio
24677 n through the command run.
24678 This command takes a direct argument (the
24682 to perform) and an optional argument.
24683 It either returns the output of the function or triggers an error with
24684 the error message and code.
24687 \begin_layout Standard
24691 \begin_layout LyX-Code
24692 tell application "\SpecialChar LyX
24696 \begin_layout LyX-Code
24700 \begin_layout LyX-Code
24701 -- Stores the current file name into f
24704 \begin_layout LyX-Code
24705 set f to (run "server-get-filename" with argument "")
24708 \begin_layout LyX-Code
24709 on error the error_message number the error_number
24712 \begin_layout LyX-Code
24713 display dialog "Error: " & the error_number & ".
24717 \begin_layout LyX-Code
24718 & the error_message buttons {"OK"} default button 1
24721 \begin_layout LyX-Code
24725 \begin_layout LyX-Code
24729 \begin_layout Section
24733 \begin_layout Standard
24735 can notify clients of events going on asynchronously.
24736 Currently it will only do this if the user binds a key sequence with the
24738 \begin_inset Quotes eld
24742 \begin_inset Quotes erd
24746 The format of the string \SpecialChar LyX
24747 sends is as follows:
24750 \begin_layout Quote
24751 \begin_inset Flex Code
24754 \begin_layout Plain Layout
24765 \begin_layout Standard
24770 is the printed representation of the key sequence that was actually typed
24774 \begin_layout Standard
24775 This mechanism can be used to extend \SpecialChar LyX
24776 's command set and implement macros.
24777 Bind some key sequence to
24778 \begin_inset Quotes eld
24782 \begin_inset Quotes erd
24786 Then start a client that listens on the output pipe, dispatches the command
24787 according to the sequence, and starts a function that may use \SpecialChar LyX
24790 requests to issue a command or a series of commands to \SpecialChar LyX
24794 \begin_layout Section
24795 The simple \SpecialChar LyX
24799 \begin_layout Standard
24801 implements a simple protocol that can be used for session management.
24802 All messages are of the form
24805 \begin_layout Quote
24815 \begin_layout Standard
24821 \begin_inset Quotes eld
24825 \begin_inset Quotes erd
24829 \begin_inset Quotes eld
24833 \begin_inset Quotes erd
24838 \begin_inset Quotes eld
24842 \begin_inset Quotes erd
24845 is received from a client, \SpecialChar LyX
24846 will report back to inform the client that
24847 it's listening to it's messages, while
24848 \begin_inset Quotes eld
24852 \begin_inset Quotes erd
24855 sent from \SpecialChar LyX
24856 will inform clients that \SpecialChar LyX
24860 \begin_layout Section
24861 Reverse DVI/PDF search
24864 \begin_layout Standard
24865 Some DVI/PDF viewers
24869 \begin_layout Plain Layout
24870 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
24871 Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
24880 facility (also called
24885 This means that you can tell \SpecialChar LyX
24886 to put the cursor to a specific line in the
24887 document by clicking at the respective position in the DVI/PDF output.
24888 To achieve this, the viewer must be able to communicate with \SpecialChar LyX
24890 This is done via the \SpecialChar LyX
24891 server either by using the named pipe (
24895 ), or the UNIX domain socket (
24899 ) that \SpecialChar LyX
24900 creates in its temporary directory (this is the way the
24901 \begin_inset Flex Code
24904 \begin_layout Plain Layout
24910 program communicates with \SpecialChar LyX
24912 In some cases, you need a helper script that mediates between the viewer
24913 and \SpecialChar LyX
24914 , in others, the viewer can communicate with \SpecialChar LyX
24916 This depends on the selected viewer and on your operating system.
24917 The same applies to the way viewers need to be configured and the way the
24918 reverse search is actually performed.
24919 In what follows, we will thus describe how to setup reverse search for
24921 Before we turn to this, though, we will explain what needs to be done generally
24922 to enable reverse search in the DVI/PDF output.
24925 \begin_layout Subsection
24927 \begin_inset CommandInset label
24929 name "subsec:rev-search"
24936 \begin_layout Standard
24937 In most cases \SpecialChar LyX
24938 will do the work for you by enabling the option
24939 \begin_inset Flex Noun
24942 \begin_layout Plain Layout
24943 Synchronize with Output
24949 \begin_inset Flex Noun
24952 \begin_layout Plain Layout
24953 Document\SpecialChar menuseparator
24954 Settings\SpecialChar menuseparator
24961 In such a case \SpecialChar LyX
24962 will automatically insert the necessary Sync\SpecialChar TeX
24964 PDF) or load the srcltx package (for DVI) respectively.
24965 This option can be easily reached also on
24966 \begin_inset Flex Code
24969 \begin_layout Plain Layout
24978 \begin_layout Standard
24979 If you need a different setting, you can select or input a custom macro
24980 from the drop down box just below
24981 \begin_inset Flex Noun
24984 \begin_layout Plain Layout
24985 Document\SpecialChar menuseparator
24986 Settings\SpecialChar menuseparator
24987 Output\SpecialChar menuseparator
24988 Synchronize with Output
24996 \begin_layout Standard
24997 Note that the method
24998 \begin_inset Flex Code
25001 \begin_layout Plain Layout
25009 enables gzip compression.
25010 If your viewer does not support it, you should instead use
25011 \begin_inset Flex Code
25014 \begin_layout Plain Layout
25025 \begin_layout Standard
25026 Please also note that including the
25027 \begin_inset Flex Code
25030 \begin_layout Plain Layout
25037 \begin_inset Flex Code
25040 \begin_layout Plain Layout
25046 sometimes has an undesired impact on the typesetting.
25047 Thus, you should switch output synchronization off for the final typesetting
25049 \begin_inset Flex Code
25052 \begin_layout Plain Layout
25059 \begin_inset Flex Code
25062 \begin_layout Plain Layout
25072 \begin_layout Standard
25073 In case you need some more special settings that are not covered by the
25074 automatic settings, read the next section about how to set up output synchroniz
25076 If the automatic setup suits your needs, you can readily jump to section
25077 \begin_inset space ~
25081 \begin_inset CommandInset ref
25083 reference "subsec:configuring-viewers"
25087 , where the necessary configuration steps in your viewer – needed both with
25088 the automatic and the manual setup – are described.
25091 \begin_layout Subsection
25095 \begin_layout Standard
25097 provides several different methods for reverse search.
25098 Some are built-in in the
25099 \begin_inset Flex Code
25102 \begin_layout Plain Layout
25108 program, some are provided by external packages.
25109 Your choice depends on whether your \SpecialChar LaTeX
25110 distribution already provides a given
25111 method (the built-in methods are rather new) and whether your viewer can
25113 The available methods are described in the following.
25116 \begin_layout Subsubsection*
25117 Built-in DVI-search via src-specials (DVI only)
25120 \begin_layout Standard
25121 This method provides the DVI file with the necessary information for reverse
25123 It is available in \SpecialChar LaTeX
25124 since quite some time (any somewhat recent \SpecialChar LaTeX
25126 should include it), and it works reliably.
25127 To enable it, change the
25128 \begin_inset Flex Noun
25131 \begin_layout Plain Layout
25142 \begin_inset Flex Noun
25145 \begin_layout Plain Layout
25156 \begin_inset Flex Noun
25159 \begin_layout Plain Layout
25160 Preferences\SpecialChar menuseparator
25161 File Handling\SpecialChar menuseparator
25168 \begin_inset Flex Code
25171 \begin_layout Plain Layout
25172 latex -src-specials $$i
25178 If this doesn't work, check if your \SpecialChar TeX
25179 engine needs different options (the
25180 syntax might differ in some distributions).
25183 \begin_layout Subsubsection*
25184 External Packages (PDFSync and scrltx)
25187 \begin_layout Standard
25196 provide reverse search facility for PDF output (via pdflatex) and DVI output,
25198 In order to enable it, load the packages in the \SpecialChar LyX
25202 \begin_layout Itemize
25203 \begin_inset Flex Code
25206 \begin_layout Plain Layout
25209 usepackage{pdfsync}
25214 for reverse PDF search,
25217 \begin_layout Itemize
25218 \begin_inset Flex Code
25221 \begin_layout Plain Layout
25224 usepackage[active]{srcltx}
25229 for reverse DVI search.
25232 \begin_layout Standard
25233 If you want to be able to perform both DVI and PDF reverse searches, you
25234 can also insert in the preamble the following lines
25237 \begin_layout LyX-Code
25241 \begin_inset Newline newline
25247 \begin_inset Newline newline
25252 usepackage{pdfsync}
25253 \begin_inset Newline newline
25259 \begin_inset Newline newline
25264 usepackage[active]{srcltx}
25265 \begin_inset Newline newline
25273 \begin_layout Standard
25274 This way, you can preview the file as either DVI or PDF (pdflatex) and the
25275 right package will be used.
25278 \begin_layout Standard
25279 Note that PDFSync might affect the output layout of your document.
25280 It is therefore advised to disable PDFsync for final documents.
25283 \begin_layout Subsubsection*
25284 Built-in reverse search via Sync\SpecialChar TeX
25288 \begin_layout Standard
25290 \begin_inset Flex Code
25293 \begin_layout Plain Layout
25299 have built-in support for both PDF and DVI reverse search.
25302 Sync\SpecialChar TeX
25305 facility is basically the result of the integration of the PDFSync package
25306 to the pdftex program and its merge with the
25311 You need at least \SpecialChar TeX
25312 Live 2008 or a recent Mik\SpecialChar TeX
25313 distribution in order to use
25318 \begin_layout Plain Layout
25319 For some reason, Mik\SpecialChar TeX
25320 does not understand/obey the command \SpecialChar LyX
25322 the preamble when you check the "Enable Forward/Reverse Search" button
25323 in the toolbar and does not generate the necessary info.
25326 \begin_layout Plain Layout
25327 The generation of the required info can be forced by changing the converter
25328 "\SpecialChar LaTeX
25329 (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
25330 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
25331 the -synctex=1 switch).
25336 Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
25337 on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
25341 \begin_layout Standard
25342 To enable Sync\SpecialChar TeX
25343 for DVI output, change the
25344 \begin_inset Flex Noun
25347 \begin_layout Plain Layout
25358 \begin_inset Flex Noun
25361 \begin_layout Plain Layout
25366 (plain) -> DraftDVI
25372 \begin_inset Flex Noun
25375 \begin_layout Plain Layout
25376 Preferences\SpecialChar menuseparator
25377 File Handling\SpecialChar menuseparator
25384 \begin_inset Flex Code
25387 \begin_layout Plain Layout
25388 latex -synctex=1 $$i
25393 , and for PDF output, change the
25394 \begin_inset Flex Noun
25397 \begin_layout Plain Layout
25402 (pdflatex) -> PDF (pdflatex)
25408 \begin_inset Flex Code
25411 \begin_layout Plain Layout
25412 pdflatex -synctex=1 $$i
25418 Check the documentation of your viewer whether the viewer needs to be configure
25419 d for the use with Sync\SpecialChar TeX
25424 \begin_layout Plain Layout
25425 Note that the option
25426 \begin_inset Flex Code
25429 \begin_layout Plain Layout
25435 option enables gzip compression.
25436 If your viewer does not support it, you should instead use
25437 \begin_inset Flex Code
25440 \begin_layout Plain Layout
25454 \begin_layout Subsection
25455 Configuring and using specific viewers
25456 \begin_inset CommandInset label
25458 name "subsec:configuring-viewers"
25465 \begin_layout Subsubsection*
25466 Xdvi (all platforms)
25469 \begin_layout Standard
25471 \begin_inset Flex Code
25474 \begin_layout Plain Layout
25480 , you don't need to do anything else for performing a reverse DVI search,
25481 as \SpecialChar LyX
25482 already provides the necessary hooks for automatically using the
25483 \begin_inset Flex Code
25486 \begin_layout Plain Layout
25493 Just setup your document as described above (reverse search is triggered
25494 by Ctrl-click or Alt-click on Mac OSX, respectively).
25497 \begin_layout Standard
25498 However, if for whatever reason you want to use the named pipe instead of
25499 the socket for communicating with \SpecialChar LyX
25500 , simply change the DVI viewer in
25501 \begin_inset Flex Noun
25504 \begin_layout Plain Layout
25505 Preferences\SpecialChar menuseparator
25506 File Handling\SpecialChar menuseparator
25516 \begin_layout Plain Layout
25517 On Mac OSX you have to use
25518 \begin_inset Flex Code
25521 \begin_layout Plain Layout
25522 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
25533 \begin_inset Flex Code
25536 \begin_layout Plain Layout
25537 xdvi -editor "lyxeditor.sh %f %l"
25543 \begin_inset Flex Code
25546 \begin_layout Plain Layout
25552 is a suitable script.
25553 For example, a minimal shell script is the following one:
25556 \begin_layout LyX-Code
25558 \begin_inset Newline newline
25561 LYXPIPE="/path/to/lyxpipe"
25562 \begin_inset Newline newline
25565 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
25566 \begin_inset Newline newline
25569 echo "$COMMAND" > "${LYXPIPE}".in || exit
25570 \begin_inset Newline newline
25573 read TMP < "${LYXPIPE}".out || exit
25576 \begin_layout Standard
25578 \begin_inset Flex Code
25581 \begin_layout Plain Layout
25587 is the LyXServer pipe path specified in
25588 \begin_inset Flex Noun
25591 \begin_layout Plain Layout
25592 Preferences\SpecialChar menuseparator
25602 \begin_layout Plain Layout
25604 \begin_inset Flex Code
25607 \begin_layout Plain Layout
25613 folder of a source distribution you can find a
25614 \begin_inset Flex Code
25617 \begin_layout Plain Layout
25623 script which is able to locate the
25627 based on your preferences.
25635 \begin_layout Subsubsection*
25639 \begin_layout Standard
25641 \begin_inset Flex Code
25644 \begin_layout Plain Layout
25645 /Applications/MacDviX_Folder/calleditor.script
25650 , add the following lines:
25653 \begin_layout LyX-Code
25654 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
25655 \begin_inset Newline newline
25661 \begin_layout Standard
25662 Modify the lines accordingly if you install \SpecialChar LyX
25663 somewhere else than in the
25664 Applications folder.
25667 \begin_layout Standard
25668 Reverse search is triggered by Alt-click (OPTION-click).
25671 \begin_layout Subsubsection*
25675 \begin_layout Standard
25677 \begin_inset Flex Code
25680 \begin_layout Plain Layout
25681 open -a Skim.app $$i
25686 to the viewer setting in
25687 \begin_inset Flex Noun
25690 \begin_layout Plain Layout
25691 Preferences\SpecialChar menuseparator
25692 File Handling\SpecialChar menuseparator
25693 File formats\SpecialChar menuseparator
25700 \begin_inset Flex Noun
25703 \begin_layout Plain Layout
25704 Skim\SpecialChar menuseparator
25705 Preferences\SpecialChar menuseparator
25712 \begin_inset Flex Noun
25715 \begin_layout Plain Layout
25721 preset and enter command
25722 \begin_inset Flex Noun
25725 \begin_layout Plain Layout
25726 /Applications/\SpecialChar LyX
25727 .app/Contents/MacOS/lyxeditor
25735 \begin_layout Standard
25736 Reverse search is triggered by COMMAND-SHIFT-click
25739 \begin_layout Subsubsection*
25743 \begin_layout Standard
25745 \begin_inset Flex Noun
25748 \begin_layout Plain Layout
25749 Settings\SpecialChar menuseparator
25750 Configure Okular\SpecialChar menuseparator
25757 \begin_inset Quotes eld
25761 \begin_inset Quotes erd
25764 and add the command
25765 \begin_inset Flex Code
25768 \begin_layout Plain Layout
25777 \begin_layout Standard
25778 Reverse search is triggered by SHIFT-click.
25781 \begin_layout Subsubsection*
25785 \begin_layout Standard
25786 Qpdfview supports Sync\SpecialChar TeX
25787 since version 0.3.5.
25789 \begin_inset Flex Noun
25792 \begin_layout Plain Layout
25793 Edit\SpecialChar menuseparator
25794 Settings\SpecialChar menuseparator
25800 , click on the input field of the
25801 \begin_inset Quotes eld
25805 \begin_inset Quotes erd
25808 item and add the command
25809 \begin_inset Flex Code
25812 \begin_layout Plain Layout
25821 \begin_layout Standard
25822 Reverse search is triggered by double-click.
25825 \begin_layout Subsubsection*
25829 \begin_layout Standard
25830 Launch yap, choose its
25831 \begin_inset Flex Noun
25834 \begin_layout Plain Layout
25835 View\SpecialChar menuseparator
25841 menu and select the
25842 \begin_inset Quotes eld
25846 \begin_inset Quotes erd
25851 \begin_inset Quotes eld
25854 New\SpecialChar ldots
25856 \begin_inset Quotes erd
25859 button and, in the window that opens, enter
25860 \begin_inset Quotes eld
25865 \begin_inset Quotes erd
25868 (or any other name you like) in the
25869 \begin_inset Quotes eld
25873 \begin_inset Quotes erd
25877 Now click on the button labeled
25878 \begin_inset Quotes eld
25883 \begin_inset Quotes erd
25886 to open a file dialog and navigate to the directory containing the batch
25888 \begin_inset Flex Code
25891 \begin_layout Plain Layout
25899 \begin_inset Flex Code
25902 \begin_layout Plain Layout
25908 and then specify the program arguments as
25909 \begin_inset Flex Code
25912 \begin_layout Plain Layout
25920 \begin_inset Flex Code
25923 \begin_layout Plain Layout
25929 wrapper is used for communicating with \SpecialChar LyX
25937 \begin_layout LyX-Code
25939 \begin_inset Newline newline
25942 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
25951 \begin_inset Newline newline
25965 \begin_layout Standard
25966 Make sure that the \SpecialChar LyX
25967 Server pipe path you specified in \SpecialChar LyX
25969 \begin_inset Flex Code
25972 \begin_layout Plain Layout
25986 , otherwise change the
25987 \begin_inset Flex Code
25990 \begin_layout Plain Layout
25996 wrapper accordingly.
25999 \begin_layout Standard
26000 In yap, reverse search is triggered by double-click.
26003 \begin_layout Subsubsection*
26004 SumatraPDF (Windows)
26007 \begin_layout Standard
26008 In order to use SumatraPDF for inverse search, enter
26009 \begin_inset Flex Code
26012 \begin_layout Plain Layout
26013 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
26018 in the viewer setting in
26019 \begin_inset Flex Noun
26022 \begin_layout Plain Layout
26023 Preferences\SpecialChar menuseparator
26024 File Handling\SpecialChar menuseparator
26025 File formats\SpecialChar menuseparator
26032 \begin_inset Flex Code
26035 \begin_layout Plain Layout
26041 is the previous wrapper.
26042 If SumatraPDF.exe is not in your command PATH, use its full file name.
26045 \begin_layout Standard
26046 Reverse search is triggered by double-click.
26049 \begin_layout Subsubsection*
26053 \begin_layout Standard
26054 First of all, make sure that yap is your default DVI viewer in the Windows
26055 environment, then launch it, choose its
26056 \begin_inset Flex Noun
26059 \begin_layout Plain Layout
26060 View\SpecialChar menuseparator
26066 menu and select the
26067 \begin_inset Quotes eld
26071 \begin_inset Quotes erd
26076 \begin_inset Quotes eld
26079 New\SpecialChar ldots
26081 \begin_inset Quotes erd
26084 button and, in the window that opens, enter
26085 \begin_inset Quotes eld
26090 \begin_inset Quotes erd
26093 (or any other name you like) in the
26094 \begin_inset Quotes eld
26098 \begin_inset Quotes erd
26102 Now click on the button labeled
26103 \begin_inset Quotes eld
26108 \begin_inset Quotes erd
26111 to open a file dialog and navigate to the directory containing the
26112 \begin_inset Flex Code
26115 \begin_layout Plain Layout
26121 program (which is installed by default on Cygwin along with the \SpecialChar LyX
26124 \begin_inset Flex Code
26127 \begin_layout Plain Layout
26133 and then specify the program arguments as
26134 \begin_inset Flex Code
26137 \begin_layout Plain Layout
26144 In this way, you will be using the
26148 for communicating with \SpecialChar LyX
26150 If, for whatever reason, you want to use the
26155 \begin_inset Flex Code
26158 \begin_layout Plain Layout
26164 option and be sure to specify the \SpecialChar LyX
26165 Server pipe path in the \SpecialChar LyX
26169 \begin_layout Standard
26170 In yap, reverse search is triggered by double-click.
26173 \begin_layout Subsubsection*
26174 SumatraPDF (Cygwin)
26177 \begin_layout Standard
26178 In order to use SumatraPDF for inverse search, enter
26179 \begin_inset Flex Code
26182 \begin_layout Plain Layout
26183 SumatraPDF -inverse-search "lyxeditor -g %f %l"
26188 in the viewer setting in
26189 \begin_inset Flex Noun
26192 \begin_layout Plain Layout
26193 Preferences\SpecialChar menuseparator
26194 File Handling\SpecialChar menuseparator
26195 File formats\SpecialChar menuseparator
26202 If SumatraPDF.exe is not in your command PATH, use its full posix path.
26204 \begin_inset Flex Code
26207 \begin_layout Plain Layout
26213 enables communication via the
26219 \begin_inset Flex Code
26222 \begin_layout Plain Layout
26228 option if you want to use the
26232 , and be sure to specify the \SpecialChar LyX
26233 Server pipe path in the \SpecialChar LyX
26237 \begin_layout Standard
26238 Reverse search is triggered by double-click.
26241 \begin_layout Section
26245 \begin_layout Standard
26246 Forward search is, as the name implies, in a sense the
26247 \begin_inset Quotes eld
26251 \begin_inset Quotes erd
26255 It allows you to let the viewer jump to a given position from within \SpecialChar LyX
26257 If forward search is set up (as described in what follows), you can put
26258 the cursor anywhere in your \SpecialChar LyX
26260 \begin_inset Flex Noun
26263 \begin_layout Plain Layout
26264 Navigate\SpecialChar menuseparator
26271 \begin_inset Flex Noun
26274 \begin_layout Plain Layout
26280 in the context menu via right mouse click), and then the viewer will jump
26281 to that position as well.
26282 This implies, of course, that your viewer supports this function.
26285 \begin_layout Standard
26286 To make forward search possible, you first need to provide the generated
26287 output PDF/DVI file with additional information about the \SpecialChar TeX
26289 This can be done via the methods described in the section
26290 \begin_inset CommandInset ref
26292 reference "subsec:rev-search"
26299 \begin_layout Standard
26300 Additionally, you need to configure \SpecialChar LyX
26301 for using your viewers in
26302 \begin_inset Flex Noun
26305 \begin_layout Plain Layout
26306 Tools\SpecialChar menuseparator
26307 Preferences\SpecialChar menuseparator
26308 Output\SpecialChar menuseparator
26315 We provide a range of tested configurations for some viewers, which you
26316 can select from the drop down list.
26317 If none of these configurations suits you, you have to find out and enter
26318 a suitable configuration yourself.
26319 The definition syntax uses the following placeholders:
26322 \begin_layout Itemize
26324 \begin_inset Flex Code
26327 \begin_layout Plain Layout
26336 \begin_layout Itemize
26338 \begin_inset Flex Code
26341 \begin_layout Plain Layout
26347 : name of the (temporary) exported .tex file (without path)
26350 \begin_layout Itemize
26352 \begin_inset Flex Code
26355 \begin_layout Plain Layout
26361 : name of the (temporary) exported .tex file (including path)
26364 \begin_layout Itemize
26366 \begin_inset Flex Code
26369 \begin_layout Plain Layout
26375 : name of the exported output file (either dvi or pdf, depending on which
26376 one exists in the temporary directory)
26379 \begin_layout Standard
26380 Note that only some of the viewers provide full forward search functionality,
26381 among them yap, xdvi, okular
26385 \begin_layout Plain Layout
26386 You might want to set
26387 \begin_inset Flex Code
26390 \begin_layout Plain Layout
26397 \begin_inset Flex Noun
26400 \begin_layout Plain Layout
26401 Tools\SpecialChar menuseparator
26402 Preferences\SpecialChar menuseparator
26403 File Handling\SpecialChar menuseparator
26405 \begin_inset space ~
26418 , qpdfview and SumatraPDF
26422 \begin_layout Plain Layout
26423 SumatraPDF can also use DDE commands through the external program CMCDDE
26424 — downloadable from
26425 \begin_inset CommandInset href
26427 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
26437 While many of the widespread PDF viewers (most notably Adobe Reader) do
26438 not support forward search at all, some other viewers – e.
26439 \begin_inset space \thinspace{}
26443 evince and xpdf – allow at least to reload the document and jump to a specific
26444 page of the file, so you can at least navigate
26445 \begin_inset Quotes eld
26449 \begin_inset Quotes erd
26453 This latter functionality is provided by an external call of synctex (see
26454 the predefined example configurations).
26458 \begin_layout Standard
26459 Forward search works both with DVI and PDF output.
26461 simply checks which preview format you have used before (i.
26462 \begin_inset space \thinspace{}
26465 e., which format is already there in the temporary directory) and chooses
26466 the appropriate configuration for the respective format.