1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that 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 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package undertilde 0
110 \cite_engine_type numerical
114 \paperorientation portrait
129 \paragraph_separation indent
130 \paragraph_indentation default
131 \quotes_language english
134 \paperpagestyle headings
135 \tracking_changes true
136 \output_changes false
140 \author -195340706 "Georg Baum"
142 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
143 \author 1414654397 "Richard Heck"
149 Customizing LyX: Features for the Advanced User
157 \begin_layout Plain Layout
159 If you have comments or error corrections, please send them to the LyX Documenta
161 \begin_inset CommandInset href
163 target "lyx-docs@lists.lyx.org"
170 \begin_inset Quotes eld
174 \begin_inset Quotes erd
177 in the subject header, and please cc the current maintainer of this file,
178 Richard Heck <rgheck@comcast.net>.
184 \begin_inset Newline newline
188 \begin_inset Newline newline
194 \begin_layout Standard
195 \begin_inset CommandInset toc
196 LatexCommand tableofcontents
203 \begin_layout Standard
204 \begin_inset Note Note
207 \begin_layout Plain Layout
208 Please use change tracking when modifying this document.
209 This makes it easier for our translators to recognize things that have
210 been changed, and it helps the maintainer keep up-to-date with what's been
219 \begin_layout Chapter
223 \begin_layout Standard
224 This manual covers the customization features present in LyX.
225 In it, we discuss issues like keyboard shortcuts, screen previewing options,
226 printer options, sending commands to LyX via the LyX Server, internationalizati
227 on, installing new LaTeX classes and LyX layouts, etc.
228 We can't possibly hope to touch on everything you can change—our developers
229 add new features faster than we can document them—but we will explain the
230 most common customizations and hopefully point you in the right direction
231 for some of the more obscure ones.
234 \begin_layout Standard
235 \begin_inset Branch OutDated
238 \begin_layout Standard
239 Information from previous versions of this document that now seems to be
240 outdated is contained in the OutDated branch of this document.
241 By default, this information will not appear in the LaTeX output.
249 \begin_layout Chapter
250 LyX configuration files
253 \begin_layout Standard
254 This chapter aims to help you to find your way through the LyX configuration
256 Before continuing to read this chapter, you should find out where your
257 LyX library and user directories are by using
258 \begin_inset Flex MenuItem
261 \begin_layout Plain Layout
262 Help\SpecialChar \menuseparator
273 The library directory is the place where LyX places its system-wide configurati
274 on files; the user directory is where you can place your modified versions.
275 We will call the former
276 \begin_inset Flex Code
279 \begin_layout Plain Layout
286 \begin_inset Flex MenuItem
289 \begin_layout Plain Layout
295 in the remainder of this document.
299 \begin_layout Section
301 \begin_inset Flex Code
304 \begin_layout Plain Layout
313 \begin_layout Standard
314 \begin_inset Flex Code
317 \begin_layout Plain Layout
323 and its sub-directories contain a number of files and that can be used
324 to customize LyX's behavior.
325 You can change many of these files from within LyX itself through the
326 \begin_inset Flex MenuItem
329 \begin_layout Plain Layout
330 Tools\SpecialChar \menuseparator
337 Most customization that you will want to do in LyX is possible through
339 However, many other inner aspects of LyX can be customized by modifying
341 \begin_inset Flex Code
344 \begin_layout Plain Layout
351 These files fall in different categories, described in the following subsection
355 \begin_layout Subsection
356 Automatically generated files
359 \begin_layout Standard
360 The files, which are to be found in
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
370 , are generated when you configure LyX.
371 They contain various default values that are guessed by inspection.
372 In general, it is not a good idea to modify them, since they might be overwritt
376 \begin_layout Labeling
377 \labelwidthstring 00.00.0000
378 \begin_inset Flex Code
381 \begin_layout Plain Layout
387 contains defaults for various commands.
390 \begin_layout Labeling
391 \labelwidthstring 00.00.0000
392 \begin_inset Flex Code
395 \begin_layout Plain Layout
401 contains the list of packages that have been recognized by LyX.
402 It is currently unused by the LyX program itself, but the information extracted
403 , and more, is made available with
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 Help\SpecialChar \menuseparator
421 \begin_layout Labeling
422 \labelwidthstring 00.00.0000
423 \begin_inset Flex Code
426 \begin_layout Plain Layout
432 the list of text classes that have been found in your
433 \begin_inset Flex Code
436 \begin_layout Plain Layout
442 directories, along with the associated LaTeX document class and their descripti
446 \begin_layout Labeling
447 \labelwidthstring 00.00.0000
448 \begin_inset Flex Code
451 \begin_layout Plain Layout
457 the list of layout modules found in your
458 \begin_inset Flex Code
461 \begin_layout Plain Layout
470 \begin_layout Labeling
471 \labelwidthstring 00.00.0000
472 \begin_inset Flex Code
475 \begin_layout Plain Layout
481 lists of various sorts of LaTeX-related files found on your system
484 \begin_layout Labeling
485 \labelwidthstring 00.00.0000
486 \begin_inset Flex Code
489 \begin_layout Plain Layout
495 is automatically generated during configuration from the file
496 \begin_inset Flex Code
499 \begin_layout Plain Layout
506 It contains information on your LaTeX configuration.
509 \begin_layout Subsection
513 \begin_layout Standard
514 These directories are duplicated between
515 \begin_inset Flex Code
518 \begin_layout Plain Layout
525 \begin_inset Flex Code
528 \begin_layout Plain Layout
535 If a particular files exists in both places, the one in
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
548 \begin_layout Labeling
549 \labelwidthstring 00.00.0000
550 \begin_inset Flex Code
553 \begin_layout Plain Layout
559 this directory contains files with the extension
560 \begin_inset Flex Code
563 \begin_layout Plain Layout
569 that define the keybindings used in LyX.
570 If there exists an internationalized version of the bind file named
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 , that will be used first.
583 \begin_layout Labeling
584 \labelwidthstring 00.00.0000
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
594 contains graphics files that can be included in documents.
598 \begin_layout Labeling
599 \labelwidthstring 00.00.0000
600 \begin_inset Flex Code
603 \begin_layout Plain Layout
609 contains LyX documentation files (including the one you are currently reading).
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 deserves special attention, as noted above.
621 The internationalized help docs are in subdirectories
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
632 \begin_inset Quotes eld
636 \begin_inset Quotes erd
639 is the ISO language code.
645 \begin_inset CommandInset ref
647 reference "cha:Internationalizing-LyX"
654 \begin_layout Labeling
655 \labelwidthstring 00.00.0000
656 \begin_inset Flex Code
659 \begin_layout Plain Layout
665 contains example files that explain how to use some features.
666 In the file browser, press the
667 \begin_inset Flex MenuItem
670 \begin_layout Plain Layout
679 \begin_layout Labeling
680 \labelwidthstring 00.00.0000
681 \begin_inset Flex Code
684 \begin_layout Plain Layout
690 contains image files that are used by the
691 \begin_inset Flex MenuItem
694 \begin_layout Plain Layout
701 In addition, it also contains the individual icons used in the toolbar
702 and the banners that can be shown when LyX is launched.
705 \begin_layout Labeling
706 \labelwidthstring 00.00.0000
707 \begin_inset Flex Code
710 \begin_layout Plain Layout
716 contains keyboard keymapping files.
722 \begin_inset CommandInset ref
724 reference "sec:International-Keymap-Stuff"
731 \begin_layout Labeling
732 \labelwidthstring 00.00.0000
733 \begin_inset Flex Code
736 \begin_layout Plain Layout
742 contains the text class and module files described in Chapter
747 \begin_inset CommandInset ref
749 reference "cha:Installing-New-Document"
756 \begin_layout Labeling
757 \labelwidthstring 00.00.0000
758 \begin_inset Flex Code
761 \begin_layout Plain Layout
768 \begin_inset Flex Code
771 \begin_layout Plain Layout
777 Python scripts used to convert between LyX versions.
778 These can be run from the command line if, say, you want to batch-convert
782 \begin_layout Labeling
783 \labelwidthstring 00.00.0000
784 \begin_inset Flex Code
787 \begin_layout Plain Layout
793 contains some files that demonstrate the capabilities of the
794 \begin_inset Flex MenuItem
797 \begin_layout Plain Layout
808 Also contains some scripts used by LyX itself.
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex Code
816 \begin_layout Plain Layout
822 contains the standard LyX template files described in Chapter
827 \begin_inset CommandInset ref
829 reference "sub:Creating-Templates"
836 \begin_layout Labeling
837 \labelwidthstring 00.00.0000
838 \begin_inset Flex Code
841 \begin_layout Plain Layout
847 contains files with the extension
848 \begin_inset Flex Code
851 \begin_layout Plain Layout
857 that define the user interface to LyX.
858 That is, the files define which items appear in which menus and the items
859 appearing on the toolbar.
862 \begin_layout Subsection
863 Files you don't want to modify
866 \begin_layout Standard
867 These files are used internally by LyX and you generally do not need to
868 modify them unless you are a developer.
871 \begin_layout Labeling
872 \labelwidthstring 00.00.0000
873 \begin_inset Flex Code
876 \begin_layout Plain Layout
882 this file contains the list of LyX developers.
883 The contents are displayed with the menu entry
884 \begin_inset Flex MenuItem
887 \begin_layout Plain Layout
888 Help\SpecialChar \menuseparator
901 \begin_layout Labeling
902 \labelwidthstring 00.00.0000
903 \begin_inset Flex Code
906 \begin_layout Plain Layout
912 this is a LaTeX script used during the configuration process.
916 \begin_layout Labeling
917 \labelwidthstring 00.00.0000
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
927 this is the script that is used to re-configure LyX.
928 It creates configuration files in the directory it was run from.
931 \begin_layout Subsection
932 Other files needing a line or two...
935 \begin_layout Labeling
936 \labelwidthstring 00.00.0000
937 \begin_inset Flex Code
940 \begin_layout Plain Layout
946 this contains tables describing how different character encodings can be
950 \begin_layout Labeling
951 \labelwidthstring 00.00.0000
952 \begin_inset Flex Code
955 \begin_layout Plain Layout
961 this file contains the templates available to the new
962 \begin_inset Flex MenuItem
965 \begin_layout Plain Layout
978 \begin_layout Labeling
979 \labelwidthstring 00.00.0000
980 \begin_inset Flex Code
983 \begin_layout Plain Layout
989 this file contains a list of all the languages currently supported by LyX.
990 \change_inserted -195340706 1334775793
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
997 \change_inserted -195340706 1334775793
998 \begin_inset Flex Code
1001 \begin_layout Plain Layout
1003 \change_inserted -195340706 1334775793
1009 this file contains translations for internationalized paragraph styles
1011 \begin_inset space \thinspace{}
1015 \begin_inset CommandInset ref
1017 reference "sub:I18n"
1026 \begin_layout Section
1027 Your local configuration directory
1030 \begin_layout Standard
1031 Even if you are using LyX as an unprivileged user, you might want to change
1032 LyX configuration for your own use.
1034 \begin_inset Flex Code
1037 \begin_layout Plain Layout
1043 directory contains all your personal configuration files.
1044 This is the directory described as
1045 \begin_inset Quotes eld
1049 \begin_inset Quotes erd
1053 \begin_inset Flex MenuItem
1056 \begin_layout Plain Layout
1057 Help\SpecialChar \menuseparator
1059 \begin_inset space ~
1068 This directory is used as a mirror of
1069 \begin_inset Flex Code
1072 \begin_layout Plain Layout
1078 , which means that every file in
1079 \begin_inset Flex Code
1082 \begin_layout Plain Layout
1088 is a replacement for the corresponding file in
1089 \begin_inset Flex Code
1092 \begin_layout Plain Layout
1099 Any configuration file described in the above sections can be placed either
1100 in the system-wide directory, in which case it will affect all users, or
1101 in your local directory for your own use.
1104 \begin_layout Standard
1105 To make things clearer, let's provide a few examples:
1108 \begin_layout Itemize
1109 The preferences set in the
1110 \begin_inset Flex MenuItem
1113 \begin_layout Plain Layout
1114 Tools\SpecialChar \menuseparator
1120 dialog are saved to a file
1121 \begin_inset Flex Code
1124 \begin_layout Plain Layout
1131 \begin_inset Flex Code
1134 \begin_layout Plain Layout
1143 \begin_layout Itemize
1144 When you reconfigure using
1145 \begin_inset Flex MenuItem
1148 \begin_layout Plain Layout
1149 Tools\SpecialChar \menuseparator
1156 \begin_inset Flex Code
1159 \begin_layout Plain Layout
1165 script, and the resulting files are written in your local configuration
1167 This means that any additional text class file that you might have added
1169 \begin_inset Flex Code
1172 \begin_layout Plain Layout
1178 will be added to the list of classes in the
1179 \begin_inset Flex MenuItem
1182 \begin_layout Plain Layout
1183 Document\SpecialChar \menuseparator
1192 \begin_layout Itemize
1193 If you get some updated documentation from LyX ftp site and cannot install
1194 it because you do not have sysadmin rights on your system, you can just
1196 \begin_inset Flex Code
1199 \begin_layout Plain Layout
1205 and the items in the
1206 \begin_inset Flex MenuItem
1209 \begin_layout Plain Layout
1215 menu will open them!
1218 \begin_layout Section
1219 Running LyX with multiple configurations
1222 \begin_layout Standard
1223 The configuration freedom of the local configuration directory may not suffice
1224 if you want to have more than one configuration at your disposal.
1225 For example, you may want to be use different key bindings or printer settings
1227 You can achieve this by having several such directories.
1228 You then specify which directory to use at run-time.
1231 \begin_layout Standard
1232 Invoking LyX with the command line switch
1233 \begin_inset Flex Code
1236 \begin_layout Plain Layout
1246 instructs the program to read the configuration from that directory, and
1247 not from the default directory.
1248 (You can determine the default directory by running LyX without the
1249 \begin_inset Flex Code
1252 \begin_layout Plain Layout
1258 switch.) If the specified directory does not exist, LyX offers to create
1259 it for you, just like it does for the default directory on the first time
1260 you run the program.
1261 You can modify the configuration options in this additional user directory
1262 exactly as you would for the default directory.
1263 These directories are completely independent (but read on).
1264 Note that setting the environment variable
1265 \begin_inset Flex Code
1268 \begin_layout Plain Layout
1274 to some value has exactly the same effect.
1277 \begin_layout Standard
1278 Having several configurations also requires more maintenance: if you want
1279 to add a new layout to
1280 \begin_inset Flex Code
1283 \begin_layout Plain Layout
1289 which you want available from all your configurations, you must add it
1290 to each directory separately.
1291 You can avoid this with the following trick: after LyX creates the additional
1292 directory, most of the subdirectories (see above) are empty.
1293 If you want the new configuration to mirror an existing one, replace the
1294 empty subdirectory with a symbolic link to the matching subdirectory in
1295 the existing configuration.
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1306 subdirectory, however, since it contains a file written by the configuration
1307 script (also accessible through
1308 \begin_inset Flex MenuItem
1311 \begin_layout Plain Layout
1312 Tools\SpecialChar \menuseparator
1318 ) which is configuration-specific.
1321 \begin_layout Chapter
1322 The Preferences dialog
1325 \begin_layout Standard
1326 All options of the preferences dialog are described in the Appendix
1328 The Preferences Dialog
1335 For some options you might find here more details.
1338 \begin_layout Section
1340 \begin_inset CommandInset label
1349 \begin_layout Standard
1350 The first step is to define your file formats if they are not already defined.
1352 \begin_inset Flex MenuItem
1355 \begin_layout Plain Layout
1356 Tools\SpecialChar \menuseparator
1364 \begin_inset Flex MenuItem
1367 \begin_layout Plain Layout
1368 File Handling\SpecialChar \menuseparator
1375 \begin_inset Flex MenuItem
1378 \begin_layout Plain Layout
1379 New\SpecialChar \ldots{}
1385 button to define your new format.
1387 \begin_inset Flex MenuItem
1390 \begin_layout Plain Layout
1396 field contains the name used to identify the format in the GUI.
1398 \begin_inset Flex MenuItem
1401 \begin_layout Plain Layout
1407 is used to identify the format internally.
1408 You will also need to enter a file extension.
1409 These are all required.
1411 \begin_inset Flex MenuItem
1414 \begin_layout Plain Layout
1420 field is used to provide a keyboard shortcut on the menus.
1421 (For example, pressing
1422 \begin_inset Flex MenuItem
1425 \begin_layout Plain Layout
1432 \begin_inset Flex MenuItem
1435 \begin_layout Plain Layout
1436 View\SpecialChar \menuseparator
1437 View (Other Formats)\SpecialChar \menuseparator
1446 \begin_layout Standard
1448 \begin_inset Flex MenuItem
1451 \begin_layout Plain Layout
1458 \begin_inset Flex MenuItem
1461 \begin_layout Plain Layout
1468 For example, you might want to use
1469 \begin_inset Flex MenuItem
1472 \begin_layout Plain Layout
1478 to view PostScript files.
1479 You can enter the command needed to start the program in the corresponding
1481 In defining this command, you can use the four variables listed in the
1483 The viewer is launched when you view an image in LyX or use the
1484 \begin_inset Flex MenuItem
1487 \begin_layout Plain Layout
1494 The editor is for example launched when you right-click on an image and
1496 \begin_inset Flex MenuItem
1499 \begin_layout Plain Layout
1505 in the appearing context menu.
1508 \begin_layout Standard
1510 \change_inserted -195340706 1329851811
1512 \begin_inset Flex MenuItem
1515 \begin_layout Plain Layout
1521 type of a format is optional, but if it is specified, it must be unique
1523 It is used to detect files of this format from the file contents.
1524 For some important file formats there is no MIME type officially registered
1526 \begin_inset CommandInset href
1529 target "http://www.iana.org/assignments/media-types/"
1534 Therefore LyX uses the extended list of MIME types as specified by
1535 \begin_inset CommandInset href
1537 name "freedesktop.org"
1538 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1545 \begin_layout Standard
1547 \begin_inset Flex MenuItem
1550 \begin_layout Plain Layout
1556 option tells LyX that a format is suitable for document export.
1557 If this is set and if a suitable conversion route exists (see sec.
1558 \begin_inset space \thinspace{}
1562 \begin_inset CommandInset ref
1564 reference "sec:Converters"
1568 ), the format will appear in the
1569 \begin_inset Flex MenuItem
1572 \begin_layout Plain Layout
1573 File\SpecialChar \menuseparator
1580 The format will also appear in the
1581 \begin_inset Flex MenuItem
1584 \begin_layout Plain Layout
1590 menu if a viewer is specified for the format.
1591 Pure image formats, such as
1592 \begin_inset Flex Code
1595 \begin_layout Plain Layout
1601 , should not use this option.
1602 Formats that can both represent vector graphics and documents like
1603 \begin_inset Flex Code
1606 \begin_layout Plain Layout
1615 \begin_layout Standard
1617 \begin_inset Flex MenuItem
1620 \begin_layout Plain Layout
1621 Vector graphics format
1626 tells LyX that a format can contain vector graphics.
1627 This information is used to determine the target format of included graphics
1629 \begin_inset Flex MenuItem
1632 \begin_layout Plain Layout
1639 Included graphics may need to be converted to either
1640 \begin_inset Flex MenuItem
1643 \begin_layout Plain Layout
1650 \begin_inset Flex MenuItem
1653 \begin_layout Plain Layout
1660 \begin_inset Flex MenuItem
1663 \begin_layout Plain Layout
1670 \begin_inset Flex MenuItem
1673 \begin_layout Plain Layout
1679 cannot handle other image formats.
1680 If an included graphic is not already in
1681 \begin_inset Flex MenuItem
1684 \begin_layout Plain Layout
1691 \begin_inset Flex MenuItem
1694 \begin_layout Plain Layout
1701 \begin_inset Flex MenuItem
1704 \begin_layout Plain Layout
1710 format, it is converted to
1711 \begin_inset Flex MenuItem
1714 \begin_layout Plain Layout
1720 if the vector format option is set, and otherwise to
1721 \begin_inset Flex MenuItem
1724 \begin_layout Plain Layout
1733 \begin_layout Section
1737 \begin_layout Standard
1738 Since all conversions from one format to another take place in LyX's temporary
1739 directory, it is sometimes necessary to modify a file before copying it
1740 to the temporary directory in order that the conversion may be performed.
1744 \begin_layout Plain Layout
1745 For example, the file may refer to other files—images, for example—using
1746 relative file names, and these may become invalid when the file is copied
1747 to the temporary directory.
1752 This is done by a Copier: It copies a file to (or from) the temporary directory
1753 and may modify it in the process.
1756 \begin_layout Standard
1757 The definitions of the copiers may use four variables:
1760 \begin_layout Labeling
1761 \labelwidthstring 00.00.0000
1762 \begin_inset Flex Code
1765 \begin_layout Plain Layout
1771 The LyX system directory (e.
1772 \begin_inset space \thinspace{}
1776 \begin_inset space \space{}
1780 \begin_inset Flex MenuItem
1783 \begin_layout Plain Layout
1792 \begin_layout Labeling
1793 \labelwidthstring 00.00.0000
1794 \begin_inset Flex Code
1797 \begin_layout Plain Layout
1806 \begin_layout Labeling
1807 \labelwidthstring 00.00.0000
1808 \begin_inset Flex Code
1811 \begin_layout Plain Layout
1818 \change_inserted 1082167584 1348453985
1822 \begin_layout Labeling
1823 \labelwidthstring 00.00.0000
1825 \change_inserted 1082167584 1348453986
1826 $$b The base name (without filename extension) in the LyX temporary directory
1829 \begin_layout Labeling
1830 \labelwidthstring 00.00.0000
1832 \change_inserted 1082167584 1348453986
1833 $$p The full directory path of the LyX temporary directory
1836 \begin_layout Labeling
1837 \labelwidthstring 00.00.0000
1839 \change_inserted 1082167584 1348453986
1840 $$r The full pathname to the original LyX file being processed
1843 \begin_layout Labeling
1844 \labelwidthstring 00.00.0000
1846 \change_inserted 1082167584 1348453986
1847 $$f The filename (without any directory path) of the LyX file.
1850 \begin_layout Labeling
1851 \labelwidthstring 00.00.0000
1852 \begin_inset Flex Code
1855 \begin_layout Plain Layout
1862 \change_inserted 1082167584 1348453720
1866 \begin_layout Standard
1867 The latter should be the filename as it would be used in a LaTeX's
1874 It is relevant only when exporting files suitable for such inclusion.
1877 \begin_layout Standard
1878 Copiers can be used to do almost anything with output files.
1879 For example, suppose you want generated pdf files to be copied to a special
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1891 Then you could write a shell script such as this one:
1894 \begin_layout Standard
1895 \begin_inset listings
1899 \begin_layout Plain Layout
1904 \begin_layout Plain Layout
1909 \begin_layout Plain Layout
1911 TOFILE=`basename $2`
1914 \begin_layout Plain Layout
1916 cp $FROMFILE /home/you/pdf/$TOFILE
1921 Save it in your local LyX directory—say,
1922 \begin_inset Flex Code
1925 \begin_layout Plain Layout
1926 /home/you/.lyx/scripts/pdfcopier.sh
1931 —and make it executable, if you need to do so on your platform.
1933 \begin_inset Flex MenuItem
1936 \begin_layout Plain Layout
1937 Tools\SpecialChar \menuseparator
1943 dialog, select under
1944 \begin_inset Flex MenuItem
1947 \begin_layout Plain Layout
1948 File Handling\SpecialChar \menuseparator
1955 \begin_inset Flex MenuItem
1958 \begin_layout Plain Layout
1964 format—or one of the other pdf formats—and enter
1965 \begin_inset Flex Code
1968 \begin_layout Plain Layout
1969 pdfcopier.sh $$i $$o
1975 \begin_inset Flex MenuItem
1978 \begin_layout Plain Layout
1988 \begin_layout Standard
1989 Copiers are used by LyX in various of its own conversions.
1990 For example, if appropriate programs are found, LyX will automatically
1991 install copiers for the
1992 \begin_inset Flex MenuItem
1995 \begin_layout Plain Layout
2002 \begin_inset Flex MenuItem
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 When these formats are exported, the copier sees that not just the main
2017 HTML file but various associated files (style files, images, etc.) are also
2019 All these files are written to a subdirectory of the directory in which
2020 the original LyX file was found.
2024 \begin_layout Plain Layout
2025 This copier can be customized.
2027 \begin_inset Quotes eld
2031 \begin_inset Quotes erd
2034 argument takes a comma-separated list of extensions to be copied; if it
2035 is omitted, all files will be copied.
2037 \begin_inset Quotes eld
2041 \begin_inset Quotes erd
2044 argument determines the extension added to the generated directory.
2046 \begin_inset Quotes eld
2050 \begin_inset Flex MenuItem
2053 \begin_layout Plain Layout
2060 \begin_inset Quotes erd
2063 , so HTML generated from
2064 \begin_inset Flex MenuItem
2067 \begin_layout Plain Layout
2068 /path/to/filename.lyx
2074 \begin_inset Flex MenuItem
2077 \begin_layout Plain Layout
2078 /path/to/filename.html.LyXconv
2092 \begin_layout Section
2094 \begin_inset CommandInset label
2096 name "sec:Converters"
2103 \begin_layout Standard
2104 You can define your own Converters to convert files between different formats.
2106 \begin_inset Flex MenuItem
2109 \begin_layout Plain Layout
2110 Tools\SpecialChar \menuseparator
2111 Preferences\SpecialChar \menuseparator
2112 File Handling\SpecialChar \menuseparator
2121 \begin_layout Standard
2122 To define a new converter, select the
2123 \begin_inset Flex MenuItem
2126 \begin_layout Plain Layout
2128 \begin_inset space ~
2137 \begin_inset Flex MenuItem
2140 \begin_layout Plain Layout
2142 \begin_inset space ~
2150 from the drop-down lists, enter the command needed for the conversion,
2152 \begin_inset Flex MenuItem
2155 \begin_layout Plain Layout
2162 Several variables can be used in the definition of converters:
2165 \begin_layout Labeling
2166 \labelwidthstring 00.00.0000
2167 \begin_inset Flex Code
2170 \begin_layout Plain Layout
2176 The LyX system directory
2179 \begin_layout Labeling
2180 \labelwidthstring 00.00.0000
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2193 \begin_layout Labeling
2194 \labelwidthstring 00.00.0000
2195 \begin_inset Flex Code
2198 \begin_layout Plain Layout
2207 \begin_layout Labeling
2208 \labelwidthstring 00.00.0000
2209 \begin_inset Flex Code
2212 \begin_layout Plain Layout
2218 The base filename of the input file (i.
2219 \begin_inset space \thinspace{}
2222 g., without the extension)
2225 \begin_layout Labeling
2226 \labelwidthstring 00.00.0000
2227 \begin_inset Flex Code
2230 \begin_layout Plain Layout
2236 The path to the input file
2239 \begin_layout Labeling
2240 \labelwidthstring 00.00.0000
2241 \begin_inset Flex Code
2244 \begin_layout Plain Layout
2250 The path to the original input file (this is different from $$p when a
2251 chain of converters is called)
2254 \begin_layout Labeling
2255 \labelwidthstring 00.00.0000
2256 \begin_inset Flex Code
2259 \begin_layout Plain Layout
2265 The iconv name for the encoding of the document.
2268 \begin_layout Standard
2270 \begin_inset Flex MenuItem
2273 \begin_layout Plain Layout
2275 \begin_inset space ~
2283 field you can enter the following flags, separated by commas:
2286 \begin_layout Labeling
2287 \labelwidthstring 00.00.0000
2288 \begin_inset Flex Code
2291 \begin_layout Plain Layout
2297 This converter runs some form of LaTeX.
2298 This will make LyX's LaTeX error logs available.
2301 \begin_layout Labeling
2302 \labelwidthstring 00.00.0000
2303 \begin_inset Flex Code
2306 \begin_layout Plain Layout
2313 \begin_inset Flex MenuItem
2316 \begin_layout Plain Layout
2322 file for the conversion.
2323 \change_inserted 1414654397 1337693117
2327 \begin_layout Labeling
2328 \labelwidthstring 00.00.0000
2330 \change_inserted 1414654397 1337693188
2331 \begin_inset Flex Code
2334 \begin_layout Plain Layout
2336 \change_inserted 1414654397 1337693129
2345 \begin_inset Quotes eld
2349 \begin_inset Quotes erd
2352 file from the backend, which in practice means a LaTeX file like the one
2353 we would export, without
2354 \begin_inset Flex Code
2357 \begin_layout Plain Layout
2359 \change_inserted 1414654397 1337693184
2372 \begin_layout Labeling
2373 \labelwidthstring 00.00.0000
2374 \begin_inset Flex Code
2377 \begin_layout Plain Layout
2386 \begin_layout Standard
2387 The following three flags are not really flags at all because they take
2389 \begin_inset Flex MenuItem
2392 \begin_layout Plain Layout
2394 \begin_inset space ~
2398 \begin_inset space ~
2409 \begin_layout Labeling
2410 \labelwidthstring 00.00.0000
2411 \begin_inset Flex Code
2414 \begin_layout Plain Layout
2420 If set, the converter's standard error will be redirected to a file
2421 \begin_inset Flex Code
2424 \begin_layout Plain Layout
2430 , and the script given as argument will be run as:
2431 \begin_inset Flex Code
2434 \begin_layout Plain Layout
2435 script < infile.out > infile.log
2441 The argument may contain
2442 \begin_inset Flex Code
2445 \begin_layout Plain Layout
2454 \begin_layout Labeling
2455 \labelwidthstring 00.00.0000
2456 \begin_inset Flex Code
2459 \begin_layout Plain Layout
2465 The name of the directory in which the converter will dump the generated
2467 LyX will not create this directory, and it does not copy anything into
2468 it, though it will copy this directory to the destination.
2469 The argument may contain
2470 \begin_inset Flex Code
2473 \begin_layout Plain Layout
2479 , which will be replaced by the base name of the input and output files,
2480 respectively, when the directory is copied.
2481 \begin_inset Newline newline
2484 Note that resultdir and usetempdir make no sense together.
2485 The latter will be ignored if the former is given.
2488 \begin_layout Labeling
2489 \labelwidthstring 00.00.0000
2490 \begin_inset Flex Code
2493 \begin_layout Plain Layout
2499 Determines the output file name and may, contain
2500 \begin_inset Flex Code
2503 \begin_layout Plain Layout
2510 Sensible only with resultdir and optional even then; if not given, it defaults
2514 \begin_layout Standard
2515 None of these last three are presently used in any of the converters that
2516 are installed with LyX.
2520 \begin_layout Standard
2521 You do not have to define converters for all formats between which you want
2523 For example, you will note that there is no `LyX to PostScript' converter,
2524 but LyX will export PostScript.
2525 It does so by first creating a LaTeX file (no converter needs to be defined
2526 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2527 and finally converting the resulting DVI file to PostScript.
2528 LyX finds such `chains' of converters automatically, and it will always
2529 choose the shortest possible chain.
2530 You can, though, still define multiple conversion methods between file
2532 For example, the standard LyX configuration provides three ways to convert
2533 LaTeX to PDF: Directly, using
2534 \begin_inset Flex MenuItem
2537 \begin_layout Plain Layout
2543 ; via (DVI and) PostScript, using
2544 \begin_inset Flex MenuItem
2547 \begin_layout Plain Layout
2554 \begin_inset Flex MenuItem
2557 \begin_layout Plain Layout
2564 To define such alternate chains, you must define multiple target `file
2565 formats', as described in section
2566 \begin_inset CommandInset ref
2568 reference "sec:Formats"
2573 For example, in the standard configuration, the formats named
2574 \begin_inset Flex MenuItem
2577 \begin_layout Plain Layout
2584 \begin_inset Flex MenuItem
2587 \begin_layout Plain Layout
2594 \begin_inset Flex MenuItem
2597 \begin_layout Plain Layout
2603 are defined, all of which share the extension
2604 \begin_inset Flex MenuItem
2607 \begin_layout Plain Layout
2613 , and which correspond to the conversion methods just mentioned.
2616 \begin_layout Chapter
2617 Internationalizing LyX
2618 \begin_inset CommandInset label
2620 name "cha:Internationalizing-LyX"
2627 \begin_layout Standard
2628 LyX supports using a translated interface.
2629 Last time we checked, LyX provided text in thirty languages.
2630 The language of choice is called your
2635 (For further reading on locale settings, see also the documentation for
2636 locale that comes with your operating system.
2637 For Linux, the manual page for
2638 \begin_inset Flex Code
2641 \begin_layout Plain Layout
2647 could be a good place to start).
2650 \begin_layout Standard
2651 Notice that these translations will work, but do contain a few flaws.
2652 In particular, all dialogs have been designed with the English text in
2653 mind, which means that some of the translated text will be too large to
2654 fit within the space allocated.
2655 This is only a display problem and will not cause any harm.
2656 Also, you will find that some of the translations do not define shortcut
2657 keys for everything.
2658 Sometimes, there are simply not enough free letters to do it.
2659 Other times, the translator just hasn't got around to doing it yet.
2660 Our localization team, which you may wish to join,
2664 \begin_layout Plain Layout
2665 If you are a fluent speaker of a language other than English, joining these
2666 teams is a great way to give back to the LyX community!
2671 will of course try to fix these shortcomings in future versions of LyX.
2674 \begin_layout Section
2678 \begin_layout Subsection
2679 Translating the graphical user interface (text messages).
2682 \begin_layout Standard
2684 \begin_inset Flex Code
2687 \begin_layout Plain Layout
2693 library to handle the internationalization of the interface.
2694 To have LyX speak your favorite language in all menus and dialogs, you
2696 \begin_inset Flex Code
2699 \begin_layout Plain Layout
2705 -file for that language.
2706 When this is available, you'll have to generate a
2707 \begin_inset Flex Code
2710 \begin_layout Plain Layout
2716 -file from it and install the
2717 \begin_inset Flex Code
2720 \begin_layout Plain Layout
2727 The process of doing all of this is explained in the documentation for
2729 \begin_inset Flex Code
2732 \begin_layout Plain Layout
2739 It is possible to do this just for yourself, but if you're going to do
2740 it, you might as well share the results of your labors with the rest of
2742 Send a message to the LyX developers' list for more information about how
2746 \begin_layout Standard
2747 In short, this is what you should do (xx denotes the language code):
2750 \begin_layout Itemize
2751 Check out the LyX source code.
2753 \begin_inset CommandInset href
2755 name "information on the web"
2756 target "http://www.lyx.org/HowToUseSVN"
2763 \begin_layout Itemize
2765 \begin_inset Flex Code
2768 \begin_layout Plain Layout
2774 to the folder of the
2775 \begin_inset Flex Code
2778 \begin_layout Plain Layout
2786 \begin_inset Flex Code
2789 \begin_layout Plain Layout
2797 \begin_inset Flex Code
2800 \begin_layout Plain Layout
2806 doesn't exist anywhere, it can be remade with the console command
2807 \begin_inset Flex Code
2810 \begin_layout Plain Layout
2816 in that directory, or you can use an existing po-file for some other language
2820 \begin_layout Itemize
2822 \begin_inset Flex Code
2825 \begin_layout Plain Layout
2835 \begin_layout Plain Layout
2836 This is just a text file, so it can be edited in any text editor.
2837 But there are also specialized programs that support such editing, such
2842 (for all platforms) or
2851 contains a `mode' for editing
2852 \begin_inset Flex Code
2855 \begin_layout Plain Layout
2866 For some menu- and widget-labels, there are also shortcut keys that should
2868 Those keys are marked after a `|', and should be translated according to
2869 the words and phrases of the language.
2870 You should also fill also out the information at the beginning of the new
2872 \begin_inset Flex Code
2875 \begin_layout Plain Layout
2881 -file with your email-address, etc., so people know where to reach you with
2882 suggestions and entertaining flames.
2885 \begin_layout Standard
2886 If you are just doing this on your own, then:
2889 \begin_layout Itemize
2891 \begin_inset Flex Code
2894 \begin_layout Plain Layout
2901 This can be done with
2902 \begin_inset Flex Code
2905 \begin_layout Plain Layout
2906 msgfmt -o xx.mo < xx.po
2914 \begin_layout Itemize
2916 \begin_inset Flex Code
2919 \begin_layout Plain Layout
2925 -file to your locale-tree, at the correct directory for application messages
2930 xx, and under the name
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2941 \begin_inset space \thinspace{}
2945 \begin_inset space \space{}
2949 \begin_inset Flex Code
2952 \begin_layout Plain Layout
2953 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2963 \begin_layout Standard
2964 As said, however, it would be best if the new
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2974 -file could be added to the LyX distribution, so others can use it.
2975 Adding it involves making additional changes to LyX.
2976 So send an email to the developers' mailing list if you're interested in
2980 \begin_layout Subsubsection
2984 \begin_layout Standard
2985 Sometimes it turns out that one English message needs to be translated into
2986 different messages in the target language.
2987 One example is the message
2988 \begin_inset Flex Code
2991 \begin_layout Plain Layout
2997 which has the German translation
3005 , depending upon exactly what the English
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3015 \begin_inset Flex Code
3018 \begin_layout Plain Layout
3024 does not handle such ambiguous translations.
3025 Therefore you have to add some context information to the message: Instead
3027 \begin_inset Flex Code
3030 \begin_layout Plain Layout
3037 \begin_inset Flex Code
3040 \begin_layout Plain Layout
3041 To[[as in 'From format x to format y']]
3047 \begin_inset Flex Code
3050 \begin_layout Plain Layout
3051 To[[as in 'From page x to page y']].
3056 Now the two occurrences of
3057 \begin_inset Flex Code
3060 \begin_layout Plain Layout
3067 \begin_inset Flex Code
3070 \begin_layout Plain Layout
3076 and can be translated correctly to
3087 \begin_layout Standard
3088 Of course the context information needs to be stripped off the original
3089 message when no translation is used.
3090 Therefore you have to put it in double square brackets at the end of the
3091 message (see the example above).
3092 The translation mechanism of LyX ensures that everything in double square
3093 brackets at the end of messages is removed before displaying the message.
3096 \begin_layout Subsection
3097 Translating the documentation.
3100 \begin_layout Standard
3101 The online documentation (in the
3102 \begin_inset Flex MenuItem
3105 \begin_layout Plain Layout
3111 -menu) can (and should!) be translated.
3112 If there are translated versions of the documentation available
3116 \begin_layout Plain Layout
3117 As of March 2008, at least some of the documents have been translated into
3118 fourteen languages, with the Tutorial available in a few more.
3123 and the locale is set accordingly, these will be used automagically by
3125 LyX looks for translated versions as
3126 \begin_inset Flex Code
3129 \begin_layout Plain Layout
3130 LyXDir/doc/xx/DocName.lyx
3136 \begin_inset Flex Code
3139 \begin_layout Plain Layout
3145 is the code for the language currently in use.
3146 If there are no translated documents, the default English versions will
3148 Note that the translated versions must have the same filenames (
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3158 above) as the original.
3159 If you feel up to translating the documentation (an excellent way to proof-read
3160 the original documentation by the way!), there are a few things you should
3164 \begin_layout Itemize
3165 Check out the documentation translation web page at
3166 \begin_inset CommandInset href
3168 name "http://www.lyx.org/Translation"
3169 target "http://www.lyx.org/Translation"
3174 That way, you can find out which (if any) documents have already been translate
3175 d into your language.
3176 You can also find out who (if anyone) is organizing the effort to translate
3177 the documentation into your language.
3178 If no one is organizing the effort, please let us know that you're interested.
3181 \begin_layout Standard
3182 Once you get to actually translating, here's a few hints for you that may
3186 \begin_layout Itemize
3187 Join the documentation team! There is information on how to do that in
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3198 \begin_inset Flex MenuItem
3201 \begin_layout Plain Layout
3202 Help\SpecialChar \menuseparator
3208 ), which by the way is the first document you should translate.
3211 \begin_layout Itemize
3212 Learn the typographic conventions for the language you are translating to.
3213 Typography is an ancient art and over the centuries, a great variety of
3214 conventions have developed throughout different parts of the world.
3215 Also study the professional terminology amongst typographers in your country.
3216 Inventing your own terminology will only confuse the users.
3219 (Warning! Typography is addictive!)
3222 \begin_layout Itemize
3223 Make a copy of the document.
3224 This will be your working copy.
3225 You can use this as your personal translated help-file by placing it in
3227 \begin_inset Flex Code
3230 \begin_layout Plain Layout
3239 \begin_layout Itemize
3240 Sometimes the original document (from the LyX-team) will be updated.
3241 Use the source viewer at
3242 \begin_inset CommandInset href
3244 name "http://www.lyx.org/trac/timeline"
3245 target "http://www.lyx.org/trac/timeline"
3249 to see what has been changed.
3250 That way you can easily see which parts of the translated document need
3254 \begin_layout Standard
3255 If you ever find an error in the original document, fix it and notify the
3256 rest of the documentation team of the changes! (You didn't forget to join
3257 the documentation team, did you?)
3260 \begin_layout Standard
3261 \begin_inset Branch OutDated
3264 \begin_layout Section
3265 International Keyboard Support
3268 \begin_layout Standard
3271 [Editor's Note: The following section is by
3279 It needs to be fixed to conform to the new Documentation Style sheet and
3280 to make use of the new v1.0 features.
3281 The whole thing also needs to be merged with the section following it.-jw
3282 It may also be badly out of date.-rh (2008)]
3285 \begin_layout Subsection
3286 Defining Own Keymaps: Keymap File Format
3289 \begin_layout Standard
3290 Let's look at a keyboard definition file a little closer.
3291 It is a plain text file defining
3294 \begin_layout Itemize
3295 key-to-key or key-to-string translations
3298 \begin_layout Itemize
3302 \begin_layout Itemize
3303 dead keys exceptions
3306 \begin_layout Standard
3307 To define key-to-key or key-to-string translation, use this command:
3310 \begin_layout Quotation
3311 \begin_inset Flex Code
3314 \begin_layout Plain Layout
3323 \begin_inset Flex Code
3326 \begin_layout Plain Layout
3335 \begin_layout Standard
3337 \begin_inset Flex Code
3340 \begin_layout Plain Layout
3346 is the key to be translated and
3347 \begin_inset Flex Code
3350 \begin_layout Plain Layout
3356 is the string to be inserted into the document.
3357 To define dead keys, use:
3360 \begin_layout Quotation
3361 \begin_inset Flex Code
3364 \begin_layout Plain Layout
3373 \begin_inset Flex Code
3376 \begin_layout Plain Layout
3385 \begin_layout Standard
3387 \begin_inset Flex Code
3390 \begin_layout Plain Layout
3396 is a keyboard key and
3397 \begin_inset Flex Code
3400 \begin_layout Plain Layout
3407 The following dead keys are supported (shortcut name is in parentheses):
3410 \begin_layout Quotation
3414 \begin_inset space \hfill{}
3420 \begin_layout Quotation
3422 \begin_inset space \hfill{}
3428 \begin_layout Quotation
3430 \begin_inset space \hfill{}
3436 \begin_layout Quotation
3438 \begin_inset space \hfill{}
3444 \begin_layout Quotation
3446 \begin_inset space \hfill{}
3452 \begin_layout Quotation
3454 \begin_inset space \hfill{}
3461 \begin_layout Plain Layout
3473 \begin_layout Quotation
3475 \begin_inset space \hfill{}
3481 \begin_layout Quotation
3483 \begin_inset space \hfill{}
3490 \begin_layout Plain Layout
3502 \begin_layout Quotation
3504 \begin_inset space \hfill{}
3510 \begin_layout Quotation
3512 \begin_inset space \hfill{}
3518 \begin_layout Quotation
3520 \begin_inset space \hfill{}
3527 \begin_layout Plain Layout
3539 \begin_layout Quotation
3541 \begin_inset space \hfill{}
3548 \begin_layout Plain Layout
3560 \begin_layout Quotation
3562 \begin_inset space \hfill{}
3568 \begin_layout Quotation
3569 hungarian umlaut (hug)
3570 \begin_inset space \hfill{}
3576 \begin_layout Quotation
3578 \begin_inset space \hfill{}
3584 \begin_layout Quotation
3586 \begin_inset space \hfill{}
3593 \begin_layout Plain Layout
3605 \begin_layout Standard
3606 Since in many international keyboards there are exceptions to what some
3607 dead keys should do, you can define them using
3610 \begin_layout Quotation
3611 \begin_inset Flex Code
3614 \begin_layout Plain Layout
3622 deadkey key outstring
3625 \begin_layout Standard
3626 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3630 \begin_layout Quotation
3631 \begin_inset Flex Code
3634 \begin_layout Plain Layout
3647 \begin_layout Standard
3648 to make it work correctly.
3649 Also, you have to define as exceptions dead keys over i and j, to remove
3650 the dot from them before inserting an accent mark.
3651 I will change this when the time comes, but so far I haven't had time.
3654 \begin_layout Standard
3655 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3658 \begin_inset Flex Code
3661 \begin_layout Plain Layout
3667 have different meaning.
3669 \begin_inset Flex Code
3672 \begin_layout Plain Layout
3678 marks comments, quotes start and end LaTeX-style commands.
3679 To enter quote, you'll need to use
3680 \begin_inset Flex Code
3683 \begin_layout Plain Layout
3692 \begin_inset Flex Code
3695 \begin_layout Plain Layout
3702 \begin_inset Flex Code
3705 \begin_layout Plain Layout
3716 \begin_layout Standard
3717 If you make a keyboard description file that works for your language, please
3718 mail it to me, so I can include it in the next keymap distribution.
3721 \begin_layout Standard
3722 More keywords will be supported in keymap configuration file in future,
3726 \begin_layout Itemize
3727 \begin_inset Flex Code
3730 \begin_layout Plain Layout
3741 \begin_inset space \hfill{}
3745 \begin_inset Flex Code
3748 \begin_layout Plain Layout
3757 \begin_layout Itemize
3758 \begin_inset Flex Code
3761 \begin_layout Plain Layout
3772 \begin_inset space \hfill{}
3776 \begin_inset Flex Code
3779 \begin_layout Plain Layout
3785 an external keymap translation program
3788 \begin_layout Standard
3789 Also, it should look into
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3799 file for defaults, too (for example, a
3800 \begin_inset Flex Code
3803 \begin_layout Plain Layout
3811 option to include default keyboard).
3819 \begin_layout Section
3820 International Keymap Stuff
3821 \begin_inset CommandInset label
3823 name "sec:International-Keymap-Stuff"
3830 \begin_layout Standard
3831 \begin_inset Note Note
3834 \begin_layout Plain Layout
3835 In doing the revisions on this document in March 2008, I did not look over
3836 this stuff, as I do not understand it.
3837 It would be good if someone else could do so.
3846 \begin_layout Standard
3847 The next two sections describe the
3848 \begin_inset Flex Code
3851 \begin_layout Plain Layout
3860 \begin_inset Flex Code
3863 \begin_layout Plain Layout
3871 file syntax in detail.
3872 These sections should help you design your own key map if the ones provided
3873 do not meet your needs.
3876 \begin_layout Subsection
3880 \begin_layout Standard
3884 \begin_inset Flex Code
3887 \begin_layout Plain Layout
3893 file maps keystrokes to characters or strings.
3894 As the name suggests, it sets a keyboard mapping.
3896 \begin_inset Flex Code
3899 \begin_layout Plain Layout
3910 \begin_inset Flex Code
3913 \begin_layout Plain Layout
3928 \begin_inset Flex Code
3931 \begin_layout Plain Layout
3944 \begin_inset Flex Code
3947 \begin_layout Plain Layout
3956 \begin_inset Flex Code
3959 \begin_layout Plain Layout
3967 are described in this section.
3970 \begin_layout Labeling
3971 \labelwidthstring 00.00.0000
3972 \begin_inset Flex Code
3975 \begin_layout Plain Layout
3983 Map a character to a string
3986 \begin_layout LyX-Code
4001 \begin_layout Standard
4034 the double-quote (")
4051 must be escaped with a preceding backslash (
4062 \begin_layout Standard
4064 \begin_inset Flex MenuItem
4067 \begin_layout Plain Layout
4075 statement to cause the symbol
4076 \begin_inset Flex MenuItem
4079 \begin_layout Plain Layout
4087 to be output for the keystroke
4088 \begin_inset Flex MenuItem
4091 \begin_layout Plain Layout
4102 \begin_layout LyX-Code
4108 \begin_layout Labeling
4109 \labelwidthstring 00.00.0000
4110 \begin_inset Flex Code
4113 \begin_layout Plain Layout
4121 Specify an accent character
4124 \begin_layout LyX-Code
4133 \begin_layout Standard
4134 This will make the cha
4172 This is the dead key
4176 \begin_layout Plain Layout
4183 refers to a key that does not produce a character by itself, but when followed
4184 with another key, produces the desired accent character.
4185 For example, a German characte
4187 r with an umlaut like
4197 can be produced in this manner.
4206 \begin_layout Standard
4219 and then another key not in
4236 followed by the other, not allowed key, as output.
4240 \begin_inset Flex MenuItem
4243 \begin_layout Plain Layout
4251 cancels a dead key, so if
4262 \begin_inset Flex MenuItem
4265 \begin_layout Plain Layout
4274 , the cursor will not go one position backwards but will instead cancel
4290 might have had on the next keystroke.
4294 \begin_layout Standard
4295 The following example specifies that the character ' is to be an acute accent,
4296 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4299 \begin_layout LyX-Code
4302 kmod ' acute aeiouAEIOU
4305 \begin_layout Labeling
4306 \labelwidthstring 00.00.0000
4307 \begin_inset Flex Code
4310 \begin_layout Plain Layout
4316 Specify an exception to the accent character
4319 \begin_layout LyX-Code
4328 \begin_layout Standard
4329 This defines an exce
4370 have been assigned a keystroke with a previous
4373 \begin_inset Flex Code
4376 \begin_layout Plain Layout
4400 must not belong in the
4447 If such a declaration does not exist in
4455 \begin_inset Flex Code
4458 \begin_layout Plain Layout
4492 \begin_inset Flex Code
4495 \begin_layout Plain Layout
4509 \begin_layout Standard
4510 The following command produces causes äi to be produced when you enter acute-i
4514 \begin_layout LyX-Code
4528 \begin_layout Labeling
4529 \labelwidthstring 00.00.0000
4530 \begin_inset Flex Code
4533 \begin_layout Plain Layout
4539 Combine two accent characters
4542 \begin_layout LyX-Code
4548 accent1 accent2 allowed
4551 \begin_layout Standard
4552 This one is getting pretty esoteric.
4553 It allows you to combine the effect
4609 \begin_inset Flex Code
4612 \begin_layout Plain Layout
4640 \begin_layout Standard
4641 Consider this example from the
4642 \begin_inset Flex Code
4645 \begin_layout Plain Layout
4656 \begin_layout LyX-Code
4659 kmod ; acute aeioyvhAEIOYVH
4663 kcomb acute umlaut iyIY
4666 \begin_layout Standard
4667 This allows you to press
4668 \begin_inset Flex MenuItem
4671 \begin_layout Plain Layout
4679 and get the effect of
4680 \begin_inset Flex Code
4683 \begin_layout Plain Layout
4702 in this case cancels the last dead key, so if you press
4703 \begin_inset Flex MenuItem
4706 \begin_layout Plain Layout
4715 \begin_inset Flex Code
4718 \begin_layout Plain Layout
4731 \begin_layout Subsection
4735 \begin_layout Standard
4737 \begin_inset Flex Code
4740 \begin_layout Plain Layout
4748 mapping is performed, a
4749 \begin_inset Flex Code
4752 \begin_layout Plain Layout
4762 file maps the strings that the symbols generate to characters in the current
4764 The LyX distribution currently includes at least the
4765 \begin_inset Flex Code
4768 \begin_layout Plain Layout
4777 \begin_inset Flex Code
4780 \begin_layout Plain Layout
4791 \begin_layout Standard
4793 \begin_inset Flex Code
4796 \begin_layout Plain Layout
4804 file is a sequence of declarations of the form
4807 \begin_layout LyX-Code
4820 \begin_layout Standard
4821 For example, in order to map
4822 \begin_inset Flex MenuItem
4825 \begin_layout Plain Layout
4835 to the corresponding character in the iso-8859-1 set (233), the following
4839 \begin_layout LyX-Code
4847 \begin_layout Standard
4849 \begin_inset Flex Code
4852 \begin_layout Plain Layout
4861 \begin_inset Flex Code
4864 \begin_layout Plain Layout
4882 the same character can apply to more than one string.
4884 \begin_inset Flex Code
4887 \begin_layout Plain Layout
4898 \begin_layout LyX-Code
4910 \begin_inset Newline newline
4926 \begin_layout Standard
4927 If LyX cannot find a mapping for the string produced by the keystroke or
4928 a deadkey sequence, it will check if it looks like an accented char and
4929 try to draw an accent over the character on screen.
4932 \begin_layout Subsection
4936 \begin_layout Standard
4937 There is a second way to add support for international characters through
4938 so-called dead-keys.
4939 A dead-key works in combination with a letter to produce an accented character.
4940 Here, we'll explain how to create a really simple dead-key to illustrate
4944 \begin_layout Standard
4945 Suppose you happen to need the circumflex character,
4946 \begin_inset Quotes eld
4950 \begin_inset Quotes erd
4955 \begin_inset Flex MenuItem
4958 \begin_layout Plain Layout
4965 \begin_inset space ~
4969 \begin_inset Flex MenuItem
4972 \begin_layout Plain Layout
4978 ] to the LyX command
4979 \begin_inset Flex Code
4982 \begin_layout Plain Layout
4989 \begin_inset Flex Code
4992 \begin_layout Plain Layout
4999 Now, whenever you type the
5000 \begin_inset Flex MenuItem
5003 \begin_layout Plain Layout
5009 -key followed by a letter, that letter will have a circumflex accent on
5011 For example, the sequence
5012 \begin_inset Quotes eld
5016 \begin_inset Flex MenuItem
5019 \begin_layout Plain Layout
5026 \begin_inset Quotes erd
5029 produces the letter:
5030 \begin_inset Quotes eld
5034 \begin_inset Quotes erd
5038 If you tried to type
5039 \begin_inset Quotes eld
5043 \begin_inset Flex MenuItem
5046 \begin_layout Plain Layout
5053 \begin_inset Quotes erd
5056 , however, LyX will complain with a beep, since a
5057 \begin_inset Quotes eld
5061 \begin_inset Flex MenuItem
5064 \begin_layout Plain Layout
5071 \begin_inset Quotes erd
5074 never takes a circumflex accent.
5076 \begin_inset Flex MenuItem
5079 \begin_layout Plain Layout
5085 after a dead-key produces the bare-accent.
5086 Please note this last point! If you bind a key to a dead-key, you'll need
5087 to rebind the character on that key to yet another key.
5089 \begin_inset Flex MenuItem
5092 \begin_layout Plain Layout
5098 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5101 \begin_layout Standard
5102 One common way to bind dead-keys is to use
5103 \begin_inset Flex MenuItem
5106 \begin_layout Plain Layout
5113 \begin_inset Flex MenuItem
5116 \begin_layout Plain Layout
5123 \begin_inset Flex MenuItem
5126 \begin_layout Plain Layout
5132 in combination with an accent, like
5133 \begin_inset Quotes eld
5137 \begin_inset Flex MenuItem
5140 \begin_layout Plain Layout
5147 \begin_inset Quotes erd
5151 \begin_inset Quotes eld
5155 \begin_inset Flex MenuItem
5158 \begin_layout Plain Layout
5165 \begin_inset Quotes erd
5169 \begin_inset Quotes eld
5173 \begin_inset Flex MenuItem
5176 \begin_layout Plain Layout
5183 \begin_inset Quotes erd
5187 Another way involves using
5188 \begin_inset Flex Code
5191 \begin_layout Plain Layout
5198 \begin_inset Flex Code
5201 \begin_layout Plain Layout
5207 to set up the special
5208 \begin_inset Flex Code
5211 \begin_layout Plain Layout
5219 \begin_inset Flex Code
5222 \begin_layout Plain Layout
5228 acts in some ways just like
5229 \begin_inset Flex MenuItem
5232 \begin_layout Plain Layout
5238 and permits you to bind keys to accented characters.
5239 You can also turn keys into dead-keys by binding them to something like
5241 \begin_inset Flex Code
5244 \begin_layout Plain Layout
5250 and then binding this symbolic key to the corresponding LyX command.
5254 \begin_layout Plain Layout
5259 : This is exactly what I do in my
5260 \begin_inset Flex Code
5263 \begin_layout Plain Layout
5270 \begin_inset Flex Code
5273 \begin_layout Plain Layout
5281 \begin_inset Flex MenuItem
5284 \begin_layout Plain Layout
5286 \begin_inset space ~
5295 \begin_inset Flex Code
5298 \begin_layout Plain Layout
5304 and a bunch of these
5305 \begin_inset Quotes eld
5309 \begin_inset Flex Code
5312 \begin_layout Plain Layout
5319 \begin_inset Quotes erd
5322 symbolic keys bound such things as
5323 \begin_inset Flex MenuItem
5326 \begin_layout Plain Layout
5328 \begin_inset space ~
5337 \begin_inset Flex MenuItem
5340 \begin_layout Plain Layout
5342 \begin_inset space ~
5351 This is how I produce my accented characters.
5356 You can make just about anything into the
5357 \begin_inset Flex Code
5360 \begin_layout Plain Layout
5367 \begin_inset Flex MenuItem
5370 \begin_layout Plain Layout
5376 keys, a spare function key, etc.
5377 As for the LyX commands that produce accents, check the entry for
5378 \begin_inset Flex Code
5381 \begin_layout Plain Layout
5392 You'll find the complete list there.
5395 \begin_layout Subsection
5396 Saving your Language Configuration
5399 \begin_layout Standard
5400 You can edit your preferences so that your desired language environment
5401 is automatically configured when LyX starts up, via the
5402 \begin_inset Flex MenuItem
5405 \begin_layout Plain Layout
5406 Edit\SpecialChar \menuseparator
5415 \begin_layout Chapter
5416 Installing New Document Classes, Layouts, and Templates
5417 \begin_inset CommandInset label
5419 name "cha:Installing-New-Document"
5424 \begin_inset Argument
5427 \begin_layout Plain Layout
5428 Installing New Document Classes
5436 \begin_layout Standard
5437 In this chapter, we describe the procedures for creating and installing
5438 new LyX layout and template files, as well as offer a refresher on correctly
5439 installing new LaTeX document classes.
5443 \begin_layout Standard
5444 First, let us a say a few words about how one ought to think about the relation
5445 between LyX and LaTeX.
5446 The thing to understand is that, in a certain sense, LyX doesn't know anything
5448 Indeed, from LyX's point of view, LaTeX is just one of several
5449 \begin_inset Quotes eld
5453 \begin_inset Quotes erd
5456 in which it is capable of producing output.
5457 Other such formats are DocBook, plaintext, and XHTML.
5458 LaTeX is, of course, a particularly important format, but very little of
5459 the information LyX has about LaTeX is actually contained in the program
5464 \begin_layout Plain Layout
5465 Some commands are sufficiently complex that they are
5466 \begin_inset Quotes eld
5470 \begin_inset Quotes erd
5474 But the developers generally regard this as a Bad Thing.
5479 Rather, that information, even for the standard classes like
5480 \begin_inset Flex Code
5483 \begin_layout Plain Layout
5489 , is contained in `layout files'.
5490 Similarly, LyX itself does not know much about DocBook or XHTML.
5491 What it knows is contained in layout files.
5494 \begin_layout Standard
5495 You can think of the layout file for a given document class as a translation
5496 manual between LyX constructs---paragraphs with their corresponding styles,
5497 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5499 Almost everything LyX knows about
5500 \begin_inset Flex Code
5503 \begin_layout Plain Layout
5509 , for example, is contained in the file
5510 \begin_inset Flex Code
5513 \begin_layout Plain Layout
5519 and in various other files it includes.
5520 For this reason, anyone intending to write layout files should plan to
5521 study the existing files.
5522 A good place to start is with
5523 \begin_inset Flex Code
5526 \begin_layout Plain Layout
5532 , which is included in
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5552 , and many of the other layout files for document classes.
5553 This file is where sections and the like are defined:
5554 \begin_inset Flex Code
5557 \begin_layout Plain Layout
5563 tells LyX how paragraphs that are marked with the Section, Subsection,
5564 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5567 \begin_inset Flex Code
5570 \begin_layout Plain Layout
5576 file basically just includes several of these
5577 \begin_inset Flex Code
5580 \begin_layout Plain Layout
5589 \begin_layout Standard
5590 Defining the LyX--LaTeX correspondence is not the only thing layout files
5592 Their other job is to define how the LyX constructs themselves will appear
5594 The fact that layout files have these two jobs is often a source of confusion,
5595 because they are completely separate.
5596 Telling LyX how to translate a certain paragraph style into LaTeX does
5597 not tell LyX how to display it; conversely, telling LyX how to display
5598 a certain paragraph style does not tell LyX how to translate it into LaTeX
5599 (let alone tell LaTeX how to display it).
5600 So, in general, when you define a new LyX construct, you must always do
5601 two quite separate things: (i)
5602 \begin_inset space ~
5605 tell LyX how to translate it into LaTeX and (ii)
5606 \begin_inset space ~
5609 tell LyX how to display it.
5612 \begin_layout Standard
5613 Much the same is true, of course, as regards LyX's other backend formats,
5614 though XHTML is in some ways different, because in that case LyX
5618 able, to some extent, to use information about how it should display a
5619 paragraph on the screen to output information (in the form of CSS) about
5620 how the paragraph should be displayed in a browser.
5621 Even in this case, however, the distinction between what LyX does internally
5622 and how things are rendered externally remains in force, and the two can
5623 be controlled separately.
5625 \begin_inset CommandInset ref
5627 reference "sec:Tags-for-XHTML"
5634 \begin_layout Section
5635 Installing new LaTeX files
5638 \begin_layout Standard
5639 Some installations may not include a LaTeX package or class file that you
5640 would like to use within LyX.
5641 For example, you might need FoilTeX, a package for preparing slides for
5642 overhead projectors.
5643 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5644 a user interface for installing such packages.
5645 For example, with MiKTeX, you start the program
5646 \begin_inset Quotes eld
5650 \begin_inset space ~
5654 \begin_inset Quotes erd
5657 to get a list of available packages.
5658 To install one of them, right click on it or use the corresponding toolbar
5662 \begin_layout Standard
5663 If your LaTeX distribution does not provide such a `package manager', or
5664 if the package is not available from your distribution, then follow these
5665 steps to install it manually:
5668 \begin_layout Enumerate
5669 Get the package from
5670 \begin_inset CommandInset href
5673 target "http://www.ctan.org/"
5680 \begin_layout Enumerate
5681 If the package contains a file with the ending
5682 \begin_inset Quotes eld
5686 \begin_inset Flex Code
5689 \begin_layout Plain Layout
5696 \begin_inset Quotes erd
5699 (is the case for FoilTeX) then open a console, change to the folder of
5700 this file and execute the command
5701 \begin_inset Flex Code
5704 \begin_layout Plain Layout
5711 You have now unpacked the package and have all files to install it.
5712 Most LaTeX-packages are not packed and you can skip this step.
5715 \begin_layout Enumerate
5716 Now you need to decide if the package should be available for all users
5721 \begin_layout Enumerate
5722 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5723 for all users on your system, then install it in your `local' TeX tree,
5724 otherwise install it in your own `user' TeX tree.
5725 Where these trees should be created, if they do not already exist, depends
5727 To find this out, look in the file
5728 \begin_inset Flex Code
5731 \begin_layout Plain Layout
5741 \begin_layout Plain Layout
5742 This is usually in the directory
5743 \begin_inset Flex Code
5746 \begin_layout Plain Layout
5752 , though you can execute the command
5753 \begin_inset Flex Code
5756 \begin_layout Plain Layout
5767 The location of the `local' TeX tree is defined by the
5768 \begin_inset Flex Code
5771 \begin_layout Plain Layout
5777 variable; this is usually somewhere like
5778 \begin_inset Flex Code
5781 \begin_layout Plain Layout
5782 /usr/local/share/texmf
5788 The location of the `user' TeX tree is defined by
5789 \begin_inset Flex Code
5792 \begin_layout Plain Layout
5799 \begin_inset Flex Code
5802 \begin_layout Plain Layout
5809 (If these variables are not predefined, you have to define them.) You'll
5810 probably need root permissions to create or modify the `local' tree, but
5811 not for your `user' tree.
5812 \begin_inset Newline newline
5815 In general, it is recommended to install in the user tree because your user
5816 will not be modified or even overwritten when you upgrade your system.
5817 It will typically also be backed up together with everything else when
5818 you backup your home directory (which, of course, you do on a regular basis).
5821 \begin_layout Enumerate
5822 On Windows, if you want the new package to be available for all users on
5823 your system, change to the folder where LaTeX is installed and then change
5825 \begin_inset Flex Code
5828 \begin_layout Plain Layout
5839 (For MiKTeX, this would be by default the folder
5840 \begin_inset Flex Code
5843 \begin_layout Plain Layout
5861 \begin_layout Plain Layout
5862 Note that this will be the correct path only on English installations.
5863 On a German one, it would be
5864 \begin_inset Flex Code
5867 \begin_layout Plain Layout
5881 , and similarly for other languages.
5886 Create there a new folder
5887 \begin_inset Flex Code
5890 \begin_layout Plain Layout
5896 and copy all files of the package into it.
5898 \begin_inset Newline newline
5901 If the package should only available for you or you don't have admin permissions
5902 , do the same, but in the local LaTeX folder.
5904 \begin_inset space \thinspace{}
5908 \begin_inset space ~
5911 2.8 under Windows XP, this would be the folder:
5912 \begin_inset Newline newline
5918 \begin_inset Flex Code
5921 \begin_layout Plain Layout
5924 Documents and Settings
5936 \begin_inset Newline newline
5942 \begin_inset Phantom HPhantom
5945 \begin_layout Plain Layout
5956 \begin_inset Flex Code
5959 \begin_layout Plain Layout
5972 \begin_inset Newline newline
5975 On Vista, it would be:
5976 \begin_inset Newline newline
5980 \begin_inset Flex Code
5983 \begin_layout Plain Layout
6009 \begin_layout Enumerate
6010 Now one only need to tell LaTeX that there are new files.
6011 This depends on the used LaTeX-Distribution:
6015 \begin_layout Enumerate
6016 For TeXLive execute the command
6017 \begin_inset Flex Code
6020 \begin_layout Plain Layout
6027 If you installed the package for all users, then you will probably need
6028 to have root permissions for that.
6031 \begin_layout Enumerate
6032 For MiKTeX, if you have installed the package for all users, start the program
6034 \begin_inset Quotes eld
6038 \begin_inset space ~
6042 \begin_inset Quotes erd
6045 and press the button marked
6046 \begin_inset Quotes eld
6050 \begin_inset Quotes erd
6054 Otherwise start the program
6055 \begin_inset Quotes eld
6059 \begin_inset Quotes erd
6066 \begin_layout Enumerate
6067 Finally, you need to tell LyX that there are new packages available.
6068 So, in LyX, use the menu
6069 \begin_inset Flex MenuItem
6072 \begin_layout Plain Layout
6075 \SpecialChar \menuseparator
6081 and then restart LyX.
6084 \begin_layout Standard
6085 Now the package is installed.
6086 In our example, the document class
6087 \begin_inset Flex Code
6090 \begin_layout Plain Layout
6092 \begin_inset space ~
6099 \begin_layout Plain Layout
6111 will now be available under
6112 \begin_inset Flex MenuItem
6115 \begin_layout Plain Layout
6116 Document\SpecialChar \menuseparator
6117 Settings\SpecialChar \menuseparator
6127 \begin_layout Standard
6128 If you would like to use a LaTeX document class that is not even listed
6130 \begin_inset Flex MenuItem
6133 \begin_layout Plain Layout
6134 Document\SpecialChar \menuseparator
6135 Settings\SpecialChar \menuseparator
6141 , then you need to create a `layout' file for it.
6142 That is the topic of the next section.
6145 \begin_layout Section
6146 Types of layout files
6149 \begin_layout Standard
6150 This section describes the various sorts of LyX files that contain layout
6152 These files describe various paragraph and character styles, determining
6153 how LyX should display them and how they should be translated into LaTeX,
6154 DocBook, XHTML, or whatever output format is being used.
6158 \begin_layout Standard
6159 We shall try to provide a thorough description of the process of writing
6161 However, there are so many different types of documents supported even
6162 by just LaTeX that we can't hope to cover every different possibility or
6163 problem you might encounter.
6164 The LyX users' list is frequented by people with lots of experience with
6165 layout design who are willing to share what they've learned, so please
6166 feel free to ask questions there.
6169 \begin_layout Standard
6170 As you prepare to write a new layout, it is extremely helpful to look at
6171 the layouts distributed with LyX.
6172 If you write a LyX layout for a LaTeX document class that might also be
6173 used by others, or write a module that might be useful to others, then
6174 you should consider posting your layout to the
6175 \begin_inset CommandInset href
6177 name "layout section on the LyX wiki"
6178 target "http://wiki.lyx.org/Layouts/Layouts"
6182 or even to the LyX developers' list, so that it might be included in LyX
6187 \begin_layout Plain Layout
6188 Note that LyX is licensed under the General Public License, so any material
6189 that is contributed to LyX must be similarly licensed.
6197 \begin_layout Subsection
6199 \begin_inset CommandInset label
6201 name "sub:Layout-modules"
6208 \begin_layout Standard
6209 We have spoken to this point about `layout files'.
6210 But there are different sorts of files that contain layout information.
6211 Layout files, strictly so called, have the
6212 \begin_inset Flex Code
6215 \begin_layout Plain Layout
6221 extension and provide LyX with information about document classes.
6222 As of LyX 1.6, however, layout information can also be contained in layout
6228 \begin_inset Flex Code
6231 \begin_layout Plain Layout
6238 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6239 some modules—such as the
6240 \begin_inset Flex Code
6243 \begin_layout Plain Layout
6249 module—specifically provide support for one package.
6250 In a sense, layout modules are similar to included
6254 \begin_layout Plain Layout
6255 These can have any extension, but by convention have the
6256 \begin_inset Flex Code
6259 \begin_layout Plain Layout
6271 \begin_inset Flex Code
6274 \begin_layout Plain Layout
6280 —in that modules are not specific to a given document class but may be used
6281 with many different classes.
6282 The difference is that using an included file with
6283 \begin_inset Flex Code
6286 \begin_layout Plain Layout
6292 requires editing that file.
6293 Modules, by contrast, are selected in the
6294 \begin_inset Flex MenuItem
6297 \begin_layout Plain Layout
6298 Document\SpecialChar \menuseparator
6307 \begin_layout Standard
6308 Building modules is the easiest way to get started with layout editing,
6309 since it can be as simple as adding a single new paragraph style or flex
6311 But modules may, in principle, contain anything a layout file can contain.
6314 \begin_layout Standard
6315 After creating a new module and copying it to the
6316 \begin_inset Flex Code
6319 \begin_layout Plain Layout
6325 folder, you will need to reconfigure and then restart LyX for the module
6326 to appear in the menu.
6327 However, changes you make to the module will be seen immediately, if you
6329 \begin_inset Flex MenuItem
6332 \begin_layout Plain Layout
6333 Document\SpecialChar \menuseparator
6339 , highlight something, and then hit
6340 \begin_inset Quotes eld
6344 \begin_inset Quotes erd
6350 It is strongly recommended that you save your work before doing this
6355 it is strongly recommended that you not attempt to edit modules while simultaneo
6356 usly working on actual documents
6359 Though of course the developers strive to keep LyX stable in such situations,
6360 syntax errors and the like in your module file could cause strange behavior.
6363 \begin_layout Subsubsection
6367 \begin_layout Standard
6368 Modules are to LyX as packages are to LaTeX.
6369 Sometimes, however, you find yourself wanting a specific inset or character
6370 style just for one document and writing a module that will also be available
6371 to other documents makes little sense.
6372 What you need is LyX's
6373 \begin_inset Quotes eld
6377 \begin_inset Quotes erd
6383 \begin_layout Standard
6384 You will find it under
6386 Document\SpecialChar \menuseparator
6387 Settings\SpecialChar \menuseparator
6391 The large text box allows you to enter anything that you might enter in
6392 a layout file or module.
6393 You can think of a document's local layout, in fact, as a module that belongs
6395 So, in particular, you must enter a
6396 \begin_inset Flex Code
6399 \begin_layout Plain Layout
6406 Any format is acceptable, but one would normally use the format current
6408 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6409 layout is not supported by versions of LyX prior to 1.6, so you should not
6410 use it if you want to be able to export your document to LyX 1.5 or earlier
6411 (without, that is, losing the local layout information).
6412 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6413 though there is no UI for it---then you should use format 11 and, of course,
6414 use only layout constructs that were available in LyX 1.6.
6417 \begin_layout Standard
6418 When you have entered something in the
6419 \begin_inset Flex Code
6422 \begin_layout Plain Layout
6428 pane, LyX will enable the
6429 \begin_inset Quotes eld
6433 \begin_inset Quotes erd
6436 button at the bottom.
6437 Clicking this button will cause LyX to determine whether what you have
6438 entered is valid layout information for the chosen format.
6439 LyX will report the result but, unfortunately, will not tell you what errors
6440 there might have been.
6441 These will be written to the terminal, however, if LyX is started from
6443 You will not be permitted to save your local layout until you have entered
6447 \begin_layout Standard
6448 The warnings at the end of the previous section apply here, too.
6449 Do not play with local layout while you are actually working, especially
6450 if you have not saved your document.
6451 That said, using local layout with a test document can be a very convenient
6452 way to try out layout ideas, or even to start developing a module.
6455 \begin_layout Subsection
6457 \begin_inset Flex MenuItem
6460 \begin_layout Plain Layout
6469 \begin_layout Standard
6470 There are two situations you are likely to encounter when wanting to support
6471 a new LaTeX document class, involving style (
6472 \begin_inset Flex Code
6475 \begin_layout Plain Layout
6481 ) files and LaTeX2e class (
6482 \begin_inset Flex Code
6485 \begin_layout Plain Layout
6492 Supporting a style file is usually fairly easy.
6493 Supporting a new class file is a bit harder.
6494 We'll discuss the former in this section and the latter in the next.
6495 Similar remarks apply, of course, if you want to support a new DocBook
6499 \begin_layout Standard
6500 The easier case is the one in which your new document class is provided
6501 as a style file that is to be used in conjunction with an already supported
6503 For the sake of the example, we'll assume that the style file is called
6505 \begin_inset Flex MenuItem
6508 \begin_layout Plain Layout
6514 and that it is meant to be used with
6515 \begin_inset Flex MenuItem
6518 \begin_layout Plain Layout
6524 , which is a standard class.
6528 \begin_layout Standard
6529 Start by copying the existing class's layout file into your local directory:
6533 \begin_layout Plain Layout
6534 Of course, which directory is your local directory will vary by platform,
6535 and LyX allows you to specify your local directory on startup, too, using
6537 \begin_inset Flex Code
6540 \begin_layout Plain Layout
6554 \begin_layout LyX-Code
6555 cp report.layout ~/.lyx/layouts/myclass.layout
6558 \begin_layout Standard
6560 \begin_inset Flex Code
6563 \begin_layout Plain Layout
6569 and change the line:
6572 \begin_layout LyX-Code
6575 DeclareLaTeXClass{report}
6578 \begin_layout Standard
6582 \begin_layout LyX-Code
6585 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6588 \begin_layout Standard
6592 \begin_layout LyX-Code
6594 \begin_inset Newline newline
6600 \begin_inset Newline newline
6606 \begin_layout Standard
6607 near the top of the file.
6610 \begin_layout Standard
6611 Start LyX and select
6612 \begin_inset Flex MenuItem
6615 \begin_layout Plain Layout
6616 Tools\SpecialChar \menuseparator
6623 Then restart LyX and try creating a new document.
6625 \begin_inset Flex MenuItem
6628 \begin_layout Plain Layout
6634 " as a document class option in the
6635 \begin_inset Flex MenuItem
6638 \begin_layout Plain Layout
6639 Document\SpecialChar \menuseparator
6646 It is likely that some of the sectioning commands and such in your new
6647 class will work differently from how they worked in the base class—
6648 \begin_inset Flex Code
6651 \begin_layout Plain Layout
6657 in this example—so you can fiddle around with the settings for the different
6658 sections if you wish.
6659 The layout information for sections is contained in
6660 \begin_inset Flex Code
6663 \begin_layout Plain Layout
6669 , but you do not need to copy and change this file.
6670 Instead, you can simply add your changes to your layout file, after the
6672 \begin_inset Flex Code
6675 \begin_layout Plain Layout
6681 , which itself includes
6682 \begin_inset Flex Code
6685 \begin_layout Plain Layout
6692 For example, you might add these lines:
6695 \begin_layout LyX-Code
6699 \begin_layout LyX-Code
6703 \begin_layout LyX-Code
6707 \begin_layout LyX-Code
6711 \begin_layout LyX-Code
6715 \begin_layout Standard
6716 to change the font for chapter headings to sans-serif.
6717 This will override (or, in this case, add to) the existing declaration
6718 for the Chapter style.
6722 \begin_layout Standard
6723 Your new package may also provide commands or environments not present in
6725 In this case, you will want to add these to the layout file.
6727 \begin_inset CommandInset ref
6729 reference "sec:TextClass"
6733 for information on how to do so.
6736 \begin_layout Standard
6738 \begin_inset Flex MenuItem
6741 \begin_layout Plain Layout
6747 can be used with several different document classes, and even if it cannot,
6748 you might find it easiest just to write a module that you can load with
6750 The simplest possible such module would be:
6753 \begin_layout LyX-Code
6756 DeclareLyXModule{My Package}
6759 \begin_layout LyX-Code
6763 \begin_layout LyX-Code
6764 #Support for mypkg.sty.
6767 \begin_layout LyX-Code
6769 \begin_inset Newline newline
6775 \begin_layout LyX-Code
6777 \begin_inset Newline newline
6783 \begin_layout LyX-Code
6785 \begin_inset Newline newline
6791 \begin_inset Newline newline
6797 \begin_layout Standard
6798 A more complex module might modify the behavior of some existing constructs
6799 or define some new ones.
6801 \begin_inset CommandInset ref
6803 reference "sec:TextClass"
6810 \begin_layout Subsection
6812 \begin_inset Flex MenuItem
6815 \begin_layout Plain Layout
6824 \begin_layout Standard
6825 There are two possibilities here.
6826 One is that the class file is itself based upon an existing document class.
6827 For example, many thesis classes are based upon
6828 \begin_inset Flex MenuItem
6831 \begin_layout Plain Layout
6838 To see whether yours is, look for a line like
6841 \begin_layout LyX-Code
6847 \begin_layout Standard
6849 If so, then you may proceed largely as in the previous section, though
6851 \begin_inset Flex Code
6854 \begin_layout Plain Layout
6860 line will be different.
6861 If your new class is
6862 \begin_inset Flex Code
6865 \begin_layout Plain Layout
6871 and it is based upon
6872 \begin_inset Flex Code
6875 \begin_layout Plain Layout
6881 , then the line should read:
6885 \begin_layout Plain Layout
6886 And it will be easiest if you save the file to
6887 \begin_inset Flex Code
6890 \begin_layout Plain Layout
6896 : LyX assumes that the document class has the same name as the layout file.
6905 \begin_layout LyX-Code
6908 DeclareLaTeXClass[thesis,book]{thesis}
6911 \begin_layout Standard
6912 If, on the other hand, the new class is not based upon an existing class,
6913 you will probably have to
6914 \begin_inset Quotes eld
6918 \begin_inset Quotes erd
6922 We strongly suggest copying an existing layout file which uses a similar
6923 LaTeX class and then modifying it, if you can do so.
6924 At least use an existing file as a starting point so you can find out what
6925 items you need to worry about.
6926 Again, the specifics are covered below.
6929 \begin_layout Subsection
6931 \begin_inset CommandInset label
6933 name "sub:Creating-Templates"
6940 \begin_layout Standard
6941 Once you have written a layout file for a new document class, you might
6942 want to consider writing a
6947 A template acts as a kind of tutorial for your layout, showing how it might
6948 be used, though containing dummy content.
6949 You can of course look at the various templates included with LyX for ideas.
6952 \begin_layout Standard
6953 Templates are created just like usual documents: using LyX.
6954 The only difference is that usual documents contain all possible settings,
6955 including the font scheme and the paper size.
6956 Usually a user doesn't want a template to overwrite his preferred settings
6957 for such parameters.
6958 For that reason, the designer of a template should remove the corresponding
6960 \begin_inset Flex Code
6963 \begin_layout Plain Layout
6972 \begin_inset Flex Code
6975 \begin_layout Plain Layout
6983 from the template LyX file.
6984 This can be done with any simple text-editor, for example
6985 \begin_inset Flex Code
6988 \begin_layout Plain Layout
6995 \begin_inset Flex Code
6998 \begin_layout Plain Layout
7008 \begin_layout Standard
7009 Put the edited template files you create in
7010 \begin_inset Flex Code
7013 \begin_layout Plain Layout
7019 , copy the ones you use from the global template directory in
7020 \begin_inset Flex Code
7023 \begin_layout Plain Layout
7029 to the same place, and redefine the template path in the
7030 \begin_inset Flex MenuItem
7033 \begin_layout Plain Layout
7034 Tools\SpecialChar \menuseparator
7035 Preferences\SpecialChar \menuseparator
7044 \begin_layout Standard
7045 Note, by the way, that there is a template which has a particular meaning:
7047 \begin_inset Flex Code
7050 \begin_layout Plain Layout
7057 This template is loaded every time you create a new document with
7058 \begin_inset Flex MenuItem
7061 \begin_layout Plain Layout
7062 File\SpecialChar \menuseparator
7068 in order to provide useful defaults.
7069 To create this template from inside LyX, all you have to do is to open
7070 a document with the correct settings, and use the
7071 \begin_inset Flex MenuItem
7074 \begin_layout Plain Layout
7075 Save as Document Defaults
7083 \begin_layout Subsection
7084 Upgrading old layout files
7087 \begin_layout Standard
7088 The format of layout files changes with each LyX release, so old layout
7089 files need to be converted to the new format.
7090 This process has been automated since LyX 1.4: If LyX reads a layout file
7091 in an older format, it automatically calls the script
7092 \begin_inset Flex Code
7095 \begin_layout Plain Layout
7101 to convert it to a temporary file in current format.
7102 The original file is left untouched.
7103 If you use the layout file often, then, you may want to convert it permanently,
7104 so that LyX does not have to do so itself every time.
7105 To do this, you can call the converter manually:
7108 \begin_layout LyX-Code
7109 mv myclass.layout myclass.old
7112 \begin_layout LyX-Code
7113 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7116 \begin_layout Standard
7118 \begin_inset Flex Code
7121 \begin_layout Plain Layout
7127 with the name of your LyX system directory, of course.
7130 \begin_layout Standard
7131 Note that manual conversion does not affect included files, so these will
7132 have to be converted separately.
7135 \begin_layout Section
7136 \begin_inset CommandInset label
7138 name "sec:TextClass"
7142 The layout file format
7145 \begin_layout Standard
7146 When it's finally time to get your hands dirty and create or edit your own
7147 layout file, the following sections describe what you're up against.
7148 Our advice is to go slowly, save and test often, listen to soothing music,
7149 and enjoy one or two of your favorite adult beverages; more if you are
7150 getting particularly stuck.
7151 It's really not that hard, except that the multitude of options can become
7152 overwhelming if you try to do too much in one sitting.
7153 Go have another adult beverage, just for good measure.
7156 \begin_layout Standard
7157 Note that all the tags used in layout files are case-insensitive.
7159 \begin_inset Flex Code
7162 \begin_layout Plain Layout
7169 \begin_inset Flex Code
7172 \begin_layout Plain Layout
7179 \begin_inset Flex Code
7182 \begin_layout Plain Layout
7188 are really the same tag.
7189 The possible values are printed in brackets after the feature's name.
7190 The default value if a feature isn't specified inside a text class-description
7192 \begin_inset Flex Code
7195 \begin_layout Plain Layout
7204 If the argument has a data type like
7205 \begin_inset Quotes eld
7209 \begin_inset Quotes erd
7213 \begin_inset Quotes eld
7217 \begin_inset Quotes erd
7220 , the default is shown like this:
7221 \begin_inset Flex Code
7224 \begin_layout Plain Layout
7235 \begin_layout Subsection
7236 The document class declaration
7239 \begin_layout Standard
7240 Lines in a layout file which begin with
7241 \begin_inset Flex Code
7244 \begin_layout Plain Layout
7251 There is one exception to this rule.
7253 \begin_inset Flex Code
7256 \begin_layout Plain Layout
7262 files should begin with a line like:
7265 \begin_layout LyX-Code
7268 #% Do not delete the line below; configure depends on this
7271 \begin_layout LyX-Code
7276 DeclareLaTeXClass{article}
7279 \begin_layout Standard
7280 The second line is used when you (re)configure LyX.
7281 The layout file is read by the LaTeX script
7282 \begin_inset Flex Code
7285 \begin_layout Plain Layout
7291 , in a special mode where
7292 \begin_inset Flex Code
7295 \begin_layout Plain Layout
7302 The first line is just a LaTeX comment, and the second one contains the
7303 declaration of the text class.
7304 If these lines appear in a file named
7305 \begin_inset Flex Code
7308 \begin_layout Plain Layout
7314 , then they define a text class of name
7315 \begin_inset Flex Code
7318 \begin_layout Plain Layout
7324 (the name of the layout file) which uses the LaTeX document class
7325 \begin_inset Flex Code
7328 \begin_layout Plain Layout
7334 (the default is to use the same name as the layout).
7336 \begin_inset Quotes eld
7340 \begin_inset Quotes erd
7343 that appears above is used as a description of the text class in the
7344 \begin_inset Flex MenuItem
7347 \begin_layout Plain Layout
7348 Document\SpecialChar \menuseparator
7357 \begin_layout Standard
7358 Let's assume that you wrote your own text class that uses the
7359 \begin_inset Flex Code
7362 \begin_layout Plain Layout
7368 document class, but where you changed the appearance of the section headings.
7369 If you put it in a file
7370 \begin_inset Flex Code
7373 \begin_layout Plain Layout
7379 , the header of this file should be:
7382 \begin_layout LyX-Code
7385 #% Do not delete the line below; configure depends on this
7388 \begin_layout LyX-Code
7393 DeclareLaTeXClass[article]{article (with my own headings)}
7396 \begin_layout Standard
7397 This declares a text class
7398 \begin_inset Flex Code
7401 \begin_layout Plain Layout
7407 , associated with the LaTeX document class
7408 \begin_inset Flex Code
7411 \begin_layout Plain Layout
7418 \begin_inset Quotes eld
7421 article (with my own headings)
7422 \begin_inset Quotes erd
7426 If your text class depends on several packages, you can declare it as:
7429 \begin_layout LyX-Code
7432 #% Do not delete the line below; configure depends on this
7435 \begin_layout LyX-Code
7440 DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
7443 \begin_layout Standard
7444 This indicates that your text class uses the
7445 \begin_inset Flex Code
7448 \begin_layout Plain Layout
7455 Finally, it is also possible to declare classes for DocBook code.
7456 Typical declarations will look like:
7459 \begin_layout LyX-Code
7462 #% Do not delete the line below; configure depends on this
7465 \begin_layout LyX-Code
7470 DeclareDocBookClass[article]{SGML (DocBook article)}
7473 \begin_layout Standard
7474 Note that these declarations can also be given an optional parameter declaring
7475 the name of the document class (but not a list).
7478 \begin_layout Standard
7479 So, to be as explicit as possible, the form of the layout declaration is:
7482 \begin_layout LyX-Code
7487 DeclareLaTeXClass[class,package.sty]{layout description}
7490 \begin_layout Standard
7491 The class need only be specified if the name of the LaTeX class file and
7492 the name of the layout file are different or if there are packages to load.
7493 If the name of the class file is not specified, then LyX will simply assume
7494 that it is the same as the name of the layout file.
7497 \begin_layout Standard
7498 When the text class has been modified to your taste, all you have to do
7499 is to copy it either to
7500 \begin_inset Flex Code
7503 \begin_layout Plain Layout
7510 \begin_inset Flex Code
7513 \begin_layout Plain Layout
7520 \begin_inset Flex MenuItem
7523 \begin_layout Plain Layout
7524 Tools\SpecialChar \menuseparator
7530 , exit LyX and restart.
7531 Then your new text class should be available along with the others.
7534 \begin_layout Standard
7535 Once the layout file is installed, you can edit it and see your changes
7536 without having to reconfigure or to restart LyX.
7541 \begin_layout Plain Layout
7542 In versions of LyX prior to 1.6, this was not true.
7543 As a result, editing layout files was very time consuming, since you had
7544 constantly to restart LyX to see changes.
7549 You can force a reload of the current layout by using the LyX function
7551 \begin_inset Flex MenuItem
7554 \begin_layout Plain Layout
7561 There is no default binding for this function—though, of course, you can
7562 bind it to a key yourself.
7563 But you will normally use this function simply by entering it in the mini-buffe
7568 \begin_layout Standard
7574 \begin_inset Flex MenuItem
7577 \begin_layout Plain Layout
7583 is very much an `advanced feature'.
7588 recommended that you save your work before using this function.
7593 recommended that you not attempt to edit layout information while simultaneousl
7594 y working on a document that you care about.
7595 Use a test document.
7596 Syntax errors and the like in your layout file could cause peculiar behavior.
7597 In particular, such errors could cause LyX to regard the current layout
7598 as invalid and to attempt to switch to some other layout.
7602 \begin_layout Plain Layout
7603 Really bad syntax errors may even caused LyX to exit.
7604 This is because certain sorts of errors may make LyX unable to read
7614 The LyX team strives to keep LyX stable in such situations, but safe is
7619 \begin_layout Plain Layout
7620 While we're giving advice: make regular backups.
7621 And be nice to your mother.
7629 \begin_layout Subsection
7630 The Module declaration
7633 \begin_layout Standard
7634 A module must begin with a line like the following:
7637 \begin_layout LyX-Code
7640 DeclareLyXModule[endnotes.sty]{Endnotes}
7643 \begin_layout Standard
7644 The mandatory argument, in curly brackets, is the name of the module, as
7646 \begin_inset Flex MenuItem
7649 \begin_layout Plain Layout
7650 Document\SpecialChar \menuseparator
7651 Settings\SpecialChar \menuseparator
7658 The argument in square brackets is optional: It declares any LaTeX packages
7659 on which the module depends.
7660 Please note that only packages about which LyX knows should be listed in
7661 the square brackets.
7665 \begin_layout Plain Layout
7666 The list of such packages is documented only in the source code.
7671 LyX will not check for arbitrary packages.
7672 It is also possible to use the form
7673 \begin_inset Flex MenuItem
7676 \begin_layout Plain Layout
7682 as an optional argument, which declares that the module can only be used
7683 when there exists a conversion chain between the formats `
7684 \begin_inset Flex Code
7687 \begin_layout Plain Layout
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7706 \begin_layout Standard
7707 The module declaration should then be followed by lines like the following
7711 \begin_layout Plain Layout
7712 Preferably in English if the module should be published with LyX.
7713 This description will appear in the list of messages to be translated and
7714 will be thus translated with the next interface update.
7722 \begin_layout LyX-Code
7726 \begin_layout LyX-Code
7727 #Adds an endnote command, in addition to footnotes.
7731 \begin_layout LyX-Code
7732 #You will need to add
7734 theendnotes in TeX code where you
7737 \begin_layout LyX-Code
7738 #want the endnotes to appear.
7742 \begin_layout LyX-Code
7746 \begin_layout LyX-Code
7747 #Requires: somemodule | othermodule
7750 \begin_layout LyX-Code
7751 #Excludes: badmodule
7754 \begin_layout Standard
7755 The description is used in
7756 \begin_inset Flex MenuItem
7759 \begin_layout Plain Layout
7760 Document\SpecialChar \menuseparator
7761 Settings\SpecialChar \menuseparator
7767 to provide the user with information about what the module does.
7769 \begin_inset Flex Code
7772 \begin_layout Plain Layout
7778 line is used to identify other modules with which this one must be used;
7780 \begin_inset Flex Code
7783 \begin_layout Plain Layout
7789 line is used to identify modules with which this one may not be used.
7790 Both are optional, and, as shown, multiple modules should be separated
7791 with the pipe symbol: |.
7792 Note that the required modules are treated disjunctively:
7796 of the required modules must be used.
7801 excluded module may be used.
7802 Note that modules are identified here by their
7807 \begin_inset Flex Code
7810 \begin_layout Plain Layout
7818 \begin_inset Flex Code
7821 \begin_layout Plain Layout
7828 \begin_inset Flex Code
7831 \begin_layout Plain Layout
7840 \begin_layout Subsection
7844 \begin_layout Standard
7845 The first non-comment line of any layout file, included file, or module
7850 contain the file format number:
7853 \begin_layout Description
7854 \begin_inset Flex Code
7857 \begin_layout Plain Layout
7864 \begin_inset Flex Code
7867 \begin_layout Plain Layout
7873 ] The format of the layout file.
7876 \begin_layout Standard
7877 This tag was introduced with LyX 1.4.0.
7878 Layout files from LyX 1.3.x and earlier don't have an explicit file format
7879 and are considered to be of format 1.
7880 The format for the present version of LyX is format 21.
7881 But each version of LyX is capable of reading earlier versions' layout
7882 files, just as they are capable of reading files produced by earlier versions
7884 There is, however, no provision for converting to earlier formats.
7885 So LyX 1.6.x will not read layout files in format 21 but only files in format
7889 \begin_layout Subsection
7890 \begin_inset CommandInset label
7892 name "sub:General-text-class"
7896 General text class parameters
7899 \begin_layout Standard
7900 These are general parameters that govern the behavior of an entire document
7906 mean that they must appear in
7907 \begin_inset Flex Code
7910 \begin_layout Plain Layout
7916 files rather than in modules.
7917 A module can contain any layout tag.)
7920 \begin_layout Description
7921 \begin_inset Flex Code
7924 \begin_layout Plain Layout
7930 Adds information that will be output in the
7931 \begin_inset Flex Code
7934 \begin_layout Plain Layout
7940 block when this document class is output to XHTML.
7941 Typically, this would be used to output CSS style information, but it can
7942 be used for anything that can appear in
7943 \begin_inset Flex Code
7946 \begin_layout Plain Layout
7954 \begin_inset Quotes eld
7958 \begin_inset Flex Code
7961 \begin_layout Plain Layout
7968 \begin_inset Quotes erd
7974 \begin_layout Description
7975 \begin_inset Flex Code
7978 \begin_layout Plain Layout
7984 Adds CSS styling information.
7985 This will either be output in a
7986 \begin_inset Quotes eld
7990 \begin_inset Flex Code
7993 \begin_layout Plain Layout
8000 \begin_inset Quotes erd
8003 block or, if the user has so chosen, to a separate CSS file.Must end with
8005 \begin_inset Quotes eld
8009 \begin_inset Flex Code
8012 \begin_layout Plain Layout
8019 \begin_inset Quotes erd
8025 \begin_layout Description
8026 \begin_inset Flex Code
8029 \begin_layout Plain Layout
8035 Adds information to the document preamble.
8037 \begin_inset Quotes eld
8041 \begin_inset Flex Code
8044 \begin_layout Plain Layout
8051 \begin_inset Quotes erd
8057 \begin_layout Description
8058 \begin_inset Flex Code
8061 \begin_layout Plain Layout
8067 Defines formats for use in the display of bibliographic information.
8069 \begin_inset CommandInset ref
8071 reference "sub:Citation-format-description"
8077 \begin_inset Quotes eld
8081 \begin_inset Flex Code
8084 \begin_layout Plain Layout
8091 \begin_inset Quotes erd
8097 \begin_layout Description
8098 \begin_inset Flex Code
8101 \begin_layout Plain Layout
8107 Describes various global options supported by the document class.
8109 \begin_inset space ~
8113 \begin_inset CommandInset ref
8115 reference "sub:ClassOptions"
8121 \begin_inset Quotes eld
8125 \begin_inset Flex Code
8128 \begin_layout Plain Layout
8135 \begin_inset Quotes erd
8141 \begin_layout Description
8142 \begin_inset Flex Code
8145 \begin_layout Plain Layout
8152 \begin_inset Flex Code
8155 \begin_layout Plain Layout
8164 \begin_inset Flex Code
8167 \begin_layout Plain Layout
8173 ] Whether the class should
8177 to having one or two columns.
8178 Can be changed in the
8179 \begin_inset Flex MenuItem
8182 \begin_layout Plain Layout
8183 Document\SpecialChar \menuseparator
8192 \begin_layout Description
8193 \begin_inset Flex Code
8196 \begin_layout Plain Layout
8203 \begin_inset Flex Code
8206 \begin_layout Plain Layout
8212 ] This sequence defines the properties for a counter.
8213 If the counter does not yet exist, it is created; if it does exist, it
8216 \begin_inset Quotes eld
8220 \begin_inset Flex Code
8223 \begin_layout Plain Layout
8230 \begin_inset Quotes erd
8234 \begin_inset Newline newline
8238 \begin_inset space ~
8242 \begin_inset CommandInset ref
8244 reference "sub:Counters"
8248 for details on counters.
8251 \begin_layout Description
8252 \begin_inset Flex Code
8255 \begin_layout Plain Layout
8261 Sets the default font used to display the document.
8263 \begin_inset space ~
8267 \begin_inset CommandInset ref
8269 reference "sub:Font-description"
8273 for how to declare fonts.
8275 \begin_inset Quotes eld
8279 \begin_inset Flex Code
8282 \begin_layout Plain Layout
8289 \begin_inset Quotes erd
8295 \begin_layout Description
8296 \begin_inset Flex Code
8299 \begin_layout Plain Layout
8306 \begin_inset Flex Code
8309 \begin_layout Plain Layout
8315 Specifies a module to be included by default with this document class.
8316 The module should be specified by filename without the
8317 \begin_inset Flex Code
8320 \begin_layout Plain Layout
8327 The user can still remove the module, but it will be active at the outset.
8328 (This applies only when new files are created, or when this class is chosen
8329 for an existing document.)
8332 \begin_layout Description
8333 \begin_inset Flex Code
8336 \begin_layout Plain Layout
8343 \begin_inset Flex Code
8346 \begin_layout Plain Layout
8352 ] This is the style that will be assigned to new paragraphs, usually
8353 \begin_inset Flex MenuItem
8356 \begin_layout Plain Layout
8363 This will default to the first defined style if not given, but you are
8364 encouraged to use this directive.
8367 \begin_layout Description
8368 \begin_inset Flex Code
8371 \begin_layout Plain Layout
8378 \begin_inset Flex Code
8381 \begin_layout Plain Layout
8387 ] This tag indicates that the module in question—which should be specified
8388 by filename without the
8389 \begin_inset Flex Code
8392 \begin_layout Plain Layout
8398 extension—cannot be used with this document class.
8399 This might be used in a journal-specific layout file to prevent, say, the
8401 \begin_inset Flex Code
8404 \begin_layout Plain Layout
8410 module that numbers theorems by section.
8415 be used in a module.
8416 Modules have their own way of excluding other modules (see
8417 \begin_inset CommandInset ref
8419 reference "sub:Layout-modules"
8426 \begin_layout Description
8427 \begin_inset Flex Code
8430 \begin_layout Plain Layout
8436 Defines a new float.
8438 \begin_inset space ~
8442 \begin_inset CommandInset ref
8444 reference "sub:Floats"
8450 \begin_inset Quotes eld
8454 \begin_inset Flex Code
8457 \begin_layout Plain Layout
8464 \begin_inset Quotes erd
8470 \begin_layout Description
8471 \begin_inset Flex Code
8474 \begin_layout Plain Layout
8480 Sets the information that will be output in the
8481 \begin_inset Flex Code
8484 \begin_layout Plain Layout
8490 block when this document class is output to XHTML.
8491 Note that this will completely override any prior
8492 \begin_inset Flex Code
8495 \begin_layout Plain Layout
8502 \begin_inset Flex Code
8505 \begin_layout Plain Layout
8513 \begin_inset Flex Code
8516 \begin_layout Plain Layout
8522 if you just want to add material to the preamble.) Must end with
8523 \begin_inset Quotes eld
8527 \begin_inset Flex Code
8530 \begin_layout Plain Layout
8537 \begin_inset Quotes erd
8543 \begin_layout Description
8544 \begin_inset Flex Code
8547 \begin_layout Plain Layout
8553 Sets CSS styling information.
8554 This will either be output in a
8555 \begin_inset Quotes eld
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8569 \begin_inset Quotes erd
8572 block or, if the user has so chosen, to a separate CSS file.
8573 Note that this will completely override any prior
8574 \begin_inset Flex Code
8577 \begin_layout Plain Layout
8584 \begin_inset Flex Code
8587 \begin_layout Plain Layout
8595 \begin_inset Flex Code
8598 \begin_layout Plain Layout
8604 if you just want to add material.) Must end with
8605 \begin_inset Quotes eld
8609 \begin_inset Flex Code
8612 \begin_layout Plain Layout
8619 \begin_inset Quotes erd
8625 \begin_layout Description
8626 \begin_inset Flex Code
8629 \begin_layout Plain Layout
8636 \begin_inset Flex Code
8639 \begin_layout Plain Layout
8645 ] The layout to use for the table of contents, bibliography, and so forth,
8646 when the document is output to HTML.
8647 For articles, this should normally be Section; for books, Chapter.
8648 If it is not given, then LyX will attempt to figure out which layout to
8652 \begin_layout Description
8653 \begin_inset Flex Code
8656 \begin_layout Plain Layout
8663 \begin_inset Flex Code
8666 \begin_layout Plain Layout
8672 ] Modifies the properties of the given counter.
8673 If the counter does not exist, the section is ignored.
8675 \begin_inset Quotes eld
8679 \begin_inset Flex Code
8682 \begin_layout Plain Layout
8689 \begin_inset Quotes erd
8693 \begin_inset Newline newline
8697 \begin_inset space ~
8701 \begin_inset CommandInset ref
8703 reference "sub:Counters"
8707 for details on counters.
8710 \begin_layout Description
8711 \begin_inset Flex Code
8714 \begin_layout Plain Layout
8721 \begin_inset Flex Code
8724 \begin_layout Plain Layout
8730 ] Modifies the properties of the given paragraph style.
8731 If the style does not exist, the section is ignored.
8733 \begin_inset Quotes eld
8737 \begin_inset Flex Code
8740 \begin_layout Plain Layout
8747 \begin_inset Quotes erd
8753 \begin_layout Description
8754 \begin_inset Flex Code
8757 \begin_layout Plain Layout
8763 As its name implies, this command allows you to include another layout
8764 definition file within yours to avoid duplicating commands.
8765 Common examples are the standard layout files, for example,
8766 \begin_inset Flex Code
8769 \begin_layout Plain Layout
8775 , which contains most of the basic layouts.
8778 \begin_layout Description
8779 \begin_inset Flex Code
8782 \begin_layout Plain Layout
8788 This section (re-)defines the layout of an inset.
8789 It can be applied to an existing inset or to a new, user-defined inset,
8790 e.g., a new character style.
8792 \begin_inset Quotes eld
8796 \begin_inset Flex Code
8799 \begin_layout Plain Layout
8806 \begin_inset Quotes erd
8810 \begin_inset Newline newline
8814 \begin_inset space ~
8818 \begin_inset CommandInset ref
8820 reference "sub:Flex-insets-and"
8824 for more information.
8828 \begin_layout Description
8829 \begin_inset Flex Code
8832 \begin_layout Plain Layout
8839 \begin_inset Flex Code
8842 \begin_layout Plain Layout
8848 ] A string that indicates the width of the left margin on the screen, for
8850 \begin_inset Quotes eld
8854 \begin_inset Quotes erd
8858 (Note that this is not a `length', like
8859 \begin_inset Quotes eld
8863 \begin_inset Quotes erd
8869 \begin_layout Description
8870 \begin_inset Flex Code
8873 \begin_layout Plain Layout
8880 \begin_inset Flex Code
8883 \begin_layout Plain Layout
8889 ] This command deletes an existing counter, usually one defined in an included
8893 \begin_layout Description
8894 \begin_inset Flex Code
8897 \begin_layout Plain Layout
8903 This command deletes an existing float.
8904 This is particularly useful when you want to suppress a float that has
8905 been defined in an input file.
8908 \begin_layout Description
8909 \begin_inset Flex Code
8912 \begin_layout Plain Layout
8918 This command deletes an existing style.
8919 This is particularly useful when you want to suppress a style that has
8920 be defined in an input file.
8923 \begin_layout Description
8924 \begin_inset Flex Code
8927 \begin_layout Plain Layout
8933 A string indicating the file format (as defined in the Preferences dialog)
8934 produced by this class.
8935 It is mainly useful when
8936 \begin_inset Flex Code
8939 \begin_layout Plain Layout
8945 is `literate' and one wants to define a new type of literate document.
8946 This string is reset to `docbook', `latex', or `literate' when the correspondin
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 parameter is encountered.
8960 \begin_layout Description
8961 \begin_inset Flex Code
8964 \begin_layout Plain Layout
8970 A string indicating what sort of output documents using this class will
8972 At present, the options are: `docbook', `latex', and `literate'.
8975 \begin_layout Description
8976 \begin_inset Flex Code
8979 \begin_layout Plain Layout
8986 \begin_inset Flex Code
8989 \begin_layout Plain Layout
8998 \begin_inset Flex Code
9001 \begin_layout Plain Layout
9008 \begin_inset Flex Code
9011 \begin_layout Plain Layout
9017 ] The default pagestyle.
9018 Can be changed in the
9019 \begin_inset Flex MenuItem
9022 \begin_layout Plain Layout
9023 Document\SpecialChar \menuseparator
9032 \begin_layout Description
9033 \begin_inset Flex Code
9036 \begin_layout Plain Layout
9042 Sets the preamble for the LaTeX document.
9043 Note that this will completely override any prior
9044 \begin_inset Flex Code
9047 \begin_layout Plain Layout
9054 \begin_inset Flex Code
9057 \begin_layout Plain Layout
9065 \begin_inset Flex Code
9068 \begin_layout Plain Layout
9074 if you just want to add material to the preamble.) Must end with
9075 \begin_inset Quotes eld
9079 \begin_inset Flex Code
9082 \begin_layout Plain Layout
9089 \begin_inset Quotes erd
9095 \begin_layout Description
9096 \begin_inset Flex Code
9099 \begin_layout Plain Layout
9106 \begin_inset Flex Code
9109 \begin_layout Plain Layout
9116 \begin_inset Flex Code
9119 \begin_layout Plain Layout
9128 \begin_inset Flex Code
9131 \begin_layout Plain Layout
9137 ] Whether the class already provides the feature
9138 \begin_inset Flex Code
9141 \begin_layout Plain Layout
9148 A feature is in general the name of a package (
9149 \begin_inset Flex Code
9152 \begin_layout Plain Layout
9159 \begin_inset Flex Code
9162 \begin_layout Plain Layout
9168 , \SpecialChar \ldots{}
9170 \begin_inset Flex Code
9173 \begin_layout Plain Layout
9180 \begin_inset Flex Code
9183 \begin_layout Plain Layout
9189 ,\SpecialChar \ldots{}
9190 ); the complete list of supported features is unfortunately not documented
9191 outside the LyX source code—but see
9192 \begin_inset Flex Code
9195 \begin_layout Plain Layout
9201 if you're interested.
9203 \begin_inset Flex MenuItem
9206 \begin_layout Plain Layout
9207 Help\SpecialChar \menuseparator
9213 also gives an overview of the supported packages.
9216 \begin_layout Description
9217 \begin_inset Flex Code
9220 \begin_layout Plain Layout
9227 \begin_inset Flex Code
9230 \begin_layout Plain Layout
9236 ] Indicates that this layout provides the functionality of the module mentioned,
9237 which should be specified by the filename without the
9238 \begin_inset Flex Code
9241 \begin_layout Plain Layout
9248 This will typically be used if the layout includes the module directly,
9249 rather than using the
9250 \begin_inset Flex Code
9253 \begin_layout Plain Layout
9259 tag to indicate that it ought to be used.
9260 It could also be used in a module that provided an alternate implementation
9261 of the same functionality.
9264 \begin_layout Description
9265 \begin_inset Flex Code
9268 \begin_layout Plain Layout
9275 \begin_inset Flex Code
9278 \begin_layout Plain Layout
9284 ] Whether the class requires the feature
9285 \begin_inset Flex Code
9288 \begin_layout Plain Layout
9295 Multiple features must be separated by commas.
9296 Note that you can only request supported features.
9298 \begin_inset Flex Code
9301 \begin_layout Plain Layout
9307 for a list of these.)
9310 \begin_layout Description
9311 \begin_inset Flex Code
9314 \begin_layout Plain Layout
9320 A string that indicates the width of the right margin on the screen, for
9322 \begin_inset Quotes eld
9326 \begin_inset Quotes erd
9332 \begin_layout Description
9333 \begin_inset Flex Code
9336 \begin_layout Plain Layout
9342 Sets which divisions get numbered.
9344 \begin_inset Flex Code
9347 \begin_layout Plain Layout
9356 \begin_layout Description
9357 \begin_inset Flex Code
9360 \begin_layout Plain Layout
9367 \begin_inset Flex Code
9370 \begin_layout Plain Layout
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9388 ] Whether the class-default should be printing on one or both sides of the
9390 Can be changed in the
9391 \begin_inset Flex MenuItem
9394 \begin_layout Plain Layout
9395 Document\SpecialChar \menuseparator
9404 \begin_layout Description
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9414 This sequence defines a paragraph style.
9415 If the style does not yet exist, it is created; if it does exist, its parameter
9418 \begin_inset Quotes eld
9422 \begin_inset Flex Code
9425 \begin_layout Plain Layout
9432 \begin_inset Quotes erd
9436 \begin_inset Newline newline
9440 \begin_inset space ~
9444 \begin_inset CommandInset ref
9446 reference "sub:Paragraph-Styles"
9450 for details on paragraph styles.
9453 \begin_layout Description
9454 \begin_inset Flex Code
9457 \begin_layout Plain Layout
9464 \begin_inset Flex Code
9467 \begin_layout Plain Layout
9473 ] The name of the command or environment to be used with
9474 \begin_inset Flex Code
9477 \begin_layout Plain Layout
9486 \begin_layout Description
9487 \begin_inset Flex Code
9490 \begin_layout Plain Layout
9497 \begin_inset Flex Code
9500 \begin_layout Plain Layout
9509 \begin_inset Flex Code
9512 \begin_layout Plain Layout
9518 ] Indicates what kind of markup is used to define the title of a document.
9520 \begin_inset Flex Code
9523 \begin_layout Plain Layout
9529 means that the macro with name
9530 \begin_inset Flex Code
9533 \begin_layout Plain Layout
9539 will be inserted after the last layout which has
9540 \begin_inset Quotes eld
9544 \begin_inset Flex Code
9547 \begin_layout Plain Layout
9554 \begin_inset Quotes erd
9559 \begin_inset Flex Code
9562 \begin_layout Plain Layout
9568 corresponds to the case where the block of paragraphs which have
9569 \begin_inset Quotes eld
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9583 \begin_inset Quotes erd
9586 should be enclosed into the
9587 \begin_inset Flex Code
9590 \begin_layout Plain Layout
9599 \begin_layout Description
9600 \begin_inset Flex Code
9603 \begin_layout Plain Layout
9609 Sets which divisions are included in the table of contents.
9611 \begin_inset Flex Code
9614 \begin_layout Plain Layout
9623 \begin_layout Subsection
9624 \begin_inset Flex Code
9627 \begin_layout Plain Layout
9634 \begin_inset CommandInset label
9636 name "sub:ClassOptions"
9643 \begin_layout Standard
9645 \begin_inset Flex Code
9648 \begin_layout Plain Layout
9654 section can contain the following entries:
9657 \begin_layout Description
9658 \begin_inset Flex Code
9661 \begin_layout Plain Layout
9668 \begin_inset Flex Code
9671 \begin_layout Plain Layout
9677 ] The list of available font sizes for the document's main font, separated
9679 \begin_inset Quotes eld
9683 \begin_inset Flex Code
9686 \begin_layout Plain Layout
9693 \begin_inset Quotes erd
9699 \begin_layout Description
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9709 Used to set the DTD line with XML-based output classes.
9711 \begin_inset space \thinspace{}
9715 \begin_inset Quotes eld
9718 -//OASIS//DTD DocBook V4.2//EN
9719 \begin_inset Quotes erd
9725 \begin_layout Description
9726 \begin_inset Flex Code
9729 \begin_layout Plain Layout
9736 \begin_inset Flex Code
9739 \begin_layout Plain Layout
9740 string="empty|plain|headings|fancy"
9745 ] The list of available page styles, separated by
9746 \begin_inset Quotes eld
9750 \begin_inset Flex Code
9753 \begin_layout Plain Layout
9760 \begin_inset Quotes erd
9766 \begin_layout Description
9767 \begin_inset Flex Code
9770 \begin_layout Plain Layout
9777 \begin_inset Flex Code
9780 \begin_layout Plain Layout
9786 ] Some document class options, separated by a comma, that will be added
9787 to the optional part of the
9788 \begin_inset Flex Code
9791 \begin_layout Plain Layout
9802 \begin_layout Standard
9804 \begin_inset Flex Code
9807 \begin_layout Plain Layout
9813 section must end with
9814 \begin_inset Quotes eld
9818 \begin_inset Flex Code
9821 \begin_layout Plain Layout
9828 \begin_inset Quotes erd
9834 \begin_layout Subsection
9836 \begin_inset CommandInset label
9838 name "sub:Paragraph-Styles"
9845 \begin_layout Standard
9846 A paragraph style description looks like this:
9850 \begin_layout Plain Layout
9851 Note that this will either define a new style or modify an existing one.
9859 \begin_layout LyX-Code
9866 \begin_layout LyX-Code
9870 \begin_layout LyX-Code
9874 \begin_layout Standard
9875 where the following commands are allowed:
9878 \begin_layout Description
9879 \begin_inset Flex Code
9882 \begin_layout Plain Layout
9889 \begin_inset Flex Code
9892 \begin_layout Plain Layout
9897 , left, right, center
9902 ] Paragraph alignment.
9905 \begin_layout Description
9906 \begin_inset Flex Code
9909 \begin_layout Plain Layout
9916 \begin_inset Flex Code
9919 \begin_layout Plain Layout
9924 , left, right, center
9929 ] A comma separated list of permitted alignments.
9930 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
9932 For example a right-aligned or centered enumeration isn't possible.)
9935 \begin_layout Description
9936 \begin_inset Flex Code
9939 \begin_layout Plain Layout
9945 Note that this will completely override any prior
9946 \begin_inset Flex Code
9949 \begin_layout Plain Layout
9955 declaration for this style.
9957 \begin_inset Quotes eld
9961 \begin_inset Flex Code
9964 \begin_layout Plain Layout
9971 \begin_inset Quotes erd
9976 \begin_inset CommandInset ref
9978 reference "sub:I18n"
9982 for details on its use.
9985 \begin_layout Description
9986 \begin_inset Flex Code
9989 \begin_layout Plain Layout
9996 \begin_inset Flex Code
9999 \begin_layout Plain Layout
10009 \begin_layout Plain Layout
10010 Note that a `float' here is a real number, such as: 1.5.
10015 The vertical space with which the last of a chain of paragraphs with this
10016 style is separated from the following paragraph.
10017 If the next paragraph has another style, the separations are not simply
10018 added, but the maximum is taken.
10021 \begin_layout Description
10022 \begin_inset Flex Code
10025 \begin_layout Plain Layout
10032 \begin_inset Flex Code
10035 \begin_layout Plain Layout
10041 The category for this style.
10042 This is used to group related styles in the style combobox on the toolbar.
10043 Any string can be used, but you may want to use existing categories with
10048 \begin_layout Description
10049 \begin_inset Flex Code
10052 \begin_layout Plain Layout
10058 Depth of XML command.
10059 Used only with XML-type formats.
10062 \begin_layout Description
10063 \begin_inset Flex Code
10066 \begin_layout Plain Layout
10073 \begin_inset Flex Code
10076 \begin_layout Plain Layout
10082 Copies all the features of an existing style into the current one.
10086 \begin_layout Description
10087 \begin_inset Flex Code
10090 \begin_layout Plain Layout
10096 The name of a style whose preamble should be output
10101 This allows to ensure some ordering of the preamble snippets when macros
10102 definitions depend on one another.
10106 \begin_layout Plain Layout
10107 Note that, besides that functionality, there is no way to ensure any ordering
10109 The ordering that you see in a given version of LyX may change without
10110 warning in later versions.
10118 \begin_layout Description
10119 \begin_inset Flex Code
10122 \begin_layout Plain Layout
10129 \begin_inset Flex Code
10132 \begin_layout Plain Layout
10137 , Box, Filled_Box, Static
10142 ] The type of label that stands at the end of the paragraph (or sequence
10144 \begin_inset Flex Code
10147 \begin_layout Plain Layout
10154 \begin_inset Flex Code
10157 \begin_layout Plain Layout
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10174 \begin_inset Flex Code
10177 \begin_layout Plain Layout
10185 \begin_inset Flex Code
10188 \begin_layout Plain Layout
10195 \begin_inset Quotes eld
10199 \begin_inset Quotes erd
10203 \begin_inset Flex Code
10206 \begin_layout Plain Layout
10213 \begin_inset Flex Code
10216 \begin_layout Plain Layout
10217 \begin_inset space ~
10225 ) is a white (resp.
10226 \begin_inset space ~
10229 black) square suitable for end of proof markers,
10230 \begin_inset Flex Code
10233 \begin_layout Plain Layout
10239 is an explicit text string.
10242 \begin_layout Description
10243 \begin_inset Flex Code
10246 \begin_layout Plain Layout
10253 \begin_inset Flex Code
10256 \begin_layout Plain Layout
10262 ] The string used for a label with a
10263 \begin_inset Flex Code
10266 \begin_layout Plain Layout
10273 \begin_inset Flex Code
10276 \begin_layout Plain Layout
10286 \begin_layout Description
10287 \begin_inset Flex Code
10290 \begin_layout Plain Layout
10296 The font used for both the text body
10302 \begin_inset space ~
10306 \begin_inset CommandInset ref
10308 reference "sub:Font-description"
10313 Note that defining this font automatically defines the
10314 \begin_inset Flex Code
10317 \begin_layout Plain Layout
10324 So you should define this one first if you also want to define
10325 \begin_inset Flex Code
10328 \begin_layout Plain Layout
10337 \begin_layout Description
10338 \begin_inset Flex Code
10341 \begin_layout Plain Layout
10348 \begin_inset CommandInset label
10350 name "des:FreeSpacing"
10355 \begin_inset Flex Code
10358 \begin_layout Plain Layout
10367 \begin_inset Flex Code
10370 \begin_layout Plain Layout
10376 ] Usually LyX doesn't allow you to insert more than one space between words,
10377 since a space is considered as the separation between two words, not a
10378 character or symbol of its own.
10379 This is a very fine thing but sometimes annoying, for example, when typing
10380 program code or plain LaTeX code.
10382 \begin_inset Flex Code
10385 \begin_layout Plain Layout
10392 Note that LyX will create protected blanks for the additional blanks when
10393 in another mode than LaTeX-mode.
10396 \begin_layout Description
10397 \begin_inset Flex Code
10400 \begin_layout Plain Layout
10406 These tags are used with XHTML output.
10408 \begin_inset CommandInset ref
10410 reference "sub:Paragraph-Style-XHTML"
10417 \begin_layout Description
10418 \begin_inset Flex Code
10421 \begin_layout Plain Layout
10427 [[FIXME]] (Used only with XML-type formats.)
10430 \begin_layout Description
10431 \begin_inset Flex Code
10434 \begin_layout Plain Layout
10441 \begin_inset Flex Code
10444 \begin_layout Plain Layout
10450 If 1, marks the style as to be included in the document preamble rather
10451 than in the document body.
10452 This is useful for document classes that want such information as the title
10453 and author to appear in the preamble.
10454 Note that this works only for styles for which the
10455 \begin_inset Flex Code
10458 \begin_layout Plain Layout
10465 \begin_inset Flex Code
10468 \begin_layout Plain Layout
10475 \begin_inset Flex Code
10478 \begin_layout Plain Layout
10487 \begin_layout Description
10488 \begin_inset Flex Code
10491 \begin_layout Plain Layout
10498 \begin_inset Flex Code
10501 \begin_layout Plain Layout
10507 If 1, marks the style as being part of a title block (see also the
10508 \begin_inset Flex Code
10511 \begin_layout Plain Layout
10518 \begin_inset Flex Code
10521 \begin_layout Plain Layout
10530 \begin_layout Description
10531 \begin_inset Flex Code
10534 \begin_layout Plain Layout
10541 \begin_inset Flex Code
10544 \begin_layout Plain Layout
10550 ] This provides extra space between paragraphs that have the same style.
10551 If you put other styles into an environment, each is separated with the
10553 \begin_inset Flex Code
10556 \begin_layout Plain Layout
10563 But the whole items of the environment are additionally separated with
10565 \begin_inset Flex Code
10568 \begin_layout Plain Layout
10575 Note that this is a
10580 \begin_layout Description
10581 \begin_inset Flex Code
10584 \begin_layout Plain Layout
10590 [[FIXME]] (Used only with XML-type formats.)
10593 \begin_layout Description
10594 \begin_inset Flex Code
10597 \begin_layout Plain Layout
10604 \begin_inset Flex Code
10607 \begin_layout Plain Layout
10616 \begin_inset Flex Code
10619 \begin_layout Plain Layout
10625 ] Usually LyX does not allow you to leave a paragraph empty, since it would
10626 lead to empty LaTeX output.
10627 There are some cases where this could be desirable however: in a letter
10628 template, the required fields can be provided as empty fields, so that
10629 people do not forget them; in some special classes, a style can be used
10630 as some kind of break, which does not contain actual text.
10633 \begin_layout Description
10634 \begin_inset Flex Code
10637 \begin_layout Plain Layout
10643 [float=0] The vertical space between the label and the text body.
10644 Only used for labels that are above the text body (
10645 \begin_inset Flex Code
10648 \begin_layout Plain Layout
10655 \begin_inset Flex Code
10658 \begin_layout Plain Layout
10659 Centered_Top_Environment
10667 \begin_layout Description
10668 \begin_inset Flex Code
10671 \begin_layout Plain Layout
10678 \begin_inset Flex Code
10681 \begin_layout Plain Layout
10688 \begin_inset Newline newline
10691 The name of the counter for automatic numbering.
10693 \begin_inset Newline newline
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10721 In that case, the counter will be stepped each time the style appears.
10723 \begin_inset Newline newline
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10750 , though this case is a bit complicated.
10751 Suppose you declare
10752 \begin_inset Quotes eld
10756 \begin_inset Flex Code
10759 \begin_layout Plain Layout
10760 LabelCounter myenum
10766 \begin_inset Quotes erd
10770 Then the actual counters used are
10771 \begin_inset Flex Code
10774 \begin_layout Plain Layout
10781 \begin_inset Flex Code
10784 \begin_layout Plain Layout
10791 \begin_inset Flex Code
10794 \begin_layout Plain Layout
10801 \begin_inset Flex Code
10804 \begin_layout Plain Layout
10810 , much as in LaTeX.
10811 These counters must all be declared separately.
10812 \begin_inset Newline newline
10816 \begin_inset CommandInset ref
10818 reference "sub:Counters"
10822 for details on counters.
10825 \begin_layout Description
10826 \begin_inset Flex Code
10829 \begin_layout Plain Layout
10835 The font used for the label.
10837 \begin_inset space ~
10841 \begin_inset CommandInset ref
10843 reference "sub:Font-description"
10850 \begin_layout Description
10851 \begin_inset Flex Code
10854 \begin_layout Plain Layout
10860 Text that indicates how far a label should be indented.
10863 \begin_layout Description
10864 \begin_inset Flex Code
10867 \begin_layout Plain Layout
10874 \begin_inset Flex Code
10877 \begin_layout Plain Layout
10883 ] The horizontal space between the label and the text body.
10884 Only used for labels that are not above the text body.
10887 \begin_layout Description
10888 \begin_inset Flex Code
10891 \begin_layout Plain Layout
10898 \begin_inset Flex Code
10901 \begin_layout Plain Layout
10907 ] The string used for a label with a
10908 \begin_inset Flex Code
10911 \begin_layout Plain Layout
10919 \begin_inset Flex Code
10922 \begin_layout Plain Layout
10928 is set, this string can be contain the special formatting commands described
10930 \begin_inset CommandInset ref
10932 reference "sub:Counters"
10940 \begin_layout Plain Layout
10941 For the sake of backwards compatibility, the string
10942 \begin_inset Flex Code
10945 \begin_layout Plain Layout
10955 will be replaced by the expanded
10956 \begin_inset Flex Code
10959 \begin_layout Plain Layout
10966 \begin_inset Flex Code
10969 \begin_layout Plain Layout
10978 This feature is now obsolete and should be replaced by the mechanisms of
10980 \begin_inset CommandInset ref
10982 reference "sub:Counters"
10994 \begin_layout Description
10995 \begin_inset Flex Code
10998 \begin_layout Plain Layout
10999 LabelStringAppendix
11005 \begin_inset Flex Code
11008 \begin_layout Plain Layout
11014 ] This is used inside the appendix instead of
11015 \begin_inset Flex Code
11018 \begin_layout Plain Layout
11026 \begin_inset Flex Code
11029 \begin_layout Plain Layout
11036 \begin_inset Flex Code
11039 \begin_layout Plain Layout
11040 LabelStringAppendix
11048 \begin_layout Description
11049 \begin_inset Flex Code
11052 \begin_layout Plain Layout
11058 [FIXME] (Used only with XML-type formats.)
11061 \begin_layout Description
11062 \begin_inset Flex Code
11065 \begin_layout Plain Layout
11072 \begin_inset Flex Code
11075 \begin_layout Plain Layout
11080 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
11081 Enumerate, Itemize, Bibliography
11090 \begin_layout Itemize
11091 \begin_inset Flex Code
11094 \begin_layout Plain Layout
11100 means the label is the very first word (up to the first real blank).
11101 Use protected spaces (like
11102 \begin_inset space ~
11105 that one) if you want more than one word as the label.
11109 \begin_layout Itemize
11110 \begin_inset Flex Code
11113 \begin_layout Plain Layout
11119 means the label is simply whatever
11120 \begin_inset Flex Code
11123 \begin_layout Plain Layout
11130 Note that this really is `static'.
11133 \begin_layout Itemize
11134 \begin_inset Flex Code
11137 \begin_layout Plain Layout
11144 \begin_inset Flex Code
11147 \begin_layout Plain Layout
11148 Centered_Top_Environment
11153 are special cases of
11154 \begin_inset Flex Code
11157 \begin_layout Plain Layout
11164 The label will be printed above the paragraph, but only at the top of an
11165 environment or the top of a chain of paragraphs with this style.
11166 This might be used with the
11167 \begin_inset Flex MenuItem
11170 \begin_layout Plain Layout
11176 style, for example.
11179 \begin_layout Itemize
11180 \begin_inset Flex Code
11183 \begin_layout Plain Layout
11189 is a special case for the caption-labels
11190 \begin_inset Quotes eld
11194 \begin_inset Quotes erd
11198 \begin_inset Quotes eld
11202 \begin_inset Quotes erd
11207 \begin_inset Flex Code
11210 \begin_layout Plain Layout
11216 means the (hardcoded) label string depends on the kind of float: It is
11217 hardcoded to be `FloatType N', where N is the value of the counter associated
11221 \begin_layout Itemize
11223 \begin_inset Flex Code
11226 \begin_layout Plain Layout
11232 label type defines automatically numbered labels.
11234 \begin_inset Flex Code
11237 \begin_layout Plain Layout
11243 will be expanded to resolve any counter references it contains: For example,
11245 \begin_inset Quotes eld
11249 \begin_inset Flex Code
11252 \begin_layout Plain Layout
11263 \begin_inset Quotes erd
11268 \begin_inset CommandInset ref
11270 reference "sub:Counters"
11274 for more information on counters.
11277 \begin_layout Itemize
11278 \begin_inset Flex Code
11281 \begin_layout Plain Layout
11287 produces the usual sort of enumeration labels.
11288 At present, it is hardcoded to use Arabic numerals, lowercase letters,
11289 small Roman numerals, and uppercase letters for the four possible depths.
11292 \begin_layout Itemize
11293 \begin_inset Flex Code
11296 \begin_layout Plain Layout
11302 produces various bullets at the different levels.
11303 It is also hardcoded.
11306 \begin_layout Itemize
11307 \begin_inset Flex Code
11310 \begin_layout Plain Layout
11316 is used internally by LyX and should be used only with
11317 \begin_inset Flex Code
11320 \begin_layout Plain Layout
11321 LatexType BibEnvironment
11330 \begin_layout Description
11331 \begin_inset Flex Code
11334 \begin_layout Plain Layout
11340 Note that this will completely override any prior
11341 \begin_inset Flex Code
11344 \begin_layout Plain Layout
11350 declaration for this style.
11352 \begin_inset Quotes eld
11356 \begin_inset Flex Code
11359 \begin_layout Plain Layout
11366 \begin_inset Quotes erd
11371 \begin_inset CommandInset ref
11373 reference "sub:I18n"
11377 for details on its use.
11380 \begin_layout Description
11381 \begin_inset Flex Code
11384 \begin_layout Plain Layout
11390 The name of the corresponding LaTeX stuff.
11391 Either the environment or command name.
11394 \begin_layout Description
11395 \begin_inset Flex Code
11398 \begin_layout Plain Layout
11404 An optional parameter for the corresponding
11405 \begin_inset Flex Code
11408 \begin_layout Plain Layout
11415 This parameter cannot be changed from within LyX.
11418 \begin_layout Description
11419 \begin_inset Flex Code
11422 \begin_layout Plain Layout
11429 \begin_inset Flex Code
11432 \begin_layout Plain Layout
11437 , Command, Environment, Item_Environment,
11443 \begin_inset Flex Code
11446 \begin_layout Plain Layout
11447 List_Environment, Bib_Environment
11452 ] How the style should be translated into LaTeX.
11456 \begin_layout Plain Layout
11457 \begin_inset Flex Code
11460 \begin_layout Plain Layout
11466 is perhaps a bit misleading, since these rules apply to SGML classes, too.
11467 Visit the SGML class files for specific examples.
11476 \begin_layout Itemize
11477 \begin_inset Flex Code
11480 \begin_layout Plain Layout
11486 means nothing special.
11490 \begin_layout Itemize
11491 \begin_inset Flex Code
11494 \begin_layout Plain Layout
11501 \begin_inset Flex Code
11504 \begin_layout Plain Layout
11511 {\SpecialChar \ldots{}
11520 \begin_layout Itemize
11521 \begin_inset Flex Code
11524 \begin_layout Plain Layout
11531 \begin_inset Flex Code
11534 \begin_layout Plain Layout
11541 }\SpecialChar \ldots{}
11557 \begin_layout Itemize
11558 \begin_inset Flex Code
11561 \begin_layout Plain Layout
11568 \begin_inset Flex Code
11571 \begin_layout Plain Layout
11578 \begin_inset Flex Code
11581 \begin_layout Plain Layout
11589 is generated for each paragraph of this environment.
11593 \begin_layout Itemize
11594 \begin_inset Flex Code
11597 \begin_layout Plain Layout
11604 \begin_inset Flex Code
11607 \begin_layout Plain Layout
11614 \begin_inset Flex Code
11617 \begin_layout Plain Layout
11623 is passed as an argument to the environment.
11625 \begin_inset Flex Code
11628 \begin_layout Plain Layout
11634 can be defined in the
11635 \begin_inset Flex MenuItem
11638 \begin_layout Plain Layout
11639 Edit\SpecialChar \menuseparator
11641 \begin_inset space ~
11653 \begin_layout Standard
11654 Putting the last few things together, the LaTeX output will be either:
11657 \begin_layout LyX-Code
11660 latexname[latexparam]{\SpecialChar \ldots{}
11664 \begin_layout Standard
11668 \begin_layout LyX-Code
11671 begin{latexname}[latexparam] \SpecialChar \ldots{}
11677 \begin_layout Standard
11678 depending upon the LaTeX type.
11682 \begin_layout Description
11683 \begin_inset Flex Code
11686 \begin_layout Plain Layout
11693 \begin_inset Flex Code
11696 \begin_layout Plain Layout
11702 ] If you put styles into environments, the leftmargins are not simply added,
11703 but added with a factor
11704 \begin_inset Formula $\frac{4}{depth+4}$
11708 Note that this parameter is also used when the margin is defined as
11709 \begin_inset Flex Code
11712 \begin_layout Plain Layout
11719 \begin_inset Flex Code
11722 \begin_layout Plain Layout
11729 Then it is added to the manual or dynamic margin.
11731 \begin_inset Newline newline
11734 The argument is passed as a string.
11736 \begin_inset Quotes eld
11740 \begin_inset Flex Code
11743 \begin_layout Plain Layout
11750 \begin_inset Quotes erd
11753 means that the paragraph is indented with the width of
11754 \begin_inset Quotes eld
11758 \begin_inset Flex Code
11761 \begin_layout Plain Layout
11768 \begin_inset Quotes erd
11771 in the normal font.
11772 You can get a negative width by prefixing the string with
11773 \begin_inset Quotes eld
11777 \begin_inset Flex Code
11780 \begin_layout Plain Layout
11787 \begin_inset Quotes erd
11791 This way was chosen so that the look is the same with each used screen
11796 \begin_layout Description
11797 \begin_inset Flex Code
11800 \begin_layout Plain Layout
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11815 , Manual, Dynamic, First_Dynamic, Right_Address_Box
11821 \begin_inset Newline newline
11824 The kind of margin that the style has on the left side.
11826 \begin_inset Flex Code
11829 \begin_layout Plain Layout
11835 just means a fixed margin.
11837 \begin_inset Flex Code
11840 \begin_layout Plain Layout
11846 means that the left margin depends on the string entered in the
11847 \begin_inset Flex MenuItem
11850 \begin_layout Plain Layout
11851 Edit\SpecialChar \menuseparator
11853 \begin_inset space ~
11862 This is used to typeset nice lists without tabulators.
11864 \begin_inset Flex Code
11867 \begin_layout Plain Layout
11873 means that the margin depends on the size of the label.
11874 This is used for automatic enumerated headlines.
11875 It is obvious that the headline
11876 \begin_inset Quotes eld
11879 5.4.3.2.1 Very long headline
11880 \begin_inset Quotes erd
11883 must have a wider left margin (as wide as
11884 \begin_inset Quotes eld
11888 \begin_inset Quotes erd
11891 plus the space) than
11892 \begin_inset Quotes eld
11895 3.2 Very long headline
11896 \begin_inset Quotes erd
11900 \begin_inset Quotes eld
11904 \begin_inset Quotes erd
11907 are not able to do this.
11909 \begin_inset Flex Code
11912 \begin_layout Plain Layout
11918 is similar, but only the very first row of the paragraph is dynamic, while
11919 the others are static; this is used, for example, for descriptions.
11921 \begin_inset Flex Code
11924 \begin_layout Plain Layout
11930 means the margin is chosen in a way that the longest row of this paragraph
11931 fits to the right margin.
11932 This is used to typeset an address on the right edge of the page.
11935 \begin_layout Description
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11946 \begin_inset Flex Code
11949 \begin_layout Plain Layout
11958 \begin_inset Flex Code
11961 \begin_layout Plain Layout
11967 ] Whether fragile commands in this style should be
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11984 whether this command should itself be protected.)
11987 \begin_layout Description
11988 \begin_inset Flex Code
11991 \begin_layout Plain Layout
11998 \begin_inset Flex Code
12001 \begin_layout Plain Layout
12008 \begin_inset Flex Code
12011 \begin_layout Plain Layout
12019 ] Whether newlines are translated into LaTeX newlines (
12020 \begin_inset Flex Code
12023 \begin_layout Plain Layout
12034 The translation can be switched off to allow more comfortable LaTeX editing
12038 \begin_layout Description
12039 \begin_inset Flex Code
12042 \begin_layout Plain Layout
12049 \begin_inset Flex Code
12052 \begin_layout Plain Layout
12059 \begin_inset Flex Code
12062 \begin_layout Plain Layout
12070 ] If set to true, and if
12071 \begin_inset Flex Code
12074 \begin_layout Plain Layout
12081 \begin_inset Flex Code
12084 \begin_layout Plain Layout
12090 ) paragraphs are being indented, then the indentation of such a paragraph
12091 following one of this type will be suppressed.
12092 (So this will not affect the display of non-default paragraphs.)
12095 \begin_layout Description
12096 \begin_inset Flex Code
12099 \begin_layout Plain Layout
12105 Name of a style that has replaced this style.
12106 This is used to rename a style, while keeping backward compatibility.
12109 \begin_layout Description
12110 \begin_inset Flex Code
12113 \begin_layout Plain Layout
12120 \begin_inset Flex Code
12123 \begin_layout Plain Layout
12129 ] The number of optional arguments that can be used with this style.
12130 This is useful for things like section headings, and only makes sense with
12132 Note that, on output, the optional arguments will all precede any required
12133 arguments (see below).
12134 So one can have constructs like:
12138 \begin_layout LyX-Code
12141 mycmd[opt1]{req1}{contents of paragraph}
12144 \begin_layout Standard
12145 but one cannot have things like:
12148 \begin_layout LyX-Code
12151 mycmd[opt1]{req1}[opt2]{contents of paragraph}
12154 \begin_layout Standard
12155 at least, not without ERT (with which you can have anything).
12160 \begin_layout Description
12161 \begin_inset Flex Code
12164 \begin_layout Plain Layout
12171 \begin_inset Flex Code
12174 \begin_layout Plain Layout
12183 \begin_inset Flex Code
12186 \begin_layout Plain Layout
12192 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
12193 output, but only by a line break; together with
12194 \begin_inset Flex Code
12197 \begin_layout Plain Layout
12203 , this allows to emulate a plain text editor (like the ERT inset).
12206 \begin_layout Description
12207 \begin_inset Flex Code
12210 \begin_layout Plain Layout
12217 \begin_inset Flex Code
12220 \begin_layout Plain Layout
12226 ] The indent of the very first line of a paragraph.
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12237 will be fixed for a certain style.
12238 The exception is the default style, since the indentation for these paragraphs
12239 can be prohibited with
12240 \begin_inset Flex Code
12243 \begin_layout Plain Layout
12251 \begin_inset Flex Code
12254 \begin_layout Plain Layout
12260 style paragraphs inside environments use the
12261 \begin_inset Flex Code
12264 \begin_layout Plain Layout
12270 of the environment, not their native one.
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12281 paragraphs inside an enumeration are not indented.
12284 \begin_layout Description
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12295 \begin_inset Flex Code
12298 \begin_layout Plain Layout
12304 ] The vertical space between two paragraphs of this style.
12307 \begin_layout Description
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12318 \begin_inset Flex Code
12321 \begin_layout Plain Layout
12327 ] LyX allows the user to choose either
12328 \begin_inset Quotes eld
12332 \begin_inset Quotes erd
12336 \begin_inset Quotes eld
12340 \begin_inset Quotes erd
12343 to typeset a document.
12345 \begin_inset Quotes eld
12349 \begin_inset Quotes erd
12352 is chosen, this value is completely ignored.
12354 \begin_inset Quotes eld
12358 \begin_inset Quotes erd
12361 is chosen, the parindent of a LaTeXtype
12362 \begin_inset Quotes eld
12366 \begin_inset Quotes erd
12369 style is ignored and all paragraphs are separated by this parskip argument.
12370 The vertical space is calculated with
12371 \begin_inset Flex Code
12374 \begin_layout Plain Layout
12376 \begin_inset space ~
12385 \begin_inset Flex Code
12388 \begin_layout Plain Layout
12394 is the height of a row with the normal font.
12395 This way, the look stays the same with different screen fonts.
12398 \begin_layout Description
12399 \begin_inset Flex Code
12402 \begin_layout Plain Layout
12409 \begin_inset Flex Code
12412 \begin_layout Plain Layout
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12430 ] Whether the contents of this paragraph should be output in raw form, meaning
12431 without special translations that LaTeX would require.
12434 \begin_layout Description
12435 \begin_inset Flex Code
12438 \begin_layout Plain Layout
12444 Information to be included in the LaTeX preamble when this style is used.
12445 Used to define macros, load packages, etc., required by this particular
12448 \begin_inset Quotes eld
12452 \begin_inset Flex Code
12455 \begin_layout Plain Layout
12462 \begin_inset Quotes erd
12468 \begin_layout Description
12469 \begin_inset Flex Code
12472 \begin_layout Plain Layout
12479 \begin_inset Flex Code
12482 \begin_layout Plain Layout
12488 ] The prefix to use when creating labels referring to paragraphs of this
12490 This allows the use of formatted references.
12493 \begin_layout Description
12494 \begin_inset Flex Code
12497 \begin_layout Plain Layout
12504 \begin_inset Flex Code
12507 \begin_layout Plain Layout
12513 ] The number of required arguments that the LaTeX command or environment
12514 corresponding to this style expects.
12515 In the case of a command, these are required arguments
12519 that associated with the content of the paragraph itself.
12520 These do not actually have to be provided: LyX will output empty arguments
12522 Note that optional arguments will be output before required arguments.
12523 See the discussion of the
12524 \begin_inset Flex Code
12527 \begin_layout Plain Layout
12533 tag above for more information.
12536 \begin_layout Description
12537 \begin_inset Flex Code
12540 \begin_layout Plain Layout
12547 \begin_inset Flex Code
12550 \begin_layout Plain Layout
12556 ] Whether the style requires the feature
12557 \begin_inset Flex Code
12560 \begin_layout Plain Layout
12567 See the description of
12568 \begin_inset Flex Code
12571 \begin_layout Plain Layout
12578 \begin_inset CommandInset ref
12579 LatexCommand pageref
12580 reference "des:FreeSpacing"
12584 ) for information on `features'.
12588 \begin_layout Description
12589 \begin_inset Flex Code
12592 \begin_layout Plain Layout
12599 \begin_inset Flex Code
12602 \begin_layout Plain Layout
12609 \begin_inset Flex Code
12612 \begin_layout Plain Layout
12621 \begin_layout Description
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12640 , onehalf, double, other
12649 ] This defines what the default spacing should be in the style.
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12671 \begin_inset Flex Code
12674 \begin_layout Plain Layout
12680 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
12681 If you specify the argument
12682 \begin_inset Flex Code
12685 \begin_layout Plain Layout
12691 , then you should also provide a numerical argument which will be the actual
12693 Note that, contrary to other parameters,
12694 \begin_inset Flex Code
12697 \begin_layout Plain Layout
12703 implies the generation of specific LaTeX code, using the package
12706 \begin_inset Flex Code
12709 \begin_layout Plain Layout
12718 \begin_layout Description
12719 \begin_inset Flex Code
12722 \begin_layout Plain Layout
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12739 \begin_inset Flex Code
12742 \begin_layout Plain Layout
12750 ] Spellcheck paragraphs of this style.
12754 \begin_layout Description
12755 \begin_inset Flex Code
12758 \begin_layout Plain Layout
12764 The font used for the text body .
12766 \begin_inset CommandInset ref
12768 reference "sub:Font-description"
12775 \begin_layout Description
12776 \begin_inset Flex Code
12779 \begin_layout Plain Layout
12788 \begin_inset Flex Code
12791 \begin_layout Plain Layout
12801 The level of the style in the table of contents.
12802 This is used for automatic numbering of section headings.
12805 \begin_layout Description
12806 \begin_inset Flex Code
12809 \begin_layout Plain Layout
12816 \begin_inset Flex Code
12819 \begin_layout Plain Layout
12825 ] The vertical space with which the very first of a chain of paragraphs
12826 with this style is separated from the previous paragraph.
12827 If the previous paragraph has another style, the separations are not simply
12828 added, but the maximum is taken.
12831 \begin_layout Subsection
12832 \begin_inset CommandInset label
12838 Internationalization of Paragraph Styles
12841 \begin_layout Standard
12842 LyX has long supported internationalization of layout information, but,
12843 until version 2.0, this applied only to the user interface and not to, say,
12845 Thus, French authors were forced to resort to ugly hacks if they wanted
12850 1' instead of `Theorem 1'.
12851 Thanks to Georg Baum, that is no longer the case.
12854 \begin_layout Standard
12856 \begin_inset Flex Code
12859 \begin_layout Plain Layout
12865 defines text that is to appear in the typeset document, it may use
12866 \begin_inset Flex Code
12869 \begin_layout Plain Layout
12876 \begin_inset Flex Code
12879 \begin_layout Plain Layout
12885 to support non-English and even multi-language documents correctly.
12886 The following excerpt (from the
12887 \begin_inset Flex Code
12890 \begin_layout Plain Layout
12896 file) shows how this works:
12899 \begin_layout LyX-Code
12904 \begin_layout LyX-Code
12907 theoremstyle{remark}
12910 \begin_layout LyX-Code
12913 newtheorem{claim}[thm]{
12920 \begin_layout LyX-Code
12924 \begin_layout LyX-Code
12928 \begin_layout LyX-Code
12933 claimname}{_(Claim)}
12936 \begin_layout LyX-Code
12940 \begin_layout LyX-Code
12944 \begin_layout LyX-Code
12953 claimname}{_(Claim)}}
12956 \begin_layout LyX-Code
12961 \begin_layout Standard
12962 In principle, any legal LaTeX may appear in the
12963 \begin_inset Flex Code
12966 \begin_layout Plain Layout
12973 \begin_inset Flex Code
12976 \begin_layout Plain Layout
12982 tags, but in practice they will typically look as they do here.
12983 The key to correct translation of the typeset text is the definition of
12985 \begin_inset Flex Code
12988 \begin_layout Plain Layout
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13012 \begin_layout Standard
13014 \begin_inset Flex Code
13017 \begin_layout Plain Layout
13023 tag provides for internationalization based upon the overall language of
13025 The contents of the tag will be included in the preamble, just as with
13027 \begin_inset Flex Code
13030 \begin_layout Plain Layout
13037 What makes it special is the use of the
13038 \begin_inset Quotes eld
13042 \begin_inset Quotes erd
13046 \begin_inset Flex Code
13049 \begin_layout Plain Layout
13055 , which will be replaced, when LyX produces LaTeX output, with the translation
13056 of its argument into the document language.
13059 \begin_layout Standard
13061 \begin_inset Flex Code
13064 \begin_layout Plain Layout
13070 tag is more complex, since it is meant to provide support for multi-language
13071 documents and so offers an interface to the
13072 \begin_inset Flex Code
13075 \begin_layout Plain Layout
13082 Its contents will be added to the preamble once for each language that
13083 appears in the document.
13084 In this case, the argument to
13085 \begin_inset Flex Code
13088 \begin_layout Plain Layout
13094 will be replaced with its translation into the language in question; the
13096 \begin_inset Flex Code
13099 \begin_layout Plain Layout
13105 is replaced by the language name (as used by the babel package).
13108 \begin_layout Standard
13109 A German document that also included a French section would thus have the
13110 following in the preamble:
13113 \begin_layout LyX-Code
13122 claimname}{Affirmation}}
13130 claimname}{Behauptung}}
13134 claimname}{Behauptung}
13137 \begin_layout Standard
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13148 will then conspire to produce the correct text in the output.
13151 \begin_layout Standard
13152 One important point to note here is that the translations are provided by
13153 LyX itself, through the
13154 \change_inserted -195340706 1334775793
13156 \begin_inset Flex Code
13159 \begin_layout Plain Layout
13161 \change_inserted -195340706 1334775793
13168 \change_deleted -195340706 1334775793
13169 same mechanism it uses for internationalization of the user interface
13172 This means, in effect, that
13173 \begin_inset Flex Code
13176 \begin_layout Plain Layout
13183 \begin_inset Flex Code
13186 \begin_layout Plain Layout
13192 are really only of use in layout files that are provided with LyX, since
13193 text entered in user-created layout files will not be seen by LyX's internation
13195 \change_inserted -195340706 1334775793
13197 \begin_inset Flex Code
13200 \begin_layout Plain Layout
13202 \change_inserted -195340706 1334775793
13208 file is modified accordingly
13211 That said, however, any layout created with the intention that it will
13212 be included with LyX should use these tags where appropriate.
13214 \change_inserted -195340706 1334775793
13215 Please note that the paragraph style translations provided by LyX will
13216 never change with a minor update (e.g.
13217 from version 2.1.x to 2.1.y).
13218 It is however quite likely that a major update (e.g.
13219 from 2.0.x to 2.1.y) will introduce new translations or corrections.
13224 \begin_layout Subsection
13226 \begin_inset CommandInset label
13235 \begin_layout Standard
13236 Since version 1.3.0 of LyX, it is has been both possible and necessary to
13237 define the floats (
13238 \begin_inset Flex MenuItem
13241 \begin_layout Plain Layout
13248 \begin_inset Flex MenuItem
13251 \begin_layout Plain Layout
13257 , \SpecialChar \ldots{}
13258 ) in the text class itself.
13259 Standard floats are included in the file
13260 \begin_inset Flex Code
13263 \begin_layout Plain Layout
13269 , so you may have to do no more than add
13272 \begin_layout LyX-Code
13273 Input stdfloats.inc
13276 \begin_layout Standard
13277 to your layout file.
13278 If you want to implement a text class that proposes some other float types
13279 (like the AGU class bundled with LyX), the information below will hopefully
13283 \begin_layout Description
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13294 \begin_inset Flex Code
13297 \begin_layout Plain Layout
13304 \begin_inset Quotes erd
13308 \begin_inset Quotes erd
13311 ] The file name extension of an auxiliary file for the list of figures (or
13313 LaTeX writes the captions to this file.
13316 \begin_layout Description
13317 \begin_inset Flex Code
13320 \begin_layout Plain Layout
13327 \begin_inset Flex Code
13330 \begin_layout Plain Layout
13337 \begin_inset Quotes erd
13341 \begin_inset Quotes erd
13344 ] The string that will be used in the menus and also for the caption.
13345 This is translated to the current language if babel is used.
13348 \begin_layout Description
13349 \begin_inset Flex Code
13352 \begin_layout Plain Layout
13358 These are used for XHTML output.
13360 \begin_inset CommandInset ref
13362 reference "sec:Tags-for-XHTML"
13369 \begin_layout Description
13370 \begin_inset Flex Code
13373 \begin_layout Plain Layout
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13394 \begin_inset Flex Code
13397 \begin_layout Plain Layout
13403 ] Indicates whether the float is already defined in the document class or
13404 if we instead need to load
13405 \begin_inset Flex Code
13408 \begin_layout Plain Layout
13414 and use what it provides to define it on-the-fly.
13416 \begin_inset Flex Code
13419 \begin_layout Plain Layout
13426 \begin_inset Flex Code
13429 \begin_layout Plain Layout
13436 It should be set to
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13446 if the float is already defined by the LaTeX document class.
13449 \begin_layout Description
13450 \begin_inset Flex Code
13453 \begin_layout Plain Layout
13460 \begin_inset Flex Code
13463 \begin_layout Plain Layout
13470 \begin_inset Quotes erd
13474 \begin_inset Quotes erd
13477 ] The command used to generate a list of floats of this type; the leading
13480 ' should be omitted.
13486 \begin_inset Flex Code
13489 \begin_layout Plain Layout
13495 is false, since there is no standard way to generate this command.
13497 \begin_inset Flex Code
13500 \begin_layout Plain Layout
13506 is true, since in that case there is a standard way to define the command.
13509 \begin_layout Description
13510 \begin_inset Flex Code
13513 \begin_layout Plain Layout
13520 \begin_inset Flex Code
13523 \begin_layout Plain Layout
13530 \begin_inset Quotes erd
13534 \begin_inset Quotes erd
13537 ] A title for a list of floats of this kind (list of figures, tables, or
13539 It is used for the screen label within LyX; it is passed to LaTeX for use
13540 as the title there; and it is used as the title in XHTML output.
13541 It will be translated to the document language.
13544 \begin_layout Description
13545 \begin_inset Flex Code
13548 \begin_layout Plain Layout
13555 \begin_inset Flex Code
13558 \begin_layout Plain Layout
13565 \begin_inset Quotes erd
13569 \begin_inset Quotes erd
13572 ] This (optional) argument determines whether floats of this class will
13573 be numbered within some sectional unit of the document.
13574 For example, if within is equal to
13575 \begin_inset Flex Code
13578 \begin_layout Plain Layout
13584 , the floats will be numbered within chapters.
13588 \begin_layout Description
13589 \begin_inset Flex Code
13592 \begin_layout Plain Layout
13599 \begin_inset Flex Code
13602 \begin_layout Plain Layout
13609 \begin_inset Quotes erd
13613 \begin_inset Quotes erd
13616 ] The default placement for the given class of floats.
13617 The string should be as in standard LaTeX:
13618 \begin_inset Flex Code
13621 \begin_layout Plain Layout
13628 \begin_inset Flex Code
13631 \begin_layout Plain Layout
13638 \begin_inset Flex Code
13641 \begin_layout Plain Layout
13648 \begin_inset Flex Code
13651 \begin_layout Plain Layout
13657 for top, bottom, page, and here, respectively.
13661 \begin_layout Plain Layout
13662 Note that the order of these letters in the string is irrelevant, like in
13668 On top of that there is a new type,
13669 \begin_inset Flex Code
13672 \begin_layout Plain Layout
13678 , which does not really correspond to a float, since it means: put it
13679 \begin_inset Quotes eld
13683 \begin_inset Quotes erd
13687 Note however that the
13688 \begin_inset Flex Code
13691 \begin_layout Plain Layout
13697 specifier is special and, because of implementation details, cannot be
13698 used in non-built in float types.
13699 If you do not understand what this means, just use
13700 \begin_inset Quotes eld
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13714 \begin_inset Quotes erd
13720 \begin_layout Description
13721 \begin_inset Flex Code
13724 \begin_layout Plain Layout
13731 \begin_inset Flex Code
13734 \begin_layout Plain Layout
13740 ] The prefix to use when creating labels referring to floats of this type.
13741 This allows the use of formatted references.
13742 Note that you can remove any
13743 \begin_inset Flex Code
13746 \begin_layout Plain Layout
13752 set by a copied style by using the special value
13753 \begin_inset Quotes eld
13757 \begin_inset Quotes erd
13760 , which must be all caps.
13763 \begin_layout Description
13764 \begin_inset Flex Code
13767 \begin_layout Plain Layout
13774 \begin_inset Flex Code
13777 \begin_layout Plain Layout
13784 \begin_inset Quotes erd
13788 \begin_inset Quotes erd
13791 ] The style used when defining the float using
13792 \begin_inset Flex Code
13795 \begin_layout Plain Layout
13806 \begin_layout Description
13807 \begin_inset Flex Code
13810 \begin_layout Plain Layout
13817 \begin_inset Flex Code
13820 \begin_layout Plain Layout
13827 \begin_inset Quotes erd
13831 \begin_inset Quotes erd
13835 \begin_inset Quotes eld
13839 \begin_inset Quotes erd
13842 of the new class of floats, like program or algorithm.
13843 After the appropriate
13844 \begin_inset Flex Code
13847 \begin_layout Plain Layout
13856 \begin_inset Flex Code
13859 \begin_layout Plain Layout
13868 \begin_inset Flex Code
13871 \begin_layout Plain Layout
13882 \begin_layout Description
13883 \begin_inset Flex Code
13886 \begin_layout Plain Layout
13893 \begin_inset Flex Code
13896 \begin_layout Plain Layout
13903 \begin_inset Flex Code
13906 \begin_layout Plain Layout
13914 ] Tells us whether this float is defined using the facilities provided by
13916 \begin_inset Flex Code
13919 \begin_layout Plain Layout
13925 , either by the class file or a package, or on-the-fly by LyX itself.
13928 \begin_layout Standard
13929 Note that defining a float with type
13930 \begin_inset Flex Code
13933 \begin_layout Plain Layout
13941 automatically defines the corresponding counter with name
13942 \begin_inset Flex Code
13945 \begin_layout Plain Layout
13956 \begin_layout Subsection
13957 Flex insets and InsetLayout
13958 \begin_inset CommandInset label
13960 name "sub:Flex-insets-and"
13967 \begin_layout Standard
13968 LyX has supported character styles since version 1.4.0; as of version 1.6.0,
13969 these are called Flex insets.
13973 \begin_layout Standard
13974 Flex insets come in three different kinds:
13977 \begin_layout Itemize
13979 \begin_inset Flex Code
13982 \begin_layout Plain Layout
13988 ): These define semantic markup corresponding to such LaTeX commands as
13990 \begin_inset Flex Code
13993 \begin_layout Plain Layout
14002 \begin_inset Flex Code
14005 \begin_layout Plain Layout
14016 \begin_layout Itemize
14018 \begin_inset Flex Code
14021 \begin_layout Plain Layout
14027 ): These can be used to define custom collapsible insets, similar to TeX
14028 code, footnote, and the like.
14029 An obvious example is an endnote inset, which is defined in the
14030 \begin_inset Flex Code
14033 \begin_layout Plain Layout
14042 \begin_layout Itemize
14044 \begin_inset Flex Code
14047 \begin_layout Plain Layout
14053 ): For use with DocBook classes.
14056 \begin_layout Standard
14057 Flex insets are defined using the
14058 \begin_inset Flex Code
14061 \begin_layout Plain Layout
14067 tag, which shall be explained in a moment.
14070 \begin_layout Standard
14072 \begin_inset Flex Code
14075 \begin_layout Plain Layout
14081 tag also serves another function: It can be used to customize the general
14082 layout of many different types of insets.
14084 \begin_inset Flex Code
14087 \begin_layout Plain Layout
14093 can be used to customize the layout parameters for footnotes, marginal
14094 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
14095 boxes, tables, algorithms, URLs, and optional arguments, as well as to
14096 define Flex insets.
14099 \begin_layout Standard
14101 \begin_inset Flex Code
14104 \begin_layout Plain Layout
14110 definition must begin with a line of the form:
14113 \begin_layout LyX-Code
14117 \begin_layout Standard
14119 \begin_inset Flex Code
14122 \begin_layout Plain Layout
14128 indicates the inset whose layout is being defined, and here there are
14129 \change_inserted 5863208 1334489266
14131 \change_deleted 5863208 1334489267
14137 \begin_layout Enumerate
14138 The layout for a pre-existing inset is being modified.
14139 In this case, can be
14140 \begin_inset Flex Code
14143 \begin_layout Plain Layout
14149 any one of the following:
14150 \begin_inset Flex Code
14153 \begin_layout Plain Layout
14160 \begin_inset Flex Code
14163 \begin_layout Plain Layout
14170 \begin_inset Flex Code
14173 \begin_layout Plain Layout
14180 \begin_inset Flex Code
14183 \begin_layout Plain Layout
14190 \begin_inset Flex Code
14193 \begin_layout Plain Layout
14200 \begin_inset Flex Code
14203 \begin_layout Plain Layout
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14220 \begin_inset Flex Code
14223 \begin_layout Plain Layout
14230 \begin_inset Flex Code
14233 \begin_layout Plain Layout
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14250 \begin_inset Flex Code
14253 \begin_layout Plain Layout
14260 \begin_inset Flex Code
14263 \begin_layout Plain Layout
14270 \begin_inset Flex Code
14273 \begin_layout Plain Layout
14280 \begin_inset Flex Code
14283 \begin_layout Plain Layout
14290 \begin_inset Flex Code
14293 \begin_layout Plain Layout
14300 \begin_inset Flex Code
14303 \begin_layout Plain Layout
14310 \begin_inset Flex Code
14313 \begin_layout Plain Layout
14320 \begin_inset Flex Code
14323 \begin_layout Plain Layout
14330 \begin_inset Flex Code
14333 \begin_layout Plain Layout
14340 \begin_inset Flex Code
14343 \begin_layout Plain Layout
14352 \begin_layout Enumerate
14353 The layout for a Flex inset is being defined.
14355 \begin_inset Flex Code
14358 \begin_layout Plain Layout
14364 must be of the form
14365 \begin_inset Quotes eld
14369 \begin_inset Flex Code
14372 \begin_layout Plain Layout
14379 \begin_inset Quotes erd
14383 \begin_inset Flex Code
14386 \begin_layout Plain Layout
14392 may be be any valid identifier not used by a pre-existing Flex inset.
14393 The identifier may include spaces, but in that case the whole thing must
14394 be wrapped in quotes.
14395 Note that the definition of a flex inset
14400 \begin_inset Flex Code
14403 \begin_layout Plain Layout
14409 entry, declaring which type of inset it defines.
14410 \change_inserted 5863208 1334489312
14414 \begin_layout Enumerate
14416 \change_inserted 5863208 1334492248
14417 The layout for user specific branch is being defined.
14419 \begin_inset Flex Code
14422 \begin_layout Plain Layout
14424 \change_inserted 5863208 1334489384
14430 must be of the form
14431 \begin_inset Quotes eld
14435 \begin_inset Flex Code
14438 \begin_layout Plain Layout
14440 \change_inserted 5863208 1334489392
14447 \begin_inset Quotes erd
14451 \begin_inset Flex Code
14454 \begin_layout Plain Layout
14456 \change_inserted 5863208 1334489384
14462 may be be any valid identifier of branch defined in user's document.
14463 The identifier may include spaces, but in that case the whole thing must
14464 be wrapped in quotes.
14465 The main purpose of this feature is to allow LaTeX wrapping around specific
14466 branches as user needs.
14471 \begin_layout Standard
14473 \begin_inset Flex Code
14476 \begin_layout Plain Layout
14482 definition can contain the following entries:
14485 \begin_layout Description
14487 \change_inserted -195340706 1333913893
14488 \begin_inset Flex Code
14491 \begin_layout Plain Layout
14497 Preamble for changing languages.
14499 \begin_inset space ~
14503 \begin_inset CommandInset ref
14505 reference "sub:I18n"
14512 \begin_layout Description
14513 \begin_inset Flex Code
14516 \begin_layout Plain Layout
14522 The color for the inset's background.
14523 The valid colors are defined in
14524 \begin_inset Flex Code
14527 \begin_layout Plain Layout
14536 \begin_layout Description
14537 \begin_inset Flex Code
14540 \begin_layout Plain Layout
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14559 \begin_inset Flex Code
14562 \begin_layout Plain Layout
14568 ] Whether to use the content of the inset as the label, when the inset is
14573 \begin_layout Description
14574 \begin_inset Flex Code
14577 \begin_layout Plain Layout
14584 \begin_inset Flex Code
14587 \begin_layout Plain Layout
14593 Copies all the features of an existing style into the current one.
14597 \begin_layout Description
14598 \begin_inset Flex Code
14601 \begin_layout Plain Layout
14608 \begin_inset Flex Code
14611 \begin_layout Plain Layout
14620 \begin_inset Flex Code
14623 \begin_layout Plain Layout
14629 ] Indicates whether the user may employ the Paragraph Settings dialog to
14630 customize the paragraph.
14633 \begin_layout Description
14634 \begin_inset Flex Code
14637 \begin_layout Plain Layout
14644 \begin_inset Flex Code
14647 \begin_layout Plain Layout
14654 \begin_inset Flex Code
14657 \begin_layout Plain Layout
14664 \begin_inset Flex Code
14667 \begin_layout Plain Layout
14673 , describing the rendering style used for the inset's frame and buttons.
14674 Footnotes generally use
14675 \begin_inset Flex Code
14678 \begin_layout Plain Layout
14684 , ERT insets generally
14685 \begin_inset Flex Code
14688 \begin_layout Plain Layout
14694 , and character styles
14695 \begin_inset Flex Code
14698 \begin_layout Plain Layout
14707 \begin_layout Description
14708 \begin_inset Flex Code
14711 \begin_layout Plain Layout
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14728 \begin_inset Flex Code
14731 \begin_layout Plain Layout
14740 \begin_inset Flex Code
14743 \begin_layout Plain Layout
14750 \begin_inset Flex Code
14753 \begin_layout Plain Layout
14760 Indicates whether the environment will stand on its own in LaTeX output
14761 or will appear inline with the surrounding text.
14762 If set to false, it is supposed that the LaTeX environment ignores white
14763 space (including one newline character) after the
14764 \begin_inset Flex Code
14767 \begin_layout Plain Layout
14780 \begin_inset Flex Code
14783 \begin_layout Plain Layout
14799 \begin_layout Description
14800 \begin_inset Flex Code
14803 \begin_layout Plain Layout
14809 Required at the end of the InsetLayout declarations.
14812 \begin_layout Description
14813 \begin_inset Flex Code
14816 \begin_layout Plain Layout
14822 The font used for both the text body
14828 \begin_inset space ~
14832 \begin_inset CommandInset ref
14834 reference "sub:Font-description"
14839 Note that defining this font automatically defines the
14840 \begin_inset Flex Code
14843 \begin_layout Plain Layout
14849 to the same value, so define this first and define
14850 \begin_inset Flex Code
14853 \begin_layout Plain Layout
14859 later if you want them to be different.
14862 \begin_layout Description
14863 \begin_inset Flex Code
14866 \begin_layout Plain Layout
14873 \begin_inset Quotes eld
14877 \begin_inset Quotes erd
14880 language, leading to Left-to-Right (latin) output, e.
14881 \begin_inset space \thinspace{}
14885 \begin_inset space \space{}
14888 in TeX code or URL.
14892 \begin_layout Description
14893 \begin_inset Flex Code
14896 \begin_layout Plain Layout
14903 \begin_inset Flex Code
14906 \begin_layout Plain Layout
14915 \begin_inset Flex Code
14918 \begin_layout Plain Layout
14924 ] Indicates whether the
14925 \begin_inset Flex Code
14928 \begin_layout Plain Layout
14934 should be used or, instead, the user can change the paragraph style used
14939 \begin_layout Description
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14950 \begin_inset Flex Code
14953 \begin_layout Plain Layout
14962 \begin_inset Flex Code
14965 \begin_layout Plain Layout
14971 ] Usually LyX doesn't allow you to insert more than one space between words,
14972 since a space is considered as the separation between two words, not a
14973 character or symbol of its own.
14974 This is a very fine thing but sometimes annoying, for example, when typing
14975 program code or plain LaTeX code.
14977 \begin_inset Flex Code
14980 \begin_layout Plain Layout
14987 Note that LyX will create protected blanks for the additional blanks when
14988 in another mode than LaTeX-mode.
14992 \begin_layout Description
14993 \begin_inset Flex Code
14996 \begin_layout Plain Layout
15002 These tags control XHTML output.
15004 \begin_inset CommandInset ref
15006 reference "sec:Tags-for-XHTML"
15013 \begin_layout Description
15014 \begin_inset Flex Code
15017 \begin_layout Plain Layout
15024 \begin_inset Flex Code
15027 \begin_layout Plain Layout
15036 \begin_inset Flex Code
15039 \begin_layout Plain Layout
15045 ] Whether to include the contents of this inset in the strings generated
15046 for the `Outline' pane.
15047 One would not, for example, want the content of a footnote in a section
15048 header to be included in the TOC displayed in the outline, but one would
15049 normally want the content of a character style displayed.
15050 Default is false: not to include.
15053 \begin_layout Description
15054 \begin_inset Flex Code
15057 \begin_layout Plain Layout
15064 \begin_inset Flex Code
15067 \begin_layout Plain Layout
15076 \begin_inset Flex Code
15079 \begin_layout Plain Layout
15085 ] Usually LyX does not allow you to leave a paragraph empty, since it would
15086 lead to empty LaTeX output.
15087 There are some cases where this could be desirable however: in a letter
15088 template, the required fields can be provided as empty fields, so that
15089 people do not forget them; in some special classes, a style can be used
15090 as some kind of break, which does not contain actual text.
15094 \begin_layout Description
15095 \begin_inset Flex Code
15098 \begin_layout Plain Layout
15104 The font used for the label.
15106 \begin_inset space ~
15110 \begin_inset CommandInset ref
15112 reference "sub:Font-description"
15117 Note that this definition can never appear before
15118 \begin_inset Flex Code
15121 \begin_layout Plain Layout
15127 , lest it be ineffective.
15130 \begin_layout Description
15131 \begin_inset Flex Code
15134 \begin_layout Plain Layout
15140 What will be displayed on the button or elsewhere as the inset label.
15142 \begin_inset Flex Code
15145 \begin_layout Plain Layout
15152 \begin_inset Flex Code
15155 \begin_layout Plain Layout
15161 ) modify this label on the fly.
15164 \begin_layout Description
15166 \change_inserted -195340706 1333913893
15167 \begin_inset Flex Code
15170 \begin_layout Plain Layout
15176 Language dependent preamble.
15178 \begin_inset space ~
15182 \begin_inset CommandInset ref
15184 reference "sub:I18n"
15191 \begin_layout Description
15192 \begin_inset Flex Code
15195 \begin_layout Plain Layout
15201 The name of the corresponding LaTeX stuff.
15202 Either the environment or command name.
15205 \begin_layout Description
15206 \begin_inset Flex Code
15209 \begin_layout Plain Layout
15215 The optional parameter for the corresponding
15216 \begin_inset Flex Code
15219 \begin_layout Plain Layout
15225 stuff, including possible bracket pairs like
15226 \begin_inset Flex Code
15229 \begin_layout Plain Layout
15236 This parameter cannot be changed from within LyX.
15239 \begin_layout Description
15240 \begin_inset Flex Code
15243 \begin_layout Plain Layout
15250 \begin_inset Flex Code
15253 \begin_layout Plain Layout
15258 , Command, Environment, Item_Environment,
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15268 List_Environment, Bib_Environment
15273 ] How the style should be translated into LaTeX.
15277 \begin_layout Plain Layout
15278 \begin_inset Flex Code
15281 \begin_layout Plain Layout
15287 is perhaps a bit misleading, since these rules apply to SGML classes, too.
15288 Visit the SGML class files for specific examples.
15297 \begin_layout Itemize
15298 \begin_inset Flex Code
15301 \begin_layout Plain Layout
15307 means nothing special.
15311 \begin_layout Itemize
15312 \begin_inset Flex Code
15315 \begin_layout Plain Layout
15322 \begin_inset Flex Code
15325 \begin_layout Plain Layout
15332 {\SpecialChar \ldots{}
15341 \begin_layout Itemize
15342 \begin_inset Flex Code
15345 \begin_layout Plain Layout
15352 \begin_inset Flex Code
15355 \begin_layout Plain Layout
15362 }\SpecialChar \ldots{}
15378 \begin_layout Itemize
15379 \begin_inset Flex Code
15382 \begin_layout Plain Layout
15389 \begin_inset Flex Code
15392 \begin_layout Plain Layout
15399 \begin_inset Flex Code
15402 \begin_layout Plain Layout
15410 is generated for each paragraph of this environment.
15414 \begin_layout Itemize
15415 \begin_inset Flex Code
15418 \begin_layout Plain Layout
15425 \begin_inset Flex Code
15428 \begin_layout Plain Layout
15435 \begin_inset Flex Code
15438 \begin_layout Plain Layout
15444 is passed as an argument to the environment.
15446 \begin_inset Flex Code
15449 \begin_layout Plain Layout
15455 can be defined in the
15456 \begin_inset Flex MenuItem
15459 \begin_layout Plain Layout
15464 \SpecialChar \menuseparator
15470 \begin_inset space ~
15482 \begin_layout Standard
15483 Putting the last few things together, the LaTeX output will be either:
15486 \begin_layout LyX-Code
15489 latexname[latexparam]{\SpecialChar \ldots{}
15493 \begin_layout Standard
15497 \begin_layout LyX-Code
15500 begin{latexname}[latexparam] \SpecialChar \ldots{}
15506 \begin_layout Standard
15507 depending upon the LaTeX type.
15511 \begin_layout Description
15512 \begin_inset Flex Code
15515 \begin_layout Plain Layout
15522 \begin_inset Flex Code
15525 \begin_layout Plain Layout
15532 \begin_inset Flex Code
15535 \begin_layout Plain Layout
15542 \begin_inset Flex Code
15545 \begin_layout Plain Layout
15552 \begin_inset Flex Code
15555 \begin_layout Plain Layout
15561 (indicating a dummy definition ending definitions of charstyles, etc).
15562 This entry is required in and is only meaningful for Flex insets.
15563 Among other things, it determines on which menu this inset will appear.
15565 \begin_inset Flex Code
15568 \begin_layout Plain Layout
15575 \begin_inset Flex Code
15578 \begin_layout Plain Layout
15585 \begin_inset Flex Code
15588 \begin_layout Plain Layout
15596 \begin_inset Flex Code
15599 \begin_layout Plain Layout
15605 can be set to true for charstyle insets, if you wish, by setting it
15610 \begin_inset Flex Code
15613 \begin_layout Plain Layout
15622 \begin_layout Description
15623 \begin_inset Flex Code
15626 \begin_layout Plain Layout
15633 \begin_inset Flex Code
15636 \begin_layout Plain Layout
15645 \begin_inset Flex Code
15648 \begin_layout Plain Layout
15654 ] Whether multiple paragraphs are permitted in this inset.
15656 \begin_inset Flex Code
15659 \begin_layout Plain Layout
15665 to the same value and
15666 \begin_inset Flex Code
15669 \begin_layout Plain Layout
15675 to the opposite value.
15676 These can be reset to other values, if they are used
15681 \begin_inset Flex Code
15684 \begin_layout Plain Layout
15694 \begin_layout Description
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15717 \begin_inset Flex Code
15720 \begin_layout Plain Layout
15726 ] Whether fragile commands in this inset should be
15727 \begin_inset Flex Code
15730 \begin_layout Plain Layout
15743 whether the command should itself be protected.) Default is false.
15746 \begin_layout Description
15747 \begin_inset Flex Code
15750 \begin_layout Plain Layout
15757 \begin_inset Flex Code
15760 \begin_layout Plain Layout
15769 \begin_inset Flex Code
15772 \begin_layout Plain Layout
15778 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
15779 output, but only by a line break; together with
15780 \begin_inset Flex Code
15783 \begin_layout Plain Layout
15789 , this allows to emulate a plain text editor (like the ERT inset).
15793 \begin_layout Description
15794 \begin_inset Flex Code
15797 \begin_layout Plain Layout
15804 \begin_inset Flex Code
15807 \begin_layout Plain Layout
15816 \begin_inset Flex Code
15819 \begin_layout Plain Layout
15825 ] Whether the contents of this paragraph should be output in raw form, meaning
15826 without special translations that LaTeX would require.
15829 \begin_layout Description
15830 \begin_inset Flex Code
15833 \begin_layout Plain Layout
15839 Information to be included in the LaTeX preamble when this style is used.
15840 Used to define macros, load packages, etc., required by this particular
15843 \begin_inset Quotes eld
15847 \begin_inset Flex Code
15850 \begin_layout Plain Layout
15857 \begin_inset Quotes erd
15863 \begin_layout Description
15864 \begin_inset Flex Code
15867 \begin_layout Plain Layout
15874 \begin_inset Flex Code
15877 \begin_layout Plain Layout
15883 ] The prefix to use when creating labels referring to insets of this type.
15884 This allows the use of formatted references.
15887 \begin_layout Description
15888 \begin_inset Flex Code
15891 \begin_layout Plain Layout
15898 \begin_inset Flex Code
15901 \begin_layout Plain Layout
15907 ] Whether the style requires the feature
15908 \begin_inset Flex Code
15911 \begin_layout Plain Layout
15918 See the description of
15919 \begin_inset Flex Code
15922 \begin_layout Plain Layout
15929 \begin_inset CommandInset ref
15930 LatexCommand pageref
15931 reference "des:FreeSpacing"
15935 ) for information on `features'.
15939 \begin_layout Description
15940 \begin_inset Flex Code
15943 \begin_layout Plain Layout
15950 \begin_inset Flex Code
15953 \begin_layout Plain Layout
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15971 ] Whether this inset should use the font of its surrounding environment
15973 Default is true: uses its own.
15976 \begin_layout Description
15977 \begin_inset Flex Code
15980 \begin_layout Plain Layout
15987 \begin_inset Flex Code
15990 \begin_layout Plain Layout
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16008 ] Spellcheck the contents of this inset.
16012 \begin_layout Subsection
16014 \begin_inset CommandInset label
16016 name "sub:Counters"
16023 \begin_layout Standard
16024 Since version 1.3.0 of LyX, it is both possible and necessary to define the
16026 \begin_inset Flex MenuItem
16029 \begin_layout Plain Layout
16036 \begin_inset Flex MenuItem
16039 \begin_layout Plain Layout
16045 , \SpecialChar \ldots{}
16046 ) in the text class itself.
16047 The standard counters are defined in the file
16048 \begin_inset Flex Code
16051 \begin_layout Plain Layout
16057 , so you may have to do no more than add
16060 \begin_layout LyX-Code
16061 Input stdcounters.inc
16064 \begin_layout Standard
16065 to your layout file to get them to work.
16066 But if you want to define custom counters, then you can do so.
16067 The counter declaration must begin with:
16070 \begin_layout LyX-Code
16071 Counter CounterName
16074 \begin_layout Standard
16076 \begin_inset Flex Code
16079 \begin_layout Plain Layout
16085 ' is replaced by the name of the counter.
16086 And it must end with
16087 \begin_inset Quotes eld
16091 \begin_inset Flex Code
16094 \begin_layout Plain Layout
16101 \begin_inset Quotes erd
16105 The following parameters can also be used:
16108 \begin_layout Description
16109 \begin_inset Flex Code
16112 \begin_layout Plain Layout
16119 \begin_inset Flex Code
16122 \begin_layout Plain Layout
16129 \begin_inset Quotes erd
16133 \begin_inset Quotes erd
16136 ] When defined, this string defines how the counter is displayed.
16137 Setting this value sets
16138 \begin_inset Flex Code
16141 \begin_layout Plain Layout
16142 LabelStringAppendix
16148 The following special constructs can be used in the string:
16152 \begin_layout Itemize
16153 \begin_inset Flex Code
16156 \begin_layout Plain Layout
16164 will be replaced by the expansion of the
16165 \begin_inset Flex Code
16168 \begin_layout Plain Layout
16175 \begin_inset Flex Code
16178 \begin_layout Plain Layout
16179 LabelStringAppendix
16185 \begin_inset Flex Code
16188 \begin_layout Plain Layout
16198 \begin_layout Itemize
16199 counter values can be expressed using LaTeX-like macros
16200 \begin_inset Flex Code
16203 \begin_layout Plain Layout
16220 \begin_inset Flex Code
16223 \begin_layout Plain Layout
16235 \begin_layout Plain Layout
16245 Actually, the situation is a bit more complicated: any
16264 other than those described below will produce arabic numerals.
16265 It would not be surprising to see this change in the future.
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16280 : 1, 2, 3,\SpecialChar \ldots{}
16282 \begin_inset Flex Code
16285 \begin_layout Plain Layout
16291 for lower-case letters: a, b, c, \SpecialChar \ldots{}
16293 \begin_inset Flex Code
16296 \begin_layout Plain Layout
16302 for upper-case letters: A, B, C, \SpecialChar \ldots{}
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16313 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
16315 \begin_inset Flex Code
16318 \begin_layout Plain Layout
16324 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
16326 \begin_inset Flex Code
16329 \begin_layout Plain Layout
16335 for hebrew numerals.
16339 \begin_layout Standard
16340 If LabelString is not defined, a default value is constructed as follows:
16341 if the counter has a master counter
16342 \begin_inset Flex Code
16345 \begin_layout Plain Layout
16352 \begin_inset Flex Code
16355 \begin_layout Plain Layout
16362 \begin_inset Flex Code
16365 \begin_layout Plain Layout
16375 is used; otherwise the string
16376 \begin_inset Flex Code
16379 \begin_layout Plain Layout
16390 \begin_layout Description
16391 \begin_inset Flex Code
16394 \begin_layout Plain Layout
16395 LabelStringAppendix
16401 \begin_inset Flex Code
16404 \begin_layout Plain Layout
16411 \begin_inset Quotes erd
16415 \begin_inset Quotes erd
16419 \begin_inset Flex Code
16422 \begin_layout Plain Layout
16428 , but for use in the Appendix.
16431 \begin_layout Description
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16442 \begin_inset Flex Code
16445 \begin_layout Plain Layout
16452 \begin_inset Quotes erd
16456 \begin_inset Quotes erd
16459 ] A format for use with formatted references to this counter.
16460 For example, one might want to have references to section numbers appear
16462 \begin_inset Quotes eld
16466 \begin_inset Quotes erd
16470 The string should contain
16471 \begin_inset Quotes eld
16475 \begin_inset Quotes erd
16479 This will be replaced by the counter number itself.
16480 So, for sections, it would be: Section ##.
16483 \begin_layout Description
16484 \begin_inset Flex Code
16487 \begin_layout Plain Layout
16494 \begin_inset Flex Code
16497 \begin_layout Plain Layout
16504 \begin_inset Quotes erd
16508 \begin_inset Quotes erd
16511 ] If this is set to the name of another counter, the present counter will
16512 be reset every time the other one is increased.
16514 \begin_inset Flex Code
16517 \begin_layout Plain Layout
16524 \begin_inset Flex Code
16527 \begin_layout Plain Layout
16536 \begin_layout Subsection
16538 \begin_inset CommandInset label
16540 name "sub:Font-description"
16547 \begin_layout Standard
16548 A font description looks like this:
16551 \begin_layout LyX-Code
16561 \begin_layout LyX-Code
16565 \begin_layout LyX-Code
16569 \begin_layout Standard
16570 The following commands are available:
16573 \begin_layout Description
16574 \begin_inset Flex Code
16577 \begin_layout Plain Layout
16584 \begin_inset Flex Code
16587 \begin_layout Plain Layout
16596 \begin_inset Flex Code
16599 \begin_layout Plain Layout
16606 \begin_inset Flex Code
16609 \begin_layout Plain Layout
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16626 \begin_inset Flex Code
16629 \begin_layout Plain Layout
16636 \begin_inset Flex Code
16639 \begin_layout Plain Layout
16646 \begin_inset Flex Code
16649 \begin_layout Plain Layout
16656 \begin_inset Flex Code
16659 \begin_layout Plain Layout
16666 \begin_inset Flex Code
16669 \begin_layout Plain Layout
16678 \begin_layout Description
16679 \begin_inset Flex Code
16682 \begin_layout Plain Layout
16689 \begin_inset Flex Code
16692 \begin_layout Plain Layout
16701 \begin_inset Flex Code
16704 \begin_layout Plain Layout
16711 \begin_inset Flex Code
16714 \begin_layout Plain Layout
16723 \begin_layout Description
16724 \begin_inset Flex Code
16727 \begin_layout Plain Layout
16734 \begin_inset Flex Code
16737 \begin_layout Plain Layout
16743 ] Valid arguments are:
16744 \begin_inset Flex Code
16747 \begin_layout Plain Layout
16754 \begin_inset Flex Code
16757 \begin_layout Plain Layout
16764 \begin_inset Flex Code
16767 \begin_layout Plain Layout
16774 \begin_inset Flex Code
16777 \begin_layout Plain Layout
16784 \begin_inset Flex Code
16787 \begin_layout Plain Layout
16794 \begin_inset Flex Code
16797 \begin_layout Plain Layout
16804 \begin_inset Flex Code
16807 \begin_layout Plain Layout
16814 \begin_inset Flex Code
16817 \begin_layout Plain Layout
16824 \begin_inset Flex Code
16827 \begin_layout Plain Layout
16834 \begin_inset Flex Code
16837 \begin_layout Plain Layout
16844 \begin_inset Flex Code
16847 \begin_layout Plain Layout
16854 \begin_inset Flex Code
16857 \begin_layout Plain Layout
16864 Each of these turns on or off the corresponding attribute.
16866 \begin_inset Flex Code
16869 \begin_layout Plain Layout
16875 turns on emphasis, and
16876 \begin_inset Flex Code
16879 \begin_layout Plain Layout
16887 \begin_inset Newline newline
16890 If the latter seems puzzling, remember that the font settings for the present
16891 context are generally inherited from the surrounding context.
16893 \begin_inset Flex Code
16896 \begin_layout Plain Layout
16902 would turn off the emphasis that was anyway in effect, say, in a theorem
16906 \begin_layout Description
16907 \begin_inset Flex Code
16910 \begin_layout Plain Layout
16917 \begin_inset Flex Code
16920 \begin_layout Plain Layout
16929 \begin_inset Flex Code
16932 \begin_layout Plain Layout
16941 \begin_layout Description
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16952 \begin_inset Flex Code
16955 \begin_layout Plain Layout
16964 \begin_inset Flex Code
16967 \begin_layout Plain Layout
16974 \begin_inset Flex Code
16977 \begin_layout Plain Layout
16984 \begin_inset Flex Code
16987 \begin_layout Plain Layout
16996 \begin_layout Description
16997 \begin_inset Flex Code
17000 \begin_layout Plain Layout
17007 \begin_inset Flex Code
17010 \begin_layout Plain Layout
17017 \begin_inset Flex Code
17020 \begin_layout Plain Layout
17027 \begin_inset Flex Code
17030 \begin_layout Plain Layout
17039 \begin_inset Flex Code
17042 \begin_layout Plain Layout
17049 \begin_inset Flex Code
17052 \begin_layout Plain Layout
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17069 \begin_inset Flex Code
17072 \begin_layout Plain Layout
17079 \begin_inset Flex Code
17082 \begin_layout Plain Layout
17091 \begin_layout Subsection
17092 \begin_inset CommandInset label
17094 name "sub:Citation-format-description"
17098 Citation format description
17101 \begin_layout Standard
17103 \begin_inset Flex Code
17106 \begin_layout Plain Layout
17112 blocks are used to describe how bibliographic information should be displayed,
17113 both within LyX itself (in the citation dialog and in tooltips, for example)
17114 and in XHTML output.
17115 Such a block might look like this:
17118 \begin_layout LyX-Code
17122 \begin_layout LyX-Code
17126 \begin_layout LyX-Code
17130 \begin_layout LyX-Code
17134 \begin_layout Standard
17135 The individual lines define how the bibliographic information associated
17136 with an article or book, respectively, is to be displayed, and such a definitio
17137 n can be given for any `entry type' that might be present in a BibTeX file.
17138 LyX defines a default format in the source code that will be used if no
17139 specific definition has been given.
17140 LyX predefines several formats in the file
17141 \begin_inset Flex Code
17144 \begin_layout Plain Layout
17150 , which is included in most of LyX's document classes.
17153 \begin_layout Standard
17154 The definitions use a simple language that allows BibTeX keys to be replaced
17156 Keys should be enclosed in
17157 \begin_inset Flex Code
17160 \begin_layout Plain Layout
17167 \begin_inset Flex Code
17170 \begin_layout Plain Layout
17177 So a simple definition might look like this:
17180 \begin_layout LyX-Code
17182 \begin_inset Quotes eld
17186 \begin_inset Quotes erd
17192 \begin_layout Standard
17193 This would print the author, followed by a comma, followed by the title,
17194 in quotes, followed by a period.
17197 \begin_layout Standard
17198 Of course, sometimes you may want to print a key only if it exists.
17199 This can be done by using a conditional construction, such as:
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17205 \begin_inset space ~
17215 \begin_inset Flex Code
17218 \begin_layout Plain Layout
17224 key exists, then print
17225 \begin_inset Quotes eld
17229 \begin_inset space ~
17233 \begin_inset Quotes erd
17236 followed by the volume key.
17237 It is also possible to have an else clause in the conditional, such as:
17239 \begin_inset Flex Code
17242 \begin_layout Plain Layout
17243 {%author%[[%author%]][[%editor%, ed.]]}
17250 \begin_inset Flex Code
17253 \begin_layout Plain Layout
17259 key is printed if it exists; otherwise, the editor key is printed, followed
17261 \begin_inset Quotes eld
17265 \begin_inset space ~
17269 \begin_inset Quotes erd
17272 Note that the key is again enclosed in
17273 \begin_inset Flex Code
17276 \begin_layout Plain Layout
17282 signs; the entire conditional is enclosed in braces; and the if and else
17283 clauses are enclosed in double brackets,
17284 \begin_inset Quotes eld
17288 \begin_inset Flex Code
17291 \begin_layout Plain Layout
17298 \begin_inset Quotes eld
17302 \begin_inset Quotes eld
17306 \begin_inset Flex Code
17309 \begin_layout Plain Layout
17316 \begin_inset Quotes erd
17320 There must be no space between any of these.
17323 \begin_layout Standard
17324 There is one other piece of syntax available in definitions, which looks
17326 \begin_inset Flex Code
17329 \begin_layout Plain Layout
17336 This defines a piece of formatting information that is to be used when
17338 \begin_inset Quotes eld
17342 \begin_inset Quotes erd
17346 Obviously, we do not want to output HTML tags when writing plain text,
17347 so they should be wrapped in
17348 \begin_inset Quotes eld
17352 \begin_inset Quotes erd
17356 \begin_inset Quotes eld
17360 \begin_inset Quotes erd
17366 \begin_layout Standard
17367 Two special sorts of definitions are also possible in a
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17378 An example of the first would be:
17381 \begin_layout LyX-Code
17383 \begin_inset Quotes eld
17387 \begin_inset Quotes erd
17393 \begin_layout Standard
17394 This is an abbreviation, or macro, and it can be used by treating it as
17396 \begin_inset Flex Code
17399 \begin_layout Plain Layout
17407 \begin_inset Flex Code
17410 \begin_layout Plain Layout
17416 exactly as it would treat its definition.
17417 So, let us issue the obvious
17425 \begin_layout LyX-Code
17429 \begin_layout Standard
17430 or anything like it.
17431 LyX shouldn't go into an infinite loop, but it may go into a long one before
17435 \begin_layout Standard
17436 The second sort of special definition might look like this:
17439 \begin_layout LyX-Code
17443 \begin_layout Standard
17444 This defines a translatable piece of text, which allows relevant parts of
17445 the bibliography to be translated.
17446 It can be included in a definition by treating it as a key:
17447 \begin_inset Flex Code
17450 \begin_layout Plain Layout
17457 Several of these are predefined in
17458 \begin_inset Flex Code
17461 \begin_layout Plain Layout
17468 Note that these are not macros, in the sense just defined.
17469 They will not be expanded.
17472 \begin_layout Standard
17473 So here then is an example that use all these features:
17476 \begin_layout LyX-Code
17477 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
17480 \begin_layout Standard
17481 This defines a macro that prints the author, followed by a comma, if the
17483 \begin_inset Flex Code
17486 \begin_layout Plain Layout
17492 key is defined, or else prints the name of the editor, followed by the
17494 \begin_inset Flex Code
17497 \begin_layout Plain Layout
17503 or its translation (it is by default
17504 \begin_inset Quotes eld
17508 \begin_inset Quotes erd
17512 \begin_inset Flex Code
17515 \begin_layout Plain Layout
17522 Note that this is in fact defined in
17523 \begin_inset Flex Code
17526 \begin_layout Plain Layout
17532 , so you can use it in your own definitions, or re-definitions, if you load
17536 \begin_layout Section
17537 \begin_inset CommandInset label
17539 name "sec:Tags-for-XHTML"
17543 Tags for XHTML output
17546 \begin_layout Standard
17547 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
17548 by layout information.
17549 In general, LyX provides sensible defaults and, as mentioned earlier, it
17550 will even construct default CSS style rules from the other layout tags.
17551 For example, LyX will attempt to use the information provided in the
17552 \begin_inset Flex Code
17555 \begin_layout Plain Layout
17561 declaration for the Chapter style to write CSS that will appropriately
17562 format chapter headings.
17565 \begin_layout Standard
17566 In many cases, then, you may not have to do anything at all to get acceptable
17567 XHTML output for your own environments, custom insets, and so forth.
17568 But in some cases you will, and so LyX provides a number of layout tags
17569 that can be used to customize the XHTML and CSS that are generated.
17572 \begin_layout Standard
17573 Note that there are two tags,
17574 \begin_inset Flex Code
17577 \begin_layout Plain Layout
17584 \begin_inset Flex Code
17587 \begin_layout Plain Layout
17593 that may appear outside style and inset declarations.
17595 \begin_inset CommandInset ref
17597 reference "sub:General-text-class"
17601 for details on these.
17604 \begin_layout Subsection
17605 \begin_inset CommandInset label
17607 name "sub:Paragraph-Style-XHTML"
17614 \begin_layout Standard
17615 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
17616 dealing with a normal paragraph, a command, or an environment, where this
17617 is itself determined by the contents of the corresponding
17618 \begin_inset Flex Code
17621 \begin_layout Plain Layout
17631 \begin_layout Standard
17632 For a command or normal paragraph, the output XHTML has the following form:
17635 \begin_layout LyX-Code
17637 \begin_inset Quotes erd
17641 \begin_inset Quotes erd
17647 \begin_layout LyX-Code
17649 \begin_inset Quotes erd
17653 \begin_inset Quotes erd
17659 \begin_layout LyX-Code
17660 Contents of the paragraph.
17663 \begin_layout LyX-Code
17667 \begin_layout Standard
17668 The label tags are of course omitted if the paragraph does not have a label.
17671 \begin_layout Standard
17672 For an environment that is not some sort of list, the XHTML takes this form:
17675 \begin_layout LyX-Code
17677 \begin_inset Quotes erd
17681 \begin_inset Quotes erd
17687 \begin_layout LyX-Code
17689 \begin_inset Quotes erd
17693 \begin_inset Quotes erd
17697 \begin_inset Quotes erd
17701 \begin_inset Quotes erd
17704 >Environment Label</labeltag>First paragraph.</itemtag>
17707 \begin_layout LyX-Code
17708 <itemtag>Second paragraph.</itemtag>
17711 \begin_layout LyX-Code
17715 \begin_layout Standard
17716 Note that the label is output only for the first paragraph, as it should
17717 be for a theorem, for example.
17721 \begin_layout Standard
17722 For a list, we have one of these forms:
17725 \begin_layout LyX-Code
17727 \begin_inset Quotes erd
17731 \begin_inset Quotes erd
17737 \begin_layout LyX-Code
17739 \begin_inset Quotes erd
17743 \begin_inset Quotes erd
17747 \begin_inset Quotes erd
17751 \begin_inset Quotes erd
17754 >List Label</labeltag>First item.</itemtag>
17757 \begin_layout LyX-Code
17759 \begin_inset Quotes erd
17763 \begin_inset Quotes erd
17767 \begin_inset Quotes erd
17771 \begin_inset Quotes erd
17774 >List Label</labeltag>Second item.</itemtag>
17777 \begin_layout LyX-Code
17781 \begin_layout LyX-Code
17785 \begin_layout LyX-Code
17787 \begin_inset Quotes erd
17791 \begin_inset Quotes erd
17797 \begin_layout LyX-Code
17799 \begin_inset Quotes erd
17803 \begin_inset Quotes erd
17806 >List Label</labeltag><itemtag attr=
17807 \begin_inset Quotes erd
17811 \begin_inset Quotes erd
17814 >First item.</itemtag>
17817 \begin_layout LyX-Code
17819 \begin_inset Quotes erd
17823 \begin_inset Quotes erd
17826 >List Label</labeltag><itemtag attr=
17827 \begin_inset Quotes erd
17831 \begin_inset Quotes erd
17834 >Second item.</itemtag>
17837 \begin_layout LyX-Code
17841 \begin_layout Standard
17842 Note the different orders of
17843 \begin_inset Flex Code
17846 \begin_layout Plain Layout
17853 \begin_inset Flex Code
17856 \begin_layout Plain Layout
17863 Which order we get depends upon the setting of
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17874 \begin_inset Flex Code
17877 \begin_layout Plain Layout
17883 is false (the default), you get the first of these, with the label within
17884 the item; if true, you get the second, with the label outside the item.
17887 \begin_layout Standard
17888 The specific tags and attributes output for each paragraph type can be controlle
17889 d by means of the layout tags we are about to describe.
17890 As mentioned earlier, however, LyX uses sensible defaults for many of these,
17891 so you often may not need to do very much to get good XHTML output.
17892 Think of the available tags as there so you can tweak things to your liking.
17895 \begin_layout Description
17896 \begin_inset Flex Code
17899 \begin_layout Plain Layout
17906 \begin_inset Flex Code
17909 \begin_layout Plain Layout
17915 ] Specifies attribute information to be output with the main tag.
17917 \begin_inset Quotes eld
17921 \begin_inset Flex Code
17924 \begin_layout Plain Layout
17931 \begin_inset Quotes erd
17935 By default, LyX will output
17936 \begin_inset Quotes eld
17940 \begin_inset Flex Code
17943 \begin_layout Plain Layout
17950 \begin_inset Quotes erd
17954 \begin_inset Flex Code
17957 \begin_layout Plain Layout
17963 is the LyX name of the layout, made lowercase, for example: chapter.
17968 contain any style information.
17970 \begin_inset Flex Code
17973 \begin_layout Plain Layout
17982 \begin_layout Description
17983 \begin_inset Flex Code
17986 \begin_layout Plain Layout
17993 \begin_inset Flex Code
17996 \begin_layout Plain Layout
18006 ] Whether to output the default CSS information LyX generates for this layout,
18007 even if additional information is explicitly provided via
18008 \begin_inset Flex Code
18011 \begin_layout Plain Layout
18019 \begin_inset Flex Code
18022 \begin_layout Plain Layout
18028 allows you to alter or augment the generated CSS, rather than to override
18031 \begin_inset Flex Code
18034 \begin_layout Plain Layout
18043 \begin_layout Description
18044 \begin_inset Flex Code
18047 \begin_layout Plain Layout
18054 \begin_inset Flex Code
18057 \begin_layout Plain Layout
18063 ] The tag to be used for individual paragraphs of environments, replacing
18065 \begin_inset Flex Code
18068 \begin_layout Plain Layout
18074 in the examples above.
18076 \begin_inset Flex Code
18079 \begin_layout Plain Layout
18088 \begin_layout Description
18089 \begin_inset Flex Code
18092 \begin_layout Plain Layout
18099 \begin_inset Flex Code
18102 \begin_layout Plain Layout
18108 ] Attributes for the item tag.
18110 \begin_inset Quotes eld
18114 \begin_inset Flex Code
18117 \begin_layout Plain Layout
18118 class=`layoutname_item'
18124 \begin_inset Quotes erd
18132 contain any style information.
18134 \begin_inset Flex Code
18137 \begin_layout Plain Layout
18146 \begin_layout Description
18147 \begin_inset Flex Code
18150 \begin_layout Plain Layout
18157 \begin_inset Flex Code
18160 \begin_layout Plain Layout
18166 ] The tag to be used for paragraph and item labels, replacing
18167 \begin_inset Flex Code
18170 \begin_layout Plain Layout
18176 in the examples above.
18178 \begin_inset Flex Code
18181 \begin_layout Plain Layout
18188 \begin_inset Flex Code
18191 \begin_layout Plain Layout
18198 \begin_inset Flex Code
18201 \begin_layout Plain Layout
18208 \begin_inset Flex Code
18211 \begin_layout Plain Layout
18212 Centered_Top_Environment
18217 , in which case it defaults to
18218 \begin_inset Flex Code
18221 \begin_layout Plain Layout
18230 \begin_layout Description
18231 \begin_inset Flex Code
18234 \begin_layout Plain Layout
18241 \begin_inset Flex Code
18244 \begin_layout Plain Layout
18250 ] Attributes for the label tag.
18252 \begin_inset Quotes eld
18256 \begin_inset Flex Code
18259 \begin_layout Plain Layout
18260 class=`layoutname_label'
18266 \begin_inset Quotes erd
18274 contain any style information.
18276 \begin_inset Flex Code
18279 \begin_layout Plain Layout
18288 \begin_layout Description
18289 \begin_inset Flex Code
18292 \begin_layout Plain Layout
18299 \begin_inset Flex Code
18302 \begin_layout Plain Layout
18312 ] Meaningful only for list-like environments, this tag controls whether
18313 the label tag is output before or inside the item tag.
18314 This is used, for example, in the description environment, where we want
18316 \begin_inset Flex Code
18319 \begin_layout Plain Layout
18320 <dt>\SpecialChar \ldots{}
18321 </dt><dd>\SpecialChar \ldots{}
18329 \begin_inset Flex Code
18332 \begin_layout Plain Layout
18338 : The label tag is output inside the item tag.
18341 \begin_layout Description
18342 \begin_inset Flex Code
18345 \begin_layout Plain Layout
18351 Information to be output in the
18352 \begin_inset Flex Code
18355 \begin_layout Plain Layout
18361 section when this style is used.
18362 This might, for example, be used to include a
18363 \begin_inset Flex Code
18366 \begin_layout Plain Layout
18373 \begin_inset Flex Code
18376 \begin_layout Plain Layout
18385 \begin_layout Description
18386 \begin_inset Flex Code
18389 \begin_layout Plain Layout
18395 CSS style information to be included when this style is used.
18396 Note that this will automatically be wrapped in a layout-generated
18397 \begin_inset Flex Code
18400 \begin_layout Plain Layout
18406 block, so only the CSS itself need be included.
18409 \begin_layout Description
18410 \begin_inset Flex Code
18413 \begin_layout Plain Layout
18420 \begin_inset Flex Code
18423 \begin_layout Plain Layout
18429 ] The tag to be used for the main label, replacing
18430 \begin_inset Flex Code
18433 \begin_layout Plain Layout
18439 in the examples above.
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18453 \begin_layout Description
18454 \begin_inset Flex Code
18457 \begin_layout Plain Layout
18464 \begin_inset Flex Code
18467 \begin_layout Plain Layout
18477 ] Marks this style as the one to be used to generate the
18478 \begin_inset Flex Code
18481 \begin_layout Plain Layout
18487 tag for the XHTML file.
18488 By default, it is false.
18490 \begin_inset Flex Code
18493 \begin_layout Plain Layout
18499 file sets it to true for the
18500 \begin_inset Flex Code
18503 \begin_layout Plain Layout
18513 \begin_layout Subsection
18517 \begin_layout Standard
18518 The XHTML output of insets can also be controlled by information in layout
18523 \begin_layout Plain Layout
18524 At present, this is true only for
18525 \begin_inset Quotes eld
18529 \begin_inset Quotes erd
18532 insets (insets you can type into) and is not true for
18533 \begin_inset Quotes eld
18537 \begin_inset Quotes erd
18540 insets (insets that are associated with dialog boxes).
18545 Here, too, LyX tries to provide sensible defaults, and it constructs default
18547 But everything can be customized.
18550 \begin_layout Standard
18551 The XHTML LyX outputs for an inset has the following form:
18554 \begin_layout LyX-Code
18556 \begin_inset Quotes erd
18560 \begin_inset Quotes erd
18566 \begin_layout LyX-Code
18567 <labeltag>Label</labeltag>
18570 \begin_layout LyX-Code
18572 \begin_inset Quotes erd
18576 \begin_inset Quotes erd
18579 >Contents of the inset.</innertag>
18582 \begin_layout LyX-Code
18586 \begin_layout Standard
18587 If the inset permits multiple paragraphs---that is, if
18588 \begin_inset Flex Code
18591 \begin_layout Plain Layout
18597 is true---then the contents of the inset will itself be output as paragraphs
18598 formatted according to the styles used for those paragraphs (standard,
18599 quote, and the like).
18600 The label tag is of course omitted if the paragraph does not have a label
18601 and, at present, is always
18602 \begin_inset Flex Code
18605 \begin_layout Plain Layout
18612 The inner tag is optional and, by default, does not appear.
18615 \begin_layout Standard
18616 The specific tags and attributes output for each inset can be controlled
18617 by means of the following layout tags.
18620 \begin_layout Description
18621 \begin_inset Flex Code
18624 \begin_layout Plain Layout
18631 \begin_inset Flex Code
18634 \begin_layout Plain Layout
18640 ] Specifies attribute information to be output with the main tag.
18642 \begin_inset Quotes eld
18646 \begin_inset Flex Code
18649 \begin_layout Plain Layout
18650 class=`myinset' onclick=`\SpecialChar \ldots{}
18657 \begin_inset Quotes erd
18661 By default, LyX will output
18662 \begin_inset Quotes eld
18666 \begin_inset Flex Code
18669 \begin_layout Plain Layout
18676 \begin_inset Quotes erd
18680 \begin_inset Flex Code
18683 \begin_layout Plain Layout
18689 is the LyX name of the inset, made lowercase and with non-alphanumeric
18690 characters converted to underscores, for example: footnote.
18693 \begin_layout Description
18694 \begin_inset Flex Code
18697 \begin_layout Plain Layout
18704 \begin_inset Flex Code
18707 \begin_layout Plain Layout
18717 ] Whether to output the default CSS information LyX generates for this layout,
18718 even if additional information is explicitly provided via
18719 \begin_inset Flex Code
18722 \begin_layout Plain Layout
18730 \begin_inset Flex Code
18733 \begin_layout Plain Layout
18739 allows you to alter or augment the generated CSS, rather than to override
18744 \begin_layout Description
18745 \begin_inset Flex Code
18748 \begin_layout Plain Layout
18755 \begin_inset Flex Code
18758 \begin_layout Plain Layout
18764 ] Attributes for the inner tag.
18766 \begin_inset Quotes eld
18770 \begin_inset Flex Code
18773 \begin_layout Plain Layout
18774 class=`insetname_inner'
18780 \begin_inset Quotes erd
18786 \begin_layout Description
18787 \begin_inset Flex Code
18790 \begin_layout Plain Layout
18797 \begin_inset Flex Code
18800 \begin_layout Plain Layout
18806 ] The inner tag, replacing
18807 \begin_inset Flex Code
18810 \begin_layout Plain Layout
18816 in the examples above.
18817 By default, there is none.
18820 \begin_layout Description
18821 \begin_inset Flex Code
18824 \begin_layout Plain Layout
18831 \begin_inset Flex Code
18834 \begin_layout Plain Layout
18842 ] Whether this inset represents a standalone block of text (such as a footnote)
18843 or instead represents material that is included in the surrounding text
18844 (such as a branch).
18848 \begin_layout Description
18849 \begin_inset Flex Code
18852 \begin_layout Plain Layout
18859 \begin_inset Flex Code
18862 \begin_layout Plain Layout
18868 ] A label for this inset, possibly including a reference to a counter.
18869 For example, for footnote, it might be:
18870 \begin_inset Flex Code
18873 \begin_layout Plain Layout
18882 This is optional, and there is no default.
18885 \begin_layout Description
18886 \begin_inset Flex Code
18889 \begin_layout Plain Layout
18895 Information to be output in the
18896 \begin_inset Flex Code
18899 \begin_layout Plain Layout
18905 section when this style is used.
18906 This might, for example, be used to include a
18907 \begin_inset Flex Code
18910 \begin_layout Plain Layout
18917 \begin_inset Flex Code
18920 \begin_layout Plain Layout
18929 \begin_layout Description
18930 \begin_inset Flex Code
18933 \begin_layout Plain Layout
18939 CSS style information to be included when this style is used.
18940 Note that this will automatically be wrapped in a layout-generated
18941 \begin_inset Flex Code
18944 \begin_layout Plain Layout
18950 block, so only the CSS itself need be included.
18953 \begin_layout Description
18954 \begin_inset Flex Code
18957 \begin_layout Plain Layout
18964 \begin_inset Flex Code
18967 \begin_layout Plain Layout
18973 ] The tag to be used for the main label, replacing
18974 \begin_inset Flex Code
18977 \begin_layout Plain Layout
18983 in the examples above.
18984 The default depends upon the setting of
18985 \begin_inset Flex Code
18988 \begin_layout Plain Layout
18995 \begin_inset Flex Code
18998 \begin_layout Plain Layout
19004 is true, the default is
19005 \begin_inset Flex Code
19008 \begin_layout Plain Layout
19014 ; if it is false, the default is
19015 \begin_inset Flex Code
19018 \begin_layout Plain Layout
19027 \begin_layout Subsection
19031 \begin_layout Standard
19032 The XHTML output for floats too can be controlled by layout information.
19033 The output has the following form:
19036 \begin_layout LyX-Code
19038 \begin_inset Quotes erd
19042 \begin_inset Quotes erd
19048 \begin_layout LyX-Code
19049 Contents of the float.
19052 \begin_layout LyX-Code
19056 \begin_layout Standard
19057 The caption, if there is one, is a separate inset and will be output as
19059 Its appearance can be controlled via the InsetLayout for caption insets.
19063 \begin_layout Description
19064 \begin_inset Flex Code
19067 \begin_layout Plain Layout
19074 \begin_inset Flex Code
19077 \begin_layout Plain Layout
19083 ] Specifies attribute information to be output with the main tag.
19085 \begin_inset Quotes eld
19089 \begin_inset Flex Code
19092 \begin_layout Plain Layout
19093 class=`myfloat' onclick=`\SpecialChar \ldots{}
19100 \begin_inset Quotes erd
19104 By default, LyX will output
19105 \begin_inset Quotes eld
19109 \begin_inset Flex Code
19112 \begin_layout Plain Layout
19113 class=`float float-floattype'
19119 \begin_inset Quotes erd
19123 \begin_inset Flex Code
19126 \begin_layout Plain Layout
19132 is LyX's name for this type of float, as determined by the float declaration
19134 \begin_inset CommandInset ref
19136 reference "sub:Floats"
19140 ), though made lowercase and with non-alphanumeric characters converted
19141 to underscores, for example: float-table.
19144 \begin_layout Description
19145 \begin_inset Flex Code
19148 \begin_layout Plain Layout
19154 CSS style information to be included when this float is used.
19155 Note that this will automatically be wrapped in a layout-generated
19156 \begin_inset Flex Code
19159 \begin_layout Plain Layout
19165 block, so only the CSS itself need be included.
19168 \begin_layout Description
19169 \begin_inset Flex Code
19172 \begin_layout Plain Layout
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19188 ] The tag to be used for this float, replacing
19189 \begin_inset Quotes eld
19193 \begin_inset Flex Code
19196 \begin_layout Plain Layout
19203 \begin_inset Quotes erd
19206 in the example above.
19208 \begin_inset Flex Code
19211 \begin_layout Plain Layout
19217 and will rarely need changing.
19220 \begin_layout Subsection
19221 Bibliography formatting
19224 \begin_layout Standard
19225 The bibliography can be formatted using
19226 \begin_inset Flex Code
19229 \begin_layout Plain Layout
19237 \begin_inset CommandInset ref
19239 reference "sub:Citation-format-description"
19246 \begin_layout Subsection
19250 \begin_layout Standard
19251 We have several times mentioned that LyX will generate default CSS style
19252 rules for both insets and paragraph styles, based upon the other layout
19253 information that is provided.
19254 In this section, we shall say a word about which layout information LyX
19258 \begin_layout Standard
19259 At present, LyX auto-generates CSS only for font information, making use
19261 \begin_inset Flex Code
19264 \begin_layout Plain Layout
19271 \begin_inset Flex Code
19274 \begin_layout Plain Layout
19281 \begin_inset Flex Code
19284 \begin_layout Plain Layout
19291 \begin_inset Flex Code
19294 \begin_layout Plain Layout
19301 \begin_inset Flex Code
19304 \begin_layout Plain Layout
19312 \begin_inset CommandInset ref
19314 reference "sub:Font-description"
19318 .) The translation is mostly straightforward and obvious.
19320 \begin_inset Quotes eld
19324 \begin_inset Flex Code
19327 \begin_layout Plain Layout
19334 \begin_inset Quotes erd
19338 \begin_inset Quotes eld
19342 \begin_inset Flex Code
19345 \begin_layout Plain Layout
19346 font-family: sans-serif;
19352 \begin_inset Quotes erd
19356 The correspondence of LyX sizes and CSS sizes is a little less obvious
19357 but nonetheless intuitive.
19359 \begin_inset Flex Code
19362 \begin_layout Plain Layout
19369 \begin_inset Flex URL
19372 \begin_layout Plain Layout
19382 \begin_layout Chapter
19383 Including External Material
19386 \begin_layout Standard
19387 \begin_inset Box Shadowbox
19397 height_special "totalheight"
19400 \begin_layout Plain Layout
19401 WARNING: This portion of the documentation has not been updated for some
19403 We certainly hope that it is still accurate, but there are no guarantees.
19411 \begin_layout Standard
19412 The use of material from sources external to LyX is covered in detail in
19418 This part of the manual covers what needs to happen behind the scenes for
19419 new sorts of material to be included.
19422 \begin_layout Section
19426 \begin_layout Standard
19427 The external material feature is based on the concept of a
19432 A template is a specification of how LyX should interface with a certain
19434 As bundled, LyX comes with predefined templates for Xfig figures, various
19435 raster format images, chess diagrams, and LilyPond music notation.
19436 You can check the actual list by using the menu
19437 \begin_inset Flex MenuItem
19440 \begin_layout Plain Layout
19441 Insert\SpecialChar \menuseparator
19442 File\SpecialChar \menuseparator
19449 Furthermore, it is possible to roll your own template to support a specific
19451 Later we'll describe in more detail what is involved, and hopefully you
19452 will submit all the templates you create so we can include them in a later
19456 \begin_layout Standard
19457 Another basic idea of the external material feature is to distinguish between
19458 the original file that serves as a base for final material and the produced
19459 file that is included in your exported or printed document.
19460 For example, consider the case of a figure produced with
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19471 The Xfig application itself works on an original file with the
19472 \begin_inset Flex Code
19475 \begin_layout Plain Layout
19482 Within Xfig, you create and change your figure, and when you are done,
19484 \begin_inset Flex Code
19487 \begin_layout Plain Layout
19494 When you want to include the figure in your document, you invoke
19495 \begin_inset Flex Code
19498 \begin_layout Plain Layout
19504 in order to create a PostScript file that can readily be included in your
19507 \begin_inset Flex Code
19510 \begin_layout Plain Layout
19516 file is the original file, and the PostScript file is the produced file.
19519 \begin_layout Standard
19520 This distinction is important in order to allow updating of the material
19521 while you are in the process of writing the document.
19522 Furthermore, it provides us with the flexibility that is needed to support
19523 multiple export formats.
19524 For instance, in the case of a plain text file, it is not exactly an award-winn
19525 ing idea to include the figure as raw PostScript.
19526 Instead, you would either prefer to just include a reference to the figure
19527 or try to invoke some graphics to ASCII converter to make the final result
19528 look similar to the real graphics.
19529 The external material management allows you to do this, because it is parametri
19530 zed on the different export formats that LyX supports.
19533 \begin_layout Standard
19534 Besides supporting the production of different products according to the
19535 exported format, it supports tight integration with editing and viewing
19537 In the case of an Xfig figure, you are able to invoke Xfig on the original
19538 file with a single click from within the external material dialog in LyX,
19539 and also preview the produced PostScript file with Ghostview with another
19541 No more fiddling around with the command line and/or file browsers to locate
19542 and manipulate the original or produced files.
19543 In this way, you are finally able to take full advantage of the many different
19544 applications that are relevant to use when you write your documents, and
19545 ultimately be more productive.
19548 \begin_layout Section
19549 The external template configuration file
19552 \begin_layout Standard
19553 It is relatively easy to add custom external template definitions to LyX.
19554 However, be aware that doing this in an careless manner most probably
19558 introduce an easily exploitable security hole.
19559 So before you do this, please read the discussion about security in section
19561 \begin_inset CommandInset ref
19563 reference "sec:Security-discussion"
19570 \begin_layout Standard
19571 Having said that, we encourage you to submit any interesting templates that
19576 \begin_layout Standard
19577 The external templates are defined in the
19578 \begin_inset Flex Code
19581 \begin_layout Plain Layout
19582 LyXDir/lib/external_templates
19588 You can place your own version in
19589 \begin_inset Flex Code
19592 \begin_layout Plain Layout
19593 UserDir/external_templates
19601 \begin_layout Standard
19602 A typical template looks like this:
19605 \begin_layout LyX-Code
19609 \begin_layout LyX-Code
19610 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
19613 \begin_layout LyX-Code
19617 \begin_layout LyX-Code
19621 \begin_layout LyX-Code
19625 \begin_layout LyX-Code
19629 \begin_layout LyX-Code
19633 \begin_layout LyX-Code
19634 AutomaticProduction true
19637 \begin_layout LyX-Code
19641 \begin_layout LyX-Code
19645 \begin_layout LyX-Code
19649 \begin_layout LyX-Code
19650 TransformCommand Rotate RotationLatexCommand
19653 \begin_layout LyX-Code
19654 TransformCommand Resize ResizeLatexCommand
19657 \begin_layout LyX-Code
19658 Product "$$RotateFront$$ResizeFront
19661 \begin_layout LyX-Code
19666 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
19669 \begin_layout LyX-Code
19670 $$ResizeBack$$RotateBack"
19673 \begin_layout LyX-Code
19677 \begin_layout LyX-Code
19678 UpdateResult "$$AbsPath$$Basename.pstex_t"
19681 \begin_layout LyX-Code
19682 Requirement "graphicx"
19685 \begin_layout LyX-Code
19686 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
19689 \begin_layout LyX-Code
19690 ReferencedFile latex "$$AbsPath$$Basename.eps"
19693 \begin_layout LyX-Code
19694 ReferencedFile dvi "$$AbsPath$$Basename.eps"
19697 \begin_layout LyX-Code
19701 \begin_layout LyX-Code
19705 \begin_layout LyX-Code
19706 TransformCommand Rotate RotationLatexCommand
19709 \begin_layout LyX-Code
19710 TransformCommand Resize ResizeLatexCommand
19713 \begin_layout LyX-Code
19714 Product "$$RotateFront$$ResizeFront
19717 \begin_layout LyX-Code
19722 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
19725 \begin_layout LyX-Code
19726 $$ResizeBack$$RotateBack"
19729 \begin_layout LyX-Code
19730 UpdateFormat pdftex
19733 \begin_layout LyX-Code
19734 UpdateResult "$$AbsPath$$Basename.pdftex_t"
19737 \begin_layout LyX-Code
19738 Requirement "graphicx"
19741 \begin_layout LyX-Code
19742 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
19745 \begin_layout LyX-Code
19746 ReferencedFile latex "$$AbsPath$$Basename.pdf"
19749 \begin_layout LyX-Code
19753 \begin_layout LyX-Code
19757 \begin_layout LyX-Code
19758 Product "$$Contents(
19760 "$$AbsPath$$Basename.asc
19765 \begin_layout LyX-Code
19766 UpdateFormat asciixfig
19769 \begin_layout LyX-Code
19770 UpdateResult "$$AbsPath$$Basename.asc"
19773 \begin_layout LyX-Code
19777 \begin_layout LyX-Code
19781 \begin_layout LyX-Code
19782 Product "<graphic fileref=
19784 "$$AbsOrRelPathMaster$$Basename.eps
19789 \begin_layout LyX-Code
19793 \begin_layout LyX-Code
19797 \begin_layout LyX-Code
19798 UpdateResult "$$AbsPath$$Basename.eps"
19801 \begin_layout LyX-Code
19802 ReferencedFile docbook "$$AbsPath$$Basename.eps"
19805 \begin_layout LyX-Code
19806 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
19809 \begin_layout LyX-Code
19813 \begin_layout LyX-Code
19814 Product "[XFig: $$FName]"
19817 \begin_layout LyX-Code
19821 \begin_layout LyX-Code
19825 \begin_layout Standard
19826 As you can see, the template is enclosed in
19827 \begin_inset Flex Code
19830 \begin_layout Plain Layout
19836 \SpecialChar \ldots{}
19838 \begin_inset Flex Code
19841 \begin_layout Plain Layout
19848 It contains a header specifying some general settings and, for each supported
19849 primary document file format, a section
19850 \begin_inset Flex Code
19853 \begin_layout Plain Layout
19859 \SpecialChar \ldots{}
19861 \begin_inset Flex Code
19864 \begin_layout Plain Layout
19873 \begin_layout Subsection
19874 The template header
19877 \begin_layout Description
19878 \begin_inset Flex Code
19881 \begin_layout Plain Layout
19882 AutomaticProduction
19883 \begin_inset space ~
19891 Whether the file represented by the template must be generated by LyX.
19892 This command must occur exactly once.
19895 \begin_layout Description
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19901 \begin_inset space ~
19909 A glob pattern that is used in the file dialog to filter out the desired
19911 If there is more than one possible file extension (e.
19912 \begin_inset space \thinspace{}
19916 \begin_inset space \space{}
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19930 \begin_inset Flex Code
19933 \begin_layout Plain Layout
19939 ), use something like
19940 \begin_inset Flex Code
19943 \begin_layout Plain Layout
19950 This command must occur exactly once.
19953 \begin_layout Description
19954 \begin_inset Flex Code
19957 \begin_layout Plain Layout
19959 \begin_inset space ~
19967 The text that is displayed on the button.
19968 This command must occur exactly once.
19971 \begin_layout Description
19972 \begin_inset Flex Code
19975 \begin_layout Plain Layout
19977 \begin_inset space ~
19981 \begin_inset space ~
19989 The help text that is used in the External dialog.
19990 Provide enough information to explain to the user just what the template
19991 can provide him with.
19992 This command must occur exactly once.
19995 \begin_layout Description
19996 \begin_inset Flex Code
19999 \begin_layout Plain Layout
20001 \begin_inset space ~
20009 The file format of the original file.
20010 This must be the name of a format that is known to LyX (see section
20011 \begin_inset space ~
20015 \begin_inset CommandInset ref
20017 reference "sec:Formats"
20023 \begin_inset Quotes eld
20027 \begin_inset Flex Code
20030 \begin_layout Plain Layout
20037 \begin_inset Quotes erd
20040 if the template can handle original files of more than one format.
20041 LyX will attempt to interrogate the file itself in order to deduce its
20042 format in this case.
20043 This command must occur exactly once.
20046 \begin_layout Description
20047 \begin_inset Flex Code
20050 \begin_layout Plain Layout
20052 \begin_inset space ~
20060 A unique name for the template.
20061 It must not contain substitution macros (see below).
20064 \begin_layout Description
20065 \begin_inset Flex Code
20068 \begin_layout Plain Layout
20070 \begin_inset space ~
20073 Rotate|Resize|Clip|Extra
20078 This command specifies which transformations are supported by this template.
20079 It may occur zero or more times.
20080 This command enables the corresponding tabs in the external dialog.
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20091 command must have either a corresponding
20092 \begin_inset Flex Code
20095 \begin_layout Plain Layout
20102 \begin_inset Flex Code
20105 \begin_layout Plain Layout
20112 \begin_inset Flex Code
20115 \begin_layout Plain Layout
20122 Otherwise the transformation will not be supported by that format.
20125 \begin_layout Subsection
20129 \begin_layout Description
20130 \begin_inset Flex Code
20133 \begin_layout Plain Layout
20135 \begin_inset space ~
20138 LaTeX|PDFLaTeX|PlainText|DocBook
20143 The primary document file format that this format definition is for.
20144 Not every template has a sensible representation in all document file formats.
20145 Please define nevertheless a
20146 \begin_inset Flex Code
20149 \begin_layout Plain Layout
20155 section for all templates.
20156 Use a dummy text when no representation is available.
20157 Then you can at least see a reference to the external material in the exported
20161 \begin_layout Description
20162 \begin_inset Flex Code
20165 \begin_layout Plain Layout
20167 \begin_inset space ~
20171 \begin_inset space ~
20179 This command defines an additional macro
20180 \begin_inset Flex Code
20183 \begin_layout Plain Layout
20189 for substitution in
20190 \begin_inset Flex Code
20193 \begin_layout Plain Layout
20201 \begin_inset Flex Code
20204 \begin_layout Plain Layout
20210 itself may contain substitution macros.
20211 The advantage over using
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20222 \begin_inset Flex Code
20225 \begin_layout Plain Layout
20231 is that the substituted value of
20232 \begin_inset Flex Code
20235 \begin_layout Plain Layout
20241 is sanitized so that it is a valid optional argument in the document format.
20242 This command may occur zero or more times.
20245 \begin_layout Description
20246 \begin_inset Flex Code
20249 \begin_layout Plain Layout
20251 \begin_inset space ~
20259 The text that is inserted in the exported document.
20260 This is actually the most important command and can be quite complex.
20261 This command must occur exactly once.
20264 \begin_layout Description
20265 \begin_inset Flex Code
20268 \begin_layout Plain Layout
20270 \begin_inset space ~
20278 This command specifies a preamble snippet that will be included in the
20280 It has to be defined using
20281 \begin_inset Flex Code
20284 \begin_layout Plain Layout
20290 \SpecialChar \ldots{}
20292 \begin_inset Flex Code
20295 \begin_layout Plain Layout
20302 This command may occur zero or more times.
20305 \begin_layout Description
20306 \begin_inset Flex Code
20309 \begin_layout Plain Layout
20311 \begin_inset space ~
20315 \begin_inset space ~
20323 This command denotes files that are created by the conversion process and
20324 are needed for a particular export format.
20325 If the filename is relative, it is interpreted relative to the master document.
20326 This command may be given zero or more times.
20329 \begin_layout Description
20330 \begin_inset Flex Code
20333 \begin_layout Plain Layout
20335 \begin_inset space ~
20343 The name of a required LaTeX package.
20344 The package is included via
20345 \begin_inset Flex Code
20348 \begin_layout Plain Layout
20356 in the LaTeX preamble.
20357 This command may occur zero or more times.
20360 \begin_layout Description
20361 \begin_inset Flex Code
20364 \begin_layout Plain Layout
20366 \begin_inset space ~
20370 \begin_inset space ~
20373 RotationLatexCommand
20378 This command specifies that the built in LaTeX command should be used for
20380 This command may occur once or not at all.
20383 \begin_layout Description
20384 \begin_inset Flex Code
20387 \begin_layout Plain Layout
20389 \begin_inset space ~
20393 \begin_inset space ~
20401 This command specifies that the built in LaTeX command should be used for
20403 This command may occur once or not at all.
20406 \begin_layout Description
20407 \begin_inset Flex Code
20410 \begin_layout Plain Layout
20412 \begin_inset space ~
20416 \begin_inset space ~
20419 RotationLatexOption
20424 This command specifies that rotation is done via an optional argument.
20425 This command may occur once or not at all.
20428 \begin_layout Description
20429 \begin_inset Flex Code
20432 \begin_layout Plain Layout
20434 \begin_inset space ~
20438 \begin_inset space ~
20446 This command specifies that resizing is done via an optional argument.
20447 This command may occur once or not at all.
20450 \begin_layout Description
20451 \begin_inset Flex Code
20454 \begin_layout Plain Layout
20456 \begin_inset space ~
20460 \begin_inset space ~
20468 This command specifies that clipping is done via an optional argument.
20469 This command may occur once or not at all.
20472 \begin_layout Description
20473 \begin_inset Flex Code
20476 \begin_layout Plain Layout
20478 \begin_inset space ~
20482 \begin_inset space ~
20490 This command specifies that an extra optional argument is used.
20491 This command may occur once or not at all.
20494 \begin_layout Description
20495 \begin_inset Flex Code
20498 \begin_layout Plain Layout
20500 \begin_inset space ~
20508 The file format of the converted file.
20509 This must be the name of a format that is known to LyX (see the
20510 \begin_inset Flex MenuItem
20513 \begin_layout Plain Layout
20518 ools\SpecialChar \menuseparator
20523 references\SpecialChar \menuseparator
20524 File Handling\SpecialChar \menuseparator
20531 This command must occur exactly once.
20534 \begin_layout Description
20535 \begin_inset Flex Code
20538 \begin_layout Plain Layout
20540 \begin_inset space ~
20548 The file name of the converted file.
20549 The file name must be absolute.
20550 This command must occur exactly once.
20553 \begin_layout Subsection
20554 Preamble definitions
20557 \begin_layout Standard
20558 The external template configuration file may contain additional preamble
20559 definitions enclosed by
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20569 \SpecialChar \ldots{}
20571 \begin_inset Flex Code
20574 \begin_layout Plain Layout
20581 They can be used by the templates in the
20582 \begin_inset Flex Code
20585 \begin_layout Plain Layout
20594 \begin_layout Section
20595 The substitution mechanism
20598 \begin_layout Standard
20599 When the external material facility invokes an external program, it is done
20600 on the basis of a command defined in the template configuration file.
20601 These commands can contain various macros that are expanded before execution.
20602 Execution always take place in the directory of the containing document.
20605 \begin_layout Standard
20606 Also, whenever external material is to be displayed, the name will be produced
20607 by the substitution mechanism, and most other commands in the template
20608 definition support substitution as well.
20611 \begin_layout Standard
20612 The available macros are the following:
20615 \begin_layout Description
20616 \begin_inset Flex Code
20619 \begin_layout Plain Layout
20620 $$AbsOrRelPathMaster
20625 The file path, absolute or relative to the master LyX document.
20628 \begin_layout Description
20629 \begin_inset Flex Code
20632 \begin_layout Plain Layout
20633 $$AbsOrRelPathParent
20638 The file path, absolute or relative to the LyX document.
20641 \begin_layout Description
20642 \begin_inset Flex Code
20645 \begin_layout Plain Layout
20651 The absolute file path.
20654 \begin_layout Description
20655 \begin_inset Flex Code
20658 \begin_layout Plain Layout
20664 The filename without path and without the extension.
20667 \begin_layout Description
20668 \begin_inset Flex Code
20671 \begin_layout Plain Layout
20673 \begin_inset Quotes eld
20677 \begin_inset Quotes erd
20685 This macro will expand to the contents of the file with the name
20686 \begin_inset Flex Code
20689 \begin_layout Plain Layout
20698 \begin_layout Description
20699 \begin_inset Flex Code
20702 \begin_layout Plain Layout
20708 The file extension (including the dot).
20711 \begin_layout Description
20712 \begin_inset Flex Code
20715 \begin_layout Plain Layout
20721 The filename of the file specified in the external material dialog.
20722 This is either an absolute name, or it is relative to the LyX document.
20725 \begin_layout Description
20726 \begin_inset Flex Code
20729 \begin_layout Plain Layout
20736 \begin_inset Flex Code
20739 \begin_layout Plain Layout
20745 (absolute name or relative to the LyX document).
20748 \begin_layout Description
20749 \begin_inset Flex Code
20752 \begin_layout Plain Layout
20758 The file path, relative to the master LyX document.
20761 \begin_layout Description
20762 \begin_inset Flex Code
20765 \begin_layout Plain Layout
20771 The file path, relative to the LyX document.
20774 \begin_layout Description
20775 \begin_inset Flex Code
20778 \begin_layout Plain Layout
20784 This macro will expand to the absolute path of the system directory.
20785 This is typically used to point to the various helper scripts that are
20789 \begin_layout Description
20790 \begin_inset Flex Code
20793 \begin_layout Plain Layout
20799 A name and full path to a temporary file which will be automatically deleted
20800 whenever the containing document is closed, or the external material insertion
20804 \begin_layout Standard
20805 All path macros contain a trailing directory separator, so you can construct
20807 \begin_inset space \thinspace{}
20811 \begin_inset space \space{}
20814 the absolute filename with
20815 \begin_inset Flex Code
20818 \begin_layout Plain Layout
20819 $$AbsPath$$Basename$$Extension
20827 \begin_layout Standard
20828 The macros above are substituted in all commands unless otherwise noted.
20830 \begin_inset Flex Code
20833 \begin_layout Plain Layout
20839 supports additionally the following substitutions if they are enabled by
20841 \begin_inset Flex Code
20844 \begin_layout Plain Layout
20851 \begin_inset Flex Code
20854 \begin_layout Plain Layout
20863 \begin_layout Description
20864 \begin_inset Flex Code
20867 \begin_layout Plain Layout
20873 The front part of the resize command.
20876 \begin_layout Description
20877 \begin_inset Flex Code
20880 \begin_layout Plain Layout
20886 The back part of the resize command.
20889 \begin_layout Description
20890 \begin_inset Flex Code
20893 \begin_layout Plain Layout
20899 The front part of the rotation command.
20902 \begin_layout Description
20903 \begin_inset Flex Code
20906 \begin_layout Plain Layout
20912 The back part of the rotation command.
20915 \begin_layout Standard
20916 The value string of the
20917 \begin_inset Flex Code
20920 \begin_layout Plain Layout
20926 command supports additionally the following substitutions if they are enabled
20928 \begin_inset Flex Code
20931 \begin_layout Plain Layout
20938 \begin_inset Flex Code
20941 \begin_layout Plain Layout
20950 \begin_layout Description
20951 \begin_inset Flex Code
20954 \begin_layout Plain Layout
20963 \begin_layout Description
20964 \begin_inset Flex Code
20967 \begin_layout Plain Layout
20976 \begin_layout Description
20977 \begin_inset Flex Code
20980 \begin_layout Plain Layout
20989 \begin_layout Description
20990 \begin_inset Flex Code
20993 \begin_layout Plain Layout
20999 The rotation option.
21002 \begin_layout Standard
21003 You may ask why there are so many path macros.
21004 There are mainly two reasons:
21007 \begin_layout Enumerate
21008 Relative and absolute file names should remain relative or absolute, respectivel
21010 Users may have reasons to prefer either form.
21011 Relative names are useful for portable documents that should work on different
21012 machines, for example.
21013 Absolute names may be required by some programs.
21016 \begin_layout Enumerate
21017 LaTeX treats relative file names differently than LyX and other programs
21018 in nested included files.
21019 For LyX, a relative file name is always relative to the document that contains
21021 For LaTeX, it is always relative to the master document.
21022 These two definitions are identical if you have only one document, but
21023 differ if you have a master document that includes part documents.
21024 That means that relative filenames must be transformed when presented to
21026 Fortunately LyX does this automatically for you if you choose the right
21030 \begin_layout Standard
21031 So which path macro should be used in new template definitions? The rule
21035 \begin_layout Itemize
21037 \begin_inset Flex Code
21040 \begin_layout Plain Layout
21046 if an absolute path is required.
21049 \begin_layout Itemize
21051 \begin_inset Flex Code
21054 \begin_layout Plain Layout
21055 $$AbsOrRelPathMaster
21060 if the substituted string is some kind of LaTeX input.
21063 \begin_layout Itemize
21065 \begin_inset Flex Code
21068 \begin_layout Plain Layout
21069 $$AbsOrRelPathParent
21074 in order to preserve the user's choice.
21077 \begin_layout Standard
21078 There are special cases where this rule does not work and e.
21079 \begin_inset space \thinspace{}
21083 \begin_inset space \space{}
21086 relative names are needed, but normally it will work just fine.
21087 One example for such a case is the command
21088 \begin_inset Flex Code
21091 \begin_layout Plain Layout
21092 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21097 in the XFig template above: We can't use the absolute name because the
21099 \begin_inset Flex Code
21102 \begin_layout Plain Layout
21108 files needs the relative name in order to rewrite the file content.
21111 \begin_layout Section
21112 Security discussion
21113 \begin_inset CommandInset label
21115 name "sec:Security-discussion"
21122 \begin_layout Standard
21123 The external material feature interfaces with a lot of external programs
21124 and does so automatically, so we have to consider the security implications
21126 In particular, since you have the option of including your own filenames
21127 and/or parameter strings and those are expanded into a command, it seems
21128 that it would be possible to create a malicious document which executes
21129 arbitrary commands when a user views or prints the document.
21130 This is something we definitely want to avoid.
21133 \begin_layout Standard
21134 However, since the external program commands are specified in the template
21135 configuration file only, there are no security issues if LyX is properly
21136 configured with safe templates only.
21137 This is so because the external programs are invoked with the
21138 \begin_inset Flex Code
21141 \begin_layout Plain Layout
21147 -system call rather than the
21148 \begin_inset Flex Code
21151 \begin_layout Plain Layout
21157 system-call, so it's not possible to execute arbitrary commands from the
21158 filename or parameter section via the shell.
21161 \begin_layout Standard
21162 This also implies that you are restricted in what command strings you can
21163 use in the external material templates.
21164 In particular, pipes and redirection are not readily available.
21165 This has to be so if LyX should remain safe.
21166 If you want to use some of the shell features, you should write a safe
21167 script to do this in a controlled manner, and then invoke the script from
21168 the command string.
21172 \begin_layout Standard
21173 It is possible to design a template that interacts directly with the shell,
21174 but since this would allow a malicious user to execute arbitrary commands
21175 by writing clever filenames and/or parameters, we generally recommend that
21176 you only use safe scripts that work with the
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21186 system call in a controlled manner.
21187 Of course, for use in a controlled environment, it can be tempting to just
21188 fall back to use ordinary shell scripts.
21189 If you do so, be aware that you
21193 provide an easily exploitable security hole in your system.
21194 Of course it stands to reason that such unsafe templates will never be
21195 included in the standard LyX distribution, although we do encourage people
21196 to submit new templates in the open source tradition.
21197 But LyX as shipped from the official distribution channels will never have
21201 \begin_layout Standard
21202 Including external material provides a lot of power, and you have to be
21203 careful not to introduce security hazards with this power.
21204 A subtle error in a single line in an innocent looking script can open
21205 the door to huge security problems.
21206 So if you do not fully understand the issues, we recommend that you consult
21207 a knowledgeable security professional or the LyX development team if you
21208 have any questions about whether a given template is safe or not.
21209 And do this before you use it in an uncontrolled environment.