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 % increase link area for cross-references and autoname them,
35 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
36 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
37 \addto\extrasenglish{%
38 \renewcommand*{\equationautorefname}[1]{}%
39 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
40 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout Flex:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 # In case we need to do with sans...
65 #InsetLayout CharStyle:Code
70 #\renewcommand{\code}[1]{{\sffamily #1}}
75 \language_package default
80 \font_typewriter default
82 \font_default_family default
83 \use_non_tex_fonts false
89 \default_output_format default
91 \bibtex_command default
92 \index_command default
96 \pdf_title "LyX Configuration Manual"
97 \pdf_author "LyX Team"
98 \pdf_subject "LyX-documentation Customization"
99 \pdf_keywords "LyX, documentation, customization"
101 \pdf_bookmarksnumbered true
102 \pdf_bookmarksopen true
103 \pdf_bookmarksopenlevel 1
104 \pdf_breaklinks false
108 \pdf_pdfusetitle false
109 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
112 \use_package amsmath 0
113 \use_package amssymb 0
114 \use_package cancel 0
116 \use_package mathdots 1
117 \use_package mathtools 0
118 \use_package mhchem 0
119 \use_package stackrel 0
120 \use_package stmaryrd 0
121 \use_package undertilde 0
123 \cite_engine_type default
127 \paperorientation portrait
142 \paragraph_separation indent
143 \paragraph_indentation default
144 \quotes_language english
147 \paperpagestyle headings
148 \tracking_changes false
149 \output_changes false
158 Customizing LyX: Features for the Advanced User
166 \begin_layout Plain Layout
168 If you have comments or error corrections, please send them to the LyX Documenta
170 \begin_inset CommandInset href
172 target "lyx-docs@lists.lyx.org"
179 \begin_inset Quotes eld
183 \begin_inset Quotes erd
186 in the subject header, and please cc the current maintainer of this file,
187 Richard Heck <rgheck@comcast.net>.
193 \begin_inset Newline newline
197 \begin_inset Newline newline
203 \begin_layout Standard
204 \begin_inset CommandInset toc
205 LatexCommand tableofcontents
212 \begin_layout Standard
213 \begin_inset Note Note
216 \begin_layout Plain Layout
217 Please use change tracking when modifying this document.
218 This makes it easier for our translators to recognize things that have
219 been changed, and it helps the maintainer keep up-to-date with what's been
228 \begin_layout Chapter
232 \begin_layout Standard
233 This manual covers the customization features present in LyX.
234 In it, we discuss issues like keyboard shortcuts, screen previewing options,
235 printer options, sending commands to LyX via the LyX Server, internationalizati
236 on, installing new LaTeX classes and LyX layouts, etc.
237 We can't possibly hope to touch on everything you can change—our developers
238 add new features faster than we can document them—but we will explain the
239 most common customizations and hopefully point you in the right direction
240 for some of the more obscure ones.
243 \begin_layout Standard
244 \begin_inset Branch OutDated
247 \begin_layout Standard
248 Information from previous versions of this document that now seems to be
249 outdated is contained in the OutDated branch of this document.
250 By default, this information will not appear in the LaTeX output.
258 \begin_layout Chapter
259 LyX configuration files
262 \begin_layout Standard
263 This chapter aims to help you to find your way through the LyX configuration
265 Before continuing to read this chapter, you should find out where your
266 LyX library and user directories are by using
267 \begin_inset Flex MenuItem
270 \begin_layout Plain Layout
271 Help\SpecialChar \menuseparator
282 The library directory is the place where LyX places its system-wide configurati
283 on files; the user directory is where you can place your modified versions.
284 We will call the former
285 \begin_inset Flex Code
288 \begin_layout Plain Layout
295 \begin_inset Flex MenuItem
298 \begin_layout Plain Layout
304 in the remainder of this document.
308 \begin_layout Section
310 \begin_inset Flex Code
313 \begin_layout Plain Layout
322 \begin_layout Standard
323 \begin_inset Flex Code
326 \begin_layout Plain Layout
332 and its sub-directories contain a number of files and that can be used
333 to customize LyX's behavior.
334 You can change many of these files from within LyX itself through the
335 \begin_inset Flex MenuItem
338 \begin_layout Plain Layout
339 Tools\SpecialChar \menuseparator
346 Most customization that you will want to do in LyX is possible through
348 However, many other inner aspects of LyX can be customized by modifying
350 \begin_inset Flex Code
353 \begin_layout Plain Layout
360 These files fall in different categories, described in the following subsection
364 \begin_layout Subsection
365 Automatically generated files
368 \begin_layout Standard
369 The files, which are to be found in
370 \begin_inset Flex MenuItem
373 \begin_layout Plain Layout
379 , are generated when you configure LyX.
380 They contain various default values that are guessed by inspection.
381 In general, it is not a good idea to modify them, since they might be overwritt
385 \begin_layout Labeling
386 \labelwidthstring 00.00.0000
387 \begin_inset Flex Code
390 \begin_layout Plain Layout
396 contains defaults for various commands.
399 \begin_layout Labeling
400 \labelwidthstring 00.00.0000
401 \begin_inset Flex Code
404 \begin_layout Plain Layout
410 contains the list of packages that have been recognized by LyX.
411 It is currently unused by the LyX program itself, but the information extracted
412 , and more, is made available with
413 \begin_inset Flex MenuItem
416 \begin_layout Plain Layout
417 Help\SpecialChar \menuseparator
430 \begin_layout Labeling
431 \labelwidthstring 00.00.0000
432 \begin_inset Flex Code
435 \begin_layout Plain Layout
441 the list of text classes that have been found in your
442 \begin_inset Flex Code
445 \begin_layout Plain Layout
451 directories, along with the associated LaTeX document class and their descripti
455 \begin_layout Labeling
456 \labelwidthstring 00.00.0000
457 \begin_inset Flex Code
460 \begin_layout Plain Layout
466 the list of layout modules found in your
467 \begin_inset Flex Code
470 \begin_layout Plain Layout
479 \begin_layout Labeling
480 \labelwidthstring 00.00.0000
481 \begin_inset Flex Code
484 \begin_layout Plain Layout
490 lists of various sorts of LaTeX-related files found on your system
493 \begin_layout Labeling
494 \labelwidthstring 00.00.0000
495 \begin_inset Flex Code
498 \begin_layout Plain Layout
504 is automatically generated during configuration from the file
505 \begin_inset Flex Code
508 \begin_layout Plain Layout
515 It contains information on your LaTeX configuration.
518 \begin_layout Subsection
522 \begin_layout Standard
523 These directories are duplicated between
524 \begin_inset Flex Code
527 \begin_layout Plain Layout
534 \begin_inset Flex Code
537 \begin_layout Plain Layout
544 If a particular files exists in both places, the one in
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
557 \begin_layout Labeling
558 \labelwidthstring 00.00.0000
559 \begin_inset Flex Code
562 \begin_layout Plain Layout
568 this directory contains files with the extension
569 \begin_inset Flex Code
572 \begin_layout Plain Layout
578 that define the keybindings used in LyX.
579 If there exists an internationalized version of the bind file named
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
589 , that will be used first.
592 \begin_layout Labeling
593 \labelwidthstring 00.00.0000
594 \begin_inset Flex Code
597 \begin_layout Plain Layout
603 contains graphics files that can be included in documents.
607 \begin_layout Labeling
608 \labelwidthstring 00.00.0000
609 \begin_inset Flex Code
612 \begin_layout Plain Layout
618 contains LyX documentation files (including the one you are currently reading).
620 \begin_inset Flex Code
623 \begin_layout Plain Layout
629 deserves special attention, as noted above.
630 The internationalized help docs are in subdirectories
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
641 \begin_inset Quotes eld
645 \begin_inset Quotes erd
648 is the ISO language code.
650 \begin_inset CommandInset ref
652 reference "cha:Internationalizing-LyX"
659 \begin_layout Labeling
660 \labelwidthstring 00.00.0000
661 \begin_inset Flex Code
664 \begin_layout Plain Layout
670 contains example files that explain how to use some features.
671 In the file browser, press the
672 \begin_inset Flex MenuItem
675 \begin_layout Plain Layout
684 \begin_layout Labeling
685 \labelwidthstring 00.00.0000
686 \begin_inset Flex Code
689 \begin_layout Plain Layout
695 contains image files that are used by the
696 \begin_inset Flex MenuItem
699 \begin_layout Plain Layout
706 In addition, it also contains the individual icons used in the toolbar
707 and the banners that can be shown when LyX is launched.
710 \begin_layout Labeling
711 \labelwidthstring 00.00.0000
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
721 contains keyboard keymapping files.
723 \begin_inset CommandInset ref
725 reference "sec:International-Keymap-Stuff"
732 \begin_layout Labeling
733 \labelwidthstring 00.00.0000
734 \begin_inset Flex Code
737 \begin_layout Plain Layout
743 contains the text class and module files described in
744 \begin_inset CommandInset ref
746 reference "cha:Installing-New-Document"
753 \begin_layout Labeling
754 \labelwidthstring 00.00.0000
755 \begin_inset Flex Code
758 \begin_layout Plain Layout
765 \begin_inset Flex Code
768 \begin_layout Plain Layout
774 Python scripts used to convert between LyX versions.
775 These can be run from the command line if, say, you want to batch-convert
779 \begin_layout Labeling
780 \labelwidthstring 00.00.0000
781 \begin_inset Flex Code
784 \begin_layout Plain Layout
790 contains some files that demonstrate the capabilities of the
791 \begin_inset Flex MenuItem
794 \begin_layout Plain Layout
805 Also contains some scripts used by LyX itself.
808 \begin_layout Labeling
809 \labelwidthstring 00.00.0000
810 \begin_inset Flex Code
813 \begin_layout Plain Layout
819 contains the standard LyX template files described in
820 \begin_inset CommandInset ref
822 reference "sub:Creating-Templates"
829 \begin_layout Labeling
830 \labelwidthstring 00.00.0000
831 \begin_inset Flex Code
834 \begin_layout Plain Layout
840 contains files with the extension
841 \begin_inset Flex Code
844 \begin_layout Plain Layout
850 that define the user interface to LyX.
851 That is, the files define which items appear in which menus and the items
852 appearing on the toolbar.
855 \begin_layout Subsection
856 Files you don't want to modify
859 \begin_layout Standard
860 These files are used internally by LyX and you generally do not need to
861 modify them unless you are a developer.
864 \begin_layout Labeling
865 \labelwidthstring 00.00.0000
866 \begin_inset Flex Code
869 \begin_layout Plain Layout
875 this file contains the list of LyX developers.
876 The contents are displayed with the menu entry
877 \begin_inset Flex MenuItem
880 \begin_layout Plain Layout
881 Help\SpecialChar \menuseparator
894 \begin_layout Labeling
895 \labelwidthstring 00.00.0000
896 \begin_inset Flex Code
899 \begin_layout Plain Layout
905 this is a LaTeX script used during the configuration process.
909 \begin_layout Labeling
910 \labelwidthstring 00.00.0000
911 \begin_inset Flex Code
914 \begin_layout Plain Layout
920 this is a Python script that is used to re-configure LyX.
921 It creates configuration files in the directory it was run from.
924 \begin_layout Subsection
925 Other files needing a line or two
928 \begin_layout Labeling
929 \labelwidthstring 00.00.0000
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
939 this contains tables describing how different character encodings can be
943 \begin_layout Labeling
944 \labelwidthstring 00.00.0000
945 \begin_inset Flex Code
948 \begin_layout Plain Layout
954 this file contains the templates available to the new
955 \begin_inset Flex MenuItem
958 \begin_layout Plain Layout
969 \begin_inset CommandInset ref
971 reference "chap:Including-External-Material"
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.
992 \begin_layout Labeling
993 \labelwidthstring 00.00.0000
994 \begin_inset Flex Code
997 \begin_layout Plain Layout
1003 contains information about the supported fonts.
1006 \begin_layout Labeling
1007 \labelwidthstring 00.00.0000
1008 \begin_inset Flex Code
1011 \begin_layout Plain Layout
1017 this file contains translations for internationalized paragraph styles
1019 \begin_inset CommandInset ref
1021 reference "sub:I18n"
1028 \begin_layout Labeling
1029 \labelwidthstring 00.00.0000
1030 \begin_inset Flex Code
1033 \begin_layout Plain Layout
1039 this file contains information about unicode-encoded glyphs and the way
1040 they are supported by LyX via LaTeX.
1043 \begin_layout Section
1044 Your local configuration directory
1047 \begin_layout Standard
1048 Even if you are using LyX as an unprivileged user, you might want to change
1049 LyX configuration for your own use.
1051 \begin_inset Flex Code
1054 \begin_layout Plain Layout
1060 directory contains all your personal configuration files.
1061 This is the directory described as
1062 \begin_inset Quotes eld
1066 \begin_inset Quotes erd
1070 \begin_inset Flex MenuItem
1073 \begin_layout Plain Layout
1074 Help\SpecialChar \menuseparator
1076 \begin_inset space ~
1085 This directory is used as a mirror of
1086 \begin_inset Flex Code
1089 \begin_layout Plain Layout
1095 , which means that every file in
1096 \begin_inset Flex Code
1099 \begin_layout Plain Layout
1105 is a replacement for the corresponding file in
1106 \begin_inset Flex Code
1109 \begin_layout Plain Layout
1116 Any configuration file described in the above sections can be placed either
1117 in the system-wide directory, in which case it will affect all users, or
1118 in your local directory for your own use.
1121 \begin_layout Standard
1122 To make things clearer, let's provide a few examples:
1125 \begin_layout Itemize
1126 The preferences set in the
1127 \begin_inset Flex MenuItem
1130 \begin_layout Plain Layout
1131 Tools\SpecialChar \menuseparator
1137 dialog are saved to a file
1138 \begin_inset Flex Code
1141 \begin_layout Plain Layout
1148 \begin_inset Flex Code
1151 \begin_layout Plain Layout
1160 \begin_layout Itemize
1161 When you reconfigure using
1162 \begin_inset Flex MenuItem
1165 \begin_layout Plain Layout
1166 Tools\SpecialChar \menuseparator
1173 \begin_inset Flex Code
1176 \begin_layout Plain Layout
1182 script, and the resulting files are written in your local configuration
1184 This means that any additional text class file that you might have added
1186 \begin_inset Flex Code
1189 \begin_layout Plain Layout
1195 will be added to the list of classes in the
1196 \begin_inset Flex MenuItem
1199 \begin_layout Plain Layout
1200 Document\SpecialChar \menuseparator
1209 \begin_layout Itemize
1210 If you get some updated documentation from LyX ftp site and cannot install
1211 it because you do not have sysadmin rights on your system, you can just
1213 \begin_inset Flex Code
1216 \begin_layout Plain Layout
1222 and the items in the
1223 \begin_inset Flex MenuItem
1226 \begin_layout Plain Layout
1232 menu will open them!
1235 \begin_layout Section
1236 Running LyX with multiple configurations
1239 \begin_layout Standard
1240 The configuration freedom of the local configuration directory may not suffice
1241 if you want to have more than one configuration at your disposal.
1242 For example, you may want to be use different key bindings or printer settings
1244 You can achieve this by having several such directories.
1245 You then specify which directory to use at run-time.
1248 \begin_layout Standard
1249 Invoking LyX with the command line switch
1250 \begin_inset Flex Code
1253 \begin_layout Plain Layout
1263 instructs the program to read the configuration from that directory, and
1264 not from the default directory.
1265 (You can determine the default directory by running LyX without the
1266 \begin_inset Flex Code
1269 \begin_layout Plain Layout
1275 switch.) If the specified directory does not exist, LyX offers to create
1276 it for you, just like it does for the default directory on the first time
1277 you run the program.
1278 You can modify the configuration options in this additional user directory
1279 exactly as you would for the default directory.
1280 These directories are completely independent (but read on).
1281 Note that setting the environment variable
1282 \begin_inset Flex Code
1285 \begin_layout Plain Layout
1291 to some value has exactly the same effect.
1294 \begin_layout Standard
1295 Having several configurations also requires more maintenance: if you want
1296 to add a new layout to
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1306 which you want available from all your configurations, you must add it
1307 to each directory separately.
1308 You can avoid this with the following trick: after LyX creates the additional
1309 directory, most of the subdirectories (see above) are empty.
1310 If you want the new configuration to mirror an existing one, replace the
1311 empty subdirectory with a symbolic link to the matching subdirectory in
1312 the existing configuration.
1314 \begin_inset Flex Code
1317 \begin_layout Plain Layout
1323 subdirectory, however, since it contains a file written by the configuration
1324 script (also accessible through
1325 \begin_inset Flex MenuItem
1328 \begin_layout Plain Layout
1329 Tools\SpecialChar \menuseparator
1335 ) which is configuration-specific.
1338 \begin_layout Chapter
1339 The Preferences dialog
1342 \begin_layout Standard
1343 All options of the preferences dialog are described in the Appendix
1345 The Preferences Dialog
1352 For some options you might find here more details.
1355 \begin_layout Section
1357 \begin_inset CommandInset label
1366 \begin_layout Standard
1367 The first step is to define your file formats if they are not already defined.
1369 \begin_inset Flex MenuItem
1372 \begin_layout Plain Layout
1373 Tools\SpecialChar \menuseparator
1381 \begin_inset Flex MenuItem
1384 \begin_layout Plain Layout
1385 File Handling\SpecialChar \menuseparator
1392 \begin_inset Flex MenuItem
1395 \begin_layout Plain Layout
1401 button to define your new format.
1403 \begin_inset Flex MenuItem
1406 \begin_layout Plain Layout
1412 field contains the name used to identify the format in the GUI.
1414 \begin_inset Flex MenuItem
1417 \begin_layout Plain Layout
1423 is used to identify the format internally.
1424 You will also need to enter a file extension.
1425 These are all required.
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1436 field is used to provide a keyboard shortcut on the menus.
1437 (For example, pressing
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1448 \begin_inset Flex MenuItem
1451 \begin_layout Plain Layout
1452 Document\SpecialChar \menuseparator
1453 View (Other Formats)\SpecialChar \menuseparator
1462 \begin_layout Standard
1464 \begin_inset Flex MenuItem
1467 \begin_layout Plain Layout
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1484 For example, you might want to use
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1494 to view PostScript files.
1495 You can enter the command needed to start the program in the corresponding
1497 In defining this command, you can use the four variables listed in the
1499 The viewer is launched when you view an image in LyX or use the
1500 \begin_inset Flex MenuItem
1503 \begin_layout Plain Layout
1504 Document\SpecialChar \menuseparator
1511 The editor is for example launched when you right-click on an image and
1513 \begin_inset Flex MenuItem
1516 \begin_layout Plain Layout
1522 in the appearing context menu.
1525 \begin_layout Standard
1527 \begin_inset Flex MenuItem
1530 \begin_layout Plain Layout
1536 type of a format is optional, but if it is specified, it must be unique
1538 It is used to detect files of this format from the file contents.
1539 For some important file formats there is no MIME type officially registered
1541 \begin_inset CommandInset href
1544 target "http://www.iana.org/assignments/media-types/"
1549 Therefore LyX uses the extended list of MIME types as specified by
1550 \begin_inset CommandInset href
1552 name "freedesktop.org"
1553 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1560 \begin_layout Standard
1562 \begin_inset Flex MenuItem
1565 \begin_layout Plain Layout
1571 option tells LyX that a format is suitable for document export.
1572 If this is set and if a suitable conversion route exists (see
1573 \begin_inset CommandInset ref
1575 reference "sec:Converters"
1579 ), the format will appear in the
1580 \begin_inset Flex MenuItem
1583 \begin_layout Plain Layout
1584 File\SpecialChar \menuseparator
1591 The format will also appear in the
1592 \begin_inset Flex MenuItem
1595 \begin_layout Plain Layout
1596 Document\SpecialChar \menuseparator
1602 menu if a viewer is specified for the format.
1603 Pure image formats, such as
1604 \begin_inset Flex Code
1607 \begin_layout Plain Layout
1613 , should not use this option.
1614 Formats that can both represent vector graphics and documents like
1615 \begin_inset Flex Code
1618 \begin_layout Plain Layout
1627 \begin_layout Standard
1629 \begin_inset Flex MenuItem
1632 \begin_layout Plain Layout
1633 Vector graphics format
1638 tells LyX that a format can contain vector graphics.
1639 This information is used to determine the target format of included graphics
1641 \begin_inset Flex MenuItem
1644 \begin_layout Plain Layout
1651 Included graphics may need to be converted to either
1652 \begin_inset Flex MenuItem
1655 \begin_layout Plain Layout
1662 \begin_inset Flex MenuItem
1665 \begin_layout Plain Layout
1672 \begin_inset Flex MenuItem
1675 \begin_layout Plain Layout
1682 \begin_inset Flex MenuItem
1685 \begin_layout Plain Layout
1691 cannot handle other image formats.
1692 If an included graphic is not already in
1693 \begin_inset Flex MenuItem
1696 \begin_layout Plain Layout
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1722 format, it is converted to
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1732 if the vector format option is set, and otherwise to
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1745 \begin_layout Section
1749 \begin_layout Standard
1750 Since all conversions from one format to another take place in LyX's temporary
1751 directory, it is sometimes necessary to modify a file before copying it
1752 to the temporary directory in order that the conversion may be performed.
1756 \begin_layout Plain Layout
1757 For example, the file may refer to other files—images, for example—using
1758 relative file names, and these may become invalid when the file is copied
1759 to the temporary directory.
1764 This is done by a Copier: It copies a file to (or from) the temporary directory
1765 and may modify it in the process.
1768 \begin_layout Standard
1769 The definitions of the copiers may use four variables:
1772 \begin_layout Labeling
1773 \labelwidthstring 00.00.0000
1774 \begin_inset Flex Code
1777 \begin_layout Plain Layout
1783 The LyX system directory (e.
1784 \begin_inset space \thinspace{}
1788 \begin_inset space \space{}
1792 \begin_inset Flex MenuItem
1795 \begin_layout Plain Layout
1804 \begin_layout Labeling
1805 \labelwidthstring 00.00.0000
1806 \begin_inset Flex Code
1809 \begin_layout Plain Layout
1818 \begin_layout Labeling
1819 \labelwidthstring 00.00.0000
1820 \begin_inset Flex Code
1823 \begin_layout Plain Layout
1832 \begin_layout Labeling
1833 \labelwidthstring 00.00.0000
1834 \begin_inset Flex Code
1837 \begin_layout Plain Layout
1843 The base name (without filename extension) in the LyX temporary directory
1846 \begin_layout Labeling
1847 \labelwidthstring 00.00.0000
1848 \begin_inset Flex Code
1851 \begin_layout Plain Layout
1857 The full directory path of the LyX temporary directory
1860 \begin_layout Labeling
1861 \labelwidthstring 00.00.0000
1862 \begin_inset Flex Code
1865 \begin_layout Plain Layout
1871 The full pathname to the original LyX file being processed
1874 \begin_layout Labeling
1875 \labelwidthstring 00.00.0000
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1885 The filename (without any directory path) of the LyX file.
1888 \begin_layout Labeling
1889 \labelwidthstring 00.00.0000
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1902 \begin_layout Standard
1903 The latter should be the filename as it would be used in a LaTeX's
1910 It is relevant only when exporting files suitable for such inclusion.
1913 \begin_layout Standard
1914 Copiers can be used to do almost anything with output files.
1915 For example, suppose you want generated pdf files to be copied to a special
1917 \begin_inset Flex Code
1920 \begin_layout Plain Layout
1927 Then you could write a shell script such as this one:
1930 \begin_layout Standard
1931 \begin_inset listings
1935 \begin_layout Plain Layout
1940 \begin_layout Plain Layout
1945 \begin_layout Plain Layout
1947 TOFILE=`basename $2`
1950 \begin_layout Plain Layout
1952 cp $FROMFILE /home/you/pdf/$TOFILE
1957 Save it in your local LyX directory—say,
1958 \begin_inset Flex Code
1961 \begin_layout Plain Layout
1962 /home/you/.lyx/scripts/pdfcopier.sh
1967 —and make it executable, if you need to do so on your platform.
1969 \begin_inset Flex MenuItem
1972 \begin_layout Plain Layout
1973 Tools\SpecialChar \menuseparator
1979 dialog, select under
1980 \begin_inset Flex MenuItem
1983 \begin_layout Plain Layout
1984 File Handling\SpecialChar \menuseparator
1991 \begin_inset Flex MenuItem
1994 \begin_layout Plain Layout
2000 format—or one of the other pdf formats—and enter
2001 \begin_inset Flex Code
2004 \begin_layout Plain Layout
2005 pdfcopier.sh $$i $$o
2011 \begin_inset Flex MenuItem
2014 \begin_layout Plain Layout
2024 \begin_layout Standard
2025 Copiers are used by LyX in various of its own conversions.
2026 For example, if appropriate programs are found, LyX will automatically
2027 install copiers for the
2028 \begin_inset Flex MenuItem
2031 \begin_layout Plain Layout
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2043 \begin_inset space ~
2052 When these formats are exported, the copier sees that not just the main
2053 HTML file but various associated files (style files, images, etc.) are also
2055 All these files are written to a subdirectory of the directory in which
2056 the original LyX file was found.
2060 \begin_layout Plain Layout
2061 This copier can be customized.
2063 \begin_inset Quotes eld
2067 \begin_inset Quotes erd
2070 argument takes a comma-separated list of extensions to be copied; if it
2071 is omitted, all files will be copied.
2073 \begin_inset Quotes eld
2077 \begin_inset Quotes erd
2080 argument determines the extension added to the generated directory.
2082 \begin_inset Quotes eld
2086 \begin_inset Flex MenuItem
2089 \begin_layout Plain Layout
2096 \begin_inset Quotes erd
2099 , so HTML generated from
2100 \begin_inset Flex MenuItem
2103 \begin_layout Plain Layout
2104 /path/to/filename.lyx
2110 \begin_inset Flex MenuItem
2113 \begin_layout Plain Layout
2114 /path/to/filename.html.LyXconv
2128 \begin_layout Section
2130 \begin_inset CommandInset label
2132 name "sec:Converters"
2139 \begin_layout Standard
2140 You can define your own Converters to convert files between different formats.
2142 \begin_inset Flex MenuItem
2145 \begin_layout Plain Layout
2146 Tools\SpecialChar \menuseparator
2147 Preferences\SpecialChar \menuseparator
2148 File Handling\SpecialChar \menuseparator
2157 \begin_layout Standard
2158 To define a new converter, select the
2159 \begin_inset Flex MenuItem
2162 \begin_layout Plain Layout
2164 \begin_inset space ~
2173 \begin_inset Flex MenuItem
2176 \begin_layout Plain Layout
2178 \begin_inset space ~
2186 from the drop-down lists, enter the command needed for the conversion,
2188 \begin_inset Flex MenuItem
2191 \begin_layout Plain Layout
2198 Several variables can be used in the definition of converters:
2201 \begin_layout Labeling
2202 \labelwidthstring 00.00.0000
2203 \begin_inset Flex Code
2206 \begin_layout Plain Layout
2212 The LyX system directory
2215 \begin_layout Labeling
2216 \labelwidthstring 00.00.0000
2217 \begin_inset Flex Code
2220 \begin_layout Plain Layout
2229 \begin_layout Labeling
2230 \labelwidthstring 00.00.0000
2231 \begin_inset Flex Code
2234 \begin_layout Plain Layout
2243 \begin_layout Labeling
2244 \labelwidthstring 00.00.0000
2245 \begin_inset Flex Code
2248 \begin_layout Plain Layout
2254 The base filename of the input file (i.
2255 \begin_inset space \thinspace{}
2258 g., without the extension)
2261 \begin_layout Labeling
2262 \labelwidthstring 00.00.0000
2263 \begin_inset Flex Code
2266 \begin_layout Plain Layout
2272 The path to the input file
2275 \begin_layout Labeling
2276 \labelwidthstring 00.00.0000
2277 \begin_inset Flex Code
2280 \begin_layout Plain Layout
2286 The path to the original input file (this is different from $$p when a
2287 chain of converters is called)
2290 \begin_layout Labeling
2291 \labelwidthstring 00.00.0000
2292 \begin_inset Flex Code
2295 \begin_layout Plain Layout
2301 The iconv name for the encoding of the document.
2304 \begin_layout Standard
2306 \begin_inset Flex MenuItem
2309 \begin_layout Plain Layout
2311 \begin_inset space ~
2319 field you can enter the following flags, separated by commas:
2322 \begin_layout Labeling
2323 \labelwidthstring 00.00.0000
2324 \begin_inset Flex Code
2327 \begin_layout Plain Layout
2333 This converter runs some form of LaTeX.
2334 This will make LyX's LaTeX error logs available.
2337 \begin_layout Labeling
2338 \labelwidthstring 00.00.0000
2339 \begin_inset Flex Code
2342 \begin_layout Plain Layout
2349 \begin_inset Flex MenuItem
2352 \begin_layout Plain Layout
2358 file for the conversion.
2361 \begin_layout Labeling
2362 \labelwidthstring 00.00.0000
2363 \begin_inset Flex Code
2366 \begin_layout Plain Layout
2373 \begin_inset Quotes eld
2377 \begin_inset Quotes erd
2380 file from the backend, which in practice means a LaTeX file like the one
2381 we would export, without
2382 \begin_inset Flex Code
2385 \begin_layout Plain Layout
2394 \begin_layout Labeling
2395 \labelwidthstring 00.00.0000
2396 \begin_inset Flex Code
2399 \begin_layout Plain Layout
2408 \begin_layout Standard
2409 The following three flags are not really flags at all because they take
2411 \begin_inset Flex MenuItem
2414 \begin_layout Plain Layout
2416 \begin_inset space ~
2420 \begin_inset space ~
2431 \begin_layout Labeling
2432 \labelwidthstring 00.00.0000
2433 \begin_inset Flex Code
2436 \begin_layout Plain Layout
2442 If set, the converter's standard error will be redirected to a file
2443 \begin_inset Flex Code
2446 \begin_layout Plain Layout
2452 , and the script given as argument will be run as:
2453 \begin_inset Flex Code
2456 \begin_layout Plain Layout
2457 script < infile.out > infile.log
2463 The argument may contain
2464 \begin_inset Flex Code
2467 \begin_layout Plain Layout
2476 \begin_layout Labeling
2477 \labelwidthstring 00.00.0000
2478 \begin_inset Flex Code
2481 \begin_layout Plain Layout
2487 The name of the directory in which the converter will dump the generated
2489 LyX will not create this directory, and it does not copy anything into
2490 it, though it will copy this directory to the destination.
2491 The argument may contain
2492 \begin_inset Flex Code
2495 \begin_layout Plain Layout
2501 , which will be replaced by the base name of the input and output files,
2502 respectively, when the directory is copied.
2503 \begin_inset Newline newline
2506 Note that resultdir and usetempdir make no sense together.
2507 The latter will be ignored if the former is given.
2510 \begin_layout Labeling
2511 \labelwidthstring 00.00.0000
2512 \begin_inset Flex Code
2515 \begin_layout Plain Layout
2521 Determines the output file name and may, contain
2522 \begin_inset Flex Code
2525 \begin_layout Plain Layout
2532 Sensible only with resultdir and optional even then; if not given, it defaults
2536 \begin_layout Standard
2537 None of these last three are presently used in any of the converters that
2538 are installed with LyX.
2542 \begin_layout Standard
2543 You do not have to define converters for all formats between which you want
2545 For example, you will note that there is no `LyX to PostScript' converter,
2546 but LyX will export PostScript.
2547 It does so by first creating a LaTeX file (no converter needs to be defined
2548 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2549 and finally converting the resulting DVI file to PostScript.
2550 LyX finds such `chains' of converters automatically, and it will always
2551 choose the shortest possible chain.
2552 You can, though, still define multiple conversion methods between file
2554 For example, the standard LyX configuration provides five ways to convert
2558 \begin_layout Enumerate
2560 \begin_inset Flex MenuItem
2563 \begin_layout Plain Layout
2572 \begin_layout Enumerate
2573 via (DVI and) PostScript, using
2574 \begin_inset Flex MenuItem
2577 \begin_layout Plain Layout
2586 \begin_layout Enumerate
2588 \begin_inset Flex MenuItem
2591 \begin_layout Plain Layout
2600 \begin_layout Enumerate
2602 \begin_inset Flex MenuItem
2605 \begin_layout Plain Layout
2614 \begin_layout Enumerate
2616 \begin_inset Flex MenuItem
2619 \begin_layout Plain Layout
2628 \begin_layout Standard
2629 To define such alternate chains, you must define multiple target `file formats',
2631 \begin_inset CommandInset ref
2633 reference "sec:Formats"
2638 For example, in the standard configuration, the formats named
2639 \begin_inset Flex MenuItem
2642 \begin_layout Plain Layout
2649 \begin_inset Flex MenuItem
2652 \begin_layout Plain Layout
2659 \begin_inset Flex MenuItem
2662 \begin_layout Plain Layout
2669 \begin_inset Flex MenuItem
2672 \begin_layout Plain Layout
2679 \begin_inset Flex MenuItem
2682 \begin_layout Plain Layout
2689 \begin_inset Flex MenuItem
2692 \begin_layout Plain Layout
2699 \begin_inset Flex MenuItem
2702 \begin_layout Plain Layout
2709 \begin_inset Flex MenuItem
2712 \begin_layout Plain Layout
2719 \begin_inset Flex MenuItem
2722 \begin_layout Plain Layout
2729 \begin_inset Flex MenuItem
2732 \begin_layout Plain Layout
2738 ) are defined, all of which share the extension
2739 \begin_inset Flex MenuItem
2742 \begin_layout Plain Layout
2748 , and which correspond to the conversion methods just mentioned.
2751 \begin_layout Chapter
2752 Internationalizing LyX
2753 \begin_inset CommandInset label
2755 name "cha:Internationalizing-LyX"
2762 \begin_layout Standard
2763 LyX supports using a translated interface.
2764 Last time we checked, LyX provided text in thirty languages.
2765 The language of choice is called your
2770 (For further reading on locale settings, see also the documentation for
2771 locale that comes with your operating system.
2772 For Linux, the manual page for
2773 \begin_inset Flex Code
2776 \begin_layout Plain Layout
2782 could be a good place to start).
2785 \begin_layout Standard
2786 Notice that these translations will work, but do contain a few flaws.
2787 In particular, all dialogs have been designed with the English text in
2788 mind, which means that some of the translated text will be too large to
2789 fit within the space allocated.
2790 This is only a display problem and will not cause any harm.
2791 Also, you will find that some of the translations do not define shortcut
2792 keys for everything.
2793 Sometimes, there are simply not enough free letters to do it.
2794 Other times, the translator just hasn't got around to doing it yet.
2795 Our localization team, which you may wish to join,
2799 \begin_layout Plain Layout
2800 If you are a fluent speaker of a language other than English, joining these
2801 teams is a great way to give back to the LyX community!
2806 will of course try to fix these shortcomings in future versions of LyX.
2809 \begin_layout Section
2813 \begin_layout Subsection
2814 Translating the graphical user interface (text messages).
2817 \begin_layout Standard
2819 \begin_inset Flex Code
2822 \begin_layout Plain Layout
2828 library to handle the internationalization of the interface.
2829 To have LyX speak your favorite language in all menus and dialogs, you
2831 \begin_inset Flex Code
2834 \begin_layout Plain Layout
2840 -file for that language.
2841 When this is available, you'll have to generate a
2842 \begin_inset Flex Code
2845 \begin_layout Plain Layout
2851 -file from it and install the
2852 \begin_inset Flex Code
2855 \begin_layout Plain Layout
2862 The process of doing all of this is explained in the documentation for
2864 \begin_inset Flex Code
2867 \begin_layout Plain Layout
2874 It is possible to do this just for yourself, but if you're going to do
2875 it, you might as well share the results of your labors with the rest of
2877 Send a message to the LyX developers' list for more information about how
2881 \begin_layout Standard
2882 In short, this is what you should do (xx denotes the language code):
2885 \begin_layout Itemize
2886 Check out the LyX source code.
2888 \begin_inset CommandInset href
2890 name "information on the web"
2891 target "http://www.lyx.org/HowToUseSVN"
2898 \begin_layout Itemize
2900 \begin_inset Flex Code
2903 \begin_layout Plain Layout
2909 to the folder of the
2910 \begin_inset Flex Code
2913 \begin_layout Plain Layout
2921 \begin_inset Flex Code
2924 \begin_layout Plain Layout
2932 \begin_inset Flex Code
2935 \begin_layout Plain Layout
2941 doesn't exist anywhere, it can be remade with the console command
2942 \begin_inset Flex Code
2945 \begin_layout Plain Layout
2951 in that directory, or you can use an existing po-file for some other language
2955 \begin_layout Itemize
2957 \begin_inset Flex Code
2960 \begin_layout Plain Layout
2970 \begin_layout Plain Layout
2971 This is just a text file, so it can be edited in any text editor.
2972 But there are also specialized programs that support such editing, such
2977 (for all platforms) or
2986 contains a `mode' for editing
2987 \begin_inset Flex Code
2990 \begin_layout Plain Layout
3001 For some menu- and widget-labels, there are also shortcut keys that should
3003 Those keys are marked after a `|', and should be translated according to
3004 the words and phrases of the language.
3005 You should also fill also out the information at the beginning of the new
3007 \begin_inset Flex Code
3010 \begin_layout Plain Layout
3016 -file with your email-address, etc., so people know where to reach you with
3017 suggestions and entertaining flames.
3020 \begin_layout Standard
3021 If you are just doing this on your own, then:
3024 \begin_layout Itemize
3026 \begin_inset Flex Code
3029 \begin_layout Plain Layout
3036 This can be done with
3037 \begin_inset Flex Code
3040 \begin_layout Plain Layout
3041 msgfmt -o xx.mo < xx.po
3049 \begin_layout Itemize
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 -file to your locale-tree, at the correct directory for application messages
3065 xx, and under the name
3066 \begin_inset Flex Code
3069 \begin_layout Plain Layout
3076 \begin_inset space \thinspace{}
3080 \begin_inset space \space{}
3084 \begin_inset Flex Code
3087 \begin_layout Plain Layout
3088 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3098 \begin_layout Standard
3099 As said, however, it would be best if the new
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3109 -file could be added to the LyX distribution, so others can use it.
3110 Adding it involves making additional changes to LyX.
3111 So send an email to the developers' mailing list if you're interested in
3115 \begin_layout Subsubsection
3119 \begin_layout Standard
3120 Sometimes it turns out that one English message needs to be translated into
3121 different messages in the target language.
3122 One example is the message
3123 \begin_inset Flex Code
3126 \begin_layout Plain Layout
3132 which has the German translation
3140 , depending upon exactly what the English
3141 \begin_inset Quotes eld
3145 \begin_inset Quotes erd
3150 \begin_inset Flex Code
3153 \begin_layout Plain Layout
3159 does not handle such ambiguous translations.
3160 Therefore you have to add some context information to the message: Instead
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3172 \begin_inset Flex Code
3175 \begin_layout Plain Layout
3176 To[[as in 'From format x to format y']]
3182 \begin_inset Flex Code
3185 \begin_layout Plain Layout
3186 To[[as in 'From page x to page y']].
3191 Now the two occurrences of
3192 \begin_inset Flex Code
3195 \begin_layout Plain Layout
3202 \begin_inset Flex Code
3205 \begin_layout Plain Layout
3211 and can be translated correctly to
3222 \begin_layout Standard
3223 Of course the context information needs to be stripped off the original
3224 message when no translation is used.
3225 Therefore you have to put it in double square brackets at the end of the
3226 message (see the example above).
3227 The translation mechanism of LyX ensures that everything in double square
3228 brackets at the end of messages is removed before displaying the message.
3231 \begin_layout Subsection
3232 Translating the documentation.
3235 \begin_layout Standard
3236 The online documentation (in the
3237 \begin_inset Flex MenuItem
3240 \begin_layout Plain Layout
3246 -menu) can (and should!) be translated.
3247 If there are translated versions of the documentation available
3251 \begin_layout Plain Layout
3252 As of March 2008, at least some of the documents have been translated into
3253 fourteen languages, with the Tutorial available in a few more.
3258 and the locale is set accordingly, these will be used automagically by
3260 LyX looks for translated versions as
3261 \begin_inset Flex Code
3264 \begin_layout Plain Layout
3265 LyXDir/doc/xx/DocName.lyx
3271 \begin_inset Flex Code
3274 \begin_layout Plain Layout
3280 is the code for the language currently in use.
3281 If there are no translated documents, the default English versions will
3283 Note that the translated versions must have the same filenames (
3284 \begin_inset Flex Code
3287 \begin_layout Plain Layout
3293 above) as the original.
3294 If you feel up to translating the documentation (an excellent way to proof-read
3295 the original documentation by the way!), there are a few things you should
3299 \begin_layout Itemize
3300 Check out the documentation translation web page at
3301 \begin_inset CommandInset href
3303 name "http://www.lyx.org/Translation"
3304 target "http://www.lyx.org/Translation"
3309 That way, you can find out which (if any) documents have already been translate
3310 d into your language.
3311 You can also find out who (if anyone) is organizing the effort to translate
3312 the documentation into your language.
3313 If no one is organizing the effort, please let us know that you're interested.
3316 \begin_layout Standard
3317 Once you get to actually translating, here's a few hints for you that may
3321 \begin_layout Itemize
3322 Join the documentation team! There is information on how to do that in
3323 \begin_inset Flex Code
3326 \begin_layout Plain Layout
3333 \begin_inset Flex MenuItem
3336 \begin_layout Plain Layout
3337 Help\SpecialChar \menuseparator
3343 ), which by the way is the first document you should translate.
3346 \begin_layout Itemize
3347 Learn the typographic conventions for the language you are translating to.
3348 Typography is an ancient art and over the centuries, a great variety of
3349 conventions have developed throughout different parts of the world.
3350 Also study the professional terminology amongst typographers in your country.
3351 Inventing your own terminology will only confuse the users.
3354 (Warning! Typography is addictive!)
3357 \begin_layout Itemize
3358 Make a copy of the document.
3359 This will be your working copy.
3360 You can use this as your personal translated help-file by placing it in
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_layout Itemize
3375 Sometimes the original document (from the LyX-team) will be updated.
3376 Use the source viewer at
3377 \begin_inset CommandInset href
3379 name "http://www.lyx.org/trac/timeline"
3380 target "http://www.lyx.org/trac/timeline"
3384 to see what has been changed.
3385 That way you can easily see which parts of the translated document need
3389 \begin_layout Standard
3390 If you ever find an error in the original document, fix it and notify the
3391 rest of the documentation team of the changes! (You didn't forget to join
3392 the documentation team, did you?)
3395 \begin_layout Standard
3396 \begin_inset Branch OutDated
3399 \begin_layout Section
3400 International Keyboard Support
3403 \begin_layout Standard
3406 [Editor's Note: The following section is by
3414 It needs to be fixed to conform to the new Documentation Style sheet and
3415 to make use of the new v1.0 features.
3416 The whole thing also needs to be merged with the section following it.-jw
3417 It may also be badly out of date.-rh (2008)]
3420 \begin_layout Subsection
3421 Defining Own Keymaps: Keymap File Format
3424 \begin_layout Standard
3425 Let's look at a keyboard definition file a little closer.
3426 It is a plain text file defining
3429 \begin_layout Itemize
3430 key-to-key or key-to-string translations
3433 \begin_layout Itemize
3437 \begin_layout Itemize
3438 dead keys exceptions
3441 \begin_layout Standard
3442 To define key-to-key or key-to-string translation, use this command:
3445 \begin_layout Quotation
3446 \begin_inset Flex Code
3449 \begin_layout Plain Layout
3458 \begin_inset Flex Code
3461 \begin_layout Plain Layout
3470 \begin_layout Standard
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
3481 is the key to be translated and
3482 \begin_inset Flex Code
3485 \begin_layout Plain Layout
3491 is the string to be inserted into the document.
3492 To define dead keys, use:
3495 \begin_layout Quotation
3496 \begin_inset Flex Code
3499 \begin_layout Plain Layout
3508 \begin_inset Flex Code
3511 \begin_layout Plain Layout
3520 \begin_layout Standard
3522 \begin_inset Flex Code
3525 \begin_layout Plain Layout
3531 is a keyboard key and
3532 \begin_inset Flex Code
3535 \begin_layout Plain Layout
3542 The following dead keys are supported (shortcut name is in parentheses):
3545 \begin_layout Quotation
3549 \begin_inset space \hfill{}
3555 \begin_layout Quotation
3557 \begin_inset space \hfill{}
3563 \begin_layout Quotation
3565 \begin_inset space \hfill{}
3571 \begin_layout Quotation
3573 \begin_inset space \hfill{}
3579 \begin_layout Quotation
3581 \begin_inset space \hfill{}
3587 \begin_layout Quotation
3589 \begin_inset space \hfill{}
3596 \begin_layout Plain Layout
3608 \begin_layout Quotation
3610 \begin_inset space \hfill{}
3616 \begin_layout Quotation
3618 \begin_inset space \hfill{}
3625 \begin_layout Plain Layout
3637 \begin_layout Quotation
3639 \begin_inset space \hfill{}
3645 \begin_layout Quotation
3647 \begin_inset space \hfill{}
3653 \begin_layout Quotation
3655 \begin_inset space \hfill{}
3662 \begin_layout Plain Layout
3674 \begin_layout Quotation
3676 \begin_inset space \hfill{}
3683 \begin_layout Plain Layout
3695 \begin_layout Quotation
3697 \begin_inset space \hfill{}
3703 \begin_layout Quotation
3704 hungarian umlaut (hug)
3705 \begin_inset space \hfill{}
3711 \begin_layout Quotation
3713 \begin_inset space \hfill{}
3719 \begin_layout Quotation
3721 \begin_inset space \hfill{}
3728 \begin_layout Plain Layout
3740 \begin_layout Standard
3741 Since in many international keyboards there are exceptions to what some
3742 dead keys should do, you can define them using
3745 \begin_layout Quotation
3746 \begin_inset Flex Code
3749 \begin_layout Plain Layout
3757 deadkey key outstring
3760 \begin_layout Standard
3761 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3765 \begin_layout Quotation
3766 \begin_inset Flex Code
3769 \begin_layout Plain Layout
3782 \begin_layout Standard
3783 to make it work correctly.
3784 Also, you have to define as exceptions dead keys over i and j, to remove
3785 the dot from them before inserting an accent mark.
3786 I will change this when the time comes, but so far I haven't had time.
3789 \begin_layout Standard
3790 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3793 \begin_inset Flex Code
3796 \begin_layout Plain Layout
3802 have different meaning.
3804 \begin_inset Flex Code
3807 \begin_layout Plain Layout
3813 marks comments, quotes start and end LaTeX-style commands.
3814 To enter quote, you'll need to use
3815 \begin_inset Flex Code
3818 \begin_layout Plain Layout
3827 \begin_inset Flex Code
3830 \begin_layout Plain Layout
3837 \begin_inset Flex Code
3840 \begin_layout Plain Layout
3851 \begin_layout Standard
3852 If you make a keyboard description file that works for your language, please
3853 mail it to me, so I can include it in the next keymap distribution.
3856 \begin_layout Standard
3857 More keywords will be supported in keymap configuration file in future,
3861 \begin_layout Itemize
3862 \begin_inset Flex Code
3865 \begin_layout Plain Layout
3876 \begin_inset space \hfill{}
3880 \begin_inset Flex Code
3883 \begin_layout Plain Layout
3892 \begin_layout Itemize
3893 \begin_inset Flex Code
3896 \begin_layout Plain Layout
3907 \begin_inset space \hfill{}
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3920 an external keymap translation program
3923 \begin_layout Standard
3924 Also, it should look into
3925 \begin_inset Flex Code
3928 \begin_layout Plain Layout
3934 file for defaults, too (for example, a
3935 \begin_inset Flex Code
3938 \begin_layout Plain Layout
3946 option to include default keyboard).
3954 \begin_layout Section
3955 International Keymap Stuff
3956 \begin_inset CommandInset label
3958 name "sec:International-Keymap-Stuff"
3965 \begin_layout Standard
3966 \begin_inset Note Note
3969 \begin_layout Plain Layout
3970 In doing the revisions on this document in March 2008, I did not look over
3971 this stuff, as I do not understand it.
3972 It would be good if someone else could do so.
3981 \begin_layout Standard
3982 The next two sections describe the
3983 \begin_inset Flex Code
3986 \begin_layout Plain Layout
3995 \begin_inset Flex Code
3998 \begin_layout Plain Layout
4006 file syntax in detail.
4007 These sections should help you design your own key map if the ones provided
4008 do not meet your needs.
4011 \begin_layout Subsection
4015 \begin_layout Standard
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4028 file maps keystrokes to characters or strings.
4029 As the name suggests, it sets a keyboard mapping.
4031 \begin_inset Flex Code
4034 \begin_layout Plain Layout
4045 \begin_inset Flex Code
4048 \begin_layout Plain Layout
4063 \begin_inset Flex Code
4066 \begin_layout Plain Layout
4079 \begin_inset Flex Code
4082 \begin_layout Plain Layout
4091 \begin_inset Flex Code
4094 \begin_layout Plain Layout
4102 are described in this section.
4105 \begin_layout Labeling
4106 \labelwidthstring 00.00.0000
4107 \begin_inset Flex Code
4110 \begin_layout Plain Layout
4118 Map a character to a string
4121 \begin_layout LyX-Code
4136 \begin_layout Standard
4169 the double-quote (")
4186 must be escaped with a preceding backslash (
4197 \begin_layout Standard
4199 \begin_inset Flex MenuItem
4202 \begin_layout Plain Layout
4210 statement to cause the symbol
4211 \begin_inset Flex MenuItem
4214 \begin_layout Plain Layout
4222 to be output for the keystroke
4223 \begin_inset Flex MenuItem
4226 \begin_layout Plain Layout
4237 \begin_layout LyX-Code
4243 \begin_layout Labeling
4244 \labelwidthstring 00.00.0000
4245 \begin_inset Flex Code
4248 \begin_layout Plain Layout
4256 Specify an accent character
4259 \begin_layout LyX-Code
4268 \begin_layout Standard
4269 This will make the cha
4307 This is the dead key
4311 \begin_layout Plain Layout
4318 refers to a key that does not produce a character by itself, but when followed
4319 with another key, produces the desired accent character.
4320 For example, a German characte
4322 r with an umlaut like
4332 can be produced in this manner.
4341 \begin_layout Standard
4354 and then another key not in
4371 followed by the other, not allowed key, as output.
4375 \begin_inset Flex MenuItem
4378 \begin_layout Plain Layout
4386 cancels a dead key, so if
4397 \begin_inset Flex MenuItem
4400 \begin_layout Plain Layout
4409 , the cursor will not go one position backwards but will instead cancel
4425 might have had on the next keystroke.
4429 \begin_layout Standard
4430 The following example specifies that the character ' is to be an acute accent,
4431 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4434 \begin_layout LyX-Code
4437 kmod ' acute aeiouAEIOU
4440 \begin_layout Labeling
4441 \labelwidthstring 00.00.0000
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 Specify an exception to the accent character
4454 \begin_layout LyX-Code
4463 \begin_layout Standard
4464 This defines an exce
4505 have been assigned a keystroke with a previous
4508 \begin_inset Flex Code
4511 \begin_layout Plain Layout
4535 must not belong in the
4582 If such a declaration does not exist in
4590 \begin_inset Flex Code
4593 \begin_layout Plain Layout
4627 \begin_inset Flex Code
4630 \begin_layout Plain Layout
4644 \begin_layout Standard
4645 The following command produces causes äi to be produced when you enter acute-i
4649 \begin_layout LyX-Code
4663 \begin_layout Labeling
4664 \labelwidthstring 00.00.0000
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4674 Combine two accent characters
4677 \begin_layout LyX-Code
4683 accent1 accent2 allowed
4686 \begin_layout Standard
4687 This one is getting pretty esoteric.
4688 It allows you to combine the effect
4744 \begin_inset Flex Code
4747 \begin_layout Plain Layout
4775 \begin_layout Standard
4776 Consider this example from the
4777 \begin_inset Flex Code
4780 \begin_layout Plain Layout
4791 \begin_layout LyX-Code
4794 kmod ; acute aeioyvhAEIOYVH
4798 kcomb acute umlaut iyIY
4801 \begin_layout Standard
4802 This allows you to press
4803 \begin_inset Flex MenuItem
4806 \begin_layout Plain Layout
4814 and get the effect of
4815 \begin_inset Flex Code
4818 \begin_layout Plain Layout
4837 in this case cancels the last dead key, so if you press
4838 \begin_inset Flex MenuItem
4841 \begin_layout Plain Layout
4850 \begin_inset Flex Code
4853 \begin_layout Plain Layout
4866 \begin_layout Subsection
4870 \begin_layout Standard
4872 \begin_inset Flex Code
4875 \begin_layout Plain Layout
4883 mapping is performed, a
4884 \begin_inset Flex Code
4887 \begin_layout Plain Layout
4897 file maps the strings that the symbols generate to characters in the current
4899 The LyX distribution currently includes at least the
4900 \begin_inset Flex Code
4903 \begin_layout Plain Layout
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4926 \begin_layout Standard
4928 \begin_inset Flex Code
4931 \begin_layout Plain Layout
4939 file is a sequence of declarations of the form
4942 \begin_layout LyX-Code
4955 \begin_layout Standard
4956 For example, in order to map
4957 \begin_inset Flex MenuItem
4960 \begin_layout Plain Layout
4970 to the corresponding character in the iso-8859-1 set (233), the following
4974 \begin_layout LyX-Code
4982 \begin_layout Standard
4984 \begin_inset Flex Code
4987 \begin_layout Plain Layout
4996 \begin_inset Flex Code
4999 \begin_layout Plain Layout
5017 the same character can apply to more than one string.
5019 \begin_inset Flex Code
5022 \begin_layout Plain Layout
5033 \begin_layout LyX-Code
5045 \begin_inset Newline newline
5061 \begin_layout Standard
5062 If LyX cannot find a mapping for the string produced by the keystroke or
5063 a deadkey sequence, it will check if it looks like an accented char and
5064 try to draw an accent over the character on screen.
5067 \begin_layout Subsection
5071 \begin_layout Standard
5072 There is a second way to add support for international characters through
5073 so-called dead-keys.
5074 A dead-key works in combination with a letter to produce an accented character.
5075 Here, we'll explain how to create a really simple dead-key to illustrate
5079 \begin_layout Standard
5080 Suppose you happen to need the circumflex character,
5081 \begin_inset Quotes eld
5085 \begin_inset Quotes erd
5090 \begin_inset Flex MenuItem
5093 \begin_layout Plain Layout
5100 \begin_inset space ~
5104 \begin_inset Flex MenuItem
5107 \begin_layout Plain Layout
5113 ] to the LyX command
5114 \begin_inset Flex Code
5117 \begin_layout Plain Layout
5124 \begin_inset Flex Code
5127 \begin_layout Plain Layout
5134 Now, whenever you type the
5135 \begin_inset Flex MenuItem
5138 \begin_layout Plain Layout
5144 -key followed by a letter, that letter will have a circumflex accent on
5146 For example, the sequence
5147 \begin_inset Quotes eld
5151 \begin_inset Flex MenuItem
5154 \begin_layout Plain Layout
5161 \begin_inset Quotes erd
5164 produces the letter:
5165 \begin_inset Quotes eld
5169 \begin_inset Quotes erd
5173 If you tried to type
5174 \begin_inset Quotes eld
5178 \begin_inset Flex MenuItem
5181 \begin_layout Plain Layout
5188 \begin_inset Quotes erd
5191 , however, LyX will complain with a beep, since a
5192 \begin_inset Quotes eld
5196 \begin_inset Flex MenuItem
5199 \begin_layout Plain Layout
5206 \begin_inset Quotes erd
5209 never takes a circumflex accent.
5211 \begin_inset Flex MenuItem
5214 \begin_layout Plain Layout
5220 after a dead-key produces the bare-accent.
5221 Please note this last point! If you bind a key to a dead-key, you'll need
5222 to rebind the character on that key to yet another key.
5224 \begin_inset Flex MenuItem
5227 \begin_layout Plain Layout
5233 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5236 \begin_layout Standard
5237 One common way to bind dead-keys is to use
5238 \begin_inset Flex MenuItem
5241 \begin_layout Plain Layout
5248 \begin_inset Flex MenuItem
5251 \begin_layout Plain Layout
5258 \begin_inset Flex MenuItem
5261 \begin_layout Plain Layout
5267 in combination with an accent, like
5268 \begin_inset Quotes eld
5272 \begin_inset Flex MenuItem
5275 \begin_layout Plain Layout
5282 \begin_inset Quotes erd
5286 \begin_inset Quotes eld
5290 \begin_inset Flex MenuItem
5293 \begin_layout Plain Layout
5300 \begin_inset Quotes erd
5304 \begin_inset Quotes eld
5308 \begin_inset Flex MenuItem
5311 \begin_layout Plain Layout
5318 \begin_inset Quotes erd
5322 Another way involves using
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5342 to set up the special
5343 \begin_inset Flex Code
5346 \begin_layout Plain Layout
5354 \begin_inset Flex Code
5357 \begin_layout Plain Layout
5363 acts in some ways just like
5364 \begin_inset Flex MenuItem
5367 \begin_layout Plain Layout
5373 and permits you to bind keys to accented characters.
5374 You can also turn keys into dead-keys by binding them to something like
5376 \begin_inset Flex Code
5379 \begin_layout Plain Layout
5385 and then binding this symbolic key to the corresponding LyX command.
5389 \begin_layout Plain Layout
5394 : This is exactly what I do in my
5395 \begin_inset Flex Code
5398 \begin_layout Plain Layout
5405 \begin_inset Flex Code
5408 \begin_layout Plain Layout
5416 \begin_inset Flex MenuItem
5419 \begin_layout Plain Layout
5421 \begin_inset space ~
5430 \begin_inset Flex Code
5433 \begin_layout Plain Layout
5439 and a bunch of these
5440 \begin_inset Quotes eld
5444 \begin_inset Flex Code
5447 \begin_layout Plain Layout
5454 \begin_inset Quotes erd
5457 symbolic keys bound such things as
5458 \begin_inset Flex MenuItem
5461 \begin_layout Plain Layout
5463 \begin_inset space ~
5472 \begin_inset Flex MenuItem
5475 \begin_layout Plain Layout
5477 \begin_inset space ~
5486 This is how I produce my accented characters.
5491 You can make just about anything into the
5492 \begin_inset Flex Code
5495 \begin_layout Plain Layout
5502 \begin_inset Flex MenuItem
5505 \begin_layout Plain Layout
5511 keys, a spare function key, etc.
5512 As for the LyX commands that produce accents, check the entry for
5513 \begin_inset Flex Code
5516 \begin_layout Plain Layout
5527 You'll find the complete list there.
5530 \begin_layout Subsection
5531 Saving your Language Configuration
5534 \begin_layout Standard
5535 You can edit your preferences so that your desired language environment
5536 is automatically configured when LyX starts up, via the
5537 \begin_inset Flex MenuItem
5540 \begin_layout Plain Layout
5541 Edit\SpecialChar \menuseparator
5550 \begin_layout Chapter
5551 Installing New Document Classes, Layouts, and Templates
5552 \begin_inset CommandInset label
5554 name "cha:Installing-New-Document"
5559 \begin_inset Argument 1
5562 \begin_layout Plain Layout
5563 Installing New Document Classes
5571 \begin_layout Standard
5572 In this chapter, we describe the procedures for creating and installing
5573 new LyX layout and template files, as well as offer a refresher on correctly
5574 installing new LaTeX document classes.
5578 \begin_layout Standard
5579 First, let us a say a few words about how one ought to think about the relation
5580 between LyX and LaTeX.
5581 The thing to understand is that, in a certain sense, LyX doesn't know anything
5583 Indeed, from LyX's point of view, LaTeX is just one of several
5584 \begin_inset Quotes eld
5588 \begin_inset Quotes erd
5591 in which it is capable of producing output.
5592 Other such formats are DocBook, plaintext, and XHTML.
5593 LaTeX is, of course, a particularly important format, but very little of
5594 the information LyX has about LaTeX is actually contained in the program
5599 \begin_layout Plain Layout
5600 Some commands are sufficiently complex that they are
5601 \begin_inset Quotes eld
5605 \begin_inset Quotes erd
5609 But the developers generally regard this as a Bad Thing.
5614 Rather, that information, even for the standard classes like
5615 \begin_inset Flex Code
5618 \begin_layout Plain Layout
5624 , is contained in `layout files'.
5625 Similarly, LyX itself does not know much about DocBook or XHTML.
5626 What it knows is contained in layout files.
5629 \begin_layout Standard
5630 You can think of the layout file for a given document class as a translation
5631 manual between LyX constructs---paragraphs with their corresponding styles,
5632 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5634 Almost everything LyX knows about
5635 \begin_inset Flex Code
5638 \begin_layout Plain Layout
5644 , for example, is contained in the file
5645 \begin_inset Flex Code
5648 \begin_layout Plain Layout
5654 and in various other files it includes.
5655 For this reason, anyone intending to write layout files should plan to
5656 study the existing files.
5657 A good place to start is with
5658 \begin_inset Flex Code
5661 \begin_layout Plain Layout
5667 , which is included in
5668 \begin_inset Flex Code
5671 \begin_layout Plain Layout
5678 \begin_inset Flex Code
5681 \begin_layout Plain Layout
5687 , and many of the other layout files for document classes.
5688 This file is where sections and the like are defined:
5689 \begin_inset Flex Code
5692 \begin_layout Plain Layout
5698 tells LyX how paragraphs that are marked with the Section, Subsection,
5699 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5702 \begin_inset Flex Code
5705 \begin_layout Plain Layout
5711 file basically just includes several of these
5712 \begin_inset Flex Code
5715 \begin_layout Plain Layout
5724 \begin_layout Standard
5725 Defining the LyX--LaTeX correspondence is not the only thing layout files
5727 Their other job is to define how the LyX constructs themselves will appear
5729 The fact that layout files have these two jobs is often a source of confusion,
5730 because they are completely separate.
5731 Telling LyX how to translate a certain paragraph style into LaTeX does
5732 not tell LyX how to display it; conversely, telling LyX how to display
5733 a certain paragraph style does not tell LyX how to translate it into LaTeX
5734 (let alone tell LaTeX how to display it).
5735 So, in general, when you define a new LyX construct, you must always do
5736 two quite separate things: (i)
5737 \begin_inset space ~
5740 tell LyX how to translate it into LaTeX and (ii)
5741 \begin_inset space ~
5744 tell LyX how to display it.
5747 \begin_layout Standard
5748 Much the same is true, of course, as regards LyX's other backend formats,
5749 though XHTML is in some ways different, because in that case LyX
5753 able, to some extent, to use information about how it should display a
5754 paragraph on the screen to output information (in the form of CSS) about
5755 how the paragraph should be displayed in a browser.
5756 Even in this case, however, the distinction between what LyX does internally
5757 and how things are rendered externally remains in force, and the two can
5758 be controlled separately.
5760 \begin_inset CommandInset ref
5762 reference "sec:Tags-for-XHTML"
5769 \begin_layout Section
5770 Installing new LaTeX files
5773 \begin_layout Standard
5774 Some installations may not include a LaTeX package or class file that you
5775 would like to use within LyX.
5776 For example, you might need FoilTeX, a package for preparing slides for
5777 overhead projectors.
5778 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5779 a user interface for installing such packages.
5780 For example, with MiKTeX, you start the program
5781 \begin_inset Quotes eld
5785 \begin_inset space ~
5789 \begin_inset Quotes erd
5792 to get a list of available packages.
5793 To install one of them, right click on it or use the corresponding toolbar
5797 \begin_layout Standard
5798 If your LaTeX distribution does not provide such a `package manager', or
5799 if the package is not available from your distribution, then follow these
5800 steps to install it manually:
5803 \begin_layout Enumerate
5804 Get the package from
5805 \begin_inset CommandInset href
5808 target "http://www.ctan.org/"
5815 \begin_layout Enumerate
5816 If the package contains a file with the ending
5817 \begin_inset Quotes eld
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5831 \begin_inset Quotes erd
5834 (is the case for FoilTeX) then open a console, change to the folder of
5835 this file and execute the command
5836 \begin_inset Flex Code
5839 \begin_layout Plain Layout
5846 You have now unpacked the package and have all files to install it.
5847 Most LaTeX-packages are not packed and you can skip this step.
5850 \begin_layout Enumerate
5851 Now you need to decide if the package should be available for all users
5856 \begin_layout Enumerate
5857 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5858 for all users on your system, then install it in your `local' TeX tree,
5859 otherwise install it in your own `user' TeX tree.
5860 Where these trees should be created, if they do not already exist, depends
5862 To find this out, look in the file
5863 \begin_inset Flex Code
5866 \begin_layout Plain Layout
5876 \begin_layout Plain Layout
5877 This is usually in the directory
5878 \begin_inset Flex Code
5881 \begin_layout Plain Layout
5887 , though you can execute the command
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 The location of the `local' TeX tree is defined by the
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5912 variable; this is usually somewhere like
5913 \begin_inset Flex Code
5916 \begin_layout Plain Layout
5917 /usr/local/share/texmf
5923 The location of the `user' TeX tree is defined by
5924 \begin_inset Flex Code
5927 \begin_layout Plain Layout
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5944 (If these variables are not predefined, you have to define them.) You'll
5945 probably need root permissions to create or modify the `local' tree, but
5946 not for your `user' tree.
5947 \begin_inset Newline newline
5950 In general, it is recommended to install in the user tree because your user
5951 will not be modified or even overwritten when you upgrade your system.
5952 It will typically also be backed up together with everything else when
5953 you backup your home directory (which, of course, you do on a regular basis).
5956 \begin_layout Enumerate
5957 On Windows, if you want the new package to be available for all users on
5958 your system, change to the folder where LaTeX is installed and then change
5960 \begin_inset Flex Code
5963 \begin_layout Plain Layout
5974 (For MiKTeX, this would be by default the folder
5975 \begin_inset Flex Code
5978 \begin_layout Plain Layout
5996 \begin_layout Plain Layout
5997 Note that this will be the correct path only on English installations.
5998 On a German one, it would be
5999 \begin_inset Flex Code
6002 \begin_layout Plain Layout
6016 , and similarly for other languages.
6021 Create there a new folder
6022 \begin_inset Flex Code
6025 \begin_layout Plain Layout
6031 and copy all files of the package into it.
6033 \begin_inset Newline newline
6036 If the package should only available for you or you don't have admin permissions
6037 , do the same, but in the local LaTeX folder.
6039 \begin_inset space \thinspace{}
6043 \begin_inset space ~
6046 2.8 under Windows XP, this would be the folder:
6047 \begin_inset Newline newline
6053 \begin_inset Flex Code
6056 \begin_layout Plain Layout
6059 Documents and Settings
6071 \begin_inset Newline newline
6077 \begin_inset Phantom HPhantom
6080 \begin_layout Plain Layout
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6107 \begin_inset Newline newline
6110 On Vista, it would be:
6111 \begin_inset Newline newline
6115 \begin_inset Flex Code
6118 \begin_layout Plain Layout
6144 \begin_layout Enumerate
6145 Now one only need to tell LaTeX that there are new files.
6146 This depends on the used LaTeX-Distribution:
6150 \begin_layout Enumerate
6151 For TeXLive execute the command
6152 \begin_inset Flex Code
6155 \begin_layout Plain Layout
6162 If you installed the package for all users, then you will probably need
6163 to have root permissions for that.
6166 \begin_layout Enumerate
6167 For MiKTeX, if you have installed the package for all users, start the program
6169 \begin_inset Quotes eld
6173 \begin_inset space ~
6177 \begin_inset Quotes erd
6180 and press the button marked
6181 \begin_inset Quotes eld
6185 \begin_inset Quotes erd
6189 Otherwise start the program
6190 \begin_inset Quotes eld
6194 \begin_inset Quotes erd
6201 \begin_layout Enumerate
6202 Finally, you need to tell LyX that there are new packages available.
6203 So, in LyX, use the menu
6204 \begin_inset Flex MenuItem
6207 \begin_layout Plain Layout
6210 \SpecialChar \menuseparator
6216 and then restart LyX.
6219 \begin_layout Standard
6220 Now the package is installed.
6221 In our example, the document class
6222 \begin_inset Flex Code
6225 \begin_layout Plain Layout
6227 \begin_inset space ~
6234 \begin_layout Plain Layout
6246 will now be available under
6247 \begin_inset Flex MenuItem
6250 \begin_layout Plain Layout
6251 Document\SpecialChar \menuseparator
6252 Settings\SpecialChar \menuseparator
6262 \begin_layout Standard
6263 If you would like to use a LaTeX document class that is not even listed
6265 \begin_inset Flex MenuItem
6268 \begin_layout Plain Layout
6269 Document\SpecialChar \menuseparator
6270 Settings\SpecialChar \menuseparator
6276 , then you need to create a `layout' file for it.
6277 That is the topic of the next section.
6280 \begin_layout Section
6281 Types of layout files
6284 \begin_layout Standard
6285 This section describes the various sorts of LyX files that contain layout
6287 These files describe various paragraph and character styles, determining
6288 how LyX should display them and how they should be translated into LaTeX,
6289 DocBook, XHTML, or whatever output format is being used.
6293 \begin_layout Standard
6294 We shall try to provide a thorough description of the process of writing
6296 However, there are so many different types of documents supported even
6297 by just LaTeX that we can't hope to cover every different possibility or
6298 problem you might encounter.
6299 The LyX users' list is frequented by people with lots of experience with
6300 layout design who are willing to share what they've learned, so please
6301 feel free to ask questions there.
6304 \begin_layout Standard
6305 As you prepare to write a new layout, it is extremely helpful to look at
6306 the layouts distributed with LyX.
6307 If you write a LyX layout for a LaTeX document class that might also be
6308 used by others, or write a module that might be useful to others, then
6309 you should consider posting your layout to the
6310 \begin_inset CommandInset href
6312 name "layout section on the LyX wiki"
6313 target "http://wiki.lyx.org/Layouts/Layouts"
6317 or even to the LyX developers' list, so that it might be included in LyX
6322 \begin_layout Plain Layout
6323 Note that LyX is licensed under the General Public License, so any material
6324 that is contributed to LyX must be similarly licensed.
6332 \begin_layout Subsection
6334 \begin_inset CommandInset label
6336 name "sub:Layout-modules"
6343 \begin_layout Standard
6344 We have spoken to this point about `layout files'.
6345 But there are different sorts of files that contain layout information.
6346 Layout files, strictly so called, have the
6347 \begin_inset Flex Code
6350 \begin_layout Plain Layout
6356 extension and provide LyX with information about document classes.
6357 Since LyX 1.6 layout information can also be contained in layout
6362 \begin_inset Flex Code
6365 \begin_layout Plain Layout
6372 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6373 some modules—such as the
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6383 module—specifically provide support for one package.
6384 In a sense, layout modules are similar to included
6388 \begin_layout Plain Layout
6389 These can have any extension, but by convention have the
6390 \begin_inset Flex Code
6393 \begin_layout Plain Layout
6405 \begin_inset Flex Code
6408 \begin_layout Plain Layout
6414 —in that modules are not specific to a given document class but may be used
6415 with many different classes.
6416 The difference is that using an included file with
6417 \begin_inset Flex Code
6420 \begin_layout Plain Layout
6426 requires editing that file.
6427 Modules, by contrast, are selected in the
6428 \begin_inset Flex MenuItem
6431 \begin_layout Plain Layout
6432 Document\SpecialChar \menuseparator
6441 \begin_layout Standard
6442 Building modules is the easiest way to get started with layout editing,
6443 since it can be as simple as adding a single new paragraph style or flex
6445 But modules may, in principle, contain anything a layout file can contain.
6448 \begin_layout Standard
6449 After creating a new module and copying it to the
6450 \begin_inset Flex Code
6453 \begin_layout Plain Layout
6459 folder, you will need to reconfigure and then restart LyX for the module
6460 to appear in the menu.
6461 However, changes you make to the module will be seen immediately, if you
6463 \begin_inset Flex MenuItem
6466 \begin_layout Plain Layout
6467 Document\SpecialChar \menuseparator
6473 , highlight something, and then hit
6474 \begin_inset Quotes eld
6478 \begin_inset Quotes erd
6484 It is strongly recommended that you save your work before doing this
6489 it is strongly recommended that you not attempt to edit modules while simultaneo
6490 usly working on actual documents
6493 Though of course the developers strive to keep LyX stable in such situations,
6494 syntax errors and the like in your module file could cause strange behavior.
6497 \begin_layout Subsubsection
6501 \begin_layout Standard
6502 Modules are to LyX as packages are to LaTeX.
6503 Sometimes, however, you find yourself wanting a specific inset or character
6504 style just for one document and writing a module that will also be available
6505 to other documents makes little sense.
6506 What you need is LyX's
6507 \begin_inset Quotes eld
6511 \begin_inset Quotes erd
6517 \begin_layout Standard
6518 You will find it under
6520 Document\SpecialChar \menuseparator
6521 Settings\SpecialChar \menuseparator
6525 The large text box allows you to enter anything that you might enter in
6526 a layout file or module.
6527 You can think of a document's local layout, in fact, as a module that belongs
6529 So, in particular, you must enter a
6530 \begin_inset Flex Code
6533 \begin_layout Plain Layout
6540 Any format is acceptable, but one would normally use the format current
6542 (In LyX 2.1, the current layout format is 48.) You should be aware that local
6543 layout is not supported by versions of LyX prior to 1.6, so you should not
6544 use it if you want to be able to export your document to LyX 1.5 or earlier
6545 (without, that is, losing the local layout information).
6546 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6547 though there is no UI for it---then you should use format 11 and, of course,
6548 use only layout constructs that were available in LyX 1.6.
6551 \begin_layout Standard
6552 When you have entered something in the
6553 \begin_inset Flex Code
6556 \begin_layout Plain Layout
6562 pane, LyX will enable the
6563 \begin_inset Quotes eld
6567 \begin_inset Quotes erd
6570 button at the bottom.
6571 Clicking this button will cause LyX to determine whether what you have
6572 entered is valid layout information for the chosen format.
6573 LyX will report the result but, unfortunately, will not tell you what errors
6574 there might have been.
6575 These will be written to the terminal, however, if LyX is started from
6577 You will not be permitted to save your local layout until you have entered
6581 \begin_layout Standard
6582 The warnings at the end of the previous section apply here, too.
6583 Do not play with local layout while you are actually working, especially
6584 if you have not saved your document.
6585 That said, using local layout with a test document can be a very convenient
6586 way to try out layout ideas, or even to start developing a module.
6589 \begin_layout Subsection
6591 \begin_inset Flex MenuItem
6594 \begin_layout Plain Layout
6603 \begin_layout Standard
6604 There are two situations you are likely to encounter when wanting to support
6605 a new LaTeX document class, involving style (
6606 \begin_inset Flex Code
6609 \begin_layout Plain Layout
6615 ) files and LaTeX2e class (
6616 \begin_inset Flex Code
6619 \begin_layout Plain Layout
6626 Supporting a style file is usually fairly easy.
6627 Supporting a new class file is a bit harder.
6628 We'll discuss the former in this section and the latter in the next.
6629 Similar remarks apply, of course, if you want to support a new DocBook
6633 \begin_layout Standard
6634 The easier case is the one in which your new document class is provided
6635 as a style file that is to be used in conjunction with an already supported
6637 For the sake of the example, we'll assume that the style file is called
6639 \begin_inset Flex MenuItem
6642 \begin_layout Plain Layout
6648 and that it is meant to be used with
6649 \begin_inset Flex MenuItem
6652 \begin_layout Plain Layout
6658 , which is a standard class.
6662 \begin_layout Standard
6663 Start by copying the existing class's layout file into your local directory:
6667 \begin_layout Plain Layout
6668 Of course, which directory is your local directory will vary by platform,
6669 and LyX allows you to specify your local directory on startup, too, using
6671 \begin_inset Flex Code
6674 \begin_layout Plain Layout
6688 \begin_layout LyX-Code
6689 cp report.layout ~/.lyx/layouts/myclass.layout
6692 \begin_layout Standard
6694 \begin_inset Flex Code
6697 \begin_layout Plain Layout
6703 and change the line:
6706 \begin_layout LyX-Code
6709 DeclareLaTeXClass{report}
6712 \begin_layout Standard
6716 \begin_layout LyX-Code
6719 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6722 \begin_layout Standard
6726 \begin_layout LyX-Code
6728 \begin_inset Newline newline
6734 \begin_inset Newline newline
6740 \begin_layout Standard
6741 near the top of the file.
6744 \begin_layout Standard
6745 Start LyX and select
6746 \begin_inset Flex MenuItem
6749 \begin_layout Plain Layout
6750 Tools\SpecialChar \menuseparator
6757 Then restart LyX and try creating a new document.
6759 \begin_inset Flex MenuItem
6762 \begin_layout Plain Layout
6768 " as a document class option in the
6769 \begin_inset Flex MenuItem
6772 \begin_layout Plain Layout
6773 Document\SpecialChar \menuseparator
6780 It is likely that some of the sectioning commands and such in your new
6781 class will work differently from how they worked in the base class—
6782 \begin_inset Flex Code
6785 \begin_layout Plain Layout
6791 in this example—so you can fiddle around with the settings for the different
6792 sections if you wish.
6793 The layout information for sections is contained in
6794 \begin_inset Flex Code
6797 \begin_layout Plain Layout
6803 , but you do not need to copy and change this file.
6804 Instead, you can simply add your changes to your layout file, after the
6806 \begin_inset Flex Code
6809 \begin_layout Plain Layout
6815 , which itself includes
6816 \begin_inset Flex Code
6819 \begin_layout Plain Layout
6826 For example, you might add these lines:
6829 \begin_layout LyX-Code
6833 \begin_layout LyX-Code
6837 \begin_layout LyX-Code
6841 \begin_layout LyX-Code
6845 \begin_layout LyX-Code
6849 \begin_layout Standard
6850 to change the font for chapter headings to sans-serif.
6851 This will override (or, in this case, add to) the existing declaration
6852 for the Chapter style.
6856 \begin_layout Standard
6857 Your new package may also provide commands or environments not present in
6859 In this case, you will want to add these to the layout file.
6861 \begin_inset CommandInset ref
6863 reference "sec:TextClass"
6867 for information on how to do so.
6870 \begin_layout Standard
6872 \begin_inset Flex MenuItem
6875 \begin_layout Plain Layout
6881 can be used with several different document classes, and even if it cannot,
6882 you might find it easiest just to write a module that you can load with
6884 The simplest possible such module would be:
6887 \begin_layout LyX-Code
6890 DeclareLyXModule{My Package}
6893 \begin_layout LyX-Code
6897 \begin_layout LyX-Code
6898 #Support for mypkg.sty.
6901 \begin_layout LyX-Code
6903 \begin_inset Newline newline
6909 \begin_layout LyX-Code
6911 \begin_inset Newline newline
6917 \begin_layout LyX-Code
6919 \begin_inset Newline newline
6925 \begin_inset Newline newline
6931 \begin_layout Standard
6932 A more complex module might modify the behavior of some existing constructs
6933 or define some new ones.
6935 \begin_inset CommandInset ref
6937 reference "sec:TextClass"
6944 \begin_layout Subsection
6946 \begin_inset Flex MenuItem
6949 \begin_layout Plain Layout
6958 \begin_layout Standard
6959 There are two possibilities here.
6960 One is that the class file is itself based upon an existing document class.
6961 For example, many thesis classes are based upon
6962 \begin_inset Flex MenuItem
6965 \begin_layout Plain Layout
6972 To see whether yours is, look for a line like
6975 \begin_layout LyX-Code
6981 \begin_layout Standard
6983 If so, then you may proceed largely as in the previous section, though
6985 \begin_inset Flex Code
6988 \begin_layout Plain Layout
6994 line will be different.
6995 If your new class is
6996 \begin_inset Flex Code
6999 \begin_layout Plain Layout
7005 and it is based upon
7006 \begin_inset Flex Code
7009 \begin_layout Plain Layout
7015 , then the line should read:
7019 \begin_layout Plain Layout
7020 And it will be easiest if you save the file to
7021 \begin_inset Flex Code
7024 \begin_layout Plain Layout
7030 : LyX assumes that the document class has the same name as the layout file.
7039 \begin_layout LyX-Code
7042 DeclareLaTeXClass[thesis,book]{thesis}
7045 \begin_layout Standard
7046 If, on the other hand, the new class is not based upon an existing class,
7047 you will probably have to
7048 \begin_inset Quotes eld
7052 \begin_inset Quotes erd
7056 We strongly suggest copying an existing layout file which uses a similar
7057 LaTeX class and then modifying it, if you can do so.
7058 At least use an existing file as a starting point so you can find out what
7059 items you need to worry about.
7060 Again, the specifics are covered below.
7063 \begin_layout Subsection
7065 \begin_inset CommandInset label
7067 name "sub:Creating-Templates"
7074 \begin_layout Standard
7075 Once you have written a layout file for a new document class, you might
7076 want to consider writing a
7081 A template acts as a kind of tutorial for your layout, showing how it might
7082 be used, though containing dummy content.
7083 You can of course look at the various templates included with LyX for ideas.
7086 \begin_layout Standard
7087 Templates are created just like usual documents: using LyX.
7088 The only difference is that usual documents contain all possible settings,
7089 including the font scheme and the paper size.
7090 Usually a user doesn't want a template to overwrite his preferred settings
7091 for such parameters.
7092 For that reason, the designer of a template should remove the corresponding
7094 \begin_inset Flex Code
7097 \begin_layout Plain Layout
7106 \begin_inset Flex Code
7109 \begin_layout Plain Layout
7117 from the template LyX file.
7118 This can be done with any simple text-editor, for example
7119 \begin_inset Flex Code
7122 \begin_layout Plain Layout
7129 \begin_inset Flex Code
7132 \begin_layout Plain Layout
7141 \begin_layout Standard
7142 Put the edited template files you create in
7143 \begin_inset Flex Code
7146 \begin_layout Plain Layout
7152 , copy the ones you use from the global template directory in
7153 \begin_inset Flex Code
7156 \begin_layout Plain Layout
7162 to the same place, and redefine the template path in the
7163 \begin_inset Flex MenuItem
7166 \begin_layout Plain Layout
7167 Tools\SpecialChar \menuseparator
7168 Preferences\SpecialChar \menuseparator
7177 \begin_layout Standard
7178 Note, by the way, that there is a template which has a particular meaning:
7180 \begin_inset Flex Code
7183 \begin_layout Plain Layout
7190 This template is loaded every time you create a new document with
7191 \begin_inset Flex MenuItem
7194 \begin_layout Plain Layout
7195 File\SpecialChar \menuseparator
7201 in order to provide useful defaults.
7202 To create this template from inside LyX, all you have to do is to open
7203 a document with the correct settings, and use the
7204 \begin_inset Flex MenuItem
7207 \begin_layout Plain Layout
7208 Save as Document Defaults
7216 \begin_layout Subsection
7217 Upgrading old layout files
7220 \begin_layout Standard
7221 The format of layout files changes with each LyX release, so old layout
7222 files need to be converted to the new format.
7223 If LyX reads a layout file in an older format, it automatically calls the
7225 \begin_inset Flex Code
7228 \begin_layout Plain Layout
7234 to convert it to a temporary file in current format.
7235 The original file is left untouched.
7236 If you use the layout file often, then, you may want to convert it permanently,
7237 so that LyX does not have to do so itself every time.
7238 To do this, you can call the converter manually:
7241 \begin_layout Enumerate
7243 \begin_inset Flex Code
7246 \begin_layout Plain Layout
7253 \begin_inset Flex Code
7256 \begin_layout Plain Layout
7265 \begin_layout Enumerate
7267 \begin_inset Newline newline
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7275 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7281 \begin_inset Newline newline
7285 \begin_inset Flex Code
7288 \begin_layout Plain Layout
7294 is the name of your LyX system directory.
7297 \begin_layout Standard
7298 Note that manual conversion does not affect included files, so these will
7299 have to be converted separately.
7302 \begin_layout Section
7303 \begin_inset CommandInset label
7305 name "sec:TextClass"
7309 The layout file format
7312 \begin_layout Standard
7313 The following sections describe how layout files are structured and written.
7314 Our advice is to go slowly, save and test often.
7315 It is really not that hard, except that the multitude of options can become
7316 overwhelming, especially if you try to check out too many at once.
7317 It becomes easier if you use existing layouts of LyX as examples/reference
7318 or if you modify an existing layout to your needs.
7321 \begin_layout Standard
7322 Note that all the tags used in layout files are case-insensitive.
7324 \begin_inset Flex Code
7327 \begin_layout Plain Layout
7334 \begin_inset Flex Code
7337 \begin_layout Plain Layout
7344 \begin_inset Flex Code
7347 \begin_layout Plain Layout
7353 are really the same tag.
7354 The possible arguments are printed in brackets after the tag's name.
7355 The default argument is typeset
7356 \begin_inset Flex Code
7359 \begin_layout Plain Layout
7368 If the argument has a data type like
7369 \begin_inset Quotes eld
7373 \begin_inset Quotes erd
7377 \begin_inset Quotes eld
7381 \begin_inset Quotes erd
7384 , the default is shown like this:
7385 \begin_inset Flex Code
7388 \begin_layout Plain Layout
7399 \begin_layout Subsection
7400 The document class declaration and classification
7403 \begin_layout Standard
7404 Lines in a layout file which begin with
7405 \begin_inset Flex Code
7408 \begin_layout Plain Layout
7415 There is one exception to this rule.
7417 \begin_inset Flex Code
7420 \begin_layout Plain Layout
7426 files should begin with lines like:
7429 \begin_layout LyX-Code
7432 #% Do not delete the line below; configure depends on this
7435 \begin_layout LyX-Code
7446 \begin_layout Plain Layout
7455 eXClass{Article (Standard Class)}
7458 \begin_layout LyX-Code
7463 DeclareCategory{Articles}
7466 \begin_layout Standard
7467 The second and third lines are used when you (re)configure LyX.
7468 The layout file is read by the LaTeX script
7469 \begin_inset Flex Code
7472 \begin_layout Plain Layout
7478 , in a special mode where
7479 \begin_inset Flex Code
7482 \begin_layout Plain Layout
7489 The first line is just a LaTeX comment, the second one contains the mandatory
7490 declaration of the text class and the third line contains the optional
7491 classification of the class.
7492 If these lines appear in a file named
7493 \begin_inset Flex Code
7496 \begin_layout Plain Layout
7502 , then they define a text class of name
7503 \begin_inset Flex Code
7506 \begin_layout Plain Layout
7512 (the name of the layout file) which uses the LaTeX document class
7513 \begin_inset Flex Code
7516 \begin_layout Plain Layout
7522 (the default is to use the same name as the layout).
7524 \begin_inset Quotes eld
7527 Article (Standard Class)
7528 \begin_inset Quotes erd
7531 that appears above is used as a description of the text class in the
7532 \begin_inset Flex MenuItem
7535 \begin_layout Plain Layout
7536 Document\SpecialChar \menuseparator
7544 \begin_inset Quotes eld
7548 \begin_inset Quotes erd
7551 in the example) is also used in the
7552 \begin_inset Flex MenuItem
7555 \begin_layout Plain Layout
7556 Document\SpecialChar \menuseparator
7562 dialog: the text classes are grouped by these categories (which are usually
7563 genres, so typical categories are
7564 \begin_inset Quotes eld
7568 \begin_inset Quotes erd
7572 \begin_inset Quotes eld
7576 \begin_inset Quotes erd
7580 \begin_inset Quotes eld
7584 \begin_inset Quotes erd
7588 \begin_inset Quotes eld
7592 \begin_inset Quotes erd
7596 \begin_inset Quotes eld
7600 \begin_inset Quotes erd
7604 \begin_inset Quotes eld
7608 \begin_inset Quotes erd
7612 If no category has been declared, the class will be put in the
7613 \begin_inset Quotes eld
7617 \begin_inset Quotes erd
7623 \begin_layout Standard
7624 Let's assume that you wrote your own text class that uses the
7625 \begin_inset Flex Code
7628 \begin_layout Plain Layout
7634 document class, but where you changed the appearance of the section headings.
7635 If you put it in a file
7636 \begin_inset Flex Code
7639 \begin_layout Plain Layout
7645 , the header of this file should be:
7648 \begin_layout LyX-Code
7651 #% Do not delete the line below; configure depends on this
7654 \begin_layout LyX-Code
7665 \begin_layout Plain Layout
7674 eXClass[article]{Article (with My Own Headings)}
7677 \begin_layout LyX-Code
7682 DeclareCategory{Articles}
7685 \begin_layout Standard
7686 This declares a text class
7687 \begin_inset Flex Code
7690 \begin_layout Plain Layout
7696 , associated with the LaTeX document class
7697 \begin_inset Flex Code
7700 \begin_layout Plain Layout
7707 \begin_inset Quotes eld
7710 Article (with My Own Headings)
7711 \begin_inset Quotes erd
7715 If your text class depends on several packages, you can declare it as:
7718 \begin_layout LyX-Code
7721 #% Do not delete the line below; configure depends on this
7724 \begin_layout LyX-Code
7735 \begin_layout Plain Layout
7744 eXClass[article,foo.sty]{Article (with My Own Headings)}
7747 \begin_layout LyX-Code
7752 DeclareCategory{Articles}
7755 \begin_layout Standard
7756 This indicates that your text class uses the
7757 \begin_inset Flex Code
7760 \begin_layout Plain Layout
7767 Finally, it is also possible to declare classes for DocBook code.
7768 Typical declarations will look like:
7771 \begin_layout LyX-Code
7774 #% Do not delete the line below; configure depends on this
7777 \begin_layout LyX-Code
7782 DeclareDocBookClass[article]{SGML (DocBook Article)}
7785 \begin_layout LyX-Code
7790 DeclareCategory{Articles (DocBook)}
7793 \begin_layout Standard
7794 Note that these declarations can also be given an optional parameter declaring
7795 the name of the document class (but not a list).
7798 \begin_layout Standard
7799 So, to be as explicit as possible, the form of the layout declaration is:
7802 \begin_layout LyX-Code
7813 \begin_layout Plain Layout
7822 eXClass[class,package.sty]{layout description}
7825 \begin_layout LyX-Code
7830 DeclareCategory{category}
7833 \begin_layout Standard
7834 The class need only be specified if the name of the LaTeX class file and
7835 the name of the layout file are different or if there are packages to load.
7836 If the name of the class file is not specified, then LyX will simply assume
7837 that it is the same as the name of the layout file.
7840 \begin_layout Standard
7841 When the text class has been modified to your taste, all you have to do
7842 is to copy it either to
7843 \begin_inset Flex Code
7846 \begin_layout Plain Layout
7853 \begin_inset Flex Code
7856 \begin_layout Plain Layout
7863 \begin_inset Flex MenuItem
7866 \begin_layout Plain Layout
7867 Tools\SpecialChar \menuseparator
7873 , exit LyX and restart.
7874 Then your new text class should be available along with the others.
7877 \begin_layout Standard
7878 Once the layout file is installed, you can edit it and see your changes
7879 without having to reconfigure or to restart LyX.
7884 \begin_layout Plain Layout
7885 In versions of LyX prior to 1.6, this was not true.
7886 As a result, editing layout files was very time consuming, since you had
7887 constantly to restart LyX to see changes.
7892 You can force a reload of the current layout by using the LyX function
7894 \begin_inset Flex MenuItem
7897 \begin_layout Plain Layout
7904 There is no default binding for this function—though, of course, you can
7905 bind it to a key yourself.
7906 But you will normally use this function simply by entering it in the mini-buffe
7911 \begin_layout Standard
7917 \begin_inset Flex MenuItem
7920 \begin_layout Plain Layout
7926 is very much an `advanced feature'.
7931 recommended that you save your work before using this function.
7936 recommended that you not attempt to edit layout information while simultaneousl
7937 y working on a document that you care about.
7938 Use a test document.
7939 Syntax errors and the like in your layout file could cause peculiar behavior.
7940 In particular, such errors could cause LyX to regard the current layout
7941 as invalid and to attempt to switch to some other layout.
7945 \begin_layout Plain Layout
7946 Really bad syntax errors may even caused LyX to exit.
7947 This is because certain sorts of errors may make LyX unable to read
7957 The LyX team strives to keep LyX stable in such situations, but safe is
7962 \begin_layout Plain Layout
7963 While we're giving advice: make regular backups.
7964 And be nice to your mother.
7972 \begin_layout Subsection
7973 The Module declaration
7976 \begin_layout Standard
7977 A module must begin with a line like the following:
7980 \begin_layout LyX-Code
7987 \begin_layout Plain Layout
7994 yXModule[endnotes.sty]{Endnotes}
7997 \begin_layout Standard
7998 The mandatory argument, in curly brackets, is the name of the module, as
8000 \begin_inset Flex MenuItem
8003 \begin_layout Plain Layout
8004 Document\SpecialChar \menuseparator
8005 Settings\SpecialChar \menuseparator
8012 The argument in square brackets is optional: It declares any LaTeX packages
8013 on which the module depends.
8014 It is also possible to use the form
8015 \begin_inset Flex MenuItem
8018 \begin_layout Plain Layout
8024 as an optional argument, which declares that the module can only be used
8025 when there exists a conversion chain between the formats `
8026 \begin_inset Flex Code
8029 \begin_layout Plain Layout
8036 \begin_inset Flex Code
8039 \begin_layout Plain Layout
8048 \begin_layout Standard
8049 The module declaration should then be followed by lines like the following
8053 \begin_layout Plain Layout
8054 Preferably in English if the module should be published with LyX.
8055 This description will appear in the list of messages to be translated and
8056 will be thus translated with the next interface update.
8064 \begin_layout LyX-Code
8068 \begin_layout LyX-Code
8069 #Adds an endnote command, in addition to footnotes.
8073 \begin_layout LyX-Code
8074 #You will need to add
8076 theendnotes in TeX code where you
8079 \begin_layout LyX-Code
8080 #want the endnotes to appear.
8084 \begin_layout LyX-Code
8088 \begin_layout LyX-Code
8089 #Requires: somemodule | othermodule
8092 \begin_layout LyX-Code
8093 #Excludes: badmodule
8096 \begin_layout Standard
8097 The description is used in
8098 \begin_inset Flex MenuItem
8101 \begin_layout Plain Layout
8102 Document\SpecialChar \menuseparator
8103 Settings\SpecialChar \menuseparator
8109 to provide the user with information about what the module does.
8111 \begin_inset Flex Code
8114 \begin_layout Plain Layout
8120 line is used to identify other modules with which this one must be used;
8122 \begin_inset Flex Code
8125 \begin_layout Plain Layout
8131 line is used to identify modules with which this one may not be used.
8132 Both are optional, and, as shown, multiple modules should be separated
8133 with the pipe symbol: |.
8134 Note that the required modules are treated disjunctively:
8138 of the required modules must be used.
8143 excluded module may be used.
8144 Note that modules are identified here by their filenames without the
8145 \begin_inset Flex Code
8148 \begin_layout Plain Layout
8156 \begin_inset Flex Code
8159 \begin_layout Plain Layout
8166 \begin_inset Flex Code
8169 \begin_layout Plain Layout
8178 \begin_layout Subsection
8182 \begin_layout Standard
8183 The first non-comment line of any layout file, included file, or module
8188 contain the file format number:
8191 \begin_layout Description
8192 \begin_inset Flex Code
8195 \begin_layout Plain Layout
8202 \begin_inset Flex Code
8205 \begin_layout Plain Layout
8211 ] The format number of the layout file.
8214 \begin_layout Standard
8215 This tag was introduced with LyX
8216 \begin_inset space ~
8220 Layout files from older LyX versions do not have an explicit file format
8221 and are considered to have
8222 \begin_inset Flex Code
8225 \begin_layout Plain Layout
8227 \begin_inset space ~
8236 The format for the present version of LyX is format 35.
8237 But each version of LyX is capable of reading earlier versions' layout
8238 files, just as they are capable of reading files produced by earlier versions
8240 There is, however, no provision for converting to earlier formats.
8243 \begin_layout Subsection
8244 \begin_inset CommandInset label
8246 name "sub:General-text-class"
8250 General text class parameters
8253 \begin_layout Standard
8254 These are general parameters that govern the behavior of an entire document
8260 mean that they must appear in
8261 \begin_inset Flex Code
8264 \begin_layout Plain Layout
8270 files rather than in modules.
8271 A module can contain any layout tag.)
8274 \begin_layout Description
8275 \begin_inset Flex Code
8278 \begin_layout Plain Layout
8284 Adds information that will be output in the
8285 \begin_inset Flex Code
8288 \begin_layout Plain Layout
8294 block when the document is output to XHTML.
8295 Typically, this would be used to output CSS style information, but it can
8296 be used for anything that can appear in
8297 \begin_inset Flex Code
8300 \begin_layout Plain Layout
8308 \begin_inset Quotes eld
8312 \begin_inset Flex Code
8315 \begin_layout Plain Layout
8322 \begin_inset Quotes erd
8328 \begin_layout Description
8329 \begin_inset Flex Code
8332 \begin_layout Plain Layout
8338 Adds information to the document preamble.
8340 \begin_inset Newline newline
8344 \begin_inset Quotes eld
8348 \begin_inset Flex Code
8351 \begin_layout Plain Layout
8358 \begin_inset Quotes erd
8364 \begin_layout Description
8365 \begin_inset Flex Code
8368 \begin_layout Plain Layout
8374 Defines formats for use in the display of bibliographic information.
8376 \begin_inset CommandInset ref
8378 reference "sub:Citation-format-description"
8384 \begin_inset Quotes eld
8388 \begin_inset Flex Code
8391 \begin_layout Plain Layout
8398 \begin_inset Quotes erd
8404 \begin_layout Description
8405 \begin_inset Flex Code
8408 \begin_layout Plain Layout
8414 Describes various global options supported by the document class.
8416 \begin_inset CommandInset ref
8418 reference "sub:ClassOptions"
8424 \begin_inset Quotes eld
8428 \begin_inset Flex Code
8431 \begin_layout Plain Layout
8438 \begin_inset Quotes erd
8444 \begin_layout Description
8445 \begin_inset Flex Code
8448 \begin_layout Plain Layout
8455 \begin_inset Flex Code
8458 \begin_layout Plain Layout
8467 \begin_inset space \thinspace{}
8471 \begin_inset Flex Code
8474 \begin_layout Plain Layout
8480 ] Whether the class should
8484 to having one or two columns.
8485 Can be changed in the
8486 \begin_inset Flex MenuItem
8489 \begin_layout Plain Layout
8490 Document\SpecialChar \menuseparator
8499 \begin_layout Description
8500 \begin_inset Flex Code
8503 \begin_layout Plain Layout
8510 \begin_inset Flex Code
8513 \begin_layout Plain Layout
8519 ] This sequence defines the properties for a counter.
8520 If the counter does not yet exist, it is created; if it does exist, it
8523 \begin_inset Quotes eld
8527 \begin_inset Flex Code
8530 \begin_layout Plain Layout
8537 \begin_inset Quotes erd
8541 \begin_inset Newline newline
8545 \begin_inset CommandInset ref
8547 reference "sub:Counters"
8551 for details on counters.
8554 \begin_layout Description
8555 \begin_inset Flex Code
8558 \begin_layout Plain Layout
8564 Sets the default font used to display the document.
8566 \begin_inset CommandInset ref
8568 reference "sub:Font-description"
8572 for how to declare fonts.
8574 \begin_inset Quotes eld
8578 \begin_inset Flex Code
8581 \begin_layout Plain Layout
8588 \begin_inset Quotes erd
8594 \begin_layout Description
8595 \begin_inset Flex Code
8598 \begin_layout Plain Layout
8605 \begin_inset Flex Code
8608 \begin_layout Plain Layout
8614 ] Specifies a module to be included by default with this document class.
8615 The module is specified as filename without the
8616 \begin_inset Flex Code
8619 \begin_layout Plain Layout
8626 The user can still remove the module, but it will be active at the outset.
8627 (This applies only when new files are created, or when this class is chosen
8628 for an existing document.)
8631 \begin_layout Description
8632 \begin_inset Flex Code
8635 \begin_layout Plain Layout
8642 \begin_inset Flex Code
8645 \begin_layout Plain Layout
8651 ] This is the style that will be assigned to new paragraphs, usually
8652 \begin_inset Flex MenuItem
8655 \begin_layout Plain Layout
8662 This will default to the first defined style if not given, but you are
8663 encouraged to use this directive.
8666 \begin_layout Description
8667 \begin_inset Flex Code
8670 \begin_layout Plain Layout
8677 \begin_inset Flex Code
8680 \begin_layout Plain Layout
8686 ] This tag indicates that the module (which is specified by filename without
8688 \begin_inset Flex Code
8691 \begin_layout Plain Layout
8697 extension) cannot be used with this document class.
8698 This might be used in a journal-specific layout file to prevent, say, the
8700 \begin_inset Flex Code
8703 \begin_layout Plain Layout
8709 module that numbers theorems by section.
8714 be used in a module.
8715 Modules have their own way of excluding other modules (see
8716 \begin_inset CommandInset ref
8718 reference "sub:Layout-modules"
8725 \begin_layout Description
8726 \begin_inset Flex Code
8729 \begin_layout Plain Layout
8735 Defines a new float.
8737 \begin_inset CommandInset ref
8739 reference "sub:Floats"
8745 \begin_inset Quotes eld
8749 \begin_inset Flex Code
8752 \begin_layout Plain Layout
8759 \begin_inset Quotes erd
8765 \begin_layout Description
8766 \begin_inset Flex Code
8769 \begin_layout Plain Layout
8775 Sets the information that will be output in the
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8785 block when this document class is output to XHTML.
8786 Note that this will completely override any prior
8787 \begin_inset Flex Code
8790 \begin_layout Plain Layout
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8808 \begin_inset Newline newline
8812 \begin_inset Flex Code
8815 \begin_layout Plain Layout
8821 if you just want to add material to the preamble.) Must end with
8822 \begin_inset Quotes eld
8826 \begin_inset Flex Code
8829 \begin_layout Plain Layout
8836 \begin_inset Quotes erd
8842 \begin_layout Description
8843 \begin_inset Flex Code
8846 \begin_layout Plain Layout
8853 \begin_inset Flex Code
8856 \begin_layout Plain Layout
8862 ] The style to use for the table of contents, bibliography, and so forth,
8863 when the document is output to HTML.
8864 For articles, this should normally be
8865 \begin_inset Flex Code
8868 \begin_layout Plain Layout
8875 \begin_inset Flex Code
8878 \begin_layout Plain Layout
8885 If it is not given, then LyX will attempt to figure out which layout to
8889 \begin_layout Description
8890 \begin_inset Flex Code
8893 \begin_layout Plain Layout
8900 \begin_inset Flex Code
8903 \begin_layout Plain Layout
8909 ] Modifies the properties of the given counter.
8910 If the counter does not exist, the statement is ignored.
8912 \begin_inset Quotes eld
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8926 \begin_inset Quotes erd
8930 \begin_inset Newline newline
8934 \begin_inset CommandInset ref
8936 reference "sub:Counters"
8940 for details on counters.
8943 \begin_layout Description
8944 \begin_inset Flex Code
8947 \begin_layout Plain Layout
8954 \begin_inset Flex Code
8957 \begin_layout Plain Layout
8963 ] Modifies the properties of the given paragraph style.
8964 If the style does not exist, the statement is ignored.
8966 \begin_inset Quotes eld
8970 \begin_inset Flex Code
8973 \begin_layout Plain Layout
8980 \begin_inset Quotes erd
8986 \begin_layout Description
8987 \begin_inset Flex Code
8990 \begin_layout Plain Layout
8997 \begin_inset Flex Code
9000 \begin_layout Plain Layout
9006 ] This allows you to include another layout definition file within yours
9007 to avoid duplicating commands.
9008 Common examples are the standard layout files, for example,
9009 \begin_inset Flex Code
9012 \begin_layout Plain Layout
9018 , which contains most of the basic layouts.
9021 \begin_layout Description
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Flex Code
9035 \begin_layout Plain Layout
9041 ] This section (re-)defines the layout of an inset.
9042 It can be applied to an existing inset or to a new, user-defined inset,
9043 e.g., a new character style.
9045 \begin_inset Quotes eld
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9059 \begin_inset Quotes erd
9063 \begin_inset Newline newline
9067 \begin_inset CommandInset ref
9069 reference "sub:Flex-insets-and"
9073 for more information.
9077 \begin_layout Description
9078 \begin_inset Flex Code
9081 \begin_layout Plain Layout
9088 \begin_inset Flex Code
9091 \begin_layout Plain Layout
9097 ] A string that indicates the width of the left margin on the screen, for
9099 \begin_inset Quotes eld
9103 \begin_inset Flex Code
9106 \begin_layout Plain Layout
9113 \begin_inset Quotes erd
9117 (Note that this is not a `length', like
9118 \begin_inset Quotes eld
9122 \begin_inset Quotes erd
9128 \begin_layout Description
9129 \begin_inset Flex Code
9132 \begin_layout Plain Layout
9139 \begin_inset Flex Code
9142 \begin_layout Plain Layout
9148 ] Deletes an existing counter, usually one defined in an included file.
9151 \begin_layout Description
9152 \begin_inset Flex Code
9155 \begin_layout Plain Layout
9162 \begin_inset Flex Code
9165 \begin_layout Plain Layout
9171 ] Deletes an existing float.
9172 This is particularly useful when you want to suppress a float that has
9173 been defined in an input file.
9176 \begin_layout Description
9177 \begin_inset Flex Code
9180 \begin_layout Plain Layout
9187 \begin_inset Flex Code
9190 \begin_layout Plain Layout
9196 ] Deletes an existing style.
9199 \begin_layout Description
9200 \begin_inset Flex Code
9203 \begin_layout Plain Layout
9210 \begin_inset Flex Code
9213 \begin_layout Plain Layout
9219 ] The file format (as defined in the LyX preferences) produced by this document
9221 It is mainly useful when
9222 \begin_inset Flex Code
9225 \begin_layout Plain Layout
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9241 and one wants to define a new type of literate document.
9242 The format is reset to
9243 \begin_inset Quotes eld
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9257 \begin_inset Quotes erd
9261 \begin_inset Quotes eld
9265 \begin_inset Flex Code
9268 \begin_layout Plain Layout
9275 \begin_inset Quotes erd
9278 when the corresponding
9279 \begin_inset Flex Code
9282 \begin_layout Plain Layout
9288 parameter is encountered.
9291 \begin_layout Description
9292 \begin_inset Flex Code
9295 \begin_layout Plain Layout
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9316 \begin_inset Flex Code
9319 \begin_layout Plain Layout
9326 \begin_inset Flex Code
9329 \begin_layout Plain Layout
9335 ] Specifies what sort of output documents using this class will produce.
9338 \begin_layout Description
9339 \begin_inset Flex Code
9342 \begin_layout Plain Layout
9349 \begin_inset Flex Code
9352 \begin_layout Plain Layout
9359 \begin_inset Flex Code
9362 \begin_layout Plain Layout
9368 ] Specifies options, given in the second string, for the package named by
9371 \begin_inset Quotes eld
9375 \begin_inset Flex Code
9378 \begin_layout Plain Layout
9379 PackageOptions natbib square
9385 \begin_inset Quotes erd
9389 \begin_inset Flex Code
9392 \begin_layout Plain Layout
9398 to be loaded with the
9399 \begin_inset Flex Code
9402 \begin_layout Plain Layout
9409 (For TeXperts, this causes LyX to output:
9410 \begin_inset Flex Code
9413 \begin_layout Plain Layout
9416 PassOptionsToPackage{natbib}{square}
9422 \begin_inset Flex Code
9425 \begin_layout Plain Layout
9434 \begin_layout Description
9435 \begin_inset Flex Code
9438 \begin_layout Plain Layout
9445 \begin_inset Flex Code
9448 \begin_layout Plain Layout
9457 \begin_inset Flex Code
9460 \begin_layout Plain Layout
9467 \begin_inset Flex Code
9470 \begin_layout Plain Layout
9476 ] The default pagestyle.
9477 Can be changed in the
9478 \begin_inset Flex MenuItem
9481 \begin_layout Plain Layout
9482 Document\SpecialChar \menuseparator
9491 \begin_layout Description
9492 \begin_inset Flex Code
9495 \begin_layout Plain Layout
9501 Sets the preamble for the LaTeX document.
9502 Note that this will completely override any prior
9503 \begin_inset Flex Code
9506 \begin_layout Plain Layout
9513 \begin_inset Flex Code
9516 \begin_layout Plain Layout
9524 \begin_inset Flex Code
9527 \begin_layout Plain Layout
9533 if you just want to add material to the preamble.) Must end with
9534 \begin_inset Quotes eld
9538 \begin_inset Flex Code
9541 \begin_layout Plain Layout
9548 \begin_inset Quotes erd
9554 \begin_layout Description
9555 \begin_inset Flex Code
9558 \begin_layout Plain Layout
9565 \begin_inset Flex Code
9568 \begin_layout Plain Layout
9575 \begin_inset Flex Code
9578 \begin_layout Plain Layout
9587 \begin_inset space \thinspace{}
9591 \begin_inset Flex Code
9594 \begin_layout Plain Layout
9600 ] Whether the class already provides the feature
9601 \begin_inset Flex Code
9604 \begin_layout Plain Layout
9611 A feature is in general the name of a package (e.
9612 \begin_inset space \thinspace{}
9616 \begin_inset space \space{}
9620 \begin_inset Flex Code
9623 \begin_layout Plain Layout
9630 \begin_inset Flex Code
9633 \begin_layout Plain Layout
9640 \begin_inset space \thinspace{}
9644 \begin_inset space \space{}
9648 \begin_inset Flex Code
9651 \begin_layout Plain Layout
9658 \begin_inset Flex Code
9661 \begin_layout Plain Layout
9669 \begin_inset CommandInset ref
9671 reference "chap:List-of-functions"
9675 for the list of features.
9678 \begin_layout Description
9679 \begin_inset Flex Code
9682 \begin_layout Plain Layout
9689 \begin_inset Flex Code
9692 \begin_layout Plain Layout
9698 ] Indicates that this layout provides the functionality of the module mentioned,
9699 which should be specified by the filename without the
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9710 This will typically be used if the layout includes the module directly,
9711 rather than using the
9712 \begin_inset Flex Code
9715 \begin_layout Plain Layout
9721 tag to indicate that it ought to be used.
9722 It could also be used in a module that provided an alternate implementation
9723 of the same functionality.
9726 \begin_layout Description
9727 \begin_inset Flex Code
9730 \begin_layout Plain Layout
9737 \begin_inset Flex Code
9740 \begin_layout Plain Layout
9746 ] Whether the class requires the feature
9747 \begin_inset Flex Code
9750 \begin_layout Plain Layout
9757 Multiple features must be separated by commas.
9758 Note that you can only request supported features.
9760 \begin_inset CommandInset ref
9762 reference "chap:List-of-functions"
9766 for the list of features.)
9769 \begin_layout Description
9770 \begin_inset Flex Code
9773 \begin_layout Plain Layout
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9789 ] A string that indicates the width of the right margin on the screen, for
9791 \begin_inset Quotes eld
9795 \begin_inset Flex Code
9798 \begin_layout Plain Layout
9805 \begin_inset Quotes erd
9811 \begin_layout Description
9812 \begin_inset Flex Code
9815 \begin_layout Plain Layout
9822 \begin_inset Flex Code
9825 \begin_layout Plain Layout
9831 ] Sets which divisions get numbered.
9833 \begin_inset Newline newline
9837 \begin_inset Flex Code
9840 \begin_layout Plain Layout
9849 \begin_layout Description
9850 \begin_inset Flex Code
9853 \begin_layout Plain Layout
9860 \begin_inset Flex Code
9863 \begin_layout Plain Layout
9872 \begin_inset space \thinspace{}
9876 \begin_inset Flex Code
9879 \begin_layout Plain Layout
9885 ] Whether the class-default should be printing on one or both sides of the
9887 Can be changed in the
9888 \begin_inset Flex MenuItem
9891 \begin_layout Plain Layout
9892 Document\SpecialChar \menuseparator
9901 \begin_layout Description
9902 \begin_inset Flex Code
9905 \begin_layout Plain Layout
9912 \begin_inset Flex Code
9915 \begin_layout Plain Layout
9921 ] This sequence defines a paragraph style.
9922 If the style does not yet exist, it is created; if it does exist, its parameter
9925 \begin_inset Quotes eld
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9939 \begin_inset Quotes erd
9943 \begin_inset Newline newline
9947 \begin_inset CommandInset ref
9949 reference "sub:Paragraph-Styles"
9953 for details on paragraph styles.
9956 \begin_layout Description
9957 \begin_inset Flex Code
9960 \begin_layout Plain Layout
9967 \begin_inset Flex Code
9970 \begin_layout Plain Layout
9976 ] The name of the command or environment to be used with
9977 \begin_inset Flex Code
9980 \begin_layout Plain Layout
9989 \begin_layout Description
9990 \begin_inset Flex Code
9993 \begin_layout Plain Layout
10000 \begin_inset Flex Code
10003 \begin_layout Plain Layout
10012 \begin_inset Flex Code
10015 \begin_layout Plain Layout
10021 ] Indicates what kind of markup is used to define the title of a document.
10023 \begin_inset Flex Code
10026 \begin_layout Plain Layout
10032 means that the macro with name
10033 \begin_inset Flex Code
10036 \begin_layout Plain Layout
10042 will be inserted after the last layout which has
10043 \begin_inset Quotes eld
10047 \begin_inset Flex Code
10050 \begin_layout Plain Layout
10052 \begin_inset space ~
10061 \begin_inset Quotes erd
10066 \begin_inset Flex Code
10069 \begin_layout Plain Layout
10075 corresponds to the case where all layouts which have
10076 \begin_inset Quotes eld
10080 \begin_inset Flex Code
10083 \begin_layout Plain Layout
10085 \begin_inset space ~
10094 \begin_inset Quotes erd
10097 should be enclosed into the
10098 \begin_inset Flex Code
10101 \begin_layout Plain Layout
10110 \begin_layout Description
10111 \begin_inset Flex Code
10114 \begin_layout Plain Layout
10121 \begin_inset Flex Code
10124 \begin_layout Plain Layout
10130 ] Sets which divisions are included in the table of contents.
10132 \begin_inset Flex Code
10135 \begin_layout Plain Layout
10144 \begin_layout Subsection
10145 \begin_inset Flex Code
10148 \begin_layout Plain Layout
10155 \begin_inset CommandInset label
10157 name "sub:ClassOptions"
10164 \begin_layout Standard
10166 \begin_inset Flex Code
10169 \begin_layout Plain Layout
10175 section can contain the following entries:
10178 \begin_layout Description
10179 \begin_inset Flex Code
10182 \begin_layout Plain Layout
10189 \begin_inset Flex Code
10192 \begin_layout Plain Layout
10198 ] The list of available font sizes for the document's main font, separated
10200 \begin_inset Quotes eld
10204 \begin_inset Flex Code
10207 \begin_layout Plain Layout
10214 \begin_inset Quotes erd
10220 \begin_layout Description
10221 \begin_inset Flex Code
10224 \begin_layout Plain Layout
10230 Used to set the DTD line with XML-based output classes.
10232 \begin_inset space \thinspace{}
10236 \begin_inset Quotes eld
10239 -//OASIS//DTD DocBook V4.2//EN
10240 \begin_inset Quotes erd
10246 \begin_layout Description
10247 \begin_inset Flex Code
10250 \begin_layout Plain Layout
10257 \begin_inset Flex Code
10260 \begin_layout Plain Layout
10261 string="empty|plain|headings|fancy"
10266 ] The list of available page sty\SpecialChar \-
10268 \begin_inset Quotes eld
10272 \begin_inset Flex Code
10275 \begin_layout Plain Layout
10282 \begin_inset Quotes erd
10288 \begin_layout Description
10289 \begin_inset Flex Code
10292 \begin_layout Plain Layout
10299 \begin_inset Flex Code
10302 \begin_layout Plain Layout
10308 ] Some document class options, separated by a comma, that will be added
10309 to the optional part of the
10310 \begin_inset Flex Code
10313 \begin_layout Plain Layout
10324 \begin_layout Standard
10326 \begin_inset Flex Code
10329 \begin_layout Plain Layout
10335 section must end with
10336 \begin_inset Quotes eld
10340 \begin_inset Flex Code
10343 \begin_layout Plain Layout
10350 \begin_inset Quotes erd
10356 \begin_layout Subsection
10358 \begin_inset CommandInset label
10360 name "sub:Paragraph-Styles"
10367 \begin_layout Standard
10368 A paragraph style description looks like this:
10372 \begin_layout Plain Layout
10373 Note that this will either define a new style or modify an existing one.
10381 \begin_layout LyX-Code
10388 \begin_layout LyX-Code
10392 \begin_layout LyX-Code
10396 \begin_layout Standard
10397 where the following commands are allowed:
10400 \begin_layout Description
10401 \begin_inset Flex Code
10404 \begin_layout Plain Layout
10411 \begin_inset Flex Code
10414 \begin_layout Plain Layout
10419 , left, right, center
10424 ] Paragraph alignment.
10427 \begin_layout Description
10428 \begin_inset Flex Code
10431 \begin_layout Plain Layout
10438 \begin_inset Flex Code
10441 \begin_layout Plain Layout
10446 , left, right, center
10451 ] A comma separated list of permitted alignments.
10452 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10454 For example a right-aligned or centered enumeration isn't possible.)
10457 \begin_layout Description
10458 \begin_inset Flex Code
10461 \begin_layout Plain Layout
10468 \begin_inset Flex Code
10471 \begin_layout Plain Layout
10477 ] Defines argument number <int> of a command\SpecialChar \slash{}
10478 environment associated with
10480 This is useful for things like section headings, and only makes sense with
10482 Every (optional or required) argument of a command or environment -- except
10483 for the required argument that is associated with the content of the paragraph
10484 itself -- has a separate definition, where the number specifies the order
10486 The definition must end with
10487 \begin_inset Flex Code
10490 \begin_layout Plain Layout
10497 So a command with two optional arguments has:
10501 \begin_layout Quote
10507 \begin_layout Quote
10513 \begin_layout Quote
10519 \begin_layout Quote
10525 \begin_layout Quote
10531 \begin_layout Quote
10537 \begin_layout Standard
10539 \begin_inset Flex Code
10542 \begin_layout Plain Layout
10548 definition, the following specifications are possible:
10551 \begin_layout Itemize
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10562 \begin_inset Flex Code
10565 \begin_layout Plain Layout
10571 The string that will appear both in the menu (to insert this argument)
10572 and on the argument inset button (unless you also specify a separate
10573 \begin_inset Flex Code
10576 \begin_layout Plain Layout
10583 For the menu, you can define an accelerator by appending the respective
10584 character to the string, divided by
10585 \begin_inset Quotes eld
10589 \begin_inset Quotes erd
10593 \begin_inset space \thinspace{}
10597 \begin_inset space \space{}
10601 \begin_inset Quotes eld
10605 \begin_inset Flex Code
10608 \begin_layout Plain Layout
10615 \begin_inset Quotes erd
10621 \begin_layout Itemize
10622 \begin_inset Flex Code
10625 \begin_layout Plain Layout
10632 \begin_inset Flex Code
10635 \begin_layout Plain Layout
10641 A separate string for the menu.
10642 You can define an accelerator by appending the respective character to
10643 the string, divided by
10644 \begin_inset Quotes eld
10648 \begin_inset Quotes erd
10652 \begin_inset space \thinspace{}
10656 \begin_inset space \space{}
10660 \begin_inset Quotes eld
10664 \begin_inset Flex Code
10667 \begin_layout Plain Layout
10674 \begin_inset Quotes erd
10678 This specification is optional.
10679 If it is not given the
10680 \begin_inset Flex Code
10683 \begin_layout Plain Layout
10689 will be used instead for the menu.
10692 \begin_layout Itemize
10693 \begin_inset Flex Code
10696 \begin_layout Plain Layout
10703 \begin_inset Flex Code
10706 \begin_layout Plain Layout
10712 A longer explanatory text that appears in the tooltip when hovering over
10713 the argument inset.
10716 \begin_layout Itemize
10717 \begin_inset Flex Code
10720 \begin_layout Plain Layout
10727 \begin_inset Flex Code
10730 \begin_layout Plain Layout
10739 \begin_inset space \thinspace{}
10743 \begin_inset Flex Code
10746 \begin_layout Plain Layout
10752 ] Declare if this is a mandatory (1) or an optional (0) argument.
10753 Mandatory arguments will be output empty if not given, while optional arguments
10754 will not be output at all.
10755 By default, mandatory arguments are delimited by
10756 \begin_inset Flex Code
10759 \begin_layout Plain Layout
10765 , while optional arguments are delimited by
10766 \begin_inset Flex Code
10769 \begin_layout Plain Layout
10778 \begin_layout Itemize
10779 \begin_inset Flex Code
10782 \begin_layout Plain Layout
10789 \begin_inset Flex Code
10792 \begin_layout Plain Layout
10798 defines another argument (by its number) which this argument requires to
10799 be output if it is itself output.
10801 \begin_inset space \thinspace{}
10804 g., in LaTeX commands, optional arguments often require previous optional
10805 arguments to be output (at least empty), as in
10806 \begin_inset Flex Code
10809 \begin_layout Plain Layout
10812 command[][argument]{text}
10818 This can be achieved by the statement
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10829 \begin_inset Flex Code
10832 \begin_layout Plain Layout
10841 \begin_layout Itemize
10842 \begin_inset Flex Code
10845 \begin_layout Plain Layout
10852 \begin_inset Flex Code
10855 \begin_layout Plain Layout
10861 defines a custom left delimiter (instead of
10862 \begin_inset Flex Code
10865 \begin_layout Plain Layout
10872 \begin_inset Flex Code
10875 \begin_layout Plain Layout
10882 A line break in the output can be indicated by
10883 \begin_inset Flex Code
10886 \begin_layout Plain Layout
10895 \begin_layout Itemize
10896 \begin_inset Flex Code
10899 \begin_layout Plain Layout
10906 \begin_inset Flex Code
10909 \begin_layout Plain Layout
10915 defines a custom right delimiter (instead of
10916 \begin_inset Flex Code
10919 \begin_layout Plain Layout
10926 \begin_inset Flex Code
10929 \begin_layout Plain Layout
10936 A line break in the output can be indicated by
10937 \begin_inset Flex Code
10940 \begin_layout Plain Layout
10949 \begin_layout Itemize
10950 \begin_inset Flex Code
10953 \begin_layout Plain Layout
10960 \begin_inset Flex Code
10963 \begin_layout Plain Layout
10969 defines an argument that is inserted if and only if no user-specified arguments
10971 \begin_inset space \thinspace{}
10975 \begin_inset space \space{}
10978 if no argument inset has been inserted (note that also an empty argument
10979 inset omits the DefaultArg).
10980 Multiple arguments need to be separated by comma.
10983 \begin_layout Itemize
10984 \begin_inset Flex Code
10987 \begin_layout Plain Layout
10994 \begin_inset Flex Code
10997 \begin_layout Plain Layout
11003 defines an argument that is inserted in any case (alone or in addition
11004 to user-specified arguments).
11005 Multiple arguments need to be separated by comma.
11008 \begin_layout Itemize
11009 \begin_inset Flex Code
11012 \begin_layout Plain Layout
11018 The font used for the argument content, see
11019 \begin_inset CommandInset ref
11021 reference "sub:Font-description"
11028 \begin_layout Itemize
11029 \begin_inset Flex Code
11032 \begin_layout Plain Layout
11038 The font used for the label; see
11039 \begin_inset CommandInset ref
11041 reference "sub:Font-description"
11048 \begin_layout Itemize
11049 \begin_inset Flex Code
11052 \begin_layout Plain Layout
11059 \begin_inset Flex Code
11062 \begin_layout Plain Layout
11067 , Minimalistic, Conglomerate
11072 ] describes the rendering style used for the inset's frame and buttons.
11075 \begin_layout Itemize
11076 \begin_inset Flex Code
11079 \begin_layout Plain Layout
11086 \begin_inset Flex Code
11089 \begin_layout Plain Layout
11096 \begin_inset Flex Code
11099 \begin_layout Plain Layout
11105 , this argument is automatically inserted when the respective style is selected.
11106 Currently, only one argument per style\SpecialChar \slash{}
11107 layout can be automatically inserted.
11110 \begin_layout Standard
11111 By default, the text entered in the LyX workarea in the respective layout
11112 is the last (mandatory) argument of a command if the
11113 \begin_inset Flex Code
11116 \begin_layout Plain Layout
11123 \begin_inset Flex Code
11126 \begin_layout Plain Layout
11133 However, arguments with the prefix
11134 \begin_inset Flex Code
11137 \begin_layout Plain Layout
11143 are output after this workarea argument.
11144 Note that post-argument numbering restarts at 1, so the first argument
11145 following the workarea argument is
11146 \begin_inset Flex Code
11149 \begin_layout Plain Layout
11156 Post-arguments are ignored in any other
11157 \begin_inset Flex Code
11160 \begin_layout Plain Layout
11167 \begin_inset Flex Code
11170 \begin_layout Plain Layout
11179 \begin_layout Standard
11181 \begin_inset Flex Code
11184 \begin_layout Plain Layout
11193 \begin_inset Flex Code
11196 \begin_layout Plain Layout
11205 \begin_inset Flex Code
11208 \begin_layout Plain Layout
11214 followed by the number (e.
11215 \begin_inset space \thinspace{}
11219 \begin_inset space \space{}
11223 \begin_inset Flex Code
11226 \begin_layout Plain Layout
11236 \begin_layout Description
11237 \begin_inset Flex Code
11240 \begin_layout Plain Layout
11246 Note that this will completely override any prior
11247 \begin_inset Flex Code
11250 \begin_layout Plain Layout
11256 declaration for this style.
11258 \begin_inset Quotes eld
11262 \begin_inset Flex Code
11265 \begin_layout Plain Layout
11272 \begin_inset Quotes erd
11277 \begin_inset CommandInset ref
11279 reference "sub:I18n"
11283 for details on its use.
11286 \begin_layout Description
11287 \begin_inset Flex Code
11290 \begin_layout Plain Layout
11297 \begin_inset Flex Code
11300 \begin_layout Plain Layout
11310 \begin_layout Plain Layout
11311 Note that a `float' here is a real number, such as: 1.5.
11316 The vertical space with which the last of a chain of paragraphs with this
11317 style is separated from the following paragraph.
11318 If the next paragraph has another style, the separations are not simply
11319 added, but the maximum is taken.
11322 \begin_layout Description
11323 \begin_inset Flex Code
11326 \begin_layout Plain Layout
11333 \begin_inset Flex Code
11336 \begin_layout Plain Layout
11342 ] The category for this style.
11343 This is used to group related styles in the style combobox on the toolbar.
11344 Any string can be used, but you may want to use existing categories with
11349 \begin_layout Description
11350 \begin_inset Flex Code
11353 \begin_layout Plain Layout
11359 Depth of XML command.
11360 Used only with XML-type formats.
11363 \begin_layout Description
11364 \begin_inset Flex Code
11367 \begin_layout Plain Layout
11374 \begin_inset Flex Code
11377 \begin_layout Plain Layout
11383 ] Copies all the features of an existing style into the current one.
11387 \begin_layout Description
11388 \begin_inset Flex Code
11391 \begin_layout Plain Layout
11398 \begin_inset Flex Code
11401 \begin_layout Plain Layout
11407 ] The name of a style whose preamble should be output
11412 This allows to ensure some ordering of the preamble snippets when macros
11413 definitions depend on one another.
11417 \begin_layout Plain Layout
11418 Note that, besides that functionality, there is no way to ensure any ordering
11420 The ordering that you see in a given version of LyX may change without
11421 warning in later versions.
11429 \begin_layout Description
11430 \begin_inset Flex Code
11433 \begin_layout Plain Layout
11440 \begin_inset Flex Code
11443 \begin_layout Plain Layout
11448 , Box, Filled_Box, Static
11453 ] The type of label that stands at the end of the paragraph (or sequence
11455 \begin_inset Flex Code
11458 \begin_layout Plain Layout
11465 \begin_inset Newline newline
11469 \begin_inset Flex Code
11472 \begin_layout Plain Layout
11479 \begin_inset Flex Code
11482 \begin_layout Plain Layout
11489 \begin_inset Flex Code
11492 \begin_layout Plain Layout
11500 \begin_inset Flex Code
11503 \begin_layout Plain Layout
11510 \begin_inset Quotes eld
11514 \begin_inset Quotes erd
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11528 \begin_inset space \space{}
11532 \begin_inset Flex Code
11535 \begin_layout Plain Layout
11541 ) is a white (resp.
11542 \begin_inset space ~
11545 black) square suitable for end of proof markers,
11546 \begin_inset Flex Code
11549 \begin_layout Plain Layout
11555 is an explicit text string.
11558 \begin_layout Description
11559 \begin_inset Flex Code
11562 \begin_layout Plain Layout
11569 \begin_inset Flex Code
11572 \begin_layout Plain Layout
11578 ] The string used for a label with a
11579 \begin_inset Flex Code
11582 \begin_layout Plain Layout
11589 \begin_inset Newline newline
11593 \begin_inset Flex Code
11596 \begin_layout Plain Layout
11606 \begin_layout Description
11607 \begin_inset Flex Code
11610 \begin_layout Plain Layout
11616 The font used for both the text body
11622 \begin_inset CommandInset ref
11624 reference "sub:Font-description"
11629 Note that defining this font automatically defines the
11630 \begin_inset Flex Code
11633 \begin_layout Plain Layout
11640 So you should define this one first if you also want to define
11641 \begin_inset Flex Code
11644 \begin_layout Plain Layout
11653 \begin_layout Description
11654 \begin_inset Flex Code
11657 \begin_layout Plain Layout
11664 \begin_inset Flex Code
11667 \begin_layout Plain Layout
11673 ] Used for backporting new styles to stable LyX versions.
11674 The first stable version that supports this tag is LyX 2.1.0.
11675 The argment is a number which may either be 0, -1 or any value greater
11678 \begin_inset Flex Code
11681 \begin_layout Plain Layout
11687 flag of a style is greater than zero, it will always be written to the
11689 If a .lyx file is read, the style definitions from the document header are
11690 added to the document class.
11691 Therefore even older LyX versions can handle the style.
11693 \begin_inset Flex Code
11696 \begin_layout Plain Layout
11702 is a version number: If the style is read, and the version number is less
11703 than the version number of the already existing style in the document class,
11704 the new style is ignored.
11705 If the version number is greater, the new style replaces the existing style.
11706 A value of -1 means an infinite version number, i.
11707 \begin_inset space \thinspace{}
11711 \begin_inset space \space{}
11714 the style is always used.
11717 \begin_layout Description
11718 \begin_inset Flex Code
11721 \begin_layout Plain Layout
11728 \begin_inset Flex Code
11731 \begin_layout Plain Layout
11740 \begin_inset space \thinspace{}
11744 \begin_inset Flex Code
11747 \begin_layout Plain Layout
11753 ] Usually LyX does not allow you to insert more than one space between words,
11754 since a space is considered as the separation between two words, not a
11755 character or symbol of its own.
11756 This is a very fine thing but sometimes annoying, for example, when typing
11757 program code or plain LaTeX code.
11759 \begin_inset Flex Code
11762 \begin_layout Plain Layout
11769 Note that LyX will create protected blanks for the additional blanks when
11770 in another mode than LaTeX-mode.
11773 \begin_layout Description
11774 \begin_inset Flex Code
11777 \begin_layout Plain Layout
11783 These tags are used with XHTML output.
11785 \begin_inset CommandInset ref
11787 reference "sub:Paragraph-Style-XHTML"
11794 \begin_layout Description
11795 \begin_inset Flex Code
11798 \begin_layout Plain Layout
11804 [FIXME] (Used only with XML-type formats.)
11807 \begin_layout Description
11808 \begin_inset Flex Code
11811 \begin_layout Plain Layout
11818 \begin_inset Flex Code
11821 \begin_layout Plain Layout
11830 \begin_inset space \thinspace{}
11834 \begin_inset Flex Code
11837 \begin_layout Plain Layout
11844 \begin_inset Flex Code
11847 \begin_layout Plain Layout
11853 , marks the style as to be included in the document preamble and not in
11855 This is useful for document classes that want such information as the title
11856 and author to appear in the preamble.
11857 Note that this works only for styles for which the
11858 \begin_inset Flex Code
11861 \begin_layout Plain Layout
11868 \begin_inset Flex Code
11871 \begin_layout Plain Layout
11878 \begin_inset Flex Code
11881 \begin_layout Plain Layout
11890 \begin_layout Description
11891 \begin_inset Flex Code
11894 \begin_layout Plain Layout
11901 \begin_inset Flex Code
11904 \begin_layout Plain Layout
11913 \begin_inset space \thinspace{}
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11927 \begin_inset Flex Code
11930 \begin_layout Plain Layout
11936 , marks the style as being part of a title block (see also the
11937 \begin_inset Flex Code
11940 \begin_layout Plain Layout
11947 \begin_inset Flex Code
11950 \begin_layout Plain Layout
11959 \begin_layout Description
11960 \begin_inset Flex Code
11963 \begin_layout Plain Layout
11970 \begin_inset Flex Code
11973 \begin_layout Plain Layout
11979 ] The LaTeX command sequence declaring an item in a list.
11980 The command is to be defined without the preceding backslash (the default
11982 \begin_inset Quotes eld
11986 \begin_inset Quotes erd
11990 \begin_inset Flex Code
11993 \begin_layout Plain Layout
12001 in the LaTeX output).
12004 \begin_layout Description
12005 \begin_inset Flex Code
12008 \begin_layout Plain Layout
12015 \begin_inset Flex Code
12018 \begin_layout Plain Layout
12024 ] This provides extra space between paragraphs that have the same style.
12025 If you put other styles into an environment, each is separated with the
12027 \begin_inset Flex Code
12030 \begin_layout Plain Layout
12037 But the whole items of the environment are additionally separated with
12039 \begin_inset Flex Code
12042 \begin_layout Plain Layout
12049 Note that this is a
12054 \begin_layout Description
12055 \begin_inset Flex Code
12058 \begin_layout Plain Layout
12064 [FIXME] (Used only with XML-type formats.)
12067 \begin_layout Description
12068 \begin_inset Flex Code
12071 \begin_layout Plain Layout
12078 \begin_inset Flex Code
12081 \begin_layout Plain Layout
12090 \begin_inset space \thinspace{}
12094 \begin_inset Flex Code
12097 \begin_layout Plain Layout
12103 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12104 lead to empty LaTeX output.
12105 There are some cases where this could be desirable however: in a letter
12106 template, the required fields can be provided as empty fields, so that
12107 people do not forget them; in some special classes, a style can be used
12108 as some kind of break, which does not contain actual text.
12111 \begin_layout Description
12112 \begin_inset Flex Code
12115 \begin_layout Plain Layout
12122 \begin_inset Flex Code
12125 \begin_layout Plain Layout
12131 ] The vertical space between the label and the text body.
12132 Only used for labels that are above the text body (
12133 \begin_inset Flex Code
12136 \begin_layout Plain Layout
12143 \begin_inset Newline newline
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12151 Centered_Top_Environment
12159 \begin_layout Description
12160 \begin_inset Flex Code
12163 \begin_layout Plain Layout
12170 \begin_inset Flex Code
12173 \begin_layout Plain Layout
12179 ] The name of the counter for automatic numbering.
12180 In order to have the counter appear with your label, you will need to reference
12182 \begin_inset Flex Code
12185 \begin_layout Plain Layout
12194 This will work with
12195 \begin_inset Flex Code
12198 \begin_layout Plain Layout
12205 \begin_inset Flex Code
12208 \begin_layout Plain Layout
12215 \begin_inset Flex Code
12218 \begin_layout Plain Layout
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12235 \begin_inset Newline newline
12243 \begin_inset Flex Code
12246 \begin_layout Plain Layout
12253 \begin_inset Flex Code
12256 \begin_layout Plain Layout
12262 , though this case is a bit complicated.
12263 Suppose you declare
12264 \begin_inset Quotes eld
12268 \begin_inset Flex Code
12271 \begin_layout Plain Layout
12272 LabelCounter myenum
12278 \begin_inset Quotes erd
12282 Then the actual counters used are
12283 \begin_inset Flex Code
12286 \begin_layout Plain Layout
12293 \begin_inset Flex Code
12296 \begin_layout Plain Layout
12303 \begin_inset Flex Code
12306 \begin_layout Plain Layout
12313 \begin_inset Flex Code
12316 \begin_layout Plain Layout
12322 , much as in LaTeX.
12323 These counters must all be declared separately.
12324 \begin_inset Newline newline
12328 \begin_inset CommandInset ref
12330 reference "sub:Counters"
12334 for details on counters.
12337 \begin_layout Description
12338 \begin_inset Flex Code
12341 \begin_layout Plain Layout
12347 The font used for the label.
12349 \begin_inset CommandInset ref
12351 reference "sub:Font-description"
12358 \begin_layout Description
12359 \begin_inset Flex Code
12362 \begin_layout Plain Layout
12369 \begin_inset Flex Code
12372 \begin_layout Plain Layout
12378 ] Text that indicates how far a label should be indented.
12381 \begin_layout Description
12382 \begin_inset Flex Code
12385 \begin_layout Plain Layout
12392 \begin_inset Flex Code
12395 \begin_layout Plain Layout
12401 ] Text that indicates the amount of horizontal space between the label and
12403 Only used for labels that are not above the text body.
12406 \begin_layout Description
12407 \begin_inset Flex Code
12410 \begin_layout Plain Layout
12417 \begin_inset Flex Code
12420 \begin_layout Plain Layout
12426 ] The string used for the label.
12428 \begin_inset Flex Code
12431 \begin_layout Plain Layout
12437 is set, this string can be contain the special formatting commands described
12439 \begin_inset CommandInset ref
12441 reference "sub:Counters"
12448 \begin_layout Description
12449 \begin_inset Flex Code
12452 \begin_layout Plain Layout
12453 LabelStringAppendix
12459 \begin_inset Flex Code
12462 \begin_layout Plain Layout
12468 ] This is used inside the appendix instead of
12469 \begin_inset Newline newline
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12484 \begin_inset Flex Code
12487 \begin_layout Plain Layout
12494 \begin_inset Newline newline
12498 \begin_inset Flex Code
12501 \begin_layout Plain Layout
12502 LabelStringAppendix
12510 \begin_layout Description
12511 \begin_inset Flex Code
12514 \begin_layout Plain Layout
12520 [FIXME] (Used only with XML-type formats.)
12523 \begin_layout Description
12524 \begin_inset Flex Code
12527 \begin_layout Plain Layout
12534 \begin_inset Flex Code
12537 \begin_layout Plain Layout
12542 , Manual, Static, Above,
12543 \begin_inset Newline newline
12546 Centered, Sensitive, Enumerate,
12547 \begin_inset Newline newline
12550 Itemize, Bibliography
12559 \begin_layout Description
12560 \begin_inset Flex Code
12563 \begin_layout Plain Layout
12569 means the label is the very first word (up to the first real blank).
12570 Use protected spaces if you want more than one word as the label.
12574 \begin_layout Description
12575 \begin_inset Flex Code
12578 \begin_layout Plain Layout
12584 means the label is simply what is declared as
12585 \begin_inset Flex Code
12588 \begin_layout Plain Layout
12595 This will be displayed
12596 \begin_inset Quotes eld
12600 \begin_inset Quotes erd
12603 , at the beginning of the paragraph.
12605 \begin_inset Flex Code
12608 \begin_layout Plain Layout
12615 \begin_inset Flex Code
12618 \begin_layout Plain Layout
12624 , then it will be displayed only in the first paragraph of any sequence
12625 of paragraphs with the same
12626 \begin_inset Flex Code
12629 \begin_layout Plain Layout
12638 \begin_layout Description
12639 \begin_inset Flex Code
12642 \begin_layout Plain Layout
12649 \begin_inset space ~
12653 \begin_inset space ~
12657 \begin_inset Flex Code
12660 \begin_layout Plain Layout
12666 are special cases of
12667 \begin_inset Flex Code
12670 \begin_layout Plain Layout
12677 The label will be printed above the paragraph either at the beginning of
12678 the line or centered.
12681 \begin_layout Description
12682 \begin_inset Flex Code
12685 \begin_layout Plain Layout
12691 is a special case for the caption-labels
12692 \begin_inset Quotes eld
12696 \begin_inset Quotes erd
12700 \begin_inset Quotes eld
12704 \begin_inset Quotes erd
12708 \begin_inset Newline newline
12712 \begin_inset Flex Code
12715 \begin_layout Plain Layout
12721 means the (hardcoded) label string depends on the kind of float: It is
12722 hardcoded to be `FloatType N', where N is the value of the counter associated
12724 For the case that a caption is inserted outside of a float the
12725 \begin_inset Flex Code
12728 \begin_layout Plain Layout
12735 \begin_inset Quotes eld
12739 \begin_inset Quotes erd
12745 \begin_layout Description
12746 \begin_inset Flex Code
12749 \begin_layout Plain Layout
12755 produces the usual sort of enumeration labels.
12756 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12757 small Roman numerals, and uppercase letters for the four possible depths.
12760 \begin_layout Description
12761 \begin_inset Flex Code
12764 \begin_layout Plain Layout
12770 produces various bullets at the different levels.
12771 It is also hardcoded.
12774 \begin_layout Description
12775 \begin_inset Flex Code
12778 \begin_layout Plain Layout
12784 should be used only with
12785 \begin_inset Flex Code
12788 \begin_layout Plain Layout
12789 LatexType BibEnvironment
12798 \begin_layout Description
12799 \begin_inset Flex Code
12802 \begin_layout Plain Layout
12808 Note that this will completely override any prior
12809 \begin_inset Flex Code
12812 \begin_layout Plain Layout
12818 declaration for this style.
12820 \begin_inset Quotes eld
12824 \begin_inset Flex Code
12827 \begin_layout Plain Layout
12834 \begin_inset Quotes erd
12839 \begin_inset CommandInset ref
12841 reference "sub:I18n"
12845 for details on its use.
12848 \begin_layout Description
12849 \begin_inset Flex Code
12852 \begin_layout Plain Layout
12859 \begin_inset Flex Code
12862 \begin_layout Plain Layout
12868 ] The name of the corresponding LaTeX stuff.
12869 Either the environment or command name.
12872 \begin_layout Description
12873 \begin_inset Flex Code
12876 \begin_layout Plain Layout
12883 \begin_inset Flex Code
12886 \begin_layout Plain Layout
12892 ] An optional parameter for the corresponding
12893 \begin_inset Flex Code
12896 \begin_layout Plain Layout
12903 This parameter cannot be changed from within LyX (use
12904 \begin_inset Flex Code
12907 \begin_layout Plain Layout
12913 for customizable parameters).
12914 This will be output as is after all LaTeX
12915 \begin_inset Flex Code
12918 \begin_layout Plain Layout
12927 \begin_layout Description
12928 \begin_inset Flex Code
12931 \begin_layout Plain Layout
12938 \begin_inset Flex Code
12941 \begin_layout Plain Layout
12946 , Command, Environment, Item_Environment,
12947 \begin_inset Newline newline
12950 List_Environment, Bib_Environment
12955 ] How the style should be translated into LaTeX.
12959 \begin_layout Plain Layout
12960 \begin_inset Flex Code
12963 \begin_layout Plain Layout
12969 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12970 Visit the SGML class files for specific examples.
12979 \begin_layout Description
12980 \begin_inset Flex Code
12983 \begin_layout Plain Layout
12989 means nothing special.
12992 \begin_layout Description
12993 \begin_inset Flex Code
12996 \begin_layout Plain Layout
13003 \begin_inset Flex Code
13006 \begin_layout Plain Layout
13013 {\SpecialChar \ldots{}
13022 \begin_layout Description
13023 \begin_inset Flex Code
13026 \begin_layout Plain Layout
13033 \begin_inset Flex Code
13036 \begin_layout Plain Layout
13043 }\SpecialChar \ldots{}
13059 \begin_layout Description
13060 \begin_inset Flex Code
13063 \begin_layout Plain Layout
13070 \begin_inset Flex Code
13073 \begin_layout Plain Layout
13080 \begin_inset Flex Code
13083 \begin_layout Plain Layout
13091 is generated for each paragraph of this environment.
13095 \begin_layout Description
13096 \begin_inset Flex Code
13099 \begin_layout Plain Layout
13106 \begin_inset Flex Code
13109 \begin_layout Plain Layout
13116 \begin_inset Newline newline
13120 \begin_inset Flex Code
13123 \begin_layout Plain Layout
13129 is passed as an argument to the environment.
13130 \begin_inset Newline newline
13134 \begin_inset Flex Code
13137 \begin_layout Plain Layout
13143 can be defined in the
13144 \begin_inset Flex MenuItem
13147 \begin_layout Plain Layout
13148 Edit\SpecialChar \menuseparator
13150 \begin_inset space ~
13161 \begin_layout Description
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13172 \begin_inset Flex Code
13175 \begin_layout Plain Layout
13181 but adds additionally the necessary mandatory argument (the longest label)
13182 to the begin statement of the bibliography environment:
13183 \begin_inset Newline newline
13187 \begin_inset Flex Code
13190 \begin_layout Plain Layout
13193 begin{thebibliography}{99}
13198 It is therefore only useful for bibliography environments.
13199 The default longest label
13200 \begin_inset Quotes eld
13204 \begin_inset Quotes erd
13207 can be changed by the user in the paragraph settings of a bibliography
13211 \begin_layout Standard
13212 Putting the last few things together, the LaTeX output will be either:
13215 \begin_layout LyX-Code
13218 LatexName[LatexParam]{\SpecialChar \ldots{}
13222 \begin_layout Standard
13226 \begin_layout LyX-Code
13229 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13235 \begin_layout Standard
13236 depending upon the LaTeX type.
13240 \begin_layout Description
13241 \begin_inset Flex Code
13244 \begin_layout Plain Layout
13251 \begin_inset Flex Code
13254 \begin_layout Plain Layout
13260 ] A string that is put at the beginning of the style content.
13261 A line break in the output can be indicated by
13262 \begin_inset Flex Code
13265 \begin_layout Plain Layout
13274 \begin_layout Description
13275 \begin_inset Flex Code
13278 \begin_layout Plain Layout
13285 \begin_inset Flex Code
13288 \begin_layout Plain Layout
13294 ] If you put styles into environments, the different
13295 \begin_inset Flex Code
13298 \begin_layout Plain Layout
13304 are not simply added, but added with a factor
13305 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13309 Note that this parameter is also used when
13310 \begin_inset Flex Code
13313 \begin_layout Plain Layout
13320 \begin_inset Flex Code
13323 \begin_layout Plain Layout
13330 \begin_inset Flex Code
13333 \begin_layout Plain Layout
13340 Then it is added to the manual or dynamic margin.
13341 \begin_inset Newline newline
13345 \begin_inset Quotes eld
13349 \begin_inset Flex Code
13352 \begin_layout Plain Layout
13359 \begin_inset Quotes erd
13362 means that the paragraph is indented with the width of
13363 \begin_inset Quotes eld
13367 \begin_inset Flex Code
13370 \begin_layout Plain Layout
13377 \begin_inset Quotes erd
13380 in the normal font.
13381 You can get a negative width by prefixing the string with
13382 \begin_inset Quotes eld
13386 \begin_inset Flex Code
13389 \begin_layout Plain Layout
13396 \begin_inset Quotes erd
13400 This way was chosen so that the look is the same with each used screen
13404 \begin_layout Description
13405 \begin_inset Flex Code
13408 \begin_layout Plain Layout
13415 \begin_inset Flex Code
13418 \begin_layout Plain Layout
13423 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13429 \begin_inset Newline newline
13432 The kind of margin that the style has on the left side.
13436 \begin_layout Description
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13446 just means a fixed margin.
13449 \begin_layout Description
13450 \begin_inset Flex Code
13453 \begin_layout Plain Layout
13459 means that the left margin depends on the string entered in the
13460 \begin_inset Flex MenuItem
13463 \begin_layout Plain Layout
13464 Edit\SpecialChar \menuseparator
13466 \begin_inset space ~
13475 This is used to typeset nice lists without tabulators.
13478 \begin_layout Description
13479 \begin_inset Flex Code
13482 \begin_layout Plain Layout
13488 means that the margin depends on the size of the label.
13489 This is used for automatic enumerated headlines.
13490 It is obvious that the headline
13491 \begin_inset Quotes eld
13494 5.4.3.2.1 Very long headline
13495 \begin_inset Quotes erd
13498 must have a wider left margin (as wide as
13499 \begin_inset Quotes eld
13503 \begin_inset Quotes erd
13506 plus the space) than
13507 \begin_inset Quotes eld
13510 3.2 Very long headline
13511 \begin_inset Quotes erd
13515 \begin_inset Quotes eld
13519 \begin_inset Quotes erd
13522 are not able to do this.
13525 \begin_layout Description
13526 \begin_inset Flex Code
13529 \begin_layout Plain Layout
13535 is similar, but only the very first row of the paragraph is dynamic, while
13536 the others are static; this is used, for example, for descriptions.
13539 \begin_layout Description
13540 \begin_inset Flex Code
13543 \begin_layout Plain Layout
13549 means the margin is chosen in a way that the longest row of this paragraph
13550 fits to the right margin.
13551 This is used to typeset an address on the right edge of the page.
13555 \begin_layout Description
13556 \begin_inset Flex Code
13559 \begin_layout Plain Layout
13566 \begin_inset Flex Code
13569 \begin_layout Plain Layout
13578 \begin_inset space \thinspace{}
13582 \begin_inset Flex Code
13585 \begin_layout Plain Layout
13591 ] Whether fragile commands in this style should be
13592 \begin_inset Flex Code
13595 \begin_layout Plain Layout
13608 whether this command should itself be protected.)
13611 \begin_layout Description
13612 \begin_inset Flex Code
13615 \begin_layout Plain Layout
13622 \begin_inset Flex Code
13625 \begin_layout Plain Layout
13632 \begin_inset space \thinspace{}
13636 \begin_inset Flex Code
13639 \begin_layout Plain Layout
13647 ] Whether newlines are translated into LaTeX newlines (
13648 \begin_inset Flex Code
13651 \begin_layout Plain Layout
13662 The translation can be switched off to allow more comfortable LaTeX editing
13666 \begin_layout Description
13667 \begin_inset Flex Code
13670 \begin_layout Plain Layout
13677 \begin_inset Flex Code
13680 \begin_layout Plain Layout
13689 \begin_inset space \thinspace{}
13693 \begin_inset Flex Code
13696 \begin_layout Plain Layout
13702 ] If set to true, and if
13703 \begin_inset Flex Code
13706 \begin_layout Plain Layout
13713 \begin_inset Flex Code
13716 \begin_layout Plain Layout
13722 ) paragraphs are being indented, then the indentation of such a paragraph
13723 following one of this type will be suppressed.
13724 (So this will not affect the display of non-default paragraphs.)
13727 \begin_layout Description
13728 \begin_inset Flex Code
13731 \begin_layout Plain Layout
13738 \begin_inset Flex Code
13741 \begin_layout Plain Layout
13747 ] Name of a style that has replaced this style.
13748 This is used to rename a style, while keeping backward compatibility.
13751 \begin_layout Description
13752 \begin_inset Flex Code
13755 \begin_layout Plain Layout
13762 \begin_inset Flex Code
13765 \begin_layout Plain Layout
13774 \begin_inset space \thinspace{}
13778 \begin_inset Flex Code
13781 \begin_layout Plain Layout
13787 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13788 output, but only by a line break; together with
13789 \begin_inset Flex Code
13792 \begin_layout Plain Layout
13798 , this allows to emulate a plain text editor (like the ERT inset).
13801 \begin_layout Description
13802 \begin_inset Flex Code
13805 \begin_layout Plain Layout
13812 \begin_inset Flex Code
13815 \begin_layout Plain Layout
13821 ] The indent of the very first line of a paragraph.
13823 \begin_inset Newline newline
13827 \begin_inset Flex Code
13830 \begin_layout Plain Layout
13836 will be fixed for a certain style.
13837 The exception is the default style, since the indentation for these paragraphs
13838 can be prohibited with
13839 \begin_inset Flex Code
13842 \begin_layout Plain Layout
13850 \begin_inset Flex Code
13853 \begin_layout Plain Layout
13859 style paragraphs inside environments use the
13860 \begin_inset Flex Code
13863 \begin_layout Plain Layout
13869 of the environment, not their native one.
13871 \begin_inset Flex Code
13874 \begin_layout Plain Layout
13880 paragraphs inside an enumeration are not indented.
13883 \begin_layout Description
13884 \begin_inset Flex Code
13887 \begin_layout Plain Layout
13894 \begin_inset Flex Code
13897 \begin_layout Plain Layout
13903 ] The vertical space between two paragraphs of this style.
13906 \begin_layout Description
13907 \begin_inset Flex Code
13910 \begin_layout Plain Layout
13917 \begin_inset Flex Code
13920 \begin_layout Plain Layout
13926 ] LyX allows the user to choose either
13927 \begin_inset Quotes eld
13931 \begin_inset Quotes erd
13935 \begin_inset Quotes eld
13939 \begin_inset Quotes erd
13942 to separate paragraphs.
13944 \begin_inset Quotes eld
13948 \begin_inset Quotes erd
13952 \begin_inset Flex Code
13955 \begin_layout Plain Layout
13963 \begin_inset Quotes eld
13967 \begin_inset Quotes erd
13971 \begin_inset Flex Code
13974 \begin_layout Plain Layout
13980 is ignored and all paragraphs are separated by the
13981 \begin_inset Flex Code
13984 \begin_layout Plain Layout
13991 The vertical space is calculated with
13992 \begin_inset Flex Code
13995 \begin_layout Plain Layout
13997 \begin_inset space ~
14006 \begin_inset Flex Code
14009 \begin_layout Plain Layout
14015 is the height of a row with the normal font.
14016 This way, the look stays the same with different screen fonts.
14019 \begin_layout Description
14020 \begin_inset Flex Code
14023 \begin_layout Plain Layout
14030 \begin_inset Flex Code
14033 \begin_layout Plain Layout
14042 \begin_inset space \thinspace{}
14046 \begin_inset Flex Code
14049 \begin_layout Plain Layout
14055 ] Whether the contents of this paragraph should be output in raw form, meaning
14056 without special translations that LaTeX would require.
14059 \begin_layout Description
14060 \begin_inset Flex Code
14063 \begin_layout Plain Layout
14069 Information to be included in the LaTeX preamble when this style is used.
14070 Used to define macros, load packages, etc., required by this particular
14073 \begin_inset Quotes eld
14077 \begin_inset Flex Code
14080 \begin_layout Plain Layout
14087 \begin_inset Quotes erd
14093 \begin_layout Description
14094 \begin_inset Flex Code
14097 \begin_layout Plain Layout
14104 \begin_inset Flex Code
14107 \begin_layout Plain Layout
14113 ] The prefix to use when creating labels referring to paragraphs of this
14115 This allows the use of formatted references.
14118 \begin_layout Description
14119 \begin_inset Flex Code
14122 \begin_layout Plain Layout
14129 \begin_inset Flex Code
14132 \begin_layout Plain Layout
14138 ] Whether the style requires the feature
14139 \begin_inset Flex Code
14142 \begin_layout Plain Layout
14149 See the description of
14150 \begin_inset Flex Code
14153 \begin_layout Plain Layout
14160 \begin_inset CommandInset ref
14162 reference "sub:General-text-class"
14166 ) for information on `features'.
14169 \begin_layout Description
14170 \begin_inset Flex Code
14173 \begin_layout Plain Layout
14180 \begin_inset Flex Code
14183 \begin_layout Plain Layout
14192 \begin_inset Flex Code
14195 \begin_layout Plain Layout
14201 ] Resets the LaTeX arguments of this style (as defined via the
14202 \begin_inset Flex Code
14205 \begin_layout Plain Layout
14212 This is useful if you have copied a style via
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14222 , but you do not want to inherit its (required and optional) arguments.
14225 \begin_layout Description
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14236 \begin_inset Flex Code
14239 \begin_layout Plain Layout
14245 ] A string that is put at the end of the layout content.
14246 A line break in the output can be indicated by
14247 \begin_inset Flex Code
14250 \begin_layout Plain Layout
14259 \begin_layout Description
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
14292 \begin_layout Description
14293 \begin_inset Flex Code
14296 \begin_layout Plain Layout
14303 \begin_inset Flex Code
14306 \begin_layout Plain Layout
14315 \begin_inset Flex Code
14318 \begin_layout Plain Layout
14325 \begin_inset Flex Code
14328 \begin_layout Plain Layout
14335 \begin_inset Flex Code
14338 \begin_layout Plain Layout
14340 \begin_inset space ~
14348 ] This defines what the default spacing should be in the style.
14350 \begin_inset Flex Code
14353 \begin_layout Plain Layout
14360 \begin_inset Flex Code
14363 \begin_layout Plain Layout
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14379 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14380 If you specify the argument
14381 \begin_inset Flex Code
14384 \begin_layout Plain Layout
14390 , then you must also provide a value argument which will be the actual multiplie
14392 Note that, contrary to other parameters,
14393 \begin_inset Flex Code
14396 \begin_layout Plain Layout
14402 implies the generation of specific LaTeX code, using the LaTeX package
14406 \begin_inset Flex Code
14409 \begin_layout Plain Layout
14418 \begin_layout Description
14419 \begin_inset Flex Code
14422 \begin_layout Plain Layout
14429 \begin_inset Flex Code
14432 \begin_layout Plain Layout
14439 \begin_inset space \thinspace{}
14443 \begin_inset Flex Code
14446 \begin_layout Plain Layout
14454 ] Allow spell-checking paragraphs of this style.
14458 \begin_layout Description
14459 \begin_inset Flex Code
14462 \begin_layout Plain Layout
14468 The font used for the text body .
14470 \begin_inset CommandInset ref
14472 reference "sub:Font-description"
14479 \begin_layout Description
14480 \begin_inset Flex Code
14483 \begin_layout Plain Layout
14492 \begin_inset Flex Code
14495 \begin_layout Plain Layout
14505 The level of the style in the table of contents.
14506 This is used for automatic numbering of section headings.
14509 \begin_layout Description
14510 \begin_inset Flex Code
14513 \begin_layout Plain Layout
14520 \begin_inset Flex Code
14523 \begin_layout Plain Layout
14529 ] The vertical space with which the very first of a chain of paragraphs
14530 with this style is separated from the previous paragraph.
14531 If the previous paragraph has another style, the separations are not simply
14532 added, but the maximum is taken.
14535 \begin_layout Subsection
14536 \begin_inset CommandInset label
14542 Internationalization of Paragraph Styles
14545 \begin_layout Standard
14546 LyX has long supported internationalization of layout information, but,
14547 until version 2.0, this applied only to the user interface and not to, say,
14549 Thus, French authors were forced to resort to ugly hacks if they wanted
14554 1' instead of `Theorem 1'.
14555 Thanks to Georg Baum, that is no longer the case.
14558 \begin_layout Standard
14560 \begin_inset Flex Code
14563 \begin_layout Plain Layout
14569 defines text that is to appear in the typeset document, it may use
14570 \begin_inset Flex Code
14573 \begin_layout Plain Layout
14580 \begin_inset Flex Code
14583 \begin_layout Plain Layout
14589 to support non-English and even multi-language documents correctly.
14590 The following excerpt (from the
14591 \begin_inset Flex Code
14594 \begin_layout Plain Layout
14600 file) shows how this works:
14603 \begin_layout LyX-Code
14608 \begin_layout LyX-Code
14611 theoremstyle{remark}
14614 \begin_layout LyX-Code
14617 newtheorem{claim}[thm]{
14624 \begin_layout LyX-Code
14628 \begin_layout LyX-Code
14632 \begin_layout LyX-Code
14637 claimname}{_(Claim)}
14640 \begin_layout LyX-Code
14644 \begin_layout LyX-Code
14648 \begin_layout LyX-Code
14657 claimname}{_(Claim)}}
14660 \begin_layout LyX-Code
14665 \begin_layout Standard
14666 In principle, any legal LaTeX may appear in the
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14677 \begin_inset Flex Code
14680 \begin_layout Plain Layout
14686 tags, but in practice they will typically look as they do here.
14687 The key to correct translation of the typeset text is the definition of
14689 \begin_inset Flex Code
14692 \begin_layout Plain Layout
14701 \begin_inset Flex Code
14704 \begin_layout Plain Layout
14716 \begin_layout Standard
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14727 tag provides for internationalization based upon the overall language of
14729 The contents of the tag will be included in the preamble, just as with
14731 \begin_inset Flex Code
14734 \begin_layout Plain Layout
14741 What makes it special is the use of the
14742 \begin_inset Quotes eld
14746 \begin_inset Quotes erd
14750 \begin_inset Flex Code
14753 \begin_layout Plain Layout
14759 , which will be replaced, when LyX produces LaTeX output, with the translation
14760 of its argument into the document language.
14763 \begin_layout Standard
14765 \begin_inset Flex Code
14768 \begin_layout Plain Layout
14774 tag is more complex, since it is meant to provide support for multi-language
14775 documents and so offers an interface to the
14776 \begin_inset Flex Code
14779 \begin_layout Plain Layout
14786 Its contents will be added to the preamble once for each language that
14787 appears in the document.
14788 In this case, the argument to
14789 \begin_inset Flex Code
14792 \begin_layout Plain Layout
14798 will be replaced with its translation into the language in question; the
14800 \begin_inset Flex Code
14803 \begin_layout Plain Layout
14809 is replaced by the language name (as used by the babel package).
14812 \begin_layout Standard
14813 A German document that also included a French section would thus have the
14814 following in the preamble:
14817 \begin_layout LyX-Code
14826 claimname}{Affirmation}}
14827 \begin_inset Newline newline
14838 claimname}{Behauptung}}
14839 \begin_inset Newline newline
14846 claimname}{Behauptung}
14849 \begin_layout Standard
14851 \begin_inset Flex Code
14854 \begin_layout Plain Layout
14860 will then conspire to produce the correct text in the output.
14863 \begin_layout Standard
14864 One important point to note here is that the translations are provided by
14865 LyX itself, through the file
14866 \begin_inset Flex Code
14869 \begin_layout Plain Layout
14876 This means, in effect, that
14877 \begin_inset Flex Code
14880 \begin_layout Plain Layout
14887 \begin_inset Flex Code
14890 \begin_layout Plain Layout
14896 are really only of use in layout files that are provided with LyX, since
14897 text entered in user-created layout files will not be seen by LyX's internation
14898 alization routines unless the
14899 \begin_inset Flex Code
14902 \begin_layout Plain Layout
14908 file is modified accordingly.
14909 That said, however, any layout created with the intention that it will
14910 be included with LyX should use these tags where appropriate.
14911 Please note that the paragraph style translations provided by LyX will
14912 never change with a minor update (e.
14913 \begin_inset space \thinspace{}
14917 \begin_inset space \space{}
14920 from version 2.1.x to 2.1.y).
14921 It is however quite likely that a major update (e.
14922 \begin_inset space \thinspace{}
14926 \begin_inset space \space{}
14929 from 2.0.x to 2.1.y) will introduce new translations or corrections.
14932 \begin_layout Subsection
14934 \begin_inset CommandInset label
14943 \begin_layout Standard
14944 It is necessary to define the floats (
14945 \begin_inset Flex MenuItem
14948 \begin_layout Plain Layout
14955 \begin_inset Flex MenuItem
14958 \begin_layout Plain Layout
14964 , \SpecialChar \ldots{}
14965 ) in the text class itself.
14966 Standard floats are included in the file
14967 \begin_inset Flex Code
14970 \begin_layout Plain Layout
14976 , so you may have to do no more than add
14979 \begin_layout LyX-Code
14980 Input stdfloats.inc
14983 \begin_layout Standard
14984 to your layout file.
14985 If you want to implement a text class that proposes some other float types
14986 (like the AGU class bundled with LyX), the information below will hopefully
14990 \begin_layout Description
14991 \begin_inset Flex Code
14994 \begin_layout Plain Layout
15001 \begin_inset Flex Code
15004 \begin_layout Plain Layout
15011 \begin_inset Quotes erd
15015 \begin_inset Quotes erd
15018 ] The file name extension of an auxiliary file for the list of figures (or
15020 LaTeX writes the captions to this file.
15023 \begin_layout Description
15024 \begin_inset Flex Code
15027 \begin_layout Plain Layout
15034 \begin_inset Flex Code
15037 \begin_layout Plain Layout
15044 \begin_inset Quotes erd
15048 \begin_inset Quotes erd
15051 ] The string that will be used in the menus and also for the caption.
15052 This is translated to the current language if babel is used.
15055 \begin_layout Description
15056 \begin_inset Flex Code
15059 \begin_layout Plain Layout
15065 These tags control the XHTML output.
15067 \begin_inset CommandInset ref
15069 reference "sec:Tags-for-XHTML"
15076 \begin_layout Description
15077 \begin_inset Flex Code
15080 \begin_layout Plain Layout
15089 \begin_inset Flex Code
15092 \begin_layout Plain Layout
15101 \begin_inset space \thinspace{}
15105 \begin_inset Flex Code
15108 \begin_layout Plain Layout
15114 ] Indicates whether the float is already defined in the document class or
15115 if instead the LaTeX package
15116 \begin_inset Flex Code
15119 \begin_layout Plain Layout
15125 needs to be loaded to define it on-the-fly.
15127 \begin_inset Flex Code
15130 \begin_layout Plain Layout
15137 \begin_inset Flex Code
15140 \begin_layout Plain Layout
15147 It should be set to
15148 \begin_inset Flex Code
15151 \begin_layout Plain Layout
15157 if the float is already defined by the LaTeX document class.
15160 \begin_layout Description
15161 \begin_inset Flex Code
15164 \begin_layout Plain Layout
15171 \begin_inset Flex Code
15174 \begin_layout Plain Layout
15181 \begin_inset Quotes erd
15185 \begin_inset Quotes erd
15188 ] The command used to generate a list of floats of this type; the leading
15197 \begin_inset Flex Code
15200 \begin_layout Plain Layout
15206 is false, since there is no standard way to generate this command.
15208 \begin_inset Flex Code
15211 \begin_layout Plain Layout
15217 is true, since in that case there is a standard way to define the command.
15220 \begin_layout Description
15221 \begin_inset Flex Code
15224 \begin_layout Plain Layout
15231 \begin_inset Flex Code
15234 \begin_layout Plain Layout
15241 \begin_inset Quotes erd
15245 \begin_inset Quotes erd
15248 ] A title for a list of floats of this kind (list of figures, tables, or
15250 It is used for the screen label within LyX, it is used by LaTeX for the
15251 title and it is used as the title in the XHTML output.
15252 It will be translated to the document language.
15255 \begin_layout Description
15256 \begin_inset Flex Code
15259 \begin_layout Plain Layout
15266 \begin_inset Flex Code
15269 \begin_layout Plain Layout
15276 \begin_inset Quotes erd
15280 \begin_inset Quotes erd
15283 ] This (optional) argument determines whether floats of this class will
15284 be numbered within some sectional unit of the document.
15286 \begin_inset Flex Code
15289 \begin_layout Plain Layout
15296 \begin_inset Quotes eld
15300 \begin_inset Flex Code
15303 \begin_layout Plain Layout
15310 \begin_inset Quotes erd
15313 , the floats will be numbered within chapters.
15317 \begin_layout Description
15318 \begin_inset Flex Code
15321 \begin_layout Plain Layout
15328 \begin_inset Flex Code
15331 \begin_layout Plain Layout
15338 \begin_inset Quotes erd
15342 \begin_inset Quotes erd
15345 ] The default placement for the given class of floats.
15346 The string should be as in standard LaTeX:
15347 \begin_inset Flex Code
15350 \begin_layout Plain Layout
15357 \begin_inset Flex Code
15360 \begin_layout Plain Layout
15367 \begin_inset Flex Code
15370 \begin_layout Plain Layout
15377 \begin_inset Flex Code
15380 \begin_layout Plain Layout
15386 for top, bottom, page, and here, respectively.
15390 \begin_layout Plain Layout
15391 Note that the order of these letters in the string is irrelevant, like in
15397 On top of that there is a new type,
15398 \begin_inset Flex Code
15401 \begin_layout Plain Layout
15407 , which does not really correspond to a float, since it means: put it
15408 \begin_inset Quotes eld
15412 \begin_inset Quotes erd
15416 Note however that the
15417 \begin_inset Flex Code
15420 \begin_layout Plain Layout
15426 specifier is special and, because of implementation details, cannot be
15427 used in non-built in float types.
15428 If you do not understand what this means, just use
15429 \begin_inset Quotes eld
15433 \begin_inset Flex Code
15436 \begin_layout Plain Layout
15443 \begin_inset Quotes erd
15449 \begin_layout Description
15450 \begin_inset Flex Code
15453 \begin_layout Plain Layout
15460 \begin_inset Flex Code
15463 \begin_layout Plain Layout
15469 ] The prefix to use when creating labels referring to floats of this type.
15470 This allows the use of formatted references.
15471 Note that you can remove any
15472 \begin_inset Flex Code
15475 \begin_layout Plain Layout
15481 set by a copied style by using the special value
15482 \begin_inset Quotes eld
15486 \begin_inset Quotes erd
15489 , which must be all caps.
15492 \begin_layout Description
15493 \begin_inset Flex Code
15496 \begin_layout Plain Layout
15503 \begin_inset Flex Code
15506 \begin_layout Plain Layout
15513 \begin_inset Quotes erd
15517 \begin_inset Quotes erd
15520 ] The style used when defining the float using
15521 \begin_inset Flex Code
15524 \begin_layout Plain Layout
15535 \begin_layout Description
15536 \begin_inset Flex Code
15539 \begin_layout Plain Layout
15546 \begin_inset Flex Code
15549 \begin_layout Plain Layout
15556 \begin_inset Quotes erd
15560 \begin_inset Quotes erd
15564 \begin_inset Quotes eld
15568 \begin_inset Quotes erd
15571 of the new class of floats, like program or algorithm.
15572 After the appropriate
15573 \begin_inset Flex Code
15576 \begin_layout Plain Layout
15585 \begin_inset Flex Code
15588 \begin_layout Plain Layout
15597 \begin_inset Flex Code
15600 \begin_layout Plain Layout
15611 \begin_layout Description
15612 \begin_inset Flex Code
15615 \begin_layout Plain Layout
15622 \begin_inset Flex Code
15625 \begin_layout Plain Layout
15632 \begin_inset space \thinspace{}
15636 \begin_inset Flex Code
15639 \begin_layout Plain Layout
15647 ] Specifies whether this float is defined using the LaTeX package
15648 \begin_inset Flex Code
15651 \begin_layout Plain Layout
15657 , either by the class file, another package or on-the-fly by LyX itself.
15660 \begin_layout Standard
15661 Note that defining a float with type
15662 \begin_inset Flex Code
15665 \begin_layout Plain Layout
15673 automatically defines the corresponding counter with name
15674 \begin_inset Flex Code
15677 \begin_layout Plain Layout
15688 \begin_layout Subsection
15689 Flex insets and InsetLayout
15690 \begin_inset CommandInset label
15692 name "sub:Flex-insets-and"
15699 \begin_layout Standard
15700 Flex insets come in three different kinds:
15703 \begin_layout Itemize
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15714 ): These define semantic markup corresponding to such LaTeX commands as
15716 \begin_inset Flex Code
15719 \begin_layout Plain Layout
15728 \begin_inset Flex Code
15731 \begin_layout Plain Layout
15742 \begin_layout Itemize
15744 \begin_inset Flex Code
15747 \begin_layout Plain Layout
15753 ): These can be used to define custom collapsible insets, similar to TeX
15754 code, footnote, and the like.
15755 An obvious example is an endnote inset, which is defined in the
15756 \begin_inset Flex Code
15759 \begin_layout Plain Layout
15768 \begin_layout Itemize
15770 \begin_inset Flex Code
15773 \begin_layout Plain Layout
15779 ): For use with DocBook classes.
15782 \begin_layout Standard
15783 Flex insets are defined using the
15784 \begin_inset Flex Code
15787 \begin_layout Plain Layout
15793 tag, which shall be explained in a moment.
15796 \begin_layout Standard
15798 \begin_inset Flex Code
15801 \begin_layout Plain Layout
15807 tag also serves another function: It can be used to customize the general
15808 layout of many different types of insets.
15810 \begin_inset Flex Code
15813 \begin_layout Plain Layout
15819 can be used to customize the layout parameters for footnotes, marginal
15820 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15821 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15825 \begin_layout Standard
15827 \begin_inset Flex Code
15830 \begin_layout Plain Layout
15836 definition must begin with a line of the form:
15839 \begin_layout LyX-Code
15843 \begin_layout Standard
15845 \begin_inset Flex Code
15848 \begin_layout Plain Layout
15854 indicates the inset whose layout is being defined, and here there are four
15858 \begin_layout Enumerate
15859 The layout for a pre-existing inset is being modified.
15860 In this case, can be
15861 \begin_inset Flex Code
15864 \begin_layout Plain Layout
15870 any one of the following:
15871 \begin_inset Flex Code
15874 \begin_layout Plain Layout
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15891 \begin_inset Flex Code
15894 \begin_layout Plain Layout
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15911 \begin_inset Flex Code
15914 \begin_layout Plain Layout
15921 \begin_inset Flex Code
15924 \begin_layout Plain Layout
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15941 \begin_inset Flex Code
15944 \begin_layout Plain Layout
15951 \begin_inset Flex Code
15954 \begin_layout Plain Layout
15961 \begin_inset Flex Code
15964 \begin_layout Plain Layout
15971 \begin_inset Flex Code
15974 \begin_layout Plain Layout
15981 \begin_inset Flex Code
15984 \begin_layout Plain Layout
15991 \begin_inset Flex Code
15994 \begin_layout Plain Layout
16001 \begin_inset Flex Code
16004 \begin_layout Plain Layout
16011 \begin_inset Flex Code
16014 \begin_layout Plain Layout
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16031 \begin_inset Flex Code
16034 \begin_layout Plain Layout
16041 \begin_inset Flex Code
16044 \begin_layout Plain Layout
16051 \begin_inset Flex Code
16054 \begin_layout Plain Layout
16061 \begin_inset Flex Code
16064 \begin_layout Plain Layout
16073 \begin_layout Enumerate
16074 The layout for a Flex inset is being defined.
16076 \begin_inset Flex Code
16079 \begin_layout Plain Layout
16085 must be of the form
16086 \begin_inset Quotes eld
16090 \begin_inset Flex Code
16093 \begin_layout Plain Layout
16100 \begin_inset Quotes erd
16104 \begin_inset Flex Code
16107 \begin_layout Plain Layout
16113 may be be any valid identifier not used by a pre-existing Flex inset.
16114 The identifier may include spaces, but in that case the whole thing must
16115 be wrapped in quotes.
16116 Note that the definition of a flex inset
16121 \begin_inset Flex Code
16124 \begin_layout Plain Layout
16130 entry, declaring which type of inset it defines.
16133 \begin_layout Enumerate
16134 The layout for user specific branch is being defined.
16136 \begin_inset Flex Code
16139 \begin_layout Plain Layout
16145 must be of the form
16146 \begin_inset Quotes eld
16150 \begin_inset Flex Code
16153 \begin_layout Plain Layout
16160 \begin_inset Quotes erd
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16173 may be be any valid identifier of branch defined in user's document.
16174 The identifier may include spaces, but in that case the whole thing must
16175 be wrapped in quotes.
16176 The main purpose of this feature is to allow LaTeX wrapping around specific
16177 branches as user needs.
16180 \begin_layout Enumerate
16181 The layout of a user (or class) specific caption is being defined.
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16192 must be of the form
16193 \begin_inset Quotes eld
16197 \begin_inset Flex Code
16200 \begin_layout Plain Layout
16207 \begin_inset Quotes erd
16211 \begin_inset Flex Code
16214 \begin_layout Plain Layout
16220 specifies the name of the caption as it appears in the menu.
16221 Have a look at the standard caption (
16222 \begin_inset Flex Code
16225 \begin_layout Plain Layout
16231 ), the specific captions of the KOMA-Script classes (
16232 \begin_inset Flex Code
16235 \begin_layout Plain Layout
16242 \begin_inset Flex Code
16245 \begin_layout Plain Layout
16254 \begin_inset space ~
16260 \begin_inset Flex Code
16263 \begin_layout Plain Layout
16269 ) for applications.
16272 \begin_layout Standard
16274 \begin_inset Flex Code
16277 \begin_layout Plain Layout
16283 definition can contain the following entries:
16286 \begin_layout Description
16287 \begin_inset Flex Code
16290 \begin_layout Plain Layout
16297 \begin_inset Flex Code
16300 \begin_layout Plain Layout
16306 ] Defines argument number of a command\SpecialChar \slash{}
16307 environment associated with the current
16309 The definition must end with
16310 \begin_inset Flex Code
16313 \begin_layout Plain Layout
16321 \begin_inset CommandInset ref
16323 reference "sub:Paragraph-Styles"
16330 \begin_layout Description
16331 \begin_inset Flex Code
16334 \begin_layout Plain Layout
16340 Preamble for changing language commands; see
16341 \begin_inset CommandInset ref
16343 reference "sub:I18n"
16350 \begin_layout Description
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16361 \begin_inset Flex Code
16364 \begin_layout Plain Layout
16370 ] The color for the inset's background.
16372 \begin_inset CommandInset ref
16374 reference "chap:Names-of-colors"
16378 for a list of the available color names.
16381 \begin_layout Description
16382 \begin_inset Flex Code
16385 \begin_layout Plain Layout
16392 \begin_inset Flex Code
16395 \begin_layout Plain Layout
16404 \begin_inset space \thinspace{}
16408 \begin_inset Flex Code
16411 \begin_layout Plain Layout
16417 ] Whether to use the content of the inset as the label, when the inset is
16422 \begin_layout Description
16423 \begin_inset Flex Code
16426 \begin_layout Plain Layout
16433 \begin_inset Flex Code
16436 \begin_layout Plain Layout
16442 ] As with paragraph styles, see
16443 \begin_inset CommandInset ref
16445 reference "sub:Paragraph-Styles"
16450 Note that you need to specify the complete type, e.
16451 \begin_inset space \thinspace{}
16455 \begin_inset space ~
16459 \begin_inset Flex Code
16462 \begin_layout Plain Layout
16463 CopyStyle Flex:<name>
16471 \begin_layout Description
16472 \begin_inset Flex Code
16475 \begin_layout Plain Layout
16482 \begin_inset Flex Code
16485 \begin_layout Plain Layout
16494 \begin_inset space \thinspace{}
16498 \begin_inset Flex Code
16501 \begin_layout Plain Layout
16507 ] Indicates whether the user may employ the Paragraph Settings dialog to
16508 customize the paragraph.
16511 \begin_layout Description
16512 \begin_inset Flex Code
16515 \begin_layout Plain Layout
16522 \begin_inset Flex Code
16525 \begin_layout Plain Layout
16532 \begin_inset Flex Code
16535 \begin_layout Plain Layout
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16551 , describing the rendering style used for the inset's frame and buttons.
16552 Footnotes generally use
16553 \begin_inset Flex Code
16556 \begin_layout Plain Layout
16562 , ERT insets generally
16563 \begin_inset Flex Code
16566 \begin_layout Plain Layout
16572 , and character styles
16573 \begin_inset Flex Code
16576 \begin_layout Plain Layout
16585 \begin_layout Description
16586 \begin_inset Flex Code
16589 \begin_layout Plain Layout
16596 \begin_inset Flex Code
16599 \begin_layout Plain Layout
16608 \begin_inset space \thinspace{}
16614 \begin_inset Flex Code
16617 \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 Indicates whether the environment will stand on its own in the output or
16647 will appear inline with the surrounding text.
16648 If set to false, it is supposed that the LaTeX environment ignores white
16649 space (including one newline character) after the
16650 \begin_inset Flex Code
16653 \begin_layout Plain Layout
16666 \begin_inset Flex Code
16669 \begin_layout Plain Layout
16685 \begin_layout Description
16686 \begin_inset Flex Code
16689 \begin_layout Plain Layout
16695 Required at the end of the
16696 \begin_inset Flex Code
16699 \begin_layout Plain Layout
16708 \begin_layout Description
16709 \begin_inset Flex Code
16712 \begin_layout Plain Layout
16718 The font used for both the text body
16724 \begin_inset CommandInset ref
16726 reference "sub:Font-description"
16731 Note that defining this font automatically defines the
16732 \begin_inset Flex Code
16735 \begin_layout Plain Layout
16741 to the same value, so define this first and define
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16751 later if you want them to be different.
16754 \begin_layout Description
16755 \begin_inset Flex Code
16758 \begin_layout Plain Layout
16759 ForceLocalFontSwitch
16765 \begin_inset Flex Code
16768 \begin_layout Plain Layout
16777 \begin_inset space \thinspace{}
16781 \begin_inset Flex Code
16784 \begin_layout Plain Layout
16790 ] When using babel, always use a local font switch (
16791 \begin_inset Flex Code
16794 \begin_layout Plain Layout
16802 ), never a global one (such as
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16817 \begin_layout Description
16818 \begin_inset Flex Code
16821 \begin_layout Plain Layout
16828 \begin_inset Flex Code
16831 \begin_layout Plain Layout
16840 \begin_inset space \thinspace{}
16844 \begin_inset Flex Code
16847 \begin_layout Plain Layout
16854 \begin_inset Quotes eld
16858 \begin_inset Quotes erd
16861 language, leading to Left-to-Right (Latin) output, e.
16862 \begin_inset space \thinspace{}
16866 \begin_inset space \space{}
16869 in TeX code or URL.
16873 \begin_layout Description
16874 \begin_inset Flex Code
16877 \begin_layout Plain Layout
16884 \begin_inset Flex Code
16887 \begin_layout Plain Layout
16896 \begin_inset space \thinspace{}
16900 \begin_inset Flex Code
16903 \begin_layout Plain Layout
16909 ] Indicates whether the
16910 \begin_inset Flex Code
16913 \begin_layout Plain Layout
16919 should be used or, instead, the user can change the paragraph style used
16924 \begin_layout Description
16925 \begin_inset Flex Code
16928 \begin_layout Plain Layout
16935 \begin_inset Flex Code
16938 \begin_layout Plain Layout
16947 \begin_inset space \thinspace{}
16951 \begin_inset Flex Code
16954 \begin_layout Plain Layout
16960 ] As with paragraph styles, see
16961 \begin_inset CommandInset ref
16963 reference "sub:Paragraph-Styles"
16970 \begin_layout Description
16971 \begin_inset Flex Code
16974 \begin_layout Plain Layout
16980 These tags control the XHTML output.
16982 \begin_inset CommandInset ref
16984 reference "sec:Tags-for-XHTML"
16991 \begin_layout Description
16992 \begin_inset Flex Code
16995 \begin_layout Plain Layout
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17014 \begin_inset space \thinspace{}
17018 \begin_inset Flex Code
17021 \begin_layout Plain Layout
17027 ] Whether to include the contents of this inset in the strings generated
17028 for the `Outline' pane.
17029 One would not, for example, want the content of a footnote in a section
17030 header to be included in the TOC displayed in the outline, but one would
17031 normally want the content of a character style displayed.
17032 Default is false: not to include.
17035 \begin_layout Description
17036 \begin_inset Flex Code
17039 \begin_layout Plain Layout
17048 \begin_inset Flex Code
17051 \begin_layout Plain Layout
17060 \begin_inset space \thinspace{}
17064 \begin_inset Flex Code
17067 \begin_layout Plain Layout
17073 ] As with paragraph styles, see
17074 \begin_inset CommandInset ref
17076 reference "sub:Paragraph-Styles"
17083 \begin_layout Description
17084 \begin_inset Flex Code
17087 \begin_layout Plain Layout
17093 The font used for the label.
17095 \begin_inset CommandInset ref
17097 reference "sub:Font-description"
17102 Note that this definition can never appear before
17103 \begin_inset Flex Code
17106 \begin_layout Plain Layout
17112 , lest it be ineffective.
17115 \begin_layout Description
17116 \begin_inset Flex Code
17119 \begin_layout Plain Layout
17126 \begin_inset Flex Code
17129 \begin_layout Plain Layout
17136 \begin_inset Quotes erd
17140 \begin_inset Quotes erd
17143 ] What will be displayed on the button or elsewhere as the inset label.
17145 \begin_inset Flex Code
17148 \begin_layout Plain Layout
17155 \begin_inset Flex Code
17158 \begin_layout Plain Layout
17164 ) modify this label on the fly.
17167 \begin_layout Description
17168 \begin_inset Flex Code
17171 \begin_layout Plain Layout
17177 Language dependent preamble; see
17178 \begin_inset CommandInset ref
17180 reference "sub:I18n"
17187 \begin_layout Description
17188 \begin_inset Flex Code
17191 \begin_layout Plain Layout
17198 \begin_inset Flex Code
17201 \begin_layout Plain Layout
17207 ] The name of the corresponding LaTeX stuff.
17208 Either the environment or command name.
17211 \begin_layout Description
17212 \begin_inset Flex Code
17215 \begin_layout Plain Layout
17222 \begin_inset Flex Code
17225 \begin_layout Plain Layout
17231 ] The optional parameter for the corresponding
17232 \begin_inset Flex Code
17235 \begin_layout Plain Layout
17241 stuff, including possible bracket pairs like
17242 \begin_inset Flex Code
17245 \begin_layout Plain Layout
17252 This parameter cannot be changed from within LyX (use
17253 \begin_inset Flex Code
17256 \begin_layout Plain Layout
17262 for customizable parameters).
17263 It will be output as is after all LaTeX
17264 \begin_inset Flex Code
17267 \begin_layout Plain Layout
17276 \begin_layout Description
17277 \begin_inset Flex Code
17280 \begin_layout Plain Layout
17287 \begin_inset Flex Code
17290 \begin_layout Plain Layout
17291 Command, Environment, None
17296 ] How the style should be translated into LaTeX.
17300 \begin_layout Plain Layout
17301 \begin_inset Flex Code
17304 \begin_layout Plain Layout
17310 is perhaps a bit misleading, since these rules apply to SGML classes too.
17311 Visit the SGML class files for specific examples.
17320 \begin_layout Description
17321 \begin_inset Flex Code
17324 \begin_layout Plain Layout
17330 means nothing special
17333 \begin_layout Description
17334 \begin_inset Flex Code
17337 \begin_layout Plain Layout
17344 \begin_inset Flex Code
17347 \begin_layout Plain Layout
17354 {\SpecialChar \ldots{}
17363 \begin_layout Description
17364 \begin_inset Flex Code
17367 \begin_layout Plain Layout
17374 \begin_inset Flex Code
17377 \begin_layout Plain Layout
17384 }\SpecialChar \ldots{}
17399 \begin_layout Standard
17400 Putting the last few things together, the LaTeX output will be either:
17403 \begin_layout LyX-Code
17406 LatexName[LatexParam]{\SpecialChar \ldots{}
17410 \begin_layout Standard
17414 \begin_layout LyX-Code
17417 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17423 \begin_layout Standard
17424 depending upon the LaTeX type.
17428 \begin_layout Description
17429 \begin_inset Flex Code
17432 \begin_layout Plain Layout
17439 \begin_inset Flex Code
17442 \begin_layout Plain Layout
17448 ] A string that is put at the beginning of the layout content.
17449 A line break in the output can be indicated by
17450 \begin_inset Flex Code
17453 \begin_layout Plain Layout
17462 \begin_layout Description
17463 \begin_inset Flex Code
17466 \begin_layout Plain Layout
17473 \begin_inset Flex Code
17476 \begin_layout Plain Layout
17483 \begin_inset Flex Code
17486 \begin_layout Plain Layout
17493 \begin_inset Flex Code
17496 \begin_layout Plain Layout
17503 \begin_inset Flex Code
17506 \begin_layout Plain Layout
17512 (indicating a dummy definition ending definitions of charstyles, etc).
17513 This entry is required in and is only meaningful for Flex insets.
17514 Among other things, it determines on which menu this inset will appear.
17516 \begin_inset Flex Code
17519 \begin_layout Plain Layout
17526 \begin_inset Flex Code
17529 \begin_layout Plain Layout
17535 will automatically set
17536 \begin_inset Flex Code
17539 \begin_layout Plain Layout
17547 \begin_inset Flex Code
17550 \begin_layout Plain Layout
17556 can be set to true for
17557 \begin_inset Flex Code
17560 \begin_layout Plain Layout
17566 insets by setting it
17571 \begin_inset Flex Code
17574 \begin_layout Plain Layout
17583 \begin_layout Description
17584 \begin_inset Flex Code
17587 \begin_layout Plain Layout
17594 \begin_inset Flex Code
17597 \begin_layout Plain Layout
17606 \begin_inset space \thinspace{}
17610 \begin_inset Flex Code
17613 \begin_layout Plain Layout
17619 ] Whether multiple paragraphs are permitted in this inset.
17621 \begin_inset Flex Code
17624 \begin_layout Plain Layout
17630 to the same value and
17631 \begin_inset Flex Code
17634 \begin_layout Plain Layout
17640 to the opposite value.
17641 These can be reset to other values, if they are used
17646 \begin_inset Flex Code
17649 \begin_layout Plain Layout
17659 \begin_layout Description
17660 \begin_inset Flex Code
17663 \begin_layout Plain Layout
17670 \begin_inset Flex Code
17673 \begin_layout Plain Layout
17682 \begin_inset space \thinspace{}
17686 \begin_inset Flex Code
17689 \begin_layout Plain Layout
17695 ] Whether fragile commands in this inset should be
17696 \begin_inset Flex Code
17699 \begin_layout Plain Layout
17712 whether the command should itself be protected.) Default is false.
17715 \begin_layout Description
17716 \begin_inset Flex Code
17719 \begin_layout Plain Layout
17726 \begin_inset Flex Code
17729 \begin_layout Plain Layout
17735 ] Deletes an existing
17736 \begin_inset Flex Code
17739 \begin_layout Plain Layout
17748 \begin_layout Description
17749 \begin_inset Flex Code
17752 \begin_layout Plain Layout
17759 \begin_inset Flex Code
17762 \begin_layout Plain Layout
17771 \begin_inset space \thinspace{}
17775 \begin_inset Flex Code
17778 \begin_layout Plain Layout
17784 ] As with paragraph styles, see
17785 \begin_inset CommandInset ref
17787 reference "sub:Paragraph-Styles"
17795 \begin_layout Description
17796 \begin_inset Flex Code
17799 \begin_layout Plain Layout
17806 \begin_inset Flex Code
17809 \begin_layout Plain Layout
17818 \begin_inset space \thinspace{}
17822 \begin_inset Flex Code
17825 \begin_layout Plain Layout
17831 ] As with paragraph styles, see
17832 \begin_inset CommandInset ref
17834 reference "sub:Paragraph-Styles"
17842 \begin_layout Description
17843 \begin_inset Flex Code
17846 \begin_layout Plain Layout
17852 As with paragraph styles, see
17853 \begin_inset CommandInset ref
17855 reference "sub:Paragraph-Styles"
17862 \begin_layout Description
17863 \begin_inset Flex Code
17866 \begin_layout Plain Layout
17873 \begin_inset Flex Code
17876 \begin_layout Plain Layout
17882 ] The prefix to use when creating labels referring to insets of this type.
17883 This allows the use of formatted references.
17886 \begin_layout Description
17887 \begin_inset Flex Code
17890 \begin_layout Plain Layout
17897 \begin_inset Flex Code
17900 \begin_layout Plain Layout
17906 ] As with paragraph styles, see
17907 \begin_inset CommandInset ref
17909 reference "sub:Paragraph-Styles"
17916 \begin_layout Description
17917 \begin_inset Flex Code
17920 \begin_layout Plain Layout
17927 \begin_inset Flex Code
17930 \begin_layout Plain Layout
17939 \begin_inset space \thinspace{}
17943 \begin_inset Flex Code
17946 \begin_layout Plain Layout
17952 ] Resets the LaTeX arguments of this layout (as defined via the
17953 \begin_inset Flex Code
17956 \begin_layout Plain Layout
17963 This is useful if you have copied a style via
17964 \begin_inset Flex Code
17967 \begin_layout Plain Layout
17973 , but you do not want to inherit its (required and optional) arguments.
17976 \begin_layout Description
17977 \begin_inset Flex Code
17980 \begin_layout Plain Layout
17987 \begin_inset Flex Code
17990 \begin_layout Plain Layout
17997 \begin_inset space \thinspace{}
18001 \begin_inset Flex Code
18004 \begin_layout Plain Layout
18012 ] Whether this inset should use the font of its surrounding environment
18014 Default is true: uses its own.
18017 \begin_layout Description
18018 \begin_inset Flex Code
18021 \begin_layout Plain Layout
18028 \begin_inset Flex Code
18031 \begin_layout Plain Layout
18037 ] A string that is put at the end of the layout content.
18038 A line break in the output can be indicated by
18039 \begin_inset Flex Code
18042 \begin_layout Plain Layout
18051 \begin_layout Description
18052 \begin_inset Flex Code
18055 \begin_layout Plain Layout
18062 \begin_inset Flex Code
18065 \begin_layout Plain Layout
18072 \begin_inset space \thinspace{}
18076 \begin_inset Flex Code
18079 \begin_layout Plain Layout
18087 ] Allow spell-checking the contents of this inset.
18091 \begin_layout Subsection
18093 \begin_inset CommandInset label
18095 name "sub:Counters"
18102 \begin_layout Standard
18103 It is necessary to define the counters (
18104 \begin_inset Flex MenuItem
18107 \begin_layout Plain Layout
18114 \begin_inset Flex MenuItem
18117 \begin_layout Plain Layout
18123 , \SpecialChar \ldots{}
18124 ) in the text class itself.
18125 The standard counters are defined in the file
18126 \begin_inset Flex Code
18129 \begin_layout Plain Layout
18135 , so you may have to do no more than add
18138 \begin_layout LyX-Code
18139 Input stdcounters.inc
18142 \begin_layout Standard
18143 to your layout file to get them to work.
18144 But if you want to define custom counters, then you can do so.
18145 The counter declaration must begin with:
18148 \begin_layout LyX-Code
18149 Counter CounterName
18152 \begin_layout Standard
18154 \begin_inset Flex Code
18157 \begin_layout Plain Layout
18163 ' is replaced by the name of the counter.
18164 And it must end with
18165 \begin_inset Quotes eld
18169 \begin_inset Flex Code
18172 \begin_layout Plain Layout
18179 \begin_inset Quotes erd
18183 The following parameters can also be used:
18186 \begin_layout Description
18187 \begin_inset Flex Code
18190 \begin_layout Plain Layout
18197 \begin_inset Flex Code
18200 \begin_layout Plain Layout
18206 ] Sets the initial value for the counter, to which it will be reset whenever
18208 Normally, one will want the default, 1.
18211 \begin_layout Description
18212 \begin_inset Flex Code
18215 \begin_layout Plain Layout
18222 \begin_inset Flex Code
18225 \begin_layout Plain Layout
18232 \begin_inset Quotes erd
18236 \begin_inset Quotes erd
18239 ] When defined, this string defines how the counter is displayed.
18240 Setting this value sets
18241 \begin_inset Flex Code
18244 \begin_layout Plain Layout
18245 LabelStringAppendix
18251 The following special constructs can be used in the string:
18255 \begin_layout Itemize
18256 \begin_inset Flex Code
18259 \begin_layout Plain Layout
18267 will be replaced by the expansion of the
18268 \begin_inset Flex Code
18271 \begin_layout Plain Layout
18278 \begin_inset Flex Code
18281 \begin_layout Plain Layout
18282 LabelStringAppendix
18288 \begin_inset Flex Code
18291 \begin_layout Plain Layout
18301 \begin_layout Itemize
18302 counter values can be expressed using LaTeX-like macros
18303 \begin_inset Newline newline
18307 \begin_inset Flex Code
18310 \begin_layout Plain Layout
18327 \begin_inset Flex Code
18330 \begin_layout Plain Layout
18342 \begin_layout Plain Layout
18352 Actually, the situation is a bit more complicated: any
18371 other than those described below will produce arabic numerals.
18372 It would not be surprising to see this change in the future.
18378 \begin_inset Flex Code
18381 \begin_layout Plain Layout
18387 : 1, 2, 3,\SpecialChar \ldots{}
18389 \begin_inset Flex Code
18392 \begin_layout Plain Layout
18398 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18400 \begin_inset Flex Code
18403 \begin_layout Plain Layout
18409 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18411 \begin_inset Flex Code
18414 \begin_layout Plain Layout
18420 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18422 \begin_inset Flex Code
18425 \begin_layout Plain Layout
18431 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18433 \begin_inset Flex Code
18436 \begin_layout Plain Layout
18442 for hebrew numerals.
18446 \begin_layout Standard
18447 If LabelString is not defined, a default value is constructed as follows:
18448 if the counter has a master counter
18449 \begin_inset Flex Code
18452 \begin_layout Plain Layout
18459 \begin_inset Flex Code
18462 \begin_layout Plain Layout
18469 \begin_inset Newline newline
18473 \begin_inset Flex Code
18476 \begin_layout Plain Layout
18486 is used; otherwise the string
18487 \begin_inset Flex Code
18490 \begin_layout Plain Layout
18501 \begin_layout Description
18502 \begin_inset Flex Code
18505 \begin_layout Plain Layout
18506 LabelStringAppendix
18512 \begin_inset Flex Code
18515 \begin_layout Plain Layout
18522 \begin_inset Quotes erd
18526 \begin_inset Quotes erd
18530 \begin_inset Flex Code
18533 \begin_layout Plain Layout
18539 , but for use in the Appendix.
18542 \begin_layout Description
18543 \begin_inset Flex Code
18546 \begin_layout Plain Layout
18553 \begin_inset Flex Code
18556 \begin_layout Plain Layout
18563 \begin_inset Quotes erd
18567 \begin_inset Quotes erd
18570 ] A format for use with formatted references to this counter.
18571 For example, one might want to have references to section numbers appear
18573 \begin_inset Quotes eld
18577 \begin_inset Quotes erd
18581 The string should contain
18582 \begin_inset Quotes eld
18586 \begin_inset Quotes erd
18590 This will be replaced by the counter number itself.
18591 So, for sections, it would be: Section ##.
18594 \begin_layout Description
18595 \begin_inset Flex Code
18598 \begin_layout Plain Layout
18605 \begin_inset Flex Code
18608 \begin_layout Plain Layout
18615 \begin_inset Quotes erd
18619 \begin_inset Quotes erd
18622 ] If this is set to the name of another counter, the present counter will
18623 be reset every time the other one is increased.
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18647 \begin_layout Subsection
18649 \begin_inset CommandInset label
18651 name "sub:Font-description"
18658 \begin_layout Standard
18659 A font description looks like this:
18662 \begin_layout LyX-Code
18676 \begin_layout LyX-Code
18680 \begin_layout LyX-Code
18684 \begin_layout Standard
18685 The following commands are available:
18688 \begin_layout Description
18689 \begin_inset Flex Code
18692 \begin_layout Plain Layout
18699 \begin_inset Flex Code
18702 \begin_layout Plain Layout
18711 \begin_inset Flex Code
18714 \begin_layout Plain Layout
18721 \begin_inset Flex Code
18724 \begin_layout Plain Layout
18731 \begin_inset Flex Code
18734 \begin_layout Plain Layout
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18751 \begin_inset Flex Code
18754 \begin_layout Plain Layout
18761 \begin_inset Flex Code
18764 \begin_layout Plain Layout
18771 \begin_inset Flex Code
18774 \begin_layout Plain Layout
18781 \begin_inset Flex Code
18784 \begin_layout Plain Layout
18793 \begin_layout Description
18794 \begin_inset Flex Code
18797 \begin_layout Plain Layout
18804 \begin_inset Flex Code
18807 \begin_layout Plain Layout
18816 \begin_inset Flex Code
18819 \begin_layout Plain Layout
18826 \begin_inset Flex Code
18829 \begin_layout Plain Layout
18838 \begin_layout Description
18839 \begin_inset Flex Code
18842 \begin_layout Plain Layout
18849 \begin_inset Flex Code
18852 \begin_layout Plain Layout
18858 ] Valid arguments are:
18859 \begin_inset Flex Code
18862 \begin_layout Plain Layout
18869 \begin_inset Flex Code
18872 \begin_layout Plain Layout
18879 \begin_inset Flex Code
18882 \begin_layout Plain Layout
18889 \begin_inset Flex Code
18892 \begin_layout Plain Layout
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18909 \begin_inset Flex Code
18912 \begin_layout Plain Layout
18919 \begin_inset Flex Code
18922 \begin_layout Plain Layout
18929 \begin_inset Flex Code
18932 \begin_layout Plain Layout
18939 \begin_inset Flex Code
18942 \begin_layout Plain Layout
18949 \begin_inset Flex Code
18952 \begin_layout Plain Layout
18959 \begin_inset Flex Code
18962 \begin_layout Plain Layout
18969 \begin_inset Flex Code
18972 \begin_layout Plain Layout
18979 Each of these turns on or off the corresponding attribute.
18981 \begin_inset Flex Code
18984 \begin_layout Plain Layout
18990 turns on emphasis, and
18991 \begin_inset Flex Code
18994 \begin_layout Plain Layout
19002 \begin_inset Newline newline
19005 If the latter seems puzzling, remember that the font settings for the present
19006 context are generally inherited from the surrounding context.
19008 \begin_inset Flex Code
19011 \begin_layout Plain Layout
19017 would turn off the emphasis that was anyway in effect, say, in a theorem
19021 \begin_layout Description
19022 \begin_inset Flex Code
19025 \begin_layout Plain Layout
19032 \begin_inset Flex Code
19035 \begin_layout Plain Layout
19044 \begin_inset Flex Code
19047 \begin_layout Plain Layout
19056 \begin_layout Description
19057 \begin_inset Flex Code
19060 \begin_layout Plain Layout
19067 \begin_inset Flex Code
19070 \begin_layout Plain Layout
19079 \begin_inset Flex Code
19082 \begin_layout Plain Layout
19089 \begin_inset Flex Code
19092 \begin_layout Plain Layout
19099 \begin_inset Flex Code
19102 \begin_layout Plain Layout
19111 \begin_layout Description
19112 \begin_inset Flex Code
19115 \begin_layout Plain Layout
19122 \begin_inset Flex Code
19125 \begin_layout Plain Layout
19132 \begin_inset Flex Code
19135 \begin_layout Plain Layout
19142 \begin_inset Flex Code
19145 \begin_layout Plain Layout
19154 \begin_inset Flex Code
19157 \begin_layout Plain Layout
19164 \begin_inset Flex Code
19167 \begin_layout Plain Layout
19174 \begin_inset Flex Code
19177 \begin_layout Plain Layout
19184 \begin_inset Flex Code
19187 \begin_layout Plain Layout
19194 \begin_inset Flex Code
19197 \begin_layout Plain Layout
19206 \begin_layout Subsection
19207 \begin_inset CommandInset label
19209 name "sub:Citation-format-description"
19213 Citation format description
19216 \begin_layout Standard
19218 \begin_inset Flex Code
19221 \begin_layout Plain Layout
19227 blocks are used to describe how bibliographic information should be displayed,
19228 both within LyX itself (in the citation dialog and in tooltips, for example)
19229 and in XHTML output.
19230 Such a block might look like this:
19233 \begin_layout LyX-Code
19237 \begin_layout LyX-Code
19241 \begin_layout LyX-Code
19245 \begin_layout LyX-Code
19249 \begin_layout Standard
19250 The individual lines define how the bibliographic information associated
19251 with an article or book, respectively, is to be displayed, and such a definitio
19252 n can be given for any `entry type' that might be present in a BibTeX file.
19253 LyX defines a default format in the source code that will be used if no
19254 specific definition has been given.
19255 LyX predefines several formats in the file
19256 \begin_inset Flex Code
19259 \begin_layout Plain Layout
19265 , which is included in most of LyX's document classes.
19268 \begin_layout Standard
19269 The definitions use a simple language that allows BibTeX keys to be replaced
19271 Keys should be enclosed in
19272 \begin_inset Flex Code
19275 \begin_layout Plain Layout
19282 \begin_inset Flex Code
19285 \begin_layout Plain Layout
19292 So a simple definition might look like this:
19295 \begin_layout LyX-Code
19297 \begin_inset Quotes eld
19301 \begin_inset Quotes erd
19307 \begin_layout Standard
19308 This would print the author, followed by a comma, followed by the title,
19309 in quotes, followed by a period.
19312 \begin_layout Standard
19313 Of course, sometimes you may want to print a key only if it exists.
19314 This can be done by using a conditional construction, such as:
19315 \begin_inset Flex Code
19318 \begin_layout Plain Layout
19320 \begin_inset space ~
19330 \begin_inset Flex Code
19333 \begin_layout Plain Layout
19339 key exists, then print
19340 \begin_inset Quotes eld
19344 \begin_inset space ~
19348 \begin_inset Quotes erd
19351 followed by the volume key.
19352 It is also possible to have an else clause in the conditional, such as:
19353 \begin_inset Newline newline
19357 \begin_inset Flex Code
19360 \begin_layout Plain Layout
19361 {%author%[[%author%]][[%editor%, ed.]]}
19367 \begin_inset Newline newline
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19380 key is printed if it exists; otherwise, the editor key is printed, followed
19382 \begin_inset Quotes eld
19386 \begin_inset space ~
19390 \begin_inset Quotes erd
19393 Note that the key is again enclosed in
19394 \begin_inset Flex Code
19397 \begin_layout Plain Layout
19403 signs; the entire conditional is enclosed in braces; and the if and else
19404 clauses are enclosed in double brackets,
19405 \begin_inset Quotes eld
19409 \begin_inset Flex Code
19412 \begin_layout Plain Layout
19419 \begin_inset Quotes eld
19423 \begin_inset Quotes eld
19427 \begin_inset Flex Code
19430 \begin_layout Plain Layout
19437 \begin_inset Quotes erd
19441 There must be no space between any of these.
19444 \begin_layout Standard
19445 There is one other piece of syntax available in definitions, which looks
19447 \begin_inset Flex Code
19450 \begin_layout Plain Layout
19457 This defines a piece of formatting information that is to be used when
19459 \begin_inset Quotes eld
19463 \begin_inset Quotes erd
19467 Obviously, we do not want to output HTML tags when writing plain text,
19468 so they should be wrapped in
19469 \begin_inset Quotes eld
19473 \begin_inset Quotes erd
19477 \begin_inset Quotes eld
19481 \begin_inset Quotes erd
19487 \begin_layout Standard
19488 Two special sorts of definitions are also possible in a
19489 \begin_inset Flex Code
19492 \begin_layout Plain Layout
19499 An example of the first would be:
19502 \begin_layout LyX-Code
19504 \begin_inset Quotes eld
19508 \begin_inset Quotes erd
19514 \begin_layout Standard
19515 This is an abbreviation, or macro, and it can be used by treating it as
19517 \begin_inset Flex Code
19520 \begin_layout Plain Layout
19528 \begin_inset Flex Code
19531 \begin_layout Plain Layout
19537 exactly as it would treat its definition.
19538 So, let us issue the obvious
19546 \begin_layout LyX-Code
19550 \begin_layout Standard
19551 or anything like it.
19552 LyX shouldn't go into an infinite loop, but it may go into a long one before
19556 \begin_layout Standard
19557 The second sort of special definition might look like this:
19560 \begin_layout LyX-Code
19564 \begin_layout Standard
19565 This defines a translatable piece of text, which allows relevant parts of
19566 the bibliography to be translated.
19567 It can be included in a definition by treating it as a key:
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19578 Several of these are predefined in
19579 \begin_inset Flex Code
19582 \begin_layout Plain Layout
19589 Note that these are not macros, in the sense just defined.
19590 They will not be expanded.
19593 \begin_layout Standard
19594 So here then is an example that use all these features:
19595 \begin_inset VSpace defskip
19601 \begin_layout Standard
19605 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19608 \begin_layout Standard
19609 \begin_inset VSpace defskip
19612 This defines a macro that prints the author, followed by a comma, if the
19614 \begin_inset Flex Code
19617 \begin_layout Plain Layout
19623 key is defined, or else prints the name of the editor, followed by the
19625 \begin_inset Flex Code
19628 \begin_layout Plain Layout
19634 or its translation (it is by default
19635 \begin_inset Quotes eld
19639 \begin_inset Quotes erd
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19653 Note that this is in fact defined in
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19663 , so you can use it in your own definitions, or re-definitions, if you load
19667 \begin_layout Section
19668 \begin_inset CommandInset label
19670 name "sec:Tags-for-XHTML"
19674 Tags for XHTML output
19677 \begin_layout Standard
19678 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19679 by layout information.
19680 In general, LyX provides sensible defaults and, as mentioned earlier, it
19681 will even construct default CSS style rules from the other layout tags.
19682 For example, LyX will attempt to use the information provided in the
19683 \begin_inset Flex Code
19686 \begin_layout Plain Layout
19692 declaration for the Chapter style to write CSS that will appropriately
19693 format chapter headings.
19696 \begin_layout Standard
19697 In many cases, then, you may not have to do anything at all to get acceptable
19698 XHTML output for your own environments, custom insets, and so forth.
19699 But in some cases you will, and so LyX provides a number of layout tags
19700 that can be used to customize the XHTML and CSS that are generated.
19703 \begin_layout Standard
19704 Note that there are two tags,
19705 \begin_inset Flex Code
19708 \begin_layout Plain Layout
19715 \begin_inset Flex Code
19718 \begin_layout Plain Layout
19724 that may appear outside style and inset declarations.
19726 \begin_inset CommandInset ref
19728 reference "sub:General-text-class"
19732 for details on these.
19735 \begin_layout Subsection
19736 \begin_inset CommandInset label
19738 name "sub:Paragraph-Style-XHTML"
19745 \begin_layout Standard
19746 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19747 dealing with a normal paragraph, a command, or an environment, where this
19748 is itself determined by the contents of the corresponding
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19762 \begin_layout Standard
19763 For a command or normal paragraph, the output XHTML has the following form:
19766 \begin_layout LyX-Code
19768 \begin_inset Quotes erd
19772 \begin_inset Quotes erd
19778 \begin_layout LyX-Code
19780 \begin_inset Quotes erd
19784 \begin_inset Quotes erd
19790 \begin_layout LyX-Code
19791 Contents of the paragraph.
19794 \begin_layout LyX-Code
19798 \begin_layout Standard
19799 The label tags are of course omitted if the paragraph does not have a label.
19802 \begin_layout Standard
19803 For an environment that is not some sort of list, the XHTML takes this form:
19806 \begin_layout LyX-Code
19808 \begin_inset Quotes erd
19812 \begin_inset Quotes erd
19818 \begin_layout LyX-Code
19820 \begin_inset Quotes erd
19824 \begin_inset Quotes erd
19828 \begin_inset Quotes erd
19832 \begin_inset Quotes erd
19835 >Environment Label</labeltag>First paragraph.</itemtag>
19838 \begin_layout LyX-Code
19839 <itemtag>Second paragraph.</itemtag>
19842 \begin_layout LyX-Code
19846 \begin_layout Standard
19847 Note that the label is output only for the first paragraph, as it should
19848 be for a theorem, for example.
19852 \begin_layout Standard
19853 For a list, we have one of these forms:
19856 \begin_layout LyX-Code
19858 \begin_inset Quotes erd
19862 \begin_inset Quotes erd
19868 \begin_layout LyX-Code
19870 \begin_inset Quotes erd
19874 \begin_inset Quotes erd
19878 \begin_inset Quotes erd
19882 \begin_inset Quotes erd
19885 >List Label</labeltag>First item.</itemtag>
19888 \begin_layout LyX-Code
19890 \begin_inset Quotes erd
19894 \begin_inset Quotes erd
19898 \begin_inset Quotes erd
19902 \begin_inset Quotes erd
19905 >List Label</labeltag>Second item.</itemtag>
19908 \begin_layout LyX-Code
19912 \begin_layout LyX-Code
19916 \begin_layout LyX-Code
19918 \begin_inset Quotes erd
19922 \begin_inset Quotes erd
19928 \begin_layout LyX-Code
19930 \begin_inset Quotes erd
19934 \begin_inset Quotes erd
19937 >List Label</labeltag><itemtag attr=
19938 \begin_inset Quotes erd
19942 \begin_inset Quotes erd
19945 >First item.</itemtag>
19948 \begin_layout LyX-Code
19950 \begin_inset Quotes erd
19954 \begin_inset Quotes erd
19957 >List Label</labeltag><itemtag attr=
19958 \begin_inset Quotes erd
19962 \begin_inset Quotes erd
19965 >Second item.</itemtag>
19968 \begin_layout LyX-Code
19972 \begin_layout Standard
19973 Note the different orders of
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19994 Which order we get depends upon the setting of
19995 \begin_inset Flex Code
19998 \begin_layout Plain Layout
20005 \begin_inset Flex Code
20008 \begin_layout Plain Layout
20014 is false (the default), you get the first of these, with the label within
20015 the item; if true, you get the second, with the label outside the item.
20018 \begin_layout Standard
20019 The specific tags and attributes output for each paragraph type can be controlle
20020 d by means of the layout tags we are about to describe.
20021 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20022 so you often may not need to do very much to get good XHTML output.
20023 Think of the available tags as there so you can tweak things to your liking.
20026 \begin_layout Description
20027 \begin_inset Flex Code
20030 \begin_layout Plain Layout
20037 \begin_inset Flex Code
20040 \begin_layout Plain Layout
20046 ] Specifies attribute information to be output with the main tag.
20048 \begin_inset Quotes eld
20052 \begin_inset Flex Code
20055 \begin_layout Plain Layout
20062 \begin_inset Quotes erd
20066 By default, LyX will output
20067 \begin_inset Quotes eld
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20081 \begin_inset Quotes erd
20085 \begin_inset Flex Code
20088 \begin_layout Plain Layout
20094 is the LyX name of the layout, made lowercase, for example: chapter.
20099 contain any style information.
20101 \begin_inset Flex Code
20104 \begin_layout Plain Layout
20113 \begin_layout Description
20114 \begin_inset Flex Code
20117 \begin_layout Plain Layout
20124 \begin_inset Flex Code
20127 \begin_layout Plain Layout
20137 ] Whether to output the default CSS information LyX generates for this layout,
20138 even if additional information is explicitly provided via
20139 \begin_inset Flex Code
20142 \begin_layout Plain Layout
20150 \begin_inset Flex Code
20153 \begin_layout Plain Layout
20159 allows you to alter or augment the generated CSS, rather than to override
20162 \begin_inset Flex Code
20165 \begin_layout Plain Layout
20174 \begin_layout Description
20175 \begin_inset Flex Code
20178 \begin_layout Plain Layout
20185 \begin_inset Flex Code
20188 \begin_layout Plain Layout
20194 ] The tag to be used for individual paragraphs of environments, replacing
20196 \begin_inset Flex Code
20199 \begin_layout Plain Layout
20205 in the examples above.
20207 \begin_inset Flex Code
20210 \begin_layout Plain Layout
20219 \begin_layout Description
20220 \begin_inset Flex Code
20223 \begin_layout Plain Layout
20230 \begin_inset Flex Code
20233 \begin_layout Plain Layout
20239 ] Attributes for the item tag.
20241 \begin_inset Quotes eld
20245 \begin_inset Flex Code
20248 \begin_layout Plain Layout
20249 class=`layoutname_item'
20255 \begin_inset Quotes erd
20263 contain any style information.
20265 \begin_inset Flex Code
20268 \begin_layout Plain Layout
20277 \begin_layout Description
20278 \begin_inset Flex Code
20281 \begin_layout Plain Layout
20288 \begin_inset Flex Code
20291 \begin_layout Plain Layout
20297 ] The tag to be used for paragraph and item labels, replacing
20298 \begin_inset Flex Code
20301 \begin_layout Plain Layout
20307 in the examples above.
20309 \begin_inset Flex Code
20312 \begin_layout Plain Layout
20319 \begin_inset Flex Code
20322 \begin_layout Plain Layout
20329 \begin_inset Flex Code
20332 \begin_layout Plain Layout
20339 \begin_inset Flex Code
20342 \begin_layout Plain Layout
20343 Centered_Top_Environment
20348 , in which case it defaults to
20349 \begin_inset Flex Code
20352 \begin_layout Plain Layout
20361 \begin_layout Description
20362 \begin_inset Flex Code
20365 \begin_layout Plain Layout
20372 \begin_inset Flex Code
20375 \begin_layout Plain Layout
20381 ] Attributes for the label tag.
20383 \begin_inset Quotes eld
20387 \begin_inset Flex Code
20390 \begin_layout Plain Layout
20391 class=`layoutname_label'
20397 \begin_inset Quotes erd
20405 contain any style information.
20407 \begin_inset Flex Code
20410 \begin_layout Plain Layout
20419 \begin_layout Description
20420 \begin_inset Flex Code
20423 \begin_layout Plain Layout
20430 \begin_inset Flex Code
20433 \begin_layout Plain Layout
20443 ] Meaningful only for list-like environments, this tag controls whether
20444 the label tag is output before or inside the item tag.
20445 This is used, for example, in the description environment, where we want
20447 \begin_inset Flex Code
20450 \begin_layout Plain Layout
20451 <dt>\SpecialChar \ldots{}
20452 </dt><dd>\SpecialChar \ldots{}
20460 \begin_inset Flex Code
20463 \begin_layout Plain Layout
20469 : The label tag is output inside the item tag.
20472 \begin_layout Description
20473 \begin_inset Flex Code
20476 \begin_layout Plain Layout
20482 Information to be output in the
20483 \begin_inset Flex Code
20486 \begin_layout Plain Layout
20492 section when this style is used.
20493 This might, for example, be used to include a
20494 \begin_inset Flex Code
20497 \begin_layout Plain Layout
20504 \begin_inset Flex Code
20507 \begin_layout Plain Layout
20516 \begin_layout Description
20517 \begin_inset Flex Code
20520 \begin_layout Plain Layout
20526 CSS style information to be included when this style is used.
20527 Note that this will automatically be wrapped in a layout-generated
20528 \begin_inset Flex Code
20531 \begin_layout Plain Layout
20537 block, so only the CSS itself need be included.
20539 \begin_inset Flex Code
20542 \begin_layout Plain Layout
20551 \begin_layout Description
20552 \begin_inset Flex Code
20555 \begin_layout Plain Layout
20562 \begin_inset Flex Code
20565 \begin_layout Plain Layout
20571 ] The tag to be used for the main label, replacing
20572 \begin_inset Flex Code
20575 \begin_layout Plain Layout
20581 in the examples above.
20583 \begin_inset Flex Code
20586 \begin_layout Plain Layout
20595 \begin_layout Description
20596 \begin_inset Flex Code
20599 \begin_layout Plain Layout
20606 \begin_inset Flex Code
20609 \begin_layout Plain Layout
20619 ] Marks this style as the one to be used to generate the
20620 \begin_inset Flex Code
20623 \begin_layout Plain Layout
20629 tag for the XHTML file.
20630 By default, it is false.
20632 \begin_inset Flex Code
20635 \begin_layout Plain Layout
20641 file sets it to true for the
20642 \begin_inset Flex Code
20645 \begin_layout Plain Layout
20655 \begin_layout Subsection
20659 \begin_layout Standard
20660 The XHTML output of insets can also be controlled by information in layout
20665 \begin_layout Plain Layout
20666 At present, this is true only for
20667 \begin_inset Quotes eld
20671 \begin_inset Quotes erd
20674 insets (insets you can type into) and is not true for
20675 \begin_inset Quotes eld
20679 \begin_inset Quotes erd
20682 insets (insets that are associated with dialog boxes).
20687 Here, too, LyX tries to provide sensible defaults, and it constructs default
20689 But everything can be customized.
20692 \begin_layout Standard
20693 The XHTML LyX outputs for an inset has the following form:
20696 \begin_layout LyX-Code
20698 \begin_inset Quotes erd
20702 \begin_inset Quotes erd
20708 \begin_layout LyX-Code
20709 <labeltag>Label</labeltag>
20712 \begin_layout LyX-Code
20714 \begin_inset Quotes erd
20718 \begin_inset Quotes erd
20721 >Contents of the inset.</innertag>
20724 \begin_layout LyX-Code
20728 \begin_layout Standard
20729 If the inset permits multiple paragraphs---that is, if
20730 \begin_inset Flex Code
20733 \begin_layout Plain Layout
20739 is true---then the contents of the inset will itself be output as paragraphs
20740 formatted according to the styles used for those paragraphs (standard,
20741 quote, and the like).
20742 The label tag is of course omitted if the paragraph does not have a label
20743 and, at present, is always
20744 \begin_inset Flex Code
20747 \begin_layout Plain Layout
20754 The inner tag is optional and, by default, does not appear.
20757 \begin_layout Standard
20758 The specific tags and attributes output for each inset can be controlled
20759 by means of the following layout tags.
20762 \begin_layout Description
20763 \begin_inset Flex Code
20766 \begin_layout Plain Layout
20773 \begin_inset Flex Code
20776 \begin_layout Plain Layout
20782 ] Specifies attribute information to be output with the main tag.
20784 \begin_inset Quotes eld
20788 \begin_inset Flex Code
20791 \begin_layout Plain Layout
20792 class=`myinset' onclick=`\SpecialChar \ldots{}
20799 \begin_inset Quotes erd
20803 By default, LyX will output
20804 \begin_inset Quotes eld
20808 \begin_inset Flex Code
20811 \begin_layout Plain Layout
20818 \begin_inset Quotes erd
20822 \begin_inset Flex Code
20825 \begin_layout Plain Layout
20831 is the LyX name of the inset, made lowercase and with non-alphanumeric
20832 characters converted to underscores, for example: footnote.
20835 \begin_layout Description
20836 \begin_inset Flex Code
20839 \begin_layout Plain Layout
20846 \begin_inset Flex Code
20849 \begin_layout Plain Layout
20859 ] Whether to output the default CSS information LyX generates for this layout,
20860 even if additional information is explicitly provided via
20861 \begin_inset Flex Code
20864 \begin_layout Plain Layout
20872 \begin_inset Flex Code
20875 \begin_layout Plain Layout
20881 allows you to alter or augment the generated CSS, rather than to override
20886 \begin_layout Description
20887 \begin_inset Flex Code
20890 \begin_layout Plain Layout
20897 \begin_inset Flex Code
20900 \begin_layout Plain Layout
20906 ] Attributes for the inner tag.
20908 \begin_inset Quotes eld
20912 \begin_inset Flex Code
20915 \begin_layout Plain Layout
20916 class=`insetname_inner'
20922 \begin_inset Quotes erd
20928 \begin_layout Description
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20939 \begin_inset Flex Code
20942 \begin_layout Plain Layout
20948 ] The inner tag, replacing
20949 \begin_inset Flex Code
20952 \begin_layout Plain Layout
20958 in the examples above.
20959 By default, there is none.
20962 \begin_layout Description
20963 \begin_inset Flex Code
20966 \begin_layout Plain Layout
20973 \begin_inset Flex Code
20976 \begin_layout Plain Layout
20984 ] Whether this inset represents a standalone block of text (such as a footnote)
20985 or instead represents material that is included in the surrounding text
20986 (such as a branch).
20990 \begin_layout Description
20991 \begin_inset Flex Code
20994 \begin_layout Plain Layout
21001 \begin_inset Flex Code
21004 \begin_layout Plain Layout
21010 ] A label for this inset, possibly including a reference to a counter.
21011 For example, for footnote, it might be:
21012 \begin_inset Flex Code
21015 \begin_layout Plain Layout
21024 This is optional, and there is no default.
21027 \begin_layout Description
21028 \begin_inset Flex Code
21031 \begin_layout Plain Layout
21037 Information to be output in the
21038 \begin_inset Flex Code
21041 \begin_layout Plain Layout
21047 section when this style is used.
21048 This might, for example, be used to include a
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21059 \begin_inset Flex Code
21062 \begin_layout Plain Layout
21071 \begin_layout Description
21072 \begin_inset Flex Code
21075 \begin_layout Plain Layout
21081 CSS style information to be included when this style is used.
21082 Note that this will automatically be wrapped in a layout-generated
21083 \begin_inset Flex Code
21086 \begin_layout Plain Layout
21092 block, so only the CSS itself need be included.
21095 \begin_layout Description
21096 \begin_inset Flex Code
21099 \begin_layout Plain Layout
21106 \begin_inset Flex Code
21109 \begin_layout Plain Layout
21115 ] The tag to be used for the main label, replacing
21116 \begin_inset Flex Code
21119 \begin_layout Plain Layout
21125 in the examples above.
21126 The default depends upon the setting of
21127 \begin_inset Flex Code
21130 \begin_layout Plain Layout
21137 \begin_inset Flex Code
21140 \begin_layout Plain Layout
21146 is true, the default is
21147 \begin_inset Flex Code
21150 \begin_layout Plain Layout
21156 ; if it is false, the default is
21157 \begin_inset Flex Code
21160 \begin_layout Plain Layout
21169 \begin_layout Subsection
21173 \begin_layout Standard
21174 The XHTML output for floats too can be controlled by layout information.
21175 The output has the following form:
21178 \begin_layout LyX-Code
21180 \begin_inset Quotes erd
21184 \begin_inset Quotes erd
21190 \begin_layout LyX-Code
21191 Contents of the float.
21194 \begin_layout LyX-Code
21198 \begin_layout Standard
21199 The caption, if there is one, is a separate inset and will be output as
21201 Its appearance can be controlled via the InsetLayout for caption insets.
21205 \begin_layout Description
21206 \begin_inset Flex Code
21209 \begin_layout Plain Layout
21216 \begin_inset Flex Code
21219 \begin_layout Plain Layout
21225 ] Specifies attribute information to be output with the main tag.
21227 \begin_inset Quotes eld
21231 \begin_inset Flex Code
21234 \begin_layout Plain Layout
21235 class=`myfloat' onclick=`\SpecialChar \ldots{}
21242 \begin_inset Quotes erd
21246 By default, LyX will output
21247 \begin_inset Quotes eld
21251 \begin_inset Flex Code
21254 \begin_layout Plain Layout
21255 class=`float float-floattype'
21261 \begin_inset Quotes erd
21265 \begin_inset Flex Code
21268 \begin_layout Plain Layout
21274 is LyX's name for this type of float, as determined by the float declaration
21276 \begin_inset CommandInset ref
21278 reference "sub:Floats"
21282 ), though made lowercase and with non-alphanumeric characters converted
21283 to underscores, for example: float-table.
21286 \begin_layout Description
21287 \begin_inset Flex Code
21290 \begin_layout Plain Layout
21296 CSS style information to be included when this float is used.
21297 Note that this will automatically be wrapped in a layout-generated
21298 \begin_inset Flex Code
21301 \begin_layout Plain Layout
21307 block, so only the CSS itself need be included.
21310 \begin_layout Description
21311 \begin_inset Flex Code
21314 \begin_layout Plain Layout
21321 \begin_inset Flex Code
21324 \begin_layout Plain Layout
21330 ] The tag to be used for this float, replacing
21331 \begin_inset Quotes eld
21335 \begin_inset Flex Code
21338 \begin_layout Plain Layout
21345 \begin_inset Quotes erd
21348 in the example above.
21350 \begin_inset Flex Code
21353 \begin_layout Plain Layout
21359 and will rarely need changing.
21362 \begin_layout Subsection
21363 Bibliography formatting
21366 \begin_layout Standard
21367 The bibliography can be formatted using
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21379 \begin_inset CommandInset ref
21381 reference "sub:Citation-format-description"
21388 \begin_layout Subsection
21392 \begin_layout Standard
21393 We have several times mentioned that LyX will generate default CSS style
21394 rules for both insets and paragraph styles, based upon the other layout
21395 information that is provided.
21396 In this section, we shall say a word about which layout information LyX
21400 \begin_layout Standard
21401 At present, LyX auto-generates CSS only for font information, making use
21403 \begin_inset Flex Code
21406 \begin_layout Plain Layout
21413 \begin_inset Flex Code
21416 \begin_layout Plain Layout
21423 \begin_inset Flex Code
21426 \begin_layout Plain Layout
21433 \begin_inset Flex Code
21436 \begin_layout Plain Layout
21443 \begin_inset Flex Code
21446 \begin_layout Plain Layout
21453 \begin_inset CommandInset ref
21455 reference "sub:Font-description"
21460 The translation is mostly straightforward and obvious.
21462 \begin_inset Quotes eld
21466 \begin_inset Flex Code
21469 \begin_layout Plain Layout
21476 \begin_inset Quotes erd
21480 \begin_inset Quotes eld
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21488 font-family: sans-serif;
21494 \begin_inset Quotes erd
21498 The correspondence of LyX sizes and CSS sizes is a little less obvious
21499 but nonetheless intuitive.
21501 \begin_inset Flex Code
21504 \begin_layout Plain Layout
21511 \begin_inset Flex URL
21514 \begin_layout Plain Layout
21524 \begin_layout Chapter
21525 Including External Material
21526 \begin_inset CommandInset label
21528 name "chap:Including-External-Material"
21535 \begin_layout Standard
21536 \begin_inset Box Shadowbox
21546 height_special "totalheight"
21549 \begin_layout Plain Layout
21550 WARNING: This portion of the documentation has not been updated for some
21552 We certainly hope that it is still accurate, but there are no guarantees.
21560 \begin_layout Standard
21561 The use of material from sources external to LyX is covered in detail in
21567 This part of the manual covers what needs to happen behind the scenes for
21568 new sorts of material to be included.
21571 \begin_layout Section
21575 \begin_layout Standard
21576 The external material feature is based on the concept of a
21581 A template is a specification of how LyX should interface with a certain
21583 As bundled, LyX comes with predefined templates for Xfig figures, various
21584 raster format images, chess diagrams, and LilyPond music notation.
21585 You can check the actual list by using the menu
21586 \begin_inset Flex MenuItem
21589 \begin_layout Plain Layout
21590 Insert\SpecialChar \menuseparator
21591 File\SpecialChar \menuseparator
21598 Furthermore, it is possible to roll your own template to support a specific
21600 Later we'll describe in more detail what is involved, and hopefully you
21601 will submit all the templates you create so we can include them in a later
21605 \begin_layout Standard
21606 Another basic idea of the external material feature is to distinguish between
21607 the original file that serves as a base for final material and the produced
21608 file that is included in your exported or printed document.
21609 For example, consider the case of a figure produced with
21610 \begin_inset Flex Code
21613 \begin_layout Plain Layout
21620 The Xfig application itself works on an original file with the
21621 \begin_inset Flex Code
21624 \begin_layout Plain Layout
21631 Within Xfig, you create and change your figure, and when you are done,
21633 \begin_inset Flex Code
21636 \begin_layout Plain Layout
21643 When you want to include the figure in your document, you invoke
21644 \begin_inset Flex Code
21647 \begin_layout Plain Layout
21653 in order to create a PostScript file that can readily be included in your
21656 \begin_inset Flex Code
21659 \begin_layout Plain Layout
21665 file is the original file, and the PostScript file is the produced file.
21668 \begin_layout Standard
21669 This distinction is important in order to allow updating of the material
21670 while you are in the process of writing the document.
21671 Furthermore, it provides us with the flexibility that is needed to support
21672 multiple export formats.
21673 For instance, in the case of a plain text file, it is not exactly an award-winn
21674 ing idea to include the figure as raw PostScript.
21675 Instead, you would either prefer to just include a reference to the figure
21676 or try to invoke some graphics to ASCII converter to make the final result
21677 look similar to the real graphics.
21678 The external material management allows you to do this, because it is parametri
21679 zed on the different export formats that LyX supports.
21682 \begin_layout Standard
21683 Besides supporting the production of different products according to the
21684 exported format, it supports tight integration with editing and viewing
21686 In the case of an Xfig figure, you are able to invoke Xfig on the original
21687 file with a single click from within the external material dialog in LyX,
21688 and also preview the produced PostScript file with Ghostview with another
21690 No more fiddling around with the command line and/or file browsers to locate
21691 and manipulate the original or produced files.
21692 In this way, you are finally able to take full advantage of the many different
21693 applications that are relevant to use when you write your documents, and
21694 ultimately be more productive.
21697 \begin_layout Section
21698 The external template configuration file
21701 \begin_layout Standard
21702 It is relatively easy to add custom external template definitions to LyX.
21703 However, be aware that doing this in an careless manner most probably
21707 introduce an easily exploitable security hole.
21708 So before you do this, please read the discussion about security in
21709 \begin_inset CommandInset ref
21711 reference "sec:Security-discussion"
21718 \begin_layout Standard
21719 Having said that, we encourage you to submit any interesting templates that
21724 \begin_layout Standard
21725 The external templates are defined in the
21726 \begin_inset Flex Code
21729 \begin_layout Plain Layout
21730 LyXDir/lib/external_templates
21736 You can place your own version in
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21741 UserDir/external_templates
21749 \begin_layout Standard
21750 A typical template looks like this:
21753 \begin_layout LyX-Code
21757 \begin_layout LyX-Code
21758 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21761 \begin_layout LyX-Code
21765 \begin_layout LyX-Code
21769 \begin_layout LyX-Code
21773 \begin_layout LyX-Code
21777 \begin_layout LyX-Code
21781 \begin_layout LyX-Code
21782 AutomaticProduction true
21785 \begin_layout LyX-Code
21789 \begin_layout LyX-Code
21793 \begin_layout LyX-Code
21797 \begin_layout LyX-Code
21798 TransformCommand Rotate RotationLatexCommand
21801 \begin_layout LyX-Code
21802 TransformCommand Resize ResizeLatexCommand
21805 \begin_layout LyX-Code
21806 Product "$$RotateFront$$ResizeFront
21809 \begin_layout LyX-Code
21814 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21817 \begin_layout LyX-Code
21818 $$ResizeBack$$RotateBack"
21821 \begin_layout LyX-Code
21825 \begin_layout LyX-Code
21826 UpdateResult "$$AbsPath$$Basename.pstex_t"
21829 \begin_layout LyX-Code
21830 Requirement "graphicx"
21833 \begin_layout LyX-Code
21834 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21837 \begin_layout LyX-Code
21838 ReferencedFile latex "$$AbsPath$$Basename.eps"
21841 \begin_layout LyX-Code
21842 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21845 \begin_layout LyX-Code
21849 \begin_layout LyX-Code
21853 \begin_layout LyX-Code
21854 TransformCommand Rotate RotationLatexCommand
21857 \begin_layout LyX-Code
21858 TransformCommand Resize ResizeLatexCommand
21861 \begin_layout LyX-Code
21862 Product "$$RotateFront$$ResizeFront
21865 \begin_layout LyX-Code
21870 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21873 \begin_layout LyX-Code
21874 $$ResizeBack$$RotateBack"
21877 \begin_layout LyX-Code
21878 UpdateFormat pdftex
21881 \begin_layout LyX-Code
21882 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21885 \begin_layout LyX-Code
21886 Requirement "graphicx"
21889 \begin_layout LyX-Code
21890 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21893 \begin_layout LyX-Code
21894 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21897 \begin_layout LyX-Code
21901 \begin_layout LyX-Code
21905 \begin_layout LyX-Code
21906 Product "$$Contents(
21908 "$$AbsPath$$Basename.asc
21913 \begin_layout LyX-Code
21914 UpdateFormat asciixfig
21917 \begin_layout LyX-Code
21918 UpdateResult "$$AbsPath$$Basename.asc"
21921 \begin_layout LyX-Code
21925 \begin_layout LyX-Code
21929 \begin_layout LyX-Code
21930 Product "<graphic fileref=
21932 "$$AbsOrRelPathMaster$$Basename.eps
21937 \begin_layout LyX-Code
21941 \begin_layout LyX-Code
21945 \begin_layout LyX-Code
21946 UpdateResult "$$AbsPath$$Basename.eps"
21949 \begin_layout LyX-Code
21950 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21953 \begin_layout LyX-Code
21954 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21957 \begin_layout LyX-Code
21961 \begin_layout LyX-Code
21962 Product "[XFig: $$FName]"
21965 \begin_layout LyX-Code
21969 \begin_layout LyX-Code
21973 \begin_layout Standard
21974 As you can see, the template is enclosed in
21975 \begin_inset Flex Code
21978 \begin_layout Plain Layout
21984 \SpecialChar \ldots{}
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21996 It contains a header specifying some general settings and, for each supported
21997 primary document file format, a section
21998 \begin_inset Flex Code
22001 \begin_layout Plain Layout
22007 \SpecialChar \ldots{}
22009 \begin_inset Flex Code
22012 \begin_layout Plain Layout
22021 \begin_layout Subsection
22022 The template header
22025 \begin_layout Description
22026 \begin_inset Flex Code
22029 \begin_layout Plain Layout
22030 AutomaticProduction
22031 \begin_inset space ~
22039 Whether the file represented by the template must be generated by LyX.
22040 This command must occur exactly once.
22043 \begin_layout Description
22044 \begin_inset Flex Code
22047 \begin_layout Plain Layout
22049 \begin_inset space ~
22057 A glob pattern that is used in the file dialog to filter out the desired
22059 If there is more than one possible file extension (e.
22060 \begin_inset space \thinspace{}
22064 \begin_inset space \space{}
22068 \begin_inset Flex Code
22071 \begin_layout Plain Layout
22078 \begin_inset Flex Code
22081 \begin_layout Plain Layout
22087 ), use something like
22088 \begin_inset Flex Code
22091 \begin_layout Plain Layout
22098 This command must occur exactly once.
22101 \begin_layout Description
22102 \begin_inset Flex Code
22105 \begin_layout Plain Layout
22107 \begin_inset space ~
22115 The text that is displayed on the button.
22116 This command must occur exactly once.
22119 \begin_layout Description
22120 \begin_inset Flex Code
22123 \begin_layout Plain Layout
22125 \begin_inset space ~
22129 \begin_inset space ~
22137 The help text that is used in the External dialog.
22138 Provide enough information to explain to the user just what the template
22139 can provide him with.
22140 This command must occur exactly once.
22143 \begin_layout Description
22144 \begin_inset Flex Code
22147 \begin_layout Plain Layout
22149 \begin_inset space ~
22157 The file format of the original file.
22158 This must be the name of a format that is known to LyX (see
22159 \begin_inset CommandInset ref
22161 reference "sec:Formats"
22167 \begin_inset Quotes eld
22171 \begin_inset Flex Code
22174 \begin_layout Plain Layout
22181 \begin_inset Quotes erd
22184 if the template can handle original files of more than one format.
22185 LyX will attempt to interrogate the file itself in order to deduce its
22186 format in this case.
22187 This command must occur exactly once.
22190 \begin_layout Description
22191 \begin_inset Flex Code
22194 \begin_layout Plain Layout
22196 \begin_inset space ~
22204 A unique name for the template.
22205 It must not contain substitution macros (see below).
22208 \begin_layout Description
22209 \begin_inset Flex Code
22212 \begin_layout Plain Layout
22214 \begin_inset space ~
22217 Rotate|Resize|Clip|Extra
22222 This command specifies which transformations are supported by this template.
22223 It may occur zero or more times.
22224 This command enables the corresponding tabs in the external dialog.
22226 \begin_inset Flex Code
22229 \begin_layout Plain Layout
22235 command must have either a corresponding
22236 \begin_inset Flex Code
22239 \begin_layout Plain Layout
22246 \begin_inset Flex Code
22249 \begin_layout Plain Layout
22256 \begin_inset Flex Code
22259 \begin_layout Plain Layout
22266 Otherwise the transformation will not be supported by that format.
22269 \begin_layout Subsection
22273 \begin_layout Description
22274 \begin_inset Flex Code
22277 \begin_layout Plain Layout
22279 \begin_inset space ~
22282 LaTeX|PDFLaTeX|PlainText|DocBook
22287 The primary document file format that this format definition is for.
22288 Not every template has a sensible representation in all document file formats.
22289 Please define nevertheless a
22290 \begin_inset Flex Code
22293 \begin_layout Plain Layout
22299 section for all templates.
22300 Use a dummy text when no representation is available.
22301 Then you can at least see a reference to the external material in the exported
22305 \begin_layout Description
22306 \begin_inset Flex Code
22309 \begin_layout Plain Layout
22311 \begin_inset space ~
22315 \begin_inset space ~
22323 This command defines an additional macro
22324 \begin_inset Flex Code
22327 \begin_layout Plain Layout
22333 for substitution in
22334 \begin_inset Flex Code
22337 \begin_layout Plain Layout
22345 \begin_inset Flex Code
22348 \begin_layout Plain Layout
22354 itself may contain substitution macros.
22355 The advantage over using
22356 \begin_inset Flex Code
22359 \begin_layout Plain Layout
22366 \begin_inset Flex Code
22369 \begin_layout Plain Layout
22375 is that the substituted value of
22376 \begin_inset Flex Code
22379 \begin_layout Plain Layout
22385 is sanitized so that it is a valid optional argument in the document format.
22386 This command may occur zero or more times.
22389 \begin_layout Description
22390 \begin_inset Flex Code
22393 \begin_layout Plain Layout
22395 \begin_inset space ~
22403 The text that is inserted in the exported document.
22404 This is actually the most important command and can be quite complex.
22405 This command must occur exactly once.
22408 \begin_layout Description
22409 \begin_inset Flex Code
22412 \begin_layout Plain Layout
22414 \begin_inset space ~
22422 This command specifies a preamble snippet that will be included in the
22424 It has to be defined using
22425 \begin_inset Flex Code
22428 \begin_layout Plain Layout
22434 \SpecialChar \ldots{}
22436 \begin_inset Flex Code
22439 \begin_layout Plain Layout
22446 This command may occur zero or more times.
22449 \begin_layout Description
22450 \begin_inset Flex Code
22453 \begin_layout Plain Layout
22455 \begin_inset space ~
22459 \begin_inset space ~
22467 This command denotes files that are created by the conversion process and
22468 are needed for a particular export format.
22469 If the filename is relative, it is interpreted relative to the master document.
22470 This command may be given zero or more times.
22473 \begin_layout Description
22474 \begin_inset Flex Code
22477 \begin_layout Plain Layout
22479 \begin_inset space ~
22487 The name of a required LaTeX package.
22488 The package is included via
22489 \begin_inset Flex Code
22492 \begin_layout Plain Layout
22500 in the LaTeX preamble.
22501 This command may occur zero or more times.
22504 \begin_layout Description
22505 \begin_inset Flex Code
22508 \begin_layout Plain Layout
22510 \begin_inset space ~
22514 \begin_inset space ~
22517 RotationLatexCommand
22522 This command specifies that the built in LaTeX command should be used for
22524 This command may occur once or not at all.
22527 \begin_layout Description
22528 \begin_inset Flex Code
22531 \begin_layout Plain Layout
22533 \begin_inset space ~
22537 \begin_inset space ~
22545 This command specifies that the built in LaTeX command should be used for
22547 This command may occur once or not at all.
22550 \begin_layout Description
22551 \begin_inset Flex Code
22554 \begin_layout Plain Layout
22556 \begin_inset space ~
22560 \begin_inset space ~
22563 RotationLatexOption
22568 This command specifies that rotation is done via an optional argument.
22569 This command may occur once or not at all.
22572 \begin_layout Description
22573 \begin_inset Flex Code
22576 \begin_layout Plain Layout
22578 \begin_inset space ~
22582 \begin_inset space ~
22590 This command specifies that resizing is done via an optional argument.
22591 This command may occur once or not at all.
22594 \begin_layout Description
22595 \begin_inset Flex Code
22598 \begin_layout Plain Layout
22600 \begin_inset space ~
22604 \begin_inset space ~
22612 This command specifies that clipping is done via an optional argument.
22613 This command may occur once or not at all.
22616 \begin_layout Description
22617 \begin_inset Flex Code
22620 \begin_layout Plain Layout
22622 \begin_inset space ~
22626 \begin_inset space ~
22634 This command specifies that an extra optional argument is used.
22635 This command may occur once or not at all.
22638 \begin_layout Description
22639 \begin_inset Flex Code
22642 \begin_layout Plain Layout
22644 \begin_inset space ~
22652 The file format of the converted file.
22653 This must be the name of a format that is known to LyX (see the
22654 \begin_inset Flex MenuItem
22657 \begin_layout Plain Layout
22658 Tools\SpecialChar \menuseparator
22659 Preferences\SpecialChar \menuseparator
22660 File Handling\SpecialChar \menuseparator
22667 This command must occur exactly once.
22668 If the resulting file format is PDF, you need to specify the format
22669 \begin_inset Flex Code
22672 \begin_layout Plain Layout
22679 This is the PDF format used for including graphics.
22680 The other defined PDF formats are for document export.
22683 \begin_layout Description
22684 \begin_inset Flex Code
22687 \begin_layout Plain Layout
22689 \begin_inset space ~
22697 The file name of the converted file.
22698 The file name must be absolute.
22699 This command must occur exactly once.
22702 \begin_layout Subsection
22703 Preamble definitions
22706 \begin_layout Standard
22707 The external template configuration file may contain additional preamble
22708 definitions enclosed by
22709 \begin_inset Flex Code
22712 \begin_layout Plain Layout
22718 \SpecialChar \ldots{}
22720 \begin_inset Flex Code
22723 \begin_layout Plain Layout
22730 They can be used by the templates in the
22731 \begin_inset Flex Code
22734 \begin_layout Plain Layout
22743 \begin_layout Section
22744 The substitution mechanism
22747 \begin_layout Standard
22748 When the external material facility invokes an external program, it is done
22749 on the basis of a command defined in the template configuration file.
22750 These commands can contain various macros that are expanded before execution.
22751 Execution always take place in the directory of the containing document.
22754 \begin_layout Standard
22755 Also, whenever external material is to be displayed, the name will be produced
22756 by the substitution mechanism, and most other commands in the template
22757 definition support substitution as well.
22760 \begin_layout Standard
22761 The available macros are the following:
22764 \begin_layout Description
22765 \begin_inset Flex Code
22768 \begin_layout Plain Layout
22769 $$AbsOrRelPathMaster
22774 The file path, absolute or relative to the master LyX document.
22777 \begin_layout Description
22778 \begin_inset Flex Code
22781 \begin_layout Plain Layout
22782 $$AbsOrRelPathParent
22787 The file path, absolute or relative to the LyX document.
22790 \begin_layout Description
22791 \begin_inset Flex Code
22794 \begin_layout Plain Layout
22800 The absolute file path.
22803 \begin_layout Description
22804 \begin_inset Flex Code
22807 \begin_layout Plain Layout
22813 The filename without path and without the extension.
22816 \begin_layout Description
22817 \begin_inset Flex Code
22820 \begin_layout Plain Layout
22822 \begin_inset Quotes eld
22826 \begin_inset Quotes erd
22834 This macro will expand to the contents of the file with the name
22835 \begin_inset Flex Code
22838 \begin_layout Plain Layout
22847 \begin_layout Description
22848 \begin_inset Flex Code
22851 \begin_layout Plain Layout
22857 The file extension (including the dot).
22860 \begin_layout Description
22861 \begin_inset Flex Code
22864 \begin_layout Plain Layout
22870 The filename of the file specified in the external material dialog.
22871 This is either an absolute name, or it is relative to the LyX document.
22874 \begin_layout Description
22875 \begin_inset Flex Code
22878 \begin_layout Plain Layout
22885 \begin_inset Flex Code
22888 \begin_layout Plain Layout
22894 (absolute name or relative to the LyX document).
22897 \begin_layout Description
22898 \begin_inset Flex Code
22901 \begin_layout Plain Layout
22907 The file path, relative to the master LyX document.
22910 \begin_layout Description
22911 \begin_inset Flex Code
22914 \begin_layout Plain Layout
22920 The file path, relative to the LyX document.
22923 \begin_layout Description
22924 \begin_inset Flex Code
22927 \begin_layout Plain Layout
22933 This macro will expand to the absolute path of the system directory.
22934 This is typically used to point to the various helper scripts that are
22938 \begin_layout Description
22939 \begin_inset Flex Code
22942 \begin_layout Plain Layout
22948 A name and full path to a temporary file which will be automatically deleted
22949 whenever the containing document is closed, or the external material insertion
22953 \begin_layout Standard
22954 All path macros contain a trailing directory separator, so you can construct
22956 \begin_inset space \thinspace{}
22960 \begin_inset space \space{}
22963 the absolute filename with
22964 \begin_inset Flex Code
22967 \begin_layout Plain Layout
22968 $$AbsPath$$Basename$$Extension
22976 \begin_layout Standard
22977 The macros above are substituted in all commands unless otherwise noted.
22979 \begin_inset Flex Code
22982 \begin_layout Plain Layout
22988 supports additionally the following substitutions if they are enabled by
22990 \begin_inset Flex Code
22993 \begin_layout Plain Layout
23000 \begin_inset Flex Code
23003 \begin_layout Plain Layout
23012 \begin_layout Description
23013 \begin_inset Flex Code
23016 \begin_layout Plain Layout
23022 The front part of the resize command.
23025 \begin_layout Description
23026 \begin_inset Flex Code
23029 \begin_layout Plain Layout
23035 The back part of the resize command.
23038 \begin_layout Description
23039 \begin_inset Flex Code
23042 \begin_layout Plain Layout
23048 The front part of the rotation command.
23051 \begin_layout Description
23052 \begin_inset Flex Code
23055 \begin_layout Plain Layout
23061 The back part of the rotation command.
23064 \begin_layout Standard
23065 The value string of the
23066 \begin_inset Flex Code
23069 \begin_layout Plain Layout
23075 command supports additionally the following substitutions if they are enabled
23077 \begin_inset Flex Code
23080 \begin_layout Plain Layout
23087 \begin_inset Flex Code
23090 \begin_layout Plain Layout
23099 \begin_layout Description
23100 \begin_inset Flex Code
23103 \begin_layout Plain Layout
23112 \begin_layout Description
23113 \begin_inset Flex Code
23116 \begin_layout Plain Layout
23125 \begin_layout Description
23126 \begin_inset Flex Code
23129 \begin_layout Plain Layout
23138 \begin_layout Description
23139 \begin_inset Flex Code
23142 \begin_layout Plain Layout
23148 The rotation option.
23151 \begin_layout Standard
23152 You may ask why there are so many path macros.
23153 There are mainly two reasons:
23156 \begin_layout Enumerate
23157 Relative and absolute file names should remain relative or absolute, respectivel
23159 Users may have reasons to prefer either form.
23160 Relative names are useful for portable documents that should work on different
23161 machines, for example.
23162 Absolute names may be required by some programs.
23165 \begin_layout Enumerate
23166 LaTeX treats relative file names differently than LyX and other programs
23167 in nested included files.
23168 For LyX, a relative file name is always relative to the document that contains
23170 For LaTeX, it is always relative to the master document.
23171 These two definitions are identical if you have only one document, but
23172 differ if you have a master document that includes part documents.
23173 That means that relative filenames must be transformed when presented to
23175 Fortunately LyX does this automatically for you if you choose the right
23179 \begin_layout Standard
23180 So which path macro should be used in new template definitions? The rule
23184 \begin_layout Itemize
23186 \begin_inset Flex Code
23189 \begin_layout Plain Layout
23195 if an absolute path is required.
23198 \begin_layout Itemize
23200 \begin_inset Flex Code
23203 \begin_layout Plain Layout
23204 $$AbsOrRelPathMaster
23209 if the substituted string is some kind of LaTeX input.
23212 \begin_layout Itemize
23214 \begin_inset Flex Code
23217 \begin_layout Plain Layout
23218 $$AbsOrRelPathParent
23223 in order to preserve the user's choice.
23226 \begin_layout Standard
23227 There are special cases where this rule does not work and e.
23228 \begin_inset space \thinspace{}
23232 \begin_inset space \space{}
23235 relative names are needed, but normally it will work just fine.
23236 One example for such a case is the command
23237 \begin_inset Flex Code
23240 \begin_layout Plain Layout
23241 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23246 in the XFig template above: We can't use the absolute name because the
23248 \begin_inset Flex Code
23251 \begin_layout Plain Layout
23257 files needs the relative name in order to rewrite the file content.
23260 \begin_layout Section
23261 Security discussion
23262 \begin_inset CommandInset label
23264 name "sec:Security-discussion"
23271 \begin_layout Standard
23272 The external material feature interfaces with a lot of external programs
23273 and does so automatically, so we have to consider the security implications
23275 In particular, since you have the option of including your own filenames
23276 and/or parameter strings and those are expanded into a command, it seems
23277 that it would be possible to create a malicious document which executes
23278 arbitrary commands when a user views or prints the document.
23279 This is something we definitely want to avoid.
23282 \begin_layout Standard
23283 However, since the external program commands are specified in the template
23284 configuration file only, there are no security issues if LyX is properly
23285 configured with safe templates only.
23286 This is so because the external programs are invoked with the
23287 \begin_inset Flex Code
23290 \begin_layout Plain Layout
23296 -system call rather than the
23297 \begin_inset Flex Code
23300 \begin_layout Plain Layout
23306 system-call, so it's not possible to execute arbitrary commands from the
23307 filename or parameter section via the shell.
23310 \begin_layout Standard
23311 This also implies that you are restricted in what command strings you can
23312 use in the external material templates.
23313 In particular, pipes and redirection are not readily available.
23314 This has to be so if LyX should remain safe.
23315 If you want to use some of the shell features, you should write a safe
23316 script to do this in a controlled manner, and then invoke the script from
23317 the command string.
23321 \begin_layout Standard
23322 It is possible to design a template that interacts directly with the shell,
23323 but since this would allow a malicious user to execute arbitrary commands
23324 by writing clever filenames and/or parameters, we generally recommend that
23325 you only use safe scripts that work with the
23326 \begin_inset Flex Code
23329 \begin_layout Plain Layout
23335 system call in a controlled manner.
23336 Of course, for use in a controlled environment, it can be tempting to just
23337 fall back to use ordinary shell scripts.
23338 If you do so, be aware that you
23342 provide an easily exploitable security hole in your system.
23343 Of course it stands to reason that such unsafe templates will never be
23344 included in the standard LyX distribution, although we do encourage people
23345 to submit new templates in the open source tradition.
23346 But LyX as shipped from the official distribution channels will never have
23350 \begin_layout Standard
23351 Including external material provides a lot of power, and you have to be
23352 careful not to introduce security hazards with this power.
23353 A subtle error in a single line in an innocent looking script can open
23354 the door to huge security problems.
23355 So if you do not fully understand the issues, we recommend that you consult
23356 a knowledgeable security professional or the LyX development team if you
23357 have any questions about whether a given template is safe or not.
23358 And do this before you use it in an uncontrolled environment.
23361 \begin_layout Chapter
23363 List of supported LyX functions to be used in layouts
23364 \begin_inset CommandInset label
23366 name "chap:List-of-functions"
23373 \begin_layout Standard
23375 \begin_inset Tabular
23376 <lyxtabular version="3" rows="11" columns="8">
23377 <features rotate="0" tabularvalignment="middle">
23378 <column alignment="left" valignment="top">
23379 <column alignment="left" valignment="top">
23380 <column alignment="left" valignment="top">
23381 <column alignment="left" valignment="top">
23382 <column alignment="left" valignment="top">
23383 <column alignment="left" valignment="top">
23384 <column alignment="left" valignment="top">
23385 <column alignment="left" valignment="top">
23387 <cell alignment="left" valignment="top" usebox="none">
23390 \begin_layout Plain Layout
23396 <cell alignment="left" valignment="top" usebox="none">
23399 \begin_layout Plain Layout
23405 <cell alignment="left" valignment="top" usebox="none">
23408 \begin_layout Plain Layout
23414 <cell alignment="left" valignment="top" usebox="none">
23417 \begin_layout Plain Layout
23423 <cell alignment="center" valignment="top" usebox="none">
23426 \begin_layout Plain Layout
23432 <cell alignment="center" valignment="top" usebox="none">
23435 \begin_layout Plain Layout
23441 <cell alignment="center" valignment="top" usebox="none">
23444 \begin_layout Plain Layout
23450 <cell alignment="center" valignment="top" usebox="none">
23453 \begin_layout Plain Layout
23461 <cell alignment="left" valignment="top" usebox="none">
23464 \begin_layout Plain Layout
23470 <cell alignment="left" valignment="top" usebox="none">
23473 \begin_layout Plain Layout
23479 <cell alignment="left" valignment="top" usebox="none">
23482 \begin_layout Plain Layout
23488 <cell alignment="left" valignment="top" usebox="none">
23491 \begin_layout Plain Layout
23497 <cell alignment="center" valignment="top" usebox="none">
23500 \begin_layout Plain Layout
23506 <cell alignment="center" valignment="top" usebox="none">
23509 \begin_layout Plain Layout
23515 <cell alignment="center" valignment="top" usebox="none">
23518 \begin_layout Plain Layout
23524 <cell alignment="center" valignment="top" usebox="none">
23527 \begin_layout Plain Layout
23535 <cell alignment="left" valignment="top" usebox="none">
23538 \begin_layout Plain Layout
23544 <cell alignment="left" valignment="top" usebox="none">
23547 \begin_layout Plain Layout
23553 <cell alignment="left" valignment="top" usebox="none">
23556 \begin_layout Plain Layout
23562 <cell alignment="left" valignment="top" usebox="none">
23565 \begin_layout Plain Layout
23571 <cell alignment="center" valignment="top" usebox="none">
23574 \begin_layout Plain Layout
23580 <cell alignment="center" valignment="top" usebox="none">
23583 \begin_layout Plain Layout
23589 <cell alignment="center" valignment="top" usebox="none">
23592 \begin_layout Plain Layout
23598 <cell alignment="center" valignment="top" usebox="none">
23601 \begin_layout Plain Layout
23609 <cell alignment="left" valignment="top" usebox="none">
23612 \begin_layout Plain Layout
23618 <cell alignment="left" valignment="top" usebox="none">
23621 \begin_layout Plain Layout
23627 <cell alignment="left" valignment="top" usebox="none">
23630 \begin_layout Plain Layout
23636 <cell alignment="left" valignment="top" usebox="none">
23639 \begin_layout Plain Layout
23645 <cell alignment="center" valignment="top" usebox="none">
23648 \begin_layout Plain Layout
23654 <cell alignment="center" valignment="top" usebox="none">
23657 \begin_layout Plain Layout
23663 <cell alignment="center" valignment="top" usebox="none">
23666 \begin_layout Plain Layout
23672 <cell alignment="center" valignment="top" usebox="none">
23675 \begin_layout Plain Layout
23683 <cell alignment="left" valignment="top" usebox="none">
23686 \begin_layout Plain Layout
23692 <cell alignment="left" valignment="top" usebox="none">
23695 \begin_layout Plain Layout
23701 <cell alignment="left" valignment="top" usebox="none">
23704 \begin_layout Plain Layout
23710 <cell alignment="left" valignment="top" usebox="none">
23713 \begin_layout Plain Layout
23719 <cell alignment="center" valignment="top" usebox="none">
23722 \begin_layout Plain Layout
23728 <cell alignment="center" valignment="top" usebox="none">
23731 \begin_layout Plain Layout
23737 <cell alignment="center" valignment="top" usebox="none">
23740 \begin_layout Plain Layout
23746 <cell alignment="center" valignment="top" usebox="none">
23749 \begin_layout Plain Layout
23757 <cell alignment="left" valignment="top" usebox="none">
23760 \begin_layout Plain Layout
23766 <cell alignment="left" valignment="top" usebox="none">
23769 \begin_layout Plain Layout
23775 <cell alignment="left" valignment="top" usebox="none">
23778 \begin_layout Plain Layout
23784 <cell alignment="left" valignment="top" usebox="none">
23787 \begin_layout Plain Layout
23793 <cell alignment="center" valignment="top" usebox="none">
23796 \begin_layout Plain Layout
23802 <cell alignment="center" valignment="top" usebox="none">
23805 \begin_layout Plain Layout
23811 <cell alignment="center" valignment="top" usebox="none">
23814 \begin_layout Plain Layout
23820 <cell alignment="center" valignment="top" usebox="none">
23823 \begin_layout Plain Layout
23831 <cell alignment="left" valignment="top" usebox="none">
23834 \begin_layout Plain Layout
23840 <cell alignment="left" valignment="top" usebox="none">
23843 \begin_layout Plain Layout
23849 <cell alignment="left" valignment="top" usebox="none">
23852 \begin_layout Plain Layout
23858 <cell alignment="left" valignment="top" usebox="none">
23861 \begin_layout Plain Layout
23867 <cell alignment="center" valignment="top" usebox="none">
23870 \begin_layout Plain Layout
23876 <cell alignment="center" valignment="top" usebox="none">
23879 \begin_layout Plain Layout
23885 <cell alignment="center" valignment="top" usebox="none">
23888 \begin_layout Plain Layout
23894 <cell alignment="center" valignment="top" usebox="none">
23897 \begin_layout Plain Layout
23905 <cell alignment="left" valignment="top" usebox="none">
23908 \begin_layout Plain Layout
23914 <cell alignment="left" valignment="top" usebox="none">
23917 \begin_layout Plain Layout
23923 <cell alignment="left" valignment="top" usebox="none">
23926 \begin_layout Plain Layout
23932 <cell alignment="left" valignment="top" usebox="none">
23935 \begin_layout Plain Layout
23941 <cell alignment="center" valignment="top" usebox="none">
23944 \begin_layout Plain Layout
23950 <cell alignment="center" valignment="top" usebox="none">
23953 \begin_layout Plain Layout
23959 <cell alignment="center" valignment="top" usebox="none">
23962 \begin_layout Plain Layout
23968 <cell alignment="center" valignment="top" usebox="none">
23971 \begin_layout Plain Layout
23979 <cell alignment="left" valignment="top" usebox="none">
23982 \begin_layout Plain Layout
23988 <cell alignment="left" valignment="top" usebox="none">
23991 \begin_layout Plain Layout
23997 <cell alignment="left" valignment="top" usebox="none">
24000 \begin_layout Plain Layout
24006 <cell alignment="left" valignment="top" usebox="none">
24009 \begin_layout Plain Layout
24015 <cell alignment="center" valignment="top" usebox="none">
24018 \begin_layout Plain Layout
24024 <cell alignment="center" valignment="top" usebox="none">
24027 \begin_layout Plain Layout
24033 <cell alignment="center" valignment="top" usebox="none">
24036 \begin_layout Plain Layout
24042 <cell alignment="center" valignment="top" usebox="none">
24045 \begin_layout Plain Layout
24053 <cell alignment="left" valignment="top" usebox="none">
24056 \begin_layout Plain Layout
24062 <cell alignment="left" valignment="top" usebox="none">
24065 \begin_layout Plain Layout
24071 <cell alignment="left" valignment="top" usebox="none">
24074 \begin_layout Plain Layout
24080 <cell alignment="left" valignment="top" usebox="none">
24083 \begin_layout Plain Layout
24089 <cell alignment="center" valignment="top" usebox="none">
24092 \begin_layout Plain Layout
24098 <cell alignment="center" valignment="top" usebox="none">
24101 \begin_layout Plain Layout
24107 <cell alignment="center" valignment="top" usebox="none">
24110 \begin_layout Plain Layout
24116 <cell alignment="center" valignment="top" usebox="none">
24119 \begin_layout Plain Layout
24127 <cell alignment="center" valignment="top" usebox="none">
24130 \begin_layout Plain Layout
24136 <cell alignment="center" valignment="top" usebox="none">
24139 \begin_layout Plain Layout
24145 <cell alignment="center" valignment="top" usebox="none">
24148 \begin_layout Plain Layout
24154 <cell alignment="center" valignment="top" usebox="none">
24157 \begin_layout Plain Layout
24163 <cell alignment="center" valignment="top" usebox="none">
24166 \begin_layout Plain Layout
24172 <cell alignment="center" valignment="top" usebox="none">
24175 \begin_layout Plain Layout
24181 <cell alignment="center" valignment="top" usebox="none">
24184 \begin_layout Plain Layout
24190 <cell alignment="center" valignment="top" usebox="none">
24193 \begin_layout Plain Layout
24207 \begin_layout Chapter
24208 Names of available colors to be used in layouts
24209 \begin_inset CommandInset label
24211 name "chap:Names-of-colors"
24218 \begin_layout Standard
24219 The colors listed here are the standard colors and the those that you can
24220 adjust in the LyX preferences.
24223 \begin_layout Description
24236 No particular color -- clear or default
24239 \begin_layout Description
24243 \begin_layout Description
24247 \begin_layout Description
24251 \begin_layout Description
24255 \begin_layout Description
24259 \begin_layout Description
24263 \begin_layout Description
24267 \begin_layout Description
24271 \begin_layout Description
24272 added_space Added space marker color
24275 \begin_layout Description
24276 addedtext Added text color
24279 \begin_layout Description
24280 appendix Appendix marker color
24283 \begin_layout Description
24284 background Background color
24287 \begin_layout Description
24288 bottomarea Bottom area color
24291 \begin_layout Description
24292 branchlabel Label color for branches
24295 \begin_layout Description
24296 buttonbg Color used for bottom background
24299 \begin_layout Description
24300 buttonhoverbg Color used for button background under focus
24303 \begin_layout Description
24304 buttonframe Color for inset button frames
24307 \begin_layout Description
24308 changebar Changebar color
24311 \begin_layout Description
24312 changedtextauthor1 Changed text color author 1
24315 \begin_layout Description
24316 changedtextauthor2 Changed text color author 2
24319 \begin_layout Description
24320 changedtextauthor3 Changed text color author 3
24323 \begin_layout Description
24324 changedtextauthor4 Changed text color author 4
24327 \begin_layout Description
24328 changedtextauthor5 Changed text color author 5
24331 \begin_layout Description
24332 collapsable_inset_frame Collapsable insets framecolor
24335 \begin_layout Description
24336 collapsable_inset_text Collapsable insets text color
24339 \begin_layout Description
24340 command Text color for command insets
24343 \begin_layout Description
24344 commandbg Background color for command insets
24347 \begin_layout Description
24348 commandframe Frame color for command insets
24351 \begin_layout Description
24352 comment color for comments
24355 \begin_layout Description
24356 commentbg Background color of comments
24359 \begin_layout Description
24360 cursor Cursor color
24363 \begin_layout Description
24364 deletedtext Deleted text color
24367 \begin_layout Description
24368 deletedtextmodifier Deleted text modifying color
24371 \begin_layout Description
24372 depthbar Color for the depth bars in the margin
24375 \begin_layout Description
24376 eolmarker End of line marker color
24379 \begin_layout Description
24380 error Color of the LaTeX error box
24383 \begin_layout Description
24384 footlabel Label color for footnotes
24387 \begin_layout Description
24388 graphicsbg Graphics inset background color
24391 \begin_layout Description
24392 greyedout Label color for greyedout insets
24395 \begin_layout Description
24396 greyedoutbg Background color of greyedout inset
24399 \begin_layout Description
24400 greyedouttext Color for greyedout inset text
24403 \begin_layout Description
24404 indexlabel Label color for index insets
24407 \begin_layout Description
24408 ignore The color is ignored
24411 \begin_layout Description
24412 inherit The color is inherited
24415 \begin_layout Description
24416 inlinecompletion Inline completion color
24419 \begin_layout Description
24420 insetbg Inset marker background color
24423 \begin_layout Description
24424 insetframe Inset marker frame color
24427 \begin_layout Description
24428 language Color for marking foreign language words
24431 \begin_layout Description
24432 latex Text color in LaTeX mode
24435 \begin_layout Description
24436 listingsbg Background color of listings inset
24439 \begin_layout Description
24440 marginlabel Label color for margin notes
24443 \begin_layout Description
24444 math Math inset text color
24447 \begin_layout Description
24448 mathbg Math inset background color
24451 \begin_layout Description
24452 mathcorners Math inset frame color not under focus
24455 \begin_layout Description
24456 mathframe Math inset frame color under focus
24459 \begin_layout Description
24460 mathline Math line color
24463 \begin_layout Description
24464 mathmacrobg Macro math inset background color
24467 \begin_layout Description
24468 mathmacroblend Macro math blended color
24471 \begin_layout Description
24472 mathmacroframe Macro math frame color
24475 \begin_layout Description
24476 mathmacrohoverbg Macro math inset background color hovered
24479 \begin_layout Description
24480 mathmacrolabel Macro math label color
24483 \begin_layout Description
24484 mathmacronewarg Macro template color for new parameters
24487 \begin_layout Description
24488 mathmacrooldarg Macro template color for old parameters
24491 \begin_layout Description
24492 newpage New page color
24495 \begin_layout Description
24496 nonunique_inlinecompletion Inline completion color for the non-unique part
24499 \begin_layout Description
24500 notebg Background color of notes
24503 \begin_layout Description
24504 notelabel Label color for notes
24507 \begin_layout Description
24508 pagebreak Page break/line break color
24511 \begin_layout Description
24512 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24515 \begin_layout Description
24516 phantomtext Text color for phantom insets
24519 \begin_layout Description
24520 preview The color used for previews
24523 \begin_layout Description
24524 previewframe Preview frame color
24527 \begin_layout Description
24528 regexpframe Color for regexp frame
24531 \begin_layout Description
24532 selection Background color of selected text
24535 \begin_layout Description
24536 selectiontext Foreground color of selected text
24539 \begin_layout Description
24540 shadedbg Background color of shaded box
24543 \begin_layout Description
24544 special Special chars text color
24547 \begin_layout Description
24548 tabularline Table line color
24551 \begin_layout Description
24552 tabularonoffline Table line color
24555 \begin_layout Description
24556 urllabel Label color for URL insets
24559 \begin_layout Description
24560 urltext Color for URL inset text