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 \begin_inset CommandInset href
3105 name "http://www.devel.lyx.org"
3106 target "http://www.devel.lyx.org"
3111 That way, you can find out which (if any) documents have already been translate
3112 d into your language.
3113 You can also find out who (if anyone) is organizing the effort to translate
3114 the documentation into your language.
3115 If no one is organizing the effort, please let us know that you're interested.
3118 \begin_layout Standard
3119 Once you get to actually translating, here's a few hints for you that may
3123 \begin_layout Itemize
3124 Join the documentation team! There is information on how to do that in
3125 \begin_inset Flex CharStyle:Code
3128 \begin_layout Plain Layout
3135 \begin_inset Flex CharStyle:MenuItem
3138 \begin_layout Plain Layout
3143 elp\SpecialChar \menuseparator
3153 ), which by the way is the first document you should translate.
3156 \begin_layout Itemize
3157 Learn the typographic conventions for the language you are translating to.
3158 Typography is an ancient art and over the centuries, a great variety of
3159 conventions have developed throughout different parts of the world.
3160 Also study the professional terminology amongst typographers in your country.
3161 Inventing your own terminology will only confuse the users.
3164 (Warning! Typography is addictive!)
3167 \begin_layout Itemize
3168 Make a copy of the document.
3169 This will be your working copy.
3170 You can use this as your personal translated help-file by placing it in
3172 \begin_inset Flex CharStyle:Code
3175 \begin_layout Plain Layout
3184 \begin_layout Itemize
3185 Sometimes the original document (from the LyX-team) will be updated.
3186 Use the source viewer at
3187 \begin_inset CommandInset href
3189 name "http://www.lyx.org/trac/timeline"
3190 target "http://www.lyx.org/trac/timeline"
3194 to see what has been changed.
3195 That way you can easily see which parts of the translated document need
3199 \begin_layout Standard
3200 If you ever find an error in the original document, fix it and notify the
3201 rest of the documentation team of the changes! (You didn't forget to join
3202 the documentation team, did you?)
3205 \begin_layout Standard
3206 \begin_inset Branch OutDated
3209 \begin_layout Section
3210 International Keyboard Support
3213 \begin_layout Standard
3216 [Editor's Note: The following section is by
3224 It needs to be fixed to conform to the new Documentation Style sheet and
3225 to make use of the new v1.0 features.
3226 The whole thing also needs to be merged with the section following it.-jw
3227 It may also be badly out of date.-rh (2008)]
3230 \begin_layout Subsection
3231 Defining Own Keymaps: Keymap File Format
3234 \begin_layout Standard
3235 Let's look at a keyboard definition file a little closer.
3236 It is a plain text file defining
3239 \begin_layout Itemize
3240 key-to-key or key-to-string translations
3243 \begin_layout Itemize
3247 \begin_layout Itemize
3248 dead keys exceptions
3251 \begin_layout Standard
3252 To define key-to-key or key-to-string translation, use this command:
3255 \begin_layout Quotation
3256 \begin_inset Flex CharStyle:Code
3259 \begin_layout Plain Layout
3268 \begin_inset Flex CharStyle:Code
3271 \begin_layout Plain Layout
3280 \begin_layout Standard
3282 \begin_inset Flex CharStyle:Code
3285 \begin_layout Plain Layout
3291 is the key to be translated and
3292 \begin_inset Flex CharStyle:Code
3295 \begin_layout Plain Layout
3301 is the string to be inserted into the document.
3302 To define dead keys, use:
3305 \begin_layout Quotation
3306 \begin_inset Flex CharStyle:Code
3309 \begin_layout Plain Layout
3318 \begin_inset Flex CharStyle:Code
3321 \begin_layout Plain Layout
3330 \begin_layout Standard
3332 \begin_inset Flex CharStyle:Code
3335 \begin_layout Plain Layout
3341 is a keyboard key and
3342 \begin_inset Flex CharStyle:Code
3345 \begin_layout Plain Layout
3352 The following dead keys are supported (shortcut name is in parentheses):
3355 \begin_layout Quotation
3359 \begin_inset space \hfill{}
3365 \begin_layout Quotation
3367 \begin_inset space \hfill{}
3373 \begin_layout Quotation
3375 \begin_inset space \hfill{}
3381 \begin_layout Quotation
3383 \begin_inset space \hfill{}
3389 \begin_layout Quotation
3391 \begin_inset space \hfill{}
3397 \begin_layout Quotation
3399 \begin_inset space \hfill{}
3406 \begin_layout Plain Layout
3418 \begin_layout Quotation
3420 \begin_inset space \hfill{}
3426 \begin_layout Quotation
3428 \begin_inset space \hfill{}
3435 \begin_layout Plain Layout
3447 \begin_layout Quotation
3449 \begin_inset space \hfill{}
3455 \begin_layout Quotation
3457 \begin_inset space \hfill{}
3463 \begin_layout Quotation
3465 \begin_inset space \hfill{}
3472 \begin_layout Plain Layout
3484 \begin_layout Quotation
3486 \begin_inset space \hfill{}
3493 \begin_layout Plain Layout
3505 \begin_layout Quotation
3507 \begin_inset space \hfill{}
3513 \begin_layout Quotation
3514 hungarian umlaut (hug)
3515 \begin_inset space \hfill{}
3521 \begin_layout Quotation
3523 \begin_inset space \hfill{}
3529 \begin_layout Quotation
3531 \begin_inset space \hfill{}
3538 \begin_layout Plain Layout
3550 \begin_layout Standard
3551 Since in many international keyboards there are exceptions to what some
3552 dead keys should do, you can define them using
3555 \begin_layout Quotation
3556 \begin_inset Flex CharStyle:Code
3559 \begin_layout Plain Layout
3567 deadkey key outstring
3570 \begin_layout Standard
3571 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3575 \begin_layout Quotation
3576 \begin_inset Flex CharStyle:Code
3579 \begin_layout Plain Layout
3592 \begin_layout Standard
3593 to make it work correctly.
3594 Also, you have to define as exceptions dead keys over i and j, to remove
3595 the dot from them before inserting an accent mark.
3596 I will change this when the time comes, but so far I haven't had time.
3599 \begin_layout Standard
3600 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3603 \begin_inset Flex CharStyle:Code
3606 \begin_layout Plain Layout
3612 have different meaning.
3614 \begin_inset Flex CharStyle:Code
3617 \begin_layout Plain Layout
3623 marks comments, quotes start and end LaTeX-style commands.
3624 To enter quote, you'll need to use
3625 \begin_inset Flex CharStyle:Code
3628 \begin_layout Plain Layout
3637 \begin_inset Flex CharStyle:Code
3640 \begin_layout Plain Layout
3647 \begin_inset Flex CharStyle:Code
3650 \begin_layout Plain Layout
3661 \begin_layout Standard
3662 If you make a keyboard description file that works for your language, please
3663 mail it to me, so I can include it in the next keymap distribution.
3666 \begin_layout Standard
3667 More keywords will be supported in keymap configuration file in future,
3671 \begin_layout Itemize
3672 \begin_inset Flex CharStyle:Code
3675 \begin_layout Plain Layout
3686 \begin_inset space \hfill{}
3690 \begin_inset Flex CharStyle:Code
3693 \begin_layout Plain Layout
3702 \begin_layout Itemize
3703 \begin_inset Flex CharStyle:Code
3706 \begin_layout Plain Layout
3717 \begin_inset space \hfill{}
3721 \begin_inset Flex CharStyle:Code
3724 \begin_layout Plain Layout
3730 an external keymap translation program
3733 \begin_layout Standard
3734 Also, it should look into
3735 \begin_inset Flex CharStyle:Code
3738 \begin_layout Plain Layout
3744 file for defaults, too (for example, a
3745 \begin_inset Flex CharStyle:Code
3748 \begin_layout Plain Layout
3756 option to include default keyboard).
3764 \begin_layout Section
3765 \begin_inset CommandInset label
3771 International Keymap Stuff
3774 \begin_layout Standard
3775 \begin_inset Note Note
3778 \begin_layout Plain Layout
3779 In doing the revisions on this document in March 2008, I did not look over
3780 this stuff, as I do not understand it.
3781 It would be good if someone else could do so.
3789 \begin_layout Standard
3790 The next two sections describe the
3791 \begin_inset Flex CharStyle:Code
3794 \begin_layout Plain Layout
3803 \begin_inset Flex CharStyle:Code
3806 \begin_layout Plain Layout
3814 file syntax in detail.
3815 These sections should help you design your own key map if the ones provided
3816 do not meet your needs.
3819 \begin_layout Subsection
3823 \begin_layout Standard
3827 \begin_inset Flex CharStyle:Code
3830 \begin_layout Plain Layout
3836 file maps keystrokes to characters or strings.
3837 As the name suggests, it sets a keyboard mapping.
3839 \begin_inset Flex CharStyle:Code
3842 \begin_layout Plain Layout
3853 \begin_inset Flex CharStyle:Code
3856 \begin_layout Plain Layout
3871 \begin_inset Flex CharStyle:Code
3874 \begin_layout Plain Layout
3887 \begin_inset Flex CharStyle:Code
3890 \begin_layout Plain Layout
3899 \begin_inset Flex CharStyle:Code
3902 \begin_layout Plain Layout
3910 are described in this section.
3913 \begin_layout Labeling
3914 \labelwidthstring 00.00.0000
3915 \begin_inset Flex CharStyle:Code
3918 \begin_layout Plain Layout
3926 Map a character to a string
3929 \begin_layout LyX-Code
3944 \begin_layout Standard
3977 the double-quote (")
3994 must be escaped with a preceding backslash (
4005 \begin_layout Standard
4007 \begin_inset Flex CharStyle:MenuItem
4010 \begin_layout Plain Layout
4018 statement to cause the symbol
4019 \begin_inset Flex CharStyle:MenuItem
4022 \begin_layout Plain Layout
4030 to be output for the keystroke
4031 \begin_inset Flex CharStyle:MenuItem
4034 \begin_layout Plain Layout
4045 \begin_layout LyX-Code
4051 \begin_layout Labeling
4052 \labelwidthstring 00.00.0000
4053 \begin_inset Flex CharStyle:Code
4056 \begin_layout Plain Layout
4064 Specify an accent character
4067 \begin_layout LyX-Code
4076 \begin_layout Standard
4077 This will make the cha
4115 This is the dead key
4119 \begin_layout Plain Layout
4126 refers to a key that does not produce a character by itself, but when followed
4127 with another key, produces the desired accent character.
4128 For example, a German characte
4130 r with an umlaut like
4140 can be produced in this manner.
4149 \begin_layout Standard
4162 and then another key not in
4179 followed by the other, unallowed key, as output.
4183 \begin_inset Flex CharStyle:MenuItem
4186 \begin_layout Plain Layout
4194 cancels a dead key, so if
4205 \begin_inset Flex CharStyle:MenuItem
4208 \begin_layout Plain Layout
4217 , the cursor will not go one position backwards but will instead cancel
4233 might have had on the next keystroke.
4237 \begin_layout Standard
4238 The following example specifies that the character ' is to be an acute accent,
4239 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4242 \begin_layout LyX-Code
4245 kmod ' acute aeiouAEIOU
4248 \begin_layout Labeling
4249 \labelwidthstring 00.00.0000
4250 \begin_inset Flex CharStyle:Code
4253 \begin_layout Plain Layout
4259 Specify an exception to the accent character
4262 \begin_layout LyX-Code
4271 \begin_layout Standard
4272 This defines an exce
4313 have been assigned a keystroke with a previous
4316 \begin_inset Flex CharStyle:Code
4319 \begin_layout Plain Layout
4343 must not belong in the
4395 If such a declaration does not exist in
4403 \begin_inset Flex CharStyle:Code
4406 \begin_layout Plain Layout
4446 \begin_inset Flex CharStyle:Code
4449 \begin_layout Plain Layout
4463 \begin_layout Standard
4464 The following command produces causes äi to be produced when you enter acute-i
4468 \begin_layout LyX-Code
4482 \begin_layout Labeling
4483 \labelwidthstring 00.00.0000
4484 \begin_inset Flex CharStyle:Code
4487 \begin_layout Plain Layout
4493 Combine two accent characters
4496 \begin_layout LyX-Code
4502 accent1 accent2 allowed
4505 \begin_layout Standard
4506 This one is getting pretty esoteric.
4507 It allows you to combine the effect
4563 \begin_inset Flex CharStyle:Code
4566 \begin_layout Plain Layout
4594 \begin_layout Standard
4595 Consider this example from the
4596 \begin_inset Flex CharStyle:Code
4599 \begin_layout Plain Layout
4610 \begin_layout LyX-Code
4613 kmod ; acute aeioyvhAEIOYVH
4617 kcomb acute umlaut iyIY
4620 \begin_layout Standard
4621 This allows you to press
4622 \begin_inset Flex CharStyle:MenuItem
4625 \begin_layout Plain Layout
4633 and get the effect of
4634 \begin_inset Flex CharStyle:Code
4637 \begin_layout Plain Layout
4656 in this case cancels the last dead key, so if you press
4657 \begin_inset Flex CharStyle:MenuItem
4660 \begin_layout Plain Layout
4669 \begin_inset Flex CharStyle:Code
4672 \begin_layout Plain Layout
4685 \begin_layout Subsection
4689 \begin_layout Standard
4691 \begin_inset Flex CharStyle:Code
4694 \begin_layout Plain Layout
4702 mapping is performed, a
4703 \begin_inset Flex CharStyle:Code
4706 \begin_layout Plain Layout
4716 file maps the strings that the symbols generate to characters in the current
4718 The LyX distribution currently includes at least the
4719 \begin_inset Flex CharStyle:Code
4722 \begin_layout Plain Layout
4731 \begin_inset Flex CharStyle:Code
4734 \begin_layout Plain Layout
4745 \begin_layout Standard
4747 \begin_inset Flex CharStyle:Code
4750 \begin_layout Plain Layout
4758 file is a sequence of declarations of the form
4761 \begin_layout LyX-Code
4774 \begin_layout Standard
4775 For example, in order to map
4776 \begin_inset Flex CharStyle:MenuItem
4779 \begin_layout Plain Layout
4789 to the corresponding character in the iso-8859-1 set (233), the following
4793 \begin_layout LyX-Code
4801 \begin_layout Standard
4803 \begin_inset Flex CharStyle:Code
4806 \begin_layout Plain Layout
4815 \begin_inset Flex CharStyle:Code
4818 \begin_layout Plain Layout
4836 the same character can apply to more than one string.
4838 \begin_inset Flex CharStyle:Code
4841 \begin_layout Plain Layout
4852 \begin_layout LyX-Code
4864 \begin_inset Newline newline
4880 \begin_layout Standard
4881 If LyX cannot find a mapping for the string produced by the keystroke or
4882 a deadkey sequence, it will check if it looks like an accented char and
4883 try to draw an accent over the character on screen.
4886 \begin_layout Subsection
4890 \begin_layout Standard
4891 There is a second way to add support for international characters through
4892 so-called dead-keys.
4893 A dead-key works in combination with a letter to produce an accented character.
4894 Here, we'll explain how to create a really simple dead-key to illustrate
4898 \begin_layout Standard
4899 Suppose you happen to need the circumflex character,
4900 \begin_inset Quotes eld
4904 \begin_inset Quotes erd
4909 \begin_inset Flex CharStyle:MenuItem
4912 \begin_layout Plain Layout
4919 \begin_inset space ~
4923 \begin_inset Flex CharStyle:MenuItem
4926 \begin_layout Plain Layout
4932 ] to the LyX command
4933 \begin_inset Flex CharStyle:Code
4936 \begin_layout Plain Layout
4943 \begin_inset Flex CharStyle:Code
4946 \begin_layout Plain Layout
4953 Now, whenever you type the
4954 \begin_inset Flex CharStyle:MenuItem
4957 \begin_layout Plain Layout
4963 -key followed by a letter, that letter will have a circumflex accent on
4965 For example, the sequence
4966 \begin_inset Quotes eld
4970 \begin_inset Flex CharStyle:MenuItem
4973 \begin_layout Plain Layout
4980 \begin_inset Quotes erd
4983 produces the letter:
4984 \begin_inset Quotes eld
4988 \begin_inset Quotes erd
4992 If you tried to type
4993 \begin_inset Quotes eld
4997 \begin_inset Flex CharStyle:MenuItem
5000 \begin_layout Plain Layout
5007 \begin_inset Quotes erd
5010 , however, LyX will complain with a beep, since a
5011 \begin_inset Quotes eld
5015 \begin_inset Flex CharStyle:MenuItem
5018 \begin_layout Plain Layout
5025 \begin_inset Quotes erd
5028 never takes a circumflex accent.
5030 \begin_inset Flex CharStyle:MenuItem
5033 \begin_layout Plain Layout
5039 after a dead-key produces the bare-accent.
5040 Please note this last point! If you bind a key to a dead-key, you'll need
5041 to rebind the character on that key to yet another key.
5043 \begin_inset Flex CharStyle:MenuItem
5046 \begin_layout Plain Layout
5052 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5055 \begin_layout Standard
5056 One common way to bind dead-keys is to use
5057 \begin_inset Flex CharStyle:MenuItem
5060 \begin_layout Plain Layout
5067 \begin_inset Flex CharStyle:MenuItem
5070 \begin_layout Plain Layout
5077 \begin_inset Flex CharStyle:MenuItem
5080 \begin_layout Plain Layout
5086 in combination with an accent, like
5087 \begin_inset Quotes eld
5091 \begin_inset Flex CharStyle:MenuItem
5094 \begin_layout Plain Layout
5101 \begin_inset Quotes erd
5105 \begin_inset Quotes eld
5109 \begin_inset Flex CharStyle:MenuItem
5112 \begin_layout Plain Layout
5119 \begin_inset Quotes erd
5123 \begin_inset Quotes eld
5127 \begin_inset Flex CharStyle:MenuItem
5130 \begin_layout Plain Layout
5137 \begin_inset Quotes erd
5141 Another way involves using
5142 \begin_inset Flex CharStyle:Code
5145 \begin_layout Plain Layout
5152 \begin_inset Flex CharStyle:Code
5155 \begin_layout Plain Layout
5161 to set up the special
5162 \begin_inset Flex CharStyle:Code
5165 \begin_layout Plain Layout
5173 \begin_inset Flex CharStyle:Code
5176 \begin_layout Plain Layout
5182 acts in some ways just like
5183 \begin_inset Flex CharStyle:MenuItem
5186 \begin_layout Plain Layout
5192 and permits you to bind keys to accented characters.
5193 You can also turn keys into dead-keys by binding them to something like
5195 \begin_inset Flex CharStyle:Code
5198 \begin_layout Plain Layout
5204 and then binding this symbolic key to the corresponding LyX command.
5208 \begin_layout Plain Layout
5213 : This is exactly what I do in my
5214 \begin_inset Flex CharStyle:Code
5217 \begin_layout Plain Layout
5224 \begin_inset Flex CharStyle:Code
5227 \begin_layout Plain Layout
5235 \begin_inset Flex CharStyle:MenuItem
5238 \begin_layout Plain Layout
5240 \begin_inset space ~
5249 \begin_inset Flex CharStyle:Code
5252 \begin_layout Plain Layout
5258 and a bunch of these
5259 \begin_inset Quotes eld
5263 \begin_inset Flex CharStyle:Code
5266 \begin_layout Plain Layout
5273 \begin_inset Quotes erd
5276 symbolic keys bound such things as
5277 \begin_inset Flex CharStyle:MenuItem
5280 \begin_layout Plain Layout
5282 \begin_inset space ~
5291 \begin_inset Flex CharStyle:MenuItem
5294 \begin_layout Plain Layout
5296 \begin_inset space ~
5305 This is how I produce my accented characters.
5310 You can make just about anything into the
5311 \begin_inset Flex CharStyle:Code
5314 \begin_layout Plain Layout
5321 \begin_inset Flex CharStyle:MenuItem
5324 \begin_layout Plain Layout
5330 keys, a spare function key, etc.
5331 As for the LyX commands that produce accents, check the entry for
5332 \begin_inset Flex CharStyle:Code
5335 \begin_layout Plain Layout
5346 You'll find the complete list there.
5349 \begin_layout Subsection
5350 Saving your Language Configuration
5353 \begin_layout Standard
5354 You can edit your preferences so that your desired language environment
5355 is automatically configured when LyX starts up, via the
5356 \begin_inset Flex CharStyle:MenuItem
5359 \begin_layout Plain Layout
5364 dit\SpecialChar \menuseparator
5377 \begin_layout Chapter
5378 Installing New Document Classes, Layouts, and Templates
5379 \begin_inset CommandInset label
5381 name "chap:textclass"
5389 \begin_layout Plain Layout
5390 Installing New Document Classes
5398 \begin_layout Standard
5399 In this chapter, we describe the procedures for creating and installing
5400 new LyX layout and template files, as well as offer a refresher on correctly
5401 installing new LaTeX document classes.
5402 Some definitions: a document class is a LaTeX file (usually ending in
5403 \begin_inset Flex CharStyle:Code
5406 \begin_layout Plain Layout
5413 \begin_inset Flex CharStyle:Code
5416 \begin_layout Plain Layout
5422 ) that describes the format of a document such as an article, report, journal
5423 preprint, etc, and all the commands needed to realize that format.
5424 A layout file is a LyX file that corresponds to a LaTeX document class
5425 and that tells LyX how to
5426 \begin_inset Quotes eld
5430 \begin_inset Quotes erd
5433 things on the screen to make the display look something like the final
5435 More precisely, a layout file describes a
5436 \begin_inset Quotes eld
5440 \begin_inset Quotes erd
5443 which is the internal construct LyX uses to render the screen display.
5445 \begin_inset Quotes eld
5449 \begin_inset Quotes erd
5453 \begin_inset Quotes eld
5457 \begin_inset Quotes erd
5460 can be used somewhat interchangeably, but it is better to refer to the
5461 file as the layout, and the thing living in LyX's memory as the text class.
5462 A template file is simply a LyX document that contains a set of predefined
5463 entries for a given document class---entries that are generally required
5465 Templates are especially useful for things like journal manuscripts that
5466 are to be submitted electronically.
5469 \begin_layout Section
5470 Installing a new LaTeX package
5473 \begin_layout Standard
5474 Some installations may not include a LaTeX package that you would like to
5476 For example, you might need FoilTeX, a package for preparing slides or
5477 viewgraphs for overhead projectors.
5478 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5479 a user interface for that.
5480 For example on MiKTeX you start its program
5481 \begin_inset Quotes eld
5485 \begin_inset Quotes erd
5488 to get a list of available packages.
5489 To install one, right click on it or use the installing toolbar button.
5490 When the package you want to install is not in the list, but you have it
5492 \begin_inset Flex CharStyle:Code
5495 \begin_layout Plain Layout
5502 \begin_inset Flex CharStyle:Code
5505 \begin_layout Plain Layout
5511 -file, then copy these files to a subfolder of your LaTeX distribution,
5512 for example to the folder
5521 Then update the file name database of your LaTeX-distribution.
5522 For example on MiKTeX this is done by pressing the button
5525 \begin_inset space ~
5530 that you find in MiKTeX's
5531 \begin_inset Quotes eld
5535 \begin_inset Quotes erd
5539 In both cases you need afterwards to reconfigure LyX using the menu
5540 \begin_inset Flex CharStyle:MenuItem
5543 \begin_layout Plain Layout
5544 Tools\SpecialChar \menuseparator
5550 and then to restart LyX.
5553 \begin_layout Standard
5554 If your LaTeX distribution doesn't provide a user interface, then you can
5555 follow these steps by using a UNIX/Linux console.
5558 \begin_layout Enumerate
5559 Get the package from
5560 \begin_inset CommandInset href
5563 target "http://www.ctan.org/"
5570 \begin_layout Enumerate
5571 You can install this package in several different places.
5572 If you want it to be available for all users on your system, then you should
5573 install it in your `local' TeX tree; if you want (or need) it to be available
5574 just for you, then you can install it in your own `user' TeX tree.
5575 Where these should be created, if they do not already exist, depends upon
5576 the details of your system.
5577 To find out, look in the file
5578 \begin_inset Flex CharStyle:Code
5581 \begin_layout Plain Layout
5591 \begin_layout Plain Layout
5592 This usually lives in the directory
5593 \begin_inset Flex CharStyle:Code
5596 \begin_layout Plain Layout
5602 , though you can run
5603 \begin_inset Flex CharStyle:Code
5606 \begin_layout Plain Layout
5617 The location of the `local' TeX tree is defined by
5618 \begin_inset Flex CharStyle:Code
5621 \begin_layout Plain Layout
5627 ; this is usually somewhere like
5628 \begin_inset Flex CharStyle:Code
5631 \begin_layout Plain Layout
5632 /usr/local/share/texmf/
5638 The `user' TeX tree is defined by
5639 \begin_inset Flex CharStyle:Code
5642 \begin_layout Plain Layout
5649 \begin_inset Flex CharStyle:Code
5652 \begin_layout Plain Layout
5659 (If these variables are not predefined, you can define them.) You'll probably
5660 need root permissions to create or modify the `local' tree; but your `user'
5661 tree shouldn't have such limitations.
5664 \begin_layout Enumerate
5666 \begin_inset Flex CharStyle:Code
5669 \begin_layout Plain Layout
5676 \begin_inset Flex CharStyle:Code
5679 \begin_layout Plain Layout
5686 \begin_inset Flex CharStyle:Code
5689 \begin_layout Plain Layout
5696 \begin_inset Newline newline
5700 \begin_inset Flex CharStyle:Code
5703 \begin_layout Plain Layout
5704 TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5710 \begin_inset Newline newline
5713 But, again, most of this will
5714 \begin_inset Quotes eld
5718 \begin_inset Quotes erd
5724 \begin_layout Enumerate
5729 \begin_layout Plain Layout
5730 We'll assume henceforth that you're defining `local' TeX tree.
5731 If you're defining a user tree, just adjust as necessary.
5737 You must follow the directory structure of your existing
5738 \begin_inset Flex CharStyle:Code
5741 \begin_layout Plain Layout
5747 directory, which will be found at
5748 \begin_inset Flex CharStyle:Code
5751 \begin_layout Plain Layout
5758 For example, latex packages should go under
5759 \begin_inset Flex CharStyle:Code
5762 \begin_layout Plain Layout
5763 $TEXMFLOCAL/tex/latex/
5771 \begin_layout Enumerate
5772 Install the package.
5773 For example, you would unpack the FoilTeX tarball and copy it to
5774 \begin_inset Flex CharStyle:Code
5777 \begin_layout Plain Layout
5778 $TEXMFLOCAL/tex/latex/foiltex
5785 \begin_inset Flex CharStyle:Code
5788 \begin_layout Plain Layout
5794 directory contains various files.
5797 \begin_layout Enumerate
5799 \begin_inset Flex CharStyle:Code
5802 \begin_layout Plain Layout
5810 \begin_inset Flex CharStyle:Code
5813 \begin_layout Plain Layout
5822 \begin_layout Standard
5823 Your package is now installed and available to LaTeX.
5824 To make it available to LyX, you need to create a Layout file, if one is
5825 not already available.
5826 (See the next section.) Once you have a layout file, you need only reconfigure
5828 \begin_inset Flex CharStyle:MenuItem
5831 \begin_layout Plain Layout
5832 Tools\SpecialChar \menuseparator
5838 ) and then restart LyX.
5839 You should then see your new package---for example
5840 \begin_inset Flex CharStyle:MenuItem
5843 \begin_layout Plain Layout
5850 \begin_inset Flex CharStyle:MenuItem
5853 \begin_layout Plain Layout
5854 Document\SpecialChar \menuseparator
5861 \begin_inset Flex CharStyle:MenuItem
5864 \begin_layout Plain Layout
5874 \begin_layout Section
5878 \begin_layout Standard
5879 This section describes how to write and install your own LyX layout files
5880 and walks through the
5881 \begin_inset Flex CharStyle:Code
5884 \begin_layout Plain Layout
5890 text class format as an example.
5892 \begin_inset Flex CharStyle:Code
5895 \begin_layout Plain Layout
5901 files describe what paragraph and character styles are available for a
5902 given document class and how LyX should display them.
5903 We try to provide a thorough description of the process here; however,
5904 there are so many different types of documents supported by LaTeX classes
5905 that we can't hope to cover every different possibility or problem you
5907 (The LyX users' list is frequented by people with lots of experience with
5908 layout design who are willing to share what they've learned.)
5911 \begin_layout Standard
5912 As you prepare to write a new layout, it is extremely helpful to look at
5913 the example layouts distributed with LyX.
5914 If you use a nice LaTeX document class that might be of interest for others,
5915 too, and have a nice corresponding LyX layout, feel free to contribute
5916 the stuff to us, so we may put it into the distribution.
5918 \begin_inset CommandInset href
5920 name "section on the LyX wiki"
5921 target "http://wiki.lyx.org/Layouts/Layouts"
5925 for this kind of material.
5928 \begin_layout Standard
5929 All the tags described in this chapter are case-insensitive; this means
5931 \begin_inset Flex CharStyle:Code
5934 \begin_layout Plain Layout
5941 \begin_inset Flex CharStyle:Code
5944 \begin_layout Plain Layout
5951 \begin_inset Flex CharStyle:Code
5954 \begin_layout Plain Layout
5960 are really the same command.
5961 The possible values are printed in brackets after the feature's name.
5962 The default value if a feature isn't specified inside a text class-description
5964 \begin_inset Flex CharStyle:Code
5967 \begin_layout Plain Layout
5976 If the argument has a datatype like
5977 \begin_inset Quotes eld
5981 \begin_inset Quotes erd
5985 \begin_inset Quotes eld
5989 \begin_inset Quotes erd
5992 , the default is shown like this:
5993 \begin_inset Flex CharStyle:Code
5996 \begin_layout Plain Layout
6007 \begin_layout Subsection
6011 \begin_layout Standard
6012 Similar to layout files, and new with LyX 1.6, are layout
6017 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6018 some modules---such as the Endnotes module---provide support for just such
6020 In a sense, layout modules are similar to included files---files like
6021 \begin_inset Flex CharStyle:Code
6024 \begin_layout Plain Layout
6030 ---in that modules are not specific to a given document layout but may be
6031 used with many different layouts.
6032 The difference is that using a layout module does not require editing the
6034 Rather, modules are selected in the
6035 \begin_inset Flex CharStyle:MenuItem
6038 \begin_layout Plain Layout
6039 Document\SpecialChar \menuseparator
6048 \begin_layout Standard
6049 Building modules is the easiest way to get started with layout editing,
6050 since it can be as simple as adding a single new paragraph or flex inset.
6051 But modules may, in principle, contain anything a layout file can contain.
6054 \begin_layout Standard
6055 A module must begin with a line like the following:
6058 \begin_layout LyX-Code
6061 DeclareLyXModule[endnotes.sty]{Endnotes}
6064 \begin_layout Standard
6065 The argument in square brackets is optional: It declares any LaTeX packages
6066 on which the module depends.
6067 The mandatory argument, in curly brackets, is the name of the module, as
6069 \begin_inset Flex CharStyle:MenuItem
6072 \begin_layout Plain Layout
6073 Document\SpecialChar \menuseparator
6083 \begin_layout Standard
6084 The module declaration should then be followed by lines like the following:
6087 \begin_layout LyX-Code
6091 \begin_layout LyX-Code
6092 #Adds an endnote command, in addition to footnotes.
6096 \begin_layout LyX-Code
6097 #You will need to add
6099 theendnotes in ERT where you
6102 \begin_layout LyX-Code
6103 #want the endnotes to appear.
6107 \begin_layout LyX-Code
6111 \begin_layout LyX-Code
6112 #Requires: somemodule | othermodule
6115 \begin_layout LyX-Code
6116 #Excludes: badmodule
6119 \begin_layout Standard
6120 The description is used in
6121 \begin_inset Flex CharStyle:MenuItem
6124 \begin_layout Plain Layout
6125 Document\SpecialChar \menuseparator
6131 to provide the user with information about what the module does.
6133 \begin_inset Flex CharStyle:Code
6136 \begin_layout Plain Layout
6142 line is used to identify other modules with which this one must be used;
6144 \begin_inset Flex CharStyle:Code
6147 \begin_layout Plain Layout
6153 line is used to identify modules with which this one may not be used.
6154 Both are optional, and, as shown, multiple modules should be separated
6155 with the pipe symbol: |.
6156 Note that the required modules are treated disjunctively:
6160 of the required modules must be used.
6165 excluded module may be used.
6166 Note that modules are identified here by their
6170 without the .module extension.
6172 \begin_inset Flex CharStyle:Code
6175 \begin_layout Plain Layout
6182 \begin_inset Flex CharStyle:Code
6185 \begin_layout Plain Layout
6194 \begin_layout Standard
6195 After creating a new module, you will need to reconfigure and then restart
6196 LyX for the module to appear in the menu.
6197 However, changes you make to the module will be seen immediately, if you
6199 \begin_inset Flex CharStyle:MenuItem
6202 \begin_layout Plain Layout
6203 Document\SpecialChar \menuseparator
6209 , highlight something, and then hit
6210 \begin_inset Quotes eld
6214 \begin_inset Quotes erd
6220 It is strongly recommended that you save your work before doing so
6225 it is strongly recommended that you not attempt to edit modules while simultaneo
6226 usly working on documents
6229 Though of course the developers strive to keep LyX stable in such situations,
6230 syntax errors and the like in your module file could cause strange behavior.
6233 \begin_layout Subsection
6234 Supporting new document classes
6237 \begin_layout Standard
6238 There are two situations you are likely to encounter when wanting to support
6239 a new LaTeX document class, involving LaTeX2e class (
6240 \begin_inset Flex CharStyle:Code
6243 \begin_layout Plain Layout
6250 \begin_inset Flex CharStyle:Code
6253 \begin_layout Plain Layout
6260 Supporting a style file is usually fairly easy.
6261 Supporting a new document class is a bit harder.
6264 \begin_layout Subsection
6266 \begin_inset Flex CharStyle:MenuItem
6269 \begin_layout Plain Layout
6278 \begin_layout Standard
6279 If your new document class is provided as a style file that is used in conjuncti
6280 on with an existing, supported document class---for the sake of the example,
6281 we'll assume that the style file is called
6282 \begin_inset Flex CharStyle:MenuItem
6285 \begin_layout Plain Layout
6291 and it is meant to be used with
6292 \begin_inset Flex CharStyle:MenuItem
6295 \begin_layout Plain Layout
6301 , which is a standard class---start by copying the existing class's layout
6302 file into your local directory:
6305 \begin_layout LyX-Code
6306 cp report.layout ~/.lyx/layouts/myclass.layout
6309 \begin_layout Standard
6311 \begin_inset Flex CharStyle:Code
6314 \begin_layout Plain Layout
6320 and change the line:
6323 \begin_layout LyX-Code
6326 DeclareLaTeXClass{report}
6329 \begin_layout Standard
6333 \begin_layout LyX-Code
6336 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6339 \begin_layout Standard
6343 \begin_layout LyX-Code
6345 \begin_inset Newline newline
6351 \begin_inset Newline newline
6357 \begin_layout Standard
6358 near the top of the file.
6361 \begin_layout Standard
6362 Start LyX and select
6363 \begin_inset Flex CharStyle:MenuItem
6366 \begin_layout Plain Layout
6371 ools\SpecialChar \menuseparator
6382 Then restart LyX and try creating a new document.
6384 \begin_inset Flex CharStyle:MenuItem
6387 \begin_layout Plain Layout
6393 " as a document class option in the
6394 \begin_inset Flex CharStyle:MenuItem
6397 \begin_layout Plain Layout
6402 ocument\SpecialChar \menuseparator
6413 It is likely that some of the sectioning commands and such in your new
6414 class will work differently from how they worked in the base class---
6415 \begin_inset Flex CharStyle:Code
6418 \begin_layout Plain Layout
6424 in this example---so you can fiddle around with the settings for the different
6425 sections if you wish.
6428 \begin_layout Subsection
6430 \begin_inset Flex CharStyle:MenuItem
6433 \begin_layout Plain Layout
6442 \begin_layout Standard
6443 There are two possibilities here.
6444 One is that the class file is itself based upon an existing document class.
6445 For example, many thesis classes are based upon
6446 \begin_inset Flex CharStyle:MenuItem
6449 \begin_layout Plain Layout
6456 To see whether yours is, look for a line like
6459 \begin_layout LyX-Code
6465 \begin_layout Standard
6467 If so, then you may proceed largely as in the previous section, though
6468 the DeclareLaTeXClass line will be different.
6469 If your new class is thesis, and it is based upon book, then the line should
6474 \begin_layout Plain Layout
6475 And it will be easiest if you save the file to
6476 \begin_inset Flex CharStyle:Code
6479 \begin_layout Plain Layout
6485 : LyX assumes that the document class has the same name as the layout file.
6494 \begin_layout LyX-Code
6497 DeclareLaTeXClass[thesis,book]{thesis}
6500 \begin_layout Standard
6501 If, on the other hand, the new class is not based upon an existing class,
6502 you will probably have to
6503 \begin_inset Quotes eld
6507 \begin_inset Quotes erd
6511 We strongly suggest copying an existing layout file which uses a similar
6512 LaTeX class and then modifying it, if you can do so.
6513 At least use an existing file as a starting point so you can find out what
6514 items you need to worry about.
6515 Again, the specifics are covered below.
6518 \begin_layout Section
6519 Declaring a new text class
6522 \begin_layout Standard
6523 When it's finally time to get your hands dirty and create or edit your own
6524 layout file, the following sections describe what you're up against.
6525 Our advice is to go slowly, save and test often, listen to soothing music,
6526 and enjoy one or two of your favorite adult beverages; more if you are
6527 getting particularly stuck.
6528 It's really not that hard, except that the multitude of options can become
6529 overwhelming if you try to do to much in one sitting.
6530 Go have another adult beverage, just for good measure.
6533 \begin_layout Standard
6537 \begin_layout Standard
6538 Lines in a layout file which begin with a
6539 \begin_inset Flex CharStyle:Code
6542 \begin_layout Plain Layout
6549 There is one exception to this rule: all layouts should begin with lines
6553 \begin_layout LyX-Code
6556 #% Do not delete the line below; configure depends on this
6559 \begin_layout LyX-Code
6564 DeclareLaTeXClass{article}
6567 \begin_layout Standard
6568 The second line is used when you configure LyX.
6569 The layout file is read by the LaTeX script
6570 \begin_inset Flex CharStyle:Code
6573 \begin_layout Plain Layout
6579 , in a special mode where
6580 \begin_inset Flex CharStyle:Code
6583 \begin_layout Plain Layout
6590 The first line is just a LaTeX comment, and the second one contains the
6591 declaration of the text class.
6592 If these lines appear in a file named
6593 \begin_inset Flex CharStyle:Code
6596 \begin_layout Plain Layout
6602 , then they define a text class of name
6603 \begin_inset Flex CharStyle:Code
6606 \begin_layout Plain Layout
6612 (the name of the layout file) which uses the LaTeX document class
6613 \begin_inset Flex CharStyle:Code
6616 \begin_layout Plain Layout
6622 (the default is to use the same name as the layout).
6624 \begin_inset Quotes eld
6628 \begin_inset Quotes erd
6631 that appears above is used as a description of the text class in the
6632 \begin_inset Flex CharStyle:MenuItem
6635 \begin_layout Plain Layout
6640 ocument\SpecialChar \menuseparator
6653 \begin_layout Standard
6654 Let's assume that you wrote your own text class that uses the
6655 \begin_inset Flex CharStyle:Code
6658 \begin_layout Plain Layout
6664 document class, but where you changed the appearance of the section headings.
6665 If you put it in a file
6666 \begin_inset Flex CharStyle:Code
6669 \begin_layout Plain Layout
6675 , the header of this file should be:
6678 \begin_layout LyX-Code
6681 #% Do not delete the line below; configure depends on this
6684 \begin_layout LyX-Code
6689 DeclareLaTeXClass[article]{article (with my own headings)}
6692 \begin_layout Standard
6693 This declares a text class
6694 \begin_inset Flex CharStyle:Code
6697 \begin_layout Plain Layout
6703 , associated with the LaTeX document class
6704 \begin_inset Flex CharStyle:Code
6707 \begin_layout Plain Layout
6714 \begin_inset Quotes eld
6717 article (with my own headings)
6718 \begin_inset Quotes erd
6722 If your text class depends on several packages, you can declare it as:
6725 \begin_layout LyX-Code
6728 #% Do not delete the line below; configure depends on this
6731 \begin_layout LyX-Code
6736 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6739 \begin_layout Standard
6740 This indicates that your text class uses the foo.sty package.
6741 Finally, it is also possible to declare classes for DocBook code.
6742 Typical declarations will look like
6745 \begin_layout LyX-Code
6748 #% Do not delete the line below; configure depends on this
6751 \begin_layout LyX-Code
6756 DeclareDocBookClass[article]{SGML (DocBook article)}
6759 \begin_layout Standard
6760 Note that these declarations can also be given an optional parameter declaring
6761 the name of the document class (but not a list).
6764 \begin_layout Standard
6765 So, to be as explicit as possible, the form of the layout declaration is:
6768 \begin_layout LyX-Code
6773 DeclareLaTeXClass[class,package.sty]{layout description}
6776 \begin_layout Standard
6777 The class need only be specified if the name of the LaTeX class file and
6778 the name of the layout file are different; if the name of the classfile
6779 is not specified, then LyX will simply assume that it is the same as the
6780 name of the layout file.
6783 \begin_layout Standard
6784 When the text class has been modified to your taste, all you have to do
6785 is to copy it either to
6786 \begin_inset Flex CharStyle:Code
6789 \begin_layout Plain Layout
6796 \begin_inset Flex CharStyle:Code
6799 \begin_layout Plain Layout
6806 \begin_inset Flex CharStyle:MenuItem
6809 \begin_layout Plain Layout
6814 ools\SpecialChar \menuseparator
6824 , exit LyX and restart it.
6825 Then your new text class should be available along with the others.
6828 \begin_layout Standard
6829 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6830 you made to your layout files.
6831 As a result, editing layout files could be very time consuming.
6832 Beginning with 1.6, however, you can force a reload of the layout currently
6833 in use by using the LyX function
6834 \begin_inset Flex CharStyle:MenuItem
6837 \begin_layout Plain Layout
6844 There is no default binding for this function---though, of course, you
6845 can bind it to a key yourself.
6846 If you want to use this function, then, you should simply enter it in the
6852 : This is very much an `advanced feature'.
6857 recommended that you save your work before using this function.
6862 recommended that you not attempt to edit your layout while simultaneously
6863 working on a document that you care about.
6864 Use a test document.
6865 Syntax errors and the like in your layout file could cause peculiar behavior.
6866 In particular, such errors could cause LyX to regard the current layout
6867 as invalid and to attempt to switch to some other layout.
6868 The LyX team strives to keep LyX stable in such situations, but safe is
6872 \begin_layout Subsection
6876 \begin_layout Standard
6877 The first non-comment line must contain the file format number:
6880 \begin_layout Description
6881 \begin_inset Flex CharStyle:Code
6884 \begin_layout Plain Layout
6891 \begin_inset Flex CharStyle:Code
6894 \begin_layout Plain Layout
6900 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6901 don't have an explicit file format).
6902 The file format that is documented here is format 8.
6905 \begin_layout Subsection
6906 General text class parameters
6909 \begin_layout Standard
6910 These are the general parameters which describe the form of the entire document:
6913 \begin_layout Description
6914 \begin_inset Flex CharStyle:Code
6917 \begin_layout Plain Layout
6923 Adds information to the document preamble.
6925 \begin_inset Quotes eld
6929 \begin_inset Flex CharStyle:Code
6932 \begin_layout Plain Layout
6939 \begin_inset Quotes erd
6945 \begin_layout Description
6946 \begin_inset Flex CharStyle:Code
6949 \begin_layout Plain Layout
6955 Describes various global options supported by the document class.
6957 \begin_inset space ~
6961 \begin_inset CommandInset ref
6963 reference "sec:classoptions"
6969 \begin_inset Quotes eld
6973 \begin_inset Flex CharStyle:Code
6976 \begin_layout Plain Layout
6983 \begin_inset Quotes erd
6989 \begin_layout Description
6990 \begin_inset Flex CharStyle:Code
6993 \begin_layout Plain Layout
7000 \begin_inset Flex CharStyle:Code
7003 \begin_layout Plain Layout
7012 \begin_inset Flex CharStyle:Code
7015 \begin_layout Plain Layout
7021 ] Whether the class should default to having one or two columns.
7022 Can be changed in the
7023 \begin_inset Flex CharStyle:MenuItem
7026 \begin_layout Plain Layout
7031 ocument\SpecialChar \menuseparator
7044 \begin_layout Description
7045 \begin_inset Flex CharStyle:Code
7048 \begin_layout Plain Layout
7054 This sequence defines a new counter.
7056 \begin_inset space ~
7060 \begin_inset CommandInset ref
7062 reference "sec:counter"
7068 \begin_inset Quotes eld
7072 \begin_inset Flex CharStyle:Code
7075 \begin_layout Plain Layout
7082 \begin_inset Quotes erd
7088 \begin_layout Description
7089 \begin_inset Flex CharStyle:Code
7092 \begin_layout Plain Layout
7098 Sets the default font used to display the document.
7100 \begin_inset space ~
7104 \begin_inset CommandInset ref
7106 reference "sec:fonts"
7110 for how to declare fonts.
7112 \begin_inset Quotes eld
7116 \begin_inset Flex CharStyle:Code
7119 \begin_layout Plain Layout
7126 \begin_inset Quotes erd
7132 \begin_layout Description
7133 \begin_inset Flex CharStyle:Code
7136 \begin_layout Plain Layout
7143 \begin_inset Flex CharStyle:Code
7146 \begin_layout Plain Layout
7152 ] This is the style that will be assigned to new paragraphs, usually
7153 \begin_inset Flex CharStyle:MenuItem
7156 \begin_layout Plain Layout
7163 This will default to the first defined style if not given, but you are
7164 highly encouraged to use this directive.
7167 \begin_layout Description
7168 \begin_inset Flex CharStyle:Code
7171 \begin_layout Plain Layout
7177 Defines a new float.
7179 \begin_inset space ~
7183 \begin_inset CommandInset ref
7185 reference "sec:floats"
7191 \begin_inset Quotes eld
7195 \begin_inset Flex CharStyle:Code
7198 \begin_layout Plain Layout
7205 \begin_inset Quotes erd
7211 \begin_layout Description
7212 \begin_inset Flex CharStyle:Code
7215 \begin_layout Plain Layout
7221 As its name implies, this command allows you to include another layout
7222 definition file within yours to avoid duplicating commands.
7223 Common examples are the standard layout files, for example,
7224 \begin_inset Flex CharStyle:Code
7227 \begin_layout Plain Layout
7233 , which contains most of the basic layouts.
7236 \begin_layout Description
7237 \begin_inset Flex CharStyle:Code
7240 \begin_layout Plain Layout
7246 This section (re-)defines the layout of an inset.
7247 It can be applied to an existing inset of to a new, user-defined inset,
7248 e.g., a new character style.
7250 \begin_inset space ~
7254 \begin_inset CommandInset ref
7256 reference "sec:charstyle"
7260 for more information.
7262 \begin_inset Quotes eld
7266 \begin_inset Flex CharStyle:Code
7269 \begin_layout Plain Layout
7276 \begin_inset Quotes erd
7282 \begin_layout Description
7283 \begin_inset Flex CharStyle:Code
7286 \begin_layout Plain Layout
7293 \change_deleted 0 1223264406
7295 \change_inserted 0 1223264424
7296 A string that indicates the width of the left margin on the screen, for
7298 \begin_inset Quotes eld
7302 \begin_inset Quotes erd
7310 \begin_layout Description
7311 \begin_inset Flex CharStyle:Code
7314 \begin_layout Plain Layout
7320 This command deletes an existing float.
7321 This is particularly useful when you want to suppress a float that has
7322 be defined in an input file.
7325 \begin_layout Description
7326 \begin_inset Flex CharStyle:Code
7329 \begin_layout Plain Layout
7335 This command deletes an existing style.
7336 This is particularly useful when you want to suppress a style that has
7337 be defined in an input file.
7340 \begin_layout Description
7341 \begin_inset Flex CharStyle:Code
7344 \begin_layout Plain Layout
7351 \change_deleted 0 1223264478
7353 \change_inserted 0 1223264538
7354 A string indicating what sort of output documents using this class will
7356 At present, the options are: `docbook', `latex', `linuxdoc', and `literate'.
7361 \begin_layout Description
7362 \begin_inset Flex CharStyle:Code
7365 \begin_layout Plain Layout
7376 \begin_inset Flex CharStyle:Code
7379 \begin_layout Plain Layout
7390 \begin_inset Flex CharStyle:Code
7393 \begin_layout Plain Layout
7400 \begin_inset Flex CharStyle:Code
7403 \begin_layout Plain Layout
7409 ] The class default pagestyle.
7410 Can be changed in the
7411 \begin_inset Flex CharStyle:MenuItem
7414 \begin_layout Plain Layout
7419 ocument\SpecialChar \menuseparator
7432 \begin_layout Description
7433 \begin_inset Flex CharStyle:Code
7436 \begin_layout Plain Layout
7442 Sets the preamble for the LaTeX document.
7443 Note that this will completely override any prior
7444 \begin_inset Flex CharStyle:Code
7447 \begin_layout Plain Layout
7454 \begin_inset Flex CharStyle:Code
7457 \begin_layout Plain Layout
7465 \begin_inset Quotes eld
7469 \begin_inset Flex CharStyle:Code
7472 \begin_layout Plain Layout
7479 \begin_inset Quotes erd
7485 \begin_layout Description
7486 \begin_inset Flex CharStyle:Code
7489 \begin_layout Plain Layout
7496 \begin_inset Flex CharStyle:Code
7499 \begin_layout Plain Layout
7506 \begin_inset Flex CharStyle:Code
7509 \begin_layout Plain Layout
7518 \begin_inset Flex CharStyle:Code
7521 \begin_layout Plain Layout
7527 ] Whether the class already provides the feature
7528 \begin_inset Flex CharStyle:Code
7531 \begin_layout Plain Layout
7538 A feature is in general the name of a package (
7539 \begin_inset Flex CharStyle:Code
7542 \begin_layout Plain Layout
7549 \begin_inset Flex CharStyle:Code
7552 \begin_layout Plain Layout
7558 , \SpecialChar \ldots{}
7560 \begin_inset Flex CharStyle:Code
7563 \begin_layout Plain Layout
7570 \begin_inset Flex CharStyle:Code
7573 \begin_layout Plain Layout
7579 ,\SpecialChar \ldots{}
7580 ); the complete list of supported features is unfortunately not documented
7581 outside the LyX source code---but see
7582 \begin_inset Flex CharStyle:Code
7585 \begin_layout Plain Layout
7591 if you're interested.
7593 \begin_inset Flex CharStyle:MenuItem
7596 \begin_layout Plain Layout
7601 elp\SpecialChar \menuseparator
7611 also gives an overview of the supported packages.
7614 \begin_layout Description
7615 \begin_inset Flex CharStyle:Code
7618 \begin_layout Plain Layout
7625 \begin_inset Flex CharStyle:Code
7628 \begin_layout Plain Layout
7634 ] Whether the class requires the feature
7635 \begin_inset Flex CharStyle:Code
7638 \begin_layout Plain Layout
7645 Multiple features must be separated by commas.
7646 Note that you can only request supported features.
7649 \begin_layout Description
7650 \begin_inset Flex CharStyle:Code
7653 \begin_layout Plain Layout
7660 \change_deleted 0 1223264443
7662 \change_inserted 0 1223264447
7663 A string that indicates the width of the right margin on the screen, for
7665 \begin_inset Quotes eld
7669 \begin_inset Quotes erd
7677 \begin_layout Description
7678 \begin_inset Flex CharStyle:Code
7681 \begin_layout Plain Layout
7688 \change_deleted 0 1223264553
7690 \change_inserted 0 1223264811
7691 Sets which divisions get numbered.
7693 \begin_inset Flex CharStyle:Code
7696 \begin_layout Plain Layout
7698 \change_inserted 0 1223264626
7711 \begin_layout Description
7712 \begin_inset Flex CharStyle:Code
7715 \begin_layout Plain Layout
7724 \begin_inset Flex CharStyle:Code
7727 \begin_layout Plain Layout
7738 \begin_inset Flex CharStyle:Code
7741 \begin_layout Plain Layout
7747 ] Whether the class-default should be printing on one or both sides of the
7749 Can be changed in the
7750 \begin_inset Flex CharStyle:MenuItem
7753 \begin_layout Plain Layout
7758 ocument\SpecialChar \menuseparator
7771 \begin_layout Description
7772 \begin_inset Flex CharStyle:Code
7775 \begin_layout Plain Layout
7781 This sequence defines a new paragraph style.
7782 If the style already exists, it will redefine some of its parameters instead.
7784 \begin_inset space ~
7788 \begin_inset CommandInset ref
7790 reference "sec:style"
7796 \begin_inset Quotes eld
7800 \begin_inset Flex CharStyle:Code
7803 \begin_layout Plain Layout
7810 \begin_inset Quotes erd
7816 \begin_layout Description
7817 \begin_inset Flex CharStyle:Code
7820 \begin_layout Plain Layout
7827 \begin_inset Flex CharStyle:Code
7830 \begin_layout Plain Layout
7836 ] The name of the command or environment to be used with
7837 \begin_inset Flex CharStyle:Code
7840 \begin_layout Plain Layout
7849 \begin_layout Description
7850 \begin_inset Flex CharStyle:Code
7853 \begin_layout Plain Layout
7860 \begin_inset Flex CharStyle:Code
7863 \begin_layout Plain Layout
7872 \begin_inset Flex CharStyle:Code
7875 \begin_layout Plain Layout
7881 ] Indicates what kind of markup is used to define the title of a document.
7883 \begin_inset Flex CharStyle:Code
7886 \begin_layout Plain Layout
7892 means that the macro with name
7893 \begin_inset Flex CharStyle:Code
7896 \begin_layout Plain Layout
7902 will be inserted after the last layout which has
7903 \begin_inset Quotes eld
7907 \begin_inset Flex CharStyle:Code
7910 \begin_layout Plain Layout
7917 \begin_inset Quotes erd
7922 \begin_inset Flex CharStyle:Code
7925 \begin_layout Plain Layout
7931 corresponds to the case where the block of paragraphs which have
7932 \begin_inset Quotes eld
7936 \begin_inset Flex CharStyle:Code
7939 \begin_layout Plain Layout
7946 \begin_inset Quotes erd
7949 should be enclosed into the
7950 \begin_inset Flex CharStyle:Code
7953 \begin_layout Plain Layout
7962 \begin_layout Description
7963 \begin_inset Flex CharStyle:Code
7966 \begin_layout Plain Layout
7973 \change_deleted 0 1223264639
7975 \change_inserted 0 1223264836
7976 Sets which divisions are included in the table of contents.
7978 \begin_inset Flex CharStyle:Code
7981 \begin_layout Plain Layout
7983 \change_inserted 0 1223264831
7996 \begin_layout Description
7997 \begin_inset Flex CharStyle:Code
8000 \begin_layout Plain Layout
8007 \begin_inset Flex CharStyle:Code
8010 \begin_layout Plain Layout
8016 Specifies a module to be included by default with this document class.
8017 The user can still remove the module, but it will be active at the outset.
8018 (This applies only when new files are created, or when this class is chosen
8019 for an existing document.)
8022 \begin_layout Subsection
8023 \begin_inset Flex CharStyle:Code
8026 \begin_layout Plain Layout
8035 \begin_layout Standard
8036 \begin_inset CommandInset label
8038 name "sec:classoptions"
8043 \begin_inset Flex CharStyle:Code
8046 \begin_layout Plain Layout
8052 section can contain the following entries:
8055 \begin_layout Description
8056 \begin_inset Flex CharStyle:Code
8059 \begin_layout Plain Layout
8066 \begin_inset Flex CharStyle:Code
8069 \begin_layout Plain Layout
8075 ] The list of available font sizes for the document's main font, separated
8077 \begin_inset Quotes eld
8081 \begin_inset Flex CharStyle:Code
8084 \begin_layout Plain Layout
8091 \begin_inset Quotes erd
8097 \begin_layout Description
8098 \begin_inset Flex CharStyle:Code
8101 \begin_layout Plain Layout
8108 \change_deleted 0 1223264991
8110 \change_inserted 0 1223265053
8111 Used to set the DTD line with XML-based output classes.
8113 \begin_inset Quotes eld
8116 -//OASIS//DTD DocBook V4.2//EN
8117 \begin_inset Quotes erd
8125 \begin_layout Description
8126 \begin_inset Flex CharStyle:Code
8129 \begin_layout Plain Layout
8136 \begin_inset Flex CharStyle:Code
8139 \begin_layout Plain Layout
8140 string="empty|plain|headings|fancy"
8145 ] The list of available page styles, separated by
8146 \begin_inset Quotes eld
8150 \begin_inset Flex CharStyle:Code
8153 \begin_layout Plain Layout
8160 \begin_inset Quotes erd
8166 \begin_layout Description
8167 \begin_inset Flex CharStyle:Code
8170 \begin_layout Plain Layout
8177 \begin_inset Flex CharStyle:Code
8180 \begin_layout Plain Layout
8186 ] Some document class options, separated by a comma, that will be added
8187 to the optional part of the
8188 \begin_inset Flex CharStyle:Code
8191 \begin_layout Plain Layout
8202 \begin_layout Standard
8204 \begin_inset Flex CharStyle:Code
8207 \begin_layout Plain Layout
8213 section must end with
8214 \begin_inset Quotes eld
8218 \begin_inset Flex CharStyle:Code
8221 \begin_layout Plain Layout
8228 \begin_inset Quotes erd
8234 \begin_layout Subsection
8238 \begin_layout Standard
8239 \begin_inset CommandInset label
8245 A paragraph style description looks like this:
8249 \begin_layout Plain Layout
8250 Note that this will either define a new layout or modify an existing one.
8258 \begin_layout LyX-Code
8265 \begin_layout LyX-Code
8269 \begin_layout LyX-Code
8273 \begin_layout Standard
8274 where the following commands are allowed:
8277 \begin_layout Description
8278 \begin_inset Flex CharStyle:Code
8281 \begin_layout Plain Layout
8288 \begin_inset Flex CharStyle:Code
8291 \begin_layout Plain Layout
8296 , left, right, center
8301 ] Paragraph alignment.
8304 \begin_layout Description
8305 \begin_inset Flex CharStyle:Code
8308 \begin_layout Plain Layout
8315 \begin_inset Flex CharStyle:Code
8318 \begin_layout Plain Layout
8323 , left, right, center
8328 ] A comma separated list of permitted alignments.
8329 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
8331 For example a right-aligned or centered enumeration isn't possible.)
8334 \begin_layout Description
8335 \begin_inset Flex CharStyle:Code
8338 \begin_layout Plain Layout
8345 \begin_inset Flex CharStyle:Code
8348 \begin_layout Plain Layout
8358 \begin_layout Plain Layout
8359 Note that a `float' here is a real number, such as: 1.5.
8364 The vertical space with which the last of a chain of paragraphs with this
8365 layout is separated from the following paragraph.
8366 If the next paragraph has another layout, the separations are not simply
8367 added, but the maximum is taken.
8370 \begin_layout Description
8371 \begin_inset Flex CharStyle:Code
8374 \begin_layout Plain Layout
8381 \begin_inset Flex CharStyle:Code
8384 \begin_layout Plain Layout
8390 The category for this style.
8391 This is used to group related styles in the Layout combobox on the toolbar.
8392 Any string can be used, but you may want to use existing categories with
8397 \begin_layout Description
8398 \begin_inset Flex CharStyle:Code
8401 \begin_layout Plain Layout
8408 \change_deleted 0 1223265419
8410 \change_inserted 0 1223265432
8411 Depth of XML command.
8412 Used only with XML-type formats.
8417 \begin_layout Description
8418 \begin_inset Flex CharStyle:Code
8421 \begin_layout Plain Layout
8428 \begin_inset CommandInset label
8430 name "des:CopyStyle"
8435 \begin_inset Flex CharStyle:Code
8438 \begin_layout Plain Layout
8444 Copies all the features of an existing style into the current one.
8448 \begin_layout Description
8449 \begin_inset Flex CharStyle:Code
8452 \begin_layout Plain Layout
8458 The name of a style whose preamble should be output
8463 This allows to ensure some ordering of the preamble snippets when macros
8464 definitions depend on one another.
8468 \begin_layout Plain Layout
8469 Note that, besides that functionality, there is no way to ensure any ordering
8471 The ordering that you see in a given version of LyX may change without
8472 warning in later versions.
8480 \begin_layout Description
8481 \begin_inset Flex CharStyle:Code
8484 \begin_layout Plain Layout
8491 \begin_inset Flex CharStyle:Code
8494 \begin_layout Plain Layout
8499 , Box, Filled_Box, Static
8504 ] The type of label that stands at the end of the paragraph (or sequence
8506 \begin_inset Flex CharStyle:Code
8509 \begin_layout Plain Layout
8516 \begin_inset Flex CharStyle:Code
8519 \begin_layout Plain Layout
8526 \begin_inset Flex CharStyle:Code
8529 \begin_layout Plain Layout
8536 \begin_inset Flex CharStyle:Code
8539 \begin_layout Plain Layout
8547 \begin_inset Flex CharStyle:Code
8550 \begin_layout Plain Layout
8557 \begin_inset Quotes eld
8561 \begin_inset Quotes erd
8565 \begin_inset Flex CharStyle:Code
8568 \begin_layout Plain Layout
8575 \begin_inset Flex CharStyle:Code
8578 \begin_layout Plain Layout
8579 \begin_inset space ~
8588 \begin_inset space ~
8591 black) square suitable for end of proof markers,
8592 \begin_inset Flex CharStyle:Code
8595 \begin_layout Plain Layout
8601 is an explicit text string.
8604 \begin_layout Description
8605 \begin_inset Flex CharStyle:Code
8608 \begin_layout Plain Layout
8615 \begin_inset Flex CharStyle:Code
8618 \begin_layout Plain Layout
8624 ] The string used for a label with a
8625 \begin_inset Flex CharStyle:Code
8628 \begin_layout Plain Layout
8635 \begin_inset Flex CharStyle:Code
8638 \begin_layout Plain Layout
8648 \begin_layout Description
8649 \begin_inset Flex CharStyle:Code
8652 \begin_layout Plain Layout
8659 \begin_inset Flex CharStyle:Code
8662 \begin_layout Plain Layout
8673 \begin_inset Flex CharStyle:Code
8676 \begin_layout Plain Layout
8685 \begin_layout Description
8686 \begin_inset Flex CharStyle:Code
8689 \begin_layout Plain Layout
8696 \begin_inset Flex CharStyle:Code
8699 \begin_layout Plain Layout
8709 ] With this parameter the
8710 \begin_inset Flex CharStyle:MenuItem
8713 \begin_layout Plain Layout
8720 \begin_inset Quotes eld
8723 Vertical space above
8724 \begin_inset Quotes erd
8728 \begin_inset Flex CharStyle:MenuItem
8731 \begin_layout Plain Layout
8736 dit\SpecialChar \menuseparator
8742 \begin_inset space ~
8750 dialog can be set when initializing a paragraph with this style.
8754 \begin_layout Plain Layout
8757 Note from Jean-Marc:
8759 I'm not sure that this setting has much use, and it should probably be
8760 removed in later versions.
8768 \begin_layout Description
8769 \begin_inset Flex CharStyle:Code
8772 \begin_layout Plain Layout
8778 The font used for both the text body
8784 \begin_inset space ~
8788 \begin_inset CommandInset ref
8790 reference "sec:fonts"
8795 Note that defining this font automatically defines the
8796 \begin_inset Flex CharStyle:Code
8799 \begin_layout Plain Layout
8806 So you should define this one first if you also want to define
8807 \begin_inset Flex CharStyle:Code
8810 \begin_layout Plain Layout
8819 \begin_layout Description
8820 \begin_inset Flex CharStyle:Code
8823 \begin_layout Plain Layout
8830 \begin_inset CommandInset label
8832 name "des:FreeSpacing"
8839 \begin_inset Flex CharStyle:Code
8842 \begin_layout Plain Layout
8853 \begin_inset Flex CharStyle:Code
8856 \begin_layout Plain Layout
8862 ] Usually LyX doesn't allow you to insert more than one space between words,
8863 since a space is considered as the separation between two words, not a
8864 character or symbol of its own.
8865 This is a very fine thing but sometimes annoying, for example, when typing
8866 program code or plain LaTeX code.
8868 \begin_inset Flex CharStyle:Code
8871 \begin_layout Plain Layout
8878 Note that LyX will create protected blanks for the additional blanks when
8879 in another mode than LaTeX-mode.
8882 \begin_layout Description
8883 \begin_inset Flex CharStyle:Code
8886 \begin_layout Plain Layout
8893 \change_inserted 0 1223265565
8894 (Used only with XML-type formats.)
8899 \begin_layout Description
8900 \begin_inset Flex CharStyle:Code
8903 \begin_layout Plain Layout
8910 \begin_inset Flex CharStyle:Code
8913 \begin_layout Plain Layout
8919 If 1, marks the layout as being part of a title block (see also the
8920 \begin_inset Flex CharStyle:Code
8923 \begin_layout Plain Layout
8930 \begin_inset Flex CharStyle:Code
8933 \begin_layout Plain Layout
8942 \begin_layout Description
8943 \begin_inset Flex CharStyle:Code
8946 \begin_layout Plain Layout
8953 \begin_inset Flex CharStyle:Code
8956 \begin_layout Plain Layout
8962 ] This provides extra space between paragraphs that have the same layout.
8963 If you put other layouts into an environment, each is separated with the
8965 \begin_inset Flex CharStyle:Code
8968 \begin_layout Plain Layout
8975 But the whole items of the environment are additionally separated with
8977 \begin_inset Flex CharStyle:Code
8980 \begin_layout Plain Layout
8992 \begin_layout Description
8993 \begin_inset Flex CharStyle:Code
8996 \begin_layout Plain Layout
9003 \change_inserted 0 1223265576
9004 (Used only with XML-type formats.)
9009 \begin_layout Description
9010 \begin_inset Flex CharStyle:Code
9013 \begin_layout Plain Layout
9020 \begin_inset CommandInset label
9022 name "des:KeepEmpty"
9029 \begin_inset Flex CharStyle:Code
9032 \begin_layout Plain Layout
9043 \begin_inset Flex CharStyle:Code
9046 \begin_layout Plain Layout
9052 ] Usually LyX does not allow you to leave a paragraph empty, since it would
9053 lead to empty LaTeX output.
9054 There are some cases where this could be desirable however: in a letter
9055 template, the required fields can be provided as empty fields, so that
9056 people do not forget them; in some special classes, a layout can be used
9057 as some kind of break, which does not contain actual text.
9060 \begin_layout Description
9061 \begin_inset Flex CharStyle:Code
9064 \begin_layout Plain Layout
9070 [float=0] The vertical space between the label and the text body.
9071 Only used for labels that are above the text body (
9072 \begin_inset Flex CharStyle:Code
9075 \begin_layout Plain Layout
9082 \begin_inset Flex CharStyle:Code
9085 \begin_layout Plain Layout
9086 Centered_Top_Environment
9094 \begin_layout Description
9095 \begin_inset Flex CharStyle:Code
9098 \begin_layout Plain Layout
9105 \begin_inset Flex CharStyle:Code
9108 \begin_layout Plain Layout
9115 \begin_inset Newline newline
9118 The name of the counter for automatic numbering (see Section
9119 \begin_inset CommandInset ref
9121 reference "sec:counter"
9126 This must be given if
9127 \begin_inset Flex CharStyle:Code
9130 \begin_layout Plain Layout
9137 \begin_inset Flex CharStyle:Code
9140 \begin_layout Plain Layout
9149 \begin_layout Description
9150 \begin_inset Flex CharStyle:Code
9153 \begin_layout Plain Layout
9159 The font used for the label.
9161 \begin_inset space ~
9165 \begin_inset CommandInset ref
9167 reference "sec:fonts"
9172 \change_inserted 0 1223265124
9176 \begin_layout Description
9178 \change_inserted 0 1223265614
9179 \begin_inset Flex CharStyle:Code
9182 \begin_layout Plain Layout
9184 \change_inserted 0 1223265133
9192 Text that indicates how far a label should be indented.
9197 \begin_layout Description
9198 \begin_inset Flex CharStyle:Code
9201 \begin_layout Plain Layout
9208 \begin_inset Flex CharStyle:Code
9211 \begin_layout Plain Layout
9217 ] The horizontal space between the label and the text body.
9218 Only used for labels that are not above the text body.
9221 \begin_layout Description
9222 \begin_inset Flex CharStyle:Code
9225 \begin_layout Plain Layout
9232 \begin_inset Flex CharStyle:Code
9235 \begin_layout Plain Layout
9241 ] The string used for a label with a
9242 \begin_inset Flex CharStyle:Code
9245 \begin_layout Plain Layout
9253 \begin_inset Flex CharStyle:Code
9256 \begin_layout Plain Layout
9262 is set, this string can be contain the special formatting commands described
9264 \begin_inset CommandInset ref
9266 reference "sec:counter"
9274 \begin_layout Plain Layout
9275 For the sake of backwards compatibility, the string
9276 \begin_inset Flex CharStyle:Code
9279 \begin_layout Plain Layout
9289 will be replaced by the expanded
9290 \begin_inset Flex CharStyle:Code
9293 \begin_layout Plain Layout
9300 \begin_inset Flex CharStyle:Code
9303 \begin_layout Plain Layout
9312 This feature is now obsolete and should be replaced by the mechanisms of
9314 \begin_inset CommandInset ref
9316 reference "sec:counter"
9328 \begin_layout Description
9329 \begin_inset Flex CharStyle:Code
9332 \begin_layout Plain Layout
9339 \begin_inset Flex CharStyle:Code
9342 \begin_layout Plain Layout
9348 ] This is used inside the appendix instead of
9349 \begin_inset Flex CharStyle:Code
9352 \begin_layout Plain Layout
9360 \begin_inset Flex CharStyle:Code
9363 \begin_layout Plain Layout
9370 \begin_inset Flex CharStyle:Code
9373 \begin_layout Plain Layout
9380 \change_inserted 0 1223265160
9384 \begin_layout Description
9386 \change_inserted 0 1223265640
9387 \begin_inset Flex CharStyle:Code
9390 \begin_layout Plain Layout
9392 \change_inserted 0 1223265166
9400 [FIXME] (Used only with XML-type formats.)
9405 \begin_layout Description
9406 \begin_inset Flex CharStyle:Code
9409 \begin_layout Plain Layout
9416 \begin_inset Flex CharStyle:Code
9419 \begin_layout Plain Layout
9424 , Manual, Static, Top_Environment,
9425 \begin_inset Newline newline
9428 Centered_Top_Environment, Sensitive, Counter
9434 \begin_inset Newline newline
9438 \begin_inset Flex CharStyle:Code
9441 \begin_layout Plain Layout
9447 means the label is the very first word (up to the first real blank).
9451 \begin_layout Plain Layout
9452 Use protected spaces if you want more than one word as the label.
9458 \begin_inset Flex CharStyle:Code
9461 \begin_layout Plain Layout
9467 means it is defined in the layout (see
9468 \begin_inset Flex CharStyle:Code
9471 \begin_layout Plain Layout
9479 \begin_inset Flex CharStyle:Code
9482 \begin_layout Plain Layout
9489 \begin_inset Flex CharStyle:Code
9492 \begin_layout Plain Layout
9493 Centered_Top_Environment
9498 are special cases of
9499 \begin_inset Flex CharStyle:Code
9502 \begin_layout Plain Layout
9509 The label will be printed above the paragraph, but only at the top of an
9510 environment or the top of a chain of paragraphs with this layout.
9511 Usage is for example the
9512 \begin_inset Flex CharStyle:MenuItem
9515 \begin_layout Plain Layout
9522 \begin_inset Flex CharStyle:MenuItem
9525 \begin_layout Plain Layout
9532 This is also the case for
9533 \begin_inset Flex CharStyle:Code
9536 \begin_layout Plain Layout
9542 labels with latex type
9543 \begin_inset Flex CharStyle:Code
9546 \begin_layout Plain Layout
9552 , in order to make layouts for theorems work correctly.
9554 \begin_inset Flex CharStyle:Code
9557 \begin_layout Plain Layout
9563 is a special case for the caption-labels
9564 \begin_inset Quotes eld
9568 \begin_inset Quotes erd
9572 \begin_inset Quotes eld
9576 \begin_inset Quotes erd
9581 \begin_inset Flex CharStyle:Code
9584 \begin_layout Plain Layout
9590 means the (hardcoded) label string depends on the kind of float.
9592 \begin_inset Flex CharStyle:Code
9595 \begin_layout Plain Layout
9601 label type defines automatically numbered labels.
9603 \begin_inset CommandInset ref
9605 reference "sec:counter"
9612 \begin_layout Description
9614 \change_deleted 0 1223265792
9615 \begin_inset Flex CharStyle:Code
9618 \begin_layout Plain Layout
9627 \begin_layout Description
9629 \change_deleted 0 1223265792
9630 \begin_inset Flex CharStyle:Code
9633 \begin_layout Plain Layout
9642 \begin_layout Description
9643 \begin_inset Flex CharStyle:Code
9646 \begin_layout Plain Layout
9652 The name of the corresponding LaTeX stuff.
9653 Either the environment or command name.
9656 \begin_layout Description
9658 \change_deleted 0 1223265962
9659 \begin_inset Flex CharStyle:Code
9662 \begin_layout Plain Layout
9671 \begin_layout Description
9672 \begin_inset Flex CharStyle:Code
9675 \begin_layout Plain Layout
9681 An optional parameter for the corresponding
9682 \begin_inset Flex CharStyle:Code
9685 \begin_layout Plain Layout
9692 This parameter cannot be changed from within LyX.
9695 \begin_layout Description
9696 \begin_inset Flex CharStyle:Code
9699 \begin_layout Plain Layout
9706 \begin_inset CommandInset label
9708 name "des:LatexType"
9713 \begin_inset Flex CharStyle:Code
9716 \begin_layout Plain Layout
9721 , Command, Environment, Item_Environment,
9727 \begin_inset Flex CharStyle:Code
9730 \begin_layout Plain Layout
9736 ] How the layout should be translated into LaTeX.
9738 \begin_inset Flex CharStyle:Code
9741 \begin_layout Plain Layout
9747 means nothing special.
9749 \begin_inset Flex CharStyle:Code
9752 \begin_layout Plain Layout
9759 \begin_inset Flex CharStyle:Code
9762 \begin_layout Plain Layout
9769 {\SpecialChar \ldots{}
9776 \begin_inset Flex CharStyle:Code
9779 \begin_layout Plain Layout
9786 \begin_inset Flex CharStyle:Code
9789 \begin_layout Plain Layout
9796 }\SpecialChar \ldots{}
9810 \begin_inset Flex CharStyle:Code
9813 \begin_layout Plain Layout
9820 \begin_inset Flex CharStyle:Code
9823 \begin_layout Plain Layout
9830 \begin_inset Flex CharStyle:Code
9833 \begin_layout Plain Layout
9841 is generated for each paragraph of this environment.
9843 \begin_inset Flex CharStyle:Code
9846 \begin_layout Plain Layout
9853 \begin_inset Flex CharStyle:Code
9856 \begin_layout Plain Layout
9863 \begin_inset Flex CharStyle:Code
9866 \begin_layout Plain Layout
9872 is passed as an argument to the environment.
9874 \begin_inset Flex CharStyle:Code
9877 \begin_layout Plain Layout
9883 can be defined in the
9884 \begin_inset Flex CharStyle:MenuItem
9887 \begin_layout Plain Layout
9892 ayout\SpecialChar \menuseparator
9904 \begin_inset Flex CharStyle:Code
9907 \begin_layout Plain Layout
9915 is perhaps a bit misleading, since these rules apply to SGML classes, too.
9916 Visit the SGML class files for specific examples.
9919 \begin_layout Standard
9920 Putting the last few things together, the LaTeX output will be either:
9923 \begin_layout LyX-Code
9926 latexname[latexparam]{\SpecialChar \ldots{}
9930 \begin_layout Standard
9934 \begin_layout LyX-Code
9937 begin{latexname}[latexparam] \SpecialChar \ldots{}
9943 \begin_layout Standard
9944 depending upon the LaTex type.
9947 \begin_layout Description
9948 \begin_inset Flex CharStyle:Code
9951 \begin_layout Plain Layout
9958 \begin_inset Flex CharStyle:Code
9961 \begin_layout Plain Layout
9967 ] If you put layouts into environments, the leftmargins are not simply added,
9968 but added with a factor
9969 \begin_inset Formula $\frac{4}{depth+4}$
9973 Note that this parameter is also used when the margin is defined as
9974 \begin_inset Flex CharStyle:Code
9977 \begin_layout Plain Layout
9984 \begin_inset Flex CharStyle:Code
9987 \begin_layout Plain Layout
9994 Then it is added to the manual or dynamic margin.
9996 \begin_inset Newline newline
9999 The argument is passed as a string.
10001 \begin_inset Quotes eld
10005 \begin_inset Flex CharStyle:Code
10008 \begin_layout Plain Layout
10015 \begin_inset Quotes erd
10018 means that the paragraph is indented with the width of
10019 \begin_inset Quotes eld
10023 \begin_inset Flex CharStyle:Code
10026 \begin_layout Plain Layout
10033 \begin_inset Quotes erd
10036 in the normal font.
10037 You can get a negative width by prefixing the string with
10038 \begin_inset Quotes eld
10042 \begin_inset Flex CharStyle:Code
10045 \begin_layout Plain Layout
10052 \begin_inset Quotes erd
10056 This way was chosen so that the look is the same with each used screen
10061 \begin_layout Description
10062 \begin_inset Flex CharStyle:Code
10065 \begin_layout Plain Layout
10072 \begin_inset Flex CharStyle:Code
10075 \begin_layout Plain Layout
10080 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10086 \begin_inset Newline newline
10089 The kind of margin that the layout has on the left side.
10091 \begin_inset Flex CharStyle:Code
10094 \begin_layout Plain Layout
10100 just means a fixed margin.
10102 \begin_inset Flex CharStyle:Code
10105 \begin_layout Plain Layout
10111 means that the left margin depends on the string entered in the
10112 \begin_inset Flex CharStyle:MenuItem
10115 \begin_layout Plain Layout
10120 dit\SpecialChar \menuseparator
10126 \begin_inset space ~
10135 This is used to typeset nice lists without tabulators.
10137 \begin_inset Flex CharStyle:Code
10140 \begin_layout Plain Layout
10146 means that the margin depends on the size of the label.
10147 This is used for automatic enumerated headlines.
10148 It is obvious that the headline
10149 \begin_inset Quotes eld
10152 5.4.3.2.1 Very long headline
10153 \begin_inset Quotes erd
10156 must have a wider left margin (as wide as
10157 \begin_inset Quotes eld
10161 \begin_inset Quotes erd
10164 plus the space) than
10165 \begin_inset Quotes eld
10168 3.2 Very long headline
10169 \begin_inset Quotes erd
10173 \begin_inset Quotes eld
10177 \begin_inset Quotes erd
10180 are not able to do this.
10182 \begin_inset Flex CharStyle:Code
10185 \begin_layout Plain Layout
10191 is similar, but only the very first row of the paragraph is dynamic, while
10192 the others are static; this is used, for example, for descriptions.
10194 \begin_inset Flex CharStyle:Code
10197 \begin_layout Plain Layout
10203 means the margin is chosen in a way that the longest row of this paragraph
10204 fits to the right margin.
10205 This is used to typeset an address on the right edge of the page.
10208 \begin_layout Description
10209 \begin_inset Flex CharStyle:Code
10212 \begin_layout Plain Layout
10219 \begin_inset Flex CharStyle:Code
10222 \begin_layout Plain Layout
10231 \begin_inset Flex CharStyle:Code
10234 \begin_layout Plain Layout
10240 ] Whether fragile commands in this layout should be
10241 \begin_inset Flex CharStyle:Code
10244 \begin_layout Plain Layout
10257 whether this command should itself be protected.)
10260 \begin_layout Description
10261 \begin_inset Flex CharStyle:Code
10264 \begin_layout Plain Layout
10271 \begin_inset Flex CharStyle:Code
10274 \begin_layout Plain Layout
10281 \begin_inset Flex CharStyle:Code
10284 \begin_layout Plain Layout
10292 ] Whether newlines are translated into LaTeX newlines (
10293 \begin_inset Flex CharStyle:Code
10296 \begin_layout Plain Layout
10307 The translation can be switched off to allow more comfortable LaTeX editing
10311 \begin_layout Description
10312 \begin_inset Flex CharStyle:Code
10315 \begin_layout Plain Layout
10322 \begin_inset Flex CharStyle:Code
10325 \begin_layout Plain Layout
10332 \begin_inset Flex CharStyle:Code
10335 \begin_layout Plain Layout
10343 ] Whether the following Paragraph is allowed to indent its very first row.
10345 \begin_inset Flex CharStyle:Code
10348 \begin_layout Plain Layout
10354 means that it is not allowed to do so;
10355 \begin_inset Flex CharStyle:Code
10358 \begin_layout Plain Layout
10364 means it could do so if it wants to.
10367 \begin_layout Description
10368 \begin_inset Flex CharStyle:Code
10371 \begin_layout Plain Layout
10378 \change_deleted 0 1223265997
10380 \change_inserted 0 1223266000
10381 Name of a layout that has replaced this layout.
10382 This is used to rename a layout, while keeping backward compatibility.
10387 \begin_layout Description
10388 \begin_inset Flex CharStyle:Code
10391 \begin_layout Plain Layout
10398 \begin_inset Flex CharStyle:Code
10401 \begin_layout Plain Layout
10407 ] The number of optional arguments that can be used with this layout.
10408 This is useful for things like section headings, and only makes sense with
10412 \begin_layout Description
10413 \begin_inset Flex CharStyle:Code
10416 \begin_layout Plain Layout
10423 \begin_inset Flex CharStyle:Code
10426 \begin_layout Plain Layout
10432 ] The indent of the very first line of a paragraph.
10434 \begin_inset Flex CharStyle:Code
10437 \begin_layout Plain Layout
10443 will be fixed for a certain layout.
10444 The exception is Standard layout, since the indentation of a Standard layout
10445 paragraph can be prohibited with
10446 \begin_inset Flex CharStyle:Code
10449 \begin_layout Plain Layout
10456 Also, Standard layout paragraphs inside environments use the
10457 \begin_inset Flex CharStyle:Code
10460 \begin_layout Plain Layout
10466 of the environment, not their native one.
10467 For example, Standard paragraphs inside an enumeration are not indented.
10470 \begin_layout Description
10471 \begin_inset Flex CharStyle:Code
10474 \begin_layout Plain Layout
10481 \begin_inset Flex CharStyle:Code
10484 \begin_layout Plain Layout
10490 ] The vertical space between two paragraphs of this layout.
10493 \begin_layout Description
10494 \begin_inset Flex CharStyle:Code
10497 \begin_layout Plain Layout
10504 \begin_inset Flex CharStyle:Code
10507 \begin_layout Plain Layout
10513 ] LyX allows the user to choose either
10514 \begin_inset Quotes eld
10518 \begin_inset Quotes erd
10522 \begin_inset Quotes eld
10526 \begin_inset Quotes erd
10529 to typeset a document.
10531 \begin_inset Quotes eld
10535 \begin_inset Quotes erd
10538 is chosen, this value is completely ignored.
10540 \begin_inset Quotes eld
10544 \begin_inset Quotes erd
10547 is chosen, the parindent of a LaTeXtype
10548 \begin_inset Quotes eld
10552 \begin_inset Quotes erd
10555 layout is ignored and all paragraphs are separated by this parskip argument.
10556 The vertical space is calculated with
10557 \begin_inset Flex CharStyle:Code
10560 \begin_layout Plain Layout
10562 \begin_inset space ~
10571 \begin_inset Flex CharStyle:Code
10574 \begin_layout Plain Layout
10580 is the height of a row with the normal font.
10581 This way, the look stays the same with different screen fonts.
10584 \begin_layout Description
10585 \begin_inset Flex CharStyle:Code
10588 \begin_layout Plain Layout
10595 \change_inserted 0 1223264275
10597 \begin_inset CommandInset label
10599 name "des:PathThru"
10608 \begin_inset Flex CharStyle:Code
10611 \begin_layout Plain Layout
10622 \begin_inset Flex CharStyle:Code
10625 \begin_layout Plain Layout
10631 ] Whether the contents of this paragraph should be output in raw form, meaning
10632 without special translations that LaTeX would require.
10635 \begin_layout Description
10636 \begin_inset Flex CharStyle:Code
10639 \begin_layout Plain Layout
10646 \begin_inset CommandInset label
10648 name "des:Preamble"
10652 Information to be included in the LaTeX preamable when this style is used.
10653 Used to define macros, load packages, etc., required by this particular
10656 \begin_inset Quotes eld
10660 \begin_inset Flex CharStyle:Code
10663 \begin_layout Plain Layout
10670 \begin_inset Quotes erd
10676 \begin_layout Description
10677 \begin_inset Flex CharStyle:Code
10680 \begin_layout Plain Layout
10687 \begin_inset Flex CharStyle:Code
10690 \begin_layout Plain Layout
10697 \begin_inset CommandInset label
10699 name "des:Requires"
10703 Whether the layout requires the feature
10704 \begin_inset Flex CharStyle:Code
10707 \begin_layout Plain Layout
10714 See the description of
10715 \begin_inset Flex CharStyle:Code
10718 \begin_layout Plain Layout
10725 \begin_inset CommandInset ref
10726 LatexCommand pageref
10727 reference "des:FreeSpacing"
10731 ) for information on `features'.
10735 \begin_layout Description
10736 \begin_inset Flex CharStyle:Code
10739 \begin_layout Plain Layout
10746 \begin_inset Flex CharStyle:Code
10749 \begin_layout Plain Layout
10756 \begin_inset Flex CharStyle:Code
10759 \begin_layout Plain Layout
10768 \begin_layout Description
10769 \begin_inset Flex CharStyle:Code
10772 \begin_layout Plain Layout
10779 \begin_inset Flex CharStyle:Code
10782 \begin_layout Plain Layout
10787 , onehalf, double, other
10796 ] This defines what the default spacing should be in the layout.
10798 \begin_inset Flex CharStyle:Code
10801 \begin_layout Plain Layout
10808 \begin_inset Flex CharStyle:Code
10811 \begin_layout Plain Layout
10818 \begin_inset Flex CharStyle:Code
10821 \begin_layout Plain Layout
10827 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
10828 If you specify the argument
10829 \begin_inset Flex CharStyle:Code
10832 \begin_layout Plain Layout
10838 , then you should also provide a numerical argument which will be the actual
10840 Note that, contrary to other parameters,
10841 \begin_inset Flex CharStyle:Code
10844 \begin_layout Plain Layout
10850 implies the generation of specific LaTeX code, using the package
10853 \begin_inset Flex CharStyle:Code
10856 \begin_layout Plain Layout
10865 \begin_layout Description
10866 \begin_inset Flex CharStyle:Code
10869 \begin_layout Plain Layout
10875 The font used for the text body .
10877 \begin_inset CommandInset ref
10879 reference "sec:fonts"
10886 \begin_layout Description
10888 \change_deleted 0 1223265258
10892 \begin_inset Flex CharStyle:Code
10895 \begin_layout Plain Layout
10903 The level of the style in the table of contents.
10904 This is used for automatic numbering of section headings.
10907 \begin_layout Description
10908 \begin_inset Flex CharStyle:Code
10911 \begin_layout Plain Layout
10918 \begin_inset Flex CharStyle:Code
10921 \begin_layout Plain Layout
10927 ] The vertical space with which the very first of a chain of paragraphs
10928 with this layout is separated from the previous paragraph.
10929 If the previous paragraph has another layout, the separations are not simply
10930 added, but the maximum is taken.
10933 \begin_layout Subsection
10937 \begin_layout Standard
10938 \begin_inset CommandInset label
10944 Since version 1.3.0 of LyX, it is has been both possible and necessary to
10945 define the floats (
10946 \begin_inset Flex CharStyle:MenuItem
10949 \begin_layout Plain Layout
10956 \begin_inset Flex CharStyle:MenuItem
10959 \begin_layout Plain Layout
10965 , \SpecialChar \ldots{}
10966 ) in the text class itself.
10967 Standard floats are included in the file
10968 \begin_inset Flex CharStyle:Code
10971 \begin_layout Plain Layout
10977 , so you may have to do no more than add
10980 \begin_layout LyX-Code
10981 Input stdfloats.inc
10984 \begin_layout Standard
10985 to your layout file.
10986 If you want to implement a text class that proposes some other float types
10987 (like the AGU class bundled with LyX), the information below will hopefully
10991 \begin_layout Description
10992 \begin_inset Flex CharStyle:Code
10995 \begin_layout Plain Layout
11002 \begin_inset Flex CharStyle:Code
11005 \begin_layout Plain Layout
11012 \begin_inset Quotes erd
11016 \begin_inset Quotes erd
11019 ] The file name extension of an auxiliary file for the list of figures (or
11021 LaTeX writes the captions to this file.
11024 \begin_layout Description
11025 \begin_inset Flex CharStyle:Code
11028 \begin_layout Plain Layout
11035 \begin_inset Flex CharStyle:Code
11038 \begin_layout Plain Layout
11045 \begin_inset Quotes erd
11049 \begin_inset Quotes erd
11052 ] The string that will be used in the menus and also for the caption.
11055 \begin_layout Description
11056 \begin_inset Flex CharStyle:Code
11059 \begin_layout Plain Layout
11066 \begin_inset Flex CharStyle:Code
11069 \begin_layout Plain Layout
11078 \begin_inset Flex CharStyle:Code
11081 \begin_layout Plain Layout
11088 \begin_inset Flex CharStyle:Code
11091 \begin_layout Plain Layout
11097 if the float is already defined by the LaTeX document class.
11099 \begin_inset Flex CharStyle:Code
11102 \begin_layout Plain Layout
11108 , the float will be defined using the LaTeX package
11109 \begin_inset Flex CharStyle:Code
11112 \begin_layout Plain Layout
11121 \begin_layout Description
11122 \begin_inset Flex CharStyle:Code
11125 \begin_layout Plain Layout
11132 \begin_inset Flex CharStyle:Code
11135 \begin_layout Plain Layout
11142 \begin_inset Quotes erd
11146 \begin_inset Quotes erd
11149 ] The heading used for the list of floats.
11152 \begin_layout Description
11153 \begin_inset Flex CharStyle:Code
11156 \begin_layout Plain Layout
11163 \begin_inset Flex CharStyle:Code
11166 \begin_layout Plain Layout
11173 \begin_inset Quotes erd
11177 \begin_inset Quotes erd
11180 ] This (optional) argument determines whether floats of this class will
11181 be numbered within some sectional unit of the document.
11182 For example, if within is equal to
11183 \begin_inset Flex CharStyle:Code
11186 \begin_layout Plain Layout
11192 , the floats will be numbered within chapters.
11196 \begin_layout Description
11197 \begin_inset Flex CharStyle:Code
11200 \begin_layout Plain Layout
11207 \begin_inset Flex CharStyle:Code
11210 \begin_layout Plain Layout
11217 \begin_inset Quotes erd
11221 \begin_inset Quotes erd
11224 ] The default placement for the given class of floats.
11225 The string should be as in standard LaTeX:
11226 \begin_inset Flex CharStyle:Code
11229 \begin_layout Plain Layout
11236 \begin_inset Flex CharStyle:Code
11239 \begin_layout Plain Layout
11246 \begin_inset Flex CharStyle:Code
11249 \begin_layout Plain Layout
11256 \begin_inset Flex CharStyle:Code
11259 \begin_layout Plain Layout
11265 for top, bottom, page, and here, respectively.
11269 \begin_layout Plain Layout
11270 Note that the order of these letters in the string is irrelevant, like in
11276 On top of that there is a new type,
11277 \begin_inset Flex CharStyle:Code
11280 \begin_layout Plain Layout
11286 , which does not really correspond to a float, since it means: put it
11287 \begin_inset Quotes eld
11291 \begin_inset Quotes erd
11295 Note however that the
11296 \begin_inset Flex CharStyle:Code
11299 \begin_layout Plain Layout
11305 specifier is special and, because of implementation details, cannot be
11306 used in non-builtin float types.
11307 If you do not understand what this means, just use
11308 \begin_inset Quotes eld
11312 \begin_inset Flex CharStyle:Code
11315 \begin_layout Plain Layout
11322 \begin_inset Quotes erd
11328 \begin_layout Description
11329 \begin_inset Flex CharStyle:Code
11332 \begin_layout Plain Layout
11339 \begin_inset Flex CharStyle:Code
11342 \begin_layout Plain Layout
11349 \begin_inset Quotes erd
11353 \begin_inset Quotes erd
11356 ] The style used when defining the float using
11357 \begin_inset Flex CharStyle:Code
11360 \begin_layout Plain Layout
11371 \begin_layout Description
11372 \begin_inset Flex CharStyle:Code
11375 \begin_layout Plain Layout
11382 \begin_inset Flex CharStyle:Code
11385 \begin_layout Plain Layout
11392 \begin_inset Quotes erd
11396 \begin_inset Quotes erd
11400 \begin_inset Quotes eld
11404 \begin_inset Quotes erd
11407 of the new class of floats, like program or algorithm.
11408 After the appropriate
11409 \begin_inset Flex CharStyle:Code
11412 \begin_layout Plain Layout
11421 \begin_inset Flex CharStyle:Code
11424 \begin_layout Plain Layout
11433 \begin_inset Flex CharStyle:Code
11436 \begin_layout Plain Layout
11447 \begin_layout Standard
11448 Note that defining a float with type
11449 \begin_inset Flex CharStyle:Code
11452 \begin_layout Plain Layout
11460 automatically defines the corresponding counter with name
11461 \begin_inset Flex CharStyle:Code
11464 \begin_layout Plain Layout
11475 \begin_layout Subsection
11476 Inset layouts and Flex insets
11479 \begin_layout Standard
11480 \begin_inset CommandInset label
11482 name "sec:charstyle"
11486 LyX has supported character styles since version 1.4.0; since version 1.6.0
11487 these are called Flex insets.
11491 \begin_layout Standard
11492 Furthermore, it is possible to define the general layout of many different
11494 Currently, InsetLayout can be used to customize the layout parameters
11495 for footnotes, marginal notes, note insets, ERT insets, branches, listings,
11496 indexes, boxes, tables, algorithms, URLs, and optional arguments, as well
11501 \begin_layout Standard
11502 Flex insets come in three different kinds:
11505 \begin_layout Itemize
11507 \begin_inset Flex CharStyle:Code
11510 \begin_layout Plain Layout
11516 ): These define semantic markup corresponding to such LaTeX commands as
11518 \begin_inset Flex CharStyle:Code
11521 \begin_layout Plain Layout
11530 \begin_inset Flex CharStyle:Code
11533 \begin_layout Plain Layout
11544 \begin_layout Itemize
11546 \begin_inset Flex CharStyle:Code
11549 \begin_layout Plain Layout
11555 ): These can be used to define custom collapsable insets, similar to ERT,
11556 footnote, and the like.
11559 \begin_layout Itemize
11561 \begin_inset Flex CharStyle:Code
11564 \begin_layout Plain Layout
11570 ): For use with DocBook classes.
11573 \begin_layout Standard
11575 \begin_inset Flex CharStyle:Code
11578 \begin_layout Plain Layout
11584 definition starting line is of the form
11587 \begin_layout LyX-Code
11588 InsetLayout <Type> <Name>
11591 \begin_layout Standard
11593 \begin_inset Flex CharStyle:Code
11596 \begin_layout Plain Layout
11603 \begin_inset Flex CharStyle:Code
11606 \begin_layout Plain Layout
11613 \begin_inset Flex CharStyle:Code
11616 \begin_layout Plain Layout
11623 \begin_inset Flex CharStyle:Code
11626 \begin_layout Plain Layout
11633 \begin_inset Flex CharStyle:Code
11636 \begin_layout Plain Layout
11643 \begin_inset Flex CharStyle:Code
11646 \begin_layout Plain Layout
11653 \begin_inset Flex CharStyle:Code
11656 \begin_layout Plain Layout
11663 \begin_inset Flex CharStyle:Code
11666 \begin_layout Plain Layout
11673 \begin_inset Flex CharStyle:Code
11676 \begin_layout Plain Layout
11683 \begin_inset Flex CharStyle:Code
11686 \begin_layout Plain Layout
11693 \begin_inset Flex CharStyle:Code
11696 \begin_layout Plain Layout
11703 \begin_inset Flex CharStyle:Code
11706 \begin_layout Plain Layout
11713 \begin_inset Flex CharStyle:Code
11716 \begin_layout Plain Layout
11723 \begin_inset Flex CharStyle:Code
11726 \begin_layout Plain Layout
11733 \begin_inset Flex CharStyle:Code
11736 \begin_layout Plain Layout
11743 \begin_inset Flex CharStyle:Code
11746 \begin_layout Plain Layout
11753 \begin_inset Flex CharStyle:Code
11756 \begin_layout Plain Layout
11764 \begin_inset Flex CharStyle:Code
11767 \begin_layout Plain Layout
11774 \begin_inset Flex CharStyle:Code
11777 \begin_layout Plain Layout
11784 \begin_inset Flex CharStyle:Code
11787 \begin_layout Plain Layout
11793 should have the form
11794 \begin_inset Flex CharStyle:Code
11797 \begin_layout Plain Layout
11804 \begin_inset Flex CharStyle:Code
11807 \begin_layout Plain Layout
11814 \begin_inset Flex CharStyle:Code
11817 \begin_layout Plain Layout
11824 \begin_inset Flex CharStyle:Code
11827 \begin_layout Plain Layout
11834 \begin_inset Flex CharStyle:Code
11837 \begin_layout Plain Layout
11844 \begin_inset Flex CharStyle:Code
11847 \begin_layout Plain Layout
11853 is any valid identifier.
11857 \begin_layout Standard
11859 \begin_inset Flex CharStyle:Code
11862 \begin_layout Plain Layout
11868 section can contain the following entries:
11871 \begin_layout Description
11872 \begin_inset Flex CharStyle:Code
11875 \begin_layout Plain Layout
11881 The color for the inset's background.
11882 These valid colors are defined in
11883 \begin_inset Flex CharStyle:Code
11886 \begin_layout Plain Layout
11895 \begin_layout Description
11896 \begin_inset Flex CharStyle:Code
11899 \begin_layout Plain Layout
11905 As with paragraph styles (see page
11906 \begin_inset CommandInset ref
11908 reference "des:CopyStyle"
11913 \change_inserted 0 1223263809
11917 \begin_layout Description
11919 \change_inserted 0 1223263872
11920 \begin_inset Flex CharStyle:Code
11923 \begin_layout Plain Layout
11925 \change_inserted 0 1223263814
11932 \begin_inset Flex CharStyle:Code
11935 \begin_layout Plain Layout
11937 \change_inserted 0 1223263839
11946 \begin_inset Flex CharStyle:Code
11949 \begin_layout Plain Layout
11951 \change_inserted 0 1223263839
11957 ] Indicates whether the user may employ the Paragraph Settings dialog to
11958 customize the paragraph.
11963 \begin_layout Description
11964 \begin_inset Flex CharStyle:Code
11967 \begin_layout Plain Layout
11974 \begin_inset Flex CharStyle:Code
11977 \begin_layout Plain Layout
11984 \begin_inset Flex CharStyle:Code
11987 \begin_layout Plain Layout
11994 \begin_inset Flex CharStyle:Code
11997 \begin_layout Plain Layout
12003 , describing the rendering style used for the inset's frame and buttons.
12004 Footnotes generally use
12005 \begin_inset Flex CharStyle:Code
12008 \begin_layout Plain Layout
12014 ; ERT insets generally use
12015 \begin_inset Flex CharStyle:Code
12018 \begin_layout Plain Layout
12024 ; and character styles use
12025 \begin_inset Flex CharStyle:Code
12028 \begin_layout Plain Layout
12035 \change_inserted 0 1223264047
12039 \begin_layout Description
12041 \change_inserted 0 1223264091
12042 \begin_inset Flex CharStyle:Code
12045 \begin_layout Plain Layout
12047 \change_inserted 0 1223264053
12055 Required at the end of the InsetLayout declarations.
12060 \begin_layout Description
12061 \begin_inset Flex CharStyle:Code
12064 \begin_layout Plain Layout
12070 The font used for both the text body
12076 \begin_inset space ~
12080 \begin_inset CommandInset ref
12082 reference "sec:fonts"
12087 Note that defining this font automatically defines the
12088 \begin_inset Flex CharStyle:Code
12091 \begin_layout Plain Layout
12097 to the same value, so define this first and define
12098 \begin_inset Flex CharStyle:Code
12101 \begin_layout Plain Layout
12107 later if you want them to be different.
12110 \begin_layout Description
12111 \begin_inset Flex CharStyle:Code
12114 \begin_layout Plain Layout
12121 \change_inserted 0 1223263904
12125 \begin_layout Description
12127 \change_inserted 0 1223263954
12128 \begin_inset Flex CharStyle:Code
12131 \begin_layout Plain Layout
12133 \change_inserted 0 1223263911
12142 \begin_inset Flex CharStyle:Code
12145 \begin_layout Plain Layout
12147 \change_inserted 0 1223263915
12156 \begin_inset Flex CharStyle:Code
12159 \begin_layout Plain Layout
12161 \change_inserted 0 1223263915
12167 ] Indicates whether the PlainLayout should be used or, instead, the user
12168 can change the paragraph style used in the inset.
12173 \begin_layout Description
12174 \begin_inset Flex CharStyle:Code
12177 \begin_layout Plain Layout
12183 As with paragraph styles (see page
12184 \begin_inset CommandInset ref
12185 LatexCommand pageref
12186 reference "des:FreeSpacing"
12193 \begin_layout Description
12194 \begin_inset Flex CharStyle:Code
12197 \begin_layout Plain Layout
12203 As with paragraph styles (see page
12204 \begin_inset CommandInset ref
12205 LatexCommand pageref
12206 reference "des:KeepEmpty"
12213 \begin_layout Description
12215 \change_deleted 0 1223264111
12216 \begin_inset Flex CharStyle:Code
12219 \begin_layout Plain Layout
12225 What will be displayed on the button or elsewhere as the inset label.
12226 Some inset types (ERT and Branch) modify this label on the fly.
12229 \begin_layout Description
12230 \begin_inset Flex CharStyle:Code
12233 \begin_layout Plain Layout
12239 The font used for the label.
12241 \begin_inset space ~
12245 \begin_inset CommandInset ref
12247 reference "sec:fonts"
12252 Note that this definition can never appear before
12253 \begin_inset Flex CharStyle:Code
12256 \begin_layout Plain Layout
12262 , lest it be ineffective.
12265 \begin_layout Description
12267 \change_inserted 0 1223264113
12268 \begin_inset Flex CharStyle:Code
12271 \begin_layout Plain Layout
12273 \change_inserted 0 1223264113
12279 What will be displayed on the button or elsewhere as the inset label.
12280 Some inset types (ERT and Branch) modify this label on the fly.
12283 \begin_layout Description
12284 \begin_inset Flex CharStyle:Code
12287 \begin_layout Plain Layout
12293 The name of the corresponding LaTeX stuff.
12294 Either the environment or command name.
12297 \begin_layout Description
12298 \begin_inset Flex CharStyle:Code
12301 \begin_layout Plain Layout
12307 The optional parameter for the corresponding
12308 \begin_inset Flex CharStyle:Code
12311 \begin_layout Plain Layout
12317 stuff, including possible bracket pairs like
12318 \begin_inset Flex CharStyle:Code
12321 \begin_layout Plain Layout
12328 This parameter cannot be changed from within LyX.
12331 \begin_layout Description
12332 \begin_inset Flex CharStyle:Code
12335 \begin_layout Plain Layout
12341 As with paragraph styles (see page
12342 \begin_inset CommandInset ref
12343 LatexCommand pageref
12344 reference "des:LatexType"
12351 \begin_layout Description
12352 \begin_inset Flex CharStyle:Code
12355 \begin_layout Plain Layout
12362 \begin_inset Flex CharStyle:Code
12365 \begin_layout Plain Layout
12372 \begin_inset Flex CharStyle:Code
12375 \begin_layout Plain Layout
12382 \begin_inset Flex CharStyle:Code
12385 \begin_layout Plain Layout
12392 \begin_inset Flex CharStyle:Code
12395 \begin_layout Plain Layout
12401 (indicating a dummy definition ending definitions of charstyles etc.).
12402 This entry is only meaningful for Flex (user definable) insets.
12403 \change_inserted 0 1223264124
12407 \begin_layout Description
12409 \change_inserted 0 1223264224
12410 \begin_inset Flex CharStyle:Code
12413 \begin_layout Plain Layout
12415 \change_inserted 0 1223264131
12424 \begin_inset Flex CharStyle:Code
12427 \begin_layout Plain Layout
12429 \change_inserted 0 1223264137
12438 \begin_inset Flex CharStyle:Code
12441 \begin_layout Plain Layout
12443 \change_inserted 0 1223264137
12449 ] Whether multiple paragraphs are permitted in this inset.
12450 This will also set CustomPars to the same value and ForcePlain to the opposite
12452 These can be reset to other values, if they are used
12461 \begin_layout Description
12462 \begin_inset Flex CharStyle:Code
12465 \begin_layout Plain Layout
12472 \begin_inset Flex CharStyle:Code
12475 \begin_layout Plain Layout
12484 \begin_inset Flex CharStyle:Code
12487 \begin_layout Plain Layout
12493 ] Whether fragile commands in this layout should be
12494 \begin_inset Flex CharStyle:Code
12497 \begin_layout Plain Layout
12510 whether this command should itself be protected.)
12511 \change_inserted 0 1223264245
12515 \begin_layout Description
12517 \change_inserted 0 1223264288
12518 \begin_inset Flex CharStyle:Code
12521 \begin_layout Plain Layout
12523 \change_inserted 0 1223264250
12532 \begin_inset Flex CharStyle:Code
12535 \begin_layout Plain Layout
12537 \change_inserted 0 1223264254
12546 \begin_inset Flex CharStyle:Code
12549 \begin_layout Plain Layout
12551 \change_inserted 0 1223264254
12557 ] As with paragraph styles (see page
12558 \begin_inset CommandInset ref
12560 reference "des:PathThru"
12569 \begin_layout Description
12570 \begin_inset Flex CharStyle:Code
12573 \begin_layout Plain Layout
12579 As with paragraph styles (see page
12580 \begin_inset CommandInset ref
12581 LatexCommand pageref
12582 reference "des:Preamble"
12589 \begin_layout Description
12590 \begin_inset Flex CharStyle:Code
12593 \begin_layout Plain Layout
12600 \begin_inset Flex CharStyle:Code
12603 \begin_layout Plain Layout
12609 ] As with paragraph styles (see page
12610 \begin_inset CommandInset ref
12611 LatexCommand pageref
12612 reference "des:Requires"
12619 \begin_layout Subsection
12623 \begin_layout Standard
12624 \begin_inset CommandInset label
12630 Since version 1.3.0 of LyX, it is both possible and necessary to define the
12632 \begin_inset Flex CharStyle:MenuItem
12635 \begin_layout Plain Layout
12642 \begin_inset Flex CharStyle:MenuItem
12645 \begin_layout Plain Layout
12651 , \SpecialChar \ldots{}
12652 ) in the text class itself.
12653 The standard counters are defined in the file
12654 \begin_inset Flex CharStyle:Code
12657 \begin_layout Plain Layout
12663 , so you may have to do no more than add
12666 \begin_layout LyX-Code
12667 Input stdcounters.inc
12670 \begin_layout Standard
12671 to your layout file to get them to work.
12672 But if you want to define custom counters, then you can do so, using the
12673 following parameters:
12676 \begin_layout Description
12677 \begin_inset Flex CharStyle:Code
12680 \begin_layout Plain Layout
12681 LabelString [string=""]
12686 when this is defined, this string defines how the counter is displayed.
12687 Setting this value sets
12688 \begin_inset Flex CharStyle:Code
12691 \begin_layout Plain Layout
12692 LabelStringAppendix
12698 The following special constructs can be used in the string:
12702 \begin_layout Itemize
12703 \begin_inset Flex CharStyle:Code
12706 \begin_layout Plain Layout
12714 will be replaced by the expansion of the
12715 \begin_inset Flex CharStyle:Code
12718 \begin_layout Plain Layout
12725 \begin_inset Flex CharStyle:Code
12728 \begin_layout Plain Layout
12729 LabelStringAppendix
12735 \begin_inset Flex CharStyle:Code
12738 \begin_layout Plain Layout
12748 \begin_layout Itemize
12749 counter values can be expressed using LaTeX-like macros
12750 \begin_inset Flex CharStyle:Code
12753 \begin_layout Plain Layout
12770 \begin_inset Flex CharStyle:Code
12773 \begin_layout Plain Layout
12785 \begin_layout Plain Layout
12795 Actually, the situation is a bit more complicated: any
12814 other than those descibed below will produce arabic numerals.
12815 It would not be surprising to see this change in the future.
12821 \begin_inset Flex CharStyle:Code
12824 \begin_layout Plain Layout
12830 : 1, 2, 3,\SpecialChar \ldots{}
12832 \begin_inset Flex CharStyle:Code
12835 \begin_layout Plain Layout
12841 for lower-case letters: a, b, c, \SpecialChar \ldots{}
12843 \begin_inset Flex CharStyle:Code
12846 \begin_layout Plain Layout
12852 for upper-case letters: A, B, C, \SpecialChar \ldots{}
12854 \begin_inset Flex CharStyle:Code
12857 \begin_layout Plain Layout
12863 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
12865 \begin_inset Flex CharStyle:Code
12868 \begin_layout Plain Layout
12874 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
12876 \begin_inset Flex CharStyle:Code
12879 \begin_layout Plain Layout
12885 for hebrew numerals.
12889 \begin_layout Standard
12890 If LabelString is not defined, a default value is constructed as follows:
12891 if the counter has a master counter
12892 \begin_inset Flex CharStyle:Code
12895 \begin_layout Plain Layout
12902 \begin_inset Flex CharStyle:Code
12905 \begin_layout Plain Layout
12912 \begin_inset Flex CharStyle:Code
12915 \begin_layout Plain Layout
12925 is used; otherwise the string
12926 \begin_inset Flex CharStyle:Code
12929 \begin_layout Plain Layout
12940 \begin_layout Description
12941 \begin_inset Flex CharStyle:Code
12944 \begin_layout Plain Layout
12945 LabelStringAppendix [string=""]
12951 \begin_inset Flex CharStyle:Code
12954 \begin_layout Plain Layout
12963 \begin_layout Description
12964 \begin_inset Flex CharStyle:Code
12967 \begin_layout Plain Layout
12974 \begin_inset Flex CharStyle:Code
12977 \begin_layout Plain Layout
12984 \begin_inset Quotes erd
12988 \begin_inset Quotes erd
12991 ] The name of the counter.
12994 \begin_layout Description
12995 \begin_inset Flex CharStyle:Code
12998 \begin_layout Plain Layout
13005 \begin_inset Flex CharStyle:Code
13008 \begin_layout Plain Layout
13015 \begin_inset Quotes erd
13019 \begin_inset Quotes erd
13022 ] If this is set to the name of another counter, the present counter will
13023 be reset everytime the other one is increased.
13025 \begin_inset Flex CharStyle:Code
13028 \begin_layout Plain Layout
13035 \begin_inset Flex CharStyle:Code
13038 \begin_layout Plain Layout
13047 \begin_layout Subsection
13051 \begin_layout Standard
13052 \begin_inset CommandInset label
13058 A font description looks like this:
13061 \begin_layout LyX-Code
13071 \begin_layout LyX-Code
13075 \begin_layout LyX-Code
13079 \begin_layout Standard
13080 The following commands are available:
13083 \begin_layout Description
13084 \begin_inset Flex CharStyle:Code
13087 \begin_layout Plain Layout
13094 \begin_inset Flex CharStyle:Code
13097 \begin_layout Plain Layout
13106 \begin_inset Flex CharStyle:Code
13109 \begin_layout Plain Layout
13116 \begin_inset Flex CharStyle:Code
13119 \begin_layout Plain Layout
13126 \begin_inset Flex CharStyle:Code
13129 \begin_layout Plain Layout
13136 \begin_inset Flex CharStyle:Code
13139 \begin_layout Plain Layout
13146 \begin_inset Flex CharStyle:Code
13149 \begin_layout Plain Layout
13156 \begin_inset Flex CharStyle:Code
13159 \begin_layout Plain Layout
13166 \begin_inset Flex CharStyle:Code
13169 \begin_layout Plain Layout
13176 \begin_inset Flex CharStyle:Code
13179 \begin_layout Plain Layout
13188 \begin_layout Description
13189 \begin_inset Flex CharStyle:Code
13192 \begin_layout Plain Layout
13201 \begin_inset Flex CharStyle:Code
13204 \begin_layout Plain Layout
13215 \begin_inset Flex CharStyle:Code
13218 \begin_layout Plain Layout
13225 \begin_inset Flex CharStyle:Code
13228 \begin_layout Plain Layout
13237 \begin_layout Description
13238 \begin_inset Flex CharStyle:Code
13241 \begin_layout Plain Layout
13248 \begin_inset Flex CharStyle:Code
13251 \begin_layout Plain Layout
13257 ] Valid argument sare:
13258 \begin_inset Flex CharStyle:Code
13261 \begin_layout Plain Layout
13268 \begin_inset Flex CharStyle:Code
13271 \begin_layout Plain Layout
13278 \begin_inset Flex CharStyle:Code
13281 \begin_layout Plain Layout
13288 \begin_inset Flex CharStyle:Code
13291 \begin_layout Plain Layout
13298 \begin_inset Flex CharStyle:Code
13301 \begin_layout Plain Layout
13308 \begin_inset Flex CharStyle:Code
13311 \begin_layout Plain Layout
13318 Each of these turns on or off the corresponding attribute.
13321 \begin_layout Description
13322 \begin_inset Flex CharStyle:Code
13325 \begin_layout Plain Layout
13334 \begin_inset Flex CharStyle:Code
13337 \begin_layout Plain Layout
13348 \begin_inset Flex CharStyle:Code
13351 \begin_layout Plain Layout
13360 \begin_layout Description
13361 \begin_inset Flex CharStyle:Code
13364 \begin_layout Plain Layout
13373 \begin_inset Flex CharStyle:Code
13376 \begin_layout Plain Layout
13387 \begin_inset Flex CharStyle:Code
13390 \begin_layout Plain Layout
13397 \begin_inset Flex CharStyle:Code
13400 \begin_layout Plain Layout
13407 \begin_inset Flex CharStyle:Code
13410 \begin_layout Plain Layout
13419 \begin_layout Description
13420 \begin_inset Flex CharStyle:Code
13423 \begin_layout Plain Layout
13430 \begin_inset Flex CharStyle:Code
13433 \begin_layout Plain Layout
13440 \begin_inset Flex CharStyle:Code
13443 \begin_layout Plain Layout
13450 \begin_inset Flex CharStyle:Code
13453 \begin_layout Plain Layout
13462 \begin_inset Flex CharStyle:Code
13465 \begin_layout Plain Layout
13472 \begin_inset Flex CharStyle:Code
13475 \begin_layout Plain Layout
13482 \begin_inset Flex CharStyle:Code
13485 \begin_layout Plain Layout
13492 \begin_inset Flex CharStyle:Code
13495 \begin_layout Plain Layout
13502 \begin_inset Flex CharStyle:Code
13505 \begin_layout Plain Layout
13514 \begin_layout Subsection
13515 Upgrading old layout files
13518 \begin_layout Standard
13519 The file format of layout files changes from time to time, so old layout
13520 files need to be converted.
13521 This process has been automated since LyX 1.4.0: If LyX reads an old format
13522 layout file it will call the conversion tool
13523 \begin_inset Flex CharStyle:Code
13526 \begin_layout Plain Layout
13527 LyXDir/scripts/layout2layout.py
13532 and convert it to a temporary file in current format.
13533 The original file is left untouched.
13534 If you want to convert the layout file permanently, just call the converter
13538 \begin_layout LyX-Code
13539 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
13542 \begin_layout Standard
13543 (You need to replace
13544 \begin_inset Flex CharStyle:Code
13547 \begin_layout Plain Layout
13553 with the name of your LyX system directory, unless you happen to have defined
13554 such an environment variable.) Then copy
13555 \begin_inset Flex CharStyle:Code
13558 \begin_layout Plain Layout
13565 \begin_inset Flex CharStyle:Code
13568 \begin_layout Plain Layout
13577 \begin_layout Standard
13578 The automatic conversion only handles syntax changes.
13579 It cannot handle the case where the contents of included files was changed,
13580 so these will have to be converted separately.
13583 \begin_layout Section
13585 \begin_inset CommandInset label
13587 name "sec:templates"
13594 \begin_layout Standard
13595 Templates are created just like usual documents.
13596 The only difference is that usual documents contain all possible settings,
13597 including the font scheme and the paper size.
13598 Usually a user doesn't want a template to overwrite his defaults in these
13600 For that reason, the designer of a template should remove the corresponding
13602 \begin_inset Flex CharStyle:Code
13605 \begin_layout Plain Layout
13614 \begin_inset Flex CharStyle:Code
13617 \begin_layout Plain Layout
13625 from the template LyX file.
13626 This can be done with any simple text-editor, for example
13627 \begin_inset Flex CharStyle:Code
13630 \begin_layout Plain Layout
13637 \begin_inset Flex CharStyle:Code
13640 \begin_layout Plain Layout
13650 \begin_layout Standard
13651 Put the edited template files you create in
13652 \begin_inset Flex CharStyle:Code
13655 \begin_layout Plain Layout
13661 , copy the ones you use from the global template directory in
13662 \begin_inset Flex CharStyle:Code
13665 \begin_layout Plain Layout
13671 to the same place, and redefine the template path in the
13672 \begin_inset Flex CharStyle:MenuItem
13675 \begin_layout Plain Layout
13683 \SpecialChar \menuseparator
13688 references\SpecialChar \menuseparator
13697 \begin_layout Standard
13698 Note that there is a template which has a particular meaning:
13699 \begin_inset Flex CharStyle:Code
13702 \begin_layout Plain Layout
13709 This template is loaded everytime you create a new document with
13710 \begin_inset Flex CharStyle:MenuItem
13713 \begin_layout Plain Layout
13723 \SpecialChar \menuseparator
13725 \begin_inset Flex CharStyle:MenuItem
13728 \begin_layout Plain Layout
13738 in order to provide useful defaults.
13739 To create this template from inside LyX, all you have to do is to open
13740 a document with the correct settings, and use the
13741 \begin_inset Flex CharStyle:MenuItem
13744 \begin_layout Plain Layout
13749 e as Document Defaults
13757 \begin_layout Chapter
13758 Including External Material
13761 \begin_layout Standard
13762 The use of material from sources external to LyX is covered in detail in
13768 This part of the manual covers what needs to happen behind the scenes for
13769 new sorts of material to be included.
13772 \begin_layout Section
13776 \begin_layout Standard
13777 The external material feature is based on the concept of a
13782 A template is a specification of how LyX should interface with a certain
13784 As bundled, LyX comes with predefined templates for Xfig figures, various
13785 raster format images, chess diagrams, and LilyPond music notation.
13786 You can check the actual list by using the menu
13787 \begin_inset Flex CharStyle:MenuItem
13790 \begin_layout Plain Layout
13791 Insert\SpecialChar \menuseparator
13792 File\SpecialChar \menuseparator
13799 Furthermore, it is possible to roll your own template to support a specific
13801 Later we'll describe in more detail what is involved, and hopefully you
13802 will submit all the templates you create so we can include them in a later
13806 \begin_layout Standard
13807 Another basic idea of the external material feature is to distinguish between
13808 the original file that serves as a base for final material and the produced
13809 file that is included in your exported or printed document.
13810 For example, consider the case of a figure produced with
13811 \begin_inset Flex CharStyle:Code
13814 \begin_layout Plain Layout
13821 The Xfig application itself works on an original file with the
13822 \begin_inset Flex CharStyle:Code
13825 \begin_layout Plain Layout
13832 Within XFig, you create and change your figure, and when you are done,
13834 \begin_inset Flex CharStyle:Code
13837 \begin_layout Plain Layout
13844 When you want to include the figure in your document, you invoke
13845 \begin_inset Flex CharStyle:Code
13848 \begin_layout Plain Layout
13854 in order to create a PostScript file that can readily be included in your
13857 \begin_inset Flex CharStyle:Code
13860 \begin_layout Plain Layout
13866 file is the original file, and the PostScript file is the produced file.
13869 \begin_layout Standard
13870 This distinction is important in order to allow updating of the material
13871 while you are in the process of writing the document.
13872 Furthermore, it provides us with the flexibility that is needed to support
13873 multiple export formats.
13874 For instance, in the case of a plain text file, it is not exactly an award-winn
13875 ing idea to include the figure as raw PostScript®.
13876 Instead, you'd either prefer to just include a reference to the figure
13877 or try to invoke some graphics to Ascii converter to make the final result
13878 look similar to the real graphics.
13879 The external material management allows you to do this, because it is parameter
13880 ized on the different export formats that LyX supports.
13883 \begin_layout Standard
13884 Besides supporting the production of different products according to the
13885 exported format, it supports tight integration with editing and viewing
13887 In the case of an XFig figure, you are able to invoke Xfig on the original
13888 file with a single click from within the external material dialog in LyX,
13889 and also preview the produced PostScript file with ghostview with another
13891 No more fiddling around with the command line and/or file browsers to locate
13892 and manipulate the original or produced files.
13893 In this way, you are finally able to take full advantage of the many different
13894 applications that are relevant to use when you write your documents, and
13895 ultimately be more productive.
13898 \begin_layout Section
13899 The external template configuration file
13902 \begin_layout Standard
13903 It is relatively easy to add custom external template definitions to LyX.
13904 However, be aware that doing this in an careless manner most probably
13908 introduce an easily exploitable security hole.
13909 So before you do this, please read the discussion about security in section
13911 \begin_inset CommandInset ref
13913 reference "sec:Security-discussion"
13920 \begin_layout Standard
13921 Having said that, we encourage you to submit any interesting templates that
13926 \begin_layout Standard
13927 The external templates are defined in the
13928 \begin_inset Flex CharStyle:Code
13931 \begin_layout Plain Layout
13932 LyXDir/lib/external_templates
13938 You can place your own version in
13939 \begin_inset Flex CharStyle:Code
13942 \begin_layout Plain Layout
13943 UserDir/external_templates
13951 \begin_layout Standard
13952 A typical template looks like this:
13955 \begin_layout LyX-Code
13959 \begin_layout LyX-Code
13960 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
13963 \begin_layout LyX-Code
13967 \begin_layout LyX-Code
13971 \begin_layout LyX-Code
13975 \begin_layout LyX-Code
13979 \begin_layout LyX-Code
13983 \begin_layout LyX-Code
13984 AutomaticProduction true
13987 \begin_layout LyX-Code
13991 \begin_layout LyX-Code
13995 \begin_layout LyX-Code
13999 \begin_layout LyX-Code
14000 TransformCommand Rotate RotationLatexCommand
14003 \begin_layout LyX-Code
14004 TransformCommand Resize ResizeLatexCommand
14007 \begin_layout LyX-Code
14008 Product "$$RotateFront$$ResizeFront
14011 \begin_layout LyX-Code
14016 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
14019 \begin_layout LyX-Code
14020 $$ResizeBack$$RotateBack"
14023 \begin_layout LyX-Code
14027 \begin_layout LyX-Code
14028 UpdateResult "$$AbsPath$$Basename.pstex_t"
14031 \begin_layout LyX-Code
14032 Requirement "graphicx"
14035 \begin_layout LyX-Code
14036 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
14039 \begin_layout LyX-Code
14040 ReferencedFile latex "$$AbsPath$$Basename.eps"
14043 \begin_layout LyX-Code
14044 ReferencedFile dvi "$$AbsPath$$Basename.eps"
14047 \begin_layout LyX-Code
14051 \begin_layout LyX-Code
14055 \begin_layout LyX-Code
14056 TransformCommand Rotate RotationLatexCommand
14059 \begin_layout LyX-Code
14060 TransformCommand Resize ResizeLatexCommand
14063 \begin_layout LyX-Code
14064 Product "$$RotateFront$$ResizeFront
14067 \begin_layout LyX-Code
14072 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
14075 \begin_layout LyX-Code
14076 $$ResizeBack$$RotateBack"
14079 \begin_layout LyX-Code
14080 UpdateFormat pdftex
14083 \begin_layout LyX-Code
14084 UpdateResult "$$AbsPath$$Basename.pdftex_t"
14087 \begin_layout LyX-Code
14088 Requirement "graphicx"
14091 \begin_layout LyX-Code
14092 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
14095 \begin_layout LyX-Code
14096 ReferencedFile latex "$$AbsPath$$Basename.pdf"
14099 \begin_layout LyX-Code
14103 \begin_layout LyX-Code
14107 \begin_layout LyX-Code
14108 Product "$$Contents(
14110 "$$AbsPath$$Basename.asc
14115 \begin_layout LyX-Code
14116 UpdateFormat asciixfig
14119 \begin_layout LyX-Code
14120 UpdateResult "$$AbsPath$$Basename.asc"
14123 \begin_layout LyX-Code
14127 \begin_layout LyX-Code
14131 \begin_layout LyX-Code
14132 Product "<graphic fileref=
14134 "$$AbsOrRelPathMaster$$Basename.eps
14139 \begin_layout LyX-Code
14143 \begin_layout LyX-Code
14147 \begin_layout LyX-Code
14148 UpdateResult "$$AbsPath$$Basename.eps"
14151 \begin_layout LyX-Code
14152 ReferencedFile docbook "$$AbsPath$$Basename.eps"
14155 \begin_layout LyX-Code
14156 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
14159 \begin_layout LyX-Code
14163 \begin_layout LyX-Code
14164 Product "[XFig: $$FName]"
14167 \begin_layout LyX-Code
14171 \begin_layout LyX-Code
14175 \begin_layout Standard
14176 As you can see, the template is enclosed in
14177 \begin_inset Flex CharStyle:Code
14180 \begin_layout Plain Layout
14186 \SpecialChar \ldots{}
14188 \begin_inset Flex CharStyle:Code
14191 \begin_layout Plain Layout
14198 It contains a header specifying some general settings and, for each supported
14199 primary document file format, a section
14200 \begin_inset Flex CharStyle:Code
14203 \begin_layout Plain Layout
14209 \SpecialChar \ldots{}
14211 \begin_inset Flex CharStyle:Code
14214 \begin_layout Plain Layout
14223 \begin_layout Subsection
14224 The template header
14227 \begin_layout Description
14228 \begin_inset Flex CharStyle:Code
14231 \begin_layout Plain Layout
14232 AutomaticProduction
14233 \begin_inset space ~
14241 Whether the file represented by the template must be generated by LyX.
14242 This command must occur exactly once.
14245 \begin_layout Description
14246 \begin_inset Flex CharStyle:Code
14249 \begin_layout Plain Layout
14251 \begin_inset space ~
14259 A glob pattern that is used in the file dialog to filter out the desired
14261 If there is more than one possible file extension (e.g.
14262 \begin_inset space ~
14266 \begin_inset Flex CharStyle:Code
14269 \begin_layout Plain Layout
14276 \begin_inset Flex CharStyle:Code
14279 \begin_layout Plain Layout
14285 ), use something like
14286 \begin_inset Flex CharStyle:Code
14289 \begin_layout Plain Layout
14296 This command must occur exactly once.
14299 \begin_layout Description
14300 \begin_inset Flex CharStyle:Code
14303 \begin_layout Plain Layout
14305 \begin_inset space ~
14313 The text that is displayed on the button.
14314 This command must occur exactly once.
14317 \begin_layout Description
14318 \begin_inset Flex CharStyle:Code
14321 \begin_layout Plain Layout
14323 \begin_inset space ~
14327 \begin_inset space ~
14335 The help text that is used in the External dialog.
14336 Provide enough information to explain to the user just what the template
14337 can provide him with.
14338 This command must occur exactly once.
14341 \begin_layout Description
14342 \begin_inset Flex CharStyle:Code
14345 \begin_layout Plain Layout
14347 \begin_inset space ~
14355 The file format of the original file.
14356 This must be the name of a format that is known to LyX (see section
14357 \begin_inset CommandInset ref
14359 reference "sub:Formats"
14365 \begin_inset Quotes eld
14369 \begin_inset Flex CharStyle:Code
14372 \begin_layout Plain Layout
14379 \begin_inset Quotes erd
14382 if the template can handle original files of more than one format.
14383 LyX will attempt to interrogate the file itself in order to deduce its
14384 format in this case.
14385 This command must occur exactly once.
14388 \begin_layout Description
14389 \begin_inset Flex CharStyle:Code
14392 \begin_layout Plain Layout
14394 \begin_inset space ~
14402 A unique name for the template.
14403 It must not contain substitution macros (see below).
14406 \begin_layout Description
14407 \begin_inset Flex CharStyle:Code
14410 \begin_layout Plain Layout
14412 \begin_inset space ~
14415 Rotate|Resize|Clip|Extra
14420 This command specifies which transformations are supported by this template.
14421 It may occur zero or more times.
14422 This command enables the corresponding tabs in the external dialog.
14424 \begin_inset Flex CharStyle:Code
14427 \begin_layout Plain Layout
14433 command must have either a corresponding
14434 \begin_inset Flex CharStyle:Code
14437 \begin_layout Plain Layout
14444 \begin_inset Flex CharStyle:Code
14447 \begin_layout Plain Layout
14454 \begin_inset Flex CharStyle:Code
14457 \begin_layout Plain Layout
14464 Otherwise the transformation will not be supported by that format.
14467 \begin_layout Subsection
14471 \begin_layout Description
14472 \begin_inset Flex CharStyle:Code
14475 \begin_layout Plain Layout
14477 \begin_inset space ~
14480 LaTeX|PDFLaTeX|PlainText|DocBook
14485 The primary document file format that this format definition is for.
14486 Not every template has a sensible representation in all document file formats.
14487 Please define nevertheless a
14488 \begin_inset Flex CharStyle:Code
14491 \begin_layout Plain Layout
14497 section for all formats.
14498 Use a dummy text when no representation is available.
14499 Then you can at least see a reference to the external material in the exported
14503 \begin_layout Description
14504 \begin_inset Flex CharStyle:Code
14507 \begin_layout Plain Layout
14509 \begin_inset space ~
14513 \begin_inset space ~
14521 This command defines an additional macro
14522 \begin_inset Flex CharStyle:Code
14525 \begin_layout Plain Layout
14531 for substitution in
14532 \begin_inset Flex CharStyle:Code
14535 \begin_layout Plain Layout
14543 \begin_inset Flex CharStyle:Code
14546 \begin_layout Plain Layout
14552 itself may contain substitution macros.
14553 The advantage over using
14554 \begin_inset Flex CharStyle:Code
14557 \begin_layout Plain Layout
14564 \begin_inset Flex CharStyle:Code
14567 \begin_layout Plain Layout
14573 is that the substituted value of
14574 \begin_inset Flex CharStyle:Code
14577 \begin_layout Plain Layout
14583 is sanitized so that it is a valid optional argument in the document format.
14584 This command may occur zero or more times.
14587 \begin_layout Description
14588 \begin_inset Flex CharStyle:Code
14591 \begin_layout Plain Layout
14593 \begin_inset space ~
14601 The text that is inserted in the exported document.
14602 This is actually the most important command and can be quite complex.
14603 This command must occur exactly once.
14606 \begin_layout Description
14607 \begin_inset Flex CharStyle:Code
14610 \begin_layout Plain Layout
14612 \begin_inset space ~
14620 This command specifies a preamble snippet that will be included in the
14622 It has to be defined using
14623 \begin_inset Flex CharStyle:Code
14626 \begin_layout Plain Layout
14632 \SpecialChar \ldots{}
14634 \begin_inset Flex CharStyle:Code
14637 \begin_layout Plain Layout
14644 This command may occur zero or more times.
14647 \begin_layout Description
14648 \begin_inset Flex CharStyle:Code
14651 \begin_layout Plain Layout
14653 \begin_inset space ~
14657 \begin_inset space ~
14665 This command denotes files that are created by the conversion process and
14666 are needed for a particular export format.
14667 If the filename is relative, it is interpreted relative to the master document.
14668 This command may be given zero or more times.
14671 \begin_layout Description
14672 \begin_inset Flex CharStyle:Code
14675 \begin_layout Plain Layout
14677 \begin_inset space ~
14685 The name of a required LaTeX package.
14686 The package is included via
14687 \begin_inset Flex CharStyle:Code
14690 \begin_layout Plain Layout
14698 in the LaTeX preamble.
14699 This command may occur zero or more times.
14702 \begin_layout Description
14703 \begin_inset Flex CharStyle:Code
14706 \begin_layout Plain Layout
14708 \begin_inset space ~
14712 \begin_inset space ~
14715 RotationLatexCommand
14720 This command specifies that the built in LaTeX command should be used for
14722 This command may occur once or not at all.
14725 \begin_layout Description
14726 \begin_inset Flex CharStyle:Code
14729 \begin_layout Plain Layout
14731 \begin_inset space ~
14735 \begin_inset space ~
14743 This command specifies that the built in LaTeX command should be used for
14745 This command may occur once or not at all.
14748 \begin_layout Description
14749 \begin_inset Flex CharStyle:Code
14752 \begin_layout Plain Layout
14754 \begin_inset space ~
14758 \begin_inset space ~
14761 RotationLatexOption
14766 This command specifies that rotation is done via an optional argument.
14767 This command may occur once or not at all.
14770 \begin_layout Description
14771 \begin_inset Flex CharStyle:Code
14774 \begin_layout Plain Layout
14776 \begin_inset space ~
14780 \begin_inset space ~
14788 This command specifies that resizing is done via an optional argument.
14789 This command may occur once or not at all.
14792 \begin_layout Description
14793 \begin_inset Flex CharStyle:Code
14796 \begin_layout Plain Layout
14798 \begin_inset space ~
14802 \begin_inset space ~
14810 This command specifies that clipping is done via an optional argument.
14811 This command may occur once or not at all.
14814 \begin_layout Description
14815 \begin_inset Flex CharStyle:Code
14818 \begin_layout Plain Layout
14820 \begin_inset space ~
14824 \begin_inset space ~
14832 This command specifies that an extra optional argument is used.
14833 This command may occur once or not at all.
14836 \begin_layout Description
14837 \begin_inset Flex CharStyle:Code
14840 \begin_layout Plain Layout
14842 \begin_inset space ~
14850 The file format of the converted file.
14851 This must be the name of a format that is known to LyX (see the
14852 \begin_inset Flex CharStyle:MenuItem
14855 \begin_layout Plain Layout
14860 ools\SpecialChar \menuseparator
14865 references:Conversion
14871 This command must occur exactly once.
14874 \begin_layout Description
14875 \begin_inset Flex CharStyle:Code
14878 \begin_layout Plain Layout
14880 \begin_inset space ~
14888 The file name of the converted file.
14889 The file name must be absolute.
14890 This command must occur exactly once.
14893 \begin_layout Subsection
14894 Preamble definitions
14897 \begin_layout Standard
14898 The external template configuration file may contain additional preamble
14899 definitions enclosed by
14900 \begin_inset Flex CharStyle:Code
14903 \begin_layout Plain Layout
14909 \SpecialChar \ldots{}
14911 \begin_inset Flex CharStyle:Code
14914 \begin_layout Plain Layout
14921 They can be used by the templates in the
14922 \begin_inset Flex CharStyle:Code
14925 \begin_layout Plain Layout
14934 \begin_layout Section
14935 The substitution mechanism
14938 \begin_layout Standard
14939 When the external material facility invokes an external program, it is done
14940 on the basis of a command defined in the template configuration file.
14941 These commands can contain various macros that are expanded before execution.
14942 Execution always take place in the directory of the containing document.
14945 \begin_layout Standard
14946 Also, whenever external material is to be displayed, the name will be produced
14947 by the substitution mechanism, and most other commands in the template
14948 definition support substitution as well.
14951 \begin_layout Standard
14952 The available macros are the following:
14955 \begin_layout Description
14956 \begin_inset Flex CharStyle:Code
14959 \begin_layout Plain Layout
14960 $$AbsOrRelPathMaster
14965 The file path, absolute or relative to the master LyX document.
14968 \begin_layout Description
14969 \begin_inset Flex CharStyle:Code
14972 \begin_layout Plain Layout
14973 $$AbsOrRelPathParent
14978 The file path, absolute or relative to the LyX document.
14981 \begin_layout Description
14982 \begin_inset Flex CharStyle:Code
14985 \begin_layout Plain Layout
14991 The absolute file path.
14994 \begin_layout Description
14995 \begin_inset Flex CharStyle:Code
14998 \begin_layout Plain Layout
15004 The filename without path and without the extension.
15007 \begin_layout Description
15008 \begin_inset Flex CharStyle:Code
15011 \begin_layout Plain Layout
15013 \begin_inset Quotes eld
15017 \begin_inset Quotes erd
15025 This macro will expand to the contents of the file with the name
15026 \begin_inset Flex CharStyle:Code
15029 \begin_layout Plain Layout
15038 \begin_layout Description
15039 \begin_inset Flex CharStyle:Code
15042 \begin_layout Plain Layout
15048 The file extension (including the dot).
15051 \begin_layout Description
15052 \begin_inset Flex CharStyle:Code
15055 \begin_layout Plain Layout
15061 The filename of the file specified in the external material dialog.
15062 This is either an absolute name, or it is relative to the LyX document.
15065 \begin_layout Description
15066 \begin_inset Flex CharStyle:Code
15069 \begin_layout Plain Layout
15076 \begin_inset Flex CharStyle:Code
15079 \begin_layout Plain Layout
15085 (absolute name or relative to the LyX document).
15088 \begin_layout Description
15089 \begin_inset Flex CharStyle:Code
15092 \begin_layout Plain Layout
15098 The file path, relative to the master LyX document.
15101 \begin_layout Description
15102 \begin_inset Flex CharStyle:Code
15105 \begin_layout Plain Layout
15111 The file path, relative to the LyX document.
15114 \begin_layout Description
15115 \begin_inset Flex CharStyle:Code
15118 \begin_layout Plain Layout
15124 This macro will expand to the absolute path of the system directory.
15125 This is typically used to point to the various helper scripts that are
15129 \begin_layout Description
15130 \begin_inset Flex CharStyle:Code
15133 \begin_layout Plain Layout
15139 A name and full path to a temporary file which will be automatically deleted
15140 whenever the containing document is closed, or the external material insertion
15144 \begin_layout Standard
15145 All path macros contain a trailing directory separator, so you can construct
15147 the absolute filename with
15148 \begin_inset Flex CharStyle:Code
15151 \begin_layout Plain Layout
15152 $$AbsPath$$Basename$$Extension
15160 \begin_layout Standard
15161 The macros above are substituted in all commands unless otherwise noted.
15163 \begin_inset Flex CharStyle:Code
15166 \begin_layout Plain Layout
15172 supports additionally the following substitutions if they are enabled by
15174 \begin_inset Flex CharStyle:Code
15177 \begin_layout Plain Layout
15184 \begin_inset Flex CharStyle:Code
15187 \begin_layout Plain Layout
15196 \begin_layout Description
15197 \begin_inset Flex CharStyle:Code
15200 \begin_layout Plain Layout
15206 The front part of the resize command.
15209 \begin_layout Description
15210 \begin_inset Flex CharStyle:Code
15213 \begin_layout Plain Layout
15219 The back part of the resize command.
15222 \begin_layout Description
15223 \begin_inset Flex CharStyle:Code
15226 \begin_layout Plain Layout
15232 The front part of the rotation command.
15235 \begin_layout Description
15236 \begin_inset Flex CharStyle:Code
15239 \begin_layout Plain Layout
15245 The back part of the rotation command.
15248 \begin_layout Standard
15249 The value string of the
15250 \begin_inset Flex CharStyle:Code
15253 \begin_layout Plain Layout
15259 command supports additionally the following substitutions if they are enabled
15261 \begin_inset Flex CharStyle:Code
15264 \begin_layout Plain Layout
15271 \begin_inset Flex CharStyle:Code
15274 \begin_layout Plain Layout
15283 \begin_layout Description
15284 \begin_inset Flex CharStyle:Code
15287 \begin_layout Plain Layout
15296 \begin_layout Description
15297 \begin_inset Flex CharStyle:Code
15300 \begin_layout Plain Layout
15309 \begin_layout Description
15310 \begin_inset Flex CharStyle:Code
15313 \begin_layout Plain Layout
15322 \begin_layout Description
15323 \begin_inset Flex CharStyle:Code
15326 \begin_layout Plain Layout
15332 The rotation option.
15335 \begin_layout Standard
15336 You may ask why there are so many path macros.
15337 There are mainly two reasons:
15340 \begin_layout Enumerate
15341 Relative and absolute file names should remain relative or absolute, respectivel
15343 Users may have reasons to prefer either form.
15344 Relative names are useful for portable documents that should work on different
15345 machines, for example.
15346 Absolute names may be required by some programs.
15349 \begin_layout Enumerate
15350 LaTeX treats relative file names differently than LyX and other programs
15351 in nested included files.
15352 For LyX, a relative file name is always relative to the document that contains
15354 For LaTeX, it is always relative to the master document.
15355 These two definitions are identical if you have only one document, but
15356 differ if you have a master document that includes part documents.
15357 That means that relative filenames must be transformed when presented to
15359 Fortunately LyX does this automatically for you if you choose the right
15363 \begin_layout Standard
15364 So which path macro should be used in new template definitions? The rule
15368 \begin_layout Itemize
15370 \begin_inset Flex CharStyle:Code
15373 \begin_layout Plain Layout
15379 if an absolute path is required.
15382 \begin_layout Itemize
15384 \begin_inset Flex CharStyle:Code
15387 \begin_layout Plain Layout
15388 $$AbsOrRelPathMaster
15393 if the substituted string is some kind of LaTeX input.
15396 \begin_layout Itemize
15398 \begin_inset Flex CharStyle:Code
15401 \begin_layout Plain Layout
15402 $$AbsOrRelPathParent
15407 in order to preserve the user's choice.
15410 \begin_layout Standard
15411 There are special cases where this rule does not work and e.g.
15412 \begin_inset space ~
15415 relative names are needed, but normally it will work just fine.
15416 One example for such a case is the command
15417 \begin_inset Flex CharStyle:Code
15420 \begin_layout Plain Layout
15421 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
15426 in the XFig template above: We can't use the absolute name because the
15428 \begin_inset Flex CharStyle:Code
15431 \begin_layout Plain Layout
15437 files needs the relative name in order to rewrite the file content.
15440 \begin_layout Section
15441 \begin_inset CommandInset label
15443 name "sec:Security-discussion"
15447 Security discussion
15450 \begin_layout Standard
15451 \begin_inset Note Note
15454 \begin_layout Plain Layout
15455 This section is outdated
15460 The external material feature interfaces with a lot of external programs
15461 and does so automatically, so we have to consider the security implications
15463 In particular, since you have the option of including your own filenames
15464 and/or parameter strings and those are expanded into a command, it seems
15465 that it would be possible to create a malicious document which executes
15466 arbitrary commands when a user views or prints the document.
15467 This is something we definately want to avoid.
15470 \begin_layout Standard
15471 However, since the external program commands are specified in the template
15472 configuration file only, there are no security issues if LyX is properly
15473 configured with safe templates only.
15474 This is so because the external programs are invoked with the
15475 \begin_inset Flex CharStyle:Code
15478 \begin_layout Plain Layout
15484 -system call rather than the
15485 \begin_inset Flex CharStyle:Code
15488 \begin_layout Plain Layout
15494 system-call, so it's not possible to execute arbitrary commands from the
15495 filename or parameter section via the shell.
15498 \begin_layout Standard
15499 This also implies that you are restricted in what command strings you can
15500 use in the external material templates.
15501 In particular, pipes and redirection are not readily available.
15502 This has to be so if LyX should remain safe.
15503 If you want to use some of the shell features, you should write a safe
15504 script to do this in a controlled manner, and then invoke the script from
15505 the command string.
15507 \begin_inset Flex CharStyle:Code
15510 \begin_layout Plain Layout
15516 directory of the LyX installation, you can find a safe wrapper script
15517 \begin_inset Flex CharStyle:Code
15520 \begin_layout Plain Layout
15521 general_command_wrapper.py
15526 that supports redirection of input and output.
15527 That can serve as an example for how to write safe template scripts.
15528 For a more advanced example that uses
15529 \begin_inset Flex CharStyle:Code
15532 \begin_layout Plain Layout
15538 and friends, take a look at the
15539 \begin_inset Flex CharStyle:Code
15542 \begin_layout Plain Layout
15551 \begin_layout Standard
15552 It is possible to design a template that interacts directly with the shell,
15553 but since this would allow a malicious user to execute arbitrary commands
15554 by writing clever filenames and/or parameters, we generally recommend that
15555 you only use safe scripts that work with the
15556 \begin_inset Flex CharStyle:Code
15559 \begin_layout Plain Layout
15565 system call in a controlled manner.
15566 Of course, for use in a controlled environment, it can be tempting to just
15567 fall back to use ordinary shell scripts.
15568 If you do so, be aware that you
15572 provide an easily exploitable security hole in your system.
15573 Of course it stands to reason that such unsafe templates will never be
15574 included in the standard LyX distribution, although we do encourage people
15575 to submit new templates in the open source tradition.
15576 But LyX as shipped from the official distribution channels will never have
15580 \begin_layout Standard
15581 Including external material provides a lot of power, and you have to be
15582 careful not to introduce security hazards with this power.
15583 A subtle error in a single line in an innocent looking script can open
15584 the door to huge security problems.
15585 So if you do not fully understand the issues, we recommend that you consult
15586 a knowledgable security professional or the LyX development team if you
15587 have any questions about whether a given template is safe or not.
15588 And do this before you use it in an uncontrolled environment.
15591 \begin_layout Chapter
15595 \begin_layout Section
15599 \begin_layout Standard
15600 The LyX server is a method implemented in LyX that will enable other programs
15601 to talk to LyX, invoke LyX commands, and retrieve information about the
15602 LyX internal state.
15603 This is only intended for advanced users, but they should find it useful.
15604 Please note that, at present,
15606 the server does not work on Windows
15612 \begin_layout Plain Layout
15613 There is no principled reason it cannot do so.
15614 But none of the developers on Windows® have yet implemented this functionality
15623 \begin_layout Section
15624 Starting the LyX Server
15627 \begin_layout Standard
15628 The LyX server works through the use of a pair of named pipes.
15629 These are usually located in
15630 \begin_inset Flex CharStyle:Code
15633 \begin_layout Plain Layout
15640 \begin_inset Quotes eld
15644 \begin_inset Flex CharStyle:Code
15647 \begin_layout Plain Layout
15654 \begin_inset Quotes erd
15658 \begin_inset Quotes eld
15662 \begin_inset Flex CharStyle:Code
15665 \begin_layout Plain Layout
15672 \begin_inset Quotes erd
15676 External programs write into
15677 \begin_inset Flex CharStyle:Code
15680 \begin_layout Plain Layout
15686 and read back data from
15687 \begin_inset Flex CharStyle:Code
15690 \begin_layout Plain Layout
15697 The stem of the pipe names can be defined in the
15698 \begin_inset Flex CharStyle:MenuItem
15701 \begin_layout Plain Layout
15706 ools\SpecialChar \menuseparator
15716 dialog, for example
15717 \begin_inset Flex CharStyle:Code
15720 \begin_layout Plain Layout
15721 "/home/myhome/.lyxpipe"
15729 \begin_layout Standard
15731 \begin_inset Flex CharStyle:Code
15734 \begin_layout Plain Layout
15741 \begin_inset Flex CharStyle:Code
15744 \begin_layout Plain Layout
15750 ' to create the pipes.
15751 The above setting also has the effect of activating the LyX server.
15752 If one of the pipes already exists, LyX will assume that another LyX process
15753 is already running and will not start the server.
15754 To have several LyX processes with servers at the same time, you have to
15755 change the configuration between the start of the programs.
15758 \begin_layout Standard
15759 If you are developing a client program, you might find it useful to enable
15760 debugging information from the LyX server.
15761 Do this by starting LyX as lyx -dbg lyxserver.
15764 \begin_layout Standard
15765 Warning: if LyX crashes, it may not manage to remove the pipes; in this
15766 case you must remove them manually.
15767 If LyX starts and the pipes exist already, it will not start any server.
15770 \begin_layout Standard
15771 Other than this, there are a few points to consider:
15774 \begin_layout Itemize
15775 Both server and clients must run on UNIX or OS/2 machines.
15776 Communications between LyX on UNIX and clients on OS/2 or vice versa is
15777 not possible right now.
15780 \begin_layout Itemize
15781 On OS/2, only one client can connect to LyXServer at a time.
15784 \begin_layout Itemize
15785 On OS/2, clients must open inpipe with
15786 \begin_inset Flex CharStyle:Code
15789 \begin_layout Plain Layout
15798 \begin_layout Standard
15802 \begin_layout Standard
15803 You can find a complete example client written in C in the source distribution
15805 \begin_inset Flex CharStyle:Code
15808 \begin_layout Plain Layout
15809 development/lyxserver/server_monitor.c
15817 \begin_layout Section
15818 Normal communication
15821 \begin_layout Standard
15822 To issue a LyX call, the client writes a line of ASCII text into the input
15824 This line has the following format:
15827 \begin_layout Quote
15841 \begin_layout Description
15846 is a name that the client can choose arbitrarily.
15847 Its only use is that LyX will echo it if it sends an answer---so a client
15848 can dispatch results from different requesters.
15851 \begin_layout Description
15856 is the function you want LyX to perform.
15857 It is the same as the commands you'd use in the minibuffer.
15860 \begin_layout Description
15865 is an optional argument which is meaningful only to some functions (for
15867 \begin_inset Quotes eld
15871 \begin_inset Quotes erd
15874 which will insert the argument as text at the cursor position.)
15877 \begin_layout Standard
15878 The answer from LyX will arrive in the output pipe and be of the form
15881 \begin_layout Quote
15895 \begin_layout Standard
15904 are just echoed from the command request, while
15908 is more or less useful information filled according to how the command
15909 execution worked out.
15910 Some commands will return information about the internal state of LyX,
15912 \begin_inset Quotes eld
15916 \begin_inset Quotes erd
15919 , while other will return an empty data-response.
15920 This means that the command execution went fine.
15923 \begin_layout Standard
15924 In case of errors, the response from LyX will have this form
15927 \begin_layout Quote
15941 \begin_layout Standard
15946 should contain an explanation of why the command failed.
15949 \begin_layout Standard
15953 \begin_layout LyX-Code
15954 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
15957 \begin_layout LyX-Code
15958 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
15959 \begin_inset Newline newline
15962 read a <~/.lyxpipe.out
15963 \begin_inset Newline newline
15969 \begin_layout Section
15973 \begin_layout Standard
15974 LyX can notify clients of events going on asynchronously.
15975 Currently it will only do this if the user binds a key sequence with the
15977 \begin_inset Quotes eld
15981 \begin_inset Quotes erd
15985 The format of the string LyX sends is as follows:
15988 \begin_layout Quote
15989 \begin_inset Flex CharStyle:Code
15992 \begin_layout Plain Layout
16003 \begin_layout Standard
16008 is the printed representation of the key sequence that was actually typed
16012 \begin_layout Standard
16013 This mechanism can be used to extend LyX's command set and implement macros:
16014 bind some key sequence to
16015 \begin_inset Quotes eld
16019 \begin_inset Quotes erd
16022 , start a client that listens on the out pipe, dispatches the command according
16023 to the sequence and starts a function that may use LyX calls and LyX requests
16024 to issue a command or a series of commands to LyX.
16027 \begin_layout Section
16028 The simple LyX Server Protocol
16031 \begin_layout Standard
16032 LyX implements a simple protocol that can be used for session management.
16033 All messages are of the form
16036 \begin_layout Quote
16046 \begin_layout Standard
16052 \begin_inset Quotes eld
16056 \begin_inset Quotes erd
16060 \begin_inset Quotes eld
16064 \begin_inset Quotes erd
16069 \begin_inset Quotes eld
16073 \begin_inset Quotes erd
16076 is received from a client, LyX will report back to inform the client that
16077 it's listening to it's messages, while
16078 \begin_inset Quotes eld
16082 \begin_inset Quotes erd
16085 sent from LyX will inform clients that LyX is closing.