1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % increase link area for cross-references and autoname them,
35 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
36 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
37 \addto\extrasenglish{%
38 \renewcommand*{\equationautorefname}[1]{}%
39 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
40 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout Flex:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 # In case we need to do with sans...
65 #InsetLayout CharStyle:Code
70 #\renewcommand{\code}[1]{{\sffamily #1}}
75 \language_package default
80 \font_typewriter default
82 \font_default_family default
83 \use_non_tex_fonts false
89 \default_output_format default
91 \bibtex_command default
92 \index_command default
96 \pdf_title "LyX Configuration Manual"
97 \pdf_author "LyX Team"
98 \pdf_subject "LyX-documentation Customization"
99 \pdf_keywords "LyX, documentation, customization"
101 \pdf_bookmarksnumbered true
102 \pdf_bookmarksopen true
103 \pdf_bookmarksopenlevel 1
104 \pdf_breaklinks false
108 \pdf_pdfusetitle false
109 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
112 \use_package amsmath 0
113 \use_package amssymb 0
114 \use_package cancel 0
116 \use_package mathdots 1
117 \use_package mathtools 0
118 \use_package mhchem 0
119 \use_package stackrel 0
120 \use_package stmaryrd 0
121 \use_package undertilde 0
123 \cite_engine_type default
127 \paperorientation portrait
142 \paragraph_separation indent
143 \paragraph_indentation default
144 \quotes_language english
147 \paperpagestyle headings
148 \tracking_changes false
149 \output_changes false
158 Customizing LyX: Features for the Advanced User
166 \begin_layout Plain Layout
168 If you have comments or error corrections, please send them to the LyX Documenta
170 \begin_inset CommandInset href
172 target "lyx-docs@lists.lyx.org"
179 \begin_inset Quotes eld
183 \begin_inset Quotes erd
186 in the subject header, and please cc the current maintainer of this file,
187 Richard Heck <rgheck@comcast.net>.
193 \begin_inset Newline newline
197 \begin_inset Newline newline
203 \begin_layout Standard
204 \begin_inset CommandInset toc
205 LatexCommand tableofcontents
212 \begin_layout Standard
213 \begin_inset Note Note
216 \begin_layout Plain Layout
217 Please use change tracking when modifying this document.
218 This makes it easier for our translators to recognize things that have
219 been changed, and it helps the maintainer keep up-to-date with what's been
228 \begin_layout Chapter
232 \begin_layout Standard
233 This manual covers the customization features present in LyX.
234 In it, we discuss issues like keyboard shortcuts, screen previewing options,
235 printer options, sending commands to LyX via the LyX Server, internationalizati
236 on, installing new LaTeX classes and LyX layouts, etc.
237 We can't possibly hope to touch on everything you can change—our developers
238 add new features faster than we can document them—but we will explain the
239 most common customizations and hopefully point you in the right direction
240 for some of the more obscure ones.
243 \begin_layout Standard
244 \begin_inset Branch OutDated
247 \begin_layout Standard
248 Information from previous versions of this document that now seems to be
249 outdated is contained in the OutDated branch of this document.
250 By default, this information will not appear in the LaTeX output.
258 \begin_layout Chapter
259 LyX configuration files
262 \begin_layout Standard
263 This chapter aims to help you to find your way through the LyX configuration
265 Before continuing to read this chapter, you should find out where your
266 LyX library and user directories are by using
267 \begin_inset Flex MenuItem
270 \begin_layout Plain Layout
271 Help\SpecialChar \menuseparator
282 The library directory is the place where LyX places its system-wide configurati
283 on files; the user directory is where you can place your modified versions.
284 We will call the former
285 \begin_inset Flex Code
288 \begin_layout Plain Layout
295 \begin_inset Flex MenuItem
298 \begin_layout Plain Layout
304 in the remainder of this document.
308 \begin_layout Section
310 \begin_inset Flex Code
313 \begin_layout Plain Layout
322 \begin_layout Standard
323 \begin_inset Flex Code
326 \begin_layout Plain Layout
332 and its sub-directories contain a number of files and that can be used
333 to customize LyX's behavior.
334 You can change many of these files from within LyX itself through the
335 \begin_inset Flex MenuItem
338 \begin_layout Plain Layout
339 Tools\SpecialChar \menuseparator
346 Most customization that you will want to do in LyX is possible through
348 However, many other inner aspects of LyX can be customized by modifying
350 \begin_inset Flex Code
353 \begin_layout Plain Layout
360 These files fall in different categories, described in the following subsection
364 \begin_layout Subsection
365 Automatically generated files
368 \begin_layout Standard
369 The files, which are to be found in
370 \begin_inset Flex MenuItem
373 \begin_layout Plain Layout
379 , are generated when you configure LyX.
380 They contain various default values that are guessed by inspection.
381 In general, it is not a good idea to modify them, since they might be overwritt
385 \begin_layout Labeling
386 \labelwidthstring 00.00.0000
387 \begin_inset Flex Code
390 \begin_layout Plain Layout
396 contains defaults for various commands.
399 \begin_layout Labeling
400 \labelwidthstring 00.00.0000
401 \begin_inset Flex Code
404 \begin_layout Plain Layout
410 contains the list of packages that have been recognized by LyX.
411 It is currently unused by the LyX program itself, but the information extracted
412 , and more, is made available with
413 \begin_inset Flex MenuItem
416 \begin_layout Plain Layout
417 Help\SpecialChar \menuseparator
430 \begin_layout Labeling
431 \labelwidthstring 00.00.0000
432 \begin_inset Flex Code
435 \begin_layout Plain Layout
441 the list of text classes that have been found in your
442 \begin_inset Flex Code
445 \begin_layout Plain Layout
451 directories, along with the associated LaTeX document class and their descripti
455 \begin_layout Labeling
456 \labelwidthstring 00.00.0000
457 \begin_inset Flex Code
460 \begin_layout Plain Layout
466 the list of layout modules found in your
467 \begin_inset Flex Code
470 \begin_layout Plain Layout
479 \begin_layout Labeling
480 \labelwidthstring 00.00.0000
481 \begin_inset Flex Code
484 \begin_layout Plain Layout
490 lists of various sorts of LaTeX-related files found on your system
493 \begin_layout Labeling
494 \labelwidthstring 00.00.0000
495 \begin_inset Flex Code
498 \begin_layout Plain Layout
504 is automatically generated during configuration from the file
505 \begin_inset Flex Code
508 \begin_layout Plain Layout
515 It contains information on your LaTeX configuration.
518 \begin_layout Subsection
522 \begin_layout Standard
523 These directories are duplicated between
524 \begin_inset Flex Code
527 \begin_layout Plain Layout
534 \begin_inset Flex Code
537 \begin_layout Plain Layout
544 If a particular files exists in both places, the one in
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
557 \begin_layout Labeling
558 \labelwidthstring 00.00.0000
559 \begin_inset Flex Code
562 \begin_layout Plain Layout
568 this directory contains files with the extension
569 \begin_inset Flex Code
572 \begin_layout Plain Layout
578 that define the keybindings used in LyX.
579 If there exists an internationalized version of the bind file named
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
589 , that will be used first.
592 \begin_layout Labeling
593 \labelwidthstring 00.00.0000
594 \begin_inset Flex Code
597 \begin_layout Plain Layout
603 contains graphics files that can be included in documents.
607 \begin_layout Labeling
608 \labelwidthstring 00.00.0000
609 \begin_inset Flex Code
612 \begin_layout Plain Layout
618 contains LyX documentation files (including the one you are currently reading).
620 \begin_inset Flex Code
623 \begin_layout Plain Layout
629 deserves special attention, as noted above.
630 The internationalized help docs are in subdirectories
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
641 \begin_inset Quotes eld
645 \begin_inset Quotes erd
648 is the ISO language code.
650 \begin_inset CommandInset ref
652 reference "cha:Internationalizing-LyX"
659 \begin_layout Labeling
660 \labelwidthstring 00.00.0000
661 \begin_inset Flex Code
664 \begin_layout Plain Layout
670 contains example files that explain how to use some features.
671 In the file browser, press the
672 \begin_inset Flex MenuItem
675 \begin_layout Plain Layout
684 \begin_layout Labeling
685 \labelwidthstring 00.00.0000
686 \begin_inset Flex Code
689 \begin_layout Plain Layout
695 contains image files that are used by the
696 \begin_inset Flex MenuItem
699 \begin_layout Plain Layout
706 In addition, it also contains the individual icons used in the toolbar
707 and the banners that can be shown when LyX is launched.
710 \begin_layout Labeling
711 \labelwidthstring 00.00.0000
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
721 contains keyboard keymapping files.
723 \begin_inset CommandInset ref
725 reference "sec:International-Keymap-Stuff"
732 \begin_layout Labeling
733 \labelwidthstring 00.00.0000
734 \begin_inset Flex Code
737 \begin_layout Plain Layout
743 contains the text class and module files described in
744 \begin_inset CommandInset ref
746 reference "cha:Installing-New-Document"
753 \begin_layout Labeling
754 \labelwidthstring 00.00.0000
755 \begin_inset Flex Code
758 \begin_layout Plain Layout
765 \begin_inset Flex Code
768 \begin_layout Plain Layout
774 Python scripts used to convert between LyX versions.
775 These can be run from the command line if, say, you want to batch-convert
779 \begin_layout Labeling
780 \labelwidthstring 00.00.0000
781 \begin_inset Flex Code
784 \begin_layout Plain Layout
790 contains some files that demonstrate the capabilities of the
791 \begin_inset Flex MenuItem
794 \begin_layout Plain Layout
805 Also contains some scripts used by LyX itself.
808 \begin_layout Labeling
809 \labelwidthstring 00.00.0000
810 \begin_inset Flex Code
813 \begin_layout Plain Layout
819 contains the standard LyX template files described in
820 \begin_inset CommandInset ref
822 reference "sub:Creating-Templates"
829 \begin_layout Labeling
830 \labelwidthstring 00.00.0000
831 \begin_inset Flex Code
834 \begin_layout Plain Layout
840 contains files with the extension
841 \begin_inset Flex Code
844 \begin_layout Plain Layout
850 that define the user interface to LyX.
851 That is, the files define which items appear in which menus and the items
852 appearing on the toolbar.
855 \begin_layout Subsection
856 Files you don't want to modify
859 \begin_layout Standard
860 These files are used internally by LyX and you generally do not need to
861 modify them unless you are a developer.
864 \begin_layout Labeling
865 \labelwidthstring 00.00.0000
866 \begin_inset Flex Code
869 \begin_layout Plain Layout
875 this file contains the list of LyX developers.
876 The contents are displayed with the menu entry
877 \begin_inset Flex MenuItem
880 \begin_layout Plain Layout
881 Help\SpecialChar \menuseparator
894 \begin_layout Labeling
895 \labelwidthstring 00.00.0000
896 \begin_inset Flex Code
899 \begin_layout Plain Layout
905 this is a LaTeX script used during the configuration process.
909 \begin_layout Labeling
910 \labelwidthstring 00.00.0000
911 \begin_inset Flex Code
914 \begin_layout Plain Layout
920 this is the script that is used to re-configure LyX.
921 It creates configuration files in the directory it was run from.
924 \begin_layout Subsection
925 Other files needing a line or two
928 \begin_layout Labeling
929 \labelwidthstring 00.00.0000
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
939 this contains tables describing how different character encodings can be
943 \begin_layout Labeling
944 \labelwidthstring 00.00.0000
945 \begin_inset Flex Code
948 \begin_layout Plain Layout
954 this file contains the templates available to the new
955 \begin_inset Flex MenuItem
958 \begin_layout Plain Layout
969 \begin_inset CommandInset ref
971 reference "chap:Including-External-Material"
978 \begin_layout Labeling
979 \labelwidthstring 00.00.0000
980 \begin_inset Flex Code
983 \begin_layout Plain Layout
989 this file contains a list of all the languages currently supported by LyX.
992 \begin_layout Labeling
993 \labelwidthstring 00.00.0000
994 \begin_inset Flex Code
997 \begin_layout Plain Layout
1003 contains information about the supported fonts.
1006 \begin_layout Labeling
1007 \labelwidthstring 00.00.0000
1008 \begin_inset Flex Code
1011 \begin_layout Plain Layout
1017 this file contains translations for internationalized paragraph styles
1019 \begin_inset CommandInset ref
1021 reference "sub:I18n"
1028 \begin_layout Labeling
1029 \labelwidthstring 00.00.0000
1030 \begin_inset Flex Code
1033 \begin_layout Plain Layout
1039 this file contains information about unicode-encoded glyphs and the way
1040 they are supported by LyX via LaTeX.
1043 \begin_layout Section
1044 Your local configuration directory
1047 \begin_layout Standard
1048 Even if you are using LyX as an unprivileged user, you might want to change
1049 LyX configuration for your own use.
1051 \begin_inset Flex Code
1054 \begin_layout Plain Layout
1060 directory contains all your personal configuration files.
1061 This is the directory described as
1062 \begin_inset Quotes eld
1066 \begin_inset Quotes erd
1070 \begin_inset Flex MenuItem
1073 \begin_layout Plain Layout
1074 Help\SpecialChar \menuseparator
1076 \begin_inset space ~
1085 This directory is used as a mirror of
1086 \begin_inset Flex Code
1089 \begin_layout Plain Layout
1095 , which means that every file in
1096 \begin_inset Flex Code
1099 \begin_layout Plain Layout
1105 is a replacement for the corresponding file in
1106 \begin_inset Flex Code
1109 \begin_layout Plain Layout
1116 Any configuration file described in the above sections can be placed either
1117 in the system-wide directory, in which case it will affect all users, or
1118 in your local directory for your own use.
1121 \begin_layout Standard
1122 To make things clearer, let's provide a few examples:
1125 \begin_layout Itemize
1126 The preferences set in the
1127 \begin_inset Flex MenuItem
1130 \begin_layout Plain Layout
1131 Tools\SpecialChar \menuseparator
1137 dialog are saved to a file
1138 \begin_inset Flex Code
1141 \begin_layout Plain Layout
1148 \begin_inset Flex Code
1151 \begin_layout Plain Layout
1160 \begin_layout Itemize
1161 When you reconfigure using
1162 \begin_inset Flex MenuItem
1165 \begin_layout Plain Layout
1166 Tools\SpecialChar \menuseparator
1173 \begin_inset Flex Code
1176 \begin_layout Plain Layout
1182 script, and the resulting files are written in your local configuration
1184 This means that any additional text class file that you might have added
1186 \begin_inset Flex Code
1189 \begin_layout Plain Layout
1195 will be added to the list of classes in the
1196 \begin_inset Flex MenuItem
1199 \begin_layout Plain Layout
1200 Document\SpecialChar \menuseparator
1209 \begin_layout Itemize
1210 If you get some updated documentation from LyX ftp site and cannot install
1211 it because you do not have sysadmin rights on your system, you can just
1213 \begin_inset Flex Code
1216 \begin_layout Plain Layout
1222 and the items in the
1223 \begin_inset Flex MenuItem
1226 \begin_layout Plain Layout
1232 menu will open them!
1235 \begin_layout Section
1236 Running LyX with multiple configurations
1239 \begin_layout Standard
1240 The configuration freedom of the local configuration directory may not suffice
1241 if you want to have more than one configuration at your disposal.
1242 For example, you may want to be use different key bindings or printer settings
1244 You can achieve this by having several such directories.
1245 You then specify which directory to use at run-time.
1248 \begin_layout Standard
1249 Invoking LyX with the command line switch
1250 \begin_inset Flex Code
1253 \begin_layout Plain Layout
1263 instructs the program to read the configuration from that directory, and
1264 not from the default directory.
1265 (You can determine the default directory by running LyX without the
1266 \begin_inset Flex Code
1269 \begin_layout Plain Layout
1275 switch.) If the specified directory does not exist, LyX offers to create
1276 it for you, just like it does for the default directory on the first time
1277 you run the program.
1278 You can modify the configuration options in this additional user directory
1279 exactly as you would for the default directory.
1280 These directories are completely independent (but read on).
1281 Note that setting the environment variable
1282 \begin_inset Flex Code
1285 \begin_layout Plain Layout
1291 to some value has exactly the same effect.
1294 \begin_layout Standard
1295 Having several configurations also requires more maintenance: if you want
1296 to add a new layout to
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1306 which you want available from all your configurations, you must add it
1307 to each directory separately.
1308 You can avoid this with the following trick: after LyX creates the additional
1309 directory, most of the subdirectories (see above) are empty.
1310 If you want the new configuration to mirror an existing one, replace the
1311 empty subdirectory with a symbolic link to the matching subdirectory in
1312 the existing configuration.
1314 \begin_inset Flex Code
1317 \begin_layout Plain Layout
1323 subdirectory, however, since it contains a file written by the configuration
1324 script (also accessible through
1325 \begin_inset Flex MenuItem
1328 \begin_layout Plain Layout
1329 Tools\SpecialChar \menuseparator
1335 ) which is configuration-specific.
1338 \begin_layout Chapter
1339 The Preferences dialog
1342 \begin_layout Standard
1343 All options of the preferences dialog are described in the Appendix
1345 The Preferences Dialog
1352 For some options you might find here more details.
1355 \begin_layout Section
1357 \begin_inset CommandInset label
1366 \begin_layout Standard
1367 The first step is to define your file formats if they are not already defined.
1369 \begin_inset Flex MenuItem
1372 \begin_layout Plain Layout
1373 Tools\SpecialChar \menuseparator
1381 \begin_inset Flex MenuItem
1384 \begin_layout Plain Layout
1385 File Handling\SpecialChar \menuseparator
1392 \begin_inset Flex MenuItem
1395 \begin_layout Plain Layout
1401 button to define your new format.
1403 \begin_inset Flex MenuItem
1406 \begin_layout Plain Layout
1412 field contains the name used to identify the format in the GUI.
1414 \begin_inset Flex MenuItem
1417 \begin_layout Plain Layout
1423 is used to identify the format internally.
1424 You will also need to enter a file extension.
1425 These are all required.
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1436 field is used to provide a keyboard shortcut on the menus.
1437 (For example, pressing
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1448 \begin_inset Flex MenuItem
1451 \begin_layout Plain Layout
1452 View\SpecialChar \menuseparator
1453 View (Other Formats)\SpecialChar \menuseparator
1462 \begin_layout Standard
1464 \begin_inset Flex MenuItem
1467 \begin_layout Plain Layout
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1484 For example, you might want to use
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1494 to view PostScript files.
1495 You can enter the command needed to start the program in the corresponding
1497 In defining this command, you can use the four variables listed in the
1499 The viewer is launched when you view an image in LyX or use the
1500 \begin_inset Flex MenuItem
1503 \begin_layout Plain Layout
1510 The editor is for example launched when you right-click on an image and
1512 \begin_inset Flex MenuItem
1515 \begin_layout Plain Layout
1521 in the appearing context menu.
1524 \begin_layout Standard
1526 \begin_inset Flex MenuItem
1529 \begin_layout Plain Layout
1535 type of a format is optional, but if it is specified, it must be unique
1537 It is used to detect files of this format from the file contents.
1538 For some important file formats there is no MIME type officially registered
1540 \begin_inset CommandInset href
1543 target "http://www.iana.org/assignments/media-types/"
1548 Therefore LyX uses the extended list of MIME types as specified by
1549 \begin_inset CommandInset href
1551 name "freedesktop.org"
1552 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1559 \begin_layout Standard
1561 \begin_inset Flex MenuItem
1564 \begin_layout Plain Layout
1570 option tells LyX that a format is suitable for document export.
1571 If this is set and if a suitable conversion route exists (see
1572 \begin_inset CommandInset ref
1574 reference "sec:Converters"
1578 ), the format will appear in the
1579 \begin_inset Flex MenuItem
1582 \begin_layout Plain Layout
1583 File\SpecialChar \menuseparator
1590 The format will also appear in the
1591 \begin_inset Flex MenuItem
1594 \begin_layout Plain Layout
1600 menu if a viewer is specified for the format.
1601 Pure image formats, such as
1602 \begin_inset Flex Code
1605 \begin_layout Plain Layout
1611 , should not use this option.
1612 Formats that can both represent vector graphics and documents like
1613 \begin_inset Flex Code
1616 \begin_layout Plain Layout
1625 \begin_layout Standard
1627 \begin_inset Flex MenuItem
1630 \begin_layout Plain Layout
1631 Vector graphics format
1636 tells LyX that a format can contain vector graphics.
1637 This information is used to determine the target format of included graphics
1639 \begin_inset Flex MenuItem
1642 \begin_layout Plain Layout
1649 Included graphics may need to be converted to either
1650 \begin_inset Flex MenuItem
1653 \begin_layout Plain Layout
1660 \begin_inset Flex MenuItem
1663 \begin_layout Plain Layout
1670 \begin_inset Flex MenuItem
1673 \begin_layout Plain Layout
1680 \begin_inset Flex MenuItem
1683 \begin_layout Plain Layout
1689 cannot handle other image formats.
1690 If an included graphic is not already in
1691 \begin_inset Flex MenuItem
1694 \begin_layout Plain Layout
1701 \begin_inset Flex MenuItem
1704 \begin_layout Plain Layout
1711 \begin_inset Flex MenuItem
1714 \begin_layout Plain Layout
1720 format, it is converted to
1721 \begin_inset Flex MenuItem
1724 \begin_layout Plain Layout
1730 if the vector format option is set, and otherwise to
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1743 \begin_layout Section
1747 \begin_layout Standard
1748 Since all conversions from one format to another take place in LyX's temporary
1749 directory, it is sometimes necessary to modify a file before copying it
1750 to the temporary directory in order that the conversion may be performed.
1754 \begin_layout Plain Layout
1755 For example, the file may refer to other files—images, for example—using
1756 relative file names, and these may become invalid when the file is copied
1757 to the temporary directory.
1762 This is done by a Copier: It copies a file to (or from) the temporary directory
1763 and may modify it in the process.
1766 \begin_layout Standard
1767 The definitions of the copiers may use four variables:
1770 \begin_layout Labeling
1771 \labelwidthstring 00.00.0000
1772 \begin_inset Flex Code
1775 \begin_layout Plain Layout
1781 The LyX system directory (e.
1782 \begin_inset space \thinspace{}
1786 \begin_inset space \space{}
1790 \begin_inset Flex MenuItem
1793 \begin_layout Plain Layout
1802 \begin_layout Labeling
1803 \labelwidthstring 00.00.0000
1804 \begin_inset Flex Code
1807 \begin_layout Plain Layout
1816 \begin_layout Labeling
1817 \labelwidthstring 00.00.0000
1818 \begin_inset Flex Code
1821 \begin_layout Plain Layout
1830 \begin_layout Labeling
1831 \labelwidthstring 00.00.0000
1832 \begin_inset Flex Code
1835 \begin_layout Plain Layout
1841 The base name (without filename extension) in the LyX temporary directory
1844 \begin_layout Labeling
1845 \labelwidthstring 00.00.0000
1846 \begin_inset Flex Code
1849 \begin_layout Plain Layout
1855 The full directory path of the LyX temporary directory
1858 \begin_layout Labeling
1859 \labelwidthstring 00.00.0000
1860 \begin_inset Flex Code
1863 \begin_layout Plain Layout
1869 The full pathname to the original LyX file being processed
1872 \begin_layout Labeling
1873 \labelwidthstring 00.00.0000
1874 \begin_inset Flex Code
1877 \begin_layout Plain Layout
1883 The filename (without any directory path) of the LyX file.
1886 \begin_layout Labeling
1887 \labelwidthstring 00.00.0000
1888 \begin_inset Flex Code
1891 \begin_layout Plain Layout
1900 \begin_layout Standard
1901 The latter should be the filename as it would be used in a LaTeX's
1908 It is relevant only when exporting files suitable for such inclusion.
1911 \begin_layout Standard
1912 Copiers can be used to do almost anything with output files.
1913 For example, suppose you want generated pdf files to be copied to a special
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1925 Then you could write a shell script such as this one:
1928 \begin_layout Standard
1929 \begin_inset listings
1933 \begin_layout Plain Layout
1938 \begin_layout Plain Layout
1943 \begin_layout Plain Layout
1945 TOFILE=`basename $2`
1948 \begin_layout Plain Layout
1950 cp $FROMFILE /home/you/pdf/$TOFILE
1955 Save it in your local LyX directory—say,
1956 \begin_inset Flex Code
1959 \begin_layout Plain Layout
1960 /home/you/.lyx/scripts/pdfcopier.sh
1965 —and make it executable, if you need to do so on your platform.
1967 \begin_inset Flex MenuItem
1970 \begin_layout Plain Layout
1971 Tools\SpecialChar \menuseparator
1977 dialog, select under
1978 \begin_inset Flex MenuItem
1981 \begin_layout Plain Layout
1982 File Handling\SpecialChar \menuseparator
1989 \begin_inset Flex MenuItem
1992 \begin_layout Plain Layout
1998 format—or one of the other pdf formats—and enter
1999 \begin_inset Flex Code
2002 \begin_layout Plain Layout
2003 pdfcopier.sh $$i $$o
2009 \begin_inset Flex MenuItem
2012 \begin_layout Plain Layout
2022 \begin_layout Standard
2023 Copiers are used by LyX in various of its own conversions.
2024 For example, if appropriate programs are found, LyX will automatically
2025 install copiers for the
2026 \begin_inset Flex MenuItem
2029 \begin_layout Plain Layout
2036 \begin_inset Flex MenuItem
2039 \begin_layout Plain Layout
2041 \begin_inset space ~
2050 When these formats are exported, the copier sees that not just the main
2051 HTML file but various associated files (style files, images, etc.) are also
2053 All these files are written to a subdirectory of the directory in which
2054 the original LyX file was found.
2058 \begin_layout Plain Layout
2059 This copier can be customized.
2061 \begin_inset Quotes eld
2065 \begin_inset Quotes erd
2068 argument takes a comma-separated list of extensions to be copied; if it
2069 is omitted, all files will be copied.
2071 \begin_inset Quotes eld
2075 \begin_inset Quotes erd
2078 argument determines the extension added to the generated directory.
2080 \begin_inset Quotes eld
2084 \begin_inset Flex MenuItem
2087 \begin_layout Plain Layout
2094 \begin_inset Quotes erd
2097 , so HTML generated from
2098 \begin_inset Flex MenuItem
2101 \begin_layout Plain Layout
2102 /path/to/filename.lyx
2108 \begin_inset Flex MenuItem
2111 \begin_layout Plain Layout
2112 /path/to/filename.html.LyXconv
2126 \begin_layout Section
2128 \begin_inset CommandInset label
2130 name "sec:Converters"
2137 \begin_layout Standard
2138 You can define your own Converters to convert files between different formats.
2140 \begin_inset Flex MenuItem
2143 \begin_layout Plain Layout
2144 Tools\SpecialChar \menuseparator
2145 Preferences\SpecialChar \menuseparator
2146 File Handling\SpecialChar \menuseparator
2155 \begin_layout Standard
2156 To define a new converter, select the
2157 \begin_inset Flex MenuItem
2160 \begin_layout Plain Layout
2162 \begin_inset space ~
2171 \begin_inset Flex MenuItem
2174 \begin_layout Plain Layout
2176 \begin_inset space ~
2184 from the drop-down lists, enter the command needed for the conversion,
2186 \begin_inset Flex MenuItem
2189 \begin_layout Plain Layout
2196 Several variables can be used in the definition of converters:
2199 \begin_layout Labeling
2200 \labelwidthstring 00.00.0000
2201 \begin_inset Flex Code
2204 \begin_layout Plain Layout
2210 The LyX system directory
2213 \begin_layout Labeling
2214 \labelwidthstring 00.00.0000
2215 \begin_inset Flex Code
2218 \begin_layout Plain Layout
2227 \begin_layout Labeling
2228 \labelwidthstring 00.00.0000
2229 \begin_inset Flex Code
2232 \begin_layout Plain Layout
2241 \begin_layout Labeling
2242 \labelwidthstring 00.00.0000
2243 \begin_inset Flex Code
2246 \begin_layout Plain Layout
2252 The base filename of the input file (i.
2253 \begin_inset space \thinspace{}
2256 g., without the extension)
2259 \begin_layout Labeling
2260 \labelwidthstring 00.00.0000
2261 \begin_inset Flex Code
2264 \begin_layout Plain Layout
2270 The path to the input file
2273 \begin_layout Labeling
2274 \labelwidthstring 00.00.0000
2275 \begin_inset Flex Code
2278 \begin_layout Plain Layout
2284 The path to the original input file (this is different from $$p when a
2285 chain of converters is called)
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The iconv name for the encoding of the document.
2302 \begin_layout Standard
2304 \begin_inset Flex MenuItem
2307 \begin_layout Plain Layout
2309 \begin_inset space ~
2317 field you can enter the following flags, separated by commas:
2320 \begin_layout Labeling
2321 \labelwidthstring 00.00.0000
2322 \begin_inset Flex Code
2325 \begin_layout Plain Layout
2331 This converter runs some form of LaTeX.
2332 This will make LyX's LaTeX error logs available.
2335 \begin_layout Labeling
2336 \labelwidthstring 00.00.0000
2337 \begin_inset Flex Code
2340 \begin_layout Plain Layout
2347 \begin_inset Flex MenuItem
2350 \begin_layout Plain Layout
2356 file for the conversion.
2359 \begin_layout Labeling
2360 \labelwidthstring 00.00.0000
2361 \begin_inset Flex Code
2364 \begin_layout Plain Layout
2371 \begin_inset Quotes eld
2375 \begin_inset Quotes erd
2378 file from the backend, which in practice means a LaTeX file like the one
2379 we would export, without
2380 \begin_inset Flex Code
2383 \begin_layout Plain Layout
2392 \begin_layout Labeling
2393 \labelwidthstring 00.00.0000
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2406 \begin_layout Standard
2407 The following three flags are not really flags at all because they take
2409 \begin_inset Flex MenuItem
2412 \begin_layout Plain Layout
2414 \begin_inset space ~
2418 \begin_inset space ~
2429 \begin_layout Labeling
2430 \labelwidthstring 00.00.0000
2431 \begin_inset Flex Code
2434 \begin_layout Plain Layout
2440 If set, the converter's standard error will be redirected to a file
2441 \begin_inset Flex Code
2444 \begin_layout Plain Layout
2450 , and the script given as argument will be run as:
2451 \begin_inset Flex Code
2454 \begin_layout Plain Layout
2455 script < infile.out > infile.log
2461 The argument may contain
2462 \begin_inset Flex Code
2465 \begin_layout Plain Layout
2474 \begin_layout Labeling
2475 \labelwidthstring 00.00.0000
2476 \begin_inset Flex Code
2479 \begin_layout Plain Layout
2485 The name of the directory in which the converter will dump the generated
2487 LyX will not create this directory, and it does not copy anything into
2488 it, though it will copy this directory to the destination.
2489 The argument may contain
2490 \begin_inset Flex Code
2493 \begin_layout Plain Layout
2499 , which will be replaced by the base name of the input and output files,
2500 respectively, when the directory is copied.
2501 \begin_inset Newline newline
2504 Note that resultdir and usetempdir make no sense together.
2505 The latter will be ignored if the former is given.
2508 \begin_layout Labeling
2509 \labelwidthstring 00.00.0000
2510 \begin_inset Flex Code
2513 \begin_layout Plain Layout
2519 Determines the output file name and may, contain
2520 \begin_inset Flex Code
2523 \begin_layout Plain Layout
2530 Sensible only with resultdir and optional even then; if not given, it defaults
2534 \begin_layout Standard
2535 None of these last three are presently used in any of the converters that
2536 are installed with LyX.
2540 \begin_layout Standard
2541 You do not have to define converters for all formats between which you want
2543 For example, you will note that there is no `LyX to PostScript' converter,
2544 but LyX will export PostScript.
2545 It does so by first creating a LaTeX file (no converter needs to be defined
2546 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2547 and finally converting the resulting DVI file to PostScript.
2548 LyX finds such `chains' of converters automatically, and it will always
2549 choose the shortest possible chain.
2550 You can, though, still define multiple conversion methods between file
2552 For example, the standard LyX configuration provides five ways to convert
2556 \begin_layout Enumerate
2558 \begin_inset Flex MenuItem
2561 \begin_layout Plain Layout
2570 \begin_layout Enumerate
2571 via (DVI and) PostScript, using
2572 \begin_inset Flex MenuItem
2575 \begin_layout Plain Layout
2584 \begin_layout Enumerate
2586 \begin_inset Flex MenuItem
2589 \begin_layout Plain Layout
2598 \begin_layout Enumerate
2600 \begin_inset Flex MenuItem
2603 \begin_layout Plain Layout
2612 \begin_layout Enumerate
2614 \begin_inset Flex MenuItem
2617 \begin_layout Plain Layout
2626 \begin_layout Standard
2627 To define such alternate chains, you must define multiple target `file formats',
2629 \begin_inset CommandInset ref
2631 reference "sec:Formats"
2636 For example, in the standard configuration, the formats named
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2677 \begin_inset Flex MenuItem
2680 \begin_layout Plain Layout
2687 \begin_inset Flex MenuItem
2690 \begin_layout Plain Layout
2697 \begin_inset Flex MenuItem
2700 \begin_layout Plain Layout
2707 \begin_inset Flex MenuItem
2710 \begin_layout Plain Layout
2717 \begin_inset Flex MenuItem
2720 \begin_layout Plain Layout
2727 \begin_inset Flex MenuItem
2730 \begin_layout Plain Layout
2736 ) are defined, all of which share the extension
2737 \begin_inset Flex MenuItem
2740 \begin_layout Plain Layout
2746 , and which correspond to the conversion methods just mentioned.
2749 \begin_layout Chapter
2750 Internationalizing LyX
2751 \begin_inset CommandInset label
2753 name "cha:Internationalizing-LyX"
2760 \begin_layout Standard
2761 LyX supports using a translated interface.
2762 Last time we checked, LyX provided text in thirty languages.
2763 The language of choice is called your
2768 (For further reading on locale settings, see also the documentation for
2769 locale that comes with your operating system.
2770 For Linux, the manual page for
2771 \begin_inset Flex Code
2774 \begin_layout Plain Layout
2780 could be a good place to start).
2783 \begin_layout Standard
2784 Notice that these translations will work, but do contain a few flaws.
2785 In particular, all dialogs have been designed with the English text in
2786 mind, which means that some of the translated text will be too large to
2787 fit within the space allocated.
2788 This is only a display problem and will not cause any harm.
2789 Also, you will find that some of the translations do not define shortcut
2790 keys for everything.
2791 Sometimes, there are simply not enough free letters to do it.
2792 Other times, the translator just hasn't got around to doing it yet.
2793 Our localization team, which you may wish to join,
2797 \begin_layout Plain Layout
2798 If you are a fluent speaker of a language other than English, joining these
2799 teams is a great way to give back to the LyX community!
2804 will of course try to fix these shortcomings in future versions of LyX.
2807 \begin_layout Section
2811 \begin_layout Subsection
2812 Translating the graphical user interface (text messages).
2815 \begin_layout Standard
2817 \begin_inset Flex Code
2820 \begin_layout Plain Layout
2826 library to handle the internationalization of the interface.
2827 To have LyX speak your favorite language in all menus and dialogs, you
2829 \begin_inset Flex Code
2832 \begin_layout Plain Layout
2838 -file for that language.
2839 When this is available, you'll have to generate a
2840 \begin_inset Flex Code
2843 \begin_layout Plain Layout
2849 -file from it and install the
2850 \begin_inset Flex Code
2853 \begin_layout Plain Layout
2860 The process of doing all of this is explained in the documentation for
2862 \begin_inset Flex Code
2865 \begin_layout Plain Layout
2872 It is possible to do this just for yourself, but if you're going to do
2873 it, you might as well share the results of your labors with the rest of
2875 Send a message to the LyX developers' list for more information about how
2879 \begin_layout Standard
2880 In short, this is what you should do (xx denotes the language code):
2883 \begin_layout Itemize
2884 Check out the LyX source code.
2886 \begin_inset CommandInset href
2888 name "information on the web"
2889 target "http://www.lyx.org/HowToUseSVN"
2896 \begin_layout Itemize
2898 \begin_inset Flex Code
2901 \begin_layout Plain Layout
2907 to the folder of the
2908 \begin_inset Flex Code
2911 \begin_layout Plain Layout
2919 \begin_inset Flex Code
2922 \begin_layout Plain Layout
2930 \begin_inset Flex Code
2933 \begin_layout Plain Layout
2939 doesn't exist anywhere, it can be remade with the console command
2940 \begin_inset Flex Code
2943 \begin_layout Plain Layout
2949 in that directory, or you can use an existing po-file for some other language
2953 \begin_layout Itemize
2955 \begin_inset Flex Code
2958 \begin_layout Plain Layout
2968 \begin_layout Plain Layout
2969 This is just a text file, so it can be edited in any text editor.
2970 But there are also specialized programs that support such editing, such
2975 (for all platforms) or
2984 contains a `mode' for editing
2985 \begin_inset Flex Code
2988 \begin_layout Plain Layout
2999 For some menu- and widget-labels, there are also shortcut keys that should
3001 Those keys are marked after a `|', and should be translated according to
3002 the words and phrases of the language.
3003 You should also fill also out the information at the beginning of the new
3005 \begin_inset Flex Code
3008 \begin_layout Plain Layout
3014 -file with your email-address, etc., so people know where to reach you with
3015 suggestions and entertaining flames.
3018 \begin_layout Standard
3019 If you are just doing this on your own, then:
3022 \begin_layout Itemize
3024 \begin_inset Flex Code
3027 \begin_layout Plain Layout
3034 This can be done with
3035 \begin_inset Flex Code
3038 \begin_layout Plain Layout
3039 msgfmt -o xx.mo < xx.po
3047 \begin_layout Itemize
3049 \begin_inset Flex Code
3052 \begin_layout Plain Layout
3058 -file to your locale-tree, at the correct directory for application messages
3063 xx, and under the name
3064 \begin_inset Flex Code
3067 \begin_layout Plain Layout
3074 \begin_inset space \thinspace{}
3078 \begin_inset space \space{}
3082 \begin_inset Flex Code
3085 \begin_layout Plain Layout
3086 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3096 \begin_layout Standard
3097 As said, however, it would be best if the new
3098 \begin_inset Flex Code
3101 \begin_layout Plain Layout
3107 -file could be added to the LyX distribution, so others can use it.
3108 Adding it involves making additional changes to LyX.
3109 So send an email to the developers' mailing list if you're interested in
3113 \begin_layout Subsubsection
3117 \begin_layout Standard
3118 Sometimes it turns out that one English message needs to be translated into
3119 different messages in the target language.
3120 One example is the message
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 which has the German translation
3138 , depending upon exactly what the English
3139 \begin_inset Quotes eld
3143 \begin_inset Quotes erd
3148 \begin_inset Flex Code
3151 \begin_layout Plain Layout
3157 does not handle such ambiguous translations.
3158 Therefore you have to add some context information to the message: Instead
3160 \begin_inset Flex Code
3163 \begin_layout Plain Layout
3170 \begin_inset Flex Code
3173 \begin_layout Plain Layout
3174 To[[as in 'From format x to format y']]
3180 \begin_inset Flex Code
3183 \begin_layout Plain Layout
3184 To[[as in 'From page x to page y']].
3189 Now the two occurrences of
3190 \begin_inset Flex Code
3193 \begin_layout Plain Layout
3200 \begin_inset Flex Code
3203 \begin_layout Plain Layout
3209 and can be translated correctly to
3220 \begin_layout Standard
3221 Of course the context information needs to be stripped off the original
3222 message when no translation is used.
3223 Therefore you have to put it in double square brackets at the end of the
3224 message (see the example above).
3225 The translation mechanism of LyX ensures that everything in double square
3226 brackets at the end of messages is removed before displaying the message.
3229 \begin_layout Subsection
3230 Translating the documentation.
3233 \begin_layout Standard
3234 The online documentation (in the
3235 \begin_inset Flex MenuItem
3238 \begin_layout Plain Layout
3244 -menu) can (and should!) be translated.
3245 If there are translated versions of the documentation available
3249 \begin_layout Plain Layout
3250 As of March 2008, at least some of the documents have been translated into
3251 fourteen languages, with the Tutorial available in a few more.
3256 and the locale is set accordingly, these will be used automagically by
3258 LyX looks for translated versions as
3259 \begin_inset Flex Code
3262 \begin_layout Plain Layout
3263 LyXDir/doc/xx/DocName.lyx
3269 \begin_inset Flex Code
3272 \begin_layout Plain Layout
3278 is the code for the language currently in use.
3279 If there are no translated documents, the default English versions will
3281 Note that the translated versions must have the same filenames (
3282 \begin_inset Flex Code
3285 \begin_layout Plain Layout
3291 above) as the original.
3292 If you feel up to translating the documentation (an excellent way to proof-read
3293 the original documentation by the way!), there are a few things you should
3297 \begin_layout Itemize
3298 Check out the documentation translation web page at
3299 \begin_inset CommandInset href
3301 name "http://www.lyx.org/Translation"
3302 target "http://www.lyx.org/Translation"
3307 That way, you can find out which (if any) documents have already been translate
3308 d into your language.
3309 You can also find out who (if anyone) is organizing the effort to translate
3310 the documentation into your language.
3311 If no one is organizing the effort, please let us know that you're interested.
3314 \begin_layout Standard
3315 Once you get to actually translating, here's a few hints for you that may
3319 \begin_layout Itemize
3320 Join the documentation team! There is information on how to do that in
3321 \begin_inset Flex Code
3324 \begin_layout Plain Layout
3331 \begin_inset Flex MenuItem
3334 \begin_layout Plain Layout
3335 Help\SpecialChar \menuseparator
3341 ), which by the way is the first document you should translate.
3344 \begin_layout Itemize
3345 Learn the typographic conventions for the language you are translating to.
3346 Typography is an ancient art and over the centuries, a great variety of
3347 conventions have developed throughout different parts of the world.
3348 Also study the professional terminology amongst typographers in your country.
3349 Inventing your own terminology will only confuse the users.
3352 (Warning! Typography is addictive!)
3355 \begin_layout Itemize
3356 Make a copy of the document.
3357 This will be your working copy.
3358 You can use this as your personal translated help-file by placing it in
3360 \begin_inset Flex Code
3363 \begin_layout Plain Layout
3372 \begin_layout Itemize
3373 Sometimes the original document (from the LyX-team) will be updated.
3374 Use the source viewer at
3375 \begin_inset CommandInset href
3377 name "http://www.lyx.org/trac/timeline"
3378 target "http://www.lyx.org/trac/timeline"
3382 to see what has been changed.
3383 That way you can easily see which parts of the translated document need
3387 \begin_layout Standard
3388 If you ever find an error in the original document, fix it and notify the
3389 rest of the documentation team of the changes! (You didn't forget to join
3390 the documentation team, did you?)
3393 \begin_layout Standard
3394 \begin_inset Branch OutDated
3397 \begin_layout Section
3398 International Keyboard Support
3401 \begin_layout Standard
3404 [Editor's Note: The following section is by
3412 It needs to be fixed to conform to the new Documentation Style sheet and
3413 to make use of the new v1.0 features.
3414 The whole thing also needs to be merged with the section following it.-jw
3415 It may also be badly out of date.-rh (2008)]
3418 \begin_layout Subsection
3419 Defining Own Keymaps: Keymap File Format
3422 \begin_layout Standard
3423 Let's look at a keyboard definition file a little closer.
3424 It is a plain text file defining
3427 \begin_layout Itemize
3428 key-to-key or key-to-string translations
3431 \begin_layout Itemize
3435 \begin_layout Itemize
3436 dead keys exceptions
3439 \begin_layout Standard
3440 To define key-to-key or key-to-string translation, use this command:
3443 \begin_layout Quotation
3444 \begin_inset Flex Code
3447 \begin_layout Plain Layout
3456 \begin_inset Flex Code
3459 \begin_layout Plain Layout
3468 \begin_layout Standard
3470 \begin_inset Flex Code
3473 \begin_layout Plain Layout
3479 is the key to be translated and
3480 \begin_inset Flex Code
3483 \begin_layout Plain Layout
3489 is the string to be inserted into the document.
3490 To define dead keys, use:
3493 \begin_layout Quotation
3494 \begin_inset Flex Code
3497 \begin_layout Plain Layout
3506 \begin_inset Flex Code
3509 \begin_layout Plain Layout
3518 \begin_layout Standard
3520 \begin_inset Flex Code
3523 \begin_layout Plain Layout
3529 is a keyboard key and
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3540 The following dead keys are supported (shortcut name is in parentheses):
3543 \begin_layout Quotation
3547 \begin_inset space \hfill{}
3553 \begin_layout Quotation
3555 \begin_inset space \hfill{}
3561 \begin_layout Quotation
3563 \begin_inset space \hfill{}
3569 \begin_layout Quotation
3571 \begin_inset space \hfill{}
3577 \begin_layout Quotation
3579 \begin_inset space \hfill{}
3585 \begin_layout Quotation
3587 \begin_inset space \hfill{}
3594 \begin_layout Plain Layout
3606 \begin_layout Quotation
3608 \begin_inset space \hfill{}
3614 \begin_layout Quotation
3616 \begin_inset space \hfill{}
3623 \begin_layout Plain Layout
3635 \begin_layout Quotation
3637 \begin_inset space \hfill{}
3643 \begin_layout Quotation
3645 \begin_inset space \hfill{}
3651 \begin_layout Quotation
3653 \begin_inset space \hfill{}
3660 \begin_layout Plain Layout
3672 \begin_layout Quotation
3674 \begin_inset space \hfill{}
3681 \begin_layout Plain Layout
3693 \begin_layout Quotation
3695 \begin_inset space \hfill{}
3701 \begin_layout Quotation
3702 hungarian umlaut (hug)
3703 \begin_inset space \hfill{}
3709 \begin_layout Quotation
3711 \begin_inset space \hfill{}
3717 \begin_layout Quotation
3719 \begin_inset space \hfill{}
3726 \begin_layout Plain Layout
3738 \begin_layout Standard
3739 Since in many international keyboards there are exceptions to what some
3740 dead keys should do, you can define them using
3743 \begin_layout Quotation
3744 \begin_inset Flex Code
3747 \begin_layout Plain Layout
3755 deadkey key outstring
3758 \begin_layout Standard
3759 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3763 \begin_layout Quotation
3764 \begin_inset Flex Code
3767 \begin_layout Plain Layout
3780 \begin_layout Standard
3781 to make it work correctly.
3782 Also, you have to define as exceptions dead keys over i and j, to remove
3783 the dot from them before inserting an accent mark.
3784 I will change this when the time comes, but so far I haven't had time.
3787 \begin_layout Standard
3788 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3791 \begin_inset Flex Code
3794 \begin_layout Plain Layout
3800 have different meaning.
3802 \begin_inset Flex Code
3805 \begin_layout Plain Layout
3811 marks comments, quotes start and end LaTeX-style commands.
3812 To enter quote, you'll need to use
3813 \begin_inset Flex Code
3816 \begin_layout Plain Layout
3825 \begin_inset Flex Code
3828 \begin_layout Plain Layout
3835 \begin_inset Flex Code
3838 \begin_layout Plain Layout
3849 \begin_layout Standard
3850 If you make a keyboard description file that works for your language, please
3851 mail it to me, so I can include it in the next keymap distribution.
3854 \begin_layout Standard
3855 More keywords will be supported in keymap configuration file in future,
3859 \begin_layout Itemize
3860 \begin_inset Flex Code
3863 \begin_layout Plain Layout
3874 \begin_inset space \hfill{}
3878 \begin_inset Flex Code
3881 \begin_layout Plain Layout
3890 \begin_layout Itemize
3891 \begin_inset Flex Code
3894 \begin_layout Plain Layout
3905 \begin_inset space \hfill{}
3909 \begin_inset Flex Code
3912 \begin_layout Plain Layout
3918 an external keymap translation program
3921 \begin_layout Standard
3922 Also, it should look into
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3932 file for defaults, too (for example, a
3933 \begin_inset Flex Code
3936 \begin_layout Plain Layout
3944 option to include default keyboard).
3952 \begin_layout Section
3953 International Keymap Stuff
3954 \begin_inset CommandInset label
3956 name "sec:International-Keymap-Stuff"
3963 \begin_layout Standard
3964 \begin_inset Note Note
3967 \begin_layout Plain Layout
3968 In doing the revisions on this document in March 2008, I did not look over
3969 this stuff, as I do not understand it.
3970 It would be good if someone else could do so.
3979 \begin_layout Standard
3980 The next two sections describe the
3981 \begin_inset Flex Code
3984 \begin_layout Plain Layout
3993 \begin_inset Flex Code
3996 \begin_layout Plain Layout
4004 file syntax in detail.
4005 These sections should help you design your own key map if the ones provided
4006 do not meet your needs.
4009 \begin_layout Subsection
4013 \begin_layout Standard
4017 \begin_inset Flex Code
4020 \begin_layout Plain Layout
4026 file maps keystrokes to characters or strings.
4027 As the name suggests, it sets a keyboard mapping.
4029 \begin_inset Flex Code
4032 \begin_layout Plain Layout
4043 \begin_inset Flex Code
4046 \begin_layout Plain Layout
4061 \begin_inset Flex Code
4064 \begin_layout Plain Layout
4077 \begin_inset Flex Code
4080 \begin_layout Plain Layout
4089 \begin_inset Flex Code
4092 \begin_layout Plain Layout
4100 are described in this section.
4103 \begin_layout Labeling
4104 \labelwidthstring 00.00.0000
4105 \begin_inset Flex Code
4108 \begin_layout Plain Layout
4116 Map a character to a string
4119 \begin_layout LyX-Code
4134 \begin_layout Standard
4167 the double-quote (")
4184 must be escaped with a preceding backslash (
4195 \begin_layout Standard
4197 \begin_inset Flex MenuItem
4200 \begin_layout Plain Layout
4208 statement to cause the symbol
4209 \begin_inset Flex MenuItem
4212 \begin_layout Plain Layout
4220 to be output for the keystroke
4221 \begin_inset Flex MenuItem
4224 \begin_layout Plain Layout
4235 \begin_layout LyX-Code
4241 \begin_layout Labeling
4242 \labelwidthstring 00.00.0000
4243 \begin_inset Flex Code
4246 \begin_layout Plain Layout
4254 Specify an accent character
4257 \begin_layout LyX-Code
4266 \begin_layout Standard
4267 This will make the cha
4305 This is the dead key
4309 \begin_layout Plain Layout
4316 refers to a key that does not produce a character by itself, but when followed
4317 with another key, produces the desired accent character.
4318 For example, a German characte
4320 r with an umlaut like
4330 can be produced in this manner.
4339 \begin_layout Standard
4352 and then another key not in
4369 followed by the other, not allowed key, as output.
4373 \begin_inset Flex MenuItem
4376 \begin_layout Plain Layout
4384 cancels a dead key, so if
4395 \begin_inset Flex MenuItem
4398 \begin_layout Plain Layout
4407 , the cursor will not go one position backwards but will instead cancel
4423 might have had on the next keystroke.
4427 \begin_layout Standard
4428 The following example specifies that the character ' is to be an acute accent,
4429 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4432 \begin_layout LyX-Code
4435 kmod ' acute aeiouAEIOU
4438 \begin_layout Labeling
4439 \labelwidthstring 00.00.0000
4440 \begin_inset Flex Code
4443 \begin_layout Plain Layout
4449 Specify an exception to the accent character
4452 \begin_layout LyX-Code
4461 \begin_layout Standard
4462 This defines an exce
4503 have been assigned a keystroke with a previous
4506 \begin_inset Flex Code
4509 \begin_layout Plain Layout
4533 must not belong in the
4580 If such a declaration does not exist in
4588 \begin_inset Flex Code
4591 \begin_layout Plain Layout
4625 \begin_inset Flex Code
4628 \begin_layout Plain Layout
4642 \begin_layout Standard
4643 The following command produces causes äi to be produced when you enter acute-i
4647 \begin_layout LyX-Code
4661 \begin_layout Labeling
4662 \labelwidthstring 00.00.0000
4663 \begin_inset Flex Code
4666 \begin_layout Plain Layout
4672 Combine two accent characters
4675 \begin_layout LyX-Code
4681 accent1 accent2 allowed
4684 \begin_layout Standard
4685 This one is getting pretty esoteric.
4686 It allows you to combine the effect
4742 \begin_inset Flex Code
4745 \begin_layout Plain Layout
4773 \begin_layout Standard
4774 Consider this example from the
4775 \begin_inset Flex Code
4778 \begin_layout Plain Layout
4789 \begin_layout LyX-Code
4792 kmod ; acute aeioyvhAEIOYVH
4796 kcomb acute umlaut iyIY
4799 \begin_layout Standard
4800 This allows you to press
4801 \begin_inset Flex MenuItem
4804 \begin_layout Plain Layout
4812 and get the effect of
4813 \begin_inset Flex Code
4816 \begin_layout Plain Layout
4835 in this case cancels the last dead key, so if you press
4836 \begin_inset Flex MenuItem
4839 \begin_layout Plain Layout
4848 \begin_inset Flex Code
4851 \begin_layout Plain Layout
4864 \begin_layout Subsection
4868 \begin_layout Standard
4870 \begin_inset Flex Code
4873 \begin_layout Plain Layout
4881 mapping is performed, a
4882 \begin_inset Flex Code
4885 \begin_layout Plain Layout
4895 file maps the strings that the symbols generate to characters in the current
4897 The LyX distribution currently includes at least the
4898 \begin_inset Flex Code
4901 \begin_layout Plain Layout
4910 \begin_inset Flex Code
4913 \begin_layout Plain Layout
4924 \begin_layout Standard
4926 \begin_inset Flex Code
4929 \begin_layout Plain Layout
4937 file is a sequence of declarations of the form
4940 \begin_layout LyX-Code
4953 \begin_layout Standard
4954 For example, in order to map
4955 \begin_inset Flex MenuItem
4958 \begin_layout Plain Layout
4968 to the corresponding character in the iso-8859-1 set (233), the following
4972 \begin_layout LyX-Code
4980 \begin_layout Standard
4982 \begin_inset Flex Code
4985 \begin_layout Plain Layout
4994 \begin_inset Flex Code
4997 \begin_layout Plain Layout
5015 the same character can apply to more than one string.
5017 \begin_inset Flex Code
5020 \begin_layout Plain Layout
5031 \begin_layout LyX-Code
5043 \begin_inset Newline newline
5059 \begin_layout Standard
5060 If LyX cannot find a mapping for the string produced by the keystroke or
5061 a deadkey sequence, it will check if it looks like an accented char and
5062 try to draw an accent over the character on screen.
5065 \begin_layout Subsection
5069 \begin_layout Standard
5070 There is a second way to add support for international characters through
5071 so-called dead-keys.
5072 A dead-key works in combination with a letter to produce an accented character.
5073 Here, we'll explain how to create a really simple dead-key to illustrate
5077 \begin_layout Standard
5078 Suppose you happen to need the circumflex character,
5079 \begin_inset Quotes eld
5083 \begin_inset Quotes erd
5088 \begin_inset Flex MenuItem
5091 \begin_layout Plain Layout
5098 \begin_inset space ~
5102 \begin_inset Flex MenuItem
5105 \begin_layout Plain Layout
5111 ] to the LyX command
5112 \begin_inset Flex Code
5115 \begin_layout Plain Layout
5122 \begin_inset Flex Code
5125 \begin_layout Plain Layout
5132 Now, whenever you type the
5133 \begin_inset Flex MenuItem
5136 \begin_layout Plain Layout
5142 -key followed by a letter, that letter will have a circumflex accent on
5144 For example, the sequence
5145 \begin_inset Quotes eld
5149 \begin_inset Flex MenuItem
5152 \begin_layout Plain Layout
5159 \begin_inset Quotes erd
5162 produces the letter:
5163 \begin_inset Quotes eld
5167 \begin_inset Quotes erd
5171 If you tried to type
5172 \begin_inset Quotes eld
5176 \begin_inset Flex MenuItem
5179 \begin_layout Plain Layout
5186 \begin_inset Quotes erd
5189 , however, LyX will complain with a beep, since a
5190 \begin_inset Quotes eld
5194 \begin_inset Flex MenuItem
5197 \begin_layout Plain Layout
5204 \begin_inset Quotes erd
5207 never takes a circumflex accent.
5209 \begin_inset Flex MenuItem
5212 \begin_layout Plain Layout
5218 after a dead-key produces the bare-accent.
5219 Please note this last point! If you bind a key to a dead-key, you'll need
5220 to rebind the character on that key to yet another key.
5222 \begin_inset Flex MenuItem
5225 \begin_layout Plain Layout
5231 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5234 \begin_layout Standard
5235 One common way to bind dead-keys is to use
5236 \begin_inset Flex MenuItem
5239 \begin_layout Plain Layout
5246 \begin_inset Flex MenuItem
5249 \begin_layout Plain Layout
5256 \begin_inset Flex MenuItem
5259 \begin_layout Plain Layout
5265 in combination with an accent, like
5266 \begin_inset Quotes eld
5270 \begin_inset Flex MenuItem
5273 \begin_layout Plain Layout
5280 \begin_inset Quotes erd
5284 \begin_inset Quotes eld
5288 \begin_inset Flex MenuItem
5291 \begin_layout Plain Layout
5298 \begin_inset Quotes erd
5302 \begin_inset Quotes eld
5306 \begin_inset Flex MenuItem
5309 \begin_layout Plain Layout
5316 \begin_inset Quotes erd
5320 Another way involves using
5321 \begin_inset Flex Code
5324 \begin_layout Plain Layout
5331 \begin_inset Flex Code
5334 \begin_layout Plain Layout
5340 to set up the special
5341 \begin_inset Flex Code
5344 \begin_layout Plain Layout
5352 \begin_inset Flex Code
5355 \begin_layout Plain Layout
5361 acts in some ways just like
5362 \begin_inset Flex MenuItem
5365 \begin_layout Plain Layout
5371 and permits you to bind keys to accented characters.
5372 You can also turn keys into dead-keys by binding them to something like
5374 \begin_inset Flex Code
5377 \begin_layout Plain Layout
5383 and then binding this symbolic key to the corresponding LyX command.
5387 \begin_layout Plain Layout
5392 : This is exactly what I do in my
5393 \begin_inset Flex Code
5396 \begin_layout Plain Layout
5403 \begin_inset Flex Code
5406 \begin_layout Plain Layout
5414 \begin_inset Flex MenuItem
5417 \begin_layout Plain Layout
5419 \begin_inset space ~
5428 \begin_inset Flex Code
5431 \begin_layout Plain Layout
5437 and a bunch of these
5438 \begin_inset Quotes eld
5442 \begin_inset Flex Code
5445 \begin_layout Plain Layout
5452 \begin_inset Quotes erd
5455 symbolic keys bound such things as
5456 \begin_inset Flex MenuItem
5459 \begin_layout Plain Layout
5461 \begin_inset space ~
5470 \begin_inset Flex MenuItem
5473 \begin_layout Plain Layout
5475 \begin_inset space ~
5484 This is how I produce my accented characters.
5489 You can make just about anything into the
5490 \begin_inset Flex Code
5493 \begin_layout Plain Layout
5500 \begin_inset Flex MenuItem
5503 \begin_layout Plain Layout
5509 keys, a spare function key, etc.
5510 As for the LyX commands that produce accents, check the entry for
5511 \begin_inset Flex Code
5514 \begin_layout Plain Layout
5525 You'll find the complete list there.
5528 \begin_layout Subsection
5529 Saving your Language Configuration
5532 \begin_layout Standard
5533 You can edit your preferences so that your desired language environment
5534 is automatically configured when LyX starts up, via the
5535 \begin_inset Flex MenuItem
5538 \begin_layout Plain Layout
5539 Edit\SpecialChar \menuseparator
5548 \begin_layout Chapter
5549 Installing New Document Classes, Layouts, and Templates
5550 \begin_inset CommandInset label
5552 name "cha:Installing-New-Document"
5557 \begin_inset Argument 1
5560 \begin_layout Plain Layout
5561 Installing New Document Classes
5569 \begin_layout Standard
5570 In this chapter, we describe the procedures for creating and installing
5571 new LyX layout and template files, as well as offer a refresher on correctly
5572 installing new LaTeX document classes.
5576 \begin_layout Standard
5577 First, let us a say a few words about how one ought to think about the relation
5578 between LyX and LaTeX.
5579 The thing to understand is that, in a certain sense, LyX doesn't know anything
5581 Indeed, from LyX's point of view, LaTeX is just one of several
5582 \begin_inset Quotes eld
5586 \begin_inset Quotes erd
5589 in which it is capable of producing output.
5590 Other such formats are DocBook, plaintext, and XHTML.
5591 LaTeX is, of course, a particularly important format, but very little of
5592 the information LyX has about LaTeX is actually contained in the program
5597 \begin_layout Plain Layout
5598 Some commands are sufficiently complex that they are
5599 \begin_inset Quotes eld
5603 \begin_inset Quotes erd
5607 But the developers generally regard this as a Bad Thing.
5612 Rather, that information, even for the standard classes like
5613 \begin_inset Flex Code
5616 \begin_layout Plain Layout
5622 , is contained in `layout files'.
5623 Similarly, LyX itself does not know much about DocBook or XHTML.
5624 What it knows is contained in layout files.
5627 \begin_layout Standard
5628 You can think of the layout file for a given document class as a translation
5629 manual between LyX constructs---paragraphs with their corresponding styles,
5630 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5632 Almost everything LyX knows about
5633 \begin_inset Flex Code
5636 \begin_layout Plain Layout
5642 , for example, is contained in the file
5643 \begin_inset Flex Code
5646 \begin_layout Plain Layout
5652 and in various other files it includes.
5653 For this reason, anyone intending to write layout files should plan to
5654 study the existing files.
5655 A good place to start is with
5656 \begin_inset Flex Code
5659 \begin_layout Plain Layout
5665 , which is included in
5666 \begin_inset Flex Code
5669 \begin_layout Plain Layout
5676 \begin_inset Flex Code
5679 \begin_layout Plain Layout
5685 , and many of the other layout files for document classes.
5686 This file is where sections and the like are defined:
5687 \begin_inset Flex Code
5690 \begin_layout Plain Layout
5696 tells LyX how paragraphs that are marked with the Section, Subsection,
5697 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5700 \begin_inset Flex Code
5703 \begin_layout Plain Layout
5709 file basically just includes several of these
5710 \begin_inset Flex Code
5713 \begin_layout Plain Layout
5722 \begin_layout Standard
5723 Defining the LyX--LaTeX correspondence is not the only thing layout files
5725 Their other job is to define how the LyX constructs themselves will appear
5727 The fact that layout files have these two jobs is often a source of confusion,
5728 because they are completely separate.
5729 Telling LyX how to translate a certain paragraph style into LaTeX does
5730 not tell LyX how to display it; conversely, telling LyX how to display
5731 a certain paragraph style does not tell LyX how to translate it into LaTeX
5732 (let alone tell LaTeX how to display it).
5733 So, in general, when you define a new LyX construct, you must always do
5734 two quite separate things: (i)
5735 \begin_inset space ~
5738 tell LyX how to translate it into LaTeX and (ii)
5739 \begin_inset space ~
5742 tell LyX how to display it.
5745 \begin_layout Standard
5746 Much the same is true, of course, as regards LyX's other backend formats,
5747 though XHTML is in some ways different, because in that case LyX
5751 able, to some extent, to use information about how it should display a
5752 paragraph on the screen to output information (in the form of CSS) about
5753 how the paragraph should be displayed in a browser.
5754 Even in this case, however, the distinction between what LyX does internally
5755 and how things are rendered externally remains in force, and the two can
5756 be controlled separately.
5758 \begin_inset CommandInset ref
5760 reference "sec:Tags-for-XHTML"
5767 \begin_layout Section
5768 Installing new LaTeX files
5771 \begin_layout Standard
5772 Some installations may not include a LaTeX package or class file that you
5773 would like to use within LyX.
5774 For example, you might need FoilTeX, a package for preparing slides for
5775 overhead projectors.
5776 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5777 a user interface for installing such packages.
5778 For example, with MiKTeX, you start the program
5779 \begin_inset Quotes eld
5783 \begin_inset space ~
5787 \begin_inset Quotes erd
5790 to get a list of available packages.
5791 To install one of them, right click on it or use the corresponding toolbar
5795 \begin_layout Standard
5796 If your LaTeX distribution does not provide such a `package manager', or
5797 if the package is not available from your distribution, then follow these
5798 steps to install it manually:
5801 \begin_layout Enumerate
5802 Get the package from
5803 \begin_inset CommandInset href
5806 target "http://www.ctan.org/"
5813 \begin_layout Enumerate
5814 If the package contains a file with the ending
5815 \begin_inset Quotes eld
5819 \begin_inset Flex Code
5822 \begin_layout Plain Layout
5829 \begin_inset Quotes erd
5832 (is the case for FoilTeX) then open a console, change to the folder of
5833 this file and execute the command
5834 \begin_inset Flex Code
5837 \begin_layout Plain Layout
5844 You have now unpacked the package and have all files to install it.
5845 Most LaTeX-packages are not packed and you can skip this step.
5848 \begin_layout Enumerate
5849 Now you need to decide if the package should be available for all users
5854 \begin_layout Enumerate
5855 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5856 for all users on your system, then install it in your `local' TeX tree,
5857 otherwise install it in your own `user' TeX tree.
5858 Where these trees should be created, if they do not already exist, depends
5860 To find this out, look in the file
5861 \begin_inset Flex Code
5864 \begin_layout Plain Layout
5874 \begin_layout Plain Layout
5875 This is usually in the directory
5876 \begin_inset Flex Code
5879 \begin_layout Plain Layout
5885 , though you can execute the command
5886 \begin_inset Flex Code
5889 \begin_layout Plain Layout
5900 The location of the `local' TeX tree is defined by the
5901 \begin_inset Flex Code
5904 \begin_layout Plain Layout
5910 variable; this is usually somewhere like
5911 \begin_inset Flex Code
5914 \begin_layout Plain Layout
5915 /usr/local/share/texmf
5921 The location of the `user' TeX tree is defined by
5922 \begin_inset Flex Code
5925 \begin_layout Plain Layout
5932 \begin_inset Flex Code
5935 \begin_layout Plain Layout
5942 (If these variables are not predefined, you have to define them.) You'll
5943 probably need root permissions to create or modify the `local' tree, but
5944 not for your `user' tree.
5945 \begin_inset Newline newline
5948 In general, it is recommended to install in the user tree because your user
5949 will not be modified or even overwritten when you upgrade your system.
5950 It will typically also be backed up together with everything else when
5951 you backup your home directory (which, of course, you do on a regular basis).
5954 \begin_layout Enumerate
5955 On Windows, if you want the new package to be available for all users on
5956 your system, change to the folder where LaTeX is installed and then change
5958 \begin_inset Flex Code
5961 \begin_layout Plain Layout
5972 (For MiKTeX, this would be by default the folder
5973 \begin_inset Flex Code
5976 \begin_layout Plain Layout
5994 \begin_layout Plain Layout
5995 Note that this will be the correct path only on English installations.
5996 On a German one, it would be
5997 \begin_inset Flex Code
6000 \begin_layout Plain Layout
6014 , and similarly for other languages.
6019 Create there a new folder
6020 \begin_inset Flex Code
6023 \begin_layout Plain Layout
6029 and copy all files of the package into it.
6031 \begin_inset Newline newline
6034 If the package should only available for you or you don't have admin permissions
6035 , do the same, but in the local LaTeX folder.
6037 \begin_inset space \thinspace{}
6041 \begin_inset space ~
6044 2.8 under Windows XP, this would be the folder:
6045 \begin_inset Newline newline
6051 \begin_inset Flex Code
6054 \begin_layout Plain Layout
6057 Documents and Settings
6069 \begin_inset Newline newline
6075 \begin_inset Phantom HPhantom
6078 \begin_layout Plain Layout
6089 \begin_inset Flex Code
6092 \begin_layout Plain Layout
6105 \begin_inset Newline newline
6108 On Vista, it would be:
6109 \begin_inset Newline newline
6113 \begin_inset Flex Code
6116 \begin_layout Plain Layout
6142 \begin_layout Enumerate
6143 Now one only need to tell LaTeX that there are new files.
6144 This depends on the used LaTeX-Distribution:
6148 \begin_layout Enumerate
6149 For TeXLive execute the command
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6160 If you installed the package for all users, then you will probably need
6161 to have root permissions for that.
6164 \begin_layout Enumerate
6165 For MiKTeX, if you have installed the package for all users, start the program
6167 \begin_inset Quotes eld
6171 \begin_inset space ~
6175 \begin_inset Quotes erd
6178 and press the button marked
6179 \begin_inset Quotes eld
6183 \begin_inset Quotes erd
6187 Otherwise start the program
6188 \begin_inset Quotes eld
6192 \begin_inset Quotes erd
6199 \begin_layout Enumerate
6200 Finally, you need to tell LyX that there are new packages available.
6201 So, in LyX, use the menu
6202 \begin_inset Flex MenuItem
6205 \begin_layout Plain Layout
6208 \SpecialChar \menuseparator
6214 and then restart LyX.
6217 \begin_layout Standard
6218 Now the package is installed.
6219 In our example, the document class
6220 \begin_inset Flex Code
6223 \begin_layout Plain Layout
6225 \begin_inset space ~
6232 \begin_layout Plain Layout
6244 will now be available under
6245 \begin_inset Flex MenuItem
6248 \begin_layout Plain Layout
6249 Document\SpecialChar \menuseparator
6250 Settings\SpecialChar \menuseparator
6260 \begin_layout Standard
6261 If you would like to use a LaTeX document class that is not even listed
6263 \begin_inset Flex MenuItem
6266 \begin_layout Plain Layout
6267 Document\SpecialChar \menuseparator
6268 Settings\SpecialChar \menuseparator
6274 , then you need to create a `layout' file for it.
6275 That is the topic of the next section.
6278 \begin_layout Section
6279 Types of layout files
6282 \begin_layout Standard
6283 This section describes the various sorts of LyX files that contain layout
6285 These files describe various paragraph and character styles, determining
6286 how LyX should display them and how they should be translated into LaTeX,
6287 DocBook, XHTML, or whatever output format is being used.
6291 \begin_layout Standard
6292 We shall try to provide a thorough description of the process of writing
6294 However, there are so many different types of documents supported even
6295 by just LaTeX that we can't hope to cover every different possibility or
6296 problem you might encounter.
6297 The LyX users' list is frequented by people with lots of experience with
6298 layout design who are willing to share what they've learned, so please
6299 feel free to ask questions there.
6302 \begin_layout Standard
6303 As you prepare to write a new layout, it is extremely helpful to look at
6304 the layouts distributed with LyX.
6305 If you write a LyX layout for a LaTeX document class that might also be
6306 used by others, or write a module that might be useful to others, then
6307 you should consider posting your layout to the
6308 \begin_inset CommandInset href
6310 name "layout section on the LyX wiki"
6311 target "http://wiki.lyx.org/Layouts/Layouts"
6315 or even to the LyX developers' list, so that it might be included in LyX
6320 \begin_layout Plain Layout
6321 Note that LyX is licensed under the General Public License, so any material
6322 that is contributed to LyX must be similarly licensed.
6330 \begin_layout Subsection
6332 \begin_inset CommandInset label
6334 name "sub:Layout-modules"
6341 \begin_layout Standard
6342 We have spoken to this point about `layout files'.
6343 But there are different sorts of files that contain layout information.
6344 Layout files, strictly so called, have the
6345 \begin_inset Flex Code
6348 \begin_layout Plain Layout
6354 extension and provide LyX with information about document classes.
6355 Since LyX 1.6 layout information can also be contained in layout
6360 \begin_inset Flex Code
6363 \begin_layout Plain Layout
6370 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6371 some modules—such as the
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6381 module—specifically provide support for one package.
6382 In a sense, layout modules are similar to included
6386 \begin_layout Plain Layout
6387 These can have any extension, but by convention have the
6388 \begin_inset Flex Code
6391 \begin_layout Plain Layout
6403 \begin_inset Flex Code
6406 \begin_layout Plain Layout
6412 —in that modules are not specific to a given document class but may be used
6413 with many different classes.
6414 The difference is that using an included file with
6415 \begin_inset Flex Code
6418 \begin_layout Plain Layout
6424 requires editing that file.
6425 Modules, by contrast, are selected in the
6426 \begin_inset Flex MenuItem
6429 \begin_layout Plain Layout
6430 Document\SpecialChar \menuseparator
6439 \begin_layout Standard
6440 Building modules is the easiest way to get started with layout editing,
6441 since it can be as simple as adding a single new paragraph style or flex
6443 But modules may, in principle, contain anything a layout file can contain.
6446 \begin_layout Standard
6447 After creating a new module and copying it to the
6448 \begin_inset Flex Code
6451 \begin_layout Plain Layout
6457 folder, you will need to reconfigure and then restart LyX for the module
6458 to appear in the menu.
6459 However, changes you make to the module will be seen immediately, if you
6461 \begin_inset Flex MenuItem
6464 \begin_layout Plain Layout
6465 Document\SpecialChar \menuseparator
6471 , highlight something, and then hit
6472 \begin_inset Quotes eld
6476 \begin_inset Quotes erd
6482 It is strongly recommended that you save your work before doing this
6487 it is strongly recommended that you not attempt to edit modules while simultaneo
6488 usly working on actual documents
6491 Though of course the developers strive to keep LyX stable in such situations,
6492 syntax errors and the like in your module file could cause strange behavior.
6495 \begin_layout Subsubsection
6499 \begin_layout Standard
6500 Modules are to LyX as packages are to LaTeX.
6501 Sometimes, however, you find yourself wanting a specific inset or character
6502 style just for one document and writing a module that will also be available
6503 to other documents makes little sense.
6504 What you need is LyX's
6505 \begin_inset Quotes eld
6509 \begin_inset Quotes erd
6515 \begin_layout Standard
6516 You will find it under
6518 Document\SpecialChar \menuseparator
6519 Settings\SpecialChar \menuseparator
6523 The large text box allows you to enter anything that you might enter in
6524 a layout file or module.
6525 You can think of a document's local layout, in fact, as a module that belongs
6527 So, in particular, you must enter a
6528 \begin_inset Flex Code
6531 \begin_layout Plain Layout
6538 Any format is acceptable, but one would normally use the format current
6540 (In LyX 2.1, the current layout format is 48.) You should be aware that local
6541 layout is not supported by versions of LyX prior to 1.6, so you should not
6542 use it if you want to be able to export your document to LyX 1.5 or earlier
6543 (without, that is, losing the local layout information).
6544 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6545 though there is no UI for it---then you should use format 11 and, of course,
6546 use only layout constructs that were available in LyX 1.6.
6549 \begin_layout Standard
6550 When you have entered something in the
6551 \begin_inset Flex Code
6554 \begin_layout Plain Layout
6560 pane, LyX will enable the
6561 \begin_inset Quotes eld
6565 \begin_inset Quotes erd
6568 button at the bottom.
6569 Clicking this button will cause LyX to determine whether what you have
6570 entered is valid layout information for the chosen format.
6571 LyX will report the result but, unfortunately, will not tell you what errors
6572 there might have been.
6573 These will be written to the terminal, however, if LyX is started from
6575 You will not be permitted to save your local layout until you have entered
6579 \begin_layout Standard
6580 The warnings at the end of the previous section apply here, too.
6581 Do not play with local layout while you are actually working, especially
6582 if you have not saved your document.
6583 That said, using local layout with a test document can be a very convenient
6584 way to try out layout ideas, or even to start developing a module.
6587 \begin_layout Subsection
6589 \begin_inset Flex MenuItem
6592 \begin_layout Plain Layout
6601 \begin_layout Standard
6602 There are two situations you are likely to encounter when wanting to support
6603 a new LaTeX document class, involving style (
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6613 ) files and LaTeX2e class (
6614 \begin_inset Flex Code
6617 \begin_layout Plain Layout
6624 Supporting a style file is usually fairly easy.
6625 Supporting a new class file is a bit harder.
6626 We'll discuss the former in this section and the latter in the next.
6627 Similar remarks apply, of course, if you want to support a new DocBook
6631 \begin_layout Standard
6632 The easier case is the one in which your new document class is provided
6633 as a style file that is to be used in conjunction with an already supported
6635 For the sake of the example, we'll assume that the style file is called
6637 \begin_inset Flex MenuItem
6640 \begin_layout Plain Layout
6646 and that it is meant to be used with
6647 \begin_inset Flex MenuItem
6650 \begin_layout Plain Layout
6656 , which is a standard class.
6660 \begin_layout Standard
6661 Start by copying the existing class's layout file into your local directory:
6665 \begin_layout Plain Layout
6666 Of course, which directory is your local directory will vary by platform,
6667 and LyX allows you to specify your local directory on startup, too, using
6669 \begin_inset Flex Code
6672 \begin_layout Plain Layout
6686 \begin_layout LyX-Code
6687 cp report.layout ~/.lyx/layouts/myclass.layout
6690 \begin_layout Standard
6692 \begin_inset Flex Code
6695 \begin_layout Plain Layout
6701 and change the line:
6704 \begin_layout LyX-Code
6707 DeclareLaTeXClass{report}
6710 \begin_layout Standard
6714 \begin_layout LyX-Code
6717 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6720 \begin_layout Standard
6724 \begin_layout LyX-Code
6726 \begin_inset Newline newline
6732 \begin_inset Newline newline
6738 \begin_layout Standard
6739 near the top of the file.
6742 \begin_layout Standard
6743 Start LyX and select
6744 \begin_inset Flex MenuItem
6747 \begin_layout Plain Layout
6748 Tools\SpecialChar \menuseparator
6755 Then restart LyX and try creating a new document.
6757 \begin_inset Flex MenuItem
6760 \begin_layout Plain Layout
6766 " as a document class option in the
6767 \begin_inset Flex MenuItem
6770 \begin_layout Plain Layout
6771 Document\SpecialChar \menuseparator
6778 It is likely that some of the sectioning commands and such in your new
6779 class will work differently from how they worked in the base class—
6780 \begin_inset Flex Code
6783 \begin_layout Plain Layout
6789 in this example—so you can fiddle around with the settings for the different
6790 sections if you wish.
6791 The layout information for sections is contained in
6792 \begin_inset Flex Code
6795 \begin_layout Plain Layout
6801 , but you do not need to copy and change this file.
6802 Instead, you can simply add your changes to your layout file, after the
6804 \begin_inset Flex Code
6807 \begin_layout Plain Layout
6813 , which itself includes
6814 \begin_inset Flex Code
6817 \begin_layout Plain Layout
6824 For example, you might add these lines:
6827 \begin_layout LyX-Code
6831 \begin_layout LyX-Code
6835 \begin_layout LyX-Code
6839 \begin_layout LyX-Code
6843 \begin_layout LyX-Code
6847 \begin_layout Standard
6848 to change the font for chapter headings to sans-serif.
6849 This will override (or, in this case, add to) the existing declaration
6850 for the Chapter style.
6854 \begin_layout Standard
6855 Your new package may also provide commands or environments not present in
6857 In this case, you will want to add these to the layout file.
6859 \begin_inset CommandInset ref
6861 reference "sec:TextClass"
6865 for information on how to do so.
6868 \begin_layout Standard
6870 \begin_inset Flex MenuItem
6873 \begin_layout Plain Layout
6879 can be used with several different document classes, and even if it cannot,
6880 you might find it easiest just to write a module that you can load with
6882 The simplest possible such module would be:
6885 \begin_layout LyX-Code
6888 DeclareLyXModule{My Package}
6891 \begin_layout LyX-Code
6895 \begin_layout LyX-Code
6896 #Support for mypkg.sty.
6899 \begin_layout LyX-Code
6901 \begin_inset Newline newline
6907 \begin_layout LyX-Code
6909 \begin_inset Newline newline
6915 \begin_layout LyX-Code
6917 \begin_inset Newline newline
6923 \begin_inset Newline newline
6929 \begin_layout Standard
6930 A more complex module might modify the behavior of some existing constructs
6931 or define some new ones.
6933 \begin_inset CommandInset ref
6935 reference "sec:TextClass"
6942 \begin_layout Subsection
6944 \begin_inset Flex MenuItem
6947 \begin_layout Plain Layout
6956 \begin_layout Standard
6957 There are two possibilities here.
6958 One is that the class file is itself based upon an existing document class.
6959 For example, many thesis classes are based upon
6960 \begin_inset Flex MenuItem
6963 \begin_layout Plain Layout
6970 To see whether yours is, look for a line like
6973 \begin_layout LyX-Code
6979 \begin_layout Standard
6981 If so, then you may proceed largely as in the previous section, though
6983 \begin_inset Flex Code
6986 \begin_layout Plain Layout
6992 line will be different.
6993 If your new class is
6994 \begin_inset Flex Code
6997 \begin_layout Plain Layout
7003 and it is based upon
7004 \begin_inset Flex Code
7007 \begin_layout Plain Layout
7013 , then the line should read:
7017 \begin_layout Plain Layout
7018 And it will be easiest if you save the file to
7019 \begin_inset Flex Code
7022 \begin_layout Plain Layout
7028 : LyX assumes that the document class has the same name as the layout file.
7037 \begin_layout LyX-Code
7040 DeclareLaTeXClass[thesis,book]{thesis}
7043 \begin_layout Standard
7044 If, on the other hand, the new class is not based upon an existing class,
7045 you will probably have to
7046 \begin_inset Quotes eld
7050 \begin_inset Quotes erd
7054 We strongly suggest copying an existing layout file which uses a similar
7055 LaTeX class and then modifying it, if you can do so.
7056 At least use an existing file as a starting point so you can find out what
7057 items you need to worry about.
7058 Again, the specifics are covered below.
7061 \begin_layout Subsection
7063 \begin_inset CommandInset label
7065 name "sub:Creating-Templates"
7072 \begin_layout Standard
7073 Once you have written a layout file for a new document class, you might
7074 want to consider writing a
7079 A template acts as a kind of tutorial for your layout, showing how it might
7080 be used, though containing dummy content.
7081 You can of course look at the various templates included with LyX for ideas.
7084 \begin_layout Standard
7085 Templates are created just like usual documents: using LyX.
7086 The only difference is that usual documents contain all possible settings,
7087 including the font scheme and the paper size.
7088 Usually a user doesn't want a template to overwrite his preferred settings
7089 for such parameters.
7090 For that reason, the designer of a template should remove the corresponding
7092 \begin_inset Flex Code
7095 \begin_layout Plain Layout
7104 \begin_inset Flex Code
7107 \begin_layout Plain Layout
7115 from the template LyX file.
7116 This can be done with any simple text-editor, for example
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7127 \begin_inset Flex Code
7130 \begin_layout Plain Layout
7139 \begin_layout Standard
7140 Put the edited template files you create in
7141 \begin_inset Flex Code
7144 \begin_layout Plain Layout
7150 , copy the ones you use from the global template directory in
7151 \begin_inset Flex Code
7154 \begin_layout Plain Layout
7160 to the same place, and redefine the template path in the
7161 \begin_inset Flex MenuItem
7164 \begin_layout Plain Layout
7165 Tools\SpecialChar \menuseparator
7166 Preferences\SpecialChar \menuseparator
7175 \begin_layout Standard
7176 Note, by the way, that there is a template which has a particular meaning:
7178 \begin_inset Flex Code
7181 \begin_layout Plain Layout
7188 This template is loaded every time you create a new document with
7189 \begin_inset Flex MenuItem
7192 \begin_layout Plain Layout
7193 File\SpecialChar \menuseparator
7199 in order to provide useful defaults.
7200 To create this template from inside LyX, all you have to do is to open
7201 a document with the correct settings, and use the
7202 \begin_inset Flex MenuItem
7205 \begin_layout Plain Layout
7206 Save as Document Defaults
7214 \begin_layout Subsection
7215 Upgrading old layout files
7218 \begin_layout Standard
7219 The format of layout files changes with each LyX release, so old layout
7220 files need to be converted to the new format.
7221 If LyX reads a layout file in an older format, it automatically calls the
7223 \begin_inset Flex Code
7226 \begin_layout Plain Layout
7232 to convert it to a temporary file in current format.
7233 The original file is left untouched.
7234 If you use the layout file often, then, you may want to convert it permanently,
7235 so that LyX does not have to do so itself every time.
7236 To do this, you can call the converter manually:
7239 \begin_layout Enumerate
7241 \begin_inset Flex Code
7244 \begin_layout Plain Layout
7251 \begin_inset Flex Code
7254 \begin_layout Plain Layout
7263 \begin_layout Enumerate
7265 \begin_inset Newline newline
7269 \begin_inset Flex Code
7272 \begin_layout Plain Layout
7273 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7279 \begin_inset Newline newline
7283 \begin_inset Flex Code
7286 \begin_layout Plain Layout
7292 is the name of your LyX system directory.
7295 \begin_layout Standard
7296 Note that manual conversion does not affect included files, so these will
7297 have to be converted separately.
7300 \begin_layout Section
7301 \begin_inset CommandInset label
7303 name "sec:TextClass"
7307 The layout file format
7310 \begin_layout Standard
7311 The following sections describe how layout files are structured and written.
7312 Our advice is to go slowly, save and test often.
7313 It is really not that hard, except that the multitude of options can become
7314 overwhelming, especially if you try to check out too many at once.
7315 It becomes easier if you use existing layouts of LyX as examples/reference
7316 or if you modify an existing layout to your needs.
7319 \begin_layout Standard
7320 Note that all the tags used in layout files are case-insensitive.
7322 \begin_inset Flex Code
7325 \begin_layout Plain Layout
7332 \begin_inset Flex Code
7335 \begin_layout Plain Layout
7342 \begin_inset Flex Code
7345 \begin_layout Plain Layout
7351 are really the same tag.
7352 The possible arguments are printed in brackets after the tag's name.
7353 The default argument is typeset
7354 \begin_inset Flex Code
7357 \begin_layout Plain Layout
7366 If the argument has a data type like
7367 \begin_inset Quotes eld
7371 \begin_inset Quotes erd
7375 \begin_inset Quotes eld
7379 \begin_inset Quotes erd
7382 , the default is shown like this:
7383 \begin_inset Flex Code
7386 \begin_layout Plain Layout
7397 \begin_layout Subsection
7398 The document class declaration and classification
7401 \begin_layout Standard
7402 Lines in a layout file which begin with
7403 \begin_inset Flex Code
7406 \begin_layout Plain Layout
7413 There is one exception to this rule.
7415 \begin_inset Flex Code
7418 \begin_layout Plain Layout
7424 files should begin with lines like:
7427 \begin_layout LyX-Code
7430 #% Do not delete the line below; configure depends on this
7433 \begin_layout LyX-Code
7444 \begin_layout Plain Layout
7453 eXClass{Article (Standard Class)}
7456 \begin_layout LyX-Code
7461 DeclareCategory{Articles}
7464 \begin_layout Standard
7465 The second and third lines are used when you (re)configure LyX.
7466 The layout file is read by the LaTeX script
7467 \begin_inset Flex Code
7470 \begin_layout Plain Layout
7476 , in a special mode where
7477 \begin_inset Flex Code
7480 \begin_layout Plain Layout
7487 The first line is just a LaTeX comment, the second one contains the mandatory
7488 declaration of the text class and the third line contains the optional
7489 classification of the class.
7490 If these lines appear in a file named
7491 \begin_inset Flex Code
7494 \begin_layout Plain Layout
7500 , then they define a text class of name
7501 \begin_inset Flex Code
7504 \begin_layout Plain Layout
7510 (the name of the layout file) which uses the LaTeX document class
7511 \begin_inset Flex Code
7514 \begin_layout Plain Layout
7520 (the default is to use the same name as the layout).
7522 \begin_inset Quotes eld
7525 Article (Standard Class)
7526 \begin_inset Quotes erd
7529 that appears above is used as a description of the text class in the
7530 \begin_inset Flex MenuItem
7533 \begin_layout Plain Layout
7534 Document\SpecialChar \menuseparator
7542 \begin_inset Quotes eld
7546 \begin_inset Quotes erd
7549 in the example) is also used in the
7550 \begin_inset Flex MenuItem
7553 \begin_layout Plain Layout
7554 Document\SpecialChar \menuseparator
7560 dialog: the text classes are grouped by these categories (which are usually
7561 genres, so typical categories are
7562 \begin_inset Quotes eld
7566 \begin_inset Quotes erd
7570 \begin_inset Quotes eld
7574 \begin_inset Quotes erd
7578 \begin_inset Quotes eld
7582 \begin_inset Quotes erd
7586 \begin_inset Quotes eld
7590 \begin_inset Quotes erd
7594 \begin_inset Quotes eld
7598 \begin_inset Quotes erd
7602 \begin_inset Quotes eld
7606 \begin_inset Quotes erd
7610 If no category has been declared, the class will be put in the
7611 \begin_inset Quotes eld
7615 \begin_inset Quotes erd
7621 \begin_layout Standard
7622 Let's assume that you wrote your own text class that uses the
7623 \begin_inset Flex Code
7626 \begin_layout Plain Layout
7632 document class, but where you changed the appearance of the section headings.
7633 If you put it in a file
7634 \begin_inset Flex Code
7637 \begin_layout Plain Layout
7643 , the header of this file should be:
7646 \begin_layout LyX-Code
7649 #% Do not delete the line below; configure depends on this
7652 \begin_layout LyX-Code
7663 \begin_layout Plain Layout
7672 eXClass[article]{Article (with My Own Headings)}
7675 \begin_layout LyX-Code
7680 DeclareCategory{Articles}
7683 \begin_layout Standard
7684 This declares a text class
7685 \begin_inset Flex Code
7688 \begin_layout Plain Layout
7694 , associated with the LaTeX document class
7695 \begin_inset Flex Code
7698 \begin_layout Plain Layout
7705 \begin_inset Quotes eld
7708 Article (with My Own Headings)
7709 \begin_inset Quotes erd
7713 If your text class depends on several packages, you can declare it as:
7716 \begin_layout LyX-Code
7719 #% Do not delete the line below; configure depends on this
7722 \begin_layout LyX-Code
7733 \begin_layout Plain Layout
7742 eXClass[article,foo.sty]{Article (with My Own Headings)}
7745 \begin_layout LyX-Code
7750 DeclareCategory{Articles}
7753 \begin_layout Standard
7754 This indicates that your text class uses the
7755 \begin_inset Flex Code
7758 \begin_layout Plain Layout
7765 Finally, it is also possible to declare classes for DocBook code.
7766 Typical declarations will look like:
7769 \begin_layout LyX-Code
7772 #% Do not delete the line below; configure depends on this
7775 \begin_layout LyX-Code
7780 DeclareDocBookClass[article]{SGML (DocBook Article)}
7783 \begin_layout LyX-Code
7788 DeclareCategory{Articles (DocBook)}
7791 \begin_layout Standard
7792 Note that these declarations can also be given an optional parameter declaring
7793 the name of the document class (but not a list).
7796 \begin_layout Standard
7797 So, to be as explicit as possible, the form of the layout declaration is:
7800 \begin_layout LyX-Code
7811 \begin_layout Plain Layout
7820 eXClass[class,package.sty]{layout description}
7823 \begin_layout LyX-Code
7828 DeclareCategory{category}
7831 \begin_layout Standard
7832 The class need only be specified if the name of the LaTeX class file and
7833 the name of the layout file are different or if there are packages to load.
7834 If the name of the class file is not specified, then LyX will simply assume
7835 that it is the same as the name of the layout file.
7838 \begin_layout Standard
7839 When the text class has been modified to your taste, all you have to do
7840 is to copy it either to
7841 \begin_inset Flex Code
7844 \begin_layout Plain Layout
7851 \begin_inset Flex Code
7854 \begin_layout Plain Layout
7861 \begin_inset Flex MenuItem
7864 \begin_layout Plain Layout
7865 Tools\SpecialChar \menuseparator
7871 , exit LyX and restart.
7872 Then your new text class should be available along with the others.
7875 \begin_layout Standard
7876 Once the layout file is installed, you can edit it and see your changes
7877 without having to reconfigure or to restart LyX.
7882 \begin_layout Plain Layout
7883 In versions of LyX prior to 1.6, this was not true.
7884 As a result, editing layout files was very time consuming, since you had
7885 constantly to restart LyX to see changes.
7890 You can force a reload of the current layout by using the LyX function
7892 \begin_inset Flex MenuItem
7895 \begin_layout Plain Layout
7902 There is no default binding for this function—though, of course, you can
7903 bind it to a key yourself.
7904 But you will normally use this function simply by entering it in the mini-buffe
7909 \begin_layout Standard
7915 \begin_inset Flex MenuItem
7918 \begin_layout Plain Layout
7924 is very much an `advanced feature'.
7929 recommended that you save your work before using this function.
7934 recommended that you not attempt to edit layout information while simultaneousl
7935 y working on a document that you care about.
7936 Use a test document.
7937 Syntax errors and the like in your layout file could cause peculiar behavior.
7938 In particular, such errors could cause LyX to regard the current layout
7939 as invalid and to attempt to switch to some other layout.
7943 \begin_layout Plain Layout
7944 Really bad syntax errors may even caused LyX to exit.
7945 This is because certain sorts of errors may make LyX unable to read
7955 The LyX team strives to keep LyX stable in such situations, but safe is
7960 \begin_layout Plain Layout
7961 While we're giving advice: make regular backups.
7962 And be nice to your mother.
7970 \begin_layout Subsection
7971 The Module declaration
7974 \begin_layout Standard
7975 A module must begin with a line like the following:
7978 \begin_layout LyX-Code
7985 \begin_layout Plain Layout
7992 yXModule[endnotes.sty]{Endnotes}
7995 \begin_layout Standard
7996 The mandatory argument, in curly brackets, is the name of the module, as
7998 \begin_inset Flex MenuItem
8001 \begin_layout Plain Layout
8002 Document\SpecialChar \menuseparator
8003 Settings\SpecialChar \menuseparator
8010 The argument in square brackets is optional: It declares any LaTeX packages
8011 on which the module depends.
8012 It is also possible to use the form
8013 \begin_inset Flex MenuItem
8016 \begin_layout Plain Layout
8022 as an optional argument, which declares that the module can only be used
8023 when there exists a conversion chain between the formats `
8024 \begin_inset Flex Code
8027 \begin_layout Plain Layout
8034 \begin_inset Flex Code
8037 \begin_layout Plain Layout
8046 \begin_layout Standard
8047 The module declaration should then be followed by lines like the following
8051 \begin_layout Plain Layout
8052 Preferably in English if the module should be published with LyX.
8053 This description will appear in the list of messages to be translated and
8054 will be thus translated with the next interface update.
8062 \begin_layout LyX-Code
8066 \begin_layout LyX-Code
8067 #Adds an endnote command, in addition to footnotes.
8071 \begin_layout LyX-Code
8072 #You will need to add
8074 theendnotes in TeX code where you
8077 \begin_layout LyX-Code
8078 #want the endnotes to appear.
8082 \begin_layout LyX-Code
8086 \begin_layout LyX-Code
8087 #Requires: somemodule | othermodule
8090 \begin_layout LyX-Code
8091 #Excludes: badmodule
8094 \begin_layout Standard
8095 The description is used in
8096 \begin_inset Flex MenuItem
8099 \begin_layout Plain Layout
8100 Document\SpecialChar \menuseparator
8101 Settings\SpecialChar \menuseparator
8107 to provide the user with information about what the module does.
8109 \begin_inset Flex Code
8112 \begin_layout Plain Layout
8118 line is used to identify other modules with which this one must be used;
8120 \begin_inset Flex Code
8123 \begin_layout Plain Layout
8129 line is used to identify modules with which this one may not be used.
8130 Both are optional, and, as shown, multiple modules should be separated
8131 with the pipe symbol: |.
8132 Note that the required modules are treated disjunctively:
8136 of the required modules must be used.
8141 excluded module may be used.
8142 Note that modules are identified here by their filenames without the
8143 \begin_inset Flex Code
8146 \begin_layout Plain Layout
8154 \begin_inset Flex Code
8157 \begin_layout Plain Layout
8164 \begin_inset Flex Code
8167 \begin_layout Plain Layout
8176 \begin_layout Subsection
8180 \begin_layout Standard
8181 The first non-comment line of any layout file, included file, or module
8186 contain the file format number:
8189 \begin_layout Description
8190 \begin_inset Flex Code
8193 \begin_layout Plain Layout
8200 \begin_inset Flex Code
8203 \begin_layout Plain Layout
8209 ] The format number of the layout file.
8212 \begin_layout Standard
8213 This tag was introduced with LyX
8214 \begin_inset space ~
8218 Layout files from older LyX versions do not have an explicit file format
8219 and are considered to have
8220 \begin_inset Flex Code
8223 \begin_layout Plain Layout
8225 \begin_inset space ~
8234 The format for the present version of LyX is format 35.
8235 But each version of LyX is capable of reading earlier versions' layout
8236 files, just as they are capable of reading files produced by earlier versions
8238 There is, however, no provision for converting to earlier formats.
8241 \begin_layout Subsection
8242 \begin_inset CommandInset label
8244 name "sub:General-text-class"
8248 General text class parameters
8251 \begin_layout Standard
8252 These are general parameters that govern the behavior of an entire document
8258 mean that they must appear in
8259 \begin_inset Flex Code
8262 \begin_layout Plain Layout
8268 files rather than in modules.
8269 A module can contain any layout tag.)
8272 \begin_layout Description
8273 \begin_inset Flex Code
8276 \begin_layout Plain Layout
8282 Adds information that will be output in the
8283 \begin_inset Flex Code
8286 \begin_layout Plain Layout
8292 block when the document is output to XHTML.
8293 Typically, this would be used to output CSS style information, but it can
8294 be used for anything that can appear in
8295 \begin_inset Flex Code
8298 \begin_layout Plain Layout
8306 \begin_inset Quotes eld
8310 \begin_inset Flex Code
8313 \begin_layout Plain Layout
8320 \begin_inset Quotes erd
8326 \begin_layout Description
8327 \begin_inset Flex Code
8330 \begin_layout Plain Layout
8336 Adds information to the document preamble.
8338 \begin_inset Newline newline
8342 \begin_inset Quotes eld
8346 \begin_inset Flex Code
8349 \begin_layout Plain Layout
8356 \begin_inset Quotes erd
8362 \begin_layout Description
8363 \begin_inset Flex Code
8366 \begin_layout Plain Layout
8372 Defines formats for use in the display of bibliographic information.
8374 \begin_inset CommandInset ref
8376 reference "sub:Citation-format-description"
8382 \begin_inset Quotes eld
8386 \begin_inset Flex Code
8389 \begin_layout Plain Layout
8396 \begin_inset Quotes erd
8402 \begin_layout Description
8403 \begin_inset Flex Code
8406 \begin_layout Plain Layout
8412 Describes various global options supported by the document class.
8414 \begin_inset CommandInset ref
8416 reference "sub:ClassOptions"
8422 \begin_inset Quotes eld
8426 \begin_inset Flex Code
8429 \begin_layout Plain Layout
8436 \begin_inset Quotes erd
8442 \begin_layout Description
8443 \begin_inset Flex Code
8446 \begin_layout Plain Layout
8453 \begin_inset Flex Code
8456 \begin_layout Plain Layout
8465 \begin_inset space \thinspace{}
8469 \begin_inset Flex Code
8472 \begin_layout Plain Layout
8478 ] Whether the class should
8482 to having one or two columns.
8483 Can be changed in the
8484 \begin_inset Flex MenuItem
8487 \begin_layout Plain Layout
8488 Document\SpecialChar \menuseparator
8497 \begin_layout Description
8498 \begin_inset Flex Code
8501 \begin_layout Plain Layout
8508 \begin_inset Flex Code
8511 \begin_layout Plain Layout
8517 ] This sequence defines the properties for a counter.
8518 If the counter does not yet exist, it is created; if it does exist, it
8521 \begin_inset Quotes eld
8525 \begin_inset Flex Code
8528 \begin_layout Plain Layout
8535 \begin_inset Quotes erd
8539 \begin_inset Newline newline
8543 \begin_inset CommandInset ref
8545 reference "sub:Counters"
8549 for details on counters.
8552 \begin_layout Description
8553 \begin_inset Flex Code
8556 \begin_layout Plain Layout
8562 Sets the default font used to display the document.
8564 \begin_inset CommandInset ref
8566 reference "sub:Font-description"
8570 for how to declare fonts.
8572 \begin_inset Quotes eld
8576 \begin_inset Flex Code
8579 \begin_layout Plain Layout
8586 \begin_inset Quotes erd
8592 \begin_layout Description
8593 \begin_inset Flex Code
8596 \begin_layout Plain Layout
8603 \begin_inset Flex Code
8606 \begin_layout Plain Layout
8612 ] Specifies a module to be included by default with this document class.
8613 The module is specified as filename without the
8614 \begin_inset Flex Code
8617 \begin_layout Plain Layout
8624 The user can still remove the module, but it will be active at the outset.
8625 (This applies only when new files are created, or when this class is chosen
8626 for an existing document.)
8629 \begin_layout Description
8630 \begin_inset Flex Code
8633 \begin_layout Plain Layout
8640 \begin_inset Flex Code
8643 \begin_layout Plain Layout
8649 ] This is the style that will be assigned to new paragraphs, usually
8650 \begin_inset Flex MenuItem
8653 \begin_layout Plain Layout
8660 This will default to the first defined style if not given, but you are
8661 encouraged to use this directive.
8664 \begin_layout Description
8665 \begin_inset Flex Code
8668 \begin_layout Plain Layout
8675 \begin_inset Flex Code
8678 \begin_layout Plain Layout
8684 ] This tag indicates that the module (which is specified by filename without
8686 \begin_inset Flex Code
8689 \begin_layout Plain Layout
8695 extension) cannot be used with this document class.
8696 This might be used in a journal-specific layout file to prevent, say, the
8698 \begin_inset Flex Code
8701 \begin_layout Plain Layout
8707 module that numbers theorems by section.
8712 be used in a module.
8713 Modules have their own way of excluding other modules (see
8714 \begin_inset CommandInset ref
8716 reference "sub:Layout-modules"
8723 \begin_layout Description
8724 \begin_inset Flex Code
8727 \begin_layout Plain Layout
8733 Defines a new float.
8735 \begin_inset CommandInset ref
8737 reference "sub:Floats"
8743 \begin_inset Quotes eld
8747 \begin_inset Flex Code
8750 \begin_layout Plain Layout
8757 \begin_inset Quotes erd
8763 \begin_layout Description
8764 \begin_inset Flex Code
8767 \begin_layout Plain Layout
8773 Sets the information that will be output in the
8774 \begin_inset Flex Code
8777 \begin_layout Plain Layout
8783 block when this document class is output to XHTML.
8784 Note that this will completely override any prior
8785 \begin_inset Flex Code
8788 \begin_layout Plain Layout
8795 \begin_inset Flex Code
8798 \begin_layout Plain Layout
8806 \begin_inset Newline newline
8810 \begin_inset Flex Code
8813 \begin_layout Plain Layout
8819 if you just want to add material to the preamble.) Must end with
8820 \begin_inset Quotes eld
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8834 \begin_inset Quotes erd
8840 \begin_layout Description
8841 \begin_inset Flex Code
8844 \begin_layout Plain Layout
8851 \begin_inset Flex Code
8854 \begin_layout Plain Layout
8860 ] The style to use for the table of contents, bibliography, and so forth,
8861 when the document is output to HTML.
8862 For articles, this should normally be
8863 \begin_inset Flex Code
8866 \begin_layout Plain Layout
8873 \begin_inset Flex Code
8876 \begin_layout Plain Layout
8883 If it is not given, then LyX will attempt to figure out which layout to
8887 \begin_layout Description
8888 \begin_inset Flex Code
8891 \begin_layout Plain Layout
8898 \begin_inset Flex Code
8901 \begin_layout Plain Layout
8907 ] Modifies the properties of the given counter.
8908 If the counter does not exist, the statement is ignored.
8910 \begin_inset Quotes eld
8914 \begin_inset Flex Code
8917 \begin_layout Plain Layout
8924 \begin_inset Quotes erd
8928 \begin_inset Newline newline
8932 \begin_inset CommandInset ref
8934 reference "sub:Counters"
8938 for details on counters.
8941 \begin_layout Description
8942 \begin_inset Flex Code
8945 \begin_layout Plain Layout
8952 \begin_inset Flex Code
8955 \begin_layout Plain Layout
8961 ] Modifies the properties of the given paragraph style.
8962 If the style does not exist, the statement is ignored.
8964 \begin_inset Quotes eld
8968 \begin_inset Flex Code
8971 \begin_layout Plain Layout
8978 \begin_inset Quotes erd
8984 \begin_layout Description
8985 \begin_inset Flex Code
8988 \begin_layout Plain Layout
8995 \begin_inset Flex Code
8998 \begin_layout Plain Layout
9004 ] This allows you to include another layout definition file within yours
9005 to avoid duplicating commands.
9006 Common examples are the standard layout files, for example,
9007 \begin_inset Flex Code
9010 \begin_layout Plain Layout
9016 , which contains most of the basic layouts.
9019 \begin_layout Description
9020 \begin_inset Flex Code
9023 \begin_layout Plain Layout
9030 \begin_inset Flex Code
9033 \begin_layout Plain Layout
9039 ] This section (re-)defines the layout of an inset.
9040 It can be applied to an existing inset or to a new, user-defined inset,
9041 e.g., a new character style.
9043 \begin_inset Quotes eld
9047 \begin_inset Flex Code
9050 \begin_layout Plain Layout
9057 \begin_inset Quotes erd
9061 \begin_inset Newline newline
9065 \begin_inset CommandInset ref
9067 reference "sub:Flex-insets-and"
9071 for more information.
9075 \begin_layout Description
9076 \begin_inset Flex Code
9079 \begin_layout Plain Layout
9086 \begin_inset Flex Code
9089 \begin_layout Plain Layout
9095 ] A string that indicates the width of the left margin on the screen, for
9097 \begin_inset Quotes eld
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9111 \begin_inset Quotes erd
9115 (Note that this is not a `length', like
9116 \begin_inset Quotes eld
9120 \begin_inset Quotes erd
9126 \begin_layout Description
9127 \begin_inset Flex Code
9130 \begin_layout Plain Layout
9137 \begin_inset Flex Code
9140 \begin_layout Plain Layout
9146 ] Deletes an existing counter, usually one defined in an included file.
9149 \begin_layout Description
9150 \begin_inset Flex Code
9153 \begin_layout Plain Layout
9160 \begin_inset Flex Code
9163 \begin_layout Plain Layout
9169 ] Deletes an existing float.
9170 This is particularly useful when you want to suppress a float that has
9171 been defined in an input file.
9174 \begin_layout Description
9175 \begin_inset Flex Code
9178 \begin_layout Plain Layout
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9194 ] Deletes an existing style.
9197 \begin_layout Description
9198 \begin_inset Flex Code
9201 \begin_layout Plain Layout
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9217 ] The file format (as defined in the LyX preferences) produced by this document
9219 It is mainly useful when
9220 \begin_inset Flex Code
9223 \begin_layout Plain Layout
9230 \begin_inset Flex Code
9233 \begin_layout Plain Layout
9239 and one wants to define a new type of literate document.
9240 The format is reset to
9241 \begin_inset Quotes eld
9245 \begin_inset Flex Code
9248 \begin_layout Plain Layout
9255 \begin_inset Quotes erd
9259 \begin_inset Quotes eld
9263 \begin_inset Flex Code
9266 \begin_layout Plain Layout
9273 \begin_inset Quotes erd
9276 when the corresponding
9277 \begin_inset Flex Code
9280 \begin_layout Plain Layout
9286 parameter is encountered.
9289 \begin_layout Description
9290 \begin_inset Flex Code
9293 \begin_layout Plain Layout
9300 \begin_inset Flex Code
9303 \begin_layout Plain Layout
9314 \begin_inset Flex Code
9317 \begin_layout Plain Layout
9324 \begin_inset Flex Code
9327 \begin_layout Plain Layout
9333 ] Specifies what sort of output documents using this class will produce.
9336 \begin_layout Description
9337 \begin_inset Flex Code
9340 \begin_layout Plain Layout
9347 \begin_inset Flex Code
9350 \begin_layout Plain Layout
9357 \begin_inset Flex Code
9360 \begin_layout Plain Layout
9366 ] Specifies options, given in the second string, for the package named by
9369 \begin_inset Quotes eld
9373 \begin_inset Flex Code
9376 \begin_layout Plain Layout
9377 PackageOptions natbib square
9383 \begin_inset Quotes erd
9387 \begin_inset Flex Code
9390 \begin_layout Plain Layout
9396 to be loaded with the
9397 \begin_inset Flex Code
9400 \begin_layout Plain Layout
9407 (For TeXperts, this causes LyX to output:
9408 \begin_inset Flex Code
9411 \begin_layout Plain Layout
9414 PassOptionsToPackage{natbib}{square}
9420 \begin_inset Flex Code
9423 \begin_layout Plain Layout
9432 \begin_layout Description
9433 \begin_inset Flex Code
9436 \begin_layout Plain Layout
9443 \begin_inset Flex Code
9446 \begin_layout Plain Layout
9455 \begin_inset Flex Code
9458 \begin_layout Plain Layout
9465 \begin_inset Flex Code
9468 \begin_layout Plain Layout
9474 ] The default pagestyle.
9475 Can be changed in the
9476 \begin_inset Flex MenuItem
9479 \begin_layout Plain Layout
9480 Document\SpecialChar \menuseparator
9489 \begin_layout Description
9490 \begin_inset Flex Code
9493 \begin_layout Plain Layout
9499 Sets the preamble for the LaTeX document.
9500 Note that this will completely override any prior
9501 \begin_inset Flex Code
9504 \begin_layout Plain Layout
9511 \begin_inset Flex Code
9514 \begin_layout Plain Layout
9522 \begin_inset Flex Code
9525 \begin_layout Plain Layout
9531 if you just want to add material to the preamble.) Must end with
9532 \begin_inset Quotes eld
9536 \begin_inset Flex Code
9539 \begin_layout Plain Layout
9546 \begin_inset Quotes erd
9552 \begin_layout Description
9553 \begin_inset Flex Code
9556 \begin_layout Plain Layout
9563 \begin_inset Flex Code
9566 \begin_layout Plain Layout
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9585 \begin_inset space \thinspace{}
9589 \begin_inset Flex Code
9592 \begin_layout Plain Layout
9598 ] Whether the class already provides the feature
9599 \begin_inset Flex Code
9602 \begin_layout Plain Layout
9609 A feature is in general the name of a package (e.
9610 \begin_inset space \thinspace{}
9614 \begin_inset space \space{}
9618 \begin_inset Flex Code
9621 \begin_layout Plain Layout
9628 \begin_inset Flex Code
9631 \begin_layout Plain Layout
9638 \begin_inset space \thinspace{}
9642 \begin_inset space \space{}
9646 \begin_inset Flex Code
9649 \begin_layout Plain Layout
9656 \begin_inset Flex Code
9659 \begin_layout Plain Layout
9667 \begin_inset CommandInset ref
9669 reference "chap:List-of-functions"
9673 for the list of features.
9676 \begin_layout Description
9677 \begin_inset Flex Code
9680 \begin_layout Plain Layout
9687 \begin_inset Flex Code
9690 \begin_layout Plain Layout
9696 ] Indicates that this layout provides the functionality of the module mentioned,
9697 which should be specified by the filename without the
9698 \begin_inset Flex Code
9701 \begin_layout Plain Layout
9708 This will typically be used if the layout includes the module directly,
9709 rather than using the
9710 \begin_inset Flex Code
9713 \begin_layout Plain Layout
9719 tag to indicate that it ought to be used.
9720 It could also be used in a module that provided an alternate implementation
9721 of the same functionality.
9724 \begin_layout Description
9725 \begin_inset Flex Code
9728 \begin_layout Plain Layout
9735 \begin_inset Flex Code
9738 \begin_layout Plain Layout
9744 ] Whether the class requires the feature
9745 \begin_inset Flex Code
9748 \begin_layout Plain Layout
9755 Multiple features must be separated by commas.
9756 Note that you can only request supported features.
9758 \begin_inset CommandInset ref
9760 reference "chap:List-of-functions"
9764 for the list of features.)
9767 \begin_layout Description
9768 \begin_inset Flex Code
9771 \begin_layout Plain Layout
9778 \begin_inset Flex Code
9781 \begin_layout Plain Layout
9787 ] A string that indicates the width of the right margin on the screen, for
9789 \begin_inset Quotes eld
9793 \begin_inset Flex Code
9796 \begin_layout Plain Layout
9803 \begin_inset Quotes erd
9809 \begin_layout Description
9810 \begin_inset Flex Code
9813 \begin_layout Plain Layout
9820 \begin_inset Flex Code
9823 \begin_layout Plain Layout
9829 ] Sets which divisions get numbered.
9831 \begin_inset Newline newline
9835 \begin_inset Flex Code
9838 \begin_layout Plain Layout
9847 \begin_layout Description
9848 \begin_inset Flex Code
9851 \begin_layout Plain Layout
9858 \begin_inset Flex Code
9861 \begin_layout Plain Layout
9870 \begin_inset space \thinspace{}
9874 \begin_inset Flex Code
9877 \begin_layout Plain Layout
9883 ] Whether the class-default should be printing on one or both sides of the
9885 Can be changed in the
9886 \begin_inset Flex MenuItem
9889 \begin_layout Plain Layout
9890 Document\SpecialChar \menuseparator
9899 \begin_layout Description
9900 \begin_inset Flex Code
9903 \begin_layout Plain Layout
9910 \begin_inset Flex Code
9913 \begin_layout Plain Layout
9919 ] This sequence defines a paragraph style.
9920 If the style does not yet exist, it is created; if it does exist, its parameter
9923 \begin_inset Quotes eld
9927 \begin_inset Flex Code
9930 \begin_layout Plain Layout
9937 \begin_inset Quotes erd
9941 \begin_inset Newline newline
9945 \begin_inset CommandInset ref
9947 reference "sub:Paragraph-Styles"
9951 for details on paragraph styles.
9954 \begin_layout Description
9955 \begin_inset Flex Code
9958 \begin_layout Plain Layout
9965 \begin_inset Flex Code
9968 \begin_layout Plain Layout
9974 ] The name of the command or environment to be used with
9975 \begin_inset Flex Code
9978 \begin_layout Plain Layout
9987 \begin_layout Description
9988 \begin_inset Flex Code
9991 \begin_layout Plain Layout
9998 \begin_inset Flex Code
10001 \begin_layout Plain Layout
10010 \begin_inset Flex Code
10013 \begin_layout Plain Layout
10019 ] Indicates what kind of markup is used to define the title of a document.
10021 \begin_inset Flex Code
10024 \begin_layout Plain Layout
10030 means that the macro with name
10031 \begin_inset Flex Code
10034 \begin_layout Plain Layout
10040 will be inserted after the last layout which has
10041 \begin_inset Quotes eld
10045 \begin_inset Flex Code
10048 \begin_layout Plain Layout
10050 \begin_inset space ~
10059 \begin_inset Quotes erd
10064 \begin_inset Flex Code
10067 \begin_layout Plain Layout
10073 corresponds to the case where all layouts which have
10074 \begin_inset Quotes eld
10078 \begin_inset Flex Code
10081 \begin_layout Plain Layout
10083 \begin_inset space ~
10092 \begin_inset Quotes erd
10095 should be enclosed into the
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10108 \begin_layout Description
10109 \begin_inset Flex Code
10112 \begin_layout Plain Layout
10119 \begin_inset Flex Code
10122 \begin_layout Plain Layout
10128 ] Sets which divisions are included in the table of contents.
10130 \begin_inset Flex Code
10133 \begin_layout Plain Layout
10142 \begin_layout Subsection
10143 \begin_inset Flex Code
10146 \begin_layout Plain Layout
10153 \begin_inset CommandInset label
10155 name "sub:ClassOptions"
10162 \begin_layout Standard
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10173 section can contain the following entries:
10176 \begin_layout Description
10177 \begin_inset Flex Code
10180 \begin_layout Plain Layout
10187 \begin_inset Flex Code
10190 \begin_layout Plain Layout
10196 ] The list of available font sizes for the document's main font, separated
10198 \begin_inset Quotes eld
10202 \begin_inset Flex Code
10205 \begin_layout Plain Layout
10212 \begin_inset Quotes erd
10218 \begin_layout Description
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10228 Used to set the DTD line with XML-based output classes.
10230 \begin_inset space \thinspace{}
10234 \begin_inset Quotes eld
10237 -//OASIS//DTD DocBook V4.2//EN
10238 \begin_inset Quotes erd
10244 \begin_layout Description
10245 \begin_inset Flex Code
10248 \begin_layout Plain Layout
10255 \begin_inset Flex Code
10258 \begin_layout Plain Layout
10259 string="empty|plain|headings|fancy"
10264 ] The list of available page sty\SpecialChar \-
10266 \begin_inset Quotes eld
10270 \begin_inset Flex Code
10273 \begin_layout Plain Layout
10280 \begin_inset Quotes erd
10286 \begin_layout Description
10287 \begin_inset Flex Code
10290 \begin_layout Plain Layout
10297 \begin_inset Flex Code
10300 \begin_layout Plain Layout
10306 ] Some document class options, separated by a comma, that will be added
10307 to the optional part of the
10308 \begin_inset Flex Code
10311 \begin_layout Plain Layout
10322 \begin_layout Standard
10324 \begin_inset Flex Code
10327 \begin_layout Plain Layout
10333 section must end with
10334 \begin_inset Quotes eld
10338 \begin_inset Flex Code
10341 \begin_layout Plain Layout
10348 \begin_inset Quotes erd
10354 \begin_layout Subsection
10356 \begin_inset CommandInset label
10358 name "sub:Paragraph-Styles"
10365 \begin_layout Standard
10366 A paragraph style description looks like this:
10370 \begin_layout Plain Layout
10371 Note that this will either define a new style or modify an existing one.
10379 \begin_layout LyX-Code
10386 \begin_layout LyX-Code
10390 \begin_layout LyX-Code
10394 \begin_layout Standard
10395 where the following commands are allowed:
10398 \begin_layout Description
10399 \begin_inset Flex Code
10402 \begin_layout Plain Layout
10409 \begin_inset Flex Code
10412 \begin_layout Plain Layout
10417 , left, right, center
10422 ] Paragraph alignment.
10425 \begin_layout Description
10426 \begin_inset Flex Code
10429 \begin_layout Plain Layout
10436 \begin_inset Flex Code
10439 \begin_layout Plain Layout
10444 , left, right, center
10449 ] A comma separated list of permitted alignments.
10450 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10452 For example a right-aligned or centered enumeration isn't possible.)
10455 \begin_layout Description
10456 \begin_inset Flex Code
10459 \begin_layout Plain Layout
10466 \begin_inset Flex Code
10469 \begin_layout Plain Layout
10475 ] Defines argument number <int> of a command\SpecialChar \slash{}
10476 environment associated with
10478 This is useful for things like section headings, and only makes sense with
10480 Every (optional or required) argument of a command or environment -- except
10481 for the required argument that is associated with the content of the paragraph
10482 itself -- has a separate definition, where the number specifies the order
10484 The definition must end with
10485 \begin_inset Flex Code
10488 \begin_layout Plain Layout
10495 So a command with two optional arguments has:
10499 \begin_layout Quote
10505 \begin_layout Quote
10511 \begin_layout Quote
10517 \begin_layout Quote
10523 \begin_layout Quote
10529 \begin_layout Quote
10535 \begin_layout Standard
10537 \begin_inset Flex Code
10540 \begin_layout Plain Layout
10546 definition, the following specifications are possible:
10549 \begin_layout Itemize
10550 \begin_inset Flex Code
10553 \begin_layout Plain Layout
10560 \begin_inset Flex Code
10563 \begin_layout Plain Layout
10569 The string that will appear both in the menu (to insert this argument)
10570 and on the argument inset button (unless you also specify a separate
10571 \begin_inset Flex Code
10574 \begin_layout Plain Layout
10581 For the menu, you can define an accelerator by appending the respective
10582 character to the string, divided by
10583 \begin_inset Quotes eld
10587 \begin_inset Quotes erd
10591 \begin_inset space \thinspace{}
10595 \begin_inset space \space{}
10599 \begin_inset Quotes eld
10603 \begin_inset Flex Code
10606 \begin_layout Plain Layout
10613 \begin_inset Quotes erd
10619 \begin_layout Itemize
10620 \begin_inset Flex Code
10623 \begin_layout Plain Layout
10630 \begin_inset Flex Code
10633 \begin_layout Plain Layout
10639 A separate string for the menu.
10640 You can define an accelerator by appending the respective character to
10641 the string, divided by
10642 \begin_inset Quotes eld
10646 \begin_inset Quotes erd
10650 \begin_inset space \thinspace{}
10654 \begin_inset space \space{}
10658 \begin_inset Quotes eld
10662 \begin_inset Flex Code
10665 \begin_layout Plain Layout
10672 \begin_inset Quotes erd
10676 This specification is optional.
10677 If it is not given the
10678 \begin_inset Flex Code
10681 \begin_layout Plain Layout
10687 will be used instead for the menu.
10690 \begin_layout Itemize
10691 \begin_inset Flex Code
10694 \begin_layout Plain Layout
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10710 A longer explanatory text that appears in the tooltip when hovering over
10711 the argument inset.
10714 \begin_layout Itemize
10715 \begin_inset Flex Code
10718 \begin_layout Plain Layout
10725 \begin_inset Flex Code
10728 \begin_layout Plain Layout
10737 \begin_inset space \thinspace{}
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10750 ] Declare if this is a mandatory (1) or an optional (0) argument.
10751 Mandatory arguments will be output empty if not given, while optional arguments
10752 will not be output at all.
10753 By default, mandatory arguments are delimited by
10754 \begin_inset Flex Code
10757 \begin_layout Plain Layout
10763 , while optional arguments are delimited by
10764 \begin_inset Flex Code
10767 \begin_layout Plain Layout
10776 \begin_layout Itemize
10777 \begin_inset Flex Code
10780 \begin_layout Plain Layout
10787 \begin_inset Flex Code
10790 \begin_layout Plain Layout
10796 defines another argument (by its number) which this argument requires to
10797 be output if it is itself output.
10799 \begin_inset space \thinspace{}
10802 g., in LaTeX commands, optional arguments often require previous optional
10803 arguments to be output (at least empty), as in
10804 \begin_inset Flex Code
10807 \begin_layout Plain Layout
10810 command[][argument]{text}
10816 This can be achieved by the statement
10817 \begin_inset Flex Code
10820 \begin_layout Plain Layout
10827 \begin_inset Flex Code
10830 \begin_layout Plain Layout
10839 \begin_layout Itemize
10840 \begin_inset Flex Code
10843 \begin_layout Plain Layout
10850 \begin_inset Flex Code
10853 \begin_layout Plain Layout
10859 defines a custom left delimiter (instead of
10860 \begin_inset Flex Code
10863 \begin_layout Plain Layout
10870 \begin_inset Flex Code
10873 \begin_layout Plain Layout
10880 A line break in the output can be indicated by
10881 \begin_inset Flex Code
10884 \begin_layout Plain Layout
10893 \begin_layout Itemize
10894 \begin_inset Flex Code
10897 \begin_layout Plain Layout
10904 \begin_inset Flex Code
10907 \begin_layout Plain Layout
10913 defines a custom right delimiter (instead of
10914 \begin_inset Flex Code
10917 \begin_layout Plain Layout
10924 \begin_inset Flex Code
10927 \begin_layout Plain Layout
10934 A line break in the output can be indicated by
10935 \begin_inset Flex Code
10938 \begin_layout Plain Layout
10947 \begin_layout Itemize
10948 \begin_inset Flex Code
10951 \begin_layout Plain Layout
10958 \begin_inset Flex Code
10961 \begin_layout Plain Layout
10967 defines an argument that is inserted if and only if no user-specified arguments
10969 \begin_inset space \thinspace{}
10973 \begin_inset space \space{}
10976 if no argument inset has been inserted (note that also an empty argument
10977 inset omits the DefaultArg).
10978 Multiple arguments need to be separated by comma.
10981 \begin_layout Itemize
10982 \begin_inset Flex Code
10985 \begin_layout Plain Layout
10992 \begin_inset Flex Code
10995 \begin_layout Plain Layout
11001 defines an argument that is inserted in any case (alone or in addition
11002 to user-specified arguments).
11003 Multiple arguments need to be separated by comma.
11006 \begin_layout Itemize
11007 \begin_inset Flex Code
11010 \begin_layout Plain Layout
11016 The font used for the argument content, see
11017 \begin_inset CommandInset ref
11019 reference "sub:Font-description"
11026 \begin_layout Itemize
11027 \begin_inset Flex Code
11030 \begin_layout Plain Layout
11036 The font used for the label; see
11037 \begin_inset CommandInset ref
11039 reference "sub:Font-description"
11046 \begin_layout Itemize
11047 \begin_inset Flex Code
11050 \begin_layout Plain Layout
11057 \begin_inset Flex Code
11060 \begin_layout Plain Layout
11065 , Minimalistic, Conglomerate
11070 ] describes the rendering style used for the inset's frame and buttons.
11073 \begin_layout Itemize
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11084 \begin_inset Flex Code
11087 \begin_layout Plain Layout
11094 \begin_inset Flex Code
11097 \begin_layout Plain Layout
11103 , this argument is automatically inserted when the respective style is selected.
11104 Currently, only one argument per style\SpecialChar \slash{}
11105 layout can be automatically inserted.
11108 \begin_layout Standard
11109 By default, the text entered in the LyX workarea in the respective layout
11110 is the last (mandatory) argument of a command if the
11111 \begin_inset Flex Code
11114 \begin_layout Plain Layout
11121 \begin_inset Flex Code
11124 \begin_layout Plain Layout
11131 However, arguments with the prefix
11132 \begin_inset Flex Code
11135 \begin_layout Plain Layout
11141 are output after this workarea argument.
11142 Note that post-argument numbering restarts at 1, so the first argument
11143 following the workarea argument is
11144 \begin_inset Flex Code
11147 \begin_layout Plain Layout
11154 Post-arguments are ignored in any other
11155 \begin_inset Flex Code
11158 \begin_layout Plain Layout
11165 \begin_inset Flex Code
11168 \begin_layout Plain Layout
11177 \begin_layout Standard
11179 \begin_inset Flex Code
11182 \begin_layout Plain Layout
11191 \begin_inset Flex Code
11194 \begin_layout Plain Layout
11203 \begin_inset Flex Code
11206 \begin_layout Plain Layout
11212 followed by the number (e.
11213 \begin_inset space \thinspace{}
11217 \begin_inset space \space{}
11221 \begin_inset Flex Code
11224 \begin_layout Plain Layout
11234 \begin_layout Description
11235 \begin_inset Flex Code
11238 \begin_layout Plain Layout
11244 Note that this will completely override any prior
11245 \begin_inset Flex Code
11248 \begin_layout Plain Layout
11254 declaration for this style.
11256 \begin_inset Quotes eld
11260 \begin_inset Flex Code
11263 \begin_layout Plain Layout
11270 \begin_inset Quotes erd
11275 \begin_inset CommandInset ref
11277 reference "sub:I18n"
11281 for details on its use.
11284 \begin_layout Description
11285 \begin_inset Flex Code
11288 \begin_layout Plain Layout
11295 \begin_inset Flex Code
11298 \begin_layout Plain Layout
11308 \begin_layout Plain Layout
11309 Note that a `float' here is a real number, such as: 1.5.
11314 The vertical space with which the last of a chain of paragraphs with this
11315 style is separated from the following paragraph.
11316 If the next paragraph has another style, the separations are not simply
11317 added, but the maximum is taken.
11320 \begin_layout Description
11321 \begin_inset Flex Code
11324 \begin_layout Plain Layout
11331 \begin_inset Flex Code
11334 \begin_layout Plain Layout
11340 ] The category for this style.
11341 This is used to group related styles in the style combobox on the toolbar.
11342 Any string can be used, but you may want to use existing categories with
11347 \begin_layout Description
11348 \begin_inset Flex Code
11351 \begin_layout Plain Layout
11357 Depth of XML command.
11358 Used only with XML-type formats.
11361 \begin_layout Description
11362 \begin_inset Flex Code
11365 \begin_layout Plain Layout
11372 \begin_inset Flex Code
11375 \begin_layout Plain Layout
11381 ] Copies all the features of an existing style into the current one.
11385 \begin_layout Description
11386 \begin_inset Flex Code
11389 \begin_layout Plain Layout
11396 \begin_inset Flex Code
11399 \begin_layout Plain Layout
11405 ] The name of a style whose preamble should be output
11410 This allows to ensure some ordering of the preamble snippets when macros
11411 definitions depend on one another.
11415 \begin_layout Plain Layout
11416 Note that, besides that functionality, there is no way to ensure any ordering
11418 The ordering that you see in a given version of LyX may change without
11419 warning in later versions.
11427 \begin_layout Description
11428 \begin_inset Flex Code
11431 \begin_layout Plain Layout
11438 \begin_inset Flex Code
11441 \begin_layout Plain Layout
11446 , Box, Filled_Box, Static
11451 ] The type of label that stands at the end of the paragraph (or sequence
11453 \begin_inset Flex Code
11456 \begin_layout Plain Layout
11463 \begin_inset Newline newline
11467 \begin_inset Flex Code
11470 \begin_layout Plain Layout
11477 \begin_inset Flex Code
11480 \begin_layout Plain Layout
11487 \begin_inset Flex Code
11490 \begin_layout Plain Layout
11498 \begin_inset Flex Code
11501 \begin_layout Plain Layout
11508 \begin_inset Quotes eld
11512 \begin_inset Quotes erd
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11526 \begin_inset space \space{}
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11539 ) is a white (resp.
11540 \begin_inset space ~
11543 black) square suitable for end of proof markers,
11544 \begin_inset Flex Code
11547 \begin_layout Plain Layout
11553 is an explicit text string.
11556 \begin_layout Description
11557 \begin_inset Flex Code
11560 \begin_layout Plain Layout
11567 \begin_inset Flex Code
11570 \begin_layout Plain Layout
11576 ] The string used for a label with a
11577 \begin_inset Flex Code
11580 \begin_layout Plain Layout
11587 \begin_inset Newline newline
11591 \begin_inset Flex Code
11594 \begin_layout Plain Layout
11604 \begin_layout Description
11605 \begin_inset Flex Code
11608 \begin_layout Plain Layout
11614 The font used for both the text body
11620 \begin_inset CommandInset ref
11622 reference "sub:Font-description"
11627 Note that defining this font automatically defines the
11628 \begin_inset Flex Code
11631 \begin_layout Plain Layout
11638 So you should define this one first if you also want to define
11639 \begin_inset Flex Code
11642 \begin_layout Plain Layout
11651 \begin_layout Description
11652 \begin_inset Flex Code
11655 \begin_layout Plain Layout
11662 \begin_inset Flex Code
11665 \begin_layout Plain Layout
11671 ] Used for backporting new styles to stable LyX versions.
11672 The first stable version that supports this tag is LyX 2.1.0.
11673 The argment is a number which may either be 0, -1 or any value greater
11676 \begin_inset Flex Code
11679 \begin_layout Plain Layout
11685 flag of a style is greater than zero, it will always be written to the
11687 If a .lyx file is read, the style definitions from the document header are
11688 added to the document class.
11689 Therefore even older LyX versions can handle the style.
11691 \begin_inset Flex Code
11694 \begin_layout Plain Layout
11700 is a version number: If the style is read, and the version number is less
11701 than the version number of the already existing style in the document class,
11702 the new style is ignored.
11703 If the version number is greater, the new style replaces the existing style.
11704 A value of -1 means an infinite version number, i.
11705 \begin_inset space \thinspace{}
11709 \begin_inset space \space{}
11712 the style is always used.
11715 \begin_layout Description
11716 \begin_inset Flex Code
11719 \begin_layout Plain Layout
11726 \begin_inset Flex Code
11729 \begin_layout Plain Layout
11738 \begin_inset space \thinspace{}
11742 \begin_inset Flex Code
11745 \begin_layout Plain Layout
11751 ] Usually LyX does not allow you to insert more than one space between words,
11752 since a space is considered as the separation between two words, not a
11753 character or symbol of its own.
11754 This is a very fine thing but sometimes annoying, for example, when typing
11755 program code or plain LaTeX code.
11757 \begin_inset Flex Code
11760 \begin_layout Plain Layout
11767 Note that LyX will create protected blanks for the additional blanks when
11768 in another mode than LaTeX-mode.
11771 \begin_layout Description
11772 \begin_inset Flex Code
11775 \begin_layout Plain Layout
11781 These tags are used with XHTML output.
11783 \begin_inset CommandInset ref
11785 reference "sub:Paragraph-Style-XHTML"
11792 \begin_layout Description
11793 \begin_inset Flex Code
11796 \begin_layout Plain Layout
11802 [FIXME] (Used only with XML-type formats.)
11805 \begin_layout Description
11806 \begin_inset Flex Code
11809 \begin_layout Plain Layout
11816 \begin_inset Flex Code
11819 \begin_layout Plain Layout
11828 \begin_inset space \thinspace{}
11832 \begin_inset Flex Code
11835 \begin_layout Plain Layout
11842 \begin_inset Flex Code
11845 \begin_layout Plain Layout
11851 , marks the style as to be included in the document preamble and not in
11853 This is useful for document classes that want such information as the title
11854 and author to appear in the preamble.
11855 Note that this works only for styles for which the
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11866 \begin_inset Flex Code
11869 \begin_layout Plain Layout
11876 \begin_inset Flex Code
11879 \begin_layout Plain Layout
11888 \begin_layout Description
11889 \begin_inset Flex Code
11892 \begin_layout Plain Layout
11899 \begin_inset Flex Code
11902 \begin_layout Plain Layout
11911 \begin_inset space \thinspace{}
11915 \begin_inset Flex Code
11918 \begin_layout Plain Layout
11925 \begin_inset Flex Code
11928 \begin_layout Plain Layout
11934 , marks the style as being part of a title block (see also the
11935 \begin_inset Flex Code
11938 \begin_layout Plain Layout
11945 \begin_inset Flex Code
11948 \begin_layout Plain Layout
11957 \begin_layout Description
11958 \begin_inset Flex Code
11961 \begin_layout Plain Layout
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11977 ] The LaTeX command sequence declaring an item in a list.
11978 The command is to be defined without the preceding backslash (the default
11980 \begin_inset Quotes eld
11984 \begin_inset Quotes erd
11988 \begin_inset Flex Code
11991 \begin_layout Plain Layout
11999 in the LaTeX output).
12002 \begin_layout Description
12003 \begin_inset Flex Code
12006 \begin_layout Plain Layout
12013 \begin_inset Flex Code
12016 \begin_layout Plain Layout
12022 ] This provides extra space between paragraphs that have the same style.
12023 If you put other styles into an environment, each is separated with the
12025 \begin_inset Flex Code
12028 \begin_layout Plain Layout
12035 But the whole items of the environment are additionally separated with
12037 \begin_inset Flex Code
12040 \begin_layout Plain Layout
12047 Note that this is a
12052 \begin_layout Description
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12062 [FIXME] (Used only with XML-type formats.)
12065 \begin_layout Description
12066 \begin_inset Flex Code
12069 \begin_layout Plain Layout
12076 \begin_inset Flex Code
12079 \begin_layout Plain Layout
12088 \begin_inset space \thinspace{}
12092 \begin_inset Flex Code
12095 \begin_layout Plain Layout
12101 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12102 lead to empty LaTeX output.
12103 There are some cases where this could be desirable however: in a letter
12104 template, the required fields can be provided as empty fields, so that
12105 people do not forget them; in some special classes, a style can be used
12106 as some kind of break, which does not contain actual text.
12109 \begin_layout Description
12110 \begin_inset Flex Code
12113 \begin_layout Plain Layout
12120 \begin_inset Flex Code
12123 \begin_layout Plain Layout
12129 ] The vertical space between the label and the text body.
12130 Only used for labels that are above the text body (
12131 \begin_inset Flex Code
12134 \begin_layout Plain Layout
12141 \begin_inset Newline newline
12145 \begin_inset Flex Code
12148 \begin_layout Plain Layout
12149 Centered_Top_Environment
12157 \begin_layout Description
12158 \begin_inset Flex Code
12161 \begin_layout Plain Layout
12168 \begin_inset Flex Code
12171 \begin_layout Plain Layout
12177 ] The name of the counter for automatic numbering.
12178 In order to have the counter appear with your label, you will need to reference
12180 \begin_inset Flex Code
12183 \begin_layout Plain Layout
12192 This will work with
12193 \begin_inset Flex Code
12196 \begin_layout Plain Layout
12203 \begin_inset Flex Code
12206 \begin_layout Plain Layout
12213 \begin_inset Flex Code
12216 \begin_layout Plain Layout
12223 \begin_inset Flex Code
12226 \begin_layout Plain Layout
12233 \begin_inset Newline newline
12241 \begin_inset Flex Code
12244 \begin_layout Plain Layout
12251 \begin_inset Flex Code
12254 \begin_layout Plain Layout
12260 , though this case is a bit complicated.
12261 Suppose you declare
12262 \begin_inset Quotes eld
12266 \begin_inset Flex Code
12269 \begin_layout Plain Layout
12270 LabelCounter myenum
12276 \begin_inset Quotes erd
12280 Then the actual counters used are
12281 \begin_inset Flex Code
12284 \begin_layout Plain Layout
12291 \begin_inset Flex Code
12294 \begin_layout Plain Layout
12301 \begin_inset Flex Code
12304 \begin_layout Plain Layout
12311 \begin_inset Flex Code
12314 \begin_layout Plain Layout
12320 , much as in LaTeX.
12321 These counters must all be declared separately.
12322 \begin_inset Newline newline
12326 \begin_inset CommandInset ref
12328 reference "sub:Counters"
12332 for details on counters.
12335 \begin_layout Description
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12345 The font used for the label.
12347 \begin_inset CommandInset ref
12349 reference "sub:Font-description"
12356 \begin_layout Description
12357 \begin_inset Flex Code
12360 \begin_layout Plain Layout
12367 \begin_inset Flex Code
12370 \begin_layout Plain Layout
12376 ] Text that indicates how far a label should be indented.
12379 \begin_layout Description
12380 \begin_inset Flex Code
12383 \begin_layout Plain Layout
12390 \begin_inset Flex Code
12393 \begin_layout Plain Layout
12399 ] Text that indicates the amount of horizontal space between the label and
12401 Only used for labels that are not above the text body.
12404 \begin_layout Description
12405 \begin_inset Flex Code
12408 \begin_layout Plain Layout
12415 \begin_inset Flex Code
12418 \begin_layout Plain Layout
12424 ] The string used for the label.
12426 \begin_inset Flex Code
12429 \begin_layout Plain Layout
12435 is set, this string can be contain the special formatting commands described
12437 \begin_inset CommandInset ref
12439 reference "sub:Counters"
12446 \begin_layout Description
12447 \begin_inset Flex Code
12450 \begin_layout Plain Layout
12451 LabelStringAppendix
12457 \begin_inset Flex Code
12460 \begin_layout Plain Layout
12466 ] This is used inside the appendix instead of
12467 \begin_inset Newline newline
12471 \begin_inset Flex Code
12474 \begin_layout Plain Layout
12482 \begin_inset Flex Code
12485 \begin_layout Plain Layout
12492 \begin_inset Newline newline
12496 \begin_inset Flex Code
12499 \begin_layout Plain Layout
12500 LabelStringAppendix
12508 \begin_layout Description
12509 \begin_inset Flex Code
12512 \begin_layout Plain Layout
12518 [FIXME] (Used only with XML-type formats.)
12521 \begin_layout Description
12522 \begin_inset Flex Code
12525 \begin_layout Plain Layout
12532 \begin_inset Flex Code
12535 \begin_layout Plain Layout
12540 , Manual, Static, Above,
12541 \begin_inset Newline newline
12544 Centered, Sensitive, Enumerate,
12545 \begin_inset Newline newline
12548 Itemize, Bibliography
12557 \begin_layout Description
12558 \begin_inset Flex Code
12561 \begin_layout Plain Layout
12567 means the label is the very first word (up to the first real blank).
12568 Use protected spaces if you want more than one word as the label.
12572 \begin_layout Description
12573 \begin_inset Flex Code
12576 \begin_layout Plain Layout
12582 means the label is simply what is declared as
12583 \begin_inset Flex Code
12586 \begin_layout Plain Layout
12593 This will be displayed
12594 \begin_inset Quotes eld
12598 \begin_inset Quotes erd
12601 , at the beginning of the paragraph.
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12613 \begin_inset Flex Code
12616 \begin_layout Plain Layout
12622 , then it will be displayed only in the first paragraph of any sequence
12623 of paragraphs with the same
12624 \begin_inset Flex Code
12627 \begin_layout Plain Layout
12636 \begin_layout Description
12637 \begin_inset Flex Code
12640 \begin_layout Plain Layout
12647 \begin_inset space ~
12651 \begin_inset space ~
12655 \begin_inset Flex Code
12658 \begin_layout Plain Layout
12664 are special cases of
12665 \begin_inset Flex Code
12668 \begin_layout Plain Layout
12675 The label will be printed above the paragraph either at the beginning of
12676 the line or centered.
12679 \begin_layout Description
12680 \begin_inset Flex Code
12683 \begin_layout Plain Layout
12689 is a special case for the caption-labels
12690 \begin_inset Quotes eld
12694 \begin_inset Quotes erd
12698 \begin_inset Quotes eld
12702 \begin_inset Quotes erd
12706 \begin_inset Newline newline
12710 \begin_inset Flex Code
12713 \begin_layout Plain Layout
12719 means the (hardcoded) label string depends on the kind of float: It is
12720 hardcoded to be `FloatType N', where N is the value of the counter associated
12722 For the case that a caption is inserted outside of a float the
12723 \begin_inset Flex Code
12726 \begin_layout Plain Layout
12733 \begin_inset Quotes eld
12737 \begin_inset Quotes erd
12743 \begin_layout Description
12744 \begin_inset Flex Code
12747 \begin_layout Plain Layout
12753 produces the usual sort of enumeration labels.
12754 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12755 small Roman numerals, and uppercase letters for the four possible depths.
12758 \begin_layout Description
12759 \begin_inset Flex Code
12762 \begin_layout Plain Layout
12768 produces various bullets at the different levels.
12769 It is also hardcoded.
12772 \begin_layout Description
12773 \begin_inset Flex Code
12776 \begin_layout Plain Layout
12782 should be used only with
12783 \begin_inset Flex Code
12786 \begin_layout Plain Layout
12787 LatexType BibEnvironment
12796 \begin_layout Description
12797 \begin_inset Flex Code
12800 \begin_layout Plain Layout
12806 Note that this will completely override any prior
12807 \begin_inset Flex Code
12810 \begin_layout Plain Layout
12816 declaration for this style.
12818 \begin_inset Quotes eld
12822 \begin_inset Flex Code
12825 \begin_layout Plain Layout
12832 \begin_inset Quotes erd
12837 \begin_inset CommandInset ref
12839 reference "sub:I18n"
12843 for details on its use.
12846 \begin_layout Description
12847 \begin_inset Flex Code
12850 \begin_layout Plain Layout
12857 \begin_inset Flex Code
12860 \begin_layout Plain Layout
12866 ] The name of the corresponding LaTeX stuff.
12867 Either the environment or command name.
12870 \begin_layout Description
12871 \begin_inset Flex Code
12874 \begin_layout Plain Layout
12881 \begin_inset Flex Code
12884 \begin_layout Plain Layout
12890 ] An optional parameter for the corresponding
12891 \begin_inset Flex Code
12894 \begin_layout Plain Layout
12901 This parameter cannot be changed from within LyX (use
12902 \begin_inset Flex Code
12905 \begin_layout Plain Layout
12911 for customizable parameters).
12912 This will be output as is after all LaTeX
12913 \begin_inset Flex Code
12916 \begin_layout Plain Layout
12925 \begin_layout Description
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12936 \begin_inset Flex Code
12939 \begin_layout Plain Layout
12944 , Command, Environment, Item_Environment,
12945 \begin_inset Newline newline
12948 List_Environment, Bib_Environment
12953 ] How the style should be translated into LaTeX.
12957 \begin_layout Plain Layout
12958 \begin_inset Flex Code
12961 \begin_layout Plain Layout
12967 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12968 Visit the SGML class files for specific examples.
12977 \begin_layout Description
12978 \begin_inset Flex Code
12981 \begin_layout Plain Layout
12987 means nothing special.
12990 \begin_layout Description
12991 \begin_inset Flex Code
12994 \begin_layout Plain Layout
13001 \begin_inset Flex Code
13004 \begin_layout Plain Layout
13011 {\SpecialChar \ldots{}
13020 \begin_layout Description
13021 \begin_inset Flex Code
13024 \begin_layout Plain Layout
13031 \begin_inset Flex Code
13034 \begin_layout Plain Layout
13041 }\SpecialChar \ldots{}
13057 \begin_layout Description
13058 \begin_inset Flex Code
13061 \begin_layout Plain Layout
13068 \begin_inset Flex Code
13071 \begin_layout Plain Layout
13078 \begin_inset Flex Code
13081 \begin_layout Plain Layout
13089 is generated for each paragraph of this environment.
13093 \begin_layout Description
13094 \begin_inset Flex Code
13097 \begin_layout Plain Layout
13104 \begin_inset Flex Code
13107 \begin_layout Plain Layout
13114 \begin_inset Newline newline
13118 \begin_inset Flex Code
13121 \begin_layout Plain Layout
13127 is passed as an argument to the environment.
13128 \begin_inset Newline newline
13132 \begin_inset Flex Code
13135 \begin_layout Plain Layout
13141 can be defined in the
13142 \begin_inset Flex MenuItem
13145 \begin_layout Plain Layout
13146 Edit\SpecialChar \menuseparator
13148 \begin_inset space ~
13159 \begin_layout Description
13160 \begin_inset Flex Code
13163 \begin_layout Plain Layout
13170 \begin_inset Flex Code
13173 \begin_layout Plain Layout
13179 but adds additionally the necessary mandatory argument (the longest label)
13180 to the begin statement of the bibliography environment:
13181 \begin_inset Newline newline
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13191 begin{thebibliography}{99}
13196 It is therefore only useful for bibliography environments.
13197 The default longest label
13198 \begin_inset Quotes eld
13202 \begin_inset Quotes erd
13205 can be changed by the user in the paragraph settings of a bibliography
13209 \begin_layout Standard
13210 Putting the last few things together, the LaTeX output will be either:
13213 \begin_layout LyX-Code
13216 LatexName[LatexParam]{\SpecialChar \ldots{}
13220 \begin_layout Standard
13224 \begin_layout LyX-Code
13227 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13233 \begin_layout Standard
13234 depending upon the LaTeX type.
13238 \begin_layout Description
13239 \begin_inset Flex Code
13242 \begin_layout Plain Layout
13249 \begin_inset Flex Code
13252 \begin_layout Plain Layout
13258 ] A string that is put at the beginning of the style content.
13259 A line break in the output can be indicated by
13260 \begin_inset Flex Code
13263 \begin_layout Plain Layout
13272 \begin_layout Description
13273 \begin_inset Flex Code
13276 \begin_layout Plain Layout
13283 \begin_inset Flex Code
13286 \begin_layout Plain Layout
13292 ] If you put styles into environments, the different
13293 \begin_inset Flex Code
13296 \begin_layout Plain Layout
13302 are not simply added, but added with a factor
13303 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13307 Note that this parameter is also used when
13308 \begin_inset Flex Code
13311 \begin_layout Plain Layout
13318 \begin_inset Flex Code
13321 \begin_layout Plain Layout
13328 \begin_inset Flex Code
13331 \begin_layout Plain Layout
13338 Then it is added to the manual or dynamic margin.
13339 \begin_inset Newline newline
13343 \begin_inset Quotes eld
13347 \begin_inset Flex Code
13350 \begin_layout Plain Layout
13357 \begin_inset Quotes erd
13360 means that the paragraph is indented with the width of
13361 \begin_inset Quotes eld
13365 \begin_inset Flex Code
13368 \begin_layout Plain Layout
13375 \begin_inset Quotes erd
13378 in the normal font.
13379 You can get a negative width by prefixing the string with
13380 \begin_inset Quotes eld
13384 \begin_inset Flex Code
13387 \begin_layout Plain Layout
13394 \begin_inset Quotes erd
13398 This way was chosen so that the look is the same with each used screen
13402 \begin_layout Description
13403 \begin_inset Flex Code
13406 \begin_layout Plain Layout
13413 \begin_inset Flex Code
13416 \begin_layout Plain Layout
13421 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13427 \begin_inset Newline newline
13430 The kind of margin that the style has on the left side.
13434 \begin_layout Description
13435 \begin_inset Flex Code
13438 \begin_layout Plain Layout
13444 just means a fixed margin.
13447 \begin_layout Description
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13457 means that the left margin depends on the string entered in the
13458 \begin_inset Flex MenuItem
13461 \begin_layout Plain Layout
13462 Edit\SpecialChar \menuseparator
13464 \begin_inset space ~
13473 This is used to typeset nice lists without tabulators.
13476 \begin_layout Description
13477 \begin_inset Flex Code
13480 \begin_layout Plain Layout
13486 means that the margin depends on the size of the label.
13487 This is used for automatic enumerated headlines.
13488 It is obvious that the headline
13489 \begin_inset Quotes eld
13492 5.4.3.2.1 Very long headline
13493 \begin_inset Quotes erd
13496 must have a wider left margin (as wide as
13497 \begin_inset Quotes eld
13501 \begin_inset Quotes erd
13504 plus the space) than
13505 \begin_inset Quotes eld
13508 3.2 Very long headline
13509 \begin_inset Quotes erd
13513 \begin_inset Quotes eld
13517 \begin_inset Quotes erd
13520 are not able to do this.
13523 \begin_layout Description
13524 \begin_inset Flex Code
13527 \begin_layout Plain Layout
13533 is similar, but only the very first row of the paragraph is dynamic, while
13534 the others are static; this is used, for example, for descriptions.
13537 \begin_layout Description
13538 \begin_inset Flex Code
13541 \begin_layout Plain Layout
13547 means the margin is chosen in a way that the longest row of this paragraph
13548 fits to the right margin.
13549 This is used to typeset an address on the right edge of the page.
13553 \begin_layout Description
13554 \begin_inset Flex Code
13557 \begin_layout Plain Layout
13564 \begin_inset Flex Code
13567 \begin_layout Plain Layout
13576 \begin_inset space \thinspace{}
13580 \begin_inset Flex Code
13583 \begin_layout Plain Layout
13589 ] Whether fragile commands in this style should be
13590 \begin_inset Flex Code
13593 \begin_layout Plain Layout
13606 whether this command should itself be protected.)
13609 \begin_layout Description
13610 \begin_inset Flex Code
13613 \begin_layout Plain Layout
13620 \begin_inset Flex Code
13623 \begin_layout Plain Layout
13630 \begin_inset space \thinspace{}
13634 \begin_inset Flex Code
13637 \begin_layout Plain Layout
13645 ] Whether newlines are translated into LaTeX newlines (
13646 \begin_inset Flex Code
13649 \begin_layout Plain Layout
13660 The translation can be switched off to allow more comfortable LaTeX editing
13664 \begin_layout Description
13665 \begin_inset Flex Code
13668 \begin_layout Plain Layout
13675 \begin_inset Flex Code
13678 \begin_layout Plain Layout
13687 \begin_inset space \thinspace{}
13691 \begin_inset Flex Code
13694 \begin_layout Plain Layout
13700 ] If set to true, and if
13701 \begin_inset Flex Code
13704 \begin_layout Plain Layout
13711 \begin_inset Flex Code
13714 \begin_layout Plain Layout
13720 ) paragraphs are being indented, then the indentation of such a paragraph
13721 following one of this type will be suppressed.
13722 (So this will not affect the display of non-default paragraphs.)
13725 \begin_layout Description
13726 \begin_inset Flex Code
13729 \begin_layout Plain Layout
13736 \begin_inset Flex Code
13739 \begin_layout Plain Layout
13745 ] Name of a style that has replaced this style.
13746 This is used to rename a style, while keeping backward compatibility.
13749 \begin_layout Description
13750 \begin_inset Flex Code
13753 \begin_layout Plain Layout
13760 \begin_inset Flex Code
13763 \begin_layout Plain Layout
13772 \begin_inset space \thinspace{}
13776 \begin_inset Flex Code
13779 \begin_layout Plain Layout
13785 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13786 output, but only by a line break; together with
13787 \begin_inset Flex Code
13790 \begin_layout Plain Layout
13796 , this allows to emulate a plain text editor (like the ERT inset).
13799 \begin_layout Description
13800 \begin_inset Flex Code
13803 \begin_layout Plain Layout
13810 \begin_inset Flex Code
13813 \begin_layout Plain Layout
13819 ] The indent of the very first line of a paragraph.
13821 \begin_inset Newline newline
13825 \begin_inset Flex Code
13828 \begin_layout Plain Layout
13834 will be fixed for a certain style.
13835 The exception is the default style, since the indentation for these paragraphs
13836 can be prohibited with
13837 \begin_inset Flex Code
13840 \begin_layout Plain Layout
13848 \begin_inset Flex Code
13851 \begin_layout Plain Layout
13857 style paragraphs inside environments use the
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13867 of the environment, not their native one.
13869 \begin_inset Flex Code
13872 \begin_layout Plain Layout
13878 paragraphs inside an enumeration are not indented.
13881 \begin_layout Description
13882 \begin_inset Flex Code
13885 \begin_layout Plain Layout
13892 \begin_inset Flex Code
13895 \begin_layout Plain Layout
13901 ] The vertical space between two paragraphs of this style.
13904 \begin_layout Description
13905 \begin_inset Flex Code
13908 \begin_layout Plain Layout
13915 \begin_inset Flex Code
13918 \begin_layout Plain Layout
13924 ] LyX allows the user to choose either
13925 \begin_inset Quotes eld
13929 \begin_inset Quotes erd
13933 \begin_inset Quotes eld
13937 \begin_inset Quotes erd
13940 to separate paragraphs.
13942 \begin_inset Quotes eld
13946 \begin_inset Quotes erd
13950 \begin_inset Flex Code
13953 \begin_layout Plain Layout
13961 \begin_inset Quotes eld
13965 \begin_inset Quotes erd
13969 \begin_inset Flex Code
13972 \begin_layout Plain Layout
13978 is ignored and all paragraphs are separated by the
13979 \begin_inset Flex Code
13982 \begin_layout Plain Layout
13989 The vertical space is calculated with
13990 \begin_inset Flex Code
13993 \begin_layout Plain Layout
13995 \begin_inset space ~
14004 \begin_inset Flex Code
14007 \begin_layout Plain Layout
14013 is the height of a row with the normal font.
14014 This way, the look stays the same with different screen fonts.
14017 \begin_layout Description
14018 \begin_inset Flex Code
14021 \begin_layout Plain Layout
14028 \begin_inset Flex Code
14031 \begin_layout Plain Layout
14040 \begin_inset space \thinspace{}
14044 \begin_inset Flex Code
14047 \begin_layout Plain Layout
14053 ] Whether the contents of this paragraph should be output in raw form, meaning
14054 without special translations that LaTeX would require.
14057 \begin_layout Description
14058 \begin_inset Flex Code
14061 \begin_layout Plain Layout
14067 Information to be included in the LaTeX preamble when this style is used.
14068 Used to define macros, load packages, etc., required by this particular
14071 \begin_inset Quotes eld
14075 \begin_inset Flex Code
14078 \begin_layout Plain Layout
14085 \begin_inset Quotes erd
14091 \begin_layout Description
14092 \begin_inset Flex Code
14095 \begin_layout Plain Layout
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14111 ] The prefix to use when creating labels referring to paragraphs of this
14113 This allows the use of formatted references.
14116 \begin_layout Description
14117 \begin_inset Flex Code
14120 \begin_layout Plain Layout
14127 \begin_inset Flex Code
14130 \begin_layout Plain Layout
14136 ] Whether the style requires the feature
14137 \begin_inset Flex Code
14140 \begin_layout Plain Layout
14147 See the description of
14148 \begin_inset Flex Code
14151 \begin_layout Plain Layout
14158 \begin_inset CommandInset ref
14160 reference "sub:General-text-class"
14164 ) for information on `features'.
14167 \begin_layout Description
14168 \begin_inset Flex Code
14171 \begin_layout Plain Layout
14178 \begin_inset Flex Code
14181 \begin_layout Plain Layout
14190 \begin_inset Flex Code
14193 \begin_layout Plain Layout
14199 ] Resets the LaTeX arguments of this style (as defined via the
14200 \begin_inset Flex Code
14203 \begin_layout Plain Layout
14210 This is useful if you have copied a style via
14211 \begin_inset Flex Code
14214 \begin_layout Plain Layout
14220 , but you do not want to inherit its (required and optional) arguments.
14223 \begin_layout Description
14224 \begin_inset Flex Code
14227 \begin_layout Plain Layout
14234 \begin_inset Flex Code
14237 \begin_layout Plain Layout
14243 ] A string that is put at the end of the layout content.
14244 A line break in the output can be indicated by
14245 \begin_inset Flex Code
14248 \begin_layout Plain Layout
14257 \begin_layout Description
14258 \begin_inset Flex Code
14261 \begin_layout Plain Layout
14268 \begin_inset Flex Code
14271 \begin_layout Plain Layout
14278 \begin_inset Flex Code
14281 \begin_layout Plain Layout
14290 \begin_layout Description
14291 \begin_inset Flex Code
14294 \begin_layout Plain Layout
14301 \begin_inset Flex Code
14304 \begin_layout Plain Layout
14313 \begin_inset Flex Code
14316 \begin_layout Plain Layout
14323 \begin_inset Flex Code
14326 \begin_layout Plain Layout
14333 \begin_inset Flex Code
14336 \begin_layout Plain Layout
14338 \begin_inset space ~
14346 ] This defines what the default spacing should be in the style.
14348 \begin_inset Flex Code
14351 \begin_layout Plain Layout
14358 \begin_inset Flex Code
14361 \begin_layout Plain Layout
14368 \begin_inset Flex Code
14371 \begin_layout Plain Layout
14377 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14378 If you specify the argument
14379 \begin_inset Flex Code
14382 \begin_layout Plain Layout
14388 , then you must also provide a value argument which will be the actual multiplie
14390 Note that, contrary to other parameters,
14391 \begin_inset Flex Code
14394 \begin_layout Plain Layout
14400 implies the generation of specific LaTeX code, using the LaTeX package
14404 \begin_inset Flex Code
14407 \begin_layout Plain Layout
14416 \begin_layout Description
14417 \begin_inset Flex Code
14420 \begin_layout Plain Layout
14427 \begin_inset Flex Code
14430 \begin_layout Plain Layout
14437 \begin_inset space \thinspace{}
14441 \begin_inset Flex Code
14444 \begin_layout Plain Layout
14452 ] Allow spell-checking paragraphs of this style.
14456 \begin_layout Description
14457 \begin_inset Flex Code
14460 \begin_layout Plain Layout
14466 The font used for the text body .
14468 \begin_inset CommandInset ref
14470 reference "sub:Font-description"
14477 \begin_layout Description
14478 \begin_inset Flex Code
14481 \begin_layout Plain Layout
14490 \begin_inset Flex Code
14493 \begin_layout Plain Layout
14503 The level of the style in the table of contents.
14504 This is used for automatic numbering of section headings.
14507 \begin_layout Description
14508 \begin_inset Flex Code
14511 \begin_layout Plain Layout
14518 \begin_inset Flex Code
14521 \begin_layout Plain Layout
14527 ] The vertical space with which the very first of a chain of paragraphs
14528 with this style is separated from the previous paragraph.
14529 If the previous paragraph has another style, the separations are not simply
14530 added, but the maximum is taken.
14533 \begin_layout Subsection
14534 \begin_inset CommandInset label
14540 Internationalization of Paragraph Styles
14543 \begin_layout Standard
14544 LyX has long supported internationalization of layout information, but,
14545 until version 2.0, this applied only to the user interface and not to, say,
14547 Thus, French authors were forced to resort to ugly hacks if they wanted
14552 1' instead of `Theorem 1'.
14553 Thanks to Georg Baum, that is no longer the case.
14556 \begin_layout Standard
14558 \begin_inset Flex Code
14561 \begin_layout Plain Layout
14567 defines text that is to appear in the typeset document, it may use
14568 \begin_inset Flex Code
14571 \begin_layout Plain Layout
14578 \begin_inset Flex Code
14581 \begin_layout Plain Layout
14587 to support non-English and even multi-language documents correctly.
14588 The following excerpt (from the
14589 \begin_inset Flex Code
14592 \begin_layout Plain Layout
14598 file) shows how this works:
14601 \begin_layout LyX-Code
14606 \begin_layout LyX-Code
14609 theoremstyle{remark}
14612 \begin_layout LyX-Code
14615 newtheorem{claim}[thm]{
14622 \begin_layout LyX-Code
14626 \begin_layout LyX-Code
14630 \begin_layout LyX-Code
14635 claimname}{_(Claim)}
14638 \begin_layout LyX-Code
14642 \begin_layout LyX-Code
14646 \begin_layout LyX-Code
14655 claimname}{_(Claim)}}
14658 \begin_layout LyX-Code
14663 \begin_layout Standard
14664 In principle, any legal LaTeX may appear in the
14665 \begin_inset Flex Code
14668 \begin_layout Plain Layout
14675 \begin_inset Flex Code
14678 \begin_layout Plain Layout
14684 tags, but in practice they will typically look as they do here.
14685 The key to correct translation of the typeset text is the definition of
14687 \begin_inset Flex Code
14690 \begin_layout Plain Layout
14699 \begin_inset Flex Code
14702 \begin_layout Plain Layout
14714 \begin_layout Standard
14716 \begin_inset Flex Code
14719 \begin_layout Plain Layout
14725 tag provides for internationalization based upon the overall language of
14727 The contents of the tag will be included in the preamble, just as with
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14739 What makes it special is the use of the
14740 \begin_inset Quotes eld
14744 \begin_inset Quotes erd
14748 \begin_inset Flex Code
14751 \begin_layout Plain Layout
14757 , which will be replaced, when LyX produces LaTeX output, with the translation
14758 of its argument into the document language.
14761 \begin_layout Standard
14763 \begin_inset Flex Code
14766 \begin_layout Plain Layout
14772 tag is more complex, since it is meant to provide support for multi-language
14773 documents and so offers an interface to the
14774 \begin_inset Flex Code
14777 \begin_layout Plain Layout
14784 Its contents will be added to the preamble once for each language that
14785 appears in the document.
14786 In this case, the argument to
14787 \begin_inset Flex Code
14790 \begin_layout Plain Layout
14796 will be replaced with its translation into the language in question; the
14798 \begin_inset Flex Code
14801 \begin_layout Plain Layout
14807 is replaced by the language name (as used by the babel package).
14810 \begin_layout Standard
14811 A German document that also included a French section would thus have the
14812 following in the preamble:
14815 \begin_layout LyX-Code
14824 claimname}{Affirmation}}
14825 \begin_inset Newline newline
14836 claimname}{Behauptung}}
14837 \begin_inset Newline newline
14844 claimname}{Behauptung}
14847 \begin_layout Standard
14849 \begin_inset Flex Code
14852 \begin_layout Plain Layout
14858 will then conspire to produce the correct text in the output.
14861 \begin_layout Standard
14862 One important point to note here is that the translations are provided by
14863 LyX itself, through the file
14864 \begin_inset Flex Code
14867 \begin_layout Plain Layout
14874 This means, in effect, that
14875 \begin_inset Flex Code
14878 \begin_layout Plain Layout
14885 \begin_inset Flex Code
14888 \begin_layout Plain Layout
14894 are really only of use in layout files that are provided with LyX, since
14895 text entered in user-created layout files will not be seen by LyX's internation
14896 alization routines unless the
14897 \begin_inset Flex Code
14900 \begin_layout Plain Layout
14906 file is modified accordingly.
14907 That said, however, any layout created with the intention that it will
14908 be included with LyX should use these tags where appropriate.
14909 Please note that the paragraph style translations provided by LyX will
14910 never change with a minor update (e.
14911 \begin_inset space \thinspace{}
14915 \begin_inset space \space{}
14918 from version 2.1.x to 2.1.y).
14919 It is however quite likely that a major update (e.
14920 \begin_inset space \thinspace{}
14924 \begin_inset space \space{}
14927 from 2.0.x to 2.1.y) will introduce new translations or corrections.
14930 \begin_layout Subsection
14932 \begin_inset CommandInset label
14941 \begin_layout Standard
14942 It is necessary to define the floats (
14943 \begin_inset Flex MenuItem
14946 \begin_layout Plain Layout
14953 \begin_inset Flex MenuItem
14956 \begin_layout Plain Layout
14962 , \SpecialChar \ldots{}
14963 ) in the text class itself.
14964 Standard floats are included in the file
14965 \begin_inset Flex Code
14968 \begin_layout Plain Layout
14974 , so you may have to do no more than add
14977 \begin_layout LyX-Code
14978 Input stdfloats.inc
14981 \begin_layout Standard
14982 to your layout file.
14983 If you want to implement a text class that proposes some other float types
14984 (like the AGU class bundled with LyX), the information below will hopefully
14988 \begin_layout Description
14989 \begin_inset Flex Code
14992 \begin_layout Plain Layout
14999 \begin_inset Flex Code
15002 \begin_layout Plain Layout
15009 \begin_inset Quotes erd
15013 \begin_inset Quotes erd
15016 ] The file name extension of an auxiliary file for the list of figures (or
15018 LaTeX writes the captions to this file.
15021 \begin_layout Description
15022 \begin_inset Flex Code
15025 \begin_layout Plain Layout
15032 \begin_inset Flex Code
15035 \begin_layout Plain Layout
15042 \begin_inset Quotes erd
15046 \begin_inset Quotes erd
15049 ] The string that will be used in the menus and also for the caption.
15050 This is translated to the current language if babel is used.
15053 \begin_layout Description
15054 \begin_inset Flex Code
15057 \begin_layout Plain Layout
15063 These tags control the XHTML output.
15065 \begin_inset CommandInset ref
15067 reference "sec:Tags-for-XHTML"
15074 \begin_layout Description
15075 \begin_inset Flex Code
15078 \begin_layout Plain Layout
15087 \begin_inset Flex Code
15090 \begin_layout Plain Layout
15099 \begin_inset space \thinspace{}
15103 \begin_inset Flex Code
15106 \begin_layout Plain Layout
15112 ] Indicates whether the float is already defined in the document class or
15113 if instead the LaTeX package
15114 \begin_inset Flex Code
15117 \begin_layout Plain Layout
15123 needs to be loaded to define it on-the-fly.
15125 \begin_inset Flex Code
15128 \begin_layout Plain Layout
15135 \begin_inset Flex Code
15138 \begin_layout Plain Layout
15145 It should be set to
15146 \begin_inset Flex Code
15149 \begin_layout Plain Layout
15155 if the float is already defined by the LaTeX document class.
15158 \begin_layout Description
15159 \begin_inset Flex Code
15162 \begin_layout Plain Layout
15169 \begin_inset Flex Code
15172 \begin_layout Plain Layout
15179 \begin_inset Quotes erd
15183 \begin_inset Quotes erd
15186 ] The command used to generate a list of floats of this type; the leading
15195 \begin_inset Flex Code
15198 \begin_layout Plain Layout
15204 is false, since there is no standard way to generate this command.
15206 \begin_inset Flex Code
15209 \begin_layout Plain Layout
15215 is true, since in that case there is a standard way to define the command.
15218 \begin_layout Description
15219 \begin_inset Flex Code
15222 \begin_layout Plain Layout
15229 \begin_inset Flex Code
15232 \begin_layout Plain Layout
15239 \begin_inset Quotes erd
15243 \begin_inset Quotes erd
15246 ] A title for a list of floats of this kind (list of figures, tables, or
15248 It is used for the screen label within LyX, it is used by LaTeX for the
15249 title and it is used as the title in the XHTML output.
15250 It will be translated to the document language.
15253 \begin_layout Description
15254 \begin_inset Flex Code
15257 \begin_layout Plain Layout
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15274 \begin_inset Quotes erd
15278 \begin_inset Quotes erd
15281 ] This (optional) argument determines whether floats of this class will
15282 be numbered within some sectional unit of the document.
15284 \begin_inset Flex Code
15287 \begin_layout Plain Layout
15294 \begin_inset Quotes eld
15298 \begin_inset Flex Code
15301 \begin_layout Plain Layout
15308 \begin_inset Quotes erd
15311 , the floats will be numbered within chapters.
15315 \begin_layout Description
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15326 \begin_inset Flex Code
15329 \begin_layout Plain Layout
15336 \begin_inset Quotes erd
15340 \begin_inset Quotes erd
15343 ] The default placement for the given class of floats.
15344 The string should be as in standard LaTeX:
15345 \begin_inset Flex Code
15348 \begin_layout Plain Layout
15355 \begin_inset Flex Code
15358 \begin_layout Plain Layout
15365 \begin_inset Flex Code
15368 \begin_layout Plain Layout
15375 \begin_inset Flex Code
15378 \begin_layout Plain Layout
15384 for top, bottom, page, and here, respectively.
15388 \begin_layout Plain Layout
15389 Note that the order of these letters in the string is irrelevant, like in
15395 On top of that there is a new type,
15396 \begin_inset Flex Code
15399 \begin_layout Plain Layout
15405 , which does not really correspond to a float, since it means: put it
15406 \begin_inset Quotes eld
15410 \begin_inset Quotes erd
15414 Note however that the
15415 \begin_inset Flex Code
15418 \begin_layout Plain Layout
15424 specifier is special and, because of implementation details, cannot be
15425 used in non-built in float types.
15426 If you do not understand what this means, just use
15427 \begin_inset Quotes eld
15431 \begin_inset Flex Code
15434 \begin_layout Plain Layout
15441 \begin_inset Quotes erd
15447 \begin_layout Description
15448 \begin_inset Flex Code
15451 \begin_layout Plain Layout
15458 \begin_inset Flex Code
15461 \begin_layout Plain Layout
15467 ] The prefix to use when creating labels referring to floats of this type.
15468 This allows the use of formatted references.
15469 Note that you can remove any
15470 \begin_inset Flex Code
15473 \begin_layout Plain Layout
15479 set by a copied style by using the special value
15480 \begin_inset Quotes eld
15484 \begin_inset Quotes erd
15487 , which must be all caps.
15490 \begin_layout Description
15491 \begin_inset Flex Code
15494 \begin_layout Plain Layout
15501 \begin_inset Flex Code
15504 \begin_layout Plain Layout
15511 \begin_inset Quotes erd
15515 \begin_inset Quotes erd
15518 ] The style used when defining the float using
15519 \begin_inset Flex Code
15522 \begin_layout Plain Layout
15533 \begin_layout Description
15534 \begin_inset Flex Code
15537 \begin_layout Plain Layout
15544 \begin_inset Flex Code
15547 \begin_layout Plain Layout
15554 \begin_inset Quotes erd
15558 \begin_inset Quotes erd
15562 \begin_inset Quotes eld
15566 \begin_inset Quotes erd
15569 of the new class of floats, like program or algorithm.
15570 After the appropriate
15571 \begin_inset Flex Code
15574 \begin_layout Plain Layout
15583 \begin_inset Flex Code
15586 \begin_layout Plain Layout
15595 \begin_inset Flex Code
15598 \begin_layout Plain Layout
15609 \begin_layout Description
15610 \begin_inset Flex Code
15613 \begin_layout Plain Layout
15620 \begin_inset Flex Code
15623 \begin_layout Plain Layout
15630 \begin_inset space \thinspace{}
15634 \begin_inset Flex Code
15637 \begin_layout Plain Layout
15645 ] Specifies whether this float is defined using the LaTeX package
15646 \begin_inset Flex Code
15649 \begin_layout Plain Layout
15655 , either by the class file, another package or on-the-fly by LyX itself.
15658 \begin_layout Standard
15659 Note that defining a float with type
15660 \begin_inset Flex Code
15663 \begin_layout Plain Layout
15671 automatically defines the corresponding counter with name
15672 \begin_inset Flex Code
15675 \begin_layout Plain Layout
15686 \begin_layout Subsection
15687 Flex insets and InsetLayout
15688 \begin_inset CommandInset label
15690 name "sub:Flex-insets-and"
15697 \begin_layout Standard
15698 Flex insets come in three different kinds:
15701 \begin_layout Itemize
15703 \begin_inset Flex Code
15706 \begin_layout Plain Layout
15712 ): These define semantic markup corresponding to such LaTeX commands as
15714 \begin_inset Flex Code
15717 \begin_layout Plain Layout
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15740 \begin_layout Itemize
15742 \begin_inset Flex Code
15745 \begin_layout Plain Layout
15751 ): These can be used to define custom collapsible insets, similar to TeX
15752 code, footnote, and the like.
15753 An obvious example is an endnote inset, which is defined in the
15754 \begin_inset Flex Code
15757 \begin_layout Plain Layout
15766 \begin_layout Itemize
15768 \begin_inset Flex Code
15771 \begin_layout Plain Layout
15777 ): For use with DocBook classes.
15780 \begin_layout Standard
15781 Flex insets are defined using the
15782 \begin_inset Flex Code
15785 \begin_layout Plain Layout
15791 tag, which shall be explained in a moment.
15794 \begin_layout Standard
15796 \begin_inset Flex Code
15799 \begin_layout Plain Layout
15805 tag also serves another function: It can be used to customize the general
15806 layout of many different types of insets.
15808 \begin_inset Flex Code
15811 \begin_layout Plain Layout
15817 can be used to customize the layout parameters for footnotes, marginal
15818 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15819 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15823 \begin_layout Standard
15825 \begin_inset Flex Code
15828 \begin_layout Plain Layout
15834 definition must begin with a line of the form:
15837 \begin_layout LyX-Code
15841 \begin_layout Standard
15843 \begin_inset Flex Code
15846 \begin_layout Plain Layout
15852 indicates the inset whose layout is being defined, and here there are four
15856 \begin_layout Enumerate
15857 The layout for a pre-existing inset is being modified.
15858 In this case, can be
15859 \begin_inset Flex Code
15862 \begin_layout Plain Layout
15868 any one of the following:
15869 \begin_inset Flex Code
15872 \begin_layout Plain Layout
15879 \begin_inset Flex Code
15882 \begin_layout Plain Layout
15889 \begin_inset Flex Code
15892 \begin_layout Plain Layout
15899 \begin_inset Flex Code
15902 \begin_layout Plain Layout
15909 \begin_inset Flex Code
15912 \begin_layout Plain Layout
15919 \begin_inset Flex Code
15922 \begin_layout Plain Layout
15929 \begin_inset Flex Code
15932 \begin_layout Plain Layout
15939 \begin_inset Flex Code
15942 \begin_layout Plain Layout
15949 \begin_inset Flex Code
15952 \begin_layout Plain Layout
15959 \begin_inset Flex Code
15962 \begin_layout Plain Layout
15969 \begin_inset Flex Code
15972 \begin_layout Plain Layout
15979 \begin_inset Flex Code
15982 \begin_layout Plain Layout
15989 \begin_inset Flex Code
15992 \begin_layout Plain Layout
15999 \begin_inset Flex Code
16002 \begin_layout Plain Layout
16009 \begin_inset Flex Code
16012 \begin_layout Plain Layout
16019 \begin_inset Flex Code
16022 \begin_layout Plain Layout
16029 \begin_inset Flex Code
16032 \begin_layout Plain Layout
16039 \begin_inset Flex Code
16042 \begin_layout Plain Layout
16049 \begin_inset Flex Code
16052 \begin_layout Plain Layout
16059 \begin_inset Flex Code
16062 \begin_layout Plain Layout
16071 \begin_layout Enumerate
16072 The layout for a Flex inset is being defined.
16074 \begin_inset Flex Code
16077 \begin_layout Plain Layout
16083 must be of the form
16084 \begin_inset Quotes eld
16088 \begin_inset Flex Code
16091 \begin_layout Plain Layout
16098 \begin_inset Quotes erd
16102 \begin_inset Flex Code
16105 \begin_layout Plain Layout
16111 may be be any valid identifier not used by a pre-existing Flex inset.
16112 The identifier may include spaces, but in that case the whole thing must
16113 be wrapped in quotes.
16114 Note that the definition of a flex inset
16119 \begin_inset Flex Code
16122 \begin_layout Plain Layout
16128 entry, declaring which type of inset it defines.
16131 \begin_layout Enumerate
16132 The layout for user specific branch is being defined.
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16143 must be of the form
16144 \begin_inset Quotes eld
16148 \begin_inset Flex Code
16151 \begin_layout Plain Layout
16158 \begin_inset Quotes erd
16162 \begin_inset Flex Code
16165 \begin_layout Plain Layout
16171 may be be any valid identifier of branch defined in user's document.
16172 The identifier may include spaces, but in that case the whole thing must
16173 be wrapped in quotes.
16174 The main purpose of this feature is to allow LaTeX wrapping around specific
16175 branches as user needs.
16178 \begin_layout Enumerate
16179 The layout of a user (or class) specific caption is being defined.
16181 \begin_inset Flex Code
16184 \begin_layout Plain Layout
16190 must be of the form
16191 \begin_inset Quotes eld
16195 \begin_inset Flex Code
16198 \begin_layout Plain Layout
16205 \begin_inset Quotes erd
16209 \begin_inset Flex Code
16212 \begin_layout Plain Layout
16218 specifies the name of the caption as it appears in the menu.
16219 Have a look at the standard caption (
16220 \begin_inset Flex Code
16223 \begin_layout Plain Layout
16229 ), the specific captions of the KOMA-Script classes (
16230 \begin_inset Flex Code
16233 \begin_layout Plain Layout
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16252 \begin_inset space ~
16258 \begin_inset Flex Code
16261 \begin_layout Plain Layout
16267 ) for applications.
16270 \begin_layout Standard
16272 \begin_inset Flex Code
16275 \begin_layout Plain Layout
16281 definition can contain the following entries:
16284 \begin_layout Description
16285 \begin_inset Flex Code
16288 \begin_layout Plain Layout
16295 \begin_inset Flex Code
16298 \begin_layout Plain Layout
16304 ] Defines argument number of a command\SpecialChar \slash{}
16305 environment associated with the current
16307 The definition must end with
16308 \begin_inset Flex Code
16311 \begin_layout Plain Layout
16319 \begin_inset CommandInset ref
16321 reference "sub:Paragraph-Styles"
16328 \begin_layout Description
16329 \begin_inset Flex Code
16332 \begin_layout Plain Layout
16338 Preamble for changing language commands; see
16339 \begin_inset CommandInset ref
16341 reference "sub:I18n"
16348 \begin_layout Description
16349 \begin_inset Flex Code
16352 \begin_layout Plain Layout
16359 \begin_inset Flex Code
16362 \begin_layout Plain Layout
16368 ] The color for the inset's background.
16370 \begin_inset CommandInset ref
16372 reference "chap:Names-of-colors"
16376 for a list of the available color names.
16379 \begin_layout Description
16380 \begin_inset Flex Code
16383 \begin_layout Plain Layout
16390 \begin_inset Flex Code
16393 \begin_layout Plain Layout
16402 \begin_inset space \thinspace{}
16406 \begin_inset Flex Code
16409 \begin_layout Plain Layout
16415 ] Whether to use the content of the inset as the label, when the inset is
16420 \begin_layout Description
16421 \begin_inset Flex Code
16424 \begin_layout Plain Layout
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16440 ] As with paragraph styles, see
16441 \begin_inset CommandInset ref
16443 reference "sub:Paragraph-Styles"
16448 Note that you need to specify the complete type, e.
16449 \begin_inset space \thinspace{}
16453 \begin_inset space ~
16457 \begin_inset Flex Code
16460 \begin_layout Plain Layout
16461 CopyStyle Flex:<name>
16469 \begin_layout Description
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16480 \begin_inset Flex Code
16483 \begin_layout Plain Layout
16492 \begin_inset space \thinspace{}
16496 \begin_inset Flex Code
16499 \begin_layout Plain Layout
16505 ] Indicates whether the user may employ the Paragraph Settings dialog to
16506 customize the paragraph.
16509 \begin_layout Description
16510 \begin_inset Flex Code
16513 \begin_layout Plain Layout
16520 \begin_inset Flex Code
16523 \begin_layout Plain Layout
16530 \begin_inset Flex Code
16533 \begin_layout Plain Layout
16540 \begin_inset Flex Code
16543 \begin_layout Plain Layout
16549 , describing the rendering style used for the inset's frame and buttons.
16550 Footnotes generally use
16551 \begin_inset Flex Code
16554 \begin_layout Plain Layout
16560 , ERT insets generally
16561 \begin_inset Flex Code
16564 \begin_layout Plain Layout
16570 , and character styles
16571 \begin_inset Flex Code
16574 \begin_layout Plain Layout
16583 \begin_layout Description
16584 \begin_inset Flex Code
16587 \begin_layout Plain Layout
16594 \begin_inset Flex Code
16597 \begin_layout Plain Layout
16606 \begin_inset space \thinspace{}
16612 \begin_inset Flex Code
16615 \begin_layout Plain Layout
16624 \begin_inset Flex Code
16627 \begin_layout Plain Layout
16634 \begin_inset Flex Code
16637 \begin_layout Plain Layout
16644 Indicates whether the environment will stand on its own in the output or
16645 will appear inline with the surrounding text.
16646 If set to false, it is supposed that the LaTeX environment ignores white
16647 space (including one newline character) after the
16648 \begin_inset Flex Code
16651 \begin_layout Plain Layout
16664 \begin_inset Flex Code
16667 \begin_layout Plain Layout
16683 \begin_layout Description
16684 \begin_inset Flex Code
16687 \begin_layout Plain Layout
16693 Required at the end of the
16694 \begin_inset Flex Code
16697 \begin_layout Plain Layout
16706 \begin_layout Description
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16716 The font used for both the text body
16722 \begin_inset CommandInset ref
16724 reference "sub:Font-description"
16729 Note that defining this font automatically defines the
16730 \begin_inset Flex Code
16733 \begin_layout Plain Layout
16739 to the same value, so define this first and define
16740 \begin_inset Flex Code
16743 \begin_layout Plain Layout
16749 later if you want them to be different.
16752 \begin_layout Description
16753 \begin_inset Flex Code
16756 \begin_layout Plain Layout
16757 ForceLocalFontSwitch
16763 \begin_inset Flex Code
16766 \begin_layout Plain Layout
16775 \begin_inset space \thinspace{}
16779 \begin_inset Flex Code
16782 \begin_layout Plain Layout
16788 ] When using babel, always use a local font switch (
16789 \begin_inset Flex Code
16792 \begin_layout Plain Layout
16800 ), never a global one (such as
16801 \begin_inset Flex Code
16804 \begin_layout Plain Layout
16815 \begin_layout Description
16816 \begin_inset Flex Code
16819 \begin_layout Plain Layout
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16838 \begin_inset space \thinspace{}
16842 \begin_inset Flex Code
16845 \begin_layout Plain Layout
16852 \begin_inset Quotes eld
16856 \begin_inset Quotes erd
16859 language, leading to Left-to-Right (Latin) output, e.
16860 \begin_inset space \thinspace{}
16864 \begin_inset space \space{}
16867 in TeX code or URL.
16871 \begin_layout Description
16872 \begin_inset Flex Code
16875 \begin_layout Plain Layout
16882 \begin_inset Flex Code
16885 \begin_layout Plain Layout
16894 \begin_inset space \thinspace{}
16898 \begin_inset Flex Code
16901 \begin_layout Plain Layout
16907 ] Indicates whether the
16908 \begin_inset Flex Code
16911 \begin_layout Plain Layout
16917 should be used or, instead, the user can change the paragraph style used
16922 \begin_layout Description
16923 \begin_inset Flex Code
16926 \begin_layout Plain Layout
16933 \begin_inset Flex Code
16936 \begin_layout Plain Layout
16945 \begin_inset space \thinspace{}
16949 \begin_inset Flex Code
16952 \begin_layout Plain Layout
16958 ] As with paragraph styles, see
16959 \begin_inset CommandInset ref
16961 reference "sub:Paragraph-Styles"
16968 \begin_layout Description
16969 \begin_inset Flex Code
16972 \begin_layout Plain Layout
16978 These tags control the XHTML output.
16980 \begin_inset CommandInset ref
16982 reference "sec:Tags-for-XHTML"
16989 \begin_layout Description
16990 \begin_inset Flex Code
16993 \begin_layout Plain Layout
17000 \begin_inset Flex Code
17003 \begin_layout Plain Layout
17012 \begin_inset space \thinspace{}
17016 \begin_inset Flex Code
17019 \begin_layout Plain Layout
17025 ] Whether to include the contents of this inset in the strings generated
17026 for the `Outline' pane.
17027 One would not, for example, want the content of a footnote in a section
17028 header to be included in the TOC displayed in the outline, but one would
17029 normally want the content of a character style displayed.
17030 Default is false: not to include.
17033 \begin_layout Description
17034 \begin_inset Flex Code
17037 \begin_layout Plain Layout
17046 \begin_inset Flex Code
17049 \begin_layout Plain Layout
17058 \begin_inset space \thinspace{}
17062 \begin_inset Flex Code
17065 \begin_layout Plain Layout
17071 ] As with paragraph styles, see
17072 \begin_inset CommandInset ref
17074 reference "sub:Paragraph-Styles"
17081 \begin_layout Description
17082 \begin_inset Flex Code
17085 \begin_layout Plain Layout
17091 The font used for the label.
17093 \begin_inset CommandInset ref
17095 reference "sub:Font-description"
17100 Note that this definition can never appear before
17101 \begin_inset Flex Code
17104 \begin_layout Plain Layout
17110 , lest it be ineffective.
17113 \begin_layout Description
17114 \begin_inset Flex Code
17117 \begin_layout Plain Layout
17124 \begin_inset Flex Code
17127 \begin_layout Plain Layout
17134 \begin_inset Quotes erd
17138 \begin_inset Quotes erd
17141 ] What will be displayed on the button or elsewhere as the inset label.
17143 \begin_inset Flex Code
17146 \begin_layout Plain Layout
17153 \begin_inset Flex Code
17156 \begin_layout Plain Layout
17162 ) modify this label on the fly.
17165 \begin_layout Description
17166 \begin_inset Flex Code
17169 \begin_layout Plain Layout
17175 Language dependent preamble; see
17176 \begin_inset CommandInset ref
17178 reference "sub:I18n"
17185 \begin_layout Description
17186 \begin_inset Flex Code
17189 \begin_layout Plain Layout
17196 \begin_inset Flex Code
17199 \begin_layout Plain Layout
17205 ] The name of the corresponding LaTeX stuff.
17206 Either the environment or command name.
17209 \begin_layout Description
17210 \begin_inset Flex Code
17213 \begin_layout Plain Layout
17220 \begin_inset Flex Code
17223 \begin_layout Plain Layout
17229 ] The optional parameter for the corresponding
17230 \begin_inset Flex Code
17233 \begin_layout Plain Layout
17239 stuff, including possible bracket pairs like
17240 \begin_inset Flex Code
17243 \begin_layout Plain Layout
17250 This parameter cannot be changed from within LyX (use
17251 \begin_inset Flex Code
17254 \begin_layout Plain Layout
17260 for customizable parameters).
17261 It will be output as is after all LaTeX
17262 \begin_inset Flex Code
17265 \begin_layout Plain Layout
17274 \begin_layout Description
17275 \begin_inset Flex Code
17278 \begin_layout Plain Layout
17285 \begin_inset Flex Code
17288 \begin_layout Plain Layout
17289 Command, Environment, None
17294 ] How the style should be translated into LaTeX.
17298 \begin_layout Plain Layout
17299 \begin_inset Flex Code
17302 \begin_layout Plain Layout
17308 is perhaps a bit misleading, since these rules apply to SGML classes too.
17309 Visit the SGML class files for specific examples.
17318 \begin_layout Description
17319 \begin_inset Flex Code
17322 \begin_layout Plain Layout
17328 means nothing special
17331 \begin_layout Description
17332 \begin_inset Flex Code
17335 \begin_layout Plain Layout
17342 \begin_inset Flex Code
17345 \begin_layout Plain Layout
17352 {\SpecialChar \ldots{}
17361 \begin_layout Description
17362 \begin_inset Flex Code
17365 \begin_layout Plain Layout
17372 \begin_inset Flex Code
17375 \begin_layout Plain Layout
17382 }\SpecialChar \ldots{}
17397 \begin_layout Standard
17398 Putting the last few things together, the LaTeX output will be either:
17401 \begin_layout LyX-Code
17404 LatexName[LatexParam]{\SpecialChar \ldots{}
17408 \begin_layout Standard
17412 \begin_layout LyX-Code
17415 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17421 \begin_layout Standard
17422 depending upon the LaTeX type.
17426 \begin_layout Description
17427 \begin_inset Flex Code
17430 \begin_layout Plain Layout
17437 \begin_inset Flex Code
17440 \begin_layout Plain Layout
17446 ] A string that is put at the beginning of the layout content.
17447 A line break in the output can be indicated by
17448 \begin_inset Flex Code
17451 \begin_layout Plain Layout
17460 \begin_layout Description
17461 \begin_inset Flex Code
17464 \begin_layout Plain Layout
17471 \begin_inset Flex Code
17474 \begin_layout Plain Layout
17481 \begin_inset Flex Code
17484 \begin_layout Plain Layout
17491 \begin_inset Flex Code
17494 \begin_layout Plain Layout
17501 \begin_inset Flex Code
17504 \begin_layout Plain Layout
17510 (indicating a dummy definition ending definitions of charstyles, etc).
17511 This entry is required in and is only meaningful for Flex insets.
17512 Among other things, it determines on which menu this inset will appear.
17514 \begin_inset Flex Code
17517 \begin_layout Plain Layout
17524 \begin_inset Flex Code
17527 \begin_layout Plain Layout
17533 will automatically set
17534 \begin_inset Flex Code
17537 \begin_layout Plain Layout
17545 \begin_inset Flex Code
17548 \begin_layout Plain Layout
17554 can be set to true for
17555 \begin_inset Flex Code
17558 \begin_layout Plain Layout
17564 insets by setting it
17569 \begin_inset Flex Code
17572 \begin_layout Plain Layout
17581 \begin_layout Description
17582 \begin_inset Flex Code
17585 \begin_layout Plain Layout
17592 \begin_inset Flex Code
17595 \begin_layout Plain Layout
17604 \begin_inset space \thinspace{}
17608 \begin_inset Flex Code
17611 \begin_layout Plain Layout
17617 ] Whether multiple paragraphs are permitted in this inset.
17619 \begin_inset Flex Code
17622 \begin_layout Plain Layout
17628 to the same value and
17629 \begin_inset Flex Code
17632 \begin_layout Plain Layout
17638 to the opposite value.
17639 These can be reset to other values, if they are used
17644 \begin_inset Flex Code
17647 \begin_layout Plain Layout
17657 \begin_layout Description
17658 \begin_inset Flex Code
17661 \begin_layout Plain Layout
17668 \begin_inset Flex Code
17671 \begin_layout Plain Layout
17680 \begin_inset space \thinspace{}
17684 \begin_inset Flex Code
17687 \begin_layout Plain Layout
17693 ] Whether fragile commands in this inset should be
17694 \begin_inset Flex Code
17697 \begin_layout Plain Layout
17710 whether the command should itself be protected.) Default is false.
17713 \begin_layout Description
17714 \begin_inset Flex Code
17717 \begin_layout Plain Layout
17724 \begin_inset Flex Code
17727 \begin_layout Plain Layout
17733 ] Deletes an existing
17734 \begin_inset Flex Code
17737 \begin_layout Plain Layout
17746 \begin_layout Description
17747 \begin_inset Flex Code
17750 \begin_layout Plain Layout
17757 \begin_inset Flex Code
17760 \begin_layout Plain Layout
17769 \begin_inset space \thinspace{}
17773 \begin_inset Flex Code
17776 \begin_layout Plain Layout
17782 ] As with paragraph styles, see
17783 \begin_inset CommandInset ref
17785 reference "sub:Paragraph-Styles"
17793 \begin_layout Description
17794 \begin_inset Flex Code
17797 \begin_layout Plain Layout
17804 \begin_inset Flex Code
17807 \begin_layout Plain Layout
17816 \begin_inset space \thinspace{}
17820 \begin_inset Flex Code
17823 \begin_layout Plain Layout
17829 ] As with paragraph styles, see
17830 \begin_inset CommandInset ref
17832 reference "sub:Paragraph-Styles"
17840 \begin_layout Description
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17850 As with paragraph styles, see
17851 \begin_inset CommandInset ref
17853 reference "sub:Paragraph-Styles"
17860 \begin_layout Description
17861 \begin_inset Flex Code
17864 \begin_layout Plain Layout
17871 \begin_inset Flex Code
17874 \begin_layout Plain Layout
17880 ] The prefix to use when creating labels referring to insets of this type.
17881 This allows the use of formatted references.
17884 \begin_layout Description
17885 \begin_inset Flex Code
17888 \begin_layout Plain Layout
17895 \begin_inset Flex Code
17898 \begin_layout Plain Layout
17904 ] As with paragraph styles, see
17905 \begin_inset CommandInset ref
17907 reference "sub:Paragraph-Styles"
17914 \begin_layout Description
17915 \begin_inset Flex Code
17918 \begin_layout Plain Layout
17925 \begin_inset Flex Code
17928 \begin_layout Plain Layout
17937 \begin_inset space \thinspace{}
17941 \begin_inset Flex Code
17944 \begin_layout Plain Layout
17950 ] Resets the LaTeX arguments of this layout (as defined via the
17951 \begin_inset Flex Code
17954 \begin_layout Plain Layout
17961 This is useful if you have copied a style via
17962 \begin_inset Flex Code
17965 \begin_layout Plain Layout
17971 , but you do not want to inherit its (required and optional) arguments.
17974 \begin_layout Description
17975 \begin_inset Flex Code
17978 \begin_layout Plain Layout
17985 \begin_inset Flex Code
17988 \begin_layout Plain Layout
17995 \begin_inset space \thinspace{}
17999 \begin_inset Flex Code
18002 \begin_layout Plain Layout
18010 ] Whether this inset should use the font of its surrounding environment
18012 Default is true: uses its own.
18015 \begin_layout Description
18016 \begin_inset Flex Code
18019 \begin_layout Plain Layout
18026 \begin_inset Flex Code
18029 \begin_layout Plain Layout
18035 ] A string that is put at the end of the layout content.
18036 A line break in the output can be indicated by
18037 \begin_inset Flex Code
18040 \begin_layout Plain Layout
18049 \begin_layout Description
18050 \begin_inset Flex Code
18053 \begin_layout Plain Layout
18060 \begin_inset Flex Code
18063 \begin_layout Plain Layout
18070 \begin_inset space \thinspace{}
18074 \begin_inset Flex Code
18077 \begin_layout Plain Layout
18085 ] Allow spell-checking the contents of this inset.
18089 \begin_layout Subsection
18091 \begin_inset CommandInset label
18093 name "sub:Counters"
18100 \begin_layout Standard
18101 It is necessary to define the counters (
18102 \begin_inset Flex MenuItem
18105 \begin_layout Plain Layout
18112 \begin_inset Flex MenuItem
18115 \begin_layout Plain Layout
18121 , \SpecialChar \ldots{}
18122 ) in the text class itself.
18123 The standard counters are defined in the file
18124 \begin_inset Flex Code
18127 \begin_layout Plain Layout
18133 , so you may have to do no more than add
18136 \begin_layout LyX-Code
18137 Input stdcounters.inc
18140 \begin_layout Standard
18141 to your layout file to get them to work.
18142 But if you want to define custom counters, then you can do so.
18143 The counter declaration must begin with:
18146 \begin_layout LyX-Code
18147 Counter CounterName
18150 \begin_layout Standard
18152 \begin_inset Flex Code
18155 \begin_layout Plain Layout
18161 ' is replaced by the name of the counter.
18162 And it must end with
18163 \begin_inset Quotes eld
18167 \begin_inset Flex Code
18170 \begin_layout Plain Layout
18177 \begin_inset Quotes erd
18181 The following parameters can also be used:
18184 \begin_layout Description
18185 \begin_inset Flex Code
18188 \begin_layout Plain Layout
18195 \begin_inset Flex Code
18198 \begin_layout Plain Layout
18204 ] Sets the initial value for the counter, to which it will be reset whenever
18206 Normally, one will want the default, 1.
18209 \begin_layout Description
18210 \begin_inset Flex Code
18213 \begin_layout Plain Layout
18220 \begin_inset Flex Code
18223 \begin_layout Plain Layout
18230 \begin_inset Quotes erd
18234 \begin_inset Quotes erd
18237 ] When defined, this string defines how the counter is displayed.
18238 Setting this value sets
18239 \begin_inset Flex Code
18242 \begin_layout Plain Layout
18243 LabelStringAppendix
18249 The following special constructs can be used in the string:
18253 \begin_layout Itemize
18254 \begin_inset Flex Code
18257 \begin_layout Plain Layout
18265 will be replaced by the expansion of the
18266 \begin_inset Flex Code
18269 \begin_layout Plain Layout
18276 \begin_inset Flex Code
18279 \begin_layout Plain Layout
18280 LabelStringAppendix
18286 \begin_inset Flex Code
18289 \begin_layout Plain Layout
18299 \begin_layout Itemize
18300 counter values can be expressed using LaTeX-like macros
18301 \begin_inset Newline newline
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18325 \begin_inset Flex Code
18328 \begin_layout Plain Layout
18340 \begin_layout Plain Layout
18350 Actually, the situation is a bit more complicated: any
18369 other than those described below will produce arabic numerals.
18370 It would not be surprising to see this change in the future.
18376 \begin_inset Flex Code
18379 \begin_layout Plain Layout
18385 : 1, 2, 3,\SpecialChar \ldots{}
18387 \begin_inset Flex Code
18390 \begin_layout Plain Layout
18396 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18398 \begin_inset Flex Code
18401 \begin_layout Plain Layout
18407 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18409 \begin_inset Flex Code
18412 \begin_layout Plain Layout
18418 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18420 \begin_inset Flex Code
18423 \begin_layout Plain Layout
18429 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18431 \begin_inset Flex Code
18434 \begin_layout Plain Layout
18440 for hebrew numerals.
18444 \begin_layout Standard
18445 If LabelString is not defined, a default value is constructed as follows:
18446 if the counter has a master counter
18447 \begin_inset Flex Code
18450 \begin_layout Plain Layout
18457 \begin_inset Flex Code
18460 \begin_layout Plain Layout
18467 \begin_inset Newline newline
18471 \begin_inset Flex Code
18474 \begin_layout Plain Layout
18484 is used; otherwise the string
18485 \begin_inset Flex Code
18488 \begin_layout Plain Layout
18499 \begin_layout Description
18500 \begin_inset Flex Code
18503 \begin_layout Plain Layout
18504 LabelStringAppendix
18510 \begin_inset Flex Code
18513 \begin_layout Plain Layout
18520 \begin_inset Quotes erd
18524 \begin_inset Quotes erd
18528 \begin_inset Flex Code
18531 \begin_layout Plain Layout
18537 , but for use in the Appendix.
18540 \begin_layout Description
18541 \begin_inset Flex Code
18544 \begin_layout Plain Layout
18551 \begin_inset Flex Code
18554 \begin_layout Plain Layout
18561 \begin_inset Quotes erd
18565 \begin_inset Quotes erd
18568 ] A format for use with formatted references to this counter.
18569 For example, one might want to have references to section numbers appear
18571 \begin_inset Quotes eld
18575 \begin_inset Quotes erd
18579 The string should contain
18580 \begin_inset Quotes eld
18584 \begin_inset Quotes erd
18588 This will be replaced by the counter number itself.
18589 So, for sections, it would be: Section ##.
18592 \begin_layout Description
18593 \begin_inset Flex Code
18596 \begin_layout Plain Layout
18603 \begin_inset Flex Code
18606 \begin_layout Plain Layout
18613 \begin_inset Quotes erd
18617 \begin_inset Quotes erd
18620 ] If this is set to the name of another counter, the present counter will
18621 be reset every time the other one is increased.
18623 \begin_inset Flex Code
18626 \begin_layout Plain Layout
18633 \begin_inset Flex Code
18636 \begin_layout Plain Layout
18645 \begin_layout Subsection
18647 \begin_inset CommandInset label
18649 name "sub:Font-description"
18656 \begin_layout Standard
18657 A font description looks like this:
18660 \begin_layout LyX-Code
18674 \begin_layout LyX-Code
18678 \begin_layout LyX-Code
18682 \begin_layout Standard
18683 The following commands are available:
18686 \begin_layout Description
18687 \begin_inset Flex Code
18690 \begin_layout Plain Layout
18697 \begin_inset Flex Code
18700 \begin_layout Plain Layout
18709 \begin_inset Flex Code
18712 \begin_layout Plain Layout
18719 \begin_inset Flex Code
18722 \begin_layout Plain Layout
18729 \begin_inset Flex Code
18732 \begin_layout Plain Layout
18739 \begin_inset Flex Code
18742 \begin_layout Plain Layout
18749 \begin_inset Flex Code
18752 \begin_layout Plain Layout
18759 \begin_inset Flex Code
18762 \begin_layout Plain Layout
18769 \begin_inset Flex Code
18772 \begin_layout Plain Layout
18779 \begin_inset Flex Code
18782 \begin_layout Plain Layout
18791 \begin_layout Description
18792 \begin_inset Flex Code
18795 \begin_layout Plain Layout
18802 \begin_inset Flex Code
18805 \begin_layout Plain Layout
18814 \begin_inset Flex Code
18817 \begin_layout Plain Layout
18824 \begin_inset Flex Code
18827 \begin_layout Plain Layout
18836 \begin_layout Description
18837 \begin_inset Flex Code
18840 \begin_layout Plain Layout
18847 \begin_inset Flex Code
18850 \begin_layout Plain Layout
18856 ] Valid arguments are:
18857 \begin_inset Flex Code
18860 \begin_layout Plain Layout
18867 \begin_inset Flex Code
18870 \begin_layout Plain Layout
18877 \begin_inset Flex Code
18880 \begin_layout Plain Layout
18887 \begin_inset Flex Code
18890 \begin_layout Plain Layout
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18907 \begin_inset Flex Code
18910 \begin_layout Plain Layout
18917 \begin_inset Flex Code
18920 \begin_layout Plain Layout
18927 \begin_inset Flex Code
18930 \begin_layout Plain Layout
18937 \begin_inset Flex Code
18940 \begin_layout Plain Layout
18947 \begin_inset Flex Code
18950 \begin_layout Plain Layout
18957 \begin_inset Flex Code
18960 \begin_layout Plain Layout
18967 \begin_inset Flex Code
18970 \begin_layout Plain Layout
18977 Each of these turns on or off the corresponding attribute.
18979 \begin_inset Flex Code
18982 \begin_layout Plain Layout
18988 turns on emphasis, and
18989 \begin_inset Flex Code
18992 \begin_layout Plain Layout
19000 \begin_inset Newline newline
19003 If the latter seems puzzling, remember that the font settings for the present
19004 context are generally inherited from the surrounding context.
19006 \begin_inset Flex Code
19009 \begin_layout Plain Layout
19015 would turn off the emphasis that was anyway in effect, say, in a theorem
19019 \begin_layout Description
19020 \begin_inset Flex Code
19023 \begin_layout Plain Layout
19030 \begin_inset Flex Code
19033 \begin_layout Plain Layout
19042 \begin_inset Flex Code
19045 \begin_layout Plain Layout
19054 \begin_layout Description
19055 \begin_inset Flex Code
19058 \begin_layout Plain Layout
19065 \begin_inset Flex Code
19068 \begin_layout Plain Layout
19077 \begin_inset Flex Code
19080 \begin_layout Plain Layout
19087 \begin_inset Flex Code
19090 \begin_layout Plain Layout
19097 \begin_inset Flex Code
19100 \begin_layout Plain Layout
19109 \begin_layout Description
19110 \begin_inset Flex Code
19113 \begin_layout Plain Layout
19120 \begin_inset Flex Code
19123 \begin_layout Plain Layout
19130 \begin_inset Flex Code
19133 \begin_layout Plain Layout
19140 \begin_inset Flex Code
19143 \begin_layout Plain Layout
19152 \begin_inset Flex Code
19155 \begin_layout Plain Layout
19162 \begin_inset Flex Code
19165 \begin_layout Plain Layout
19172 \begin_inset Flex Code
19175 \begin_layout Plain Layout
19182 \begin_inset Flex Code
19185 \begin_layout Plain Layout
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19204 \begin_layout Subsection
19205 \begin_inset CommandInset label
19207 name "sub:Citation-format-description"
19211 Citation format description
19214 \begin_layout Standard
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19225 blocks are used to describe how bibliographic information should be displayed,
19226 both within LyX itself (in the citation dialog and in tooltips, for example)
19227 and in XHTML output.
19228 Such a block might look like this:
19231 \begin_layout LyX-Code
19235 \begin_layout LyX-Code
19239 \begin_layout LyX-Code
19243 \begin_layout LyX-Code
19247 \begin_layout Standard
19248 The individual lines define how the bibliographic information associated
19249 with an article or book, respectively, is to be displayed, and such a definitio
19250 n can be given for any `entry type' that might be present in a BibTeX file.
19251 LyX defines a default format in the source code that will be used if no
19252 specific definition has been given.
19253 LyX predefines several formats in the file
19254 \begin_inset Flex Code
19257 \begin_layout Plain Layout
19263 , which is included in most of LyX's document classes.
19266 \begin_layout Standard
19267 The definitions use a simple language that allows BibTeX keys to be replaced
19269 Keys should be enclosed in
19270 \begin_inset Flex Code
19273 \begin_layout Plain Layout
19280 \begin_inset Flex Code
19283 \begin_layout Plain Layout
19290 So a simple definition might look like this:
19293 \begin_layout LyX-Code
19295 \begin_inset Quotes eld
19299 \begin_inset Quotes erd
19305 \begin_layout Standard
19306 This would print the author, followed by a comma, followed by the title,
19307 in quotes, followed by a period.
19310 \begin_layout Standard
19311 Of course, sometimes you may want to print a key only if it exists.
19312 This can be done by using a conditional construction, such as:
19313 \begin_inset Flex Code
19316 \begin_layout Plain Layout
19318 \begin_inset space ~
19328 \begin_inset Flex Code
19331 \begin_layout Plain Layout
19337 key exists, then print
19338 \begin_inset Quotes eld
19342 \begin_inset space ~
19346 \begin_inset Quotes erd
19349 followed by the volume key.
19350 It is also possible to have an else clause in the conditional, such as:
19351 \begin_inset Newline newline
19355 \begin_inset Flex Code
19358 \begin_layout Plain Layout
19359 {%author%[[%author%]][[%editor%, ed.]]}
19365 \begin_inset Newline newline
19369 \begin_inset Flex Code
19372 \begin_layout Plain Layout
19378 key is printed if it exists; otherwise, the editor key is printed, followed
19380 \begin_inset Quotes eld
19384 \begin_inset space ~
19388 \begin_inset Quotes erd
19391 Note that the key is again enclosed in
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19401 signs; the entire conditional is enclosed in braces; and the if and else
19402 clauses are enclosed in double brackets,
19403 \begin_inset Quotes eld
19407 \begin_inset Flex Code
19410 \begin_layout Plain Layout
19417 \begin_inset Quotes eld
19421 \begin_inset Quotes eld
19425 \begin_inset Flex Code
19428 \begin_layout Plain Layout
19435 \begin_inset Quotes erd
19439 There must be no space between any of these.
19442 \begin_layout Standard
19443 There is one other piece of syntax available in definitions, which looks
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19455 This defines a piece of formatting information that is to be used when
19457 \begin_inset Quotes eld
19461 \begin_inset Quotes erd
19465 Obviously, we do not want to output HTML tags when writing plain text,
19466 so they should be wrapped in
19467 \begin_inset Quotes eld
19471 \begin_inset Quotes erd
19475 \begin_inset Quotes eld
19479 \begin_inset Quotes erd
19485 \begin_layout Standard
19486 Two special sorts of definitions are also possible in a
19487 \begin_inset Flex Code
19490 \begin_layout Plain Layout
19497 An example of the first would be:
19500 \begin_layout LyX-Code
19502 \begin_inset Quotes eld
19506 \begin_inset Quotes erd
19512 \begin_layout Standard
19513 This is an abbreviation, or macro, and it can be used by treating it as
19515 \begin_inset Flex Code
19518 \begin_layout Plain Layout
19526 \begin_inset Flex Code
19529 \begin_layout Plain Layout
19535 exactly as it would treat its definition.
19536 So, let us issue the obvious
19544 \begin_layout LyX-Code
19548 \begin_layout Standard
19549 or anything like it.
19550 LyX shouldn't go into an infinite loop, but it may go into a long one before
19554 \begin_layout Standard
19555 The second sort of special definition might look like this:
19558 \begin_layout LyX-Code
19562 \begin_layout Standard
19563 This defines a translatable piece of text, which allows relevant parts of
19564 the bibliography to be translated.
19565 It can be included in a definition by treating it as a key:
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19576 Several of these are predefined in
19577 \begin_inset Flex Code
19580 \begin_layout Plain Layout
19587 Note that these are not macros, in the sense just defined.
19588 They will not be expanded.
19591 \begin_layout Standard
19592 So here then is an example that use all these features:
19593 \begin_inset VSpace defskip
19599 \begin_layout Standard
19603 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19606 \begin_layout Standard
19607 \begin_inset VSpace defskip
19610 This defines a macro that prints the author, followed by a comma, if the
19612 \begin_inset Flex Code
19615 \begin_layout Plain Layout
19621 key is defined, or else prints the name of the editor, followed by the
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19632 or its translation (it is by default
19633 \begin_inset Quotes eld
19637 \begin_inset Quotes erd
19641 \begin_inset Flex Code
19644 \begin_layout Plain Layout
19651 Note that this is in fact defined in
19652 \begin_inset Flex Code
19655 \begin_layout Plain Layout
19661 , so you can use it in your own definitions, or re-definitions, if you load
19665 \begin_layout Section
19666 \begin_inset CommandInset label
19668 name "sec:Tags-for-XHTML"
19672 Tags for XHTML output
19675 \begin_layout Standard
19676 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19677 by layout information.
19678 In general, LyX provides sensible defaults and, as mentioned earlier, it
19679 will even construct default CSS style rules from the other layout tags.
19680 For example, LyX will attempt to use the information provided in the
19681 \begin_inset Flex Code
19684 \begin_layout Plain Layout
19690 declaration for the Chapter style to write CSS that will appropriately
19691 format chapter headings.
19694 \begin_layout Standard
19695 In many cases, then, you may not have to do anything at all to get acceptable
19696 XHTML output for your own environments, custom insets, and so forth.
19697 But in some cases you will, and so LyX provides a number of layout tags
19698 that can be used to customize the XHTML and CSS that are generated.
19701 \begin_layout Standard
19702 Note that there are two tags,
19703 \begin_inset Flex Code
19706 \begin_layout Plain Layout
19713 \begin_inset Flex Code
19716 \begin_layout Plain Layout
19722 that may appear outside style and inset declarations.
19724 \begin_inset CommandInset ref
19726 reference "sub:General-text-class"
19730 for details on these.
19733 \begin_layout Subsection
19734 \begin_inset CommandInset label
19736 name "sub:Paragraph-Style-XHTML"
19743 \begin_layout Standard
19744 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19745 dealing with a normal paragraph, a command, or an environment, where this
19746 is itself determined by the contents of the corresponding
19747 \begin_inset Flex Code
19750 \begin_layout Plain Layout
19760 \begin_layout Standard
19761 For a command or normal paragraph, the output XHTML has the following form:
19764 \begin_layout LyX-Code
19766 \begin_inset Quotes erd
19770 \begin_inset Quotes erd
19776 \begin_layout LyX-Code
19778 \begin_inset Quotes erd
19782 \begin_inset Quotes erd
19788 \begin_layout LyX-Code
19789 Contents of the paragraph.
19792 \begin_layout LyX-Code
19796 \begin_layout Standard
19797 The label tags are of course omitted if the paragraph does not have a label.
19800 \begin_layout Standard
19801 For an environment that is not some sort of list, the XHTML takes this form:
19804 \begin_layout LyX-Code
19806 \begin_inset Quotes erd
19810 \begin_inset Quotes erd
19816 \begin_layout LyX-Code
19818 \begin_inset Quotes erd
19822 \begin_inset Quotes erd
19826 \begin_inset Quotes erd
19830 \begin_inset Quotes erd
19833 >Environment Label</labeltag>First paragraph.</itemtag>
19836 \begin_layout LyX-Code
19837 <itemtag>Second paragraph.</itemtag>
19840 \begin_layout LyX-Code
19844 \begin_layout Standard
19845 Note that the label is output only for the first paragraph, as it should
19846 be for a theorem, for example.
19850 \begin_layout Standard
19851 For a list, we have one of these forms:
19854 \begin_layout LyX-Code
19856 \begin_inset Quotes erd
19860 \begin_inset Quotes erd
19866 \begin_layout LyX-Code
19868 \begin_inset Quotes erd
19872 \begin_inset Quotes erd
19876 \begin_inset Quotes erd
19880 \begin_inset Quotes erd
19883 >List Label</labeltag>First item.</itemtag>
19886 \begin_layout LyX-Code
19888 \begin_inset Quotes erd
19892 \begin_inset Quotes erd
19896 \begin_inset Quotes erd
19900 \begin_inset Quotes erd
19903 >List Label</labeltag>Second item.</itemtag>
19906 \begin_layout LyX-Code
19910 \begin_layout LyX-Code
19914 \begin_layout LyX-Code
19916 \begin_inset Quotes erd
19920 \begin_inset Quotes erd
19926 \begin_layout LyX-Code
19928 \begin_inset Quotes erd
19932 \begin_inset Quotes erd
19935 >List Label</labeltag><itemtag attr=
19936 \begin_inset Quotes erd
19940 \begin_inset Quotes erd
19943 >First item.</itemtag>
19946 \begin_layout LyX-Code
19948 \begin_inset Quotes erd
19952 \begin_inset Quotes erd
19955 >List Label</labeltag><itemtag attr=
19956 \begin_inset Quotes erd
19960 \begin_inset Quotes erd
19963 >Second item.</itemtag>
19966 \begin_layout LyX-Code
19970 \begin_layout Standard
19971 Note the different orders of
19972 \begin_inset Flex Code
19975 \begin_layout Plain Layout
19982 \begin_inset Flex Code
19985 \begin_layout Plain Layout
19992 Which order we get depends upon the setting of
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20003 \begin_inset Flex Code
20006 \begin_layout Plain Layout
20012 is false (the default), you get the first of these, with the label within
20013 the item; if true, you get the second, with the label outside the item.
20016 \begin_layout Standard
20017 The specific tags and attributes output for each paragraph type can be controlle
20018 d by means of the layout tags we are about to describe.
20019 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20020 so you often may not need to do very much to get good XHTML output.
20021 Think of the available tags as there so you can tweak things to your liking.
20024 \begin_layout Description
20025 \begin_inset Flex Code
20028 \begin_layout Plain Layout
20035 \begin_inset Flex Code
20038 \begin_layout Plain Layout
20044 ] Specifies attribute information to be output with the main tag.
20046 \begin_inset Quotes eld
20050 \begin_inset Flex Code
20053 \begin_layout Plain Layout
20060 \begin_inset Quotes erd
20064 By default, LyX will output
20065 \begin_inset Quotes eld
20069 \begin_inset Flex Code
20072 \begin_layout Plain Layout
20079 \begin_inset Quotes erd
20083 \begin_inset Flex Code
20086 \begin_layout Plain Layout
20092 is the LyX name of the layout, made lowercase, for example: chapter.
20097 contain any style information.
20099 \begin_inset Flex Code
20102 \begin_layout Plain Layout
20111 \begin_layout Description
20112 \begin_inset Flex Code
20115 \begin_layout Plain Layout
20122 \begin_inset Flex Code
20125 \begin_layout Plain Layout
20135 ] Whether to output the default CSS information LyX generates for this layout,
20136 even if additional information is explicitly provided via
20137 \begin_inset Flex Code
20140 \begin_layout Plain Layout
20148 \begin_inset Flex Code
20151 \begin_layout Plain Layout
20157 allows you to alter or augment the generated CSS, rather than to override
20160 \begin_inset Flex Code
20163 \begin_layout Plain Layout
20172 \begin_layout Description
20173 \begin_inset Flex Code
20176 \begin_layout Plain Layout
20183 \begin_inset Flex Code
20186 \begin_layout Plain Layout
20192 ] The tag to be used for individual paragraphs of environments, replacing
20194 \begin_inset Flex Code
20197 \begin_layout Plain Layout
20203 in the examples above.
20205 \begin_inset Flex Code
20208 \begin_layout Plain Layout
20217 \begin_layout Description
20218 \begin_inset Flex Code
20221 \begin_layout Plain Layout
20228 \begin_inset Flex Code
20231 \begin_layout Plain Layout
20237 ] Attributes for the item tag.
20239 \begin_inset Quotes eld
20243 \begin_inset Flex Code
20246 \begin_layout Plain Layout
20247 class=`layoutname_item'
20253 \begin_inset Quotes erd
20261 contain any style information.
20263 \begin_inset Flex Code
20266 \begin_layout Plain Layout
20275 \begin_layout Description
20276 \begin_inset Flex Code
20279 \begin_layout Plain Layout
20286 \begin_inset Flex Code
20289 \begin_layout Plain Layout
20295 ] The tag to be used for paragraph and item labels, replacing
20296 \begin_inset Flex Code
20299 \begin_layout Plain Layout
20305 in the examples above.
20307 \begin_inset Flex Code
20310 \begin_layout Plain Layout
20317 \begin_inset Flex Code
20320 \begin_layout Plain Layout
20327 \begin_inset Flex Code
20330 \begin_layout Plain Layout
20337 \begin_inset Flex Code
20340 \begin_layout Plain Layout
20341 Centered_Top_Environment
20346 , in which case it defaults to
20347 \begin_inset Flex Code
20350 \begin_layout Plain Layout
20359 \begin_layout Description
20360 \begin_inset Flex Code
20363 \begin_layout Plain Layout
20370 \begin_inset Flex Code
20373 \begin_layout Plain Layout
20379 ] Attributes for the label tag.
20381 \begin_inset Quotes eld
20385 \begin_inset Flex Code
20388 \begin_layout Plain Layout
20389 class=`layoutname_label'
20395 \begin_inset Quotes erd
20403 contain any style information.
20405 \begin_inset Flex Code
20408 \begin_layout Plain Layout
20417 \begin_layout Description
20418 \begin_inset Flex Code
20421 \begin_layout Plain Layout
20428 \begin_inset Flex Code
20431 \begin_layout Plain Layout
20441 ] Meaningful only for list-like environments, this tag controls whether
20442 the label tag is output before or inside the item tag.
20443 This is used, for example, in the description environment, where we want
20445 \begin_inset Flex Code
20448 \begin_layout Plain Layout
20449 <dt>\SpecialChar \ldots{}
20450 </dt><dd>\SpecialChar \ldots{}
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20467 : The label tag is output inside the item tag.
20470 \begin_layout Description
20471 \begin_inset Flex Code
20474 \begin_layout Plain Layout
20480 Information to be output in the
20481 \begin_inset Flex Code
20484 \begin_layout Plain Layout
20490 section when this style is used.
20491 This might, for example, be used to include a
20492 \begin_inset Flex Code
20495 \begin_layout Plain Layout
20502 \begin_inset Flex Code
20505 \begin_layout Plain Layout
20514 \begin_layout Description
20515 \begin_inset Flex Code
20518 \begin_layout Plain Layout
20524 CSS style information to be included when this style is used.
20525 Note that this will automatically be wrapped in a layout-generated
20526 \begin_inset Flex Code
20529 \begin_layout Plain Layout
20535 block, so only the CSS itself need be included.
20537 \begin_inset Flex Code
20540 \begin_layout Plain Layout
20549 \begin_layout Description
20550 \begin_inset Flex Code
20553 \begin_layout Plain Layout
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20569 ] The tag to be used for the main label, replacing
20570 \begin_inset Flex Code
20573 \begin_layout Plain Layout
20579 in the examples above.
20581 \begin_inset Flex Code
20584 \begin_layout Plain Layout
20593 \begin_layout Description
20594 \begin_inset Flex Code
20597 \begin_layout Plain Layout
20604 \begin_inset Flex Code
20607 \begin_layout Plain Layout
20617 ] Marks this style as the one to be used to generate the
20618 \begin_inset Flex Code
20621 \begin_layout Plain Layout
20627 tag for the XHTML file.
20628 By default, it is false.
20630 \begin_inset Flex Code
20633 \begin_layout Plain Layout
20639 file sets it to true for the
20640 \begin_inset Flex Code
20643 \begin_layout Plain Layout
20653 \begin_layout Subsection
20657 \begin_layout Standard
20658 The XHTML output of insets can also be controlled by information in layout
20663 \begin_layout Plain Layout
20664 At present, this is true only for
20665 \begin_inset Quotes eld
20669 \begin_inset Quotes erd
20672 insets (insets you can type into) and is not true for
20673 \begin_inset Quotes eld
20677 \begin_inset Quotes erd
20680 insets (insets that are associated with dialog boxes).
20685 Here, too, LyX tries to provide sensible defaults, and it constructs default
20687 But everything can be customized.
20690 \begin_layout Standard
20691 The XHTML LyX outputs for an inset has the following form:
20694 \begin_layout LyX-Code
20696 \begin_inset Quotes erd
20700 \begin_inset Quotes erd
20706 \begin_layout LyX-Code
20707 <labeltag>Label</labeltag>
20710 \begin_layout LyX-Code
20712 \begin_inset Quotes erd
20716 \begin_inset Quotes erd
20719 >Contents of the inset.</innertag>
20722 \begin_layout LyX-Code
20726 \begin_layout Standard
20727 If the inset permits multiple paragraphs---that is, if
20728 \begin_inset Flex Code
20731 \begin_layout Plain Layout
20737 is true---then the contents of the inset will itself be output as paragraphs
20738 formatted according to the styles used for those paragraphs (standard,
20739 quote, and the like).
20740 The label tag is of course omitted if the paragraph does not have a label
20741 and, at present, is always
20742 \begin_inset Flex Code
20745 \begin_layout Plain Layout
20752 The inner tag is optional and, by default, does not appear.
20755 \begin_layout Standard
20756 The specific tags and attributes output for each inset can be controlled
20757 by means of the following layout tags.
20760 \begin_layout Description
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20771 \begin_inset Flex Code
20774 \begin_layout Plain Layout
20780 ] Specifies attribute information to be output with the main tag.
20782 \begin_inset Quotes eld
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20790 class=`myinset' onclick=`\SpecialChar \ldots{}
20797 \begin_inset Quotes erd
20801 By default, LyX will output
20802 \begin_inset Quotes eld
20806 \begin_inset Flex Code
20809 \begin_layout Plain Layout
20816 \begin_inset Quotes erd
20820 \begin_inset Flex Code
20823 \begin_layout Plain Layout
20829 is the LyX name of the inset, made lowercase and with non-alphanumeric
20830 characters converted to underscores, for example: footnote.
20833 \begin_layout Description
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20844 \begin_inset Flex Code
20847 \begin_layout Plain Layout
20857 ] Whether to output the default CSS information LyX generates for this layout,
20858 even if additional information is explicitly provided via
20859 \begin_inset Flex Code
20862 \begin_layout Plain Layout
20870 \begin_inset Flex Code
20873 \begin_layout Plain Layout
20879 allows you to alter or augment the generated CSS, rather than to override
20884 \begin_layout Description
20885 \begin_inset Flex Code
20888 \begin_layout Plain Layout
20895 \begin_inset Flex Code
20898 \begin_layout Plain Layout
20904 ] Attributes for the inner tag.
20906 \begin_inset Quotes eld
20910 \begin_inset Flex Code
20913 \begin_layout Plain Layout
20914 class=`insetname_inner'
20920 \begin_inset Quotes erd
20926 \begin_layout Description
20927 \begin_inset Flex Code
20930 \begin_layout Plain Layout
20937 \begin_inset Flex Code
20940 \begin_layout Plain Layout
20946 ] The inner tag, replacing
20947 \begin_inset Flex Code
20950 \begin_layout Plain Layout
20956 in the examples above.
20957 By default, there is none.
20960 \begin_layout Description
20961 \begin_inset Flex Code
20964 \begin_layout Plain Layout
20971 \begin_inset Flex Code
20974 \begin_layout Plain Layout
20982 ] Whether this inset represents a standalone block of text (such as a footnote)
20983 or instead represents material that is included in the surrounding text
20984 (such as a branch).
20988 \begin_layout Description
20989 \begin_inset Flex Code
20992 \begin_layout Plain Layout
20999 \begin_inset Flex Code
21002 \begin_layout Plain Layout
21008 ] A label for this inset, possibly including a reference to a counter.
21009 For example, for footnote, it might be:
21010 \begin_inset Flex Code
21013 \begin_layout Plain Layout
21022 This is optional, and there is no default.
21025 \begin_layout Description
21026 \begin_inset Flex Code
21029 \begin_layout Plain Layout
21035 Information to be output in the
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21045 section when this style is used.
21046 This might, for example, be used to include a
21047 \begin_inset Flex Code
21050 \begin_layout Plain Layout
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21069 \begin_layout Description
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21079 CSS style information to be included when this style is used.
21080 Note that this will automatically be wrapped in a layout-generated
21081 \begin_inset Flex Code
21084 \begin_layout Plain Layout
21090 block, so only the CSS itself need be included.
21093 \begin_layout Description
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21104 \begin_inset Flex Code
21107 \begin_layout Plain Layout
21113 ] The tag to be used for the main label, replacing
21114 \begin_inset Flex Code
21117 \begin_layout Plain Layout
21123 in the examples above.
21124 The default depends upon the setting of
21125 \begin_inset Flex Code
21128 \begin_layout Plain Layout
21135 \begin_inset Flex Code
21138 \begin_layout Plain Layout
21144 is true, the default is
21145 \begin_inset Flex Code
21148 \begin_layout Plain Layout
21154 ; if it is false, the default is
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21167 \begin_layout Subsection
21171 \begin_layout Standard
21172 The XHTML output for floats too can be controlled by layout information.
21173 The output has the following form:
21176 \begin_layout LyX-Code
21178 \begin_inset Quotes erd
21182 \begin_inset Quotes erd
21188 \begin_layout LyX-Code
21189 Contents of the float.
21192 \begin_layout LyX-Code
21196 \begin_layout Standard
21197 The caption, if there is one, is a separate inset and will be output as
21199 Its appearance can be controlled via the InsetLayout for caption insets.
21203 \begin_layout Description
21204 \begin_inset Flex Code
21207 \begin_layout Plain Layout
21214 \begin_inset Flex Code
21217 \begin_layout Plain Layout
21223 ] Specifies attribute information to be output with the main tag.
21225 \begin_inset Quotes eld
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21233 class=`myfloat' onclick=`\SpecialChar \ldots{}
21240 \begin_inset Quotes erd
21244 By default, LyX will output
21245 \begin_inset Quotes eld
21249 \begin_inset Flex Code
21252 \begin_layout Plain Layout
21253 class=`float float-floattype'
21259 \begin_inset Quotes erd
21263 \begin_inset Flex Code
21266 \begin_layout Plain Layout
21272 is LyX's name for this type of float, as determined by the float declaration
21274 \begin_inset CommandInset ref
21276 reference "sub:Floats"
21280 ), though made lowercase and with non-alphanumeric characters converted
21281 to underscores, for example: float-table.
21284 \begin_layout Description
21285 \begin_inset Flex Code
21288 \begin_layout Plain Layout
21294 CSS style information to be included when this float is used.
21295 Note that this will automatically be wrapped in a layout-generated
21296 \begin_inset Flex Code
21299 \begin_layout Plain Layout
21305 block, so only the CSS itself need be included.
21308 \begin_layout Description
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21319 \begin_inset Flex Code
21322 \begin_layout Plain Layout
21328 ] The tag to be used for this float, replacing
21329 \begin_inset Quotes eld
21333 \begin_inset Flex Code
21336 \begin_layout Plain Layout
21343 \begin_inset Quotes erd
21346 in the example above.
21348 \begin_inset Flex Code
21351 \begin_layout Plain Layout
21357 and will rarely need changing.
21360 \begin_layout Subsection
21361 Bibliography formatting
21364 \begin_layout Standard
21365 The bibliography can be formatted using
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21377 \begin_inset CommandInset ref
21379 reference "sub:Citation-format-description"
21386 \begin_layout Subsection
21390 \begin_layout Standard
21391 We have several times mentioned that LyX will generate default CSS style
21392 rules for both insets and paragraph styles, based upon the other layout
21393 information that is provided.
21394 In this section, we shall say a word about which layout information LyX
21398 \begin_layout Standard
21399 At present, LyX auto-generates CSS only for font information, making use
21401 \begin_inset Flex Code
21404 \begin_layout Plain Layout
21411 \begin_inset Flex Code
21414 \begin_layout Plain Layout
21421 \begin_inset Flex Code
21424 \begin_layout Plain Layout
21431 \begin_inset Flex Code
21434 \begin_layout Plain Layout
21441 \begin_inset Flex Code
21444 \begin_layout Plain Layout
21451 \begin_inset CommandInset ref
21453 reference "sub:Font-description"
21458 The translation is mostly straightforward and obvious.
21460 \begin_inset Quotes eld
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21474 \begin_inset Quotes erd
21478 \begin_inset Quotes eld
21482 \begin_inset Flex Code
21485 \begin_layout Plain Layout
21486 font-family: sans-serif;
21492 \begin_inset Quotes erd
21496 The correspondence of LyX sizes and CSS sizes is a little less obvious
21497 but nonetheless intuitive.
21499 \begin_inset Flex Code
21502 \begin_layout Plain Layout
21509 \begin_inset Flex URL
21512 \begin_layout Plain Layout
21522 \begin_layout Chapter
21523 Including External Material
21524 \begin_inset CommandInset label
21526 name "chap:Including-External-Material"
21533 \begin_layout Standard
21534 \begin_inset Box Shadowbox
21544 height_special "totalheight"
21547 \begin_layout Plain Layout
21548 WARNING: This portion of the documentation has not been updated for some
21550 We certainly hope that it is still accurate, but there are no guarantees.
21558 \begin_layout Standard
21559 The use of material from sources external to LyX is covered in detail in
21565 This part of the manual covers what needs to happen behind the scenes for
21566 new sorts of material to be included.
21569 \begin_layout Section
21573 \begin_layout Standard
21574 The external material feature is based on the concept of a
21579 A template is a specification of how LyX should interface with a certain
21581 As bundled, LyX comes with predefined templates for Xfig figures, various
21582 raster format images, chess diagrams, and LilyPond music notation.
21583 You can check the actual list by using the menu
21584 \begin_inset Flex MenuItem
21587 \begin_layout Plain Layout
21588 Insert\SpecialChar \menuseparator
21589 File\SpecialChar \menuseparator
21596 Furthermore, it is possible to roll your own template to support a specific
21598 Later we'll describe in more detail what is involved, and hopefully you
21599 will submit all the templates you create so we can include them in a later
21603 \begin_layout Standard
21604 Another basic idea of the external material feature is to distinguish between
21605 the original file that serves as a base for final material and the produced
21606 file that is included in your exported or printed document.
21607 For example, consider the case of a figure produced with
21608 \begin_inset Flex Code
21611 \begin_layout Plain Layout
21618 The Xfig application itself works on an original file with the
21619 \begin_inset Flex Code
21622 \begin_layout Plain Layout
21629 Within Xfig, you create and change your figure, and when you are done,
21631 \begin_inset Flex Code
21634 \begin_layout Plain Layout
21641 When you want to include the figure in your document, you invoke
21642 \begin_inset Flex Code
21645 \begin_layout Plain Layout
21651 in order to create a PostScript file that can readily be included in your
21654 \begin_inset Flex Code
21657 \begin_layout Plain Layout
21663 file is the original file, and the PostScript file is the produced file.
21666 \begin_layout Standard
21667 This distinction is important in order to allow updating of the material
21668 while you are in the process of writing the document.
21669 Furthermore, it provides us with the flexibility that is needed to support
21670 multiple export formats.
21671 For instance, in the case of a plain text file, it is not exactly an award-winn
21672 ing idea to include the figure as raw PostScript.
21673 Instead, you would either prefer to just include a reference to the figure
21674 or try to invoke some graphics to ASCII converter to make the final result
21675 look similar to the real graphics.
21676 The external material management allows you to do this, because it is parametri
21677 zed on the different export formats that LyX supports.
21680 \begin_layout Standard
21681 Besides supporting the production of different products according to the
21682 exported format, it supports tight integration with editing and viewing
21684 In the case of an Xfig figure, you are able to invoke Xfig on the original
21685 file with a single click from within the external material dialog in LyX,
21686 and also preview the produced PostScript file with Ghostview with another
21688 No more fiddling around with the command line and/or file browsers to locate
21689 and manipulate the original or produced files.
21690 In this way, you are finally able to take full advantage of the many different
21691 applications that are relevant to use when you write your documents, and
21692 ultimately be more productive.
21695 \begin_layout Section
21696 The external template configuration file
21699 \begin_layout Standard
21700 It is relatively easy to add custom external template definitions to LyX.
21701 However, be aware that doing this in an careless manner most probably
21705 introduce an easily exploitable security hole.
21706 So before you do this, please read the discussion about security in
21707 \begin_inset CommandInset ref
21709 reference "sec:Security-discussion"
21716 \begin_layout Standard
21717 Having said that, we encourage you to submit any interesting templates that
21722 \begin_layout Standard
21723 The external templates are defined in the
21724 \begin_inset Flex Code
21727 \begin_layout Plain Layout
21728 LyXDir/lib/external_templates
21734 You can place your own version in
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21739 UserDir/external_templates
21747 \begin_layout Standard
21748 A typical template looks like this:
21751 \begin_layout LyX-Code
21755 \begin_layout LyX-Code
21756 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21759 \begin_layout LyX-Code
21763 \begin_layout LyX-Code
21767 \begin_layout LyX-Code
21771 \begin_layout LyX-Code
21775 \begin_layout LyX-Code
21779 \begin_layout LyX-Code
21780 AutomaticProduction true
21783 \begin_layout LyX-Code
21787 \begin_layout LyX-Code
21791 \begin_layout LyX-Code
21795 \begin_layout LyX-Code
21796 TransformCommand Rotate RotationLatexCommand
21799 \begin_layout LyX-Code
21800 TransformCommand Resize ResizeLatexCommand
21803 \begin_layout LyX-Code
21804 Product "$$RotateFront$$ResizeFront
21807 \begin_layout LyX-Code
21812 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21815 \begin_layout LyX-Code
21816 $$ResizeBack$$RotateBack"
21819 \begin_layout LyX-Code
21823 \begin_layout LyX-Code
21824 UpdateResult "$$AbsPath$$Basename.pstex_t"
21827 \begin_layout LyX-Code
21828 Requirement "graphicx"
21831 \begin_layout LyX-Code
21832 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21835 \begin_layout LyX-Code
21836 ReferencedFile latex "$$AbsPath$$Basename.eps"
21839 \begin_layout LyX-Code
21840 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21843 \begin_layout LyX-Code
21847 \begin_layout LyX-Code
21851 \begin_layout LyX-Code
21852 TransformCommand Rotate RotationLatexCommand
21855 \begin_layout LyX-Code
21856 TransformCommand Resize ResizeLatexCommand
21859 \begin_layout LyX-Code
21860 Product "$$RotateFront$$ResizeFront
21863 \begin_layout LyX-Code
21868 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21871 \begin_layout LyX-Code
21872 $$ResizeBack$$RotateBack"
21875 \begin_layout LyX-Code
21876 UpdateFormat pdftex
21879 \begin_layout LyX-Code
21880 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21883 \begin_layout LyX-Code
21884 Requirement "graphicx"
21887 \begin_layout LyX-Code
21888 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21891 \begin_layout LyX-Code
21892 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21895 \begin_layout LyX-Code
21899 \begin_layout LyX-Code
21903 \begin_layout LyX-Code
21904 Product "$$Contents(
21906 "$$AbsPath$$Basename.asc
21911 \begin_layout LyX-Code
21912 UpdateFormat asciixfig
21915 \begin_layout LyX-Code
21916 UpdateResult "$$AbsPath$$Basename.asc"
21919 \begin_layout LyX-Code
21923 \begin_layout LyX-Code
21927 \begin_layout LyX-Code
21928 Product "<graphic fileref=
21930 "$$AbsOrRelPathMaster$$Basename.eps
21935 \begin_layout LyX-Code
21939 \begin_layout LyX-Code
21943 \begin_layout LyX-Code
21944 UpdateResult "$$AbsPath$$Basename.eps"
21947 \begin_layout LyX-Code
21948 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21951 \begin_layout LyX-Code
21952 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21955 \begin_layout LyX-Code
21959 \begin_layout LyX-Code
21960 Product "[XFig: $$FName]"
21963 \begin_layout LyX-Code
21967 \begin_layout LyX-Code
21971 \begin_layout Standard
21972 As you can see, the template is enclosed in
21973 \begin_inset Flex Code
21976 \begin_layout Plain Layout
21982 \SpecialChar \ldots{}
21984 \begin_inset Flex Code
21987 \begin_layout Plain Layout
21994 It contains a header specifying some general settings and, for each supported
21995 primary document file format, a section
21996 \begin_inset Flex Code
21999 \begin_layout Plain Layout
22005 \SpecialChar \ldots{}
22007 \begin_inset Flex Code
22010 \begin_layout Plain Layout
22019 \begin_layout Subsection
22020 The template header
22023 \begin_layout Description
22024 \begin_inset Flex Code
22027 \begin_layout Plain Layout
22028 AutomaticProduction
22029 \begin_inset space ~
22037 Whether the file represented by the template must be generated by LyX.
22038 This command must occur exactly once.
22041 \begin_layout Description
22042 \begin_inset Flex Code
22045 \begin_layout Plain Layout
22047 \begin_inset space ~
22055 A glob pattern that is used in the file dialog to filter out the desired
22057 If there is more than one possible file extension (e.
22058 \begin_inset space \thinspace{}
22062 \begin_inset space \space{}
22066 \begin_inset Flex Code
22069 \begin_layout Plain Layout
22076 \begin_inset Flex Code
22079 \begin_layout Plain Layout
22085 ), use something like
22086 \begin_inset Flex Code
22089 \begin_layout Plain Layout
22096 This command must occur exactly once.
22099 \begin_layout Description
22100 \begin_inset Flex Code
22103 \begin_layout Plain Layout
22105 \begin_inset space ~
22113 The text that is displayed on the button.
22114 This command must occur exactly once.
22117 \begin_layout Description
22118 \begin_inset Flex Code
22121 \begin_layout Plain Layout
22123 \begin_inset space ~
22127 \begin_inset space ~
22135 The help text that is used in the External dialog.
22136 Provide enough information to explain to the user just what the template
22137 can provide him with.
22138 This command must occur exactly once.
22141 \begin_layout Description
22142 \begin_inset Flex Code
22145 \begin_layout Plain Layout
22147 \begin_inset space ~
22155 The file format of the original file.
22156 This must be the name of a format that is known to LyX (see
22157 \begin_inset CommandInset ref
22159 reference "sec:Formats"
22165 \begin_inset Quotes eld
22169 \begin_inset Flex Code
22172 \begin_layout Plain Layout
22179 \begin_inset Quotes erd
22182 if the template can handle original files of more than one format.
22183 LyX will attempt to interrogate the file itself in order to deduce its
22184 format in this case.
22185 This command must occur exactly once.
22188 \begin_layout Description
22189 \begin_inset Flex Code
22192 \begin_layout Plain Layout
22194 \begin_inset space ~
22202 A unique name for the template.
22203 It must not contain substitution macros (see below).
22206 \begin_layout Description
22207 \begin_inset Flex Code
22210 \begin_layout Plain Layout
22212 \begin_inset space ~
22215 Rotate|Resize|Clip|Extra
22220 This command specifies which transformations are supported by this template.
22221 It may occur zero or more times.
22222 This command enables the corresponding tabs in the external dialog.
22224 \begin_inset Flex Code
22227 \begin_layout Plain Layout
22233 command must have either a corresponding
22234 \begin_inset Flex Code
22237 \begin_layout Plain Layout
22244 \begin_inset Flex Code
22247 \begin_layout Plain Layout
22254 \begin_inset Flex Code
22257 \begin_layout Plain Layout
22264 Otherwise the transformation will not be supported by that format.
22267 \begin_layout Subsection
22271 \begin_layout Description
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22277 \begin_inset space ~
22280 LaTeX|PDFLaTeX|PlainText|DocBook
22285 The primary document file format that this format definition is for.
22286 Not every template has a sensible representation in all document file formats.
22287 Please define nevertheless a
22288 \begin_inset Flex Code
22291 \begin_layout Plain Layout
22297 section for all templates.
22298 Use a dummy text when no representation is available.
22299 Then you can at least see a reference to the external material in the exported
22303 \begin_layout Description
22304 \begin_inset Flex Code
22307 \begin_layout Plain Layout
22309 \begin_inset space ~
22313 \begin_inset space ~
22321 This command defines an additional macro
22322 \begin_inset Flex Code
22325 \begin_layout Plain Layout
22331 for substitution in
22332 \begin_inset Flex Code
22335 \begin_layout Plain Layout
22343 \begin_inset Flex Code
22346 \begin_layout Plain Layout
22352 itself may contain substitution macros.
22353 The advantage over using
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22364 \begin_inset Flex Code
22367 \begin_layout Plain Layout
22373 is that the substituted value of
22374 \begin_inset Flex Code
22377 \begin_layout Plain Layout
22383 is sanitized so that it is a valid optional argument in the document format.
22384 This command may occur zero or more times.
22387 \begin_layout Description
22388 \begin_inset Flex Code
22391 \begin_layout Plain Layout
22393 \begin_inset space ~
22401 The text that is inserted in the exported document.
22402 This is actually the most important command and can be quite complex.
22403 This command must occur exactly once.
22406 \begin_layout Description
22407 \begin_inset Flex Code
22410 \begin_layout Plain Layout
22412 \begin_inset space ~
22420 This command specifies a preamble snippet that will be included in the
22422 It has to be defined using
22423 \begin_inset Flex Code
22426 \begin_layout Plain Layout
22432 \SpecialChar \ldots{}
22434 \begin_inset Flex Code
22437 \begin_layout Plain Layout
22444 This command may occur zero or more times.
22447 \begin_layout Description
22448 \begin_inset Flex Code
22451 \begin_layout Plain Layout
22453 \begin_inset space ~
22457 \begin_inset space ~
22465 This command denotes files that are created by the conversion process and
22466 are needed for a particular export format.
22467 If the filename is relative, it is interpreted relative to the master document.
22468 This command may be given zero or more times.
22471 \begin_layout Description
22472 \begin_inset Flex Code
22475 \begin_layout Plain Layout
22477 \begin_inset space ~
22485 The name of a required LaTeX package.
22486 The package is included via
22487 \begin_inset Flex Code
22490 \begin_layout Plain Layout
22498 in the LaTeX preamble.
22499 This command may occur zero or more times.
22502 \begin_layout Description
22503 \begin_inset Flex Code
22506 \begin_layout Plain Layout
22508 \begin_inset space ~
22512 \begin_inset space ~
22515 RotationLatexCommand
22520 This command specifies that the built in LaTeX command should be used for
22522 This command may occur once or not at all.
22525 \begin_layout Description
22526 \begin_inset Flex Code
22529 \begin_layout Plain Layout
22531 \begin_inset space ~
22535 \begin_inset space ~
22543 This command specifies that the built in LaTeX command should be used for
22545 This command may occur once or not at all.
22548 \begin_layout Description
22549 \begin_inset Flex Code
22552 \begin_layout Plain Layout
22554 \begin_inset space ~
22558 \begin_inset space ~
22561 RotationLatexOption
22566 This command specifies that rotation is done via an optional argument.
22567 This command may occur once or not at all.
22570 \begin_layout Description
22571 \begin_inset Flex Code
22574 \begin_layout Plain Layout
22576 \begin_inset space ~
22580 \begin_inset space ~
22588 This command specifies that resizing is done via an optional argument.
22589 This command may occur once or not at all.
22592 \begin_layout Description
22593 \begin_inset Flex Code
22596 \begin_layout Plain Layout
22598 \begin_inset space ~
22602 \begin_inset space ~
22610 This command specifies that clipping is done via an optional argument.
22611 This command may occur once or not at all.
22614 \begin_layout Description
22615 \begin_inset Flex Code
22618 \begin_layout Plain Layout
22620 \begin_inset space ~
22624 \begin_inset space ~
22632 This command specifies that an extra optional argument is used.
22633 This command may occur once or not at all.
22636 \begin_layout Description
22637 \begin_inset Flex Code
22640 \begin_layout Plain Layout
22642 \begin_inset space ~
22650 The file format of the converted file.
22651 This must be the name of a format that is known to LyX (see the
22652 \begin_inset Flex MenuItem
22655 \begin_layout Plain Layout
22656 Tools\SpecialChar \menuseparator
22657 Preferences\SpecialChar \menuseparator
22658 File Handling\SpecialChar \menuseparator
22665 This command must occur exactly once.
22666 If the resulting file format is PDF, you need to specify the format
22667 \begin_inset Flex Code
22670 \begin_layout Plain Layout
22677 This is the PDF format used for including graphics.
22678 The other defined PDF formats are for document export.
22681 \begin_layout Description
22682 \begin_inset Flex Code
22685 \begin_layout Plain Layout
22687 \begin_inset space ~
22695 The file name of the converted file.
22696 The file name must be absolute.
22697 This command must occur exactly once.
22700 \begin_layout Subsection
22701 Preamble definitions
22704 \begin_layout Standard
22705 The external template configuration file may contain additional preamble
22706 definitions enclosed by
22707 \begin_inset Flex Code
22710 \begin_layout Plain Layout
22716 \SpecialChar \ldots{}
22718 \begin_inset Flex Code
22721 \begin_layout Plain Layout
22728 They can be used by the templates in the
22729 \begin_inset Flex Code
22732 \begin_layout Plain Layout
22741 \begin_layout Section
22742 The substitution mechanism
22745 \begin_layout Standard
22746 When the external material facility invokes an external program, it is done
22747 on the basis of a command defined in the template configuration file.
22748 These commands can contain various macros that are expanded before execution.
22749 Execution always take place in the directory of the containing document.
22752 \begin_layout Standard
22753 Also, whenever external material is to be displayed, the name will be produced
22754 by the substitution mechanism, and most other commands in the template
22755 definition support substitution as well.
22758 \begin_layout Standard
22759 The available macros are the following:
22762 \begin_layout Description
22763 \begin_inset Flex Code
22766 \begin_layout Plain Layout
22767 $$AbsOrRelPathMaster
22772 The file path, absolute or relative to the master LyX document.
22775 \begin_layout Description
22776 \begin_inset Flex Code
22779 \begin_layout Plain Layout
22780 $$AbsOrRelPathParent
22785 The file path, absolute or relative to the LyX document.
22788 \begin_layout Description
22789 \begin_inset Flex Code
22792 \begin_layout Plain Layout
22798 The absolute file path.
22801 \begin_layout Description
22802 \begin_inset Flex Code
22805 \begin_layout Plain Layout
22811 The filename without path and without the extension.
22814 \begin_layout Description
22815 \begin_inset Flex Code
22818 \begin_layout Plain Layout
22820 \begin_inset Quotes eld
22824 \begin_inset Quotes erd
22832 This macro will expand to the contents of the file with the name
22833 \begin_inset Flex Code
22836 \begin_layout Plain Layout
22845 \begin_layout Description
22846 \begin_inset Flex Code
22849 \begin_layout Plain Layout
22855 The file extension (including the dot).
22858 \begin_layout Description
22859 \begin_inset Flex Code
22862 \begin_layout Plain Layout
22868 The filename of the file specified in the external material dialog.
22869 This is either an absolute name, or it is relative to the LyX document.
22872 \begin_layout Description
22873 \begin_inset Flex Code
22876 \begin_layout Plain Layout
22883 \begin_inset Flex Code
22886 \begin_layout Plain Layout
22892 (absolute name or relative to the LyX document).
22895 \begin_layout Description
22896 \begin_inset Flex Code
22899 \begin_layout Plain Layout
22905 The file path, relative to the master LyX document.
22908 \begin_layout Description
22909 \begin_inset Flex Code
22912 \begin_layout Plain Layout
22918 The file path, relative to the LyX document.
22921 \begin_layout Description
22922 \begin_inset Flex Code
22925 \begin_layout Plain Layout
22931 This macro will expand to the absolute path of the system directory.
22932 This is typically used to point to the various helper scripts that are
22936 \begin_layout Description
22937 \begin_inset Flex Code
22940 \begin_layout Plain Layout
22946 A name and full path to a temporary file which will be automatically deleted
22947 whenever the containing document is closed, or the external material insertion
22951 \begin_layout Standard
22952 All path macros contain a trailing directory separator, so you can construct
22954 \begin_inset space \thinspace{}
22958 \begin_inset space \space{}
22961 the absolute filename with
22962 \begin_inset Flex Code
22965 \begin_layout Plain Layout
22966 $$AbsPath$$Basename$$Extension
22974 \begin_layout Standard
22975 The macros above are substituted in all commands unless otherwise noted.
22977 \begin_inset Flex Code
22980 \begin_layout Plain Layout
22986 supports additionally the following substitutions if they are enabled by
22988 \begin_inset Flex Code
22991 \begin_layout Plain Layout
22998 \begin_inset Flex Code
23001 \begin_layout Plain Layout
23010 \begin_layout Description
23011 \begin_inset Flex Code
23014 \begin_layout Plain Layout
23020 The front part of the resize command.
23023 \begin_layout Description
23024 \begin_inset Flex Code
23027 \begin_layout Plain Layout
23033 The back part of the resize command.
23036 \begin_layout Description
23037 \begin_inset Flex Code
23040 \begin_layout Plain Layout
23046 The front part of the rotation command.
23049 \begin_layout Description
23050 \begin_inset Flex Code
23053 \begin_layout Plain Layout
23059 The back part of the rotation command.
23062 \begin_layout Standard
23063 The value string of the
23064 \begin_inset Flex Code
23067 \begin_layout Plain Layout
23073 command supports additionally the following substitutions if they are enabled
23075 \begin_inset Flex Code
23078 \begin_layout Plain Layout
23085 \begin_inset Flex Code
23088 \begin_layout Plain Layout
23097 \begin_layout Description
23098 \begin_inset Flex Code
23101 \begin_layout Plain Layout
23110 \begin_layout Description
23111 \begin_inset Flex Code
23114 \begin_layout Plain Layout
23123 \begin_layout Description
23124 \begin_inset Flex Code
23127 \begin_layout Plain Layout
23136 \begin_layout Description
23137 \begin_inset Flex Code
23140 \begin_layout Plain Layout
23146 The rotation option.
23149 \begin_layout Standard
23150 You may ask why there are so many path macros.
23151 There are mainly two reasons:
23154 \begin_layout Enumerate
23155 Relative and absolute file names should remain relative or absolute, respectivel
23157 Users may have reasons to prefer either form.
23158 Relative names are useful for portable documents that should work on different
23159 machines, for example.
23160 Absolute names may be required by some programs.
23163 \begin_layout Enumerate
23164 LaTeX treats relative file names differently than LyX and other programs
23165 in nested included files.
23166 For LyX, a relative file name is always relative to the document that contains
23168 For LaTeX, it is always relative to the master document.
23169 These two definitions are identical if you have only one document, but
23170 differ if you have a master document that includes part documents.
23171 That means that relative filenames must be transformed when presented to
23173 Fortunately LyX does this automatically for you if you choose the right
23177 \begin_layout Standard
23178 So which path macro should be used in new template definitions? The rule
23182 \begin_layout Itemize
23184 \begin_inset Flex Code
23187 \begin_layout Plain Layout
23193 if an absolute path is required.
23196 \begin_layout Itemize
23198 \begin_inset Flex Code
23201 \begin_layout Plain Layout
23202 $$AbsOrRelPathMaster
23207 if the substituted string is some kind of LaTeX input.
23210 \begin_layout Itemize
23212 \begin_inset Flex Code
23215 \begin_layout Plain Layout
23216 $$AbsOrRelPathParent
23221 in order to preserve the user's choice.
23224 \begin_layout Standard
23225 There are special cases where this rule does not work and e.
23226 \begin_inset space \thinspace{}
23230 \begin_inset space \space{}
23233 relative names are needed, but normally it will work just fine.
23234 One example for such a case is the command
23235 \begin_inset Flex Code
23238 \begin_layout Plain Layout
23239 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23244 in the XFig template above: We can't use the absolute name because the
23246 \begin_inset Flex Code
23249 \begin_layout Plain Layout
23255 files needs the relative name in order to rewrite the file content.
23258 \begin_layout Section
23259 Security discussion
23260 \begin_inset CommandInset label
23262 name "sec:Security-discussion"
23269 \begin_layout Standard
23270 The external material feature interfaces with a lot of external programs
23271 and does so automatically, so we have to consider the security implications
23273 In particular, since you have the option of including your own filenames
23274 and/or parameter strings and those are expanded into a command, it seems
23275 that it would be possible to create a malicious document which executes
23276 arbitrary commands when a user views or prints the document.
23277 This is something we definitely want to avoid.
23280 \begin_layout Standard
23281 However, since the external program commands are specified in the template
23282 configuration file only, there are no security issues if LyX is properly
23283 configured with safe templates only.
23284 This is so because the external programs are invoked with the
23285 \begin_inset Flex Code
23288 \begin_layout Plain Layout
23294 -system call rather than the
23295 \begin_inset Flex Code
23298 \begin_layout Plain Layout
23304 system-call, so it's not possible to execute arbitrary commands from the
23305 filename or parameter section via the shell.
23308 \begin_layout Standard
23309 This also implies that you are restricted in what command strings you can
23310 use in the external material templates.
23311 In particular, pipes and redirection are not readily available.
23312 This has to be so if LyX should remain safe.
23313 If you want to use some of the shell features, you should write a safe
23314 script to do this in a controlled manner, and then invoke the script from
23315 the command string.
23319 \begin_layout Standard
23320 It is possible to design a template that interacts directly with the shell,
23321 but since this would allow a malicious user to execute arbitrary commands
23322 by writing clever filenames and/or parameters, we generally recommend that
23323 you only use safe scripts that work with the
23324 \begin_inset Flex Code
23327 \begin_layout Plain Layout
23333 system call in a controlled manner.
23334 Of course, for use in a controlled environment, it can be tempting to just
23335 fall back to use ordinary shell scripts.
23336 If you do so, be aware that you
23340 provide an easily exploitable security hole in your system.
23341 Of course it stands to reason that such unsafe templates will never be
23342 included in the standard LyX distribution, although we do encourage people
23343 to submit new templates in the open source tradition.
23344 But LyX as shipped from the official distribution channels will never have
23348 \begin_layout Standard
23349 Including external material provides a lot of power, and you have to be
23350 careful not to introduce security hazards with this power.
23351 A subtle error in a single line in an innocent looking script can open
23352 the door to huge security problems.
23353 So if you do not fully understand the issues, we recommend that you consult
23354 a knowledgeable security professional or the LyX development team if you
23355 have any questions about whether a given template is safe or not.
23356 And do this before you use it in an uncontrolled environment.
23359 \begin_layout Chapter
23361 List of supported LyX functions to be used in layouts
23362 \begin_inset CommandInset label
23364 name "chap:List-of-functions"
23371 \begin_layout Standard
23373 \begin_inset Tabular
23374 <lyxtabular version="3" rows="11" columns="8">
23375 <features rotate="0" tabularvalignment="middle">
23376 <column alignment="left" valignment="top">
23377 <column alignment="left" valignment="top">
23378 <column alignment="left" valignment="top">
23379 <column alignment="left" valignment="top">
23380 <column alignment="left" valignment="top">
23381 <column alignment="left" valignment="top">
23382 <column alignment="left" valignment="top">
23383 <column alignment="left" valignment="top">
23385 <cell alignment="left" valignment="top" usebox="none">
23388 \begin_layout Plain Layout
23394 <cell alignment="left" valignment="top" usebox="none">
23397 \begin_layout Plain Layout
23403 <cell alignment="left" valignment="top" usebox="none">
23406 \begin_layout Plain Layout
23412 <cell alignment="left" valignment="top" usebox="none">
23415 \begin_layout Plain Layout
23421 <cell alignment="center" valignment="top" usebox="none">
23424 \begin_layout Plain Layout
23430 <cell alignment="center" valignment="top" usebox="none">
23433 \begin_layout Plain Layout
23439 <cell alignment="center" valignment="top" usebox="none">
23442 \begin_layout Plain Layout
23448 <cell alignment="center" valignment="top" usebox="none">
23451 \begin_layout Plain Layout
23459 <cell alignment="left" valignment="top" usebox="none">
23462 \begin_layout Plain Layout
23468 <cell alignment="left" valignment="top" usebox="none">
23471 \begin_layout Plain Layout
23477 <cell alignment="left" valignment="top" usebox="none">
23480 \begin_layout Plain Layout
23486 <cell alignment="left" valignment="top" usebox="none">
23489 \begin_layout Plain Layout
23495 <cell alignment="center" valignment="top" usebox="none">
23498 \begin_layout Plain Layout
23504 <cell alignment="center" valignment="top" usebox="none">
23507 \begin_layout Plain Layout
23513 <cell alignment="center" valignment="top" usebox="none">
23516 \begin_layout Plain Layout
23522 <cell alignment="center" valignment="top" usebox="none">
23525 \begin_layout Plain Layout
23533 <cell alignment="left" valignment="top" usebox="none">
23536 \begin_layout Plain Layout
23542 <cell alignment="left" valignment="top" usebox="none">
23545 \begin_layout Plain Layout
23551 <cell alignment="left" valignment="top" usebox="none">
23554 \begin_layout Plain Layout
23560 <cell alignment="left" valignment="top" usebox="none">
23563 \begin_layout Plain Layout
23569 <cell alignment="center" valignment="top" usebox="none">
23572 \begin_layout Plain Layout
23578 <cell alignment="center" valignment="top" usebox="none">
23581 \begin_layout Plain Layout
23587 <cell alignment="center" valignment="top" usebox="none">
23590 \begin_layout Plain Layout
23596 <cell alignment="center" valignment="top" usebox="none">
23599 \begin_layout Plain Layout
23607 <cell alignment="left" valignment="top" usebox="none">
23610 \begin_layout Plain Layout
23616 <cell alignment="left" valignment="top" usebox="none">
23619 \begin_layout Plain Layout
23625 <cell alignment="left" valignment="top" usebox="none">
23628 \begin_layout Plain Layout
23634 <cell alignment="left" valignment="top" usebox="none">
23637 \begin_layout Plain Layout
23643 <cell alignment="center" valignment="top" usebox="none">
23646 \begin_layout Plain Layout
23652 <cell alignment="center" valignment="top" usebox="none">
23655 \begin_layout Plain Layout
23661 <cell alignment="center" valignment="top" usebox="none">
23664 \begin_layout Plain Layout
23670 <cell alignment="center" valignment="top" usebox="none">
23673 \begin_layout Plain Layout
23681 <cell alignment="left" valignment="top" usebox="none">
23684 \begin_layout Plain Layout
23690 <cell alignment="left" valignment="top" usebox="none">
23693 \begin_layout Plain Layout
23699 <cell alignment="left" valignment="top" usebox="none">
23702 \begin_layout Plain Layout
23708 <cell alignment="left" valignment="top" usebox="none">
23711 \begin_layout Plain Layout
23717 <cell alignment="center" valignment="top" usebox="none">
23720 \begin_layout Plain Layout
23726 <cell alignment="center" valignment="top" usebox="none">
23729 \begin_layout Plain Layout
23735 <cell alignment="center" valignment="top" usebox="none">
23738 \begin_layout Plain Layout
23744 <cell alignment="center" valignment="top" usebox="none">
23747 \begin_layout Plain Layout
23755 <cell alignment="left" valignment="top" usebox="none">
23758 \begin_layout Plain Layout
23764 <cell alignment="left" valignment="top" usebox="none">
23767 \begin_layout Plain Layout
23773 <cell alignment="left" valignment="top" usebox="none">
23776 \begin_layout Plain Layout
23782 <cell alignment="left" valignment="top" usebox="none">
23785 \begin_layout Plain Layout
23791 <cell alignment="center" valignment="top" usebox="none">
23794 \begin_layout Plain Layout
23800 <cell alignment="center" valignment="top" usebox="none">
23803 \begin_layout Plain Layout
23809 <cell alignment="center" valignment="top" usebox="none">
23812 \begin_layout Plain Layout
23818 <cell alignment="center" valignment="top" usebox="none">
23821 \begin_layout Plain Layout
23829 <cell alignment="left" valignment="top" usebox="none">
23832 \begin_layout Plain Layout
23838 <cell alignment="left" valignment="top" usebox="none">
23841 \begin_layout Plain Layout
23847 <cell alignment="left" valignment="top" usebox="none">
23850 \begin_layout Plain Layout
23856 <cell alignment="left" valignment="top" usebox="none">
23859 \begin_layout Plain Layout
23865 <cell alignment="center" valignment="top" usebox="none">
23868 \begin_layout Plain Layout
23874 <cell alignment="center" valignment="top" usebox="none">
23877 \begin_layout Plain Layout
23883 <cell alignment="center" valignment="top" usebox="none">
23886 \begin_layout Plain Layout
23892 <cell alignment="center" valignment="top" usebox="none">
23895 \begin_layout Plain Layout
23903 <cell alignment="left" valignment="top" usebox="none">
23906 \begin_layout Plain Layout
23912 <cell alignment="left" valignment="top" usebox="none">
23915 \begin_layout Plain Layout
23921 <cell alignment="left" valignment="top" usebox="none">
23924 \begin_layout Plain Layout
23930 <cell alignment="left" valignment="top" usebox="none">
23933 \begin_layout Plain Layout
23939 <cell alignment="center" valignment="top" usebox="none">
23942 \begin_layout Plain Layout
23948 <cell alignment="center" valignment="top" usebox="none">
23951 \begin_layout Plain Layout
23957 <cell alignment="center" valignment="top" usebox="none">
23960 \begin_layout Plain Layout
23966 <cell alignment="center" valignment="top" usebox="none">
23969 \begin_layout Plain Layout
23977 <cell alignment="left" valignment="top" usebox="none">
23980 \begin_layout Plain Layout
23986 <cell alignment="left" valignment="top" usebox="none">
23989 \begin_layout Plain Layout
23995 <cell alignment="left" valignment="top" usebox="none">
23998 \begin_layout Plain Layout
24004 <cell alignment="left" valignment="top" usebox="none">
24007 \begin_layout Plain Layout
24013 <cell alignment="center" valignment="top" usebox="none">
24016 \begin_layout Plain Layout
24022 <cell alignment="center" valignment="top" usebox="none">
24025 \begin_layout Plain Layout
24031 <cell alignment="center" valignment="top" usebox="none">
24034 \begin_layout Plain Layout
24040 <cell alignment="center" valignment="top" usebox="none">
24043 \begin_layout Plain Layout
24051 <cell alignment="left" valignment="top" usebox="none">
24054 \begin_layout Plain Layout
24060 <cell alignment="left" valignment="top" usebox="none">
24063 \begin_layout Plain Layout
24069 <cell alignment="left" valignment="top" usebox="none">
24072 \begin_layout Plain Layout
24078 <cell alignment="left" valignment="top" usebox="none">
24081 \begin_layout Plain Layout
24087 <cell alignment="center" valignment="top" usebox="none">
24090 \begin_layout Plain Layout
24096 <cell alignment="center" valignment="top" usebox="none">
24099 \begin_layout Plain Layout
24105 <cell alignment="center" valignment="top" usebox="none">
24108 \begin_layout Plain Layout
24114 <cell alignment="center" valignment="top" usebox="none">
24117 \begin_layout Plain Layout
24125 <cell alignment="center" valignment="top" usebox="none">
24128 \begin_layout Plain Layout
24134 <cell alignment="center" valignment="top" usebox="none">
24137 \begin_layout Plain Layout
24143 <cell alignment="center" valignment="top" usebox="none">
24146 \begin_layout Plain Layout
24152 <cell alignment="center" valignment="top" usebox="none">
24155 \begin_layout Plain Layout
24161 <cell alignment="center" valignment="top" usebox="none">
24164 \begin_layout Plain Layout
24170 <cell alignment="center" valignment="top" usebox="none">
24173 \begin_layout Plain Layout
24179 <cell alignment="center" valignment="top" usebox="none">
24182 \begin_layout Plain Layout
24188 <cell alignment="center" valignment="top" usebox="none">
24191 \begin_layout Plain Layout
24205 \begin_layout Chapter
24206 Names of available colors to be used in layouts
24207 \begin_inset CommandInset label
24209 name "chap:Names-of-colors"
24216 \begin_layout Standard
24217 The colors listed here are the standard colors and the those that you can
24218 adjust in the LyX preferences.
24221 \begin_layout Description
24234 No particular color -- clear or default
24237 \begin_layout Description
24241 \begin_layout Description
24245 \begin_layout Description
24249 \begin_layout Description
24253 \begin_layout Description
24257 \begin_layout Description
24261 \begin_layout Description
24265 \begin_layout Description
24269 \begin_layout Description
24270 added_space Added space marker color
24273 \begin_layout Description
24274 addedtext Added text color
24277 \begin_layout Description
24278 appendix Appendix marker color
24281 \begin_layout Description
24282 background Background color
24285 \begin_layout Description
24286 bottomarea Bottom area color
24289 \begin_layout Description
24290 branchlabel Label color for branches
24293 \begin_layout Description
24294 buttonbg Color used for bottom background
24297 \begin_layout Description
24298 buttonhoverbg Color used for button background under focus
24301 \begin_layout Description
24302 buttonframe Color for inset button frames
24305 \begin_layout Description
24306 changebar Changebar color
24309 \begin_layout Description
24310 changedtextauthor1 Changed text color author 1
24313 \begin_layout Description
24314 changedtextauthor2 Changed text color author 2
24317 \begin_layout Description
24318 changedtextauthor3 Changed text color author 3
24321 \begin_layout Description
24322 changedtextauthor4 Changed text color author 4
24325 \begin_layout Description
24326 changedtextauthor5 Changed text color author 5
24329 \begin_layout Description
24330 collapsable_inset_frame Collapsable insets framecolor
24333 \begin_layout Description
24334 collapsable_inset_text Collapsable insets text color
24337 \begin_layout Description
24338 command Text color for command insets
24341 \begin_layout Description
24342 commandbg Background color for command insets
24345 \begin_layout Description
24346 commandframe Frame color for command insets
24349 \begin_layout Description
24350 comment color for comments
24353 \begin_layout Description
24354 commentbg Background color of comments
24357 \begin_layout Description
24358 cursor Cursor color
24361 \begin_layout Description
24362 deletedtext Deleted text color
24365 \begin_layout Description
24366 deletedtextmodifier Deleted text modifying color
24369 \begin_layout Description
24370 depthbar Color for the depth bars in the margin
24373 \begin_layout Description
24374 eolmarker End of line marker color
24377 \begin_layout Description
24378 error Color of the LaTeX error box
24381 \begin_layout Description
24382 footlabel Label color for footnotes
24385 \begin_layout Description
24386 graphicsbg Graphics inset background color
24389 \begin_layout Description
24390 greyedout Label color for greyedout insets
24393 \begin_layout Description
24394 greyedoutbg Background color of greyedout inset
24397 \begin_layout Description
24398 greyedouttext Color for greyedout inset text
24401 \begin_layout Description
24402 indexlabel Label color for index insets
24405 \begin_layout Description
24406 ignore The color is ignored
24409 \begin_layout Description
24410 inherit The color is inherited
24413 \begin_layout Description
24414 inlinecompletion Inline completion color
24417 \begin_layout Description
24418 insetbg Inset marker background color
24421 \begin_layout Description
24422 insetframe Inset marker frame color
24425 \begin_layout Description
24426 language Color for marking foreign language words
24429 \begin_layout Description
24430 latex Text color in LaTeX mode
24433 \begin_layout Description
24434 listingsbg Background color of listings inset
24437 \begin_layout Description
24438 marginlabel Label color for margin notes
24441 \begin_layout Description
24442 math Math inset text color
24445 \begin_layout Description
24446 mathbg Math inset background color
24449 \begin_layout Description
24450 mathcorners Math inset frame color not under focus
24453 \begin_layout Description
24454 mathframe Math inset frame color under focus
24457 \begin_layout Description
24458 mathline Math line color
24461 \begin_layout Description
24462 mathmacrobg Macro math inset background color
24465 \begin_layout Description
24466 mathmacroblend Macro math blended color
24469 \begin_layout Description
24470 mathmacroframe Macro math frame color
24473 \begin_layout Description
24474 mathmacrohoverbg Macro math inset background color hovered
24477 \begin_layout Description
24478 mathmacrolabel Macro math label color
24481 \begin_layout Description
24482 mathmacronewarg Macro template color for new parameters
24485 \begin_layout Description
24486 mathmacrooldarg Macro template color for old parameters
24489 \begin_layout Description
24490 newpage New page color
24493 \begin_layout Description
24494 nonunique_inlinecompletion Inline completion color for the non-unique part
24497 \begin_layout Description
24498 notebg Background color of notes
24501 \begin_layout Description
24502 notelabel Label color for notes
24505 \begin_layout Description
24506 pagebreak Page break/line break color
24509 \begin_layout Description
24510 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24513 \begin_layout Description
24514 phantomtext Text color for phantom insets
24517 \begin_layout Description
24518 preview The color used for previews
24521 \begin_layout Description
24522 previewframe Preview frame color
24525 \begin_layout Description
24526 regexpframe Color for regexp frame
24529 \begin_layout Description
24530 selection Background color of selected text
24533 \begin_layout Description
24534 selectiontext Foreground color of selected text
24537 \begin_layout Description
24538 shadedbg Background color of shaded box
24541 \begin_layout Description
24542 special Special chars text color
24545 \begin_layout Description
24546 tabularline Table line color
24549 \begin_layout Description
24550 tabularonoffline Table line color
24553 \begin_layout Description
24554 urllabel Label color for URL insets
24557 \begin_layout Description
24558 urltext Color for URL inset text