1 #LyX 2.0.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 this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document 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
44 \use_default_options false
50 InsetLayout CharStyle:MenuItem
59 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 \font_typewriter default
68 \font_default_family default
76 \default_output_format default
77 \bibtex_command default
78 \index_command default
82 \pdf_title "LyX Configuration Manual"
83 \pdf_author "LyX Team"
84 \pdf_subject "LyX-documentation Customization"
85 \pdf_keywords "LyX, documentation, customization"
87 \pdf_bookmarksnumbered true
88 \pdf_bookmarksopen true
89 \pdf_bookmarksopenlevel 1
94 \pdf_pdfusetitle false
95 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
103 \paperorientation portrait
111 \paragraph_separation indent
112 \paragraph_indentation default
113 \quotes_language english
116 \paperpagestyle headings
117 \tracking_changes false
118 \output_changes false
124 Customizing LyX: Features for the Advanced User
132 \begin_layout Plain Layout
134 If you have comments or error corrections, please send them to the LyX Documenta
136 \begin_inset CommandInset href
138 target "lyx-docs@lists.lyx.org"
145 \begin_inset Quotes eld
149 \begin_inset Quotes erd
152 in the subject header, and please cc the current maintainer of this file,
153 Richard Heck <rgheck@comcast.net>.
159 \begin_inset Newline newline
163 \begin_inset Newline newline
169 \begin_layout Standard
170 \begin_inset CommandInset toc
171 LatexCommand tableofcontents
178 \begin_layout Standard
179 \begin_inset Note Note
182 \begin_layout Plain Layout
183 Please use change tracking when modifying this document.
184 This makes it easier for our translators to recognize things that have
185 been changed, and it helps the maintainer keep up-to-date with what's been
194 \begin_layout Chapter
198 \begin_layout Standard
199 This manual covers the customization features present in LyX.
200 In it, we discuss issues like keyboard shortcuts, screen previewing options,
201 printer options, sending commands to LyX via the LyX Server, internationalizati
202 on, installing new LaTeX classes and LyX layouts, etc.
203 We can't possibly hope to touch on everything you can change—our developers
204 add new features faster than we can document them—but we will explain the
205 most common customizations and hopefully point you in the right direction
206 for some of the more obscure ones.
209 \begin_layout Standard
210 \begin_inset Branch OutDated
213 \begin_layout Standard
214 Information from previous versions of this document that now seems to be
215 outdated is contained in the OutDated branch of this document.
216 By default, this information will not appear in the LaTeX output.
224 \begin_layout Chapter
225 LyX configuration files
228 \begin_layout Standard
229 This chapter aims to help you to find your way through the LyX configuration
231 Before continuing to read this chapter, you should find out where your
232 LyX library and user directories are by using
233 \begin_inset Flex CharStyle:MenuItem
236 \begin_layout Plain Layout
237 Help\SpecialChar \menuseparator
248 The library directory is the place where LyX places its system-wide configurati
249 on files; the user directory is where you can place your modified versions.
250 We will call the former
251 \begin_inset Flex CharStyle:Code
254 \begin_layout Plain Layout
261 \begin_inset Flex CharStyle:MenuItem
264 \begin_layout Plain Layout
270 in the remainder of this document.
274 \begin_layout Section
276 \begin_inset Flex CharStyle:Code
279 \begin_layout Plain Layout
288 \begin_layout Standard
289 \begin_inset Flex CharStyle:Code
292 \begin_layout Plain Layout
298 and its sub-directories contain a number of files and that can be used
299 to customize LyX's behavior.
300 You can change many of these files from within LyX itself through the
301 \begin_inset Flex CharStyle:MenuItem
304 \begin_layout Plain Layout
305 Tools\SpecialChar \menuseparator
312 Most customization that you will want to do in LyX is possible through
314 However, many other inner aspects of LyX can be customized by modifying
316 \begin_inset Flex CharStyle:Code
319 \begin_layout Plain Layout
326 These files fall in different categories, described in the following subsection
330 \begin_layout Subsection
331 Automatically generated files
334 \begin_layout Standard
335 The files, which are to be found in
336 \begin_inset Flex CharStyle:MenuItem
339 \begin_layout Plain Layout
345 , are generated when you configure LyX.
346 They contain various default values that are guessed by inspection.
347 In general, it is not a good idea to modify them, since they might be overwritt
351 \begin_layout Labeling
352 \labelwidthstring 00.00.0000
353 \begin_inset Flex CharStyle:Code
356 \begin_layout Plain Layout
362 contains defaults for various commands.
365 \begin_layout Labeling
366 \labelwidthstring 00.00.0000
367 \begin_inset Flex CharStyle:Code
370 \begin_layout Plain Layout
376 contains the list of packages that have been recognized by LyX.
377 It is currently unused by the LyX program itself, but the information extracted
378 , and more, is made available with
379 \begin_inset Flex CharStyle:MenuItem
382 \begin_layout Plain Layout
383 Help\SpecialChar \menuseparator
396 \begin_layout Labeling
397 \labelwidthstring 00.00.0000
398 \begin_inset Flex CharStyle:Code
401 \begin_layout Plain Layout
407 the list of text classes that have been found in your
408 \begin_inset Flex CharStyle:Code
411 \begin_layout Plain Layout
417 directories, along with the associated LaTeX document class and their descripti
421 \begin_layout Labeling
422 \labelwidthstring 00.00.0000
423 \begin_inset Flex CharStyle:Code
426 \begin_layout Plain Layout
432 the list of layout modules found in your
433 \begin_inset Flex CharStyle:Code
436 \begin_layout Plain Layout
445 \begin_layout Labeling
446 \labelwidthstring 00.00.0000
447 \begin_inset Flex CharStyle:Code
450 \begin_layout Plain Layout
456 lists of various sorts of LaTeX-related files found on your system
459 \begin_layout Labeling
460 \labelwidthstring 00.00.0000
461 \begin_inset Flex CharStyle:Code
464 \begin_layout Plain Layout
470 is automatically generated during configuration from the file
471 \begin_inset Flex CharStyle:Code
474 \begin_layout Plain Layout
481 It contains information on your LaTeX configuration.
484 \begin_layout Subsection
488 \begin_layout Standard
489 These directories are duplicated between
490 \begin_inset Flex CharStyle:Code
493 \begin_layout Plain Layout
500 \begin_inset Flex CharStyle:Code
503 \begin_layout Plain Layout
510 If a particular files exists in both places, the one in
511 \begin_inset Flex CharStyle:Code
514 \begin_layout Plain Layout
523 \begin_layout Labeling
524 \labelwidthstring 00.00.0000
525 \begin_inset Flex CharStyle:Code
528 \begin_layout Plain Layout
534 this directory contains files with the extension
535 \begin_inset Flex CharStyle:Code
538 \begin_layout Plain Layout
544 that define the keybindings used in LyX.
545 If there exists an internationalized version of the bind file named
546 \begin_inset Flex CharStyle:Code
549 \begin_layout Plain Layout
555 , that will be used first.
558 \begin_layout Labeling
559 \labelwidthstring 00.00.0000
560 \begin_inset Flex CharStyle:Code
563 \begin_layout Plain Layout
569 contains graphics files that can be included in documents.
573 \begin_layout Labeling
574 \labelwidthstring 00.00.0000
575 \begin_inset Flex CharStyle:Code
578 \begin_layout Plain Layout
584 contains LyX documentation files (including the one you are currently reading).
586 \begin_inset Flex CharStyle:Code
589 \begin_layout Plain Layout
595 deserves special attention, as noted above.
596 The internationalized help docs are in subdirectories
597 \begin_inset Flex CharStyle:Code
600 \begin_layout Plain Layout
607 \begin_inset Quotes eld
611 \begin_inset Quotes erd
614 is the ISO language code.
620 \begin_inset CommandInset ref
622 reference "cha:Internationalizing-LyX"
629 \begin_layout Labeling
630 \labelwidthstring 00.00.0000
631 \begin_inset Flex CharStyle:Code
634 \begin_layout Plain Layout
640 contains example files that explain how to use some features.
641 In the file browser, press the
642 \begin_inset Flex CharStyle:MenuItem
645 \begin_layout Plain Layout
654 \begin_layout Labeling
655 \labelwidthstring 00.00.0000
656 \begin_inset Flex CharStyle:Code
659 \begin_layout Plain Layout
665 contains image files that are used by the
666 \begin_inset Flex CharStyle:MenuItem
669 \begin_layout Plain Layout
676 In addition, it also contains the individual icons used in the toolbar
677 and the banners that can be shown when LyX is launched.
680 \begin_layout Labeling
681 \labelwidthstring 00.00.0000
682 \begin_inset Flex CharStyle:Code
685 \begin_layout Plain Layout
691 contains keyboard keymapping files.
697 \begin_inset CommandInset ref
699 reference "sec:International-Keymap-Stuff"
706 \begin_layout Labeling
707 \labelwidthstring 00.00.0000
708 \begin_inset Flex CharStyle:Code
711 \begin_layout Plain Layout
717 contains the text class and module files described in Chapter
722 \begin_inset CommandInset ref
724 reference "cha:Installing-New-Document"
731 \begin_layout Labeling
732 \labelwidthstring 00.00.0000
733 \begin_inset Flex CharStyle:Code
736 \begin_layout Plain Layout
743 \begin_inset Flex CharStyle:Code
746 \begin_layout Plain Layout
752 Python scripts used to convert between LyX versions.
753 These can be run from the command line if, say, you want to batch-convert
757 \begin_layout Labeling
758 \labelwidthstring 00.00.0000
759 \begin_inset Flex CharStyle:Code
762 \begin_layout Plain Layout
768 contains some files that demonstrate the capabilities of the
769 \begin_inset Flex CharStyle:MenuItem
772 \begin_layout Plain Layout
783 Also contains some scripts used by LyX itself.
786 \begin_layout Labeling
787 \labelwidthstring 00.00.0000
788 \begin_inset Flex CharStyle:Code
791 \begin_layout Plain Layout
797 contains the standard LyX template files described in Chapter
802 \begin_inset CommandInset ref
804 reference "sec:Creating-Templates"
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex CharStyle:Code
816 \begin_layout Plain Layout
822 contains files with the extension
823 \begin_inset Flex CharStyle:Code
826 \begin_layout Plain Layout
832 that define the user interface to LyX.
833 That is, the files define which items appear in which menus and the items
834 appearing on the toolbar.
837 \begin_layout Subsection
838 Files you don't want to modify
841 \begin_layout Standard
842 These files are used internally by LyX and you generally do not need to
843 modify them unless you are a developer.
846 \begin_layout Labeling
847 \labelwidthstring 00.00.0000
848 \begin_inset Flex CharStyle:Code
851 \begin_layout Plain Layout
857 this file contains the list of LyX developers.
858 The contents are displayed with the menu entry
859 \begin_inset Flex CharStyle:MenuItem
862 \begin_layout Plain Layout
863 Help\SpecialChar \menuseparator
876 \begin_layout Labeling
877 \labelwidthstring 00.00.0000
878 \begin_inset Flex CharStyle:Code
881 \begin_layout Plain Layout
887 this is a LaTeX script used during the configuration process.
891 \begin_layout Labeling
892 \labelwidthstring 00.00.0000
893 \begin_inset Flex CharStyle:Code
896 \begin_layout Plain Layout
902 this is the script that is used to re-configure LyX.
903 It creates configuration files in the directory it was run from.
906 \begin_layout Subsection
907 Other files needing a line or two...
910 \begin_layout Labeling
911 \labelwidthstring 00.00.0000
912 \begin_inset Flex CharStyle:Code
915 \begin_layout Plain Layout
921 this contains tables describing how different character encodings can be
925 \begin_layout Labeling
926 \labelwidthstring 00.00.0000
927 \begin_inset Flex CharStyle:Code
930 \begin_layout Plain Layout
936 this file contains the templates available to the new
937 \begin_inset Flex CharStyle:MenuItem
940 \begin_layout Plain Layout
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex CharStyle:Code
958 \begin_layout Plain Layout
964 this file contains a list of all the languages currently supported by LyX.
967 \begin_layout Section
968 Your local configuration directory
971 \begin_layout Standard
972 Even if you are using LyX as an unprivileged user, you might want to change
973 LyX configuration for your own use.
975 \begin_inset Flex CharStyle:Code
978 \begin_layout Plain Layout
984 directory contains all your personal configuration files.
985 This is the directory described as
986 \begin_inset Quotes eld
990 \begin_inset Quotes erd
994 \begin_inset Flex CharStyle:MenuItem
997 \begin_layout Plain Layout
998 Help\SpecialChar \menuseparator
1000 \begin_inset space ~
1009 This directory is used as a mirror of
1010 \begin_inset Flex CharStyle:Code
1013 \begin_layout Plain Layout
1019 , which means that every file in
1020 \begin_inset Flex CharStyle:Code
1023 \begin_layout Plain Layout
1029 is a replacement for the corresponding file in
1030 \begin_inset Flex CharStyle:Code
1033 \begin_layout Plain Layout
1040 Any configuration file described in the above sections can be placed either
1041 in the system-wide directory, in which case it will affect all users, or
1042 in your local directory for your own use.
1045 \begin_layout Standard
1046 To make things clearer, let's provide a few examples:
1049 \begin_layout Itemize
1050 The preferences set in the
1051 \begin_inset Flex CharStyle:MenuItem
1054 \begin_layout Plain Layout
1055 Tools\SpecialChar \menuseparator
1061 dialog are saved to a file
1062 \begin_inset Flex CharStyle:Code
1065 \begin_layout Plain Layout
1072 \begin_inset Flex CharStyle:Code
1075 \begin_layout Plain Layout
1084 \begin_layout Itemize
1085 When you reconfigure using
1086 \begin_inset Flex CharStyle:MenuItem
1089 \begin_layout Plain Layout
1090 Tools\SpecialChar \menuseparator
1097 \begin_inset Flex CharStyle:Code
1100 \begin_layout Plain Layout
1106 script, and the resulting files are written in your local configuration
1108 This means that any additional text class file that you might have added
1110 \begin_inset Flex CharStyle:Code
1113 \begin_layout Plain Layout
1119 will be added to the list of classes in the
1120 \begin_inset Flex CharStyle:MenuItem
1123 \begin_layout Plain Layout
1124 Document\SpecialChar \menuseparator
1133 \begin_layout Itemize
1134 If you get some updated documentation from LyX ftp site and cannot install
1135 it because you do not have sysadmin rights on your system, you can just
1137 \begin_inset Flex CharStyle:Code
1140 \begin_layout Plain Layout
1146 and the items in the
1147 \begin_inset Flex CharStyle:MenuItem
1150 \begin_layout Plain Layout
1156 menu will open them!
1159 \begin_layout Section
1160 Running LyX with multiple configurations
1163 \begin_layout Standard
1164 The configuration freedom of the local configuration directory may not suffice
1165 if you want to have more than one configuration at your disposal.
1166 For example, you may want to be use different key bindings or printer settings
1168 You can achieve this by having several such directories.
1169 You then specify which directory to use at run-time.
1172 \begin_layout Standard
1173 Invoking LyX with the command line switch
1174 \begin_inset Flex CharStyle:Code
1177 \begin_layout Plain Layout
1187 instructs the program to read the configuration from that directory, and
1188 not from the default directory.
1189 (You can determine the default directory by running LyX without the
1190 \begin_inset Flex CharStyle:Code
1193 \begin_layout Plain Layout
1199 switch.) If the specified directory does not exist, LyX offers to create
1200 it for you, just like it does for the default directory on the first time
1201 you run the program.
1202 You can modify the configuration options in this additional user directory
1203 exactly as you would for the default directory.
1204 These directories are completely independent (but read on).
1205 Note that setting the environment variable
1206 \begin_inset Flex CharStyle:Code
1209 \begin_layout Plain Layout
1215 to some value has exactly the same effect.
1218 \begin_layout Standard
1219 Having several configurations also requires more maintenance: if you want
1220 to add a new layout to
1221 \begin_inset Flex CharStyle:Code
1224 \begin_layout Plain Layout
1230 which you want available from all your configurations, you must add it
1231 to each directory separately.
1232 You can avoid this with the following trick: after LyX creates the additional
1233 directory, most of the subdirectories (see above) are empty.
1234 If you want the new configuration to mirror an existing one, replace the
1235 empty subdirectory with a symbolic link to the matching subdirectory in
1236 the existing configuration.
1238 \begin_inset Flex CharStyle:Code
1241 \begin_layout Plain Layout
1247 subdirectory, however, since it contains a file written by the configuration
1248 script (also accessible through
1249 \begin_inset Flex CharStyle:MenuItem
1252 \begin_layout Plain Layout
1253 Tools\SpecialChar \menuseparator
1259 ) which is configuration-specific.
1262 \begin_layout Chapter
1263 The Preferences dialog
1266 \begin_layout Standard
1267 All options of the preferences dialog are described in the Appendix
1269 The Preferences Dialog
1276 For some options you might find here more details.
1279 \begin_layout Section
1281 \begin_inset CommandInset label
1290 \begin_layout Standard
1291 The first step is to define your file formats if they are not already defined.
1293 \begin_inset Flex CharStyle:MenuItem
1296 \begin_layout Plain Layout
1297 Tools\SpecialChar \menuseparator
1305 \begin_inset Flex CharStyle:MenuItem
1308 \begin_layout Plain Layout
1309 File Handling\SpecialChar \menuseparator
1316 \begin_inset Flex CharStyle:MenuItem
1319 \begin_layout Plain Layout
1320 New\SpecialChar \ldots{}
1326 button to define your new format.
1328 \begin_inset Flex CharStyle:MenuItem
1331 \begin_layout Plain Layout
1337 field contains the name used to identify the format in the GUI.
1339 \begin_inset Flex CharStyle:MenuItem
1342 \begin_layout Plain Layout
1348 is used to identify the format internally.
1349 You will also need to enter a file extension.
1350 These are all required.
1352 \begin_inset Flex CharStyle:MenuItem
1355 \begin_layout Plain Layout
1361 field is used to provide a keyboard shortcut on the menus.
1362 (For example, pressing
1363 \begin_inset Flex CharStyle:MenuItem
1366 \begin_layout Plain Layout
1373 \begin_inset Flex CharStyle:MenuItem
1376 \begin_layout Plain Layout
1377 View\SpecialChar \menuseparator
1386 \begin_layout Standard
1388 \begin_inset Flex CharStyle:MenuItem
1391 \begin_layout Plain Layout
1398 \begin_inset Flex CharStyle:MenuItem
1401 \begin_layout Plain Layout
1408 For example, you might want to use
1409 \begin_inset Flex CharStyle:MenuItem
1412 \begin_layout Plain Layout
1418 to view PostScript files.
1419 You can enter the command needed to start the program in the corresponding
1421 In defining this command, you can use the four variables listed in the
1423 The viewer is launched when you view an image in LyX or use the
1424 \begin_inset Flex CharStyle:MenuItem
1427 \begin_layout Plain Layout
1434 The editor is for example launched when you right-click on an image and
1436 \begin_inset Flex CharStyle:MenuItem
1439 \begin_layout Plain Layout
1445 in the appearing context menu.
1448 \begin_layout Standard
1450 \begin_inset Flex CharStyle:MenuItem
1453 \begin_layout Plain Layout
1459 option tells LyX that a format is suitable for document export.
1460 If this is set and if a suitable conversion route exists (see sec.
1461 \begin_inset space \thinspace{}
1465 \begin_inset CommandInset ref
1467 reference "sec:Converters"
1471 ), the format will appear in the
1472 \begin_inset Flex CharStyle:MenuItem
1475 \begin_layout Plain Layout
1476 File\SpecialChar \menuseparator
1483 The format will also appear in the
1484 \begin_inset Flex CharStyle:MenuItem
1487 \begin_layout Plain Layout
1493 menu if a viewer is specified for the format.
1494 Pure image formats, such as
1495 \begin_inset Flex CharStyle:Code
1498 \begin_layout Plain Layout
1504 , should not use this option.
1505 Formats that can both represent vector graphics and documents like
1506 \begin_inset Flex CharStyle:Code
1509 \begin_layout Plain Layout
1518 \begin_layout Standard
1520 \begin_inset Flex CharStyle:MenuItem
1523 \begin_layout Plain Layout
1524 Vector graphics format
1529 tells LyX that a format can contain vector graphics.
1530 This information is used to determine the target format of included graphics
1532 \begin_inset Flex CharStyle:MenuItem
1535 \begin_layout Plain Layout
1542 Included graphics may need to be converted to either
1543 \begin_inset Flex CharStyle:MenuItem
1546 \begin_layout Plain Layout
1553 \begin_inset Flex CharStyle:MenuItem
1556 \begin_layout Plain Layout
1563 \begin_inset Flex CharStyle:MenuItem
1566 \begin_layout Plain Layout
1573 \begin_inset Flex CharStyle:MenuItem
1576 \begin_layout Plain Layout
1582 cannot handle other image formats.
1583 If an included graphic is not already in
1584 \begin_inset Flex CharStyle:MenuItem
1587 \begin_layout Plain Layout
1594 \begin_inset Flex CharStyle:MenuItem
1597 \begin_layout Plain Layout
1604 \begin_inset Flex CharStyle:MenuItem
1607 \begin_layout Plain Layout
1613 format, it is converted to
1614 \begin_inset Flex CharStyle:MenuItem
1617 \begin_layout Plain Layout
1623 if the vector format option is set, and otherwise to
1624 \begin_inset Flex CharStyle:MenuItem
1627 \begin_layout Plain Layout
1636 \begin_layout Section
1640 \begin_layout Standard
1641 Since all conversions from one format to another take place in LyX's temporary
1642 directory, it is sometimes necessary to modify a file before copying it
1643 to the temporary directory in order that the conversion may be performed.
1647 \begin_layout Plain Layout
1648 For example, the file may refer to other files—images, for example—using
1649 relative file names, and these may become invalid when the file is copied
1650 to the temporary directory.
1655 This is done by a Copier: It copies a file to (or from) the temporary directory
1656 and may modify it in the process.
1659 \begin_layout Standard
1660 The definitions of the copiers may use four variables:
1663 \begin_layout Labeling
1664 \labelwidthstring 00.00.0000
1665 \begin_inset Flex CharStyle:Code
1668 \begin_layout Plain Layout
1674 The LyX system directory (e.
1675 \begin_inset space \thinspace{}
1679 \begin_inset space \space{}
1683 \begin_inset Flex CharStyle:MenuItem
1686 \begin_layout Plain Layout
1695 \begin_layout Labeling
1696 \labelwidthstring 00.00.0000
1697 \begin_inset Flex CharStyle:Code
1700 \begin_layout Plain Layout
1709 \begin_layout Labeling
1710 \labelwidthstring 00.00.0000
1711 \begin_inset Flex CharStyle:Code
1714 \begin_layout Plain Layout
1723 \begin_layout Labeling
1724 \labelwidthstring 00.00.0000
1725 \begin_inset Flex CharStyle:Code
1728 \begin_layout Plain Layout
1737 \begin_layout Standard
1738 The latter should be the filename as it would be used in a LaTeX's
1745 It is relevant only when exporting files suitable for such inclusion.
1748 \begin_layout Standard
1749 Copiers can be used to do almost anything with output files.
1750 For example, suppose you want generated pdf files to be copied to a special
1752 \begin_inset Flex CharStyle:Code
1755 \begin_layout Plain Layout
1762 Then you could write a shell script such as this one:
1765 \begin_layout Standard
1766 \begin_inset listings
1770 \begin_layout Plain Layout
1775 \begin_layout Plain Layout
1780 \begin_layout Plain Layout
1782 TOFILE=`basename $2`
1785 \begin_layout Plain Layout
1787 cp $FROMFILE /home/you/pdf/$TOFILE
1792 Save it in your local LyX directory—say,
1793 \begin_inset Flex CharStyle:Code
1796 \begin_layout Plain Layout
1797 /home/you/.lyx/scripts/pdfcopier.sh
1802 —and make it executable, if you need to do so on your platform.
1804 \begin_inset Flex CharStyle:MenuItem
1807 \begin_layout Plain Layout
1808 Tools\SpecialChar \menuseparator
1814 dialog, select under
1815 \begin_inset Flex CharStyle:MenuItem
1818 \begin_layout Plain Layout
1819 File Handling\SpecialChar \menuseparator
1826 \begin_inset Flex CharStyle:MenuItem
1829 \begin_layout Plain Layout
1835 format—or one of the other pdf formats—and enter
1836 \begin_inset Flex CharStyle:Code
1839 \begin_layout Plain Layout
1840 pdfcopier.sh $$i $$o
1846 \begin_inset Flex CharStyle:MenuItem
1849 \begin_layout Plain Layout
1859 \begin_layout Standard
1860 Copiers are used by LyX in various of its own conversions.
1861 For example, if appropriate programs are found, LyX will automatically
1862 install copiers for the
1863 \begin_inset Flex CharStyle:MenuItem
1866 \begin_layout Plain Layout
1873 \begin_inset Flex CharStyle:MenuItem
1876 \begin_layout Plain Layout
1878 \begin_inset space ~
1887 When these formats are exported, the copier sees that not just the main
1888 HTML file but various associated files (style files, images, etc.) are also
1890 All these files are written to a subdirectory of the directory in which
1891 the original LyX file was found.
1895 \begin_layout Plain Layout
1896 This copier can be customized.
1898 \begin_inset Quotes eld
1902 \begin_inset Quotes erd
1905 argument takes a comma-separated list of extensions to be copied; if it
1906 is omitted, all files will be copied.
1908 \begin_inset Quotes eld
1912 \begin_inset Quotes erd
1915 argument determines the extension added to the generated directory.
1917 \begin_inset Quotes eld
1921 \begin_inset Flex CharStyle:MenuItem
1924 \begin_layout Plain Layout
1931 \begin_inset Quotes erd
1934 , so HTML generated from
1935 \begin_inset Flex CharStyle:MenuItem
1938 \begin_layout Plain Layout
1939 /path/to/filename.lyx
1945 \begin_inset Flex CharStyle:MenuItem
1948 \begin_layout Plain Layout
1949 /path/to/filename.html.LyXconv
1963 \begin_layout Section
1965 \begin_inset CommandInset label
1967 name "sec:Converters"
1974 \begin_layout Standard
1975 You can define your own Converters to convert files between different formats.
1977 \begin_inset Flex CharStyle:MenuItem
1980 \begin_layout Plain Layout
1981 Tools\SpecialChar \menuseparator
1982 Preferences\SpecialChar \menuseparator
1983 File Handling\SpecialChar \menuseparator
1992 \begin_layout Standard
1993 To define a new converter, select the
1994 \begin_inset Flex CharStyle:MenuItem
1997 \begin_layout Plain Layout
1999 \begin_inset space ~
2008 \begin_inset Flex CharStyle:MenuItem
2011 \begin_layout Plain Layout
2013 \begin_inset space ~
2021 from the drop-down lists, enter the command needed for the conversion,
2023 \begin_inset Flex CharStyle:MenuItem
2026 \begin_layout Plain Layout
2033 Several variables can be used in the definition of converters:
2036 \begin_layout Labeling
2037 \labelwidthstring 00.00.0000
2038 \begin_inset Flex CharStyle:Code
2041 \begin_layout Plain Layout
2047 The LyX system directory
2050 \begin_layout Labeling
2051 \labelwidthstring 00.00.0000
2052 \begin_inset Flex CharStyle:Code
2055 \begin_layout Plain Layout
2064 \begin_layout Labeling
2065 \labelwidthstring 00.00.0000
2066 \begin_inset Flex CharStyle:Code
2069 \begin_layout Plain Layout
2078 \begin_layout Labeling
2079 \labelwidthstring 00.00.0000
2080 \begin_inset Flex CharStyle:Code
2083 \begin_layout Plain Layout
2089 The base filename of the input file (i.
2090 \begin_inset space \thinspace{}
2093 g., without the extension)
2096 \begin_layout Labeling
2097 \labelwidthstring 00.00.0000
2098 \begin_inset Flex CharStyle:Code
2101 \begin_layout Plain Layout
2107 The path to the input file
2110 \begin_layout Labeling
2111 \labelwidthstring 00.00.0000
2112 \begin_inset Flex CharStyle:Code
2115 \begin_layout Plain Layout
2121 The path to the original input file (this is different from $$p when a
2122 chain of converters is called).
2125 \begin_layout Standard
2127 \begin_inset Flex CharStyle:MenuItem
2130 \begin_layout Plain Layout
2132 \begin_inset space ~
2140 field you can enter the following flags, separated by commas:
2143 \begin_layout Labeling
2144 \labelwidthstring 00.00.0000
2145 \begin_inset Flex CharStyle:Code
2148 \begin_layout Plain Layout
2154 This converter runs some form of LaTeX.
2155 This will make LyX's LaTeX error logs available.
2158 \begin_layout Labeling
2159 \labelwidthstring 00.00.0000
2160 \begin_inset Flex CharStyle:Code
2163 \begin_layout Plain Layout
2170 \begin_inset Flex CharStyle:MenuItem
2173 \begin_layout Plain Layout
2179 file for the conversion.
2182 \begin_layout Labeling
2183 \labelwidthstring 00.00.0000
2184 \begin_inset Flex CharStyle:Code
2187 \begin_layout Plain Layout
2196 \begin_layout Standard
2197 The following three flags are not really flags at all because they take
2199 \begin_inset Flex CharStyle:MenuItem
2202 \begin_layout Plain Layout
2204 \begin_inset space ~
2208 \begin_inset space ~
2219 \begin_layout Labeling
2220 \labelwidthstring 00.00.0000
2221 \begin_inset Flex CharStyle:Code
2224 \begin_layout Plain Layout
2230 If set, the converter's standard error will be redirected to a file
2231 \begin_inset Flex CharStyle:Code
2234 \begin_layout Plain Layout
2240 , and the script given as argument will be run as:
2241 \begin_inset Flex CharStyle:Code
2244 \begin_layout Plain Layout
2245 script < infile.out > infile.log
2251 The argument may contain
2252 \begin_inset Flex CharStyle:Code
2255 \begin_layout Plain Layout
2264 \begin_layout Labeling
2265 \labelwidthstring 00.00.0000
2266 \begin_inset Flex CharStyle:Code
2269 \begin_layout Plain Layout
2275 The name of the directory in which the converter will dump the generated
2277 LyX will not create this directory, and it does not copy anything into
2278 it, though it will copy this directory to the destination.
2279 The argument may contain
2280 \begin_inset Flex CharStyle:Code
2283 \begin_layout Plain Layout
2289 , which will be replaced by the base name of the input and output files,
2290 respectively, when the directory is copied.
2291 \begin_inset Newline newline
2294 Note that resultdir and usetempdir make no sense together.
2295 The latter will be ignored if the former is given.
2298 \begin_layout Labeling
2299 \labelwidthstring 00.00.0000
2300 \begin_inset Flex CharStyle:Code
2303 \begin_layout Plain Layout
2309 Determines the output file name and may, contain
2310 \begin_inset Flex CharStyle:Code
2313 \begin_layout Plain Layout
2320 Sensible only with resultdir and optional even then; if not given, it defaults
2324 \begin_layout Standard
2325 None of these last three are presently used in any of the converters that
2326 are installed with LyX.
2330 \begin_layout Standard
2331 You do not have to define converters for all formats between which you want
2333 For example, you will note that there is no `LyX to PostScript' converter,
2334 but LyX will export PostScript.
2335 It does so by first creating a LaTeX file (no converter needs to be defined
2336 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2337 and finally converting the resulting DVI file to PostScript.
2338 LyX finds such `chains' of converters automatically, and it will always
2339 choose the shortest possible chain.
2340 You can, though, still define multiple conversion methods between file
2342 For example, the standard LyX configuration provides three ways to convert
2343 LaTeX to PDF: Directly, using
2344 \begin_inset Flex CharStyle:MenuItem
2347 \begin_layout Plain Layout
2353 ; via (DVI and) PostScript, using
2354 \begin_inset Flex CharStyle:MenuItem
2357 \begin_layout Plain Layout
2364 \begin_inset Flex CharStyle:MenuItem
2367 \begin_layout Plain Layout
2374 To define such alternate chains, you must define multiple target `file
2375 formats', as described in section
2376 \begin_inset CommandInset ref
2378 reference "sec:Formats"
2383 For example, in the standard configuration, the formats named
2384 \begin_inset Flex CharStyle:MenuItem
2387 \begin_layout Plain Layout
2394 \begin_inset Flex CharStyle:MenuItem
2397 \begin_layout Plain Layout
2404 \begin_inset Flex CharStyle:MenuItem
2407 \begin_layout Plain Layout
2413 are defined, all of which share the extension
2414 \begin_inset Flex CharStyle:MenuItem
2417 \begin_layout Plain Layout
2423 , and which correspond to the conversion methods just mentioned.
2426 \begin_layout Chapter
2427 Internationalizing LyX
2428 \begin_inset CommandInset label
2430 name "cha:Internationalizing-LyX"
2437 \begin_layout Standard
2438 LyX supports using a translated interface.
2439 Last time we checked, LyX provided text in thirty languages.
2440 The language of choice is called your
2445 (For further reading on locale settings, see also the documentation for
2446 locale that comes with your operating system.
2447 For Linux, the manual page for
2448 \begin_inset Flex CharStyle:Code
2451 \begin_layout Plain Layout
2457 could be a good place to start).
2460 \begin_layout Standard
2461 Notice that these translations will work, but do contain a few flaws.
2462 In particular, all dialogs have been designed with the English text in
2463 mind, which means that some of the translated text will be too large to
2464 fit within the space allocated.
2465 This is only a display problem and will not cause any harm.
2466 Also, you will find that some of the translations do not define shortcut
2467 keys for everything.
2468 Sometimes, there are simply not enough free letters to do it.
2469 Other times, the translator just hasn't got around to doing it yet.
2470 Our localization team, which you may wish to join,
2474 \begin_layout Plain Layout
2475 If you are a fluent speaker of a language other than English, joining these
2476 teams is a great way to give back to the LyX community!
2481 will of course try to fix these shortcomings in future versions of LyX.
2484 \begin_layout Section
2488 \begin_layout Subsection
2489 Translating the graphical user interface (text messages).
2492 \begin_layout Standard
2494 \begin_inset Flex CharStyle:Code
2497 \begin_layout Plain Layout
2503 library to handle the internationalization of the interface.
2504 To have LyX speak your favorite language in all menus and dialogs, you
2506 \begin_inset Flex CharStyle:Code
2509 \begin_layout Plain Layout
2515 -file for that language.
2516 When this is available, you'll have to generate a
2517 \begin_inset Flex CharStyle:Code
2520 \begin_layout Plain Layout
2526 -file from it and install the
2527 \begin_inset Flex CharStyle:Code
2530 \begin_layout Plain Layout
2537 The process of doing all of this is explained in the documentation for
2539 \begin_inset Flex CharStyle:Code
2542 \begin_layout Plain Layout
2549 It is possible to do this just for yourself, but if you're going to do
2550 it, you might as well share the results of your labors with the rest of
2552 Send a message to the LyX developers' list for more information about how
2556 \begin_layout Standard
2557 In short, this is what you should do (xx denotes the language code):
2560 \begin_layout Itemize
2561 Check out the LyX source code.
2563 \begin_inset CommandInset href
2565 name "information on the web"
2566 target "http://www.lyx.org/devel/cvs.php"
2573 \begin_layout Itemize
2575 \begin_inset Flex CharStyle:Code
2578 \begin_layout Plain Layout
2584 to the folder of the
2585 \begin_inset Flex CharStyle:Code
2588 \begin_layout Plain Layout
2596 \begin_inset Flex CharStyle:Code
2599 \begin_layout Plain Layout
2607 \begin_inset Flex CharStyle:Code
2610 \begin_layout Plain Layout
2616 doesn't exist anywhere, it can be remade with the console command
2617 \begin_inset Flex CharStyle:Code
2620 \begin_layout Plain Layout
2626 in that directory, or you can use an existing po-file for some other language
2630 \begin_layout Itemize
2632 \begin_inset Flex CharStyle:Code
2635 \begin_layout Plain Layout
2645 \begin_layout Plain Layout
2646 This is just a text file, so it can be edited in any text editor.
2647 But there are also specialized programs that support such editing, such
2652 (for all platforms) or
2661 contains a `mode' for editing
2662 \begin_inset Flex CharStyle:Code
2665 \begin_layout Plain Layout
2676 For some menu- and widget-labels, there are also shortcut keys that should
2678 Those keys are marked after a `|', and should be translated according to
2679 the words and phrases of the language.
2680 You should also fill also out the information at the beginning of the new
2682 \begin_inset Flex CharStyle:Code
2685 \begin_layout Plain Layout
2691 -file with your email-address, etc., so people know where to reach you with
2692 suggestions and entertaining flames.
2695 \begin_layout Standard
2696 If you are just doing this on your own, then:
2699 \begin_layout Itemize
2701 \begin_inset Flex CharStyle:Code
2704 \begin_layout Plain Layout
2711 This can be done with
2712 \begin_inset Flex CharStyle:Code
2715 \begin_layout Plain Layout
2716 msgfmt -o xx.mo < xx.po
2724 \begin_layout Itemize
2726 \begin_inset Flex CharStyle:Code
2729 \begin_layout Plain Layout
2735 -file to your locale-tree, at the correct directory for application messages
2740 xx, and under the name
2741 \begin_inset Flex CharStyle:Code
2744 \begin_layout Plain Layout
2751 \begin_inset space \thinspace{}
2755 \begin_inset space \space{}
2759 \begin_inset Flex CharStyle:Code
2762 \begin_layout Plain Layout
2763 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2773 \begin_layout Standard
2774 As said, however, it would be best if the new
2775 \begin_inset Flex CharStyle:Code
2778 \begin_layout Plain Layout
2784 -file could be added to the LyX distribution, so others can use it.
2785 Adding it involves making additional changes to LyX.
2786 So send an email to the developers' mailing list if you're interested in
2790 \begin_layout Subsubsection
2794 \begin_layout Standard
2795 Sometimes it turns out that one English message needs to be translated into
2796 different messages in the target language.
2797 One example is the message
2798 \begin_inset Flex CharStyle:Code
2801 \begin_layout Plain Layout
2807 which has the German translation
2815 , depending upon exactly what the English
2816 \begin_inset Quotes eld
2820 \begin_inset Quotes erd
2825 \begin_inset Flex CharStyle:Code
2828 \begin_layout Plain Layout
2834 does not handle such ambiguous translations.
2835 Therefore you have to add some context information to the message: Instead
2837 \begin_inset Flex CharStyle:Code
2840 \begin_layout Plain Layout
2847 \begin_inset Flex CharStyle:Code
2850 \begin_layout Plain Layout
2851 To[[as in 'From format x to format y']]
2857 \begin_inset Flex CharStyle:Code
2860 \begin_layout Plain Layout
2861 To[[as in 'From page x to page y']].
2866 Now the two occurrences of
2867 \begin_inset Flex CharStyle:Code
2870 \begin_layout Plain Layout
2877 \begin_inset Flex CharStyle:Code
2880 \begin_layout Plain Layout
2886 and can be translated correctly to
2897 \begin_layout Standard
2898 Of course the context information needs to be stripped off the original
2899 message when no translation is used.
2900 Therefore you have to put it in double square brackets at the end of the
2901 message (see the example above).
2902 The translation mechanism of LyX ensures that everything in double square
2903 brackets at the end of messages is removed before displaying the message.
2906 \begin_layout Subsection
2907 Translating the documentation.
2910 \begin_layout Standard
2911 The online documentation (in the
2912 \begin_inset Flex CharStyle:MenuItem
2915 \begin_layout Plain Layout
2921 -menu) can (and should!) be translated.
2922 If there are translated versions of the documentation available
2926 \begin_layout Plain Layout
2927 As of March 2008, at least some of the documents have been translated into
2928 fourteen languages, with the Tutorial available in a few more.
2933 and the locale is set accordingly, these will be used automagically by
2935 LyX looks for translated versions as
2936 \begin_inset Flex CharStyle:Code
2939 \begin_layout Plain Layout
2940 LyXDir/doc/xx/DocName.lyx
2946 \begin_inset Flex CharStyle:Code
2949 \begin_layout Plain Layout
2955 is the code for the language currently in use.
2956 If there are no translated documents, the default English versions will
2958 Note that the translated versions must have the same filenames (
2959 \begin_inset Flex CharStyle:Code
2962 \begin_layout Plain Layout
2968 above) as the original.
2969 If you feel up to translating the documentation (an excellent way to proof-read
2970 the original documentation by the way!), there are a few things you should
2974 \begin_layout Itemize
2975 Check out the documentation translation web page at
2976 \begin_inset CommandInset href
2978 name "http://www.lyx.org/Translation"
2979 target "http://www.lyx.org/Translation"
2984 That way, you can find out which (if any) documents have already been translate
2985 d into your language.
2986 You can also find out who (if anyone) is organizing the effort to translate
2987 the documentation into your language.
2988 If no one is organizing the effort, please let us know that you're interested.
2991 \begin_layout Standard
2992 Once you get to actually translating, here's a few hints for you that may
2996 \begin_layout Itemize
2997 Join the documentation team! There is information on how to do that in
2998 \begin_inset Flex CharStyle:Code
3001 \begin_layout Plain Layout
3008 \begin_inset Flex CharStyle:MenuItem
3011 \begin_layout Plain Layout
3012 Help\SpecialChar \menuseparator
3018 ), which by the way is the first document you should translate.
3021 \begin_layout Itemize
3022 Learn the typographic conventions for the language you are translating to.
3023 Typography is an ancient art and over the centuries, a great variety of
3024 conventions have developed throughout different parts of the world.
3025 Also study the professional terminology amongst typographers in your country.
3026 Inventing your own terminology will only confuse the users.
3029 (Warning! Typography is addictive!)
3032 \begin_layout Itemize
3033 Make a copy of the document.
3034 This will be your working copy.
3035 You can use this as your personal translated help-file by placing it in
3037 \begin_inset Flex CharStyle:Code
3040 \begin_layout Plain Layout
3049 \begin_layout Itemize
3050 Sometimes the original document (from the LyX-team) will be updated.
3051 Use the source viewer at
3052 \begin_inset CommandInset href
3054 name "http://www.lyx.org/trac/timeline"
3055 target "http://www.lyx.org/trac/timeline"
3059 to see what has been changed.
3060 That way you can easily see which parts of the translated document need
3064 \begin_layout Standard
3065 If you ever find an error in the original document, fix it and notify the
3066 rest of the documentation team of the changes! (You didn't forget to join
3067 the documentation team, did you?)
3070 \begin_layout Standard
3071 \begin_inset Branch OutDated
3074 \begin_layout Section
3075 International Keyboard Support
3078 \begin_layout Standard
3081 [Editor's Note: The following section is by
3089 It needs to be fixed to conform to the new Documentation Style sheet and
3090 to make use of the new v1.0 features.
3091 The whole thing also needs to be merged with the section following it.-jw
3092 It may also be badly out of date.-rh (2008)]
3095 \begin_layout Subsection
3096 Defining Own Keymaps: Keymap File Format
3099 \begin_layout Standard
3100 Let's look at a keyboard definition file a little closer.
3101 It is a plain text file defining
3104 \begin_layout Itemize
3105 key-to-key or key-to-string translations
3108 \begin_layout Itemize
3112 \begin_layout Itemize
3113 dead keys exceptions
3116 \begin_layout Standard
3117 To define key-to-key or key-to-string translation, use this command:
3120 \begin_layout Quotation
3121 \begin_inset Flex CharStyle:Code
3124 \begin_layout Plain Layout
3133 \begin_inset Flex CharStyle:Code
3136 \begin_layout Plain Layout
3145 \begin_layout Standard
3147 \begin_inset Flex CharStyle:Code
3150 \begin_layout Plain Layout
3156 is the key to be translated and
3157 \begin_inset Flex CharStyle:Code
3160 \begin_layout Plain Layout
3166 is the string to be inserted into the document.
3167 To define dead keys, use:
3170 \begin_layout Quotation
3171 \begin_inset Flex CharStyle:Code
3174 \begin_layout Plain Layout
3183 \begin_inset Flex CharStyle:Code
3186 \begin_layout Plain Layout
3195 \begin_layout Standard
3197 \begin_inset Flex CharStyle:Code
3200 \begin_layout Plain Layout
3206 is a keyboard key and
3207 \begin_inset Flex CharStyle:Code
3210 \begin_layout Plain Layout
3217 The following dead keys are supported (shortcut name is in parentheses):
3220 \begin_layout Quotation
3224 \begin_inset space \hfill{}
3230 \begin_layout Quotation
3232 \begin_inset space \hfill{}
3238 \begin_layout Quotation
3240 \begin_inset space \hfill{}
3246 \begin_layout Quotation
3248 \begin_inset space \hfill{}
3254 \begin_layout Quotation
3256 \begin_inset space \hfill{}
3262 \begin_layout Quotation
3264 \begin_inset space \hfill{}
3271 \begin_layout Plain Layout
3283 \begin_layout Quotation
3285 \begin_inset space \hfill{}
3291 \begin_layout Quotation
3293 \begin_inset space \hfill{}
3300 \begin_layout Plain Layout
3312 \begin_layout Quotation
3314 \begin_inset space \hfill{}
3320 \begin_layout Quotation
3322 \begin_inset space \hfill{}
3328 \begin_layout Quotation
3330 \begin_inset space \hfill{}
3337 \begin_layout Plain Layout
3349 \begin_layout Quotation
3351 \begin_inset space \hfill{}
3358 \begin_layout Plain Layout
3370 \begin_layout Quotation
3372 \begin_inset space \hfill{}
3378 \begin_layout Quotation
3379 hungarian umlaut (hug)
3380 \begin_inset space \hfill{}
3386 \begin_layout Quotation
3388 \begin_inset space \hfill{}
3394 \begin_layout Quotation
3396 \begin_inset space \hfill{}
3403 \begin_layout Plain Layout
3415 \begin_layout Standard
3416 Since in many international keyboards there are exceptions to what some
3417 dead keys should do, you can define them using
3420 \begin_layout Quotation
3421 \begin_inset Flex CharStyle:Code
3424 \begin_layout Plain Layout
3432 deadkey key outstring
3435 \begin_layout Standard
3436 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3440 \begin_layout Quotation
3441 \begin_inset Flex CharStyle:Code
3444 \begin_layout Plain Layout
3457 \begin_layout Standard
3458 to make it work correctly.
3459 Also, you have to define as exceptions dead keys over i and j, to remove
3460 the dot from them before inserting an accent mark.
3461 I will change this when the time comes, but so far I haven't had time.
3464 \begin_layout Standard
3465 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3468 \begin_inset Flex CharStyle:Code
3471 \begin_layout Plain Layout
3477 have different meaning.
3479 \begin_inset Flex CharStyle:Code
3482 \begin_layout Plain Layout
3488 marks comments, quotes start and end LaTeX-style commands.
3489 To enter quote, you'll need to use
3490 \begin_inset Flex CharStyle:Code
3493 \begin_layout Plain Layout
3502 \begin_inset Flex CharStyle:Code
3505 \begin_layout Plain Layout
3512 \begin_inset Flex CharStyle:Code
3515 \begin_layout Plain Layout
3526 \begin_layout Standard
3527 If you make a keyboard description file that works for your language, please
3528 mail it to me, so I can include it in the next keymap distribution.
3531 \begin_layout Standard
3532 More keywords will be supported in keymap configuration file in future,
3536 \begin_layout Itemize
3537 \begin_inset Flex CharStyle:Code
3540 \begin_layout Plain Layout
3551 \begin_inset space \hfill{}
3555 \begin_inset Flex CharStyle:Code
3558 \begin_layout Plain Layout
3567 \begin_layout Itemize
3568 \begin_inset Flex CharStyle:Code
3571 \begin_layout Plain Layout
3582 \begin_inset space \hfill{}
3586 \begin_inset Flex CharStyle:Code
3589 \begin_layout Plain Layout
3595 an external keymap translation program
3598 \begin_layout Standard
3599 Also, it should look into
3600 \begin_inset Flex CharStyle:Code
3603 \begin_layout Plain Layout
3609 file for defaults, too (for example, a
3610 \begin_inset Flex CharStyle:Code
3613 \begin_layout Plain Layout
3621 option to include default keyboard).
3629 \begin_layout Section
3630 International Keymap Stuff
3631 \begin_inset CommandInset label
3633 name "sec:International-Keymap-Stuff"
3640 \begin_layout Standard
3641 \begin_inset Note Note
3644 \begin_layout Plain Layout
3645 In doing the revisions on this document in March 2008, I did not look over
3646 this stuff, as I do not understand it.
3647 It would be good if someone else could do so.
3656 \begin_layout Standard
3657 The next two sections describe the
3658 \begin_inset Flex CharStyle:Code
3661 \begin_layout Plain Layout
3670 \begin_inset Flex CharStyle:Code
3673 \begin_layout Plain Layout
3681 file syntax in detail.
3682 These sections should help you design your own key map if the ones provided
3683 do not meet your needs.
3686 \begin_layout Subsection
3690 \begin_layout Standard
3694 \begin_inset Flex CharStyle:Code
3697 \begin_layout Plain Layout
3703 file maps keystrokes to characters or strings.
3704 As the name suggests, it sets a keyboard mapping.
3706 \begin_inset Flex CharStyle:Code
3709 \begin_layout Plain Layout
3720 \begin_inset Flex CharStyle:Code
3723 \begin_layout Plain Layout
3738 \begin_inset Flex CharStyle:Code
3741 \begin_layout Plain Layout
3754 \begin_inset Flex CharStyle:Code
3757 \begin_layout Plain Layout
3766 \begin_inset Flex CharStyle:Code
3769 \begin_layout Plain Layout
3777 are described in this section.
3780 \begin_layout Labeling
3781 \labelwidthstring 00.00.0000
3782 \begin_inset Flex CharStyle:Code
3785 \begin_layout Plain Layout
3793 Map a character to a string
3796 \begin_layout LyX-Code
3811 \begin_layout Standard
3844 the double-quote (")
3861 must be escaped with a preceding backslash (
3872 \begin_layout Standard
3874 \begin_inset Flex CharStyle:MenuItem
3877 \begin_layout Plain Layout
3885 statement to cause the symbol
3886 \begin_inset Flex CharStyle:MenuItem
3889 \begin_layout Plain Layout
3897 to be output for the keystroke
3898 \begin_inset Flex CharStyle:MenuItem
3901 \begin_layout Plain Layout
3912 \begin_layout LyX-Code
3918 \begin_layout Labeling
3919 \labelwidthstring 00.00.0000
3920 \begin_inset Flex CharStyle:Code
3923 \begin_layout Plain Layout
3931 Specify an accent character
3934 \begin_layout LyX-Code
3943 \begin_layout Standard
3944 This will make the cha
3982 This is the dead key
3986 \begin_layout Plain Layout
3993 refers to a key that does not produce a character by itself, but when followed
3994 with another key, produces the desired accent character.
3995 For example, a German characte
3997 r with an umlaut like
4007 can be produced in this manner.
4016 \begin_layout Standard
4029 and then another key not in
4046 followed by the other, not allowed key, as output.
4050 \begin_inset Flex CharStyle:MenuItem
4053 \begin_layout Plain Layout
4061 cancels a dead key, so if
4072 \begin_inset Flex CharStyle:MenuItem
4075 \begin_layout Plain Layout
4084 , the cursor will not go one position backwards but will instead cancel
4100 might have had on the next keystroke.
4104 \begin_layout Standard
4105 The following example specifies that the character ' is to be an acute accent,
4106 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4109 \begin_layout LyX-Code
4112 kmod ' acute aeiouAEIOU
4115 \begin_layout Labeling
4116 \labelwidthstring 00.00.0000
4117 \begin_inset Flex CharStyle:Code
4120 \begin_layout Plain Layout
4126 Specify an exception to the accent character
4129 \begin_layout LyX-Code
4138 \begin_layout Standard
4139 This defines an exce
4180 have been assigned a keystroke with a previous
4183 \begin_inset Flex CharStyle:Code
4186 \begin_layout Plain Layout
4210 must not belong in the
4257 If such a declaration does not exist in
4265 \begin_inset Flex CharStyle:Code
4268 \begin_layout Plain Layout
4302 \begin_inset Flex CharStyle:Code
4305 \begin_layout Plain Layout
4319 \begin_layout Standard
4320 The following command produces causes äi to be produced when you enter acute-i
4324 \begin_layout LyX-Code
4338 \begin_layout Labeling
4339 \labelwidthstring 00.00.0000
4340 \begin_inset Flex CharStyle:Code
4343 \begin_layout Plain Layout
4349 Combine two accent characters
4352 \begin_layout LyX-Code
4358 accent1 accent2 allowed
4361 \begin_layout Standard
4362 This one is getting pretty esoteric.
4363 It allows you to combine the effect
4419 \begin_inset Flex CharStyle:Code
4422 \begin_layout Plain Layout
4450 \begin_layout Standard
4451 Consider this example from the
4452 \begin_inset Flex CharStyle:Code
4455 \begin_layout Plain Layout
4466 \begin_layout LyX-Code
4469 kmod ; acute aeioyvhAEIOYVH
4473 kcomb acute umlaut iyIY
4476 \begin_layout Standard
4477 This allows you to press
4478 \begin_inset Flex CharStyle:MenuItem
4481 \begin_layout Plain Layout
4489 and get the effect of
4490 \begin_inset Flex CharStyle:Code
4493 \begin_layout Plain Layout
4512 in this case cancels the last dead key, so if you press
4513 \begin_inset Flex CharStyle:MenuItem
4516 \begin_layout Plain Layout
4525 \begin_inset Flex CharStyle:Code
4528 \begin_layout Plain Layout
4541 \begin_layout Subsection
4545 \begin_layout Standard
4547 \begin_inset Flex CharStyle:Code
4550 \begin_layout Plain Layout
4558 mapping is performed, a
4559 \begin_inset Flex CharStyle:Code
4562 \begin_layout Plain Layout
4572 file maps the strings that the symbols generate to characters in the current
4574 The LyX distribution currently includes at least the
4575 \begin_inset Flex CharStyle:Code
4578 \begin_layout Plain Layout
4587 \begin_inset Flex CharStyle:Code
4590 \begin_layout Plain Layout
4601 \begin_layout Standard
4603 \begin_inset Flex CharStyle:Code
4606 \begin_layout Plain Layout
4614 file is a sequence of declarations of the form
4617 \begin_layout LyX-Code
4630 \begin_layout Standard
4631 For example, in order to map
4632 \begin_inset Flex CharStyle:MenuItem
4635 \begin_layout Plain Layout
4645 to the corresponding character in the iso-8859-1 set (233), the following
4649 \begin_layout LyX-Code
4657 \begin_layout Standard
4659 \begin_inset Flex CharStyle:Code
4662 \begin_layout Plain Layout
4671 \begin_inset Flex CharStyle:Code
4674 \begin_layout Plain Layout
4692 the same character can apply to more than one string.
4694 \begin_inset Flex CharStyle:Code
4697 \begin_layout Plain Layout
4708 \begin_layout LyX-Code
4720 \begin_inset Newline newline
4736 \begin_layout Standard
4737 If LyX cannot find a mapping for the string produced by the keystroke or
4738 a deadkey sequence, it will check if it looks like an accented char and
4739 try to draw an accent over the character on screen.
4742 \begin_layout Subsection
4746 \begin_layout Standard
4747 There is a second way to add support for international characters through
4748 so-called dead-keys.
4749 A dead-key works in combination with a letter to produce an accented character.
4750 Here, we'll explain how to create a really simple dead-key to illustrate
4754 \begin_layout Standard
4755 Suppose you happen to need the circumflex character,
4756 \begin_inset Quotes eld
4760 \begin_inset Quotes erd
4765 \begin_inset Flex CharStyle:MenuItem
4768 \begin_layout Plain Layout
4775 \begin_inset space ~
4779 \begin_inset Flex CharStyle:MenuItem
4782 \begin_layout Plain Layout
4788 ] to the LyX command
4789 \begin_inset Flex CharStyle:Code
4792 \begin_layout Plain Layout
4799 \begin_inset Flex CharStyle:Code
4802 \begin_layout Plain Layout
4809 Now, whenever you type the
4810 \begin_inset Flex CharStyle:MenuItem
4813 \begin_layout Plain Layout
4819 -key followed by a letter, that letter will have a circumflex accent on
4821 For example, the sequence
4822 \begin_inset Quotes eld
4826 \begin_inset Flex CharStyle:MenuItem
4829 \begin_layout Plain Layout
4836 \begin_inset Quotes erd
4839 produces the letter:
4840 \begin_inset Quotes eld
4844 \begin_inset Quotes erd
4848 If you tried to type
4849 \begin_inset Quotes eld
4853 \begin_inset Flex CharStyle:MenuItem
4856 \begin_layout Plain Layout
4863 \begin_inset Quotes erd
4866 , however, LyX will complain with a beep, since a
4867 \begin_inset Quotes eld
4871 \begin_inset Flex CharStyle:MenuItem
4874 \begin_layout Plain Layout
4881 \begin_inset Quotes erd
4884 never takes a circumflex accent.
4886 \begin_inset Flex CharStyle:MenuItem
4889 \begin_layout Plain Layout
4895 after a dead-key produces the bare-accent.
4896 Please note this last point! If you bind a key to a dead-key, you'll need
4897 to rebind the character on that key to yet another key.
4899 \begin_inset Flex CharStyle:MenuItem
4902 \begin_layout Plain Layout
4908 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
4911 \begin_layout Standard
4912 One common way to bind dead-keys is to use
4913 \begin_inset Flex CharStyle:MenuItem
4916 \begin_layout Plain Layout
4923 \begin_inset Flex CharStyle:MenuItem
4926 \begin_layout Plain Layout
4933 \begin_inset Flex CharStyle:MenuItem
4936 \begin_layout Plain Layout
4942 in combination with an accent, like
4943 \begin_inset Quotes eld
4947 \begin_inset Flex CharStyle:MenuItem
4950 \begin_layout Plain Layout
4957 \begin_inset Quotes erd
4961 \begin_inset Quotes eld
4965 \begin_inset Flex CharStyle:MenuItem
4968 \begin_layout Plain Layout
4975 \begin_inset Quotes erd
4979 \begin_inset Quotes eld
4983 \begin_inset Flex CharStyle:MenuItem
4986 \begin_layout Plain Layout
4993 \begin_inset Quotes erd
4997 Another way involves using
4998 \begin_inset Flex CharStyle:Code
5001 \begin_layout Plain Layout
5008 \begin_inset Flex CharStyle:Code
5011 \begin_layout Plain Layout
5017 to set up the special
5018 \begin_inset Flex CharStyle:Code
5021 \begin_layout Plain Layout
5029 \begin_inset Flex CharStyle:Code
5032 \begin_layout Plain Layout
5038 acts in some ways just like
5039 \begin_inset Flex CharStyle:MenuItem
5042 \begin_layout Plain Layout
5048 and permits you to bind keys to accented characters.
5049 You can also turn keys into dead-keys by binding them to something like
5051 \begin_inset Flex CharStyle:Code
5054 \begin_layout Plain Layout
5060 and then binding this symbolic key to the corresponding LyX command.
5064 \begin_layout Plain Layout
5069 : This is exactly what I do in my
5070 \begin_inset Flex CharStyle:Code
5073 \begin_layout Plain Layout
5080 \begin_inset Flex CharStyle:Code
5083 \begin_layout Plain Layout
5091 \begin_inset Flex CharStyle:MenuItem
5094 \begin_layout Plain Layout
5096 \begin_inset space ~
5105 \begin_inset Flex CharStyle:Code
5108 \begin_layout Plain Layout
5114 and a bunch of these
5115 \begin_inset Quotes eld
5119 \begin_inset Flex CharStyle:Code
5122 \begin_layout Plain Layout
5129 \begin_inset Quotes erd
5132 symbolic keys bound such things as
5133 \begin_inset Flex CharStyle:MenuItem
5136 \begin_layout Plain Layout
5138 \begin_inset space ~
5147 \begin_inset Flex CharStyle:MenuItem
5150 \begin_layout Plain Layout
5152 \begin_inset space ~
5161 This is how I produce my accented characters.
5166 You can make just about anything into the
5167 \begin_inset Flex CharStyle:Code
5170 \begin_layout Plain Layout
5177 \begin_inset Flex CharStyle:MenuItem
5180 \begin_layout Plain Layout
5186 keys, a spare function key, etc.
5187 As for the LyX commands that produce accents, check the entry for
5188 \begin_inset Flex CharStyle:Code
5191 \begin_layout Plain Layout
5202 You'll find the complete list there.
5205 \begin_layout Subsection
5206 Saving your Language Configuration
5209 \begin_layout Standard
5210 You can edit your preferences so that your desired language environment
5211 is automatically configured when LyX starts up, via the
5212 \begin_inset Flex CharStyle:MenuItem
5215 \begin_layout Plain Layout
5216 Edit\SpecialChar \menuseparator
5225 \begin_layout Chapter
5226 Installing New Document Classes, Layouts, and Templates
5227 \begin_inset CommandInset label
5229 name "cha:Installing-New-Document"
5237 \begin_layout Plain Layout
5238 Installing New Document Classes
5246 \begin_layout Standard
5247 In this chapter, we describe the procedures for creating and installing
5248 new LyX layout and template files, as well as offer a refresher on correctly
5249 installing new LaTeX document classes.
5250 Some definitions: a document class is a LaTeX file (usually ending in
5251 \begin_inset Flex CharStyle:Code
5254 \begin_layout Plain Layout
5261 \begin_inset Flex CharStyle:Code
5264 \begin_layout Plain Layout
5270 ) that describes the format of a document such as an article, report, journal
5271 preprint, etc, and all the commands needed to realize that format.
5272 A layout file is a LyX file that corresponds to a LaTeX document class
5273 and that tells LyX how to
5274 \begin_inset Quotes eld
5278 \begin_inset Quotes erd
5281 things on the screen to make the display look something like the final
5283 More precisely, a layout file describes a
5284 \begin_inset Quotes eld
5288 \begin_inset Quotes erd
5291 which is the internal construct LyX uses to render the screen display.
5293 \begin_inset Quotes eld
5297 \begin_inset Quotes erd
5301 \begin_inset Quotes eld
5305 \begin_inset Quotes erd
5308 can be used somewhat interchangeably, but it is better to refer to the
5309 file as the layout, and the thing living in LyX's memory as the text class.
5310 A template file is simply a LyX document that contains a set of predefined
5311 entries for a given document class—entries that are generally required
5313 Templates are especially useful for things like journal manuscripts that
5314 are to be submitted electronically.
5317 \begin_layout Section
5318 Installing a new LaTeX package
5321 \begin_layout Standard
5322 Some installations may not include a LaTeX package that you would like to
5324 For example, you might need FoilTeX, a package for preparing slides or
5325 viewgraphs for overhead projectors.
5326 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5327 a user interface for that.
5328 For example on MiKTeX you start its program
5329 \begin_inset Quotes eld
5333 \begin_inset Quotes erd
5336 to get a list of available packages.
5337 To install one, right click on it or use the installing toolbar button.
5338 When the package you want to install is not in the list, but you have it
5340 \begin_inset Flex CharStyle:Code
5343 \begin_layout Plain Layout
5350 \begin_inset Flex CharStyle:Code
5353 \begin_layout Plain Layout
5359 -file, then copy these files to a subfolder of your LaTeX distribution,
5360 for example to the folder
5369 Then update the file name database of your LaTeX-distribution.
5370 For example on MiKTeX this is done by pressing the button
5373 \begin_inset space ~
5378 that you find in MiKTeX's
5379 \begin_inset Quotes eld
5383 \begin_inset Quotes erd
5387 In both cases you need afterwards to reconfigure LyX using the menu
5388 \begin_inset Flex CharStyle:MenuItem
5391 \begin_layout Plain Layout
5392 Tools\SpecialChar \menuseparator
5398 and then to restart LyX.
5401 \begin_layout Standard
5402 If your LaTeX distribution doesn't provide a user interface, then you can
5403 follow these steps by using a UNIX/Linux console.
5406 \begin_layout Enumerate
5407 Get the package from
5408 \begin_inset CommandInset href
5411 target "http://www.ctan.org/"
5418 \begin_layout Enumerate
5419 You can install this package in several different places.
5420 If you want it to be available for all users on your system, then you should
5421 install it in your `local' TeX tree; if you want (or need) it to be available
5422 just for you, then you can install it in your own `user' TeX tree.
5423 Where these should be created, if they do not already exist, depends upon
5424 the details of your system.
5425 To find out, look in the file
5426 \begin_inset Flex CharStyle:Code
5429 \begin_layout Plain Layout
5439 \begin_layout Plain Layout
5440 This usually lives in the directory
5441 \begin_inset Flex CharStyle:Code
5444 \begin_layout Plain Layout
5450 , though you can run
5451 \begin_inset Flex CharStyle:Code
5454 \begin_layout Plain Layout
5465 The location of the `local' TeX tree is defined by
5466 \begin_inset Flex CharStyle:Code
5469 \begin_layout Plain Layout
5475 ; this is usually somewhere like
5476 \begin_inset Flex CharStyle:Code
5479 \begin_layout Plain Layout
5480 /usr/local/share/texmf/
5486 The `user' TeX tree is defined by
5487 \begin_inset Flex CharStyle:Code
5490 \begin_layout Plain Layout
5497 \begin_inset Flex CharStyle:Code
5500 \begin_layout Plain Layout
5507 (If these variables are not predefined, you can define them.) You'll probably
5508 need root permissions to create or modify the `local' tree; but your `user'
5509 tree shouldn't have such limitations.
5512 \begin_layout Enumerate
5514 \begin_inset Flex CharStyle:Code
5517 \begin_layout Plain Layout
5524 \begin_inset Flex CharStyle:Code
5527 \begin_layout Plain Layout
5534 \begin_inset Flex CharStyle:Code
5537 \begin_layout Plain Layout
5544 \begin_inset space \thinspace{}
5548 \begin_inset Newline newline
5552 \begin_inset Flex CharStyle:Code
5555 \begin_layout Plain Layout
5556 TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
5562 \begin_inset Newline newline
5565 But, again, most of this will
5566 \begin_inset Quotes eld
5570 \begin_inset Quotes erd
5576 \begin_layout Enumerate
5581 \begin_layout Plain Layout
5582 We'll assume henceforth that you're defining `local' TeX tree.
5583 If you're defining a user tree, just adjust as necessary.
5589 You must follow the directory structure of your existing
5590 \begin_inset Flex CharStyle:Code
5593 \begin_layout Plain Layout
5599 directory, which will be found at
5600 \begin_inset Flex CharStyle:Code
5603 \begin_layout Plain Layout
5610 For example, latex packages should go under
5611 \begin_inset Flex CharStyle:Code
5614 \begin_layout Plain Layout
5615 $TEXMFLOCAL/tex/latex/
5623 \begin_layout Enumerate
5624 Install the package.
5625 For example, you would unpack the FoilTeX tarball and copy it to
5626 \begin_inset Flex CharStyle:Code
5629 \begin_layout Plain Layout
5630 $TEXMFLOCAL/tex/latex/foiltex
5637 \begin_inset Flex CharStyle:Code
5640 \begin_layout Plain Layout
5646 directory contains various files.
5649 \begin_layout Enumerate
5651 \begin_inset Flex CharStyle:Code
5654 \begin_layout Plain Layout
5662 \begin_inset Flex CharStyle:Code
5665 \begin_layout Plain Layout
5674 \begin_layout Standard
5675 Your package is now installed and available to LaTeX.
5676 To make it available to LyX, you need to create a Layout file, if one is
5677 not already available.
5678 (See the next section.) Once you have a layout file, you need only reconfigure
5680 \begin_inset Flex CharStyle:MenuItem
5683 \begin_layout Plain Layout
5684 Tools\SpecialChar \menuseparator
5690 ) and then restart LyX.
5691 You should then see your new package—for example
5692 \begin_inset Flex CharStyle:MenuItem
5695 \begin_layout Plain Layout
5702 \begin_inset Flex CharStyle:MenuItem
5705 \begin_layout Plain Layout
5706 Document\SpecialChar \menuseparator
5713 \begin_inset Flex CharStyle:MenuItem
5716 \begin_layout Plain Layout
5726 \begin_layout Section
5730 \begin_layout Standard
5731 This section describes how to write and install your own LyX layout files
5732 and walks through the
5733 \begin_inset Flex CharStyle:Code
5736 \begin_layout Plain Layout
5742 text class format as an example.
5744 \begin_inset Flex CharStyle:Code
5747 \begin_layout Plain Layout
5753 files describe what paragraph and character styles are available for a
5754 given document class and how LyX should display them.
5755 We try to provide a thorough description of the process here; however,
5756 there are so many different types of documents supported by LaTeX classes
5757 that we can't hope to cover every different possibility or problem you
5759 (The LyX users' list is frequented by people with lots of experience with
5760 layout design who are willing to share what they've learned.)
5763 \begin_layout Standard
5764 As you prepare to write a new layout, it is extremely helpful to look at
5765 the example layouts distributed with LyX.
5766 If you use a nice LaTeX document class that might be of interest for others,
5767 too, and have a nice corresponding LyX layout, feel free to contribute
5768 the stuff to us, so we may put it into the distribution.
5770 \begin_inset CommandInset href
5772 name "section on the LyX wiki"
5773 target "http://wiki.lyx.org/Layouts/Layouts"
5777 for this kind of material.
5780 \begin_layout Standard
5781 All the tags described in this chapter are case-insensitive; this means
5783 \begin_inset Flex CharStyle:Code
5786 \begin_layout Plain Layout
5793 \begin_inset Flex CharStyle:Code
5796 \begin_layout Plain Layout
5803 \begin_inset Flex CharStyle:Code
5806 \begin_layout Plain Layout
5812 are really the same command.
5813 The possible values are printed in brackets after the feature's name.
5814 The default value if a feature isn't specified inside a text class-description
5816 \begin_inset Flex CharStyle:Code
5819 \begin_layout Plain Layout
5828 If the argument has a data type like
5829 \begin_inset Quotes eld
5833 \begin_inset Quotes erd
5837 \begin_inset Quotes eld
5841 \begin_inset Quotes erd
5844 , the default is shown like this:
5845 \begin_inset Flex CharStyle:Code
5848 \begin_layout Plain Layout
5859 \begin_layout Subsection
5861 \begin_inset CommandInset label
5863 name "sub:Layout-modules"
5870 \begin_layout Standard
5871 Similar to layout files, and new with LyX 1.6, are layout
5876 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
5877 some modules—such as the endnotes module—provide support for just such
5879 In a sense, layout modules are similar to included files—files like
5880 \begin_inset Flex CharStyle:Code
5883 \begin_layout Plain Layout
5889 —in that modules are not specific to a given document layout but may be
5890 used with many different layouts.
5891 The difference is that using a layout module does not require editing the
5893 Rather, modules are selected in the
5894 \begin_inset Flex CharStyle:MenuItem
5897 \begin_layout Plain Layout
5898 Document\SpecialChar \menuseparator
5907 \begin_layout Standard
5908 Building modules is the easiest way to get started with layout editing,
5909 since it can be as simple as adding a single new paragraph or flex inset.
5910 But modules may, in principle, contain anything a layout file can contain.
5913 \begin_layout Standard
5914 A module must begin with a line like the following:
5917 \begin_layout LyX-Code
5920 DeclareLyXModule[endnotes.sty]{Endnotes}
5923 \begin_layout Standard
5924 The mandatory argument, in curly brackets, is the name of the module, as
5926 \begin_inset Flex CharStyle:MenuItem
5929 \begin_layout Plain Layout
5930 Document\SpecialChar \menuseparator
5937 The argument in square brackets is optional: It declares any LaTeX packages
5938 on which the module depends.
5939 Please note that only packages about which LyX knows should be listed in
5940 the square brackets.
5944 \begin_layout Plain Layout
5945 The list of such packages is documented only in the source code.
5950 LyX will not check for arbitrary packages.
5951 It is also possible to use the form
5952 \begin_inset Flex CharStyle:MenuItem
5955 \begin_layout Plain Layout
5961 , which declares that the module can only be used when there exists a conversion
5962 chain between formats `from' and `to'.
5965 \begin_layout Standard
5966 The module declaration should then be followed by lines like the following:
5969 \begin_layout LyX-Code
5973 \begin_layout LyX-Code
5974 #Adds an endnote command, in addition to footnotes.
5978 \begin_layout LyX-Code
5979 #You will need to add
5981 theendnotes in TeX code where you
5984 \begin_layout LyX-Code
5985 #want the endnotes to appear.
5989 \begin_layout LyX-Code
5993 \begin_layout LyX-Code
5994 #Requires: somemodule | othermodule
5997 \begin_layout LyX-Code
5998 #Excludes: badmodule
6001 \begin_layout Standard
6002 The description is used in
6003 \begin_inset Flex CharStyle:MenuItem
6006 \begin_layout Plain Layout
6007 Document\SpecialChar \menuseparator
6013 to provide the user with information about what the module does.
6015 \begin_inset Flex CharStyle:Code
6018 \begin_layout Plain Layout
6024 line is used to identify other modules with which this one must be used;
6026 \begin_inset Flex CharStyle:Code
6029 \begin_layout Plain Layout
6035 line is used to identify modules with which this one may not be used.
6036 Both are optional, and, as shown, multiple modules should be separated
6037 with the pipe symbol: |.
6038 Note that the required modules are treated disjunctively:
6042 of the required modules must be used.
6047 excluded module may be used.
6048 Note that modules are identified here by their
6052 without the .module extension.
6054 \begin_inset Flex CharStyle:Code
6057 \begin_layout Plain Layout
6064 \begin_inset Flex CharStyle:Code
6067 \begin_layout Plain Layout
6076 \begin_layout Standard
6077 After creating a new module, you will need to reconfigure and then restart
6078 LyX for the module to appear in the menu.
6079 However, changes you make to the module will be seen immediately, if you
6081 \begin_inset Flex CharStyle:MenuItem
6084 \begin_layout Plain Layout
6085 Document\SpecialChar \menuseparator
6091 , highlight something, and then hit
6092 \begin_inset Quotes eld
6096 \begin_inset Quotes erd
6102 It is strongly recommended that you save your work before doing so
6107 it is strongly recommended that you not attempt to edit modules while simultaneo
6108 usly working on documents
6111 Though of course the developers strive to keep LyX stable in such situations,
6112 syntax errors and the like in your module file could cause strange behavior.
6115 \begin_layout Subsection
6116 Supporting new document classes
6119 \begin_layout Standard
6120 There are two situations you are likely to encounter when wanting to support
6121 a new LaTeX document class, involving LaTeX2e class (
6122 \begin_inset Flex CharStyle:Code
6125 \begin_layout Plain Layout
6132 \begin_inset Flex CharStyle:Code
6135 \begin_layout Plain Layout
6142 Supporting a style file is usually fairly easy.
6143 Supporting a new document class is a bit harder.
6146 \begin_layout Subsection
6148 \begin_inset Flex CharStyle:MenuItem
6151 \begin_layout Plain Layout
6160 \begin_layout Standard
6161 If your new document class is provided as a style file that is used in conjuncti
6162 on with an existing, supported document class—for the sake of the example,
6163 we'll assume that the style file is called
6164 \begin_inset Flex CharStyle:MenuItem
6167 \begin_layout Plain Layout
6173 and it is meant to be used with
6174 \begin_inset Flex CharStyle:MenuItem
6177 \begin_layout Plain Layout
6183 , which is a standard class—start by copying the existing class's layout
6184 file into your local directory:
6187 \begin_layout LyX-Code
6188 cp report.layout ~/.lyx/layouts/myclass.layout
6191 \begin_layout Standard
6193 \begin_inset Flex CharStyle:Code
6196 \begin_layout Plain Layout
6202 and change the line:
6205 \begin_layout LyX-Code
6208 DeclareLaTeXClass{report}
6211 \begin_layout Standard
6215 \begin_layout LyX-Code
6218 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6221 \begin_layout Standard
6225 \begin_layout LyX-Code
6227 \begin_inset Newline newline
6233 \begin_inset Newline newline
6239 \begin_layout Standard
6240 near the top of the file.
6243 \begin_layout Standard
6244 Start LyX and select
6245 \begin_inset Flex CharStyle:MenuItem
6248 \begin_layout Plain Layout
6249 Tools\SpecialChar \menuseparator
6256 Then restart LyX and try creating a new document.
6258 \begin_inset Flex CharStyle:MenuItem
6261 \begin_layout Plain Layout
6267 " as a document class option in the
6268 \begin_inset Flex CharStyle:MenuItem
6271 \begin_layout Plain Layout
6272 Document\SpecialChar \menuseparator
6279 It is likely that some of the sectioning commands and such in your new
6280 class will work differently from how they worked in the base class—
6281 \begin_inset Flex CharStyle:Code
6284 \begin_layout Plain Layout
6290 in this example—so you can fiddle around with the settings for the different
6291 sections if you wish.
6294 \begin_layout Subsection
6296 \begin_inset Flex CharStyle:MenuItem
6299 \begin_layout Plain Layout
6308 \begin_layout Standard
6309 There are two possibilities here.
6310 One is that the class file is itself based upon an existing document class.
6311 For example, many thesis classes are based upon
6312 \begin_inset Flex CharStyle:MenuItem
6315 \begin_layout Plain Layout
6322 To see whether yours is, look for a line like
6325 \begin_layout LyX-Code
6331 \begin_layout Standard
6333 If so, then you may proceed largely as in the previous section, though
6334 the DeclareLaTeXClass line will be different.
6335 If your new class is thesis, and it is based upon book, then the line should
6340 \begin_layout Plain Layout
6341 And it will be easiest if you save the file to
6342 \begin_inset Flex CharStyle:Code
6345 \begin_layout Plain Layout
6351 : LyX assumes that the document class has the same name as the layout file.
6360 \begin_layout LyX-Code
6363 DeclareLaTeXClass[thesis,book]{thesis}
6366 \begin_layout Standard
6367 If, on the other hand, the new class is not based upon an existing class,
6368 you will probably have to
6369 \begin_inset Quotes eld
6373 \begin_inset Quotes erd
6377 We strongly suggest copying an existing layout file which uses a similar
6378 LaTeX class and then modifying it, if you can do so.
6379 At least use an existing file as a starting point so you can find out what
6380 items you need to worry about.
6381 Again, the specifics are covered below.
6384 \begin_layout Section
6385 Declaring a new text class
6388 \begin_layout Standard
6389 When it's finally time to get your hands dirty and create or edit your own
6390 layout file, the following sections describe what you're up against.
6391 Our advice is to go slowly, save and test often, listen to soothing music,
6392 and enjoy one or two of your favorite adult beverages; more if you are
6393 getting particularly stuck.
6394 It's really not that hard, except that the multitude of options can become
6395 overwhelming if you try to do to much in one sitting.
6396 Go have another adult beverage, just for good measure.
6399 \begin_layout Standard
6403 \begin_layout Standard
6404 Lines in a layout file which begin with a
6405 \begin_inset Flex CharStyle:Code
6408 \begin_layout Plain Layout
6415 There is one exception to this rule: all layouts should begin with lines
6419 \begin_layout LyX-Code
6422 #% Do not delete the line below; configure depends on this
6425 \begin_layout LyX-Code
6430 DeclareLaTeXClass{article}
6433 \begin_layout Standard
6434 The second line is used when you configure LyX.
6435 The layout file is read by the LaTeX script
6436 \begin_inset Flex CharStyle:Code
6439 \begin_layout Plain Layout
6445 , in a special mode where
6446 \begin_inset Flex CharStyle:Code
6449 \begin_layout Plain Layout
6456 The first line is just a LaTeX comment, and the second one contains the
6457 declaration of the text class.
6458 If these lines appear in a file named
6459 \begin_inset Flex CharStyle:Code
6462 \begin_layout Plain Layout
6468 , then they define a text class of name
6469 \begin_inset Flex CharStyle:Code
6472 \begin_layout Plain Layout
6478 (the name of the layout file) which uses the LaTeX document class
6479 \begin_inset Flex CharStyle:Code
6482 \begin_layout Plain Layout
6488 (the default is to use the same name as the layout).
6490 \begin_inset Quotes eld
6494 \begin_inset Quotes erd
6497 that appears above is used as a description of the text class in the
6498 \begin_inset Flex CharStyle:MenuItem
6501 \begin_layout Plain Layout
6502 Document\SpecialChar \menuseparator
6511 \begin_layout Standard
6512 Let's assume that you wrote your own text class that uses the
6513 \begin_inset Flex CharStyle:Code
6516 \begin_layout Plain Layout
6522 document class, but where you changed the appearance of the section headings.
6523 If you put it in a file
6524 \begin_inset Flex CharStyle:Code
6527 \begin_layout Plain Layout
6533 , the header of this file should be:
6536 \begin_layout LyX-Code
6539 #% Do not delete the line below; configure depends on this
6542 \begin_layout LyX-Code
6547 DeclareLaTeXClass[article]{article (with my own headings)}
6550 \begin_layout Standard
6551 This declares a text class
6552 \begin_inset Flex CharStyle:Code
6555 \begin_layout Plain Layout
6561 , associated with the LaTeX document class
6562 \begin_inset Flex CharStyle:Code
6565 \begin_layout Plain Layout
6572 \begin_inset Quotes eld
6575 article (with my own headings)
6576 \begin_inset Quotes erd
6580 If your text class depends on several packages, you can declare it as:
6583 \begin_layout LyX-Code
6586 #% Do not delete the line below; configure depends on this
6589 \begin_layout LyX-Code
6594 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
6597 \begin_layout Standard
6598 This indicates that your text class uses the foo.sty package.
6599 Finally, it is also possible to declare classes for DocBook code.
6600 Typical declarations will look like
6603 \begin_layout LyX-Code
6606 #% Do not delete the line below; configure depends on this
6609 \begin_layout LyX-Code
6614 DeclareDocBookClass[article]{SGML (DocBook article)}
6617 \begin_layout Standard
6618 Note that these declarations can also be given an optional parameter declaring
6619 the name of the document class (but not a list).
6622 \begin_layout Standard
6623 So, to be as explicit as possible, the form of the layout declaration is:
6626 \begin_layout LyX-Code
6631 DeclareLaTeXClass[class,package.sty]{layout description}
6634 \begin_layout Standard
6635 The class need only be specified if the name of the LaTeX class file and
6636 the name of the layout file are different; if the name of the class file
6637 is not specified, then LyX will simply assume that it is the same as the
6638 name of the layout file.
6641 \begin_layout Standard
6642 When the text class has been modified to your taste, all you have to do
6643 is to copy it either to
6644 \begin_inset Flex CharStyle:Code
6647 \begin_layout Plain Layout
6654 \begin_inset Flex CharStyle:Code
6657 \begin_layout Plain Layout
6664 \begin_inset Flex CharStyle:MenuItem
6667 \begin_layout Plain Layout
6668 Tools\SpecialChar \menuseparator
6674 , exit LyX and restart it.
6675 Then your new text class should be available along with the others.
6678 \begin_layout Standard
6679 In versions of LyX prior to 1.6, you had to restart LyX to see any changes
6680 you made to your layout files.
6681 As a result, editing layout files could be very time consuming.
6682 Beginning with 1.6, however, you can force a reload of the layout currently
6683 in use by using the LyX function
6684 \begin_inset Flex CharStyle:MenuItem
6687 \begin_layout Plain Layout
6694 There is no default binding for this function—though, of course, you can
6695 bind it to a key yourself.
6696 If you want to use this function, then, you should simply enter it in the
6702 : This is very much an `advanced feature'.
6707 recommended that you save your work before using this function.
6712 recommended that you not attempt to edit your layout while simultaneously
6713 working on a document that you care about.
6714 Use a test document.
6715 Syntax errors and the like in your layout file could cause peculiar behavior.
6716 In particular, such errors could cause LyX to regard the current layout
6717 as invalid and to attempt to switch to some other layout.
6718 The LyX team strives to keep LyX stable in such situations, but safe is
6722 \begin_layout Subsection
6726 \begin_layout Standard
6727 The first non-comment line must contain the file format number:
6730 \begin_layout Description
6731 \begin_inset Flex CharStyle:Code
6734 \begin_layout Plain Layout
6741 \begin_inset Flex CharStyle:Code
6744 \begin_layout Plain Layout
6750 ] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
6751 don't have an explicit file format).
6752 The file format that is documented here is format 14.
6755 \begin_layout Subsection
6756 General text class parameters
6759 \begin_layout Standard
6760 These are the general parameters which describe the form of the entire document:
6763 \begin_layout Description
6764 \begin_inset Flex CharStyle:Code
6767 \begin_layout Plain Layout
6773 Adds information to the document preamble.
6775 \begin_inset Quotes eld
6779 \begin_inset Flex CharStyle:Code
6782 \begin_layout Plain Layout
6789 \begin_inset Quotes erd
6795 \begin_layout Description
6796 \begin_inset Flex CharStyle:Code
6799 \begin_layout Plain Layout
6805 Describes various global options supported by the document class.
6807 \begin_inset space ~
6811 \begin_inset CommandInset ref
6813 reference "sub:ClassOptions"
6819 \begin_inset Quotes eld
6823 \begin_inset Flex CharStyle:Code
6826 \begin_layout Plain Layout
6833 \begin_inset Quotes erd
6839 \begin_layout Description
6840 \begin_inset Flex CharStyle:Code
6843 \begin_layout Plain Layout
6850 \begin_inset Flex CharStyle:Code
6853 \begin_layout Plain Layout
6862 \begin_inset Flex CharStyle:Code
6865 \begin_layout Plain Layout
6871 ] Whether the class should default to having one or two columns.
6872 Can be changed in the
6873 \begin_inset Flex CharStyle:MenuItem
6876 \begin_layout Plain Layout
6877 Document\SpecialChar \menuseparator
6886 \begin_layout Description
6887 \begin_inset Flex CharStyle:Code
6890 \begin_layout Plain Layout
6897 \begin_inset Flex CharStyle:Code
6900 \begin_layout Plain Layout
6906 ] This sequence defines the properties for a counter.
6907 If the counter does not yet exist, it is created; if it does exist, it
6910 \begin_inset Quotes eld
6914 \begin_inset Flex CharStyle:Code
6917 \begin_layout Plain Layout
6924 \begin_inset Quotes erd
6928 \begin_inset Newline newline
6932 \begin_inset space ~
6936 \begin_inset CommandInset ref
6938 reference "sub:Counters"
6942 for details on counters.
6945 \begin_layout Description
6946 \begin_inset Flex CharStyle:Code
6949 \begin_layout Plain Layout
6955 Sets the default font used to display the document.
6957 \begin_inset space ~
6961 \begin_inset CommandInset ref
6963 reference "sub:Font-description"
6967 for how to declare fonts.
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
7009 Specifies a module to be included by default with this document class,
7010 which should be specified by filename without the
7011 \begin_inset Flex CharStyle:Code
7014 \begin_layout Plain Layout
7021 The user can still remove the module, but it will be active at the outset.
7022 (This applies only when new files are created, or when this class is chosen
7023 for an existing document.)
7026 \begin_layout Description
7027 \begin_inset Flex CharStyle:Code
7030 \begin_layout Plain Layout
7037 \begin_inset Flex CharStyle:Code
7040 \begin_layout Plain Layout
7046 ] This is the style that will be assigned to new paragraphs, usually
7047 \begin_inset Flex CharStyle:MenuItem
7050 \begin_layout Plain Layout
7057 This will default to the first defined style if not given, but you are
7058 highly encouraged to use this directive.
7061 \begin_layout Description
7062 \begin_inset Flex CharStyle:Code
7065 \begin_layout Plain Layout
7072 \begin_inset Flex CharStyle:Code
7075 \begin_layout Plain Layout
7081 ] Indicates that the module in question—which should be specified by filename
7083 \begin_inset Flex CharStyle:Code
7086 \begin_layout Plain Layout
7092 extension—cannot be used with this document class.
7093 This might be used in a journal-specific layout file to prevent, say, the
7095 \begin_inset Flex CharStyle:Code
7098 \begin_layout Plain Layout
7104 module that numbers theorems by section.
7109 be used in a module.
7110 Modules have their own way of excluding other modules (see
7111 \begin_inset CommandInset ref
7113 reference "sub:Layout-modules"
7120 \begin_layout Description
7121 \begin_inset Flex CharStyle:Code
7124 \begin_layout Plain Layout
7130 Defines a new float.
7132 \begin_inset space ~
7136 \begin_inset CommandInset ref
7138 reference "sub:Floats"
7144 \begin_inset Quotes eld
7148 \begin_inset Flex CharStyle:Code
7151 \begin_layout Plain Layout
7158 \begin_inset Quotes erd
7164 \begin_layout Description
7165 \begin_inset Flex CharStyle:Code
7168 \begin_layout Plain Layout
7175 \begin_inset Flex CharStyle:Code
7178 \begin_layout Plain Layout
7184 ] Modifies the properties of the given counter.
7185 If the counter does not exist, the section is ignored.
7187 \begin_inset Quotes eld
7191 \begin_inset Flex CharStyle:Code
7194 \begin_layout Plain Layout
7201 \begin_inset Quotes erd
7207 \begin_layout Description
7208 \begin_inset Flex CharStyle:Code
7211 \begin_layout Plain Layout
7218 \begin_inset Flex CharStyle:Code
7221 \begin_layout Plain Layout
7227 ] Modifies the properties of the given paragraph style.
7228 If the style does not exist, the section is ignored.
7230 \begin_inset Quotes eld
7234 \begin_inset Flex CharStyle:Code
7237 \begin_layout Plain Layout
7244 \begin_inset Quotes erd
7250 \begin_layout Description
7251 \begin_inset Flex CharStyle:Code
7254 \begin_layout Plain Layout
7260 As its name implies, this command allows you to include another layout
7261 definition file within yours to avoid duplicating commands.
7262 Common examples are the standard layout files, for example,
7263 \begin_inset Flex CharStyle:Code
7266 \begin_layout Plain Layout
7272 , which contains most of the basic layouts.
7275 \begin_layout Description
7276 \begin_inset Flex CharStyle:Code
7279 \begin_layout Plain Layout
7285 This section (re-)defines the layout of an inset.
7286 It can be applied to an existing inset of to a new, user-defined inset,
7288 \begin_inset space \thinspace{}
7292 \begin_inset space \space{}
7295 a new character style.
7297 \begin_inset space ~
7301 \begin_inset CommandInset ref
7303 reference "sub:Flex-insets-and"
7307 for more information.
7309 \begin_inset Quotes eld
7313 \begin_inset Flex CharStyle:Code
7316 \begin_layout Plain Layout
7323 \begin_inset Quotes erd
7329 \begin_layout Description
7330 \begin_inset Flex CharStyle:Code
7333 \begin_layout Plain Layout
7339 A string that indicates the width of the left margin on the screen, for
7341 \begin_inset Quotes eld
7345 \begin_inset Quotes erd
7351 \begin_layout Description
7352 \begin_inset Flex CharStyle:Code
7355 \begin_layout Plain Layout
7361 This command deletes an existing float.
7362 This is particularly useful when you want to suppress a float that has
7363 be defined in an input file.
7366 \begin_layout Description
7367 \begin_inset Flex CharStyle:Code
7370 \begin_layout Plain Layout
7376 This command deletes an existing style.
7377 This is particularly useful when you want to suppress a style that has
7378 be defined in an input file.
7381 \begin_layout Description
7382 \begin_inset Flex CharStyle:Code
7385 \begin_layout Plain Layout
7391 A string indicating the file format (as defined in the Preferences dialog)
7392 produced by this class.
7393 It is mainly useful when
7394 \begin_inset Flex CharStyle:Code
7397 \begin_layout Plain Layout
7403 is `literate' and one wants to define a new type of literate document.
7404 This string is reset to `docbook', `latex', or `literate' when the correspondin
7406 \begin_inset Flex CharStyle:Code
7409 \begin_layout Plain Layout
7415 parameter is encountered.
7418 \begin_layout Description
7419 \begin_inset Flex CharStyle:Code
7422 \begin_layout Plain Layout
7428 A string indicating what sort of output documents using this class will
7430 At present, the options are: `docbook', `latex', and `literate'.
7433 \begin_layout Description
7434 \begin_inset Flex CharStyle:Code
7437 \begin_layout Plain Layout
7448 \begin_inset Flex CharStyle:Code
7451 \begin_layout Plain Layout
7462 \begin_inset Flex CharStyle:Code
7465 \begin_layout Plain Layout
7472 \begin_inset Flex CharStyle:Code
7475 \begin_layout Plain Layout
7481 ] The class default pagestyle.
7482 Can be changed in the
7483 \begin_inset Flex CharStyle:MenuItem
7486 \begin_layout Plain Layout
7487 Document\SpecialChar \menuseparator
7496 \begin_layout Description
7497 \begin_inset Flex CharStyle:Code
7500 \begin_layout Plain Layout
7506 Sets the preamble for the LaTeX document.
7507 Note that this will completely override any prior
7508 \begin_inset Flex CharStyle:Code
7511 \begin_layout Plain Layout
7518 \begin_inset Flex CharStyle:Code
7521 \begin_layout Plain Layout
7529 \begin_inset Quotes eld
7533 \begin_inset Flex CharStyle:Code
7536 \begin_layout Plain Layout
7543 \begin_inset Quotes erd
7549 \begin_layout Description
7550 \begin_inset Flex CharStyle:Code
7553 \begin_layout Plain Layout
7560 \begin_inset Flex CharStyle:Code
7563 \begin_layout Plain Layout
7570 \begin_inset Flex CharStyle:Code
7573 \begin_layout Plain Layout
7582 \begin_inset Flex CharStyle:Code
7585 \begin_layout Plain Layout
7591 ] Whether the class already provides the feature
7592 \begin_inset Flex CharStyle:Code
7595 \begin_layout Plain Layout
7602 A feature is in general the name of a package (
7603 \begin_inset Flex CharStyle:Code
7606 \begin_layout Plain Layout
7613 \begin_inset Flex CharStyle:Code
7616 \begin_layout Plain Layout
7622 , \SpecialChar \ldots{}
7624 \begin_inset Flex CharStyle:Code
7627 \begin_layout Plain Layout
7634 \begin_inset Flex CharStyle:Code
7637 \begin_layout Plain Layout
7643 ,\SpecialChar \ldots{}
7644 ); the complete list of supported features is unfortunately not documented
7645 outside the LyX source code—but see
7646 \begin_inset Flex CharStyle:Code
7649 \begin_layout Plain Layout
7655 if you're interested.
7657 \begin_inset Flex CharStyle:MenuItem
7660 \begin_layout Plain Layout
7661 Help\SpecialChar \menuseparator
7667 also gives an overview of the supported packages.
7670 \begin_layout Description
7671 \begin_inset Flex CharStyle:Code
7674 \begin_layout Plain Layout
7681 \begin_inset Flex CharStyle:Code
7684 \begin_layout Plain Layout
7690 ] Indicates that this layout provides the functionality of the module mentioned,
7691 which should be specified by the filename without the
7692 \begin_inset Flex CharStyle:Code
7695 \begin_layout Plain Layout
7702 This will typically be used if the layout includes the module directly,
7703 rather than using the
7704 \begin_inset Flex CharStyle:Code
7707 \begin_layout Plain Layout
7713 tag to indicate that it ought to be used.
7714 It could be used in a module that provided an alternate implementation
7715 of the same functionality.
7718 \begin_layout Description
7719 \begin_inset Flex CharStyle:Code
7722 \begin_layout Plain Layout
7729 \begin_inset Flex CharStyle:Code
7732 \begin_layout Plain Layout
7738 ] Whether the class requires the feature
7739 \begin_inset Flex CharStyle:Code
7742 \begin_layout Plain Layout
7749 Multiple features must be separated by commas.
7750 Note that you can only request supported features.
7753 \begin_layout Description
7754 \begin_inset Flex CharStyle:Code
7757 \begin_layout Plain Layout
7763 A string that indicates the width of the right margin on the screen, for
7765 \begin_inset Quotes eld
7769 \begin_inset Quotes erd
7775 \begin_layout Description
7776 \begin_inset Flex CharStyle:Code
7779 \begin_layout Plain Layout
7785 Sets which divisions get numbered.
7787 \begin_inset Flex CharStyle:Code
7790 \begin_layout Plain Layout
7799 \begin_layout Description
7800 \begin_inset Flex CharStyle:Code
7803 \begin_layout Plain Layout
7812 \begin_inset Flex CharStyle:Code
7815 \begin_layout Plain Layout
7826 \begin_inset Flex CharStyle:Code
7829 \begin_layout Plain Layout
7835 ] Whether the class-default should be printing on one or both sides of the
7837 Can be changed in the
7838 \begin_inset Flex CharStyle:MenuItem
7841 \begin_layout Plain Layout
7842 Document\SpecialChar \menuseparator
7851 \begin_layout Description
7852 \begin_inset Flex CharStyle:Code
7855 \begin_layout Plain Layout
7861 This sequence defines a paragraph style.
7862 If the style does not yet exist, it is created; if it does exist, its parameter
7863 s are redefined Must end with
7864 \begin_inset Quotes eld
7868 \begin_inset Flex CharStyle:Code
7871 \begin_layout Plain Layout
7878 \begin_inset Quotes erd
7882 \begin_inset Newline newline
7886 \begin_inset space ~
7890 \begin_inset CommandInset ref
7892 reference "sub:Paragraph-Styles"
7896 for details on paragraph styles.
7899 \begin_layout Description
7900 \begin_inset Flex CharStyle:Code
7903 \begin_layout Plain Layout
7910 \begin_inset Flex CharStyle:Code
7913 \begin_layout Plain Layout
7919 ] The name of the command or environment to be used with
7920 \begin_inset Flex CharStyle:Code
7923 \begin_layout Plain Layout
7932 \begin_layout Description
7933 \begin_inset Flex CharStyle:Code
7936 \begin_layout Plain Layout
7943 \begin_inset Flex CharStyle:Code
7946 \begin_layout Plain Layout
7955 \begin_inset Flex CharStyle:Code
7958 \begin_layout Plain Layout
7964 ] Indicates what kind of markup is used to define the title of a document.
7966 \begin_inset Flex CharStyle:Code
7969 \begin_layout Plain Layout
7975 means that the macro with name
7976 \begin_inset Flex CharStyle:Code
7979 \begin_layout Plain Layout
7985 will be inserted after the last layout which has
7986 \begin_inset Quotes eld
7990 \begin_inset Flex CharStyle:Code
7993 \begin_layout Plain Layout
8000 \begin_inset Quotes erd
8005 \begin_inset Flex CharStyle:Code
8008 \begin_layout Plain Layout
8014 corresponds to the case where the block of paragraphs which have
8015 \begin_inset Quotes eld
8019 \begin_inset Flex CharStyle:Code
8022 \begin_layout Plain Layout
8029 \begin_inset Quotes erd
8032 should be enclosed into the
8033 \begin_inset Flex CharStyle:Code
8036 \begin_layout Plain Layout
8045 \begin_layout Description
8046 \begin_inset Flex CharStyle:Code
8049 \begin_layout Plain Layout
8055 Sets which divisions are included in the table of contents.
8057 \begin_inset Flex CharStyle:Code
8060 \begin_layout Plain Layout
8069 \begin_layout Subsection
8070 \begin_inset Flex CharStyle:Code
8073 \begin_layout Plain Layout
8080 \begin_inset CommandInset label
8082 name "sub:ClassOptions"
8089 \begin_layout Standard
8091 \begin_inset Flex CharStyle:Code
8094 \begin_layout Plain Layout
8100 section can contain the following entries:
8103 \begin_layout Description
8104 \begin_inset Flex CharStyle:Code
8107 \begin_layout Plain Layout
8114 \begin_inset Flex CharStyle:Code
8117 \begin_layout Plain Layout
8123 ] The list of available font sizes for the document's main font, separated
8125 \begin_inset Quotes eld
8129 \begin_inset Flex CharStyle:Code
8132 \begin_layout Plain Layout
8139 \begin_inset Quotes erd
8145 \begin_layout Description
8146 \begin_inset Flex CharStyle:Code
8149 \begin_layout Plain Layout
8155 Used to set the DTD line with XML-based output classes.
8157 \begin_inset space \thinspace{}
8161 \begin_inset Quotes eld
8164 -//OASIS//DTD DocBook V4.2//EN
8165 \begin_inset Quotes erd
8171 \begin_layout Description
8172 \begin_inset Flex CharStyle:Code
8175 \begin_layout Plain Layout
8182 \begin_inset Flex CharStyle:Code
8185 \begin_layout Plain Layout
8186 string="empty|plain|headings|fancy"
8191 ] The list of available page styles, separated by
8192 \begin_inset Quotes eld
8196 \begin_inset Flex CharStyle:Code
8199 \begin_layout Plain Layout
8206 \begin_inset Quotes erd
8212 \begin_layout Description
8213 \begin_inset Flex CharStyle:Code
8216 \begin_layout Plain Layout
8223 \begin_inset Flex CharStyle:Code
8226 \begin_layout Plain Layout
8232 ] Some document class options, separated by a comma, that will be added
8233 to the optional part of the
8234 \begin_inset Flex CharStyle:Code
8237 \begin_layout Plain Layout
8248 \begin_layout Standard
8250 \begin_inset Flex CharStyle:Code
8253 \begin_layout Plain Layout
8259 section must end with
8260 \begin_inset Quotes eld
8264 \begin_inset Flex CharStyle:Code
8267 \begin_layout Plain Layout
8274 \begin_inset Quotes erd
8280 \begin_layout Subsection
8282 \begin_inset CommandInset label
8284 name "sub:Paragraph-Styles"
8291 \begin_layout Standard
8292 A paragraph style description looks like this:
8296 \begin_layout Plain Layout
8297 Note that this will either define a new layout or modify an existing one.
8305 \begin_layout LyX-Code
8312 \begin_layout LyX-Code
8316 \begin_layout LyX-Code
8320 \begin_layout Standard
8321 where the following commands are allowed:
8324 \begin_layout Description
8325 \begin_inset Flex CharStyle:Code
8328 \begin_layout Plain Layout
8335 \begin_inset Flex CharStyle:Code
8338 \begin_layout Plain Layout
8343 , left, right, center
8348 ] Paragraph alignment.
8351 \begin_layout Description
8352 \begin_inset Flex CharStyle:Code
8355 \begin_layout Plain Layout
8362 \begin_inset Flex CharStyle:Code
8365 \begin_layout Plain Layout
8370 , left, right, center
8375 ] A comma separated list of permitted alignments.
8376 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
8378 For example a right-aligned or centered enumeration isn't possible.)
8381 \begin_layout Description
8382 \begin_inset Flex CharStyle:Code
8385 \begin_layout Plain Layout
8391 Language dependent information to be included in the LaTeX preamble when
8393 Note that this will completely override any prior
8394 \begin_inset Flex CharStyle:Code
8397 \begin_layout Plain Layout
8405 \begin_inset Quotes eld
8409 \begin_inset Flex CharStyle:Code
8412 \begin_layout Plain Layout
8419 \begin_inset Quotes erd
8423 The contents of this tag will occur once in the LaTeX preamble for each
8424 language used by the document.
8425 Each time, the following substitutions are made:
8429 \begin_layout Itemize
8430 \begin_inset Flex CharStyle:Code
8433 \begin_layout Plain Layout
8439 is replaced by the language name (as used by the babel package).
8442 \begin_layout Itemize
8444 \begin_inset Quotes eld
8448 \begin_inset Quotes erd
8452 \begin_inset Flex CharStyle:Code
8455 \begin_layout Plain Layout
8461 replaces its argument by the translation of the argument to the current
8465 \begin_layout Standard
8466 This preamble snippet will only be used if the document contains more than
8467 one language and the babel package is used.
8471 \begin_layout Description
8472 \begin_inset Flex CharStyle:Code
8475 \begin_layout Plain Layout
8482 \begin_inset Flex CharStyle:Code
8485 \begin_layout Plain Layout
8495 \begin_layout Plain Layout
8496 Note that a `float' here is a real number, such as: 1.5.
8501 The vertical space with which the last of a chain of paragraphs with this
8502 layout is separated from the following paragraph.
8503 If the next paragraph has another layout, the separations are not simply
8504 added, but the maximum is taken.
8507 \begin_layout Description
8508 \begin_inset Flex CharStyle:Code
8511 \begin_layout Plain Layout
8518 \begin_inset Flex CharStyle:Code
8521 \begin_layout Plain Layout
8527 The category for this style.
8528 This is used to group related styles in the Layout combobox on the toolbar.
8529 Any string can be used, but you may want to use existing categories with
8534 \begin_layout Description
8535 \begin_inset Flex CharStyle:Code
8538 \begin_layout Plain Layout
8544 Depth of XML command.
8545 Used only with XML-type formats.
8548 \begin_layout Description
8549 \begin_inset Flex CharStyle:Code
8552 \begin_layout Plain Layout
8559 \begin_inset CommandInset label
8561 name "des:CopyStyle"
8566 \begin_inset Flex CharStyle:Code
8569 \begin_layout Plain Layout
8575 Copies all the features of an existing style into the current one.
8579 \begin_layout Description
8580 \begin_inset Flex CharStyle:Code
8583 \begin_layout Plain Layout
8589 The name of a style whose preamble should be output
8594 This allows to ensure some ordering of the preamble snippets when macros
8595 definitions depend on one another.
8599 \begin_layout Plain Layout
8600 Note that, besides that functionality, there is no way to ensure any ordering
8602 The ordering that you see in a given version of LyX may change without
8603 warning in later versions.
8611 \begin_layout Description
8612 \begin_inset Flex CharStyle:Code
8615 \begin_layout Plain Layout
8622 \begin_inset Flex CharStyle:Code
8625 \begin_layout Plain Layout
8630 , Box, Filled_Box, Static
8635 ] The type of label that stands at the end of the paragraph (or sequence
8637 \begin_inset Flex CharStyle:Code
8640 \begin_layout Plain Layout
8647 \begin_inset Flex CharStyle:Code
8650 \begin_layout Plain Layout
8657 \begin_inset Flex CharStyle:Code
8660 \begin_layout Plain Layout
8667 \begin_inset Flex CharStyle:Code
8670 \begin_layout Plain Layout
8678 \begin_inset Flex CharStyle:Code
8681 \begin_layout Plain Layout
8688 \begin_inset Quotes eld
8692 \begin_inset Quotes erd
8696 \begin_inset Flex CharStyle:Code
8699 \begin_layout Plain Layout
8706 \begin_inset Flex CharStyle:Code
8709 \begin_layout Plain Layout
8710 \begin_inset space ~
8719 \begin_inset space ~
8722 black) square suitable for end of proof markers,
8723 \begin_inset Flex CharStyle:Code
8726 \begin_layout Plain Layout
8732 is an explicit text string.
8735 \begin_layout Description
8736 \begin_inset Flex CharStyle:Code
8739 \begin_layout Plain Layout
8746 \begin_inset Flex CharStyle:Code
8749 \begin_layout Plain Layout
8755 ] The string used for a label with a
8756 \begin_inset Flex CharStyle:Code
8759 \begin_layout Plain Layout
8766 \begin_inset Flex CharStyle:Code
8769 \begin_layout Plain Layout
8779 \begin_layout Description
8780 \begin_inset Flex CharStyle:Code
8783 \begin_layout Plain Layout
8790 \begin_inset Flex CharStyle:Code
8793 \begin_layout Plain Layout
8804 \begin_inset Flex CharStyle:Code
8807 \begin_layout Plain Layout
8816 \begin_layout Description
8817 \begin_inset Flex CharStyle:Code
8820 \begin_layout Plain Layout
8827 \begin_inset Flex CharStyle:Code
8830 \begin_layout Plain Layout
8840 ] With this parameter the
8841 \begin_inset Flex CharStyle:MenuItem
8844 \begin_layout Plain Layout
8851 \begin_inset Quotes eld
8854 Vertical space above
8855 \begin_inset Quotes erd
8859 \begin_inset Flex CharStyle:MenuItem
8862 \begin_layout Plain Layout
8863 Edit\SpecialChar \menuseparator
8865 \begin_inset space ~
8873 dialog can be set when initializing a paragraph with this style.
8877 \begin_layout Plain Layout
8880 Note from Jean-Marc:
8882 I'm not sure that this setting has much use, and it should probably be
8883 removed in later versions.
8891 \begin_layout Description
8892 \begin_inset Flex CharStyle:Code
8895 \begin_layout Plain Layout
8901 The font used for both the text body
8907 \begin_inset space ~
8911 \begin_inset CommandInset ref
8913 reference "sub:Font-description"
8918 Note that defining this font automatically defines the
8919 \begin_inset Flex CharStyle:Code
8922 \begin_layout Plain Layout
8929 So you should define this one first if you also want to define
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 CommandInset label
8955 name "des:FreeSpacing"
8962 \begin_inset Flex CharStyle:Code
8965 \begin_layout Plain Layout
8976 \begin_inset Flex CharStyle:Code
8979 \begin_layout Plain Layout
8985 ] Usually LyX doesn't allow you to insert more than one space between words,
8986 since a space is considered as the separation between two words, not a
8987 character or symbol of its own.
8988 This is a very fine thing but sometimes annoying, for example, when typing
8989 program code or plain LaTeX code.
8991 \begin_inset Flex CharStyle:Code
8994 \begin_layout Plain Layout
9001 Note that LyX will create protected blanks for the additional blanks when
9002 in another mode than LaTeX-mode.
9005 \begin_layout Description
9006 \begin_inset Flex CharStyle:Code
9009 \begin_layout Plain Layout
9015 [[FIXME]] (Used only with XML-type formats.)
9018 \begin_layout Description
9019 \begin_inset Flex CharStyle:Code
9022 \begin_layout Plain Layout
9029 \begin_inset Flex CharStyle:Code
9032 \begin_layout Plain Layout
9038 If 1, marks the layout as being part of a title block (see also the
9039 \begin_inset Flex CharStyle:Code
9042 \begin_layout Plain Layout
9049 \begin_inset Flex CharStyle:Code
9052 \begin_layout Plain Layout
9061 \begin_layout Description
9062 \begin_inset Flex CharStyle:Code
9065 \begin_layout Plain Layout
9072 \begin_inset Flex CharStyle:Code
9075 \begin_layout Plain Layout
9081 ] This provides extra space between paragraphs that have the same layout.
9082 If you put other layouts into an environment, each is separated with the
9084 \begin_inset Flex CharStyle:Code
9087 \begin_layout Plain Layout
9094 But the whole items of the environment are additionally separated with
9096 \begin_inset Flex CharStyle:Code
9099 \begin_layout Plain Layout
9111 \begin_layout Description
9112 \begin_inset Flex CharStyle:Code
9115 \begin_layout Plain Layout
9121 [[FIXME]] (Used only with XML-type formats.)
9124 \begin_layout Description
9125 \begin_inset Flex CharStyle:Code
9128 \begin_layout Plain Layout
9135 \begin_inset CommandInset label
9137 name "des:KeepEmpty"
9144 \begin_inset Flex CharStyle:Code
9147 \begin_layout Plain Layout
9158 \begin_inset Flex CharStyle:Code
9161 \begin_layout Plain Layout
9167 ] Usually LyX does not allow you to leave a paragraph empty, since it would
9168 lead to empty LaTeX output.
9169 There are some cases where this could be desirable however: in a letter
9170 template, the required fields can be provided as empty fields, so that
9171 people do not forget them; in some special classes, a layout can be used
9172 as some kind of break, which does not contain actual text.
9175 \begin_layout Description
9176 \begin_inset Flex CharStyle:Code
9179 \begin_layout Plain Layout
9185 [float=0] The vertical space between the label and the text body.
9186 Only used for labels that are above the text body (
9187 \begin_inset Flex CharStyle:Code
9190 \begin_layout Plain Layout
9197 \begin_inset Flex CharStyle:Code
9200 \begin_layout Plain Layout
9201 Centered_Top_Environment
9209 \begin_layout Description
9210 \begin_inset Flex CharStyle:Code
9213 \begin_layout Plain Layout
9220 \begin_inset Flex CharStyle:Code
9223 \begin_layout Plain Layout
9230 \begin_inset Newline newline
9233 The name of the counter for automatic numbering.
9235 \begin_inset Newline newline
9243 \begin_inset Flex CharStyle:Code
9246 \begin_layout Plain Layout
9253 \begin_inset Flex CharStyle:Code
9256 \begin_layout Plain Layout
9263 In that case, the counter will be stepped each time the layout appears.
9265 \begin_inset Newline newline
9273 \begin_inset Flex CharStyle:Code
9276 \begin_layout Plain Layout
9283 \begin_inset Flex CharStyle:Code
9286 \begin_layout Plain Layout
9292 , though this case is a bit complicated.
9294 \begin_inset Quotes eld
9298 \begin_inset Flex CharStyle:Code
9301 \begin_layout Plain Layout
9308 \begin_inset Quotes erd
9312 Then the actual counters used are
9313 \begin_inset Flex CharStyle:Code
9316 \begin_layout Plain Layout
9323 \begin_inset Flex CharStyle:Code
9326 \begin_layout Plain Layout
9333 \begin_inset Flex CharStyle:Code
9336 \begin_layout Plain Layout
9343 \begin_inset Flex CharStyle:Code
9346 \begin_layout Plain Layout
9353 These counters must all be declared separately.
9354 \begin_inset Newline newline
9358 \begin_inset CommandInset ref
9360 reference "sub:Counters"
9364 for details on counters.
9367 \begin_layout Description
9368 \begin_inset Flex CharStyle:Code
9371 \begin_layout Plain Layout
9377 The font used for the label.
9379 \begin_inset space ~
9383 \begin_inset CommandInset ref
9385 reference "sub:Font-description"
9392 \begin_layout Description
9393 \begin_inset Flex CharStyle:Code
9396 \begin_layout Plain Layout
9402 Text that indicates how far a label should be indented.
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
9425 ] The horizontal space between the label and the text body.
9426 Only used for labels that are not above the text body.
9429 \begin_layout Description
9430 \begin_inset Flex CharStyle:Code
9433 \begin_layout Plain Layout
9440 \begin_inset Flex CharStyle:Code
9443 \begin_layout Plain Layout
9449 ] The string used for a label with a
9450 \begin_inset Flex CharStyle:Code
9453 \begin_layout Plain Layout
9461 \begin_inset Flex CharStyle:Code
9464 \begin_layout Plain Layout
9470 is set, this string can be contain the special formatting commands described
9472 \begin_inset CommandInset ref
9474 reference "sub:Counters"
9482 \begin_layout Plain Layout
9483 For the sake of backwards compatibility, the string
9484 \begin_inset Flex CharStyle:Code
9487 \begin_layout Plain Layout
9497 will be replaced by the expanded
9498 \begin_inset Flex CharStyle:Code
9501 \begin_layout Plain Layout
9508 \begin_inset Flex CharStyle:Code
9511 \begin_layout Plain Layout
9520 This feature is now obsolete and should be replaced by the mechanisms of
9522 \begin_inset CommandInset ref
9524 reference "sub:Counters"
9536 \begin_layout Description
9537 \begin_inset Flex CharStyle:Code
9540 \begin_layout Plain Layout
9547 \begin_inset Flex CharStyle:Code
9550 \begin_layout Plain Layout
9556 ] This is used inside the appendix instead of
9557 \begin_inset Flex CharStyle:Code
9560 \begin_layout Plain Layout
9568 \begin_inset Flex CharStyle:Code
9571 \begin_layout Plain Layout
9578 \begin_inset Flex CharStyle:Code
9581 \begin_layout Plain Layout
9590 \begin_layout Description
9591 \begin_inset Flex CharStyle:Code
9594 \begin_layout Plain Layout
9600 [FIXME] (Used only with XML-type formats.)
9603 \begin_layout Description
9604 \begin_inset Flex CharStyle:Code
9607 \begin_layout Plain Layout
9614 \begin_inset Flex CharStyle:Code
9617 \begin_layout Plain Layout
9622 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
9623 Enumerate, Itemize, Bibliography
9632 \begin_layout Itemize
9633 \begin_inset Flex CharStyle:Code
9636 \begin_layout Plain Layout
9642 means the label is the very first word (up to the first real blank).
9643 Use protected spaces (like
9644 \begin_inset space ~
9647 that one) if you want more than one word as the label.
9651 \begin_layout Itemize
9652 \begin_inset Flex CharStyle:Code
9655 \begin_layout Plain Layout
9661 means the label is simply whatever
9662 \begin_inset Flex CharStyle:Code
9665 \begin_layout Plain Layout
9672 Note that this really is `static'.
9675 \begin_layout Itemize
9676 \begin_inset Flex CharStyle:Code
9679 \begin_layout Plain Layout
9686 \begin_inset Flex CharStyle:Code
9689 \begin_layout Plain Layout
9690 Centered_Top_Environment
9695 are special cases of
9696 \begin_inset Flex CharStyle:Code
9699 \begin_layout Plain Layout
9706 The label will be printed above the paragraph, but only at the top of an
9707 environment or the top of a chain of paragraphs with this layout.
9708 This might be used with the
9709 \begin_inset Flex CharStyle:MenuItem
9712 \begin_layout Plain Layout
9718 layout, for example.
9721 \begin_layout Itemize
9722 \begin_inset Flex CharStyle:Code
9725 \begin_layout Plain Layout
9731 is a special case for the caption-labels
9732 \begin_inset Quotes eld
9736 \begin_inset Quotes erd
9740 \begin_inset Quotes eld
9744 \begin_inset Quotes erd
9749 \begin_inset Flex CharStyle:Code
9752 \begin_layout Plain Layout
9758 means the (hardcoded) label string depends on the kind of float: It is
9759 hardcoded to be `FloatType N', where N is the value of the counter associated
9763 \begin_layout Itemize
9765 \begin_inset Flex CharStyle:Code
9768 \begin_layout Plain Layout
9774 label type defines automatically numbered labels.
9776 \begin_inset Flex CharStyle:Code
9779 \begin_layout Plain Layout
9785 will be expanded to resolve any counter references it contains: For example,
9787 \begin_inset Quotes eld
9791 \begin_inset Flex CharStyle:Code
9794 \begin_layout Plain Layout
9805 \begin_inset Quotes erd
9810 \begin_inset CommandInset ref
9812 reference "sub:Counters"
9816 for more information on counters.
9819 \begin_layout Itemize
9820 \begin_inset Flex CharStyle:Code
9823 \begin_layout Plain Layout
9829 produces the usual sort of enumeration labels.
9830 At present, it is hardcoded to use Arabic numerals, lowercase letters,
9831 small Roman numerals, and uppercase letters for the four possible depths.
9834 \begin_layout Itemize
9835 \begin_inset Flex CharStyle:Code
9838 \begin_layout Plain Layout
9844 produces various bullets at the different levels.
9845 It is also hardcoded.
9848 \begin_layout Itemize
9849 \begin_inset Flex CharStyle:Code
9852 \begin_layout Plain Layout
9858 is used internally by LyX and should be used only with
9859 \begin_inset Flex CharStyle:Code
9862 \begin_layout Plain Layout
9863 LatexType BibEnvironment
9872 \begin_layout Description
9873 \begin_inset Flex CharStyle:Code
9876 \begin_layout Plain Layout
9883 \begin_inset Flex CharStyle:Code
9886 \begin_layout Plain Layout
9892 , but this preamble snippet occurs independently from the babel package,
9893 and only for the document language.
9895 \begin_inset Quotes eld
9899 \begin_inset Flex CharStyle:Code
9902 \begin_layout Plain Layout
9909 \begin_inset Quotes erd
9916 \begin_layout Standard
9917 If the style defines text that appears in the typeset document, it may use
9919 \begin_inset Flex CharStyle:Code
9922 \begin_layout Plain Layout
9929 \begin_inset Flex CharStyle:Code
9932 \begin_layout Plain Layout
9938 to support non-english and even multilanguage documents correctly.
9939 The following excerpt (from the
9940 \begin_inset Flex CharStyle:Code
9943 \begin_layout Plain Layout
9949 file) shows how this works:
9952 \begin_layout LyX-Code
9956 \begin_layout LyX-Code
9959 theoremstyle{remark}
9962 \begin_layout LyX-Code
9965 newtheorem{claim}[thm]{
9972 \begin_layout LyX-Code
9976 \begin_layout LyX-Code
9980 \begin_layout LyX-Code
9985 claimname}{_(Claim)}
9988 \begin_layout LyX-Code
9992 \begin_layout LyX-Code
9996 \begin_layout LyX-Code
10000 \begin_layout LyX-Code
10009 claimname}{_(Claim)}}
10012 \begin_layout LyX-Code
10016 \begin_layout Standard
10017 The key to correct translation of the user visible text is the definition
10019 \begin_inset Flex CharStyle:Code
10022 \begin_layout Plain Layout
10030 in the language preamble.
10031 This command holds the name of the theorem that will appear in the output.
10033 \begin_inset Flex CharStyle:Code
10036 \begin_layout Plain Layout
10042 then uses the commands offered by the babel package to redefine
10043 \begin_inset Flex CharStyle:Code
10046 \begin_layout Plain Layout
10054 for each used language in multilanguage documents.
10058 \begin_layout Description
10059 \begin_inset Flex CharStyle:Code
10062 \begin_layout Plain Layout
10068 The name of the corresponding LaTeX stuff.
10069 Either the environment or command name.
10072 \begin_layout Description
10073 \begin_inset Flex CharStyle:Code
10076 \begin_layout Plain Layout
10082 An optional parameter for the corresponding
10083 \begin_inset Flex CharStyle:Code
10086 \begin_layout Plain Layout
10093 This parameter cannot be changed from within LyX.
10096 \begin_layout Description
10097 \begin_inset Flex CharStyle:Code
10100 \begin_layout Plain Layout
10107 \begin_inset CommandInset label
10109 name "des:LatexType"
10114 \begin_inset Flex CharStyle:Code
10117 \begin_layout Plain Layout
10122 , Command, Environment, Item_Environment,
10128 \begin_inset Flex CharStyle:Code
10131 \begin_layout Plain Layout
10132 List_Environment, Bib_Environment
10137 ] How the layout should be translated into LaTeX.
10141 \begin_layout Plain Layout
10142 \begin_inset Flex CharStyle:Code
10145 \begin_layout Plain Layout
10151 is perhaps a bit misleading, since these rules apply to SGML classes, too.
10152 Visit the SGML class files for specific examples.
10161 \begin_layout Itemize
10162 \begin_inset Flex CharStyle:Code
10165 \begin_layout Plain Layout
10171 means nothing special.
10175 \begin_layout Itemize
10176 \begin_inset Flex CharStyle:Code
10179 \begin_layout Plain Layout
10186 \begin_inset Flex CharStyle:Code
10189 \begin_layout Plain Layout
10196 {\SpecialChar \ldots{}
10205 \begin_layout Itemize
10206 \begin_inset Flex CharStyle:Code
10209 \begin_layout Plain Layout
10216 \begin_inset Flex CharStyle:Code
10219 \begin_layout Plain Layout
10226 }\SpecialChar \ldots{}
10242 \begin_layout Itemize
10243 \begin_inset Flex CharStyle:Code
10246 \begin_layout Plain Layout
10253 \begin_inset Flex CharStyle:Code
10256 \begin_layout Plain Layout
10263 \begin_inset Flex CharStyle:Code
10266 \begin_layout Plain Layout
10274 is generated for each paragraph of this environment.
10278 \begin_layout Itemize
10279 \begin_inset Flex CharStyle:Code
10282 \begin_layout Plain Layout
10289 \begin_inset Flex CharStyle:Code
10292 \begin_layout Plain Layout
10299 \begin_inset Flex CharStyle:Code
10302 \begin_layout Plain Layout
10308 is passed as an argument to the environment.
10310 \begin_inset Flex CharStyle:Code
10313 \begin_layout Plain Layout
10319 can be defined in the
10320 \begin_inset Flex CharStyle:MenuItem
10323 \begin_layout Plain Layout
10328 ayout\SpecialChar \menuseparator
10342 \begin_layout Standard
10343 Putting the last few things together, the LaTeX output will be either:
10346 \begin_layout LyX-Code
10349 latexname[latexparam]{\SpecialChar \ldots{}
10353 \begin_layout Standard
10357 \begin_layout LyX-Code
10360 begin{latexname}[latexparam] \SpecialChar \ldots{}
10366 \begin_layout Standard
10367 depending upon the LaTeX type.
10371 \begin_layout Description
10372 \begin_inset Flex CharStyle:Code
10375 \begin_layout Plain Layout
10382 \begin_inset Flex CharStyle:Code
10385 \begin_layout Plain Layout
10391 ] If you put layouts into environments, the leftmargins are not simply added,
10392 but added with a factor
10393 \begin_inset Formula $\frac{4}{depth+4}$
10397 Note that this parameter is also used when the margin is defined as
10398 \begin_inset Flex CharStyle:Code
10401 \begin_layout Plain Layout
10408 \begin_inset Flex CharStyle:Code
10411 \begin_layout Plain Layout
10418 Then it is added to the manual or dynamic margin.
10420 \begin_inset Newline newline
10423 The argument is passed as a string.
10425 \begin_inset Quotes eld
10429 \begin_inset Flex CharStyle:Code
10432 \begin_layout Plain Layout
10439 \begin_inset Quotes erd
10442 means that the paragraph is indented with the width of
10443 \begin_inset Quotes eld
10447 \begin_inset Flex CharStyle:Code
10450 \begin_layout Plain Layout
10457 \begin_inset Quotes erd
10460 in the normal font.
10461 You can get a negative width by prefixing the string with
10462 \begin_inset Quotes eld
10466 \begin_inset Flex CharStyle:Code
10469 \begin_layout Plain Layout
10476 \begin_inset Quotes erd
10480 This way was chosen so that the look is the same with each used screen
10485 \begin_layout Description
10486 \begin_inset Flex CharStyle:Code
10489 \begin_layout Plain Layout
10496 \begin_inset Flex CharStyle:Code
10499 \begin_layout Plain Layout
10504 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10510 \begin_inset Newline newline
10513 The kind of margin that the layout has on the left side.
10515 \begin_inset Flex CharStyle:Code
10518 \begin_layout Plain Layout
10524 just means a fixed margin.
10526 \begin_inset Flex CharStyle:Code
10529 \begin_layout Plain Layout
10535 means that the left margin depends on the string entered in the
10536 \begin_inset Flex CharStyle:MenuItem
10539 \begin_layout Plain Layout
10540 Edit\SpecialChar \menuseparator
10542 \begin_inset space ~
10551 This is used to typeset nice lists without tabulators.
10553 \begin_inset Flex CharStyle:Code
10556 \begin_layout Plain Layout
10562 means that the margin depends on the size of the label.
10563 This is used for automatic enumerated headlines.
10564 It is obvious that the headline
10565 \begin_inset Quotes eld
10568 5.4.3.2.1 Very long headline
10569 \begin_inset Quotes erd
10572 must have a wider left margin (as wide as
10573 \begin_inset Quotes eld
10577 \begin_inset Quotes erd
10580 plus the space) than
10581 \begin_inset Quotes eld
10584 3.2 Very long headline
10585 \begin_inset Quotes erd
10589 \begin_inset Quotes eld
10593 \begin_inset Quotes erd
10596 are not able to do this.
10598 \begin_inset Flex CharStyle:Code
10601 \begin_layout Plain Layout
10607 is similar, but only the very first row of the paragraph is dynamic, while
10608 the others are static; this is used, for example, for descriptions.
10610 \begin_inset Flex CharStyle:Code
10613 \begin_layout Plain Layout
10619 means the margin is chosen in a way that the longest row of this paragraph
10620 fits to the right margin.
10621 This is used to typeset an address on the right edge of the page.
10624 \begin_layout Description
10625 \begin_inset Flex CharStyle:Code
10628 \begin_layout Plain Layout
10635 \begin_inset Flex CharStyle:Code
10638 \begin_layout Plain Layout
10647 \begin_inset Flex CharStyle:Code
10650 \begin_layout Plain Layout
10656 ] Whether fragile commands in this layout should be
10657 \begin_inset Flex CharStyle:Code
10660 \begin_layout Plain Layout
10673 whether this command should itself be protected.)
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 Flex CharStyle:Code
10700 \begin_layout Plain Layout
10708 ] Whether newlines are translated into LaTeX newlines (
10709 \begin_inset Flex CharStyle:Code
10712 \begin_layout Plain Layout
10723 The translation can be switched off to allow more comfortable LaTeX editing
10727 \begin_layout Description
10728 \begin_inset Flex CharStyle:Code
10731 \begin_layout Plain Layout
10738 \begin_inset Flex CharStyle:Code
10741 \begin_layout Plain Layout
10748 \begin_inset Flex CharStyle:Code
10751 \begin_layout Plain Layout
10759 ] Whether the following Paragraph is allowed to indent its very first row.
10761 \begin_inset Flex CharStyle:Code
10764 \begin_layout Plain Layout
10770 means that it is not allowed to do so;
10771 \begin_inset Flex CharStyle:Code
10774 \begin_layout Plain Layout
10780 means it could do so if it wants to.
10783 \begin_layout Description
10784 \begin_inset Flex CharStyle:Code
10787 \begin_layout Plain Layout
10793 Name of a layout that has replaced this layout.
10794 This is used to rename a layout, while keeping backward compatibility.
10797 \begin_layout Description
10798 \begin_inset Flex CharStyle:Code
10801 \begin_layout Plain Layout
10808 \begin_inset Flex CharStyle:Code
10811 \begin_layout Plain Layout
10817 ] The number of optional arguments that can be used with this layout.
10818 This is useful for things like section headings, and only makes sense with
10822 \begin_layout Description
10823 \begin_inset Flex CharStyle:Code
10826 \begin_layout Plain Layout
10833 \begin_inset Flex CharStyle:Code
10836 \begin_layout Plain Layout
10842 ] The indent of the very first line of a paragraph.
10844 \begin_inset Flex CharStyle:Code
10847 \begin_layout Plain Layout
10853 will be fixed for a certain layout.
10854 The exception is Standard layout, since the indentation of a Standard layout
10855 paragraph can be prohibited with
10856 \begin_inset Flex CharStyle:Code
10859 \begin_layout Plain Layout
10866 Also, Standard layout paragraphs inside environments use the
10867 \begin_inset Flex CharStyle:Code
10870 \begin_layout Plain Layout
10876 of the environment, not their native one.
10877 For example, Standard paragraphs inside an enumeration are not indented.
10880 \begin_layout Description
10881 \begin_inset Flex CharStyle:Code
10884 \begin_layout Plain Layout
10891 \begin_inset Flex CharStyle:Code
10894 \begin_layout Plain Layout
10900 ] The vertical space between two paragraphs of this layout.
10903 \begin_layout Description
10904 \begin_inset Flex CharStyle:Code
10907 \begin_layout Plain Layout
10914 \begin_inset Flex CharStyle:Code
10917 \begin_layout Plain Layout
10923 ] LyX allows the user to choose either
10924 \begin_inset Quotes eld
10928 \begin_inset Quotes erd
10932 \begin_inset Quotes eld
10936 \begin_inset Quotes erd
10939 to typeset a document.
10941 \begin_inset Quotes eld
10945 \begin_inset Quotes erd
10948 is chosen, this value is completely ignored.
10950 \begin_inset Quotes eld
10954 \begin_inset Quotes erd
10957 is chosen, the parindent of a LaTeXtype
10958 \begin_inset Quotes eld
10962 \begin_inset Quotes erd
10965 layout is ignored and all paragraphs are separated by this parskip argument.
10966 The vertical space is calculated with
10967 \begin_inset Flex CharStyle:Code
10970 \begin_layout Plain Layout
10972 \begin_inset space ~
10981 \begin_inset Flex CharStyle:Code
10984 \begin_layout Plain Layout
10990 is the height of a row with the normal font.
10991 This way, the look stays the same with different screen fonts.
10994 \begin_layout Description
10995 \begin_inset Flex CharStyle:Code
10998 \begin_layout Plain Layout
11005 \begin_inset CommandInset label
11007 name "des:PathThru"
11014 \begin_inset Flex CharStyle:Code
11017 \begin_layout Plain Layout
11028 \begin_inset Flex CharStyle:Code
11031 \begin_layout Plain Layout
11037 ] Whether the contents of this paragraph should be output in raw form, meaning
11038 without special translations that LaTeX would require.
11041 \begin_layout Description
11042 \begin_inset Flex CharStyle:Code
11045 \begin_layout Plain Layout
11052 \begin_inset CommandInset label
11054 name "des:Preamble"
11058 Information to be included in the LaTeX preamble when this style is used.
11059 Used to define macros, load packages, etc., required by this particular
11062 \begin_inset Quotes eld
11066 \begin_inset Flex CharStyle:Code
11069 \begin_layout Plain Layout
11076 \begin_inset Quotes erd
11082 \begin_layout Description
11083 \begin_inset Flex CharStyle:Code
11086 \begin_layout Plain Layout
11093 \begin_inset Flex CharStyle:Code
11096 \begin_layout Plain Layout
11103 \begin_inset CommandInset label
11105 name "des:Requires"
11109 Whether the layout requires the feature
11110 \begin_inset Flex CharStyle:Code
11113 \begin_layout Plain Layout
11120 See the description of
11121 \begin_inset Flex CharStyle:Code
11124 \begin_layout Plain Layout
11131 \begin_inset CommandInset ref
11132 LatexCommand pageref
11133 reference "des:FreeSpacing"
11137 ) for information on `features'.
11141 \begin_layout Description
11142 \begin_inset Flex CharStyle:Code
11145 \begin_layout Plain Layout
11152 \begin_inset Flex CharStyle:Code
11155 \begin_layout Plain Layout
11162 \begin_inset Flex CharStyle:Code
11165 \begin_layout Plain Layout
11174 \begin_layout Description
11175 \begin_inset Flex CharStyle:Code
11178 \begin_layout Plain Layout
11185 \begin_inset Flex CharStyle:Code
11188 \begin_layout Plain Layout
11193 , onehalf, double, other
11202 ] This defines what the default spacing should be in the layout.
11204 \begin_inset Flex CharStyle:Code
11207 \begin_layout Plain Layout
11214 \begin_inset Flex CharStyle:Code
11217 \begin_layout Plain Layout
11224 \begin_inset Flex CharStyle:Code
11227 \begin_layout Plain Layout
11233 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
11234 If you specify the argument
11235 \begin_inset Flex CharStyle:Code
11238 \begin_layout Plain Layout
11244 , then you should also provide a numerical argument which will be the actual
11246 Note that, contrary to other parameters,
11247 \begin_inset Flex CharStyle:Code
11250 \begin_layout Plain Layout
11256 implies the generation of specific LaTeX code, using the package
11259 \begin_inset Flex CharStyle:Code
11262 \begin_layout Plain Layout
11271 \begin_layout Description
11272 \begin_inset Flex CharStyle:Code
11275 \begin_layout Plain Layout
11281 The font used for the text body .
11283 \begin_inset CommandInset ref
11285 reference "sub:Font-description"
11292 \begin_layout Description
11293 \begin_inset Flex CharStyle:Code
11296 \begin_layout Plain Layout
11304 The level of the style in the table of contents.
11305 This is used for automatic numbering of section headings.
11308 \begin_layout Description
11309 \begin_inset Flex CharStyle:Code
11312 \begin_layout Plain Layout
11319 \begin_inset Flex CharStyle:Code
11322 \begin_layout Plain Layout
11328 ] The vertical space with which the very first of a chain of paragraphs
11329 with this layout is separated from the previous paragraph.
11330 If the previous paragraph has another layout, the separations are not simply
11331 added, but the maximum is taken.
11334 \begin_layout Subsection
11336 \begin_inset CommandInset label
11345 \begin_layout Standard
11346 Since version 1.3.0 of LyX, it is has been both possible and necessary to
11347 define the floats (
11348 \begin_inset Flex CharStyle:MenuItem
11351 \begin_layout Plain Layout
11358 \begin_inset Flex CharStyle:MenuItem
11361 \begin_layout Plain Layout
11367 , \SpecialChar \ldots{}
11368 ) in the text class itself.
11369 Standard floats are included in the file
11370 \begin_inset Flex CharStyle:Code
11373 \begin_layout Plain Layout
11379 , so you may have to do no more than add
11382 \begin_layout LyX-Code
11383 Input stdfloats.inc
11386 \begin_layout Standard
11387 to your layout file.
11388 If you want to implement a text class that proposes some other float types
11389 (like the AGU class bundled with LyX), the information below will hopefully
11393 \begin_layout Description
11394 \begin_inset Flex CharStyle:Code
11397 \begin_layout Plain Layout
11404 \begin_inset Flex CharStyle:Code
11407 \begin_layout Plain Layout
11414 \begin_inset Quotes erd
11418 \begin_inset Quotes erd
11421 ] The file name extension of an auxiliary file for the list of figures (or
11423 LaTeX writes the captions to this file.
11426 \begin_layout Description
11427 \begin_inset Flex CharStyle:Code
11430 \begin_layout Plain Layout
11437 \begin_inset Flex CharStyle:Code
11440 \begin_layout Plain Layout
11447 \begin_inset Quotes erd
11451 \begin_inset Quotes erd
11454 ] The string that will be used in the menus and also for the caption.
11455 This is translated to the current language if babel is used.
11458 \begin_layout Description
11459 \begin_inset Flex CharStyle:Code
11462 \begin_layout Plain Layout
11469 \begin_inset Flex CharStyle:Code
11472 \begin_layout Plain Layout
11481 \begin_inset Flex CharStyle:Code
11484 \begin_layout Plain Layout
11491 \begin_inset Flex CharStyle:Code
11494 \begin_layout Plain Layout
11500 if the float is already defined by the LaTeX document class.
11502 \begin_inset Flex CharStyle:Code
11505 \begin_layout Plain Layout
11511 , the float will be defined using the LaTeX package
11512 \begin_inset Flex CharStyle:Code
11515 \begin_layout Plain Layout
11524 \begin_layout Description
11525 \begin_inset Flex CharStyle:Code
11528 \begin_layout Plain Layout
11535 \begin_inset Flex CharStyle:Code
11538 \begin_layout Plain Layout
11545 \begin_inset Quotes erd
11549 \begin_inset Quotes erd
11552 ] The heading used for the list of floats.
11553 This is translated to the document language.
11556 \begin_layout Description
11557 \begin_inset Flex CharStyle:Code
11560 \begin_layout Plain Layout
11567 \begin_inset Flex CharStyle:Code
11570 \begin_layout Plain Layout
11577 \begin_inset Quotes erd
11581 \begin_inset Quotes erd
11584 ] This (optional) argument determines whether floats of this class will
11585 be numbered within some sectional unit of the document.
11586 For example, if within is equal to
11587 \begin_inset Flex CharStyle:Code
11590 \begin_layout Plain Layout
11596 , the floats will be numbered within chapters.
11600 \begin_layout Description
11601 \begin_inset Flex CharStyle:Code
11604 \begin_layout Plain Layout
11611 \begin_inset Flex CharStyle:Code
11614 \begin_layout Plain Layout
11621 \begin_inset Quotes erd
11625 \begin_inset Quotes erd
11628 ] The default placement for the given class of floats.
11629 The string should be as in standard LaTeX:
11630 \begin_inset Flex CharStyle:Code
11633 \begin_layout Plain Layout
11640 \begin_inset Flex CharStyle:Code
11643 \begin_layout Plain Layout
11650 \begin_inset Flex CharStyle:Code
11653 \begin_layout Plain Layout
11660 \begin_inset Flex CharStyle:Code
11663 \begin_layout Plain Layout
11669 for top, bottom, page, and here, respectively.
11673 \begin_layout Plain Layout
11674 Note that the order of these letters in the string is irrelevant, like in
11680 On top of that there is a new type,
11681 \begin_inset Flex CharStyle:Code
11684 \begin_layout Plain Layout
11690 , which does not really correspond to a float, since it means: put it
11691 \begin_inset Quotes eld
11695 \begin_inset Quotes erd
11699 Note however that the
11700 \begin_inset Flex CharStyle:Code
11703 \begin_layout Plain Layout
11709 specifier is special and, because of implementation details, cannot be
11710 used in non-built in float types.
11711 If you do not understand what this means, just use
11712 \begin_inset Quotes eld
11716 \begin_inset Flex CharStyle:Code
11719 \begin_layout Plain Layout
11726 \begin_inset Quotes erd
11732 \begin_layout Description
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 Quotes erd
11757 \begin_inset Quotes erd
11760 ] The style used when defining the float using
11761 \begin_inset Flex CharStyle:Code
11764 \begin_layout Plain Layout
11775 \begin_layout Description
11776 \begin_inset Flex CharStyle:Code
11779 \begin_layout Plain Layout
11786 \begin_inset Flex CharStyle:Code
11789 \begin_layout Plain Layout
11796 \begin_inset Quotes erd
11800 \begin_inset Quotes erd
11804 \begin_inset Quotes eld
11808 \begin_inset Quotes erd
11811 of the new class of floats, like program or algorithm.
11812 After the appropriate
11813 \begin_inset Flex CharStyle:Code
11816 \begin_layout Plain Layout
11825 \begin_inset Flex CharStyle:Code
11828 \begin_layout Plain Layout
11837 \begin_inset Flex CharStyle:Code
11840 \begin_layout Plain Layout
11851 \begin_layout Standard
11852 Note that defining a float with type
11853 \begin_inset Flex CharStyle:Code
11856 \begin_layout Plain Layout
11864 automatically defines the corresponding counter with name
11865 \begin_inset Flex CharStyle:Code
11868 \begin_layout Plain Layout
11879 \begin_layout Subsection
11880 Flex insets and InsetLayout
11881 \begin_inset CommandInset label
11883 name "sub:Flex-insets-and"
11890 \begin_layout Standard
11891 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
11892 these are called Flex insets.
11896 \begin_layout Standard
11897 Flex insets come in three different kinds:
11900 \begin_layout Itemize
11902 \begin_inset Flex CharStyle:Code
11905 \begin_layout Plain Layout
11911 ): These define semantic markup corresponding to such LaTeX commands as
11913 \begin_inset Flex CharStyle:Code
11916 \begin_layout Plain Layout
11925 \begin_inset Flex CharStyle:Code
11928 \begin_layout Plain Layout
11939 \begin_layout Itemize
11941 \begin_inset Flex CharStyle:Code
11944 \begin_layout Plain Layout
11950 ): These can be used to define custom collapsible insets, similar to TeX
11951 code, footnote, and the like.
11952 An obvious example is an endnote inset, which is defined in the
11953 \begin_inset Flex CharStyle:Code
11956 \begin_layout Plain Layout
11965 \begin_layout Itemize
11967 \begin_inset Flex CharStyle:Code
11970 \begin_layout Plain Layout
11976 ): For use with DocBook classes.
11979 \begin_layout Standard
11980 Flex insets are defined using the
11981 \begin_inset Flex CharStyle:Code
11984 \begin_layout Plain Layout
11990 tag, which shall be explained in a moment.
11993 \begin_layout Standard
11995 \begin_inset Flex CharStyle:Code
11998 \begin_layout Plain Layout
12004 tag also serves another function: It can be used to customize the general
12005 layout of many different types of insets.
12007 \begin_inset Flex CharStyle:Code
12010 \begin_layout Plain Layout
12016 can be used to customize the layout parameters for footnotes, marginal
12017 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
12018 boxes, tables, algorithms, URLs, and optional arguments, as well as to
12019 define Flex insets.
12022 \begin_layout Standard
12024 \begin_inset Flex CharStyle:Code
12027 \begin_layout Plain Layout
12033 definition must begin with a line of the form:
12036 \begin_layout LyX-Code
12040 \begin_layout Standard
12042 \begin_inset Flex CharStyle:Code
12045 \begin_layout Plain Layout
12051 indicates the inset whose layout is being defined, and here there are two
12055 \begin_layout Enumerate
12056 The layout for a pre-existing inset is being modified.
12057 In this case, can be
12058 \begin_inset Flex CharStyle:Code
12061 \begin_layout Plain Layout
12067 any one of the following:
12068 \begin_inset Flex CharStyle:Code
12071 \begin_layout Plain Layout
12078 \begin_inset Flex CharStyle:Code
12081 \begin_layout Plain Layout
12088 \begin_inset Flex CharStyle:Code
12091 \begin_layout Plain Layout
12098 \begin_inset Flex CharStyle:Code
12101 \begin_layout Plain Layout
12108 \begin_inset Flex CharStyle:Code
12111 \begin_layout Plain Layout
12118 \begin_inset Flex CharStyle:Code
12121 \begin_layout Plain Layout
12128 \begin_inset Flex CharStyle:Code
12131 \begin_layout Plain Layout
12138 \begin_inset Flex CharStyle:Code
12141 \begin_layout Plain Layout
12148 \begin_inset Flex CharStyle:Code
12151 \begin_layout Plain Layout
12158 \begin_inset Flex CharStyle:Code
12161 \begin_layout Plain Layout
12168 \begin_inset Flex CharStyle:Code
12171 \begin_layout Plain Layout
12178 \begin_inset Flex CharStyle:Code
12181 \begin_layout Plain Layout
12188 \begin_inset Flex CharStyle:Code
12191 \begin_layout Plain Layout
12198 \begin_inset Flex CharStyle:Code
12201 \begin_layout Plain Layout
12208 \begin_inset Flex CharStyle:Code
12211 \begin_layout Plain Layout
12218 \begin_inset Flex CharStyle:Code
12221 \begin_layout Plain Layout
12228 \begin_inset Flex CharStyle:Code
12231 \begin_layout Plain Layout
12238 \begin_inset Flex CharStyle:Code
12241 \begin_layout Plain Layout
12248 \begin_inset Flex CharStyle:Code
12251 \begin_layout Plain Layout
12258 \begin_inset Flex CharStyle:Code
12261 \begin_layout Plain Layout
12270 \begin_layout Enumerate
12271 The layout for a Flex inset is being defined.
12273 \begin_inset Flex CharStyle:Code
12276 \begin_layout Plain Layout
12282 can be any valid identifier not used by a pre-existing inset.
12283 Note that the definition of a flex inset must
12288 \begin_inset Flex CharStyle:Code
12291 \begin_layout Plain Layout
12300 \begin_layout Standard
12302 \begin_inset Flex CharStyle:Code
12305 \begin_layout Plain Layout
12311 definition can contain the following entries:
12314 \begin_layout Description
12315 \begin_inset Flex CharStyle:Code
12318 \begin_layout Plain Layout
12324 The color for the inset's background.
12325 The valid colors are defined in
12326 \begin_inset Flex CharStyle:Code
12329 \begin_layout Plain Layout
12338 \begin_layout Description
12339 \begin_inset Flex CharStyle:Code
12342 \begin_layout Plain Layout
12348 As with paragraph styles (see page
12349 \begin_inset CommandInset ref
12351 reference "des:CopyStyle"
12358 \begin_layout Description
12359 \begin_inset Flex CharStyle:Code
12362 \begin_layout Plain Layout
12369 \begin_inset Flex CharStyle:Code
12372 \begin_layout Plain Layout
12381 \begin_inset Flex CharStyle:Code
12384 \begin_layout Plain Layout
12390 ] Indicates whether the user may employ the Paragraph Settings dialog to
12391 customize the paragraph.
12394 \begin_layout Description
12395 \begin_inset Flex CharStyle:Code
12398 \begin_layout Plain Layout
12405 \begin_inset Flex CharStyle:Code
12408 \begin_layout Plain Layout
12415 \begin_inset Flex CharStyle:Code
12418 \begin_layout Plain Layout
12425 \begin_inset Flex CharStyle:Code
12428 \begin_layout Plain Layout
12434 , describing the rendering style used for the inset's frame and buttons.
12435 Footnotes generally use
12436 \begin_inset Flex CharStyle:Code
12439 \begin_layout Plain Layout
12445 , ERT insets generally
12446 \begin_inset Flex CharStyle:Code
12449 \begin_layout Plain Layout
12455 , and character styles
12456 \begin_inset Flex CharStyle:Code
12459 \begin_layout Plain Layout
12468 \begin_layout Description
12469 \begin_inset Flex CharStyle:Code
12472 \begin_layout Plain Layout
12478 Required at the end of the InsetLayout declarations.
12481 \begin_layout Description
12482 \begin_inset Flex CharStyle:Code
12485 \begin_layout Plain Layout
12491 The font used for both the text body
12497 \begin_inset space ~
12501 \begin_inset CommandInset ref
12503 reference "sub:Font-description"
12508 Note that defining this font automatically defines the
12509 \begin_inset Flex CharStyle:Code
12512 \begin_layout Plain Layout
12518 to the same value, so define this first and define
12519 \begin_inset Flex CharStyle:Code
12522 \begin_layout Plain Layout
12528 later if you want them to be different.
12531 \begin_layout Description
12532 \begin_inset Flex CharStyle:Code
12535 \begin_layout Plain Layout
12542 \begin_inset Quotes eld
12546 \begin_inset Quotes erd
12549 language, leading to Left-to-Right (latin) output, e.
12550 \begin_inset space \thinspace{}
12554 \begin_inset space \space{}
12557 in TeX code or URL.
12561 \begin_layout Description
12562 \begin_inset Flex CharStyle:Code
12565 \begin_layout Plain Layout
12572 \begin_inset Flex CharStyle:Code
12575 \begin_layout Plain Layout
12584 \begin_inset Flex CharStyle:Code
12587 \begin_layout Plain Layout
12593 ] Indicates whether the PlainLayout should be used or, instead, the user
12594 can change the paragraph style used in the inset.
12597 \begin_layout Description
12598 \begin_inset Flex CharStyle:Code
12601 \begin_layout Plain Layout
12607 As with paragraph styles (see page
12608 \begin_inset CommandInset ref
12609 LatexCommand pageref
12610 reference "des:FreeSpacing"
12617 \begin_layout Description
12618 \begin_inset Flex CharStyle:Code
12621 \begin_layout Plain Layout
12628 \begin_inset Flex CharStyle:Code
12631 \begin_layout Plain Layout
12640 \begin_inset Flex CharStyle:Code
12643 \begin_layout Plain Layout
12649 ] Whether to include the contents of this inset in the strings generated
12650 for the `Outline' pane.
12651 One would not, for example, want the content of a footnote in a section
12652 header to be included in the TOC displayed in the outline, but one would
12653 normally want the content of a character style displayed.
12654 Default is false: not to include.
12657 \begin_layout Description
12658 \begin_inset Flex CharStyle:Code
12661 \begin_layout Plain Layout
12667 As with paragraph styles (see page
12668 \begin_inset CommandInset ref
12669 LatexCommand pageref
12670 reference "des:KeepEmpty"
12677 \begin_layout Description
12678 \begin_inset Flex CharStyle:Code
12681 \begin_layout Plain Layout
12687 The font used for the label.
12689 \begin_inset space ~
12693 \begin_inset CommandInset ref
12695 reference "sub:Font-description"
12700 Note that this definition can never appear before
12701 \begin_inset Flex CharStyle:Code
12704 \begin_layout Plain Layout
12710 , lest it be ineffective.
12713 \begin_layout Description
12714 \begin_inset Flex CharStyle:Code
12717 \begin_layout Plain Layout
12723 What will be displayed on the button or elsewhere as the inset label.
12724 Some inset types (TeX code and Branch) modify this label on the fly.
12727 \begin_layout Description
12728 \begin_inset Flex CharStyle:Code
12731 \begin_layout Plain Layout
12737 The name of the corresponding LaTeX stuff.
12738 Either the environment or command name.
12741 \begin_layout Description
12742 \begin_inset Flex CharStyle:Code
12745 \begin_layout Plain Layout
12751 The optional parameter for the corresponding
12752 \begin_inset Flex CharStyle:Code
12755 \begin_layout Plain Layout
12761 stuff, including possible bracket pairs like
12762 \begin_inset Flex CharStyle:Code
12765 \begin_layout Plain Layout
12772 This parameter cannot be changed from within LyX.
12775 \begin_layout Description
12776 \begin_inset Flex CharStyle:Code
12779 \begin_layout Plain Layout
12785 As with paragraph styles (see page
12786 \begin_inset CommandInset ref
12787 LatexCommand pageref
12788 reference "des:LatexType"
12795 \begin_layout Description
12796 \begin_inset Flex CharStyle:Code
12799 \begin_layout Plain Layout
12806 \begin_inset Flex CharStyle:Code
12809 \begin_layout Plain Layout
12816 \begin_inset Flex CharStyle:Code
12819 \begin_layout Plain Layout
12826 \begin_inset Flex CharStyle:Code
12829 \begin_layout Plain Layout
12836 \begin_inset Flex CharStyle:Code
12839 \begin_layout Plain Layout
12845 (indicating a dummy definition ending definitions of charstyles, etc).
12846 This entry is required in and is only meaningful for Flex insets.
12847 Among other things, it determines on which menu this inset will appear.
12850 \begin_layout Description
12851 \begin_inset Flex CharStyle:Code
12854 \begin_layout Plain Layout
12861 \begin_inset Flex CharStyle:Code
12864 \begin_layout Plain Layout
12873 \begin_inset Flex CharStyle:Code
12876 \begin_layout Plain Layout
12882 ] Whether multiple paragraphs are permitted in this inset.
12883 This will also set CustomPars to the same value and ForcePlain to the opposite
12885 These can be reset to other values, if they are used
12892 \begin_layout Description
12893 \begin_inset Flex CharStyle:Code
12896 \begin_layout Plain Layout
12903 \begin_inset Flex CharStyle:Code
12906 \begin_layout Plain Layout
12915 \begin_inset Flex CharStyle:Code
12918 \begin_layout Plain Layout
12924 ] Whether fragile commands in this layout should be
12925 \begin_inset Flex CharStyle:Code
12928 \begin_layout Plain Layout
12941 whether the command should itself be protected.)
12944 \begin_layout Description
12945 \begin_inset Flex CharStyle:Code
12948 \begin_layout Plain Layout
12955 \begin_inset Flex CharStyle:Code
12958 \begin_layout Plain Layout
12967 \begin_inset Flex CharStyle:Code
12970 \begin_layout Plain Layout
12976 ] As with paragraph styles (see page
12977 \begin_inset CommandInset ref
12979 reference "des:PathThru"
12986 \begin_layout Description
12987 \begin_inset Flex CharStyle:Code
12990 \begin_layout Plain Layout
12996 As with paragraph styles (see page
12997 \begin_inset CommandInset ref
12998 LatexCommand pageref
12999 reference "des:Preamble"
13006 \begin_layout Description
13007 \begin_inset Flex CharStyle:Code
13010 \begin_layout Plain Layout
13017 \begin_inset Flex CharStyle:Code
13020 \begin_layout Plain Layout
13026 ] As with paragraph styles (see page
13027 \begin_inset CommandInset ref
13028 LatexCommand pageref
13029 reference "des:Requires"
13036 \begin_layout Subsection
13038 \begin_inset CommandInset label
13040 name "sub:Counters"
13047 \begin_layout Standard
13048 Since version 1.3.0 of LyX, it is both possible and necessary to define the
13050 \begin_inset Flex CharStyle:MenuItem
13053 \begin_layout Plain Layout
13060 \begin_inset Flex CharStyle:MenuItem
13063 \begin_layout Plain Layout
13069 , \SpecialChar \ldots{}
13070 ) in the text class itself.
13071 The standard counters are defined in the file
13072 \begin_inset Flex CharStyle:Code
13075 \begin_layout Plain Layout
13081 , so you may have to do no more than add
13084 \begin_layout LyX-Code
13085 Input stdcounters.inc
13088 \begin_layout Standard
13089 to your layout file to get them to work.
13090 But if you want to define custom counters, then you can do so.
13091 The counter declaration must begin with:
13094 \begin_layout LyX-Code
13098 \begin_layout Standard
13099 where of course `name' is replaced by the name of the counter.
13100 And it must end with
13101 \begin_inset Quotes eld
13105 \begin_inset Flex CharStyle:Code
13108 \begin_layout Plain Layout
13115 \begin_inset Quotes erd
13119 The following parameters can also be used:
13122 \begin_layout Description
13123 \begin_inset Flex CharStyle:Code
13126 \begin_layout Plain Layout
13127 LabelString [string=""]
13132 when this is defined, this string defines how the counter is displayed.
13133 Setting this value sets
13134 \begin_inset Flex CharStyle:Code
13137 \begin_layout Plain Layout
13138 LabelStringAppendix
13144 The following special constructs can be used in the string:
13148 \begin_layout Itemize
13149 \begin_inset Flex CharStyle:Code
13152 \begin_layout Plain Layout
13160 will be replaced by the expansion of the
13161 \begin_inset Flex CharStyle:Code
13164 \begin_layout Plain Layout
13171 \begin_inset Flex CharStyle:Code
13174 \begin_layout Plain Layout
13175 LabelStringAppendix
13181 \begin_inset Flex CharStyle:Code
13184 \begin_layout Plain Layout
13194 \begin_layout Itemize
13195 counter values can be expressed using LaTeX-like macros
13196 \begin_inset Flex CharStyle:Code
13199 \begin_layout Plain Layout
13216 \begin_inset Flex CharStyle:Code
13219 \begin_layout Plain Layout
13231 \begin_layout Plain Layout
13241 Actually, the situation is a bit more complicated: any
13260 other than those described below will produce arabic numerals.
13261 It would not be surprising to see this change in the future.
13267 \begin_inset Flex CharStyle:Code
13270 \begin_layout Plain Layout
13276 : 1, 2, 3,\SpecialChar \ldots{}
13278 \begin_inset Flex CharStyle:Code
13281 \begin_layout Plain Layout
13287 for lower-case letters: a, b, c, \SpecialChar \ldots{}
13289 \begin_inset Flex CharStyle:Code
13292 \begin_layout Plain Layout
13298 for upper-case letters: A, B, C, \SpecialChar \ldots{}
13300 \begin_inset Flex CharStyle:Code
13303 \begin_layout Plain Layout
13309 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
13311 \begin_inset Flex CharStyle:Code
13314 \begin_layout Plain Layout
13320 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
13322 \begin_inset Flex CharStyle:Code
13325 \begin_layout Plain Layout
13331 for hebrew numerals.
13335 \begin_layout Standard
13336 If LabelString is not defined, a default value is constructed as follows:
13337 if the counter has a master counter
13338 \begin_inset Flex CharStyle:Code
13341 \begin_layout Plain Layout
13348 \begin_inset Flex CharStyle:Code
13351 \begin_layout Plain Layout
13358 \begin_inset Flex CharStyle:Code
13361 \begin_layout Plain Layout
13371 is used; otherwise the string
13372 \begin_inset Flex CharStyle:Code
13375 \begin_layout Plain Layout
13386 \begin_layout Description
13387 \begin_inset Flex CharStyle:Code
13390 \begin_layout Plain Layout
13391 LabelStringAppendix [string=""]
13397 \begin_inset Flex CharStyle:Code
13400 \begin_layout Plain Layout
13406 , but for use in the Appendix.
13409 \begin_layout Description
13410 \begin_inset Flex CharStyle:Code
13413 \begin_layout Plain Layout
13420 \begin_inset Flex CharStyle:Code
13423 \begin_layout Plain Layout
13430 \begin_inset Quotes erd
13434 \begin_inset Quotes erd
13437 ] If this is set to the name of another counter, the present counter will
13438 be reset every time the other one is increased.
13440 \begin_inset Flex CharStyle:Code
13443 \begin_layout Plain Layout
13450 \begin_inset Flex CharStyle:Code
13453 \begin_layout Plain Layout
13462 \begin_layout Subsection
13464 \begin_inset CommandInset label
13466 name "sub:Font-description"
13473 \begin_layout Standard
13474 A font description looks like this:
13477 \begin_layout LyX-Code
13487 \begin_layout LyX-Code
13491 \begin_layout LyX-Code
13495 \begin_layout Standard
13496 The following commands are available:
13499 \begin_layout Description
13500 \begin_inset Flex CharStyle:Code
13503 \begin_layout Plain Layout
13510 \begin_inset Flex CharStyle:Code
13513 \begin_layout Plain Layout
13522 \begin_inset Flex CharStyle:Code
13525 \begin_layout Plain Layout
13532 \begin_inset Flex CharStyle:Code
13535 \begin_layout Plain Layout
13542 \begin_inset Flex CharStyle:Code
13545 \begin_layout Plain Layout
13552 \begin_inset Flex CharStyle:Code
13555 \begin_layout Plain Layout
13562 \begin_inset Flex CharStyle:Code
13565 \begin_layout Plain Layout
13572 \begin_inset Flex CharStyle:Code
13575 \begin_layout Plain Layout
13582 \begin_inset Flex CharStyle:Code
13585 \begin_layout Plain Layout
13592 \begin_inset Flex CharStyle:Code
13595 \begin_layout Plain Layout
13604 \begin_layout Description
13605 \begin_inset Flex CharStyle:Code
13608 \begin_layout Plain Layout
13617 \begin_inset Flex CharStyle:Code
13620 \begin_layout Plain Layout
13631 \begin_inset Flex CharStyle:Code
13634 \begin_layout Plain Layout
13641 \begin_inset Flex CharStyle:Code
13644 \begin_layout Plain Layout
13653 \begin_layout Description
13654 \begin_inset Flex CharStyle:Code
13657 \begin_layout Plain Layout
13664 \begin_inset Flex CharStyle:Code
13667 \begin_layout Plain Layout
13673 ] Valid argument are:
13674 \begin_inset Flex CharStyle:Code
13677 \begin_layout Plain Layout
13684 \begin_inset Flex CharStyle:Code
13687 \begin_layout Plain Layout
13694 \begin_inset Flex CharStyle:Code
13697 \begin_layout Plain Layout
13704 \begin_inset Flex CharStyle:Code
13707 \begin_layout Plain Layout
13714 \begin_inset Flex CharStyle:Code
13717 \begin_layout Plain Layout
13724 \begin_inset Flex CharStyle:Code
13727 \begin_layout Plain Layout
13734 Each of these turns on or off the corresponding attribute.
13737 \begin_layout Description
13738 \begin_inset Flex CharStyle:Code
13741 \begin_layout Plain Layout
13750 \begin_inset Flex CharStyle:Code
13753 \begin_layout Plain Layout
13764 \begin_inset Flex CharStyle:Code
13767 \begin_layout Plain Layout
13776 \begin_layout Description
13777 \begin_inset Flex CharStyle:Code
13780 \begin_layout Plain Layout
13789 \begin_inset Flex CharStyle:Code
13792 \begin_layout Plain Layout
13803 \begin_inset Flex CharStyle:Code
13806 \begin_layout Plain Layout
13813 \begin_inset Flex CharStyle:Code
13816 \begin_layout Plain Layout
13823 \begin_inset Flex CharStyle:Code
13826 \begin_layout Plain Layout
13835 \begin_layout Description
13836 \begin_inset Flex CharStyle:Code
13839 \begin_layout Plain Layout
13846 \begin_inset Flex CharStyle:Code
13849 \begin_layout Plain Layout
13856 \begin_inset Flex CharStyle:Code
13859 \begin_layout Plain Layout
13866 \begin_inset Flex CharStyle:Code
13869 \begin_layout Plain Layout
13878 \begin_inset Flex CharStyle:Code
13881 \begin_layout Plain Layout
13888 \begin_inset Flex CharStyle:Code
13891 \begin_layout Plain Layout
13898 \begin_inset Flex CharStyle:Code
13901 \begin_layout Plain Layout
13908 \begin_inset Flex CharStyle:Code
13911 \begin_layout Plain Layout
13918 \begin_inset Flex CharStyle:Code
13921 \begin_layout Plain Layout
13930 \begin_layout Subsection
13931 Upgrading old layout files
13934 \begin_layout Standard
13935 The file format of layout files changes from time to time, so old layout
13936 files need to be converted.
13937 This process has been automated since LyX 1.4.0: If LyX reads an old format
13938 layout file it will call the conversion tool
13939 \begin_inset Flex CharStyle:Code
13942 \begin_layout Plain Layout
13943 LyXDir/scripts/layout2layout.py
13948 and convert it to a temporary file in current format.
13949 The original file is left untouched.
13950 If you want to convert the layout file permanently, just call the converter
13954 \begin_layout LyX-Code
13955 python $LyXDir/scripts/layout2layout.py myclass.layout myclassnew.layout
13958 \begin_layout Standard
13959 (You need to replace
13960 \begin_inset Flex CharStyle:Code
13963 \begin_layout Plain Layout
13969 with the name of your LyX system directory, unless you happen to have defined
13970 such an environment variable.) Then copy
13971 \begin_inset Flex CharStyle:Code
13974 \begin_layout Plain Layout
13981 \begin_inset Flex CharStyle:Code
13984 \begin_layout Plain Layout
13993 \begin_layout Standard
13994 The automatic conversion only handles syntax changes.
13995 It cannot handle the case where the contents of included files was changed,
13996 so these will have to be converted separately.
13999 \begin_layout Section
14001 \begin_inset CommandInset label
14003 name "sec:Creating-Templates"
14010 \begin_layout Standard
14011 Templates are created just like usual documents.
14012 The only difference is that usual documents contain all possible settings,
14013 including the font scheme and the paper size.
14014 Usually a user doesn't want a template to overwrite his defaults in these
14016 For that reason, the designer of a template should remove the corresponding
14018 \begin_inset Flex CharStyle:Code
14021 \begin_layout Plain Layout
14030 \begin_inset Flex CharStyle:Code
14033 \begin_layout Plain Layout
14041 from the template LyX file.
14042 This can be done with any simple text-editor, for example
14043 \begin_inset Flex CharStyle:Code
14046 \begin_layout Plain Layout
14053 \begin_inset Flex CharStyle:Code
14056 \begin_layout Plain Layout
14066 \begin_layout Standard
14067 Put the edited template files you create in
14068 \begin_inset Flex CharStyle:Code
14071 \begin_layout Plain Layout
14077 , copy the ones you use from the global template directory in
14078 \begin_inset Flex CharStyle:Code
14081 \begin_layout Plain Layout
14087 to the same place, and redefine the template path in the
14088 \begin_inset Flex CharStyle:MenuItem
14091 \begin_layout Plain Layout
14092 Tools\SpecialChar \menuseparator
14093 Preferences\SpecialChar \menuseparator
14102 \begin_layout Standard
14103 Note that there is a template which has a particular meaning:
14104 \begin_inset Flex CharStyle:Code
14107 \begin_layout Plain Layout
14114 This template is loaded every time you create a new document with
14115 \begin_inset Flex CharStyle:MenuItem
14118 \begin_layout Plain Layout
14119 File\SpecialChar \menuseparator
14125 in order to provide useful defaults.
14126 To create this template from inside LyX, all you have to do is to open
14127 a document with the correct settings, and use the
14128 \begin_inset Flex CharStyle:MenuItem
14131 \begin_layout Plain Layout
14132 Save as Document Defaults
14140 \begin_layout Chapter
14141 Including External Material
14144 \begin_layout Standard
14145 \begin_inset Box Shadowbox
14154 height_special "totalheight"
14157 \begin_layout Plain Layout
14158 WARNING: This portion of the documentation has not been updated for some
14160 We certainly hope that it is still accurate, but there are no guarantees.
14168 \begin_layout Standard
14169 The use of material from sources external to LyX is covered in detail in
14175 This part of the manual covers what needs to happen behind the scenes for
14176 new sorts of material to be included.
14179 \begin_layout Section
14183 \begin_layout Standard
14184 The external material feature is based on the concept of a
14189 A template is a specification of how LyX should interface with a certain
14191 As bundled, LyX comes with predefined templates for Xfig figures, various
14192 raster format images, chess diagrams, and LilyPond music notation.
14193 You can check the actual list by using the menu
14194 \begin_inset Flex CharStyle:MenuItem
14197 \begin_layout Plain Layout
14198 Insert\SpecialChar \menuseparator
14199 File\SpecialChar \menuseparator
14206 Furthermore, it is possible to roll your own template to support a specific
14208 Later we'll describe in more detail what is involved, and hopefully you
14209 will submit all the templates you create so we can include them in a later
14213 \begin_layout Standard
14214 Another basic idea of the external material feature is to distinguish between
14215 the original file that serves as a base for final material and the produced
14216 file that is included in your exported or printed document.
14217 For example, consider the case of a figure produced with
14218 \begin_inset Flex CharStyle:Code
14221 \begin_layout Plain Layout
14228 The Xfig application itself works on an original file with the
14229 \begin_inset Flex CharStyle:Code
14232 \begin_layout Plain Layout
14239 Within Xfig, you create and change your figure, and when you are done,
14241 \begin_inset Flex CharStyle:Code
14244 \begin_layout Plain Layout
14251 When you want to include the figure in your document, you invoke
14252 \begin_inset Flex CharStyle:Code
14255 \begin_layout Plain Layout
14261 in order to create a PostScript file that can readily be included in your
14264 \begin_inset Flex CharStyle:Code
14267 \begin_layout Plain Layout
14273 file is the original file, and the PostScript file is the produced file.
14276 \begin_layout Standard
14277 This distinction is important in order to allow updating of the material
14278 while you are in the process of writing the document.
14279 Furthermore, it provides us with the flexibility that is needed to support
14280 multiple export formats.
14281 For instance, in the case of a plain text file, it is not exactly an award-winn
14282 ing idea to include the figure as raw PostScript.
14283 Instead, you'd either prefer to just include a reference to the figure
14284 or try to invoke some graphics to ASCII converter to make the final result
14285 look similar to the real graphics.
14286 The external material management allows you to do this, because it is parametri
14287 zed on the different export formats that LyX supports.
14290 \begin_layout Standard
14291 Besides supporting the production of different products according to the
14292 exported format, it supports tight integration with editing and viewing
14294 In the case of an Xfig figure, you are able to invoke Xfig on the original
14295 file with a single click from within the external material dialog in LyX,
14296 and also preview the produced PostScript file with Ghostview with another
14298 No more fiddling around with the command line and/or file browsers to locate
14299 and manipulate the original or produced files.
14300 In this way, you are finally able to take full advantage of the many different
14301 applications that are relevant to use when you write your documents, and
14302 ultimately be more productive.
14305 \begin_layout Section
14306 The external template configuration file
14309 \begin_layout Standard
14310 It is relatively easy to add custom external template definitions to LyX.
14311 However, be aware that doing this in an careless manner most probably
14315 introduce an easily exploitable security hole.
14316 So before you do this, please read the discussion about security in section
14318 \begin_inset CommandInset ref
14320 reference "sec:Security-discussion"
14327 \begin_layout Standard
14328 Having said that, we encourage you to submit any interesting templates that
14333 \begin_layout Standard
14334 The external templates are defined in the
14335 \begin_inset Flex CharStyle:Code
14338 \begin_layout Plain Layout
14339 LyXDir/lib/external_templates
14345 You can place your own version in
14346 \begin_inset Flex CharStyle:Code
14349 \begin_layout Plain Layout
14350 UserDir/external_templates
14358 \begin_layout Standard
14359 A typical template looks like this:
14362 \begin_layout LyX-Code
14366 \begin_layout LyX-Code
14367 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
14370 \begin_layout LyX-Code
14374 \begin_layout LyX-Code
14378 \begin_layout LyX-Code
14382 \begin_layout LyX-Code
14386 \begin_layout LyX-Code
14390 \begin_layout LyX-Code
14391 AutomaticProduction true
14394 \begin_layout LyX-Code
14398 \begin_layout LyX-Code
14402 \begin_layout LyX-Code
14406 \begin_layout LyX-Code
14407 TransformCommand Rotate RotationLatexCommand
14410 \begin_layout LyX-Code
14411 TransformCommand Resize ResizeLatexCommand
14414 \begin_layout LyX-Code
14415 Product "$$RotateFront$$ResizeFront
14418 \begin_layout LyX-Code
14423 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
14426 \begin_layout LyX-Code
14427 $$ResizeBack$$RotateBack"
14430 \begin_layout LyX-Code
14434 \begin_layout LyX-Code
14435 UpdateResult "$$AbsPath$$Basename.pstex_t"
14438 \begin_layout LyX-Code
14439 Requirement "graphicx"
14442 \begin_layout LyX-Code
14443 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
14446 \begin_layout LyX-Code
14447 ReferencedFile latex "$$AbsPath$$Basename.eps"
14450 \begin_layout LyX-Code
14451 ReferencedFile dvi "$$AbsPath$$Basename.eps"
14454 \begin_layout LyX-Code
14458 \begin_layout LyX-Code
14462 \begin_layout LyX-Code
14463 TransformCommand Rotate RotationLatexCommand
14466 \begin_layout LyX-Code
14467 TransformCommand Resize ResizeLatexCommand
14470 \begin_layout LyX-Code
14471 Product "$$RotateFront$$ResizeFront
14474 \begin_layout LyX-Code
14479 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
14482 \begin_layout LyX-Code
14483 $$ResizeBack$$RotateBack"
14486 \begin_layout LyX-Code
14487 UpdateFormat pdftex
14490 \begin_layout LyX-Code
14491 UpdateResult "$$AbsPath$$Basename.pdftex_t"
14494 \begin_layout LyX-Code
14495 Requirement "graphicx"
14498 \begin_layout LyX-Code
14499 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
14502 \begin_layout LyX-Code
14503 ReferencedFile latex "$$AbsPath$$Basename.pdf"
14506 \begin_layout LyX-Code
14510 \begin_layout LyX-Code
14514 \begin_layout LyX-Code
14515 Product "$$Contents(
14517 "$$AbsPath$$Basename.asc
14522 \begin_layout LyX-Code
14523 UpdateFormat asciixfig
14526 \begin_layout LyX-Code
14527 UpdateResult "$$AbsPath$$Basename.asc"
14530 \begin_layout LyX-Code
14534 \begin_layout LyX-Code
14538 \begin_layout LyX-Code
14539 Product "<graphic fileref=
14541 "$$AbsOrRelPathMaster$$Basename.eps
14546 \begin_layout LyX-Code
14550 \begin_layout LyX-Code
14554 \begin_layout LyX-Code
14555 UpdateResult "$$AbsPath$$Basename.eps"
14558 \begin_layout LyX-Code
14559 ReferencedFile docbook "$$AbsPath$$Basename.eps"
14562 \begin_layout LyX-Code
14563 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
14566 \begin_layout LyX-Code
14570 \begin_layout LyX-Code
14571 Product "[XFig: $$FName]"
14574 \begin_layout LyX-Code
14578 \begin_layout LyX-Code
14582 \begin_layout Standard
14583 As you can see, the template is enclosed in
14584 \begin_inset Flex CharStyle:Code
14587 \begin_layout Plain Layout
14593 \SpecialChar \ldots{}
14595 \begin_inset Flex CharStyle:Code
14598 \begin_layout Plain Layout
14605 It contains a header specifying some general settings and, for each supported
14606 primary document file format, a section
14607 \begin_inset Flex CharStyle:Code
14610 \begin_layout Plain Layout
14616 \SpecialChar \ldots{}
14618 \begin_inset Flex CharStyle:Code
14621 \begin_layout Plain Layout
14630 \begin_layout Subsection
14631 The template header
14634 \begin_layout Description
14635 \begin_inset Flex CharStyle:Code
14638 \begin_layout Plain Layout
14639 AutomaticProduction
14640 \begin_inset space ~
14648 Whether the file represented by the template must be generated by LyX.
14649 This command must occur exactly once.
14652 \begin_layout Description
14653 \begin_inset Flex CharStyle:Code
14656 \begin_layout Plain Layout
14658 \begin_inset space ~
14666 A glob pattern that is used in the file dialog to filter out the desired
14668 If there is more than one possible file extension (e.
14669 \begin_inset space \thinspace{}
14673 \begin_inset space \space{}
14677 \begin_inset Flex CharStyle:Code
14680 \begin_layout Plain Layout
14687 \begin_inset Flex CharStyle:Code
14690 \begin_layout Plain Layout
14696 ), use something like
14697 \begin_inset Flex CharStyle:Code
14700 \begin_layout Plain Layout
14707 This command must occur exactly once.
14710 \begin_layout Description
14711 \begin_inset Flex CharStyle:Code
14714 \begin_layout Plain Layout
14716 \begin_inset space ~
14724 The text that is displayed on the button.
14725 This command must occur exactly once.
14728 \begin_layout Description
14729 \begin_inset Flex CharStyle:Code
14732 \begin_layout Plain Layout
14734 \begin_inset space ~
14738 \begin_inset space ~
14746 The help text that is used in the External dialog.
14747 Provide enough information to explain to the user just what the template
14748 can provide him with.
14749 This command must occur exactly once.
14752 \begin_layout Description
14753 \begin_inset Flex CharStyle:Code
14756 \begin_layout Plain Layout
14758 \begin_inset space ~
14766 The file format of the original file.
14767 This must be the name of a format that is known to LyX (see section
14768 \begin_inset CommandInset ref
14770 reference "sec:Formats"
14776 \begin_inset Quotes eld
14780 \begin_inset Flex CharStyle:Code
14783 \begin_layout Plain Layout
14790 \begin_inset Quotes erd
14793 if the template can handle original files of more than one format.
14794 LyX will attempt to interrogate the file itself in order to deduce its
14795 format in this case.
14796 This command must occur exactly once.
14799 \begin_layout Description
14800 \begin_inset Flex CharStyle:Code
14803 \begin_layout Plain Layout
14805 \begin_inset space ~
14813 A unique name for the template.
14814 It must not contain substitution macros (see below).
14817 \begin_layout Description
14818 \begin_inset Flex CharStyle:Code
14821 \begin_layout Plain Layout
14823 \begin_inset space ~
14826 Rotate|Resize|Clip|Extra
14831 This command specifies which transformations are supported by this template.
14832 It may occur zero or more times.
14833 This command enables the corresponding tabs in the external dialog.
14835 \begin_inset Flex CharStyle:Code
14838 \begin_layout Plain Layout
14844 command must have either a corresponding
14845 \begin_inset Flex CharStyle:Code
14848 \begin_layout Plain Layout
14855 \begin_inset Flex CharStyle:Code
14858 \begin_layout Plain Layout
14865 \begin_inset Flex CharStyle:Code
14868 \begin_layout Plain Layout
14875 Otherwise the transformation will not be supported by that format.
14878 \begin_layout Subsection
14882 \begin_layout Description
14883 \begin_inset Flex CharStyle:Code
14886 \begin_layout Plain Layout
14888 \begin_inset space ~
14891 LaTeX|PDFLaTeX|PlainText|DocBook
14896 The primary document file format that this format definition is for.
14897 Not every template has a sensible representation in all document file formats.
14898 Please define nevertheless a
14899 \begin_inset Flex CharStyle:Code
14902 \begin_layout Plain Layout
14908 section for all formats.
14909 Use a dummy text when no representation is available.
14910 Then you can at least see a reference to the external material in the exported
14914 \begin_layout Description
14915 \begin_inset Flex CharStyle:Code
14918 \begin_layout Plain Layout
14920 \begin_inset space ~
14924 \begin_inset space ~
14932 This command defines an additional macro
14933 \begin_inset Flex CharStyle:Code
14936 \begin_layout Plain Layout
14942 for substitution in
14943 \begin_inset Flex CharStyle:Code
14946 \begin_layout Plain Layout
14954 \begin_inset Flex CharStyle:Code
14957 \begin_layout Plain Layout
14963 itself may contain substitution macros.
14964 The advantage over using
14965 \begin_inset Flex CharStyle:Code
14968 \begin_layout Plain Layout
14975 \begin_inset Flex CharStyle:Code
14978 \begin_layout Plain Layout
14984 is that the substituted value of
14985 \begin_inset Flex CharStyle:Code
14988 \begin_layout Plain Layout
14994 is sanitized so that it is a valid optional argument in the document format.
14995 This command may occur zero or more times.
14998 \begin_layout Description
14999 \begin_inset Flex CharStyle:Code
15002 \begin_layout Plain Layout
15004 \begin_inset space ~
15012 The text that is inserted in the exported document.
15013 This is actually the most important command and can be quite complex.
15014 This command must occur exactly once.
15017 \begin_layout Description
15018 \begin_inset Flex CharStyle:Code
15021 \begin_layout Plain Layout
15023 \begin_inset space ~
15031 This command specifies a preamble snippet that will be included in the
15033 It has to be defined using
15034 \begin_inset Flex CharStyle:Code
15037 \begin_layout Plain Layout
15043 \SpecialChar \ldots{}
15045 \begin_inset Flex CharStyle:Code
15048 \begin_layout Plain Layout
15055 This command may occur zero or more times.
15058 \begin_layout Description
15059 \begin_inset Flex CharStyle:Code
15062 \begin_layout Plain Layout
15064 \begin_inset space ~
15068 \begin_inset space ~
15076 This command denotes files that are created by the conversion process and
15077 are needed for a particular export format.
15078 If the filename is relative, it is interpreted relative to the master document.
15079 This command may be given zero or more times.
15082 \begin_layout Description
15083 \begin_inset Flex CharStyle:Code
15086 \begin_layout Plain Layout
15088 \begin_inset space ~
15096 The name of a required LaTeX package.
15097 The package is included via
15098 \begin_inset Flex CharStyle:Code
15101 \begin_layout Plain Layout
15109 in the LaTeX preamble.
15110 This command may occur zero or more times.
15113 \begin_layout Description
15114 \begin_inset Flex CharStyle:Code
15117 \begin_layout Plain Layout
15119 \begin_inset space ~
15123 \begin_inset space ~
15126 RotationLatexCommand
15131 This command specifies that the built in LaTeX command should be used for
15133 This command may occur once or not at all.
15136 \begin_layout Description
15137 \begin_inset Flex CharStyle:Code
15140 \begin_layout Plain Layout
15142 \begin_inset space ~
15146 \begin_inset space ~
15154 This command specifies that the built in LaTeX command should be used for
15156 This command may occur once or not at all.
15159 \begin_layout Description
15160 \begin_inset Flex CharStyle:Code
15163 \begin_layout Plain Layout
15165 \begin_inset space ~
15169 \begin_inset space ~
15172 RotationLatexOption
15177 This command specifies that rotation is done via an optional argument.
15178 This command may occur once or not at all.
15181 \begin_layout Description
15182 \begin_inset Flex CharStyle:Code
15185 \begin_layout Plain Layout
15187 \begin_inset space ~
15191 \begin_inset space ~
15199 This command specifies that resizing is done via an optional argument.
15200 This command may occur once or not at all.
15203 \begin_layout Description
15204 \begin_inset Flex CharStyle:Code
15207 \begin_layout Plain Layout
15209 \begin_inset space ~
15213 \begin_inset space ~
15221 This command specifies that clipping is done via an optional argument.
15222 This command may occur once or not at all.
15225 \begin_layout Description
15226 \begin_inset Flex CharStyle:Code
15229 \begin_layout Plain Layout
15231 \begin_inset space ~
15235 \begin_inset space ~
15243 This command specifies that an extra optional argument is used.
15244 This command may occur once or not at all.
15247 \begin_layout Description
15248 \begin_inset Flex CharStyle:Code
15251 \begin_layout Plain Layout
15253 \begin_inset space ~
15261 The file format of the converted file.
15262 This must be the name of a format that is known to LyX (see the
15263 \begin_inset Flex CharStyle:MenuItem
15266 \begin_layout Plain Layout
15271 ools\SpecialChar \menuseparator
15276 references:Conversion
15282 This command must occur exactly once.
15285 \begin_layout Description
15286 \begin_inset Flex CharStyle:Code
15289 \begin_layout Plain Layout
15291 \begin_inset space ~
15299 The file name of the converted file.
15300 The file name must be absolute.
15301 This command must occur exactly once.
15304 \begin_layout Subsection
15305 Preamble definitions
15308 \begin_layout Standard
15309 The external template configuration file may contain additional preamble
15310 definitions enclosed by
15311 \begin_inset Flex CharStyle:Code
15314 \begin_layout Plain Layout
15320 \SpecialChar \ldots{}
15322 \begin_inset Flex CharStyle:Code
15325 \begin_layout Plain Layout
15332 They can be used by the templates in the
15333 \begin_inset Flex CharStyle:Code
15336 \begin_layout Plain Layout
15345 \begin_layout Section
15346 The substitution mechanism
15349 \begin_layout Standard
15350 When the external material facility invokes an external program, it is done
15351 on the basis of a command defined in the template configuration file.
15352 These commands can contain various macros that are expanded before execution.
15353 Execution always take place in the directory of the containing document.
15356 \begin_layout Standard
15357 Also, whenever external material is to be displayed, the name will be produced
15358 by the substitution mechanism, and most other commands in the template
15359 definition support substitution as well.
15362 \begin_layout Standard
15363 The available macros are the following:
15366 \begin_layout Description
15367 \begin_inset Flex CharStyle:Code
15370 \begin_layout Plain Layout
15371 $$AbsOrRelPathMaster
15376 The file path, absolute or relative to the master LyX document.
15379 \begin_layout Description
15380 \begin_inset Flex CharStyle:Code
15383 \begin_layout Plain Layout
15384 $$AbsOrRelPathParent
15389 The file path, absolute or relative to the LyX document.
15392 \begin_layout Description
15393 \begin_inset Flex CharStyle:Code
15396 \begin_layout Plain Layout
15402 The absolute file path.
15405 \begin_layout Description
15406 \begin_inset Flex CharStyle:Code
15409 \begin_layout Plain Layout
15415 The filename without path and without the extension.
15418 \begin_layout Description
15419 \begin_inset Flex CharStyle:Code
15422 \begin_layout Plain Layout
15424 \begin_inset Quotes eld
15428 \begin_inset Quotes erd
15436 This macro will expand to the contents of the file with the name
15437 \begin_inset Flex CharStyle:Code
15440 \begin_layout Plain Layout
15449 \begin_layout Description
15450 \begin_inset Flex CharStyle:Code
15453 \begin_layout Plain Layout
15459 The file extension (including the dot).
15462 \begin_layout Description
15463 \begin_inset Flex CharStyle:Code
15466 \begin_layout Plain Layout
15472 The filename of the file specified in the external material dialog.
15473 This is either an absolute name, or it is relative to the LyX document.
15476 \begin_layout Description
15477 \begin_inset Flex CharStyle:Code
15480 \begin_layout Plain Layout
15487 \begin_inset Flex CharStyle:Code
15490 \begin_layout Plain Layout
15496 (absolute name or relative to the LyX document).
15499 \begin_layout Description
15500 \begin_inset Flex CharStyle:Code
15503 \begin_layout Plain Layout
15509 The file path, relative to the master LyX document.
15512 \begin_layout Description
15513 \begin_inset Flex CharStyle:Code
15516 \begin_layout Plain Layout
15522 The file path, relative to the LyX document.
15525 \begin_layout Description
15526 \begin_inset Flex CharStyle:Code
15529 \begin_layout Plain Layout
15535 This macro will expand to the absolute path of the system directory.
15536 This is typically used to point to the various helper scripts that are
15540 \begin_layout Description
15541 \begin_inset Flex CharStyle:Code
15544 \begin_layout Plain Layout
15550 A name and full path to a temporary file which will be automatically deleted
15551 whenever the containing document is closed, or the external material insertion
15555 \begin_layout Standard
15556 All path macros contain a trailing directory separator, so you can construct
15558 \begin_inset space \thinspace{}
15562 \begin_inset space \space{}
15565 the absolute filename with
15566 \begin_inset Flex CharStyle:Code
15569 \begin_layout Plain Layout
15570 $$AbsPath$$Basename$$Extension
15578 \begin_layout Standard
15579 The macros above are substituted in all commands unless otherwise noted.
15581 \begin_inset Flex CharStyle:Code
15584 \begin_layout Plain Layout
15590 supports additionally the following substitutions if they are enabled by
15592 \begin_inset Flex CharStyle:Code
15595 \begin_layout Plain Layout
15602 \begin_inset Flex CharStyle:Code
15605 \begin_layout Plain Layout
15614 \begin_layout Description
15615 \begin_inset Flex CharStyle:Code
15618 \begin_layout Plain Layout
15624 The front part of the resize command.
15627 \begin_layout Description
15628 \begin_inset Flex CharStyle:Code
15631 \begin_layout Plain Layout
15637 The back part of the resize command.
15640 \begin_layout Description
15641 \begin_inset Flex CharStyle:Code
15644 \begin_layout Plain Layout
15650 The front part of the rotation command.
15653 \begin_layout Description
15654 \begin_inset Flex CharStyle:Code
15657 \begin_layout Plain Layout
15663 The back part of the rotation command.
15666 \begin_layout Standard
15667 The value string of the
15668 \begin_inset Flex CharStyle:Code
15671 \begin_layout Plain Layout
15677 command supports additionally the following substitutions if they are enabled
15679 \begin_inset Flex CharStyle:Code
15682 \begin_layout Plain Layout
15689 \begin_inset Flex CharStyle:Code
15692 \begin_layout Plain Layout
15701 \begin_layout Description
15702 \begin_inset Flex CharStyle:Code
15705 \begin_layout Plain Layout
15714 \begin_layout Description
15715 \begin_inset Flex CharStyle:Code
15718 \begin_layout Plain Layout
15727 \begin_layout Description
15728 \begin_inset Flex CharStyle:Code
15731 \begin_layout Plain Layout
15740 \begin_layout Description
15741 \begin_inset Flex CharStyle:Code
15744 \begin_layout Plain Layout
15750 The rotation option.
15753 \begin_layout Standard
15754 You may ask why there are so many path macros.
15755 There are mainly two reasons:
15758 \begin_layout Enumerate
15759 Relative and absolute file names should remain relative or absolute, respectivel
15761 Users may have reasons to prefer either form.
15762 Relative names are useful for portable documents that should work on different
15763 machines, for example.
15764 Absolute names may be required by some programs.
15767 \begin_layout Enumerate
15768 LaTeX treats relative file names differently than LyX and other programs
15769 in nested included files.
15770 For LyX, a relative file name is always relative to the document that contains
15772 For LaTeX, it is always relative to the master document.
15773 These two definitions are identical if you have only one document, but
15774 differ if you have a master document that includes part documents.
15775 That means that relative filenames must be transformed when presented to
15777 Fortunately LyX does this automatically for you if you choose the right
15781 \begin_layout Standard
15782 So which path macro should be used in new template definitions? The rule
15786 \begin_layout Itemize
15788 \begin_inset Flex CharStyle:Code
15791 \begin_layout Plain Layout
15797 if an absolute path is required.
15800 \begin_layout Itemize
15802 \begin_inset Flex CharStyle:Code
15805 \begin_layout Plain Layout
15806 $$AbsOrRelPathMaster
15811 if the substituted string is some kind of LaTeX input.
15814 \begin_layout Itemize
15816 \begin_inset Flex CharStyle:Code
15819 \begin_layout Plain Layout
15820 $$AbsOrRelPathParent
15825 in order to preserve the user's choice.
15828 \begin_layout Standard
15829 There are special cases where this rule does not work and e.
15830 \begin_inset space \thinspace{}
15834 \begin_inset space \space{}
15837 relative names are needed, but normally it will work just fine.
15838 One example for such a case is the command
15839 \begin_inset Flex CharStyle:Code
15842 \begin_layout Plain Layout
15843 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
15848 in the XFig template above: We can't use the absolute name because the
15850 \begin_inset Flex CharStyle:Code
15853 \begin_layout Plain Layout
15859 files needs the relative name in order to rewrite the file content.
15862 \begin_layout Section
15863 Security discussion
15864 \begin_inset CommandInset label
15866 name "sec:Security-discussion"
15873 \begin_layout Standard
15874 The external material feature interfaces with a lot of external programs
15875 and does so automatically, so we have to consider the security implications
15877 In particular, since you have the option of including your own filenames
15878 and/or parameter strings and those are expanded into a command, it seems
15879 that it would be possible to create a malicious document which executes
15880 arbitrary commands when a user views or prints the document.
15881 This is something we definitely want to avoid.
15884 \begin_layout Standard
15885 However, since the external program commands are specified in the template
15886 configuration file only, there are no security issues if LyX is properly
15887 configured with safe templates only.
15888 This is so because the external programs are invoked with the
15889 \begin_inset Flex CharStyle:Code
15892 \begin_layout Plain Layout
15898 -system call rather than the
15899 \begin_inset Flex CharStyle:Code
15902 \begin_layout Plain Layout
15908 system-call, so it's not possible to execute arbitrary commands from the
15909 filename or parameter section via the shell.
15912 \begin_layout Standard
15913 This also implies that you are restricted in what command strings you can
15914 use in the external material templates.
15915 In particular, pipes and redirection are not readily available.
15916 This has to be so if LyX should remain safe.
15917 If you want to use some of the shell features, you should write a safe
15918 script to do this in a controlled manner, and then invoke the script from
15919 the command string.
15923 \begin_layout Standard
15924 It is possible to design a template that interacts directly with the shell,
15925 but since this would allow a malicious user to execute arbitrary commands
15926 by writing clever filenames and/or parameters, we generally recommend that
15927 you only use safe scripts that work with the
15928 \begin_inset Flex CharStyle:Code
15931 \begin_layout Plain Layout
15937 system call in a controlled manner.
15938 Of course, for use in a controlled environment, it can be tempting to just
15939 fall back to use ordinary shell scripts.
15940 If you do so, be aware that you
15944 provide an easily exploitable security hole in your system.
15945 Of course it stands to reason that such unsafe templates will never be
15946 included in the standard LyX distribution, although we do encourage people
15947 to submit new templates in the open source tradition.
15948 But LyX as shipped from the official distribution channels will never have
15952 \begin_layout Standard
15953 Including external material provides a lot of power, and you have to be
15954 careful not to introduce security hazards with this power.
15955 A subtle error in a single line in an innocent looking script can open
15956 the door to huge security problems.
15957 So if you do not fully understand the issues, we recommend that you consult
15958 a knowledgeable security professional or the LyX development team if you
15959 have any questions about whether a given template is safe or not.
15960 And do this before you use it in an uncontrolled environment.