1 #LyX 2.2 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 true
149 \output_changes false
153 \author -712698321 "Jürgen Spitzmüller"
154 \author 274215730 "scott"
160 Customizing LyX: Features for the Advanced User
168 \begin_layout Plain Layout
170 If you have comments or error corrections, please send them to the LyX Documenta
172 \begin_inset CommandInset href
174 target "lyx-docs@lists.lyx.org"
181 \begin_inset Quotes eld
185 \begin_inset Quotes erd
188 in the subject header, and please cc the current maintainer of this file,
189 Richard Heck <rgheck@comcast.net>.
195 \begin_inset Newline newline
199 \begin_inset Newline newline
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
652 \begin_inset CommandInset ref
654 reference "cha:Internationalizing-LyX"
661 \begin_layout Labeling
662 \labelwidthstring 00.00.0000
663 \begin_inset Flex Code
666 \begin_layout Plain Layout
672 contains example files that explain how to use some features.
673 In the file browser, press the
674 \begin_inset Flex MenuItem
677 \begin_layout Plain Layout
686 \begin_layout Labeling
687 \labelwidthstring 00.00.0000
688 \begin_inset Flex Code
691 \begin_layout Plain Layout
697 contains image files that are used by the
698 \begin_inset Flex MenuItem
701 \begin_layout Plain Layout
708 In addition, it also contains the individual icons used in the toolbar
709 and the banners that can be shown when LyX is launched.
712 \begin_layout Labeling
713 \labelwidthstring 00.00.0000
714 \begin_inset Flex Code
717 \begin_layout Plain Layout
723 contains keyboard keymapping files.
725 \begin_inset CommandInset ref
727 reference "sec:International-Keymap-Stuff"
734 \begin_layout Labeling
735 \labelwidthstring 00.00.0000
736 \begin_inset Flex Code
739 \begin_layout Plain Layout
745 contains the text class and module files described in
746 \begin_inset CommandInset ref
748 reference "cha:Installing-New-Document"
755 \begin_layout Labeling
756 \labelwidthstring 00.00.0000
757 \begin_inset Flex Code
760 \begin_layout Plain Layout
767 \begin_inset Flex Code
770 \begin_layout Plain Layout
776 Python scripts used to convert between LyX versions.
777 These can be run from the command line if, say, you want to batch-convert
781 \begin_layout Labeling
782 \labelwidthstring 00.00.0000
783 \begin_inset Flex Code
786 \begin_layout Plain Layout
792 contains some files that demonstrate the capabilities of the
793 \begin_inset Flex MenuItem
796 \begin_layout Plain Layout
807 Also contains some scripts used by LyX itself.
810 \begin_layout Labeling
811 \labelwidthstring 00.00.0000
812 \begin_inset Flex Code
815 \begin_layout Plain Layout
821 contains the standard LyX template files described in
822 \begin_inset CommandInset ref
824 reference "sub:Creating-Templates"
831 \begin_layout Labeling
832 \labelwidthstring 00.00.0000
833 \begin_inset Flex Code
836 \begin_layout Plain Layout
842 contains files with the extension
843 \begin_inset Flex Code
846 \begin_layout Plain Layout
852 that define the user interface to LyX.
853 That is, the files define which items appear in which menus and the items
854 appearing on the toolbar.
857 \begin_layout Subsection
858 Files you don't want to modify
861 \begin_layout Standard
862 These files are used internally by LyX and you generally do not need to
863 modify them unless you are a developer.
866 \begin_layout Labeling
867 \labelwidthstring 00.00.0000
868 \begin_inset Flex Code
871 \begin_layout Plain Layout
877 this file contains the list of LyX developers.
878 The contents are displayed with the menu entry
879 \begin_inset Flex MenuItem
882 \begin_layout Plain Layout
883 Help\SpecialChar \menuseparator
896 \begin_layout Labeling
897 \labelwidthstring 00.00.0000
898 \begin_inset Flex Code
901 \begin_layout Plain Layout
907 this is a LaTeX script used during the configuration process.
911 \begin_layout Labeling
912 \labelwidthstring 00.00.0000
913 \begin_inset Flex Code
916 \begin_layout Plain Layout
922 this is a Python script that is used to re-configure LyX.
923 It creates configuration files in the directory it was run from.
926 \begin_layout Subsection
927 Other files needing a line or two
930 \begin_layout Labeling
931 \labelwidthstring 00.00.0000
932 \begin_inset Flex Code
935 \begin_layout Plain Layout
941 this contains tables describing how different character encodings can be
945 \begin_layout Labeling
946 \labelwidthstring 00.00.0000
947 \begin_inset Flex Code
950 \begin_layout Plain Layout
956 this file contains the templates available to the new
957 \begin_inset Flex MenuItem
960 \begin_layout Plain Layout
971 \begin_inset CommandInset ref
973 reference "chap:Including-External-Material"
980 \begin_layout Labeling
981 \labelwidthstring 00.00.0000
982 \begin_inset Flex Code
985 \begin_layout Plain Layout
991 this file contains a list of all the languages currently supported by LyX.
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
996 \begin_inset Flex Code
999 \begin_layout Plain Layout
1005 contains information about the supported fonts.
1008 \begin_layout Labeling
1009 \labelwidthstring 00.00.0000
1010 \begin_inset Flex Code
1013 \begin_layout Plain Layout
1019 this file contains translations for internationalized paragraph styles
1021 \begin_inset CommandInset ref
1023 reference "sub:I18n"
1030 \begin_layout Labeling
1031 \labelwidthstring 00.00.0000
1032 \begin_inset Flex Code
1035 \begin_layout Plain Layout
1041 this file contains information about unicode-encoded glyphs and the way
1042 they are supported by LyX via LaTeX.
1045 \begin_layout Section
1046 Your local configuration directory
1049 \begin_layout Standard
1050 Even if you are using LyX as an unprivileged user, you might want to change
1051 LyX configuration for your own use.
1053 \begin_inset Flex Code
1056 \begin_layout Plain Layout
1062 directory contains all your personal configuration files.
1063 This is the directory described as
1064 \begin_inset Quotes eld
1068 \begin_inset Quotes erd
1072 \begin_inset Flex MenuItem
1075 \begin_layout Plain Layout
1076 Help\SpecialChar \menuseparator
1078 \begin_inset space ~
1087 This directory is used as a mirror of
1088 \begin_inset Flex Code
1091 \begin_layout Plain Layout
1097 , which means that every file in
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1107 is a replacement for the corresponding file in
1108 \begin_inset Flex Code
1111 \begin_layout Plain Layout
1118 Any configuration file described in the above sections can be placed either
1119 in the system-wide directory, in which case it will affect all users, or
1120 in your local directory for your own use.
1123 \begin_layout Standard
1124 To make things clearer, let's provide a few examples:
1127 \begin_layout Itemize
1128 The preferences set in the
1129 \begin_inset Flex MenuItem
1132 \begin_layout Plain Layout
1133 Tools\SpecialChar \menuseparator
1139 dialog are saved to a file
1140 \begin_inset Flex Code
1143 \begin_layout Plain Layout
1150 \begin_inset Flex Code
1153 \begin_layout Plain Layout
1162 \begin_layout Itemize
1163 When you reconfigure using
1164 \begin_inset Flex MenuItem
1167 \begin_layout Plain Layout
1168 Tools\SpecialChar \menuseparator
1175 \begin_inset Flex Code
1178 \begin_layout Plain Layout
1184 script, and the resulting files are written in your local configuration
1186 This means that any additional text class file that you might have added
1188 \begin_inset Flex Code
1191 \begin_layout Plain Layout
1197 will be added to the list of classes in the
1198 \begin_inset Flex MenuItem
1201 \begin_layout Plain Layout
1202 Document\SpecialChar \menuseparator
1211 \begin_layout Itemize
1212 If you get some updated documentation from LyX ftp site and cannot install
1213 it because you do not have sysadmin rights on your system, you can just
1215 \begin_inset Flex Code
1218 \begin_layout Plain Layout
1224 and the items in the
1225 \begin_inset Flex MenuItem
1228 \begin_layout Plain Layout
1234 menu will open them!
1237 \begin_layout Section
1238 Running LyX with multiple configurations
1241 \begin_layout Standard
1242 The configuration freedom of the local configuration directory may not suffice
1243 if you want to have more than one configuration at your disposal.
1244 For example, you may want to be use different key bindings or printer settings
1246 You can achieve this by having several such directories.
1247 You then specify which directory to use at run-time.
1250 \begin_layout Standard
1251 Invoking LyX with the command line switch
1252 \begin_inset Flex Code
1255 \begin_layout Plain Layout
1265 instructs the program to read the configuration from that directory, and
1266 not from the default directory.
1267 (You can determine the default directory by running LyX without the
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1277 switch.) If the specified directory does not exist, LyX offers to create
1278 it for you, just like it does for the default directory on the first time
1279 you run the program.
1280 You can modify the configuration options in this additional user directory
1281 exactly as you would for the default directory.
1282 These directories are completely independent (but read on).
1283 Note that setting the environment variable
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1293 to some value has exactly the same effect.
1296 \begin_layout Standard
1297 Having several configurations also requires more maintenance: if you want
1298 to add a new layout to
1299 \begin_inset Flex Code
1302 \begin_layout Plain Layout
1308 which you want available from all your configurations, you must add it
1309 to each directory separately.
1310 You can avoid this with the following trick: after LyX creates the additional
1311 directory, most of the subdirectories (see above) are empty.
1312 If you want the new configuration to mirror an existing one, replace the
1313 empty subdirectory with a symbolic link to the matching subdirectory in
1314 the existing configuration.
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1325 subdirectory, however, since it contains a file written by the configuration
1326 script (also accessible through
1327 \begin_inset Flex MenuItem
1330 \begin_layout Plain Layout
1331 Tools\SpecialChar \menuseparator
1337 ) which is configuration-specific.
1340 \begin_layout Chapter
1341 The Preferences dialog
1344 \begin_layout Standard
1345 All options of the preferences dialog are described in the Appendix
1347 The Preferences Dialog
1354 For some options you might find here more details.
1357 \begin_layout Section
1359 \begin_inset CommandInset label
1368 \begin_layout Standard
1369 The first step is to define your file formats if they are not already defined.
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1383 \begin_inset Flex MenuItem
1386 \begin_layout Plain Layout
1387 File Handling\SpecialChar \menuseparator
1394 \begin_inset Flex MenuItem
1397 \begin_layout Plain Layout
1403 button to define your new format.
1405 \begin_inset Flex MenuItem
1408 \begin_layout Plain Layout
1414 field contains the name used to identify the format in the GUI.
1416 \begin_inset Flex MenuItem
1419 \begin_layout Plain Layout
1425 is used to identify the format internally.
1426 You will also need to enter a file extension.
1427 These are all required.
1429 \begin_inset Flex MenuItem
1432 \begin_layout Plain Layout
1438 field is used to provide a keyboard shortcut on the menus.
1439 (For example, pressing
1440 \begin_inset Flex MenuItem
1443 \begin_layout Plain Layout
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1454 Document\SpecialChar \menuseparator
1455 View (Other Formats)\SpecialChar \menuseparator
1464 \begin_layout Standard
1466 \begin_inset Flex MenuItem
1469 \begin_layout Plain Layout
1476 \begin_inset Flex MenuItem
1479 \begin_layout Plain Layout
1486 For example, you might want to use
1487 \begin_inset Flex MenuItem
1490 \begin_layout Plain Layout
1496 to view PostScript files.
1497 You can enter the command needed to start the program in the corresponding
1499 In defining this command, you can use the four variables listed in the
1501 The viewer is launched when you view an image in LyX or use the
1502 \begin_inset Flex MenuItem
1505 \begin_layout Plain Layout
1506 Document\SpecialChar \menuseparator
1513 The editor is for example launched when you right-click on an image and
1515 \begin_inset Flex MenuItem
1518 \begin_layout Plain Layout
1524 in the appearing context menu.
1527 \begin_layout Standard
1529 \begin_inset Flex MenuItem
1532 \begin_layout Plain Layout
1538 type of a format is optional, but if it is specified, it must be unique
1540 It is used to detect files of this format from the file contents.
1541 For some important file formats there is no MIME type officially registered
1543 \begin_inset CommandInset href
1546 target "http://www.iana.org/assignments/media-types/"
1551 Therefore LyX uses the extended list of MIME types as specified by
1552 \begin_inset CommandInset href
1554 name "freedesktop.org"
1555 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1562 \begin_layout Standard
1564 \begin_inset Flex MenuItem
1567 \begin_layout Plain Layout
1573 option tells LyX that a format is suitable for document export.
1574 If this is set and if a suitable conversion route exists (see
1575 \begin_inset CommandInset ref
1577 reference "sec:Converters"
1581 ), the format will appear in the
1582 \begin_inset Flex MenuItem
1585 \begin_layout Plain Layout
1586 File\SpecialChar \menuseparator
1593 The format will also appear in the
1594 \begin_inset Flex MenuItem
1597 \begin_layout Plain Layout
1598 Document\SpecialChar \menuseparator
1604 menu if a viewer is specified for the format.
1605 Pure image formats, such as
1606 \begin_inset Flex Code
1609 \begin_layout Plain Layout
1615 , should not use this option.
1616 Formats that can both represent vector graphics and documents like
1617 \begin_inset Flex Code
1620 \begin_layout Plain Layout
1629 \begin_layout Standard
1631 \begin_inset Flex MenuItem
1634 \begin_layout Plain Layout
1635 Vector graphics format
1640 tells LyX that a format can contain vector graphics.
1641 This information is used to determine the target format of included graphics
1643 \begin_inset Flex MenuItem
1646 \begin_layout Plain Layout
1653 Included graphics may need to be converted to either
1654 \begin_inset Flex MenuItem
1657 \begin_layout Plain Layout
1664 \begin_inset Flex MenuItem
1667 \begin_layout Plain Layout
1674 \begin_inset Flex MenuItem
1677 \begin_layout Plain Layout
1684 \begin_inset Flex MenuItem
1687 \begin_layout Plain Layout
1693 cannot handle other image formats.
1694 If an included graphic is not already in
1695 \begin_inset Flex MenuItem
1698 \begin_layout Plain Layout
1705 \begin_inset Flex MenuItem
1708 \begin_layout Plain Layout
1715 \begin_inset Flex MenuItem
1718 \begin_layout Plain Layout
1724 format, it is converted to
1725 \begin_inset Flex MenuItem
1728 \begin_layout Plain Layout
1734 if the vector format option is set, and otherwise to
1735 \begin_inset Flex MenuItem
1738 \begin_layout Plain Layout
1747 \begin_layout Section
1751 \begin_layout Standard
1752 Since all conversions from one format to another take place in LyX's temporary
1753 directory, it is sometimes necessary to modify a file before copying it
1754 to the temporary directory in order that the conversion may be performed.
1758 \begin_layout Plain Layout
1759 For example, the file may refer to other files—images, for example—using
1760 relative file names, and these may become invalid when the file is copied
1761 to the temporary directory.
1766 This is done by a Copier: It copies a file to (or from) the temporary directory
1767 and may modify it in the process.
1770 \begin_layout Standard
1771 The definitions of the copiers may use four variables:
1774 \begin_layout Labeling
1775 \labelwidthstring 00.00.0000
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1785 The LyX system directory (e.
1786 \begin_inset space \thinspace{}
1790 \begin_inset space \space{}
1794 \begin_inset Flex MenuItem
1797 \begin_layout Plain Layout
1806 \begin_layout Labeling
1807 \labelwidthstring 00.00.0000
1808 \begin_inset Flex Code
1811 \begin_layout Plain Layout
1820 \begin_layout Labeling
1821 \labelwidthstring 00.00.0000
1822 \begin_inset Flex Code
1825 \begin_layout Plain Layout
1834 \begin_layout Labeling
1835 \labelwidthstring 00.00.0000
1836 \begin_inset Flex Code
1839 \begin_layout Plain Layout
1845 The base name (without filename extension) in the LyX temporary directory
1848 \begin_layout Labeling
1849 \labelwidthstring 00.00.0000
1850 \begin_inset Flex Code
1853 \begin_layout Plain Layout
1859 The full directory path of the LyX temporary directory
1862 \begin_layout Labeling
1863 \labelwidthstring 00.00.0000
1864 \begin_inset Flex Code
1867 \begin_layout Plain Layout
1873 The full pathname to the original LyX file being processed
1876 \begin_layout Labeling
1877 \labelwidthstring 00.00.0000
1878 \begin_inset Flex Code
1881 \begin_layout Plain Layout
1887 The filename (without any directory path) of the LyX file.
1890 \begin_layout Labeling
1891 \labelwidthstring 00.00.0000
1892 \begin_inset Flex Code
1895 \begin_layout Plain Layout
1904 \begin_layout Standard
1905 The latter should be the filename as it would be used in a LaTeX's
1912 It is relevant only when exporting files suitable for such inclusion.
1915 \begin_layout Standard
1916 Copiers can be used to do almost anything with output files.
1917 For example, suppose you want generated pdf files to be copied to a special
1919 \begin_inset Flex Code
1922 \begin_layout Plain Layout
1929 Then you could write a shell script such as this one:
1932 \begin_layout Standard
1933 \begin_inset listings
1937 \begin_layout Plain Layout
1942 \begin_layout Plain Layout
1947 \begin_layout Plain Layout
1949 TOFILE=`basename $2`
1952 \begin_layout Plain Layout
1954 cp $FROMFILE /home/you/pdf/$TOFILE
1959 Save it in your local LyX directory—say,
1960 \begin_inset Flex Code
1963 \begin_layout Plain Layout
1964 /home/you/.lyx/scripts/pdfcopier.sh
1969 —and make it executable, if you need to do so on your platform.
1971 \begin_inset Flex MenuItem
1974 \begin_layout Plain Layout
1975 Tools\SpecialChar \menuseparator
1981 dialog, select under
1982 \begin_inset Flex MenuItem
1985 \begin_layout Plain Layout
1986 File Handling\SpecialChar \menuseparator
1993 \begin_inset Flex MenuItem
1996 \begin_layout Plain Layout
2002 format—or one of the other pdf formats—and enter
2003 \begin_inset Flex Code
2006 \begin_layout Plain Layout
2007 pdfcopier.sh $$i $$o
2013 \begin_inset Flex MenuItem
2016 \begin_layout Plain Layout
2026 \begin_layout Standard
2027 Copiers are used by LyX in various of its own conversions.
2028 For example, if appropriate programs are found, LyX will automatically
2029 install copiers for the
2030 \begin_inset Flex MenuItem
2033 \begin_layout Plain Layout
2040 \begin_inset Flex MenuItem
2043 \begin_layout Plain Layout
2045 \begin_inset space ~
2054 When these formats are exported, the copier sees that not just the main
2055 HTML file but various associated files (style files, images, etc.) are also
2057 All these files are written to a subdirectory of the directory in which
2058 the original LyX file was found.
2062 \begin_layout Plain Layout
2063 This copier can be customized.
2065 \begin_inset Quotes eld
2069 \begin_inset Quotes erd
2072 argument takes a comma-separated list of extensions to be copied; if it
2073 is omitted, all files will be copied.
2075 \begin_inset Quotes eld
2079 \begin_inset Quotes erd
2082 argument determines the extension added to the generated directory.
2084 \begin_inset Quotes eld
2088 \begin_inset Flex MenuItem
2091 \begin_layout Plain Layout
2098 \begin_inset Quotes erd
2101 , so HTML generated from
2102 \begin_inset Flex MenuItem
2105 \begin_layout Plain Layout
2106 /path/to/filename.lyx
2112 \begin_inset Flex MenuItem
2115 \begin_layout Plain Layout
2116 /path/to/filename.html.LyXconv
2130 \begin_layout Section
2132 \begin_inset CommandInset label
2134 name "sec:Converters"
2141 \begin_layout Standard
2142 You can define your own Converters to convert files between different formats.
2144 \begin_inset Flex MenuItem
2147 \begin_layout Plain Layout
2148 Tools\SpecialChar \menuseparator
2149 Preferences\SpecialChar \menuseparator
2150 File Handling\SpecialChar \menuseparator
2159 \begin_layout Standard
2160 To define a new converter, select the
2161 \begin_inset Flex MenuItem
2164 \begin_layout Plain Layout
2166 \begin_inset space ~
2175 \begin_inset Flex MenuItem
2178 \begin_layout Plain Layout
2180 \begin_inset space ~
2188 from the drop-down lists, enter the command needed for the conversion,
2190 \begin_inset Flex MenuItem
2193 \begin_layout Plain Layout
2200 Several variables can be used in the definition of converters:
2203 \begin_layout Labeling
2204 \labelwidthstring 00.00.0000
2205 \begin_inset Flex Code
2208 \begin_layout Plain Layout
2214 The LyX system directory
2217 \begin_layout Labeling
2218 \labelwidthstring 00.00.0000
2219 \begin_inset Flex Code
2222 \begin_layout Plain Layout
2231 \begin_layout Labeling
2232 \labelwidthstring 00.00.0000
2233 \begin_inset Flex Code
2236 \begin_layout Plain Layout
2245 \begin_layout Labeling
2246 \labelwidthstring 00.00.0000
2247 \begin_inset Flex Code
2250 \begin_layout Plain Layout
2256 The base filename of the input file (i.
2257 \begin_inset space \thinspace{}
2260 g., without the extension)
2263 \begin_layout Labeling
2264 \labelwidthstring 00.00.0000
2265 \begin_inset Flex Code
2268 \begin_layout Plain Layout
2274 The path to the input file
2277 \begin_layout Labeling
2278 \labelwidthstring 00.00.0000
2279 \begin_inset Flex Code
2282 \begin_layout Plain Layout
2288 The path to the original input file (this is different from $$p when a
2289 chain of converters is called)
2292 \begin_layout Labeling
2293 \labelwidthstring 00.00.0000
2294 \begin_inset Flex Code
2297 \begin_layout Plain Layout
2303 The iconv name for the encoding of the document.
2306 \begin_layout Standard
2308 \begin_inset Flex MenuItem
2311 \begin_layout Plain Layout
2313 \begin_inset space ~
2321 field you can enter the following flags, separated by commas:
2324 \begin_layout Labeling
2325 \labelwidthstring 00.00.0000
2326 \begin_inset Flex Code
2329 \begin_layout Plain Layout
2335 This converter runs some form of LaTeX.
2336 This will make LyX's LaTeX error logs available.
2339 \begin_layout Labeling
2340 \labelwidthstring 00.00.0000
2341 \begin_inset Flex Code
2344 \begin_layout Plain Layout
2351 \begin_inset Flex MenuItem
2354 \begin_layout Plain Layout
2360 file for the conversion.
2363 \begin_layout Labeling
2364 \labelwidthstring 00.00.0000
2365 \begin_inset Flex Code
2368 \begin_layout Plain Layout
2375 \begin_inset Quotes eld
2379 \begin_inset Quotes erd
2382 file from the backend, which in practice means a LaTeX file like the one
2383 we would export, without
2384 \begin_inset Flex Code
2387 \begin_layout Plain Layout
2396 \begin_layout Labeling
2397 \labelwidthstring 00.00.0000
2398 \begin_inset Flex Code
2401 \begin_layout Plain Layout
2410 \begin_layout Standard
2411 The following three flags are not really flags at all because they take
2413 \begin_inset Flex MenuItem
2416 \begin_layout Plain Layout
2418 \begin_inset space ~
2422 \begin_inset space ~
2433 \begin_layout Labeling
2434 \labelwidthstring 00.00.0000
2435 \begin_inset Flex Code
2438 \begin_layout Plain Layout
2444 If set, the converter's standard error will be redirected to a file
2445 \begin_inset Flex Code
2448 \begin_layout Plain Layout
2454 , and the script given as argument will be run as:
2455 \begin_inset Flex Code
2458 \begin_layout Plain Layout
2459 script < infile.out > infile.log
2465 The argument may contain
2466 \begin_inset Flex Code
2469 \begin_layout Plain Layout
2478 \begin_layout Labeling
2479 \labelwidthstring 00.00.0000
2480 \begin_inset Flex Code
2483 \begin_layout Plain Layout
2489 The name of the directory in which the converter will dump the generated
2491 LyX will not create this directory, and it does not copy anything into
2492 it, though it will copy this directory to the destination.
2493 The argument may contain
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2503 , which will be replaced by the base name of the input and output files,
2504 respectively, when the directory is copied.
2505 \begin_inset Newline newline
2508 Note that resultdir and usetempdir make no sense together.
2509 The latter will be ignored if the former is given.
2512 \begin_layout Labeling
2513 \labelwidthstring 00.00.0000
2514 \begin_inset Flex Code
2517 \begin_layout Plain Layout
2523 Determines the output file name and may, contain
2524 \begin_inset Flex Code
2527 \begin_layout Plain Layout
2534 Sensible only with resultdir and optional even then; if not given, it defaults
2538 \begin_layout Standard
2539 None of these last three are presently used in any of the converters that
2540 are installed with LyX.
2544 \begin_layout Standard
2545 You do not have to define converters for all formats between which you want
2547 For example, you will note that there is no `LyX to PostScript' converter,
2548 but LyX will export PostScript.
2549 It does so by first creating a LaTeX file (no converter needs to be defined
2550 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2551 and finally converting the resulting DVI file to PostScript.
2552 LyX finds such `chains' of converters automatically, and it will always
2553 choose the shortest possible chain.
2554 You can, though, still define multiple conversion methods between file
2556 For example, the standard LyX configuration provides five ways to convert
2560 \begin_layout Enumerate
2562 \begin_inset Flex MenuItem
2565 \begin_layout Plain Layout
2574 \begin_layout Enumerate
2575 via (DVI and) PostScript, using
2576 \begin_inset Flex MenuItem
2579 \begin_layout Plain Layout
2588 \begin_layout Enumerate
2590 \begin_inset Flex MenuItem
2593 \begin_layout Plain Layout
2602 \begin_layout Enumerate
2604 \begin_inset Flex MenuItem
2607 \begin_layout Plain Layout
2616 \begin_layout Enumerate
2618 \begin_inset Flex MenuItem
2621 \begin_layout Plain Layout
2630 \begin_layout Standard
2631 To define such alternate chains, you must define multiple target `file formats',
2633 \begin_inset CommandInset ref
2635 reference "sec:Formats"
2640 For example, in the standard configuration, the formats named
2641 \begin_inset Flex MenuItem
2644 \begin_layout Plain Layout
2651 \begin_inset Flex MenuItem
2654 \begin_layout Plain Layout
2661 \begin_inset Flex MenuItem
2664 \begin_layout Plain Layout
2671 \begin_inset Flex MenuItem
2674 \begin_layout Plain Layout
2681 \begin_inset Flex MenuItem
2684 \begin_layout Plain Layout
2691 \begin_inset Flex MenuItem
2694 \begin_layout Plain Layout
2701 \begin_inset Flex MenuItem
2704 \begin_layout Plain Layout
2711 \begin_inset Flex MenuItem
2714 \begin_layout Plain Layout
2721 \begin_inset Flex MenuItem
2724 \begin_layout Plain Layout
2731 \begin_inset Flex MenuItem
2734 \begin_layout Plain Layout
2740 ) are defined, all of which share the extension
2741 \begin_inset Flex MenuItem
2744 \begin_layout Plain Layout
2750 , and which correspond to the conversion methods just mentioned.
2753 \begin_layout Chapter
2754 Internationalizing LyX
2755 \begin_inset CommandInset label
2757 name "cha:Internationalizing-LyX"
2764 \begin_layout Standard
2765 LyX supports using a translated interface.
2766 Last time we checked, LyX provided text in thirty languages.
2767 The language of choice is called your
2772 (For further reading on locale settings, see also the documentation for
2773 locale that comes with your operating system.
2774 For Linux, the manual page for
2775 \begin_inset Flex Code
2778 \begin_layout Plain Layout
2784 could be a good place to start).
2787 \begin_layout Standard
2788 Notice that these translations will work, but do contain a few flaws.
2789 In particular, all dialogs have been designed with the English text in
2790 mind, which means that some of the translated text will be too large to
2791 fit within the space allocated.
2792 This is only a display problem and will not cause any harm.
2793 Also, you will find that some of the translations do not define shortcut
2794 keys for everything.
2795 Sometimes, there are simply not enough free letters to do it.
2796 Other times, the translator just hasn't got around to doing it yet.
2797 Our localization team, which you may wish to join,
2801 \begin_layout Plain Layout
2802 If you are a fluent speaker of a language other than English, joining these
2803 teams is a great way to give back to the LyX community!
2808 will of course try to fix these shortcomings in future versions of LyX.
2811 \begin_layout Section
2815 \begin_layout Subsection
2816 Translating the graphical user interface (text messages).
2819 \begin_layout Standard
2821 \begin_inset Flex Code
2824 \begin_layout Plain Layout
2830 library to handle the internationalization of the interface.
2831 To have LyX speak your favorite language in all menus and dialogs, you
2833 \begin_inset Flex Code
2836 \begin_layout Plain Layout
2842 -file for that language.
2843 When this is available, you'll have to generate a
2844 \begin_inset Flex Code
2847 \begin_layout Plain Layout
2853 -file from it and install the
2854 \begin_inset Flex Code
2857 \begin_layout Plain Layout
2864 The process of doing all of this is explained in the documentation for
2866 \begin_inset Flex Code
2869 \begin_layout Plain Layout
2876 It is possible to do this just for yourself, but if you're going to do
2877 it, you might as well share the results of your labors with the rest of
2879 Send a message to the LyX developers' list for more information about how
2883 \begin_layout Standard
2884 In short, this is what you should do (xx denotes the language code):
2887 \begin_layout Itemize
2888 Check out the LyX source code.
2890 \begin_inset CommandInset href
2892 name "information on the web"
2893 target "http://www.lyx.org/HowToUseSVN"
2900 \begin_layout Itemize
2902 \begin_inset Flex Code
2905 \begin_layout Plain Layout
2911 to the folder of the
2912 \begin_inset Flex Code
2915 \begin_layout Plain Layout
2923 \begin_inset Flex Code
2926 \begin_layout Plain Layout
2934 \begin_inset Flex Code
2937 \begin_layout Plain Layout
2943 doesn't exist anywhere, it can be remade with the console command
2944 \begin_inset Flex Code
2947 \begin_layout Plain Layout
2953 in that directory, or you can use an existing po-file for some other language
2957 \begin_layout Itemize
2959 \begin_inset Flex Code
2962 \begin_layout Plain Layout
2972 \begin_layout Plain Layout
2973 This is just a text file, so it can be edited in any text editor.
2974 But there are also specialized programs that support such editing, such
2979 (for all platforms) or
2988 contains a `mode' for editing
2989 \begin_inset Flex Code
2992 \begin_layout Plain Layout
3003 For some menu- and widget-labels, there are also shortcut keys that should
3005 Those keys are marked after a `|', and should be translated according to
3006 the words and phrases of the language.
3007 You should also fill also out the information at the beginning of the new
3009 \begin_inset Flex Code
3012 \begin_layout Plain Layout
3018 -file with your email-address, etc., so people know where to reach you with
3019 suggestions and entertaining flames.
3022 \begin_layout Standard
3023 If you are just doing this on your own, then:
3026 \begin_layout Itemize
3028 \begin_inset Flex Code
3031 \begin_layout Plain Layout
3038 This can be done with
3039 \begin_inset Flex Code
3042 \begin_layout Plain Layout
3043 msgfmt -o xx.mo < xx.po
3051 \begin_layout Itemize
3053 \begin_inset Flex Code
3056 \begin_layout Plain Layout
3062 -file to your locale-tree, at the correct directory for application messages
3067 xx, and under the name
3068 \begin_inset Flex Code
3071 \begin_layout Plain Layout
3078 \begin_inset space \thinspace{}
3082 \begin_inset space \space{}
3086 \begin_inset Flex Code
3089 \begin_layout Plain Layout
3090 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3100 \begin_layout Standard
3101 As said, however, it would be best if the new
3102 \begin_inset Flex Code
3105 \begin_layout Plain Layout
3111 -file could be added to the LyX distribution, so others can use it.
3112 Adding it involves making additional changes to LyX.
3113 So send an email to the developers' mailing list if you're interested in
3117 \begin_layout Subsubsection
3121 \begin_layout Standard
3122 Sometimes it turns out that one English message needs to be translated into
3123 different messages in the target language.
3124 One example is the message
3125 \begin_inset Flex Code
3128 \begin_layout Plain Layout
3134 which has the German translation
3142 , depending upon exactly what the English
3143 \begin_inset Quotes eld
3147 \begin_inset Quotes erd
3152 \begin_inset Flex Code
3155 \begin_layout Plain Layout
3161 does not handle such ambiguous translations.
3162 Therefore you have to add some context information to the message: Instead
3164 \begin_inset Flex Code
3167 \begin_layout Plain Layout
3174 \begin_inset Flex Code
3177 \begin_layout Plain Layout
3178 To[[as in 'From format x to format y']]
3184 \begin_inset Flex Code
3187 \begin_layout Plain Layout
3188 To[[as in 'From page x to page y']].
3193 Now the two occurrences of
3194 \begin_inset Flex Code
3197 \begin_layout Plain Layout
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3213 and can be translated correctly to
3224 \begin_layout Standard
3225 Of course the context information needs to be stripped off the original
3226 message when no translation is used.
3227 Therefore you have to put it in double square brackets at the end of the
3228 message (see the example above).
3229 The translation mechanism of LyX ensures that everything in double square
3230 brackets at the end of messages is removed before displaying the message.
3233 \begin_layout Subsection
3234 Translating the documentation.
3237 \begin_layout Standard
3238 The online documentation (in the
3239 \begin_inset Flex MenuItem
3242 \begin_layout Plain Layout
3248 -menu) can (and should!) be translated.
3249 If there are translated versions of the documentation available
3253 \begin_layout Plain Layout
3254 As of March 2008, at least some of the documents have been translated into
3255 fourteen languages, with the Tutorial available in a few more.
3260 and the locale is set accordingly, these will be used automagically by
3262 LyX looks for translated versions as
3263 \begin_inset Flex Code
3266 \begin_layout Plain Layout
3267 LyXDir/doc/xx/DocName.lyx
3273 \begin_inset Flex Code
3276 \begin_layout Plain Layout
3282 is the code for the language currently in use.
3283 If there are no translated documents, the default English versions will
3285 Note that the translated versions must have the same filenames (
3286 \begin_inset Flex Code
3289 \begin_layout Plain Layout
3295 above) as the original.
3296 If you feel up to translating the documentation (an excellent way to proof-read
3297 the original documentation by the way!), there are a few things you should
3301 \begin_layout Itemize
3302 Check out the documentation translation web page at
3303 \begin_inset CommandInset href
3305 name "http://www.lyx.org/Translation"
3306 target "http://www.lyx.org/Translation"
3311 That way, you can find out which (if any) documents have already been translate
3312 d into your language.
3313 You can also find out who (if anyone) is organizing the effort to translate
3314 the documentation into your language.
3315 If no one is organizing the effort, please let us know that you're interested.
3318 \begin_layout Standard
3319 Once you get to actually translating, here's a few hints for you that may
3323 \begin_layout Itemize
3324 Join the documentation team! There is information on how to do that in
3325 \begin_inset Flex Code
3328 \begin_layout Plain Layout
3335 \begin_inset Flex MenuItem
3338 \begin_layout Plain Layout
3339 Help\SpecialChar \menuseparator
3345 ), which by the way is the first document you should translate.
3348 \begin_layout Itemize
3349 Learn the typographic conventions for the language you are translating to.
3350 Typography is an ancient art and over the centuries, a great variety of
3351 conventions have developed throughout different parts of the world.
3352 Also study the professional terminology amongst typographers in your country.
3353 Inventing your own terminology will only confuse the users.
3356 (Warning! Typography is addictive!)
3359 \begin_layout Itemize
3360 Make a copy of the document.
3361 This will be your working copy.
3362 You can use this as your personal translated help-file by placing it in
3364 \begin_inset Flex Code
3367 \begin_layout Plain Layout
3376 \begin_layout Itemize
3377 Sometimes the original document (from the LyX-team) will be updated.
3378 Use the source viewer at
3379 \begin_inset CommandInset href
3381 name "http://www.lyx.org/trac/timeline"
3382 target "http://www.lyx.org/trac/timeline"
3386 to see what has been changed.
3387 That way you can easily see which parts of the translated document need
3391 \begin_layout Standard
3392 If you ever find an error in the original document, fix it and notify the
3393 rest of the documentation team of the changes! (You didn't forget to join
3394 the documentation team, did you?)
3397 \begin_layout Standard
3398 \begin_inset Branch OutDated
3401 \begin_layout Section
3402 International Keyboard Support
3405 \begin_layout Standard
3408 [Editor's Note: The following section is by
3416 It needs to be fixed to conform to the new Documentation Style sheet and
3417 to make use of the new v1.0 features.
3418 The whole thing also needs to be merged with the section following it.-jw
3419 It may also be badly out of date.-rh (2008)]
3422 \begin_layout Subsection
3423 Defining Own Keymaps: Keymap File Format
3426 \begin_layout Standard
3427 Let's look at a keyboard definition file a little closer.
3428 It is a plain text file defining
3431 \begin_layout Itemize
3432 key-to-key or key-to-string translations
3435 \begin_layout Itemize
3439 \begin_layout Itemize
3440 dead keys exceptions
3443 \begin_layout Standard
3444 To define key-to-key or key-to-string translation, use this command:
3447 \begin_layout Quotation
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3472 \begin_layout Standard
3474 \begin_inset Flex Code
3477 \begin_layout Plain Layout
3483 is the key to be translated and
3484 \begin_inset Flex Code
3487 \begin_layout Plain Layout
3493 is the string to be inserted into the document.
3494 To define dead keys, use:
3497 \begin_layout Quotation
3498 \begin_inset Flex Code
3501 \begin_layout Plain Layout
3510 \begin_inset Flex Code
3513 \begin_layout Plain Layout
3522 \begin_layout Standard
3524 \begin_inset Flex Code
3527 \begin_layout Plain Layout
3533 is a keyboard key and
3534 \begin_inset Flex Code
3537 \begin_layout Plain Layout
3544 The following dead keys are supported (shortcut name is in parentheses):
3547 \begin_layout Quotation
3551 \begin_inset space \hfill{}
3557 \begin_layout Quotation
3559 \begin_inset space \hfill{}
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3589 \begin_layout Quotation
3591 \begin_inset space \hfill{}
3598 \begin_layout Plain Layout
3610 \begin_layout Quotation
3612 \begin_inset space \hfill{}
3618 \begin_layout Quotation
3620 \begin_inset space \hfill{}
3627 \begin_layout Plain Layout
3639 \begin_layout Quotation
3641 \begin_inset space \hfill{}
3647 \begin_layout Quotation
3649 \begin_inset space \hfill{}
3655 \begin_layout Quotation
3657 \begin_inset space \hfill{}
3664 \begin_layout Plain Layout
3676 \begin_layout Quotation
3678 \begin_inset space \hfill{}
3685 \begin_layout Plain Layout
3697 \begin_layout Quotation
3699 \begin_inset space \hfill{}
3705 \begin_layout Quotation
3706 hungarian umlaut (hug)
3707 \begin_inset space \hfill{}
3713 \begin_layout Quotation
3715 \begin_inset space \hfill{}
3721 \begin_layout Quotation
3723 \begin_inset space \hfill{}
3730 \begin_layout Plain Layout
3742 \begin_layout Standard
3743 Since in many international keyboards there are exceptions to what some
3744 dead keys should do, you can define them using
3747 \begin_layout Quotation
3748 \begin_inset Flex Code
3751 \begin_layout Plain Layout
3759 deadkey key outstring
3762 \begin_layout Standard
3763 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3767 \begin_layout Quotation
3768 \begin_inset Flex Code
3771 \begin_layout Plain Layout
3784 \begin_layout Standard
3785 to make it work correctly.
3786 Also, you have to define as exceptions dead keys over i and j, to remove
3787 the dot from them before inserting an accent mark.
3788 I will change this when the time comes, but so far I haven't had time.
3791 \begin_layout Standard
3792 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3795 \begin_inset Flex Code
3798 \begin_layout Plain Layout
3804 have different meaning.
3806 \begin_inset Flex Code
3809 \begin_layout Plain Layout
3815 marks comments, quotes start and end LaTeX-style commands.
3816 To enter quote, you'll need to use
3817 \begin_inset Flex Code
3820 \begin_layout Plain Layout
3829 \begin_inset Flex Code
3832 \begin_layout Plain Layout
3839 \begin_inset Flex Code
3842 \begin_layout Plain Layout
3853 \begin_layout Standard
3854 If you make a keyboard description file that works for your language, please
3855 mail it to me, so I can include it in the next keymap distribution.
3858 \begin_layout Standard
3859 More keywords will be supported in keymap configuration file in future,
3863 \begin_layout Itemize
3864 \begin_inset Flex Code
3867 \begin_layout Plain Layout
3878 \begin_inset space \hfill{}
3882 \begin_inset Flex Code
3885 \begin_layout Plain Layout
3894 \begin_layout Itemize
3895 \begin_inset Flex Code
3898 \begin_layout Plain Layout
3909 \begin_inset space \hfill{}
3913 \begin_inset Flex Code
3916 \begin_layout Plain Layout
3922 an external keymap translation program
3925 \begin_layout Standard
3926 Also, it should look into
3927 \begin_inset Flex Code
3930 \begin_layout Plain Layout
3936 file for defaults, too (for example, a
3937 \begin_inset Flex Code
3940 \begin_layout Plain Layout
3948 option to include default keyboard).
3956 \begin_layout Section
3957 International Keymap Stuff
3958 \begin_inset CommandInset label
3960 name "sec:International-Keymap-Stuff"
3967 \begin_layout Standard
3968 \begin_inset Note Note
3971 \begin_layout Plain Layout
3972 In doing the revisions on this document in March 2008, I did not look over
3973 this stuff, as I do not understand it.
3974 It would be good if someone else could do so.
3983 \begin_layout Standard
3984 The next two sections describe the
3985 \begin_inset Flex Code
3988 \begin_layout Plain Layout
3997 \begin_inset Flex Code
4000 \begin_layout Plain Layout
4008 file syntax in detail.
4009 These sections should help you design your own key map if the ones provided
4010 do not meet your needs.
4013 \begin_layout Subsection
4017 \begin_layout Standard
4021 \begin_inset Flex Code
4024 \begin_layout Plain Layout
4030 file maps keystrokes to characters or strings.
4031 As the name suggests, it sets a keyboard mapping.
4033 \begin_inset Flex Code
4036 \begin_layout Plain Layout
4047 \begin_inset Flex Code
4050 \begin_layout Plain Layout
4065 \begin_inset Flex Code
4068 \begin_layout Plain Layout
4081 \begin_inset Flex Code
4084 \begin_layout Plain Layout
4093 \begin_inset Flex Code
4096 \begin_layout Plain Layout
4104 are described in this section.
4107 \begin_layout Labeling
4108 \labelwidthstring 00.00.0000
4109 \begin_inset Flex Code
4112 \begin_layout Plain Layout
4120 Map a character to a string
4123 \begin_layout LyX-Code
4138 \begin_layout Standard
4171 the double-quote (")
4188 must be escaped with a preceding backslash (
4199 \begin_layout Standard
4201 \begin_inset Flex MenuItem
4204 \begin_layout Plain Layout
4212 statement to cause the symbol
4213 \begin_inset Flex MenuItem
4216 \begin_layout Plain Layout
4224 to be output for the keystroke
4225 \begin_inset Flex MenuItem
4228 \begin_layout Plain Layout
4239 \begin_layout LyX-Code
4245 \begin_layout Labeling
4246 \labelwidthstring 00.00.0000
4247 \begin_inset Flex Code
4250 \begin_layout Plain Layout
4258 Specify an accent character
4261 \begin_layout LyX-Code
4270 \begin_layout Standard
4271 This will make the cha
4309 This is the dead key
4313 \begin_layout Plain Layout
4320 refers to a key that does not produce a character by itself, but when followed
4321 with another key, produces the desired accent character.
4322 For example, a German characte
4324 r with an umlaut like
4334 can be produced in this manner.
4343 \begin_layout Standard
4356 and then another key not in
4373 followed by the other, not allowed key, as output.
4377 \begin_inset Flex MenuItem
4380 \begin_layout Plain Layout
4388 cancels a dead key, so if
4399 \begin_inset Flex MenuItem
4402 \begin_layout Plain Layout
4411 , the cursor will not go one position backwards but will instead cancel
4427 might have had on the next keystroke.
4431 \begin_layout Standard
4432 The following example specifies that the character ' is to be an acute accent,
4433 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4436 \begin_layout LyX-Code
4439 kmod ' acute aeiouAEIOU
4442 \begin_layout Labeling
4443 \labelwidthstring 00.00.0000
4444 \begin_inset Flex Code
4447 \begin_layout Plain Layout
4453 Specify an exception to the accent character
4456 \begin_layout LyX-Code
4465 \begin_layout Standard
4466 This defines an exce
4507 have been assigned a keystroke with a previous
4510 \begin_inset Flex Code
4513 \begin_layout Plain Layout
4537 must not belong in the
4584 If such a declaration does not exist in
4592 \begin_inset Flex Code
4595 \begin_layout Plain Layout
4629 \begin_inset Flex Code
4632 \begin_layout Plain Layout
4646 \begin_layout Standard
4647 The following command produces causes äi to be produced when you enter acute-i
4651 \begin_layout LyX-Code
4665 \begin_layout Labeling
4666 \labelwidthstring 00.00.0000
4667 \begin_inset Flex Code
4670 \begin_layout Plain Layout
4676 Combine two accent characters
4679 \begin_layout LyX-Code
4685 accent1 accent2 allowed
4688 \begin_layout Standard
4689 This one is getting pretty esoteric.
4690 It allows you to combine the effect
4746 \begin_inset Flex Code
4749 \begin_layout Plain Layout
4777 \begin_layout Standard
4778 Consider this example from the
4779 \begin_inset Flex Code
4782 \begin_layout Plain Layout
4793 \begin_layout LyX-Code
4796 kmod ; acute aeioyvhAEIOYVH
4800 kcomb acute umlaut iyIY
4803 \begin_layout Standard
4804 This allows you to press
4805 \begin_inset Flex MenuItem
4808 \begin_layout Plain Layout
4816 and get the effect of
4817 \begin_inset Flex Code
4820 \begin_layout Plain Layout
4839 in this case cancels the last dead key, so if you press
4840 \begin_inset Flex MenuItem
4843 \begin_layout Plain Layout
4852 \begin_inset Flex Code
4855 \begin_layout Plain Layout
4868 \begin_layout Subsection
4872 \begin_layout Standard
4874 \begin_inset Flex Code
4877 \begin_layout Plain Layout
4885 mapping is performed, a
4886 \begin_inset Flex Code
4889 \begin_layout Plain Layout
4899 file maps the strings that the symbols generate to characters in the current
4901 The LyX distribution currently includes at least the
4902 \begin_inset Flex Code
4905 \begin_layout Plain Layout
4914 \begin_inset Flex Code
4917 \begin_layout Plain Layout
4928 \begin_layout Standard
4930 \begin_inset Flex Code
4933 \begin_layout Plain Layout
4941 file is a sequence of declarations of the form
4944 \begin_layout LyX-Code
4957 \begin_layout Standard
4958 For example, in order to map
4959 \begin_inset Flex MenuItem
4962 \begin_layout Plain Layout
4972 to the corresponding character in the iso-8859-1 set (233), the following
4976 \begin_layout LyX-Code
4984 \begin_layout Standard
4986 \begin_inset Flex Code
4989 \begin_layout Plain Layout
4998 \begin_inset Flex Code
5001 \begin_layout Plain Layout
5019 the same character can apply to more than one string.
5021 \begin_inset Flex Code
5024 \begin_layout Plain Layout
5035 \begin_layout LyX-Code
5047 \begin_inset Newline newline
5063 \begin_layout Standard
5064 If LyX cannot find a mapping for the string produced by the keystroke or
5065 a deadkey sequence, it will check if it looks like an accented char and
5066 try to draw an accent over the character on screen.
5069 \begin_layout Subsection
5073 \begin_layout Standard
5074 There is a second way to add support for international characters through
5075 so-called dead-keys.
5076 A dead-key works in combination with a letter to produce an accented character.
5077 Here, we'll explain how to create a really simple dead-key to illustrate
5081 \begin_layout Standard
5082 Suppose you happen to need the circumflex character,
5083 \begin_inset Quotes eld
5087 \begin_inset Quotes erd
5092 \begin_inset Flex MenuItem
5095 \begin_layout Plain Layout
5102 \begin_inset space ~
5106 \begin_inset Flex MenuItem
5109 \begin_layout Plain Layout
5115 ] to the LyX command
5116 \begin_inset Flex Code
5119 \begin_layout Plain Layout
5126 \begin_inset Flex Code
5129 \begin_layout Plain Layout
5136 Now, whenever you type the
5137 \begin_inset Flex MenuItem
5140 \begin_layout Plain Layout
5146 -key followed by a letter, that letter will have a circumflex accent on
5148 For example, the sequence
5149 \begin_inset Quotes eld
5153 \begin_inset Flex MenuItem
5156 \begin_layout Plain Layout
5163 \begin_inset Quotes erd
5166 produces the letter:
5167 \begin_inset Quotes eld
5171 \begin_inset Quotes erd
5175 If you tried to type
5176 \begin_inset Quotes eld
5180 \begin_inset Flex MenuItem
5183 \begin_layout Plain Layout
5190 \begin_inset Quotes erd
5193 , however, LyX will complain with a beep, since a
5194 \begin_inset Quotes eld
5198 \begin_inset Flex MenuItem
5201 \begin_layout Plain Layout
5208 \begin_inset Quotes erd
5211 never takes a circumflex accent.
5213 \begin_inset Flex MenuItem
5216 \begin_layout Plain Layout
5222 after a dead-key produces the bare-accent.
5223 Please note this last point! If you bind a key to a dead-key, you'll need
5224 to rebind the character on that key to yet another key.
5226 \begin_inset Flex MenuItem
5229 \begin_layout Plain Layout
5235 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5238 \begin_layout Standard
5239 One common way to bind dead-keys is to use
5240 \begin_inset Flex MenuItem
5243 \begin_layout Plain Layout
5250 \begin_inset Flex MenuItem
5253 \begin_layout Plain Layout
5260 \begin_inset Flex MenuItem
5263 \begin_layout Plain Layout
5269 in combination with an accent, like
5270 \begin_inset Quotes eld
5274 \begin_inset Flex MenuItem
5277 \begin_layout Plain Layout
5284 \begin_inset Quotes erd
5288 \begin_inset Quotes eld
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5302 \begin_inset Quotes erd
5306 \begin_inset Quotes eld
5310 \begin_inset Flex MenuItem
5313 \begin_layout Plain Layout
5320 \begin_inset Quotes erd
5324 Another way involves using
5325 \begin_inset Flex Code
5328 \begin_layout Plain Layout
5335 \begin_inset Flex Code
5338 \begin_layout Plain Layout
5344 to set up the special
5345 \begin_inset Flex Code
5348 \begin_layout Plain Layout
5356 \begin_inset Flex Code
5359 \begin_layout Plain Layout
5365 acts in some ways just like
5366 \begin_inset Flex MenuItem
5369 \begin_layout Plain Layout
5375 and permits you to bind keys to accented characters.
5376 You can also turn keys into dead-keys by binding them to something like
5378 \begin_inset Flex Code
5381 \begin_layout Plain Layout
5387 and then binding this symbolic key to the corresponding LyX command.
5391 \begin_layout Plain Layout
5396 : This is exactly what I do in my
5397 \begin_inset Flex Code
5400 \begin_layout Plain Layout
5407 \begin_inset Flex Code
5410 \begin_layout Plain Layout
5418 \begin_inset Flex MenuItem
5421 \begin_layout Plain Layout
5423 \begin_inset space ~
5432 \begin_inset Flex Code
5435 \begin_layout Plain Layout
5441 and a bunch of these
5442 \begin_inset Quotes eld
5446 \begin_inset Flex Code
5449 \begin_layout Plain Layout
5456 \begin_inset Quotes erd
5459 symbolic keys bound such things as
5460 \begin_inset Flex MenuItem
5463 \begin_layout Plain Layout
5465 \begin_inset space ~
5474 \begin_inset Flex MenuItem
5477 \begin_layout Plain Layout
5479 \begin_inset space ~
5488 This is how I produce my accented characters.
5493 You can make just about anything into the
5494 \begin_inset Flex Code
5497 \begin_layout Plain Layout
5504 \begin_inset Flex MenuItem
5507 \begin_layout Plain Layout
5513 keys, a spare function key, etc.
5514 As for the LyX commands that produce accents, check the entry for
5515 \begin_inset Flex Code
5518 \begin_layout Plain Layout
5529 You'll find the complete list there.
5532 \begin_layout Subsection
5533 Saving your Language Configuration
5536 \begin_layout Standard
5537 You can edit your preferences so that your desired language environment
5538 is automatically configured when LyX starts up, via the
5539 \begin_inset Flex MenuItem
5542 \begin_layout Plain Layout
5543 Edit\SpecialChar \menuseparator
5552 \begin_layout Chapter
5553 Installing New Document Classes, Layouts, and Templates
5554 \begin_inset CommandInset label
5556 name "cha:Installing-New-Document"
5561 \begin_inset Argument 1
5564 \begin_layout Plain Layout
5565 Installing New Document Classes
5573 \begin_layout Standard
5574 In this chapter, we describe the procedures for creating and installing
5575 new LyX layout and template files, as well as offer a refresher on correctly
5576 installing new LaTeX document classes.
5580 \begin_layout Standard
5581 First, let us a say a few words about how one ought to think about the relation
5582 between LyX and LaTeX.
5583 The thing to understand is that, in a certain sense, LyX doesn't know anything
5585 Indeed, from LyX's point of view, LaTeX is just one of several
5586 \begin_inset Quotes eld
5590 \begin_inset Quotes erd
5593 in which it is capable of producing output.
5594 Other such formats are DocBook, plaintext, and XHTML.
5595 LaTeX is, of course, a particularly important format, but very little of
5596 the information LyX has about LaTeX is actually contained in the program
5601 \begin_layout Plain Layout
5602 Some commands are sufficiently complex that they are
5603 \begin_inset Quotes eld
5607 \begin_inset Quotes erd
5611 But the developers generally regard this as a Bad Thing.
5616 Rather, that information, even for the standard classes like
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5626 , is contained in `layout files'.
5627 Similarly, LyX itself does not know much about DocBook or XHTML.
5628 What it knows is contained in layout files.
5631 \begin_layout Standard
5632 You can think of the layout file for a given document class as a translation
5633 manual between LyX constructs---paragraphs with their corresponding styles,
5634 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5636 Almost everything LyX knows about
5637 \begin_inset Flex Code
5640 \begin_layout Plain Layout
5646 , for example, is contained in the file
5647 \begin_inset Flex Code
5650 \begin_layout Plain Layout
5656 and in various other files it includes.
5657 For this reason, anyone intending to write layout files should plan to
5658 study the existing files.
5659 A good place to start is with
5660 \begin_inset Flex Code
5663 \begin_layout Plain Layout
5669 , which is included in
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5680 \begin_inset Flex Code
5683 \begin_layout Plain Layout
5689 , and many of the other layout files for document classes.
5690 This file is where sections and the like are defined:
5691 \begin_inset Flex Code
5694 \begin_layout Plain Layout
5700 tells LyX how paragraphs that are marked with the Section, Subsection,
5701 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5704 \begin_inset Flex Code
5707 \begin_layout Plain Layout
5713 file basically just includes several of these
5714 \begin_inset Flex Code
5717 \begin_layout Plain Layout
5726 \begin_layout Standard
5727 Defining the LyX--LaTeX correspondence is not the only thing layout files
5729 Their other job is to define how the LyX constructs themselves will appear
5731 The fact that layout files have these two jobs is often a source of confusion,
5732 because they are completely separate.
5733 Telling LyX how to translate a certain paragraph style into LaTeX does
5734 not tell LyX how to display it; conversely, telling LyX how to display
5735 a certain paragraph style does not tell LyX how to translate it into LaTeX
5736 (let alone tell LaTeX how to display it).
5737 So, in general, when you define a new LyX construct, you must always do
5738 two quite separate things: (i)
5739 \begin_inset space ~
5742 tell LyX how to translate it into LaTeX and (ii)
5743 \begin_inset space ~
5746 tell LyX how to display it.
5749 \begin_layout Standard
5750 Much the same is true, of course, as regards LyX's other backend formats,
5751 though XHTML is in some ways different, because in that case LyX
5755 able, to some extent, to use information about how it should display a
5756 paragraph on the screen to output information (in the form of CSS) about
5757 how the paragraph should be displayed in a browser.
5758 Even in this case, however, the distinction between what LyX does internally
5759 and how things are rendered externally remains in force, and the two can
5760 be controlled separately.
5762 \begin_inset CommandInset ref
5764 reference "sec:Tags-for-XHTML"
5771 \begin_layout Section
5772 Installing new LaTeX files
5775 \begin_layout Standard
5776 Some installations may not include a LaTeX package or class file that you
5777 would like to use within LyX.
5778 For example, you might need FoilTeX, a package for preparing slides for
5779 overhead projectors.
5780 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5781 a user interface for installing such packages.
5782 For example, with MiKTeX, you start the program
5783 \begin_inset Quotes eld
5787 \begin_inset space ~
5791 \begin_inset Quotes erd
5794 to get a list of available packages.
5795 To install one of them, right click on it or use the corresponding toolbar
5799 \begin_layout Standard
5800 If your LaTeX distribution does not provide such a `package manager', or
5801 if the package is not available from your distribution, then follow these
5802 steps to install it manually:
5805 \begin_layout Enumerate
5806 Get the package from
5807 \begin_inset CommandInset href
5810 target "http://www.ctan.org/"
5817 \begin_layout Enumerate
5818 If the package contains a file with the ending
5819 \begin_inset Quotes eld
5823 \begin_inset Flex Code
5826 \begin_layout Plain Layout
5833 \begin_inset Quotes erd
5836 (is the case for FoilTeX) then open a console, change to the folder of
5837 this file and execute the command
5838 \begin_inset Flex Code
5841 \begin_layout Plain Layout
5848 You have now unpacked the package and have all files to install it.
5849 Most LaTeX-packages are not packed and you can skip this step.
5852 \begin_layout Enumerate
5853 Now you need to decide if the package should be available for all users
5855 \begin_inset Separator parbreak
5862 \begin_layout Enumerate
5863 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5864 for all users on your system, then install it in your `local' TeX tree,
5865 otherwise install it in your own `user' TeX tree.
5866 Where these trees should be created, if they do not already exist, depends
5868 To find this out, look in the file
5869 \begin_inset Flex Code
5872 \begin_layout Plain Layout
5882 \begin_layout Plain Layout
5883 This is usually in the directory
5884 \begin_inset Flex Code
5887 \begin_layout Plain Layout
5893 , though you can execute the command
5894 \begin_inset Flex Code
5897 \begin_layout Plain Layout
5908 The location of the `local' TeX tree is defined by the
5909 \begin_inset Flex Code
5912 \begin_layout Plain Layout
5918 variable; this is usually somewhere like
5919 \begin_inset Flex Code
5922 \begin_layout Plain Layout
5923 /usr/local/share/texmf
5929 The location of the `user' TeX tree is defined by
5930 \begin_inset Flex Code
5933 \begin_layout Plain Layout
5940 \begin_inset Flex Code
5943 \begin_layout Plain Layout
5950 (If these variables are not predefined, you have to define them.) You'll
5951 probably need root permissions to create or modify the `local' tree, but
5952 not for your `user' tree.
5953 \begin_inset Newline newline
5956 In general, it is recommended to install in the user tree because your user
5957 will not be modified or even overwritten when you upgrade your system.
5958 It will typically also be backed up together with everything else when
5959 you backup your home directory (which, of course, you do on a regular basis).
5962 \begin_layout Enumerate
5963 On Windows, if you want the new package to be available for all users on
5964 your system, change to the folder where LaTeX is installed and then change
5966 \begin_inset Flex Code
5969 \begin_layout Plain Layout
5980 (For MiKTeX, this would be by default the folder
5981 \begin_inset Flex Code
5984 \begin_layout Plain Layout
6002 \begin_layout Plain Layout
6003 Note that this will be the correct path only on English installations.
6004 On a German one, it would be
6005 \begin_inset Flex Code
6008 \begin_layout Plain Layout
6022 , and similarly for other languages.
6027 Create there a new folder
6028 \begin_inset Flex Code
6031 \begin_layout Plain Layout
6037 and copy all files of the package into it.
6039 \begin_inset Newline newline
6042 If the package should only available for you or you don't have admin permissions
6043 , do the same, but in the local LaTeX folder.
6045 \begin_inset space \thinspace{}
6049 \begin_inset space ~
6052 2.8 under Windows XP, this would be the folder:
6053 \begin_inset Newline newline
6059 \begin_inset Flex Code
6062 \begin_layout Plain Layout
6065 Documents and Settings
6077 \begin_inset Newline newline
6083 \begin_inset Phantom HPhantom
6086 \begin_layout Plain Layout
6097 \begin_inset Flex Code
6100 \begin_layout Plain Layout
6113 \begin_inset Newline newline
6116 On Vista, it would be:
6117 \begin_inset Newline newline
6121 \begin_inset Flex Code
6124 \begin_layout Plain Layout
6150 \begin_layout Enumerate
6151 Now one only need to tell LaTeX that there are new files.
6152 This depends on the used LaTeX-Distribution:
6153 \begin_inset Separator parbreak
6160 \begin_layout Enumerate
6161 For TeXLive execute the command
6162 \begin_inset Flex Code
6165 \begin_layout Plain Layout
6172 If you installed the package for all users, then you will probably need
6173 to have root permissions for that.
6176 \begin_layout Enumerate
6177 For MiKTeX, if you have installed the package for all users, start the program
6179 \begin_inset Quotes eld
6183 \begin_inset space ~
6187 \begin_inset Quotes erd
6190 and press the button marked
6191 \begin_inset Quotes eld
6195 \begin_inset Quotes erd
6199 Otherwise start the program
6200 \begin_inset Quotes eld
6204 \begin_inset Quotes erd
6211 \begin_layout Enumerate
6212 Finally, you need to tell LyX that there are new packages available.
6213 So, in LyX, use the menu
6214 \begin_inset Flex MenuItem
6217 \begin_layout Plain Layout
6220 \SpecialChar \menuseparator
6226 and then restart LyX.
6229 \begin_layout Standard
6230 Now the package is installed.
6231 In our example, the document class
6232 \begin_inset Flex Code
6235 \begin_layout Plain Layout
6237 \begin_inset space ~
6244 \begin_layout Plain Layout
6256 will now be available under
6257 \begin_inset Flex MenuItem
6260 \begin_layout Plain Layout
6261 Document\SpecialChar \menuseparator
6262 Settings\SpecialChar \menuseparator
6272 \begin_layout Standard
6273 If you would like to use a LaTeX document class that is not even listed
6275 \begin_inset Flex MenuItem
6278 \begin_layout Plain Layout
6279 Document\SpecialChar \menuseparator
6280 Settings\SpecialChar \menuseparator
6286 , then you need to create a `layout' file for it.
6287 That is the topic of the next section.
6290 \begin_layout Section
6291 Types of layout files
6294 \begin_layout Standard
6295 This section describes the various sorts of LyX files that contain layout
6297 These files describe various paragraph and character styles, determining
6298 how LyX should display them and how they should be translated into LaTeX,
6299 DocBook, XHTML, or whatever output format is being used.
6303 \begin_layout Standard
6304 We shall try to provide a thorough description of the process of writing
6306 However, there are so many different types of documents supported even
6307 by just LaTeX that we can't hope to cover every different possibility or
6308 problem you might encounter.
6309 The LyX users' list is frequented by people with lots of experience with
6310 layout design who are willing to share what they've learned, so please
6311 feel free to ask questions there.
6314 \begin_layout Standard
6315 As you prepare to write a new layout, it is extremely helpful to look at
6316 the layouts distributed with LyX.
6317 If you write a LyX layout for a LaTeX document class that might also be
6318 used by others, or write a module that might be useful to others, then
6319 you should consider posting your layout to the
6320 \begin_inset CommandInset href
6322 name "layout section on the LyX wiki"
6323 target "http://wiki.lyx.org/Layouts/Layouts"
6327 or even to the LyX developers' list, so that it might be included in LyX
6332 \begin_layout Plain Layout
6333 Note that LyX is licensed under the General Public License, so any material
6334 that is contributed to LyX must be similarly licensed.
6342 \begin_layout Subsection
6344 \begin_inset CommandInset label
6346 name "sub:Layout-modules"
6353 \begin_layout Standard
6354 We have spoken to this point about `layout files'.
6355 But there are different sorts of files that contain layout information.
6356 Layout files, strictly so called, have the
6357 \begin_inset Flex Code
6360 \begin_layout Plain Layout
6366 extension and provide LyX with information about document classes.
6367 Since LyX 1.6 layout information can also be contained in layout
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6382 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6383 some modules—such as the
6384 \begin_inset Flex Code
6387 \begin_layout Plain Layout
6393 module—specifically provide support for one package.
6394 In a sense, layout modules are similar to included
6398 \begin_layout Plain Layout
6399 These can have any extension, but by convention have the
6400 \begin_inset Flex Code
6403 \begin_layout Plain Layout
6415 \begin_inset Flex Code
6418 \begin_layout Plain Layout
6424 —in that modules are not specific to a given document class but may be used
6425 with many different classes.
6426 The difference is that using an included file with
6427 \begin_inset Flex Code
6430 \begin_layout Plain Layout
6436 requires editing that file.
6437 Modules, by contrast, are selected in the
6438 \begin_inset Flex MenuItem
6441 \begin_layout Plain Layout
6442 Document\SpecialChar \menuseparator
6451 \begin_layout Standard
6452 Building modules is the easiest way to get started with layout editing,
6453 since it can be as simple as adding a single new paragraph style or flex
6455 But modules may, in principle, contain anything a layout file can contain.
6458 \begin_layout Standard
6459 After creating a new module and copying it to the
6460 \begin_inset Flex Code
6463 \begin_layout Plain Layout
6469 folder, you will need to reconfigure and then restart LyX for the module
6470 to appear in the menu.
6471 However, changes you make to the module will be seen immediately, if you
6473 \begin_inset Flex MenuItem
6476 \begin_layout Plain Layout
6477 Document\SpecialChar \menuseparator
6483 , highlight something, and then hit
6484 \begin_inset Quotes eld
6488 \begin_inset Quotes erd
6494 It is strongly recommended that you save your work before doing this
6499 it is strongly recommended that you not attempt to edit modules while simultaneo
6500 usly working on actual documents
6503 Though of course the developers strive to keep LyX stable in such situations,
6504 syntax errors and the like in your module file could cause strange behavior.
6507 \begin_layout Subsubsection
6511 \begin_layout Standard
6512 Modules are to LyX as packages are to LaTeX.
6513 Sometimes, however, you find yourself wanting a specific inset or character
6514 style just for one document and writing a module that will also be available
6515 to other documents makes little sense.
6516 What you need is LyX's
6517 \begin_inset Quotes eld
6521 \begin_inset Quotes erd
6527 \begin_layout Standard
6528 You will find it under
6530 Document\SpecialChar \menuseparator
6531 Settings\SpecialChar \menuseparator
6535 The large text box allows you to enter anything that you might enter in
6536 a layout file or module.
6537 You can think of a document's local layout, in fact, as a module that belongs
6539 So, in particular, you must enter a
6540 \begin_inset Flex Code
6543 \begin_layout Plain Layout
6550 Any format is acceptable, but one would normally use the format current
6552 (In LyX 2.1, the current layout format is 48.) You should be aware that local
6553 layout is not supported by versions of LyX prior to 1.6, so you should not
6554 use it if you want to be able to export your document to LyX 1.5 or earlier
6555 (without, that is, losing the local layout information).
6556 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6557 though there is no UI for it---then you should use format 11 and, of course,
6558 use only layout constructs that were available in LyX 1.6.
6561 \begin_layout Standard
6562 When you have entered something in the
6563 \begin_inset Flex Code
6566 \begin_layout Plain Layout
6572 pane, LyX will enable the
6573 \begin_inset Quotes eld
6577 \begin_inset Quotes erd
6580 button at the bottom.
6581 Clicking this button will cause LyX to determine whether what you have
6582 entered is valid layout information for the chosen format.
6583 LyX will report the result but, unfortunately, will not tell you what errors
6584 there might have been.
6585 These will be written to the terminal, however, if LyX is started from
6587 You will not be permitted to save your local layout until you have entered
6591 \begin_layout Standard
6592 The warnings at the end of the previous section apply here, too.
6593 Do not play with local layout while you are actually working, especially
6594 if you have not saved your document.
6595 That said, using local layout with a test document can be a very convenient
6596 way to try out layout ideas, or even to start developing a module.
6599 \begin_layout Subsection
6601 \begin_inset Flex MenuItem
6604 \begin_layout Plain Layout
6613 \begin_layout Standard
6614 There are two situations you are likely to encounter when wanting to support
6615 a new LaTeX document class, involving style (
6616 \begin_inset Flex Code
6619 \begin_layout Plain Layout
6625 ) files and LaTeX2e class (
6626 \begin_inset Flex Code
6629 \begin_layout Plain Layout
6636 Supporting a style file is usually fairly easy.
6637 Supporting a new class file is a bit harder.
6638 We'll discuss the former in this section and the latter in the next.
6639 Similar remarks apply, of course, if you want to support a new DocBook
6643 \begin_layout Standard
6644 The easier case is the one in which your new document class is provided
6645 as a style file that is to be used in conjunction with an already supported
6647 For the sake of the example, we'll assume that the style file is called
6649 \begin_inset Flex MenuItem
6652 \begin_layout Plain Layout
6658 and that it is meant to be used with
6659 \begin_inset Flex MenuItem
6662 \begin_layout Plain Layout
6668 , which is a standard class.
6672 \begin_layout Standard
6673 Start by copying the existing class's layout file into your local directory:
6677 \begin_layout Plain Layout
6678 Of course, which directory is your local directory will vary by platform,
6679 and LyX allows you to specify your local directory on startup, too, using
6681 \begin_inset Flex Code
6684 \begin_layout Plain Layout
6698 \begin_layout LyX-Code
6699 cp report.layout ~/.lyx/layouts/myclass.layout
6702 \begin_layout Standard
6704 \begin_inset Flex Code
6707 \begin_layout Plain Layout
6713 and change the line:
6716 \begin_layout LyX-Code
6719 DeclareLaTeXClass{report}
6722 \begin_layout Standard
6726 \begin_layout LyX-Code
6729 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6732 \begin_layout Standard
6736 \begin_layout LyX-Code
6738 \begin_inset Newline newline
6744 \begin_inset Newline newline
6750 \begin_layout Standard
6751 near the top of the file.
6754 \begin_layout Standard
6755 Start LyX and select
6756 \begin_inset Flex MenuItem
6759 \begin_layout Plain Layout
6760 Tools\SpecialChar \menuseparator
6767 Then restart LyX and try creating a new document.
6769 \begin_inset Flex MenuItem
6772 \begin_layout Plain Layout
6778 " as a document class option in the
6779 \begin_inset Flex MenuItem
6782 \begin_layout Plain Layout
6783 Document\SpecialChar \menuseparator
6790 It is likely that some of the sectioning commands and such in your new
6791 class will work differently from how they worked in the base class—
6792 \begin_inset Flex Code
6795 \begin_layout Plain Layout
6801 in this example—so you can fiddle around with the settings for the different
6802 sections if you wish.
6803 The layout information for sections is contained in
6804 \begin_inset Flex Code
6807 \begin_layout Plain Layout
6813 , but you do not need to copy and change this file.
6814 Instead, you can simply add your changes to your layout file, after the
6816 \begin_inset Flex Code
6819 \begin_layout Plain Layout
6825 , which itself includes
6826 \begin_inset Flex Code
6829 \begin_layout Plain Layout
6836 For example, you might add these lines:
6839 \begin_layout LyX-Code
6843 \begin_layout LyX-Code
6847 \begin_layout LyX-Code
6851 \begin_layout LyX-Code
6855 \begin_layout LyX-Code
6859 \begin_layout Standard
6860 to change the font for chapter headings to sans-serif.
6861 This will override (or, in this case, add to) the existing declaration
6862 for the Chapter style.
6866 \begin_layout Standard
6867 Your new package may also provide commands or environments not present in
6869 In this case, you will want to add these to the layout file.
6871 \begin_inset CommandInset ref
6873 reference "sec:TextClass"
6877 for information on how to do so.
6880 \begin_layout Standard
6882 \begin_inset Flex MenuItem
6885 \begin_layout Plain Layout
6891 can be used with several different document classes, and even if it cannot,
6892 you might find it easiest just to write a module that you can load with
6894 The simplest possible such module would be:
6897 \begin_layout LyX-Code
6900 DeclareLyXModule{My Package}
6903 \begin_layout LyX-Code
6907 \begin_layout LyX-Code
6908 #Support for mypkg.sty.
6911 \begin_layout LyX-Code
6913 \begin_inset Newline newline
6919 \begin_layout LyX-Code
6921 \begin_inset Newline newline
6927 \begin_layout LyX-Code
6929 \begin_inset Newline newline
6935 \begin_inset Newline newline
6941 \begin_layout Standard
6942 A more complex module might modify the behavior of some existing constructs
6943 or define some new ones.
6945 \begin_inset CommandInset ref
6947 reference "sec:TextClass"
6954 \begin_layout Subsection
6956 \begin_inset Flex MenuItem
6959 \begin_layout Plain Layout
6968 \begin_layout Standard
6969 There are two possibilities here.
6970 One is that the class file is itself based upon an existing document class.
6971 For example, many thesis classes are based upon
6972 \begin_inset Flex MenuItem
6975 \begin_layout Plain Layout
6982 To see whether yours is, look for a line like
6985 \begin_layout LyX-Code
6991 \begin_layout Standard
6993 If so, then you may proceed largely as in the previous section, though
6995 \begin_inset Flex Code
6998 \begin_layout Plain Layout
7004 line will be different.
7005 If your new class is
7006 \begin_inset Flex Code
7009 \begin_layout Plain Layout
7015 and it is based upon
7016 \begin_inset Flex Code
7019 \begin_layout Plain Layout
7025 , then the line should read:
7029 \begin_layout Plain Layout
7030 And it will be easiest if you save the file to
7031 \begin_inset Flex Code
7034 \begin_layout Plain Layout
7040 : LyX assumes that the document class has the same name as the layout file.
7049 \begin_layout LyX-Code
7052 DeclareLaTeXClass[thesis,book]{thesis}
7055 \begin_layout Standard
7056 If, on the other hand, the new class is not based upon an existing class,
7057 you will probably have to
7058 \begin_inset Quotes eld
7062 \begin_inset Quotes erd
7066 We strongly suggest copying an existing layout file which uses a similar
7067 LaTeX class and then modifying it, if you can do so.
7068 At least use an existing file as a starting point so you can find out what
7069 items you need to worry about.
7070 Again, the specifics are covered below.
7073 \begin_layout Subsection
7075 \begin_inset CommandInset label
7077 name "sub:Creating-Templates"
7084 \begin_layout Standard
7085 Once you have written a layout file for a new document class, you might
7086 want to consider writing a
7091 A template acts as a kind of tutorial for your layout, showing how it might
7092 be used, though containing dummy content.
7093 You can of course look at the various templates included with LyX for ideas.
7096 \begin_layout Standard
7097 Templates are created just like usual documents: using LyX.
7098 The only difference is that usual documents contain all possible settings,
7099 including the font scheme and the paper size.
7100 Usually a user doesn't want a template to overwrite his preferred settings
7101 for such parameters.
7102 For that reason, the designer of a template should remove the corresponding
7104 \begin_inset Flex Code
7107 \begin_layout Plain Layout
7116 \begin_inset Flex Code
7119 \begin_layout Plain Layout
7127 from the template LyX file.
7128 This can be done with any simple text-editor, for example
7129 \begin_inset Flex Code
7132 \begin_layout Plain Layout
7139 \begin_inset Flex Code
7142 \begin_layout Plain Layout
7151 \begin_layout Standard
7152 Put the edited template files you create in
7153 \begin_inset Flex Code
7156 \begin_layout Plain Layout
7162 , copy the ones you use from the global template directory in
7163 \begin_inset Flex Code
7166 \begin_layout Plain Layout
7172 to the same place, and redefine the template path in the
7173 \begin_inset Flex MenuItem
7176 \begin_layout Plain Layout
7177 Tools\SpecialChar \menuseparator
7178 Preferences\SpecialChar \menuseparator
7187 \begin_layout Standard
7188 Note, by the way, that there is a template which has a particular meaning:
7190 \begin_inset Flex Code
7193 \begin_layout Plain Layout
7200 This template is loaded every time you create a new document with
7201 \begin_inset Flex MenuItem
7204 \begin_layout Plain Layout
7205 File\SpecialChar \menuseparator
7211 in order to provide useful defaults.
7212 To create this template from inside LyX, all you have to do is to open
7213 a document with the correct settings, and use the
7214 \begin_inset Flex MenuItem
7217 \begin_layout Plain Layout
7218 Save as Document Defaults
7226 \begin_layout Subsection
7227 Upgrading old layout files
7230 \begin_layout Standard
7231 The format of layout files changes with each LyX release, so old layout
7232 files need to be converted to the new format.
7233 If LyX reads a layout file in an older format, it automatically calls the
7235 \begin_inset Flex Code
7238 \begin_layout Plain Layout
7244 to convert it to a temporary file in current format.
7245 The original file is left untouched.
7246 If you use the layout file often, then, you may want to convert it permanently,
7247 so that LyX does not have to do so itself every time.
7248 To do this, you can call the converter manually:
7251 \begin_layout Enumerate
7253 \begin_inset Flex Code
7256 \begin_layout Plain Layout
7263 \begin_inset Flex Code
7266 \begin_layout Plain Layout
7275 \begin_layout Enumerate
7277 \begin_inset Newline newline
7281 \begin_inset Flex Code
7284 \begin_layout Plain Layout
7285 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7291 \begin_inset Newline newline
7295 \begin_inset Flex Code
7298 \begin_layout Plain Layout
7304 is the name of your LyX system directory.
7307 \begin_layout Standard
7308 Note that manual conversion does not affect included files, so these will
7309 have to be converted separately.
7312 \begin_layout Section
7313 \begin_inset CommandInset label
7315 name "sec:TextClass"
7319 The layout file format
7322 \begin_layout Standard
7323 The following sections describe how layout files are structured and written.
7324 Our advice is to go slowly, save and test often.
7325 It is really not that hard, except that the multitude of options can become
7326 overwhelming, especially if you try to check out too many at once.
7327 It becomes easier if you use existing layouts of LyX as examples/reference
7328 or if you modify an existing layout to your needs.
7331 \begin_layout Standard
7332 Note that all the tags used in layout files are case-insensitive.
7334 \begin_inset Flex Code
7337 \begin_layout Plain Layout
7344 \begin_inset Flex Code
7347 \begin_layout Plain Layout
7354 \begin_inset Flex Code
7357 \begin_layout Plain Layout
7363 are really the same tag.
7364 The possible arguments are printed in brackets after the tag's name.
7365 The default argument is typeset
7366 \begin_inset Flex Code
7369 \begin_layout Plain Layout
7378 If the argument has a data type like
7379 \begin_inset Quotes eld
7383 \begin_inset Quotes erd
7387 \begin_inset Quotes eld
7391 \begin_inset Quotes erd
7394 , the default is shown like this:
7395 \begin_inset Flex Code
7398 \begin_layout Plain Layout
7409 \begin_layout Subsection
7410 The document class declaration and classification
7413 \begin_layout Standard
7414 Lines in a layout file which begin with
7415 \begin_inset Flex Code
7418 \begin_layout Plain Layout
7425 There is one exception to this rule.
7427 \begin_inset Flex Code
7430 \begin_layout Plain Layout
7436 files should begin with lines like:
7439 \begin_layout LyX-Code
7442 #% Do not delete the line below; configure depends on this
7445 \begin_layout LyX-Code
7456 \begin_layout Plain Layout
7465 eXClass{Article (Standard Class)}
7468 \begin_layout LyX-Code
7473 DeclareCategory{Articles}
7476 \begin_layout Standard
7477 The second and third lines are used when you (re)configure LyX.
7478 The layout file is read by the LaTeX script
7479 \begin_inset Flex Code
7482 \begin_layout Plain Layout
7488 , in a special mode where
7489 \begin_inset Flex Code
7492 \begin_layout Plain Layout
7499 The first line is just a LaTeX comment, the second one contains the mandatory
7500 declaration of the text class and the third line contains the optional
7501 classification of the class.
7502 If these lines appear in a file named
7503 \begin_inset Flex Code
7506 \begin_layout Plain Layout
7512 , then they define a text class of name
7513 \begin_inset Flex Code
7516 \begin_layout Plain Layout
7522 (the name of the layout file) which uses the LaTeX document class
7523 \begin_inset Flex Code
7526 \begin_layout Plain Layout
7532 (the default is to use the same name as the layout).
7534 \begin_inset Quotes eld
7537 Article (Standard Class)
7538 \begin_inset Quotes erd
7541 that appears above is used as a description of the text class in the
7542 \begin_inset Flex MenuItem
7545 \begin_layout Plain Layout
7546 Document\SpecialChar \menuseparator
7554 \begin_inset Quotes eld
7558 \begin_inset Quotes erd
7561 in the example) is also used in the
7562 \begin_inset Flex MenuItem
7565 \begin_layout Plain Layout
7566 Document\SpecialChar \menuseparator
7572 dialog: the text classes are grouped by these categories (which are usually
7573 genres, so typical categories are
7574 \begin_inset Quotes eld
7578 \begin_inset Quotes erd
7582 \begin_inset Quotes eld
7586 \begin_inset Quotes erd
7590 \begin_inset Quotes eld
7594 \begin_inset Quotes erd
7598 \begin_inset Quotes eld
7602 \begin_inset Quotes erd
7606 \begin_inset Quotes eld
7610 \begin_inset Quotes erd
7614 \begin_inset Quotes eld
7618 \begin_inset Quotes erd
7622 If no category has been declared, the class will be put in the
7623 \begin_inset Quotes eld
7627 \begin_inset Quotes erd
7633 \begin_layout Standard
7634 Let's assume that you wrote your own text class that uses the
7635 \begin_inset Flex Code
7638 \begin_layout Plain Layout
7644 document class, but where you changed the appearance of the section headings.
7645 If you put it in a file
7646 \begin_inset Flex Code
7649 \begin_layout Plain Layout
7655 , the header of this file should be:
7658 \begin_layout LyX-Code
7661 #% Do not delete the line below; configure depends on this
7664 \begin_layout LyX-Code
7675 \begin_layout Plain Layout
7684 eXClass[article]{Article (with My Own Headings)}
7687 \begin_layout LyX-Code
7692 DeclareCategory{Articles}
7695 \begin_layout Standard
7696 This declares a text class
7697 \begin_inset Flex Code
7700 \begin_layout Plain Layout
7706 , associated with the LaTeX document class
7707 \begin_inset Flex Code
7710 \begin_layout Plain Layout
7717 \begin_inset Quotes eld
7720 Article (with My Own Headings)
7721 \begin_inset Quotes erd
7725 If your text class depends on several packages, you can declare it as:
7728 \begin_layout LyX-Code
7731 #% Do not delete the line below; configure depends on this
7734 \begin_layout LyX-Code
7745 \begin_layout Plain Layout
7754 eXClass[article,foo.sty]{Article (with My Own Headings)}
7757 \begin_layout LyX-Code
7762 DeclareCategory{Articles}
7765 \begin_layout Standard
7766 This indicates that your text class uses the
7767 \begin_inset Flex Code
7770 \begin_layout Plain Layout
7777 Finally, it is also possible to declare classes for DocBook code.
7778 Typical declarations will look like:
7781 \begin_layout LyX-Code
7784 #% Do not delete the line below; configure depends on this
7787 \begin_layout LyX-Code
7792 DeclareDocBookClass[article]{SGML (DocBook Article)}
7795 \begin_layout LyX-Code
7800 DeclareCategory{Articles (DocBook)}
7803 \begin_layout Standard
7804 Note that these declarations can also be given an optional parameter declaring
7805 the name of the document class (but not a list).
7808 \begin_layout Standard
7809 So, to be as explicit as possible, the form of the layout declaration is:
7812 \begin_layout LyX-Code
7823 \begin_layout Plain Layout
7832 eXClass[class,package.sty]{layout description}
7835 \begin_layout LyX-Code
7840 DeclareCategory{category}
7843 \begin_layout Standard
7844 The class need only be specified if the name of the LaTeX class file and
7845 the name of the layout file are different or if there are packages to load.
7846 If the name of the class file is not specified, then LyX will simply assume
7847 that it is the same as the name of the layout file.
7850 \begin_layout Standard
7851 When the text class has been modified to your taste, all you have to do
7852 is to copy it either to
7853 \begin_inset Flex Code
7856 \begin_layout Plain Layout
7863 \begin_inset Flex Code
7866 \begin_layout Plain Layout
7873 \begin_inset Flex MenuItem
7876 \begin_layout Plain Layout
7877 Tools\SpecialChar \menuseparator
7883 , exit LyX and restart.
7884 Then your new text class should be available along with the others.
7887 \begin_layout Standard
7888 Once the layout file is installed, you can edit it and see your changes
7889 without having to reconfigure or to restart LyX.
7894 \begin_layout Plain Layout
7895 In versions of LyX prior to 1.6, this was not true.
7896 As a result, editing layout files was very time consuming, since you had
7897 constantly to restart LyX to see changes.
7902 You can force a reload of the current layout by using the LyX function
7904 \begin_inset Flex MenuItem
7907 \begin_layout Plain Layout
7914 There is no default binding for this function—though, of course, you can
7915 bind it to a key yourself.
7916 But you will normally use this function simply by entering it in the mini-buffe
7921 \begin_layout Standard
7927 \begin_inset Flex MenuItem
7930 \begin_layout Plain Layout
7936 is very much an `advanced feature'.
7941 recommended that you save your work before using this function.
7946 recommended that you not attempt to edit layout information while simultaneousl
7947 y working on a document that you care about.
7948 Use a test document.
7949 Syntax errors and the like in your layout file could cause peculiar behavior.
7950 In particular, such errors could cause LyX to regard the current layout
7951 as invalid and to attempt to switch to some other layout.
7955 \begin_layout Plain Layout
7956 Really bad syntax errors may even caused LyX to exit.
7957 This is because certain sorts of errors may make LyX unable to read
7967 The LyX team strives to keep LyX stable in such situations, but safe is
7972 \begin_layout Plain Layout
7973 While we're giving advice: make regular backups.
7974 And be nice to your mother.
7982 \begin_layout Subsection
7983 The Module declaration
7986 \begin_layout Standard
7987 A module must begin with a line like the following:
7990 \begin_layout LyX-Code
7997 \begin_layout Plain Layout
8004 yXModule[endnotes.sty]{Endnotes}
8007 \begin_layout Standard
8008 The mandatory argument, in curly brackets, is the name of the module, as
8010 \begin_inset Flex MenuItem
8013 \begin_layout Plain Layout
8014 Document\SpecialChar \menuseparator
8015 Settings\SpecialChar \menuseparator
8022 The argument in square brackets is optional: It declares any LaTeX packages
8023 on which the module depends.
8024 It is also possible to use the form
8025 \begin_inset Flex MenuItem
8028 \begin_layout Plain Layout
8034 as an optional argument, which declares that the module can only be used
8035 when there exists a conversion chain between the formats `
8036 \begin_inset Flex Code
8039 \begin_layout Plain Layout
8046 \begin_inset Flex Code
8049 \begin_layout Plain Layout
8058 \begin_layout Standard
8059 The module declaration should then be followed by lines like the following
8063 \begin_layout Plain Layout
8064 Preferably in English if the module should be published with LyX.
8065 This description will appear in the list of messages to be translated and
8066 will be thus translated with the next interface update.
8074 \begin_layout LyX-Code
8078 \begin_layout LyX-Code
8079 #Adds an endnote command, in addition to footnotes.
8083 \begin_layout LyX-Code
8084 #You will need to add
8086 theendnotes in TeX code where you
8089 \begin_layout LyX-Code
8090 #want the endnotes to appear.
8094 \begin_layout LyX-Code
8098 \begin_layout LyX-Code
8099 #Requires: somemodule | othermodule
8102 \begin_layout LyX-Code
8103 #Excludes: badmodule
8106 \begin_layout Standard
8107 The description is used in
8108 \begin_inset Flex MenuItem
8111 \begin_layout Plain Layout
8112 Document\SpecialChar \menuseparator
8113 Settings\SpecialChar \menuseparator
8119 to provide the user with information about what the module does.
8121 \begin_inset Flex Code
8124 \begin_layout Plain Layout
8130 line is used to identify other modules with which this one must be used;
8132 \begin_inset Flex Code
8135 \begin_layout Plain Layout
8141 line is used to identify modules with which this one may not be used.
8142 Both are optional, and, as shown, multiple modules should be separated
8143 with the pipe symbol: |.
8144 Note that the required modules are treated disjunctively:
8148 of the required modules must be used.
8153 excluded module may be used.
8154 Note that modules are identified here by their filenames without the
8155 \begin_inset Flex Code
8158 \begin_layout Plain Layout
8166 \begin_inset Flex Code
8169 \begin_layout Plain Layout
8176 \begin_inset Flex Code
8179 \begin_layout Plain Layout
8188 \begin_layout Subsection
8192 \begin_layout Standard
8193 The first non-comment line of any layout file, included file, or module
8198 contain the file format number:
8201 \begin_layout Description
8202 \begin_inset Flex Code
8205 \begin_layout Plain Layout
8212 \begin_inset Flex Code
8215 \begin_layout Plain Layout
8221 ] The format number of the layout file.
8224 \begin_layout Standard
8225 This tag was introduced with LyX
8226 \begin_inset space ~
8230 Layout files from older LyX versions do not have an explicit file format
8231 and are considered to have
8232 \begin_inset Flex Code
8235 \begin_layout Plain Layout
8237 \begin_inset space ~
8246 The format for the present version of LyX is format 35.
8247 But each version of LyX is capable of reading earlier versions' layout
8248 files, just as they are capable of reading files produced by earlier versions
8250 There is, however, no provision for converting to earlier formats.
8253 \begin_layout Subsection
8254 \begin_inset CommandInset label
8256 name "sub:General-text-class"
8260 General text class parameters
8263 \begin_layout Standard
8264 These are general parameters that govern the behavior of an entire document
8270 mean that they must appear in
8271 \begin_inset Flex Code
8274 \begin_layout Plain Layout
8280 files rather than in modules.
8281 A module can contain any layout tag.)
8284 \begin_layout Description
8285 \begin_inset Flex Code
8288 \begin_layout Plain Layout
8294 Adds information that will be output in the
8295 \begin_inset Flex Code
8298 \begin_layout Plain Layout
8304 block when the document is output to XHTML.
8305 Typically, this would be used to output CSS style information, but it can
8306 be used for anything that can appear in
8307 \begin_inset Flex Code
8310 \begin_layout Plain Layout
8318 \begin_inset Quotes eld
8322 \begin_inset Flex Code
8325 \begin_layout Plain Layout
8332 \begin_inset Quotes erd
8338 \begin_layout Description
8339 \begin_inset Flex Code
8342 \begin_layout Plain Layout
8348 Adds information to the document preamble.
8350 \begin_inset Newline newline
8354 \begin_inset Quotes eld
8358 \begin_inset Flex Code
8361 \begin_layout Plain Layout
8368 \begin_inset Quotes erd
8374 \begin_layout Description
8375 \begin_inset Flex Code
8378 \begin_layout Plain Layout
8384 Defines formats for use in the display of bibliographic information.
8386 \begin_inset CommandInset ref
8388 reference "sub:Citation-format-description"
8394 \begin_inset Quotes eld
8398 \begin_inset Flex Code
8401 \begin_layout Plain Layout
8408 \begin_inset Quotes erd
8414 \begin_layout Description
8415 \begin_inset Flex Code
8418 \begin_layout Plain Layout
8424 Describes various global options supported by the document class.
8426 \begin_inset CommandInset ref
8428 reference "sub:ClassOptions"
8434 \begin_inset Quotes eld
8438 \begin_inset Flex Code
8441 \begin_layout Plain Layout
8448 \begin_inset Quotes erd
8454 \begin_layout Description
8455 \begin_inset Flex Code
8458 \begin_layout Plain Layout
8465 \begin_inset Flex Code
8468 \begin_layout Plain Layout
8477 \begin_inset space \thinspace{}
8481 \begin_inset Flex Code
8484 \begin_layout Plain Layout
8490 ] Whether the class should
8494 to having one or two columns.
8495 Can be changed in the
8496 \begin_inset Flex MenuItem
8499 \begin_layout Plain Layout
8500 Document\SpecialChar \menuseparator
8509 \begin_layout Description
8510 \begin_inset Flex Code
8513 \begin_layout Plain Layout
8520 \begin_inset Flex Code
8523 \begin_layout Plain Layout
8529 ] This sequence defines the properties for a counter.
8530 If the counter does not yet exist, it is created; if it does exist, it
8533 \begin_inset Quotes eld
8537 \begin_inset Flex Code
8540 \begin_layout Plain Layout
8547 \begin_inset Quotes erd
8551 \begin_inset Newline newline
8555 \begin_inset CommandInset ref
8557 reference "sub:Counters"
8561 for details on counters.
8564 \begin_layout Description
8565 \begin_inset Flex Code
8568 \begin_layout Plain Layout
8574 Sets the default font used to display the document.
8576 \begin_inset CommandInset ref
8578 reference "sub:Font-description"
8582 for how to declare fonts.
8584 \begin_inset Quotes eld
8588 \begin_inset Flex Code
8591 \begin_layout Plain Layout
8598 \begin_inset Quotes erd
8604 \begin_layout Description
8605 \begin_inset Flex Code
8608 \begin_layout Plain Layout
8615 \begin_inset Flex Code
8618 \begin_layout Plain Layout
8624 ] Specifies a module to be included by default with this document class.
8625 The module is specified as filename without the
8626 \begin_inset Flex Code
8629 \begin_layout Plain Layout
8636 The user can still remove the module, but it will be active at the outset.
8637 (This applies only when new files are created, or when this class is chosen
8638 for an existing document.)
8641 \begin_layout Description
8642 \begin_inset Flex Code
8645 \begin_layout Plain Layout
8652 \begin_inset Flex Code
8655 \begin_layout Plain Layout
8661 ] This is the style that will be assigned to new paragraphs, usually
8662 \begin_inset Flex MenuItem
8665 \begin_layout Plain Layout
8672 This will default to the first defined style if not given, but you are
8673 encouraged to use this directive.
8676 \begin_layout Description
8677 \begin_inset Flex Code
8680 \begin_layout Plain Layout
8687 \begin_inset Flex Code
8690 \begin_layout Plain Layout
8696 ] This tag indicates that the module (which is specified by filename without
8698 \begin_inset Flex Code
8701 \begin_layout Plain Layout
8707 extension) cannot be used with this document class.
8708 This might be used in a journal-specific layout file to prevent, say, the
8710 \begin_inset Flex Code
8713 \begin_layout Plain Layout
8719 module that numbers theorems by section.
8724 be used in a module.
8725 Modules have their own way of excluding other modules (see
8726 \begin_inset CommandInset ref
8728 reference "sub:Layout-modules"
8735 \begin_layout Description
8736 \begin_inset Flex Code
8739 \begin_layout Plain Layout
8745 Defines a new float.
8747 \begin_inset CommandInset ref
8749 reference "sub:Floats"
8755 \begin_inset Quotes eld
8759 \begin_inset Flex Code
8762 \begin_layout Plain Layout
8769 \begin_inset Quotes erd
8775 \begin_layout Description
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8785 Sets the information that will be output in the
8786 \begin_inset Flex Code
8789 \begin_layout Plain Layout
8795 block when this document class is output to XHTML.
8796 Note that this will completely override any prior
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Flex Code
8810 \begin_layout Plain Layout
8818 \begin_inset Newline newline
8822 \begin_inset Flex Code
8825 \begin_layout Plain Layout
8831 if you just want to add material to the preamble.) Must end with
8832 \begin_inset Quotes eld
8836 \begin_inset Flex Code
8839 \begin_layout Plain Layout
8846 \begin_inset Quotes erd
8852 \begin_layout Description
8853 \begin_inset Flex Code
8856 \begin_layout Plain Layout
8863 \begin_inset Flex Code
8866 \begin_layout Plain Layout
8872 ] The style to use for the table of contents, bibliography, and so forth,
8873 when the document is output to HTML.
8874 For articles, this should normally be
8875 \begin_inset Flex Code
8878 \begin_layout Plain Layout
8885 \begin_inset Flex Code
8888 \begin_layout Plain Layout
8895 If it is not given, then LyX will attempt to figure out which layout to
8899 \begin_layout Description
8900 \begin_inset Flex Code
8903 \begin_layout Plain Layout
8910 \begin_inset Flex Code
8913 \begin_layout Plain Layout
8919 ] Modifies the properties of the given counter.
8920 If the counter does not exist, the statement is ignored.
8922 \begin_inset Quotes eld
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8936 \begin_inset Quotes erd
8940 \begin_inset Newline newline
8944 \begin_inset CommandInset ref
8946 reference "sub:Counters"
8950 for details on counters.
8953 \begin_layout Description
8954 \begin_inset Flex Code
8957 \begin_layout Plain Layout
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8973 ] Modifies the properties of the given paragraph style.
8974 If the style does not exist, the statement is ignored.
8976 \begin_inset Quotes eld
8980 \begin_inset Flex Code
8983 \begin_layout Plain Layout
8990 \begin_inset Quotes erd
8996 \begin_layout Description
8997 \begin_inset Flex Code
9000 \begin_layout Plain Layout
9007 \begin_inset Flex Code
9010 \begin_layout Plain Layout
9016 ] This allows you to include another layout definition file within yours
9017 to avoid duplicating commands.
9018 Common examples are the standard layout files, for example,
9019 \begin_inset Flex Code
9022 \begin_layout Plain Layout
9028 , which contains most of the basic layouts.
9031 \begin_layout Description
9032 \begin_inset Flex Code
9035 \begin_layout Plain Layout
9042 \begin_inset Flex Code
9045 \begin_layout Plain Layout
9051 ] This section (re-)defines the layout of an inset.
9052 It can be applied to an existing inset or to a new, user-defined inset,
9053 e.g., a new character style.
9055 \begin_inset Quotes eld
9059 \begin_inset Flex Code
9062 \begin_layout Plain Layout
9069 \begin_inset Quotes erd
9073 \begin_inset Newline newline
9077 \begin_inset CommandInset ref
9079 reference "sub:Flex-insets-and"
9083 for more information.
9087 \begin_layout Description
9088 \begin_inset Flex Code
9091 \begin_layout Plain Layout
9098 \begin_inset Flex Code
9101 \begin_layout Plain Layout
9107 ] A string that indicates the width of the left margin on the screen, for
9109 \begin_inset Quotes eld
9113 \begin_inset Flex Code
9116 \begin_layout Plain Layout
9123 \begin_inset Quotes erd
9127 (Note that this is not a `length', like
9128 \begin_inset Quotes eld
9132 \begin_inset Quotes erd
9138 \begin_layout Description
9139 \begin_inset Flex Code
9142 \begin_layout Plain Layout
9149 \begin_inset Flex Code
9152 \begin_layout Plain Layout
9158 ] Deletes an existing counter, usually one defined in an included file.
9161 \begin_layout Description
9162 \begin_inset Flex Code
9165 \begin_layout Plain Layout
9172 \begin_inset Flex Code
9175 \begin_layout Plain Layout
9181 ] Deletes an existing float.
9182 This is particularly useful when you want to suppress a float that has
9183 been defined in an input file.
9186 \begin_layout Description
9187 \begin_inset Flex Code
9190 \begin_layout Plain Layout
9197 \begin_inset Flex Code
9200 \begin_layout Plain Layout
9206 ] Deletes an existing style.
9209 \begin_layout Description
9210 \begin_inset Flex Code
9213 \begin_layout Plain Layout
9220 \begin_inset Flex Code
9223 \begin_layout Plain Layout
9229 ] The file format (as defined in the LyX preferences) produced by this document
9231 It is mainly useful when
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9242 \begin_inset Flex Code
9245 \begin_layout Plain Layout
9251 and one wants to define a new type of literate document.
9252 The format is reset to
9253 \begin_inset Quotes eld
9257 \begin_inset Flex Code
9260 \begin_layout Plain Layout
9267 \begin_inset Quotes erd
9271 \begin_inset Quotes eld
9275 \begin_inset Flex Code
9278 \begin_layout Plain Layout
9285 \begin_inset Quotes erd
9288 when the corresponding
9289 \begin_inset Flex Code
9292 \begin_layout Plain Layout
9298 parameter is encountered.
9301 \begin_layout Description
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9312 \begin_inset Flex Code
9315 \begin_layout Plain Layout
9326 \begin_inset Flex Code
9329 \begin_layout Plain Layout
9336 \begin_inset Flex Code
9339 \begin_layout Plain Layout
9345 ] Specifies what sort of output documents using this class will produce.
9348 \begin_layout Description
9349 \begin_inset Flex Code
9352 \begin_layout Plain Layout
9359 \begin_inset Flex Code
9362 \begin_layout Plain Layout
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9378 ] Specifies options, given in the second string, for the package named by
9381 \begin_inset Quotes eld
9385 \begin_inset Flex Code
9388 \begin_layout Plain Layout
9389 PackageOptions natbib square
9395 \begin_inset Quotes erd
9399 \begin_inset Flex Code
9402 \begin_layout Plain Layout
9408 to be loaded with the
9409 \begin_inset Flex Code
9412 \begin_layout Plain Layout
9419 (For TeXperts, this causes LyX to output:
9420 \begin_inset Flex Code
9423 \begin_layout Plain Layout
9426 PassOptionsToPackage{natbib}{square}
9432 \begin_inset Flex Code
9435 \begin_layout Plain Layout
9444 \begin_layout Description
9445 \begin_inset Flex Code
9448 \begin_layout Plain Layout
9455 \begin_inset Flex Code
9458 \begin_layout Plain Layout
9467 \begin_inset Flex Code
9470 \begin_layout Plain Layout
9477 \begin_inset Flex Code
9480 \begin_layout Plain Layout
9486 ] The default pagestyle.
9487 Can be changed in the
9488 \begin_inset Flex MenuItem
9491 \begin_layout Plain Layout
9492 Document\SpecialChar \menuseparator
9501 \begin_layout Description
9502 \begin_inset Flex Code
9505 \begin_layout Plain Layout
9511 Sets the preamble for the LaTeX document.
9512 Note that this will completely override any prior
9513 \begin_inset Flex Code
9516 \begin_layout Plain Layout
9523 \begin_inset Flex Code
9526 \begin_layout Plain Layout
9534 \begin_inset Flex Code
9537 \begin_layout Plain Layout
9543 if you just want to add material to the preamble.) Must end with
9544 \begin_inset Quotes eld
9548 \begin_inset Flex Code
9551 \begin_layout Plain Layout
9558 \begin_inset Quotes erd
9564 \begin_layout Description
9565 \begin_inset Flex Code
9568 \begin_layout Plain Layout
9575 \begin_inset Flex Code
9578 \begin_layout Plain Layout
9585 \begin_inset Flex Code
9588 \begin_layout Plain Layout
9597 \begin_inset space \thinspace{}
9601 \begin_inset Flex Code
9604 \begin_layout Plain Layout
9610 ] Whether the class already provides the feature
9611 \begin_inset Flex Code
9614 \begin_layout Plain Layout
9621 A feature is in general the name of a package (e.
9622 \begin_inset space \thinspace{}
9626 \begin_inset space \space{}
9630 \begin_inset Flex Code
9633 \begin_layout Plain Layout
9640 \begin_inset Flex Code
9643 \begin_layout Plain Layout
9650 \begin_inset space \thinspace{}
9654 \begin_inset space \space{}
9658 \begin_inset Flex Code
9661 \begin_layout Plain Layout
9668 \begin_inset Flex Code
9671 \begin_layout Plain Layout
9679 \begin_inset CommandInset ref
9681 reference "chap:List-of-functions"
9685 for the list of features.
9688 \begin_layout Description
9689 \begin_inset Flex Code
9692 \begin_layout Plain Layout
9699 \begin_inset Flex Code
9702 \begin_layout Plain Layout
9708 ] Indicates that this layout provides the functionality of the module mentioned,
9709 which should be specified by the filename without the
9710 \begin_inset Flex Code
9713 \begin_layout Plain Layout
9720 This will typically be used if the layout includes the module directly,
9721 rather than using the
9722 \begin_inset Flex Code
9725 \begin_layout Plain Layout
9731 tag to indicate that it ought to be used.
9732 It could also be used in a module that provided an alternate implementation
9733 of the same functionality.
9736 \begin_layout Description
9737 \begin_inset Flex Code
9740 \begin_layout Plain Layout
9747 \begin_inset Flex Code
9750 \begin_layout Plain Layout
9756 ] Whether the class requires the feature
9757 \begin_inset Flex Code
9760 \begin_layout Plain Layout
9767 Multiple features must be separated by commas.
9768 Note that you can only request supported features.
9770 \begin_inset CommandInset ref
9772 reference "chap:List-of-functions"
9776 for the list of features.)
9779 \begin_layout Description
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9799 ] A string that indicates the width of the right margin on the screen, for
9801 \begin_inset Quotes eld
9805 \begin_inset Flex Code
9808 \begin_layout Plain Layout
9815 \begin_inset Quotes erd
9821 \begin_layout Description
9822 \begin_inset Flex Code
9825 \begin_layout Plain Layout
9832 \begin_inset Flex Code
9835 \begin_layout Plain Layout
9841 ] Sets which divisions get numbered.
9843 \begin_inset Newline newline
9847 \begin_inset Flex Code
9850 \begin_layout Plain Layout
9859 \begin_layout Description
9860 \begin_inset Flex Code
9863 \begin_layout Plain Layout
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9882 \begin_inset space \thinspace{}
9886 \begin_inset Flex Code
9889 \begin_layout Plain Layout
9895 ] Whether the class-default should be printing on one or both sides of the
9897 Can be changed in the
9898 \begin_inset Flex MenuItem
9901 \begin_layout Plain Layout
9902 Document\SpecialChar \menuseparator
9911 \begin_layout Description
9912 \begin_inset Flex Code
9915 \begin_layout Plain Layout
9922 \begin_inset Flex Code
9925 \begin_layout Plain Layout
9931 ] This sequence defines a paragraph style.
9932 If the style does not yet exist, it is created; if it does exist, its parameter
9935 \begin_inset Quotes eld
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9949 \begin_inset Quotes erd
9953 \begin_inset Newline newline
9957 \begin_inset CommandInset ref
9959 reference "sub:Paragraph-Styles"
9963 for details on paragraph styles.
9966 \begin_layout Description
9967 \begin_inset Flex Code
9970 \begin_layout Plain Layout
9977 \begin_inset Flex Code
9980 \begin_layout Plain Layout
9986 ] The name of the command or environment to be used with
9987 \begin_inset Flex Code
9990 \begin_layout Plain Layout
9999 \begin_layout Description
10000 \begin_inset Flex Code
10003 \begin_layout Plain Layout
10010 \begin_inset Flex Code
10013 \begin_layout Plain Layout
10022 \begin_inset Flex Code
10025 \begin_layout Plain Layout
10031 ] Indicates what kind of markup is used to define the title of a document.
10033 \begin_inset Flex Code
10036 \begin_layout Plain Layout
10042 means that the macro with name
10043 \begin_inset Flex Code
10046 \begin_layout Plain Layout
10052 will be inserted after the last layout which has
10053 \begin_inset Quotes eld
10057 \begin_inset Flex Code
10060 \begin_layout Plain Layout
10062 \begin_inset space ~
10071 \begin_inset Quotes erd
10076 \begin_inset Flex Code
10079 \begin_layout Plain Layout
10085 corresponds to the case where all layouts which have
10086 \begin_inset Quotes eld
10090 \begin_inset Flex Code
10093 \begin_layout Plain Layout
10095 \begin_inset space ~
10104 \begin_inset Quotes erd
10107 should be enclosed into the
10108 \begin_inset Flex Code
10111 \begin_layout Plain Layout
10120 \begin_layout Description
10121 \begin_inset Flex Code
10124 \begin_layout Plain Layout
10131 \begin_inset Flex Code
10134 \begin_layout Plain Layout
10140 ] Sets which divisions are included in the table of contents.
10142 \begin_inset Flex Code
10145 \begin_layout Plain Layout
10154 \begin_layout Subsection
10155 \begin_inset Flex Code
10158 \begin_layout Plain Layout
10165 \begin_inset CommandInset label
10167 name "sub:ClassOptions"
10174 \begin_layout Standard
10176 \begin_inset Flex Code
10179 \begin_layout Plain Layout
10185 section can contain the following entries:
10188 \begin_layout Description
10189 \begin_inset Flex Code
10192 \begin_layout Plain Layout
10199 \begin_inset Flex Code
10202 \begin_layout Plain Layout
10208 ] The list of available font sizes for the document's main font, separated
10210 \begin_inset Quotes eld
10214 \begin_inset Flex Code
10217 \begin_layout Plain Layout
10224 \begin_inset Quotes erd
10230 \begin_layout Description
10231 \begin_inset Flex Code
10234 \begin_layout Plain Layout
10240 Used to set the DTD line with XML-based output classes.
10242 \begin_inset space \thinspace{}
10246 \begin_inset Quotes eld
10249 -//OASIS//DTD DocBook V4.2//EN
10250 \begin_inset Quotes erd
10256 \begin_layout Description
10257 \begin_inset Flex Code
10260 \begin_layout Plain Layout
10267 \begin_inset Flex Code
10270 \begin_layout Plain Layout
10271 string="empty|plain|headings|fancy"
10276 ] The list of available page sty\SpecialChar \-
10278 \begin_inset Quotes eld
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10292 \begin_inset Quotes erd
10298 \begin_layout Description
10299 \begin_inset Flex Code
10302 \begin_layout Plain Layout
10309 \begin_inset Flex Code
10312 \begin_layout Plain Layout
10318 ] Some document class options, separated by a comma, that will be added
10319 to the optional part of the
10320 \begin_inset Flex Code
10323 \begin_layout Plain Layout
10334 \begin_layout Standard
10336 \begin_inset Flex Code
10339 \begin_layout Plain Layout
10345 section must end with
10346 \begin_inset Quotes eld
10350 \begin_inset Flex Code
10353 \begin_layout Plain Layout
10360 \begin_inset Quotes erd
10366 \begin_layout Subsection
10368 \begin_inset CommandInset label
10370 name "sub:Paragraph-Styles"
10377 \begin_layout Standard
10378 A paragraph style description looks like this:
10382 \begin_layout Plain Layout
10383 Note that this will either define a new style or modify an existing one.
10391 \begin_layout LyX-Code
10398 \begin_layout LyX-Code
10402 \begin_layout LyX-Code
10406 \begin_layout Standard
10407 where the following commands are allowed:
10410 \begin_layout Description
10411 \begin_inset Flex Code
10414 \begin_layout Plain Layout
10421 \begin_inset Flex Code
10424 \begin_layout Plain Layout
10429 , left, right, center
10434 ] Paragraph alignment.
10437 \begin_layout Description
10438 \begin_inset Flex Code
10441 \begin_layout Plain Layout
10448 \begin_inset Flex Code
10451 \begin_layout Plain Layout
10456 , left, right, center
10461 ] A comma separated list of permitted alignments.
10462 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10464 For example a right-aligned or centered enumeration isn't possible.)
10467 \begin_layout Description
10468 \begin_inset Flex Code
10471 \begin_layout Plain Layout
10478 \begin_inset Flex Code
10481 \begin_layout Plain Layout
10487 ] Defines argument number <int> of a command\SpecialChar \slash{}
10488 environment associated with
10490 This is useful for things like section headings, and only makes sense with
10492 Every (optional or required) argument of a command or environment -- except
10493 for the required argument that is associated with the content of the paragraph
10494 itself -- has a separate definition, where the number specifies the order
10496 The definition must end with
10497 \begin_inset Flex Code
10500 \begin_layout Plain Layout
10507 So a command with two optional arguments has:
10508 \begin_inset Separator parbreak
10515 \begin_layout Quote
10521 \begin_layout Quote
10527 \begin_layout Quote
10533 \begin_layout Quote
10539 \begin_layout Quote
10545 \begin_layout Quote
10551 \begin_layout Standard
10553 \begin_inset Flex Code
10556 \begin_layout Plain Layout
10562 definition, the following specifications are possible:
10565 \begin_layout Itemize
10566 \begin_inset Flex Code
10569 \begin_layout Plain Layout
10576 \begin_inset Flex Code
10579 \begin_layout Plain Layout
10585 The string that will appear both in the menu (to insert this argument)
10586 and on the argument inset button (unless you also specify a separate
10587 \begin_inset Flex Code
10590 \begin_layout Plain Layout
10597 For the menu, you can define an accelerator by appending the respective
10598 character to the string, divided by
10599 \begin_inset Quotes eld
10603 \begin_inset Quotes erd
10607 \begin_inset space \thinspace{}
10611 \begin_inset space \space{}
10615 \begin_inset Quotes eld
10619 \begin_inset Flex Code
10622 \begin_layout Plain Layout
10629 \begin_inset Quotes erd
10635 \begin_layout Itemize
10636 \begin_inset Flex Code
10639 \begin_layout Plain Layout
10646 \begin_inset Flex Code
10649 \begin_layout Plain Layout
10655 A separate string for the menu.
10656 You can define an accelerator by appending the respective character to
10657 the string, divided by
10658 \begin_inset Quotes eld
10662 \begin_inset Quotes erd
10666 \begin_inset space \thinspace{}
10670 \begin_inset space \space{}
10674 \begin_inset Quotes eld
10678 \begin_inset Flex Code
10681 \begin_layout Plain Layout
10688 \begin_inset Quotes erd
10692 This specification is optional.
10693 If it is not given the
10694 \begin_inset Flex Code
10697 \begin_layout Plain Layout
10703 will be used instead for the menu.
10706 \begin_layout Itemize
10707 \begin_inset Flex Code
10710 \begin_layout Plain Layout
10717 \begin_inset Flex Code
10720 \begin_layout Plain Layout
10726 A longer explanatory text that appears in the tooltip when hovering over
10727 the argument inset.
10730 \begin_layout Itemize
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10753 \begin_inset space \thinspace{}
10757 \begin_inset Flex Code
10760 \begin_layout Plain Layout
10766 ] Declare if this is a mandatory (1) or an optional (0) argument.
10767 Mandatory arguments will be output empty if not given, while optional arguments
10768 will not be output at all.
10769 By default, mandatory arguments are delimited by
10770 \begin_inset Flex Code
10773 \begin_layout Plain Layout
10779 , while optional arguments are delimited by
10780 \begin_inset Flex Code
10783 \begin_layout Plain Layout
10792 \begin_layout Itemize
10793 \begin_inset Flex Code
10796 \begin_layout Plain Layout
10803 \begin_inset Flex Code
10806 \begin_layout Plain Layout
10812 defines another argument (by its number) which this argument requires to
10813 be output if it is itself output.
10815 \begin_inset space \thinspace{}
10818 g., in LaTeX commands, optional arguments often require previous optional
10819 arguments to be output (at least empty), as in
10820 \begin_inset Flex Code
10823 \begin_layout Plain Layout
10826 command[][argument]{text}
10832 This can be achieved by the statement
10833 \begin_inset Flex Code
10836 \begin_layout Plain Layout
10843 \begin_inset Flex Code
10846 \begin_layout Plain Layout
10855 \begin_layout Itemize
10856 \begin_inset Flex Code
10859 \begin_layout Plain Layout
10866 \begin_inset Flex Code
10869 \begin_layout Plain Layout
10875 defines a custom left delimiter (instead of
10876 \begin_inset Flex Code
10879 \begin_layout Plain Layout
10886 \begin_inset Flex Code
10889 \begin_layout Plain Layout
10896 A line break in the output can be indicated by
10897 \begin_inset Flex Code
10900 \begin_layout Plain Layout
10909 \begin_layout Itemize
10910 \begin_inset Flex Code
10913 \begin_layout Plain Layout
10920 \begin_inset Flex Code
10923 \begin_layout Plain Layout
10929 defines a custom right delimiter (instead of
10930 \begin_inset Flex Code
10933 \begin_layout Plain Layout
10940 \begin_inset Flex Code
10943 \begin_layout Plain Layout
10950 A line break in the output can be indicated by
10951 \begin_inset Flex Code
10954 \begin_layout Plain Layout
10963 \begin_layout Itemize
10964 \begin_inset Flex Code
10967 \begin_layout Plain Layout
10974 \begin_inset Flex Code
10977 \begin_layout Plain Layout
10983 defines an argument that is inserted if and only if no user-specified arguments
10985 \begin_inset space \thinspace{}
10989 \begin_inset space \space{}
10992 if no argument inset has been inserted (note that also an empty argument
10993 inset omits the DefaultArg).
10994 Multiple arguments need to be separated by comma.
10997 \begin_layout Itemize
10998 \begin_inset Flex Code
11001 \begin_layout Plain Layout
11008 \begin_inset Flex Code
11011 \begin_layout Plain Layout
11017 defines an argument that is inserted in any case (alone or in addition
11018 to user-specified arguments).
11019 Multiple arguments need to be separated by comma.
11022 \begin_layout Itemize
11023 \begin_inset Flex Code
11026 \begin_layout Plain Layout
11032 The font used for the argument content, see
11033 \begin_inset CommandInset ref
11035 reference "sub:Font-description"
11042 \begin_layout Itemize
11043 \begin_inset Flex Code
11046 \begin_layout Plain Layout
11052 The font used for the label; see
11053 \begin_inset CommandInset ref
11055 reference "sub:Font-description"
11062 \begin_layout Itemize
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11073 \begin_inset Flex Code
11076 \begin_layout Plain Layout
11081 , Minimalistic, Conglomerate
11086 ] describes the rendering style used for the inset's frame and buttons.
11089 \begin_layout Itemize
11090 \begin_inset Flex Code
11093 \begin_layout Plain Layout
11100 \begin_inset Flex Code
11103 \begin_layout Plain Layout
11110 \begin_inset Flex Code
11113 \begin_layout Plain Layout
11119 , this argument is automatically inserted when the respective style is selected.
11120 Currently, only one argument per style\SpecialChar \slash{}
11121 layout can be automatically inserted.
11124 \begin_layout Standard
11125 By default, the text entered in the LyX workarea in the respective layout
11126 is the last (mandatory) argument of a command if the
11127 \begin_inset Flex Code
11130 \begin_layout Plain Layout
11137 \begin_inset Flex Code
11140 \begin_layout Plain Layout
11147 However, arguments with the prefix
11148 \begin_inset Flex Code
11151 \begin_layout Plain Layout
11157 are output after this workarea argument.
11158 Note that post-argument numbering restarts at 1, so the first argument
11159 following the workarea argument is
11160 \begin_inset Flex Code
11163 \begin_layout Plain Layout
11170 Post-arguments are ignored in any other
11171 \begin_inset Flex Code
11174 \begin_layout Plain Layout
11181 \begin_inset Flex Code
11184 \begin_layout Plain Layout
11193 \begin_layout Standard
11195 \begin_inset Flex Code
11198 \begin_layout Plain Layout
11207 \begin_inset Flex Code
11210 \begin_layout Plain Layout
11219 \begin_inset Flex Code
11222 \begin_layout Plain Layout
11228 followed by the number (e.
11229 \begin_inset space \thinspace{}
11233 \begin_inset space \space{}
11237 \begin_inset Flex Code
11240 \begin_layout Plain Layout
11250 \begin_layout Description
11251 \begin_inset Flex Code
11254 \begin_layout Plain Layout
11260 Note that this will completely override any prior
11261 \begin_inset Flex Code
11264 \begin_layout Plain Layout
11270 declaration for this style.
11272 \begin_inset Quotes eld
11276 \begin_inset Flex Code
11279 \begin_layout Plain Layout
11286 \begin_inset Quotes erd
11291 \begin_inset CommandInset ref
11293 reference "sub:I18n"
11297 for details on its use.
11300 \begin_layout Description
11301 \begin_inset Flex Code
11304 \begin_layout Plain Layout
11311 \begin_inset Flex Code
11314 \begin_layout Plain Layout
11324 \begin_layout Plain Layout
11325 Note that a `float' here is a real number, such as: 1.5.
11330 The vertical space with which the last of a chain of paragraphs with this
11331 style is separated from the following paragraph.
11332 If the next paragraph has another style, the separations are not simply
11333 added, but the maximum is taken.
11336 \begin_layout Description
11337 \begin_inset Flex Code
11340 \begin_layout Plain Layout
11347 \begin_inset Flex Code
11350 \begin_layout Plain Layout
11356 ] The category for this style.
11357 This is used to group related styles in the style combobox on the toolbar.
11358 Any string can be used, but you may want to use existing categories with
11363 \begin_layout Description
11364 \begin_inset Flex Code
11367 \begin_layout Plain Layout
11373 Depth of XML command.
11374 Used only with XML-type formats.
11377 \begin_layout Description
11378 \begin_inset Flex Code
11381 \begin_layout Plain Layout
11388 \begin_inset Flex Code
11391 \begin_layout Plain Layout
11397 ] Copies all the features of an existing style into the current one.
11401 \begin_layout Description
11402 \begin_inset Flex Code
11405 \begin_layout Plain Layout
11412 \begin_inset Flex Code
11415 \begin_layout Plain Layout
11421 ] The name of a style whose preamble should be output
11426 This allows to ensure some ordering of the preamble snippets when macros
11427 definitions depend on one another.
11431 \begin_layout Plain Layout
11432 Note that, besides that functionality, there is no way to ensure any ordering
11434 The ordering that you see in a given version of LyX may change without
11435 warning in later versions.
11443 \begin_layout Description
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11454 \begin_inset Flex Code
11457 \begin_layout Plain Layout
11462 , Box, Filled_Box, Static
11467 ] The type of label that stands at the end of the paragraph (or sequence
11469 \begin_inset Flex Code
11472 \begin_layout Plain Layout
11479 \begin_inset Newline newline
11483 \begin_inset Flex Code
11486 \begin_layout Plain Layout
11493 \begin_inset Flex Code
11496 \begin_layout Plain Layout
11503 \begin_inset Flex Code
11506 \begin_layout Plain Layout
11514 \begin_inset Flex Code
11517 \begin_layout Plain Layout
11524 \begin_inset Quotes eld
11528 \begin_inset Quotes erd
11532 \begin_inset Flex Code
11535 \begin_layout Plain Layout
11542 \begin_inset space \space{}
11546 \begin_inset Flex Code
11549 \begin_layout Plain Layout
11555 ) is a white (resp.
11556 \begin_inset space ~
11559 black) square suitable for end of proof markers,
11560 \begin_inset Flex Code
11563 \begin_layout Plain Layout
11569 is an explicit text string.
11572 \begin_layout Description
11573 \begin_inset Flex Code
11576 \begin_layout Plain Layout
11583 \begin_inset Flex Code
11586 \begin_layout Plain Layout
11592 ] The string used for a label with a
11593 \begin_inset Flex Code
11596 \begin_layout Plain Layout
11603 \begin_inset Newline newline
11607 \begin_inset Flex Code
11610 \begin_layout Plain Layout
11620 \begin_layout Description
11621 \begin_inset Flex Code
11624 \begin_layout Plain Layout
11630 The font used for both the text body
11636 \begin_inset CommandInset ref
11638 reference "sub:Font-description"
11643 Note that defining this font automatically defines the
11644 \begin_inset Flex Code
11647 \begin_layout Plain Layout
11654 So you should define this one first if you also want to define
11655 \begin_inset Flex Code
11658 \begin_layout Plain Layout
11667 \begin_layout Description
11668 \begin_inset Flex Code
11671 \begin_layout Plain Layout
11678 \begin_inset Flex Code
11681 \begin_layout Plain Layout
11687 ] Used for backporting new styles to stable LyX versions.
11688 The first stable version that supports this tag is LyX 2.1.0.
11689 The argument is a number which may either be 0, -1 or any value greater
11692 \begin_inset Flex Code
11695 \begin_layout Plain Layout
11701 flag of a style is greater than zero, it will always be written to the
11703 If a .lyx file is read, the style definitions from the document header are
11704 added to the document class.
11705 Therefore even older LyX versions can handle the style.
11707 \begin_inset Flex Code
11710 \begin_layout Plain Layout
11716 is a version number: If the style is read, and the version number is less
11717 than the version number of the already existing style in the document class,
11718 the new style is ignored.
11719 If the version number is greater, the new style replaces the existing style.
11720 A value of -1 means an infinite version number, i.
11721 \begin_inset space \thinspace{}
11725 \begin_inset space \space{}
11728 the style is always used.
11731 \begin_layout Description
11732 \begin_inset Flex Code
11735 \begin_layout Plain Layout
11742 \begin_inset Flex Code
11745 \begin_layout Plain Layout
11754 \begin_inset space \thinspace{}
11758 \begin_inset Flex Code
11761 \begin_layout Plain Layout
11767 ] Usually LyX does not allow you to insert more than one space between words,
11768 since a space is considered as the separation between two words, not a
11769 character or symbol of its own.
11770 This is a very fine thing but sometimes annoying, for example, when typing
11771 program code or plain LaTeX code.
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11783 Note that LyX will create protected blanks for the additional blanks when
11784 in another mode than LaTeX-mode.
11787 \begin_layout Description
11788 \begin_inset Flex Code
11791 \begin_layout Plain Layout
11797 These tags are used with XHTML output.
11799 \begin_inset CommandInset ref
11801 reference "sub:Paragraph-Style-XHTML"
11808 \begin_layout Description
11809 \begin_inset Flex Code
11812 \begin_layout Plain Layout
11818 [FIXME] (Used only with XML-type formats.)
11821 \begin_layout Description
11822 \begin_inset Flex Code
11825 \begin_layout Plain Layout
11832 \begin_inset Flex Code
11835 \begin_layout Plain Layout
11844 \begin_inset space \thinspace{}
11848 \begin_inset Flex Code
11851 \begin_layout Plain Layout
11858 \begin_inset Flex Code
11861 \begin_layout Plain Layout
11867 , marks the style as to be included in the document preamble and not in
11869 This is useful for document classes that want such information as the title
11870 and author to appear in the preamble.
11871 Note that this works only for styles for which the
11872 \begin_inset Flex Code
11875 \begin_layout Plain Layout
11882 \begin_inset Flex Code
11885 \begin_layout Plain Layout
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11904 \begin_layout Description
11905 \begin_inset Flex Code
11908 \begin_layout Plain Layout
11915 \begin_inset Flex Code
11918 \begin_layout Plain Layout
11927 \begin_inset space \thinspace{}
11931 \begin_inset Flex Code
11934 \begin_layout Plain Layout
11941 \begin_inset Flex Code
11944 \begin_layout Plain Layout
11950 , marks the style as being part of a title block (see also the
11951 \begin_inset Flex Code
11954 \begin_layout Plain Layout
11961 \begin_inset Flex Code
11964 \begin_layout Plain Layout
11973 \begin_layout Description
11974 \begin_inset Flex Code
11977 \begin_layout Plain Layout
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 ] The LaTeX command sequence declaring an item in a list.
11994 The command is to be defined without the preceding backslash (the default
11996 \begin_inset Quotes eld
12000 \begin_inset Quotes erd
12004 \begin_inset Flex Code
12007 \begin_layout Plain Layout
12015 in the LaTeX output).
12018 \begin_layout Description
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12029 \begin_inset Flex Code
12032 \begin_layout Plain Layout
12038 ] This provides extra space between paragraphs that have the same style.
12039 If you put other styles into an environment, each is separated with the
12041 \begin_inset Flex Code
12044 \begin_layout Plain Layout
12051 But the whole items of the environment are additionally separated with
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12063 Note that this is a
12068 \begin_layout Description
12069 \begin_inset Flex Code
12072 \begin_layout Plain Layout
12078 [FIXME] (Used only with XML-type formats.)
12081 \begin_layout Description
12082 \begin_inset Flex Code
12085 \begin_layout Plain Layout
12092 \begin_inset Flex Code
12095 \begin_layout Plain Layout
12104 \begin_inset space \thinspace{}
12108 \begin_inset Flex Code
12111 \begin_layout Plain Layout
12117 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12118 lead to empty LaTeX output.
12119 There are some cases where this could be desirable however: in a letter
12120 template, the required fields can be provided as empty fields, so that
12121 people do not forget them; in some special classes, a style can be used
12122 as some kind of break, which does not contain actual text.
12125 \begin_layout Description
12126 \begin_inset Flex Code
12129 \begin_layout Plain Layout
12136 \begin_inset Flex Code
12139 \begin_layout Plain Layout
12145 ] The vertical space between the label and the text body.
12146 Only used for labels that are above the text body (
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12157 \begin_inset Newline newline
12161 \begin_inset Flex Code
12164 \begin_layout Plain Layout
12165 Centered_Top_Environment
12173 \begin_layout Description
12174 \begin_inset Flex Code
12177 \begin_layout Plain Layout
12184 \begin_inset Flex Code
12187 \begin_layout Plain Layout
12193 ] The name of the counter for automatic numbering.
12194 In order to have the counter appear with your label, you will need to reference
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12208 This will work with
12209 \begin_inset Flex Code
12212 \begin_layout Plain Layout
12219 \begin_inset Flex Code
12222 \begin_layout Plain Layout
12229 \begin_inset Flex Code
12232 \begin_layout Plain Layout
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12249 \begin_inset Newline newline
12257 \begin_inset Flex Code
12260 \begin_layout Plain Layout
12267 \begin_inset Flex Code
12270 \begin_layout Plain Layout
12276 , though this case is a bit complicated.
12277 Suppose you declare
12278 \begin_inset Quotes eld
12282 \begin_inset Flex Code
12285 \begin_layout Plain Layout
12286 LabelCounter myenum
12292 \begin_inset Quotes erd
12296 Then the actual counters used are
12297 \begin_inset Flex Code
12300 \begin_layout Plain Layout
12307 \begin_inset Flex Code
12310 \begin_layout Plain Layout
12317 \begin_inset Flex Code
12320 \begin_layout Plain Layout
12327 \begin_inset Flex Code
12330 \begin_layout Plain Layout
12336 , much as in LaTeX.
12337 These counters must all be declared separately.
12338 \begin_inset Newline newline
12342 \begin_inset CommandInset ref
12344 reference "sub:Counters"
12348 for details on counters.
12351 \begin_layout Description
12352 \begin_inset Flex Code
12355 \begin_layout Plain Layout
12361 The font used for the label.
12363 \begin_inset CommandInset ref
12365 reference "sub:Font-description"
12372 \begin_layout Description
12373 \begin_inset Flex Code
12376 \begin_layout Plain Layout
12383 \begin_inset Flex Code
12386 \begin_layout Plain Layout
12392 ] Text that indicates how far a label should be indented.
12395 \begin_layout Description
12396 \begin_inset Flex Code
12399 \begin_layout Plain Layout
12406 \begin_inset Flex Code
12409 \begin_layout Plain Layout
12415 ] Text that indicates the amount of horizontal space between the label and
12417 Only used for labels that are not above the text body.
12420 \begin_layout Description
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12431 \begin_inset Flex Code
12434 \begin_layout Plain Layout
12440 ] The string used for the label.
12442 \begin_inset Flex Code
12445 \begin_layout Plain Layout
12451 is set, this string can be contain the special formatting commands described
12453 \begin_inset CommandInset ref
12455 reference "sub:Counters"
12462 \begin_layout Description
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12467 LabelStringAppendix
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12482 ] This is used inside the appendix instead of
12483 \begin_inset Newline newline
12487 \begin_inset Flex Code
12490 \begin_layout Plain Layout
12498 \begin_inset Flex Code
12501 \begin_layout Plain Layout
12508 \begin_inset Newline newline
12512 \begin_inset Flex Code
12515 \begin_layout Plain Layout
12516 LabelStringAppendix
12524 \begin_layout Description
12525 \begin_inset Flex Code
12528 \begin_layout Plain Layout
12534 [FIXME] (Used only with XML-type formats.)
12537 \begin_layout Description
12538 \begin_inset Flex Code
12541 \begin_layout Plain Layout
12548 \begin_inset Flex Code
12551 \begin_layout Plain Layout
12556 , Manual, Static, Above,
12557 \begin_inset Newline newline
12560 Centered, Sensitive, Enumerate,
12561 \begin_inset Newline newline
12564 Itemize, Bibliography
12570 \begin_inset Separator parbreak
12577 \begin_layout Description
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12587 means the label is the very first word (up to the first real blank).
12588 Use protected spaces if you want more than one word as the label.
12592 \begin_layout Description
12593 \begin_inset Flex Code
12596 \begin_layout Plain Layout
12602 means the label is simply what is declared as
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12613 This will be displayed
12614 \begin_inset Quotes eld
12618 \begin_inset Quotes erd
12621 , at the beginning of the paragraph.
12623 \begin_inset Flex Code
12626 \begin_layout Plain Layout
12633 \begin_inset Flex Code
12636 \begin_layout Plain Layout
12642 , then it will be displayed only in the first paragraph of any sequence
12643 of paragraphs with the same
12644 \begin_inset Flex Code
12647 \begin_layout Plain Layout
12656 \begin_layout Description
12657 \begin_inset Flex Code
12660 \begin_layout Plain Layout
12667 \begin_inset space ~
12671 \begin_inset space ~
12675 \begin_inset Flex Code
12678 \begin_layout Plain Layout
12684 are special cases of
12685 \begin_inset Flex Code
12688 \begin_layout Plain Layout
12695 The label will be printed above the paragraph either at the beginning of
12696 the line or centered.
12699 \begin_layout Description
12700 \begin_inset Flex Code
12703 \begin_layout Plain Layout
12709 is a special case for the caption-labels
12710 \begin_inset Quotes eld
12714 \begin_inset Quotes erd
12718 \begin_inset Quotes eld
12722 \begin_inset Quotes erd
12726 \begin_inset Newline newline
12730 \begin_inset Flex Code
12733 \begin_layout Plain Layout
12739 means the (hardcoded) label string depends on the kind of float: It is
12740 hardcoded to be `FloatType N', where N is the value of the counter associated
12742 For the case that a caption is inserted outside of a float the
12743 \begin_inset Flex Code
12746 \begin_layout Plain Layout
12753 \begin_inset Quotes eld
12757 \begin_inset Quotes erd
12763 \begin_layout Description
12764 \begin_inset Flex Code
12767 \begin_layout Plain Layout
12773 produces the usual sort of enumeration labels.
12774 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12775 small Roman numerals, and uppercase letters for the four possible depths.
12778 \begin_layout Description
12779 \begin_inset Flex Code
12782 \begin_layout Plain Layout
12788 produces various bullets at the different levels.
12789 It is also hardcoded.
12792 \begin_layout Description
12793 \begin_inset Flex Code
12796 \begin_layout Plain Layout
12802 should be used only with
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12807 LatexType BibEnvironment
12816 \begin_layout Description
12817 \begin_inset Flex Code
12820 \begin_layout Plain Layout
12826 Note that this will completely override any prior
12827 \begin_inset Flex Code
12830 \begin_layout Plain Layout
12836 declaration for this style.
12838 \begin_inset Quotes eld
12842 \begin_inset Flex Code
12845 \begin_layout Plain Layout
12852 \begin_inset Quotes erd
12857 \begin_inset CommandInset ref
12859 reference "sub:I18n"
12863 for details on its use.
12866 \begin_layout Description
12867 \begin_inset Flex Code
12870 \begin_layout Plain Layout
12877 \begin_inset Flex Code
12880 \begin_layout Plain Layout
12886 ] The name of the corresponding LaTeX stuff.
12887 Either the environment or command name.
12890 \begin_layout Description
12891 \begin_inset Flex Code
12894 \begin_layout Plain Layout
12901 \begin_inset Flex Code
12904 \begin_layout Plain Layout
12910 ] An optional parameter for the corresponding
12911 \begin_inset Flex Code
12914 \begin_layout Plain Layout
12921 This parameter cannot be changed from within LyX (use
12922 \begin_inset Flex Code
12925 \begin_layout Plain Layout
12931 for customizable parameters).
12932 This will be output as is after all LaTeX
12933 \begin_inset Flex Code
12936 \begin_layout Plain Layout
12945 \begin_layout Description
12946 \begin_inset Flex Code
12949 \begin_layout Plain Layout
12956 \begin_inset Flex Code
12959 \begin_layout Plain Layout
12964 , Command, Environment, Item_Environment,
12965 \begin_inset Newline newline
12968 List_Environment, Bib_Environment
12973 ] How the style should be translated into LaTeX.
12977 \begin_layout Plain Layout
12978 \begin_inset Flex Code
12981 \begin_layout Plain Layout
12987 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12988 Visit the SGML class files for specific examples.
12994 \begin_inset Separator parbreak
13001 \begin_layout Description
13002 \begin_inset Flex Code
13005 \begin_layout Plain Layout
13011 means nothing special.
13014 \begin_layout Description
13015 \begin_inset Flex Code
13018 \begin_layout Plain Layout
13025 \begin_inset Flex Code
13028 \begin_layout Plain Layout
13035 {\SpecialChar \ldots{}
13044 \begin_layout Description
13045 \begin_inset Flex Code
13048 \begin_layout Plain Layout
13055 \begin_inset Flex Code
13058 \begin_layout Plain Layout
13065 }\SpecialChar \ldots{}
13081 \begin_layout Description
13082 \begin_inset Flex Code
13085 \begin_layout Plain Layout
13092 \begin_inset Flex Code
13095 \begin_layout Plain Layout
13102 \begin_inset Flex Code
13105 \begin_layout Plain Layout
13113 is generated for each paragraph of this environment.
13117 \begin_layout Description
13118 \begin_inset Flex Code
13121 \begin_layout Plain Layout
13128 \begin_inset Flex Code
13131 \begin_layout Plain Layout
13138 \begin_inset Newline newline
13142 \begin_inset Flex Code
13145 \begin_layout Plain Layout
13151 is passed as an argument to the environment.
13152 \begin_inset Newline newline
13156 \begin_inset Flex Code
13159 \begin_layout Plain Layout
13165 can be defined in the
13166 \begin_inset Flex MenuItem
13169 \begin_layout Plain Layout
13170 Edit\SpecialChar \menuseparator
13172 \begin_inset space ~
13183 \begin_layout Description
13184 \begin_inset Flex Code
13187 \begin_layout Plain Layout
13194 \begin_inset Flex Code
13197 \begin_layout Plain Layout
13203 but adds additionally the necessary mandatory argument (the longest label)
13204 to the begin statement of the bibliography environment:
13205 \begin_inset Newline newline
13209 \begin_inset Flex Code
13212 \begin_layout Plain Layout
13215 begin{thebibliography}{99}
13220 It is therefore only useful for bibliography environments.
13221 The default longest label
13222 \begin_inset Quotes eld
13226 \begin_inset Quotes erd
13229 can be changed by the user in the paragraph settings of a bibliography
13233 \begin_layout Standard
13234 Putting the last few things together, the LaTeX output will be either:
13237 \begin_layout LyX-Code
13240 LatexName[LatexParam]{\SpecialChar \ldots{}
13244 \begin_layout Standard
13248 \begin_layout LyX-Code
13251 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13257 \begin_layout Standard
13258 depending upon the LaTeX type.
13262 \begin_layout Description
13263 \begin_inset Flex Code
13266 \begin_layout Plain Layout
13273 \begin_inset Flex Code
13276 \begin_layout Plain Layout
13282 ] A string that is put at the beginning of the style content.
13283 A line break in the output can be indicated by
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13296 \begin_layout Description
13297 \begin_inset Flex Code
13300 \begin_layout Plain Layout
13307 \begin_inset Flex Code
13310 \begin_layout Plain Layout
13316 ] If you put styles into environments, the different
13317 \begin_inset Flex Code
13320 \begin_layout Plain Layout
13326 are not simply added, but added with a factor
13327 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13331 Note that this parameter is also used when
13332 \begin_inset Flex Code
13335 \begin_layout Plain Layout
13342 \begin_inset Flex Code
13345 \begin_layout Plain Layout
13352 \begin_inset Flex Code
13355 \begin_layout Plain Layout
13362 Then it is added to the manual or dynamic margin.
13363 \begin_inset Newline newline
13367 \begin_inset Quotes eld
13371 \begin_inset Flex Code
13374 \begin_layout Plain Layout
13381 \begin_inset Quotes erd
13384 means that the paragraph is indented with the width of
13385 \begin_inset Quotes eld
13389 \begin_inset Flex Code
13392 \begin_layout Plain Layout
13399 \begin_inset Quotes erd
13402 in the normal font.
13403 You can get a negative width by prefixing the string with
13404 \begin_inset Quotes eld
13408 \begin_inset Flex Code
13411 \begin_layout Plain Layout
13418 \begin_inset Quotes erd
13422 This way was chosen so that the look is the same with each used screen
13426 \begin_layout Description
13427 \begin_inset Flex Code
13430 \begin_layout Plain Layout
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13445 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13451 \begin_inset Newline newline
13454 The kind of margin that the style has on the left side.
13455 \begin_inset Separator parbreak
13462 \begin_layout Description
13463 \begin_inset Flex Code
13466 \begin_layout Plain Layout
13472 just means a fixed margin.
13475 \begin_layout Description
13476 \begin_inset Flex Code
13479 \begin_layout Plain Layout
13485 means that the left margin depends on the string entered in the
13486 \begin_inset Flex MenuItem
13489 \begin_layout Plain Layout
13490 Edit\SpecialChar \menuseparator
13492 \begin_inset space ~
13501 This is used to typeset nice lists without tabulators.
13504 \begin_layout Description
13505 \begin_inset Flex Code
13508 \begin_layout Plain Layout
13514 means that the margin depends on the size of the label.
13515 This is used for automatic enumerated headlines.
13516 It is obvious that the headline
13517 \begin_inset Quotes eld
13520 5.4.3.2.1 Very long headline
13521 \begin_inset Quotes erd
13524 must have a wider left margin (as wide as
13525 \begin_inset Quotes eld
13529 \begin_inset Quotes erd
13532 plus the space) than
13533 \begin_inset Quotes eld
13536 3.2 Very long headline
13537 \begin_inset Quotes erd
13541 \begin_inset Quotes eld
13545 \begin_inset Quotes erd
13548 are not able to do this.
13551 \begin_layout Description
13552 \begin_inset Flex Code
13555 \begin_layout Plain Layout
13561 is similar, but only the very first row of the paragraph is dynamic, while
13562 the others are static; this is used, for example, for descriptions.
13565 \begin_layout Description
13566 \begin_inset Flex Code
13569 \begin_layout Plain Layout
13575 means the margin is chosen in a way that the longest row of this paragraph
13576 fits to the right margin.
13577 This is used to typeset an address on the right edge of the page.
13581 \begin_layout Description
13582 \begin_inset Flex Code
13585 \begin_layout Plain Layout
13592 \begin_inset Flex Code
13595 \begin_layout Plain Layout
13604 \begin_inset space \thinspace{}
13608 \begin_inset Flex Code
13611 \begin_layout Plain Layout
13617 ] Whether fragile commands in this style should be
13618 \begin_inset Flex Code
13621 \begin_layout Plain Layout
13634 whether this command should itself be protected.)
13637 \begin_layout Description
13638 \begin_inset Flex Code
13641 \begin_layout Plain Layout
13648 \begin_inset Flex Code
13651 \begin_layout Plain Layout
13658 \begin_inset space \thinspace{}
13662 \begin_inset Flex Code
13665 \begin_layout Plain Layout
13673 ] Whether newlines are translated into LaTeX newlines (
13674 \begin_inset Flex Code
13677 \begin_layout Plain Layout
13688 The translation can be switched off to allow more comfortable LaTeX editing
13692 \begin_layout Description
13693 \begin_inset Flex Code
13696 \begin_layout Plain Layout
13703 \begin_inset Flex Code
13706 \begin_layout Plain Layout
13715 \begin_inset space \thinspace{}
13719 \begin_inset Flex Code
13722 \begin_layout Plain Layout
13728 ] If set to true, and if
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13739 \begin_inset Flex Code
13742 \begin_layout Plain Layout
13748 ) paragraphs are being indented, then the indentation of such a paragraph
13749 following one of this type will be suppressed.
13750 (So this will not affect the display of non-default paragraphs.)
13753 \begin_layout Description
13754 \begin_inset Flex Code
13757 \begin_layout Plain Layout
13764 \begin_inset Flex Code
13767 \begin_layout Plain Layout
13773 ] Name of a style that has replaced this style.
13774 This is used to rename a style, while keeping backward compatibility.
13777 \begin_layout Description
13778 \begin_inset Flex Code
13781 \begin_layout Plain Layout
13788 \begin_inset Flex Code
13791 \begin_layout Plain Layout
13800 \begin_inset space \thinspace{}
13804 \begin_inset Flex Code
13807 \begin_layout Plain Layout
13813 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13814 output, but only by a line break; together with
13815 \begin_inset Flex Code
13818 \begin_layout Plain Layout
13824 , this allows to emulate a plain text editor (like the ERT inset).
13827 \begin_layout Description
13828 \begin_inset Flex Code
13831 \begin_layout Plain Layout
13838 \begin_inset Flex Code
13841 \begin_layout Plain Layout
13847 ] The indent of the very first line of a paragraph.
13849 \begin_inset Newline newline
13853 \begin_inset Flex Code
13856 \begin_layout Plain Layout
13862 will be fixed for a certain style.
13863 The exception is the default style, since the indentation for these paragraphs
13864 can be prohibited with
13865 \begin_inset Flex Code
13868 \begin_layout Plain Layout
13876 \begin_inset Flex Code
13879 \begin_layout Plain Layout
13885 style paragraphs inside environments use the
13886 \begin_inset Flex Code
13889 \begin_layout Plain Layout
13895 of the environment, not their native one.
13897 \begin_inset Flex Code
13900 \begin_layout Plain Layout
13906 paragraphs inside an enumeration are not indented.
13909 \begin_layout Description
13910 \begin_inset Flex Code
13913 \begin_layout Plain Layout
13920 \begin_inset Flex Code
13923 \begin_layout Plain Layout
13929 ] The vertical space between two paragraphs of this style.
13932 \begin_layout Description
13933 \begin_inset Flex Code
13936 \begin_layout Plain Layout
13943 \begin_inset Flex Code
13946 \begin_layout Plain Layout
13952 ] LyX allows the user to choose either
13953 \begin_inset Quotes eld
13957 \begin_inset Quotes erd
13961 \begin_inset Quotes eld
13965 \begin_inset Quotes erd
13968 to separate paragraphs.
13970 \begin_inset Quotes eld
13974 \begin_inset Quotes erd
13978 \begin_inset Flex Code
13981 \begin_layout Plain Layout
13989 \begin_inset Quotes eld
13993 \begin_inset Quotes erd
13997 \begin_inset Flex Code
14000 \begin_layout Plain Layout
14006 is ignored and all paragraphs are separated by the
14007 \begin_inset Flex Code
14010 \begin_layout Plain Layout
14017 The vertical space is calculated with
14018 \begin_inset Flex Code
14021 \begin_layout Plain Layout
14023 \begin_inset space ~
14032 \begin_inset Flex Code
14035 \begin_layout Plain Layout
14041 is the height of a row with the normal font.
14042 This way, the look stays the same with different screen fonts.
14045 \begin_layout Description
14046 \begin_inset Flex Code
14049 \begin_layout Plain Layout
14056 \begin_inset Flex Code
14059 \begin_layout Plain Layout
14068 \begin_inset space \thinspace{}
14072 \begin_inset Flex Code
14075 \begin_layout Plain Layout
14081 ] Whether the contents of this paragraph should be output in raw form, meaning
14082 without special translations that LaTeX would require.
14085 \begin_layout Description
14086 \begin_inset Flex Code
14089 \begin_layout Plain Layout
14095 Information to be included in the LaTeX preamble when this style is used.
14096 Used to define macros, load packages, etc., required by this particular
14099 \begin_inset Quotes eld
14103 \begin_inset Flex Code
14106 \begin_layout Plain Layout
14113 \begin_inset Quotes erd
14119 \begin_layout Description
14120 \begin_inset Flex Code
14123 \begin_layout Plain Layout
14130 \begin_inset Flex Code
14133 \begin_layout Plain Layout
14139 ] The prefix to use when creating labels referring to paragraphs of this
14141 This allows the use of formatted references.
14144 \begin_layout Description
14145 \begin_inset Flex Code
14148 \begin_layout Plain Layout
14155 \begin_inset Flex Code
14158 \begin_layout Plain Layout
14164 ] Whether the style requires the feature
14165 \begin_inset Flex Code
14168 \begin_layout Plain Layout
14175 See the description of
14176 \begin_inset Flex Code
14179 \begin_layout Plain Layout
14186 \begin_inset CommandInset ref
14188 reference "sub:General-text-class"
14192 ) for information on `features'.
14195 \begin_layout Description
14196 \begin_inset Flex Code
14199 \begin_layout Plain Layout
14206 \begin_inset Flex Code
14209 \begin_layout Plain Layout
14218 \begin_inset Flex Code
14221 \begin_layout Plain Layout
14227 ] Resets the LaTeX arguments of this style (as defined via the
14228 \begin_inset Flex Code
14231 \begin_layout Plain Layout
14238 This is useful if you have copied a style via
14239 \begin_inset Flex Code
14242 \begin_layout Plain Layout
14248 , but you do not want to inherit its (required and optional) arguments.
14251 \begin_layout Description
14252 \begin_inset Flex Code
14255 \begin_layout Plain Layout
14262 \begin_inset Flex Code
14265 \begin_layout Plain Layout
14271 ] A string that is put at the end of the layout content.
14272 A line break in the output can be indicated by
14273 \begin_inset Flex Code
14276 \begin_layout Plain Layout
14285 \begin_layout Description
14286 \begin_inset Flex Code
14289 \begin_layout Plain Layout
14296 \begin_inset Flex Code
14299 \begin_layout Plain Layout
14306 \begin_inset Flex Code
14309 \begin_layout Plain Layout
14318 \begin_layout Description
14319 \begin_inset Flex Code
14322 \begin_layout Plain Layout
14329 \begin_inset Flex Code
14332 \begin_layout Plain Layout
14341 \begin_inset Flex Code
14344 \begin_layout Plain Layout
14351 \begin_inset Flex Code
14354 \begin_layout Plain Layout
14361 \begin_inset Flex Code
14364 \begin_layout Plain Layout
14366 \begin_inset space ~
14374 ] This defines what the default spacing should be in the style.
14376 \begin_inset Flex Code
14379 \begin_layout Plain Layout
14386 \begin_inset Flex Code
14389 \begin_layout Plain Layout
14396 \begin_inset Flex Code
14399 \begin_layout Plain Layout
14405 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14406 If you specify the argument
14407 \begin_inset Flex Code
14410 \begin_layout Plain Layout
14416 , then you must also provide a value argument which will be the actual multiplie
14418 Note that, contrary to other parameters,
14419 \begin_inset Flex Code
14422 \begin_layout Plain Layout
14428 implies the generation of specific LaTeX code, using the LaTeX package
14432 \begin_inset Flex Code
14435 \begin_layout Plain Layout
14444 \begin_layout Description
14445 \begin_inset Flex Code
14448 \begin_layout Plain Layout
14455 \begin_inset Flex Code
14458 \begin_layout Plain Layout
14465 \begin_inset space \thinspace{}
14469 \begin_inset Flex Code
14472 \begin_layout Plain Layout
14480 ] Allow spell-checking paragraphs of this style.
14484 \begin_layout Description
14485 \begin_inset Flex Code
14488 \begin_layout Plain Layout
14494 The font used for the text body .
14496 \begin_inset CommandInset ref
14498 reference "sub:Font-description"
14505 \begin_layout Description
14506 \begin_inset Flex Code
14509 \begin_layout Plain Layout
14518 \begin_inset Flex Code
14521 \begin_layout Plain Layout
14531 The level of the style in the table of contents.
14532 This is used for automatic numbering of section headings.
14533 \change_inserted -712698321 1401363541
14537 \begin_layout Description
14539 \change_inserted -712698321 1401363906
14540 \begin_inset Flex Code
14543 \begin_layout Plain Layout
14545 \change_inserted -712698321 1401363547
14554 \begin_inset Flex Code
14557 \begin_layout Plain Layout
14559 \change_inserted -712698321 1401363664
14572 \begin_inset Flex Code
14575 \begin_layout Plain Layout
14577 \change_inserted -712698321 1401363669
14586 \begin_inset Flex Code
14589 \begin_layout Plain Layout
14591 \change_inserted -712698321 1401363675
14599 ] This tag determines whether the first line indentation of this paragraph
14600 can be toggled via the Paragraph settings dialog.
14604 \begin_inset Flex Code
14607 \begin_layout Plain Layout
14609 \change_inserted -712698321 1401363761
14619 is set, indentation can be toggled if the document settings use
14620 \begin_inset Quotes eld
14624 \begin_inset Quotes erd
14627 paragraph style, with
14628 \begin_inset Flex Code
14631 \begin_layout Plain Layout
14633 \change_inserted -712698321 1401363844
14639 , indentation can always be toggled, notwithstanding the document settings,
14641 \begin_inset Flex Code
14644 \begin_layout Plain Layout
14646 \change_inserted -712698321 1401363901
14652 , indentation can never be toggled.
14657 \begin_layout Description
14658 \begin_inset Flex Code
14661 \begin_layout Plain Layout
14668 \begin_inset Flex Code
14671 \begin_layout Plain Layout
14677 ] The vertical space with which the very first of a chain of paragraphs
14678 with this style is separated from the previous paragraph.
14679 If the previous paragraph has another style, the separations are not simply
14680 added, but the maximum is taken.
14683 \begin_layout Subsection
14684 \begin_inset CommandInset label
14690 Internationalization of Paragraph Styles
14693 \begin_layout Standard
14694 LyX has long supported internationalization of layout information, but,
14695 until version 2.0, this applied only to the user interface and not to, say,
14697 Thus, French authors were forced to resort to ugly hacks if they wanted
14702 1' instead of `Theorem 1'.
14703 Thanks to Georg Baum, that is no longer the case.
14706 \begin_layout Standard
14708 \begin_inset Flex Code
14711 \begin_layout Plain Layout
14717 defines text that is to appear in the typeset document, it may use
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14728 \begin_inset Flex Code
14731 \begin_layout Plain Layout
14737 to support non-English and even multi-language documents correctly.
14738 The following excerpt (from the
14739 \begin_inset Flex Code
14742 \begin_layout Plain Layout
14748 file) shows how this works:
14751 \begin_layout LyX-Code
14753 \begin_inset Separator parbreak
14760 \begin_layout LyX-Code
14763 theoremstyle{remark}
14766 \begin_layout LyX-Code
14769 newtheorem{claim}[thm]{
14776 \begin_layout LyX-Code
14780 \begin_layout LyX-Code
14784 \begin_layout LyX-Code
14789 claimname}{_(Claim)}
14792 \begin_layout LyX-Code
14796 \begin_layout LyX-Code
14800 \begin_layout LyX-Code
14809 claimname}{_(Claim)}}
14812 \begin_layout LyX-Code
14817 \begin_layout Standard
14818 In principle, any legal LaTeX may appear in the
14819 \begin_inset Flex Code
14822 \begin_layout Plain Layout
14829 \begin_inset Flex Code
14832 \begin_layout Plain Layout
14838 tags, but in practice they will typically look as they do here.
14839 The key to correct translation of the typeset text is the definition of
14841 \begin_inset Flex Code
14844 \begin_layout Plain Layout
14853 \begin_inset Flex Code
14856 \begin_layout Plain Layout
14868 \begin_layout Standard
14870 \begin_inset Flex Code
14873 \begin_layout Plain Layout
14879 tag provides for internationalization based upon the overall language of
14881 The contents of the tag will be included in the preamble, just as with
14883 \begin_inset Flex Code
14886 \begin_layout Plain Layout
14893 What makes it special is the use of the
14894 \begin_inset Quotes eld
14898 \begin_inset Quotes erd
14902 \begin_inset Flex Code
14905 \begin_layout Plain Layout
14911 , which will be replaced, when LyX produces LaTeX output, with the translation
14912 of its argument into the document language.
14915 \begin_layout Standard
14917 \begin_inset Flex Code
14920 \begin_layout Plain Layout
14926 tag is more complex, since it is meant to provide support for multi-language
14927 documents and so offers an interface to the
14928 \begin_inset Flex Code
14931 \begin_layout Plain Layout
14938 Its contents will be added to the preamble once for each language that
14939 appears in the document.
14940 In this case, the argument to
14941 \begin_inset Flex Code
14944 \begin_layout Plain Layout
14950 will be replaced with its translation into the language in question; the
14952 \begin_inset Flex Code
14955 \begin_layout Plain Layout
14961 is replaced by the language name (as used by the babel package).
14964 \begin_layout Standard
14965 A German document that also included a French section would thus have the
14966 following in the preamble:
14969 \begin_layout LyX-Code
14978 claimname}{Affirmation}}
14979 \begin_inset Newline newline
14990 claimname}{Behauptung}}
14991 \begin_inset Newline newline
14998 claimname}{Behauptung}
15001 \begin_layout Standard
15003 \begin_inset Flex Code
15006 \begin_layout Plain Layout
15012 will then conspire to produce the correct text in the output.
15015 \begin_layout Standard
15016 One important point to note here is that the translations are provided by
15017 LyX itself, through the file
15018 \begin_inset Flex Code
15021 \begin_layout Plain Layout
15028 This means, in effect, that
15029 \begin_inset Flex Code
15032 \begin_layout Plain Layout
15039 \begin_inset Flex Code
15042 \begin_layout Plain Layout
15048 are really only of use in layout files that are provided with LyX, since
15049 text entered in user-created layout files will not be seen by LyX's internation
15050 alization routines unless the
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15060 file is modified accordingly.
15061 That said, however, any layout created with the intention that it will
15062 be included with LyX should use these tags where appropriate.
15063 Please note that the paragraph style translations provided by LyX will
15064 never change with a minor update (e.
15065 \begin_inset space \thinspace{}
15069 \begin_inset space \space{}
15072 from version 2.1.x to 2.1.y).
15073 It is however quite likely that a major update (e.
15074 \begin_inset space \thinspace{}
15078 \begin_inset space \space{}
15081 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15084 \begin_layout Subsection
15086 \begin_inset CommandInset label
15095 \begin_layout Standard
15096 It is necessary to define the floats (
15097 \begin_inset Flex MenuItem
15100 \begin_layout Plain Layout
15107 \begin_inset Flex MenuItem
15110 \begin_layout Plain Layout
15116 , \SpecialChar \ldots{}
15117 ) in the text class itself.
15118 Standard floats are included in the file
15119 \begin_inset Flex Code
15122 \begin_layout Plain Layout
15128 , so you may have to do no more than add
15131 \begin_layout LyX-Code
15132 Input stdfloats.inc
15135 \begin_layout Standard
15136 to your layout file.
15137 If you want to implement a text class that proposes some other float types
15138 (like the AGU class bundled with LyX), the information below will hopefully
15142 \begin_layout Description
15143 \begin_inset Flex Code
15146 \begin_layout Plain Layout
15153 \begin_inset Flex Code
15156 \begin_layout Plain Layout
15163 \begin_inset Quotes erd
15167 \begin_inset Quotes erd
15170 ] The file name extension of an auxiliary file for the list of figures (or
15172 LaTeX writes the captions to this file.
15175 \begin_layout Description
15176 \begin_inset Flex Code
15179 \begin_layout Plain Layout
15186 \begin_inset Flex Code
15189 \begin_layout Plain Layout
15196 \begin_inset Quotes erd
15200 \begin_inset Quotes erd
15203 ] The string that will be used in the menus and also for the caption.
15204 This is translated to the current language if babel is used.
15207 \begin_layout Description
15208 \begin_inset Flex Code
15211 \begin_layout Plain Layout
15217 These tags control the XHTML output.
15219 \begin_inset CommandInset ref
15221 reference "sec:Tags-for-XHTML"
15228 \begin_layout Description
15229 \begin_inset Flex Code
15232 \begin_layout Plain Layout
15241 \begin_inset Flex Code
15244 \begin_layout Plain Layout
15253 \begin_inset space \thinspace{}
15257 \begin_inset Flex Code
15260 \begin_layout Plain Layout
15266 ] Indicates whether the float is already defined in the document class or
15267 if instead the LaTeX package
15268 \begin_inset Flex Code
15271 \begin_layout Plain Layout
15277 needs to be loaded to define it on-the-fly.
15279 \begin_inset Flex Code
15282 \begin_layout Plain Layout
15289 \begin_inset Flex Code
15292 \begin_layout Plain Layout
15299 It should be set to
15300 \begin_inset Flex Code
15303 \begin_layout Plain Layout
15309 if the float is already defined by the LaTeX document class.
15312 \begin_layout Description
15313 \begin_inset Flex Code
15316 \begin_layout Plain Layout
15323 \begin_inset Flex Code
15326 \begin_layout Plain Layout
15333 \begin_inset Quotes erd
15337 \begin_inset Quotes erd
15340 ] The command used to generate a list of floats of this type; the leading
15349 \begin_inset Flex Code
15352 \begin_layout Plain Layout
15358 is false, since there is no standard way to generate this command.
15360 \begin_inset Flex Code
15363 \begin_layout Plain Layout
15369 is true, since in that case there is a standard way to define the command.
15372 \begin_layout Description
15373 \begin_inset Flex Code
15376 \begin_layout Plain Layout
15383 \begin_inset Flex Code
15386 \begin_layout Plain Layout
15393 \begin_inset Quotes erd
15397 \begin_inset Quotes erd
15400 ] A title for a list of floats of this kind (list of figures, tables, or
15402 It is used for the screen label within LyX, it is used by LaTeX for the
15403 title and it is used as the title in the XHTML output.
15404 It will be translated to the document language.
15407 \begin_layout Description
15408 \begin_inset Flex Code
15411 \begin_layout Plain Layout
15418 \begin_inset Flex Code
15421 \begin_layout Plain Layout
15428 \begin_inset Quotes erd
15432 \begin_inset Quotes erd
15435 ] This (optional) argument determines whether floats of this class will
15436 be numbered within some sectional unit of the document.
15438 \begin_inset Flex Code
15441 \begin_layout Plain Layout
15448 \begin_inset Quotes eld
15452 \begin_inset Flex Code
15455 \begin_layout Plain Layout
15462 \begin_inset Quotes erd
15465 , the floats will be numbered within chapters.
15469 \begin_layout Description
15470 \begin_inset Flex Code
15473 \begin_layout Plain Layout
15480 \begin_inset Flex Code
15483 \begin_layout Plain Layout
15490 \begin_inset Quotes erd
15494 \begin_inset Quotes erd
15497 ] The default placement for the given class of floats.
15498 The string should be as in standard LaTeX:
15499 \begin_inset Flex Code
15502 \begin_layout Plain Layout
15509 \begin_inset Flex Code
15512 \begin_layout Plain Layout
15519 \begin_inset Flex Code
15522 \begin_layout Plain Layout
15529 \begin_inset Flex Code
15532 \begin_layout Plain Layout
15538 for top, bottom, page, and here, respectively.
15542 \begin_layout Plain Layout
15543 Note that the order of these letters in the string is irrelevant, like in
15549 On top of that there is a new type,
15550 \begin_inset Flex Code
15553 \begin_layout Plain Layout
15559 , which does not really correspond to a float, since it means: put it
15560 \begin_inset Quotes eld
15564 \begin_inset Quotes erd
15568 Note however that the
15569 \begin_inset Flex Code
15572 \begin_layout Plain Layout
15578 specifier is special and, because of implementation details, cannot be
15579 used in non-built in float types.
15580 If you do not understand what this means, just use
15581 \begin_inset Quotes eld
15585 \begin_inset Flex Code
15588 \begin_layout Plain Layout
15595 \begin_inset Quotes erd
15601 \begin_layout Description
15602 \begin_inset Flex Code
15605 \begin_layout Plain Layout
15612 \begin_inset Flex Code
15615 \begin_layout Plain Layout
15621 ] The prefix to use when creating labels referring to floats of this type.
15622 This allows the use of formatted references.
15623 Note that you can remove any
15624 \begin_inset Flex Code
15627 \begin_layout Plain Layout
15633 set by a copied style by using the special value
15634 \begin_inset Quotes eld
15638 \begin_inset Quotes erd
15641 , which must be all caps.
15644 \begin_layout Description
15645 \begin_inset Flex Code
15648 \begin_layout Plain Layout
15655 \begin_inset Flex Code
15658 \begin_layout Plain Layout
15665 \begin_inset Quotes erd
15669 \begin_inset Quotes erd
15672 ] The style used when defining the float using
15673 \begin_inset Flex Code
15676 \begin_layout Plain Layout
15687 \begin_layout Description
15688 \begin_inset Flex Code
15691 \begin_layout Plain Layout
15698 \begin_inset Flex Code
15701 \begin_layout Plain Layout
15708 \begin_inset Quotes erd
15712 \begin_inset Quotes erd
15716 \begin_inset Quotes eld
15720 \begin_inset Quotes erd
15723 of the new class of floats, like program or algorithm.
15724 After the appropriate
15725 \begin_inset Flex Code
15728 \begin_layout Plain Layout
15737 \begin_inset Flex Code
15740 \begin_layout Plain Layout
15749 \begin_inset Flex Code
15752 \begin_layout Plain Layout
15763 \begin_layout Description
15764 \begin_inset Flex Code
15767 \begin_layout Plain Layout
15774 \begin_inset Flex Code
15777 \begin_layout Plain Layout
15784 \begin_inset space \thinspace{}
15788 \begin_inset Flex Code
15791 \begin_layout Plain Layout
15799 ] Specifies whether this float is defined using the LaTeX package
15800 \begin_inset Flex Code
15803 \begin_layout Plain Layout
15809 , either by the class file, another package or on-the-fly by LyX itself.
15812 \begin_layout Standard
15813 Note that defining a float with type
15814 \begin_inset Flex Code
15817 \begin_layout Plain Layout
15825 automatically defines the corresponding counter with name
15826 \begin_inset Flex Code
15829 \begin_layout Plain Layout
15840 \begin_layout Subsection
15841 Flex insets and InsetLayout
15842 \begin_inset CommandInset label
15844 name "sub:Flex-insets-and"
15851 \begin_layout Standard
15852 Flex insets come in three different kinds:
15855 \begin_layout Itemize
15857 \begin_inset Flex Code
15860 \begin_layout Plain Layout
15866 ): These define semantic markup corresponding to such LaTeX commands as
15868 \begin_inset Flex Code
15871 \begin_layout Plain Layout
15880 \begin_inset Flex Code
15883 \begin_layout Plain Layout
15894 \begin_layout Itemize
15896 \begin_inset Flex Code
15899 \begin_layout Plain Layout
15905 ): These can be used to define custom collapsible insets, similar to TeX
15906 code, footnote, and the like.
15907 An obvious example is an endnote inset, which is defined in the
15908 \begin_inset Flex Code
15911 \begin_layout Plain Layout
15920 \begin_layout Itemize
15922 \begin_inset Flex Code
15925 \begin_layout Plain Layout
15931 ): For use with DocBook classes.
15934 \begin_layout Standard
15935 Flex insets are defined using the
15936 \begin_inset Flex Code
15939 \begin_layout Plain Layout
15945 tag, which shall be explained in a moment.
15948 \begin_layout Standard
15950 \begin_inset Flex Code
15953 \begin_layout Plain Layout
15959 tag also serves another function: It can be used to customize the general
15960 layout of many different types of insets.
15962 \begin_inset Flex Code
15965 \begin_layout Plain Layout
15971 can be used to customize the layout parameters for footnotes, marginal
15972 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15973 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15977 \begin_layout Standard
15979 \begin_inset Flex Code
15982 \begin_layout Plain Layout
15988 definition must begin with a line of the form:
15991 \begin_layout LyX-Code
15995 \begin_layout Standard
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16006 indicates the inset whose layout is being defined, and here there are four
16010 \begin_layout Enumerate
16011 The layout for a pre-existing inset is being modified.
16012 In this case, can be
16013 \begin_inset Flex Code
16016 \begin_layout Plain Layout
16022 any one of the following:
16023 \begin_inset Flex Code
16026 \begin_layout Plain Layout
16033 \begin_inset Flex Code
16036 \begin_layout Plain Layout
16043 \begin_inset Flex Code
16046 \begin_layout Plain Layout
16053 \begin_inset Flex Code
16056 \begin_layout Plain Layout
16063 \begin_inset Flex Code
16066 \begin_layout Plain Layout
16073 \begin_inset Flex Code
16076 \begin_layout Plain Layout
16083 \begin_inset Flex Code
16086 \begin_layout Plain Layout
16093 \begin_inset Flex Code
16096 \begin_layout Plain Layout
16103 \begin_inset Flex Code
16106 \begin_layout Plain Layout
16113 \begin_inset Flex Code
16116 \begin_layout Plain Layout
16123 \begin_inset Flex Code
16126 \begin_layout Plain Layout
16133 \begin_inset Flex Code
16136 \begin_layout Plain Layout
16143 \begin_inset Flex Code
16146 \begin_layout Plain Layout
16153 \begin_inset Flex Code
16156 \begin_layout Plain Layout
16163 \begin_inset Flex Code
16166 \begin_layout Plain Layout
16173 \begin_inset Flex Code
16176 \begin_layout Plain Layout
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16193 \begin_inset Flex Code
16196 \begin_layout Plain Layout
16203 \begin_inset Flex Code
16206 \begin_layout Plain Layout
16213 \begin_inset Flex Code
16216 \begin_layout Plain Layout
16225 \begin_layout Enumerate
16226 The layout for a Flex inset is being defined.
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16237 must be of the form
16238 \begin_inset Quotes eld
16242 \begin_inset Flex Code
16245 \begin_layout Plain Layout
16252 \begin_inset Quotes erd
16256 \begin_inset Flex Code
16259 \begin_layout Plain Layout
16265 may be be any valid identifier not used by a pre-existing Flex inset.
16266 The identifier may include spaces, but in that case the whole thing must
16267 be wrapped in quotes.
16268 Note that the definition of a flex inset
16273 \begin_inset Flex Code
16276 \begin_layout Plain Layout
16282 entry, declaring which type of inset it defines.
16285 \begin_layout Enumerate
16286 The layout for user specific branch is being defined.
16288 \begin_inset Flex Code
16291 \begin_layout Plain Layout
16297 must be of the form
16298 \begin_inset Quotes eld
16302 \begin_inset Flex Code
16305 \begin_layout Plain Layout
16312 \begin_inset Quotes erd
16316 \begin_inset Flex Code
16319 \begin_layout Plain Layout
16325 may be be any valid identifier of branch defined in user's document.
16326 The identifier may include spaces, but in that case the whole thing must
16327 be wrapped in quotes.
16328 The main purpose of this feature is to allow LaTeX wrapping around specific
16329 branches as user needs.
16332 \begin_layout Enumerate
16333 The layout of a user (or class) specific caption is being defined.
16335 \begin_inset Flex Code
16338 \begin_layout Plain Layout
16344 must be of the form
16345 \begin_inset Quotes eld
16349 \begin_inset Flex Code
16352 \begin_layout Plain Layout
16359 \begin_inset Quotes erd
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16372 specifies the name of the caption as it appears in the menu.
16373 Have a look at the standard caption (
16374 \begin_inset Flex Code
16377 \begin_layout Plain Layout
16383 ), the specific captions of the KOMA-Script classes (
16384 \begin_inset Flex Code
16387 \begin_layout Plain Layout
16394 \begin_inset Flex Code
16397 \begin_layout Plain Layout
16406 \begin_inset space ~
16412 \begin_inset Flex Code
16415 \begin_layout Plain Layout
16421 ) for applications.
16424 \begin_layout Standard
16426 \begin_inset Flex Code
16429 \begin_layout Plain Layout
16435 definition can contain the following entries:
16438 \begin_layout Description
16439 \begin_inset Flex Code
16442 \begin_layout Plain Layout
16449 \begin_inset Flex Code
16452 \begin_layout Plain Layout
16458 ] Defines argument number of a command\SpecialChar \slash{}
16459 environment associated with the current
16461 The definition must end with
16462 \begin_inset Flex Code
16465 \begin_layout Plain Layout
16473 \begin_inset CommandInset ref
16475 reference "sub:Paragraph-Styles"
16482 \begin_layout Description
16483 \begin_inset Flex Code
16486 \begin_layout Plain Layout
16492 Preamble for changing language commands; see
16493 \begin_inset CommandInset ref
16495 reference "sub:I18n"
16502 \begin_layout Description
16503 \begin_inset Flex Code
16506 \begin_layout Plain Layout
16513 \begin_inset Flex Code
16516 \begin_layout Plain Layout
16522 ] The color for the inset's background.
16524 \begin_inset CommandInset ref
16526 reference "chap:Names-of-colors"
16530 for a list of the available color names.
16533 \begin_layout Description
16534 \begin_inset Flex Code
16537 \begin_layout Plain Layout
16544 \begin_inset Flex Code
16547 \begin_layout Plain Layout
16556 \begin_inset space \thinspace{}
16560 \begin_inset Flex Code
16563 \begin_layout Plain Layout
16569 ] Whether to use the content of the inset as the label, when the inset is
16574 \begin_layout Description
16575 \begin_inset Flex Code
16578 \begin_layout Plain Layout
16585 \begin_inset Flex Code
16588 \begin_layout Plain Layout
16594 ] As with paragraph styles, see
16595 \begin_inset CommandInset ref
16597 reference "sub:Paragraph-Styles"
16602 Note that you need to specify the complete type, e.
16603 \begin_inset space \thinspace{}
16607 \begin_inset space ~
16611 \begin_inset Flex Code
16614 \begin_layout Plain Layout
16615 CopyStyle Flex:<name>
16623 \begin_layout Description
16624 \begin_inset Flex Code
16627 \begin_layout Plain Layout
16634 \begin_inset Flex Code
16637 \begin_layout Plain Layout
16646 \begin_inset space \thinspace{}
16650 \begin_inset Flex Code
16653 \begin_layout Plain Layout
16659 ] Indicates whether the user may employ the Paragraph Settings dialog to
16660 customize the paragraph.
16663 \begin_layout Description
16664 \begin_inset Flex Code
16667 \begin_layout Plain Layout
16674 \begin_inset Flex Code
16677 \begin_layout Plain Layout
16684 \begin_inset Flex Code
16687 \begin_layout Plain Layout
16694 \begin_inset Flex Code
16697 \begin_layout Plain Layout
16703 , describing the rendering style used for the inset's frame and buttons.
16704 Footnotes generally use
16705 \begin_inset Flex Code
16708 \begin_layout Plain Layout
16714 , ERT insets generally
16715 \begin_inset Flex Code
16718 \begin_layout Plain Layout
16724 , and character styles
16725 \begin_inset Flex Code
16728 \begin_layout Plain Layout
16737 \begin_layout Description
16738 \begin_inset Flex Code
16741 \begin_layout Plain Layout
16748 \begin_inset Flex Code
16751 \begin_layout Plain Layout
16760 \begin_inset space \thinspace{}
16766 \begin_inset Flex Code
16769 \begin_layout Plain Layout
16778 \begin_inset Flex Code
16781 \begin_layout Plain Layout
16788 \begin_inset Flex Code
16791 \begin_layout Plain Layout
16798 Indicates whether the environment will stand on its own in the output or
16799 will appear inline with the surrounding text.
16800 If set to false, it is supposed that the LaTeX environment ignores white
16801 space (including one newline character) after the
16802 \begin_inset Flex Code
16805 \begin_layout Plain Layout
16818 \begin_inset Flex Code
16821 \begin_layout Plain Layout
16837 \begin_layout Description
16838 \begin_inset Flex Code
16841 \begin_layout Plain Layout
16847 Required at the end of the
16848 \begin_inset Flex Code
16851 \begin_layout Plain Layout
16860 \begin_layout Description
16861 \begin_inset Flex Code
16864 \begin_layout Plain Layout
16870 The font used for both the text body
16876 \begin_inset CommandInset ref
16878 reference "sub:Font-description"
16883 Note that defining this font automatically defines the
16884 \begin_inset Flex Code
16887 \begin_layout Plain Layout
16893 to the same value, so define this first and define
16894 \begin_inset Flex Code
16897 \begin_layout Plain Layout
16903 later if you want them to be different.
16906 \begin_layout Description
16907 \begin_inset Flex Code
16910 \begin_layout Plain Layout
16911 ForceLocalFontSwitch
16917 \begin_inset Flex Code
16920 \begin_layout Plain Layout
16929 \begin_inset space \thinspace{}
16933 \begin_inset Flex Code
16936 \begin_layout Plain Layout
16942 ] When using babel, always use a local font switch (
16943 \begin_inset Flex Code
16946 \begin_layout Plain Layout
16954 ), never a global one (such as
16955 \begin_inset Flex Code
16958 \begin_layout Plain Layout
16969 \begin_layout Description
16970 \begin_inset Flex Code
16973 \begin_layout Plain Layout
16980 \begin_inset Flex Code
16983 \begin_layout Plain Layout
16992 \begin_inset space \thinspace{}
16996 \begin_inset Flex Code
16999 \begin_layout Plain Layout
17006 \begin_inset Quotes eld
17010 \begin_inset Quotes erd
17013 language, leading to Left-to-Right (Latin) output, e.
17014 \begin_inset space \thinspace{}
17018 \begin_inset space \space{}
17021 in TeX code or URL.
17023 \change_inserted -712698321 1417441977
17027 \begin_layout Description
17029 \change_inserted -712698321 1417442090
17030 \begin_inset Flex Code
17033 \begin_layout Plain Layout
17035 \change_inserted -712698321 1417441983
17042 \begin_inset Flex Code
17045 \begin_layout Plain Layout
17047 \change_inserted -712698321 1417441978
17056 \begin_inset space \thinspace{}
17060 \begin_inset Flex Code
17063 \begin_layout Plain Layout
17065 \change_inserted -712698321 1417441978
17071 ] Force a a line break in the LaTeX output before the inset starts and after
17073 This assures the inset itself is output on its own lines, for parsing purposes.
17075 \change_inserted 274215730 1419105878
17081 \begin_layout Description
17082 \begin_inset Flex Code
17085 \begin_layout Plain Layout
17092 \begin_inset Flex Code
17095 \begin_layout Plain Layout
17104 \begin_inset space \thinspace{}
17108 \begin_inset Flex Code
17111 \begin_layout Plain Layout
17117 ] Indicates whether the
17118 \begin_inset Flex Code
17121 \begin_layout Plain Layout
17127 should be used or, instead, the user can change the paragraph style used
17132 \begin_layout Description
17133 \begin_inset Flex Code
17136 \begin_layout Plain Layout
17143 \begin_inset Flex Code
17146 \begin_layout Plain Layout
17155 \begin_inset space \thinspace{}
17159 \begin_inset Flex Code
17162 \begin_layout Plain Layout
17168 ] As with paragraph styles, see
17169 \begin_inset CommandInset ref
17171 reference "sub:Paragraph-Styles"
17178 \begin_layout Description
17179 \begin_inset Flex Code
17182 \begin_layout Plain Layout
17188 These tags control the XHTML output.
17190 \begin_inset CommandInset ref
17192 reference "sec:Tags-for-XHTML"
17199 \begin_layout Description
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17210 \begin_inset Flex Code
17213 \begin_layout Plain Layout
17222 \begin_inset space \thinspace{}
17226 \begin_inset Flex Code
17229 \begin_layout Plain Layout
17235 ] Whether to include the contents of this inset in the strings generated
17236 for the `Outline' pane.
17237 One would not, for example, want the content of a footnote in a section
17238 header to be included in the TOC displayed in the outline, but one would
17239 normally want the content of a character style displayed.
17240 Default is false: not to include.
17243 \begin_layout Description
17244 \begin_inset Flex Code
17247 \begin_layout Plain Layout
17256 \begin_inset Flex Code
17259 \begin_layout Plain Layout
17268 \begin_inset space \thinspace{}
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17281 ] As with paragraph styles, see
17282 \begin_inset CommandInset ref
17284 reference "sub:Paragraph-Styles"
17291 \begin_layout Description
17292 \begin_inset Flex Code
17295 \begin_layout Plain Layout
17301 The font used for the label.
17303 \begin_inset CommandInset ref
17305 reference "sub:Font-description"
17310 Note that this definition can never appear before
17311 \begin_inset Flex Code
17314 \begin_layout Plain Layout
17320 , lest it be ineffective.
17323 \begin_layout Description
17324 \begin_inset Flex Code
17327 \begin_layout Plain Layout
17334 \begin_inset Flex Code
17337 \begin_layout Plain Layout
17344 \begin_inset Quotes erd
17348 \begin_inset Quotes erd
17351 ] What will be displayed on the button or elsewhere as the inset label.
17353 \begin_inset Flex Code
17356 \begin_layout Plain Layout
17363 \begin_inset Flex Code
17366 \begin_layout Plain Layout
17372 ) modify this label on the fly.
17375 \begin_layout Description
17376 \begin_inset Flex Code
17379 \begin_layout Plain Layout
17385 Language dependent preamble; see
17386 \begin_inset CommandInset ref
17388 reference "sub:I18n"
17395 \begin_layout Description
17396 \begin_inset Flex Code
17399 \begin_layout Plain Layout
17406 \begin_inset Flex Code
17409 \begin_layout Plain Layout
17415 ] The name of the corresponding LaTeX stuff.
17416 Either the environment or command name.
17419 \begin_layout Description
17420 \begin_inset Flex Code
17423 \begin_layout Plain Layout
17430 \begin_inset Flex Code
17433 \begin_layout Plain Layout
17439 ] The optional parameter for the corresponding
17440 \begin_inset Flex Code
17443 \begin_layout Plain Layout
17449 stuff, including possible bracket pairs like
17450 \begin_inset Flex Code
17453 \begin_layout Plain Layout
17460 This parameter cannot be changed from within LyX (use
17461 \begin_inset Flex Code
17464 \begin_layout Plain Layout
17470 for customizable parameters).
17471 It will be output as is after all LaTeX
17472 \begin_inset Flex Code
17475 \begin_layout Plain Layout
17484 \begin_layout Description
17485 \begin_inset Flex Code
17488 \begin_layout Plain Layout
17495 \begin_inset Flex Code
17498 \begin_layout Plain Layout
17499 Command, Environment, None
17504 ] How the style should be translated into LaTeX.
17508 \begin_layout Plain Layout
17509 \begin_inset Flex Code
17512 \begin_layout Plain Layout
17518 is perhaps a bit misleading, since these rules apply to SGML classes too.
17519 Visit the SGML class files for specific examples.
17525 \begin_inset Separator parbreak
17532 \begin_layout Description
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17542 means nothing special
17545 \begin_layout Description
17546 \begin_inset Flex Code
17549 \begin_layout Plain Layout
17556 \begin_inset Flex Code
17559 \begin_layout Plain Layout
17566 {\SpecialChar \ldots{}
17575 \begin_layout Description
17576 \begin_inset Flex Code
17579 \begin_layout Plain Layout
17586 \begin_inset Flex Code
17589 \begin_layout Plain Layout
17596 }\SpecialChar \ldots{}
17611 \begin_layout Standard
17612 Putting the last few things together, the LaTeX output will be either:
17615 \begin_layout LyX-Code
17618 LatexName[LatexParam]{\SpecialChar \ldots{}
17622 \begin_layout Standard
17626 \begin_layout LyX-Code
17629 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17635 \begin_layout Standard
17636 depending upon the LaTeX type.
17640 \begin_layout Description
17641 \begin_inset Flex Code
17644 \begin_layout Plain Layout
17651 \begin_inset Flex Code
17654 \begin_layout Plain Layout
17660 ] A string that is put at the beginning of the layout content.
17661 A line break in the output can be indicated by
17662 \begin_inset Flex Code
17665 \begin_layout Plain Layout
17674 \begin_layout Description
17675 \begin_inset Flex Code
17678 \begin_layout Plain Layout
17685 \begin_inset Flex Code
17688 \begin_layout Plain Layout
17695 \begin_inset Flex Code
17698 \begin_layout Plain Layout
17705 \begin_inset Flex Code
17708 \begin_layout Plain Layout
17715 \begin_inset Flex Code
17718 \begin_layout Plain Layout
17724 (indicating a dummy definition ending definitions of charstyles, etc).
17725 This entry is required in and is only meaningful for Flex insets.
17726 Among other things, it determines on which menu this inset will appear.
17728 \begin_inset Flex Code
17731 \begin_layout Plain Layout
17738 \begin_inset Flex Code
17741 \begin_layout Plain Layout
17747 will automatically set
17748 \begin_inset Flex Code
17751 \begin_layout Plain Layout
17759 \begin_inset Flex Code
17762 \begin_layout Plain Layout
17768 can be set to true for
17769 \begin_inset Flex Code
17772 \begin_layout Plain Layout
17778 insets by setting it
17783 \begin_inset Flex Code
17786 \begin_layout Plain Layout
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 ] Whether multiple paragraphs are permitted in this inset.
17833 \begin_inset Flex Code
17836 \begin_layout Plain Layout
17842 to the same value and
17843 \begin_inset Flex Code
17846 \begin_layout Plain Layout
17852 to the opposite value.
17853 These can be reset to other values, if they are used
17858 \begin_inset Flex Code
17861 \begin_layout Plain Layout
17871 \begin_layout Description
17872 \begin_inset Flex Code
17875 \begin_layout Plain Layout
17882 \begin_inset Flex Code
17885 \begin_layout Plain Layout
17894 \begin_inset space \thinspace{}
17898 \begin_inset Flex Code
17901 \begin_layout Plain Layout
17907 ] Whether fragile commands in this inset should be
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17924 whether the command should itself be protected.) Default is false.
17927 \begin_layout Description
17928 \begin_inset Flex Code
17931 \begin_layout Plain Layout
17938 \begin_inset Flex Code
17941 \begin_layout Plain Layout
17947 ] Deletes an existing
17948 \begin_inset Flex Code
17951 \begin_layout Plain Layout
17958 \change_inserted -712698321 1417953494
17962 \begin_layout Description
17964 \change_inserted -712698321 1417953559
17965 \begin_inset Flex Code
17968 \begin_layout Plain Layout
17970 \change_inserted -712698321 1417953494
17977 \begin_inset Flex Code
17980 \begin_layout Plain Layout
17982 \change_inserted -712698321 1417953574
17989 \begin_inset Flex Code
17992 \begin_layout Plain Layout
17994 \change_inserted -712698321 1417953533
18000 that has replaced this
18001 \begin_inset Flex Code
18004 \begin_layout Plain Layout
18006 \change_inserted -712698321 1417953551
18013 This is used to rename an
18014 \begin_inset Flex Code
18017 \begin_layout Plain Layout
18019 \change_inserted -712698321 1417953559
18025 , while keeping backward compatibility.
18030 \begin_layout Description
18031 \begin_inset Flex Code
18034 \begin_layout Plain Layout
18041 \begin_inset Flex Code
18044 \begin_layout Plain Layout
18053 \begin_inset space \thinspace{}
18057 \begin_inset Flex Code
18060 \begin_layout Plain Layout
18066 ] As with paragraph styles, see
18067 \begin_inset CommandInset ref
18069 reference "sub:Paragraph-Styles"
18077 \begin_layout Description
18078 \begin_inset Flex Code
18081 \begin_layout Plain Layout
18088 \begin_inset Flex Code
18091 \begin_layout Plain Layout
18100 \begin_inset space \thinspace{}
18104 \begin_inset Flex Code
18107 \begin_layout Plain Layout
18113 ] As with paragraph styles, see
18114 \begin_inset CommandInset ref
18116 reference "sub:Paragraph-Styles"
18124 \begin_layout Description
18125 \begin_inset Flex Code
18128 \begin_layout Plain Layout
18134 As with paragraph styles, see
18135 \begin_inset CommandInset ref
18137 reference "sub:Paragraph-Styles"
18144 \begin_layout Description
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18164 ] The prefix to use when creating labels referring to insets of this type.
18165 This allows the use of formatted references.
18168 \begin_layout Description
18169 \begin_inset Flex Code
18172 \begin_layout Plain Layout
18179 \begin_inset Flex Code
18182 \begin_layout Plain Layout
18188 ] As with paragraph styles, see
18189 \begin_inset CommandInset ref
18191 reference "sub:Paragraph-Styles"
18198 \begin_layout Description
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18209 \begin_inset Flex Code
18212 \begin_layout Plain Layout
18221 \begin_inset space \thinspace{}
18225 \begin_inset Flex Code
18228 \begin_layout Plain Layout
18234 ] Resets the LaTeX arguments of this layout (as defined via the
18235 \begin_inset Flex Code
18238 \begin_layout Plain Layout
18245 This is useful if you have copied a style via
18246 \begin_inset Flex Code
18249 \begin_layout Plain Layout
18255 , but you do not want to inherit its (required and optional) arguments.
18258 \begin_layout Description
18259 \begin_inset Flex Code
18262 \begin_layout Plain Layout
18269 \begin_inset Flex Code
18272 \begin_layout Plain Layout
18279 \begin_inset space \thinspace{}
18283 \begin_inset Flex Code
18286 \begin_layout Plain Layout
18294 ] Whether this inset should use the font of its surrounding environment
18296 Default is false: use the font of the surrounding environment.
18299 \begin_layout Description
18300 \begin_inset Flex Code
18303 \begin_layout Plain Layout
18310 \begin_inset Flex Code
18313 \begin_layout Plain Layout
18319 ] A string that is put at the end of the layout content.
18320 A line break in the output can be indicated by
18321 \begin_inset Flex Code
18324 \begin_layout Plain Layout
18333 \begin_layout Description
18334 \begin_inset Flex Code
18337 \begin_layout Plain Layout
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18354 \begin_inset space \thinspace{}
18358 \begin_inset Flex Code
18361 \begin_layout Plain Layout
18369 ] Allow spell-checking the contents of this inset.
18373 \begin_layout Subsection
18375 \begin_inset CommandInset label
18377 name "sub:Counters"
18384 \begin_layout Standard
18385 It is necessary to define the counters (
18386 \begin_inset Flex MenuItem
18389 \begin_layout Plain Layout
18396 \begin_inset Flex MenuItem
18399 \begin_layout Plain Layout
18405 , \SpecialChar \ldots{}
18406 ) in the text class itself.
18407 The standard counters are defined in the file
18408 \begin_inset Flex Code
18411 \begin_layout Plain Layout
18417 , so you may have to do no more than add
18420 \begin_layout LyX-Code
18421 Input stdcounters.inc
18424 \begin_layout Standard
18425 to your layout file to get them to work.
18426 But if you want to define custom counters, then you can do so.
18427 The counter declaration must begin with:
18430 \begin_layout LyX-Code
18431 Counter CounterName
18434 \begin_layout Standard
18436 \begin_inset Flex Code
18439 \begin_layout Plain Layout
18445 ' is replaced by the name of the counter.
18446 And it must end with
18447 \begin_inset Quotes eld
18451 \begin_inset Flex Code
18454 \begin_layout Plain Layout
18461 \begin_inset Quotes erd
18465 The following parameters can also be used:
18468 \begin_layout Description
18469 \begin_inset Flex Code
18472 \begin_layout Plain Layout
18479 \begin_inset Flex Code
18482 \begin_layout Plain Layout
18488 ] Sets the initial value for the counter, to which it will be reset whenever
18490 Normally, one will want the default, 1.
18493 \begin_layout Description
18494 \begin_inset Flex Code
18497 \begin_layout Plain Layout
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18514 \begin_inset Quotes erd
18518 \begin_inset Quotes erd
18521 ] When defined, this string defines how the counter is displayed.
18522 Setting this value sets
18523 \begin_inset Flex Code
18526 \begin_layout Plain Layout
18527 LabelStringAppendix
18533 The following special constructs can be used in the string:
18534 \begin_inset Separator parbreak
18541 \begin_layout Itemize
18542 \begin_inset Flex Code
18545 \begin_layout Plain Layout
18553 will be replaced by the expansion of the
18554 \begin_inset Flex Code
18557 \begin_layout Plain Layout
18564 \begin_inset Flex Code
18567 \begin_layout Plain Layout
18568 LabelStringAppendix
18574 \begin_inset Flex Code
18577 \begin_layout Plain Layout
18587 \begin_layout Itemize
18588 counter values can be expressed using LaTeX-like macros
18589 \begin_inset Newline newline
18593 \begin_inset Flex Code
18596 \begin_layout Plain Layout
18613 \begin_inset Flex Code
18616 \begin_layout Plain Layout
18628 \begin_layout Plain Layout
18638 Actually, the situation is a bit more complicated: any
18657 other than those described below will produce arabic numerals.
18658 It would not be surprising to see this change in the future.
18664 \begin_inset Flex Code
18667 \begin_layout Plain Layout
18673 : 1, 2, 3,\SpecialChar \ldots{}
18675 \begin_inset Flex Code
18678 \begin_layout Plain Layout
18684 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18686 \begin_inset Flex Code
18689 \begin_layout Plain Layout
18695 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18697 \begin_inset Flex Code
18700 \begin_layout Plain Layout
18706 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18708 \begin_inset Flex Code
18711 \begin_layout Plain Layout
18717 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18719 \begin_inset Flex Code
18722 \begin_layout Plain Layout
18728 for hebrew numerals.
18732 \begin_layout Standard
18733 If LabelString is not defined, a default value is constructed as follows:
18734 if the counter has a master counter
18735 \begin_inset Flex Code
18738 \begin_layout Plain Layout
18745 \begin_inset Flex Code
18748 \begin_layout Plain Layout
18755 \begin_inset Newline newline
18759 \begin_inset Flex Code
18762 \begin_layout Plain Layout
18772 is used; otherwise the string
18773 \begin_inset Flex Code
18776 \begin_layout Plain Layout
18787 \begin_layout Description
18788 \begin_inset Flex Code
18791 \begin_layout Plain Layout
18792 LabelStringAppendix
18798 \begin_inset Flex Code
18801 \begin_layout Plain Layout
18808 \begin_inset Quotes erd
18812 \begin_inset Quotes erd
18816 \begin_inset Flex Code
18819 \begin_layout Plain Layout
18825 , but for use in the Appendix.
18828 \begin_layout Description
18829 \begin_inset Flex Code
18832 \begin_layout Plain Layout
18839 \begin_inset Flex Code
18842 \begin_layout Plain Layout
18849 \begin_inset Quotes erd
18853 \begin_inset Quotes erd
18856 ] A format for use with formatted references to this counter.
18857 For example, one might want to have references to section numbers appear
18859 \begin_inset Quotes eld
18863 \begin_inset Quotes erd
18867 The string should contain
18868 \begin_inset Quotes eld
18872 \begin_inset Quotes erd
18876 This will be replaced by the counter number itself.
18877 So, for sections, it would be: Section ##.
18880 \begin_layout Description
18881 \begin_inset Flex Code
18884 \begin_layout Plain Layout
18891 \begin_inset Flex Code
18894 \begin_layout Plain Layout
18901 \begin_inset Quotes erd
18905 \begin_inset Quotes erd
18908 ] If this is set to the name of another counter, the present counter will
18909 be reset every time the other one is increased.
18911 \begin_inset Flex Code
18914 \begin_layout Plain Layout
18921 \begin_inset Flex Code
18924 \begin_layout Plain Layout
18933 \begin_layout Subsection
18935 \begin_inset CommandInset label
18937 name "sub:Font-description"
18944 \begin_layout Standard
18945 A font description looks like this:
18948 \begin_layout LyX-Code
18962 \begin_layout LyX-Code
18966 \begin_layout LyX-Code
18970 \begin_layout Standard
18971 The following commands are available:
18974 \begin_layout Description
18975 \begin_inset Flex Code
18978 \begin_layout Plain Layout
18985 \begin_inset Flex Code
18988 \begin_layout Plain Layout
18997 \begin_inset Flex Code
19000 \begin_layout Plain Layout
19007 \begin_inset Flex Code
19010 \begin_layout Plain Layout
19017 \begin_inset Flex Code
19020 \begin_layout Plain Layout
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19037 \begin_inset Flex Code
19040 \begin_layout Plain Layout
19047 \begin_inset Flex Code
19050 \begin_layout Plain Layout
19057 \begin_inset Flex Code
19060 \begin_layout Plain Layout
19067 \begin_inset Flex Code
19070 \begin_layout Plain Layout
19079 \begin_layout Description
19080 \begin_inset Flex Code
19083 \begin_layout Plain Layout
19090 \begin_inset Flex Code
19093 \begin_layout Plain Layout
19102 \begin_inset Flex Code
19105 \begin_layout Plain Layout
19112 \begin_inset Flex Code
19115 \begin_layout Plain Layout
19124 \begin_layout Description
19125 \begin_inset Flex Code
19128 \begin_layout Plain Layout
19135 \begin_inset Flex Code
19138 \begin_layout Plain Layout
19144 ] Valid arguments are:
19145 \begin_inset Flex Code
19148 \begin_layout Plain Layout
19155 \begin_inset Flex Code
19158 \begin_layout Plain Layout
19165 \begin_inset Flex Code
19168 \begin_layout Plain Layout
19175 \begin_inset Flex Code
19178 \begin_layout Plain Layout
19185 \begin_inset Flex Code
19188 \begin_layout Plain Layout
19195 \begin_inset Flex Code
19198 \begin_layout Plain Layout
19205 \begin_inset Flex Code
19208 \begin_layout Plain Layout
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19225 \begin_inset Flex Code
19228 \begin_layout Plain Layout
19235 \begin_inset Flex Code
19238 \begin_layout Plain Layout
19245 \begin_inset Flex Code
19248 \begin_layout Plain Layout
19255 \begin_inset Flex Code
19258 \begin_layout Plain Layout
19265 Each of these turns on or off the corresponding attribute.
19267 \begin_inset Flex Code
19270 \begin_layout Plain Layout
19276 turns on emphasis, and
19277 \begin_inset Flex Code
19280 \begin_layout Plain Layout
19288 \begin_inset Newline newline
19291 If the latter seems puzzling, remember that the font settings for the present
19292 context are generally inherited from the surrounding context.
19294 \begin_inset Flex Code
19297 \begin_layout Plain Layout
19303 would turn off the emphasis that was anyway in effect, say, in a theorem
19307 \begin_layout Description
19308 \begin_inset Flex Code
19311 \begin_layout Plain Layout
19318 \begin_inset Flex Code
19321 \begin_layout Plain Layout
19330 \begin_inset Flex Code
19333 \begin_layout Plain Layout
19342 \begin_layout Description
19343 \begin_inset Flex Code
19346 \begin_layout Plain Layout
19353 \begin_inset Flex Code
19356 \begin_layout Plain Layout
19365 \begin_inset Flex Code
19368 \begin_layout Plain Layout
19375 \begin_inset Flex Code
19378 \begin_layout Plain Layout
19385 \begin_inset Flex Code
19388 \begin_layout Plain Layout
19397 \begin_layout Description
19398 \begin_inset Flex Code
19401 \begin_layout Plain Layout
19408 \begin_inset Flex Code
19411 \begin_layout Plain Layout
19418 \begin_inset Flex Code
19421 \begin_layout Plain Layout
19428 \begin_inset Flex Code
19431 \begin_layout Plain Layout
19440 \begin_inset Flex Code
19443 \begin_layout Plain Layout
19450 \begin_inset Flex Code
19453 \begin_layout Plain Layout
19460 \begin_inset Flex Code
19463 \begin_layout Plain Layout
19470 \begin_inset Flex Code
19473 \begin_layout Plain Layout
19480 \begin_inset Flex Code
19483 \begin_layout Plain Layout
19492 \begin_layout Subsection
19493 \begin_inset CommandInset label
19495 name "sub:Citation-format-description"
19499 Citation format description
19502 \begin_layout Standard
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19513 blocks are used to describe how bibliographic information should be displayed,
19514 both within LyX itself (in the citation dialog and in tooltips, for example)
19515 and in XHTML output.
19516 Such a block might look like this:
19519 \begin_layout LyX-Code
19523 \begin_layout LyX-Code
19527 \begin_layout LyX-Code
19531 \begin_layout LyX-Code
19535 \begin_layout Standard
19536 The individual lines define how the bibliographic information associated
19537 with an article or book, respectively, is to be displayed, and such a definitio
19538 n can be given for any `entry type' that might be present in a BibTeX file.
19539 LyX defines a default format in the source code that will be used if no
19540 specific definition has been given.
19541 LyX predefines several formats in the file
19542 \begin_inset Flex Code
19545 \begin_layout Plain Layout
19551 , which is included in most of LyX's document classes.
19554 \begin_layout Standard
19555 The definitions use a simple language that allows BibTeX keys to be replaced
19557 Keys should be enclosed in
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19578 So a simple definition might look like this:
19581 \begin_layout LyX-Code
19583 \begin_inset Quotes eld
19587 \begin_inset Quotes erd
19593 \begin_layout Standard
19594 This would print the author, followed by a comma, followed by the title,
19595 in quotes, followed by a period.
19598 \begin_layout Standard
19599 Of course, sometimes you may want to print a key only if it exists.
19600 This can be done by using a conditional construction, such as:
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19606 \begin_inset space ~
19616 \begin_inset Flex Code
19619 \begin_layout Plain Layout
19625 key exists, then print
19626 \begin_inset Quotes eld
19630 \begin_inset space ~
19634 \begin_inset Quotes erd
19637 followed by the volume key.
19638 It is also possible to have an else clause in the conditional, such as:
19639 \begin_inset Newline newline
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19647 {%author%[[%author%]][[%editor%, ed.]]}
19653 \begin_inset Newline newline
19657 \begin_inset Flex Code
19660 \begin_layout Plain Layout
19666 key is printed if it exists; otherwise, the editor key is printed, followed
19668 \begin_inset Quotes eld
19672 \begin_inset space ~
19676 \begin_inset Quotes erd
19679 Note that the key is again enclosed in
19680 \begin_inset Flex Code
19683 \begin_layout Plain Layout
19689 signs; the entire conditional is enclosed in braces; and the if and else
19690 clauses are enclosed in double brackets,
19691 \begin_inset Quotes eld
19695 \begin_inset Flex Code
19698 \begin_layout Plain Layout
19705 \begin_inset Quotes eld
19709 \begin_inset Quotes eld
19713 \begin_inset Flex Code
19716 \begin_layout Plain Layout
19723 \begin_inset Quotes erd
19727 There must be no space between any of these.
19730 \begin_layout Standard
19731 There is one other piece of syntax available in definitions, which looks
19733 \begin_inset Flex Code
19736 \begin_layout Plain Layout
19743 This defines a piece of formatting information that is to be used when
19745 \begin_inset Quotes eld
19749 \begin_inset Quotes erd
19753 Obviously, we do not want to output HTML tags when writing plain text,
19754 so they should be wrapped in
19755 \begin_inset Quotes eld
19759 \begin_inset Quotes erd
19763 \begin_inset Quotes eld
19767 \begin_inset Quotes erd
19773 \begin_layout Standard
19774 Two special sorts of definitions are also possible in a
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19785 An example of the first would be:
19788 \begin_layout LyX-Code
19790 \begin_inset Quotes eld
19794 \begin_inset Quotes erd
19800 \begin_layout Standard
19801 This is an abbreviation, or macro, and it can be used by treating it as
19803 \begin_inset Flex Code
19806 \begin_layout Plain Layout
19814 \begin_inset Flex Code
19817 \begin_layout Plain Layout
19823 exactly as it would treat its definition.
19824 So, let us issue the obvious
19832 \begin_layout LyX-Code
19836 \begin_layout Standard
19837 or anything like it.
19838 LyX shouldn't go into an infinite loop, but it may go into a long one before
19842 \begin_layout Standard
19843 The second sort of special definition might look like this:
19846 \begin_layout LyX-Code
19850 \begin_layout Standard
19851 This defines a translatable piece of text, which allows relevant parts of
19852 the bibliography to be translated.
19853 It can be included in a definition by treating it as a key:
19854 \begin_inset Flex Code
19857 \begin_layout Plain Layout
19864 Several of these are predefined in
19865 \begin_inset Flex Code
19868 \begin_layout Plain Layout
19875 Note that these are not macros, in the sense just defined.
19876 They will not be expanded.
19879 \begin_layout Standard
19880 So here then is an example that use all these features:
19881 \begin_inset VSpace defskip
19887 \begin_layout Standard
19891 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19894 \begin_layout Standard
19895 \begin_inset VSpace defskip
19898 This defines a macro that prints the author, followed by a comma, if the
19900 \begin_inset Flex Code
19903 \begin_layout Plain Layout
19909 key is defined, or else prints the name of the editor, followed by the
19911 \begin_inset Flex Code
19914 \begin_layout Plain Layout
19920 or its translation (it is by default
19921 \begin_inset Quotes eld
19925 \begin_inset Quotes erd
19929 \begin_inset Flex Code
19932 \begin_layout Plain Layout
19939 Note that this is in fact defined in
19940 \begin_inset Flex Code
19943 \begin_layout Plain Layout
19949 , so you can use it in your own definitions, or re-definitions, if you load
19953 \begin_layout Section
19954 \begin_inset CommandInset label
19956 name "sec:Tags-for-XHTML"
19960 Tags for XHTML output
19963 \begin_layout Standard
19964 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19965 by layout information.
19966 In general, LyX provides sensible defaults and, as mentioned earlier, it
19967 will even construct default CSS style rules from the other layout tags.
19968 For example, LyX will attempt to use the information provided in the
19969 \begin_inset Flex Code
19972 \begin_layout Plain Layout
19978 declaration for the Chapter style to write CSS that will appropriately
19979 format chapter headings.
19982 \begin_layout Standard
19983 In many cases, then, you may not have to do anything at all to get acceptable
19984 XHTML output for your own environments, custom insets, and so forth.
19985 But in some cases you will, and so LyX provides a number of layout tags
19986 that can be used to customize the XHTML and CSS that are generated.
19989 \begin_layout Standard
19990 Note that there are two tags,
19991 \begin_inset Flex Code
19994 \begin_layout Plain Layout
20001 \begin_inset Flex Code
20004 \begin_layout Plain Layout
20010 that may appear outside style and inset declarations.
20012 \begin_inset CommandInset ref
20014 reference "sub:General-text-class"
20018 for details on these.
20021 \begin_layout Subsection
20022 \begin_inset CommandInset label
20024 name "sub:Paragraph-Style-XHTML"
20031 \begin_layout Standard
20032 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20033 dealing with a normal paragraph, a command, or an environment, where this
20034 is itself determined by the contents of the corresponding
20035 \begin_inset Flex Code
20038 \begin_layout Plain Layout
20048 \begin_layout Standard
20049 For a command or normal paragraph, the output XHTML has the following form:
20052 \begin_layout LyX-Code
20054 \begin_inset Quotes erd
20058 \begin_inset Quotes erd
20064 \begin_layout LyX-Code
20066 \begin_inset Quotes erd
20070 \begin_inset Quotes erd
20076 \begin_layout LyX-Code
20077 Contents of the paragraph.
20080 \begin_layout LyX-Code
20084 \begin_layout Standard
20085 The label tags are of course omitted if the paragraph does not have a label.
20088 \begin_layout Standard
20089 For an environment that is not some sort of list, the XHTML takes this form:
20092 \begin_layout LyX-Code
20094 \begin_inset Quotes erd
20098 \begin_inset Quotes erd
20104 \begin_layout LyX-Code
20106 \begin_inset Quotes erd
20110 \begin_inset Quotes erd
20114 \begin_inset Quotes erd
20118 \begin_inset Quotes erd
20121 >Environment Label</labeltag>First paragraph.</itemtag>
20124 \begin_layout LyX-Code
20125 <itemtag>Second paragraph.</itemtag>
20128 \begin_layout LyX-Code
20132 \begin_layout Standard
20133 Note that the label is output only for the first paragraph, as it should
20134 be for a theorem, for example.
20138 \begin_layout Standard
20139 For a list, we have one of these forms:
20142 \begin_layout LyX-Code
20144 \begin_inset Quotes erd
20148 \begin_inset Quotes erd
20154 \begin_layout LyX-Code
20156 \begin_inset Quotes erd
20160 \begin_inset Quotes erd
20164 \begin_inset Quotes erd
20168 \begin_inset Quotes erd
20171 >List Label</labeltag>First item.</itemtag>
20174 \begin_layout LyX-Code
20176 \begin_inset Quotes erd
20180 \begin_inset Quotes erd
20184 \begin_inset Quotes erd
20188 \begin_inset Quotes erd
20191 >List Label</labeltag>Second item.</itemtag>
20194 \begin_layout LyX-Code
20198 \begin_layout LyX-Code
20202 \begin_layout LyX-Code
20204 \begin_inset Quotes erd
20208 \begin_inset Quotes erd
20214 \begin_layout LyX-Code
20216 \begin_inset Quotes erd
20220 \begin_inset Quotes erd
20223 >List Label</labeltag><itemtag attr=
20224 \begin_inset Quotes erd
20228 \begin_inset Quotes erd
20231 >First item.</itemtag>
20234 \begin_layout LyX-Code
20236 \begin_inset Quotes erd
20240 \begin_inset Quotes erd
20243 >List Label</labeltag><itemtag attr=
20244 \begin_inset Quotes erd
20248 \begin_inset Quotes erd
20251 >Second item.</itemtag>
20254 \begin_layout LyX-Code
20258 \begin_layout Standard
20259 Note the different orders of
20260 \begin_inset Flex Code
20263 \begin_layout Plain Layout
20270 \begin_inset Flex Code
20273 \begin_layout Plain Layout
20280 Which order we get depends upon the setting of
20281 \begin_inset Flex Code
20284 \begin_layout Plain Layout
20291 \begin_inset Flex Code
20294 \begin_layout Plain Layout
20300 is false (the default), you get the first of these, with the label within
20301 the item; if true, you get the second, with the label outside the item.
20304 \begin_layout Standard
20305 The specific tags and attributes output for each paragraph type can be controlle
20306 d by means of the layout tags we are about to describe.
20307 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20308 so you often may not need to do very much to get good XHTML output.
20309 Think of the available tags as there so you can tweak things to your liking.
20312 \begin_layout Description
20313 \begin_inset Flex Code
20316 \begin_layout Plain Layout
20323 \begin_inset Flex Code
20326 \begin_layout Plain Layout
20332 ] Specifies attribute information to be output with the main tag.
20334 \begin_inset Quotes eld
20338 \begin_inset Flex Code
20341 \begin_layout Plain Layout
20348 \begin_inset Quotes erd
20352 By default, LyX will output
20353 \begin_inset Quotes eld
20357 \begin_inset Flex Code
20360 \begin_layout Plain Layout
20367 \begin_inset Quotes erd
20371 \begin_inset Flex Code
20374 \begin_layout Plain Layout
20380 is the LyX name of the layout, made lowercase, for example: chapter.
20385 contain any style information.
20387 \begin_inset Flex Code
20390 \begin_layout Plain Layout
20399 \begin_layout Description
20400 \begin_inset Flex Code
20403 \begin_layout Plain Layout
20410 \begin_inset Flex Code
20413 \begin_layout Plain Layout
20423 ] Whether to output the default CSS information LyX generates for this layout,
20424 even if additional information is explicitly provided via
20425 \begin_inset Flex Code
20428 \begin_layout Plain Layout
20436 \begin_inset Flex Code
20439 \begin_layout Plain Layout
20445 allows you to alter or augment the generated CSS, rather than to override
20448 \begin_inset Flex Code
20451 \begin_layout Plain Layout
20460 \begin_layout Description
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20471 \begin_inset Flex Code
20474 \begin_layout Plain Layout
20480 ] The tag to be used for individual paragraphs of environments, replacing
20482 \begin_inset Flex Code
20485 \begin_layout Plain Layout
20491 in the examples above.
20493 \begin_inset Flex Code
20496 \begin_layout Plain Layout
20505 \begin_layout Description
20506 \begin_inset Flex Code
20509 \begin_layout Plain Layout
20516 \begin_inset Flex Code
20519 \begin_layout Plain Layout
20525 ] Attributes for the item tag.
20527 \begin_inset Quotes eld
20531 \begin_inset Flex Code
20534 \begin_layout Plain Layout
20535 class=`layoutname_item'
20541 \begin_inset Quotes erd
20549 contain any style information.
20551 \begin_inset Flex Code
20554 \begin_layout Plain Layout
20563 \begin_layout Description
20564 \begin_inset Flex Code
20567 \begin_layout Plain Layout
20574 \begin_inset Flex Code
20577 \begin_layout Plain Layout
20583 ] The tag to be used for paragraph and item labels, replacing
20584 \begin_inset Flex Code
20587 \begin_layout Plain Layout
20593 in the examples above.
20595 \begin_inset Flex Code
20598 \begin_layout Plain Layout
20605 \begin_inset Flex Code
20608 \begin_layout Plain Layout
20615 \begin_inset Flex Code
20618 \begin_layout Plain Layout
20625 \begin_inset Flex Code
20628 \begin_layout Plain Layout
20629 Centered_Top_Environment
20634 , in which case it defaults to
20635 \begin_inset Flex Code
20638 \begin_layout Plain Layout
20647 \begin_layout Description
20648 \begin_inset Flex Code
20651 \begin_layout Plain Layout
20658 \begin_inset Flex Code
20661 \begin_layout Plain Layout
20667 ] Attributes for the label tag.
20669 \begin_inset Quotes eld
20673 \begin_inset Flex Code
20676 \begin_layout Plain Layout
20677 class=`layoutname_label'
20683 \begin_inset Quotes erd
20691 contain any style information.
20693 \begin_inset Flex Code
20696 \begin_layout Plain Layout
20705 \begin_layout Description
20706 \begin_inset Flex Code
20709 \begin_layout Plain Layout
20716 \begin_inset Flex Code
20719 \begin_layout Plain Layout
20729 ] Meaningful only for list-like environments, this tag controls whether
20730 the label tag is output before or inside the item tag.
20731 This is used, for example, in the description environment, where we want
20733 \begin_inset Flex Code
20736 \begin_layout Plain Layout
20737 <dt>\SpecialChar \ldots{}
20738 </dt><dd>\SpecialChar \ldots{}
20746 \begin_inset Flex Code
20749 \begin_layout Plain Layout
20755 : The label tag is output inside the item tag.
20758 \begin_layout Description
20759 \begin_inset Flex Code
20762 \begin_layout Plain Layout
20768 Information to be output in the
20769 \begin_inset Flex Code
20772 \begin_layout Plain Layout
20778 section when this style is used.
20779 This might, for example, be used to include a
20780 \begin_inset Flex Code
20783 \begin_layout Plain Layout
20790 \begin_inset Flex Code
20793 \begin_layout Plain Layout
20802 \begin_layout Description
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20812 CSS style information to be included when this style is used.
20813 Note that this will automatically be wrapped in a layout-generated
20814 \begin_inset Flex Code
20817 \begin_layout Plain Layout
20823 block, so only the CSS itself need be included.
20825 \begin_inset Flex Code
20828 \begin_layout Plain Layout
20837 \begin_layout Description
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20848 \begin_inset Flex Code
20851 \begin_layout Plain Layout
20857 ] The tag to be used for the main label, replacing
20858 \begin_inset Flex Code
20861 \begin_layout Plain Layout
20867 in the examples above.
20869 \begin_inset Flex Code
20872 \begin_layout Plain Layout
20881 \begin_layout Description
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20892 \begin_inset Flex Code
20895 \begin_layout Plain Layout
20905 ] Marks this style as the one to be used to generate the
20906 \begin_inset Flex Code
20909 \begin_layout Plain Layout
20915 tag for the XHTML file.
20916 By default, it is false.
20918 \begin_inset Flex Code
20921 \begin_layout Plain Layout
20927 file sets it to true for the
20928 \begin_inset Flex Code
20931 \begin_layout Plain Layout
20941 \begin_layout Subsection
20945 \begin_layout Standard
20946 The XHTML output of insets can also be controlled by information in layout
20951 \begin_layout Plain Layout
20952 At present, this is true only for
20953 \begin_inset Quotes eld
20957 \begin_inset Quotes erd
20960 insets (insets you can type into) and is not true for
20961 \begin_inset Quotes eld
20965 \begin_inset Quotes erd
20968 insets (insets that are associated with dialog boxes).
20973 Here, too, LyX tries to provide sensible defaults, and it constructs default
20975 But everything can be customized.
20978 \begin_layout Standard
20979 The XHTML LyX outputs for an inset has the following form:
20982 \begin_layout LyX-Code
20984 \begin_inset Quotes erd
20988 \begin_inset Quotes erd
20994 \begin_layout LyX-Code
20995 <labeltag>Label</labeltag>
20998 \begin_layout LyX-Code
21000 \begin_inset Quotes erd
21004 \begin_inset Quotes erd
21007 >Contents of the inset.</innertag>
21010 \begin_layout LyX-Code
21014 \begin_layout Standard
21015 If the inset permits multiple paragraphs---that is, if
21016 \begin_inset Flex Code
21019 \begin_layout Plain Layout
21025 is true---then the contents of the inset will itself be output as paragraphs
21026 formatted according to the styles used for those paragraphs (standard,
21027 quote, and the like).
21028 The label tag is of course omitted if the paragraph does not have a label
21029 and, at present, is always
21030 \begin_inset Flex Code
21033 \begin_layout Plain Layout
21040 The inner tag is optional and, by default, does not appear.
21043 \begin_layout Standard
21044 The specific tags and attributes output for each inset can be controlled
21045 by means of the following layout tags.
21048 \begin_layout Description
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21059 \begin_inset Flex Code
21062 \begin_layout Plain Layout
21068 ] Specifies attribute information to be output with the main tag.
21070 \begin_inset Quotes eld
21074 \begin_inset Flex Code
21077 \begin_layout Plain Layout
21078 class=`myinset' onclick=`\SpecialChar \ldots{}
21085 \begin_inset Quotes erd
21089 By default, LyX will output
21090 \begin_inset Quotes eld
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21104 \begin_inset Quotes erd
21108 \begin_inset Flex Code
21111 \begin_layout Plain Layout
21117 is the LyX name of the inset, made lowercase and with non-alphanumeric
21118 characters converted to underscores, for example: footnote.
21121 \begin_layout Description
21122 \begin_inset Flex Code
21125 \begin_layout Plain Layout
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21145 ] Whether to output the default CSS information LyX generates for this layout,
21146 even if additional information is explicitly provided via
21147 \begin_inset Flex Code
21150 \begin_layout Plain Layout
21158 \begin_inset Flex Code
21161 \begin_layout Plain Layout
21167 allows you to alter or augment the generated CSS, rather than to override
21172 \begin_layout Description
21173 \begin_inset Flex Code
21176 \begin_layout Plain Layout
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21192 ] Attributes for the inner tag.
21194 \begin_inset Quotes eld
21198 \begin_inset Flex Code
21201 \begin_layout Plain Layout
21202 class=`insetname_inner'
21208 \begin_inset Quotes erd
21214 \begin_layout Description
21215 \begin_inset Flex Code
21218 \begin_layout Plain Layout
21225 \begin_inset Flex Code
21228 \begin_layout Plain Layout
21234 ] The inner tag, replacing
21235 \begin_inset Flex Code
21238 \begin_layout Plain Layout
21244 in the examples above.
21245 By default, there is none.
21248 \begin_layout Description
21249 \begin_inset Flex Code
21252 \begin_layout Plain Layout
21259 \begin_inset Flex Code
21262 \begin_layout Plain Layout
21270 ] Whether this inset represents a standalone block of text (such as a footnote)
21271 or instead represents material that is included in the surrounding text
21272 (such as a branch).
21276 \begin_layout Description
21277 \begin_inset Flex Code
21280 \begin_layout Plain Layout
21287 \begin_inset Flex Code
21290 \begin_layout Plain Layout
21296 ] A label for this inset, possibly including a reference to a counter.
21297 For example, for footnote, it might be:
21298 \begin_inset Flex Code
21301 \begin_layout Plain Layout
21310 This is optional, and there is no default.
21313 \begin_layout Description
21314 \begin_inset Flex Code
21317 \begin_layout Plain Layout
21323 Information to be output in the
21324 \begin_inset Flex Code
21327 \begin_layout Plain Layout
21333 section when this style is used.
21334 This might, for example, be used to include a
21335 \begin_inset Flex Code
21338 \begin_layout Plain Layout
21345 \begin_inset Flex Code
21348 \begin_layout Plain Layout
21357 \begin_layout Description
21358 \begin_inset Flex Code
21361 \begin_layout Plain Layout
21367 CSS style information to be included when this style is used.
21368 Note that this will automatically be wrapped in a layout-generated
21369 \begin_inset Flex Code
21372 \begin_layout Plain Layout
21378 block, so only the CSS itself need be included.
21381 \begin_layout Description
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21392 \begin_inset Flex Code
21395 \begin_layout Plain Layout
21401 ] The tag to be used for the main label, replacing
21402 \begin_inset Flex Code
21405 \begin_layout Plain Layout
21411 in the examples above.
21412 The default depends upon the setting of
21413 \begin_inset Flex Code
21416 \begin_layout Plain Layout
21423 \begin_inset Flex Code
21426 \begin_layout Plain Layout
21432 is true, the default is
21433 \begin_inset Flex Code
21436 \begin_layout Plain Layout
21442 ; if it is false, the default is
21443 \begin_inset Flex Code
21446 \begin_layout Plain Layout
21455 \begin_layout Subsection
21459 \begin_layout Standard
21460 The XHTML output for floats too can be controlled by layout information.
21461 The output has the following form:
21464 \begin_layout LyX-Code
21466 \begin_inset Quotes erd
21470 \begin_inset Quotes erd
21476 \begin_layout LyX-Code
21477 Contents of the float.
21480 \begin_layout LyX-Code
21484 \begin_layout Standard
21485 The caption, if there is one, is a separate inset and will be output as
21487 Its appearance can be controlled via the InsetLayout for caption insets.
21491 \begin_layout Description
21492 \begin_inset Flex Code
21495 \begin_layout Plain Layout
21502 \begin_inset Flex Code
21505 \begin_layout Plain Layout
21511 ] Specifies attribute information to be output with the main tag.
21513 \begin_inset Quotes eld
21517 \begin_inset Flex Code
21520 \begin_layout Plain Layout
21521 class=`myfloat' onclick=`\SpecialChar \ldots{}
21528 \begin_inset Quotes erd
21532 By default, LyX will output
21533 \begin_inset Quotes eld
21537 \begin_inset Flex Code
21540 \begin_layout Plain Layout
21541 class=`float float-floattype'
21547 \begin_inset Quotes erd
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21560 is LyX's name for this type of float, as determined by the float declaration
21562 \begin_inset CommandInset ref
21564 reference "sub:Floats"
21568 ), though made lowercase and with non-alphanumeric characters converted
21569 to underscores, for example: float-table.
21572 \begin_layout Description
21573 \begin_inset Flex Code
21576 \begin_layout Plain Layout
21582 CSS style information to be included when this float is used.
21583 Note that this will automatically be wrapped in a layout-generated
21584 \begin_inset Flex Code
21587 \begin_layout Plain Layout
21593 block, so only the CSS itself need be included.
21596 \begin_layout Description
21597 \begin_inset Flex Code
21600 \begin_layout Plain Layout
21607 \begin_inset Flex Code
21610 \begin_layout Plain Layout
21616 ] The tag to be used for this float, replacing
21617 \begin_inset Quotes eld
21621 \begin_inset Flex Code
21624 \begin_layout Plain Layout
21631 \begin_inset Quotes erd
21634 in the example above.
21636 \begin_inset Flex Code
21639 \begin_layout Plain Layout
21645 and will rarely need changing.
21648 \begin_layout Subsection
21649 Bibliography formatting
21652 \begin_layout Standard
21653 The bibliography can be formatted using
21654 \begin_inset Flex Code
21657 \begin_layout Plain Layout
21665 \begin_inset CommandInset ref
21667 reference "sub:Citation-format-description"
21674 \begin_layout Subsection
21678 \begin_layout Standard
21679 We have several times mentioned that LyX will generate default CSS style
21680 rules for both insets and paragraph styles, based upon the other layout
21681 information that is provided.
21682 In this section, we shall say a word about which layout information LyX
21686 \begin_layout Standard
21687 At present, LyX auto-generates CSS only for font information, making use
21689 \begin_inset Flex Code
21692 \begin_layout Plain Layout
21699 \begin_inset Flex Code
21702 \begin_layout Plain Layout
21709 \begin_inset Flex Code
21712 \begin_layout Plain Layout
21719 \begin_inset Flex Code
21722 \begin_layout Plain Layout
21729 \begin_inset Flex Code
21732 \begin_layout Plain Layout
21739 \begin_inset CommandInset ref
21741 reference "sub:Font-description"
21746 The translation is mostly straightforward and obvious.
21748 \begin_inset Quotes eld
21752 \begin_inset Flex Code
21755 \begin_layout Plain Layout
21762 \begin_inset Quotes erd
21766 \begin_inset Quotes eld
21770 \begin_inset Flex Code
21773 \begin_layout Plain Layout
21774 font-family: sans-serif;
21780 \begin_inset Quotes erd
21784 The correspondence of LyX sizes and CSS sizes is a little less obvious
21785 but nonetheless intuitive.
21787 \begin_inset Flex Code
21790 \begin_layout Plain Layout
21797 \begin_inset Flex URL
21800 \begin_layout Plain Layout
21810 \begin_layout Chapter
21811 Including External Material
21812 \begin_inset CommandInset label
21814 name "chap:Including-External-Material"
21821 \begin_layout Standard
21822 \begin_inset Box Shadowbox
21832 height_special "totalheight"
21835 \begin_layout Plain Layout
21836 WARNING: This portion of the documentation has not been updated for some
21838 We certainly hope that it is still accurate, but there are no guarantees.
21846 \begin_layout Standard
21847 The use of material from sources external to LyX is covered in detail in
21853 This part of the manual covers what needs to happen behind the scenes for
21854 new sorts of material to be included.
21857 \begin_layout Section
21861 \begin_layout Standard
21862 The external material feature is based on the concept of a
21867 A template is a specification of how LyX should interface with a certain
21869 As bundled, LyX comes with predefined templates for Xfig figures, various
21870 raster format images, chess diagrams, and LilyPond music notation.
21871 You can check the actual list by using the menu
21872 \begin_inset Flex MenuItem
21875 \begin_layout Plain Layout
21876 Insert\SpecialChar \menuseparator
21877 File\SpecialChar \menuseparator
21884 Furthermore, it is possible to roll your own template to support a specific
21886 Later we'll describe in more detail what is involved, and hopefully you
21887 will submit all the templates you create so we can include them in a later
21891 \begin_layout Standard
21892 Another basic idea of the external material feature is to distinguish between
21893 the original file that serves as a base for final material and the produced
21894 file that is included in your exported or printed document.
21895 For example, consider the case of a figure produced with
21896 \begin_inset Flex Code
21899 \begin_layout Plain Layout
21906 The Xfig application itself works on an original file with the
21907 \begin_inset Flex Code
21910 \begin_layout Plain Layout
21917 Within Xfig, you create and change your figure, and when you are done,
21919 \begin_inset Flex Code
21922 \begin_layout Plain Layout
21929 When you want to include the figure in your document, you invoke
21930 \begin_inset Flex Code
21933 \begin_layout Plain Layout
21939 in order to create a PostScript file that can readily be included in your
21942 \begin_inset Flex Code
21945 \begin_layout Plain Layout
21951 file is the original file, and the PostScript file is the produced file.
21954 \begin_layout Standard
21955 This distinction is important in order to allow updating of the material
21956 while you are in the process of writing the document.
21957 Furthermore, it provides us with the flexibility that is needed to support
21958 multiple export formats.
21959 For instance, in the case of a plain text file, it is not exactly an award-winn
21960 ing idea to include the figure as raw PostScript.
21961 Instead, you would either prefer to just include a reference to the figure
21962 or try to invoke some graphics to ASCII converter to make the final result
21963 look similar to the real graphics.
21964 The external material management allows you to do this, because it is parametri
21965 zed on the different export formats that LyX supports.
21968 \begin_layout Standard
21969 Besides supporting the production of different products according to the
21970 exported format, it supports tight integration with editing and viewing
21972 In the case of an Xfig figure, you are able to invoke Xfig on the original
21973 file with a single click from within the external material dialog in LyX,
21974 and also preview the produced PostScript file with Ghostview with another
21976 No more fiddling around with the command line and/or file browsers to locate
21977 and manipulate the original or produced files.
21978 In this way, you are finally able to take full advantage of the many different
21979 applications that are relevant to use when you write your documents, and
21980 ultimately be more productive.
21983 \begin_layout Section
21984 The external template configuration file
21987 \begin_layout Standard
21988 It is relatively easy to add custom external template definitions to LyX.
21989 However, be aware that doing this in an careless manner most probably
21993 introduce an easily exploitable security hole.
21994 So before you do this, please read the discussion about security in
21995 \begin_inset CommandInset ref
21997 reference "sec:Security-discussion"
22004 \begin_layout Standard
22005 Having said that, we encourage you to submit any interesting templates that
22010 \begin_layout Standard
22011 The external templates are defined in the
22012 \begin_inset Flex Code
22015 \begin_layout Plain Layout
22016 LyXDir/lib/external_templates
22022 You can place your own version in
22023 \begin_inset Flex Code
22026 \begin_layout Plain Layout
22027 UserDir/external_templates
22035 \begin_layout Standard
22036 A typical template looks like this:
22039 \begin_layout LyX-Code
22043 \begin_layout LyX-Code
22044 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22047 \begin_layout LyX-Code
22051 \begin_layout LyX-Code
22055 \begin_layout LyX-Code
22059 \begin_layout LyX-Code
22063 \begin_layout LyX-Code
22067 \begin_layout LyX-Code
22068 AutomaticProduction true
22071 \begin_layout LyX-Code
22075 \begin_layout LyX-Code
22079 \begin_layout LyX-Code
22083 \begin_layout LyX-Code
22084 TransformCommand Rotate RotationLatexCommand
22087 \begin_layout LyX-Code
22088 TransformCommand Resize ResizeLatexCommand
22091 \begin_layout LyX-Code
22092 Product "$$RotateFront$$ResizeFront
22095 \begin_layout LyX-Code
22100 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22103 \begin_layout LyX-Code
22104 $$ResizeBack$$RotateBack"
22107 \begin_layout LyX-Code
22111 \begin_layout LyX-Code
22112 UpdateResult "$$AbsPath$$Basename.pstex_t"
22115 \begin_layout LyX-Code
22116 Requirement "graphicx"
22119 \begin_layout LyX-Code
22120 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22123 \begin_layout LyX-Code
22124 ReferencedFile latex "$$AbsPath$$Basename.eps"
22127 \begin_layout LyX-Code
22128 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22131 \begin_layout LyX-Code
22135 \begin_layout LyX-Code
22139 \begin_layout LyX-Code
22140 TransformCommand Rotate RotationLatexCommand
22143 \begin_layout LyX-Code
22144 TransformCommand Resize ResizeLatexCommand
22147 \begin_layout LyX-Code
22148 Product "$$RotateFront$$ResizeFront
22151 \begin_layout LyX-Code
22156 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22159 \begin_layout LyX-Code
22160 $$ResizeBack$$RotateBack"
22163 \begin_layout LyX-Code
22164 UpdateFormat pdftex
22167 \begin_layout LyX-Code
22168 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22171 \begin_layout LyX-Code
22172 Requirement "graphicx"
22175 \begin_layout LyX-Code
22176 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22179 \begin_layout LyX-Code
22180 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22183 \begin_layout LyX-Code
22187 \begin_layout LyX-Code
22191 \begin_layout LyX-Code
22192 Product "$$Contents(
22194 "$$AbsPath$$Basename.asc
22199 \begin_layout LyX-Code
22200 UpdateFormat asciixfig
22203 \begin_layout LyX-Code
22204 UpdateResult "$$AbsPath$$Basename.asc"
22207 \begin_layout LyX-Code
22211 \begin_layout LyX-Code
22215 \begin_layout LyX-Code
22216 Product "<graphic fileref=
22218 "$$AbsOrRelPathMaster$$Basename.eps
22223 \begin_layout LyX-Code
22227 \begin_layout LyX-Code
22231 \begin_layout LyX-Code
22232 UpdateResult "$$AbsPath$$Basename.eps"
22235 \begin_layout LyX-Code
22236 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22239 \begin_layout LyX-Code
22240 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22243 \begin_layout LyX-Code
22247 \begin_layout LyX-Code
22248 Product "[XFig: $$FName]"
22251 \begin_layout LyX-Code
22255 \begin_layout LyX-Code
22259 \begin_layout Standard
22260 As you can see, the template is enclosed in
22261 \begin_inset Flex Code
22264 \begin_layout Plain Layout
22270 \SpecialChar \ldots{}
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22282 It contains a header specifying some general settings and, for each supported
22283 primary document file format, a section
22284 \begin_inset Flex Code
22287 \begin_layout Plain Layout
22293 \SpecialChar \ldots{}
22295 \begin_inset Flex Code
22298 \begin_layout Plain Layout
22307 \begin_layout Subsection
22308 The template header
22311 \begin_layout Description
22312 \begin_inset Flex Code
22315 \begin_layout Plain Layout
22316 AutomaticProduction
22317 \begin_inset space ~
22325 Whether the file represented by the template must be generated by LyX.
22326 This command must occur exactly once.
22329 \begin_layout Description
22330 \begin_inset Flex Code
22333 \begin_layout Plain Layout
22335 \begin_inset space ~
22343 A glob pattern that is used in the file dialog to filter out the desired
22345 If there is more than one possible file extension (e.
22346 \begin_inset space \thinspace{}
22350 \begin_inset space \space{}
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22364 \begin_inset Flex Code
22367 \begin_layout Plain Layout
22373 ), use something like
22374 \begin_inset Flex Code
22377 \begin_layout Plain Layout
22384 This command must occur exactly once.
22387 \begin_layout Description
22388 \begin_inset Flex Code
22391 \begin_layout Plain Layout
22393 \begin_inset space ~
22401 The text that is displayed on the button.
22402 This command must occur exactly once.
22405 \begin_layout Description
22406 \begin_inset Flex Code
22409 \begin_layout Plain Layout
22411 \begin_inset space ~
22415 \begin_inset space ~
22423 The help text that is used in the External dialog.
22424 Provide enough information to explain to the user just what the template
22425 can provide him with.
22426 This command must occur exactly once.
22429 \begin_layout Description
22430 \begin_inset Flex Code
22433 \begin_layout Plain Layout
22435 \begin_inset space ~
22443 The file format of the original file.
22444 This must be the name of a format that is known to LyX (see
22445 \begin_inset CommandInset ref
22447 reference "sec:Formats"
22453 \begin_inset Quotes eld
22457 \begin_inset Flex Code
22460 \begin_layout Plain Layout
22467 \begin_inset Quotes erd
22470 if the template can handle original files of more than one format.
22471 LyX will attempt to interrogate the file itself in order to deduce its
22472 format in this case.
22473 This command must occur exactly once.
22476 \begin_layout Description
22477 \begin_inset Flex Code
22480 \begin_layout Plain Layout
22482 \begin_inset space ~
22490 A unique name for the template.
22491 It must not contain substitution macros (see below).
22494 \begin_layout Description
22495 \begin_inset Flex Code
22498 \begin_layout Plain Layout
22500 \begin_inset space ~
22503 Rotate|Resize|Clip|Extra
22508 This command specifies which transformations are supported by this template.
22509 It may occur zero or more times.
22510 This command enables the corresponding tabs in the external dialog.
22512 \begin_inset Flex Code
22515 \begin_layout Plain Layout
22521 command must have either a corresponding
22522 \begin_inset Flex Code
22525 \begin_layout Plain Layout
22532 \begin_inset Flex Code
22535 \begin_layout Plain Layout
22542 \begin_inset Flex Code
22545 \begin_layout Plain Layout
22552 Otherwise the transformation will not be supported by that format.
22555 \begin_layout Subsection
22559 \begin_layout Description
22560 \begin_inset Flex Code
22563 \begin_layout Plain Layout
22565 \begin_inset space ~
22568 LaTeX|PDFLaTeX|PlainText|DocBook
22573 The primary document file format that this format definition is for.
22574 Not every template has a sensible representation in all document file formats.
22575 Please define nevertheless a
22576 \begin_inset Flex Code
22579 \begin_layout Plain Layout
22585 section for all templates.
22586 Use a dummy text when no representation is available.
22587 Then you can at least see a reference to the external material in the exported
22591 \begin_layout Description
22592 \begin_inset Flex Code
22595 \begin_layout Plain Layout
22597 \begin_inset space ~
22601 \begin_inset space ~
22609 This command defines an additional macro
22610 \begin_inset Flex Code
22613 \begin_layout Plain Layout
22619 for substitution in
22620 \begin_inset Flex Code
22623 \begin_layout Plain Layout
22631 \begin_inset Flex Code
22634 \begin_layout Plain Layout
22640 itself may contain substitution macros.
22641 The advantage over using
22642 \begin_inset Flex Code
22645 \begin_layout Plain Layout
22652 \begin_inset Flex Code
22655 \begin_layout Plain Layout
22661 is that the substituted value of
22662 \begin_inset Flex Code
22665 \begin_layout Plain Layout
22671 is sanitized so that it is a valid optional argument in the document format.
22672 This command may occur zero or more times.
22675 \begin_layout Description
22676 \begin_inset Flex Code
22679 \begin_layout Plain Layout
22681 \begin_inset space ~
22689 The text that is inserted in the exported document.
22690 This is actually the most important command and can be quite complex.
22691 This command must occur exactly once.
22694 \begin_layout Description
22695 \begin_inset Flex Code
22698 \begin_layout Plain Layout
22700 \begin_inset space ~
22708 This command specifies a preamble snippet that will be included in the
22710 It has to be defined using
22711 \begin_inset Flex Code
22714 \begin_layout Plain Layout
22720 \SpecialChar \ldots{}
22722 \begin_inset Flex Code
22725 \begin_layout Plain Layout
22732 This command may occur zero or more times.
22735 \begin_layout Description
22736 \begin_inset Flex Code
22739 \begin_layout Plain Layout
22741 \begin_inset space ~
22745 \begin_inset space ~
22753 This command denotes files that are created by the conversion process and
22754 are needed for a particular export format.
22755 If the filename is relative, it is interpreted relative to the master document.
22756 This command may be given zero or more times.
22759 \begin_layout Description
22760 \begin_inset Flex Code
22763 \begin_layout Plain Layout
22765 \begin_inset space ~
22773 The name of a required LaTeX package.
22774 The package is included via
22775 \begin_inset Flex Code
22778 \begin_layout Plain Layout
22786 in the LaTeX preamble.
22787 This command may occur zero or more times.
22790 \begin_layout Description
22791 \begin_inset Flex Code
22794 \begin_layout Plain Layout
22796 \begin_inset space ~
22800 \begin_inset space ~
22803 RotationLatexCommand
22808 This command specifies that the built in LaTeX command should be used for
22810 This command may occur once or not at all.
22813 \begin_layout Description
22814 \begin_inset Flex Code
22817 \begin_layout Plain Layout
22819 \begin_inset space ~
22823 \begin_inset space ~
22831 This command specifies that the built in LaTeX command should be used for
22833 This command may occur once or not at all.
22836 \begin_layout Description
22837 \begin_inset Flex Code
22840 \begin_layout Plain Layout
22842 \begin_inset space ~
22846 \begin_inset space ~
22849 RotationLatexOption
22854 This command specifies that rotation is done via an optional argument.
22855 This command may occur once or not at all.
22858 \begin_layout Description
22859 \begin_inset Flex Code
22862 \begin_layout Plain Layout
22864 \begin_inset space ~
22868 \begin_inset space ~
22876 This command specifies that resizing is done via an optional argument.
22877 This command may occur once or not at all.
22880 \begin_layout Description
22881 \begin_inset Flex Code
22884 \begin_layout Plain Layout
22886 \begin_inset space ~
22890 \begin_inset space ~
22898 This command specifies that clipping is done via an optional argument.
22899 This command may occur once or not at all.
22902 \begin_layout Description
22903 \begin_inset Flex Code
22906 \begin_layout Plain Layout
22908 \begin_inset space ~
22912 \begin_inset space ~
22920 This command specifies that an extra optional argument is used.
22921 This command may occur once or not at all.
22924 \begin_layout Description
22925 \begin_inset Flex Code
22928 \begin_layout Plain Layout
22930 \begin_inset space ~
22938 The file format of the converted file.
22939 This must be the name of a format that is known to LyX (see the
22940 \begin_inset Flex MenuItem
22943 \begin_layout Plain Layout
22944 Tools\SpecialChar \menuseparator
22945 Preferences\SpecialChar \menuseparator
22946 File Handling\SpecialChar \menuseparator
22953 This command must occur exactly once.
22954 If the resulting file format is PDF, you need to specify the format
22955 \begin_inset Flex Code
22958 \begin_layout Plain Layout
22965 This is the PDF format used for including graphics.
22966 The other defined PDF formats are for document export.
22969 \begin_layout Description
22970 \begin_inset Flex Code
22973 \begin_layout Plain Layout
22975 \begin_inset space ~
22983 The file name of the converted file.
22984 The file name must be absolute.
22985 This command must occur exactly once.
22988 \begin_layout Subsection
22989 Preamble definitions
22992 \begin_layout Standard
22993 The external template configuration file may contain additional preamble
22994 definitions enclosed by
22995 \begin_inset Flex Code
22998 \begin_layout Plain Layout
23004 \SpecialChar \ldots{}
23006 \begin_inset Flex Code
23009 \begin_layout Plain Layout
23016 They can be used by the templates in the
23017 \begin_inset Flex Code
23020 \begin_layout Plain Layout
23029 \begin_layout Section
23030 The substitution mechanism
23033 \begin_layout Standard
23034 When the external material facility invokes an external program, it is done
23035 on the basis of a command defined in the template configuration file.
23036 These commands can contain various macros that are expanded before execution.
23037 Execution always take place in the directory of the containing document.
23040 \begin_layout Standard
23041 Also, whenever external material is to be displayed, the name will be produced
23042 by the substitution mechanism, and most other commands in the template
23043 definition support substitution as well.
23046 \begin_layout Standard
23047 The available macros are the following:
23050 \begin_layout Description
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23055 $$AbsOrRelPathMaster
23060 The file path, absolute or relative to the master LyX document.
23063 \begin_layout Description
23064 \begin_inset Flex Code
23067 \begin_layout Plain Layout
23068 $$AbsOrRelPathParent
23073 The file path, absolute or relative to the LyX document.
23076 \begin_layout Description
23077 \begin_inset Flex Code
23080 \begin_layout Plain Layout
23086 The absolute file path.
23089 \begin_layout Description
23090 \begin_inset Flex Code
23093 \begin_layout Plain Layout
23099 The filename without path and without the extension.
23102 \begin_layout Description
23103 \begin_inset Flex Code
23106 \begin_layout Plain Layout
23108 \begin_inset Quotes eld
23112 \begin_inset Quotes erd
23120 This macro will expand to the contents of the file with the name
23121 \begin_inset Flex Code
23124 \begin_layout Plain Layout
23133 \begin_layout Description
23134 \begin_inset Flex Code
23137 \begin_layout Plain Layout
23143 The file extension (including the dot).
23146 \begin_layout Description
23147 \begin_inset Flex Code
23150 \begin_layout Plain Layout
23156 The filename of the file specified in the external material dialog.
23157 This is either an absolute name, or it is relative to the LyX document.
23160 \begin_layout Description
23161 \begin_inset Flex Code
23164 \begin_layout Plain Layout
23171 \begin_inset Flex Code
23174 \begin_layout Plain Layout
23180 (absolute name or relative to the LyX document).
23183 \begin_layout Description
23184 \begin_inset Flex Code
23187 \begin_layout Plain Layout
23193 The file path, relative to the master LyX document.
23196 \begin_layout Description
23197 \begin_inset Flex Code
23200 \begin_layout Plain Layout
23206 The file path, relative to the LyX document.
23209 \begin_layout Description
23210 \begin_inset Flex Code
23213 \begin_layout Plain Layout
23219 This macro will expand to the absolute path of the system directory.
23220 This is typically used to point to the various helper scripts that are
23224 \begin_layout Description
23225 \begin_inset Flex Code
23228 \begin_layout Plain Layout
23234 A name and full path to a temporary file which will be automatically deleted
23235 whenever the containing document is closed, or the external material insertion
23239 \begin_layout Standard
23240 All path macros contain a trailing directory separator, so you can construct
23242 \begin_inset space \thinspace{}
23246 \begin_inset space \space{}
23249 the absolute filename with
23250 \begin_inset Flex Code
23253 \begin_layout Plain Layout
23254 $$AbsPath$$Basename$$Extension
23262 \begin_layout Standard
23263 The macros above are substituted in all commands unless otherwise noted.
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23274 supports additionally the following substitutions if they are enabled by
23276 \begin_inset Flex Code
23279 \begin_layout Plain Layout
23286 \begin_inset Flex Code
23289 \begin_layout Plain Layout
23298 \begin_layout Description
23299 \begin_inset Flex Code
23302 \begin_layout Plain Layout
23308 The front part of the resize command.
23311 \begin_layout Description
23312 \begin_inset Flex Code
23315 \begin_layout Plain Layout
23321 The back part of the resize command.
23324 \begin_layout Description
23325 \begin_inset Flex Code
23328 \begin_layout Plain Layout
23334 The front part of the rotation command.
23337 \begin_layout Description
23338 \begin_inset Flex Code
23341 \begin_layout Plain Layout
23347 The back part of the rotation command.
23350 \begin_layout Standard
23351 The value string of the
23352 \begin_inset Flex Code
23355 \begin_layout Plain Layout
23361 command supports additionally the following substitutions if they are enabled
23363 \begin_inset Flex Code
23366 \begin_layout Plain Layout
23373 \begin_inset Flex Code
23376 \begin_layout Plain Layout
23385 \begin_layout Description
23386 \begin_inset Flex Code
23389 \begin_layout Plain Layout
23398 \begin_layout Description
23399 \begin_inset Flex Code
23402 \begin_layout Plain Layout
23411 \begin_layout Description
23412 \begin_inset Flex Code
23415 \begin_layout Plain Layout
23424 \begin_layout Description
23425 \begin_inset Flex Code
23428 \begin_layout Plain Layout
23434 The rotation option.
23437 \begin_layout Standard
23438 You may ask why there are so many path macros.
23439 There are mainly two reasons:
23442 \begin_layout Enumerate
23443 Relative and absolute file names should remain relative or absolute, respectivel
23445 Users may have reasons to prefer either form.
23446 Relative names are useful for portable documents that should work on different
23447 machines, for example.
23448 Absolute names may be required by some programs.
23451 \begin_layout Enumerate
23452 LaTeX treats relative file names differently than LyX and other programs
23453 in nested included files.
23454 For LyX, a relative file name is always relative to the document that contains
23456 For LaTeX, it is always relative to the master document.
23457 These two definitions are identical if you have only one document, but
23458 differ if you have a master document that includes part documents.
23459 That means that relative filenames must be transformed when presented to
23461 Fortunately LyX does this automatically for you if you choose the right
23465 \begin_layout Standard
23466 So which path macro should be used in new template definitions? The rule
23470 \begin_layout Itemize
23472 \begin_inset Flex Code
23475 \begin_layout Plain Layout
23481 if an absolute path is required.
23484 \begin_layout Itemize
23486 \begin_inset Flex Code
23489 \begin_layout Plain Layout
23490 $$AbsOrRelPathMaster
23495 if the substituted string is some kind of LaTeX input.
23498 \begin_layout Itemize
23500 \begin_inset Flex Code
23503 \begin_layout Plain Layout
23504 $$AbsOrRelPathParent
23509 in order to preserve the user's choice.
23512 \begin_layout Standard
23513 There are special cases where this rule does not work and e.
23514 \begin_inset space \thinspace{}
23518 \begin_inset space \space{}
23521 relative names are needed, but normally it will work just fine.
23522 One example for such a case is the command
23523 \begin_inset Flex Code
23526 \begin_layout Plain Layout
23527 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23532 in the XFig template above: We can't use the absolute name because the
23534 \begin_inset Flex Code
23537 \begin_layout Plain Layout
23543 files needs the relative name in order to rewrite the file content.
23546 \begin_layout Section
23547 Security discussion
23548 \begin_inset CommandInset label
23550 name "sec:Security-discussion"
23557 \begin_layout Standard
23558 The external material feature interfaces with a lot of external programs
23559 and does so automatically, so we have to consider the security implications
23561 In particular, since you have the option of including your own filenames
23562 and/or parameter strings and those are expanded into a command, it seems
23563 that it would be possible to create a malicious document which executes
23564 arbitrary commands when a user views or prints the document.
23565 This is something we definitely want to avoid.
23568 \begin_layout Standard
23569 However, since the external program commands are specified in the template
23570 configuration file only, there are no security issues if LyX is properly
23571 configured with safe templates only.
23572 This is so because the external programs are invoked with the
23573 \begin_inset Flex Code
23576 \begin_layout Plain Layout
23582 -system call rather than the
23583 \begin_inset Flex Code
23586 \begin_layout Plain Layout
23592 system-call, so it's not possible to execute arbitrary commands from the
23593 filename or parameter section via the shell.
23596 \begin_layout Standard
23597 This also implies that you are restricted in what command strings you can
23598 use in the external material templates.
23599 In particular, pipes and redirection are not readily available.
23600 This has to be so if LyX should remain safe.
23601 If you want to use some of the shell features, you should write a safe
23602 script to do this in a controlled manner, and then invoke the script from
23603 the command string.
23607 \begin_layout Standard
23608 It is possible to design a template that interacts directly with the shell,
23609 but since this would allow a malicious user to execute arbitrary commands
23610 by writing clever filenames and/or parameters, we generally recommend that
23611 you only use safe scripts that work with the
23612 \begin_inset Flex Code
23615 \begin_layout Plain Layout
23621 system call in a controlled manner.
23622 Of course, for use in a controlled environment, it can be tempting to just
23623 fall back to use ordinary shell scripts.
23624 If you do so, be aware that you
23628 provide an easily exploitable security hole in your system.
23629 Of course it stands to reason that such unsafe templates will never be
23630 included in the standard LyX distribution, although we do encourage people
23631 to submit new templates in the open source tradition.
23632 But LyX as shipped from the official distribution channels will never have
23636 \begin_layout Standard
23637 Including external material provides a lot of power, and you have to be
23638 careful not to introduce security hazards with this power.
23639 A subtle error in a single line in an innocent looking script can open
23640 the door to huge security problems.
23641 So if you do not fully understand the issues, we recommend that you consult
23642 a knowledgeable security professional or the LyX development team if you
23643 have any questions about whether a given template is safe or not.
23644 And do this before you use it in an uncontrolled environment.
23647 \begin_layout Chapter
23649 List of supported LyX functions to be used in layouts
23650 \begin_inset CommandInset label
23652 name "chap:List-of-functions"
23659 \begin_layout Standard
23661 \begin_inset Tabular
23662 <lyxtabular version="3" rows="11" columns="8">
23663 <features tabularvalignment="middle">
23664 <column alignment="left" valignment="top">
23665 <column alignment="left" valignment="top">
23666 <column alignment="left" valignment="top">
23667 <column alignment="left" valignment="top">
23668 <column alignment="left" valignment="top">
23669 <column alignment="left" valignment="top">
23670 <column alignment="left" valignment="top">
23671 <column alignment="left" valignment="top">
23673 <cell alignment="left" valignment="top" usebox="none">
23676 \begin_layout Plain Layout
23682 <cell alignment="left" valignment="top" usebox="none">
23685 \begin_layout Plain Layout
23691 <cell alignment="left" valignment="top" usebox="none">
23694 \begin_layout Plain Layout
23700 <cell alignment="left" valignment="top" usebox="none">
23703 \begin_layout Plain Layout
23709 <cell alignment="center" valignment="top" usebox="none">
23712 \begin_layout Plain Layout
23718 <cell alignment="center" valignment="top" usebox="none">
23721 \begin_layout Plain Layout
23727 <cell alignment="center" valignment="top" usebox="none">
23730 \begin_layout Plain Layout
23736 <cell alignment="center" valignment="top" usebox="none">
23739 \begin_layout Plain Layout
23747 <cell alignment="left" valignment="top" usebox="none">
23750 \begin_layout Plain Layout
23756 <cell alignment="left" valignment="top" usebox="none">
23759 \begin_layout Plain Layout
23765 <cell alignment="left" valignment="top" usebox="none">
23768 \begin_layout Plain Layout
23774 <cell alignment="left" valignment="top" usebox="none">
23777 \begin_layout Plain Layout
23783 <cell alignment="center" valignment="top" usebox="none">
23786 \begin_layout Plain Layout
23792 <cell alignment="center" valignment="top" usebox="none">
23795 \begin_layout Plain Layout
23801 <cell alignment="center" valignment="top" usebox="none">
23804 \begin_layout Plain Layout
23810 <cell alignment="center" valignment="top" usebox="none">
23813 \begin_layout Plain Layout
23821 <cell alignment="left" valignment="top" usebox="none">
23824 \begin_layout Plain Layout
23830 <cell alignment="left" valignment="top" usebox="none">
23833 \begin_layout Plain Layout
23839 <cell alignment="left" valignment="top" usebox="none">
23842 \begin_layout Plain Layout
23848 <cell alignment="left" valignment="top" usebox="none">
23851 \begin_layout Plain Layout
23857 <cell alignment="center" valignment="top" usebox="none">
23860 \begin_layout Plain Layout
23866 <cell alignment="center" valignment="top" usebox="none">
23869 \begin_layout Plain Layout
23875 <cell alignment="center" valignment="top" usebox="none">
23878 \begin_layout Plain Layout
23884 <cell alignment="center" valignment="top" usebox="none">
23887 \begin_layout Plain Layout
23895 <cell alignment="left" valignment="top" usebox="none">
23898 \begin_layout Plain Layout
23904 <cell alignment="left" valignment="top" usebox="none">
23907 \begin_layout Plain Layout
23913 <cell alignment="left" valignment="top" usebox="none">
23916 \begin_layout Plain Layout
23922 <cell alignment="left" valignment="top" usebox="none">
23925 \begin_layout Plain Layout
23931 <cell alignment="center" valignment="top" usebox="none">
23934 \begin_layout Plain Layout
23940 <cell alignment="center" valignment="top" usebox="none">
23943 \begin_layout Plain Layout
23949 <cell alignment="center" valignment="top" usebox="none">
23952 \begin_layout Plain Layout
23958 <cell alignment="center" valignment="top" usebox="none">
23961 \begin_layout Plain Layout
23969 <cell alignment="left" valignment="top" usebox="none">
23972 \begin_layout Plain Layout
23978 <cell alignment="left" valignment="top" usebox="none">
23981 \begin_layout Plain Layout
23987 <cell alignment="left" valignment="top" usebox="none">
23990 \begin_layout Plain Layout
23996 <cell alignment="left" valignment="top" usebox="none">
23999 \begin_layout Plain Layout
24005 <cell alignment="center" valignment="top" usebox="none">
24008 \begin_layout Plain Layout
24014 <cell alignment="center" valignment="top" usebox="none">
24017 \begin_layout Plain Layout
24023 <cell alignment="center" valignment="top" usebox="none">
24026 \begin_layout Plain Layout
24032 <cell alignment="center" valignment="top" usebox="none">
24035 \begin_layout Plain Layout
24043 <cell alignment="left" valignment="top" usebox="none">
24046 \begin_layout Plain Layout
24052 <cell alignment="left" valignment="top" usebox="none">
24055 \begin_layout Plain Layout
24061 <cell alignment="left" valignment="top" usebox="none">
24064 \begin_layout Plain Layout
24070 <cell alignment="left" valignment="top" usebox="none">
24073 \begin_layout Plain Layout
24079 <cell alignment="center" valignment="top" usebox="none">
24082 \begin_layout Plain Layout
24088 <cell alignment="center" valignment="top" usebox="none">
24091 \begin_layout Plain Layout
24097 <cell alignment="center" valignment="top" usebox="none">
24100 \begin_layout Plain Layout
24106 <cell alignment="center" valignment="top" usebox="none">
24109 \begin_layout Plain Layout
24117 <cell alignment="left" valignment="top" usebox="none">
24120 \begin_layout Plain Layout
24126 <cell alignment="left" valignment="top" usebox="none">
24129 \begin_layout Plain Layout
24135 <cell alignment="left" valignment="top" usebox="none">
24138 \begin_layout Plain Layout
24144 <cell alignment="left" valignment="top" usebox="none">
24147 \begin_layout Plain Layout
24153 <cell alignment="center" valignment="top" usebox="none">
24156 \begin_layout Plain Layout
24162 <cell alignment="center" valignment="top" usebox="none">
24165 \begin_layout Plain Layout
24171 <cell alignment="center" valignment="top" usebox="none">
24174 \begin_layout Plain Layout
24180 <cell alignment="center" valignment="top" usebox="none">
24183 \begin_layout Plain Layout
24191 <cell alignment="left" valignment="top" usebox="none">
24194 \begin_layout Plain Layout
24200 <cell alignment="left" valignment="top" usebox="none">
24203 \begin_layout Plain Layout
24209 <cell alignment="left" valignment="top" usebox="none">
24212 \begin_layout Plain Layout
24218 <cell alignment="left" valignment="top" usebox="none">
24221 \begin_layout Plain Layout
24227 <cell alignment="center" valignment="top" usebox="none">
24230 \begin_layout Plain Layout
24236 <cell alignment="center" valignment="top" usebox="none">
24239 \begin_layout Plain Layout
24245 <cell alignment="center" valignment="top" usebox="none">
24248 \begin_layout Plain Layout
24254 <cell alignment="center" valignment="top" usebox="none">
24257 \begin_layout Plain Layout
24265 <cell alignment="left" valignment="top" usebox="none">
24268 \begin_layout Plain Layout
24274 <cell alignment="left" valignment="top" usebox="none">
24277 \begin_layout Plain Layout
24283 <cell alignment="left" valignment="top" usebox="none">
24286 \begin_layout Plain Layout
24292 <cell alignment="left" valignment="top" usebox="none">
24295 \begin_layout Plain Layout
24301 <cell alignment="center" valignment="top" usebox="none">
24304 \begin_layout Plain Layout
24310 <cell alignment="center" valignment="top" usebox="none">
24313 \begin_layout Plain Layout
24319 <cell alignment="center" valignment="top" usebox="none">
24322 \begin_layout Plain Layout
24328 <cell alignment="center" valignment="top" usebox="none">
24331 \begin_layout Plain Layout
24339 <cell alignment="left" valignment="top" usebox="none">
24342 \begin_layout Plain Layout
24348 <cell alignment="left" valignment="top" usebox="none">
24351 \begin_layout Plain Layout
24357 <cell alignment="left" valignment="top" usebox="none">
24360 \begin_layout Plain Layout
24366 <cell alignment="left" valignment="top" usebox="none">
24369 \begin_layout Plain Layout
24375 <cell alignment="center" valignment="top" usebox="none">
24378 \begin_layout Plain Layout
24384 <cell alignment="center" valignment="top" usebox="none">
24387 \begin_layout Plain Layout
24393 <cell alignment="center" valignment="top" usebox="none">
24396 \begin_layout Plain Layout
24402 <cell alignment="center" valignment="top" usebox="none">
24405 \begin_layout Plain Layout
24413 <cell alignment="center" valignment="top" usebox="none">
24416 \begin_layout Plain Layout
24422 <cell alignment="center" valignment="top" usebox="none">
24425 \begin_layout Plain Layout
24431 <cell alignment="center" valignment="top" usebox="none">
24434 \begin_layout Plain Layout
24440 <cell alignment="center" valignment="top" usebox="none">
24443 \begin_layout Plain Layout
24449 <cell alignment="center" valignment="top" usebox="none">
24452 \begin_layout Plain Layout
24458 <cell alignment="center" valignment="top" usebox="none">
24461 \begin_layout Plain Layout
24467 <cell alignment="center" valignment="top" usebox="none">
24470 \begin_layout Plain Layout
24476 <cell alignment="center" valignment="top" usebox="none">
24479 \begin_layout Plain Layout
24493 \begin_layout Chapter
24494 Names of available colors to be used in layouts
24495 \begin_inset CommandInset label
24497 name "chap:Names-of-colors"
24504 \begin_layout Standard
24505 The colors listed here are the standard colors and the those that you can
24506 adjust in the LyX preferences.
24509 \begin_layout Description
24522 No particular color -- clear or default
24525 \begin_layout Description
24529 \begin_layout Description
24533 \begin_layout Description
24537 \begin_layout Description
24541 \begin_layout Description
24545 \begin_layout Description
24549 \begin_layout Description
24553 \begin_layout Description
24557 \begin_layout Description
24558 added_space Added space marker color
24561 \begin_layout Description
24562 addedtext Added text color
24565 \begin_layout Description
24566 appendix Appendix marker color
24569 \begin_layout Description
24570 background Background color
24573 \begin_layout Description
24574 bottomarea Bottom area color
24577 \begin_layout Description
24578 branchlabel Label color for branches
24581 \begin_layout Description
24582 buttonbg Color used for bottom background
24585 \begin_layout Description
24586 buttonhoverbg Color used for button background under focus
24589 \begin_layout Description
24590 buttonframe Color for inset button frames
24593 \begin_layout Description
24594 changebar Changebar color
24597 \begin_layout Description
24598 changedtextauthor1 Changed text color author 1
24601 \begin_layout Description
24602 changedtextauthor2 Changed text color author 2
24605 \begin_layout Description
24606 changedtextauthor3 Changed text color author 3
24609 \begin_layout Description
24610 changedtextauthor4 Changed text color author 4
24613 \begin_layout Description
24614 changedtextauthor5 Changed text color author 5
24617 \begin_layout Description
24618 collapsable_inset_frame Collapsable insets framecolor
24621 \begin_layout Description
24622 collapsable_inset_text Collapsable insets text color
24625 \begin_layout Description
24626 command Text color for command insets
24629 \begin_layout Description
24630 commandbg Background color for command insets
24633 \begin_layout Description
24634 commandframe Frame color for command insets
24637 \begin_layout Description
24638 comment color for comments
24641 \begin_layout Description
24642 commentbg Background color of comments
24645 \begin_layout Description
24646 cursor Cursor color
24649 \begin_layout Description
24650 deletedtext Deleted text color
24653 \begin_layout Description
24654 deletedtextmodifier Deleted text modifying color
24657 \begin_layout Description
24658 depthbar Color for the depth bars in the margin
24661 \begin_layout Description
24662 eolmarker End of line marker color
24665 \begin_layout Description
24666 error Color of the LaTeX error box
24669 \begin_layout Description
24670 footlabel Label color for footnotes
24673 \begin_layout Description
24674 graphicsbg Graphics inset background color
24677 \begin_layout Description
24678 greyedout Label color for greyedout insets
24681 \begin_layout Description
24682 greyedoutbg Background color of greyedout inset
24685 \begin_layout Description
24686 greyedouttext Color for greyedout inset text
24689 \begin_layout Description
24690 indexlabel Label color for index insets
24693 \begin_layout Description
24694 ignore The color is ignored
24697 \begin_layout Description
24698 inherit The color is inherited
24701 \begin_layout Description
24702 inlinecompletion Inline completion color
24705 \begin_layout Description
24706 insetbg Inset marker background color
24709 \begin_layout Description
24710 insetframe Inset marker frame color
24713 \begin_layout Description
24714 language Color for marking foreign language words
24717 \begin_layout Description
24718 latex Text color in LaTeX mode
24721 \begin_layout Description
24722 listingsbg Background color of listings inset
24725 \begin_layout Description
24726 marginlabel Label color for margin notes
24729 \begin_layout Description
24730 math Math inset text color
24733 \begin_layout Description
24734 mathbg Math inset background color
24737 \begin_layout Description
24738 mathcorners Math inset frame color not under focus
24741 \begin_layout Description
24742 mathframe Math inset frame color under focus
24745 \begin_layout Description
24746 mathline Math line color
24749 \begin_layout Description
24750 mathmacrobg Macro math inset background color
24753 \begin_layout Description
24754 mathmacroblend Macro math blended color
24757 \begin_layout Description
24758 mathmacroframe Macro math frame color
24761 \begin_layout Description
24762 mathmacrohoverbg Macro math inset background color hovered
24765 \begin_layout Description
24766 mathmacrolabel Macro math label color
24769 \begin_layout Description
24770 mathmacronewarg Macro template color for new parameters
24773 \begin_layout Description
24774 mathmacrooldarg Macro template color for old parameters
24777 \begin_layout Description
24778 newpage New page color
24781 \begin_layout Description
24782 nonunique_inlinecompletion Inline completion color for the non-unique part
24785 \begin_layout Description
24786 notebg Background color of notes
24789 \begin_layout Description
24790 notelabel Label color for notes
24793 \begin_layout Description
24794 pagebreak Page break/line break color
24797 \begin_layout Description
24798 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24801 \begin_layout Description
24802 phantomtext Text color for phantom insets
24805 \begin_layout Description
24806 preview The color used for previews
24809 \begin_layout Description
24810 previewframe Preview frame color
24813 \begin_layout Description
24814 regexpframe Color for regexp frame
24817 \begin_layout Description
24818 selection Background color of selected text
24821 \begin_layout Description
24822 selectiontext Foreground color of selected text
24825 \begin_layout Description
24826 shadedbg Background color of shaded box
24829 \begin_layout Description
24830 special Special chars text color
24833 \begin_layout Description
24834 tabularline Table line color
24837 \begin_layout Description
24838 tabularonoffline Table line color
24841 \begin_layout Description
24842 urllabel Label color for URL insets
24845 \begin_layout Description
24846 urltext Color for URL inset text