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"
159 Customizing LyX: Features for the Advanced User
167 \begin_layout Plain Layout
169 If you have comments or error corrections, please send them to the LyX Documenta
171 \begin_inset CommandInset href
173 target "lyx-docs@lists.lyx.org"
180 \begin_inset Quotes eld
184 \begin_inset Quotes erd
187 in the subject header, and please cc the current maintainer of this file,
188 Richard Heck <rgheck@comcast.net>.
194 \begin_inset Newline newline
198 \begin_inset Newline newline
204 \begin_layout Standard
205 \begin_inset CommandInset toc
206 LatexCommand tableofcontents
213 \begin_layout Standard
214 \begin_inset Note Note
217 \begin_layout Plain Layout
218 Please use change tracking when modifying this document.
219 This makes it easier for our translators to recognize things that have
220 been changed, and it helps the maintainer keep up-to-date with what's been
229 \begin_layout Chapter
233 \begin_layout Standard
234 This manual covers the customization features present in LyX.
235 In it, we discuss issues like keyboard shortcuts, screen previewing options,
236 printer options, sending commands to LyX via the LyX Server, internationalizati
237 on, installing new LaTeX classes and LyX layouts, etc.
238 We can't possibly hope to touch on everything you can change—our developers
239 add new features faster than we can document them—but we will explain the
240 most common customizations and hopefully point you in the right direction
241 for some of the more obscure ones.
244 \begin_layout Standard
245 \begin_inset Branch OutDated
248 \begin_layout Standard
249 Information from previous versions of this document that now seems to be
250 outdated is contained in the OutDated branch of this document.
251 By default, this information will not appear in the LaTeX output.
259 \begin_layout Chapter
260 LyX configuration files
263 \begin_layout Standard
264 This chapter aims to help you to find your way through the LyX configuration
266 Before continuing to read this chapter, you should find out where your
267 LyX library and user directories are by using
268 \begin_inset Flex MenuItem
271 \begin_layout Plain Layout
272 Help\SpecialChar \menuseparator
283 The library directory is the place where LyX places its system-wide configurati
284 on files; the user directory is where you can place your modified versions.
285 We will call the former
286 \begin_inset Flex Code
289 \begin_layout Plain Layout
296 \begin_inset Flex MenuItem
299 \begin_layout Plain Layout
305 in the remainder of this document.
309 \begin_layout Section
311 \begin_inset Flex Code
314 \begin_layout Plain Layout
323 \begin_layout Standard
324 \begin_inset Flex Code
327 \begin_layout Plain Layout
333 and its sub-directories contain a number of files and that can be used
334 to customize LyX's behavior.
335 You can change many of these files from within LyX itself through the
336 \begin_inset Flex MenuItem
339 \begin_layout Plain Layout
340 Tools\SpecialChar \menuseparator
347 Most customization that you will want to do in LyX is possible through
349 However, many other inner aspects of LyX can be customized by modifying
351 \begin_inset Flex Code
354 \begin_layout Plain Layout
361 These files fall in different categories, described in the following subsection
365 \begin_layout Subsection
366 Automatically generated files
369 \begin_layout Standard
370 The files, which are to be found in
371 \begin_inset Flex MenuItem
374 \begin_layout Plain Layout
380 , are generated when you configure LyX.
381 They contain various default values that are guessed by inspection.
382 In general, it is not a good idea to modify them, since they might be overwritt
386 \begin_layout Labeling
387 \labelwidthstring 00.00.0000
388 \begin_inset Flex Code
391 \begin_layout Plain Layout
397 contains defaults for various commands.
400 \begin_layout Labeling
401 \labelwidthstring 00.00.0000
402 \begin_inset Flex Code
405 \begin_layout Plain Layout
411 contains the list of packages that have been recognized by LyX.
412 It is currently unused by the LyX program itself, but the information extracted
413 , and more, is made available with
414 \begin_inset Flex MenuItem
417 \begin_layout Plain Layout
418 Help\SpecialChar \menuseparator
431 \begin_layout Labeling
432 \labelwidthstring 00.00.0000
433 \begin_inset Flex Code
436 \begin_layout Plain Layout
442 the list of text classes that have been found in your
443 \begin_inset Flex Code
446 \begin_layout Plain Layout
452 directories, along with the associated LaTeX document class and their descripti
456 \begin_layout Labeling
457 \labelwidthstring 00.00.0000
458 \begin_inset Flex Code
461 \begin_layout Plain Layout
467 the list of layout modules found in your
468 \begin_inset Flex Code
471 \begin_layout Plain Layout
480 \begin_layout Labeling
481 \labelwidthstring 00.00.0000
482 \begin_inset Flex Code
485 \begin_layout Plain Layout
491 lists of various sorts of LaTeX-related files found on your system
494 \begin_layout Labeling
495 \labelwidthstring 00.00.0000
496 \begin_inset Flex Code
499 \begin_layout Plain Layout
505 is automatically generated during configuration from the file
506 \begin_inset Flex Code
509 \begin_layout Plain Layout
516 It contains information on your LaTeX configuration.
519 \begin_layout Subsection
523 \begin_layout Standard
524 These directories are duplicated between
525 \begin_inset Flex Code
528 \begin_layout Plain Layout
535 \begin_inset Flex Code
538 \begin_layout Plain Layout
545 If a particular files exists in both places, the one in
546 \begin_inset Flex Code
549 \begin_layout Plain Layout
558 \begin_layout Labeling
559 \labelwidthstring 00.00.0000
560 \begin_inset Flex Code
563 \begin_layout Plain Layout
569 this directory contains files with the extension
570 \begin_inset Flex Code
573 \begin_layout Plain Layout
579 that define the keybindings used in LyX.
580 If there exists an internationalized version of the bind file named
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
590 , that will be used first.
593 \begin_layout Labeling
594 \labelwidthstring 00.00.0000
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
604 contains graphics files that can be included in documents.
608 \begin_layout Labeling
609 \labelwidthstring 00.00.0000
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 contains LyX documentation files (including the one you are currently reading).
621 \begin_inset Flex Code
624 \begin_layout Plain Layout
630 deserves special attention, as noted above.
631 The internationalized help docs are in subdirectories
632 \begin_inset Flex Code
635 \begin_layout Plain Layout
642 \begin_inset Quotes eld
646 \begin_inset Quotes erd
649 is the ISO language code.
651 \begin_inset CommandInset ref
653 reference "cha:Internationalizing-LyX"
660 \begin_layout Labeling
661 \labelwidthstring 00.00.0000
662 \begin_inset Flex Code
665 \begin_layout Plain Layout
671 contains example files that explain how to use some features.
672 In the file browser, press the
673 \begin_inset Flex MenuItem
676 \begin_layout Plain Layout
685 \begin_layout Labeling
686 \labelwidthstring 00.00.0000
687 \begin_inset Flex Code
690 \begin_layout Plain Layout
696 contains image files that are used by the
697 \begin_inset Flex MenuItem
700 \begin_layout Plain Layout
707 In addition, it also contains the individual icons used in the toolbar
708 and the banners that can be shown when LyX is launched.
711 \begin_layout Labeling
712 \labelwidthstring 00.00.0000
713 \begin_inset Flex Code
716 \begin_layout Plain Layout
722 contains keyboard keymapping files.
724 \begin_inset CommandInset ref
726 reference "sec:International-Keymap-Stuff"
733 \begin_layout Labeling
734 \labelwidthstring 00.00.0000
735 \begin_inset Flex Code
738 \begin_layout Plain Layout
744 contains the text class and module files described in
745 \begin_inset CommandInset ref
747 reference "cha:Installing-New-Document"
754 \begin_layout Labeling
755 \labelwidthstring 00.00.0000
756 \begin_inset Flex Code
759 \begin_layout Plain Layout
766 \begin_inset Flex Code
769 \begin_layout Plain Layout
775 Python scripts used to convert between LyX versions.
776 These can be run from the command line if, say, you want to batch-convert
780 \begin_layout Labeling
781 \labelwidthstring 00.00.0000
782 \begin_inset Flex Code
785 \begin_layout Plain Layout
791 contains some files that demonstrate the capabilities of the
792 \begin_inset Flex MenuItem
795 \begin_layout Plain Layout
806 Also contains some scripts used by LyX itself.
809 \begin_layout Labeling
810 \labelwidthstring 00.00.0000
811 \begin_inset Flex Code
814 \begin_layout Plain Layout
820 contains the standard LyX template files described in
821 \begin_inset CommandInset ref
823 reference "sub:Creating-Templates"
830 \begin_layout Labeling
831 \labelwidthstring 00.00.0000
832 \begin_inset Flex Code
835 \begin_layout Plain Layout
841 contains files with the extension
842 \begin_inset Flex Code
845 \begin_layout Plain Layout
851 that define the user interface to LyX.
852 That is, the files define which items appear in which menus and the items
853 appearing on the toolbar.
856 \begin_layout Subsection
857 Files you don't want to modify
860 \begin_layout Standard
861 These files are used internally by LyX and you generally do not need to
862 modify them unless you are a developer.
865 \begin_layout Labeling
866 \labelwidthstring 00.00.0000
867 \begin_inset Flex Code
870 \begin_layout Plain Layout
876 this file contains the list of LyX developers.
877 The contents are displayed with the menu entry
878 \begin_inset Flex MenuItem
881 \begin_layout Plain Layout
882 Help\SpecialChar \menuseparator
895 \begin_layout Labeling
896 \labelwidthstring 00.00.0000
897 \begin_inset Flex Code
900 \begin_layout Plain Layout
906 this is a LaTeX script used during the configuration process.
910 \begin_layout Labeling
911 \labelwidthstring 00.00.0000
912 \begin_inset Flex Code
915 \begin_layout Plain Layout
921 this is a Python script that is used to re-configure LyX.
922 It creates configuration files in the directory it was run from.
925 \begin_layout Subsection
926 Other files needing a line or two
929 \begin_layout Labeling
930 \labelwidthstring 00.00.0000
931 \begin_inset Flex Code
934 \begin_layout Plain Layout
940 this contains tables describing how different character encodings can be
944 \begin_layout Labeling
945 \labelwidthstring 00.00.0000
946 \begin_inset Flex Code
949 \begin_layout Plain Layout
955 this file contains the templates available to the new
956 \begin_inset Flex MenuItem
959 \begin_layout Plain Layout
970 \begin_inset CommandInset ref
972 reference "chap:Including-External-Material"
979 \begin_layout Labeling
980 \labelwidthstring 00.00.0000
981 \begin_inset Flex Code
984 \begin_layout Plain Layout
990 this file contains a list of all the languages currently supported by LyX.
993 \begin_layout Labeling
994 \labelwidthstring 00.00.0000
995 \begin_inset Flex Code
998 \begin_layout Plain Layout
1004 contains information about the supported fonts.
1007 \begin_layout Labeling
1008 \labelwidthstring 00.00.0000
1009 \begin_inset Flex Code
1012 \begin_layout Plain Layout
1018 this file contains translations for internationalized paragraph styles
1020 \begin_inset CommandInset ref
1022 reference "sub:I18n"
1029 \begin_layout Labeling
1030 \labelwidthstring 00.00.0000
1031 \begin_inset Flex Code
1034 \begin_layout Plain Layout
1040 this file contains information about unicode-encoded glyphs and the way
1041 they are supported by LyX via LaTeX.
1044 \begin_layout Section
1045 Your local configuration directory
1048 \begin_layout Standard
1049 Even if you are using LyX as an unprivileged user, you might want to change
1050 LyX configuration for your own use.
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1061 directory contains all your personal configuration files.
1062 This is the directory described as
1063 \begin_inset Quotes eld
1067 \begin_inset Quotes erd
1071 \begin_inset Flex MenuItem
1074 \begin_layout Plain Layout
1075 Help\SpecialChar \menuseparator
1077 \begin_inset space ~
1086 This directory is used as a mirror of
1087 \begin_inset Flex Code
1090 \begin_layout Plain Layout
1096 , which means that every file in
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 is a replacement for the corresponding file in
1107 \begin_inset Flex Code
1110 \begin_layout Plain Layout
1117 Any configuration file described in the above sections can be placed either
1118 in the system-wide directory, in which case it will affect all users, or
1119 in your local directory for your own use.
1122 \begin_layout Standard
1123 To make things clearer, let's provide a few examples:
1126 \begin_layout Itemize
1127 The preferences set in the
1128 \begin_inset Flex MenuItem
1131 \begin_layout Plain Layout
1132 Tools\SpecialChar \menuseparator
1138 dialog are saved to a file
1139 \begin_inset Flex Code
1142 \begin_layout Plain Layout
1149 \begin_inset Flex Code
1152 \begin_layout Plain Layout
1161 \begin_layout Itemize
1162 When you reconfigure using
1163 \begin_inset Flex MenuItem
1166 \begin_layout Plain Layout
1167 Tools\SpecialChar \menuseparator
1174 \begin_inset Flex Code
1177 \begin_layout Plain Layout
1183 script, and the resulting files are written in your local configuration
1185 This means that any additional text class file that you might have added
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1196 will be added to the list of classes in the
1197 \begin_inset Flex MenuItem
1200 \begin_layout Plain Layout
1201 Document\SpecialChar \menuseparator
1210 \begin_layout Itemize
1211 If you get some updated documentation from LyX ftp site and cannot install
1212 it because you do not have sysadmin rights on your system, you can just
1214 \begin_inset Flex Code
1217 \begin_layout Plain Layout
1223 and the items in the
1224 \begin_inset Flex MenuItem
1227 \begin_layout Plain Layout
1233 menu will open them!
1236 \begin_layout Section
1237 Running LyX with multiple configurations
1240 \begin_layout Standard
1241 The configuration freedom of the local configuration directory may not suffice
1242 if you want to have more than one configuration at your disposal.
1243 For example, you may want to be use different key bindings or printer settings
1245 You can achieve this by having several such directories.
1246 You then specify which directory to use at run-time.
1249 \begin_layout Standard
1250 Invoking LyX with the command line switch
1251 \begin_inset Flex Code
1254 \begin_layout Plain Layout
1264 instructs the program to read the configuration from that directory, and
1265 not from the default directory.
1266 (You can determine the default directory by running LyX without the
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1276 switch.) If the specified directory does not exist, LyX offers to create
1277 it for you, just like it does for the default directory on the first time
1278 you run the program.
1279 You can modify the configuration options in this additional user directory
1280 exactly as you would for the default directory.
1281 These directories are completely independent (but read on).
1282 Note that setting the environment variable
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1292 to some value has exactly the same effect.
1295 \begin_layout Standard
1296 Having several configurations also requires more maintenance: if you want
1297 to add a new layout to
1298 \begin_inset Flex Code
1301 \begin_layout Plain Layout
1307 which you want available from all your configurations, you must add it
1308 to each directory separately.
1309 You can avoid this with the following trick: after LyX creates the additional
1310 directory, most of the subdirectories (see above) are empty.
1311 If you want the new configuration to mirror an existing one, replace the
1312 empty subdirectory with a symbolic link to the matching subdirectory in
1313 the existing configuration.
1315 \begin_inset Flex Code
1318 \begin_layout Plain Layout
1324 subdirectory, however, since it contains a file written by the configuration
1325 script (also accessible through
1326 \begin_inset Flex MenuItem
1329 \begin_layout Plain Layout
1330 Tools\SpecialChar \menuseparator
1336 ) which is configuration-specific.
1339 \begin_layout Chapter
1340 The Preferences dialog
1343 \begin_layout Standard
1344 All options of the preferences dialog are described in the Appendix
1346 The Preferences Dialog
1353 For some options you might find here more details.
1356 \begin_layout Section
1358 \begin_inset CommandInset label
1367 \begin_layout Standard
1368 The first step is to define your file formats if they are not already defined.
1370 \begin_inset Flex MenuItem
1373 \begin_layout Plain Layout
1374 Tools\SpecialChar \menuseparator
1382 \begin_inset Flex MenuItem
1385 \begin_layout Plain Layout
1386 File Handling\SpecialChar \menuseparator
1393 \begin_inset Flex MenuItem
1396 \begin_layout Plain Layout
1402 button to define your new format.
1404 \begin_inset Flex MenuItem
1407 \begin_layout Plain Layout
1413 field contains the name used to identify the format in the GUI.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1424 is used to identify the format internally.
1425 You will also need to enter a file extension.
1426 These are all required.
1428 \begin_inset Flex MenuItem
1431 \begin_layout Plain Layout
1437 field is used to provide a keyboard shortcut on the menus.
1438 (For example, pressing
1439 \begin_inset Flex MenuItem
1442 \begin_layout Plain Layout
1449 \begin_inset Flex MenuItem
1452 \begin_layout Plain Layout
1453 Document\SpecialChar \menuseparator
1454 View (Other Formats)\SpecialChar \menuseparator
1463 \begin_layout Standard
1465 \begin_inset Flex MenuItem
1468 \begin_layout Plain Layout
1475 \begin_inset Flex MenuItem
1478 \begin_layout Plain Layout
1485 For example, you might want to use
1486 \begin_inset Flex MenuItem
1489 \begin_layout Plain Layout
1495 to view PostScript files.
1496 You can enter the command needed to start the program in the corresponding
1498 In defining this command, you can use the four variables listed in the
1500 The viewer is launched when you view an image in LyX or use the
1501 \begin_inset Flex MenuItem
1504 \begin_layout Plain Layout
1505 Document\SpecialChar \menuseparator
1512 The editor is for example launched when you right-click on an image and
1514 \begin_inset Flex MenuItem
1517 \begin_layout Plain Layout
1523 in the appearing context menu.
1526 \begin_layout Standard
1528 \begin_inset Flex MenuItem
1531 \begin_layout Plain Layout
1537 type of a format is optional, but if it is specified, it must be unique
1539 It is used to detect files of this format from the file contents.
1540 For some important file formats there is no MIME type officially registered
1542 \begin_inset CommandInset href
1545 target "http://www.iana.org/assignments/media-types/"
1550 Therefore LyX uses the extended list of MIME types as specified by
1551 \begin_inset CommandInset href
1553 name "freedesktop.org"
1554 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1561 \begin_layout Standard
1563 \begin_inset Flex MenuItem
1566 \begin_layout Plain Layout
1572 option tells LyX that a format is suitable for document export.
1573 If this is set and if a suitable conversion route exists (see
1574 \begin_inset CommandInset ref
1576 reference "sec:Converters"
1580 ), the format will appear in the
1581 \begin_inset Flex MenuItem
1584 \begin_layout Plain Layout
1585 File\SpecialChar \menuseparator
1592 The format will also appear in the
1593 \begin_inset Flex MenuItem
1596 \begin_layout Plain Layout
1597 Document\SpecialChar \menuseparator
1603 menu if a viewer is specified for the format.
1604 Pure image formats, such as
1605 \begin_inset Flex Code
1608 \begin_layout Plain Layout
1614 , should not use this option.
1615 Formats that can both represent vector graphics and documents like
1616 \begin_inset Flex Code
1619 \begin_layout Plain Layout
1628 \begin_layout Standard
1630 \begin_inset Flex MenuItem
1633 \begin_layout Plain Layout
1634 Vector graphics format
1639 tells LyX that a format can contain vector graphics.
1640 This information is used to determine the target format of included graphics
1642 \begin_inset Flex MenuItem
1645 \begin_layout Plain Layout
1652 Included graphics may need to be converted to either
1653 \begin_inset Flex MenuItem
1656 \begin_layout Plain Layout
1663 \begin_inset Flex MenuItem
1666 \begin_layout Plain Layout
1673 \begin_inset Flex MenuItem
1676 \begin_layout Plain Layout
1683 \begin_inset Flex MenuItem
1686 \begin_layout Plain Layout
1692 cannot handle other image formats.
1693 If an included graphic is not already in
1694 \begin_inset Flex MenuItem
1697 \begin_layout Plain Layout
1704 \begin_inset Flex MenuItem
1707 \begin_layout Plain Layout
1714 \begin_inset Flex MenuItem
1717 \begin_layout Plain Layout
1723 format, it is converted to
1724 \begin_inset Flex MenuItem
1727 \begin_layout Plain Layout
1733 if the vector format option is set, and otherwise to
1734 \begin_inset Flex MenuItem
1737 \begin_layout Plain Layout
1746 \begin_layout Section
1750 \begin_layout Standard
1751 Since all conversions from one format to another take place in LyX's temporary
1752 directory, it is sometimes necessary to modify a file before copying it
1753 to the temporary directory in order that the conversion may be performed.
1757 \begin_layout Plain Layout
1758 For example, the file may refer to other files—images, for example—using
1759 relative file names, and these may become invalid when the file is copied
1760 to the temporary directory.
1765 This is done by a Copier: It copies a file to (or from) the temporary directory
1766 and may modify it in the process.
1769 \begin_layout Standard
1770 The definitions of the copiers may use four variables:
1773 \begin_layout Labeling
1774 \labelwidthstring 00.00.0000
1775 \begin_inset Flex Code
1778 \begin_layout Plain Layout
1784 The LyX system directory (e.
1785 \begin_inset space \thinspace{}
1789 \begin_inset space \space{}
1793 \begin_inset Flex MenuItem
1796 \begin_layout Plain Layout
1805 \begin_layout Labeling
1806 \labelwidthstring 00.00.0000
1807 \begin_inset Flex Code
1810 \begin_layout Plain Layout
1819 \begin_layout Labeling
1820 \labelwidthstring 00.00.0000
1821 \begin_inset Flex Code
1824 \begin_layout Plain Layout
1833 \begin_layout Labeling
1834 \labelwidthstring 00.00.0000
1835 \begin_inset Flex Code
1838 \begin_layout Plain Layout
1844 The base name (without filename extension) in the LyX temporary directory
1847 \begin_layout Labeling
1848 \labelwidthstring 00.00.0000
1849 \begin_inset Flex Code
1852 \begin_layout Plain Layout
1858 The full directory path of the LyX temporary directory
1861 \begin_layout Labeling
1862 \labelwidthstring 00.00.0000
1863 \begin_inset Flex Code
1866 \begin_layout Plain Layout
1872 The full pathname to the original LyX file being processed
1875 \begin_layout Labeling
1876 \labelwidthstring 00.00.0000
1877 \begin_inset Flex Code
1880 \begin_layout Plain Layout
1886 The filename (without any directory path) of the LyX file.
1889 \begin_layout Labeling
1890 \labelwidthstring 00.00.0000
1891 \begin_inset Flex Code
1894 \begin_layout Plain Layout
1903 \begin_layout Standard
1904 The latter should be the filename as it would be used in a LaTeX's
1911 It is relevant only when exporting files suitable for such inclusion.
1914 \begin_layout Standard
1915 Copiers can be used to do almost anything with output files.
1916 For example, suppose you want generated pdf files to be copied to a special
1918 \begin_inset Flex Code
1921 \begin_layout Plain Layout
1928 Then you could write a shell script such as this one:
1931 \begin_layout Standard
1932 \begin_inset listings
1936 \begin_layout Plain Layout
1941 \begin_layout Plain Layout
1946 \begin_layout Plain Layout
1948 TOFILE=`basename $2`
1951 \begin_layout Plain Layout
1953 cp $FROMFILE /home/you/pdf/$TOFILE
1958 Save it in your local LyX directory—say,
1959 \begin_inset Flex Code
1962 \begin_layout Plain Layout
1963 /home/you/.lyx/scripts/pdfcopier.sh
1968 —and make it executable, if you need to do so on your platform.
1970 \begin_inset Flex MenuItem
1973 \begin_layout Plain Layout
1974 Tools\SpecialChar \menuseparator
1980 dialog, select under
1981 \begin_inset Flex MenuItem
1984 \begin_layout Plain Layout
1985 File Handling\SpecialChar \menuseparator
1992 \begin_inset Flex MenuItem
1995 \begin_layout Plain Layout
2001 format—or one of the other pdf formats—and enter
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2006 pdfcopier.sh $$i $$o
2012 \begin_inset Flex MenuItem
2015 \begin_layout Plain Layout
2025 \begin_layout Standard
2026 Copiers are used by LyX in various of its own conversions.
2027 For example, if appropriate programs are found, LyX will automatically
2028 install copiers for the
2029 \begin_inset Flex MenuItem
2032 \begin_layout Plain Layout
2039 \begin_inset Flex MenuItem
2042 \begin_layout Plain Layout
2044 \begin_inset space ~
2053 When these formats are exported, the copier sees that not just the main
2054 HTML file but various associated files (style files, images, etc.) are also
2056 All these files are written to a subdirectory of the directory in which
2057 the original LyX file was found.
2061 \begin_layout Plain Layout
2062 This copier can be customized.
2064 \begin_inset Quotes eld
2068 \begin_inset Quotes erd
2071 argument takes a comma-separated list of extensions to be copied; if it
2072 is omitted, all files will be copied.
2074 \begin_inset Quotes eld
2078 \begin_inset Quotes erd
2081 argument determines the extension added to the generated directory.
2083 \begin_inset Quotes eld
2087 \begin_inset Flex MenuItem
2090 \begin_layout Plain Layout
2097 \begin_inset Quotes erd
2100 , so HTML generated from
2101 \begin_inset Flex MenuItem
2104 \begin_layout Plain Layout
2105 /path/to/filename.lyx
2111 \begin_inset Flex MenuItem
2114 \begin_layout Plain Layout
2115 /path/to/filename.html.LyXconv
2129 \begin_layout Section
2131 \begin_inset CommandInset label
2133 name "sec:Converters"
2140 \begin_layout Standard
2141 You can define your own Converters to convert files between different formats.
2143 \begin_inset Flex MenuItem
2146 \begin_layout Plain Layout
2147 Tools\SpecialChar \menuseparator
2148 Preferences\SpecialChar \menuseparator
2149 File Handling\SpecialChar \menuseparator
2158 \begin_layout Standard
2159 To define a new converter, select the
2160 \begin_inset Flex MenuItem
2163 \begin_layout Plain Layout
2165 \begin_inset space ~
2174 \begin_inset Flex MenuItem
2177 \begin_layout Plain Layout
2179 \begin_inset space ~
2187 from the drop-down lists, enter the command needed for the conversion,
2189 \begin_inset Flex MenuItem
2192 \begin_layout Plain Layout
2199 Several variables can be used in the definition of converters:
2202 \begin_layout Labeling
2203 \labelwidthstring 00.00.0000
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 The LyX system directory
2216 \begin_layout Labeling
2217 \labelwidthstring 00.00.0000
2218 \begin_inset Flex Code
2221 \begin_layout Plain Layout
2230 \begin_layout Labeling
2231 \labelwidthstring 00.00.0000
2232 \begin_inset Flex Code
2235 \begin_layout Plain Layout
2244 \begin_layout Labeling
2245 \labelwidthstring 00.00.0000
2246 \begin_inset Flex Code
2249 \begin_layout Plain Layout
2255 The base filename of the input file (i.
2256 \begin_inset space \thinspace{}
2259 g., without the extension)
2262 \begin_layout Labeling
2263 \labelwidthstring 00.00.0000
2264 \begin_inset Flex Code
2267 \begin_layout Plain Layout
2273 The path to the input file
2276 \begin_layout Labeling
2277 \labelwidthstring 00.00.0000
2278 \begin_inset Flex Code
2281 \begin_layout Plain Layout
2287 The path to the original input file (this is different from $$p when a
2288 chain of converters is called)
2291 \begin_layout Labeling
2292 \labelwidthstring 00.00.0000
2293 \begin_inset Flex Code
2296 \begin_layout Plain Layout
2302 The iconv name for the encoding of the document.
2305 \begin_layout Standard
2307 \begin_inset Flex MenuItem
2310 \begin_layout Plain Layout
2312 \begin_inset space ~
2320 field you can enter the following flags, separated by commas:
2323 \begin_layout Labeling
2324 \labelwidthstring 00.00.0000
2325 \begin_inset Flex Code
2328 \begin_layout Plain Layout
2334 This converter runs some form of LaTeX.
2335 This will make LyX's LaTeX error logs available.
2338 \begin_layout Labeling
2339 \labelwidthstring 00.00.0000
2340 \begin_inset Flex Code
2343 \begin_layout Plain Layout
2350 \begin_inset Flex MenuItem
2353 \begin_layout Plain Layout
2359 file for the conversion.
2362 \begin_layout Labeling
2363 \labelwidthstring 00.00.0000
2364 \begin_inset Flex Code
2367 \begin_layout Plain Layout
2374 \begin_inset Quotes eld
2378 \begin_inset Quotes erd
2381 file from the backend, which in practice means a LaTeX file like the one
2382 we would export, without
2383 \begin_inset Flex Code
2386 \begin_layout Plain Layout
2395 \begin_layout Labeling
2396 \labelwidthstring 00.00.0000
2397 \begin_inset Flex Code
2400 \begin_layout Plain Layout
2409 \begin_layout Standard
2410 The following three flags are not really flags at all because they take
2412 \begin_inset Flex MenuItem
2415 \begin_layout Plain Layout
2417 \begin_inset space ~
2421 \begin_inset space ~
2432 \begin_layout Labeling
2433 \labelwidthstring 00.00.0000
2434 \begin_inset Flex Code
2437 \begin_layout Plain Layout
2443 If set, the converter's standard error will be redirected to a file
2444 \begin_inset Flex Code
2447 \begin_layout Plain Layout
2453 , and the script given as argument will be run as:
2454 \begin_inset Flex Code
2457 \begin_layout Plain Layout
2458 script < infile.out > infile.log
2464 The argument may contain
2465 \begin_inset Flex Code
2468 \begin_layout Plain Layout
2477 \begin_layout Labeling
2478 \labelwidthstring 00.00.0000
2479 \begin_inset Flex Code
2482 \begin_layout Plain Layout
2488 The name of the directory in which the converter will dump the generated
2490 LyX will not create this directory, and it does not copy anything into
2491 it, though it will copy this directory to the destination.
2492 The argument may contain
2493 \begin_inset Flex Code
2496 \begin_layout Plain Layout
2502 , which will be replaced by the base name of the input and output files,
2503 respectively, when the directory is copied.
2504 \begin_inset Newline newline
2507 Note that resultdir and usetempdir make no sense together.
2508 The latter will be ignored if the former is given.
2511 \begin_layout Labeling
2512 \labelwidthstring 00.00.0000
2513 \begin_inset Flex Code
2516 \begin_layout Plain Layout
2522 Determines the output file name and may, contain
2523 \begin_inset Flex Code
2526 \begin_layout Plain Layout
2533 Sensible only with resultdir and optional even then; if not given, it defaults
2537 \begin_layout Standard
2538 None of these last three are presently used in any of the converters that
2539 are installed with LyX.
2543 \begin_layout Standard
2544 You do not have to define converters for all formats between which you want
2546 For example, you will note that there is no `LyX to PostScript' converter,
2547 but LyX will export PostScript.
2548 It does so by first creating a LaTeX file (no converter needs to be defined
2549 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2550 and finally converting the resulting DVI file to PostScript.
2551 LyX finds such `chains' of converters automatically, and it will always
2552 choose the shortest possible chain.
2553 You can, though, still define multiple conversion methods between file
2555 For example, the standard LyX configuration provides five ways to convert
2559 \begin_layout Enumerate
2561 \begin_inset Flex MenuItem
2564 \begin_layout Plain Layout
2573 \begin_layout Enumerate
2574 via (DVI and) PostScript, using
2575 \begin_inset Flex MenuItem
2578 \begin_layout Plain Layout
2587 \begin_layout Enumerate
2589 \begin_inset Flex MenuItem
2592 \begin_layout Plain Layout
2601 \begin_layout Enumerate
2603 \begin_inset Flex MenuItem
2606 \begin_layout Plain Layout
2615 \begin_layout Enumerate
2617 \begin_inset Flex MenuItem
2620 \begin_layout Plain Layout
2629 \begin_layout Standard
2630 To define such alternate chains, you must define multiple target `file formats',
2632 \begin_inset CommandInset ref
2634 reference "sec:Formats"
2639 For example, in the standard configuration, the formats named
2640 \begin_inset Flex MenuItem
2643 \begin_layout Plain Layout
2650 \begin_inset Flex MenuItem
2653 \begin_layout Plain Layout
2660 \begin_inset Flex MenuItem
2663 \begin_layout Plain Layout
2670 \begin_inset Flex MenuItem
2673 \begin_layout Plain Layout
2680 \begin_inset Flex MenuItem
2683 \begin_layout Plain Layout
2690 \begin_inset Flex MenuItem
2693 \begin_layout Plain Layout
2700 \begin_inset Flex MenuItem
2703 \begin_layout Plain Layout
2710 \begin_inset Flex MenuItem
2713 \begin_layout Plain Layout
2720 \begin_inset Flex MenuItem
2723 \begin_layout Plain Layout
2730 \begin_inset Flex MenuItem
2733 \begin_layout Plain Layout
2739 ) are defined, all of which share the extension
2740 \begin_inset Flex MenuItem
2743 \begin_layout Plain Layout
2749 , and which correspond to the conversion methods just mentioned.
2752 \begin_layout Chapter
2753 Internationalizing LyX
2754 \begin_inset CommandInset label
2756 name "cha:Internationalizing-LyX"
2763 \begin_layout Standard
2764 LyX supports using a translated interface.
2765 Last time we checked, LyX provided text in thirty languages.
2766 The language of choice is called your
2771 (For further reading on locale settings, see also the documentation for
2772 locale that comes with your operating system.
2773 For Linux, the manual page for
2774 \begin_inset Flex Code
2777 \begin_layout Plain Layout
2783 could be a good place to start).
2786 \begin_layout Standard
2787 Notice that these translations will work, but do contain a few flaws.
2788 In particular, all dialogs have been designed with the English text in
2789 mind, which means that some of the translated text will be too large to
2790 fit within the space allocated.
2791 This is only a display problem and will not cause any harm.
2792 Also, you will find that some of the translations do not define shortcut
2793 keys for everything.
2794 Sometimes, there are simply not enough free letters to do it.
2795 Other times, the translator just hasn't got around to doing it yet.
2796 Our localization team, which you may wish to join,
2800 \begin_layout Plain Layout
2801 If you are a fluent speaker of a language other than English, joining these
2802 teams is a great way to give back to the LyX community!
2807 will of course try to fix these shortcomings in future versions of LyX.
2810 \begin_layout Section
2814 \begin_layout Subsection
2815 Translating the graphical user interface (text messages).
2818 \begin_layout Standard
2820 \begin_inset Flex Code
2823 \begin_layout Plain Layout
2829 library to handle the internationalization of the interface.
2830 To have LyX speak your favorite language in all menus and dialogs, you
2832 \begin_inset Flex Code
2835 \begin_layout Plain Layout
2841 -file for that language.
2842 When this is available, you'll have to generate a
2843 \begin_inset Flex Code
2846 \begin_layout Plain Layout
2852 -file from it and install the
2853 \begin_inset Flex Code
2856 \begin_layout Plain Layout
2863 The process of doing all of this is explained in the documentation for
2865 \begin_inset Flex Code
2868 \begin_layout Plain Layout
2875 It is possible to do this just for yourself, but if you're going to do
2876 it, you might as well share the results of your labors with the rest of
2878 Send a message to the LyX developers' list for more information about how
2882 \begin_layout Standard
2883 In short, this is what you should do (xx denotes the language code):
2886 \begin_layout Itemize
2887 Check out the LyX source code.
2889 \begin_inset CommandInset href
2891 name "information on the web"
2892 target "http://www.lyx.org/HowToUseSVN"
2899 \begin_layout Itemize
2901 \begin_inset Flex Code
2904 \begin_layout Plain Layout
2910 to the folder of the
2911 \begin_inset Flex Code
2914 \begin_layout Plain Layout
2922 \begin_inset Flex Code
2925 \begin_layout Plain Layout
2933 \begin_inset Flex Code
2936 \begin_layout Plain Layout
2942 doesn't exist anywhere, it can be remade with the console command
2943 \begin_inset Flex Code
2946 \begin_layout Plain Layout
2952 in that directory, or you can use an existing po-file for some other language
2956 \begin_layout Itemize
2958 \begin_inset Flex Code
2961 \begin_layout Plain Layout
2971 \begin_layout Plain Layout
2972 This is just a text file, so it can be edited in any text editor.
2973 But there are also specialized programs that support such editing, such
2978 (for all platforms) or
2987 contains a `mode' for editing
2988 \begin_inset Flex Code
2991 \begin_layout Plain Layout
3002 For some menu- and widget-labels, there are also shortcut keys that should
3004 Those keys are marked after a `|', and should be translated according to
3005 the words and phrases of the language.
3006 You should also fill also out the information at the beginning of the new
3008 \begin_inset Flex Code
3011 \begin_layout Plain Layout
3017 -file with your email-address, etc., so people know where to reach you with
3018 suggestions and entertaining flames.
3021 \begin_layout Standard
3022 If you are just doing this on your own, then:
3025 \begin_layout Itemize
3027 \begin_inset Flex Code
3030 \begin_layout Plain Layout
3037 This can be done with
3038 \begin_inset Flex Code
3041 \begin_layout Plain Layout
3042 msgfmt -o xx.mo < xx.po
3050 \begin_layout Itemize
3052 \begin_inset Flex Code
3055 \begin_layout Plain Layout
3061 -file to your locale-tree, at the correct directory for application messages
3066 xx, and under the name
3067 \begin_inset Flex Code
3070 \begin_layout Plain Layout
3077 \begin_inset space \thinspace{}
3081 \begin_inset space \space{}
3085 \begin_inset Flex Code
3088 \begin_layout Plain Layout
3089 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3099 \begin_layout Standard
3100 As said, however, it would be best if the new
3101 \begin_inset Flex Code
3104 \begin_layout Plain Layout
3110 -file could be added to the LyX distribution, so others can use it.
3111 Adding it involves making additional changes to LyX.
3112 So send an email to the developers' mailing list if you're interested in
3116 \begin_layout Subsubsection
3120 \begin_layout Standard
3121 Sometimes it turns out that one English message needs to be translated into
3122 different messages in the target language.
3123 One example is the message
3124 \begin_inset Flex Code
3127 \begin_layout Plain Layout
3133 which has the German translation
3141 , depending upon exactly what the English
3142 \begin_inset Quotes eld
3146 \begin_inset Quotes erd
3151 \begin_inset Flex Code
3154 \begin_layout Plain Layout
3160 does not handle such ambiguous translations.
3161 Therefore you have to add some context information to the message: Instead
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3177 To[[as in 'From format x to format y']]
3183 \begin_inset Flex Code
3186 \begin_layout Plain Layout
3187 To[[as in 'From page x to page y']].
3192 Now the two occurrences of
3193 \begin_inset Flex Code
3196 \begin_layout Plain Layout
3203 \begin_inset Flex Code
3206 \begin_layout Plain Layout
3212 and can be translated correctly to
3223 \begin_layout Standard
3224 Of course the context information needs to be stripped off the original
3225 message when no translation is used.
3226 Therefore you have to put it in double square brackets at the end of the
3227 message (see the example above).
3228 The translation mechanism of LyX ensures that everything in double square
3229 brackets at the end of messages is removed before displaying the message.
3232 \begin_layout Subsection
3233 Translating the documentation.
3236 \begin_layout Standard
3237 The online documentation (in the
3238 \begin_inset Flex MenuItem
3241 \begin_layout Plain Layout
3247 -menu) can (and should!) be translated.
3248 If there are translated versions of the documentation available
3252 \begin_layout Plain Layout
3253 As of March 2008, at least some of the documents have been translated into
3254 fourteen languages, with the Tutorial available in a few more.
3259 and the locale is set accordingly, these will be used automagically by
3261 LyX looks for translated versions as
3262 \begin_inset Flex Code
3265 \begin_layout Plain Layout
3266 LyXDir/doc/xx/DocName.lyx
3272 \begin_inset Flex Code
3275 \begin_layout Plain Layout
3281 is the code for the language currently in use.
3282 If there are no translated documents, the default English versions will
3284 Note that the translated versions must have the same filenames (
3285 \begin_inset Flex Code
3288 \begin_layout Plain Layout
3294 above) as the original.
3295 If you feel up to translating the documentation (an excellent way to proof-read
3296 the original documentation by the way!), there are a few things you should
3300 \begin_layout Itemize
3301 Check out the documentation translation web page at
3302 \begin_inset CommandInset href
3304 name "http://www.lyx.org/Translation"
3305 target "http://www.lyx.org/Translation"
3310 That way, you can find out which (if any) documents have already been translate
3311 d into your language.
3312 You can also find out who (if anyone) is organizing the effort to translate
3313 the documentation into your language.
3314 If no one is organizing the effort, please let us know that you're interested.
3317 \begin_layout Standard
3318 Once you get to actually translating, here's a few hints for you that may
3322 \begin_layout Itemize
3323 Join the documentation team! There is information on how to do that in
3324 \begin_inset Flex Code
3327 \begin_layout Plain Layout
3334 \begin_inset Flex MenuItem
3337 \begin_layout Plain Layout
3338 Help\SpecialChar \menuseparator
3344 ), which by the way is the first document you should translate.
3347 \begin_layout Itemize
3348 Learn the typographic conventions for the language you are translating to.
3349 Typography is an ancient art and over the centuries, a great variety of
3350 conventions have developed throughout different parts of the world.
3351 Also study the professional terminology amongst typographers in your country.
3352 Inventing your own terminology will only confuse the users.
3355 (Warning! Typography is addictive!)
3358 \begin_layout Itemize
3359 Make a copy of the document.
3360 This will be your working copy.
3361 You can use this as your personal translated help-file by placing it in
3363 \begin_inset Flex Code
3366 \begin_layout Plain Layout
3375 \begin_layout Itemize
3376 Sometimes the original document (from the LyX-team) will be updated.
3377 Use the source viewer at
3378 \begin_inset CommandInset href
3380 name "http://www.lyx.org/trac/timeline"
3381 target "http://www.lyx.org/trac/timeline"
3385 to see what has been changed.
3386 That way you can easily see which parts of the translated document need
3390 \begin_layout Standard
3391 If you ever find an error in the original document, fix it and notify the
3392 rest of the documentation team of the changes! (You didn't forget to join
3393 the documentation team, did you?)
3396 \begin_layout Standard
3397 \begin_inset Branch OutDated
3400 \begin_layout Section
3401 International Keyboard Support
3404 \begin_layout Standard
3407 [Editor's Note: The following section is by
3415 It needs to be fixed to conform to the new Documentation Style sheet and
3416 to make use of the new v1.0 features.
3417 The whole thing also needs to be merged with the section following it.-jw
3418 It may also be badly out of date.-rh (2008)]
3421 \begin_layout Subsection
3422 Defining Own Keymaps: Keymap File Format
3425 \begin_layout Standard
3426 Let's look at a keyboard definition file a little closer.
3427 It is a plain text file defining
3430 \begin_layout Itemize
3431 key-to-key or key-to-string translations
3434 \begin_layout Itemize
3438 \begin_layout Itemize
3439 dead keys exceptions
3442 \begin_layout Standard
3443 To define key-to-key or key-to-string translation, use this command:
3446 \begin_layout Quotation
3447 \begin_inset Flex Code
3450 \begin_layout Plain Layout
3459 \begin_inset Flex Code
3462 \begin_layout Plain Layout
3471 \begin_layout Standard
3473 \begin_inset Flex Code
3476 \begin_layout Plain Layout
3482 is the key to be translated and
3483 \begin_inset Flex Code
3486 \begin_layout Plain Layout
3492 is the string to be inserted into the document.
3493 To define dead keys, use:
3496 \begin_layout Quotation
3497 \begin_inset Flex Code
3500 \begin_layout Plain Layout
3509 \begin_inset Flex Code
3512 \begin_layout Plain Layout
3521 \begin_layout Standard
3523 \begin_inset Flex Code
3526 \begin_layout Plain Layout
3532 is a keyboard key and
3533 \begin_inset Flex Code
3536 \begin_layout Plain Layout
3543 The following dead keys are supported (shortcut name is in parentheses):
3546 \begin_layout Quotation
3550 \begin_inset space \hfill{}
3556 \begin_layout Quotation
3558 \begin_inset space \hfill{}
3564 \begin_layout Quotation
3566 \begin_inset space \hfill{}
3572 \begin_layout Quotation
3574 \begin_inset space \hfill{}
3580 \begin_layout Quotation
3582 \begin_inset space \hfill{}
3588 \begin_layout Quotation
3590 \begin_inset space \hfill{}
3597 \begin_layout Plain Layout
3609 \begin_layout Quotation
3611 \begin_inset space \hfill{}
3617 \begin_layout Quotation
3619 \begin_inset space \hfill{}
3626 \begin_layout Plain Layout
3638 \begin_layout Quotation
3640 \begin_inset space \hfill{}
3646 \begin_layout Quotation
3648 \begin_inset space \hfill{}
3654 \begin_layout Quotation
3656 \begin_inset space \hfill{}
3663 \begin_layout Plain Layout
3675 \begin_layout Quotation
3677 \begin_inset space \hfill{}
3684 \begin_layout Plain Layout
3696 \begin_layout Quotation
3698 \begin_inset space \hfill{}
3704 \begin_layout Quotation
3705 hungarian umlaut (hug)
3706 \begin_inset space \hfill{}
3712 \begin_layout Quotation
3714 \begin_inset space \hfill{}
3720 \begin_layout Quotation
3722 \begin_inset space \hfill{}
3729 \begin_layout Plain Layout
3741 \begin_layout Standard
3742 Since in many international keyboards there are exceptions to what some
3743 dead keys should do, you can define them using
3746 \begin_layout Quotation
3747 \begin_inset Flex Code
3750 \begin_layout Plain Layout
3758 deadkey key outstring
3761 \begin_layout Standard
3762 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3766 \begin_layout Quotation
3767 \begin_inset Flex Code
3770 \begin_layout Plain Layout
3783 \begin_layout Standard
3784 to make it work correctly.
3785 Also, you have to define as exceptions dead keys over i and j, to remove
3786 the dot from them before inserting an accent mark.
3787 I will change this when the time comes, but so far I haven't had time.
3790 \begin_layout Standard
3791 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3794 \begin_inset Flex Code
3797 \begin_layout Plain Layout
3803 have different meaning.
3805 \begin_inset Flex Code
3808 \begin_layout Plain Layout
3814 marks comments, quotes start and end LaTeX-style commands.
3815 To enter quote, you'll need to use
3816 \begin_inset Flex Code
3819 \begin_layout Plain Layout
3828 \begin_inset Flex Code
3831 \begin_layout Plain Layout
3838 \begin_inset Flex Code
3841 \begin_layout Plain Layout
3852 \begin_layout Standard
3853 If you make a keyboard description file that works for your language, please
3854 mail it to me, so I can include it in the next keymap distribution.
3857 \begin_layout Standard
3858 More keywords will be supported in keymap configuration file in future,
3862 \begin_layout Itemize
3863 \begin_inset Flex Code
3866 \begin_layout Plain Layout
3877 \begin_inset space \hfill{}
3881 \begin_inset Flex Code
3884 \begin_layout Plain Layout
3893 \begin_layout Itemize
3894 \begin_inset Flex Code
3897 \begin_layout Plain Layout
3908 \begin_inset space \hfill{}
3912 \begin_inset Flex Code
3915 \begin_layout Plain Layout
3921 an external keymap translation program
3924 \begin_layout Standard
3925 Also, it should look into
3926 \begin_inset Flex Code
3929 \begin_layout Plain Layout
3935 file for defaults, too (for example, a
3936 \begin_inset Flex Code
3939 \begin_layout Plain Layout
3947 option to include default keyboard).
3955 \begin_layout Section
3956 International Keymap Stuff
3957 \begin_inset CommandInset label
3959 name "sec:International-Keymap-Stuff"
3966 \begin_layout Standard
3967 \begin_inset Note Note
3970 \begin_layout Plain Layout
3971 In doing the revisions on this document in March 2008, I did not look over
3972 this stuff, as I do not understand it.
3973 It would be good if someone else could do so.
3982 \begin_layout Standard
3983 The next two sections describe the
3984 \begin_inset Flex Code
3987 \begin_layout Plain Layout
3996 \begin_inset Flex Code
3999 \begin_layout Plain Layout
4007 file syntax in detail.
4008 These sections should help you design your own key map if the ones provided
4009 do not meet your needs.
4012 \begin_layout Subsection
4016 \begin_layout Standard
4020 \begin_inset Flex Code
4023 \begin_layout Plain Layout
4029 file maps keystrokes to characters or strings.
4030 As the name suggests, it sets a keyboard mapping.
4032 \begin_inset Flex Code
4035 \begin_layout Plain Layout
4046 \begin_inset Flex Code
4049 \begin_layout Plain Layout
4064 \begin_inset Flex Code
4067 \begin_layout Plain Layout
4080 \begin_inset Flex Code
4083 \begin_layout Plain Layout
4092 \begin_inset Flex Code
4095 \begin_layout Plain Layout
4103 are described in this section.
4106 \begin_layout Labeling
4107 \labelwidthstring 00.00.0000
4108 \begin_inset Flex Code
4111 \begin_layout Plain Layout
4119 Map a character to a string
4122 \begin_layout LyX-Code
4137 \begin_layout Standard
4170 the double-quote (")
4187 must be escaped with a preceding backslash (
4198 \begin_layout Standard
4200 \begin_inset Flex MenuItem
4203 \begin_layout Plain Layout
4211 statement to cause the symbol
4212 \begin_inset Flex MenuItem
4215 \begin_layout Plain Layout
4223 to be output for the keystroke
4224 \begin_inset Flex MenuItem
4227 \begin_layout Plain Layout
4238 \begin_layout LyX-Code
4244 \begin_layout Labeling
4245 \labelwidthstring 00.00.0000
4246 \begin_inset Flex Code
4249 \begin_layout Plain Layout
4257 Specify an accent character
4260 \begin_layout LyX-Code
4269 \begin_layout Standard
4270 This will make the cha
4308 This is the dead key
4312 \begin_layout Plain Layout
4319 refers to a key that does not produce a character by itself, but when followed
4320 with another key, produces the desired accent character.
4321 For example, a German characte
4323 r with an umlaut like
4333 can be produced in this manner.
4342 \begin_layout Standard
4355 and then another key not in
4372 followed by the other, not allowed key, as output.
4376 \begin_inset Flex MenuItem
4379 \begin_layout Plain Layout
4387 cancels a dead key, so if
4398 \begin_inset Flex MenuItem
4401 \begin_layout Plain Layout
4410 , the cursor will not go one position backwards but will instead cancel
4426 might have had on the next keystroke.
4430 \begin_layout Standard
4431 The following example specifies that the character ' is to be an acute accent,
4432 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4435 \begin_layout LyX-Code
4438 kmod ' acute aeiouAEIOU
4441 \begin_layout Labeling
4442 \labelwidthstring 00.00.0000
4443 \begin_inset Flex Code
4446 \begin_layout Plain Layout
4452 Specify an exception to the accent character
4455 \begin_layout LyX-Code
4464 \begin_layout Standard
4465 This defines an exce
4506 have been assigned a keystroke with a previous
4509 \begin_inset Flex Code
4512 \begin_layout Plain Layout
4536 must not belong in the
4583 If such a declaration does not exist in
4591 \begin_inset Flex Code
4594 \begin_layout Plain Layout
4628 \begin_inset Flex Code
4631 \begin_layout Plain Layout
4645 \begin_layout Standard
4646 The following command produces causes äi to be produced when you enter acute-i
4650 \begin_layout LyX-Code
4664 \begin_layout Labeling
4665 \labelwidthstring 00.00.0000
4666 \begin_inset Flex Code
4669 \begin_layout Plain Layout
4675 Combine two accent characters
4678 \begin_layout LyX-Code
4684 accent1 accent2 allowed
4687 \begin_layout Standard
4688 This one is getting pretty esoteric.
4689 It allows you to combine the effect
4745 \begin_inset Flex Code
4748 \begin_layout Plain Layout
4776 \begin_layout Standard
4777 Consider this example from the
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4792 \begin_layout LyX-Code
4795 kmod ; acute aeioyvhAEIOYVH
4799 kcomb acute umlaut iyIY
4802 \begin_layout Standard
4803 This allows you to press
4804 \begin_inset Flex MenuItem
4807 \begin_layout Plain Layout
4815 and get the effect of
4816 \begin_inset Flex Code
4819 \begin_layout Plain Layout
4838 in this case cancels the last dead key, so if you press
4839 \begin_inset Flex MenuItem
4842 \begin_layout Plain Layout
4851 \begin_inset Flex Code
4854 \begin_layout Plain Layout
4867 \begin_layout Subsection
4871 \begin_layout Standard
4873 \begin_inset Flex Code
4876 \begin_layout Plain Layout
4884 mapping is performed, a
4885 \begin_inset Flex Code
4888 \begin_layout Plain Layout
4898 file maps the strings that the symbols generate to characters in the current
4900 The LyX distribution currently includes at least the
4901 \begin_inset Flex Code
4904 \begin_layout Plain Layout
4913 \begin_inset Flex Code
4916 \begin_layout Plain Layout
4927 \begin_layout Standard
4929 \begin_inset Flex Code
4932 \begin_layout Plain Layout
4940 file is a sequence of declarations of the form
4943 \begin_layout LyX-Code
4956 \begin_layout Standard
4957 For example, in order to map
4958 \begin_inset Flex MenuItem
4961 \begin_layout Plain Layout
4971 to the corresponding character in the iso-8859-1 set (233), the following
4975 \begin_layout LyX-Code
4983 \begin_layout Standard
4985 \begin_inset Flex Code
4988 \begin_layout Plain Layout
4997 \begin_inset Flex Code
5000 \begin_layout Plain Layout
5018 the same character can apply to more than one string.
5020 \begin_inset Flex Code
5023 \begin_layout Plain Layout
5034 \begin_layout LyX-Code
5046 \begin_inset Newline newline
5062 \begin_layout Standard
5063 If LyX cannot find a mapping for the string produced by the keystroke or
5064 a deadkey sequence, it will check if it looks like an accented char and
5065 try to draw an accent over the character on screen.
5068 \begin_layout Subsection
5072 \begin_layout Standard
5073 There is a second way to add support for international characters through
5074 so-called dead-keys.
5075 A dead-key works in combination with a letter to produce an accented character.
5076 Here, we'll explain how to create a really simple dead-key to illustrate
5080 \begin_layout Standard
5081 Suppose you happen to need the circumflex character,
5082 \begin_inset Quotes eld
5086 \begin_inset Quotes erd
5091 \begin_inset Flex MenuItem
5094 \begin_layout Plain Layout
5101 \begin_inset space ~
5105 \begin_inset Flex MenuItem
5108 \begin_layout Plain Layout
5114 ] to the LyX command
5115 \begin_inset Flex Code
5118 \begin_layout Plain Layout
5125 \begin_inset Flex Code
5128 \begin_layout Plain Layout
5135 Now, whenever you type the
5136 \begin_inset Flex MenuItem
5139 \begin_layout Plain Layout
5145 -key followed by a letter, that letter will have a circumflex accent on
5147 For example, the sequence
5148 \begin_inset Quotes eld
5152 \begin_inset Flex MenuItem
5155 \begin_layout Plain Layout
5162 \begin_inset Quotes erd
5165 produces the letter:
5166 \begin_inset Quotes eld
5170 \begin_inset Quotes erd
5174 If you tried to type
5175 \begin_inset Quotes eld
5179 \begin_inset Flex MenuItem
5182 \begin_layout Plain Layout
5189 \begin_inset Quotes erd
5192 , however, LyX will complain with a beep, since a
5193 \begin_inset Quotes eld
5197 \begin_inset Flex MenuItem
5200 \begin_layout Plain Layout
5207 \begin_inset Quotes erd
5210 never takes a circumflex accent.
5212 \begin_inset Flex MenuItem
5215 \begin_layout Plain Layout
5221 after a dead-key produces the bare-accent.
5222 Please note this last point! If you bind a key to a dead-key, you'll need
5223 to rebind the character on that key to yet another key.
5225 \begin_inset Flex MenuItem
5228 \begin_layout Plain Layout
5234 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5237 \begin_layout Standard
5238 One common way to bind dead-keys is to use
5239 \begin_inset Flex MenuItem
5242 \begin_layout Plain Layout
5249 \begin_inset Flex MenuItem
5252 \begin_layout Plain Layout
5259 \begin_inset Flex MenuItem
5262 \begin_layout Plain Layout
5268 in combination with an accent, like
5269 \begin_inset Quotes eld
5273 \begin_inset Flex MenuItem
5276 \begin_layout Plain Layout
5283 \begin_inset Quotes erd
5287 \begin_inset Quotes eld
5291 \begin_inset Flex MenuItem
5294 \begin_layout Plain Layout
5301 \begin_inset Quotes erd
5305 \begin_inset Quotes eld
5309 \begin_inset Flex MenuItem
5312 \begin_layout Plain Layout
5319 \begin_inset Quotes erd
5323 Another way involves using
5324 \begin_inset Flex Code
5327 \begin_layout Plain Layout
5334 \begin_inset Flex Code
5337 \begin_layout Plain Layout
5343 to set up the special
5344 \begin_inset Flex Code
5347 \begin_layout Plain Layout
5355 \begin_inset Flex Code
5358 \begin_layout Plain Layout
5364 acts in some ways just like
5365 \begin_inset Flex MenuItem
5368 \begin_layout Plain Layout
5374 and permits you to bind keys to accented characters.
5375 You can also turn keys into dead-keys by binding them to something like
5377 \begin_inset Flex Code
5380 \begin_layout Plain Layout
5386 and then binding this symbolic key to the corresponding LyX command.
5390 \begin_layout Plain Layout
5395 : This is exactly what I do in my
5396 \begin_inset Flex Code
5399 \begin_layout Plain Layout
5406 \begin_inset Flex Code
5409 \begin_layout Plain Layout
5417 \begin_inset Flex MenuItem
5420 \begin_layout Plain Layout
5422 \begin_inset space ~
5431 \begin_inset Flex Code
5434 \begin_layout Plain Layout
5440 and a bunch of these
5441 \begin_inset Quotes eld
5445 \begin_inset Flex Code
5448 \begin_layout Plain Layout
5455 \begin_inset Quotes erd
5458 symbolic keys bound such things as
5459 \begin_inset Flex MenuItem
5462 \begin_layout Plain Layout
5464 \begin_inset space ~
5473 \begin_inset Flex MenuItem
5476 \begin_layout Plain Layout
5478 \begin_inset space ~
5487 This is how I produce my accented characters.
5492 You can make just about anything into the
5493 \begin_inset Flex Code
5496 \begin_layout Plain Layout
5503 \begin_inset Flex MenuItem
5506 \begin_layout Plain Layout
5512 keys, a spare function key, etc.
5513 As for the LyX commands that produce accents, check the entry for
5514 \begin_inset Flex Code
5517 \begin_layout Plain Layout
5528 You'll find the complete list there.
5531 \begin_layout Subsection
5532 Saving your Language Configuration
5535 \begin_layout Standard
5536 You can edit your preferences so that your desired language environment
5537 is automatically configured when LyX starts up, via the
5538 \begin_inset Flex MenuItem
5541 \begin_layout Plain Layout
5542 Edit\SpecialChar \menuseparator
5551 \begin_layout Chapter
5552 Installing New Document Classes, Layouts, and Templates
5553 \begin_inset CommandInset label
5555 name "cha:Installing-New-Document"
5560 \begin_inset Argument 1
5563 \begin_layout Plain Layout
5564 Installing New Document Classes
5572 \begin_layout Standard
5573 In this chapter, we describe the procedures for creating and installing
5574 new LyX layout and template files, as well as offer a refresher on correctly
5575 installing new LaTeX document classes.
5579 \begin_layout Standard
5580 First, let us a say a few words about how one ought to think about the relation
5581 between LyX and LaTeX.
5582 The thing to understand is that, in a certain sense, LyX doesn't know anything
5584 Indeed, from LyX's point of view, LaTeX is just one of several
5585 \begin_inset Quotes eld
5589 \begin_inset Quotes erd
5592 in which it is capable of producing output.
5593 Other such formats are DocBook, plaintext, and XHTML.
5594 LaTeX is, of course, a particularly important format, but very little of
5595 the information LyX has about LaTeX is actually contained in the program
5600 \begin_layout Plain Layout
5601 Some commands are sufficiently complex that they are
5602 \begin_inset Quotes eld
5606 \begin_inset Quotes erd
5610 But the developers generally regard this as a Bad Thing.
5615 Rather, that information, even for the standard classes like
5616 \begin_inset Flex Code
5619 \begin_layout Plain Layout
5625 , is contained in `layout files'.
5626 Similarly, LyX itself does not know much about DocBook or XHTML.
5627 What it knows is contained in layout files.
5630 \begin_layout Standard
5631 You can think of the layout file for a given document class as a translation
5632 manual between LyX constructs---paragraphs with their corresponding styles,
5633 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5635 Almost everything LyX knows about
5636 \begin_inset Flex Code
5639 \begin_layout Plain Layout
5645 , for example, is contained in the file
5646 \begin_inset Flex Code
5649 \begin_layout Plain Layout
5655 and in various other files it includes.
5656 For this reason, anyone intending to write layout files should plan to
5657 study the existing files.
5658 A good place to start is with
5659 \begin_inset Flex Code
5662 \begin_layout Plain Layout
5668 , which is included in
5669 \begin_inset Flex Code
5672 \begin_layout Plain Layout
5679 \begin_inset Flex Code
5682 \begin_layout Plain Layout
5688 , and many of the other layout files for document classes.
5689 This file is where sections and the like are defined:
5690 \begin_inset Flex Code
5693 \begin_layout Plain Layout
5699 tells LyX how paragraphs that are marked with the Section, Subsection,
5700 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5703 \begin_inset Flex Code
5706 \begin_layout Plain Layout
5712 file basically just includes several of these
5713 \begin_inset Flex Code
5716 \begin_layout Plain Layout
5725 \begin_layout Standard
5726 Defining the LyX--LaTeX correspondence is not the only thing layout files
5728 Their other job is to define how the LyX constructs themselves will appear
5730 The fact that layout files have these two jobs is often a source of confusion,
5731 because they are completely separate.
5732 Telling LyX how to translate a certain paragraph style into LaTeX does
5733 not tell LyX how to display it; conversely, telling LyX how to display
5734 a certain paragraph style does not tell LyX how to translate it into LaTeX
5735 (let alone tell LaTeX how to display it).
5736 So, in general, when you define a new LyX construct, you must always do
5737 two quite separate things: (i)
5738 \begin_inset space ~
5741 tell LyX how to translate it into LaTeX and (ii)
5742 \begin_inset space ~
5745 tell LyX how to display it.
5748 \begin_layout Standard
5749 Much the same is true, of course, as regards LyX's other backend formats,
5750 though XHTML is in some ways different, because in that case LyX
5754 able, to some extent, to use information about how it should display a
5755 paragraph on the screen to output information (in the form of CSS) about
5756 how the paragraph should be displayed in a browser.
5757 Even in this case, however, the distinction between what LyX does internally
5758 and how things are rendered externally remains in force, and the two can
5759 be controlled separately.
5761 \begin_inset CommandInset ref
5763 reference "sec:Tags-for-XHTML"
5770 \begin_layout Section
5771 Installing new LaTeX files
5774 \begin_layout Standard
5775 Some installations may not include a LaTeX package or class file that you
5776 would like to use within LyX.
5777 For example, you might need FoilTeX, a package for preparing slides for
5778 overhead projectors.
5779 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5780 a user interface for installing such packages.
5781 For example, with MiKTeX, you start the program
5782 \begin_inset Quotes eld
5786 \begin_inset space ~
5790 \begin_inset Quotes erd
5793 to get a list of available packages.
5794 To install one of them, right click on it or use the corresponding toolbar
5798 \begin_layout Standard
5799 If your LaTeX distribution does not provide such a `package manager', or
5800 if the package is not available from your distribution, then follow these
5801 steps to install it manually:
5804 \begin_layout Enumerate
5805 Get the package from
5806 \begin_inset CommandInset href
5809 target "http://www.ctan.org/"
5816 \begin_layout Enumerate
5817 If the package contains a file with the ending
5818 \begin_inset Quotes eld
5822 \begin_inset Flex Code
5825 \begin_layout Plain Layout
5832 \begin_inset Quotes erd
5835 (is the case for FoilTeX) then open a console, change to the folder of
5836 this file and execute the command
5837 \begin_inset Flex Code
5840 \begin_layout Plain Layout
5847 You have now unpacked the package and have all files to install it.
5848 Most LaTeX-packages are not packed and you can skip this step.
5851 \begin_layout Enumerate
5852 Now you need to decide if the package should be available for all users
5854 \begin_inset Separator parbreak
5861 \begin_layout Enumerate
5862 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5863 for all users on your system, then install it in your `local' TeX tree,
5864 otherwise install it in your own `user' TeX tree.
5865 Where these trees should be created, if they do not already exist, depends
5867 To find this out, look in the file
5868 \begin_inset Flex Code
5871 \begin_layout Plain Layout
5881 \begin_layout Plain Layout
5882 This is usually in the directory
5883 \begin_inset Flex Code
5886 \begin_layout Plain Layout
5892 , though you can execute the command
5893 \begin_inset Flex Code
5896 \begin_layout Plain Layout
5907 The location of the `local' TeX tree is defined by the
5908 \begin_inset Flex Code
5911 \begin_layout Plain Layout
5917 variable; this is usually somewhere like
5918 \begin_inset Flex Code
5921 \begin_layout Plain Layout
5922 /usr/local/share/texmf
5928 The location of the `user' TeX tree is defined by
5929 \begin_inset Flex Code
5932 \begin_layout Plain Layout
5939 \begin_inset Flex Code
5942 \begin_layout Plain Layout
5949 (If these variables are not predefined, you have to define them.) You'll
5950 probably need root permissions to create or modify the `local' tree, but
5951 not for your `user' tree.
5952 \begin_inset Newline newline
5955 In general, it is recommended to install in the user tree because your user
5956 will not be modified or even overwritten when you upgrade your system.
5957 It will typically also be backed up together with everything else when
5958 you backup your home directory (which, of course, you do on a regular basis).
5961 \begin_layout Enumerate
5962 On Windows, if you want the new package to be available for all users on
5963 your system, change to the folder where LaTeX is installed and then change
5965 \begin_inset Flex Code
5968 \begin_layout Plain Layout
5979 (For MiKTeX, this would be by default the folder
5980 \begin_inset Flex Code
5983 \begin_layout Plain Layout
6001 \begin_layout Plain Layout
6002 Note that this will be the correct path only on English installations.
6003 On a German one, it would be
6004 \begin_inset Flex Code
6007 \begin_layout Plain Layout
6021 , and similarly for other languages.
6026 Create there a new folder
6027 \begin_inset Flex Code
6030 \begin_layout Plain Layout
6036 and copy all files of the package into it.
6038 \begin_inset Newline newline
6041 If the package should only available for you or you don't have admin permissions
6042 , do the same, but in the local LaTeX folder.
6044 \begin_inset space \thinspace{}
6048 \begin_inset space ~
6051 2.8 under Windows XP, this would be the folder:
6052 \begin_inset Newline newline
6058 \begin_inset Flex Code
6061 \begin_layout Plain Layout
6064 Documents and Settings
6076 \begin_inset Newline newline
6082 \begin_inset Phantom HPhantom
6085 \begin_layout Plain Layout
6096 \begin_inset Flex Code
6099 \begin_layout Plain Layout
6112 \begin_inset Newline newline
6115 On Vista, it would be:
6116 \begin_inset Newline newline
6120 \begin_inset Flex Code
6123 \begin_layout Plain Layout
6149 \begin_layout Enumerate
6150 Now one only need to tell LaTeX that there are new files.
6151 This depends on the used LaTeX-Distribution:
6152 \begin_inset Separator parbreak
6159 \begin_layout Enumerate
6160 For TeXLive execute the command
6161 \begin_inset Flex Code
6164 \begin_layout Plain Layout
6171 If you installed the package for all users, then you will probably need
6172 to have root permissions for that.
6175 \begin_layout Enumerate
6176 For MiKTeX, if you have installed the package for all users, start the program
6178 \begin_inset Quotes eld
6182 \begin_inset space ~
6186 \begin_inset Quotes erd
6189 and press the button marked
6190 \begin_inset Quotes eld
6194 \begin_inset Quotes erd
6198 Otherwise start the program
6199 \begin_inset Quotes eld
6203 \begin_inset Quotes erd
6210 \begin_layout Enumerate
6211 Finally, you need to tell LyX that there are new packages available.
6212 So, in LyX, use the menu
6213 \begin_inset Flex MenuItem
6216 \begin_layout Plain Layout
6219 \SpecialChar \menuseparator
6225 and then restart LyX.
6228 \begin_layout Standard
6229 Now the package is installed.
6230 In our example, the document class
6231 \begin_inset Flex Code
6234 \begin_layout Plain Layout
6236 \begin_inset space ~
6243 \begin_layout Plain Layout
6255 will now be available under
6256 \begin_inset Flex MenuItem
6259 \begin_layout Plain Layout
6260 Document\SpecialChar \menuseparator
6261 Settings\SpecialChar \menuseparator
6271 \begin_layout Standard
6272 If you would like to use a LaTeX document class that is not even listed
6274 \begin_inset Flex MenuItem
6277 \begin_layout Plain Layout
6278 Document\SpecialChar \menuseparator
6279 Settings\SpecialChar \menuseparator
6285 , then you need to create a `layout' file for it.
6286 That is the topic of the next section.
6289 \begin_layout Section
6290 Types of layout files
6293 \begin_layout Standard
6294 This section describes the various sorts of LyX files that contain layout
6296 These files describe various paragraph and character styles, determining
6297 how LyX should display them and how they should be translated into LaTeX,
6298 DocBook, XHTML, or whatever output format is being used.
6302 \begin_layout Standard
6303 We shall try to provide a thorough description of the process of writing
6305 However, there are so many different types of documents supported even
6306 by just LaTeX that we can't hope to cover every different possibility or
6307 problem you might encounter.
6308 The LyX users' list is frequented by people with lots of experience with
6309 layout design who are willing to share what they've learned, so please
6310 feel free to ask questions there.
6313 \begin_layout Standard
6314 As you prepare to write a new layout, it is extremely helpful to look at
6315 the layouts distributed with LyX.
6316 If you write a LyX layout for a LaTeX document class that might also be
6317 used by others, or write a module that might be useful to others, then
6318 you should consider posting your layout to the
6319 \begin_inset CommandInset href
6321 name "layout section on the LyX wiki"
6322 target "http://wiki.lyx.org/Layouts/Layouts"
6326 or even to the LyX developers' list, so that it might be included in LyX
6331 \begin_layout Plain Layout
6332 Note that LyX is licensed under the General Public License, so any material
6333 that is contributed to LyX must be similarly licensed.
6341 \begin_layout Subsection
6343 \begin_inset CommandInset label
6345 name "sub:Layout-modules"
6352 \begin_layout Standard
6353 We have spoken to this point about `layout files'.
6354 But there are different sorts of files that contain layout information.
6355 Layout files, strictly so called, have the
6356 \begin_inset Flex Code
6359 \begin_layout Plain Layout
6365 extension and provide LyX with information about document classes.
6366 Since LyX 1.6 layout information can also be contained in layout
6371 \begin_inset Flex Code
6374 \begin_layout Plain Layout
6381 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6382 some modules—such as the
6383 \begin_inset Flex Code
6386 \begin_layout Plain Layout
6392 module—specifically provide support for one package.
6393 In a sense, layout modules are similar to included
6397 \begin_layout Plain Layout
6398 These can have any extension, but by convention have the
6399 \begin_inset Flex Code
6402 \begin_layout Plain Layout
6414 \begin_inset Flex Code
6417 \begin_layout Plain Layout
6423 —in that modules are not specific to a given document class but may be used
6424 with many different classes.
6425 The difference is that using an included file with
6426 \begin_inset Flex Code
6429 \begin_layout Plain Layout
6435 requires editing that file.
6436 Modules, by contrast, are selected in the
6437 \begin_inset Flex MenuItem
6440 \begin_layout Plain Layout
6441 Document\SpecialChar \menuseparator
6450 \begin_layout Standard
6451 Building modules is the easiest way to get started with layout editing,
6452 since it can be as simple as adding a single new paragraph style or flex
6454 But modules may, in principle, contain anything a layout file can contain.
6457 \begin_layout Standard
6458 After creating a new module and copying it to the
6459 \begin_inset Flex Code
6462 \begin_layout Plain Layout
6468 folder, you will need to reconfigure and then restart LyX for the module
6469 to appear in the menu.
6470 However, changes you make to the module will be seen immediately, if you
6472 \begin_inset Flex MenuItem
6475 \begin_layout Plain Layout
6476 Document\SpecialChar \menuseparator
6482 , highlight something, and then hit
6483 \begin_inset Quotes eld
6487 \begin_inset Quotes erd
6493 It is strongly recommended that you save your work before doing this
6498 it is strongly recommended that you not attempt to edit modules while simultaneo
6499 usly working on actual documents
6502 Though of course the developers strive to keep LyX stable in such situations,
6503 syntax errors and the like in your module file could cause strange behavior.
6506 \begin_layout Subsubsection
6510 \begin_layout Standard
6511 Modules are to LyX as packages are to LaTeX.
6512 Sometimes, however, you find yourself wanting a specific inset or character
6513 style just for one document and writing a module that will also be available
6514 to other documents makes little sense.
6515 What you need is LyX's
6516 \begin_inset Quotes eld
6520 \begin_inset Quotes erd
6526 \begin_layout Standard
6527 You will find it under
6529 Document\SpecialChar \menuseparator
6530 Settings\SpecialChar \menuseparator
6534 The large text box allows you to enter anything that you might enter in
6535 a layout file or module.
6536 You can think of a document's local layout, in fact, as a module that belongs
6538 So, in particular, you must enter a
6539 \begin_inset Flex Code
6542 \begin_layout Plain Layout
6549 Any format is acceptable, but one would normally use the format current
6551 (In LyX 2.1, the current layout format is 48.) You should be aware that local
6552 layout is not supported by versions of LyX prior to 1.6, so you should not
6553 use it if you want to be able to export your document to LyX 1.5 or earlier
6554 (without, that is, losing the local layout information).
6555 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6556 though there is no UI for it---then you should use format 11 and, of course,
6557 use only layout constructs that were available in LyX 1.6.
6560 \begin_layout Standard
6561 When you have entered something in the
6562 \begin_inset Flex Code
6565 \begin_layout Plain Layout
6571 pane, LyX will enable the
6572 \begin_inset Quotes eld
6576 \begin_inset Quotes erd
6579 button at the bottom.
6580 Clicking this button will cause LyX to determine whether what you have
6581 entered is valid layout information for the chosen format.
6582 LyX will report the result but, unfortunately, will not tell you what errors
6583 there might have been.
6584 These will be written to the terminal, however, if LyX is started from
6586 You will not be permitted to save your local layout until you have entered
6590 \begin_layout Standard
6591 The warnings at the end of the previous section apply here, too.
6592 Do not play with local layout while you are actually working, especially
6593 if you have not saved your document.
6594 That said, using local layout with a test document can be a very convenient
6595 way to try out layout ideas, or even to start developing a module.
6598 \begin_layout Subsection
6600 \begin_inset Flex MenuItem
6603 \begin_layout Plain Layout
6612 \begin_layout Standard
6613 There are two situations you are likely to encounter when wanting to support
6614 a new LaTeX document class, involving style (
6615 \begin_inset Flex Code
6618 \begin_layout Plain Layout
6624 ) files and LaTeX2e class (
6625 \begin_inset Flex Code
6628 \begin_layout Plain Layout
6635 Supporting a style file is usually fairly easy.
6636 Supporting a new class file is a bit harder.
6637 We'll discuss the former in this section and the latter in the next.
6638 Similar remarks apply, of course, if you want to support a new DocBook
6642 \begin_layout Standard
6643 The easier case is the one in which your new document class is provided
6644 as a style file that is to be used in conjunction with an already supported
6646 For the sake of the example, we'll assume that the style file is called
6648 \begin_inset Flex MenuItem
6651 \begin_layout Plain Layout
6657 and that it is meant to be used with
6658 \begin_inset Flex MenuItem
6661 \begin_layout Plain Layout
6667 , which is a standard class.
6671 \begin_layout Standard
6672 Start by copying the existing class's layout file into your local directory:
6676 \begin_layout Plain Layout
6677 Of course, which directory is your local directory will vary by platform,
6678 and LyX allows you to specify your local directory on startup, too, using
6680 \begin_inset Flex Code
6683 \begin_layout Plain Layout
6697 \begin_layout LyX-Code
6698 cp report.layout ~/.lyx/layouts/myclass.layout
6701 \begin_layout Standard
6703 \begin_inset Flex Code
6706 \begin_layout Plain Layout
6712 and change the line:
6715 \begin_layout LyX-Code
6718 DeclareLaTeXClass{report}
6721 \begin_layout Standard
6725 \begin_layout LyX-Code
6728 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6731 \begin_layout Standard
6735 \begin_layout LyX-Code
6737 \begin_inset Newline newline
6743 \begin_inset Newline newline
6749 \begin_layout Standard
6750 near the top of the file.
6753 \begin_layout Standard
6754 Start LyX and select
6755 \begin_inset Flex MenuItem
6758 \begin_layout Plain Layout
6759 Tools\SpecialChar \menuseparator
6766 Then restart LyX and try creating a new document.
6768 \begin_inset Flex MenuItem
6771 \begin_layout Plain Layout
6777 " as a document class option in the
6778 \begin_inset Flex MenuItem
6781 \begin_layout Plain Layout
6782 Document\SpecialChar \menuseparator
6789 It is likely that some of the sectioning commands and such in your new
6790 class will work differently from how they worked in the base class—
6791 \begin_inset Flex Code
6794 \begin_layout Plain Layout
6800 in this example—so you can fiddle around with the settings for the different
6801 sections if you wish.
6802 The layout information for sections is contained in
6803 \begin_inset Flex Code
6806 \begin_layout Plain Layout
6812 , but you do not need to copy and change this file.
6813 Instead, you can simply add your changes to your layout file, after the
6815 \begin_inset Flex Code
6818 \begin_layout Plain Layout
6824 , which itself includes
6825 \begin_inset Flex Code
6828 \begin_layout Plain Layout
6835 For example, you might add these lines:
6838 \begin_layout LyX-Code
6842 \begin_layout LyX-Code
6846 \begin_layout LyX-Code
6850 \begin_layout LyX-Code
6854 \begin_layout LyX-Code
6858 \begin_layout Standard
6859 to change the font for chapter headings to sans-serif.
6860 This will override (or, in this case, add to) the existing declaration
6861 for the Chapter style.
6865 \begin_layout Standard
6866 Your new package may also provide commands or environments not present in
6868 In this case, you will want to add these to the layout file.
6870 \begin_inset CommandInset ref
6872 reference "sec:TextClass"
6876 for information on how to do so.
6879 \begin_layout Standard
6881 \begin_inset Flex MenuItem
6884 \begin_layout Plain Layout
6890 can be used with several different document classes, and even if it cannot,
6891 you might find it easiest just to write a module that you can load with
6893 The simplest possible such module would be:
6896 \begin_layout LyX-Code
6899 DeclareLyXModule{My Package}
6902 \begin_layout LyX-Code
6906 \begin_layout LyX-Code
6907 #Support for mypkg.sty.
6910 \begin_layout LyX-Code
6912 \begin_inset Newline newline
6918 \begin_layout LyX-Code
6920 \begin_inset Newline newline
6926 \begin_layout LyX-Code
6928 \begin_inset Newline newline
6934 \begin_inset Newline newline
6940 \begin_layout Standard
6941 A more complex module might modify the behavior of some existing constructs
6942 or define some new ones.
6944 \begin_inset CommandInset ref
6946 reference "sec:TextClass"
6953 \begin_layout Subsection
6955 \begin_inset Flex MenuItem
6958 \begin_layout Plain Layout
6967 \begin_layout Standard
6968 There are two possibilities here.
6969 One is that the class file is itself based upon an existing document class.
6970 For example, many thesis classes are based upon
6971 \begin_inset Flex MenuItem
6974 \begin_layout Plain Layout
6981 To see whether yours is, look for a line like
6984 \begin_layout LyX-Code
6990 \begin_layout Standard
6992 If so, then you may proceed largely as in the previous section, though
6994 \begin_inset Flex Code
6997 \begin_layout Plain Layout
7003 line will be different.
7004 If your new class is
7005 \begin_inset Flex Code
7008 \begin_layout Plain Layout
7014 and it is based upon
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7024 , then the line should read:
7028 \begin_layout Plain Layout
7029 And it will be easiest if you save the file to
7030 \begin_inset Flex Code
7033 \begin_layout Plain Layout
7039 : LyX assumes that the document class has the same name as the layout file.
7048 \begin_layout LyX-Code
7051 DeclareLaTeXClass[thesis,book]{thesis}
7054 \begin_layout Standard
7055 If, on the other hand, the new class is not based upon an existing class,
7056 you will probably have to
7057 \begin_inset Quotes eld
7061 \begin_inset Quotes erd
7065 We strongly suggest copying an existing layout file which uses a similar
7066 LaTeX class and then modifying it, if you can do so.
7067 At least use an existing file as a starting point so you can find out what
7068 items you need to worry about.
7069 Again, the specifics are covered below.
7072 \begin_layout Subsection
7074 \begin_inset CommandInset label
7076 name "sub:Creating-Templates"
7083 \begin_layout Standard
7084 Once you have written a layout file for a new document class, you might
7085 want to consider writing a
7090 A template acts as a kind of tutorial for your layout, showing how it might
7091 be used, though containing dummy content.
7092 You can of course look at the various templates included with LyX for ideas.
7095 \begin_layout Standard
7096 Templates are created just like usual documents: using LyX.
7097 The only difference is that usual documents contain all possible settings,
7098 including the font scheme and the paper size.
7099 Usually a user doesn't want a template to overwrite his preferred settings
7100 for such parameters.
7101 For that reason, the designer of a template should remove the corresponding
7103 \begin_inset Flex Code
7106 \begin_layout Plain Layout
7115 \begin_inset Flex Code
7118 \begin_layout Plain Layout
7126 from the template LyX file.
7127 This can be done with any simple text-editor, for example
7128 \begin_inset Flex Code
7131 \begin_layout Plain Layout
7138 \begin_inset Flex Code
7141 \begin_layout Plain Layout
7150 \begin_layout Standard
7151 Put the edited template files you create in
7152 \begin_inset Flex Code
7155 \begin_layout Plain Layout
7161 , copy the ones you use from the global template directory in
7162 \begin_inset Flex Code
7165 \begin_layout Plain Layout
7171 to the same place, and redefine the template path in the
7172 \begin_inset Flex MenuItem
7175 \begin_layout Plain Layout
7176 Tools\SpecialChar \menuseparator
7177 Preferences\SpecialChar \menuseparator
7186 \begin_layout Standard
7187 Note, by the way, that there is a template which has a particular meaning:
7189 \begin_inset Flex Code
7192 \begin_layout Plain Layout
7199 This template is loaded every time you create a new document with
7200 \begin_inset Flex MenuItem
7203 \begin_layout Plain Layout
7204 File\SpecialChar \menuseparator
7210 in order to provide useful defaults.
7211 To create this template from inside LyX, all you have to do is to open
7212 a document with the correct settings, and use the
7213 \begin_inset Flex MenuItem
7216 \begin_layout Plain Layout
7217 Save as Document Defaults
7225 \begin_layout Subsection
7226 Upgrading old layout files
7229 \begin_layout Standard
7230 The format of layout files changes with each LyX release, so old layout
7231 files need to be converted to the new format.
7232 If LyX reads a layout file in an older format, it automatically calls the
7234 \begin_inset Flex Code
7237 \begin_layout Plain Layout
7243 to convert it to a temporary file in current format.
7244 The original file is left untouched.
7245 If you use the layout file often, then, you may want to convert it permanently,
7246 so that LyX does not have to do so itself every time.
7247 To do this, you can call the converter manually:
7250 \begin_layout Enumerate
7252 \begin_inset Flex Code
7255 \begin_layout Plain Layout
7262 \begin_inset Flex Code
7265 \begin_layout Plain Layout
7274 \begin_layout Enumerate
7276 \begin_inset Newline newline
7280 \begin_inset Flex Code
7283 \begin_layout Plain Layout
7284 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7290 \begin_inset Newline newline
7294 \begin_inset Flex Code
7297 \begin_layout Plain Layout
7303 is the name of your LyX system directory.
7306 \begin_layout Standard
7307 Note that manual conversion does not affect included files, so these will
7308 have to be converted separately.
7311 \begin_layout Section
7312 \begin_inset CommandInset label
7314 name "sec:TextClass"
7318 The layout file format
7321 \begin_layout Standard
7322 The following sections describe how layout files are structured and written.
7323 Our advice is to go slowly, save and test often.
7324 It is really not that hard, except that the multitude of options can become
7325 overwhelming, especially if you try to check out too many at once.
7326 It becomes easier if you use existing layouts of LyX as examples/reference
7327 or if you modify an existing layout to your needs.
7330 \begin_layout Standard
7331 Note that all the tags used in layout files are case-insensitive.
7333 \begin_inset Flex Code
7336 \begin_layout Plain Layout
7343 \begin_inset Flex Code
7346 \begin_layout Plain Layout
7353 \begin_inset Flex Code
7356 \begin_layout Plain Layout
7362 are really the same tag.
7363 The possible arguments are printed in brackets after the tag's name.
7364 The default argument is typeset
7365 \begin_inset Flex Code
7368 \begin_layout Plain Layout
7377 If the argument has a data type like
7378 \begin_inset Quotes eld
7382 \begin_inset Quotes erd
7386 \begin_inset Quotes eld
7390 \begin_inset Quotes erd
7393 , the default is shown like this:
7394 \begin_inset Flex Code
7397 \begin_layout Plain Layout
7408 \begin_layout Subsection
7409 The document class declaration and classification
7412 \begin_layout Standard
7413 Lines in a layout file which begin with
7414 \begin_inset Flex Code
7417 \begin_layout Plain Layout
7424 There is one exception to this rule.
7426 \begin_inset Flex Code
7429 \begin_layout Plain Layout
7435 files should begin with lines like:
7438 \begin_layout LyX-Code
7441 #% Do not delete the line below; configure depends on this
7444 \begin_layout LyX-Code
7455 \begin_layout Plain Layout
7464 eXClass{Article (Standard Class)}
7467 \begin_layout LyX-Code
7472 DeclareCategory{Articles}
7475 \begin_layout Standard
7476 The second and third lines are used when you (re)configure LyX.
7477 The layout file is read by the LaTeX script
7478 \begin_inset Flex Code
7481 \begin_layout Plain Layout
7487 , in a special mode where
7488 \begin_inset Flex Code
7491 \begin_layout Plain Layout
7498 The first line is just a LaTeX comment, the second one contains the mandatory
7499 declaration of the text class and the third line contains the optional
7500 classification of the class.
7501 If these lines appear in a file named
7502 \begin_inset Flex Code
7505 \begin_layout Plain Layout
7511 , then they define a text class of name
7512 \begin_inset Flex Code
7515 \begin_layout Plain Layout
7521 (the name of the layout file) which uses the LaTeX document class
7522 \begin_inset Flex Code
7525 \begin_layout Plain Layout
7531 (the default is to use the same name as the layout).
7533 \begin_inset Quotes eld
7536 Article (Standard Class)
7537 \begin_inset Quotes erd
7540 that appears above is used as a description of the text class in the
7541 \begin_inset Flex MenuItem
7544 \begin_layout Plain Layout
7545 Document\SpecialChar \menuseparator
7553 \begin_inset Quotes eld
7557 \begin_inset Quotes erd
7560 in the example) is also used in the
7561 \begin_inset Flex MenuItem
7564 \begin_layout Plain Layout
7565 Document\SpecialChar \menuseparator
7571 dialog: the text classes are grouped by these categories (which are usually
7572 genres, so typical categories are
7573 \begin_inset Quotes eld
7577 \begin_inset Quotes erd
7581 \begin_inset Quotes eld
7585 \begin_inset Quotes erd
7589 \begin_inset Quotes eld
7593 \begin_inset Quotes erd
7597 \begin_inset Quotes eld
7601 \begin_inset Quotes erd
7605 \begin_inset Quotes eld
7609 \begin_inset Quotes erd
7613 \begin_inset Quotes eld
7617 \begin_inset Quotes erd
7621 If no category has been declared, the class will be put in the
7622 \begin_inset Quotes eld
7626 \begin_inset Quotes erd
7632 \begin_layout Standard
7633 Let's assume that you wrote your own text class that uses the
7634 \begin_inset Flex Code
7637 \begin_layout Plain Layout
7643 document class, but where you changed the appearance of the section headings.
7644 If you put it in a file
7645 \begin_inset Flex Code
7648 \begin_layout Plain Layout
7654 , the header of this file should be:
7657 \begin_layout LyX-Code
7660 #% Do not delete the line below; configure depends on this
7663 \begin_layout LyX-Code
7674 \begin_layout Plain Layout
7683 eXClass[article]{Article (with My Own Headings)}
7686 \begin_layout LyX-Code
7691 DeclareCategory{Articles}
7694 \begin_layout Standard
7695 This declares a text class
7696 \begin_inset Flex Code
7699 \begin_layout Plain Layout
7705 , associated with the LaTeX document class
7706 \begin_inset Flex Code
7709 \begin_layout Plain Layout
7716 \begin_inset Quotes eld
7719 Article (with My Own Headings)
7720 \begin_inset Quotes erd
7724 If your text class depends on several packages, you can declare it as:
7727 \begin_layout LyX-Code
7730 #% Do not delete the line below; configure depends on this
7733 \begin_layout LyX-Code
7744 \begin_layout Plain Layout
7753 eXClass[article,foo.sty]{Article (with My Own Headings)}
7756 \begin_layout LyX-Code
7761 DeclareCategory{Articles}
7764 \begin_layout Standard
7765 This indicates that your text class uses the
7766 \begin_inset Flex Code
7769 \begin_layout Plain Layout
7776 Finally, it is also possible to declare classes for DocBook code.
7777 Typical declarations will look like:
7780 \begin_layout LyX-Code
7783 #% Do not delete the line below; configure depends on this
7786 \begin_layout LyX-Code
7791 DeclareDocBookClass[article]{SGML (DocBook Article)}
7794 \begin_layout LyX-Code
7799 DeclareCategory{Articles (DocBook)}
7802 \begin_layout Standard
7803 Note that these declarations can also be given an optional parameter declaring
7804 the name of the document class (but not a list).
7807 \begin_layout Standard
7808 So, to be as explicit as possible, the form of the layout declaration is:
7811 \begin_layout LyX-Code
7822 \begin_layout Plain Layout
7831 eXClass[class,package.sty]{layout description}
7834 \begin_layout LyX-Code
7839 DeclareCategory{category}
7842 \begin_layout Standard
7843 The class need only be specified if the name of the LaTeX class file and
7844 the name of the layout file are different or if there are packages to load.
7845 If the name of the class file is not specified, then LyX will simply assume
7846 that it is the same as the name of the layout file.
7849 \begin_layout Standard
7850 When the text class has been modified to your taste, all you have to do
7851 is to copy it either to
7852 \begin_inset Flex Code
7855 \begin_layout Plain Layout
7862 \begin_inset Flex Code
7865 \begin_layout Plain Layout
7872 \begin_inset Flex MenuItem
7875 \begin_layout Plain Layout
7876 Tools\SpecialChar \menuseparator
7882 , exit LyX and restart.
7883 Then your new text class should be available along with the others.
7886 \begin_layout Standard
7887 Once the layout file is installed, you can edit it and see your changes
7888 without having to reconfigure or to restart LyX.
7893 \begin_layout Plain Layout
7894 In versions of LyX prior to 1.6, this was not true.
7895 As a result, editing layout files was very time consuming, since you had
7896 constantly to restart LyX to see changes.
7901 You can force a reload of the current layout by using the LyX function
7903 \begin_inset Flex MenuItem
7906 \begin_layout Plain Layout
7913 There is no default binding for this function—though, of course, you can
7914 bind it to a key yourself.
7915 But you will normally use this function simply by entering it in the mini-buffe
7920 \begin_layout Standard
7926 \begin_inset Flex MenuItem
7929 \begin_layout Plain Layout
7935 is very much an `advanced feature'.
7940 recommended that you save your work before using this function.
7945 recommended that you not attempt to edit layout information while simultaneousl
7946 y working on a document that you care about.
7947 Use a test document.
7948 Syntax errors and the like in your layout file could cause peculiar behavior.
7949 In particular, such errors could cause LyX to regard the current layout
7950 as invalid and to attempt to switch to some other layout.
7954 \begin_layout Plain Layout
7955 Really bad syntax errors may even caused LyX to exit.
7956 This is because certain sorts of errors may make LyX unable to read
7966 The LyX team strives to keep LyX stable in such situations, but safe is
7971 \begin_layout Plain Layout
7972 While we're giving advice: make regular backups.
7973 And be nice to your mother.
7981 \begin_layout Subsection
7982 The Module declaration
7985 \begin_layout Standard
7986 A module must begin with a line like the following:
7989 \begin_layout LyX-Code
7996 \begin_layout Plain Layout
8003 yXModule[endnotes.sty]{Endnotes}
8006 \begin_layout Standard
8007 The mandatory argument, in curly brackets, is the name of the module, as
8009 \begin_inset Flex MenuItem
8012 \begin_layout Plain Layout
8013 Document\SpecialChar \menuseparator
8014 Settings\SpecialChar \menuseparator
8021 The argument in square brackets is optional: It declares any LaTeX packages
8022 on which the module depends.
8023 It is also possible to use the form
8024 \begin_inset Flex MenuItem
8027 \begin_layout Plain Layout
8033 as an optional argument, which declares that the module can only be used
8034 when there exists a conversion chain between the formats `
8035 \begin_inset Flex Code
8038 \begin_layout Plain Layout
8045 \begin_inset Flex Code
8048 \begin_layout Plain Layout
8057 \begin_layout Standard
8058 The module declaration should then be followed by lines like the following
8062 \begin_layout Plain Layout
8063 Preferably in English if the module should be published with LyX.
8064 This description will appear in the list of messages to be translated and
8065 will be thus translated with the next interface update.
8073 \begin_layout LyX-Code
8077 \begin_layout LyX-Code
8078 #Adds an endnote command, in addition to footnotes.
8082 \begin_layout LyX-Code
8083 #You will need to add
8085 theendnotes in TeX code where you
8088 \begin_layout LyX-Code
8089 #want the endnotes to appear.
8093 \begin_layout LyX-Code
8097 \begin_layout LyX-Code
8098 #Requires: somemodule | othermodule
8101 \begin_layout LyX-Code
8102 #Excludes: badmodule
8105 \begin_layout Standard
8106 The description is used in
8107 \begin_inset Flex MenuItem
8110 \begin_layout Plain Layout
8111 Document\SpecialChar \menuseparator
8112 Settings\SpecialChar \menuseparator
8118 to provide the user with information about what the module does.
8120 \begin_inset Flex Code
8123 \begin_layout Plain Layout
8129 line is used to identify other modules with which this one must be used;
8131 \begin_inset Flex Code
8134 \begin_layout Plain Layout
8140 line is used to identify modules with which this one may not be used.
8141 Both are optional, and, as shown, multiple modules should be separated
8142 with the pipe symbol: |.
8143 Note that the required modules are treated disjunctively:
8147 of the required modules must be used.
8152 excluded module may be used.
8153 Note that modules are identified here by their filenames without the
8154 \begin_inset Flex Code
8157 \begin_layout Plain Layout
8165 \begin_inset Flex Code
8168 \begin_layout Plain Layout
8175 \begin_inset Flex Code
8178 \begin_layout Plain Layout
8187 \begin_layout Subsection
8191 \begin_layout Standard
8192 The first non-comment line of any layout file, included file, or module
8197 contain the file format number:
8200 \begin_layout Description
8201 \begin_inset Flex Code
8204 \begin_layout Plain Layout
8211 \begin_inset Flex Code
8214 \begin_layout Plain Layout
8220 ] The format number of the layout file.
8223 \begin_layout Standard
8224 This tag was introduced with LyX
8225 \begin_inset space ~
8229 Layout files from older LyX versions do not have an explicit file format
8230 and are considered to have
8231 \begin_inset Flex Code
8234 \begin_layout Plain Layout
8236 \begin_inset space ~
8245 The format for the present version of LyX is format 35.
8246 But each version of LyX is capable of reading earlier versions' layout
8247 files, just as they are capable of reading files produced by earlier versions
8249 There is, however, no provision for converting to earlier formats.
8252 \begin_layout Subsection
8253 \begin_inset CommandInset label
8255 name "sub:General-text-class"
8259 General text class parameters
8262 \begin_layout Standard
8263 These are general parameters that govern the behavior of an entire document
8269 mean that they must appear in
8270 \begin_inset Flex Code
8273 \begin_layout Plain Layout
8279 files rather than in modules.
8280 A module can contain any layout tag.)
8283 \begin_layout Description
8284 \begin_inset Flex Code
8287 \begin_layout Plain Layout
8293 Adds information that will be output in the
8294 \begin_inset Flex Code
8297 \begin_layout Plain Layout
8303 block when the document is output to XHTML.
8304 Typically, this would be used to output CSS style information, but it can
8305 be used for anything that can appear in
8306 \begin_inset Flex Code
8309 \begin_layout Plain Layout
8317 \begin_inset Quotes eld
8321 \begin_inset Flex Code
8324 \begin_layout Plain Layout
8331 \begin_inset Quotes erd
8337 \begin_layout Description
8338 \begin_inset Flex Code
8341 \begin_layout Plain Layout
8347 Adds information to the document preamble.
8349 \begin_inset Newline newline
8353 \begin_inset Quotes eld
8357 \begin_inset Flex Code
8360 \begin_layout Plain Layout
8367 \begin_inset Quotes erd
8373 \begin_layout Description
8374 \begin_inset Flex Code
8377 \begin_layout Plain Layout
8383 Defines formats for use in the display of bibliographic information.
8385 \begin_inset CommandInset ref
8387 reference "sub:Citation-format-description"
8393 \begin_inset Quotes eld
8397 \begin_inset Flex Code
8400 \begin_layout Plain Layout
8407 \begin_inset Quotes erd
8413 \begin_layout Description
8414 \begin_inset Flex Code
8417 \begin_layout Plain Layout
8423 Describes various global options supported by the document class.
8425 \begin_inset CommandInset ref
8427 reference "sub:ClassOptions"
8433 \begin_inset Quotes eld
8437 \begin_inset Flex Code
8440 \begin_layout Plain Layout
8447 \begin_inset Quotes erd
8453 \begin_layout Description
8454 \begin_inset Flex Code
8457 \begin_layout Plain Layout
8464 \begin_inset Flex Code
8467 \begin_layout Plain Layout
8476 \begin_inset space \thinspace{}
8480 \begin_inset Flex Code
8483 \begin_layout Plain Layout
8489 ] Whether the class should
8493 to having one or two columns.
8494 Can be changed in the
8495 \begin_inset Flex MenuItem
8498 \begin_layout Plain Layout
8499 Document\SpecialChar \menuseparator
8508 \begin_layout Description
8509 \begin_inset Flex Code
8512 \begin_layout Plain Layout
8519 \begin_inset Flex Code
8522 \begin_layout Plain Layout
8528 ] This sequence defines the properties for a counter.
8529 If the counter does not yet exist, it is created; if it does exist, it
8532 \begin_inset Quotes eld
8536 \begin_inset Flex Code
8539 \begin_layout Plain Layout
8546 \begin_inset Quotes erd
8550 \begin_inset Newline newline
8554 \begin_inset CommandInset ref
8556 reference "sub:Counters"
8560 for details on counters.
8563 \begin_layout Description
8564 \begin_inset Flex Code
8567 \begin_layout Plain Layout
8573 Sets the default font used to display the document.
8575 \begin_inset CommandInset ref
8577 reference "sub:Font-description"
8581 for how to declare fonts.
8583 \begin_inset Quotes eld
8587 \begin_inset Flex Code
8590 \begin_layout Plain Layout
8597 \begin_inset Quotes erd
8603 \begin_layout Description
8604 \begin_inset Flex Code
8607 \begin_layout Plain Layout
8614 \begin_inset Flex Code
8617 \begin_layout Plain Layout
8623 ] Specifies a module to be included by default with this document class.
8624 The module is specified as filename without the
8625 \begin_inset Flex Code
8628 \begin_layout Plain Layout
8635 The user can still remove the module, but it will be active at the outset.
8636 (This applies only when new files are created, or when this class is chosen
8637 for an existing document.)
8640 \begin_layout Description
8641 \begin_inset Flex Code
8644 \begin_layout Plain Layout
8651 \begin_inset Flex Code
8654 \begin_layout Plain Layout
8660 ] This is the style that will be assigned to new paragraphs, usually
8661 \begin_inset Flex MenuItem
8664 \begin_layout Plain Layout
8671 This will default to the first defined style if not given, but you are
8672 encouraged to use this directive.
8675 \begin_layout Description
8676 \begin_inset Flex Code
8679 \begin_layout Plain Layout
8686 \begin_inset Flex Code
8689 \begin_layout Plain Layout
8695 ] This tag indicates that the module (which is specified by filename without
8697 \begin_inset Flex Code
8700 \begin_layout Plain Layout
8706 extension) cannot be used with this document class.
8707 This might be used in a journal-specific layout file to prevent, say, the
8709 \begin_inset Flex Code
8712 \begin_layout Plain Layout
8718 module that numbers theorems by section.
8723 be used in a module.
8724 Modules have their own way of excluding other modules (see
8725 \begin_inset CommandInset ref
8727 reference "sub:Layout-modules"
8734 \begin_layout Description
8735 \begin_inset Flex Code
8738 \begin_layout Plain Layout
8744 Defines a new float.
8746 \begin_inset CommandInset ref
8748 reference "sub:Floats"
8754 \begin_inset Quotes eld
8758 \begin_inset Flex Code
8761 \begin_layout Plain Layout
8768 \begin_inset Quotes erd
8774 \begin_layout Description
8775 \begin_inset Flex Code
8778 \begin_layout Plain Layout
8784 Sets the information that will be output in the
8785 \begin_inset Flex Code
8788 \begin_layout Plain Layout
8794 block when this document class is output to XHTML.
8795 Note that this will completely override any prior
8796 \begin_inset Flex Code
8799 \begin_layout Plain Layout
8806 \begin_inset Flex Code
8809 \begin_layout Plain Layout
8817 \begin_inset Newline newline
8821 \begin_inset Flex Code
8824 \begin_layout Plain Layout
8830 if you just want to add material to the preamble.) Must end with
8831 \begin_inset Quotes eld
8835 \begin_inset Flex Code
8838 \begin_layout Plain Layout
8845 \begin_inset Quotes erd
8851 \begin_layout Description
8852 \begin_inset Flex Code
8855 \begin_layout Plain Layout
8862 \begin_inset Flex Code
8865 \begin_layout Plain Layout
8871 ] The style to use for the table of contents, bibliography, and so forth,
8872 when the document is output to HTML.
8873 For articles, this should normally be
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8884 \begin_inset Flex Code
8887 \begin_layout Plain Layout
8894 If it is not given, then LyX will attempt to figure out which layout to
8898 \begin_layout Description
8899 \begin_inset Flex Code
8902 \begin_layout Plain Layout
8909 \begin_inset Flex Code
8912 \begin_layout Plain Layout
8918 ] Modifies the properties of the given counter.
8919 If the counter does not exist, the statement is ignored.
8921 \begin_inset Quotes eld
8925 \begin_inset Flex Code
8928 \begin_layout Plain Layout
8935 \begin_inset Quotes erd
8939 \begin_inset Newline newline
8943 \begin_inset CommandInset ref
8945 reference "sub:Counters"
8949 for details on counters.
8952 \begin_layout Description
8953 \begin_inset Flex Code
8956 \begin_layout Plain Layout
8963 \begin_inset Flex Code
8966 \begin_layout Plain Layout
8972 ] Modifies the properties of the given paragraph style.
8973 If the style does not exist, the statement is ignored.
8975 \begin_inset Quotes eld
8979 \begin_inset Flex Code
8982 \begin_layout Plain Layout
8989 \begin_inset Quotes erd
8995 \begin_layout Description
8996 \begin_inset Flex Code
8999 \begin_layout Plain Layout
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 ] This allows you to include another layout definition file within yours
9016 to avoid duplicating commands.
9017 Common examples are the standard layout files, for example,
9018 \begin_inset Flex Code
9021 \begin_layout Plain Layout
9027 , which contains most of the basic layouts.
9030 \begin_layout Description
9031 \begin_inset Flex Code
9034 \begin_layout Plain Layout
9041 \begin_inset Flex Code
9044 \begin_layout Plain Layout
9050 ] This section (re-)defines the layout of an inset.
9051 It can be applied to an existing inset or to a new, user-defined inset,
9052 e.g., a new character style.
9054 \begin_inset Quotes eld
9058 \begin_inset Flex Code
9061 \begin_layout Plain Layout
9068 \begin_inset Quotes erd
9072 \begin_inset Newline newline
9076 \begin_inset CommandInset ref
9078 reference "sub:Flex-insets-and"
9082 for more information.
9086 \begin_layout Description
9087 \begin_inset Flex Code
9090 \begin_layout Plain Layout
9097 \begin_inset Flex Code
9100 \begin_layout Plain Layout
9106 ] A string that indicates the width of the left margin on the screen, for
9108 \begin_inset Quotes eld
9112 \begin_inset Flex Code
9115 \begin_layout Plain Layout
9122 \begin_inset Quotes erd
9126 (Note that this is not a `length', like
9127 \begin_inset Quotes eld
9131 \begin_inset Quotes erd
9137 \begin_layout Description
9138 \begin_inset Flex Code
9141 \begin_layout Plain Layout
9148 \begin_inset Flex Code
9151 \begin_layout Plain Layout
9157 ] Deletes an existing counter, usually one defined in an included file.
9160 \begin_layout Description
9161 \begin_inset Flex Code
9164 \begin_layout Plain Layout
9171 \begin_inset Flex Code
9174 \begin_layout Plain Layout
9180 ] Deletes an existing float.
9181 This is particularly useful when you want to suppress a float that has
9182 been defined in an input file.
9185 \begin_layout Description
9186 \begin_inset Flex Code
9189 \begin_layout Plain Layout
9196 \begin_inset Flex Code
9199 \begin_layout Plain Layout
9205 ] Deletes an existing style.
9208 \begin_layout Description
9209 \begin_inset Flex Code
9212 \begin_layout Plain Layout
9219 \begin_inset Flex Code
9222 \begin_layout Plain Layout
9228 ] The file format (as defined in the LyX preferences) produced by this document
9230 It is mainly useful when
9231 \begin_inset Flex Code
9234 \begin_layout Plain Layout
9241 \begin_inset Flex Code
9244 \begin_layout Plain Layout
9250 and one wants to define a new type of literate document.
9251 The format is reset to
9252 \begin_inset Quotes eld
9256 \begin_inset Flex Code
9259 \begin_layout Plain Layout
9266 \begin_inset Quotes erd
9270 \begin_inset Quotes eld
9274 \begin_inset Flex Code
9277 \begin_layout Plain Layout
9284 \begin_inset Quotes erd
9287 when the corresponding
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9297 parameter is encountered.
9300 \begin_layout Description
9301 \begin_inset Flex Code
9304 \begin_layout Plain Layout
9311 \begin_inset Flex Code
9314 \begin_layout Plain Layout
9325 \begin_inset Flex Code
9328 \begin_layout Plain Layout
9335 \begin_inset Flex Code
9338 \begin_layout Plain Layout
9344 ] Specifies what sort of output documents using this class will produce.
9347 \begin_layout Description
9348 \begin_inset Flex Code
9351 \begin_layout Plain Layout
9358 \begin_inset Flex Code
9361 \begin_layout Plain Layout
9368 \begin_inset Flex Code
9371 \begin_layout Plain Layout
9377 ] Specifies options, given in the second string, for the package named by
9380 \begin_inset Quotes eld
9384 \begin_inset Flex Code
9387 \begin_layout Plain Layout
9388 PackageOptions natbib square
9394 \begin_inset Quotes erd
9398 \begin_inset Flex Code
9401 \begin_layout Plain Layout
9407 to be loaded with the
9408 \begin_inset Flex Code
9411 \begin_layout Plain Layout
9418 (For TeXperts, this causes LyX to output:
9419 \begin_inset Flex Code
9422 \begin_layout Plain Layout
9425 PassOptionsToPackage{natbib}{square}
9431 \begin_inset Flex Code
9434 \begin_layout Plain Layout
9443 \begin_layout Description
9444 \begin_inset Flex Code
9447 \begin_layout Plain Layout
9454 \begin_inset Flex Code
9457 \begin_layout Plain Layout
9466 \begin_inset Flex Code
9469 \begin_layout Plain Layout
9476 \begin_inset Flex Code
9479 \begin_layout Plain Layout
9485 ] The default pagestyle.
9486 Can be changed in the
9487 \begin_inset Flex MenuItem
9490 \begin_layout Plain Layout
9491 Document\SpecialChar \menuseparator
9500 \begin_layout Description
9501 \begin_inset Flex Code
9504 \begin_layout Plain Layout
9510 Sets the preamble for the LaTeX document.
9511 Note that this will completely override any prior
9512 \begin_inset Flex Code
9515 \begin_layout Plain Layout
9522 \begin_inset Flex Code
9525 \begin_layout Plain Layout
9533 \begin_inset Flex Code
9536 \begin_layout Plain Layout
9542 if you just want to add material to the preamble.) Must end with
9543 \begin_inset Quotes eld
9547 \begin_inset Flex Code
9550 \begin_layout Plain Layout
9557 \begin_inset Quotes erd
9563 \begin_layout Description
9564 \begin_inset Flex Code
9567 \begin_layout Plain Layout
9574 \begin_inset Flex Code
9577 \begin_layout Plain Layout
9584 \begin_inset Flex Code
9587 \begin_layout Plain Layout
9596 \begin_inset space \thinspace{}
9600 \begin_inset Flex Code
9603 \begin_layout Plain Layout
9609 ] Whether the class already provides the feature
9610 \begin_inset Flex Code
9613 \begin_layout Plain Layout
9620 A feature is in general the name of a package (e.
9621 \begin_inset space \thinspace{}
9625 \begin_inset space \space{}
9629 \begin_inset Flex Code
9632 \begin_layout Plain Layout
9639 \begin_inset Flex Code
9642 \begin_layout Plain Layout
9649 \begin_inset space \thinspace{}
9653 \begin_inset space \space{}
9657 \begin_inset Flex Code
9660 \begin_layout Plain Layout
9667 \begin_inset Flex Code
9670 \begin_layout Plain Layout
9678 \begin_inset CommandInset ref
9680 reference "chap:List-of-functions"
9684 for the list of features.
9687 \begin_layout Description
9688 \begin_inset Flex Code
9691 \begin_layout Plain Layout
9698 \begin_inset Flex Code
9701 \begin_layout Plain Layout
9707 ] Indicates that this layout provides the functionality of the module mentioned,
9708 which should be specified by the filename without the
9709 \begin_inset Flex Code
9712 \begin_layout Plain Layout
9719 This will typically be used if the layout includes the module directly,
9720 rather than using the
9721 \begin_inset Flex Code
9724 \begin_layout Plain Layout
9730 tag to indicate that it ought to be used.
9731 It could also be used in a module that provided an alternate implementation
9732 of the same functionality.
9735 \begin_layout Description
9736 \begin_inset Flex Code
9739 \begin_layout Plain Layout
9746 \begin_inset Flex Code
9749 \begin_layout Plain Layout
9755 ] Whether the class requires the feature
9756 \begin_inset Flex Code
9759 \begin_layout Plain Layout
9766 Multiple features must be separated by commas.
9767 Note that you can only request supported features.
9769 \begin_inset CommandInset ref
9771 reference "chap:List-of-functions"
9775 for the list of features.)
9778 \begin_layout Description
9779 \begin_inset Flex Code
9782 \begin_layout Plain Layout
9789 \begin_inset Flex Code
9792 \begin_layout Plain Layout
9798 ] A string that indicates the width of the right margin on the screen, for
9800 \begin_inset Quotes eld
9804 \begin_inset Flex Code
9807 \begin_layout Plain Layout
9814 \begin_inset Quotes erd
9820 \begin_layout Description
9821 \begin_inset Flex Code
9824 \begin_layout Plain Layout
9831 \begin_inset Flex Code
9834 \begin_layout Plain Layout
9840 ] Sets which divisions get numbered.
9842 \begin_inset Newline newline
9846 \begin_inset Flex Code
9849 \begin_layout Plain Layout
9858 \begin_layout Description
9859 \begin_inset Flex Code
9862 \begin_layout Plain Layout
9869 \begin_inset Flex Code
9872 \begin_layout Plain Layout
9881 \begin_inset space \thinspace{}
9885 \begin_inset Flex Code
9888 \begin_layout Plain Layout
9894 ] Whether the class-default should be printing on one or both sides of the
9896 Can be changed in the
9897 \begin_inset Flex MenuItem
9900 \begin_layout Plain Layout
9901 Document\SpecialChar \menuseparator
9910 \begin_layout Description
9911 \begin_inset Flex Code
9914 \begin_layout Plain Layout
9921 \begin_inset Flex Code
9924 \begin_layout Plain Layout
9930 ] This sequence defines a paragraph style.
9931 If the style does not yet exist, it is created; if it does exist, its parameter
9934 \begin_inset Quotes eld
9938 \begin_inset Flex Code
9941 \begin_layout Plain Layout
9948 \begin_inset Quotes erd
9952 \begin_inset Newline newline
9956 \begin_inset CommandInset ref
9958 reference "sub:Paragraph-Styles"
9962 for details on paragraph styles.
9965 \begin_layout Description
9966 \begin_inset Flex Code
9969 \begin_layout Plain Layout
9976 \begin_inset Flex Code
9979 \begin_layout Plain Layout
9985 ] The name of the command or environment to be used with
9986 \begin_inset Flex Code
9989 \begin_layout Plain Layout
9998 \begin_layout Description
9999 \begin_inset Flex Code
10002 \begin_layout Plain Layout
10009 \begin_inset Flex Code
10012 \begin_layout Plain Layout
10021 \begin_inset Flex Code
10024 \begin_layout Plain Layout
10030 ] Indicates what kind of markup is used to define the title of a document.
10032 \begin_inset Flex Code
10035 \begin_layout Plain Layout
10041 means that the macro with name
10042 \begin_inset Flex Code
10045 \begin_layout Plain Layout
10051 will be inserted after the last layout which has
10052 \begin_inset Quotes eld
10056 \begin_inset Flex Code
10059 \begin_layout Plain Layout
10061 \begin_inset space ~
10070 \begin_inset Quotes erd
10075 \begin_inset Flex Code
10078 \begin_layout Plain Layout
10084 corresponds to the case where all layouts which have
10085 \begin_inset Quotes eld
10089 \begin_inset Flex Code
10092 \begin_layout Plain Layout
10094 \begin_inset space ~
10103 \begin_inset Quotes erd
10106 should be enclosed into the
10107 \begin_inset Flex Code
10110 \begin_layout Plain Layout
10119 \begin_layout Description
10120 \begin_inset Flex Code
10123 \begin_layout Plain Layout
10130 \begin_inset Flex Code
10133 \begin_layout Plain Layout
10139 ] Sets which divisions are included in the table of contents.
10141 \begin_inset Flex Code
10144 \begin_layout Plain Layout
10153 \begin_layout Subsection
10154 \begin_inset Flex Code
10157 \begin_layout Plain Layout
10164 \begin_inset CommandInset label
10166 name "sub:ClassOptions"
10173 \begin_layout Standard
10175 \begin_inset Flex Code
10178 \begin_layout Plain Layout
10184 section can contain the following entries:
10187 \begin_layout Description
10188 \begin_inset Flex Code
10191 \begin_layout Plain Layout
10198 \begin_inset Flex Code
10201 \begin_layout Plain Layout
10207 ] The list of available font sizes for the document's main font, separated
10209 \begin_inset Quotes eld
10213 \begin_inset Flex Code
10216 \begin_layout Plain Layout
10223 \begin_inset Quotes erd
10229 \begin_layout Description
10230 \begin_inset Flex Code
10233 \begin_layout Plain Layout
10239 Used to set the DTD line with XML-based output classes.
10241 \begin_inset space \thinspace{}
10245 \begin_inset Quotes eld
10248 -//OASIS//DTD DocBook V4.2//EN
10249 \begin_inset Quotes erd
10255 \begin_layout Description
10256 \begin_inset Flex Code
10259 \begin_layout Plain Layout
10266 \begin_inset Flex Code
10269 \begin_layout Plain Layout
10270 string="empty|plain|headings|fancy"
10275 ] The list of available page sty\SpecialChar \-
10277 \begin_inset Quotes eld
10281 \begin_inset Flex Code
10284 \begin_layout Plain Layout
10291 \begin_inset Quotes erd
10297 \begin_layout Description
10298 \begin_inset Flex Code
10301 \begin_layout Plain Layout
10308 \begin_inset Flex Code
10311 \begin_layout Plain Layout
10317 ] Some document class options, separated by a comma, that will be added
10318 to the optional part of the
10319 \begin_inset Flex Code
10322 \begin_layout Plain Layout
10333 \begin_layout Standard
10335 \begin_inset Flex Code
10338 \begin_layout Plain Layout
10344 section must end with
10345 \begin_inset Quotes eld
10349 \begin_inset Flex Code
10352 \begin_layout Plain Layout
10359 \begin_inset Quotes erd
10365 \begin_layout Subsection
10367 \begin_inset CommandInset label
10369 name "sub:Paragraph-Styles"
10376 \begin_layout Standard
10377 A paragraph style description looks like this:
10381 \begin_layout Plain Layout
10382 Note that this will either define a new style or modify an existing one.
10390 \begin_layout LyX-Code
10397 \begin_layout LyX-Code
10401 \begin_layout LyX-Code
10405 \begin_layout Standard
10406 where the following commands are allowed:
10409 \begin_layout Description
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10420 \begin_inset Flex Code
10423 \begin_layout Plain Layout
10428 , left, right, center
10433 ] Paragraph alignment.
10436 \begin_layout Description
10437 \begin_inset Flex Code
10440 \begin_layout Plain Layout
10447 \begin_inset Flex Code
10450 \begin_layout Plain Layout
10455 , left, right, center
10460 ] A comma separated list of permitted alignments.
10461 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10463 For example a right-aligned or centered enumeration isn't possible.)
10466 \begin_layout Description
10467 \begin_inset Flex Code
10470 \begin_layout Plain Layout
10477 \begin_inset Flex Code
10480 \begin_layout Plain Layout
10486 ] Defines argument number <int> of a command\SpecialChar \slash{}
10487 environment associated with
10489 This is useful for things like section headings, and only makes sense with
10491 Every (optional or required) argument of a command or environment -- except
10492 for the required argument that is associated with the content of the paragraph
10493 itself -- has a separate definition, where the number specifies the order
10495 The definition must end with
10496 \begin_inset Flex Code
10499 \begin_layout Plain Layout
10506 So a command with two optional arguments has:
10507 \begin_inset Separator parbreak
10514 \begin_layout Quote
10520 \begin_layout Quote
10526 \begin_layout Quote
10532 \begin_layout Quote
10538 \begin_layout Quote
10544 \begin_layout Quote
10550 \begin_layout Standard
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10561 definition, the following specifications are possible:
10564 \begin_layout Itemize
10565 \begin_inset Flex Code
10568 \begin_layout Plain Layout
10575 \begin_inset Flex Code
10578 \begin_layout Plain Layout
10584 The string that will appear both in the menu (to insert this argument)
10585 and on the argument inset button (unless you also specify a separate
10586 \begin_inset Flex Code
10589 \begin_layout Plain Layout
10596 For the menu, you can define an accelerator by appending the respective
10597 character to the string, divided by
10598 \begin_inset Quotes eld
10602 \begin_inset Quotes erd
10606 \begin_inset space \thinspace{}
10610 \begin_inset space \space{}
10614 \begin_inset Quotes eld
10618 \begin_inset Flex Code
10621 \begin_layout Plain Layout
10628 \begin_inset Quotes erd
10634 \begin_layout Itemize
10635 \begin_inset Flex Code
10638 \begin_layout Plain Layout
10645 \begin_inset Flex Code
10648 \begin_layout Plain Layout
10654 A separate string for the menu.
10655 You can define an accelerator by appending the respective character to
10656 the string, divided by
10657 \begin_inset Quotes eld
10661 \begin_inset Quotes erd
10665 \begin_inset space \thinspace{}
10669 \begin_inset space \space{}
10673 \begin_inset Quotes eld
10677 \begin_inset Flex Code
10680 \begin_layout Plain Layout
10687 \begin_inset Quotes erd
10691 This specification is optional.
10692 If it is not given the
10693 \begin_inset Flex Code
10696 \begin_layout Plain Layout
10702 will be used instead for the menu.
10705 \begin_layout Itemize
10706 \begin_inset Flex Code
10709 \begin_layout Plain Layout
10716 \begin_inset Flex Code
10719 \begin_layout Plain Layout
10725 A longer explanatory text that appears in the tooltip when hovering over
10726 the argument inset.
10729 \begin_layout Itemize
10730 \begin_inset Flex Code
10733 \begin_layout Plain Layout
10740 \begin_inset Flex Code
10743 \begin_layout Plain Layout
10752 \begin_inset space \thinspace{}
10756 \begin_inset Flex Code
10759 \begin_layout Plain Layout
10765 ] Declare if this is a mandatory (1) or an optional (0) argument.
10766 Mandatory arguments will be output empty if not given, while optional arguments
10767 will not be output at all.
10768 By default, mandatory arguments are delimited by
10769 \begin_inset Flex Code
10772 \begin_layout Plain Layout
10778 , while optional arguments are delimited by
10779 \begin_inset Flex Code
10782 \begin_layout Plain Layout
10791 \begin_layout Itemize
10792 \begin_inset Flex Code
10795 \begin_layout Plain Layout
10802 \begin_inset Flex Code
10805 \begin_layout Plain Layout
10811 defines another argument (by its number) which this argument requires to
10812 be output if it is itself output.
10814 \begin_inset space \thinspace{}
10817 g., in LaTeX commands, optional arguments often require previous optional
10818 arguments to be output (at least empty), as in
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10825 command[][argument]{text}
10831 This can be achieved by the statement
10832 \begin_inset Flex Code
10835 \begin_layout Plain Layout
10842 \begin_inset Flex Code
10845 \begin_layout Plain Layout
10854 \begin_layout Itemize
10855 \begin_inset Flex Code
10858 \begin_layout Plain Layout
10865 \begin_inset Flex Code
10868 \begin_layout Plain Layout
10874 defines a custom left delimiter (instead of
10875 \begin_inset Flex Code
10878 \begin_layout Plain Layout
10885 \begin_inset Flex Code
10888 \begin_layout Plain Layout
10895 A line break in the output can be indicated by
10896 \begin_inset Flex Code
10899 \begin_layout Plain Layout
10908 \begin_layout Itemize
10909 \begin_inset Flex Code
10912 \begin_layout Plain Layout
10919 \begin_inset Flex Code
10922 \begin_layout Plain Layout
10928 defines a custom right delimiter (instead of
10929 \begin_inset Flex Code
10932 \begin_layout Plain Layout
10939 \begin_inset Flex Code
10942 \begin_layout Plain Layout
10949 A line break in the output can be indicated by
10950 \begin_inset Flex Code
10953 \begin_layout Plain Layout
10962 \begin_layout Itemize
10963 \begin_inset Flex Code
10966 \begin_layout Plain Layout
10973 \begin_inset Flex Code
10976 \begin_layout Plain Layout
10982 defines an argument that is inserted if and only if no user-specified arguments
10984 \begin_inset space \thinspace{}
10988 \begin_inset space \space{}
10991 if no argument inset has been inserted (note that also an empty argument
10992 inset omits the DefaultArg).
10993 Multiple arguments need to be separated by comma.
10996 \begin_layout Itemize
10997 \begin_inset Flex Code
11000 \begin_layout Plain Layout
11007 \begin_inset Flex Code
11010 \begin_layout Plain Layout
11016 defines an argument that is inserted in any case (alone or in addition
11017 to user-specified arguments).
11018 Multiple arguments need to be separated by comma.
11021 \begin_layout Itemize
11022 \begin_inset Flex Code
11025 \begin_layout Plain Layout
11031 The font used for the argument content, see
11032 \begin_inset CommandInset ref
11034 reference "sub:Font-description"
11041 \begin_layout Itemize
11042 \begin_inset Flex Code
11045 \begin_layout Plain Layout
11051 The font used for the label; see
11052 \begin_inset CommandInset ref
11054 reference "sub:Font-description"
11061 \begin_layout Itemize
11062 \begin_inset Flex Code
11065 \begin_layout Plain Layout
11072 \begin_inset Flex Code
11075 \begin_layout Plain Layout
11080 , Minimalistic, Conglomerate
11085 ] describes the rendering style used for the inset's frame and buttons.
11088 \begin_layout Itemize
11089 \begin_inset Flex Code
11092 \begin_layout Plain Layout
11099 \begin_inset Flex Code
11102 \begin_layout Plain Layout
11109 \begin_inset Flex Code
11112 \begin_layout Plain Layout
11118 , this argument is automatically inserted when the respective style is selected.
11119 Currently, only one argument per style\SpecialChar \slash{}
11120 layout can be automatically inserted.
11123 \begin_layout Standard
11124 By default, the text entered in the LyX workarea in the respective layout
11125 is the last (mandatory) argument of a command if the
11126 \begin_inset Flex Code
11129 \begin_layout Plain Layout
11136 \begin_inset Flex Code
11139 \begin_layout Plain Layout
11146 However, arguments with the prefix
11147 \begin_inset Flex Code
11150 \begin_layout Plain Layout
11156 are output after this workarea argument.
11157 Note that post-argument numbering restarts at 1, so the first argument
11158 following the workarea argument is
11159 \begin_inset Flex Code
11162 \begin_layout Plain Layout
11169 Post-arguments are ignored in any other
11170 \begin_inset Flex Code
11173 \begin_layout Plain Layout
11180 \begin_inset Flex Code
11183 \begin_layout Plain Layout
11192 \begin_layout Standard
11194 \begin_inset Flex Code
11197 \begin_layout Plain Layout
11206 \begin_inset Flex Code
11209 \begin_layout Plain Layout
11218 \begin_inset Flex Code
11221 \begin_layout Plain Layout
11227 followed by the number (e.
11228 \begin_inset space \thinspace{}
11232 \begin_inset space \space{}
11236 \begin_inset Flex Code
11239 \begin_layout Plain Layout
11249 \begin_layout Description
11250 \begin_inset Flex Code
11253 \begin_layout Plain Layout
11259 Note that this will completely override any prior
11260 \begin_inset Flex Code
11263 \begin_layout Plain Layout
11269 declaration for this style.
11271 \begin_inset Quotes eld
11275 \begin_inset Flex Code
11278 \begin_layout Plain Layout
11285 \begin_inset Quotes erd
11290 \begin_inset CommandInset ref
11292 reference "sub:I18n"
11296 for details on its use.
11299 \begin_layout Description
11300 \begin_inset Flex Code
11303 \begin_layout Plain Layout
11310 \begin_inset Flex Code
11313 \begin_layout Plain Layout
11323 \begin_layout Plain Layout
11324 Note that a `float' here is a real number, such as: 1.5.
11329 The vertical space with which the last of a chain of paragraphs with this
11330 style is separated from the following paragraph.
11331 If the next paragraph has another style, the separations are not simply
11332 added, but the maximum is taken.
11335 \begin_layout Description
11336 \begin_inset Flex Code
11339 \begin_layout Plain Layout
11346 \begin_inset Flex Code
11349 \begin_layout Plain Layout
11355 ] The category for this style.
11356 This is used to group related styles in the style combobox on the toolbar.
11357 Any string can be used, but you may want to use existing categories with
11362 \begin_layout Description
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11372 Depth of XML command.
11373 Used only with XML-type formats.
11376 \begin_layout Description
11377 \begin_inset Flex Code
11380 \begin_layout Plain Layout
11387 \begin_inset Flex Code
11390 \begin_layout Plain Layout
11396 ] Copies all the features of an existing style into the current one.
11400 \begin_layout Description
11401 \begin_inset Flex Code
11404 \begin_layout Plain Layout
11411 \begin_inset Flex Code
11414 \begin_layout Plain Layout
11420 ] The name of a style whose preamble should be output
11425 This allows to ensure some ordering of the preamble snippets when macros
11426 definitions depend on one another.
11430 \begin_layout Plain Layout
11431 Note that, besides that functionality, there is no way to ensure any ordering
11433 The ordering that you see in a given version of LyX may change without
11434 warning in later versions.
11442 \begin_layout Description
11443 \begin_inset Flex Code
11446 \begin_layout Plain Layout
11453 \begin_inset Flex Code
11456 \begin_layout Plain Layout
11461 , Box, Filled_Box, Static
11466 ] The type of label that stands at the end of the paragraph (or sequence
11468 \begin_inset Flex Code
11471 \begin_layout Plain Layout
11478 \begin_inset Newline newline
11482 \begin_inset Flex Code
11485 \begin_layout Plain Layout
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11502 \begin_inset Flex Code
11505 \begin_layout Plain Layout
11513 \begin_inset Flex Code
11516 \begin_layout Plain Layout
11523 \begin_inset Quotes eld
11527 \begin_inset Quotes erd
11531 \begin_inset Flex Code
11534 \begin_layout Plain Layout
11541 \begin_inset space \space{}
11545 \begin_inset Flex Code
11548 \begin_layout Plain Layout
11554 ) is a white (resp.
11555 \begin_inset space ~
11558 black) square suitable for end of proof markers,
11559 \begin_inset Flex Code
11562 \begin_layout Plain Layout
11568 is an explicit text string.
11571 \begin_layout Description
11572 \begin_inset Flex Code
11575 \begin_layout Plain Layout
11582 \begin_inset Flex Code
11585 \begin_layout Plain Layout
11591 ] The string used for a label with a
11592 \begin_inset Flex Code
11595 \begin_layout Plain Layout
11602 \begin_inset Newline newline
11606 \begin_inset Flex Code
11609 \begin_layout Plain Layout
11619 \begin_layout Description
11620 \begin_inset Flex Code
11623 \begin_layout Plain Layout
11629 The font used for both the text body
11635 \begin_inset CommandInset ref
11637 reference "sub:Font-description"
11642 Note that defining this font automatically defines the
11643 \begin_inset Flex Code
11646 \begin_layout Plain Layout
11653 So you should define this one first if you also want to define
11654 \begin_inset Flex Code
11657 \begin_layout Plain Layout
11666 \begin_layout Description
11667 \begin_inset Flex Code
11670 \begin_layout Plain Layout
11677 \begin_inset Flex Code
11680 \begin_layout Plain Layout
11686 ] Used for backporting new styles to stable LyX versions.
11687 The first stable version that supports this tag is LyX 2.1.0.
11688 The argument is a number which may either be 0, -1 or any value greater
11691 \begin_inset Flex Code
11694 \begin_layout Plain Layout
11700 flag of a style is greater than zero, it will always be written to the
11702 If a .lyx file is read, the style definitions from the document header are
11703 added to the document class.
11704 Therefore even older LyX versions can handle the style.
11706 \begin_inset Flex Code
11709 \begin_layout Plain Layout
11715 is a version number: If the style is read, and the version number is less
11716 than the version number of the already existing style in the document class,
11717 the new style is ignored.
11718 If the version number is greater, the new style replaces the existing style.
11719 A value of -1 means an infinite version number, i.
11720 \begin_inset space \thinspace{}
11724 \begin_inset space \space{}
11727 the style is always used.
11730 \begin_layout Description
11731 \begin_inset Flex Code
11734 \begin_layout Plain Layout
11741 \begin_inset Flex Code
11744 \begin_layout Plain Layout
11753 \begin_inset space \thinspace{}
11757 \begin_inset Flex Code
11760 \begin_layout Plain Layout
11766 ] Usually LyX does not allow you to insert more than one space between words,
11767 since a space is considered as the separation between two words, not a
11768 character or symbol of its own.
11769 This is a very fine thing but sometimes annoying, for example, when typing
11770 program code or plain LaTeX code.
11772 \begin_inset Flex Code
11775 \begin_layout Plain Layout
11782 Note that LyX will create protected blanks for the additional blanks when
11783 in another mode than LaTeX-mode.
11786 \begin_layout Description
11787 \begin_inset Flex Code
11790 \begin_layout Plain Layout
11796 These tags are used with XHTML output.
11798 \begin_inset CommandInset ref
11800 reference "sub:Paragraph-Style-XHTML"
11807 \begin_layout Description
11808 \begin_inset Flex Code
11811 \begin_layout Plain Layout
11817 [FIXME] (Used only with XML-type formats.)
11820 \begin_layout Description
11821 \begin_inset Flex Code
11824 \begin_layout Plain Layout
11831 \begin_inset Flex Code
11834 \begin_layout Plain Layout
11843 \begin_inset space \thinspace{}
11847 \begin_inset Flex Code
11850 \begin_layout Plain Layout
11857 \begin_inset Flex Code
11860 \begin_layout Plain Layout
11866 , marks the style as to be included in the document preamble and not in
11868 This is useful for document classes that want such information as the title
11869 and author to appear in the preamble.
11870 Note that this works only for styles for which the
11871 \begin_inset Flex Code
11874 \begin_layout Plain Layout
11881 \begin_inset Flex Code
11884 \begin_layout Plain Layout
11891 \begin_inset Flex Code
11894 \begin_layout Plain Layout
11903 \begin_layout Description
11904 \begin_inset Flex Code
11907 \begin_layout Plain Layout
11914 \begin_inset Flex Code
11917 \begin_layout Plain Layout
11926 \begin_inset space \thinspace{}
11930 \begin_inset Flex Code
11933 \begin_layout Plain Layout
11940 \begin_inset Flex Code
11943 \begin_layout Plain Layout
11949 , marks the style as being part of a title block (see also the
11950 \begin_inset Flex Code
11953 \begin_layout Plain Layout
11960 \begin_inset Flex Code
11963 \begin_layout Plain Layout
11972 \begin_layout Description
11973 \begin_inset Flex Code
11976 \begin_layout Plain Layout
11983 \begin_inset Flex Code
11986 \begin_layout Plain Layout
11992 ] The LaTeX command sequence declaring an item in a list.
11993 The command is to be defined without the preceding backslash (the default
11995 \begin_inset Quotes eld
11999 \begin_inset Quotes erd
12003 \begin_inset Flex Code
12006 \begin_layout Plain Layout
12014 in the LaTeX output).
12017 \begin_layout Description
12018 \begin_inset Flex Code
12021 \begin_layout Plain Layout
12028 \begin_inset Flex Code
12031 \begin_layout Plain Layout
12037 ] This provides extra space between paragraphs that have the same style.
12038 If you put other styles into an environment, each is separated with the
12040 \begin_inset Flex Code
12043 \begin_layout Plain Layout
12050 But the whole items of the environment are additionally separated with
12052 \begin_inset Flex Code
12055 \begin_layout Plain Layout
12062 Note that this is a
12067 \begin_layout Description
12068 \begin_inset Flex Code
12071 \begin_layout Plain Layout
12077 [FIXME] (Used only with XML-type formats.)
12080 \begin_layout Description
12081 \begin_inset Flex Code
12084 \begin_layout Plain Layout
12091 \begin_inset Flex Code
12094 \begin_layout Plain Layout
12103 \begin_inset space \thinspace{}
12107 \begin_inset Flex Code
12110 \begin_layout Plain Layout
12116 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12117 lead to empty LaTeX output.
12118 There are some cases where this could be desirable however: in a letter
12119 template, the required fields can be provided as empty fields, so that
12120 people do not forget them; in some special classes, a style can be used
12121 as some kind of break, which does not contain actual text.
12124 \begin_layout Description
12125 \begin_inset Flex Code
12128 \begin_layout Plain Layout
12135 \begin_inset Flex Code
12138 \begin_layout Plain Layout
12144 ] The vertical space between the label and the text body.
12145 Only used for labels that are above the text body (
12146 \begin_inset Flex Code
12149 \begin_layout Plain Layout
12156 \begin_inset Newline newline
12160 \begin_inset Flex Code
12163 \begin_layout Plain Layout
12164 Centered_Top_Environment
12172 \begin_layout Description
12173 \begin_inset Flex Code
12176 \begin_layout Plain Layout
12183 \begin_inset Flex Code
12186 \begin_layout Plain Layout
12192 ] The name of the counter for automatic numbering.
12193 In order to have the counter appear with your label, you will need to reference
12195 \begin_inset Flex Code
12198 \begin_layout Plain Layout
12207 This will work with
12208 \begin_inset Flex Code
12211 \begin_layout Plain Layout
12218 \begin_inset Flex Code
12221 \begin_layout Plain Layout
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 \begin_inset Newline newline
12256 \begin_inset Flex Code
12259 \begin_layout Plain Layout
12266 \begin_inset Flex Code
12269 \begin_layout Plain Layout
12275 , though this case is a bit complicated.
12276 Suppose you declare
12277 \begin_inset Quotes eld
12281 \begin_inset Flex Code
12284 \begin_layout Plain Layout
12285 LabelCounter myenum
12291 \begin_inset Quotes erd
12295 Then the actual counters used are
12296 \begin_inset Flex Code
12299 \begin_layout Plain Layout
12306 \begin_inset Flex Code
12309 \begin_layout Plain Layout
12316 \begin_inset Flex Code
12319 \begin_layout Plain Layout
12326 \begin_inset Flex Code
12329 \begin_layout Plain Layout
12335 , much as in LaTeX.
12336 These counters must all be declared separately.
12337 \begin_inset Newline newline
12341 \begin_inset CommandInset ref
12343 reference "sub:Counters"
12347 for details on counters.
12350 \begin_layout Description
12351 \begin_inset Flex Code
12354 \begin_layout Plain Layout
12360 The font used for the label.
12362 \begin_inset CommandInset ref
12364 reference "sub:Font-description"
12371 \begin_layout Description
12372 \begin_inset Flex Code
12375 \begin_layout Plain Layout
12382 \begin_inset Flex Code
12385 \begin_layout Plain Layout
12391 ] Text that indicates how far a label should be indented.
12394 \begin_layout Description
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12405 \begin_inset Flex Code
12408 \begin_layout Plain Layout
12414 ] Text that indicates the amount of horizontal space between the label and
12416 Only used for labels that are not above the text body.
12419 \begin_layout Description
12420 \begin_inset Flex Code
12423 \begin_layout Plain Layout
12430 \begin_inset Flex Code
12433 \begin_layout Plain Layout
12439 ] The string used for the label.
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12450 is set, this string can be contain the special formatting commands described
12452 \begin_inset CommandInset ref
12454 reference "sub:Counters"
12461 \begin_layout Description
12462 \begin_inset Flex Code
12465 \begin_layout Plain Layout
12466 LabelStringAppendix
12472 \begin_inset Flex Code
12475 \begin_layout Plain Layout
12481 ] This is used inside the appendix instead of
12482 \begin_inset Newline newline
12486 \begin_inset Flex Code
12489 \begin_layout Plain Layout
12497 \begin_inset Flex Code
12500 \begin_layout Plain Layout
12507 \begin_inset Newline newline
12511 \begin_inset Flex Code
12514 \begin_layout Plain Layout
12515 LabelStringAppendix
12523 \begin_layout Description
12524 \begin_inset Flex Code
12527 \begin_layout Plain Layout
12533 [FIXME] (Used only with XML-type formats.)
12536 \begin_layout Description
12537 \begin_inset Flex Code
12540 \begin_layout Plain Layout
12547 \begin_inset Flex Code
12550 \begin_layout Plain Layout
12555 , Manual, Static, Above,
12556 \begin_inset Newline newline
12559 Centered, Sensitive, Enumerate,
12560 \begin_inset Newline newline
12563 Itemize, Bibliography
12569 \begin_inset Separator parbreak
12576 \begin_layout Description
12577 \begin_inset Flex Code
12580 \begin_layout Plain Layout
12586 means the label is the very first word (up to the first real blank).
12587 Use protected spaces if you want more than one word as the label.
12591 \begin_layout Description
12592 \begin_inset Flex Code
12595 \begin_layout Plain Layout
12601 means the label is simply what is declared as
12602 \begin_inset Flex Code
12605 \begin_layout Plain Layout
12612 This will be displayed
12613 \begin_inset Quotes eld
12617 \begin_inset Quotes erd
12620 , at the beginning of the paragraph.
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12641 , then it will be displayed only in the first paragraph of any sequence
12642 of paragraphs with the same
12643 \begin_inset Flex Code
12646 \begin_layout Plain Layout
12655 \begin_layout Description
12656 \begin_inset Flex Code
12659 \begin_layout Plain Layout
12666 \begin_inset space ~
12670 \begin_inset space ~
12674 \begin_inset Flex Code
12677 \begin_layout Plain Layout
12683 are special cases of
12684 \begin_inset Flex Code
12687 \begin_layout Plain Layout
12694 The label will be printed above the paragraph either at the beginning of
12695 the line or centered.
12698 \begin_layout Description
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12708 is a special case for the caption-labels
12709 \begin_inset Quotes eld
12713 \begin_inset Quotes erd
12717 \begin_inset Quotes eld
12721 \begin_inset Quotes erd
12725 \begin_inset Newline newline
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12738 means the (hardcoded) label string depends on the kind of float: It is
12739 hardcoded to be `FloatType N', where N is the value of the counter associated
12741 For the case that a caption is inserted outside of a float the
12742 \begin_inset Flex Code
12745 \begin_layout Plain Layout
12752 \begin_inset Quotes eld
12756 \begin_inset Quotes erd
12762 \begin_layout Description
12763 \begin_inset Flex Code
12766 \begin_layout Plain Layout
12772 produces the usual sort of enumeration labels.
12773 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12774 small Roman numerals, and uppercase letters for the four possible depths.
12777 \begin_layout Description
12778 \begin_inset Flex Code
12781 \begin_layout Plain Layout
12787 produces various bullets at the different levels.
12788 It is also hardcoded.
12791 \begin_layout Description
12792 \begin_inset Flex Code
12795 \begin_layout Plain Layout
12801 should be used only with
12802 \begin_inset Flex Code
12805 \begin_layout Plain Layout
12806 LatexType BibEnvironment
12815 \begin_layout Description
12816 \begin_inset Flex Code
12819 \begin_layout Plain Layout
12825 Note that this will completely override any prior
12826 \begin_inset Flex Code
12829 \begin_layout Plain Layout
12835 declaration for this style.
12837 \begin_inset Quotes eld
12841 \begin_inset Flex Code
12844 \begin_layout Plain Layout
12851 \begin_inset Quotes erd
12856 \begin_inset CommandInset ref
12858 reference "sub:I18n"
12862 for details on its use.
12865 \begin_layout Description
12866 \begin_inset Flex Code
12869 \begin_layout Plain Layout
12876 \begin_inset Flex Code
12879 \begin_layout Plain Layout
12885 ] The name of the corresponding LaTeX stuff.
12886 Either the environment or command name.
12889 \begin_layout Description
12890 \begin_inset Flex Code
12893 \begin_layout Plain Layout
12900 \begin_inset Flex Code
12903 \begin_layout Plain Layout
12909 ] An optional parameter for the corresponding
12910 \begin_inset Flex Code
12913 \begin_layout Plain Layout
12920 This parameter cannot be changed from within LyX (use
12921 \begin_inset Flex Code
12924 \begin_layout Plain Layout
12930 for customizable parameters).
12931 This will be output as is after all LaTeX
12932 \begin_inset Flex Code
12935 \begin_layout Plain Layout
12944 \begin_layout Description
12945 \begin_inset Flex Code
12948 \begin_layout Plain Layout
12955 \begin_inset Flex Code
12958 \begin_layout Plain Layout
12963 , Command, Environment, Item_Environment,
12964 \begin_inset Newline newline
12967 List_Environment, Bib_Environment
12972 ] How the style should be translated into LaTeX.
12976 \begin_layout Plain Layout
12977 \begin_inset Flex Code
12980 \begin_layout Plain Layout
12986 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12987 Visit the SGML class files for specific examples.
12993 \begin_inset Separator parbreak
13000 \begin_layout Description
13001 \begin_inset Flex Code
13004 \begin_layout Plain Layout
13010 means nothing special.
13013 \begin_layout Description
13014 \begin_inset Flex Code
13017 \begin_layout Plain Layout
13024 \begin_inset Flex Code
13027 \begin_layout Plain Layout
13034 {\SpecialChar \ldots{}
13043 \begin_layout Description
13044 \begin_inset Flex Code
13047 \begin_layout Plain Layout
13054 \begin_inset Flex Code
13057 \begin_layout Plain Layout
13064 }\SpecialChar \ldots{}
13080 \begin_layout Description
13081 \begin_inset Flex Code
13084 \begin_layout Plain Layout
13091 \begin_inset Flex Code
13094 \begin_layout Plain Layout
13101 \begin_inset Flex Code
13104 \begin_layout Plain Layout
13112 is generated for each paragraph of this environment.
13116 \begin_layout Description
13117 \begin_inset Flex Code
13120 \begin_layout Plain Layout
13127 \begin_inset Flex Code
13130 \begin_layout Plain Layout
13137 \begin_inset Newline newline
13141 \begin_inset Flex Code
13144 \begin_layout Plain Layout
13150 is passed as an argument to the environment.
13151 \begin_inset Newline newline
13155 \begin_inset Flex Code
13158 \begin_layout Plain Layout
13164 can be defined in the
13165 \begin_inset Flex MenuItem
13168 \begin_layout Plain Layout
13169 Edit\SpecialChar \menuseparator
13171 \begin_inset space ~
13182 \begin_layout Description
13183 \begin_inset Flex Code
13186 \begin_layout Plain Layout
13193 \begin_inset Flex Code
13196 \begin_layout Plain Layout
13202 but adds additionally the necessary mandatory argument (the longest label)
13203 to the begin statement of the bibliography environment:
13204 \begin_inset Newline newline
13208 \begin_inset Flex Code
13211 \begin_layout Plain Layout
13214 begin{thebibliography}{99}
13219 It is therefore only useful for bibliography environments.
13220 The default longest label
13221 \begin_inset Quotes eld
13225 \begin_inset Quotes erd
13228 can be changed by the user in the paragraph settings of a bibliography
13232 \begin_layout Standard
13233 Putting the last few things together, the LaTeX output will be either:
13236 \begin_layout LyX-Code
13239 LatexName[LatexParam]{\SpecialChar \ldots{}
13243 \begin_layout Standard
13247 \begin_layout LyX-Code
13250 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13256 \begin_layout Standard
13257 depending upon the LaTeX type.
13261 \begin_layout Description
13262 \begin_inset Flex Code
13265 \begin_layout Plain Layout
13272 \begin_inset Flex Code
13275 \begin_layout Plain Layout
13281 ] A string that is put at the beginning of the style content.
13282 A line break in the output can be indicated by
13283 \begin_inset Flex Code
13286 \begin_layout Plain Layout
13295 \begin_layout Description
13296 \begin_inset Flex Code
13299 \begin_layout Plain Layout
13306 \begin_inset Flex Code
13309 \begin_layout Plain Layout
13315 ] If you put styles into environments, the different
13316 \begin_inset Flex Code
13319 \begin_layout Plain Layout
13325 are not simply added, but added with a factor
13326 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13330 Note that this parameter is also used when
13331 \begin_inset Flex Code
13334 \begin_layout Plain Layout
13341 \begin_inset Flex Code
13344 \begin_layout Plain Layout
13351 \begin_inset Flex Code
13354 \begin_layout Plain Layout
13361 Then it is added to the manual or dynamic margin.
13362 \begin_inset Newline newline
13366 \begin_inset Quotes eld
13370 \begin_inset Flex Code
13373 \begin_layout Plain Layout
13380 \begin_inset Quotes erd
13383 means that the paragraph is indented with the width of
13384 \begin_inset Quotes eld
13388 \begin_inset Flex Code
13391 \begin_layout Plain Layout
13398 \begin_inset Quotes erd
13401 in the normal font.
13402 You can get a negative width by prefixing the string with
13403 \begin_inset Quotes eld
13407 \begin_inset Flex Code
13410 \begin_layout Plain Layout
13417 \begin_inset Quotes erd
13421 This way was chosen so that the look is the same with each used screen
13425 \begin_layout Description
13426 \begin_inset Flex Code
13429 \begin_layout Plain Layout
13436 \begin_inset Flex Code
13439 \begin_layout Plain Layout
13444 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13450 \begin_inset Newline newline
13453 The kind of margin that the style has on the left side.
13454 \begin_inset Separator parbreak
13461 \begin_layout Description
13462 \begin_inset Flex Code
13465 \begin_layout Plain Layout
13471 just means a fixed margin.
13474 \begin_layout Description
13475 \begin_inset Flex Code
13478 \begin_layout Plain Layout
13484 means that the left margin depends on the string entered in the
13485 \begin_inset Flex MenuItem
13488 \begin_layout Plain Layout
13489 Edit\SpecialChar \menuseparator
13491 \begin_inset space ~
13500 This is used to typeset nice lists without tabulators.
13503 \begin_layout Description
13504 \begin_inset Flex Code
13507 \begin_layout Plain Layout
13513 means that the margin depends on the size of the label.
13514 This is used for automatic enumerated headlines.
13515 It is obvious that the headline
13516 \begin_inset Quotes eld
13519 5.4.3.2.1 Very long headline
13520 \begin_inset Quotes erd
13523 must have a wider left margin (as wide as
13524 \begin_inset Quotes eld
13528 \begin_inset Quotes erd
13531 plus the space) than
13532 \begin_inset Quotes eld
13535 3.2 Very long headline
13536 \begin_inset Quotes erd
13540 \begin_inset Quotes eld
13544 \begin_inset Quotes erd
13547 are not able to do this.
13550 \begin_layout Description
13551 \begin_inset Flex Code
13554 \begin_layout Plain Layout
13560 is similar, but only the very first row of the paragraph is dynamic, while
13561 the others are static; this is used, for example, for descriptions.
13564 \begin_layout Description
13565 \begin_inset Flex Code
13568 \begin_layout Plain Layout
13574 means the margin is chosen in a way that the longest row of this paragraph
13575 fits to the right margin.
13576 This is used to typeset an address on the right edge of the page.
13580 \begin_layout Description
13581 \begin_inset Flex Code
13584 \begin_layout Plain Layout
13591 \begin_inset Flex Code
13594 \begin_layout Plain Layout
13603 \begin_inset space \thinspace{}
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13616 ] Whether fragile commands in this style should be
13617 \begin_inset Flex Code
13620 \begin_layout Plain Layout
13633 whether this command should itself be protected.)
13636 \begin_layout Description
13637 \begin_inset Flex Code
13640 \begin_layout Plain Layout
13647 \begin_inset Flex Code
13650 \begin_layout Plain Layout
13657 \begin_inset space \thinspace{}
13661 \begin_inset Flex Code
13664 \begin_layout Plain Layout
13672 ] Whether newlines are translated into LaTeX newlines (
13673 \begin_inset Flex Code
13676 \begin_layout Plain Layout
13687 The translation can be switched off to allow more comfortable LaTeX editing
13691 \begin_layout Description
13692 \begin_inset Flex Code
13695 \begin_layout Plain Layout
13702 \begin_inset Flex Code
13705 \begin_layout Plain Layout
13714 \begin_inset space \thinspace{}
13718 \begin_inset Flex Code
13721 \begin_layout Plain Layout
13727 ] If set to true, and if
13728 \begin_inset Flex Code
13731 \begin_layout Plain Layout
13738 \begin_inset Flex Code
13741 \begin_layout Plain Layout
13747 ) paragraphs are being indented, then the indentation of such a paragraph
13748 following one of this type will be suppressed.
13749 (So this will not affect the display of non-default paragraphs.)
13752 \begin_layout Description
13753 \begin_inset Flex Code
13756 \begin_layout Plain Layout
13763 \begin_inset Flex Code
13766 \begin_layout Plain Layout
13772 ] Name of a style that has replaced this style.
13773 This is used to rename a style, while keeping backward compatibility.
13776 \begin_layout Description
13777 \begin_inset Flex Code
13780 \begin_layout Plain Layout
13787 \begin_inset Flex Code
13790 \begin_layout Plain Layout
13799 \begin_inset space \thinspace{}
13803 \begin_inset Flex Code
13806 \begin_layout Plain Layout
13812 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13813 output, but only by a line break; together with
13814 \begin_inset Flex Code
13817 \begin_layout Plain Layout
13823 , this allows to emulate a plain text editor (like the ERT inset).
13826 \begin_layout Description
13827 \begin_inset Flex Code
13830 \begin_layout Plain Layout
13837 \begin_inset Flex Code
13840 \begin_layout Plain Layout
13846 ] The indent of the very first line of a paragraph.
13848 \begin_inset Newline newline
13852 \begin_inset Flex Code
13855 \begin_layout Plain Layout
13861 will be fixed for a certain style.
13862 The exception is the default style, since the indentation for these paragraphs
13863 can be prohibited with
13864 \begin_inset Flex Code
13867 \begin_layout Plain Layout
13875 \begin_inset Flex Code
13878 \begin_layout Plain Layout
13884 style paragraphs inside environments use the
13885 \begin_inset Flex Code
13888 \begin_layout Plain Layout
13894 of the environment, not their native one.
13896 \begin_inset Flex Code
13899 \begin_layout Plain Layout
13905 paragraphs inside an enumeration are not indented.
13908 \begin_layout Description
13909 \begin_inset Flex Code
13912 \begin_layout Plain Layout
13919 \begin_inset Flex Code
13922 \begin_layout Plain Layout
13928 ] The vertical space between two paragraphs of this style.
13931 \begin_layout Description
13932 \begin_inset Flex Code
13935 \begin_layout Plain Layout
13942 \begin_inset Flex Code
13945 \begin_layout Plain Layout
13951 ] LyX allows the user to choose either
13952 \begin_inset Quotes eld
13956 \begin_inset Quotes erd
13960 \begin_inset Quotes eld
13964 \begin_inset Quotes erd
13967 to separate paragraphs.
13969 \begin_inset Quotes eld
13973 \begin_inset Quotes erd
13977 \begin_inset Flex Code
13980 \begin_layout Plain Layout
13988 \begin_inset Quotes eld
13992 \begin_inset Quotes erd
13996 \begin_inset Flex Code
13999 \begin_layout Plain Layout
14005 is ignored and all paragraphs are separated by the
14006 \begin_inset Flex Code
14009 \begin_layout Plain Layout
14016 The vertical space is calculated with
14017 \begin_inset Flex Code
14020 \begin_layout Plain Layout
14022 \begin_inset space ~
14031 \begin_inset Flex Code
14034 \begin_layout Plain Layout
14040 is the height of a row with the normal font.
14041 This way, the look stays the same with different screen fonts.
14044 \begin_layout Description
14045 \begin_inset Flex Code
14048 \begin_layout Plain Layout
14055 \begin_inset Flex Code
14058 \begin_layout Plain Layout
14067 \begin_inset space \thinspace{}
14071 \begin_inset Flex Code
14074 \begin_layout Plain Layout
14080 ] Whether the contents of this paragraph should be output in raw form, meaning
14081 without special translations that LaTeX would require.
14084 \begin_layout Description
14085 \begin_inset Flex Code
14088 \begin_layout Plain Layout
14094 Information to be included in the LaTeX preamble when this style is used.
14095 Used to define macros, load packages, etc., required by this particular
14098 \begin_inset Quotes eld
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14112 \begin_inset Quotes erd
14118 \begin_layout Description
14119 \begin_inset Flex Code
14122 \begin_layout Plain Layout
14129 \begin_inset Flex Code
14132 \begin_layout Plain Layout
14138 ] The prefix to use when creating labels referring to paragraphs of this
14140 This allows the use of formatted references.
14143 \begin_layout Description
14144 \begin_inset Flex Code
14147 \begin_layout Plain Layout
14154 \begin_inset Flex Code
14157 \begin_layout Plain Layout
14163 ] Whether the style requires the feature
14164 \begin_inset Flex Code
14167 \begin_layout Plain Layout
14174 See the description of
14175 \begin_inset Flex Code
14178 \begin_layout Plain Layout
14185 \begin_inset CommandInset ref
14187 reference "sub:General-text-class"
14191 ) for information on `features'.
14194 \begin_layout Description
14195 \begin_inset Flex Code
14198 \begin_layout Plain Layout
14205 \begin_inset Flex Code
14208 \begin_layout Plain Layout
14217 \begin_inset Flex Code
14220 \begin_layout Plain Layout
14226 ] Resets the LaTeX arguments of this style (as defined via the
14227 \begin_inset Flex Code
14230 \begin_layout Plain Layout
14237 This is useful if you have copied a style via
14238 \begin_inset Flex Code
14241 \begin_layout Plain Layout
14247 , but you do not want to inherit its (required and optional) arguments.
14250 \begin_layout Description
14251 \begin_inset Flex Code
14254 \begin_layout Plain Layout
14261 \begin_inset Flex Code
14264 \begin_layout Plain Layout
14270 ] A string that is put at the end of the layout content.
14271 A line break in the output can be indicated by
14272 \begin_inset Flex Code
14275 \begin_layout Plain Layout
14284 \begin_layout Description
14285 \begin_inset Flex Code
14288 \begin_layout Plain Layout
14295 \begin_inset Flex Code
14298 \begin_layout Plain Layout
14305 \begin_inset Flex Code
14308 \begin_layout Plain Layout
14317 \begin_layout Description
14318 \begin_inset Flex Code
14321 \begin_layout Plain Layout
14328 \begin_inset Flex Code
14331 \begin_layout Plain Layout
14340 \begin_inset Flex Code
14343 \begin_layout Plain Layout
14350 \begin_inset Flex Code
14353 \begin_layout Plain Layout
14360 \begin_inset Flex Code
14363 \begin_layout Plain Layout
14365 \begin_inset space ~
14373 ] This defines what the default spacing should be in the style.
14375 \begin_inset Flex Code
14378 \begin_layout Plain Layout
14385 \begin_inset Flex Code
14388 \begin_layout Plain Layout
14395 \begin_inset Flex Code
14398 \begin_layout Plain Layout
14404 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14405 If you specify the argument
14406 \begin_inset Flex Code
14409 \begin_layout Plain Layout
14415 , then you must also provide a value argument which will be the actual multiplie
14417 Note that, contrary to other parameters,
14418 \begin_inset Flex Code
14421 \begin_layout Plain Layout
14427 implies the generation of specific LaTeX code, using the LaTeX package
14431 \begin_inset Flex Code
14434 \begin_layout Plain Layout
14443 \begin_layout Description
14444 \begin_inset Flex Code
14447 \begin_layout Plain Layout
14454 \begin_inset Flex Code
14457 \begin_layout Plain Layout
14464 \begin_inset space \thinspace{}
14468 \begin_inset Flex Code
14471 \begin_layout Plain Layout
14479 ] Allow spell-checking paragraphs of this style.
14483 \begin_layout Description
14484 \begin_inset Flex Code
14487 \begin_layout Plain Layout
14493 The font used for the text body .
14495 \begin_inset CommandInset ref
14497 reference "sub:Font-description"
14504 \begin_layout Description
14505 \begin_inset Flex Code
14508 \begin_layout Plain Layout
14517 \begin_inset Flex Code
14520 \begin_layout Plain Layout
14530 The level of the style in the table of contents.
14531 This is used for automatic numbering of section headings.
14532 \change_inserted -712698321 1401363541
14536 \begin_layout Description
14538 \change_inserted -712698321 1401363906
14539 \begin_inset Flex Code
14542 \begin_layout Plain Layout
14544 \change_inserted -712698321 1401363547
14553 \begin_inset Flex Code
14556 \begin_layout Plain Layout
14558 \change_inserted -712698321 1401363664
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14576 \change_inserted -712698321 1401363669
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14590 \change_inserted -712698321 1401363675
14598 ] This tag determines whether the first line indentation of this paragraph
14599 can be toggled via the Paragraph settings dialog.
14603 \begin_inset Flex Code
14606 \begin_layout Plain Layout
14608 \change_inserted -712698321 1401363761
14618 is set, indentation can be toggled if the document settings use
14619 \begin_inset Quotes eld
14623 \begin_inset Quotes erd
14626 paragraph style, with
14627 \begin_inset Flex Code
14630 \begin_layout Plain Layout
14632 \change_inserted -712698321 1401363844
14638 , indentation can always be toggled, notwithstanding the document settings,
14640 \begin_inset Flex Code
14643 \begin_layout Plain Layout
14645 \change_inserted -712698321 1401363901
14651 , indentation can never be toggled.
14656 \begin_layout Description
14657 \begin_inset Flex Code
14660 \begin_layout Plain Layout
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14676 ] The vertical space with which the very first of a chain of paragraphs
14677 with this style is separated from the previous paragraph.
14678 If the previous paragraph has another style, the separations are not simply
14679 added, but the maximum is taken.
14682 \begin_layout Subsection
14683 \begin_inset CommandInset label
14689 Internationalization of Paragraph Styles
14692 \begin_layout Standard
14693 LyX has long supported internationalization of layout information, but,
14694 until version 2.0, this applied only to the user interface and not to, say,
14696 Thus, French authors were forced to resort to ugly hacks if they wanted
14701 1' instead of `Theorem 1'.
14702 Thanks to Georg Baum, that is no longer the case.
14705 \begin_layout Standard
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14716 defines text that is to appear in the typeset document, it may use
14717 \begin_inset Flex Code
14720 \begin_layout Plain Layout
14727 \begin_inset Flex Code
14730 \begin_layout Plain Layout
14736 to support non-English and even multi-language documents correctly.
14737 The following excerpt (from the
14738 \begin_inset Flex Code
14741 \begin_layout Plain Layout
14747 file) shows how this works:
14750 \begin_layout LyX-Code
14752 \begin_inset Separator parbreak
14759 \begin_layout LyX-Code
14762 theoremstyle{remark}
14765 \begin_layout LyX-Code
14768 newtheorem{claim}[thm]{
14775 \begin_layout LyX-Code
14779 \begin_layout LyX-Code
14783 \begin_layout LyX-Code
14788 claimname}{_(Claim)}
14791 \begin_layout LyX-Code
14795 \begin_layout LyX-Code
14799 \begin_layout LyX-Code
14808 claimname}{_(Claim)}}
14811 \begin_layout LyX-Code
14816 \begin_layout Standard
14817 In principle, any legal LaTeX may appear in the
14818 \begin_inset Flex Code
14821 \begin_layout Plain Layout
14828 \begin_inset Flex Code
14831 \begin_layout Plain Layout
14837 tags, but in practice they will typically look as they do here.
14838 The key to correct translation of the typeset text is the definition of
14840 \begin_inset Flex Code
14843 \begin_layout Plain Layout
14852 \begin_inset Flex Code
14855 \begin_layout Plain Layout
14867 \begin_layout Standard
14869 \begin_inset Flex Code
14872 \begin_layout Plain Layout
14878 tag provides for internationalization based upon the overall language of
14880 The contents of the tag will be included in the preamble, just as with
14882 \begin_inset Flex Code
14885 \begin_layout Plain Layout
14892 What makes it special is the use of the
14893 \begin_inset Quotes eld
14897 \begin_inset Quotes erd
14901 \begin_inset Flex Code
14904 \begin_layout Plain Layout
14910 , which will be replaced, when LyX produces LaTeX output, with the translation
14911 of its argument into the document language.
14914 \begin_layout Standard
14916 \begin_inset Flex Code
14919 \begin_layout Plain Layout
14925 tag is more complex, since it is meant to provide support for multi-language
14926 documents and so offers an interface to the
14927 \begin_inset Flex Code
14930 \begin_layout Plain Layout
14937 Its contents will be added to the preamble once for each language that
14938 appears in the document.
14939 In this case, the argument to
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14949 will be replaced with its translation into the language in question; the
14951 \begin_inset Flex Code
14954 \begin_layout Plain Layout
14960 is replaced by the language name (as used by the babel package).
14963 \begin_layout Standard
14964 A German document that also included a French section would thus have the
14965 following in the preamble:
14968 \begin_layout LyX-Code
14977 claimname}{Affirmation}}
14978 \begin_inset Newline newline
14989 claimname}{Behauptung}}
14990 \begin_inset Newline newline
14997 claimname}{Behauptung}
15000 \begin_layout Standard
15002 \begin_inset Flex Code
15005 \begin_layout Plain Layout
15011 will then conspire to produce the correct text in the output.
15014 \begin_layout Standard
15015 One important point to note here is that the translations are provided by
15016 LyX itself, through the file
15017 \begin_inset Flex Code
15020 \begin_layout Plain Layout
15027 This means, in effect, that
15028 \begin_inset Flex Code
15031 \begin_layout Plain Layout
15038 \begin_inset Flex Code
15041 \begin_layout Plain Layout
15047 are really only of use in layout files that are provided with LyX, since
15048 text entered in user-created layout files will not be seen by LyX's internation
15049 alization routines unless the
15050 \begin_inset Flex Code
15053 \begin_layout Plain Layout
15059 file is modified accordingly.
15060 That said, however, any layout created with the intention that it will
15061 be included with LyX should use these tags where appropriate.
15062 Please note that the paragraph style translations provided by LyX will
15063 never change with a minor update (e.
15064 \begin_inset space \thinspace{}
15068 \begin_inset space \space{}
15071 from version 2.1.x to 2.1.y).
15072 It is however quite likely that a major update (e.
15073 \begin_inset space \thinspace{}
15077 \begin_inset space \space{}
15080 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15083 \begin_layout Subsection
15085 \begin_inset CommandInset label
15094 \begin_layout Standard
15095 It is necessary to define the floats (
15096 \begin_inset Flex MenuItem
15099 \begin_layout Plain Layout
15106 \begin_inset Flex MenuItem
15109 \begin_layout Plain Layout
15115 , \SpecialChar \ldots{}
15116 ) in the text class itself.
15117 Standard floats are included in the file
15118 \begin_inset Flex Code
15121 \begin_layout Plain Layout
15127 , so you may have to do no more than add
15130 \begin_layout LyX-Code
15131 Input stdfloats.inc
15134 \begin_layout Standard
15135 to your layout file.
15136 If you want to implement a text class that proposes some other float types
15137 (like the AGU class bundled with LyX), the information below will hopefully
15141 \begin_layout Description
15142 \begin_inset Flex Code
15145 \begin_layout Plain Layout
15152 \begin_inset Flex Code
15155 \begin_layout Plain Layout
15162 \begin_inset Quotes erd
15166 \begin_inset Quotes erd
15169 ] The file name extension of an auxiliary file for the list of figures (or
15171 LaTeX writes the captions to this file.
15174 \begin_layout Description
15175 \begin_inset Flex Code
15178 \begin_layout Plain Layout
15185 \begin_inset Flex Code
15188 \begin_layout Plain Layout
15195 \begin_inset Quotes erd
15199 \begin_inset Quotes erd
15202 ] The string that will be used in the menus and also for the caption.
15203 This is translated to the current language if babel is used.
15206 \begin_layout Description
15207 \begin_inset Flex Code
15210 \begin_layout Plain Layout
15216 These tags control the XHTML output.
15218 \begin_inset CommandInset ref
15220 reference "sec:Tags-for-XHTML"
15227 \begin_layout Description
15228 \begin_inset Flex Code
15231 \begin_layout Plain Layout
15240 \begin_inset Flex Code
15243 \begin_layout Plain Layout
15252 \begin_inset space \thinspace{}
15256 \begin_inset Flex Code
15259 \begin_layout Plain Layout
15265 ] Indicates whether the float is already defined in the document class or
15266 if instead the LaTeX package
15267 \begin_inset Flex Code
15270 \begin_layout Plain Layout
15276 needs to be loaded to define it on-the-fly.
15278 \begin_inset Flex Code
15281 \begin_layout Plain Layout
15288 \begin_inset Flex Code
15291 \begin_layout Plain Layout
15298 It should be set to
15299 \begin_inset Flex Code
15302 \begin_layout Plain Layout
15308 if the float is already defined by the LaTeX document class.
15311 \begin_layout Description
15312 \begin_inset Flex Code
15315 \begin_layout Plain Layout
15322 \begin_inset Flex Code
15325 \begin_layout Plain Layout
15332 \begin_inset Quotes erd
15336 \begin_inset Quotes erd
15339 ] The command used to generate a list of floats of this type; the leading
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15357 is false, since there is no standard way to generate this command.
15359 \begin_inset Flex Code
15362 \begin_layout Plain Layout
15368 is true, since in that case there is a standard way to define the command.
15371 \begin_layout Description
15372 \begin_inset Flex Code
15375 \begin_layout Plain Layout
15382 \begin_inset Flex Code
15385 \begin_layout Plain Layout
15392 \begin_inset Quotes erd
15396 \begin_inset Quotes erd
15399 ] A title for a list of floats of this kind (list of figures, tables, or
15401 It is used for the screen label within LyX, it is used by LaTeX for the
15402 title and it is used as the title in the XHTML output.
15403 It will be translated to the document language.
15406 \begin_layout Description
15407 \begin_inset Flex Code
15410 \begin_layout Plain Layout
15417 \begin_inset Flex Code
15420 \begin_layout Plain Layout
15427 \begin_inset Quotes erd
15431 \begin_inset Quotes erd
15434 ] This (optional) argument determines whether floats of this class will
15435 be numbered within some sectional unit of the document.
15437 \begin_inset Flex Code
15440 \begin_layout Plain Layout
15447 \begin_inset Quotes eld
15451 \begin_inset Flex Code
15454 \begin_layout Plain Layout
15461 \begin_inset Quotes erd
15464 , the floats will be numbered within chapters.
15468 \begin_layout Description
15469 \begin_inset Flex Code
15472 \begin_layout Plain Layout
15479 \begin_inset Flex Code
15482 \begin_layout Plain Layout
15489 \begin_inset Quotes erd
15493 \begin_inset Quotes erd
15496 ] The default placement for the given class of floats.
15497 The string should be as in standard LaTeX:
15498 \begin_inset Flex Code
15501 \begin_layout Plain Layout
15508 \begin_inset Flex Code
15511 \begin_layout Plain Layout
15518 \begin_inset Flex Code
15521 \begin_layout Plain Layout
15528 \begin_inset Flex Code
15531 \begin_layout Plain Layout
15537 for top, bottom, page, and here, respectively.
15541 \begin_layout Plain Layout
15542 Note that the order of these letters in the string is irrelevant, like in
15548 On top of that there is a new type,
15549 \begin_inset Flex Code
15552 \begin_layout Plain Layout
15558 , which does not really correspond to a float, since it means: put it
15559 \begin_inset Quotes eld
15563 \begin_inset Quotes erd
15567 Note however that the
15568 \begin_inset Flex Code
15571 \begin_layout Plain Layout
15577 specifier is special and, because of implementation details, cannot be
15578 used in non-built in float types.
15579 If you do not understand what this means, just use
15580 \begin_inset Quotes eld
15584 \begin_inset Flex Code
15587 \begin_layout Plain Layout
15594 \begin_inset Quotes erd
15600 \begin_layout Description
15601 \begin_inset Flex Code
15604 \begin_layout Plain Layout
15611 \begin_inset Flex Code
15614 \begin_layout Plain Layout
15620 ] The prefix to use when creating labels referring to floats of this type.
15621 This allows the use of formatted references.
15622 Note that you can remove any
15623 \begin_inset Flex Code
15626 \begin_layout Plain Layout
15632 set by a copied style by using the special value
15633 \begin_inset Quotes eld
15637 \begin_inset Quotes erd
15640 , which must be all caps.
15643 \begin_layout Description
15644 \begin_inset Flex Code
15647 \begin_layout Plain Layout
15654 \begin_inset Flex Code
15657 \begin_layout Plain Layout
15664 \begin_inset Quotes erd
15668 \begin_inset Quotes erd
15671 ] The style used when defining the float using
15672 \begin_inset Flex Code
15675 \begin_layout Plain Layout
15686 \begin_layout Description
15687 \begin_inset Flex Code
15690 \begin_layout Plain Layout
15697 \begin_inset Flex Code
15700 \begin_layout Plain Layout
15707 \begin_inset Quotes erd
15711 \begin_inset Quotes erd
15715 \begin_inset Quotes eld
15719 \begin_inset Quotes erd
15722 of the new class of floats, like program or algorithm.
15723 After the appropriate
15724 \begin_inset Flex Code
15727 \begin_layout Plain Layout
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15748 \begin_inset Flex Code
15751 \begin_layout Plain Layout
15762 \begin_layout Description
15763 \begin_inset Flex Code
15766 \begin_layout Plain Layout
15773 \begin_inset Flex Code
15776 \begin_layout Plain Layout
15783 \begin_inset space \thinspace{}
15787 \begin_inset Flex Code
15790 \begin_layout Plain Layout
15798 ] Specifies whether this float is defined using the LaTeX package
15799 \begin_inset Flex Code
15802 \begin_layout Plain Layout
15808 , either by the class file, another package or on-the-fly by LyX itself.
15811 \begin_layout Standard
15812 Note that defining a float with type
15813 \begin_inset Flex Code
15816 \begin_layout Plain Layout
15824 automatically defines the corresponding counter with name
15825 \begin_inset Flex Code
15828 \begin_layout Plain Layout
15839 \begin_layout Subsection
15840 Flex insets and InsetLayout
15841 \begin_inset CommandInset label
15843 name "sub:Flex-insets-and"
15850 \begin_layout Standard
15851 Flex insets come in three different kinds:
15854 \begin_layout Itemize
15856 \begin_inset Flex Code
15859 \begin_layout Plain Layout
15865 ): These define semantic markup corresponding to such LaTeX commands as
15867 \begin_inset Flex Code
15870 \begin_layout Plain Layout
15879 \begin_inset Flex Code
15882 \begin_layout Plain Layout
15893 \begin_layout Itemize
15895 \begin_inset Flex Code
15898 \begin_layout Plain Layout
15904 ): These can be used to define custom collapsible insets, similar to TeX
15905 code, footnote, and the like.
15906 An obvious example is an endnote inset, which is defined in the
15907 \begin_inset Flex Code
15910 \begin_layout Plain Layout
15919 \begin_layout Itemize
15921 \begin_inset Flex Code
15924 \begin_layout Plain Layout
15930 ): For use with DocBook classes.
15933 \begin_layout Standard
15934 Flex insets are defined using the
15935 \begin_inset Flex Code
15938 \begin_layout Plain Layout
15944 tag, which shall be explained in a moment.
15947 \begin_layout Standard
15949 \begin_inset Flex Code
15952 \begin_layout Plain Layout
15958 tag also serves another function: It can be used to customize the general
15959 layout of many different types of insets.
15961 \begin_inset Flex Code
15964 \begin_layout Plain Layout
15970 can be used to customize the layout parameters for footnotes, marginal
15971 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15972 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15976 \begin_layout Standard
15978 \begin_inset Flex Code
15981 \begin_layout Plain Layout
15987 definition must begin with a line of the form:
15990 \begin_layout LyX-Code
15994 \begin_layout Standard
15996 \begin_inset Flex Code
15999 \begin_layout Plain Layout
16005 indicates the inset whose layout is being defined, and here there are four
16009 \begin_layout Enumerate
16010 The layout for a pre-existing inset is being modified.
16011 In this case, can be
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16021 any one of the following:
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Flex Code
16035 \begin_layout Plain Layout
16042 \begin_inset Flex Code
16045 \begin_layout Plain Layout
16052 \begin_inset Flex Code
16055 \begin_layout Plain Layout
16062 \begin_inset Flex Code
16065 \begin_layout Plain Layout
16072 \begin_inset Flex Code
16075 \begin_layout Plain Layout
16082 \begin_inset Flex Code
16085 \begin_layout Plain Layout
16092 \begin_inset Flex Code
16095 \begin_layout Plain Layout
16102 \begin_inset Flex Code
16105 \begin_layout Plain Layout
16112 \begin_inset Flex Code
16115 \begin_layout Plain Layout
16122 \begin_inset Flex Code
16125 \begin_layout Plain Layout
16132 \begin_inset Flex Code
16135 \begin_layout Plain Layout
16142 \begin_inset Flex Code
16145 \begin_layout Plain Layout
16152 \begin_inset Flex Code
16155 \begin_layout Plain Layout
16162 \begin_inset Flex Code
16165 \begin_layout Plain Layout
16172 \begin_inset Flex Code
16175 \begin_layout Plain Layout
16182 \begin_inset Flex Code
16185 \begin_layout Plain Layout
16192 \begin_inset Flex Code
16195 \begin_layout Plain Layout
16202 \begin_inset Flex Code
16205 \begin_layout Plain Layout
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16224 \begin_layout Enumerate
16225 The layout for a Flex inset is being defined.
16227 \begin_inset Flex Code
16230 \begin_layout Plain Layout
16236 must be of the form
16237 \begin_inset Quotes eld
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16251 \begin_inset Quotes erd
16255 \begin_inset Flex Code
16258 \begin_layout Plain Layout
16264 may be be any valid identifier not used by a pre-existing Flex inset.
16265 The identifier may include spaces, but in that case the whole thing must
16266 be wrapped in quotes.
16267 Note that the definition of a flex inset
16272 \begin_inset Flex Code
16275 \begin_layout Plain Layout
16281 entry, declaring which type of inset it defines.
16284 \begin_layout Enumerate
16285 The layout for user specific branch is being defined.
16287 \begin_inset Flex Code
16290 \begin_layout Plain Layout
16296 must be of the form
16297 \begin_inset Quotes eld
16301 \begin_inset Flex Code
16304 \begin_layout Plain Layout
16311 \begin_inset Quotes erd
16315 \begin_inset Flex Code
16318 \begin_layout Plain Layout
16324 may be be any valid identifier of branch defined in user's document.
16325 The identifier may include spaces, but in that case the whole thing must
16326 be wrapped in quotes.
16327 The main purpose of this feature is to allow LaTeX wrapping around specific
16328 branches as user needs.
16331 \begin_layout Enumerate
16332 The layout of a user (or class) specific caption is being defined.
16334 \begin_inset Flex Code
16337 \begin_layout Plain Layout
16343 must be of the form
16344 \begin_inset Quotes eld
16348 \begin_inset Flex Code
16351 \begin_layout Plain Layout
16358 \begin_inset Quotes erd
16362 \begin_inset Flex Code
16365 \begin_layout Plain Layout
16371 specifies the name of the caption as it appears in the menu.
16372 Have a look at the standard caption (
16373 \begin_inset Flex Code
16376 \begin_layout Plain Layout
16382 ), the specific captions of the KOMA-Script classes (
16383 \begin_inset Flex Code
16386 \begin_layout Plain Layout
16393 \begin_inset Flex Code
16396 \begin_layout Plain Layout
16405 \begin_inset space ~
16411 \begin_inset Flex Code
16414 \begin_layout Plain Layout
16420 ) for applications.
16423 \begin_layout Standard
16425 \begin_inset Flex Code
16428 \begin_layout Plain Layout
16434 definition can contain the following entries:
16437 \begin_layout Description
16438 \begin_inset Flex Code
16441 \begin_layout Plain Layout
16448 \begin_inset Flex Code
16451 \begin_layout Plain Layout
16457 ] Defines argument number of a command\SpecialChar \slash{}
16458 environment associated with the current
16460 The definition must end with
16461 \begin_inset Flex Code
16464 \begin_layout Plain Layout
16472 \begin_inset CommandInset ref
16474 reference "sub:Paragraph-Styles"
16481 \begin_layout Description
16482 \begin_inset Flex Code
16485 \begin_layout Plain Layout
16491 Preamble for changing language commands; see
16492 \begin_inset CommandInset ref
16494 reference "sub:I18n"
16501 \begin_layout Description
16502 \begin_inset Flex Code
16505 \begin_layout Plain Layout
16512 \begin_inset Flex Code
16515 \begin_layout Plain Layout
16521 ] The color for the inset's background.
16523 \begin_inset CommandInset ref
16525 reference "chap:Names-of-colors"
16529 for a list of the available color names.
16532 \begin_layout Description
16533 \begin_inset Flex Code
16536 \begin_layout Plain Layout
16543 \begin_inset Flex Code
16546 \begin_layout Plain Layout
16555 \begin_inset space \thinspace{}
16559 \begin_inset Flex Code
16562 \begin_layout Plain Layout
16568 ] Whether to use the content of the inset as the label, when the inset is
16573 \begin_layout Description
16574 \begin_inset Flex Code
16577 \begin_layout Plain Layout
16584 \begin_inset Flex Code
16587 \begin_layout Plain Layout
16593 ] As with paragraph styles, see
16594 \begin_inset CommandInset ref
16596 reference "sub:Paragraph-Styles"
16601 Note that you need to specify the complete type, e.
16602 \begin_inset space \thinspace{}
16606 \begin_inset space ~
16610 \begin_inset Flex Code
16613 \begin_layout Plain Layout
16614 CopyStyle Flex:<name>
16622 \begin_layout Description
16623 \begin_inset Flex Code
16626 \begin_layout Plain Layout
16633 \begin_inset Flex Code
16636 \begin_layout Plain Layout
16645 \begin_inset space \thinspace{}
16649 \begin_inset Flex Code
16652 \begin_layout Plain Layout
16658 ] Indicates whether the user may employ the Paragraph Settings dialog to
16659 customize the paragraph.
16662 \begin_layout Description
16663 \begin_inset Flex Code
16666 \begin_layout Plain Layout
16673 \begin_inset Flex Code
16676 \begin_layout Plain Layout
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16693 \begin_inset Flex Code
16696 \begin_layout Plain Layout
16702 , describing the rendering style used for the inset's frame and buttons.
16703 Footnotes generally use
16704 \begin_inset Flex Code
16707 \begin_layout Plain Layout
16713 , ERT insets generally
16714 \begin_inset Flex Code
16717 \begin_layout Plain Layout
16723 , and character styles
16724 \begin_inset Flex Code
16727 \begin_layout Plain Layout
16736 \begin_layout Description
16737 \begin_inset Flex Code
16740 \begin_layout Plain Layout
16747 \begin_inset Flex Code
16750 \begin_layout Plain Layout
16759 \begin_inset space \thinspace{}
16765 \begin_inset Flex Code
16768 \begin_layout Plain Layout
16777 \begin_inset Flex Code
16780 \begin_layout Plain Layout
16787 \begin_inset Flex Code
16790 \begin_layout Plain Layout
16797 Indicates whether the environment will stand on its own in the output or
16798 will appear inline with the surrounding text.
16799 If set to false, it is supposed that the LaTeX environment ignores white
16800 space (including one newline character) after the
16801 \begin_inset Flex Code
16804 \begin_layout Plain Layout
16817 \begin_inset Flex Code
16820 \begin_layout Plain Layout
16836 \begin_layout Description
16837 \begin_inset Flex Code
16840 \begin_layout Plain Layout
16846 Required at the end of the
16847 \begin_inset Flex Code
16850 \begin_layout Plain Layout
16859 \begin_layout Description
16860 \begin_inset Flex Code
16863 \begin_layout Plain Layout
16869 The font used for both the text body
16875 \begin_inset CommandInset ref
16877 reference "sub:Font-description"
16882 Note that defining this font automatically defines the
16883 \begin_inset Flex Code
16886 \begin_layout Plain Layout
16892 to the same value, so define this first and define
16893 \begin_inset Flex Code
16896 \begin_layout Plain Layout
16902 later if you want them to be different.
16905 \begin_layout Description
16906 \begin_inset Flex Code
16909 \begin_layout Plain Layout
16910 ForceLocalFontSwitch
16916 \begin_inset Flex Code
16919 \begin_layout Plain Layout
16928 \begin_inset space \thinspace{}
16932 \begin_inset Flex Code
16935 \begin_layout Plain Layout
16941 ] When using babel, always use a local font switch (
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16953 ), never a global one (such as
16954 \begin_inset Flex Code
16957 \begin_layout Plain Layout
16968 \begin_layout Description
16969 \begin_inset Flex Code
16972 \begin_layout Plain Layout
16979 \begin_inset Flex Code
16982 \begin_layout Plain Layout
16991 \begin_inset space \thinspace{}
16995 \begin_inset Flex Code
16998 \begin_layout Plain Layout
17005 \begin_inset Quotes eld
17009 \begin_inset Quotes erd
17012 language, leading to Left-to-Right (Latin) output, e.
17013 \begin_inset space \thinspace{}
17017 \begin_inset space \space{}
17020 in TeX code or URL.
17022 \change_inserted -712698321 1417441977
17026 \begin_layout Description
17028 \change_inserted -712698321 1417442090
17029 \begin_inset Flex Code
17032 \begin_layout Plain Layout
17034 \change_inserted -712698321 1417441983
17041 \begin_inset Flex Code
17044 \begin_layout Plain Layout
17046 \change_inserted -712698321 1417441978
17055 \begin_inset space \thinspace{}
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17064 \change_inserted -712698321 1417441978
17070 ] Force a a line break in the LaTeX output before the inset starts and after
17072 This assures the inset itself is output on its own lines, for parsing purposes.
17077 \begin_layout Description
17078 \begin_inset Flex Code
17081 \begin_layout Plain Layout
17088 \begin_inset Flex Code
17091 \begin_layout Plain Layout
17100 \begin_inset space \thinspace{}
17104 \begin_inset Flex Code
17107 \begin_layout Plain Layout
17113 ] Indicates whether the
17114 \begin_inset Flex Code
17117 \begin_layout Plain Layout
17123 should be used or, instead, the user can change the paragraph style used
17128 \begin_layout Description
17129 \begin_inset Flex Code
17132 \begin_layout Plain Layout
17139 \begin_inset Flex Code
17142 \begin_layout Plain Layout
17151 \begin_inset space \thinspace{}
17155 \begin_inset Flex Code
17158 \begin_layout Plain Layout
17164 ] As with paragraph styles, see
17165 \begin_inset CommandInset ref
17167 reference "sub:Paragraph-Styles"
17174 \begin_layout Description
17175 \begin_inset Flex Code
17178 \begin_layout Plain Layout
17184 These tags control the XHTML output.
17186 \begin_inset CommandInset ref
17188 reference "sec:Tags-for-XHTML"
17195 \begin_layout Description
17196 \begin_inset Flex Code
17199 \begin_layout Plain Layout
17206 \begin_inset Flex Code
17209 \begin_layout Plain Layout
17218 \begin_inset space \thinspace{}
17222 \begin_inset Flex Code
17225 \begin_layout Plain Layout
17231 ] Whether to include the contents of this inset in the strings generated
17232 for the `Outline' pane.
17233 One would not, for example, want the content of a footnote in a section
17234 header to be included in the TOC displayed in the outline, but one would
17235 normally want the content of a character style displayed.
17236 Default is false: not to include.
17239 \begin_layout Description
17240 \begin_inset Flex Code
17243 \begin_layout Plain Layout
17252 \begin_inset Flex Code
17255 \begin_layout Plain Layout
17264 \begin_inset space \thinspace{}
17268 \begin_inset Flex Code
17271 \begin_layout Plain Layout
17277 ] As with paragraph styles, see
17278 \begin_inset CommandInset ref
17280 reference "sub:Paragraph-Styles"
17287 \begin_layout Description
17288 \begin_inset Flex Code
17291 \begin_layout Plain Layout
17297 The font used for the label.
17299 \begin_inset CommandInset ref
17301 reference "sub:Font-description"
17306 Note that this definition can never appear before
17307 \begin_inset Flex Code
17310 \begin_layout Plain Layout
17316 , lest it be ineffective.
17319 \begin_layout Description
17320 \begin_inset Flex Code
17323 \begin_layout Plain Layout
17330 \begin_inset Flex Code
17333 \begin_layout Plain Layout
17340 \begin_inset Quotes erd
17344 \begin_inset Quotes erd
17347 ] What will be displayed on the button or elsewhere as the inset label.
17349 \begin_inset Flex Code
17352 \begin_layout Plain Layout
17359 \begin_inset Flex Code
17362 \begin_layout Plain Layout
17368 ) modify this label on the fly.
17371 \begin_layout Description
17372 \begin_inset Flex Code
17375 \begin_layout Plain Layout
17381 Language dependent preamble; see
17382 \begin_inset CommandInset ref
17384 reference "sub:I18n"
17391 \begin_layout Description
17392 \begin_inset Flex Code
17395 \begin_layout Plain Layout
17402 \begin_inset Flex Code
17405 \begin_layout Plain Layout
17411 ] The name of the corresponding LaTeX stuff.
17412 Either the environment or command name.
17415 \begin_layout Description
17416 \begin_inset Flex Code
17419 \begin_layout Plain Layout
17426 \begin_inset Flex Code
17429 \begin_layout Plain Layout
17435 ] The optional parameter for the corresponding
17436 \begin_inset Flex Code
17439 \begin_layout Plain Layout
17445 stuff, including possible bracket pairs like
17446 \begin_inset Flex Code
17449 \begin_layout Plain Layout
17456 This parameter cannot be changed from within LyX (use
17457 \begin_inset Flex Code
17460 \begin_layout Plain Layout
17466 for customizable parameters).
17467 It will be output as is after all LaTeX
17468 \begin_inset Flex Code
17471 \begin_layout Plain Layout
17480 \begin_layout Description
17481 \begin_inset Flex Code
17484 \begin_layout Plain Layout
17491 \begin_inset Flex Code
17494 \begin_layout Plain Layout
17495 Command, Environment, None
17500 ] How the style should be translated into LaTeX.
17504 \begin_layout Plain Layout
17505 \begin_inset Flex Code
17508 \begin_layout Plain Layout
17514 is perhaps a bit misleading, since these rules apply to SGML classes too.
17515 Visit the SGML class files for specific examples.
17521 \begin_inset Separator parbreak
17528 \begin_layout Description
17529 \begin_inset Flex Code
17532 \begin_layout Plain Layout
17538 means nothing special
17541 \begin_layout Description
17542 \begin_inset Flex Code
17545 \begin_layout Plain Layout
17552 \begin_inset Flex Code
17555 \begin_layout Plain Layout
17562 {\SpecialChar \ldots{}
17571 \begin_layout Description
17572 \begin_inset Flex Code
17575 \begin_layout Plain Layout
17582 \begin_inset Flex Code
17585 \begin_layout Plain Layout
17592 }\SpecialChar \ldots{}
17607 \begin_layout Standard
17608 Putting the last few things together, the LaTeX output will be either:
17611 \begin_layout LyX-Code
17614 LatexName[LatexParam]{\SpecialChar \ldots{}
17618 \begin_layout Standard
17622 \begin_layout LyX-Code
17625 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17631 \begin_layout Standard
17632 depending upon the LaTeX type.
17636 \begin_layout Description
17637 \begin_inset Flex Code
17640 \begin_layout Plain Layout
17647 \begin_inset Flex Code
17650 \begin_layout Plain Layout
17656 ] A string that is put at the beginning of the layout content.
17657 A line break in the output can be indicated by
17658 \begin_inset Flex Code
17661 \begin_layout Plain Layout
17670 \begin_layout Description
17671 \begin_inset Flex Code
17674 \begin_layout Plain Layout
17681 \begin_inset Flex Code
17684 \begin_layout Plain Layout
17691 \begin_inset Flex Code
17694 \begin_layout Plain Layout
17701 \begin_inset Flex Code
17704 \begin_layout Plain Layout
17711 \begin_inset Flex Code
17714 \begin_layout Plain Layout
17720 (indicating a dummy definition ending definitions of charstyles, etc).
17721 This entry is required in and is only meaningful for Flex insets.
17722 Among other things, it determines on which menu this inset will appear.
17724 \begin_inset Flex Code
17727 \begin_layout Plain Layout
17734 \begin_inset Flex Code
17737 \begin_layout Plain Layout
17743 will automatically set
17744 \begin_inset Flex Code
17747 \begin_layout Plain Layout
17755 \begin_inset Flex Code
17758 \begin_layout Plain Layout
17764 can be set to true for
17765 \begin_inset Flex Code
17768 \begin_layout Plain Layout
17774 insets by setting it
17779 \begin_inset Flex Code
17782 \begin_layout Plain Layout
17791 \begin_layout Description
17792 \begin_inset Flex Code
17795 \begin_layout Plain Layout
17802 \begin_inset Flex Code
17805 \begin_layout Plain Layout
17814 \begin_inset space \thinspace{}
17818 \begin_inset Flex Code
17821 \begin_layout Plain Layout
17827 ] Whether multiple paragraphs are permitted in this inset.
17829 \begin_inset Flex Code
17832 \begin_layout Plain Layout
17838 to the same value and
17839 \begin_inset Flex Code
17842 \begin_layout Plain Layout
17848 to the opposite value.
17849 These can be reset to other values, if they are used
17854 \begin_inset Flex Code
17857 \begin_layout Plain Layout
17867 \begin_layout Description
17868 \begin_inset Flex Code
17871 \begin_layout Plain Layout
17878 \begin_inset Flex Code
17881 \begin_layout Plain Layout
17890 \begin_inset space \thinspace{}
17894 \begin_inset Flex Code
17897 \begin_layout Plain Layout
17903 ] Whether fragile commands in this inset should be
17904 \begin_inset Flex Code
17907 \begin_layout Plain Layout
17920 whether the command should itself be protected.) Default is false.
17923 \begin_layout Description
17924 \begin_inset Flex Code
17927 \begin_layout Plain Layout
17934 \begin_inset Flex Code
17937 \begin_layout Plain Layout
17943 ] Deletes an existing
17944 \begin_inset Flex Code
17947 \begin_layout Plain Layout
17954 \change_inserted -712698321 1417953494
17958 \begin_layout Description
17960 \change_inserted -712698321 1417953559
17961 \begin_inset Flex Code
17964 \begin_layout Plain Layout
17966 \change_inserted -712698321 1417953494
17973 \begin_inset Flex Code
17976 \begin_layout Plain Layout
17978 \change_inserted -712698321 1417953574
17985 \begin_inset Flex Code
17988 \begin_layout Plain Layout
17990 \change_inserted -712698321 1417953533
17996 that has replaced this
17997 \begin_inset Flex Code
18000 \begin_layout Plain Layout
18002 \change_inserted -712698321 1417953551
18009 This is used to rename an
18010 \begin_inset Flex Code
18013 \begin_layout Plain Layout
18015 \change_inserted -712698321 1417953559
18021 , while keeping backward compatibility.
18026 \begin_layout Description
18027 \begin_inset Flex Code
18030 \begin_layout Plain Layout
18037 \begin_inset Flex Code
18040 \begin_layout Plain Layout
18049 \begin_inset space \thinspace{}
18053 \begin_inset Flex Code
18056 \begin_layout Plain Layout
18062 ] As with paragraph styles, see
18063 \begin_inset CommandInset ref
18065 reference "sub:Paragraph-Styles"
18073 \begin_layout Description
18074 \begin_inset Flex Code
18077 \begin_layout Plain Layout
18084 \begin_inset Flex Code
18087 \begin_layout Plain Layout
18096 \begin_inset space \thinspace{}
18100 \begin_inset Flex Code
18103 \begin_layout Plain Layout
18109 ] As with paragraph styles, see
18110 \begin_inset CommandInset ref
18112 reference "sub:Paragraph-Styles"
18120 \begin_layout Description
18121 \begin_inset Flex Code
18124 \begin_layout Plain Layout
18130 As with paragraph styles, see
18131 \begin_inset CommandInset ref
18133 reference "sub:Paragraph-Styles"
18140 \begin_layout Description
18141 \begin_inset Flex Code
18144 \begin_layout Plain Layout
18151 \begin_inset Flex Code
18154 \begin_layout Plain Layout
18160 ] The prefix to use when creating labels referring to insets of this type.
18161 This allows the use of formatted references.
18164 \begin_layout Description
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18175 \begin_inset Flex Code
18178 \begin_layout Plain Layout
18184 ] As with paragraph styles, see
18185 \begin_inset CommandInset ref
18187 reference "sub:Paragraph-Styles"
18194 \begin_layout Description
18195 \begin_inset Flex Code
18198 \begin_layout Plain Layout
18205 \begin_inset Flex Code
18208 \begin_layout Plain Layout
18217 \begin_inset space \thinspace{}
18221 \begin_inset Flex Code
18224 \begin_layout Plain Layout
18230 ] Resets the LaTeX arguments of this layout (as defined via the
18231 \begin_inset Flex Code
18234 \begin_layout Plain Layout
18241 This is useful if you have copied a style via
18242 \begin_inset Flex Code
18245 \begin_layout Plain Layout
18251 , but you do not want to inherit its (required and optional) arguments.
18254 \begin_layout Description
18255 \begin_inset Flex Code
18258 \begin_layout Plain Layout
18265 \begin_inset Flex Code
18268 \begin_layout Plain Layout
18275 \begin_inset space \thinspace{}
18279 \begin_inset Flex Code
18282 \begin_layout Plain Layout
18290 ] Whether this inset should use the font of its surrounding environment
18292 Default is false: use the font of the surrounding environment.
18295 \begin_layout Description
18296 \begin_inset Flex Code
18299 \begin_layout Plain Layout
18306 \begin_inset Flex Code
18309 \begin_layout Plain Layout
18315 ] A string that is put at the end of the layout content.
18316 A line break in the output can be indicated by
18317 \begin_inset Flex Code
18320 \begin_layout Plain Layout
18329 \begin_layout Description
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18350 \begin_inset space \thinspace{}
18354 \begin_inset Flex Code
18357 \begin_layout Plain Layout
18365 ] Allow spell-checking the contents of this inset.
18369 \begin_layout Subsection
18371 \begin_inset CommandInset label
18373 name "sub:Counters"
18380 \begin_layout Standard
18381 It is necessary to define the counters (
18382 \begin_inset Flex MenuItem
18385 \begin_layout Plain Layout
18392 \begin_inset Flex MenuItem
18395 \begin_layout Plain Layout
18401 , \SpecialChar \ldots{}
18402 ) in the text class itself.
18403 The standard counters are defined in the file
18404 \begin_inset Flex Code
18407 \begin_layout Plain Layout
18413 , so you may have to do no more than add
18416 \begin_layout LyX-Code
18417 Input stdcounters.inc
18420 \begin_layout Standard
18421 to your layout file to get them to work.
18422 But if you want to define custom counters, then you can do so.
18423 The counter declaration must begin with:
18426 \begin_layout LyX-Code
18427 Counter CounterName
18430 \begin_layout Standard
18432 \begin_inset Flex Code
18435 \begin_layout Plain Layout
18441 ' is replaced by the name of the counter.
18442 And it must end with
18443 \begin_inset Quotes eld
18447 \begin_inset Flex Code
18450 \begin_layout Plain Layout
18457 \begin_inset Quotes erd
18461 The following parameters can also be used:
18464 \begin_layout Description
18465 \begin_inset Flex Code
18468 \begin_layout Plain Layout
18475 \begin_inset Flex Code
18478 \begin_layout Plain Layout
18484 ] Sets the initial value for the counter, to which it will be reset whenever
18486 Normally, one will want the default, 1.
18489 \begin_layout Description
18490 \begin_inset Flex Code
18493 \begin_layout Plain Layout
18500 \begin_inset Flex Code
18503 \begin_layout Plain Layout
18510 \begin_inset Quotes erd
18514 \begin_inset Quotes erd
18517 ] When defined, this string defines how the counter is displayed.
18518 Setting this value sets
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18523 LabelStringAppendix
18529 The following special constructs can be used in the string:
18530 \begin_inset Separator parbreak
18537 \begin_layout Itemize
18538 \begin_inset Flex Code
18541 \begin_layout Plain Layout
18549 will be replaced by the expansion of the
18550 \begin_inset Flex Code
18553 \begin_layout Plain Layout
18560 \begin_inset Flex Code
18563 \begin_layout Plain Layout
18564 LabelStringAppendix
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18583 \begin_layout Itemize
18584 counter values can be expressed using LaTeX-like macros
18585 \begin_inset Newline newline
18589 \begin_inset Flex Code
18592 \begin_layout Plain Layout
18609 \begin_inset Flex Code
18612 \begin_layout Plain Layout
18624 \begin_layout Plain Layout
18634 Actually, the situation is a bit more complicated: any
18653 other than those described below will produce arabic numerals.
18654 It would not be surprising to see this change in the future.
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18669 : 1, 2, 3,\SpecialChar \ldots{}
18671 \begin_inset Flex Code
18674 \begin_layout Plain Layout
18680 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18682 \begin_inset Flex Code
18685 \begin_layout Plain Layout
18691 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18693 \begin_inset Flex Code
18696 \begin_layout Plain Layout
18702 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18704 \begin_inset Flex Code
18707 \begin_layout Plain Layout
18713 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18715 \begin_inset Flex Code
18718 \begin_layout Plain Layout
18724 for hebrew numerals.
18728 \begin_layout Standard
18729 If LabelString is not defined, a default value is constructed as follows:
18730 if the counter has a master counter
18731 \begin_inset Flex Code
18734 \begin_layout Plain Layout
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18751 \begin_inset Newline newline
18755 \begin_inset Flex Code
18758 \begin_layout Plain Layout
18768 is used; otherwise the string
18769 \begin_inset Flex Code
18772 \begin_layout Plain Layout
18783 \begin_layout Description
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18788 LabelStringAppendix
18794 \begin_inset Flex Code
18797 \begin_layout Plain Layout
18804 \begin_inset Quotes erd
18808 \begin_inset Quotes erd
18812 \begin_inset Flex Code
18815 \begin_layout Plain Layout
18821 , but for use in the Appendix.
18824 \begin_layout Description
18825 \begin_inset Flex Code
18828 \begin_layout Plain Layout
18835 \begin_inset Flex Code
18838 \begin_layout Plain Layout
18845 \begin_inset Quotes erd
18849 \begin_inset Quotes erd
18852 ] A format for use with formatted references to this counter.
18853 For example, one might want to have references to section numbers appear
18855 \begin_inset Quotes eld
18859 \begin_inset Quotes erd
18863 The string should contain
18864 \begin_inset Quotes eld
18868 \begin_inset Quotes erd
18872 This will be replaced by the counter number itself.
18873 So, for sections, it would be: Section ##.
18876 \begin_layout Description
18877 \begin_inset Flex Code
18880 \begin_layout Plain Layout
18887 \begin_inset Flex Code
18890 \begin_layout Plain Layout
18897 \begin_inset Quotes erd
18901 \begin_inset Quotes erd
18904 ] If this is set to the name of another counter, the present counter will
18905 be reset every time the other one is increased.
18907 \begin_inset Flex Code
18910 \begin_layout Plain Layout
18917 \begin_inset Flex Code
18920 \begin_layout Plain Layout
18929 \begin_layout Subsection
18931 \begin_inset CommandInset label
18933 name "sub:Font-description"
18940 \begin_layout Standard
18941 A font description looks like this:
18944 \begin_layout LyX-Code
18958 \begin_layout LyX-Code
18962 \begin_layout LyX-Code
18966 \begin_layout Standard
18967 The following commands are available:
18970 \begin_layout Description
18971 \begin_inset Flex Code
18974 \begin_layout Plain Layout
18981 \begin_inset Flex Code
18984 \begin_layout Plain Layout
18993 \begin_inset Flex Code
18996 \begin_layout Plain Layout
19003 \begin_inset Flex Code
19006 \begin_layout Plain Layout
19013 \begin_inset Flex Code
19016 \begin_layout Plain Layout
19023 \begin_inset Flex Code
19026 \begin_layout Plain Layout
19033 \begin_inset Flex Code
19036 \begin_layout Plain Layout
19043 \begin_inset Flex Code
19046 \begin_layout Plain Layout
19053 \begin_inset Flex Code
19056 \begin_layout Plain Layout
19063 \begin_inset Flex Code
19066 \begin_layout Plain Layout
19075 \begin_layout Description
19076 \begin_inset Flex Code
19079 \begin_layout Plain Layout
19086 \begin_inset Flex Code
19089 \begin_layout Plain Layout
19098 \begin_inset Flex Code
19101 \begin_layout Plain Layout
19108 \begin_inset Flex Code
19111 \begin_layout Plain Layout
19120 \begin_layout Description
19121 \begin_inset Flex Code
19124 \begin_layout Plain Layout
19131 \begin_inset Flex Code
19134 \begin_layout Plain Layout
19140 ] Valid arguments are:
19141 \begin_inset Flex Code
19144 \begin_layout Plain Layout
19151 \begin_inset Flex Code
19154 \begin_layout Plain Layout
19161 \begin_inset Flex Code
19164 \begin_layout Plain Layout
19171 \begin_inset Flex Code
19174 \begin_layout Plain Layout
19181 \begin_inset Flex Code
19184 \begin_layout Plain Layout
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19201 \begin_inset Flex Code
19204 \begin_layout Plain Layout
19211 \begin_inset Flex Code
19214 \begin_layout Plain Layout
19221 \begin_inset Flex Code
19224 \begin_layout Plain Layout
19231 \begin_inset Flex Code
19234 \begin_layout Plain Layout
19241 \begin_inset Flex Code
19244 \begin_layout Plain Layout
19251 \begin_inset Flex Code
19254 \begin_layout Plain Layout
19261 Each of these turns on or off the corresponding attribute.
19263 \begin_inset Flex Code
19266 \begin_layout Plain Layout
19272 turns on emphasis, and
19273 \begin_inset Flex Code
19276 \begin_layout Plain Layout
19284 \begin_inset Newline newline
19287 If the latter seems puzzling, remember that the font settings for the present
19288 context are generally inherited from the surrounding context.
19290 \begin_inset Flex Code
19293 \begin_layout Plain Layout
19299 would turn off the emphasis that was anyway in effect, say, in a theorem
19303 \begin_layout Description
19304 \begin_inset Flex Code
19307 \begin_layout Plain Layout
19314 \begin_inset Flex Code
19317 \begin_layout Plain Layout
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19338 \begin_layout Description
19339 \begin_inset Flex Code
19342 \begin_layout Plain Layout
19349 \begin_inset Flex Code
19352 \begin_layout Plain Layout
19361 \begin_inset Flex Code
19364 \begin_layout Plain Layout
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19381 \begin_inset Flex Code
19384 \begin_layout Plain Layout
19393 \begin_layout Description
19394 \begin_inset Flex Code
19397 \begin_layout Plain Layout
19404 \begin_inset Flex Code
19407 \begin_layout Plain Layout
19414 \begin_inset Flex Code
19417 \begin_layout Plain Layout
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19436 \begin_inset Flex Code
19439 \begin_layout Plain Layout
19446 \begin_inset Flex Code
19449 \begin_layout Plain Layout
19456 \begin_inset Flex Code
19459 \begin_layout Plain Layout
19466 \begin_inset Flex Code
19469 \begin_layout Plain Layout
19476 \begin_inset Flex Code
19479 \begin_layout Plain Layout
19488 \begin_layout Subsection
19489 \begin_inset CommandInset label
19491 name "sub:Citation-format-description"
19495 Citation format description
19498 \begin_layout Standard
19500 \begin_inset Flex Code
19503 \begin_layout Plain Layout
19509 blocks are used to describe how bibliographic information should be displayed,
19510 both within LyX itself (in the citation dialog and in tooltips, for example)
19511 and in XHTML output.
19512 Such a block might look like this:
19515 \begin_layout LyX-Code
19519 \begin_layout LyX-Code
19523 \begin_layout LyX-Code
19527 \begin_layout LyX-Code
19531 \begin_layout Standard
19532 The individual lines define how the bibliographic information associated
19533 with an article or book, respectively, is to be displayed, and such a definitio
19534 n can be given for any `entry type' that might be present in a BibTeX file.
19535 LyX defines a default format in the source code that will be used if no
19536 specific definition has been given.
19537 LyX predefines several formats in the file
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19547 , which is included in most of LyX's document classes.
19550 \begin_layout Standard
19551 The definitions use a simple language that allows BibTeX keys to be replaced
19553 Keys should be enclosed in
19554 \begin_inset Flex Code
19557 \begin_layout Plain Layout
19564 \begin_inset Flex Code
19567 \begin_layout Plain Layout
19574 So a simple definition might look like this:
19577 \begin_layout LyX-Code
19579 \begin_inset Quotes eld
19583 \begin_inset Quotes erd
19589 \begin_layout Standard
19590 This would print the author, followed by a comma, followed by the title,
19591 in quotes, followed by a period.
19594 \begin_layout Standard
19595 Of course, sometimes you may want to print a key only if it exists.
19596 This can be done by using a conditional construction, such as:
19597 \begin_inset Flex Code
19600 \begin_layout Plain Layout
19602 \begin_inset space ~
19612 \begin_inset Flex Code
19615 \begin_layout Plain Layout
19621 key exists, then print
19622 \begin_inset Quotes eld
19626 \begin_inset space ~
19630 \begin_inset Quotes erd
19633 followed by the volume key.
19634 It is also possible to have an else clause in the conditional, such as:
19635 \begin_inset Newline newline
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19643 {%author%[[%author%]][[%editor%, ed.]]}
19649 \begin_inset Newline newline
19653 \begin_inset Flex Code
19656 \begin_layout Plain Layout
19662 key is printed if it exists; otherwise, the editor key is printed, followed
19664 \begin_inset Quotes eld
19668 \begin_inset space ~
19672 \begin_inset Quotes erd
19675 Note that the key is again enclosed in
19676 \begin_inset Flex Code
19679 \begin_layout Plain Layout
19685 signs; the entire conditional is enclosed in braces; and the if and else
19686 clauses are enclosed in double brackets,
19687 \begin_inset Quotes eld
19691 \begin_inset Flex Code
19694 \begin_layout Plain Layout
19701 \begin_inset Quotes eld
19705 \begin_inset Quotes eld
19709 \begin_inset Flex Code
19712 \begin_layout Plain Layout
19719 \begin_inset Quotes erd
19723 There must be no space between any of these.
19726 \begin_layout Standard
19727 There is one other piece of syntax available in definitions, which looks
19729 \begin_inset Flex Code
19732 \begin_layout Plain Layout
19739 This defines a piece of formatting information that is to be used when
19741 \begin_inset Quotes eld
19745 \begin_inset Quotes erd
19749 Obviously, we do not want to output HTML tags when writing plain text,
19750 so they should be wrapped in
19751 \begin_inset Quotes eld
19755 \begin_inset Quotes erd
19759 \begin_inset Quotes eld
19763 \begin_inset Quotes erd
19769 \begin_layout Standard
19770 Two special sorts of definitions are also possible in a
19771 \begin_inset Flex Code
19774 \begin_layout Plain Layout
19781 An example of the first would be:
19784 \begin_layout LyX-Code
19786 \begin_inset Quotes eld
19790 \begin_inset Quotes erd
19796 \begin_layout Standard
19797 This is an abbreviation, or macro, and it can be used by treating it as
19799 \begin_inset Flex Code
19802 \begin_layout Plain Layout
19810 \begin_inset Flex Code
19813 \begin_layout Plain Layout
19819 exactly as it would treat its definition.
19820 So, let us issue the obvious
19828 \begin_layout LyX-Code
19832 \begin_layout Standard
19833 or anything like it.
19834 LyX shouldn't go into an infinite loop, but it may go into a long one before
19838 \begin_layout Standard
19839 The second sort of special definition might look like this:
19842 \begin_layout LyX-Code
19846 \begin_layout Standard
19847 This defines a translatable piece of text, which allows relevant parts of
19848 the bibliography to be translated.
19849 It can be included in a definition by treating it as a key:
19850 \begin_inset Flex Code
19853 \begin_layout Plain Layout
19860 Several of these are predefined in
19861 \begin_inset Flex Code
19864 \begin_layout Plain Layout
19871 Note that these are not macros, in the sense just defined.
19872 They will not be expanded.
19875 \begin_layout Standard
19876 So here then is an example that use all these features:
19877 \begin_inset VSpace defskip
19883 \begin_layout Standard
19887 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19890 \begin_layout Standard
19891 \begin_inset VSpace defskip
19894 This defines a macro that prints the author, followed by a comma, if the
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19905 key is defined, or else prints the name of the editor, followed by the
19907 \begin_inset Flex Code
19910 \begin_layout Plain Layout
19916 or its translation (it is by default
19917 \begin_inset Quotes eld
19921 \begin_inset Quotes erd
19925 \begin_inset Flex Code
19928 \begin_layout Plain Layout
19935 Note that this is in fact defined in
19936 \begin_inset Flex Code
19939 \begin_layout Plain Layout
19945 , so you can use it in your own definitions, or re-definitions, if you load
19949 \begin_layout Section
19950 \begin_inset CommandInset label
19952 name "sec:Tags-for-XHTML"
19956 Tags for XHTML output
19959 \begin_layout Standard
19960 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19961 by layout information.
19962 In general, LyX provides sensible defaults and, as mentioned earlier, it
19963 will even construct default CSS style rules from the other layout tags.
19964 For example, LyX will attempt to use the information provided in the
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19974 declaration for the Chapter style to write CSS that will appropriately
19975 format chapter headings.
19978 \begin_layout Standard
19979 In many cases, then, you may not have to do anything at all to get acceptable
19980 XHTML output for your own environments, custom insets, and so forth.
19981 But in some cases you will, and so LyX provides a number of layout tags
19982 that can be used to customize the XHTML and CSS that are generated.
19985 \begin_layout Standard
19986 Note that there are two tags,
19987 \begin_inset Flex Code
19990 \begin_layout Plain Layout
19997 \begin_inset Flex Code
20000 \begin_layout Plain Layout
20006 that may appear outside style and inset declarations.
20008 \begin_inset CommandInset ref
20010 reference "sub:General-text-class"
20014 for details on these.
20017 \begin_layout Subsection
20018 \begin_inset CommandInset label
20020 name "sub:Paragraph-Style-XHTML"
20027 \begin_layout Standard
20028 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20029 dealing with a normal paragraph, a command, or an environment, where this
20030 is itself determined by the contents of the corresponding
20031 \begin_inset Flex Code
20034 \begin_layout Plain Layout
20044 \begin_layout Standard
20045 For a command or normal paragraph, the output XHTML has the following form:
20048 \begin_layout LyX-Code
20050 \begin_inset Quotes erd
20054 \begin_inset Quotes erd
20060 \begin_layout LyX-Code
20062 \begin_inset Quotes erd
20066 \begin_inset Quotes erd
20072 \begin_layout LyX-Code
20073 Contents of the paragraph.
20076 \begin_layout LyX-Code
20080 \begin_layout Standard
20081 The label tags are of course omitted if the paragraph does not have a label.
20084 \begin_layout Standard
20085 For an environment that is not some sort of list, the XHTML takes this form:
20088 \begin_layout LyX-Code
20090 \begin_inset Quotes erd
20094 \begin_inset Quotes erd
20100 \begin_layout LyX-Code
20102 \begin_inset Quotes erd
20106 \begin_inset Quotes erd
20110 \begin_inset Quotes erd
20114 \begin_inset Quotes erd
20117 >Environment Label</labeltag>First paragraph.</itemtag>
20120 \begin_layout LyX-Code
20121 <itemtag>Second paragraph.</itemtag>
20124 \begin_layout LyX-Code
20128 \begin_layout Standard
20129 Note that the label is output only for the first paragraph, as it should
20130 be for a theorem, for example.
20134 \begin_layout Standard
20135 For a list, we have one of these forms:
20138 \begin_layout LyX-Code
20140 \begin_inset Quotes erd
20144 \begin_inset Quotes erd
20150 \begin_layout LyX-Code
20152 \begin_inset Quotes erd
20156 \begin_inset Quotes erd
20160 \begin_inset Quotes erd
20164 \begin_inset Quotes erd
20167 >List Label</labeltag>First item.</itemtag>
20170 \begin_layout LyX-Code
20172 \begin_inset Quotes erd
20176 \begin_inset Quotes erd
20180 \begin_inset Quotes erd
20184 \begin_inset Quotes erd
20187 >List Label</labeltag>Second item.</itemtag>
20190 \begin_layout LyX-Code
20194 \begin_layout LyX-Code
20198 \begin_layout LyX-Code
20200 \begin_inset Quotes erd
20204 \begin_inset Quotes erd
20210 \begin_layout LyX-Code
20212 \begin_inset Quotes erd
20216 \begin_inset Quotes erd
20219 >List Label</labeltag><itemtag attr=
20220 \begin_inset Quotes erd
20224 \begin_inset Quotes erd
20227 >First item.</itemtag>
20230 \begin_layout LyX-Code
20232 \begin_inset Quotes erd
20236 \begin_inset Quotes erd
20239 >List Label</labeltag><itemtag attr=
20240 \begin_inset Quotes erd
20244 \begin_inset Quotes erd
20247 >Second item.</itemtag>
20250 \begin_layout LyX-Code
20254 \begin_layout Standard
20255 Note the different orders of
20256 \begin_inset Flex Code
20259 \begin_layout Plain Layout
20266 \begin_inset Flex Code
20269 \begin_layout Plain Layout
20276 Which order we get depends upon the setting of
20277 \begin_inset Flex Code
20280 \begin_layout Plain Layout
20287 \begin_inset Flex Code
20290 \begin_layout Plain Layout
20296 is false (the default), you get the first of these, with the label within
20297 the item; if true, you get the second, with the label outside the item.
20300 \begin_layout Standard
20301 The specific tags and attributes output for each paragraph type can be controlle
20302 d by means of the layout tags we are about to describe.
20303 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20304 so you often may not need to do very much to get good XHTML output.
20305 Think of the available tags as there so you can tweak things to your liking.
20308 \begin_layout Description
20309 \begin_inset Flex Code
20312 \begin_layout Plain Layout
20319 \begin_inset Flex Code
20322 \begin_layout Plain Layout
20328 ] Specifies attribute information to be output with the main tag.
20330 \begin_inset Quotes eld
20334 \begin_inset Flex Code
20337 \begin_layout Plain Layout
20344 \begin_inset Quotes erd
20348 By default, LyX will output
20349 \begin_inset Quotes eld
20353 \begin_inset Flex Code
20356 \begin_layout Plain Layout
20363 \begin_inset Quotes erd
20367 \begin_inset Flex Code
20370 \begin_layout Plain Layout
20376 is the LyX name of the layout, made lowercase, for example: chapter.
20381 contain any style information.
20383 \begin_inset Flex Code
20386 \begin_layout Plain Layout
20395 \begin_layout Description
20396 \begin_inset Flex Code
20399 \begin_layout Plain Layout
20406 \begin_inset Flex Code
20409 \begin_layout Plain Layout
20419 ] Whether to output the default CSS information LyX generates for this layout,
20420 even if additional information is explicitly provided via
20421 \begin_inset Flex Code
20424 \begin_layout Plain Layout
20432 \begin_inset Flex Code
20435 \begin_layout Plain Layout
20441 allows you to alter or augment the generated CSS, rather than to override
20444 \begin_inset Flex Code
20447 \begin_layout Plain Layout
20456 \begin_layout Description
20457 \begin_inset Flex Code
20460 \begin_layout Plain Layout
20467 \begin_inset Flex Code
20470 \begin_layout Plain Layout
20476 ] The tag to be used for individual paragraphs of environments, replacing
20478 \begin_inset Flex Code
20481 \begin_layout Plain Layout
20487 in the examples above.
20489 \begin_inset Flex Code
20492 \begin_layout Plain Layout
20501 \begin_layout Description
20502 \begin_inset Flex Code
20505 \begin_layout Plain Layout
20512 \begin_inset Flex Code
20515 \begin_layout Plain Layout
20521 ] Attributes for the item tag.
20523 \begin_inset Quotes eld
20527 \begin_inset Flex Code
20530 \begin_layout Plain Layout
20531 class=`layoutname_item'
20537 \begin_inset Quotes erd
20545 contain any style information.
20547 \begin_inset Flex Code
20550 \begin_layout Plain Layout
20559 \begin_layout Description
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20570 \begin_inset Flex Code
20573 \begin_layout Plain Layout
20579 ] The tag to be used for paragraph and item labels, replacing
20580 \begin_inset Flex Code
20583 \begin_layout Plain Layout
20589 in the examples above.
20591 \begin_inset Flex Code
20594 \begin_layout Plain Layout
20601 \begin_inset Flex Code
20604 \begin_layout Plain Layout
20611 \begin_inset Flex Code
20614 \begin_layout Plain Layout
20621 \begin_inset Flex Code
20624 \begin_layout Plain Layout
20625 Centered_Top_Environment
20630 , in which case it defaults to
20631 \begin_inset Flex Code
20634 \begin_layout Plain Layout
20643 \begin_layout Description
20644 \begin_inset Flex Code
20647 \begin_layout Plain Layout
20654 \begin_inset Flex Code
20657 \begin_layout Plain Layout
20663 ] Attributes for the label tag.
20665 \begin_inset Quotes eld
20669 \begin_inset Flex Code
20672 \begin_layout Plain Layout
20673 class=`layoutname_label'
20679 \begin_inset Quotes erd
20687 contain any style information.
20689 \begin_inset Flex Code
20692 \begin_layout Plain Layout
20701 \begin_layout Description
20702 \begin_inset Flex Code
20705 \begin_layout Plain Layout
20712 \begin_inset Flex Code
20715 \begin_layout Plain Layout
20725 ] Meaningful only for list-like environments, this tag controls whether
20726 the label tag is output before or inside the item tag.
20727 This is used, for example, in the description environment, where we want
20729 \begin_inset Flex Code
20732 \begin_layout Plain Layout
20733 <dt>\SpecialChar \ldots{}
20734 </dt><dd>\SpecialChar \ldots{}
20742 \begin_inset Flex Code
20745 \begin_layout Plain Layout
20751 : The label tag is output inside the item tag.
20754 \begin_layout Description
20755 \begin_inset Flex Code
20758 \begin_layout Plain Layout
20764 Information to be output in the
20765 \begin_inset Flex Code
20768 \begin_layout Plain Layout
20774 section when this style is used.
20775 This might, for example, be used to include a
20776 \begin_inset Flex Code
20779 \begin_layout Plain Layout
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20798 \begin_layout Description
20799 \begin_inset Flex Code
20802 \begin_layout Plain Layout
20808 CSS style information to be included when this style is used.
20809 Note that this will automatically be wrapped in a layout-generated
20810 \begin_inset Flex Code
20813 \begin_layout Plain Layout
20819 block, so only the CSS itself need be included.
20821 \begin_inset Flex Code
20824 \begin_layout Plain Layout
20833 \begin_layout Description
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20844 \begin_inset Flex Code
20847 \begin_layout Plain Layout
20853 ] The tag to be used for the main label, replacing
20854 \begin_inset Flex Code
20857 \begin_layout Plain Layout
20863 in the examples above.
20865 \begin_inset Flex Code
20868 \begin_layout Plain Layout
20877 \begin_layout Description
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20888 \begin_inset Flex Code
20891 \begin_layout Plain Layout
20901 ] Marks this style as the one to be used to generate the
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20911 tag for the XHTML file.
20912 By default, it is false.
20914 \begin_inset Flex Code
20917 \begin_layout Plain Layout
20923 file sets it to true for the
20924 \begin_inset Flex Code
20927 \begin_layout Plain Layout
20937 \begin_layout Subsection
20941 \begin_layout Standard
20942 The XHTML output of insets can also be controlled by information in layout
20947 \begin_layout Plain Layout
20948 At present, this is true only for
20949 \begin_inset Quotes eld
20953 \begin_inset Quotes erd
20956 insets (insets you can type into) and is not true for
20957 \begin_inset Quotes eld
20961 \begin_inset Quotes erd
20964 insets (insets that are associated with dialog boxes).
20969 Here, too, LyX tries to provide sensible defaults, and it constructs default
20971 But everything can be customized.
20974 \begin_layout Standard
20975 The XHTML LyX outputs for an inset has the following form:
20978 \begin_layout LyX-Code
20980 \begin_inset Quotes erd
20984 \begin_inset Quotes erd
20990 \begin_layout LyX-Code
20991 <labeltag>Label</labeltag>
20994 \begin_layout LyX-Code
20996 \begin_inset Quotes erd
21000 \begin_inset Quotes erd
21003 >Contents of the inset.</innertag>
21006 \begin_layout LyX-Code
21010 \begin_layout Standard
21011 If the inset permits multiple paragraphs---that is, if
21012 \begin_inset Flex Code
21015 \begin_layout Plain Layout
21021 is true---then the contents of the inset will itself be output as paragraphs
21022 formatted according to the styles used for those paragraphs (standard,
21023 quote, and the like).
21024 The label tag is of course omitted if the paragraph does not have a label
21025 and, at present, is always
21026 \begin_inset Flex Code
21029 \begin_layout Plain Layout
21036 The inner tag is optional and, by default, does not appear.
21039 \begin_layout Standard
21040 The specific tags and attributes output for each inset can be controlled
21041 by means of the following layout tags.
21044 \begin_layout Description
21045 \begin_inset Flex Code
21048 \begin_layout Plain Layout
21055 \begin_inset Flex Code
21058 \begin_layout Plain Layout
21064 ] Specifies attribute information to be output with the main tag.
21066 \begin_inset Quotes eld
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21074 class=`myinset' onclick=`\SpecialChar \ldots{}
21081 \begin_inset Quotes erd
21085 By default, LyX will output
21086 \begin_inset Quotes eld
21090 \begin_inset Flex Code
21093 \begin_layout Plain Layout
21100 \begin_inset Quotes erd
21104 \begin_inset Flex Code
21107 \begin_layout Plain Layout
21113 is the LyX name of the inset, made lowercase and with non-alphanumeric
21114 characters converted to underscores, for example: footnote.
21117 \begin_layout Description
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21128 \begin_inset Flex Code
21131 \begin_layout Plain Layout
21141 ] Whether to output the default CSS information LyX generates for this layout,
21142 even if additional information is explicitly provided via
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21154 \begin_inset Flex Code
21157 \begin_layout Plain Layout
21163 allows you to alter or augment the generated CSS, rather than to override
21168 \begin_layout Description
21169 \begin_inset Flex Code
21172 \begin_layout Plain Layout
21179 \begin_inset Flex Code
21182 \begin_layout Plain Layout
21188 ] Attributes for the inner tag.
21190 \begin_inset Quotes eld
21194 \begin_inset Flex Code
21197 \begin_layout Plain Layout
21198 class=`insetname_inner'
21204 \begin_inset Quotes erd
21210 \begin_layout Description
21211 \begin_inset Flex Code
21214 \begin_layout Plain Layout
21221 \begin_inset Flex Code
21224 \begin_layout Plain Layout
21230 ] The inner tag, replacing
21231 \begin_inset Flex Code
21234 \begin_layout Plain Layout
21240 in the examples above.
21241 By default, there is none.
21244 \begin_layout Description
21245 \begin_inset Flex Code
21248 \begin_layout Plain Layout
21255 \begin_inset Flex Code
21258 \begin_layout Plain Layout
21266 ] Whether this inset represents a standalone block of text (such as a footnote)
21267 or instead represents material that is included in the surrounding text
21268 (such as a branch).
21272 \begin_layout Description
21273 \begin_inset Flex Code
21276 \begin_layout Plain Layout
21283 \begin_inset Flex Code
21286 \begin_layout Plain Layout
21292 ] A label for this inset, possibly including a reference to a counter.
21293 For example, for footnote, it might be:
21294 \begin_inset Flex Code
21297 \begin_layout Plain Layout
21306 This is optional, and there is no default.
21309 \begin_layout Description
21310 \begin_inset Flex Code
21313 \begin_layout Plain Layout
21319 Information to be output in the
21320 \begin_inset Flex Code
21323 \begin_layout Plain Layout
21329 section when this style is used.
21330 This might, for example, be used to include a
21331 \begin_inset Flex Code
21334 \begin_layout Plain Layout
21341 \begin_inset Flex Code
21344 \begin_layout Plain Layout
21353 \begin_layout Description
21354 \begin_inset Flex Code
21357 \begin_layout Plain Layout
21363 CSS style information to be included when this style is used.
21364 Note that this will automatically be wrapped in a layout-generated
21365 \begin_inset Flex Code
21368 \begin_layout Plain Layout
21374 block, so only the CSS itself need be included.
21377 \begin_layout Description
21378 \begin_inset Flex Code
21381 \begin_layout Plain Layout
21388 \begin_inset Flex Code
21391 \begin_layout Plain Layout
21397 ] The tag to be used for the main label, replacing
21398 \begin_inset Flex Code
21401 \begin_layout Plain Layout
21407 in the examples above.
21408 The default depends upon the setting of
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21419 \begin_inset Flex Code
21422 \begin_layout Plain Layout
21428 is true, the default is
21429 \begin_inset Flex Code
21432 \begin_layout Plain Layout
21438 ; if it is false, the default is
21439 \begin_inset Flex Code
21442 \begin_layout Plain Layout
21451 \begin_layout Subsection
21455 \begin_layout Standard
21456 The XHTML output for floats too can be controlled by layout information.
21457 The output has the following form:
21460 \begin_layout LyX-Code
21462 \begin_inset Quotes erd
21466 \begin_inset Quotes erd
21472 \begin_layout LyX-Code
21473 Contents of the float.
21476 \begin_layout LyX-Code
21480 \begin_layout Standard
21481 The caption, if there is one, is a separate inset and will be output as
21483 Its appearance can be controlled via the InsetLayout for caption insets.
21487 \begin_layout Description
21488 \begin_inset Flex Code
21491 \begin_layout Plain Layout
21498 \begin_inset Flex Code
21501 \begin_layout Plain Layout
21507 ] Specifies attribute information to be output with the main tag.
21509 \begin_inset Quotes eld
21513 \begin_inset Flex Code
21516 \begin_layout Plain Layout
21517 class=`myfloat' onclick=`\SpecialChar \ldots{}
21524 \begin_inset Quotes erd
21528 By default, LyX will output
21529 \begin_inset Quotes eld
21533 \begin_inset Flex Code
21536 \begin_layout Plain Layout
21537 class=`float float-floattype'
21543 \begin_inset Quotes erd
21547 \begin_inset Flex Code
21550 \begin_layout Plain Layout
21556 is LyX's name for this type of float, as determined by the float declaration
21558 \begin_inset CommandInset ref
21560 reference "sub:Floats"
21564 ), though made lowercase and with non-alphanumeric characters converted
21565 to underscores, for example: float-table.
21568 \begin_layout Description
21569 \begin_inset Flex Code
21572 \begin_layout Plain Layout
21578 CSS style information to be included when this float is used.
21579 Note that this will automatically be wrapped in a layout-generated
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21589 block, so only the CSS itself need be included.
21592 \begin_layout Description
21593 \begin_inset Flex Code
21596 \begin_layout Plain Layout
21603 \begin_inset Flex Code
21606 \begin_layout Plain Layout
21612 ] The tag to be used for this float, replacing
21613 \begin_inset Quotes eld
21617 \begin_inset Flex Code
21620 \begin_layout Plain Layout
21627 \begin_inset Quotes erd
21630 in the example above.
21632 \begin_inset Flex Code
21635 \begin_layout Plain Layout
21641 and will rarely need changing.
21644 \begin_layout Subsection
21645 Bibliography formatting
21648 \begin_layout Standard
21649 The bibliography can be formatted using
21650 \begin_inset Flex Code
21653 \begin_layout Plain Layout
21661 \begin_inset CommandInset ref
21663 reference "sub:Citation-format-description"
21670 \begin_layout Subsection
21674 \begin_layout Standard
21675 We have several times mentioned that LyX will generate default CSS style
21676 rules for both insets and paragraph styles, based upon the other layout
21677 information that is provided.
21678 In this section, we shall say a word about which layout information LyX
21682 \begin_layout Standard
21683 At present, LyX auto-generates CSS only for font information, making use
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21705 \begin_inset Flex Code
21708 \begin_layout Plain Layout
21715 \begin_inset Flex Code
21718 \begin_layout Plain Layout
21725 \begin_inset Flex Code
21728 \begin_layout Plain Layout
21735 \begin_inset CommandInset ref
21737 reference "sub:Font-description"
21742 The translation is mostly straightforward and obvious.
21744 \begin_inset Quotes eld
21748 \begin_inset Flex Code
21751 \begin_layout Plain Layout
21758 \begin_inset Quotes erd
21762 \begin_inset Quotes eld
21766 \begin_inset Flex Code
21769 \begin_layout Plain Layout
21770 font-family: sans-serif;
21776 \begin_inset Quotes erd
21780 The correspondence of LyX sizes and CSS sizes is a little less obvious
21781 but nonetheless intuitive.
21783 \begin_inset Flex Code
21786 \begin_layout Plain Layout
21793 \begin_inset Flex URL
21796 \begin_layout Plain Layout
21806 \begin_layout Chapter
21807 Including External Material
21808 \begin_inset CommandInset label
21810 name "chap:Including-External-Material"
21817 \begin_layout Standard
21818 \begin_inset Box Shadowbox
21828 height_special "totalheight"
21831 \begin_layout Plain Layout
21832 WARNING: This portion of the documentation has not been updated for some
21834 We certainly hope that it is still accurate, but there are no guarantees.
21842 \begin_layout Standard
21843 The use of material from sources external to LyX is covered in detail in
21849 This part of the manual covers what needs to happen behind the scenes for
21850 new sorts of material to be included.
21853 \begin_layout Section
21857 \begin_layout Standard
21858 The external material feature is based on the concept of a
21863 A template is a specification of how LyX should interface with a certain
21865 As bundled, LyX comes with predefined templates for Xfig figures, various
21866 raster format images, chess diagrams, and LilyPond music notation.
21867 You can check the actual list by using the menu
21868 \begin_inset Flex MenuItem
21871 \begin_layout Plain Layout
21872 Insert\SpecialChar \menuseparator
21873 File\SpecialChar \menuseparator
21880 Furthermore, it is possible to roll your own template to support a specific
21882 Later we'll describe in more detail what is involved, and hopefully you
21883 will submit all the templates you create so we can include them in a later
21887 \begin_layout Standard
21888 Another basic idea of the external material feature is to distinguish between
21889 the original file that serves as a base for final material and the produced
21890 file that is included in your exported or printed document.
21891 For example, consider the case of a figure produced with
21892 \begin_inset Flex Code
21895 \begin_layout Plain Layout
21902 The Xfig application itself works on an original file with the
21903 \begin_inset Flex Code
21906 \begin_layout Plain Layout
21913 Within Xfig, you create and change your figure, and when you are done,
21915 \begin_inset Flex Code
21918 \begin_layout Plain Layout
21925 When you want to include the figure in your document, you invoke
21926 \begin_inset Flex Code
21929 \begin_layout Plain Layout
21935 in order to create a PostScript file that can readily be included in your
21938 \begin_inset Flex Code
21941 \begin_layout Plain Layout
21947 file is the original file, and the PostScript file is the produced file.
21950 \begin_layout Standard
21951 This distinction is important in order to allow updating of the material
21952 while you are in the process of writing the document.
21953 Furthermore, it provides us with the flexibility that is needed to support
21954 multiple export formats.
21955 For instance, in the case of a plain text file, it is not exactly an award-winn
21956 ing idea to include the figure as raw PostScript.
21957 Instead, you would either prefer to just include a reference to the figure
21958 or try to invoke some graphics to ASCII converter to make the final result
21959 look similar to the real graphics.
21960 The external material management allows you to do this, because it is parametri
21961 zed on the different export formats that LyX supports.
21964 \begin_layout Standard
21965 Besides supporting the production of different products according to the
21966 exported format, it supports tight integration with editing and viewing
21968 In the case of an Xfig figure, you are able to invoke Xfig on the original
21969 file with a single click from within the external material dialog in LyX,
21970 and also preview the produced PostScript file with Ghostview with another
21972 No more fiddling around with the command line and/or file browsers to locate
21973 and manipulate the original or produced files.
21974 In this way, you are finally able to take full advantage of the many different
21975 applications that are relevant to use when you write your documents, and
21976 ultimately be more productive.
21979 \begin_layout Section
21980 The external template configuration file
21983 \begin_layout Standard
21984 It is relatively easy to add custom external template definitions to LyX.
21985 However, be aware that doing this in an careless manner most probably
21989 introduce an easily exploitable security hole.
21990 So before you do this, please read the discussion about security in
21991 \begin_inset CommandInset ref
21993 reference "sec:Security-discussion"
22000 \begin_layout Standard
22001 Having said that, we encourage you to submit any interesting templates that
22006 \begin_layout Standard
22007 The external templates are defined in the
22008 \begin_inset Flex Code
22011 \begin_layout Plain Layout
22012 LyXDir/lib/external_templates
22018 You can place your own version in
22019 \begin_inset Flex Code
22022 \begin_layout Plain Layout
22023 UserDir/external_templates
22031 \begin_layout Standard
22032 A typical template looks like this:
22035 \begin_layout LyX-Code
22039 \begin_layout LyX-Code
22040 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22043 \begin_layout LyX-Code
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
22064 AutomaticProduction true
22067 \begin_layout LyX-Code
22071 \begin_layout LyX-Code
22075 \begin_layout LyX-Code
22079 \begin_layout LyX-Code
22080 TransformCommand Rotate RotationLatexCommand
22083 \begin_layout LyX-Code
22084 TransformCommand Resize ResizeLatexCommand
22087 \begin_layout LyX-Code
22088 Product "$$RotateFront$$ResizeFront
22091 \begin_layout LyX-Code
22096 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22099 \begin_layout LyX-Code
22100 $$ResizeBack$$RotateBack"
22103 \begin_layout LyX-Code
22107 \begin_layout LyX-Code
22108 UpdateResult "$$AbsPath$$Basename.pstex_t"
22111 \begin_layout LyX-Code
22112 Requirement "graphicx"
22115 \begin_layout LyX-Code
22116 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22119 \begin_layout LyX-Code
22120 ReferencedFile latex "$$AbsPath$$Basename.eps"
22123 \begin_layout LyX-Code
22124 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22127 \begin_layout LyX-Code
22131 \begin_layout LyX-Code
22135 \begin_layout LyX-Code
22136 TransformCommand Rotate RotationLatexCommand
22139 \begin_layout LyX-Code
22140 TransformCommand Resize ResizeLatexCommand
22143 \begin_layout LyX-Code
22144 Product "$$RotateFront$$ResizeFront
22147 \begin_layout LyX-Code
22152 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22155 \begin_layout LyX-Code
22156 $$ResizeBack$$RotateBack"
22159 \begin_layout LyX-Code
22160 UpdateFormat pdftex
22163 \begin_layout LyX-Code
22164 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22167 \begin_layout LyX-Code
22168 Requirement "graphicx"
22171 \begin_layout LyX-Code
22172 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22175 \begin_layout LyX-Code
22176 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22179 \begin_layout LyX-Code
22183 \begin_layout LyX-Code
22187 \begin_layout LyX-Code
22188 Product "$$Contents(
22190 "$$AbsPath$$Basename.asc
22195 \begin_layout LyX-Code
22196 UpdateFormat asciixfig
22199 \begin_layout LyX-Code
22200 UpdateResult "$$AbsPath$$Basename.asc"
22203 \begin_layout LyX-Code
22207 \begin_layout LyX-Code
22211 \begin_layout LyX-Code
22212 Product "<graphic fileref=
22214 "$$AbsOrRelPathMaster$$Basename.eps
22219 \begin_layout LyX-Code
22223 \begin_layout LyX-Code
22227 \begin_layout LyX-Code
22228 UpdateResult "$$AbsPath$$Basename.eps"
22231 \begin_layout LyX-Code
22232 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22235 \begin_layout LyX-Code
22236 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22239 \begin_layout LyX-Code
22243 \begin_layout LyX-Code
22244 Product "[XFig: $$FName]"
22247 \begin_layout LyX-Code
22251 \begin_layout LyX-Code
22255 \begin_layout Standard
22256 As you can see, the template is enclosed in
22257 \begin_inset Flex Code
22260 \begin_layout Plain Layout
22266 \SpecialChar \ldots{}
22268 \begin_inset Flex Code
22271 \begin_layout Plain Layout
22278 It contains a header specifying some general settings and, for each supported
22279 primary document file format, a section
22280 \begin_inset Flex Code
22283 \begin_layout Plain Layout
22289 \SpecialChar \ldots{}
22291 \begin_inset Flex Code
22294 \begin_layout Plain Layout
22303 \begin_layout Subsection
22304 The template header
22307 \begin_layout Description
22308 \begin_inset Flex Code
22311 \begin_layout Plain Layout
22312 AutomaticProduction
22313 \begin_inset space ~
22321 Whether the file represented by the template must be generated by LyX.
22322 This command must occur exactly once.
22325 \begin_layout Description
22326 \begin_inset Flex Code
22329 \begin_layout Plain Layout
22331 \begin_inset space ~
22339 A glob pattern that is used in the file dialog to filter out the desired
22341 If there is more than one possible file extension (e.
22342 \begin_inset space \thinspace{}
22346 \begin_inset space \space{}
22350 \begin_inset Flex Code
22353 \begin_layout Plain Layout
22360 \begin_inset Flex Code
22363 \begin_layout Plain Layout
22369 ), use something like
22370 \begin_inset Flex Code
22373 \begin_layout Plain Layout
22380 This command must occur exactly once.
22383 \begin_layout Description
22384 \begin_inset Flex Code
22387 \begin_layout Plain Layout
22389 \begin_inset space ~
22397 The text that is displayed on the button.
22398 This command must occur exactly once.
22401 \begin_layout Description
22402 \begin_inset Flex Code
22405 \begin_layout Plain Layout
22407 \begin_inset space ~
22411 \begin_inset space ~
22419 The help text that is used in the External dialog.
22420 Provide enough information to explain to the user just what the template
22421 can provide him with.
22422 This command must occur exactly once.
22425 \begin_layout Description
22426 \begin_inset Flex Code
22429 \begin_layout Plain Layout
22431 \begin_inset space ~
22439 The file format of the original file.
22440 This must be the name of a format that is known to LyX (see
22441 \begin_inset CommandInset ref
22443 reference "sec:Formats"
22449 \begin_inset Quotes eld
22453 \begin_inset Flex Code
22456 \begin_layout Plain Layout
22463 \begin_inset Quotes erd
22466 if the template can handle original files of more than one format.
22467 LyX will attempt to interrogate the file itself in order to deduce its
22468 format in this case.
22469 This command must occur exactly once.
22472 \begin_layout Description
22473 \begin_inset Flex Code
22476 \begin_layout Plain Layout
22478 \begin_inset space ~
22486 A unique name for the template.
22487 It must not contain substitution macros (see below).
22490 \begin_layout Description
22491 \begin_inset Flex Code
22494 \begin_layout Plain Layout
22496 \begin_inset space ~
22499 Rotate|Resize|Clip|Extra
22504 This command specifies which transformations are supported by this template.
22505 It may occur zero or more times.
22506 This command enables the corresponding tabs in the external dialog.
22508 \begin_inset Flex Code
22511 \begin_layout Plain Layout
22517 command must have either a corresponding
22518 \begin_inset Flex Code
22521 \begin_layout Plain Layout
22528 \begin_inset Flex Code
22531 \begin_layout Plain Layout
22538 \begin_inset Flex Code
22541 \begin_layout Plain Layout
22548 Otherwise the transformation will not be supported by that format.
22551 \begin_layout Subsection
22555 \begin_layout Description
22556 \begin_inset Flex Code
22559 \begin_layout Plain Layout
22561 \begin_inset space ~
22564 LaTeX|PDFLaTeX|PlainText|DocBook
22569 The primary document file format that this format definition is for.
22570 Not every template has a sensible representation in all document file formats.
22571 Please define nevertheless a
22572 \begin_inset Flex Code
22575 \begin_layout Plain Layout
22581 section for all templates.
22582 Use a dummy text when no representation is available.
22583 Then you can at least see a reference to the external material in the exported
22587 \begin_layout Description
22588 \begin_inset Flex Code
22591 \begin_layout Plain Layout
22593 \begin_inset space ~
22597 \begin_inset space ~
22605 This command defines an additional macro
22606 \begin_inset Flex Code
22609 \begin_layout Plain Layout
22615 for substitution in
22616 \begin_inset Flex Code
22619 \begin_layout Plain Layout
22627 \begin_inset Flex Code
22630 \begin_layout Plain Layout
22636 itself may contain substitution macros.
22637 The advantage over using
22638 \begin_inset Flex Code
22641 \begin_layout Plain Layout
22648 \begin_inset Flex Code
22651 \begin_layout Plain Layout
22657 is that the substituted value of
22658 \begin_inset Flex Code
22661 \begin_layout Plain Layout
22667 is sanitized so that it is a valid optional argument in the document format.
22668 This command may occur zero or more times.
22671 \begin_layout Description
22672 \begin_inset Flex Code
22675 \begin_layout Plain Layout
22677 \begin_inset space ~
22685 The text that is inserted in the exported document.
22686 This is actually the most important command and can be quite complex.
22687 This command must occur exactly once.
22690 \begin_layout Description
22691 \begin_inset Flex Code
22694 \begin_layout Plain Layout
22696 \begin_inset space ~
22704 This command specifies a preamble snippet that will be included in the
22706 It has to be defined using
22707 \begin_inset Flex Code
22710 \begin_layout Plain Layout
22716 \SpecialChar \ldots{}
22718 \begin_inset Flex Code
22721 \begin_layout Plain Layout
22728 This command may occur zero or more times.
22731 \begin_layout Description
22732 \begin_inset Flex Code
22735 \begin_layout Plain Layout
22737 \begin_inset space ~
22741 \begin_inset space ~
22749 This command denotes files that are created by the conversion process and
22750 are needed for a particular export format.
22751 If the filename is relative, it is interpreted relative to the master document.
22752 This command may be given zero or more times.
22755 \begin_layout Description
22756 \begin_inset Flex Code
22759 \begin_layout Plain Layout
22761 \begin_inset space ~
22769 The name of a required LaTeX package.
22770 The package is included via
22771 \begin_inset Flex Code
22774 \begin_layout Plain Layout
22782 in the LaTeX preamble.
22783 This command may occur zero or more times.
22786 \begin_layout Description
22787 \begin_inset Flex Code
22790 \begin_layout Plain Layout
22792 \begin_inset space ~
22796 \begin_inset space ~
22799 RotationLatexCommand
22804 This command specifies that the built in LaTeX command should be used for
22806 This command may occur once or not at all.
22809 \begin_layout Description
22810 \begin_inset Flex Code
22813 \begin_layout Plain Layout
22815 \begin_inset space ~
22819 \begin_inset space ~
22827 This command specifies that the built in LaTeX command should be used for
22829 This command may occur once or not at all.
22832 \begin_layout Description
22833 \begin_inset Flex Code
22836 \begin_layout Plain Layout
22838 \begin_inset space ~
22842 \begin_inset space ~
22845 RotationLatexOption
22850 This command specifies that rotation is done via an optional argument.
22851 This command may occur once or not at all.
22854 \begin_layout Description
22855 \begin_inset Flex Code
22858 \begin_layout Plain Layout
22860 \begin_inset space ~
22864 \begin_inset space ~
22872 This command specifies that resizing is done via an optional argument.
22873 This command may occur once or not at all.
22876 \begin_layout Description
22877 \begin_inset Flex Code
22880 \begin_layout Plain Layout
22882 \begin_inset space ~
22886 \begin_inset space ~
22894 This command specifies that clipping is done via an optional argument.
22895 This command may occur once or not at all.
22898 \begin_layout Description
22899 \begin_inset Flex Code
22902 \begin_layout Plain Layout
22904 \begin_inset space ~
22908 \begin_inset space ~
22916 This command specifies that an extra optional argument is used.
22917 This command may occur once or not at all.
22920 \begin_layout Description
22921 \begin_inset Flex Code
22924 \begin_layout Plain Layout
22926 \begin_inset space ~
22934 The file format of the converted file.
22935 This must be the name of a format that is known to LyX (see the
22936 \begin_inset Flex MenuItem
22939 \begin_layout Plain Layout
22940 Tools\SpecialChar \menuseparator
22941 Preferences\SpecialChar \menuseparator
22942 File Handling\SpecialChar \menuseparator
22949 This command must occur exactly once.
22950 If the resulting file format is PDF, you need to specify the format
22951 \begin_inset Flex Code
22954 \begin_layout Plain Layout
22961 This is the PDF format used for including graphics.
22962 The other defined PDF formats are for document export.
22965 \begin_layout Description
22966 \begin_inset Flex Code
22969 \begin_layout Plain Layout
22971 \begin_inset space ~
22979 The file name of the converted file.
22980 The file name must be absolute.
22981 This command must occur exactly once.
22984 \begin_layout Subsection
22985 Preamble definitions
22988 \begin_layout Standard
22989 The external template configuration file may contain additional preamble
22990 definitions enclosed by
22991 \begin_inset Flex Code
22994 \begin_layout Plain Layout
23000 \SpecialChar \ldots{}
23002 \begin_inset Flex Code
23005 \begin_layout Plain Layout
23012 They can be used by the templates in the
23013 \begin_inset Flex Code
23016 \begin_layout Plain Layout
23025 \begin_layout Section
23026 The substitution mechanism
23029 \begin_layout Standard
23030 When the external material facility invokes an external program, it is done
23031 on the basis of a command defined in the template configuration file.
23032 These commands can contain various macros that are expanded before execution.
23033 Execution always take place in the directory of the containing document.
23036 \begin_layout Standard
23037 Also, whenever external material is to be displayed, the name will be produced
23038 by the substitution mechanism, and most other commands in the template
23039 definition support substitution as well.
23042 \begin_layout Standard
23043 The available macros are the following:
23046 \begin_layout Description
23047 \begin_inset Flex Code
23050 \begin_layout Plain Layout
23051 $$AbsOrRelPathMaster
23056 The file path, absolute or relative to the master LyX document.
23059 \begin_layout Description
23060 \begin_inset Flex Code
23063 \begin_layout Plain Layout
23064 $$AbsOrRelPathParent
23069 The file path, absolute or relative to the LyX document.
23072 \begin_layout Description
23073 \begin_inset Flex Code
23076 \begin_layout Plain Layout
23082 The absolute file path.
23085 \begin_layout Description
23086 \begin_inset Flex Code
23089 \begin_layout Plain Layout
23095 The filename without path and without the extension.
23098 \begin_layout Description
23099 \begin_inset Flex Code
23102 \begin_layout Plain Layout
23104 \begin_inset Quotes eld
23108 \begin_inset Quotes erd
23116 This macro will expand to the contents of the file with the name
23117 \begin_inset Flex Code
23120 \begin_layout Plain Layout
23129 \begin_layout Description
23130 \begin_inset Flex Code
23133 \begin_layout Plain Layout
23139 The file extension (including the dot).
23142 \begin_layout Description
23143 \begin_inset Flex Code
23146 \begin_layout Plain Layout
23152 The filename of the file specified in the external material dialog.
23153 This is either an absolute name, or it is relative to the LyX document.
23156 \begin_layout Description
23157 \begin_inset Flex Code
23160 \begin_layout Plain Layout
23167 \begin_inset Flex Code
23170 \begin_layout Plain Layout
23176 (absolute name or relative to the LyX document).
23179 \begin_layout Description
23180 \begin_inset Flex Code
23183 \begin_layout Plain Layout
23189 The file path, relative to the master LyX document.
23192 \begin_layout Description
23193 \begin_inset Flex Code
23196 \begin_layout Plain Layout
23202 The file path, relative to the LyX document.
23205 \begin_layout Description
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23215 This macro will expand to the absolute path of the system directory.
23216 This is typically used to point to the various helper scripts that are
23220 \begin_layout Description
23221 \begin_inset Flex Code
23224 \begin_layout Plain Layout
23230 A name and full path to a temporary file which will be automatically deleted
23231 whenever the containing document is closed, or the external material insertion
23235 \begin_layout Standard
23236 All path macros contain a trailing directory separator, so you can construct
23238 \begin_inset space \thinspace{}
23242 \begin_inset space \space{}
23245 the absolute filename with
23246 \begin_inset Flex Code
23249 \begin_layout Plain Layout
23250 $$AbsPath$$Basename$$Extension
23258 \begin_layout Standard
23259 The macros above are substituted in all commands unless otherwise noted.
23261 \begin_inset Flex Code
23264 \begin_layout Plain Layout
23270 supports additionally the following substitutions if they are enabled by
23272 \begin_inset Flex Code
23275 \begin_layout Plain Layout
23282 \begin_inset Flex Code
23285 \begin_layout Plain Layout
23294 \begin_layout Description
23295 \begin_inset Flex Code
23298 \begin_layout Plain Layout
23304 The front part of the resize command.
23307 \begin_layout Description
23308 \begin_inset Flex Code
23311 \begin_layout Plain Layout
23317 The back part of the resize command.
23320 \begin_layout Description
23321 \begin_inset Flex Code
23324 \begin_layout Plain Layout
23330 The front part of the rotation command.
23333 \begin_layout Description
23334 \begin_inset Flex Code
23337 \begin_layout Plain Layout
23343 The back part of the rotation command.
23346 \begin_layout Standard
23347 The value string of the
23348 \begin_inset Flex Code
23351 \begin_layout Plain Layout
23357 command supports additionally the following substitutions if they are enabled
23359 \begin_inset Flex Code
23362 \begin_layout Plain Layout
23369 \begin_inset Flex Code
23372 \begin_layout Plain Layout
23381 \begin_layout Description
23382 \begin_inset Flex Code
23385 \begin_layout Plain Layout
23394 \begin_layout Description
23395 \begin_inset Flex Code
23398 \begin_layout Plain Layout
23407 \begin_layout Description
23408 \begin_inset Flex Code
23411 \begin_layout Plain Layout
23420 \begin_layout Description
23421 \begin_inset Flex Code
23424 \begin_layout Plain Layout
23430 The rotation option.
23433 \begin_layout Standard
23434 You may ask why there are so many path macros.
23435 There are mainly two reasons:
23438 \begin_layout Enumerate
23439 Relative and absolute file names should remain relative or absolute, respectivel
23441 Users may have reasons to prefer either form.
23442 Relative names are useful for portable documents that should work on different
23443 machines, for example.
23444 Absolute names may be required by some programs.
23447 \begin_layout Enumerate
23448 LaTeX treats relative file names differently than LyX and other programs
23449 in nested included files.
23450 For LyX, a relative file name is always relative to the document that contains
23452 For LaTeX, it is always relative to the master document.
23453 These two definitions are identical if you have only one document, but
23454 differ if you have a master document that includes part documents.
23455 That means that relative filenames must be transformed when presented to
23457 Fortunately LyX does this automatically for you if you choose the right
23461 \begin_layout Standard
23462 So which path macro should be used in new template definitions? The rule
23466 \begin_layout Itemize
23468 \begin_inset Flex Code
23471 \begin_layout Plain Layout
23477 if an absolute path is required.
23480 \begin_layout Itemize
23482 \begin_inset Flex Code
23485 \begin_layout Plain Layout
23486 $$AbsOrRelPathMaster
23491 if the substituted string is some kind of LaTeX input.
23494 \begin_layout Itemize
23496 \begin_inset Flex Code
23499 \begin_layout Plain Layout
23500 $$AbsOrRelPathParent
23505 in order to preserve the user's choice.
23508 \begin_layout Standard
23509 There are special cases where this rule does not work and e.
23510 \begin_inset space \thinspace{}
23514 \begin_inset space \space{}
23517 relative names are needed, but normally it will work just fine.
23518 One example for such a case is the command
23519 \begin_inset Flex Code
23522 \begin_layout Plain Layout
23523 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23528 in the XFig template above: We can't use the absolute name because the
23530 \begin_inset Flex Code
23533 \begin_layout Plain Layout
23539 files needs the relative name in order to rewrite the file content.
23542 \begin_layout Section
23543 Security discussion
23544 \begin_inset CommandInset label
23546 name "sec:Security-discussion"
23553 \begin_layout Standard
23554 The external material feature interfaces with a lot of external programs
23555 and does so automatically, so we have to consider the security implications
23557 In particular, since you have the option of including your own filenames
23558 and/or parameter strings and those are expanded into a command, it seems
23559 that it would be possible to create a malicious document which executes
23560 arbitrary commands when a user views or prints the document.
23561 This is something we definitely want to avoid.
23564 \begin_layout Standard
23565 However, since the external program commands are specified in the template
23566 configuration file only, there are no security issues if LyX is properly
23567 configured with safe templates only.
23568 This is so because the external programs are invoked with the
23569 \begin_inset Flex Code
23572 \begin_layout Plain Layout
23578 -system call rather than the
23579 \begin_inset Flex Code
23582 \begin_layout Plain Layout
23588 system-call, so it's not possible to execute arbitrary commands from the
23589 filename or parameter section via the shell.
23592 \begin_layout Standard
23593 This also implies that you are restricted in what command strings you can
23594 use in the external material templates.
23595 In particular, pipes and redirection are not readily available.
23596 This has to be so if LyX should remain safe.
23597 If you want to use some of the shell features, you should write a safe
23598 script to do this in a controlled manner, and then invoke the script from
23599 the command string.
23603 \begin_layout Standard
23604 It is possible to design a template that interacts directly with the shell,
23605 but since this would allow a malicious user to execute arbitrary commands
23606 by writing clever filenames and/or parameters, we generally recommend that
23607 you only use safe scripts that work with the
23608 \begin_inset Flex Code
23611 \begin_layout Plain Layout
23617 system call in a controlled manner.
23618 Of course, for use in a controlled environment, it can be tempting to just
23619 fall back to use ordinary shell scripts.
23620 If you do so, be aware that you
23624 provide an easily exploitable security hole in your system.
23625 Of course it stands to reason that such unsafe templates will never be
23626 included in the standard LyX distribution, although we do encourage people
23627 to submit new templates in the open source tradition.
23628 But LyX as shipped from the official distribution channels will never have
23632 \begin_layout Standard
23633 Including external material provides a lot of power, and you have to be
23634 careful not to introduce security hazards with this power.
23635 A subtle error in a single line in an innocent looking script can open
23636 the door to huge security problems.
23637 So if you do not fully understand the issues, we recommend that you consult
23638 a knowledgeable security professional or the LyX development team if you
23639 have any questions about whether a given template is safe or not.
23640 And do this before you use it in an uncontrolled environment.
23643 \begin_layout Chapter
23645 List of supported LyX functions to be used in layouts
23646 \begin_inset CommandInset label
23648 name "chap:List-of-functions"
23655 \begin_layout Standard
23657 \begin_inset Tabular
23658 <lyxtabular version="3" rows="11" columns="8">
23659 <features tabularvalignment="middle">
23660 <column alignment="left" valignment="top">
23661 <column alignment="left" valignment="top">
23662 <column alignment="left" valignment="top">
23663 <column alignment="left" valignment="top">
23664 <column alignment="left" valignment="top">
23665 <column alignment="left" valignment="top">
23666 <column alignment="left" valignment="top">
23667 <column alignment="left" valignment="top">
23669 <cell alignment="left" valignment="top" usebox="none">
23672 \begin_layout Plain Layout
23678 <cell alignment="left" valignment="top" usebox="none">
23681 \begin_layout Plain Layout
23687 <cell alignment="left" valignment="top" usebox="none">
23690 \begin_layout Plain Layout
23696 <cell alignment="left" valignment="top" usebox="none">
23699 \begin_layout Plain Layout
23705 <cell alignment="center" valignment="top" usebox="none">
23708 \begin_layout Plain Layout
23714 <cell alignment="center" valignment="top" usebox="none">
23717 \begin_layout Plain Layout
23723 <cell alignment="center" valignment="top" usebox="none">
23726 \begin_layout Plain Layout
23732 <cell alignment="center" valignment="top" usebox="none">
23735 \begin_layout Plain Layout
23743 <cell alignment="left" valignment="top" usebox="none">
23746 \begin_layout Plain Layout
23752 <cell alignment="left" valignment="top" usebox="none">
23755 \begin_layout Plain Layout
23761 <cell alignment="left" valignment="top" usebox="none">
23764 \begin_layout Plain Layout
23770 <cell alignment="left" valignment="top" usebox="none">
23773 \begin_layout Plain Layout
23779 <cell alignment="center" valignment="top" usebox="none">
23782 \begin_layout Plain Layout
23788 <cell alignment="center" valignment="top" usebox="none">
23791 \begin_layout Plain Layout
23797 <cell alignment="center" valignment="top" usebox="none">
23800 \begin_layout Plain Layout
23806 <cell alignment="center" valignment="top" usebox="none">
23809 \begin_layout Plain Layout
23817 <cell alignment="left" valignment="top" usebox="none">
23820 \begin_layout Plain Layout
23826 <cell alignment="left" valignment="top" usebox="none">
23829 \begin_layout Plain Layout
23835 <cell alignment="left" valignment="top" usebox="none">
23838 \begin_layout Plain Layout
23844 <cell alignment="left" valignment="top" usebox="none">
23847 \begin_layout Plain Layout
23853 <cell alignment="center" valignment="top" usebox="none">
23856 \begin_layout Plain Layout
23862 <cell alignment="center" valignment="top" usebox="none">
23865 \begin_layout Plain Layout
23871 <cell alignment="center" valignment="top" usebox="none">
23874 \begin_layout Plain Layout
23880 <cell alignment="center" valignment="top" usebox="none">
23883 \begin_layout Plain Layout
23891 <cell alignment="left" valignment="top" usebox="none">
23894 \begin_layout Plain Layout
23900 <cell alignment="left" valignment="top" usebox="none">
23903 \begin_layout Plain Layout
23909 <cell alignment="left" valignment="top" usebox="none">
23912 \begin_layout Plain Layout
23918 <cell alignment="left" valignment="top" usebox="none">
23921 \begin_layout Plain Layout
23927 <cell alignment="center" valignment="top" usebox="none">
23930 \begin_layout Plain Layout
23936 <cell alignment="center" valignment="top" usebox="none">
23939 \begin_layout Plain Layout
23945 <cell alignment="center" valignment="top" usebox="none">
23948 \begin_layout Plain Layout
23954 <cell alignment="center" valignment="top" usebox="none">
23957 \begin_layout Plain Layout
23965 <cell alignment="left" valignment="top" usebox="none">
23968 \begin_layout Plain Layout
23974 <cell alignment="left" valignment="top" usebox="none">
23977 \begin_layout Plain Layout
23983 <cell alignment="left" valignment="top" usebox="none">
23986 \begin_layout Plain Layout
23992 <cell alignment="left" valignment="top" usebox="none">
23995 \begin_layout Plain Layout
24001 <cell alignment="center" valignment="top" usebox="none">
24004 \begin_layout Plain Layout
24010 <cell alignment="center" valignment="top" usebox="none">
24013 \begin_layout Plain Layout
24019 <cell alignment="center" valignment="top" usebox="none">
24022 \begin_layout Plain Layout
24028 <cell alignment="center" valignment="top" usebox="none">
24031 \begin_layout Plain Layout
24039 <cell alignment="left" valignment="top" usebox="none">
24042 \begin_layout Plain Layout
24048 <cell alignment="left" valignment="top" usebox="none">
24051 \begin_layout Plain Layout
24057 <cell alignment="left" valignment="top" usebox="none">
24060 \begin_layout Plain Layout
24066 <cell alignment="left" valignment="top" usebox="none">
24069 \begin_layout Plain Layout
24075 <cell alignment="center" valignment="top" usebox="none">
24078 \begin_layout Plain Layout
24084 <cell alignment="center" valignment="top" usebox="none">
24087 \begin_layout Plain Layout
24093 <cell alignment="center" valignment="top" usebox="none">
24096 \begin_layout Plain Layout
24102 <cell alignment="center" valignment="top" usebox="none">
24105 \begin_layout Plain Layout
24113 <cell alignment="left" valignment="top" usebox="none">
24116 \begin_layout Plain Layout
24122 <cell alignment="left" valignment="top" usebox="none">
24125 \begin_layout Plain Layout
24131 <cell alignment="left" valignment="top" usebox="none">
24134 \begin_layout Plain Layout
24140 <cell alignment="left" valignment="top" usebox="none">
24143 \begin_layout Plain Layout
24149 <cell alignment="center" valignment="top" usebox="none">
24152 \begin_layout Plain Layout
24158 <cell alignment="center" valignment="top" usebox="none">
24161 \begin_layout Plain Layout
24167 <cell alignment="center" valignment="top" usebox="none">
24170 \begin_layout Plain Layout
24176 <cell alignment="center" valignment="top" usebox="none">
24179 \begin_layout Plain Layout
24187 <cell alignment="left" valignment="top" usebox="none">
24190 \begin_layout Plain Layout
24196 <cell alignment="left" valignment="top" usebox="none">
24199 \begin_layout Plain Layout
24205 <cell alignment="left" valignment="top" usebox="none">
24208 \begin_layout Plain Layout
24214 <cell alignment="left" valignment="top" usebox="none">
24217 \begin_layout Plain Layout
24223 <cell alignment="center" valignment="top" usebox="none">
24226 \begin_layout Plain Layout
24232 <cell alignment="center" valignment="top" usebox="none">
24235 \begin_layout Plain Layout
24241 <cell alignment="center" valignment="top" usebox="none">
24244 \begin_layout Plain Layout
24250 <cell alignment="center" valignment="top" usebox="none">
24253 \begin_layout Plain Layout
24261 <cell alignment="left" valignment="top" usebox="none">
24264 \begin_layout Plain Layout
24270 <cell alignment="left" valignment="top" usebox="none">
24273 \begin_layout Plain Layout
24279 <cell alignment="left" valignment="top" usebox="none">
24282 \begin_layout Plain Layout
24288 <cell alignment="left" valignment="top" usebox="none">
24291 \begin_layout Plain Layout
24297 <cell alignment="center" valignment="top" usebox="none">
24300 \begin_layout Plain Layout
24306 <cell alignment="center" valignment="top" usebox="none">
24309 \begin_layout Plain Layout
24315 <cell alignment="center" valignment="top" usebox="none">
24318 \begin_layout Plain Layout
24324 <cell alignment="center" valignment="top" usebox="none">
24327 \begin_layout Plain Layout
24335 <cell alignment="left" valignment="top" usebox="none">
24338 \begin_layout Plain Layout
24344 <cell alignment="left" valignment="top" usebox="none">
24347 \begin_layout Plain Layout
24353 <cell alignment="left" valignment="top" usebox="none">
24356 \begin_layout Plain Layout
24362 <cell alignment="left" valignment="top" usebox="none">
24365 \begin_layout Plain Layout
24371 <cell alignment="center" valignment="top" usebox="none">
24374 \begin_layout Plain Layout
24380 <cell alignment="center" valignment="top" usebox="none">
24383 \begin_layout Plain Layout
24389 <cell alignment="center" valignment="top" usebox="none">
24392 \begin_layout Plain Layout
24398 <cell alignment="center" valignment="top" usebox="none">
24401 \begin_layout Plain Layout
24409 <cell alignment="center" valignment="top" usebox="none">
24412 \begin_layout Plain Layout
24418 <cell alignment="center" valignment="top" usebox="none">
24421 \begin_layout Plain Layout
24427 <cell alignment="center" valignment="top" usebox="none">
24430 \begin_layout Plain Layout
24436 <cell alignment="center" valignment="top" usebox="none">
24439 \begin_layout Plain Layout
24445 <cell alignment="center" valignment="top" usebox="none">
24448 \begin_layout Plain Layout
24454 <cell alignment="center" valignment="top" usebox="none">
24457 \begin_layout Plain Layout
24463 <cell alignment="center" valignment="top" usebox="none">
24466 \begin_layout Plain Layout
24472 <cell alignment="center" valignment="top" usebox="none">
24475 \begin_layout Plain Layout
24489 \begin_layout Chapter
24490 Names of available colors to be used in layouts
24491 \begin_inset CommandInset label
24493 name "chap:Names-of-colors"
24500 \begin_layout Standard
24501 The colors listed here are the standard colors and the those that you can
24502 adjust in the LyX preferences.
24505 \begin_layout Description
24518 No particular color -- clear or default
24521 \begin_layout Description
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
24554 added_space Added space marker color
24557 \begin_layout Description
24558 addedtext Added text color
24561 \begin_layout Description
24562 appendix Appendix marker color
24565 \begin_layout Description
24566 background Background color
24569 \begin_layout Description
24570 bottomarea Bottom area color
24573 \begin_layout Description
24574 branchlabel Label color for branches
24577 \begin_layout Description
24578 buttonbg Color used for bottom background
24581 \begin_layout Description
24582 buttonhoverbg Color used for button background under focus
24585 \begin_layout Description
24586 buttonframe Color for inset button frames
24589 \begin_layout Description
24590 changebar Changebar color
24593 \begin_layout Description
24594 changedtextauthor1 Changed text color author 1
24597 \begin_layout Description
24598 changedtextauthor2 Changed text color author 2
24601 \begin_layout Description
24602 changedtextauthor3 Changed text color author 3
24605 \begin_layout Description
24606 changedtextauthor4 Changed text color author 4
24609 \begin_layout Description
24610 changedtextauthor5 Changed text color author 5
24613 \begin_layout Description
24614 collapsable_inset_frame Collapsable insets framecolor
24617 \begin_layout Description
24618 collapsable_inset_text Collapsable insets text color
24621 \begin_layout Description
24622 command Text color for command insets
24625 \begin_layout Description
24626 commandbg Background color for command insets
24629 \begin_layout Description
24630 commandframe Frame color for command insets
24633 \begin_layout Description
24634 comment color for comments
24637 \begin_layout Description
24638 commentbg Background color of comments
24641 \begin_layout Description
24642 cursor Cursor color
24645 \begin_layout Description
24646 deletedtext Deleted text color
24649 \begin_layout Description
24650 deletedtextmodifier Deleted text modifying color
24653 \begin_layout Description
24654 depthbar Color for the depth bars in the margin
24657 \begin_layout Description
24658 eolmarker End of line marker color
24661 \begin_layout Description
24662 error Color of the LaTeX error box
24665 \begin_layout Description
24666 footlabel Label color for footnotes
24669 \begin_layout Description
24670 graphicsbg Graphics inset background color
24673 \begin_layout Description
24674 greyedout Label color for greyedout insets
24677 \begin_layout Description
24678 greyedoutbg Background color of greyedout inset
24681 \begin_layout Description
24682 greyedouttext Color for greyedout inset text
24685 \begin_layout Description
24686 indexlabel Label color for index insets
24689 \begin_layout Description
24690 ignore The color is ignored
24693 \begin_layout Description
24694 inherit The color is inherited
24697 \begin_layout Description
24698 inlinecompletion Inline completion color
24701 \begin_layout Description
24702 insetbg Inset marker background color
24705 \begin_layout Description
24706 insetframe Inset marker frame color
24709 \begin_layout Description
24710 language Color for marking foreign language words
24713 \begin_layout Description
24714 latex Text color in LaTeX mode
24717 \begin_layout Description
24718 listingsbg Background color of listings inset
24721 \begin_layout Description
24722 marginlabel Label color for margin notes
24725 \begin_layout Description
24726 math Math inset text color
24729 \begin_layout Description
24730 mathbg Math inset background color
24733 \begin_layout Description
24734 mathcorners Math inset frame color not under focus
24737 \begin_layout Description
24738 mathframe Math inset frame color under focus
24741 \begin_layout Description
24742 mathline Math line color
24745 \begin_layout Description
24746 mathmacrobg Macro math inset background color
24749 \begin_layout Description
24750 mathmacroblend Macro math blended color
24753 \begin_layout Description
24754 mathmacroframe Macro math frame color
24757 \begin_layout Description
24758 mathmacrohoverbg Macro math inset background color hovered
24761 \begin_layout Description
24762 mathmacrolabel Macro math label color
24765 \begin_layout Description
24766 mathmacronewarg Macro template color for new parameters
24769 \begin_layout Description
24770 mathmacrooldarg Macro template color for old parameters
24773 \begin_layout Description
24774 newpage New page color
24777 \begin_layout Description
24778 nonunique_inlinecompletion Inline completion color for the non-unique part
24781 \begin_layout Description
24782 notebg Background color of notes
24785 \begin_layout Description
24786 notelabel Label color for notes
24789 \begin_layout Description
24790 pagebreak Page break/line break color
24793 \begin_layout Description
24794 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24797 \begin_layout Description
24798 phantomtext Text color for phantom insets
24801 \begin_layout Description
24802 preview The color used for previews
24805 \begin_layout Description
24806 previewframe Preview frame color
24809 \begin_layout Description
24810 regexpframe Color for regexp frame
24813 \begin_layout Description
24814 selection Background color of selected text
24817 \begin_layout Description
24818 selectiontext Foreground color of selected text
24821 \begin_layout Description
24822 shadedbg Background color of shaded box
24825 \begin_layout Description
24826 special Special chars text color
24829 \begin_layout Description
24830 tabularline Table line color
24833 \begin_layout Description
24834 tabularonoffline Table line color
24837 \begin_layout Description
24838 urllabel Label color for URL insets
24841 \begin_layout Description
24842 urltext Color for URL inset text