1 #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the User's Guide prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the User's Guide may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % redefine the \LyX macro for PDF bookmarks
35 \def\LyX{\texorpdfstring{%
36 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39 % used for multi-column text
43 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
49 InsetLayout CharStyle:MenuItem
58 \newcommand*{\menuitem}[1]{{\sffamily #1}}
66 \font_typewriter default
67 \font_default_family default
77 \pdf_title "LyX Configuration Manual"
78 \pdf_author "LyX Team"
79 \pdf_subject "LyX-documentation Customization"
80 \pdf_keywords "LyX, documentation, customization"
82 \pdf_bookmarksnumbered true
83 \pdf_bookmarksopen true
84 \pdf_bookmarksopenlevel 1
89 \pdf_pagebackref false
90 \pdf_pdfusetitle false
91 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
98 \paperorientation portrait
105 \paragraph_separation indent
107 \quotes_language english
110 \paperpagestyle headings
111 \tracking_changes true
112 \output_changes false
120 Customizing LyX: Features for the Advanced User
128 \begin_layout Plain Layout
130 If you have comments or error corrections, please send them to the LyX Documenta
132 \begin_inset CommandInset href
134 target "lyx-docs@lists.lyx.org"
147 \begin_layout Standard
148 \begin_inset CommandInset toc
149 LatexCommand tableofcontents
156 \begin_layout Chapter
160 \begin_layout Standard
161 This manual covers the customization features present in LyX.
162 In it, we discuss issues like keyboard shortcuts, screen previewing options,
163 printer options, sending commands to LyX via the LyX Server, internationalizati
164 on, installing new LaTeX classes and LyX layouts, etc.
165 We can't possibly hope to touch on everything you can change---our developers
166 add new features faster than we can document them---but we will explain
167 the most common customizations and hopefully point you in the right direction
168 for some of the more obscure ones.
171 \begin_layout Standard
172 \begin_inset Branch OutDated
175 \begin_layout Standard
176 Information from previous versions of this document that now seems to be
177 outdated is contained in the OutDated branch of this document.
178 By default, this information will not appear in the LaTeX output.
186 \begin_layout Chapter
187 LyX configuration files
190 \begin_layout Standard
191 This chapter aims to help you to find your way through the LyX configuration
193 Before continuing to read this chapter, you should find out where your
194 LyX library and user directories are by using
195 \begin_inset Flex CharStyle:MenuItem
198 \begin_layout Plain Layout
203 elp\SpecialChar \menuseparator
216 The library directory is the place where LyX places its system-wide configurati
217 on files; the user directory is where you can place your modified versions.
218 We will call the former
219 \begin_inset Flex CharStyle:Code
222 \begin_layout Plain Layout
229 \begin_inset Flex CharStyle:MenuItem
232 \begin_layout Plain Layout
238 in the remainder of this document.
242 \begin_layout Section
244 \begin_inset Flex CharStyle:Code
247 \begin_layout Plain Layout
256 \begin_layout Standard
257 \begin_inset Flex CharStyle:Code
260 \begin_layout Plain Layout
266 and its sub-directories contain a number of files and that can be used
267 to customise LyX's behaviour.
268 You can change many of these files from within LyX itself through the
269 \begin_inset Flex CharStyle:MenuItem
272 \begin_layout Plain Layout
277 ools\SpecialChar \menuseparator
288 Most customization that you will want to do in LyX is possible through
290 However, many other inner aspects of LyX can be customized by modifying
292 \begin_inset Flex CharStyle:Code
295 \begin_layout Plain Layout
302 These files fall in different categories, described in the following subsection
306 \begin_layout Subsection
307 Automatically generated files
310 \begin_layout Standard
311 The files, which are to be found in
312 \begin_inset Flex CharStyle:MenuItem
315 \begin_layout Plain Layout
321 , are generated when you configure LyX.
322 They contain various default values that are guessed by inspection.
323 In general, it is not a good idea to modify them, since they might be overwritt
327 \begin_layout Labeling
328 \labelwidthstring 00.00.0000
329 \begin_inset Flex CharStyle:Code
332 \begin_layout Plain Layout
338 contains defaults for various commands.
341 \begin_layout Labeling
342 \labelwidthstring 00.00.0000
343 \begin_inset Flex CharStyle:Code
346 \begin_layout Plain Layout
352 contains the list of packages that have been recognized by LyX.
353 It is currently unused by the LyX program itself, but the information extracted
354 , and more, is made available with
355 \begin_inset Flex CharStyle:MenuItem
358 \begin_layout Plain Layout
363 elp\SpecialChar \menuseparator
380 \begin_layout Labeling
381 \labelwidthstring 00.00.0000
382 \begin_inset Flex CharStyle:Code
385 \begin_layout Plain Layout
391 the list of text classes that have been found in your
392 \begin_inset Flex CharStyle:Code
395 \begin_layout Plain Layout
401 directories, along with the associated LaTeX document class and their descripti
405 \begin_layout Labeling
406 \labelwidthstring 00.00.0000
407 \begin_inset Flex CharStyle:Code
410 \begin_layout Plain Layout
416 the list of layout modules found in your
417 \begin_inset Flex CharStyle:Code
420 \begin_layout Plain Layout
429 \begin_layout Labeling
430 \labelwidthstring 00.00.0000
431 \begin_inset Flex CharStyle:Code
434 \begin_layout Plain Layout
440 lists of various sorts of LaTeX-related files found on your system
443 \begin_layout Labeling
444 \labelwidthstring 00.00.0000
445 \begin_inset Flex CharStyle:Code
448 \begin_layout Plain Layout
454 is automatically generated during configuration from the file
455 \begin_inset Flex CharStyle:Code
458 \begin_layout Plain Layout
465 It contains information on your LaTeX configuration.
468 \begin_layout Subsection
472 \begin_layout Standard
473 These directories are duplicated between
474 \begin_inset Flex CharStyle:Code
477 \begin_layout Plain Layout
484 \begin_inset Flex CharStyle:Code
487 \begin_layout Plain Layout
494 If a particular files exists in both places, the one in
495 \begin_inset Flex CharStyle:Code
498 \begin_layout Plain Layout
507 \begin_layout Labeling
508 \labelwidthstring 00.00.0000
509 \begin_inset Flex CharStyle:Code
512 \begin_layout Plain Layout
518 this directory contains files with the extension
519 \begin_inset Flex CharStyle:Code
522 \begin_layout Plain Layout
528 that define the keybindings used in LyX.
529 If there exists an internationalized version of the bind file named
530 \begin_inset Flex CharStyle:Code
533 \begin_layout Plain Layout
539 , that will be used first.
542 \begin_layout Labeling
543 \labelwidthstring 00.00.0000
544 \begin_inset Flex CharStyle:Code
547 \begin_layout Plain Layout
553 contains graphics files that can be included in documents.
557 \begin_layout Labeling
558 \labelwidthstring 00.00.0000
559 \begin_inset Flex CharStyle:Code
562 \begin_layout Plain Layout
568 contains LyX documentation files (including the one you are currently reading).
570 \begin_inset Flex CharStyle:Code
573 \begin_layout Plain Layout
579 deserves special attention, as noted above.
580 If there exists an internationalized version of the help-document with
582 \begin_inset Flex CharStyle:Code
585 \begin_layout Plain Layout
591 prepended to the name, that will be used first.
597 \begin_inset CommandInset ref
599 reference "chap:i18n"
606 \begin_layout Labeling
607 \labelwidthstring 00.00.0000
608 \begin_inset Flex CharStyle:Code
611 \begin_layout Plain Layout
617 contains example files that explain how to use some features.
618 In the file browser, press the
619 \begin_inset Flex CharStyle:MenuItem
622 \begin_layout Plain Layout
631 \begin_layout Labeling
632 \labelwidthstring 00.00.0000
633 \begin_inset Flex CharStyle:Code
636 \begin_layout Plain Layout
642 contains image files that are used by the
643 \begin_inset Flex CharStyle:MenuItem
646 \begin_layout Plain Layout
653 In addition, it also contains the individual icons used in the toolbar
654 and the banners that can be shown when LyX is launched.
657 \begin_layout Labeling
658 \labelwidthstring 00.00.0000
659 \begin_inset Flex CharStyle:Code
662 \begin_layout Plain Layout
668 contains keyboard keymapping files.
674 \begin_inset CommandInset ref
676 reference "sec:keymap"
683 \begin_layout Labeling
684 \labelwidthstring 00.00.0000
685 \begin_inset Flex CharStyle:Code
688 \begin_layout Plain Layout
694 contains the text class and module files described in Chapter
699 \begin_inset CommandInset ref
701 reference "chap:textclass"
708 \begin_layout Labeling
709 \labelwidthstring 00.00.0000
710 \begin_inset Flex CharStyle:Code
713 \begin_layout Plain Layout
720 \begin_inset Flex CharStyle:Code
723 \begin_layout Plain Layout
729 Python scripts used to convert between LyX versions.
730 These can be run from the command line if, say, you want to batch-convert
734 \begin_layout Labeling
735 \labelwidthstring 00.00.0000
736 \begin_inset Flex CharStyle:Code
739 \begin_layout Plain Layout
745 contains some files that demonstrate the capabilities of the
746 \begin_inset Flex CharStyle:MenuItem
749 \begin_layout Plain Layout
760 Also contains some scripts used by LyX itself.
763 \begin_layout Labeling
764 \labelwidthstring 00.00.0000
765 \begin_inset Flex CharStyle:Code
768 \begin_layout Plain Layout
774 contains the standard LyX template files described in Chapter
779 \begin_inset CommandInset ref
781 reference "sec:templates"
788 \begin_layout Labeling
789 \labelwidthstring 00.00.0000
790 \begin_inset Flex CharStyle:Code
793 \begin_layout Plain Layout
799 contains files with the extension
800 \begin_inset Flex CharStyle:Code
803 \begin_layout Plain Layout
809 that define the user interface to LyX.
810 That is, the files define which items appear in which menus and the items
811 appearing on the toolbar.
814 \begin_layout Subsection
815 Files you don't want to modify
818 \begin_layout Standard
819 These files are used internally by LyX and you generally do not need to
820 modify them unless you are a developer.
823 \begin_layout Labeling
824 \labelwidthstring 00.00.0000
825 \begin_inset Flex CharStyle:Code
828 \begin_layout Plain Layout
834 this file contains the list of LyX developers.
835 The contents are displayed with the menu entry
836 \begin_inset Flex CharStyle:MenuItem
839 \begin_layout Plain Layout
844 elp\SpecialChar \menuseparator
857 \begin_layout Labeling
858 \labelwidthstring 00.00.0000
859 \begin_inset Flex CharStyle:Code
862 \begin_layout Plain Layout
868 this is a LaTeX script used during the configuration process.
872 \begin_layout Labeling
873 \labelwidthstring 00.00.0000
874 \begin_inset Flex CharStyle:Code
877 \begin_layout Plain Layout
883 this is the script that is used to re-configure LyX.
884 It creates configuration files in the directory it was run from.
887 \begin_layout Subsection
888 Other files needing a line or two...
891 \begin_layout Labeling
892 \labelwidthstring 00.00.0000
893 \begin_inset Flex CharStyle:Code
896 \begin_layout Plain Layout
902 this contains tables describing how different character encodings can be
906 \begin_layout Labeling
907 \labelwidthstring 00.00.0000
908 \begin_inset Flex CharStyle:Code
911 \begin_layout Plain Layout
917 this file contains the templates available to the new
918 \begin_inset Flex CharStyle:MenuItem
921 \begin_layout Plain Layout
934 \begin_layout Labeling
935 \labelwidthstring 00.00.0000
936 \begin_inset Flex CharStyle:Code
939 \begin_layout Plain Layout
945 this file contains a list of all the languages currently supported by LyX.
948 \begin_layout Section
949 Your local configuration directory
952 \begin_layout Standard
953 Even if you are using LyX as an unprivileged user, you might want to change
954 LyX configuration for your own use.
956 \begin_inset Flex CharStyle:Code
959 \begin_layout Plain Layout
965 directory contains all your personal configuration files.
966 This is the directory described as
967 \begin_inset Quotes eld
971 \begin_inset Quotes erd
975 \begin_inset Flex CharStyle:MenuItem
978 \begin_layout Plain Layout
983 elp\SpecialChar \menuseparator
994 This directory is used as a mirror of
995 \begin_inset Flex CharStyle:Code
998 \begin_layout Plain Layout
1004 , which means that every file in
1005 \begin_inset Flex CharStyle:Code
1008 \begin_layout Plain Layout
1014 is a replacement for the corresponding file in
1015 \begin_inset Flex CharStyle:Code
1018 \begin_layout Plain Layout
1025 Any configuration file described in the above sections can be placed either
1026 in the system-wide directory, in which case it will affect all users, or
1027 in your local directory for your own use.
1030 \begin_layout Standard
1031 To make things clearer, let's provide a few examples:
1034 \begin_layout Itemize
1035 The preferences set in the
1036 \begin_inset Flex CharStyle:MenuItem
1039 \begin_layout Plain Layout
1044 ools\SpecialChar \menuseparator
1054 dialog are saved to a file
1055 \begin_inset Flex CharStyle:Code
1058 \begin_layout Plain Layout
1065 \begin_inset Flex CharStyle:Code
1068 \begin_layout Plain Layout
1077 \begin_layout Itemize
1078 When you reconfigure using
1079 \begin_inset Flex CharStyle:MenuItem
1082 \begin_layout Plain Layout
1087 ools\SpecialChar \menuseparator
1098 \begin_inset Flex CharStyle:Code
1101 \begin_layout Plain Layout
1107 script, and the resulting files are written in your local configuration
1109 This means that any additional text class file that you might have added
1111 \begin_inset Flex CharStyle:Code
1114 \begin_layout Plain Layout
1120 will be added to the list of classes in the
1121 \begin_inset Flex CharStyle:MenuItem
1124 \begin_layout Plain Layout
1129 ocument\SpecialChar \menuseparator
1142 \begin_layout Itemize
1143 If you get some updated documentation from LyX ftp site and cannot install
1144 it because you do not have sysadmin rights on your system, you can just
1146 \begin_inset Flex CharStyle:Code
1149 \begin_layout Plain Layout
1155 and the items in the
1156 \begin_inset Flex CharStyle:MenuItem
1159 \begin_layout Plain Layout
1169 menu will open them!
1172 \begin_layout Section
1173 Running LyX with multiple configurations
1176 \begin_layout Standard
1177 The configuration freedom of the local configuration directory may not suffice
1178 if you want to have more than one configuration at your disposal.
1179 For example, you may want to be use different key bindings or printer settings
1181 You can achieve this by having several such directories.
1182 You then specify which directory to use at run-time.
1185 \begin_layout Standard
1186 Invoking LyX with the command line switch
1187 \begin_inset Flex CharStyle:Code
1190 \begin_layout Plain Layout
1200 instructs the program to read the configuration from that directory, and
1201 not from the default directory.
1202 (You can determine the default directory by running LyX without the
1203 \begin_inset Flex CharStyle:Code
1206 \begin_layout Plain Layout
1212 switch.) If the specified directory does not exist, LyX offers to create
1213 it for you, just like it does for the default directory on the first time
1214 you run the program.
1215 You can modify the configuration options in this additional user directory
1216 exactly as you would for the default directory.
1217 These directories are completely independent (but read on).
1218 Note that setting the environment variable
1219 \begin_inset Flex CharStyle:Code
1222 \begin_layout Plain Layout
1228 to some value has exactly the same effect.
1231 \begin_layout Standard
1232 Having several configurations also requires more maintenance: if you want
1233 to add a new layout to
1234 \begin_inset Flex CharStyle:Code
1237 \begin_layout Plain Layout
1243 which you want available from all your configurations, you must add it
1244 to each directory separately.
1245 You can avoid this with the following trick: after LyX creates the additional
1246 directory, most of the subdirectories (see above) are empty.
1247 If you want the new configuration to mirror an existing one, replace the
1248 empty subdirectory with a symbolic link to the matching subdirectory in
1249 the existing configuration.
1251 \begin_inset Flex CharStyle:Code
1254 \begin_layout Plain Layout
1260 subirectory, however, since it contains a file written by the configuration
1261 script (also accessible through
1262 \begin_inset Flex CharStyle:MenuItem
1265 \begin_layout Plain Layout
1270 ools\SpecialChar \menuseparator
1280 ) which is configuration-specific.
1283 \begin_layout Chapter
1284 The Preferences dialog
1287 \begin_layout Standard
1288 All options of the preferences dialog are described in the Appendix
1290 The Preferences Dialog
1297 For some options you might find here more details.
1300 \begin_layout Section
1301 Using the dialog for the first time
1304 \begin_layout Standard
1306 \begin_inset Flex CharStyle:Code
1309 \begin_layout Plain Layout
1315 file will contain only changes that you have made to the default behavior,
1316 some of which is hard-coded into LyX and some of which is contained in
1318 \begin_inset Flex CharStyle:Code
1321 \begin_layout Plain Layout
1322 LyXDir/lyxrc.defaults
1328 Note that in both files lines beginning with a
1329 \begin_inset Quotes eld
1333 \begin_inset Quotes erd
1336 are just comments and are not interpreted.
1337 However, only system administrators should edit
1338 \begin_inset Flex CharStyle:Code
1341 \begin_layout Plain Layout
1342 LyXDir/lyxrc.defaults
1348 Users should use the
1349 \begin_inset Flex CharStyle:MenuItem
1352 \begin_layout Plain Layout
1353 Tools\SpecialChar \menuseparator
1359 dialog to create and modify their own
1360 \begin_inset Flex CharStyle:Code
1363 \begin_layout Plain Layout
1372 \begin_layout Standard
1374 \begin_inset Flex CharStyle:MenuItem
1377 \begin_layout Plain Layout
1378 Tools\SpecialChar \menuseparator
1384 dialog will be largely self-explanatory.
1385 Most things in the dialog have associated `tool tips': hover your mouse
1386 pointer over something for more information.
1387 Before we highlight a few of the more important commands below, however,
1388 a word of warning: Applying some of your changes (e.g., screen fonts) will
1389 have an instant effect.
1391 changing the bind file) will not.
1392 If nothing appears to have changed, just
1393 \begin_inset Flex CharStyle:MenuItem
1396 \begin_layout Plain Layout
1402 the changes and restart LyX.
1405 \begin_layout Section
1409 \begin_layout Standard
1410 LyX has a powerful mechanism to convert to and from any file format using
1415 \begin_layout Subsection
1416 \begin_inset CommandInset label
1425 \begin_layout Standard
1426 The first step is to define your file formats if they are not already defined.
1428 \begin_inset Flex CharStyle:MenuItem
1431 \begin_layout Plain Layout
1432 Tools\SpecialChar \menuseparator
1433 Preferences\SpecialChar \menuseparator
1434 File Handling\SpecialChar \menuseparator
1442 \begin_inset Flex CharStyle:MenuItem
1445 \begin_layout Plain Layout
1446 New\SpecialChar \ldots{}
1452 button to define your new format.
1454 \begin_inset Flex CharStyle:MenuItem
1457 \begin_layout Plain Layout
1463 field contains the named used to identify the format in the GUI.
1465 \begin_inset Flex CharStyle:MenuItem
1468 \begin_layout Plain Layout
1474 is used to identify the format interally.
1475 You will also need to enter a file extension.
1476 These are all required.
1478 \begin_inset Flex CharStyle:MenuItem
1481 \begin_layout Plain Layout
1487 field is used to provide a keyboard shortcut on the menus.
1488 (For example, pressing
1489 \begin_inset Flex CharStyle:MenuItem
1492 \begin_layout Plain Layout
1499 \begin_inset Flex CharStyle:MenuItem
1502 \begin_layout Plain Layout
1503 View\SpecialChar \menuseparator
1512 \begin_layout Standard
1514 \begin_inset Flex CharStyle:MenuItem
1517 \begin_layout Plain Layout
1524 \begin_inset Flex CharStyle:MenuItem
1527 \begin_layout Plain Layout
1534 For example, you might want to use
1535 \begin_inset Flex CharStyle:MenuItem
1538 \begin_layout Plain Layout
1544 to view PostScript files.
1545 You can enter the command needed to start the program in the corresponding
1547 In defining this command, you can use the four variables listed in the
1549 The viewer is launched when you view an image in LyX or use the
1550 \begin_inset Flex CharStyle:MenuItem
1553 \begin_layout Plain Layout
1560 The editor is for example launched when you press the
1561 \begin_inset Flex CharStyle:MenuItem
1564 \begin_layout Plain Layout
1571 \begin_inset Flex CharStyle:MenuItem
1574 \begin_layout Plain Layout
1581 \begin_inset Flex CharStyle:MenuItem
1584 \begin_layout Plain Layout
1593 \begin_layout Standard
1595 \begin_inset Flex CharStyle:MenuItem
1598 \begin_layout Plain Layout
1604 option tells LyX that a format is suitable for document export.
1605 If this is is set and if a suitable conversion route exists (see
1606 \begin_inset CommandInset ref
1608 reference "sub:Converters"
1612 ), the format will appear in the
1613 \begin_inset Flex CharStyle:MenuItem
1616 \begin_layout Plain Layout
1617 File\SpecialChar \menuseparator
1624 The format will also appear in the
1625 \begin_inset Flex CharStyle:MenuItem
1628 \begin_layout Plain Layout
1634 menu if a viewer is specified for the format.
1635 Pure image formats, such as
1636 \begin_inset Flex CharStyle:Code
1639 \begin_layout Plain Layout
1645 , should not use this option.
1646 Formats that can both represent vector graphics and documents like
1647 \begin_inset Flex CharStyle:Code
1650 \begin_layout Plain Layout
1659 \begin_layout Standard
1661 \begin_inset Flex CharStyle:MenuItem
1664 \begin_layout Plain Layout
1665 Vector graphics format
1670 tells LyX that a format can contain vector graphics.
1671 This information is used to determine the target format of included graphics
1673 \begin_inset Flex CharStyle:MenuItem
1676 \begin_layout Plain Layout
1683 Included graphics may need to be converted to either
1684 \begin_inset Flex CharStyle:MenuItem
1687 \begin_layout Plain Layout
1694 \begin_inset Flex CharStyle:MenuItem
1697 \begin_layout Plain Layout
1704 \begin_inset Flex CharStyle:MenuItem
1707 \begin_layout Plain Layout
1714 \begin_inset Flex CharStyle:MenuItem
1717 \begin_layout Plain Layout
1723 cannot handle other image formats.
1724 If an included graphic is not already in
1725 \begin_inset Flex CharStyle:MenuItem
1728 \begin_layout Plain Layout
1735 \begin_inset Flex CharStyle:MenuItem
1738 \begin_layout Plain Layout
1745 \begin_inset Flex CharStyle:MenuItem
1748 \begin_layout Plain Layout
1754 format, it is converted to
1755 \begin_inset Flex CharStyle:MenuItem
1758 \begin_layout Plain Layout
1764 if the vector format option is set, and otherwise to
1765 \begin_inset Flex CharStyle:MenuItem
1768 \begin_layout Plain Layout
1777 \begin_layout Subsection
1781 \begin_layout Standard
1782 Since all conversions from one format to another take place in LyX's temporary
1783 directory, it is sometimes necessary to modify a file before copying it
1784 to the temporary directory in order that the conversion may be performed.
1788 \begin_layout Plain Layout
1789 For example, the file may refer to other files---images, for example---using
1790 relative file names, and these may become invalid when the file is copied
1791 to the temporary directory.
1796 This is done by a Copier: It copies a file to (or from) the temporary directory
1797 and may modify it in the process.
1800 \begin_layout Standard
1801 The definitions of the copiers may use four variables:
1804 \begin_layout Labeling
1805 \labelwidthstring 00.00.0000
1806 \begin_inset Flex CharStyle:Code
1809 \begin_layout Plain Layout
1815 The LyX system directory (e.
1816 \begin_inset space \thinspace{}
1820 \begin_inset space ~
1824 \begin_inset Flex CharStyle:MenuItem
1827 \begin_layout Plain Layout
1836 \begin_layout Labeling
1837 \labelwidthstring 00.00.0000
1838 \begin_inset Flex CharStyle:Code
1841 \begin_layout Plain Layout
1850 \begin_layout Labeling
1851 \labelwidthstring 00.00.0000
1852 \begin_inset Flex CharStyle:Code
1855 \begin_layout Plain Layout
1864 \begin_layout Labeling
1865 \labelwidthstring 00.00.0000
1866 \begin_inset Flex CharStyle:Code
1869 \begin_layout Plain Layout
1878 \begin_layout Standard
1879 The latter is to be given in a form suitable for inclusion in a LaTeX's
1886 command and is relevant only when exporting files suitable for such inclusion.
1889 \begin_layout Standard
1890 Copiers can be used to do almost anything with output files.
1891 For example, suppose you want generated pdf files to be copied to a special
1893 \begin_inset Flex CharStyle:Code
1896 \begin_layout Plain Layout
1903 Then you could write a shell script such as this one:
1906 \begin_layout Standard
1907 \begin_inset listings
1911 \begin_layout Plain Layout
1916 \begin_layout Plain Layout
1921 \begin_layout Plain Layout
1923 TOFILE=`basename $2`
1926 \begin_layout Plain Layout
1928 cp $FROMFILE /home/you/pdf/$TOFILE
1933 Save that in your local LyX directory---say,
1934 \begin_inset Flex CharStyle:Code
1937 \begin_layout Plain Layout
1938 /home/you/.lyx/scripts/pdfcopier.sh
1943 ---and make it executable, if you need to do so on your platform.
1945 \begin_inset Flex CharStyle:MenuItem
1948 \begin_layout Plain Layout
1949 Tools\SpecialChar \menuseparator
1956 \begin_inset Flex CharStyle:MenuItem
1959 \begin_layout Plain Layout
1965 format---or one of the other pdf formats---and enter
1966 \begin_inset Flex CharStyle:Code
1969 \begin_layout Plain Layout
1970 pdfcopier.sh $$i $$o
1976 \begin_inset Flex CharStyle:MenuItem
1979 \begin_layout Plain Layout
1989 \begin_layout Standard
1990 Copiers are used by LyX in various of its own conversions.
1991 For example, if appropriate programs are found, LyX will automatically
1992 install copiers for the
1993 \begin_inset Flex CharStyle:MenuItem
1996 \begin_layout Plain Layout
2003 \begin_inset Flex CharStyle:MenuItem
2006 \begin_layout Plain Layout
2008 \begin_inset space ~
2017 When these formats are exported, the copier sees that not just the main
2018 HTML file but various associated files (style files, images, etc.) are also
2020 All these files are written to a subdirectory of the directory in which
2021 the original LyX file was found.
2025 \begin_layout Plain Layout
2026 This copier can be customized.
2028 \begin_inset Quotes eld
2032 \begin_inset Quotes erd
2035 argument takes a comma-separated list of extensions to be copied; if it
2036 is omitted, all files will be copied.
2038 \begin_inset Quotes eld
2042 \begin_inset Quotes erd
2045 argument determines the extension added to the generated directory.
2047 \begin_inset Quotes eld
2051 \begin_inset Flex CharStyle:MenuItem
2054 \begin_layout Plain Layout
2061 \begin_inset Quotes erd
2064 , so HTML generated from
2065 \begin_inset Flex CharStyle:MenuItem
2068 \begin_layout Plain Layout
2069 /path/to/filename.lyx
2075 \begin_inset Flex CharStyle:MenuItem
2078 \begin_layout Plain Layout
2079 /path/to/filename.html.LyXconv
2093 \begin_layout Subsection
2094 \begin_inset CommandInset label
2096 name "sub:Converters"
2103 \begin_layout Standard
2104 You can define your own Converters to, uhh, convert files between different
2107 \begin_inset Flex CharStyle:MenuItem
2110 \begin_layout Plain Layout
2111 Tools\SpecialChar \menuseparator
2112 Preferences\SpecialChar \menuseparator
2113 File Handling\SpecialChar \menuseparator
2122 \begin_layout Standard
2123 To define a new converter, select the
2124 \begin_inset Flex CharStyle:MenuItem
2127 \begin_layout Plain Layout
2129 \begin_inset space ~
2138 \begin_inset space \thinspace{}
2142 \begin_inset Flex CharStyle:MenuItem
2145 \begin_layout Plain Layout
2147 \begin_inset space ~
2155 from the drop-down lists, enter the command needed for the conversion,
2157 \begin_inset Flex CharStyle:MenuItem
2160 \begin_layout Plain Layout
2167 Several variables can be used in the definition of converters:
2170 \begin_layout Labeling
2171 \labelwidthstring 00.00.0000
2172 \begin_inset Flex CharStyle:Code
2175 \begin_layout Plain Layout
2181 The LyX system directory
2184 \begin_layout Labeling
2185 \labelwidthstring 00.00.0000
2186 \begin_inset Flex CharStyle:Code
2189 \begin_layout Plain Layout
2198 \begin_layout Labeling
2199 \labelwidthstring 00.00.0000
2200 \begin_inset Flex CharStyle:Code
2203 \begin_layout Plain Layout
2212 \begin_layout Labeling
2213 \labelwidthstring 00.00.0000
2214 \begin_inset Flex CharStyle:Code
2217 \begin_layout Plain Layout
2223 The base filename of the input file (i.e., without the extension)
2226 \begin_layout Labeling
2227 \labelwidthstring 00.00.0000
2228 \begin_inset Flex CharStyle:Code
2231 \begin_layout Plain Layout
2237 The path to the input file
2240 \begin_layout Standard
2242 \begin_inset Flex CharStyle:MenuItem
2245 \begin_layout Plain Layout
2247 \begin_inset space ~
2255 field you can enter the following flags, separated by commas:
2258 \begin_layout Labeling
2259 \labelwidthstring 00.00.0000
2260 \begin_inset Flex CharStyle:Code
2263 \begin_layout Plain Layout
2269 This converter runs some form of LaTeX.
2270 This will make LyX's LaTeX error logs available.
2273 \begin_layout Labeling
2274 \labelwidthstring 00.00.0000
2275 \begin_inset Flex CharStyle:Code
2278 \begin_layout Plain Layout
2285 \begin_inset Flex CharStyle:MenuItem
2288 \begin_layout Plain Layout
2294 file for the conversion.
2297 \begin_layout Labeling
2298 \labelwidthstring 00.00.0000
2299 \begin_inset Flex CharStyle:Code
2302 \begin_layout Plain Layout
2311 \begin_layout Standard
2312 The following three flags are not really flags at all because they take
2314 \begin_inset Flex CharStyle:MenuItem
2317 \begin_layout Plain Layout
2319 \begin_inset space ~
2323 \begin_inset space ~
2334 \begin_layout Labeling
2335 \labelwidthstring 00.00.0000
2336 \begin_inset Flex CharStyle:Code
2339 \begin_layout Plain Layout
2345 If set, the converter's standard error will be redirected to a file
2346 \begin_inset Flex CharStyle:Code
2349 \begin_layout Plain Layout
2355 , and the script given as argument will be run as:
2356 \begin_inset Flex CharStyle:Code
2359 \begin_layout Plain Layout
2360 script <infile.out >infile.log
2366 The argument may contain
2367 \begin_inset Flex CharStyle:Code
2370 \begin_layout Plain Layout
2379 \begin_layout Labeling
2380 \labelwidthstring 00.00.0000
2381 \begin_inset Flex CharStyle:Code
2384 \begin_layout Plain Layout
2390 The name of the directory in which the converter will dump the generated
2392 LyX will not create this directory, and it does not copy anything into
2393 it, though it will copy this directory to the destination.
2394 The argument may contain
2395 \begin_inset Flex CharStyle:Code
2398 \begin_layout Plain Layout
2404 , which will be replaced by the base name of the input and output files,
2405 respectively, when the directory is copied.
2406 \begin_inset Newline newline
2409 Note that resultdir and usetempdir make no sense together.
2410 The latter will be ignored if the former is given.
2413 \begin_layout Labeling
2414 \labelwidthstring 00.00.0000
2415 \begin_inset Flex CharStyle:Code
2418 \begin_layout Plain Layout
2424 Determines the output file name and may, contain
2425 \begin_inset Flex CharStyle:Code
2428 \begin_layout Plain Layout
2435 Sensible only with resultdir and optional even then; if not given, it defaults
2439 \begin_layout Standard
2440 None of these last three are presently used in any of the converters that
2441 are installed with LyX.
2445 \begin_layout Standard
2446 You do not have to define converters between all the formats between which
2447 you want to convert.
2448 For example, you will note that there is no `LyX to PostScript®' converter,
2449 but LyX will export PostScript®.
2450 It does so by first creating a LaTeX file (no converter needs to be defined
2451 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2452 and finally converting the resulting DVI file to PostScript®.
2453 LyX finds such `chains' of converters automatically, and it will always
2454 choose the shortest possible chain.
2455 You can, though, still define multiple conversion methods between file
2457 For example, the standard LyX configuration provides three ways to convert
2458 LaTeX to PDF: Directly, using
2459 \begin_inset Flex CharStyle:MenuItem
2462 \begin_layout Plain Layout
2468 ; via (DVI and) PostScript®, using
2469 \begin_inset Flex CharStyle:MenuItem
2472 \begin_layout Plain Layout
2479 \begin_inset Flex CharStyle:MenuItem
2482 \begin_layout Plain Layout
2489 To define such alternate chains, you must define multiple target `file
2490 formats', as described in section
2491 \begin_inset CommandInset ref
2493 reference "sub:Formats"
2498 For example, in the standard configuration, the formats named
2499 \begin_inset Flex CharStyle:MenuItem
2502 \begin_layout Plain Layout
2509 \begin_inset Flex CharStyle:MenuItem
2512 \begin_layout Plain Layout
2519 \begin_inset Flex CharStyle:MenuItem
2522 \begin_layout Plain Layout
2528 are defined, all of which share the extension
2529 \begin_inset Flex CharStyle:MenuItem
2532 \begin_layout Plain Layout
2538 , and which correspond to the conversion methods just mentioned.
2541 \begin_layout Chapter
2542 Internationalizing LyX
2543 \begin_inset CommandInset label
2552 \begin_layout Standard
2553 LyX supports using a translated interface.
2554 Last time we checked, LyX provided text in thirty languages.
2555 The language of choice is called your
2560 (For further reading on locale settings, see also the documentation for
2561 locale that comes with your operating system.
2562 For Linux, the manual page for
2563 \begin_inset Flex CharStyle:Code
2566 \begin_layout Plain Layout
2572 could be a good place to start).
2575 \begin_layout Standard
2576 Notice that these translations will work, but do contain a few flaws.
2577 In particular, all dialogs have been designed with the English text in
2578 mind, which means that some of the translated text will be too large to
2579 fit within the space allocated.
2580 This is only a display problem and will not cause any harm.
2581 Also, you will find that some of the translations do not define shortcut
2582 keys for everything.
2583 Sometimes, there are simply not enough free letters to do it.
2584 Other times, the translator just hasn't got around to doing it yet.
2585 Our localization team, which you may wish to join,
2589 \begin_layout Plain Layout
2590 If you are a fluent speaker of a language other than English, joining these
2591 teams is a great way to give back to the LyX community!
2596 will of course try to fix these shortcomings in future versions of LyX.
2599 \begin_layout Section
2603 \begin_layout Subsection
2604 Translating the graphical user interface (text messages).
2607 \begin_layout Standard
2609 \begin_inset Flex CharStyle:Code
2612 \begin_layout Plain Layout
2618 library to handle the internationalization of the interface.
2619 To have LyX speak your favorite language in all menus and dialogs, you
2621 \begin_inset Flex CharStyle:Code
2624 \begin_layout Plain Layout
2630 -file for that language.
2631 When this is available, you'll have to generate a
2632 \begin_inset Flex CharStyle:Code
2635 \begin_layout Plain Layout
2641 -file from it and install the
2642 \begin_inset Flex CharStyle:Code
2645 \begin_layout Plain Layout
2652 The process of doing all of this is explained in the documentation for
2654 \begin_inset Flex CharStyle:Code
2657 \begin_layout Plain Layout
2664 It is possible to do this just for yourself, but if you're going to do
2665 it, you might as well share the results of your labors with the rest of
2667 Send a message to the LyX developers' list for more information about how
2671 \begin_layout Standard
2672 In short, this is what you should do (xx denotes the language code):
2675 \begin_layout Itemize
2676 Check out the LyX source code.
2678 \begin_inset CommandInset href
2680 name "information on the web"
2681 target "http://www.lyx.org/devel/cvs.php"
2688 \begin_layout Itemize
2690 \begin_inset Flex CharStyle:Code
2693 \begin_layout Plain Layout
2699 to the folder of the
2700 \begin_inset Flex CharStyle:Code
2703 \begin_layout Plain Layout
2711 \begin_inset Flex CharStyle:Code
2714 \begin_layout Plain Layout
2722 \begin_inset Flex CharStyle:Code
2725 \begin_layout Plain Layout
2731 doesn't exist anywhere, it can be remade with the console command
2732 \begin_inset Flex CharStyle:Code
2735 \begin_layout Plain Layout
2741 in that directory, or you can use an existing po-file for some other language
2745 \begin_layout Itemize
2747 \begin_inset Flex CharStyle:Code
2750 \begin_layout Plain Layout
2760 \begin_layout Plain Layout
2761 This is just a text file, so it can be edited in any text editor.
2762 But there are also specialized programs that support such editing, such
2767 (for all platforms) or
2776 contains a `mode' for editing
2777 \begin_inset Flex CharStyle:Code
2780 \begin_layout Plain Layout
2791 For some menu- and widget-labels, there are also shortcut keys that should
2793 Those keys are marked after a `|', and should be translated according to
2794 the words and phrases of the language.
2795 You should also fill also out the information at the beginning of the new
2797 \begin_inset Flex CharStyle:Code
2800 \begin_layout Plain Layout
2806 -file with your email-address, etc., so people know where to reach you with
2807 suggestions and entertaining flames.
2810 \begin_layout Standard
2811 If you are just doing this on your own, then:
2814 \begin_layout Itemize
2816 \begin_inset Flex CharStyle:Code
2819 \begin_layout Plain Layout
2826 This can be done with
2827 \begin_inset Flex CharStyle:Code
2830 \begin_layout Plain Layout
2831 msgfmt -o xx.mo < xx.po
2839 \begin_layout Itemize
2841 \begin_inset Flex CharStyle:Code
2844 \begin_layout Plain Layout
2850 -file to your locale-tree, at the correct directory for application messages
2855 xx, and under the name
2856 \begin_inset Flex CharStyle:Code
2859 \begin_layout Plain Layout
2867 \begin_inset Flex CharStyle:Code
2870 \begin_layout Plain Layout
2871 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2881 \begin_layout Standard
2882 As said, however, it would be best if the new
2883 \begin_inset Flex CharStyle:Code
2886 \begin_layout Plain Layout
2892 -file could be added to the LyX distribution, so others can use it.
2893 Adding it involves making additional changes to LyX.
2894 So send an email to the developers' mailing list if you're interested in
2898 \begin_layout Subsubsection
2902 \begin_layout Standard
2903 Sometimes it turns out that one English message needs to be translated into
2904 different messages in the target language.
2905 One example is the message
2906 \begin_inset Flex CharStyle:Code
2909 \begin_layout Plain Layout
2915 which has the German translation
2923 , depending upon exactly what the English
2924 \begin_inset Quotes eld
2928 \begin_inset Quotes erd
2933 \begin_inset Flex CharStyle:Code
2936 \begin_layout Plain Layout
2942 does not handle such ambigous translations.
2943 Therefore you have to add some context information to the message: Instead
2945 \begin_inset Flex CharStyle:Code
2948 \begin_layout Plain Layout
2955 \begin_inset Flex CharStyle:Code
2958 \begin_layout Plain Layout
2959 To[[as in 'From format x to format y']]
2965 \begin_inset Flex CharStyle:Code
2968 \begin_layout Plain Layout
2969 To[[as in 'From page x to page y']].
2974 Now the two occurences of
2975 \begin_inset Flex CharStyle:Code
2978 \begin_layout Plain Layout
2985 \begin_inset Flex CharStyle:Code
2988 \begin_layout Plain Layout
2994 and can be translated correctly to
3005 \begin_layout Standard
3006 Of course the context information needs to be stripped off the original
3007 message when no translation is used.
3008 Therefore you have to put it in double square brackets at the end of the
3009 message (see the example above).
3010 The translation mechanism of LyX ensures that everything in double square
3011 brackets at the end of messages is removed before displaying the message.
3014 \begin_layout Subsection
3015 Translating the documentation.
3018 \begin_layout Standard
3019 The online documentation (in the
3020 \begin_inset Flex CharStyle:MenuItem
3023 \begin_layout Plain Layout
3033 -menu) can (and should!) be translated.
3034 If there are translated versions of the documentation available
3038 \begin_layout Plain Layout
3039 As of March 2008, at least some of the documents have been translated into
3040 fourteen languages, with the Tutorial available in a few more.
3045 and the locale is set accordingly, these will be used automagically by
3047 LyX looks for translated versions as
3048 \begin_inset Flex CharStyle:Code
3051 \begin_layout Plain Layout
3052 LyXDir/doc/xx_DocName.lyx
3058 \begin_inset Flex CharStyle:Code
3061 \begin_layout Plain Layout
3067 is the code for the language currently in use.
3068 If there are no translated documents, the default English versions will
3070 Note that the translated versions must have the same filenames (
3071 \begin_inset Flex CharStyle:Code
3074 \begin_layout Plain Layout
3080 above) as the original.
3081 If you feel up to translating the documentation (an excellent way to proof-read
3082 the original documentation by the way!), there are a few things you should
3086 \begin_layout Itemize
3088 \begin_inset Flex CharStyle:Code
3091 \begin_layout Plain Layout
3097 , the guide to writing LyX documentation.
3098 Pay special attention to the translator's section.
3101 \begin_layout Itemize
3102 Check out the documentation translation web page at
3103 \change_deleted 0 1223267367
3105 \begin_inset CommandInset href
3107 name "http://www.devel.lyx.org"
3108 target "http://www.devel.lyx.org"
3113 \change_inserted 0 1223267381
3115 \begin_inset CommandInset href
3117 name "http://www.lyx.org/Translation"
3118 target "http://www.lyx.org/Translation"
3125 That way, you can find out which (if any) documents have already been translate
3126 d into your language.
3127 You can also find out who (if anyone) is organizing the effort to translate
3128 the documentation into your language.
3129 If no one is organizing the effort, please let us know that you're interested.
3132 \begin_layout Standard
3133 Once you get to actually translating, here's a few hints for you that may
3137 \begin_layout Itemize
3138 Join the documentation team! There is information on how to do that in
3139 \begin_inset Flex CharStyle:Code
3142 \begin_layout Plain Layout
3149 \begin_inset Flex CharStyle:MenuItem
3152 \begin_layout Plain Layout
3157 elp\SpecialChar \menuseparator
3167 ), which by the way is the first document you should translate.
3170 \begin_layout Itemize
3171 Learn the typographic conventions for the language you are translating to.
3172 Typography is an ancient art and over the centuries, a great variety of
3173 conventions have developed throughout different parts of the world.
3174 Also study the professional terminology amongst typographers in your country.
3175 Inventing your own terminology will only confuse the users.
3178 (Warning! Typography is addictive!)
3181 \begin_layout Itemize
3182 Make a copy of the document.
3183 This will be your working copy.
3184 You can use this as your personal translated help-file by placing it in
3186 \begin_inset Flex CharStyle:Code
3189 \begin_layout Plain Layout
3198 \begin_layout Itemize
3199 Sometimes the original document (from the LyX-team) will be updated.
3200 Use the source viewer at
3201 \begin_inset CommandInset href
3203 name "http://www.lyx.org/trac/timeline"
3204 target "http://www.lyx.org/trac/timeline"
3208 to see what has been changed.
3209 That way you can easily see which parts of the translated document need
3213 \begin_layout Standard
3214 If you ever find an error in the original document, fix it and notify the
3215 rest of the documentation team of the changes! (You didn't forget to join
3216 the documentation team, did you?)
3219 \begin_layout Standard
3220 \begin_inset Branch OutDated
3223 \begin_layout Section
3224 International Keyboard Support
3227 \begin_layout Standard
3230 [Editor's Note: The following section is by
3238 It needs to be fixed to conform to the new Documentation Style sheet and
3239 to make use of the new v1.0 features.
3240 The whole thing also needs to be merged with the section following it.-jw
3241 It may also be badly out of date.-rh (2008)]
3244 \begin_layout Subsection
3245 Defining Own Keymaps: Keymap File Format
3248 \begin_layout Standard
3249 Let's look at a keyboard definition file a little closer.
3250 It is a plain text file defining
3253 \begin_layout Itemize
3254 key-to-key or key-to-string translations
3257 \begin_layout Itemize
3261 \begin_layout Itemize
3262 dead keys exceptions
3265 \begin_layout Standard
3266 To define key-to-key or key-to-string translation, use this command:
3269 \begin_layout Quotation
3270 \begin_inset Flex CharStyle:Code
3273 \begin_layout Plain Layout
3282 \begin_inset Flex CharStyle:Code
3285 \begin_layout Plain Layout
3294 \begin_layout Standard
3296 \begin_inset Flex CharStyle:Code
3299 \begin_layout Plain Layout
3305 is the key to be translated and
3306 \begin_inset Flex CharStyle:Code
3309 \begin_layout Plain Layout
3315 is the string to be inserted into the document.
3316 To define dead keys, use:
3319 \begin_layout Quotation
3320 \begin_inset Flex CharStyle:Code
3323 \begin_layout Plain Layout
3332 \begin_inset Flex CharStyle:Code
3335 \begin_layout Plain Layout
3344 \begin_layout Standard
3346 \begin_inset Flex CharStyle:Code
3349 \begin_layout Plain Layout
3355 is a keyboard key and
3356 \begin_inset Flex CharStyle:Code
3359 \begin_layout Plain Layout
3366 The following dead keys are supported (shortcut name is in parentheses):
3369 \begin_layout Quotation
3373 \begin_inset space \hfill{}
3379 \begin_layout Quotation
3381 \begin_inset space \hfill{}
3387 \begin_layout Quotation
3389 \begin_inset space \hfill{}
3395 \begin_layout Quotation
3397 \begin_inset space \hfill{}
3403 \begin_layout Quotation
3405 \begin_inset space \hfill{}
3411 \begin_layout Quotation
3413 \begin_inset space \hfill{}
3420 \begin_layout Plain Layout
3432 \begin_layout Quotation
3434 \begin_inset space \hfill{}
3440 \begin_layout Quotation
3442 \begin_inset space \hfill{}
3449 \begin_layout Plain Layout
3461 \begin_layout Quotation
3463 \begin_inset space \hfill{}
3469 \begin_layout Quotation
3471 \begin_inset space \hfill{}
3477 \begin_layout Quotation
3479 \begin_inset space \hfill{}
3486 \begin_layout Plain Layout
3498 \begin_layout Quotation
3500 \begin_inset space \hfill{}
3507 \begin_layout Plain Layout
3519 \begin_layout Quotation
3521 \begin_inset space \hfill{}
3527 \begin_layout Quotation
3528 hungarian umlaut (hug)
3529 \begin_inset space \hfill{}
3535 \begin_layout Quotation
3537 \begin_inset space \hfill{}
3543 \begin_layout Quotation
3545 \begin_inset space \hfill{}
3552 \begin_layout Plain Layout
3564 \begin_layout Standard
3565 Since in many international keyboards there are exceptions to what some
3566 dead keys should do, you can define them using
3569 \begin_layout Quotation
3570 \begin_inset Flex CharStyle:Code
3573 \begin_layout Plain Layout
3581 deadkey key outstring
3584 \begin_layout Standard
3585 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3589 \begin_layout Quotation
3590 \begin_inset Flex CharStyle:Code
3593 \begin_layout Plain Layout
3606 \begin_layout Standard
3607 to make it work correctly.
3608 Also, you have to define as exceptions dead keys over i and j, to remove
3609 the dot from them before inserting an accent mark.
3610 I will change this when the time comes, but so far I haven't had time.
3613 \begin_layout Standard
3614 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3617 \begin_inset Flex CharStyle:Code
3620 \begin_layout Plain Layout
3626 have different meaning.
3628 \begin_inset Flex CharStyle:Code
3631 \begin_layout Plain Layout
3637 marks comments, quotes start and end LaTeX-style commands.
3638 To enter quote, you'll need to use
3639 \begin_inset Flex CharStyle:Code
3642 \begin_layout Plain Layout
3651 \begin_inset Flex CharStyle:Code
3654 \begin_layout Plain Layout
3661 \begin_inset Flex CharStyle:Code
3664 \begin_layout Plain Layout
3675 \begin_layout Standard
3676 If you make a keyboard description file that works for your language, please
3677 mail it to me, so I can include it in the next keymap distribution.
3680 \begin_layout Standard
3681 More keywords will be supported in keymap configuration file in future,
3685 \begin_layout Itemize
3686 \begin_inset Flex CharStyle:Code
3689 \begin_layout Plain Layout
3700 \begin_inset space \hfill{}
3704 \begin_inset Flex CharStyle:Code
3707 \begin_layout Plain Layout
3716 \begin_layout Itemize
3717 \begin_inset Flex CharStyle:Code
3720 \begin_layout Plain Layout
3731 \begin_inset space \hfill{}
3735 \begin_inset Flex CharStyle:Code
3738 \begin_layout Plain Layout
3744 an external keymap translation program
3747 \begin_layout Standard
3748 Also, it should look into
3749 \begin_inset Flex CharStyle:Code
3752 \begin_layout Plain Layout
3758 file for defaults, too (for example, a
3759 \begin_inset Flex CharStyle:Code
3762 \begin_layout Plain Layout
3770 option to include default keyboard).
3778 \begin_layout Section
3779 \begin_inset CommandInset label
3785 International Keymap Stuff
3788 \begin_layout Standard
3789 \begin_inset Note Note
3792 \begin_layout Plain Layout
3793 In doing the revisions on this document in March 2008, I did not look over
3794 this stuff, as I do not understand it.
3795 It would be good if someone else could do so.
3803 \begin_layout Standard
3804 The next two sections describe the
3805 \begin_inset Flex CharStyle:Code
3808 \begin_layout Plain Layout
3817 \begin_inset Flex CharStyle:Code
3820 \begin_layout Plain Layout
3828 file syntax in detail.
3829 These sections should help you design your own key map if the ones provided
3830 do not meet your needs.
3833 \begin_layout Subsection
3837 \begin_layout Standard
3841 \begin_inset Flex CharStyle:Code
3844 \begin_layout Plain Layout
3850 file maps keystrokes to characters or strings.
3851 As the name suggests, it sets a keyboard mapping.
3853 \begin_inset Flex CharStyle:Code
3856 \begin_layout Plain Layout
3867 \begin_inset Flex CharStyle:Code
3870 \begin_layout Plain Layout
3885 \begin_inset Flex CharStyle:Code
3888 \begin_layout Plain Layout
3901 \begin_inset Flex CharStyle:Code
3904 \begin_layout Plain Layout
3913 \begin_inset Flex CharStyle:Code
3916 \begin_layout Plain Layout
3924 are described in this section.
3927 \begin_layout Labeling
3928 \labelwidthstring 00.00.0000
3929 \begin_inset Flex CharStyle:Code
3932 \begin_layout Plain Layout
3940 Map a character to a string
3943 \begin_layout LyX-Code
3958 \begin_layout Standard
3991 the double-quote (")
4008 must be escaped with a preceding backslash (
4019 \begin_layout Standard
4021 \begin_inset Flex CharStyle:MenuItem
4024 \begin_layout Plain Layout
4032 statement to cause the symbol
4033 \begin_inset Flex CharStyle:MenuItem
4036 \begin_layout Plain Layout
4044 to be output for the keystroke
4045 \begin_inset Flex CharStyle:MenuItem
4048 \begin_layout Plain Layout
4059 \begin_layout LyX-Code
4065 \begin_layout Labeling
4066 \labelwidthstring 00.00.0000
4067 \begin_inset Flex CharStyle:Code
4070 \begin_layout Plain Layout
4078 Specify an accent character
4081 \begin_layout LyX-Code
4090 \begin_layout Standard
4091 This will make the cha
4129 This is the dead key
4133 \begin_layout Plain Layout
4140 refers to a key that does not produce a character by itself, but when followed
4141 with another key, produces the desired accent character.
4142 For example, a German characte
4144 r with an umlaut like
4154 can be produced in this manner.
4163 \begin_layout Standard
4176 and then another key not in
4193 followed by the other, unallowed key, as output.
4197 \begin_inset Flex CharStyle:MenuItem
4200 \begin_layout Plain Layout
4208 cancels a dead key, so if
4219 \begin_inset Flex CharStyle:MenuItem
4222 \begin_layout Plain Layout
4231 , the cursor will not go one position backwards but will instead cancel
4247 might have had on the next keystroke.
4251 \begin_layout Standard
4252 The following example specifies that the character ' is to be an acute accent,
4253 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4256 \begin_layout LyX-Code
4259 kmod ' acute aeiouAEIOU
4262 \begin_layout Labeling
4263 \labelwidthstring 00.00.0000
4264 \begin_inset Flex CharStyle:Code
4267 \begin_layout Plain Layout
4273 Specify an exception to the accent character
4276 \begin_layout LyX-Code
4285 \begin_layout Standard
4286 This defines an exce
4327 have been assigned a keystroke with a previous
4330 \begin_inset Flex CharStyle:Code
4333 \begin_layout Plain Layout
4357 must not belong in the
4409 If such a declaration does not exist in
4417 \begin_inset Flex CharStyle:Code
4420 \begin_layout Plain Layout
4460 \begin_inset Flex CharStyle:Code
4463 \begin_layout Plain Layout
4477 \begin_layout Standard
4478 The following command produces causes äi to be produced when you enter acute-i
4482 \begin_layout LyX-Code
4496 \begin_layout Labeling
4497 \labelwidthstring 00.00.0000
4498 \begin_inset Flex CharStyle:Code
4501 \begin_layout Plain Layout
4507 Combine two accent characters
4510 \begin_layout LyX-Code
4516 accent1 accent2 allowed
4519 \begin_layout Standard
4520 This one is getting pretty esoteric.
4521 It allows you to combine the effect
4577 \begin_inset Flex CharStyle:Code
4580 \begin_layout Plain Layout
4608 \begin_layout Standard
4609 Consider this example from the
4610 \begin_inset Flex CharStyle:Code
4613 \begin_layout Plain Layout
4624 \begin_layout LyX-Code
4627 kmod ; acute aeioyvhAEIOYVH
4631 kcomb acute umlaut iyIY
4634 \begin_layout Standard
4635 This allows you to press
4636 \begin_inset Flex CharStyle:MenuItem
4639 \begin_layout Plain Layout
4647 and get the effect of
4648 \begin_inset Flex CharStyle:Code
4651 \begin_layout Plain Layout
4670 in this case cancels the last dead key, so if you press
4671 \begin_inset Flex CharStyle:MenuItem
4674 \begin_layout Plain Layout
4683 \begin_inset Flex CharStyle:Code
4686 \begin_layout Plain Layout
4699 \begin_layout Subsection
4703 \begin_layout Standard
4705 \begin_inset Flex CharStyle:Code
4708 \begin_layout Plain Layout
4716 mapping is performed, a
4717 \begin_inset Flex CharStyle:Code
4720 \begin_layout Plain Layout
4730 file maps the strings that the symbols generate to characters in the current
4732 The LyX distribution currently includes at least the
4733 \begin_inset Flex CharStyle:Code
4736 \begin_layout Plain Layout
4745 \begin_inset Flex CharStyle:Code
4748 \begin_layout Plain Layout
4759 \begin_layout Standard
4761 \begin_inset Flex CharStyle:Code
4764 \begin_layout Plain Layout
4772 file is a sequence of declarations of the form
4775 \begin_layout LyX-Code
4788 \begin_layout Standard
4789 For example, in order to map
4790 \begin_inset Flex CharStyle:MenuItem
4793 \begin_layout Plain Layout
4803 to the corresponding character in the iso-8859-1 set (233), the following
4807 \begin_layout LyX-Code
4815 \begin_layout Standard
4817 \begin_inset Flex CharStyle:Code
4820 \begin_layout Plain Layout
4829 \begin_inset Flex CharStyle:Code
4832 \begin_layout Plain Layout
4850 the same character can apply to more than one string.
4852 \begin_inset Flex CharStyle:Code
4855 \begin_layout Plain Layout
4866 \begin_layout LyX-Code
4878 \begin_inset Newline newline
4894 \begin_layout Standard
4895 If LyX cannot find a mapping for the string produced by the keystroke or
4896 a deadkey sequence, it will check if it looks like an accented char and
4897 try to draw an accent over the character on screen.
4900 \begin_layout Subsection
4904 \begin_layout Standard
4905 There is a second way to add support for international characters through
4906 so-called dead-keys.
4907 A dead-key works in combination with a letter to produce an accented character.
4908 Here, we'll explain how to create a really simple dead-key to illustrate
4912 \begin_layout Standard
4913 Suppose you happen to need the circumflex character,
4914 \begin_inset Quotes eld
4918 \begin_inset Quotes erd
4923 \begin_inset Flex CharStyle:MenuItem
4926 \begin_layout Plain Layout
4933 \begin_inset space ~
4937 \begin_inset Flex CharStyle:MenuItem
4940 \begin_layout Plain Layout
4946 ] to the LyX command
4947 \begin_inset Flex CharStyle:Code
4950 \begin_layout Plain Layout
4957 \begin_inset Flex CharStyle:Code
4960 \begin_layout Plain Layout
4967 Now, whenever you type the
4968 \begin_inset Flex CharStyle:MenuItem
4971 \begin_layout Plain Layout
4977 -key followed by a letter, that letter will have a circumflex accent on
4979 For example, the sequence
4980 \begin_inset Quotes eld
4984 \begin_inset Flex CharStyle:MenuItem
4987 \begin_layout Plain Layout
4994 \begin_inset Quotes erd
4997 produces the letter:
4998 \begin_inset Quotes eld
5002 \begin_inset Quotes erd
5006 If you tried to type
5007 \begin_inset Quotes eld
5011 \begin_inset Flex CharStyle:MenuItem
5014 \begin_layout Plain Layout
5021 \begin_inset Quotes erd
5024 , however, LyX will complain with a beep, since a
5025 \begin_inset Quotes eld
5029 \begin_inset Flex CharStyle:MenuItem
5032 \begin_layout Plain Layout
5039 \begin_inset Quotes erd
5042 never takes a circumflex accent.
5044 \begin_inset Flex CharStyle:MenuItem
5047 \begin_layout Plain Layout
5053 after a dead-key produces the bare-accent.
5054 Please note this last point! If you bind a key to a dead-key, you'll need
5055 to rebind the character on that key to yet another key.
5057 \begin_inset Flex CharStyle:MenuItem
5060 \begin_layout Plain Layout
5066 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5069 \begin_layout Standard
5070 One common way to bind dead-keys is to use
5071 \begin_inset Flex CharStyle:MenuItem
5074 \begin_layout Plain Layout
5081 \begin_inset Flex CharStyle:MenuItem
5084 \begin_layout Plain Layout
5091 \begin_inset Flex CharStyle:MenuItem
5094 \begin_layout Plain Layout
5100 in combination with an accent, like
5101 \begin_inset Quotes eld
5105 \begin_inset Flex CharStyle:MenuItem
5108 \begin_layout Plain Layout
5115 \begin_inset Quotes erd
5119 \begin_inset Quotes eld
5123 \begin_inset Flex CharStyle:MenuItem
5126 \begin_layout Plain Layout
5133 \begin_inset Quotes erd
5137 \begin_inset Quotes eld
5141 \begin_inset Flex CharStyle:MenuItem
5144 \begin_layout Plain Layout
5151 \begin_inset Quotes erd
5155 Another way involves using
5156 \begin_inset Flex CharStyle:Code
5159 \begin_layout Plain Layout
5166 \begin_inset Flex CharStyle:Code
5169 \begin_layout Plain Layout
5175 to set up the special
5176 \begin_inset Flex CharStyle:Code
5179 \begin_layout Plain Layout
5187 \begin_inset Flex CharStyle:Code
5190 \begin_layout Plain Layout
5196 acts in some ways just like
5197 \begin_inset Flex CharStyle:MenuItem
5200 \begin_layout Plain Layout
5206 and permits you to bind keys to accented characters.
5207 You can also turn keys into dead-keys by binding them to something like
5209 \begin_inset Flex CharStyle:Code
5212 \begin_layout Plain Layout
5218 and then binding this symbolic key to the corresponding LyX command.
5222 \begin_layout Plain Layout
5227 : This is exactly what I do in my
5228 \begin_inset Flex CharStyle:Code
5231 \begin_layout Plain Layout
5238 \begin_inset Flex CharStyle:Code
5241 \begin_layout Plain Layout
5249 \begin_inset Flex CharStyle:MenuItem
5252 \begin_layout Plain Layout
5254 \begin_inset space ~
5263 \begin_inset Flex CharStyle:Code
5266 \begin_layout Plain Layout
5272 and a bunch of these
5273 \begin_inset Quotes eld
5277 \begin_inset Flex CharStyle:Code
5280 \begin_layout Plain Layout
5287 \begin_inset Quotes erd
5290 symbolic keys bound such things as
5291 \begin_inset Flex CharStyle:MenuItem
5294 \begin_layout Plain Layout
5296 \begin_inset space ~
5305 \begin_inset Flex CharStyle:MenuItem
5308 \begin_layout Plain Layout
5310 \begin_inset space ~
5319 This is how I produce my accented characters.
5324 You can make just about anything into the
5325 \begin_inset Flex CharStyle:Code
5328 \begin_layout Plain Layout
5335 \begin_inset Flex CharStyle:MenuItem
5338 \begin_layout Plain Layout
5344 keys, a spare function key, etc.
5345 As for the LyX commands that produce accents, check the entry for
5346 \begin_inset Flex CharStyle:Code
5349 \begin_layout Plain Layout
5360 You'll find the complete list there.
5363 \begin_layout Subsection
5364 Saving your Language Configuration
5367 \begin_layout Standard
5368 You can edit your preferences so that your desired language environment
5369 is automatically configured when LyX starts up, via the
5370 \begin_inset Flex CharStyle:MenuItem
5373 \begin_layout Plain Layout
5378 dit\SpecialChar \menuseparator
5391 \begin_layout Chapter
5392 Installing New Document Classes, Layouts, and Templates
5393 \begin_inset CommandInset label
5395 name "chap:textclass"
5403 \begin_layout Plain Layout
5404 Installing New Document Classes
5412 \begin_layout Standard
5413 In this chapter, we describe the procedures for creating and installing
5414 new LyX layout and template files, as well as offer a refresher on correctly
5415 installing new LaTeX document classes.
5416 Some definitions: a document class is a LaTeX file (usually ending in
5417 \begin_inset Flex CharStyle:Code
5420 \begin_layout Plain Layout
5427 \begin_inset Flex CharStyle:Code
5430 \begin_layout Plain Layout
5436 ) that describes the format of a document such as an article, report, journal
5437 preprint, etc, and all the commands needed to realize that format.
5438 A layout file is a LyX file that corresponds to a LaTeX document class
5439 and that tells LyX how to
5440 \begin_inset Quotes eld
5444 \begin_inset Quotes erd
5447 things on the screen to make the display look something like the final
5449 More precisely, a layout file describes a
5450 \begin_inset Quotes eld
5454 \begin_inset Quotes erd
5457 which is the internal construct LyX uses to render the screen display.
5459 \begin_inset Quotes eld
5463 \begin_inset Quotes erd
5467 \begin_inset Quotes eld
5471 \begin_inset Quotes erd
5474 can be used somewhat interchangeably, but it is better to refer to the
5475 file as the layout, and the thing living in LyX's memory as the text class.
5476 A template file is simply a LyX document that contains a set of predefined
5477 entries for a given document class---entries that are generally required
5479 Templates are especially useful for things like journal manuscripts that
5480 are to be submitted electronically.
5483 \begin_layout Section
5484 Installing a new LaTeX package
5487 \begin_layout Standard
5488 Some installations may not include a LaTeX package that you would like to
5490 For example, you might need FoilTeX, a package for preparing slides or
5491 viewgraphs for overhead projectors.
5492 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5493 a user interface for that.
5494 For example on MiKTeX you start its program
5495 \begin_inset Quotes eld
5499 \begin_inset Quotes erd
5502 to get a list of available packages.
5503 To install one, right click on it or use the installing toolbar button.
5504 When the package you want to install is not in the list, but you have it
5506 \begin_inset Flex CharStyle:Code
5509 \begin_layout Plain Layout
5516 \begin_inset Flex CharStyle:Code
5519 \begin_layout Plain Layout
5525 -file, then copy these files to a subfolder of your LaTeX distribution,
5526 for example to the folder
5535 Then update the file name database of your LaTeX-distribution.
5536 For example on MiKTeX this is done by pressing the button
5539 \begin_inset space ~
5544 that you find in MiKTeX's
5545 \begin_inset Quotes eld
5549 \begin_inset Quotes erd
5553 In both cases you need afterwards to reconfigure LyX using the menu
5554 \begin_inset Flex CharStyle:MenuItem
5557 \begin_layout Plain Layout
5558 Tools\SpecialChar \menuseparator
5564 and then to restart LyX.
5567 \begin_layout Standard
5568 If your LaTeX distribution doesn't provide a user interface, then you can
5569 follow these steps by using a UNIX/Linux console.
5572 \begin_layout Enumerate
5573 Get the package from
5574 \begin_inset CommandInset href
5577 target "http://www.ctan.org/"
5584 \begin_layout Enumerate
5585 You can install this package in several different places.
5586 If you want it to be available for all users on your system, then you should
5587 install it in your `local' TeX tree; if you want (or need) it to be available
5588 just for you, then you can install it in your own `user' TeX tree.
5589 Where these should be created, if they do not already exist, depends upon
5590 the details of your system.
5591 To find out, look in the file
5592 \begin_inset Flex CharStyle:Code
5595 \begin_layout Plain Layout
5605 \begin_layout Plain Layout
5606 This usually lives in the directory
5607 \begin_inset Flex CharStyle:Code
5610 \begin_layout Plain Layout
5616 , though you can run
5617 \begin_inset Flex CharStyle:Code
5620 \begin_layout Plain Layout
5631 The location of the `local' TeX tree is defined by
5632 \begin_inset Flex CharStyle:Code
5635 \begin_layout Plain Layout
5641 ; this is usually somewhere like
5642 \begin_inset Flex CharStyle:Code
5645 \begin_layout Plain Layout
5646 /usr/local/share/texmf/
5652 The `user' TeX tree is defined by
5653 \begin_inset Flex CharStyle:Code
5656 \begin_layout Plain Layout
5663 \begin_inset Flex CharStyle:Code
5666 \begin_layout Plain Layout
5673 (If these variables are not predefined, you can define them.) You'll probably
5674 need root permissions to create or modify the `local' tree; but your `user'
5675 tree shouldn't have such limitations.
5678 \begin_layout Enumerate
5680 \begin_inset Flex CharStyle:Code
5683 \begin_layout Plain Layout
5690 \begin_inset Flex CharStyle:Code
5693 \begin_layout Plain Layout
5700 \begin_inset Flex CharStyle:Code
5703 \begin_layout Plain Layout
5710 \begin_inset Newline newline
5714 \begin_inset Flex CharStyle:Code
5717 \begin_layout Plain Layout
5718 TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5724 \begin_inset Newline newline
5727 But, again, most of this will
5728 \begin_inset Quotes eld
5732 \begin_inset Quotes erd
5738 \begin_layout Enumerate
5743 \begin_layout Plain Layout
5744 We'll assume henceforth that you're defining `local' TeX tree.
5745 If you're defining a user tree, just adjust as necessary.
5751 You must follow the directory structure of your existing
5752 \begin_inset Flex CharStyle:Code
5755 \begin_layout Plain Layout
5761 directory, which will be found at
5762 \begin_inset Flex CharStyle:Code
5765 \begin_layout Plain Layout
5772 For example, latex packages should go under
5773 \begin_inset Flex CharStyle:Code
5776 \begin_layout Plain Layout
5777 $TEXMFLOCAL/tex/latex/
5785 \begin_layout Enumerate
5786 Install the package.
5787 For example, you would unpack the FoilTeX tarball and copy it to
5788 \begin_inset Flex CharStyle:Code
5791 \begin_layout Plain Layout
5792 $TEXMFLOCAL/tex/latex/foiltex
5799 \begin_inset Flex CharStyle:Code
5802 \begin_layout Plain Layout
5808 directory contains various files.
5811 \begin_layout Enumerate
5813 \begin_inset Flex CharStyle:Code
5816 \begin_layout Plain Layout
5824 \begin_inset Flex CharStyle:Code
5827 \begin_layout Plain Layout
5836 \begin_layout Standard
5837 Your package is now installed and available to LaTeX.
5838 To make it available to LyX, you need to create a Layout file, if one is
5839 not already available.
5840 (See the next section.) Once you have a layout file, you need only reconfigure
5842 \begin_inset Flex CharStyle:MenuItem
5845 \begin_layout Plain Layout
5846 Tools\SpecialChar \menuseparator
5852 ) and then restart LyX.
5853 You should then see your new package---for example
5854 \begin_inset Flex CharStyle:MenuItem
5857 \begin_layout Plain Layout
5864 \begin_inset Flex CharStyle:MenuItem
5867 \begin_layout Plain Layout
5868 Document\SpecialChar \menuseparator
5875 \begin_inset Flex CharStyle:MenuItem
5878 \begin_layout Plain Layout
5888 \begin_layout Section
5892 \begin_layout Standard
5893 This section describes how to write and install your own LyX layout files
5894 and walks through the
5895 \begin_inset Flex CharStyle:Code
5898 \begin_layout Plain Layout
5904 text class format as an example.
5906 \begin_inset Flex CharStyle:Code
5909 \begin_layout Plain Layout
5915 files describe what paragraph and character styles are available for a
5916 given document class and how LyX should display them.
5917 We try to provide a thorough description of the process here; however,
5918 there are so many different types of documents supported by LaTeX classes
5919 that we can't hope to cover every different possibility or problem you
5921 (The LyX users' list is frequented by people with lots of experience with
5922 layout design who are willing to share what they've learned.)
5925 \begin_layout Standard
5926 As you prepare to write a new layout, it is extremely helpful to look at
5927 the example layouts distributed with LyX.
5928 If you use a nice LaTeX document class that might be of interest for others,
5929 too, and have a nice corresponding LyX layout, feel free to contribute
5930 the stuff to us, so we may put it into the distribution.
5932 \begin_inset CommandInset href
5934 name "section on the LyX wiki"
5935 target "http://wiki.lyx.org/Layouts/Layouts"
5939 for this kind of material.
5942 \begin_layout Standard
5943 All the tags described in this chapter are case-insensitive; this means
5945 \begin_inset Flex CharStyle:Code
5948 \begin_layout Plain Layout
5955 \begin_inset Flex CharStyle:Code
5958 \begin_layout Plain Layout
5965 \begin_inset Flex CharStyle:Code
5968 \begin_layout Plain Layout
5974 are really the same command.
5975 The possible values are printed in brackets after the feature's name.
5976 The default value if a feature isn't specified inside a text class-description
5978 \begin_inset Flex CharStyle:Code
5981 \begin_layout Plain Layout
5990 If the argument has a datatype like
5991 \begin_inset Quotes eld
5995 \begin_inset Quotes erd
5999 \begin_inset Quotes eld
6003 \begin_inset Quotes erd
6006 , the default is shown like this:
6007 \begin_inset Flex CharStyle:Code
6010 \begin_layout Plain Layout
6021 \begin_layout Subsection
6025 \begin_layout Standard
6026 Similar to layout files, and new with LyX 1.6, are layout
6031 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6032 some modules---such as the Endnotes module---provide support for just such
6034 In a sense, layout modules are similar to included files---files like
6035 \begin_inset Flex CharStyle:Code
6038 \begin_layout Plain Layout
6044 ---in that modules are not specific to a given document layout but may be
6045 used with many different layouts.
6046 The difference is that using a layout module does not require editing the
6048 Rather, modules are selected in the
6049 \begin_inset Flex CharStyle:MenuItem
6052 \begin_layout Plain Layout
6053 Document\SpecialChar \menuseparator
6062 \begin_layout Standard
6063 Building modules is the easiest way to get started with layout editing,
6064 since it can be as simple as adding a single new paragraph or flex inset.
6065 But modules may, in principle, contain anything a layout file can contain.
6068 \begin_layout Standard
6069 A module must begin with a line like the following:
6072 \begin_layout LyX-Code
6075 DeclareLyXModule[endnotes.sty]{Endnotes}
6078 \begin_layout Standard
6079 The argument in square brackets is optional: It declares any LaTeX packages
6080 on which the module depends.
6081 The mandatory argument, in curly brackets, is the name of the module, as
6083 \begin_inset Flex CharStyle:MenuItem
6086 \begin_layout Plain Layout
6087 Document\SpecialChar \menuseparator
6097 \begin_layout Standard
6098 The module declaration should then be followed by lines like the following:
6101 \begin_layout LyX-Code
6105 \begin_layout LyX-Code
6106 #Adds an endnote command, in addition to footnotes.
6110 \begin_layout LyX-Code
6111 #You will need to add
6113 theendnotes in ERT where you
6116 \begin_layout LyX-Code
6117 #want the endnotes to appear.
6121 \begin_layout LyX-Code
6125 \begin_layout LyX-Code
6126 #Requires: somemodule | othermodule
6129 \begin_layout LyX-Code
6130 #Excludes: badmodule
6133 \begin_layout Standard
6134 The description is used in
6135 \begin_inset Flex CharStyle:MenuItem
6138 \begin_layout Plain Layout
6139 Document\SpecialChar \menuseparator
6145 to provide the user with information about what the module does.
6147 \begin_inset Flex CharStyle:Code
6150 \begin_layout Plain Layout
6156 line is used to identify other modules with which this one must be used;
6158 \begin_inset Flex CharStyle:Code
6161 \begin_layout Plain Layout
6167 line is used to identify modules with which this one may not be used.
6168 Both are optional, and, as shown, multiple modules should be separated
6169 with the pipe symbol: |.
6170 Note that the required modules are treated disjunctively:
6174 of the required modules must be used.
6179 excluded module may be used.
6180 Note that modules are identified here by their
6184 without the .module extension.
6186 \begin_inset Flex CharStyle:Code
6189 \begin_layout Plain Layout
6196 \begin_inset Flex CharStyle:Code
6199 \begin_layout Plain Layout
6208 \begin_layout Standard
6209 After creating a new module, you will need to reconfigure and then restart
6210 LyX for the module to appear in the menu.
6211 However, changes you make to the module will be seen immediately, if you
6213 \begin_inset Flex CharStyle:MenuItem
6216 \begin_layout Plain Layout
6217 Document\SpecialChar \menuseparator
6223 , highlight something, and then hit
6224 \begin_inset Quotes eld
6228 \begin_inset Quotes erd
6234 It is strongly recommended that you save your work before doing so
6239 it is strongly recommended that you not attempt to edit modules while simultaneo
6240 usly working on documents
6243 Though of course the developers strive to keep LyX stable in such situations,
6244 syntax errors and the like in your module file could cause strange behavior.
6247 \begin_layout Subsection
6248 Supporting new document classes
6251 \begin_layout Standard
6252 There are two situations you are likely to encounter when wanting to support
6253 a new LaTeX document class, involving LaTeX2e class (
6254 \begin_inset Flex CharStyle:Code
6257 \begin_layout Plain Layout
6264 \begin_inset Flex CharStyle:Code
6267 \begin_layout Plain Layout
6274 Supporting a style file is usually fairly easy.
6275 Supporting a new document class is a bit harder.
6278 \begin_layout Subsection
6280 \begin_inset Flex CharStyle:MenuItem
6283 \begin_layout Plain Layout
6292 \begin_layout Standard
6293 If your new document class is provided as a style file that is used in conjuncti
6294 on with an existing, supported document class---for the sake of the example,
6295 we'll assume that the style file is called
6296 \begin_inset Flex CharStyle:MenuItem
6299 \begin_layout Plain Layout
6305 and it is meant to be used with
6306 \begin_inset Flex CharStyle:MenuItem
6309 \begin_layout Plain Layout
6315 , which is a standard class---start by copying the existing class's layout
6316 file into your local directory:
6319 \begin_layout LyX-Code
6320 cp report.layout ~/.lyx/layouts/myclass.layout
6323 \begin_layout Standard
6325 \begin_inset Flex CharStyle:Code
6328 \begin_layout Plain Layout
6334 and change the line:
6337 \begin_layout LyX-Code
6340 DeclareLaTeXClass{report}
6343 \begin_layout Standard
6347 \begin_layout LyX-Code
6350 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6353 \begin_layout Standard
6357 \begin_layout LyX-Code
6359 \begin_inset Newline newline
6365 \begin_inset Newline newline
6371 \begin_layout Standard
6372 near the top of the file.
6375 \begin_layout Standard
6376 Start LyX and select
6377 \begin_inset Flex CharStyle:MenuItem
6380 \begin_layout Plain Layout
6385 ools\SpecialChar \menuseparator
6396 Then restart LyX and try creating a new document.
6398 \begin_inset Flex CharStyle:MenuItem
6401 \begin_layout Plain Layout
6407 " as a document class option in the
6408 \begin_inset Flex CharStyle:MenuItem
6411 \begin_layout Plain Layout
6416 ocument\SpecialChar \menuseparator
6427 It is likely that some of the sectioning commands and such in your new
6428 class will work differently from how they worked in the base class---
6429 \begin_inset Flex CharStyle:Code
6432 \begin_layout Plain Layout
6438 in this example---so you can fiddle around with the settings for the different
6439 sections if you wish.
6442 \begin_layout Subsection
6444 \begin_inset Flex CharStyle:MenuItem
6447 \begin_layout Plain Layout
6456 \begin_layout Standard
6457 There are two possibilities here.
6458 One is that the class file is itself based upon an existing document class.
6459 For example, many thesis classes are based upon
6460 \begin_inset Flex CharStyle:MenuItem
6463 \begin_layout Plain Layout
6470 To see whether yours is, look for a line like
6473 \begin_layout LyX-Code
6479 \begin_layout Standard
6481 If so, then you may proceed largely as in the previous section, though
6482 the DeclareLaTeXClass line will be different.
6483 If your new class is thesis, and it is based upon book, then the line should
6488 \begin_layout Plain Layout
6489 And it will be easiest if you save the file to
6490 \begin_inset Flex CharStyle:Code
6493 \begin_layout Plain Layout
6499 : LyX assumes that the document class has the same name as the layout file.
6508 \begin_layout LyX-Code
6511 DeclareLaTeXClass[thesis,book]{thesis}
6514 \begin_layout Standard
6515 If, on the other hand, the new class is not based upon an existing class,
6516 you will probably have to
6517 \begin_inset Quotes eld
6521 \begin_inset Quotes erd
6525 We strongly suggest copying an existing layout file which uses a similar
6526 LaTeX class and then modifying it, if you can do so.
6527 At least use an existing file as a starting point so you can find out what
6528 items you need to worry about.
6529 Again, the specifics are covered below.
6532 \begin_layout Section
6533 Declaring a new text class
6536 \begin_layout Standard
6537 When it's finally time to get your hands dirty and create or edit your own
6538 layout file, the following sections describe what you're up against.
6539 Our advice is to go slowly, save and test often, listen to soothing music,
6540 and enjoy one or two of your favorite adult beverages; more if you are
6541 getting particularly stuck.
6542 It's really not that hard, except that the multitude of options can become
6543 overwhelming if you try to do to much in one sitting.
6544 Go have another adult beverage, just for good measure.
6547 \begin_layout Standard
6551 \begin_layout Standard
6552 Lines in a layout file which begin with a
6553 \begin_inset Flex CharStyle:Code
6556 \begin_layout Plain Layout
6563 There is one exception to this rule: all layouts should begin with lines
6567 \begin_layout LyX-Code
6570 #% Do not delete the line below; configure depends on this
6573 \begin_layout LyX-Code
6578 DeclareLaTeXClass{article}
6581 \begin_layout Standard
6582 The second line is used when you configure LyX.
6583 The layout file is read by the LaTeX script
6584 \begin_inset Flex CharStyle:Code
6587 \begin_layout Plain Layout
6593 , in a special mode where
6594 \begin_inset Flex CharStyle:Code
6597 \begin_layout Plain Layout
6604 The first line is just a LaTeX comment, and the second one contains the
6605 declaration of the text class.
6606 If these lines appear in a file named
6607 \begin_inset Flex CharStyle:Code
6610 \begin_layout Plain Layout
6616 , then they define a text class of name
6617 \begin_inset Flex CharStyle:Code
6620 \begin_layout Plain Layout
6626 (the name of the layout file) which uses the LaTeX document class
6627 \begin_inset Flex CharStyle:Code
6630 \begin_layout Plain Layout
6636 (the default is to use the same name as the layout).
6638 \begin_inset Quotes eld
6642 \begin_inset Quotes erd
6645 that appears above is used as a description of the text class in the
6646 \begin_inset Flex CharStyle:MenuItem
6649 \begin_layout Plain Layout
6654 ocument\SpecialChar \menuseparator
6667 \begin_layout Standard
6668 Let's assume that you wrote your own text class that uses the
6669 \begin_inset Flex CharStyle:Code
6672 \begin_layout Plain Layout
6678 document class, but where you changed the appearance of the section headings.
6679 If you put it in a file
6680 \begin_inset Flex CharStyle:Code
6683 \begin_layout Plain Layout
6689 , the header of this file should be:
6692 \begin_layout LyX-Code
6695 #% Do not delete the line below; configure depends on this
6698 \begin_layout LyX-Code
6703 DeclareLaTeXClass[article]{article (with my own headings)}
6706 \begin_layout Standard
6707 This declares a text class
6708 \begin_inset Flex CharStyle:Code
6711 \begin_layout Plain Layout
6717 , associated with the LaTeX document class
6718 \begin_inset Flex CharStyle:Code
6721 \begin_layout Plain Layout
6728 \begin_inset Quotes eld
6731 article (with my own headings)
6732 \begin_inset Quotes erd
6736 If your text class depends on several packages, you can declare it as:
6739 \begin_layout LyX-Code
6742 #% Do not delete the line below; configure depends on this
6745 \begin_layout LyX-Code
6750 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6753 \begin_layout Standard
6754 This indicates that your text class uses the foo.sty package.
6755 Finally, it is also possible to declare classes for DocBook code.
6756 Typical declarations will look like
6759 \begin_layout LyX-Code
6762 #% Do not delete the line below; configure depends on this
6765 \begin_layout LyX-Code
6770 DeclareDocBookClass[article]{SGML (DocBook article)}
6773 \begin_layout Standard
6774 Note that these declarations can also be given an optional parameter declaring
6775 the name of the document class (but not a list).
6778 \begin_layout Standard
6779 So, to be as explicit as possible, the form of the layout declaration is:
6782 \begin_layout LyX-Code
6787 DeclareLaTeXClass[class,package.sty]{layout description}
6790 \begin_layout Standard
6791 The class need only be specified if the name of the LaTeX class file and
6792 the name of the layout file are different; if the name of the classfile
6793 is not specified, then LyX will simply assume that it is the same as the
6794 name of the layout file.
6797 \begin_layout Standard
6798 When the text class has been modified to your taste, all you have to do
6799 is to copy it either to
6800 \begin_inset Flex CharStyle:Code
6803 \begin_layout Plain Layout
6810 \begin_inset Flex CharStyle:Code
6813 \begin_layout Plain Layout
6820 \begin_inset Flex CharStyle:MenuItem
6823 \begin_layout Plain Layout
6828 ools\SpecialChar \menuseparator
6838 , exit LyX and restart it.
6839 Then your new text class should be available along with the others.
6842 \begin_layout Standard
6843 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6844 you made to your layout files.
6845 As a result, editing layout files could be very time consuming.
6846 Beginning with 1.6, however, you can force a reload of the layout currently
6847 in use by using the LyX function
6848 \begin_inset Flex CharStyle:MenuItem
6851 \begin_layout Plain Layout
6858 There is no default binding for this function---though, of course, you
6859 can bind it to a key yourself.
6860 If you want to use this function, then, you should simply enter it in the
6866 : This is very much an `advanced feature'.
6871 recommended that you save your work before using this function.
6876 recommended that you not attempt to edit your layout while simultaneously
6877 working on a document that you care about.
6878 Use a test document.
6879 Syntax errors and the like in your layout file could cause peculiar behavior.
6880 In particular, such errors could cause LyX to regard the current layout
6881 as invalid and to attempt to switch to some other layout.
6882 The LyX team strives to keep LyX stable in such situations, but safe is
6886 \begin_layout Subsection
6890 \begin_layout Standard
6891 The first non-comment line must contain the file format number:
6894 \begin_layout Description
6895 \begin_inset Flex CharStyle:Code
6898 \begin_layout Plain Layout
6905 \begin_inset Flex CharStyle:Code
6908 \begin_layout Plain Layout
6914 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6915 don't have an explicit file format).
6916 The file format that is documented here is format 8.
6919 \begin_layout Subsection
6920 General text class parameters
6923 \begin_layout Standard
6924 These are the general parameters which describe the form of the entire document:
6927 \begin_layout Description
6928 \begin_inset Flex CharStyle:Code
6931 \begin_layout Plain Layout
6937 Adds information to the document preamble.
6939 \begin_inset Quotes eld
6943 \begin_inset Flex CharStyle:Code
6946 \begin_layout Plain Layout
6953 \begin_inset Quotes erd
6959 \begin_layout Description
6960 \begin_inset Flex CharStyle:Code
6963 \begin_layout Plain Layout
6969 Describes various global options supported by the document class.
6971 \begin_inset space ~
6975 \begin_inset CommandInset ref
6977 reference "sec:classoptions"
6983 \begin_inset Quotes eld
6987 \begin_inset Flex CharStyle:Code
6990 \begin_layout Plain Layout
6997 \begin_inset Quotes erd
7003 \begin_layout Description
7004 \begin_inset Flex CharStyle:Code
7007 \begin_layout Plain Layout
7014 \begin_inset Flex CharStyle:Code
7017 \begin_layout Plain Layout
7026 \begin_inset Flex CharStyle:Code
7029 \begin_layout Plain Layout
7035 ] Whether the class should default to having one or two columns.
7036 Can be changed in the
7037 \begin_inset Flex CharStyle:MenuItem
7040 \begin_layout Plain Layout
7045 ocument\SpecialChar \menuseparator
7058 \begin_layout Description
7059 \begin_inset Flex CharStyle:Code
7062 \begin_layout Plain Layout
7068 This sequence defines a new counter.
7070 \begin_inset space ~
7074 \begin_inset CommandInset ref
7076 reference "sec:counter"
7082 \begin_inset Quotes eld
7086 \begin_inset Flex CharStyle:Code
7089 \begin_layout Plain Layout
7096 \begin_inset Quotes erd
7102 \begin_layout Description
7103 \begin_inset Flex CharStyle:Code
7106 \begin_layout Plain Layout
7112 Sets the default font used to display the document.
7114 \begin_inset space ~
7118 \begin_inset CommandInset ref
7120 reference "sec:fonts"
7124 for how to declare fonts.
7126 \begin_inset Quotes eld
7130 \begin_inset Flex CharStyle:Code
7133 \begin_layout Plain Layout
7140 \begin_inset Quotes erd
7146 \begin_layout Description
7147 \begin_inset Flex CharStyle:Code
7150 \begin_layout Plain Layout
7157 \begin_inset Flex CharStyle:Code
7160 \begin_layout Plain Layout
7166 ] This is the style that will be assigned to new paragraphs, usually
7167 \begin_inset Flex CharStyle:MenuItem
7170 \begin_layout Plain Layout
7177 This will default to the first defined style if not given, but you are
7178 highly encouraged to use this directive.
7181 \begin_layout Description
7182 \begin_inset Flex CharStyle:Code
7185 \begin_layout Plain Layout
7191 Defines a new float.
7193 \begin_inset space ~
7197 \begin_inset CommandInset ref
7199 reference "sec:floats"
7205 \begin_inset Quotes eld
7209 \begin_inset Flex CharStyle:Code
7212 \begin_layout Plain Layout
7219 \begin_inset Quotes erd
7225 \begin_layout Description
7226 \begin_inset Flex CharStyle:Code
7229 \begin_layout Plain Layout
7235 As its name implies, this command allows you to include another layout
7236 definition file within yours to avoid duplicating commands.
7237 Common examples are the standard layout files, for example,
7238 \begin_inset Flex CharStyle:Code
7241 \begin_layout Plain Layout
7247 , which contains most of the basic layouts.
7250 \begin_layout Description
7251 \begin_inset Flex CharStyle:Code
7254 \begin_layout Plain Layout
7260 This section (re-)defines the layout of an inset.
7261 It can be applied to an existing inset of to a new, user-defined inset,
7262 e.g., a new character style.
7264 \begin_inset space ~
7268 \begin_inset CommandInset ref
7270 reference "sec:charstyle"
7274 for more information.
7276 \begin_inset Quotes eld
7280 \begin_inset Flex CharStyle:Code
7283 \begin_layout Plain Layout
7290 \begin_inset Quotes erd
7296 \begin_layout Description
7297 \begin_inset Flex CharStyle:Code
7300 \begin_layout Plain Layout
7307 \change_deleted 0 1223264406
7309 \change_inserted 0 1223264424
7310 A string that indicates the width of the left margin on the screen, for
7312 \begin_inset Quotes eld
7316 \begin_inset Quotes erd
7324 \begin_layout Description
7325 \begin_inset Flex CharStyle:Code
7328 \begin_layout Plain Layout
7334 This command deletes an existing float.
7335 This is particularly useful when you want to suppress a float that has
7336 be defined in an input file.
7339 \begin_layout Description
7340 \begin_inset Flex CharStyle:Code
7343 \begin_layout Plain Layout
7349 This command deletes an existing style.
7350 This is particularly useful when you want to suppress a style that has
7351 be defined in an input file.
7354 \begin_layout Description
7355 \begin_inset Flex CharStyle:Code
7358 \begin_layout Plain Layout
7365 \change_deleted 0 1223264478
7367 \change_inserted 0 1223264538
7368 A string indicating what sort of output documents using this class will
7370 At present, the options are: `docbook', `latex', `linuxdoc', and `literate'.
7375 \begin_layout Description
7376 \begin_inset Flex CharStyle:Code
7379 \begin_layout Plain Layout
7390 \begin_inset Flex CharStyle:Code
7393 \begin_layout Plain Layout
7404 \begin_inset Flex CharStyle:Code
7407 \begin_layout Plain Layout
7414 \begin_inset Flex CharStyle:Code
7417 \begin_layout Plain Layout
7423 ] The class default pagestyle.
7424 Can be changed in the
7425 \begin_inset Flex CharStyle:MenuItem
7428 \begin_layout Plain Layout
7433 ocument\SpecialChar \menuseparator
7446 \begin_layout Description
7447 \begin_inset Flex CharStyle:Code
7450 \begin_layout Plain Layout
7456 Sets the preamble for the LaTeX document.
7457 Note that this will completely override any prior
7458 \begin_inset Flex CharStyle:Code
7461 \begin_layout Plain Layout
7468 \begin_inset Flex CharStyle:Code
7471 \begin_layout Plain Layout
7479 \begin_inset Quotes eld
7483 \begin_inset Flex CharStyle:Code
7486 \begin_layout Plain Layout
7493 \begin_inset Quotes erd
7499 \begin_layout Description
7500 \begin_inset Flex CharStyle:Code
7503 \begin_layout Plain Layout
7510 \begin_inset Flex CharStyle:Code
7513 \begin_layout Plain Layout
7520 \begin_inset Flex CharStyle:Code
7523 \begin_layout Plain Layout
7532 \begin_inset Flex CharStyle:Code
7535 \begin_layout Plain Layout
7541 ] Whether the class already provides the feature
7542 \begin_inset Flex CharStyle:Code
7545 \begin_layout Plain Layout
7552 A feature is in general the name of a package (
7553 \begin_inset Flex CharStyle:Code
7556 \begin_layout Plain Layout
7563 \begin_inset Flex CharStyle:Code
7566 \begin_layout Plain Layout
7572 , \SpecialChar \ldots{}
7574 \begin_inset Flex CharStyle:Code
7577 \begin_layout Plain Layout
7584 \begin_inset Flex CharStyle:Code
7587 \begin_layout Plain Layout
7593 ,\SpecialChar \ldots{}
7594 ); the complete list of supported features is unfortunately not documented
7595 outside the LyX source code---but see
7596 \begin_inset Flex CharStyle:Code
7599 \begin_layout Plain Layout
7605 if you're interested.
7607 \begin_inset Flex CharStyle:MenuItem
7610 \begin_layout Plain Layout
7615 elp\SpecialChar \menuseparator
7625 also gives an overview of the supported packages.
7628 \begin_layout Description
7629 \begin_inset Flex CharStyle:Code
7632 \begin_layout Plain Layout
7639 \begin_inset Flex CharStyle:Code
7642 \begin_layout Plain Layout
7648 ] Whether the class requires the feature
7649 \begin_inset Flex CharStyle:Code
7652 \begin_layout Plain Layout
7659 Multiple features must be separated by commas.
7660 Note that you can only request supported features.
7663 \begin_layout Description
7664 \begin_inset Flex CharStyle:Code
7667 \begin_layout Plain Layout
7674 \change_deleted 0 1223264443
7676 \change_inserted 0 1223264447
7677 A string that indicates the width of the right margin on the screen, for
7679 \begin_inset Quotes eld
7683 \begin_inset Quotes erd
7691 \begin_layout Description
7692 \begin_inset Flex CharStyle:Code
7695 \begin_layout Plain Layout
7702 \change_deleted 0 1223264553
7704 \change_inserted 0 1223264811
7705 Sets which divisions get numbered.
7707 \begin_inset Flex CharStyle:Code
7710 \begin_layout Plain Layout
7712 \change_inserted 0 1223264626
7725 \begin_layout Description
7726 \begin_inset Flex CharStyle:Code
7729 \begin_layout Plain Layout
7738 \begin_inset Flex CharStyle:Code
7741 \begin_layout Plain Layout
7752 \begin_inset Flex CharStyle:Code
7755 \begin_layout Plain Layout
7761 ] Whether the class-default should be printing on one or both sides of the
7763 Can be changed in the
7764 \begin_inset Flex CharStyle:MenuItem
7767 \begin_layout Plain Layout
7772 ocument\SpecialChar \menuseparator
7785 \begin_layout Description
7786 \begin_inset Flex CharStyle:Code
7789 \begin_layout Plain Layout
7795 This sequence defines a new paragraph style.
7796 If the style already exists, it will redefine some of its parameters instead.
7798 \begin_inset space ~
7802 \begin_inset CommandInset ref
7804 reference "sec:style"
7810 \begin_inset Quotes eld
7814 \begin_inset Flex CharStyle:Code
7817 \begin_layout Plain Layout
7824 \begin_inset Quotes erd
7830 \begin_layout Description
7831 \begin_inset Flex CharStyle:Code
7834 \begin_layout Plain Layout
7841 \begin_inset Flex CharStyle:Code
7844 \begin_layout Plain Layout
7850 ] The name of the command or environment to be used with
7851 \begin_inset Flex CharStyle:Code
7854 \begin_layout Plain Layout
7863 \begin_layout Description
7864 \begin_inset Flex CharStyle:Code
7867 \begin_layout Plain Layout
7874 \begin_inset Flex CharStyle:Code
7877 \begin_layout Plain Layout
7886 \begin_inset Flex CharStyle:Code
7889 \begin_layout Plain Layout
7895 ] Indicates what kind of markup is used to define the title of a document.
7897 \begin_inset Flex CharStyle:Code
7900 \begin_layout Plain Layout
7906 means that the macro with name
7907 \begin_inset Flex CharStyle:Code
7910 \begin_layout Plain Layout
7916 will be inserted after the last layout which has
7917 \begin_inset Quotes eld
7921 \begin_inset Flex CharStyle:Code
7924 \begin_layout Plain Layout
7931 \begin_inset Quotes erd
7936 \begin_inset Flex CharStyle:Code
7939 \begin_layout Plain Layout
7945 corresponds to the case where the block of paragraphs which have
7946 \begin_inset Quotes eld
7950 \begin_inset Flex CharStyle:Code
7953 \begin_layout Plain Layout
7960 \begin_inset Quotes erd
7963 should be enclosed into the
7964 \begin_inset Flex CharStyle:Code
7967 \begin_layout Plain Layout
7976 \begin_layout Description
7977 \begin_inset Flex CharStyle:Code
7980 \begin_layout Plain Layout
7987 \change_deleted 0 1223264639
7989 \change_inserted 0 1223264836
7990 Sets which divisions are included in the table of contents.
7992 \begin_inset Flex CharStyle:Code
7995 \begin_layout Plain Layout
7997 \change_inserted 0 1223264831
8010 \begin_layout Description
8011 \begin_inset Flex CharStyle:Code
8014 \begin_layout Plain Layout
8021 \begin_inset Flex CharStyle:Code
8024 \begin_layout Plain Layout
8030 Specifies a module to be included by default with this document class.
8031 The user can still remove the module, but it will be active at the outset.
8032 (This applies only when new files are created, or when this class is chosen
8033 for an existing document.)
8036 \begin_layout Subsection
8037 \begin_inset Flex CharStyle:Code
8040 \begin_layout Plain Layout
8049 \begin_layout Standard
8050 \begin_inset CommandInset label
8052 name "sec:classoptions"
8057 \begin_inset Flex CharStyle:Code
8060 \begin_layout Plain Layout
8066 section can contain the following entries:
8069 \begin_layout Description
8070 \begin_inset Flex CharStyle:Code
8073 \begin_layout Plain Layout
8080 \begin_inset Flex CharStyle:Code
8083 \begin_layout Plain Layout
8089 ] The list of available font sizes for the document's main font, separated
8091 \begin_inset Quotes eld
8095 \begin_inset Flex CharStyle:Code
8098 \begin_layout Plain Layout
8105 \begin_inset Quotes erd
8111 \begin_layout Description
8112 \begin_inset Flex CharStyle:Code
8115 \begin_layout Plain Layout
8122 \change_deleted 0 1223264991
8124 \change_inserted 0 1223265053
8125 Used to set the DTD line with XML-based output classes.
8127 \begin_inset Quotes eld
8130 -//OASIS//DTD DocBook V4.2//EN
8131 \begin_inset Quotes erd
8139 \begin_layout Description
8140 \begin_inset Flex CharStyle:Code
8143 \begin_layout Plain Layout
8150 \begin_inset Flex CharStyle:Code
8153 \begin_layout Plain Layout
8154 string="empty|plain|headings|fancy"
8159 ] The list of available page styles, separated by
8160 \begin_inset Quotes eld
8164 \begin_inset Flex CharStyle:Code
8167 \begin_layout Plain Layout
8174 \begin_inset Quotes erd
8180 \begin_layout Description
8181 \begin_inset Flex CharStyle:Code
8184 \begin_layout Plain Layout
8191 \begin_inset Flex CharStyle:Code
8194 \begin_layout Plain Layout
8200 ] Some document class options, separated by a comma, that will be added
8201 to the optional part of the
8202 \begin_inset Flex CharStyle:Code
8205 \begin_layout Plain Layout
8216 \begin_layout Standard
8218 \begin_inset Flex CharStyle:Code
8221 \begin_layout Plain Layout
8227 section must end with
8228 \begin_inset Quotes eld
8232 \begin_inset Flex CharStyle:Code
8235 \begin_layout Plain Layout
8242 \begin_inset Quotes erd
8248 \begin_layout Subsection
8252 \begin_layout Standard
8253 \begin_inset CommandInset label
8259 A paragraph style description looks like this:
8263 \begin_layout Plain Layout
8264 Note that this will either define a new layout or modify an existing one.
8272 \begin_layout LyX-Code
8279 \begin_layout LyX-Code
8283 \begin_layout LyX-Code
8287 \begin_layout Standard
8288 where the following commands are allowed:
8291 \begin_layout Description
8292 \begin_inset Flex CharStyle:Code
8295 \begin_layout Plain Layout
8302 \begin_inset Flex CharStyle:Code
8305 \begin_layout Plain Layout
8310 , left, right, center
8315 ] Paragraph alignment.
8318 \begin_layout Description
8319 \begin_inset Flex CharStyle:Code
8322 \begin_layout Plain Layout
8329 \begin_inset Flex CharStyle:Code
8332 \begin_layout Plain Layout
8337 , left, right, center
8342 ] A comma separated list of permitted alignments.
8343 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
8345 For example a right-aligned or centered enumeration isn't possible.)
8348 \begin_layout Description
8349 \begin_inset Flex CharStyle:Code
8352 \begin_layout Plain Layout
8359 \begin_inset Flex CharStyle:Code
8362 \begin_layout Plain Layout
8372 \begin_layout Plain Layout
8373 Note that a `float' here is a real number, such as: 1.5.
8378 The vertical space with which the last of a chain of paragraphs with this
8379 layout is separated from the following paragraph.
8380 If the next paragraph has another layout, the separations are not simply
8381 added, but the maximum is taken.
8384 \begin_layout Description
8385 \begin_inset Flex CharStyle:Code
8388 \begin_layout Plain Layout
8395 \begin_inset Flex CharStyle:Code
8398 \begin_layout Plain Layout
8404 The category for this style.
8405 This is used to group related styles in the Layout combobox on the toolbar.
8406 Any string can be used, but you may want to use existing categories with
8411 \begin_layout Description
8412 \begin_inset Flex CharStyle:Code
8415 \begin_layout Plain Layout
8422 \change_deleted 0 1223265419
8424 \change_inserted 0 1223265432
8425 Depth of XML command.
8426 Used only with XML-type formats.
8431 \begin_layout Description
8432 \begin_inset Flex CharStyle:Code
8435 \begin_layout Plain Layout
8442 \begin_inset CommandInset label
8444 name "des:CopyStyle"
8449 \begin_inset Flex CharStyle:Code
8452 \begin_layout Plain Layout
8458 Copies all the features of an existing style into the current one.
8462 \begin_layout Description
8463 \begin_inset Flex CharStyle:Code
8466 \begin_layout Plain Layout
8472 The name of a style whose preamble should be output
8477 This allows to ensure some ordering of the preamble snippets when macros
8478 definitions depend on one another.
8482 \begin_layout Plain Layout
8483 Note that, besides that functionality, there is no way to ensure any ordering
8485 The ordering that you see in a given version of LyX may change without
8486 warning in later versions.
8494 \begin_layout Description
8495 \begin_inset Flex CharStyle:Code
8498 \begin_layout Plain Layout
8505 \begin_inset Flex CharStyle:Code
8508 \begin_layout Plain Layout
8513 , Box, Filled_Box, Static
8518 ] The type of label that stands at the end of the paragraph (or sequence
8520 \begin_inset Flex CharStyle:Code
8523 \begin_layout Plain Layout
8530 \begin_inset Flex CharStyle:Code
8533 \begin_layout Plain Layout
8540 \begin_inset Flex CharStyle:Code
8543 \begin_layout Plain Layout
8550 \begin_inset Flex CharStyle:Code
8553 \begin_layout Plain Layout
8561 \begin_inset Flex CharStyle:Code
8564 \begin_layout Plain Layout
8571 \begin_inset Quotes eld
8575 \begin_inset Quotes erd
8579 \begin_inset Flex CharStyle:Code
8582 \begin_layout Plain Layout
8589 \begin_inset Flex CharStyle:Code
8592 \begin_layout Plain Layout
8593 \begin_inset space ~
8602 \begin_inset space ~
8605 black) square suitable for end of proof markers,
8606 \begin_inset Flex CharStyle:Code
8609 \begin_layout Plain Layout
8615 is an explicit text string.
8618 \begin_layout Description
8619 \begin_inset Flex CharStyle:Code
8622 \begin_layout Plain Layout
8629 \begin_inset Flex CharStyle:Code
8632 \begin_layout Plain Layout
8638 ] The string used for a label with a
8639 \begin_inset Flex CharStyle:Code
8642 \begin_layout Plain Layout
8649 \begin_inset Flex CharStyle:Code
8652 \begin_layout Plain Layout
8662 \begin_layout Description
8663 \begin_inset Flex CharStyle:Code
8666 \begin_layout Plain Layout
8673 \begin_inset Flex CharStyle:Code
8676 \begin_layout Plain Layout
8687 \begin_inset Flex CharStyle:Code
8690 \begin_layout Plain Layout
8699 \begin_layout Description
8700 \begin_inset Flex CharStyle:Code
8703 \begin_layout Plain Layout
8710 \begin_inset Flex CharStyle:Code
8713 \begin_layout Plain Layout
8723 ] With this parameter the
8724 \begin_inset Flex CharStyle:MenuItem
8727 \begin_layout Plain Layout
8734 \begin_inset Quotes eld
8737 Vertical space above
8738 \begin_inset Quotes erd
8742 \begin_inset Flex CharStyle:MenuItem
8745 \begin_layout Plain Layout
8750 dit\SpecialChar \menuseparator
8756 \begin_inset space ~
8764 dialog can be set when initializing a paragraph with this style.
8768 \begin_layout Plain Layout
8771 Note from Jean-Marc:
8773 I'm not sure that this setting has much use, and it should probably be
8774 removed in later versions.
8782 \begin_layout Description
8783 \begin_inset Flex CharStyle:Code
8786 \begin_layout Plain Layout
8792 The font used for both the text body
8798 \begin_inset space ~
8802 \begin_inset CommandInset ref
8804 reference "sec:fonts"
8809 Note that defining this font automatically defines the
8810 \begin_inset Flex CharStyle:Code
8813 \begin_layout Plain Layout
8820 So you should define this one first if you also want to define
8821 \begin_inset Flex CharStyle:Code
8824 \begin_layout Plain Layout
8833 \begin_layout Description
8834 \begin_inset Flex CharStyle:Code
8837 \begin_layout Plain Layout
8844 \begin_inset CommandInset label
8846 name "des:FreeSpacing"
8853 \begin_inset Flex CharStyle:Code
8856 \begin_layout Plain Layout
8867 \begin_inset Flex CharStyle:Code
8870 \begin_layout Plain Layout
8876 ] Usually LyX doesn't allow you to insert more than one space between words,
8877 since a space is considered as the separation between two words, not a
8878 character or symbol of its own.
8879 This is a very fine thing but sometimes annoying, for example, when typing
8880 program code or plain LaTeX code.
8882 \begin_inset Flex CharStyle:Code
8885 \begin_layout Plain Layout
8892 Note that LyX will create protected blanks for the additional blanks when
8893 in another mode than LaTeX-mode.
8896 \begin_layout Description
8897 \begin_inset Flex CharStyle:Code
8900 \begin_layout Plain Layout
8907 \change_inserted 0 1223265565
8908 (Used only with XML-type formats.)
8913 \begin_layout Description
8914 \begin_inset Flex CharStyle:Code
8917 \begin_layout Plain Layout
8924 \begin_inset Flex CharStyle:Code
8927 \begin_layout Plain Layout
8933 If 1, marks the layout as being part of a title block (see also the
8934 \begin_inset Flex CharStyle:Code
8937 \begin_layout Plain Layout
8944 \begin_inset Flex CharStyle:Code
8947 \begin_layout Plain Layout
8956 \begin_layout Description
8957 \begin_inset Flex CharStyle:Code
8960 \begin_layout Plain Layout
8967 \begin_inset Flex CharStyle:Code
8970 \begin_layout Plain Layout
8976 ] This provides extra space between paragraphs that have the same layout.
8977 If you put other layouts into an environment, each is separated with the
8979 \begin_inset Flex CharStyle:Code
8982 \begin_layout Plain Layout
8989 But the whole items of the environment are additionally separated with
8991 \begin_inset Flex CharStyle:Code
8994 \begin_layout Plain Layout
9006 \begin_layout Description
9007 \begin_inset Flex CharStyle:Code
9010 \begin_layout Plain Layout
9017 \change_inserted 0 1223265576
9018 (Used only with XML-type formats.)
9023 \begin_layout Description
9024 \begin_inset Flex CharStyle:Code
9027 \begin_layout Plain Layout
9034 \begin_inset CommandInset label
9036 name "des:KeepEmpty"
9043 \begin_inset Flex CharStyle:Code
9046 \begin_layout Plain Layout
9057 \begin_inset Flex CharStyle:Code
9060 \begin_layout Plain Layout
9066 ] Usually LyX does not allow you to leave a paragraph empty, since it would
9067 lead to empty LaTeX output.
9068 There are some cases where this could be desirable however: in a letter
9069 template, the required fields can be provided as empty fields, so that
9070 people do not forget them; in some special classes, a layout can be used
9071 as some kind of break, which does not contain actual text.
9074 \begin_layout Description
9075 \begin_inset Flex CharStyle:Code
9078 \begin_layout Plain Layout
9084 [float=0] The vertical space between the label and the text body.
9085 Only used for labels that are above the text body (
9086 \begin_inset Flex CharStyle:Code
9089 \begin_layout Plain Layout
9096 \begin_inset Flex CharStyle:Code
9099 \begin_layout Plain Layout
9100 Centered_Top_Environment
9108 \begin_layout Description
9109 \begin_inset Flex CharStyle:Code
9112 \begin_layout Plain Layout
9119 \begin_inset Flex CharStyle:Code
9122 \begin_layout Plain Layout
9129 \begin_inset Newline newline
9132 The name of the counter for automatic numbering (see Section
9133 \begin_inset CommandInset ref
9135 reference "sec:counter"
9140 This must be given if
9141 \begin_inset Flex CharStyle:Code
9144 \begin_layout Plain Layout
9151 \begin_inset Flex CharStyle:Code
9154 \begin_layout Plain Layout
9163 \begin_layout Description
9164 \begin_inset Flex CharStyle:Code
9167 \begin_layout Plain Layout
9173 The font used for the label.
9175 \begin_inset space ~
9179 \begin_inset CommandInset ref
9181 reference "sec:fonts"
9186 \change_inserted 0 1223265124
9190 \begin_layout Description
9192 \change_inserted 0 1223265614
9193 \begin_inset Flex CharStyle:Code
9196 \begin_layout Plain Layout
9198 \change_inserted 0 1223265133
9206 Text that indicates how far a label should be indented.
9211 \begin_layout Description
9212 \begin_inset Flex CharStyle:Code
9215 \begin_layout Plain Layout
9222 \begin_inset Flex CharStyle:Code
9225 \begin_layout Plain Layout
9231 ] The horizontal space between the label and the text body.
9232 Only used for labels that are not above the text body.
9235 \begin_layout Description
9236 \begin_inset Flex CharStyle:Code
9239 \begin_layout Plain Layout
9246 \begin_inset Flex CharStyle:Code
9249 \begin_layout Plain Layout
9255 ] The string used for a label with a
9256 \begin_inset Flex CharStyle:Code
9259 \begin_layout Plain Layout
9267 \begin_inset Flex CharStyle:Code
9270 \begin_layout Plain Layout
9276 is set, this string can be contain the special formatting commands described
9278 \begin_inset CommandInset ref
9280 reference "sec:counter"
9288 \begin_layout Plain Layout
9289 For the sake of backwards compatibility, the string
9290 \begin_inset Flex CharStyle:Code
9293 \begin_layout Plain Layout
9303 will be replaced by the expanded
9304 \begin_inset Flex CharStyle:Code
9307 \begin_layout Plain Layout
9314 \begin_inset Flex CharStyle:Code
9317 \begin_layout Plain Layout
9326 This feature is now obsolete and should be replaced by the mechanisms of
9328 \begin_inset CommandInset ref
9330 reference "sec:counter"
9342 \begin_layout Description
9343 \begin_inset Flex CharStyle:Code
9346 \begin_layout Plain Layout
9353 \begin_inset Flex CharStyle:Code
9356 \begin_layout Plain Layout
9362 ] This is used inside the appendix instead of
9363 \begin_inset Flex CharStyle:Code
9366 \begin_layout Plain Layout
9374 \begin_inset Flex CharStyle:Code
9377 \begin_layout Plain Layout
9384 \begin_inset Flex CharStyle:Code
9387 \begin_layout Plain Layout
9394 \change_inserted 0 1223265160
9398 \begin_layout Description
9400 \change_inserted 0 1223265640
9401 \begin_inset Flex CharStyle:Code
9404 \begin_layout Plain Layout
9406 \change_inserted 0 1223265166
9414 [FIXME] (Used only with XML-type formats.)
9419 \begin_layout Description
9420 \begin_inset Flex CharStyle:Code
9423 \begin_layout Plain Layout
9430 \begin_inset Flex CharStyle:Code
9433 \begin_layout Plain Layout
9438 , Manual, Static, Top_Environment,
9439 \begin_inset Newline newline
9442 Centered_Top_Environment, Sensitive, Counter
9448 \begin_inset Newline newline
9452 \begin_inset Flex CharStyle:Code
9455 \begin_layout Plain Layout
9461 means the label is the very first word (up to the first real blank).
9465 \begin_layout Plain Layout
9466 Use protected spaces if you want more than one word as the label.
9472 \begin_inset Flex CharStyle:Code
9475 \begin_layout Plain Layout
9481 means it is defined in the layout (see
9482 \begin_inset Flex CharStyle:Code
9485 \begin_layout Plain Layout
9493 \begin_inset Flex CharStyle:Code
9496 \begin_layout Plain Layout
9503 \begin_inset Flex CharStyle:Code
9506 \begin_layout Plain Layout
9507 Centered_Top_Environment
9512 are special cases of
9513 \begin_inset Flex CharStyle:Code
9516 \begin_layout Plain Layout
9523 The label will be printed above the paragraph, but only at the top of an
9524 environment or the top of a chain of paragraphs with this layout.
9525 Usage is for example the
9526 \begin_inset Flex CharStyle:MenuItem
9529 \begin_layout Plain Layout
9536 \begin_inset Flex CharStyle:MenuItem
9539 \begin_layout Plain Layout
9546 This is also the case for
9547 \begin_inset Flex CharStyle:Code
9550 \begin_layout Plain Layout
9556 labels with latex type
9557 \begin_inset Flex CharStyle:Code
9560 \begin_layout Plain Layout
9566 , in order to make layouts for theorems work correctly.
9568 \begin_inset Flex CharStyle:Code
9571 \begin_layout Plain Layout
9577 is a special case for the caption-labels
9578 \begin_inset Quotes eld
9582 \begin_inset Quotes erd
9586 \begin_inset Quotes eld
9590 \begin_inset Quotes erd
9595 \begin_inset Flex CharStyle:Code
9598 \begin_layout Plain Layout
9604 means the (hardcoded) label string depends on the kind of float.
9606 \begin_inset Flex CharStyle:Code
9609 \begin_layout Plain Layout
9615 label type defines automatically numbered labels.
9617 \begin_inset CommandInset ref
9619 reference "sec:counter"
9626 \begin_layout Description
9628 \change_deleted 0 1223265792
9629 \begin_inset Flex CharStyle:Code
9632 \begin_layout Plain Layout
9641 \begin_layout Description
9643 \change_deleted 0 1223265792
9644 \begin_inset Flex CharStyle:Code
9647 \begin_layout Plain Layout
9656 \begin_layout Description
9657 \begin_inset Flex CharStyle:Code
9660 \begin_layout Plain Layout
9666 The name of the corresponding LaTeX stuff.
9667 Either the environment or command name.
9670 \begin_layout Description
9672 \change_deleted 0 1223265962
9673 \begin_inset Flex CharStyle:Code
9676 \begin_layout Plain Layout
9685 \begin_layout Description
9686 \begin_inset Flex CharStyle:Code
9689 \begin_layout Plain Layout
9695 An optional parameter for the corresponding
9696 \begin_inset Flex CharStyle:Code
9699 \begin_layout Plain Layout
9706 This parameter cannot be changed from within LyX.
9709 \begin_layout Description
9710 \begin_inset Flex CharStyle:Code
9713 \begin_layout Plain Layout
9720 \begin_inset CommandInset label
9722 name "des:LatexType"
9727 \begin_inset Flex CharStyle:Code
9730 \begin_layout Plain Layout
9735 , Command, Environment, Item_Environment,
9741 \begin_inset Flex CharStyle:Code
9744 \begin_layout Plain Layout
9750 ] How the layout should be translated into LaTeX.
9752 \begin_inset Flex CharStyle:Code
9755 \begin_layout Plain Layout
9761 means nothing special.
9763 \begin_inset Flex CharStyle:Code
9766 \begin_layout Plain Layout
9773 \begin_inset Flex CharStyle:Code
9776 \begin_layout Plain Layout
9783 {\SpecialChar \ldots{}
9790 \begin_inset Flex CharStyle:Code
9793 \begin_layout Plain Layout
9800 \begin_inset Flex CharStyle:Code
9803 \begin_layout Plain Layout
9810 }\SpecialChar \ldots{}
9824 \begin_inset Flex CharStyle:Code
9827 \begin_layout Plain Layout
9834 \begin_inset Flex CharStyle:Code
9837 \begin_layout Plain Layout
9844 \begin_inset Flex CharStyle:Code
9847 \begin_layout Plain Layout
9855 is generated for each paragraph of this environment.
9857 \begin_inset Flex CharStyle:Code
9860 \begin_layout Plain Layout
9867 \begin_inset Flex CharStyle:Code
9870 \begin_layout Plain Layout
9877 \begin_inset Flex CharStyle:Code
9880 \begin_layout Plain Layout
9886 is passed as an argument to the environment.
9888 \begin_inset Flex CharStyle:Code
9891 \begin_layout Plain Layout
9897 can be defined in the
9898 \begin_inset Flex CharStyle:MenuItem
9901 \begin_layout Plain Layout
9906 ayout\SpecialChar \menuseparator
9918 \begin_inset Flex CharStyle:Code
9921 \begin_layout Plain Layout
9929 is perhaps a bit misleading, since these rules apply to SGML classes, too.
9930 Visit the SGML class files for specific examples.
9933 \begin_layout Standard
9934 Putting the last few things together, the LaTeX output will be either:
9937 \begin_layout LyX-Code
9940 latexname[latexparam]{\SpecialChar \ldots{}
9944 \begin_layout Standard
9948 \begin_layout LyX-Code
9951 begin{latexname}[latexparam] \SpecialChar \ldots{}
9957 \begin_layout Standard
9958 depending upon the LaTex type.
9961 \begin_layout Description
9962 \begin_inset Flex CharStyle:Code
9965 \begin_layout Plain Layout
9972 \begin_inset Flex CharStyle:Code
9975 \begin_layout Plain Layout
9981 ] If you put layouts into environments, the leftmargins are not simply added,
9982 but added with a factor
9983 \begin_inset Formula $\frac{4}{depth+4}$
9987 Note that this parameter is also used when the margin is defined as
9988 \begin_inset Flex CharStyle:Code
9991 \begin_layout Plain Layout
9998 \begin_inset Flex CharStyle:Code
10001 \begin_layout Plain Layout
10008 Then it is added to the manual or dynamic margin.
10010 \begin_inset Newline newline
10013 The argument is passed as a string.
10015 \begin_inset Quotes eld
10019 \begin_inset Flex CharStyle:Code
10022 \begin_layout Plain Layout
10029 \begin_inset Quotes erd
10032 means that the paragraph is indented with the width of
10033 \begin_inset Quotes eld
10037 \begin_inset Flex CharStyle:Code
10040 \begin_layout Plain Layout
10047 \begin_inset Quotes erd
10050 in the normal font.
10051 You can get a negative width by prefixing the string with
10052 \begin_inset Quotes eld
10056 \begin_inset Flex CharStyle:Code
10059 \begin_layout Plain Layout
10066 \begin_inset Quotes erd
10070 This way was chosen so that the look is the same with each used screen
10075 \begin_layout Description
10076 \begin_inset Flex CharStyle:Code
10079 \begin_layout Plain Layout
10086 \begin_inset Flex CharStyle:Code
10089 \begin_layout Plain Layout
10094 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10100 \begin_inset Newline newline
10103 The kind of margin that the layout has on the left side.
10105 \begin_inset Flex CharStyle:Code
10108 \begin_layout Plain Layout
10114 just means a fixed margin.
10116 \begin_inset Flex CharStyle:Code
10119 \begin_layout Plain Layout
10125 means that the left margin depends on the string entered in the
10126 \begin_inset Flex CharStyle:MenuItem
10129 \begin_layout Plain Layout
10134 dit\SpecialChar \menuseparator
10140 \begin_inset space ~
10149 This is used to typeset nice lists without tabulators.
10151 \begin_inset Flex CharStyle:Code
10154 \begin_layout Plain Layout
10160 means that the margin depends on the size of the label.
10161 This is used for automatic enumerated headlines.
10162 It is obvious that the headline
10163 \begin_inset Quotes eld
10166 5.4.3.2.1 Very long headline
10167 \begin_inset Quotes erd
10170 must have a wider left margin (as wide as
10171 \begin_inset Quotes eld
10175 \begin_inset Quotes erd
10178 plus the space) than
10179 \begin_inset Quotes eld
10182 3.2 Very long headline
10183 \begin_inset Quotes erd
10187 \begin_inset Quotes eld
10191 \begin_inset Quotes erd
10194 are not able to do this.
10196 \begin_inset Flex CharStyle:Code
10199 \begin_layout Plain Layout
10205 is similar, but only the very first row of the paragraph is dynamic, while
10206 the others are static; this is used, for example, for descriptions.
10208 \begin_inset Flex CharStyle:Code
10211 \begin_layout Plain Layout
10217 means the margin is chosen in a way that the longest row of this paragraph
10218 fits to the right margin.
10219 This is used to typeset an address on the right edge of the page.
10222 \begin_layout Description
10223 \begin_inset Flex CharStyle:Code
10226 \begin_layout Plain Layout
10233 \begin_inset Flex CharStyle:Code
10236 \begin_layout Plain Layout
10245 \begin_inset Flex CharStyle:Code
10248 \begin_layout Plain Layout
10254 ] Whether fragile commands in this layout should be
10255 \begin_inset Flex CharStyle:Code
10258 \begin_layout Plain Layout
10271 whether this command should itself be protected.)
10274 \begin_layout Description
10275 \begin_inset Flex CharStyle:Code
10278 \begin_layout Plain Layout
10285 \begin_inset Flex CharStyle:Code
10288 \begin_layout Plain Layout
10295 \begin_inset Flex CharStyle:Code
10298 \begin_layout Plain Layout
10306 ] Whether newlines are translated into LaTeX newlines (
10307 \begin_inset Flex CharStyle:Code
10310 \begin_layout Plain Layout
10321 The translation can be switched off to allow more comfortable LaTeX editing
10325 \begin_layout Description
10326 \begin_inset Flex CharStyle:Code
10329 \begin_layout Plain Layout
10336 \begin_inset Flex CharStyle:Code
10339 \begin_layout Plain Layout
10346 \begin_inset Flex CharStyle:Code
10349 \begin_layout Plain Layout
10357 ] Whether the following Paragraph is allowed to indent its very first row.
10359 \begin_inset Flex CharStyle:Code
10362 \begin_layout Plain Layout
10368 means that it is not allowed to do so;
10369 \begin_inset Flex CharStyle:Code
10372 \begin_layout Plain Layout
10378 means it could do so if it wants to.
10381 \begin_layout Description
10382 \begin_inset Flex CharStyle:Code
10385 \begin_layout Plain Layout
10392 \change_deleted 0 1223265997
10394 \change_inserted 0 1223266000
10395 Name of a layout that has replaced this layout.
10396 This is used to rename a layout, while keeping backward compatibility.
10401 \begin_layout Description
10402 \begin_inset Flex CharStyle:Code
10405 \begin_layout Plain Layout
10412 \begin_inset Flex CharStyle:Code
10415 \begin_layout Plain Layout
10421 ] The number of optional arguments that can be used with this layout.
10422 This is useful for things like section headings, and only makes sense with
10426 \begin_layout Description
10427 \begin_inset Flex CharStyle:Code
10430 \begin_layout Plain Layout
10437 \begin_inset Flex CharStyle:Code
10440 \begin_layout Plain Layout
10446 ] The indent of the very first line of a paragraph.
10448 \begin_inset Flex CharStyle:Code
10451 \begin_layout Plain Layout
10457 will be fixed for a certain layout.
10458 The exception is Standard layout, since the indentation of a Standard layout
10459 paragraph can be prohibited with
10460 \begin_inset Flex CharStyle:Code
10463 \begin_layout Plain Layout
10470 Also, Standard layout paragraphs inside environments use the
10471 \begin_inset Flex CharStyle:Code
10474 \begin_layout Plain Layout
10480 of the environment, not their native one.
10481 For example, Standard paragraphs inside an enumeration are not indented.
10484 \begin_layout Description
10485 \begin_inset Flex CharStyle:Code
10488 \begin_layout Plain Layout
10495 \begin_inset Flex CharStyle:Code
10498 \begin_layout Plain Layout
10504 ] The vertical space between two paragraphs of this layout.
10507 \begin_layout Description
10508 \begin_inset Flex CharStyle:Code
10511 \begin_layout Plain Layout
10518 \begin_inset Flex CharStyle:Code
10521 \begin_layout Plain Layout
10527 ] LyX allows the user to choose either
10528 \begin_inset Quotes eld
10532 \begin_inset Quotes erd
10536 \begin_inset Quotes eld
10540 \begin_inset Quotes erd
10543 to typeset a document.
10545 \begin_inset Quotes eld
10549 \begin_inset Quotes erd
10552 is chosen, this value is completely ignored.
10554 \begin_inset Quotes eld
10558 \begin_inset Quotes erd
10561 is chosen, the parindent of a LaTeXtype
10562 \begin_inset Quotes eld
10566 \begin_inset Quotes erd
10569 layout is ignored and all paragraphs are separated by this parskip argument.
10570 The vertical space is calculated with
10571 \begin_inset Flex CharStyle:Code
10574 \begin_layout Plain Layout
10576 \begin_inset space ~
10585 \begin_inset Flex CharStyle:Code
10588 \begin_layout Plain Layout
10594 is the height of a row with the normal font.
10595 This way, the look stays the same with different screen fonts.
10598 \begin_layout Description
10599 \begin_inset Flex CharStyle:Code
10602 \begin_layout Plain Layout
10609 \change_inserted 0 1223264275
10611 \begin_inset CommandInset label
10613 name "des:PathThru"
10622 \begin_inset Flex CharStyle:Code
10625 \begin_layout Plain Layout
10636 \begin_inset Flex CharStyle:Code
10639 \begin_layout Plain Layout
10645 ] Whether the contents of this paragraph should be output in raw form, meaning
10646 without special translations that LaTeX would require.
10649 \begin_layout Description
10650 \begin_inset Flex CharStyle:Code
10653 \begin_layout Plain Layout
10660 \begin_inset CommandInset label
10662 name "des:Preamble"
10666 Information to be included in the LaTeX preamable when this style is used.
10667 Used to define macros, load packages, etc., required by this particular
10670 \begin_inset Quotes eld
10674 \begin_inset Flex CharStyle:Code
10677 \begin_layout Plain Layout
10684 \begin_inset Quotes erd
10690 \begin_layout Description
10691 \begin_inset Flex CharStyle:Code
10694 \begin_layout Plain Layout
10701 \begin_inset Flex CharStyle:Code
10704 \begin_layout Plain Layout
10711 \begin_inset CommandInset label
10713 name "des:Requires"
10717 Whether the layout requires the feature
10718 \begin_inset Flex CharStyle:Code
10721 \begin_layout Plain Layout
10728 See the description of
10729 \begin_inset Flex CharStyle:Code
10732 \begin_layout Plain Layout
10739 \begin_inset CommandInset ref
10740 LatexCommand pageref
10741 reference "des:FreeSpacing"
10745 ) for information on `features'.
10749 \begin_layout Description
10750 \begin_inset Flex CharStyle:Code
10753 \begin_layout Plain Layout
10760 \begin_inset Flex CharStyle:Code
10763 \begin_layout Plain Layout
10770 \begin_inset Flex CharStyle:Code
10773 \begin_layout Plain Layout
10782 \begin_layout Description
10783 \begin_inset Flex CharStyle:Code
10786 \begin_layout Plain Layout
10793 \begin_inset Flex CharStyle:Code
10796 \begin_layout Plain Layout
10801 , onehalf, double, other
10810 ] This defines what the default spacing should be in the layout.
10812 \begin_inset Flex CharStyle:Code
10815 \begin_layout Plain Layout
10822 \begin_inset Flex CharStyle:Code
10825 \begin_layout Plain Layout
10832 \begin_inset Flex CharStyle:Code
10835 \begin_layout Plain Layout
10841 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
10842 If you specify the argument
10843 \begin_inset Flex CharStyle:Code
10846 \begin_layout Plain Layout
10852 , then you should also provide a numerical argument which will be the actual
10854 Note that, contrary to other parameters,
10855 \begin_inset Flex CharStyle:Code
10858 \begin_layout Plain Layout
10864 implies the generation of specific LaTeX code, using the package
10867 \begin_inset Flex CharStyle:Code
10870 \begin_layout Plain Layout
10879 \begin_layout Description
10880 \begin_inset Flex CharStyle:Code
10883 \begin_layout Plain Layout
10889 The font used for the text body .
10891 \begin_inset CommandInset ref
10893 reference "sec:fonts"
10900 \begin_layout Description
10902 \change_deleted 0 1223265258
10906 \begin_inset Flex CharStyle:Code
10909 \begin_layout Plain Layout
10917 The level of the style in the table of contents.
10918 This is used for automatic numbering of section headings.
10921 \begin_layout Description
10922 \begin_inset Flex CharStyle:Code
10925 \begin_layout Plain Layout
10932 \begin_inset Flex CharStyle:Code
10935 \begin_layout Plain Layout
10941 ] The vertical space with which the very first of a chain of paragraphs
10942 with this layout is separated from the previous paragraph.
10943 If the previous paragraph has another layout, the separations are not simply
10944 added, but the maximum is taken.
10947 \begin_layout Subsection
10951 \begin_layout Standard
10952 \begin_inset CommandInset label
10958 Since version 1.3.0 of LyX, it is has been both possible and necessary to
10959 define the floats (
10960 \begin_inset Flex CharStyle:MenuItem
10963 \begin_layout Plain Layout
10970 \begin_inset Flex CharStyle:MenuItem
10973 \begin_layout Plain Layout
10979 , \SpecialChar \ldots{}
10980 ) in the text class itself.
10981 Standard floats are included in the file
10982 \begin_inset Flex CharStyle:Code
10985 \begin_layout Plain Layout
10991 , so you may have to do no more than add
10994 \begin_layout LyX-Code
10995 Input stdfloats.inc
10998 \begin_layout Standard
10999 to your layout file.
11000 If you want to implement a text class that proposes some other float types
11001 (like the AGU class bundled with LyX), the information below will hopefully
11005 \begin_layout Description
11006 \begin_inset Flex CharStyle:Code
11009 \begin_layout Plain Layout
11016 \begin_inset Flex CharStyle:Code
11019 \begin_layout Plain Layout
11026 \begin_inset Quotes erd
11030 \begin_inset Quotes erd
11033 ] The file name extension of an auxiliary file for the list of figures (or
11035 LaTeX writes the captions to this file.
11038 \begin_layout Description
11039 \begin_inset Flex CharStyle:Code
11042 \begin_layout Plain Layout
11049 \begin_inset Flex CharStyle:Code
11052 \begin_layout Plain Layout
11059 \begin_inset Quotes erd
11063 \begin_inset Quotes erd
11066 ] The string that will be used in the menus and also for the caption.
11069 \begin_layout Description
11070 \begin_inset Flex CharStyle:Code
11073 \begin_layout Plain Layout
11080 \begin_inset Flex CharStyle:Code
11083 \begin_layout Plain Layout
11092 \begin_inset Flex CharStyle:Code
11095 \begin_layout Plain Layout
11102 \begin_inset Flex CharStyle:Code
11105 \begin_layout Plain Layout
11111 if the float is already defined by the LaTeX document class.
11113 \begin_inset Flex CharStyle:Code
11116 \begin_layout Plain Layout
11122 , the float will be defined using the LaTeX package
11123 \begin_inset Flex CharStyle:Code
11126 \begin_layout Plain Layout
11135 \begin_layout Description
11136 \begin_inset Flex CharStyle:Code
11139 \begin_layout Plain Layout
11146 \begin_inset Flex CharStyle:Code
11149 \begin_layout Plain Layout
11156 \begin_inset Quotes erd
11160 \begin_inset Quotes erd
11163 ] The heading used for the list of floats.
11166 \begin_layout Description
11167 \begin_inset Flex CharStyle:Code
11170 \begin_layout Plain Layout
11177 \begin_inset Flex CharStyle:Code
11180 \begin_layout Plain Layout
11187 \begin_inset Quotes erd
11191 \begin_inset Quotes erd
11194 ] This (optional) argument determines whether floats of this class will
11195 be numbered within some sectional unit of the document.
11196 For example, if within is equal to
11197 \begin_inset Flex CharStyle:Code
11200 \begin_layout Plain Layout
11206 , the floats will be numbered within chapters.
11210 \begin_layout Description
11211 \begin_inset Flex CharStyle:Code
11214 \begin_layout Plain Layout
11221 \begin_inset Flex CharStyle:Code
11224 \begin_layout Plain Layout
11231 \begin_inset Quotes erd
11235 \begin_inset Quotes erd
11238 ] The default placement for the given class of floats.
11239 The string should be as in standard LaTeX:
11240 \begin_inset Flex CharStyle:Code
11243 \begin_layout Plain Layout
11250 \begin_inset Flex CharStyle:Code
11253 \begin_layout Plain Layout
11260 \begin_inset Flex CharStyle:Code
11263 \begin_layout Plain Layout
11270 \begin_inset Flex CharStyle:Code
11273 \begin_layout Plain Layout
11279 for top, bottom, page, and here, respectively.
11283 \begin_layout Plain Layout
11284 Note that the order of these letters in the string is irrelevant, like in
11290 On top of that there is a new type,
11291 \begin_inset Flex CharStyle:Code
11294 \begin_layout Plain Layout
11300 , which does not really correspond to a float, since it means: put it
11301 \begin_inset Quotes eld
11305 \begin_inset Quotes erd
11309 Note however that the
11310 \begin_inset Flex CharStyle:Code
11313 \begin_layout Plain Layout
11319 specifier is special and, because of implementation details, cannot be
11320 used in non-builtin float types.
11321 If you do not understand what this means, just use
11322 \begin_inset Quotes eld
11326 \begin_inset Flex CharStyle:Code
11329 \begin_layout Plain Layout
11336 \begin_inset Quotes erd
11342 \begin_layout Description
11343 \begin_inset Flex CharStyle:Code
11346 \begin_layout Plain Layout
11353 \begin_inset Flex CharStyle:Code
11356 \begin_layout Plain Layout
11363 \begin_inset Quotes erd
11367 \begin_inset Quotes erd
11370 ] The style used when defining the float using
11371 \begin_inset Flex CharStyle:Code
11374 \begin_layout Plain Layout
11385 \begin_layout Description
11386 \begin_inset Flex CharStyle:Code
11389 \begin_layout Plain Layout
11396 \begin_inset Flex CharStyle:Code
11399 \begin_layout Plain Layout
11406 \begin_inset Quotes erd
11410 \begin_inset Quotes erd
11414 \begin_inset Quotes eld
11418 \begin_inset Quotes erd
11421 of the new class of floats, like program or algorithm.
11422 After the appropriate
11423 \begin_inset Flex CharStyle:Code
11426 \begin_layout Plain Layout
11435 \begin_inset Flex CharStyle:Code
11438 \begin_layout Plain Layout
11447 \begin_inset Flex CharStyle:Code
11450 \begin_layout Plain Layout
11461 \begin_layout Standard
11462 Note that defining a float with type
11463 \begin_inset Flex CharStyle:Code
11466 \begin_layout Plain Layout
11474 automatically defines the corresponding counter with name
11475 \begin_inset Flex CharStyle:Code
11478 \begin_layout Plain Layout
11489 \begin_layout Subsection
11490 Inset layouts and Flex insets
11493 \begin_layout Standard
11494 \begin_inset CommandInset label
11496 name "sec:charstyle"
11500 LyX has supported character styles since version 1.4.0; since version 1.6.0
11501 these are called Flex insets.
11505 \begin_layout Standard
11506 Furthermore, it is possible to define the general layout of many different
11508 Currently, InsetLayout can be used to customize the layout parameters
11509 for footnotes, marginal notes, note insets, ERT insets, branches, listings,
11510 indexes, boxes, tables, algorithms, URLs, and optional arguments, as well
11515 \begin_layout Standard
11516 Flex insets come in three different kinds:
11519 \begin_layout Itemize
11521 \begin_inset Flex CharStyle:Code
11524 \begin_layout Plain Layout
11530 ): These define semantic markup corresponding to such LaTeX commands as
11532 \begin_inset Flex CharStyle:Code
11535 \begin_layout Plain Layout
11544 \begin_inset Flex CharStyle:Code
11547 \begin_layout Plain Layout
11558 \begin_layout Itemize
11560 \begin_inset Flex CharStyle:Code
11563 \begin_layout Plain Layout
11569 ): These can be used to define custom collapsable insets, similar to ERT,
11570 footnote, and the like.
11573 \begin_layout Itemize
11575 \begin_inset Flex CharStyle:Code
11578 \begin_layout Plain Layout
11584 ): For use with DocBook classes.
11587 \begin_layout Standard
11589 \begin_inset Flex CharStyle:Code
11592 \begin_layout Plain Layout
11598 definition starting line is of the form
11601 \begin_layout LyX-Code
11602 InsetLayout <Type> <Name>
11605 \begin_layout Standard
11607 \begin_inset Flex CharStyle:Code
11610 \begin_layout Plain Layout
11617 \begin_inset Flex CharStyle:Code
11620 \begin_layout Plain Layout
11627 \begin_inset Flex CharStyle:Code
11630 \begin_layout Plain Layout
11637 \begin_inset Flex CharStyle:Code
11640 \begin_layout Plain Layout
11647 \begin_inset Flex CharStyle:Code
11650 \begin_layout Plain Layout
11657 \begin_inset Flex CharStyle:Code
11660 \begin_layout Plain Layout
11667 \begin_inset Flex CharStyle:Code
11670 \begin_layout Plain Layout
11677 \begin_inset Flex CharStyle:Code
11680 \begin_layout Plain Layout
11687 \begin_inset Flex CharStyle:Code
11690 \begin_layout Plain Layout
11697 \begin_inset Flex CharStyle:Code
11700 \begin_layout Plain Layout
11707 \begin_inset Flex CharStyle:Code
11710 \begin_layout Plain Layout
11717 \begin_inset Flex CharStyle:Code
11720 \begin_layout Plain Layout
11727 \begin_inset Flex CharStyle:Code
11730 \begin_layout Plain Layout
11737 \begin_inset Flex CharStyle:Code
11740 \begin_layout Plain Layout
11747 \begin_inset Flex CharStyle:Code
11750 \begin_layout Plain Layout
11757 \begin_inset Flex CharStyle:Code
11760 \begin_layout Plain Layout
11767 \begin_inset Flex CharStyle:Code
11770 \begin_layout Plain Layout
11778 \begin_inset Flex CharStyle:Code
11781 \begin_layout Plain Layout
11788 \begin_inset Flex CharStyle:Code
11791 \begin_layout Plain Layout
11798 \begin_inset Flex CharStyle:Code
11801 \begin_layout Plain Layout
11807 should have the form
11808 \begin_inset Flex CharStyle:Code
11811 \begin_layout Plain Layout
11818 \begin_inset Flex CharStyle:Code
11821 \begin_layout Plain Layout
11828 \begin_inset Flex CharStyle:Code
11831 \begin_layout Plain Layout
11838 \begin_inset Flex CharStyle:Code
11841 \begin_layout Plain Layout
11848 \begin_inset Flex CharStyle:Code
11851 \begin_layout Plain Layout
11858 \begin_inset Flex CharStyle:Code
11861 \begin_layout Plain Layout
11867 is any valid identifier.
11871 \begin_layout Standard
11873 \begin_inset Flex CharStyle:Code
11876 \begin_layout Plain Layout
11882 section can contain the following entries:
11885 \begin_layout Description
11886 \begin_inset Flex CharStyle:Code
11889 \begin_layout Plain Layout
11895 The color for the inset's background.
11896 These valid colors are defined in
11897 \begin_inset Flex CharStyle:Code
11900 \begin_layout Plain Layout
11909 \begin_layout Description
11910 \begin_inset Flex CharStyle:Code
11913 \begin_layout Plain Layout
11919 As with paragraph styles (see page
11920 \begin_inset CommandInset ref
11922 reference "des:CopyStyle"
11927 \change_inserted 0 1223263809
11931 \begin_layout Description
11933 \change_inserted 0 1223263872
11934 \begin_inset Flex CharStyle:Code
11937 \begin_layout Plain Layout
11939 \change_inserted 0 1223263814
11946 \begin_inset Flex CharStyle:Code
11949 \begin_layout Plain Layout
11951 \change_inserted 0 1223263839
11960 \begin_inset Flex CharStyle:Code
11963 \begin_layout Plain Layout
11965 \change_inserted 0 1223263839
11971 ] Indicates whether the user may employ the Paragraph Settings dialog to
11972 customize the paragraph.
11977 \begin_layout Description
11978 \begin_inset Flex CharStyle:Code
11981 \begin_layout Plain Layout
11988 \begin_inset Flex CharStyle:Code
11991 \begin_layout Plain Layout
11998 \begin_inset Flex CharStyle:Code
12001 \begin_layout Plain Layout
12008 \begin_inset Flex CharStyle:Code
12011 \begin_layout Plain Layout
12017 , describing the rendering style used for the inset's frame and buttons.
12018 Footnotes generally use
12019 \begin_inset Flex CharStyle:Code
12022 \begin_layout Plain Layout
12028 ; ERT insets generally use
12029 \begin_inset Flex CharStyle:Code
12032 \begin_layout Plain Layout
12038 ; and character styles use
12039 \begin_inset Flex CharStyle:Code
12042 \begin_layout Plain Layout
12049 \change_inserted 0 1223264047
12053 \begin_layout Description
12055 \change_inserted 0 1223264091
12056 \begin_inset Flex CharStyle:Code
12059 \begin_layout Plain Layout
12061 \change_inserted 0 1223264053
12069 Required at the end of the InsetLayout declarations.
12074 \begin_layout Description
12075 \begin_inset Flex CharStyle:Code
12078 \begin_layout Plain Layout
12084 The font used for both the text body
12090 \begin_inset space ~
12094 \begin_inset CommandInset ref
12096 reference "sec:fonts"
12101 Note that defining this font automatically defines the
12102 \begin_inset Flex CharStyle:Code
12105 \begin_layout Plain Layout
12111 to the same value, so define this first and define
12112 \begin_inset Flex CharStyle:Code
12115 \begin_layout Plain Layout
12121 later if you want them to be different.
12124 \begin_layout Description
12125 \begin_inset Flex CharStyle:Code
12128 \begin_layout Plain Layout
12135 \change_inserted 0 1223263904
12139 \begin_layout Description
12141 \change_inserted 0 1223263954
12142 \begin_inset Flex CharStyle:Code
12145 \begin_layout Plain Layout
12147 \change_inserted 0 1223263911
12156 \begin_inset Flex CharStyle:Code
12159 \begin_layout Plain Layout
12161 \change_inserted 0 1223263915
12170 \begin_inset Flex CharStyle:Code
12173 \begin_layout Plain Layout
12175 \change_inserted 0 1223263915
12181 ] Indicates whether the PlainLayout should be used or, instead, the user
12182 can change the paragraph style used in the inset.
12187 \begin_layout Description
12188 \begin_inset Flex CharStyle:Code
12191 \begin_layout Plain Layout
12197 As with paragraph styles (see page
12198 \begin_inset CommandInset ref
12199 LatexCommand pageref
12200 reference "des:FreeSpacing"
12207 \begin_layout Description
12208 \begin_inset Flex CharStyle:Code
12211 \begin_layout Plain Layout
12217 As with paragraph styles (see page
12218 \begin_inset CommandInset ref
12219 LatexCommand pageref
12220 reference "des:KeepEmpty"
12227 \begin_layout Description
12229 \change_deleted 0 1223264111
12230 \begin_inset Flex CharStyle:Code
12233 \begin_layout Plain Layout
12239 What will be displayed on the button or elsewhere as the inset label.
12240 Some inset types (ERT and Branch) modify this label on the fly.
12243 \begin_layout Description
12244 \begin_inset Flex CharStyle:Code
12247 \begin_layout Plain Layout
12253 The font used for the label.
12255 \begin_inset space ~
12259 \begin_inset CommandInset ref
12261 reference "sec:fonts"
12266 Note that this definition can never appear before
12267 \begin_inset Flex CharStyle:Code
12270 \begin_layout Plain Layout
12276 , lest it be ineffective.
12279 \begin_layout Description
12281 \change_inserted 0 1223264113
12282 \begin_inset Flex CharStyle:Code
12285 \begin_layout Plain Layout
12287 \change_inserted 0 1223264113
12293 What will be displayed on the button or elsewhere as the inset label.
12294 Some inset types (ERT and Branch) modify this label on the fly.
12297 \begin_layout Description
12298 \begin_inset Flex CharStyle:Code
12301 \begin_layout Plain Layout
12307 The name of the corresponding LaTeX stuff.
12308 Either the environment or command name.
12311 \begin_layout Description
12312 \begin_inset Flex CharStyle:Code
12315 \begin_layout Plain Layout
12321 The optional parameter for the corresponding
12322 \begin_inset Flex CharStyle:Code
12325 \begin_layout Plain Layout
12331 stuff, including possible bracket pairs like
12332 \begin_inset Flex CharStyle:Code
12335 \begin_layout Plain Layout
12342 This parameter cannot be changed from within LyX.
12345 \begin_layout Description
12346 \begin_inset Flex CharStyle:Code
12349 \begin_layout Plain Layout
12355 As with paragraph styles (see page
12356 \begin_inset CommandInset ref
12357 LatexCommand pageref
12358 reference "des:LatexType"
12365 \begin_layout Description
12366 \begin_inset Flex CharStyle:Code
12369 \begin_layout Plain Layout
12376 \begin_inset Flex CharStyle:Code
12379 \begin_layout Plain Layout
12386 \begin_inset Flex CharStyle:Code
12389 \begin_layout Plain Layout
12396 \begin_inset Flex CharStyle:Code
12399 \begin_layout Plain Layout
12406 \begin_inset Flex CharStyle:Code
12409 \begin_layout Plain Layout
12415 (indicating a dummy definition ending definitions of charstyles etc.).
12416 This entry is only meaningful for Flex (user definable) insets.
12417 \change_inserted 0 1223264124
12421 \begin_layout Description
12423 \change_inserted 0 1223264224
12424 \begin_inset Flex CharStyle:Code
12427 \begin_layout Plain Layout
12429 \change_inserted 0 1223264131
12438 \begin_inset Flex CharStyle:Code
12441 \begin_layout Plain Layout
12443 \change_inserted 0 1223264137
12452 \begin_inset Flex CharStyle:Code
12455 \begin_layout Plain Layout
12457 \change_inserted 0 1223264137
12463 ] Whether multiple paragraphs are permitted in this inset.
12464 This will also set CustomPars to the same value and ForcePlain to the opposite
12466 These can be reset to other values, if they are used
12475 \begin_layout Description
12476 \begin_inset Flex CharStyle:Code
12479 \begin_layout Plain Layout
12486 \begin_inset Flex CharStyle:Code
12489 \begin_layout Plain Layout
12498 \begin_inset Flex CharStyle:Code
12501 \begin_layout Plain Layout
12507 ] Whether fragile commands in this layout should be
12508 \begin_inset Flex CharStyle:Code
12511 \begin_layout Plain Layout
12524 whether this command should itself be protected.)
12525 \change_inserted 0 1223264245
12529 \begin_layout Description
12531 \change_inserted 0 1223264288
12532 \begin_inset Flex CharStyle:Code
12535 \begin_layout Plain Layout
12537 \change_inserted 0 1223264250
12546 \begin_inset Flex CharStyle:Code
12549 \begin_layout Plain Layout
12551 \change_inserted 0 1223264254
12560 \begin_inset Flex CharStyle:Code
12563 \begin_layout Plain Layout
12565 \change_inserted 0 1223264254
12571 ] As with paragraph styles (see page
12572 \begin_inset CommandInset ref
12574 reference "des:PathThru"
12583 \begin_layout Description
12584 \begin_inset Flex CharStyle:Code
12587 \begin_layout Plain Layout
12593 As with paragraph styles (see page
12594 \begin_inset CommandInset ref
12595 LatexCommand pageref
12596 reference "des:Preamble"
12603 \begin_layout Description
12604 \begin_inset Flex CharStyle:Code
12607 \begin_layout Plain Layout
12614 \begin_inset Flex CharStyle:Code
12617 \begin_layout Plain Layout
12623 ] As with paragraph styles (see page
12624 \begin_inset CommandInset ref
12625 LatexCommand pageref
12626 reference "des:Requires"
12633 \begin_layout Subsection
12637 \begin_layout Standard
12638 \begin_inset CommandInset label
12644 Since version 1.3.0 of LyX, it is both possible and necessary to define the
12646 \begin_inset Flex CharStyle:MenuItem
12649 \begin_layout Plain Layout
12656 \begin_inset Flex CharStyle:MenuItem
12659 \begin_layout Plain Layout
12665 , \SpecialChar \ldots{}
12666 ) in the text class itself.
12667 The standard counters are defined in the file
12668 \begin_inset Flex CharStyle:Code
12671 \begin_layout Plain Layout
12677 , so you may have to do no more than add
12680 \begin_layout LyX-Code
12681 Input stdcounters.inc
12684 \begin_layout Standard
12685 to your layout file to get them to work.
12686 But if you want to define custom counters, then you can do so, using the
12687 following parameters:
12690 \begin_layout Description
12691 \begin_inset Flex CharStyle:Code
12694 \begin_layout Plain Layout
12695 LabelString [string=""]
12700 when this is defined, this string defines how the counter is displayed.
12701 Setting this value sets
12702 \begin_inset Flex CharStyle:Code
12705 \begin_layout Plain Layout
12706 LabelStringAppendix
12712 The following special constructs can be used in the string:
12716 \begin_layout Itemize
12717 \begin_inset Flex CharStyle:Code
12720 \begin_layout Plain Layout
12728 will be replaced by the expansion of the
12729 \begin_inset Flex CharStyle:Code
12732 \begin_layout Plain Layout
12739 \begin_inset Flex CharStyle:Code
12742 \begin_layout Plain Layout
12743 LabelStringAppendix
12749 \begin_inset Flex CharStyle:Code
12752 \begin_layout Plain Layout
12762 \begin_layout Itemize
12763 counter values can be expressed using LaTeX-like macros
12764 \begin_inset Flex CharStyle:Code
12767 \begin_layout Plain Layout
12784 \begin_inset Flex CharStyle:Code
12787 \begin_layout Plain Layout
12799 \begin_layout Plain Layout
12809 Actually, the situation is a bit more complicated: any
12828 other than those descibed below will produce arabic numerals.
12829 It would not be surprising to see this change in the future.
12835 \begin_inset Flex CharStyle:Code
12838 \begin_layout Plain Layout
12844 : 1, 2, 3,\SpecialChar \ldots{}
12846 \begin_inset Flex CharStyle:Code
12849 \begin_layout Plain Layout
12855 for lower-case letters: a, b, c, \SpecialChar \ldots{}
12857 \begin_inset Flex CharStyle:Code
12860 \begin_layout Plain Layout
12866 for upper-case letters: A, B, C, \SpecialChar \ldots{}
12868 \begin_inset Flex CharStyle:Code
12871 \begin_layout Plain Layout
12877 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
12879 \begin_inset Flex CharStyle:Code
12882 \begin_layout Plain Layout
12888 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
12890 \begin_inset Flex CharStyle:Code
12893 \begin_layout Plain Layout
12899 for hebrew numerals.
12903 \begin_layout Standard
12904 If LabelString is not defined, a default value is constructed as follows:
12905 if the counter has a master counter
12906 \begin_inset Flex CharStyle:Code
12909 \begin_layout Plain Layout
12916 \begin_inset Flex CharStyle:Code
12919 \begin_layout Plain Layout
12926 \begin_inset Flex CharStyle:Code
12929 \begin_layout Plain Layout
12939 is used; otherwise the string
12940 \begin_inset Flex CharStyle:Code
12943 \begin_layout Plain Layout
12954 \begin_layout Description
12955 \begin_inset Flex CharStyle:Code
12958 \begin_layout Plain Layout
12959 LabelStringAppendix [string=""]
12965 \begin_inset Flex CharStyle:Code
12968 \begin_layout Plain Layout
12977 \begin_layout Description
12978 \begin_inset Flex CharStyle:Code
12981 \begin_layout Plain Layout
12988 \begin_inset Flex CharStyle:Code
12991 \begin_layout Plain Layout
12998 \begin_inset Quotes erd
13002 \begin_inset Quotes erd
13005 ] The name of the counter.
13008 \begin_layout Description
13009 \begin_inset Flex CharStyle:Code
13012 \begin_layout Plain Layout
13019 \begin_inset Flex CharStyle:Code
13022 \begin_layout Plain Layout
13029 \begin_inset Quotes erd
13033 \begin_inset Quotes erd
13036 ] If this is set to the name of another counter, the present counter will
13037 be reset everytime the other one is increased.
13039 \begin_inset Flex CharStyle:Code
13042 \begin_layout Plain Layout
13049 \begin_inset Flex CharStyle:Code
13052 \begin_layout Plain Layout
13061 \begin_layout Subsection
13065 \begin_layout Standard
13066 \begin_inset CommandInset label
13072 A font description looks like this:
13075 \begin_layout LyX-Code
13085 \begin_layout LyX-Code
13089 \begin_layout LyX-Code
13093 \begin_layout Standard
13094 The following commands are available:
13097 \begin_layout Description
13098 \begin_inset Flex CharStyle:Code
13101 \begin_layout Plain Layout
13108 \begin_inset Flex CharStyle:Code
13111 \begin_layout Plain Layout
13120 \begin_inset Flex CharStyle:Code
13123 \begin_layout Plain Layout
13130 \begin_inset Flex CharStyle:Code
13133 \begin_layout Plain Layout
13140 \begin_inset Flex CharStyle:Code
13143 \begin_layout Plain Layout
13150 \begin_inset Flex CharStyle:Code
13153 \begin_layout Plain Layout
13160 \begin_inset Flex CharStyle:Code
13163 \begin_layout Plain Layout
13170 \begin_inset Flex CharStyle:Code
13173 \begin_layout Plain Layout
13180 \begin_inset Flex CharStyle:Code
13183 \begin_layout Plain Layout
13190 \begin_inset Flex CharStyle:Code
13193 \begin_layout Plain Layout
13202 \begin_layout Description
13203 \begin_inset Flex CharStyle:Code
13206 \begin_layout Plain Layout
13215 \begin_inset Flex CharStyle:Code
13218 \begin_layout Plain Layout
13229 \begin_inset Flex CharStyle:Code
13232 \begin_layout Plain Layout
13239 \begin_inset Flex CharStyle:Code
13242 \begin_layout Plain Layout
13251 \begin_layout Description
13252 \begin_inset Flex CharStyle:Code
13255 \begin_layout Plain Layout
13262 \begin_inset Flex CharStyle:Code
13265 \begin_layout Plain Layout
13271 ] Valid argument sare:
13272 \begin_inset Flex CharStyle:Code
13275 \begin_layout Plain Layout
13282 \begin_inset Flex CharStyle:Code
13285 \begin_layout Plain Layout
13292 \begin_inset Flex CharStyle:Code
13295 \begin_layout Plain Layout
13302 \begin_inset Flex CharStyle:Code
13305 \begin_layout Plain Layout
13312 \begin_inset Flex CharStyle:Code
13315 \begin_layout Plain Layout
13322 \begin_inset Flex CharStyle:Code
13325 \begin_layout Plain Layout
13332 Each of these turns on or off the corresponding attribute.
13335 \begin_layout Description
13336 \begin_inset Flex CharStyle:Code
13339 \begin_layout Plain Layout
13348 \begin_inset Flex CharStyle:Code
13351 \begin_layout Plain Layout
13362 \begin_inset Flex CharStyle:Code
13365 \begin_layout Plain Layout
13374 \begin_layout Description
13375 \begin_inset Flex CharStyle:Code
13378 \begin_layout Plain Layout
13387 \begin_inset Flex CharStyle:Code
13390 \begin_layout Plain Layout
13401 \begin_inset Flex CharStyle:Code
13404 \begin_layout Plain Layout
13411 \begin_inset Flex CharStyle:Code
13414 \begin_layout Plain Layout
13421 \begin_inset Flex CharStyle:Code
13424 \begin_layout Plain Layout
13433 \begin_layout Description
13434 \begin_inset Flex CharStyle:Code
13437 \begin_layout Plain Layout
13444 \begin_inset Flex CharStyle:Code
13447 \begin_layout Plain Layout
13454 \begin_inset Flex CharStyle:Code
13457 \begin_layout Plain Layout
13464 \begin_inset Flex CharStyle:Code
13467 \begin_layout Plain Layout
13476 \begin_inset Flex CharStyle:Code
13479 \begin_layout Plain Layout
13486 \begin_inset Flex CharStyle:Code
13489 \begin_layout Plain Layout
13496 \begin_inset Flex CharStyle:Code
13499 \begin_layout Plain Layout
13506 \begin_inset Flex CharStyle:Code
13509 \begin_layout Plain Layout
13516 \begin_inset Flex CharStyle:Code
13519 \begin_layout Plain Layout
13528 \begin_layout Subsection
13529 Upgrading old layout files
13532 \begin_layout Standard
13533 The file format of layout files changes from time to time, so old layout
13534 files need to be converted.
13535 This process has been automated since LyX 1.4.0: If LyX reads an old format
13536 layout file it will call the conversion tool
13537 \begin_inset Flex CharStyle:Code
13540 \begin_layout Plain Layout
13541 LyXDir/scripts/layout2layout.py
13546 and convert it to a temporary file in current format.
13547 The original file is left untouched.
13548 If you want to convert the layout file permanently, just call the converter
13552 \begin_layout LyX-Code
13553 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
13556 \begin_layout Standard
13557 (You need to replace
13558 \begin_inset Flex CharStyle:Code
13561 \begin_layout Plain Layout
13567 with the name of your LyX system directory, unless you happen to have defined
13568 such an environment variable.) Then copy
13569 \begin_inset Flex CharStyle:Code
13572 \begin_layout Plain Layout
13579 \begin_inset Flex CharStyle:Code
13582 \begin_layout Plain Layout
13591 \begin_layout Standard
13592 The automatic conversion only handles syntax changes.
13593 It cannot handle the case where the contents of included files was changed,
13594 so these will have to be converted separately.
13597 \begin_layout Section
13599 \begin_inset CommandInset label
13601 name "sec:templates"
13608 \begin_layout Standard
13609 Templates are created just like usual documents.
13610 The only difference is that usual documents contain all possible settings,
13611 including the font scheme and the paper size.
13612 Usually a user doesn't want a template to overwrite his defaults in these
13614 For that reason, the designer of a template should remove the corresponding
13616 \begin_inset Flex CharStyle:Code
13619 \begin_layout Plain Layout
13628 \begin_inset Flex CharStyle:Code
13631 \begin_layout Plain Layout
13639 from the template LyX file.
13640 This can be done with any simple text-editor, for example
13641 \begin_inset Flex CharStyle:Code
13644 \begin_layout Plain Layout
13651 \begin_inset Flex CharStyle:Code
13654 \begin_layout Plain Layout
13664 \begin_layout Standard
13665 Put the edited template files you create in
13666 \begin_inset Flex CharStyle:Code
13669 \begin_layout Plain Layout
13675 , copy the ones you use from the global template directory in
13676 \begin_inset Flex CharStyle:Code
13679 \begin_layout Plain Layout
13685 to the same place, and redefine the template path in the
13686 \begin_inset Flex CharStyle:MenuItem
13689 \begin_layout Plain Layout
13697 \SpecialChar \menuseparator
13702 references\SpecialChar \menuseparator
13711 \begin_layout Standard
13712 Note that there is a template which has a particular meaning:
13713 \begin_inset Flex CharStyle:Code
13716 \begin_layout Plain Layout
13723 This template is loaded everytime you create a new document with
13724 \begin_inset Flex CharStyle:MenuItem
13727 \begin_layout Plain Layout
13737 \SpecialChar \menuseparator
13739 \begin_inset Flex CharStyle:MenuItem
13742 \begin_layout Plain Layout
13752 in order to provide useful defaults.
13753 To create this template from inside LyX, all you have to do is to open
13754 a document with the correct settings, and use the
13755 \begin_inset Flex CharStyle:MenuItem
13758 \begin_layout Plain Layout
13763 e as Document Defaults
13771 \begin_layout Chapter
13772 Including External Material
13775 \begin_layout Standard
13776 The use of material from sources external to LyX is covered in detail in
13782 This part of the manual covers what needs to happen behind the scenes for
13783 new sorts of material to be included.
13786 \begin_layout Section
13790 \begin_layout Standard
13791 The external material feature is based on the concept of a
13796 A template is a specification of how LyX should interface with a certain
13798 As bundled, LyX comes with predefined templates for Xfig figures, various
13799 raster format images, chess diagrams, and LilyPond music notation.
13800 You can check the actual list by using the menu
13801 \begin_inset Flex CharStyle:MenuItem
13804 \begin_layout Plain Layout
13805 Insert\SpecialChar \menuseparator
13806 File\SpecialChar \menuseparator
13813 Furthermore, it is possible to roll your own template to support a specific
13815 Later we'll describe in more detail what is involved, and hopefully you
13816 will submit all the templates you create so we can include them in a later
13820 \begin_layout Standard
13821 Another basic idea of the external material feature is to distinguish between
13822 the original file that serves as a base for final material and the produced
13823 file that is included in your exported or printed document.
13824 For example, consider the case of a figure produced with
13825 \begin_inset Flex CharStyle:Code
13828 \begin_layout Plain Layout
13835 The Xfig application itself works on an original file with the
13836 \begin_inset Flex CharStyle:Code
13839 \begin_layout Plain Layout
13846 Within XFig, you create and change your figure, and when you are done,
13848 \begin_inset Flex CharStyle:Code
13851 \begin_layout Plain Layout
13858 When you want to include the figure in your document, you invoke
13859 \begin_inset Flex CharStyle:Code
13862 \begin_layout Plain Layout
13868 in order to create a PostScript file that can readily be included in your
13871 \begin_inset Flex CharStyle:Code
13874 \begin_layout Plain Layout
13880 file is the original file, and the PostScript file is the produced file.
13883 \begin_layout Standard
13884 This distinction is important in order to allow updating of the material
13885 while you are in the process of writing the document.
13886 Furthermore, it provides us with the flexibility that is needed to support
13887 multiple export formats.
13888 For instance, in the case of a plain text file, it is not exactly an award-winn
13889 ing idea to include the figure as raw PostScript®.
13890 Instead, you'd either prefer to just include a reference to the figure
13891 or try to invoke some graphics to Ascii converter to make the final result
13892 look similar to the real graphics.
13893 The external material management allows you to do this, because it is parameter
13894 ized on the different export formats that LyX supports.
13897 \begin_layout Standard
13898 Besides supporting the production of different products according to the
13899 exported format, it supports tight integration with editing and viewing
13901 In the case of an XFig figure, you are able to invoke Xfig on the original
13902 file with a single click from within the external material dialog in LyX,
13903 and also preview the produced PostScript file with ghostview with another
13905 No more fiddling around with the command line and/or file browsers to locate
13906 and manipulate the original or produced files.
13907 In this way, you are finally able to take full advantage of the many different
13908 applications that are relevant to use when you write your documents, and
13909 ultimately be more productive.
13912 \begin_layout Section
13913 The external template configuration file
13916 \begin_layout Standard
13917 It is relatively easy to add custom external template definitions to LyX.
13918 However, be aware that doing this in an careless manner most probably
13922 introduce an easily exploitable security hole.
13923 So before you do this, please read the discussion about security in section
13925 \begin_inset CommandInset ref
13927 reference "sec:Security-discussion"
13934 \begin_layout Standard
13935 Having said that, we encourage you to submit any interesting templates that
13940 \begin_layout Standard
13941 The external templates are defined in the
13942 \begin_inset Flex CharStyle:Code
13945 \begin_layout Plain Layout
13946 LyXDir/lib/external_templates
13952 You can place your own version in
13953 \begin_inset Flex CharStyle:Code
13956 \begin_layout Plain Layout
13957 UserDir/external_templates
13965 \begin_layout Standard
13966 A typical template looks like this:
13969 \begin_layout LyX-Code
13973 \begin_layout LyX-Code
13974 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
13977 \begin_layout LyX-Code
13981 \begin_layout LyX-Code
13985 \begin_layout LyX-Code
13989 \begin_layout LyX-Code
13993 \begin_layout LyX-Code
13997 \begin_layout LyX-Code
13998 AutomaticProduction true
14001 \begin_layout LyX-Code
14005 \begin_layout LyX-Code
14009 \begin_layout LyX-Code
14013 \begin_layout LyX-Code
14014 TransformCommand Rotate RotationLatexCommand
14017 \begin_layout LyX-Code
14018 TransformCommand Resize ResizeLatexCommand
14021 \begin_layout LyX-Code
14022 Product "$$RotateFront$$ResizeFront
14025 \begin_layout LyX-Code
14030 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
14033 \begin_layout LyX-Code
14034 $$ResizeBack$$RotateBack"
14037 \begin_layout LyX-Code
14041 \begin_layout LyX-Code
14042 UpdateResult "$$AbsPath$$Basename.pstex_t"
14045 \begin_layout LyX-Code
14046 Requirement "graphicx"
14049 \begin_layout LyX-Code
14050 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
14053 \begin_layout LyX-Code
14054 ReferencedFile latex "$$AbsPath$$Basename.eps"
14057 \begin_layout LyX-Code
14058 ReferencedFile dvi "$$AbsPath$$Basename.eps"
14061 \begin_layout LyX-Code
14065 \begin_layout LyX-Code
14069 \begin_layout LyX-Code
14070 TransformCommand Rotate RotationLatexCommand
14073 \begin_layout LyX-Code
14074 TransformCommand Resize ResizeLatexCommand
14077 \begin_layout LyX-Code
14078 Product "$$RotateFront$$ResizeFront
14081 \begin_layout LyX-Code
14086 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
14089 \begin_layout LyX-Code
14090 $$ResizeBack$$RotateBack"
14093 \begin_layout LyX-Code
14094 UpdateFormat pdftex
14097 \begin_layout LyX-Code
14098 UpdateResult "$$AbsPath$$Basename.pdftex_t"
14101 \begin_layout LyX-Code
14102 Requirement "graphicx"
14105 \begin_layout LyX-Code
14106 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
14109 \begin_layout LyX-Code
14110 ReferencedFile latex "$$AbsPath$$Basename.pdf"
14113 \begin_layout LyX-Code
14117 \begin_layout LyX-Code
14121 \begin_layout LyX-Code
14122 Product "$$Contents(
14124 "$$AbsPath$$Basename.asc
14129 \begin_layout LyX-Code
14130 UpdateFormat asciixfig
14133 \begin_layout LyX-Code
14134 UpdateResult "$$AbsPath$$Basename.asc"
14137 \begin_layout LyX-Code
14141 \begin_layout LyX-Code
14145 \begin_layout LyX-Code
14146 Product "<graphic fileref=
14148 "$$AbsOrRelPathMaster$$Basename.eps
14153 \begin_layout LyX-Code
14157 \begin_layout LyX-Code
14161 \begin_layout LyX-Code
14162 UpdateResult "$$AbsPath$$Basename.eps"
14165 \begin_layout LyX-Code
14166 ReferencedFile docbook "$$AbsPath$$Basename.eps"
14169 \begin_layout LyX-Code
14170 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
14173 \begin_layout LyX-Code
14177 \begin_layout LyX-Code
14178 Product "[XFig: $$FName]"
14181 \begin_layout LyX-Code
14185 \begin_layout LyX-Code
14189 \begin_layout Standard
14190 As you can see, the template is enclosed in
14191 \begin_inset Flex CharStyle:Code
14194 \begin_layout Plain Layout
14200 \SpecialChar \ldots{}
14202 \begin_inset Flex CharStyle:Code
14205 \begin_layout Plain Layout
14212 It contains a header specifying some general settings and, for each supported
14213 primary document file format, a section
14214 \begin_inset Flex CharStyle:Code
14217 \begin_layout Plain Layout
14223 \SpecialChar \ldots{}
14225 \begin_inset Flex CharStyle:Code
14228 \begin_layout Plain Layout
14237 \begin_layout Subsection
14238 The template header
14241 \begin_layout Description
14242 \begin_inset Flex CharStyle:Code
14245 \begin_layout Plain Layout
14246 AutomaticProduction
14247 \begin_inset space ~
14255 Whether the file represented by the template must be generated by LyX.
14256 This command must occur exactly once.
14259 \begin_layout Description
14260 \begin_inset Flex CharStyle:Code
14263 \begin_layout Plain Layout
14265 \begin_inset space ~
14273 A glob pattern that is used in the file dialog to filter out the desired
14275 If there is more than one possible file extension (e.g.
14276 \begin_inset space ~
14280 \begin_inset Flex CharStyle:Code
14283 \begin_layout Plain Layout
14290 \begin_inset Flex CharStyle:Code
14293 \begin_layout Plain Layout
14299 ), use something like
14300 \begin_inset Flex CharStyle:Code
14303 \begin_layout Plain Layout
14310 This command must occur exactly once.
14313 \begin_layout Description
14314 \begin_inset Flex CharStyle:Code
14317 \begin_layout Plain Layout
14319 \begin_inset space ~
14327 The text that is displayed on the button.
14328 This command must occur exactly once.
14331 \begin_layout Description
14332 \begin_inset Flex CharStyle:Code
14335 \begin_layout Plain Layout
14337 \begin_inset space ~
14341 \begin_inset space ~
14349 The help text that is used in the External dialog.
14350 Provide enough information to explain to the user just what the template
14351 can provide him with.
14352 This command must occur exactly once.
14355 \begin_layout Description
14356 \begin_inset Flex CharStyle:Code
14359 \begin_layout Plain Layout
14361 \begin_inset space ~
14369 The file format of the original file.
14370 This must be the name of a format that is known to LyX (see section
14371 \begin_inset CommandInset ref
14373 reference "sub:Formats"
14379 \begin_inset Quotes eld
14383 \begin_inset Flex CharStyle:Code
14386 \begin_layout Plain Layout
14393 \begin_inset Quotes erd
14396 if the template can handle original files of more than one format.
14397 LyX will attempt to interrogate the file itself in order to deduce its
14398 format in this case.
14399 This command must occur exactly once.
14402 \begin_layout Description
14403 \begin_inset Flex CharStyle:Code
14406 \begin_layout Plain Layout
14408 \begin_inset space ~
14416 A unique name for the template.
14417 It must not contain substitution macros (see below).
14420 \begin_layout Description
14421 \begin_inset Flex CharStyle:Code
14424 \begin_layout Plain Layout
14426 \begin_inset space ~
14429 Rotate|Resize|Clip|Extra
14434 This command specifies which transformations are supported by this template.
14435 It may occur zero or more times.
14436 This command enables the corresponding tabs in the external dialog.
14438 \begin_inset Flex CharStyle:Code
14441 \begin_layout Plain Layout
14447 command must have either a corresponding
14448 \begin_inset Flex CharStyle:Code
14451 \begin_layout Plain Layout
14458 \begin_inset Flex CharStyle:Code
14461 \begin_layout Plain Layout
14468 \begin_inset Flex CharStyle:Code
14471 \begin_layout Plain Layout
14478 Otherwise the transformation will not be supported by that format.
14481 \begin_layout Subsection
14485 \begin_layout Description
14486 \begin_inset Flex CharStyle:Code
14489 \begin_layout Plain Layout
14491 \begin_inset space ~
14494 LaTeX|PDFLaTeX|PlainText|DocBook
14499 The primary document file format that this format definition is for.
14500 Not every template has a sensible representation in all document file formats.
14501 Please define nevertheless a
14502 \begin_inset Flex CharStyle:Code
14505 \begin_layout Plain Layout
14511 section for all formats.
14512 Use a dummy text when no representation is available.
14513 Then you can at least see a reference to the external material in the exported
14517 \begin_layout Description
14518 \begin_inset Flex CharStyle:Code
14521 \begin_layout Plain Layout
14523 \begin_inset space ~
14527 \begin_inset space ~
14535 This command defines an additional macro
14536 \begin_inset Flex CharStyle:Code
14539 \begin_layout Plain Layout
14545 for substitution in
14546 \begin_inset Flex CharStyle:Code
14549 \begin_layout Plain Layout
14557 \begin_inset Flex CharStyle:Code
14560 \begin_layout Plain Layout
14566 itself may contain substitution macros.
14567 The advantage over using
14568 \begin_inset Flex CharStyle:Code
14571 \begin_layout Plain Layout
14578 \begin_inset Flex CharStyle:Code
14581 \begin_layout Plain Layout
14587 is that the substituted value of
14588 \begin_inset Flex CharStyle:Code
14591 \begin_layout Plain Layout
14597 is sanitized so that it is a valid optional argument in the document format.
14598 This command may occur zero or more times.
14601 \begin_layout Description
14602 \begin_inset Flex CharStyle:Code
14605 \begin_layout Plain Layout
14607 \begin_inset space ~
14615 The text that is inserted in the exported document.
14616 This is actually the most important command and can be quite complex.
14617 This command must occur exactly once.
14620 \begin_layout Description
14621 \begin_inset Flex CharStyle:Code
14624 \begin_layout Plain Layout
14626 \begin_inset space ~
14634 This command specifies a preamble snippet that will be included in the
14636 It has to be defined using
14637 \begin_inset Flex CharStyle:Code
14640 \begin_layout Plain Layout
14646 \SpecialChar \ldots{}
14648 \begin_inset Flex CharStyle:Code
14651 \begin_layout Plain Layout
14658 This command may occur zero or more times.
14661 \begin_layout Description
14662 \begin_inset Flex CharStyle:Code
14665 \begin_layout Plain Layout
14667 \begin_inset space ~
14671 \begin_inset space ~
14679 This command denotes files that are created by the conversion process and
14680 are needed for a particular export format.
14681 If the filename is relative, it is interpreted relative to the master document.
14682 This command may be given zero or more times.
14685 \begin_layout Description
14686 \begin_inset Flex CharStyle:Code
14689 \begin_layout Plain Layout
14691 \begin_inset space ~
14699 The name of a required LaTeX package.
14700 The package is included via
14701 \begin_inset Flex CharStyle:Code
14704 \begin_layout Plain Layout
14712 in the LaTeX preamble.
14713 This command may occur zero or more times.
14716 \begin_layout Description
14717 \begin_inset Flex CharStyle:Code
14720 \begin_layout Plain Layout
14722 \begin_inset space ~
14726 \begin_inset space ~
14729 RotationLatexCommand
14734 This command specifies that the built in LaTeX command should be used for
14736 This command may occur once or not at all.
14739 \begin_layout Description
14740 \begin_inset Flex CharStyle:Code
14743 \begin_layout Plain Layout
14745 \begin_inset space ~
14749 \begin_inset space ~
14757 This command specifies that the built in LaTeX command should be used for
14759 This command may occur once or not at all.
14762 \begin_layout Description
14763 \begin_inset Flex CharStyle:Code
14766 \begin_layout Plain Layout
14768 \begin_inset space ~
14772 \begin_inset space ~
14775 RotationLatexOption
14780 This command specifies that rotation is done via an optional argument.
14781 This command may occur once or not at all.
14784 \begin_layout Description
14785 \begin_inset Flex CharStyle:Code
14788 \begin_layout Plain Layout
14790 \begin_inset space ~
14794 \begin_inset space ~
14802 This command specifies that resizing is done via an optional argument.
14803 This command may occur once or not at all.
14806 \begin_layout Description
14807 \begin_inset Flex CharStyle:Code
14810 \begin_layout Plain Layout
14812 \begin_inset space ~
14816 \begin_inset space ~
14824 This command specifies that clipping is done via an optional argument.
14825 This command may occur once or not at all.
14828 \begin_layout Description
14829 \begin_inset Flex CharStyle:Code
14832 \begin_layout Plain Layout
14834 \begin_inset space ~
14838 \begin_inset space ~
14846 This command specifies that an extra optional argument is used.
14847 This command may occur once or not at all.
14850 \begin_layout Description
14851 \begin_inset Flex CharStyle:Code
14854 \begin_layout Plain Layout
14856 \begin_inset space ~
14864 The file format of the converted file.
14865 This must be the name of a format that is known to LyX (see the
14866 \begin_inset Flex CharStyle:MenuItem
14869 \begin_layout Plain Layout
14874 ools\SpecialChar \menuseparator
14879 references:Conversion
14885 This command must occur exactly once.
14888 \begin_layout Description
14889 \begin_inset Flex CharStyle:Code
14892 \begin_layout Plain Layout
14894 \begin_inset space ~
14902 The file name of the converted file.
14903 The file name must be absolute.
14904 This command must occur exactly once.
14907 \begin_layout Subsection
14908 Preamble definitions
14911 \begin_layout Standard
14912 The external template configuration file may contain additional preamble
14913 definitions enclosed by
14914 \begin_inset Flex CharStyle:Code
14917 \begin_layout Plain Layout
14923 \SpecialChar \ldots{}
14925 \begin_inset Flex CharStyle:Code
14928 \begin_layout Plain Layout
14935 They can be used by the templates in the
14936 \begin_inset Flex CharStyle:Code
14939 \begin_layout Plain Layout
14948 \begin_layout Section
14949 The substitution mechanism
14952 \begin_layout Standard
14953 When the external material facility invokes an external program, it is done
14954 on the basis of a command defined in the template configuration file.
14955 These commands can contain various macros that are expanded before execution.
14956 Execution always take place in the directory of the containing document.
14959 \begin_layout Standard
14960 Also, whenever external material is to be displayed, the name will be produced
14961 by the substitution mechanism, and most other commands in the template
14962 definition support substitution as well.
14965 \begin_layout Standard
14966 The available macros are the following:
14969 \begin_layout Description
14970 \begin_inset Flex CharStyle:Code
14973 \begin_layout Plain Layout
14974 $$AbsOrRelPathMaster
14979 The file path, absolute or relative to the master LyX document.
14982 \begin_layout Description
14983 \begin_inset Flex CharStyle:Code
14986 \begin_layout Plain Layout
14987 $$AbsOrRelPathParent
14992 The file path, absolute or relative to the LyX document.
14995 \begin_layout Description
14996 \begin_inset Flex CharStyle:Code
14999 \begin_layout Plain Layout
15005 The absolute file path.
15008 \begin_layout Description
15009 \begin_inset Flex CharStyle:Code
15012 \begin_layout Plain Layout
15018 The filename without path and without the extension.
15021 \begin_layout Description
15022 \begin_inset Flex CharStyle:Code
15025 \begin_layout Plain Layout
15027 \begin_inset Quotes eld
15031 \begin_inset Quotes erd
15039 This macro will expand to the contents of the file with the name
15040 \begin_inset Flex CharStyle:Code
15043 \begin_layout Plain Layout
15052 \begin_layout Description
15053 \begin_inset Flex CharStyle:Code
15056 \begin_layout Plain Layout
15062 The file extension (including the dot).
15065 \begin_layout Description
15066 \begin_inset Flex CharStyle:Code
15069 \begin_layout Plain Layout
15075 The filename of the file specified in the external material dialog.
15076 This is either an absolute name, or it is relative to the LyX document.
15079 \begin_layout Description
15080 \begin_inset Flex CharStyle:Code
15083 \begin_layout Plain Layout
15090 \begin_inset Flex CharStyle:Code
15093 \begin_layout Plain Layout
15099 (absolute name or relative to the LyX document).
15102 \begin_layout Description
15103 \begin_inset Flex CharStyle:Code
15106 \begin_layout Plain Layout
15112 The file path, relative to the master LyX document.
15115 \begin_layout Description
15116 \begin_inset Flex CharStyle:Code
15119 \begin_layout Plain Layout
15125 The file path, relative to the LyX document.
15128 \begin_layout Description
15129 \begin_inset Flex CharStyle:Code
15132 \begin_layout Plain Layout
15138 This macro will expand to the absolute path of the system directory.
15139 This is typically used to point to the various helper scripts that are
15143 \begin_layout Description
15144 \begin_inset Flex CharStyle:Code
15147 \begin_layout Plain Layout
15153 A name and full path to a temporary file which will be automatically deleted
15154 whenever the containing document is closed, or the external material insertion
15158 \begin_layout Standard
15159 All path macros contain a trailing directory separator, so you can construct
15161 the absolute filename with
15162 \begin_inset Flex CharStyle:Code
15165 \begin_layout Plain Layout
15166 $$AbsPath$$Basename$$Extension
15174 \begin_layout Standard
15175 The macros above are substituted in all commands unless otherwise noted.
15177 \begin_inset Flex CharStyle:Code
15180 \begin_layout Plain Layout
15186 supports additionally the following substitutions if they are enabled by
15188 \begin_inset Flex CharStyle:Code
15191 \begin_layout Plain Layout
15198 \begin_inset Flex CharStyle:Code
15201 \begin_layout Plain Layout
15210 \begin_layout Description
15211 \begin_inset Flex CharStyle:Code
15214 \begin_layout Plain Layout
15220 The front part of the resize command.
15223 \begin_layout Description
15224 \begin_inset Flex CharStyle:Code
15227 \begin_layout Plain Layout
15233 The back part of the resize command.
15236 \begin_layout Description
15237 \begin_inset Flex CharStyle:Code
15240 \begin_layout Plain Layout
15246 The front part of the rotation command.
15249 \begin_layout Description
15250 \begin_inset Flex CharStyle:Code
15253 \begin_layout Plain Layout
15259 The back part of the rotation command.
15262 \begin_layout Standard
15263 The value string of the
15264 \begin_inset Flex CharStyle:Code
15267 \begin_layout Plain Layout
15273 command supports additionally the following substitutions if they are enabled
15275 \begin_inset Flex CharStyle:Code
15278 \begin_layout Plain Layout
15285 \begin_inset Flex CharStyle:Code
15288 \begin_layout Plain Layout
15297 \begin_layout Description
15298 \begin_inset Flex CharStyle:Code
15301 \begin_layout Plain Layout
15310 \begin_layout Description
15311 \begin_inset Flex CharStyle:Code
15314 \begin_layout Plain Layout
15323 \begin_layout Description
15324 \begin_inset Flex CharStyle:Code
15327 \begin_layout Plain Layout
15336 \begin_layout Description
15337 \begin_inset Flex CharStyle:Code
15340 \begin_layout Plain Layout
15346 The rotation option.
15349 \begin_layout Standard
15350 You may ask why there are so many path macros.
15351 There are mainly two reasons:
15354 \begin_layout Enumerate
15355 Relative and absolute file names should remain relative or absolute, respectivel
15357 Users may have reasons to prefer either form.
15358 Relative names are useful for portable documents that should work on different
15359 machines, for example.
15360 Absolute names may be required by some programs.
15363 \begin_layout Enumerate
15364 LaTeX treats relative file names differently than LyX and other programs
15365 in nested included files.
15366 For LyX, a relative file name is always relative to the document that contains
15368 For LaTeX, it is always relative to the master document.
15369 These two definitions are identical if you have only one document, but
15370 differ if you have a master document that includes part documents.
15371 That means that relative filenames must be transformed when presented to
15373 Fortunately LyX does this automatically for you if you choose the right
15377 \begin_layout Standard
15378 So which path macro should be used in new template definitions? The rule
15382 \begin_layout Itemize
15384 \begin_inset Flex CharStyle:Code
15387 \begin_layout Plain Layout
15393 if an absolute path is required.
15396 \begin_layout Itemize
15398 \begin_inset Flex CharStyle:Code
15401 \begin_layout Plain Layout
15402 $$AbsOrRelPathMaster
15407 if the substituted string is some kind of LaTeX input.
15410 \begin_layout Itemize
15412 \begin_inset Flex CharStyle:Code
15415 \begin_layout Plain Layout
15416 $$AbsOrRelPathParent
15421 in order to preserve the user's choice.
15424 \begin_layout Standard
15425 There are special cases where this rule does not work and e.g.
15426 \begin_inset space ~
15429 relative names are needed, but normally it will work just fine.
15430 One example for such a case is the command
15431 \begin_inset Flex CharStyle:Code
15434 \begin_layout Plain Layout
15435 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
15440 in the XFig template above: We can't use the absolute name because the
15442 \begin_inset Flex CharStyle:Code
15445 \begin_layout Plain Layout
15451 files needs the relative name in order to rewrite the file content.
15454 \begin_layout Section
15455 \begin_inset CommandInset label
15457 name "sec:Security-discussion"
15461 Security discussion
15464 \begin_layout Standard
15465 \begin_inset Note Note
15468 \begin_layout Plain Layout
15469 This section is outdated
15474 The external material feature interfaces with a lot of external programs
15475 and does so automatically, so we have to consider the security implications
15477 In particular, since you have the option of including your own filenames
15478 and/or parameter strings and those are expanded into a command, it seems
15479 that it would be possible to create a malicious document which executes
15480 arbitrary commands when a user views or prints the document.
15481 This is something we definately want to avoid.
15484 \begin_layout Standard
15485 However, since the external program commands are specified in the template
15486 configuration file only, there are no security issues if LyX is properly
15487 configured with safe templates only.
15488 This is so because the external programs are invoked with the
15489 \begin_inset Flex CharStyle:Code
15492 \begin_layout Plain Layout
15498 -system call rather than the
15499 \begin_inset Flex CharStyle:Code
15502 \begin_layout Plain Layout
15508 system-call, so it's not possible to execute arbitrary commands from the
15509 filename or parameter section via the shell.
15512 \begin_layout Standard
15513 This also implies that you are restricted in what command strings you can
15514 use in the external material templates.
15515 In particular, pipes and redirection are not readily available.
15516 This has to be so if LyX should remain safe.
15517 If you want to use some of the shell features, you should write a safe
15518 script to do this in a controlled manner, and then invoke the script from
15519 the command string.
15521 \begin_inset Flex CharStyle:Code
15524 \begin_layout Plain Layout
15530 directory of the LyX installation, you can find a safe wrapper script
15531 \begin_inset Flex CharStyle:Code
15534 \begin_layout Plain Layout
15535 general_command_wrapper.py
15540 that supports redirection of input and output.
15541 That can serve as an example for how to write safe template scripts.
15542 For a more advanced example that uses
15543 \begin_inset Flex CharStyle:Code
15546 \begin_layout Plain Layout
15552 and friends, take a look at the
15553 \begin_inset Flex CharStyle:Code
15556 \begin_layout Plain Layout
15565 \begin_layout Standard
15566 It is possible to design a template that interacts directly with the shell,
15567 but since this would allow a malicious user to execute arbitrary commands
15568 by writing clever filenames and/or parameters, we generally recommend that
15569 you only use safe scripts that work with the
15570 \begin_inset Flex CharStyle:Code
15573 \begin_layout Plain Layout
15579 system call in a controlled manner.
15580 Of course, for use in a controlled environment, it can be tempting to just
15581 fall back to use ordinary shell scripts.
15582 If you do so, be aware that you
15586 provide an easily exploitable security hole in your system.
15587 Of course it stands to reason that such unsafe templates will never be
15588 included in the standard LyX distribution, although we do encourage people
15589 to submit new templates in the open source tradition.
15590 But LyX as shipped from the official distribution channels will never have
15594 \begin_layout Standard
15595 Including external material provides a lot of power, and you have to be
15596 careful not to introduce security hazards with this power.
15597 A subtle error in a single line in an innocent looking script can open
15598 the door to huge security problems.
15599 So if you do not fully understand the issues, we recommend that you consult
15600 a knowledgable security professional or the LyX development team if you
15601 have any questions about whether a given template is safe or not.
15602 And do this before you use it in an uncontrolled environment.
15605 \begin_layout Chapter
15609 \begin_layout Section
15613 \begin_layout Standard
15614 The LyX server is a method implemented in LyX that will enable other programs
15615 to talk to LyX, invoke LyX commands, and retrieve information about the
15616 LyX internal state.
15617 This is only intended for advanced users, but they should find it useful.
15618 Please note that, at present,
15620 the server does not work on Windows
15626 \begin_layout Plain Layout
15627 There is no principled reason it cannot do so.
15628 But none of the developers on Windows® have yet implemented this functionality
15637 \begin_layout Section
15638 Starting the LyX Server
15641 \begin_layout Standard
15642 The LyX server works through the use of a pair of named pipes.
15643 These are usually located in
15644 \begin_inset Flex CharStyle:Code
15647 \begin_layout Plain Layout
15654 \begin_inset Quotes eld
15658 \begin_inset Flex CharStyle:Code
15661 \begin_layout Plain Layout
15668 \begin_inset Quotes erd
15672 \begin_inset Quotes eld
15676 \begin_inset Flex CharStyle:Code
15679 \begin_layout Plain Layout
15686 \begin_inset Quotes erd
15690 External programs write into
15691 \begin_inset Flex CharStyle:Code
15694 \begin_layout Plain Layout
15700 and read back data from
15701 \begin_inset Flex CharStyle:Code
15704 \begin_layout Plain Layout
15711 The stem of the pipe names can be defined in the
15712 \begin_inset Flex CharStyle:MenuItem
15715 \begin_layout Plain Layout
15720 ools\SpecialChar \menuseparator
15730 dialog, for example
15731 \begin_inset Flex CharStyle:Code
15734 \begin_layout Plain Layout
15735 "/home/myhome/.lyxpipe"
15743 \begin_layout Standard
15745 \begin_inset Flex CharStyle:Code
15748 \begin_layout Plain Layout
15755 \begin_inset Flex CharStyle:Code
15758 \begin_layout Plain Layout
15764 ' to create the pipes.
15765 The above setting also has the effect of activating the LyX server.
15766 If one of the pipes already exists, LyX will assume that another LyX process
15767 is already running and will not start the server.
15768 To have several LyX processes with servers at the same time, you have to
15769 change the configuration between the start of the programs.
15772 \begin_layout Standard
15773 If you are developing a client program, you might find it useful to enable
15774 debugging information from the LyX server.
15775 Do this by starting LyX as lyx -dbg lyxserver.
15778 \begin_layout Standard
15779 Warning: if LyX crashes, it may not manage to remove the pipes; in this
15780 case you must remove them manually.
15781 If LyX starts and the pipes exist already, it will not start any server.
15784 \begin_layout Standard
15785 Other than this, there are a few points to consider:
15788 \begin_layout Itemize
15789 Both server and clients must run on UNIX or OS/2 machines.
15790 Communications between LyX on UNIX and clients on OS/2 or vice versa is
15791 not possible right now.
15794 \begin_layout Itemize
15795 On OS/2, only one client can connect to LyXServer at a time.
15798 \begin_layout Itemize
15799 On OS/2, clients must open inpipe with
15800 \begin_inset Flex CharStyle:Code
15803 \begin_layout Plain Layout
15812 \begin_layout Standard
15816 \begin_layout Standard
15817 You can find a complete example client written in C in the source distribution
15819 \begin_inset Flex CharStyle:Code
15822 \begin_layout Plain Layout
15823 development/lyxserver/server_monitor.c
15831 \begin_layout Section
15832 Normal communication
15835 \begin_layout Standard
15836 To issue a LyX call, the client writes a line of ASCII text into the input
15838 This line has the following format:
15841 \begin_layout Quote
15855 \begin_layout Description
15860 is a name that the client can choose arbitrarily.
15861 Its only use is that LyX will echo it if it sends an answer---so a client
15862 can dispatch results from different requesters.
15865 \begin_layout Description
15870 is the function you want LyX to perform.
15871 It is the same as the commands you'd use in the minibuffer.
15874 \begin_layout Description
15879 is an optional argument which is meaningful only to some functions (for
15881 \begin_inset Quotes eld
15885 \begin_inset Quotes erd
15888 which will insert the argument as text at the cursor position.)
15891 \begin_layout Standard
15892 The answer from LyX will arrive in the output pipe and be of the form
15895 \begin_layout Quote
15909 \begin_layout Standard
15918 are just echoed from the command request, while
15922 is more or less useful information filled according to how the command
15923 execution worked out.
15924 Some commands will return information about the internal state of LyX,
15926 \begin_inset Quotes eld
15930 \begin_inset Quotes erd
15933 , while other will return an empty data-response.
15934 This means that the command execution went fine.
15937 \begin_layout Standard
15938 In case of errors, the response from LyX will have this form
15941 \begin_layout Quote
15955 \begin_layout Standard
15960 should contain an explanation of why the command failed.
15963 \begin_layout Standard
15967 \begin_layout LyX-Code
15968 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
15971 \begin_layout LyX-Code
15972 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
15973 \begin_inset Newline newline
15976 read a <~/.lyxpipe.out
15977 \begin_inset Newline newline
15983 \begin_layout Section
15987 \begin_layout Standard
15988 LyX can notify clients of events going on asynchronously.
15989 Currently it will only do this if the user binds a key sequence with the
15991 \begin_inset Quotes eld
15995 \begin_inset Quotes erd
15999 The format of the string LyX sends is as follows:
16002 \begin_layout Quote
16003 \begin_inset Flex CharStyle:Code
16006 \begin_layout Plain Layout
16017 \begin_layout Standard
16022 is the printed representation of the key sequence that was actually typed
16026 \begin_layout Standard
16027 This mechanism can be used to extend LyX's command set and implement macros:
16028 bind some key sequence to
16029 \begin_inset Quotes eld
16033 \begin_inset Quotes erd
16036 , start a client that listens on the out pipe, dispatches the command according
16037 to the sequence and starts a function that may use LyX calls and LyX requests
16038 to issue a command or a series of commands to LyX.
16041 \begin_layout Section
16042 The simple LyX Server Protocol
16045 \begin_layout Standard
16046 LyX implements a simple protocol that can be used for session management.
16047 All messages are of the form
16050 \begin_layout Quote
16060 \begin_layout Standard
16066 \begin_inset Quotes eld
16070 \begin_inset Quotes erd
16074 \begin_inset Quotes eld
16078 \begin_inset Quotes erd
16083 \begin_inset Quotes eld
16087 \begin_inset Quotes erd
16090 is received from a client, LyX will report back to inform the client that
16091 it's listening to it's messages, while
16092 \begin_inset Quotes eld
16096 \begin_inset Quotes erd
16099 sent from LyX will inform clients that LyX is closing.