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 true
149 \output_changes false
153 \author -195340706 "Georg Baum"
154 \author 2090807402 "usti"
160 Customizing LyX: Features for the Advanced User
168 \begin_layout Plain Layout
170 If you have comments or error corrections, please send them to the LyX Documenta
172 \begin_inset CommandInset href
174 target "lyx-docs@lists.lyx.org"
181 \begin_inset Quotes eld
185 \begin_inset Quotes erd
188 in the subject header, and please cc the current maintainer of this file,
189 Richard Heck <rgheck@comcast.net>.
195 \begin_inset Newline newline
199 \begin_inset Newline newline
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
652 \begin_inset CommandInset ref
654 reference "cha:Internationalizing-LyX"
661 \begin_layout Labeling
662 \labelwidthstring 00.00.0000
663 \begin_inset Flex Code
666 \begin_layout Plain Layout
672 contains example files that explain how to use some features.
673 In the file browser, press the
674 \begin_inset Flex MenuItem
677 \begin_layout Plain Layout
686 \begin_layout Labeling
687 \labelwidthstring 00.00.0000
688 \begin_inset Flex Code
691 \begin_layout Plain Layout
697 contains image files that are used by the
698 \begin_inset Flex MenuItem
701 \begin_layout Plain Layout
708 In addition, it also contains the individual icons used in the toolbar
709 and the banners that can be shown when LyX is launched.
712 \begin_layout Labeling
713 \labelwidthstring 00.00.0000
714 \begin_inset Flex Code
717 \begin_layout Plain Layout
723 contains keyboard keymapping files.
725 \begin_inset CommandInset ref
727 reference "sec:International-Keymap-Stuff"
734 \begin_layout Labeling
735 \labelwidthstring 00.00.0000
736 \begin_inset Flex Code
739 \begin_layout Plain Layout
745 contains the text class and module files described in
746 \begin_inset CommandInset ref
748 reference "cha:Installing-New-Document"
755 \begin_layout Labeling
756 \labelwidthstring 00.00.0000
757 \begin_inset Flex Code
760 \begin_layout Plain Layout
767 \begin_inset Flex Code
770 \begin_layout Plain Layout
776 Python scripts used to convert between LyX versions.
777 These can be run from the command line if, say, you want to batch-convert
781 \begin_layout Labeling
782 \labelwidthstring 00.00.0000
783 \begin_inset Flex Code
786 \begin_layout Plain Layout
792 contains some files that demonstrate the capabilities of the
793 \begin_inset Flex MenuItem
796 \begin_layout Plain Layout
807 Also contains some scripts used by LyX itself.
810 \begin_layout Labeling
811 \labelwidthstring 00.00.0000
812 \begin_inset Flex Code
815 \begin_layout Plain Layout
821 contains the standard LyX template files described in
822 \begin_inset CommandInset ref
824 reference "sub:Creating-Templates"
831 \begin_layout Labeling
832 \labelwidthstring 00.00.0000
833 \begin_inset Flex Code
836 \begin_layout Plain Layout
842 contains files with the extension
843 \begin_inset Flex Code
846 \begin_layout Plain Layout
852 that define the user interface to LyX.
853 That is, the files define which items appear in which menus and the items
854 appearing on the toolbar.
857 \begin_layout Subsection
858 Files you don't want to modify
861 \begin_layout Standard
862 These files are used internally by LyX and you generally do not need to
863 modify them unless you are a developer.
866 \begin_layout Labeling
867 \labelwidthstring 00.00.0000
868 \begin_inset Flex Code
871 \begin_layout Plain Layout
877 this file contains the list of LyX developers.
878 The contents are displayed with the menu entry
879 \begin_inset Flex MenuItem
882 \begin_layout Plain Layout
883 Help\SpecialChar \menuseparator
896 \begin_layout Labeling
897 \labelwidthstring 00.00.0000
898 \begin_inset Flex Code
901 \begin_layout Plain Layout
907 this is a LaTeX script used during the configuration process.
911 \begin_layout Labeling
912 \labelwidthstring 00.00.0000
913 \begin_inset Flex Code
916 \begin_layout Plain Layout
922 this is the script that is used to re-configure LyX.
923 It creates configuration files in the directory it was run from.
926 \begin_layout Subsection
927 Other files needing a line or two
930 \begin_layout Labeling
931 \labelwidthstring 00.00.0000
932 \begin_inset Flex Code
935 \begin_layout Plain Layout
941 this contains tables describing how different character encodings can be
945 \begin_layout Labeling
946 \labelwidthstring 00.00.0000
947 \begin_inset Flex Code
950 \begin_layout Plain Layout
956 this file contains the templates available to the new
957 \begin_inset Flex MenuItem
960 \begin_layout Plain Layout
971 \begin_inset CommandInset ref
973 reference "chap:Including-External-Material"
980 \begin_layout Labeling
981 \labelwidthstring 00.00.0000
982 \begin_inset Flex Code
985 \begin_layout Plain Layout
991 this file contains a list of all the languages currently supported by LyX.
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
996 \begin_inset Flex Code
999 \begin_layout Plain Layout
1005 contains information about the supported fonts.
1008 \begin_layout Labeling
1009 \labelwidthstring 00.00.0000
1010 \begin_inset Flex Code
1013 \begin_layout Plain Layout
1019 this file contains translations for internationalized paragraph styles
1021 \begin_inset CommandInset ref
1023 reference "sub:I18n"
1030 \begin_layout Labeling
1031 \labelwidthstring 00.00.0000
1032 \begin_inset Flex Code
1035 \begin_layout Plain Layout
1041 this file contains information about unicode-encoded glyphs and the way
1042 they are supported by LyX via LaTeX.
1045 \begin_layout Section
1046 Your local configuration directory
1049 \begin_layout Standard
1050 Even if you are using LyX as an unprivileged user, you might want to change
1051 LyX configuration for your own use.
1053 \begin_inset Flex Code
1056 \begin_layout Plain Layout
1062 directory contains all your personal configuration files.
1063 This is the directory described as
1064 \begin_inset Quotes eld
1068 \begin_inset Quotes erd
1072 \begin_inset Flex MenuItem
1075 \begin_layout Plain Layout
1076 Help\SpecialChar \menuseparator
1078 \begin_inset space ~
1087 This directory is used as a mirror of
1088 \begin_inset Flex Code
1091 \begin_layout Plain Layout
1097 , which means that every file in
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1107 is a replacement for the corresponding file in
1108 \begin_inset Flex Code
1111 \begin_layout Plain Layout
1118 Any configuration file described in the above sections can be placed either
1119 in the system-wide directory, in which case it will affect all users, or
1120 in your local directory for your own use.
1123 \begin_layout Standard
1124 To make things clearer, let's provide a few examples:
1127 \begin_layout Itemize
1128 The preferences set in the
1129 \begin_inset Flex MenuItem
1132 \begin_layout Plain Layout
1133 Tools\SpecialChar \menuseparator
1139 dialog are saved to a file
1140 \begin_inset Flex Code
1143 \begin_layout Plain Layout
1150 \begin_inset Flex Code
1153 \begin_layout Plain Layout
1162 \begin_layout Itemize
1163 When you reconfigure using
1164 \begin_inset Flex MenuItem
1167 \begin_layout Plain Layout
1168 Tools\SpecialChar \menuseparator
1175 \begin_inset Flex Code
1178 \begin_layout Plain Layout
1184 script, and the resulting files are written in your local configuration
1186 This means that any additional text class file that you might have added
1188 \begin_inset Flex Code
1191 \begin_layout Plain Layout
1197 will be added to the list of classes in the
1198 \begin_inset Flex MenuItem
1201 \begin_layout Plain Layout
1202 Document\SpecialChar \menuseparator
1211 \begin_layout Itemize
1212 If you get some updated documentation from LyX ftp site and cannot install
1213 it because you do not have sysadmin rights on your system, you can just
1215 \begin_inset Flex Code
1218 \begin_layout Plain Layout
1224 and the items in the
1225 \begin_inset Flex MenuItem
1228 \begin_layout Plain Layout
1234 menu will open them!
1237 \begin_layout Section
1238 Running LyX with multiple configurations
1241 \begin_layout Standard
1242 The configuration freedom of the local configuration directory may not suffice
1243 if you want to have more than one configuration at your disposal.
1244 For example, you may want to be use different key bindings or printer settings
1246 You can achieve this by having several such directories.
1247 You then specify which directory to use at run-time.
1250 \begin_layout Standard
1251 Invoking LyX with the command line switch
1252 \begin_inset Flex Code
1255 \begin_layout Plain Layout
1265 instructs the program to read the configuration from that directory, and
1266 not from the default directory.
1267 (You can determine the default directory by running LyX without the
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1277 switch.) If the specified directory does not exist, LyX offers to create
1278 it for you, just like it does for the default directory on the first time
1279 you run the program.
1280 You can modify the configuration options in this additional user directory
1281 exactly as you would for the default directory.
1282 These directories are completely independent (but read on).
1283 Note that setting the environment variable
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1293 to some value has exactly the same effect.
1296 \begin_layout Standard
1297 Having several configurations also requires more maintenance: if you want
1298 to add a new layout to
1299 \begin_inset Flex Code
1302 \begin_layout Plain Layout
1308 which you want available from all your configurations, you must add it
1309 to each directory separately.
1310 You can avoid this with the following trick: after LyX creates the additional
1311 directory, most of the subdirectories (see above) are empty.
1312 If you want the new configuration to mirror an existing one, replace the
1313 empty subdirectory with a symbolic link to the matching subdirectory in
1314 the existing configuration.
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1325 subdirectory, however, since it contains a file written by the configuration
1326 script (also accessible through
1327 \begin_inset Flex MenuItem
1330 \begin_layout Plain Layout
1331 Tools\SpecialChar \menuseparator
1337 ) which is configuration-specific.
1340 \begin_layout Chapter
1341 The Preferences dialog
1344 \begin_layout Standard
1345 All options of the preferences dialog are described in the Appendix
1347 The Preferences Dialog
1354 For some options you might find here more details.
1357 \begin_layout Section
1359 \begin_inset CommandInset label
1368 \begin_layout Standard
1369 The first step is to define your file formats if they are not already defined.
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1383 \begin_inset Flex MenuItem
1386 \begin_layout Plain Layout
1387 File Handling\SpecialChar \menuseparator
1394 \begin_inset Flex MenuItem
1397 \begin_layout Plain Layout
1403 button to define your new format.
1405 \begin_inset Flex MenuItem
1408 \begin_layout Plain Layout
1414 field contains the name used to identify the format in the GUI.
1416 \begin_inset Flex MenuItem
1419 \begin_layout Plain Layout
1425 is used to identify the format internally.
1426 You will also need to enter a file extension.
1427 These are all required.
1429 \begin_inset Flex MenuItem
1432 \begin_layout Plain Layout
1438 field is used to provide a keyboard shortcut on the menus.
1439 (For example, pressing
1440 \begin_inset Flex MenuItem
1443 \begin_layout Plain Layout
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1454 View\SpecialChar \menuseparator
1455 View (Other Formats)\SpecialChar \menuseparator
1464 \begin_layout Standard
1466 \begin_inset Flex MenuItem
1469 \begin_layout Plain Layout
1476 \begin_inset Flex MenuItem
1479 \begin_layout Plain Layout
1486 For example, you might want to use
1487 \begin_inset Flex MenuItem
1490 \begin_layout Plain Layout
1496 to view PostScript files.
1497 You can enter the command needed to start the program in the corresponding
1499 In defining this command, you can use the four variables listed in the
1501 The viewer is launched when you view an image in LyX or use the
1502 \begin_inset Flex MenuItem
1505 \begin_layout Plain Layout
1512 The editor is for example launched when you right-click on an image and
1514 \begin_inset Flex MenuItem
1517 \begin_layout Plain Layout
1523 in the appearing context menu.
1526 \begin_layout Standard
1528 \begin_inset Flex MenuItem
1531 \begin_layout Plain Layout
1537 type of a format is optional, but if it is specified, it must be unique
1539 It is used to detect files of this format from the file contents.
1540 For some important file formats there is no MIME type officially registered
1542 \begin_inset CommandInset href
1545 target "http://www.iana.org/assignments/media-types/"
1550 Therefore LyX uses the extended list of MIME types as specified by
1551 \begin_inset CommandInset href
1553 name "freedesktop.org"
1554 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1561 \begin_layout Standard
1563 \begin_inset Flex MenuItem
1566 \begin_layout Plain Layout
1572 option tells LyX that a format is suitable for document export.
1573 If this is set and if a suitable conversion route exists (see
1574 \begin_inset CommandInset ref
1576 reference "sec:Converters"
1580 ), the format will appear in the
1581 \begin_inset Flex MenuItem
1584 \begin_layout Plain Layout
1585 File\SpecialChar \menuseparator
1592 The format will also appear in the
1593 \begin_inset Flex MenuItem
1596 \begin_layout Plain Layout
1602 menu if a viewer is specified for the format.
1603 Pure image formats, such as
1604 \begin_inset Flex Code
1607 \begin_layout Plain Layout
1613 , should not use this option.
1614 Formats that can both represent vector graphics and documents like
1615 \begin_inset Flex Code
1618 \begin_layout Plain Layout
1627 \begin_layout Standard
1629 \begin_inset Flex MenuItem
1632 \begin_layout Plain Layout
1633 Vector graphics format
1638 tells LyX that a format can contain vector graphics.
1639 This information is used to determine the target format of included graphics
1641 \begin_inset Flex MenuItem
1644 \begin_layout Plain Layout
1651 Included graphics may need to be converted to either
1652 \begin_inset Flex MenuItem
1655 \begin_layout Plain Layout
1662 \begin_inset Flex MenuItem
1665 \begin_layout Plain Layout
1672 \begin_inset Flex MenuItem
1675 \begin_layout Plain Layout
1682 \begin_inset Flex MenuItem
1685 \begin_layout Plain Layout
1691 cannot handle other image formats.
1692 If an included graphic is not already in
1693 \begin_inset Flex MenuItem
1696 \begin_layout Plain Layout
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1722 format, it is converted to
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1732 if the vector format option is set, and otherwise to
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1745 \begin_layout Section
1749 \begin_layout Standard
1750 Since all conversions from one format to another take place in LyX's temporary
1751 directory, it is sometimes necessary to modify a file before copying it
1752 to the temporary directory in order that the conversion may be performed.
1756 \begin_layout Plain Layout
1757 For example, the file may refer to other files—images, for example—using
1758 relative file names, and these may become invalid when the file is copied
1759 to the temporary directory.
1764 This is done by a Copier: It copies a file to (or from) the temporary directory
1765 and may modify it in the process.
1768 \begin_layout Standard
1769 The definitions of the copiers may use four variables:
1772 \begin_layout Labeling
1773 \labelwidthstring 00.00.0000
1774 \begin_inset Flex Code
1777 \begin_layout Plain Layout
1783 The LyX system directory (e.
1784 \begin_inset space \thinspace{}
1788 \begin_inset space \space{}
1792 \begin_inset Flex MenuItem
1795 \begin_layout Plain Layout
1804 \begin_layout Labeling
1805 \labelwidthstring 00.00.0000
1806 \begin_inset Flex Code
1809 \begin_layout Plain Layout
1818 \begin_layout Labeling
1819 \labelwidthstring 00.00.0000
1820 \begin_inset Flex Code
1823 \begin_layout Plain Layout
1832 \begin_layout Labeling
1833 \labelwidthstring 00.00.0000
1834 \begin_inset Flex Code
1837 \begin_layout Plain Layout
1843 The base name (without filename extension) in the LyX temporary directory
1846 \begin_layout Labeling
1847 \labelwidthstring 00.00.0000
1848 \begin_inset Flex Code
1851 \begin_layout Plain Layout
1857 The full directory path of the LyX temporary directory
1860 \begin_layout Labeling
1861 \labelwidthstring 00.00.0000
1862 \begin_inset Flex Code
1865 \begin_layout Plain Layout
1871 The full pathname to the original LyX file being processed
1874 \begin_layout Labeling
1875 \labelwidthstring 00.00.0000
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1885 The filename (without any directory path) of the LyX file.
1888 \begin_layout Labeling
1889 \labelwidthstring 00.00.0000
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1902 \begin_layout Standard
1903 The latter should be the filename as it would be used in a LaTeX's
1910 It is relevant only when exporting files suitable for such inclusion.
1913 \begin_layout Standard
1914 Copiers can be used to do almost anything with output files.
1915 For example, suppose you want generated pdf files to be copied to a special
1917 \begin_inset Flex Code
1920 \begin_layout Plain Layout
1927 Then you could write a shell script such as this one:
1930 \begin_layout Standard
1931 \begin_inset listings
1935 \begin_layout Plain Layout
1940 \begin_layout Plain Layout
1945 \begin_layout Plain Layout
1947 TOFILE=`basename $2`
1950 \begin_layout Plain Layout
1952 cp $FROMFILE /home/you/pdf/$TOFILE
1957 Save it in your local LyX directory—say,
1958 \begin_inset Flex Code
1961 \begin_layout Plain Layout
1962 /home/you/.lyx/scripts/pdfcopier.sh
1967 —and make it executable, if you need to do so on your platform.
1969 \begin_inset Flex MenuItem
1972 \begin_layout Plain Layout
1973 Tools\SpecialChar \menuseparator
1979 dialog, select under
1980 \begin_inset Flex MenuItem
1983 \begin_layout Plain Layout
1984 File Handling\SpecialChar \menuseparator
1991 \begin_inset Flex MenuItem
1994 \begin_layout Plain Layout
2000 format—or one of the other pdf formats—and enter
2001 \begin_inset Flex Code
2004 \begin_layout Plain Layout
2005 pdfcopier.sh $$i $$o
2011 \begin_inset Flex MenuItem
2014 \begin_layout Plain Layout
2024 \begin_layout Standard
2025 Copiers are used by LyX in various of its own conversions.
2026 For example, if appropriate programs are found, LyX will automatically
2027 install copiers for the
2028 \begin_inset Flex MenuItem
2031 \begin_layout Plain Layout
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2043 \begin_inset space ~
2052 When these formats are exported, the copier sees that not just the main
2053 HTML file but various associated files (style files, images, etc.) are also
2055 All these files are written to a subdirectory of the directory in which
2056 the original LyX file was found.
2060 \begin_layout Plain Layout
2061 This copier can be customized.
2063 \begin_inset Quotes eld
2067 \begin_inset Quotes erd
2070 argument takes a comma-separated list of extensions to be copied; if it
2071 is omitted, all files will be copied.
2073 \begin_inset Quotes eld
2077 \begin_inset Quotes erd
2080 argument determines the extension added to the generated directory.
2082 \begin_inset Quotes eld
2086 \begin_inset Flex MenuItem
2089 \begin_layout Plain Layout
2096 \begin_inset Quotes erd
2099 , so HTML generated from
2100 \begin_inset Flex MenuItem
2103 \begin_layout Plain Layout
2104 /path/to/filename.lyx
2110 \begin_inset Flex MenuItem
2113 \begin_layout Plain Layout
2114 /path/to/filename.html.LyXconv
2128 \begin_layout Section
2130 \begin_inset CommandInset label
2132 name "sec:Converters"
2139 \begin_layout Standard
2140 You can define your own Converters to convert files between different formats.
2142 \begin_inset Flex MenuItem
2145 \begin_layout Plain Layout
2146 Tools\SpecialChar \menuseparator
2147 Preferences\SpecialChar \menuseparator
2148 File Handling\SpecialChar \menuseparator
2157 \begin_layout Standard
2158 To define a new converter, select the
2159 \begin_inset Flex MenuItem
2162 \begin_layout Plain Layout
2164 \begin_inset space ~
2173 \begin_inset Flex MenuItem
2176 \begin_layout Plain Layout
2178 \begin_inset space ~
2186 from the drop-down lists, enter the command needed for the conversion,
2188 \begin_inset Flex MenuItem
2191 \begin_layout Plain Layout
2198 Several variables can be used in the definition of converters:
2201 \begin_layout Labeling
2202 \labelwidthstring 00.00.0000
2203 \begin_inset Flex Code
2206 \begin_layout Plain Layout
2212 The LyX system directory
2215 \begin_layout Labeling
2216 \labelwidthstring 00.00.0000
2217 \begin_inset Flex Code
2220 \begin_layout Plain Layout
2229 \begin_layout Labeling
2230 \labelwidthstring 00.00.0000
2231 \begin_inset Flex Code
2234 \begin_layout Plain Layout
2243 \begin_layout Labeling
2244 \labelwidthstring 00.00.0000
2245 \begin_inset Flex Code
2248 \begin_layout Plain Layout
2254 The base filename of the input file (i.
2255 \begin_inset space \thinspace{}
2258 g., without the extension)
2261 \begin_layout Labeling
2262 \labelwidthstring 00.00.0000
2263 \begin_inset Flex Code
2266 \begin_layout Plain Layout
2272 The path to the input file
2275 \begin_layout Labeling
2276 \labelwidthstring 00.00.0000
2277 \begin_inset Flex Code
2280 \begin_layout Plain Layout
2286 The path to the original input file (this is different from $$p when a
2287 chain of converters is called)
2290 \begin_layout Labeling
2291 \labelwidthstring 00.00.0000
2292 \begin_inset Flex Code
2295 \begin_layout Plain Layout
2301 The iconv name for the encoding of the document.
2304 \begin_layout Standard
2306 \begin_inset Flex MenuItem
2309 \begin_layout Plain Layout
2311 \begin_inset space ~
2319 field you can enter the following flags, separated by commas:
2322 \begin_layout Labeling
2323 \labelwidthstring 00.00.0000
2324 \begin_inset Flex Code
2327 \begin_layout Plain Layout
2333 This converter runs some form of LaTeX.
2334 This will make LyX's LaTeX error logs available.
2337 \begin_layout Labeling
2338 \labelwidthstring 00.00.0000
2339 \begin_inset Flex Code
2342 \begin_layout Plain Layout
2349 \begin_inset Flex MenuItem
2352 \begin_layout Plain Layout
2358 file for the conversion.
2361 \begin_layout Labeling
2362 \labelwidthstring 00.00.0000
2363 \begin_inset Flex Code
2366 \begin_layout Plain Layout
2373 \begin_inset Quotes eld
2377 \begin_inset Quotes erd
2380 file from the backend, which in practice means a LaTeX file like the one
2381 we would export, without
2382 \begin_inset Flex Code
2385 \begin_layout Plain Layout
2394 \begin_layout Labeling
2395 \labelwidthstring 00.00.0000
2396 \begin_inset Flex Code
2399 \begin_layout Plain Layout
2408 \begin_layout Standard
2409 The following three flags are not really flags at all because they take
2411 \begin_inset Flex MenuItem
2414 \begin_layout Plain Layout
2416 \begin_inset space ~
2420 \begin_inset space ~
2431 \begin_layout Labeling
2432 \labelwidthstring 00.00.0000
2433 \begin_inset Flex Code
2436 \begin_layout Plain Layout
2442 If set, the converter's standard error will be redirected to a file
2443 \begin_inset Flex Code
2446 \begin_layout Plain Layout
2452 , and the script given as argument will be run as:
2453 \begin_inset Flex Code
2456 \begin_layout Plain Layout
2457 script < infile.out > infile.log
2463 The argument may contain
2464 \begin_inset Flex Code
2467 \begin_layout Plain Layout
2476 \begin_layout Labeling
2477 \labelwidthstring 00.00.0000
2478 \begin_inset Flex Code
2481 \begin_layout Plain Layout
2487 The name of the directory in which the converter will dump the generated
2489 LyX will not create this directory, and it does not copy anything into
2490 it, though it will copy this directory to the destination.
2491 The argument may contain
2492 \begin_inset Flex Code
2495 \begin_layout Plain Layout
2501 , which will be replaced by the base name of the input and output files,
2502 respectively, when the directory is copied.
2503 \begin_inset Newline newline
2506 Note that resultdir and usetempdir make no sense together.
2507 The latter will be ignored if the former is given.
2510 \begin_layout Labeling
2511 \labelwidthstring 00.00.0000
2512 \begin_inset Flex Code
2515 \begin_layout Plain Layout
2521 Determines the output file name and may, contain
2522 \begin_inset Flex Code
2525 \begin_layout Plain Layout
2532 Sensible only with resultdir and optional even then; if not given, it defaults
2536 \begin_layout Standard
2537 None of these last three are presently used in any of the converters that
2538 are installed with LyX.
2542 \begin_layout Standard
2543 You do not have to define converters for all formats between which you want
2545 For example, you will note that there is no `LyX to PostScript' converter,
2546 but LyX will export PostScript.
2547 It does so by first creating a LaTeX file (no converter needs to be defined
2548 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2549 and finally converting the resulting DVI file to PostScript.
2550 LyX finds such `chains' of converters automatically, and it will always
2551 choose the shortest possible chain.
2552 You can, though, still define multiple conversion methods between file
2554 For example, the standard LyX configuration provides five ways to convert
2558 \begin_layout Enumerate
2560 \begin_inset Flex MenuItem
2563 \begin_layout Plain Layout
2572 \begin_layout Enumerate
2573 via (DVI and) PostScript, using
2574 \begin_inset Flex MenuItem
2577 \begin_layout Plain Layout
2586 \begin_layout Enumerate
2588 \begin_inset Flex MenuItem
2591 \begin_layout Plain Layout
2600 \begin_layout Enumerate
2602 \begin_inset Flex MenuItem
2605 \begin_layout Plain Layout
2614 \begin_layout Enumerate
2616 \begin_inset Flex MenuItem
2619 \begin_layout Plain Layout
2628 \begin_layout Standard
2629 To define such alternate chains, you must define multiple target `file formats',
2631 \begin_inset CommandInset ref
2633 reference "sec:Formats"
2638 For example, in the standard configuration, the formats named
2639 \begin_inset Flex MenuItem
2642 \begin_layout Plain Layout
2649 \begin_inset Flex MenuItem
2652 \begin_layout Plain Layout
2659 \begin_inset Flex MenuItem
2662 \begin_layout Plain Layout
2669 \begin_inset Flex MenuItem
2672 \begin_layout Plain Layout
2679 \begin_inset Flex MenuItem
2682 \begin_layout Plain Layout
2689 \begin_inset Flex MenuItem
2692 \begin_layout Plain Layout
2699 \begin_inset Flex MenuItem
2702 \begin_layout Plain Layout
2709 \begin_inset Flex MenuItem
2712 \begin_layout Plain Layout
2719 \begin_inset Flex MenuItem
2722 \begin_layout Plain Layout
2729 \begin_inset Flex MenuItem
2732 \begin_layout Plain Layout
2738 ) are defined, all of which share the extension
2739 \begin_inset Flex MenuItem
2742 \begin_layout Plain Layout
2748 , and which correspond to the conversion methods just mentioned.
2751 \begin_layout Chapter
2752 Internationalizing LyX
2753 \begin_inset CommandInset label
2755 name "cha:Internationalizing-LyX"
2762 \begin_layout Standard
2763 LyX supports using a translated interface.
2764 Last time we checked, LyX provided text in thirty languages.
2765 The language of choice is called your
2770 (For further reading on locale settings, see also the documentation for
2771 locale that comes with your operating system.
2772 For Linux, the manual page for
2773 \begin_inset Flex Code
2776 \begin_layout Plain Layout
2782 could be a good place to start).
2785 \begin_layout Standard
2786 Notice that these translations will work, but do contain a few flaws.
2787 In particular, all dialogs have been designed with the English text in
2788 mind, which means that some of the translated text will be too large to
2789 fit within the space allocated.
2790 This is only a display problem and will not cause any harm.
2791 Also, you will find that some of the translations do not define shortcut
2792 keys for everything.
2793 Sometimes, there are simply not enough free letters to do it.
2794 Other times, the translator just hasn't got around to doing it yet.
2795 Our localization team, which you may wish to join,
2799 \begin_layout Plain Layout
2800 If you are a fluent speaker of a language other than English, joining these
2801 teams is a great way to give back to the LyX community!
2806 will of course try to fix these shortcomings in future versions of LyX.
2809 \begin_layout Section
2813 \begin_layout Subsection
2814 Translating the graphical user interface (text messages).
2817 \begin_layout Standard
2819 \begin_inset Flex Code
2822 \begin_layout Plain Layout
2828 library to handle the internationalization of the interface.
2829 To have LyX speak your favorite language in all menus and dialogs, you
2831 \begin_inset Flex Code
2834 \begin_layout Plain Layout
2840 -file for that language.
2841 When this is available, you'll have to generate a
2842 \begin_inset Flex Code
2845 \begin_layout Plain Layout
2851 -file from it and install the
2852 \begin_inset Flex Code
2855 \begin_layout Plain Layout
2862 The process of doing all of this is explained in the documentation for
2864 \begin_inset Flex Code
2867 \begin_layout Plain Layout
2874 It is possible to do this just for yourself, but if you're going to do
2875 it, you might as well share the results of your labors with the rest of
2877 Send a message to the LyX developers' list for more information about how
2881 \begin_layout Standard
2882 In short, this is what you should do (xx denotes the language code):
2885 \begin_layout Itemize
2886 Check out the LyX source code.
2888 \begin_inset CommandInset href
2890 name "information on the web"
2891 target "http://www.lyx.org/HowToUseSVN"
2898 \begin_layout Itemize
2900 \begin_inset Flex Code
2903 \begin_layout Plain Layout
2909 to the folder of the
2910 \begin_inset Flex Code
2913 \begin_layout Plain Layout
2921 \begin_inset Flex Code
2924 \begin_layout Plain Layout
2932 \begin_inset Flex Code
2935 \begin_layout Plain Layout
2941 doesn't exist anywhere, it can be remade with the console command
2942 \begin_inset Flex Code
2945 \begin_layout Plain Layout
2951 in that directory, or you can use an existing po-file for some other language
2955 \begin_layout Itemize
2957 \begin_inset Flex Code
2960 \begin_layout Plain Layout
2970 \begin_layout Plain Layout
2971 This is just a text file, so it can be edited in any text editor.
2972 But there are also specialized programs that support such editing, such
2977 (for all platforms) or
2986 contains a `mode' for editing
2987 \begin_inset Flex Code
2990 \begin_layout Plain Layout
3001 For some menu- and widget-labels, there are also shortcut keys that should
3003 Those keys are marked after a `|', and should be translated according to
3004 the words and phrases of the language.
3005 You should also fill also out the information at the beginning of the new
3007 \begin_inset Flex Code
3010 \begin_layout Plain Layout
3016 -file with your email-address, etc., so people know where to reach you with
3017 suggestions and entertaining flames.
3020 \begin_layout Standard
3021 If you are just doing this on your own, then:
3024 \begin_layout Itemize
3026 \begin_inset Flex Code
3029 \begin_layout Plain Layout
3036 This can be done with
3037 \begin_inset Flex Code
3040 \begin_layout Plain Layout
3041 msgfmt -o xx.mo < xx.po
3049 \begin_layout Itemize
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 -file to your locale-tree, at the correct directory for application messages
3065 xx, and under the name
3066 \begin_inset Flex Code
3069 \begin_layout Plain Layout
3076 \begin_inset space \thinspace{}
3080 \begin_inset space \space{}
3084 \begin_inset Flex Code
3087 \begin_layout Plain Layout
3088 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3098 \begin_layout Standard
3099 As said, however, it would be best if the new
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3109 -file could be added to the LyX distribution, so others can use it.
3110 Adding it involves making additional changes to LyX.
3111 So send an email to the developers' mailing list if you're interested in
3115 \begin_layout Subsubsection
3119 \begin_layout Standard
3120 Sometimes it turns out that one English message needs to be translated into
3121 different messages in the target language.
3122 One example is the message
3123 \begin_inset Flex Code
3126 \begin_layout Plain Layout
3132 which has the German translation
3140 , depending upon exactly what the English
3141 \begin_inset Quotes eld
3145 \begin_inset Quotes erd
3150 \begin_inset Flex Code
3153 \begin_layout Plain Layout
3159 does not handle such ambiguous translations.
3160 Therefore you have to add some context information to the message: Instead
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3172 \begin_inset Flex Code
3175 \begin_layout Plain Layout
3176 To[[as in 'From format x to format y']]
3182 \begin_inset Flex Code
3185 \begin_layout Plain Layout
3186 To[[as in 'From page x to page y']].
3191 Now the two occurrences of
3192 \begin_inset Flex Code
3195 \begin_layout Plain Layout
3202 \begin_inset Flex Code
3205 \begin_layout Plain Layout
3211 and can be translated correctly to
3222 \begin_layout Standard
3223 Of course the context information needs to be stripped off the original
3224 message when no translation is used.
3225 Therefore you have to put it in double square brackets at the end of the
3226 message (see the example above).
3227 The translation mechanism of LyX ensures that everything in double square
3228 brackets at the end of messages is removed before displaying the message.
3231 \begin_layout Subsection
3232 Translating the documentation.
3235 \begin_layout Standard
3236 The online documentation (in the
3237 \begin_inset Flex MenuItem
3240 \begin_layout Plain Layout
3246 -menu) can (and should!) be translated.
3247 If there are translated versions of the documentation available
3251 \begin_layout Plain Layout
3252 As of March 2008, at least some of the documents have been translated into
3253 fourteen languages, with the Tutorial available in a few more.
3258 and the locale is set accordingly, these will be used automagically by
3260 LyX looks for translated versions as
3261 \begin_inset Flex Code
3264 \begin_layout Plain Layout
3265 LyXDir/doc/xx/DocName.lyx
3271 \begin_inset Flex Code
3274 \begin_layout Plain Layout
3280 is the code for the language currently in use.
3281 If there are no translated documents, the default English versions will
3283 Note that the translated versions must have the same filenames (
3284 \begin_inset Flex Code
3287 \begin_layout Plain Layout
3293 above) as the original.
3294 If you feel up to translating the documentation (an excellent way to proof-read
3295 the original documentation by the way!), there are a few things you should
3299 \begin_layout Itemize
3300 Check out the documentation translation web page at
3301 \begin_inset CommandInset href
3303 name "http://www.lyx.org/Translation"
3304 target "http://www.lyx.org/Translation"
3309 That way, you can find out which (if any) documents have already been translate
3310 d into your language.
3311 You can also find out who (if anyone) is organizing the effort to translate
3312 the documentation into your language.
3313 If no one is organizing the effort, please let us know that you're interested.
3316 \begin_layout Standard
3317 Once you get to actually translating, here's a few hints for you that may
3321 \begin_layout Itemize
3322 Join the documentation team! There is information on how to do that in
3323 \begin_inset Flex Code
3326 \begin_layout Plain Layout
3333 \begin_inset Flex MenuItem
3336 \begin_layout Plain Layout
3337 Help\SpecialChar \menuseparator
3343 ), which by the way is the first document you should translate.
3346 \begin_layout Itemize
3347 Learn the typographic conventions for the language you are translating to.
3348 Typography is an ancient art and over the centuries, a great variety of
3349 conventions have developed throughout different parts of the world.
3350 Also study the professional terminology amongst typographers in your country.
3351 Inventing your own terminology will only confuse the users.
3354 (Warning! Typography is addictive!)
3357 \begin_layout Itemize
3358 Make a copy of the document.
3359 This will be your working copy.
3360 You can use this as your personal translated help-file by placing it in
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_layout Itemize
3375 Sometimes the original document (from the LyX-team) will be updated.
3376 Use the source viewer at
3377 \begin_inset CommandInset href
3379 name "http://www.lyx.org/trac/timeline"
3380 target "http://www.lyx.org/trac/timeline"
3384 to see what has been changed.
3385 That way you can easily see which parts of the translated document need
3389 \begin_layout Standard
3390 If you ever find an error in the original document, fix it and notify the
3391 rest of the documentation team of the changes! (You didn't forget to join
3392 the documentation team, did you?)
3395 \begin_layout Standard
3396 \begin_inset Branch OutDated
3399 \begin_layout Section
3400 International Keyboard Support
3403 \begin_layout Standard
3406 [Editor's Note: The following section is by
3414 It needs to be fixed to conform to the new Documentation Style sheet and
3415 to make use of the new v1.0 features.
3416 The whole thing also needs to be merged with the section following it.-jw
3417 It may also be badly out of date.-rh (2008)]
3420 \begin_layout Subsection
3421 Defining Own Keymaps: Keymap File Format
3424 \begin_layout Standard
3425 Let's look at a keyboard definition file a little closer.
3426 It is a plain text file defining
3429 \begin_layout Itemize
3430 key-to-key or key-to-string translations
3433 \begin_layout Itemize
3437 \begin_layout Itemize
3438 dead keys exceptions
3441 \begin_layout Standard
3442 To define key-to-key or key-to-string translation, use this command:
3445 \begin_layout Quotation
3446 \begin_inset Flex Code
3449 \begin_layout Plain Layout
3458 \begin_inset Flex Code
3461 \begin_layout Plain Layout
3470 \begin_layout Standard
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
3481 is the key to be translated and
3482 \begin_inset Flex Code
3485 \begin_layout Plain Layout
3491 is the string to be inserted into the document.
3492 To define dead keys, use:
3495 \begin_layout Quotation
3496 \begin_inset Flex Code
3499 \begin_layout Plain Layout
3508 \begin_inset Flex Code
3511 \begin_layout Plain Layout
3520 \begin_layout Standard
3522 \begin_inset Flex Code
3525 \begin_layout Plain Layout
3531 is a keyboard key and
3532 \begin_inset Flex Code
3535 \begin_layout Plain Layout
3542 The following dead keys are supported (shortcut name is in parentheses):
3545 \begin_layout Quotation
3549 \begin_inset space \hfill{}
3555 \begin_layout Quotation
3557 \begin_inset space \hfill{}
3563 \begin_layout Quotation
3565 \begin_inset space \hfill{}
3571 \begin_layout Quotation
3573 \begin_inset space \hfill{}
3579 \begin_layout Quotation
3581 \begin_inset space \hfill{}
3587 \begin_layout Quotation
3589 \begin_inset space \hfill{}
3596 \begin_layout Plain Layout
3608 \begin_layout Quotation
3610 \begin_inset space \hfill{}
3616 \begin_layout Quotation
3618 \begin_inset space \hfill{}
3625 \begin_layout Plain Layout
3637 \begin_layout Quotation
3639 \begin_inset space \hfill{}
3645 \begin_layout Quotation
3647 \begin_inset space \hfill{}
3653 \begin_layout Quotation
3655 \begin_inset space \hfill{}
3662 \begin_layout Plain Layout
3674 \begin_layout Quotation
3676 \begin_inset space \hfill{}
3683 \begin_layout Plain Layout
3695 \begin_layout Quotation
3697 \begin_inset space \hfill{}
3703 \begin_layout Quotation
3704 hungarian umlaut (hug)
3705 \begin_inset space \hfill{}
3711 \begin_layout Quotation
3713 \begin_inset space \hfill{}
3719 \begin_layout Quotation
3721 \begin_inset space \hfill{}
3728 \begin_layout Plain Layout
3740 \begin_layout Standard
3741 Since in many international keyboards there are exceptions to what some
3742 dead keys should do, you can define them using
3745 \begin_layout Quotation
3746 \begin_inset Flex Code
3749 \begin_layout Plain Layout
3757 deadkey key outstring
3760 \begin_layout Standard
3761 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3765 \begin_layout Quotation
3766 \begin_inset Flex Code
3769 \begin_layout Plain Layout
3782 \begin_layout Standard
3783 to make it work correctly.
3784 Also, you have to define as exceptions dead keys over i and j, to remove
3785 the dot from them before inserting an accent mark.
3786 I will change this when the time comes, but so far I haven't had time.
3789 \begin_layout Standard
3790 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3793 \begin_inset Flex Code
3796 \begin_layout Plain Layout
3802 have different meaning.
3804 \begin_inset Flex Code
3807 \begin_layout Plain Layout
3813 marks comments, quotes start and end LaTeX-style commands.
3814 To enter quote, you'll need to use
3815 \begin_inset Flex Code
3818 \begin_layout Plain Layout
3827 \begin_inset Flex Code
3830 \begin_layout Plain Layout
3837 \begin_inset Flex Code
3840 \begin_layout Plain Layout
3851 \begin_layout Standard
3852 If you make a keyboard description file that works for your language, please
3853 mail it to me, so I can include it in the next keymap distribution.
3856 \begin_layout Standard
3857 More keywords will be supported in keymap configuration file in future,
3861 \begin_layout Itemize
3862 \begin_inset Flex Code
3865 \begin_layout Plain Layout
3876 \begin_inset space \hfill{}
3880 \begin_inset Flex Code
3883 \begin_layout Plain Layout
3892 \begin_layout Itemize
3893 \begin_inset Flex Code
3896 \begin_layout Plain Layout
3907 \begin_inset space \hfill{}
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3920 an external keymap translation program
3923 \begin_layout Standard
3924 Also, it should look into
3925 \begin_inset Flex Code
3928 \begin_layout Plain Layout
3934 file for defaults, too (for example, a
3935 \begin_inset Flex Code
3938 \begin_layout Plain Layout
3946 option to include default keyboard).
3954 \begin_layout Section
3955 International Keymap Stuff
3956 \begin_inset CommandInset label
3958 name "sec:International-Keymap-Stuff"
3965 \begin_layout Standard
3966 \begin_inset Note Note
3969 \begin_layout Plain Layout
3970 In doing the revisions on this document in March 2008, I did not look over
3971 this stuff, as I do not understand it.
3972 It would be good if someone else could do so.
3981 \begin_layout Standard
3982 The next two sections describe the
3983 \begin_inset Flex Code
3986 \begin_layout Plain Layout
3995 \begin_inset Flex Code
3998 \begin_layout Plain Layout
4006 file syntax in detail.
4007 These sections should help you design your own key map if the ones provided
4008 do not meet your needs.
4011 \begin_layout Subsection
4015 \begin_layout Standard
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4028 file maps keystrokes to characters or strings.
4029 As the name suggests, it sets a keyboard mapping.
4031 \begin_inset Flex Code
4034 \begin_layout Plain Layout
4045 \begin_inset Flex Code
4048 \begin_layout Plain Layout
4063 \begin_inset Flex Code
4066 \begin_layout Plain Layout
4079 \begin_inset Flex Code
4082 \begin_layout Plain Layout
4091 \begin_inset Flex Code
4094 \begin_layout Plain Layout
4102 are described in this section.
4105 \begin_layout Labeling
4106 \labelwidthstring 00.00.0000
4107 \begin_inset Flex Code
4110 \begin_layout Plain Layout
4118 Map a character to a string
4121 \begin_layout LyX-Code
4136 \begin_layout Standard
4169 the double-quote (")
4186 must be escaped with a preceding backslash (
4197 \begin_layout Standard
4199 \begin_inset Flex MenuItem
4202 \begin_layout Plain Layout
4210 statement to cause the symbol
4211 \begin_inset Flex MenuItem
4214 \begin_layout Plain Layout
4222 to be output for the keystroke
4223 \begin_inset Flex MenuItem
4226 \begin_layout Plain Layout
4237 \begin_layout LyX-Code
4243 \begin_layout Labeling
4244 \labelwidthstring 00.00.0000
4245 \begin_inset Flex Code
4248 \begin_layout Plain Layout
4256 Specify an accent character
4259 \begin_layout LyX-Code
4268 \begin_layout Standard
4269 This will make the cha
4307 This is the dead key
4311 \begin_layout Plain Layout
4318 refers to a key that does not produce a character by itself, but when followed
4319 with another key, produces the desired accent character.
4320 For example, a German characte
4322 r with an umlaut like
4332 can be produced in this manner.
4341 \begin_layout Standard
4354 and then another key not in
4371 followed by the other, not allowed key, as output.
4375 \begin_inset Flex MenuItem
4378 \begin_layout Plain Layout
4386 cancels a dead key, so if
4397 \begin_inset Flex MenuItem
4400 \begin_layout Plain Layout
4409 , the cursor will not go one position backwards but will instead cancel
4425 might have had on the next keystroke.
4429 \begin_layout Standard
4430 The following example specifies that the character ' is to be an acute accent,
4431 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4434 \begin_layout LyX-Code
4437 kmod ' acute aeiouAEIOU
4440 \begin_layout Labeling
4441 \labelwidthstring 00.00.0000
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 Specify an exception to the accent character
4454 \begin_layout LyX-Code
4463 \begin_layout Standard
4464 This defines an exce
4505 have been assigned a keystroke with a previous
4508 \begin_inset Flex Code
4511 \begin_layout Plain Layout
4535 must not belong in the
4582 If such a declaration does not exist in
4590 \begin_inset Flex Code
4593 \begin_layout Plain Layout
4627 \begin_inset Flex Code
4630 \begin_layout Plain Layout
4644 \begin_layout Standard
4645 The following command produces causes äi to be produced when you enter acute-i
4649 \begin_layout LyX-Code
4663 \begin_layout Labeling
4664 \labelwidthstring 00.00.0000
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4674 Combine two accent characters
4677 \begin_layout LyX-Code
4683 accent1 accent2 allowed
4686 \begin_layout Standard
4687 This one is getting pretty esoteric.
4688 It allows you to combine the effect
4744 \begin_inset Flex Code
4747 \begin_layout Plain Layout
4775 \begin_layout Standard
4776 Consider this example from the
4777 \begin_inset Flex Code
4780 \begin_layout Plain Layout
4791 \begin_layout LyX-Code
4794 kmod ; acute aeioyvhAEIOYVH
4798 kcomb acute umlaut iyIY
4801 \begin_layout Standard
4802 This allows you to press
4803 \begin_inset Flex MenuItem
4806 \begin_layout Plain Layout
4814 and get the effect of
4815 \begin_inset Flex Code
4818 \begin_layout Plain Layout
4837 in this case cancels the last dead key, so if you press
4838 \begin_inset Flex MenuItem
4841 \begin_layout Plain Layout
4850 \begin_inset Flex Code
4853 \begin_layout Plain Layout
4866 \begin_layout Subsection
4870 \begin_layout Standard
4872 \begin_inset Flex Code
4875 \begin_layout Plain Layout
4883 mapping is performed, a
4884 \begin_inset Flex Code
4887 \begin_layout Plain Layout
4897 file maps the strings that the symbols generate to characters in the current
4899 The LyX distribution currently includes at least the
4900 \begin_inset Flex Code
4903 \begin_layout Plain Layout
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4926 \begin_layout Standard
4928 \begin_inset Flex Code
4931 \begin_layout Plain Layout
4939 file is a sequence of declarations of the form
4942 \begin_layout LyX-Code
4955 \begin_layout Standard
4956 For example, in order to map
4957 \begin_inset Flex MenuItem
4960 \begin_layout Plain Layout
4970 to the corresponding character in the iso-8859-1 set (233), the following
4974 \begin_layout LyX-Code
4982 \begin_layout Standard
4984 \begin_inset Flex Code
4987 \begin_layout Plain Layout
4996 \begin_inset Flex Code
4999 \begin_layout Plain Layout
5017 the same character can apply to more than one string.
5019 \begin_inset Flex Code
5022 \begin_layout Plain Layout
5033 \begin_layout LyX-Code
5045 \begin_inset Newline newline
5061 \begin_layout Standard
5062 If LyX cannot find a mapping for the string produced by the keystroke or
5063 a deadkey sequence, it will check if it looks like an accented char and
5064 try to draw an accent over the character on screen.
5067 \begin_layout Subsection
5071 \begin_layout Standard
5072 There is a second way to add support for international characters through
5073 so-called dead-keys.
5074 A dead-key works in combination with a letter to produce an accented character.
5075 Here, we'll explain how to create a really simple dead-key to illustrate
5079 \begin_layout Standard
5080 Suppose you happen to need the circumflex character,
5081 \begin_inset Quotes eld
5085 \begin_inset Quotes erd
5090 \begin_inset Flex MenuItem
5093 \begin_layout Plain Layout
5100 \begin_inset space ~
5104 \begin_inset Flex MenuItem
5107 \begin_layout Plain Layout
5113 ] to the LyX command
5114 \begin_inset Flex Code
5117 \begin_layout Plain Layout
5124 \begin_inset Flex Code
5127 \begin_layout Plain Layout
5134 Now, whenever you type the
5135 \begin_inset Flex MenuItem
5138 \begin_layout Plain Layout
5144 -key followed by a letter, that letter will have a circumflex accent on
5146 For example, the sequence
5147 \begin_inset Quotes eld
5151 \begin_inset Flex MenuItem
5154 \begin_layout Plain Layout
5161 \begin_inset Quotes erd
5164 produces the letter:
5165 \begin_inset Quotes eld
5169 \begin_inset Quotes erd
5173 If you tried to type
5174 \begin_inset Quotes eld
5178 \begin_inset Flex MenuItem
5181 \begin_layout Plain Layout
5188 \begin_inset Quotes erd
5191 , however, LyX will complain with a beep, since a
5192 \begin_inset Quotes eld
5196 \begin_inset Flex MenuItem
5199 \begin_layout Plain Layout
5206 \begin_inset Quotes erd
5209 never takes a circumflex accent.
5211 \begin_inset Flex MenuItem
5214 \begin_layout Plain Layout
5220 after a dead-key produces the bare-accent.
5221 Please note this last point! If you bind a key to a dead-key, you'll need
5222 to rebind the character on that key to yet another key.
5224 \begin_inset Flex MenuItem
5227 \begin_layout Plain Layout
5233 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5236 \begin_layout Standard
5237 One common way to bind dead-keys is to use
5238 \begin_inset Flex MenuItem
5241 \begin_layout Plain Layout
5248 \begin_inset Flex MenuItem
5251 \begin_layout Plain Layout
5258 \begin_inset Flex MenuItem
5261 \begin_layout Plain Layout
5267 in combination with an accent, like
5268 \begin_inset Quotes eld
5272 \begin_inset Flex MenuItem
5275 \begin_layout Plain Layout
5282 \begin_inset Quotes erd
5286 \begin_inset Quotes eld
5290 \begin_inset Flex MenuItem
5293 \begin_layout Plain Layout
5300 \begin_inset Quotes erd
5304 \begin_inset Quotes eld
5308 \begin_inset Flex MenuItem
5311 \begin_layout Plain Layout
5318 \begin_inset Quotes erd
5322 Another way involves using
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5342 to set up the special
5343 \begin_inset Flex Code
5346 \begin_layout Plain Layout
5354 \begin_inset Flex Code
5357 \begin_layout Plain Layout
5363 acts in some ways just like
5364 \begin_inset Flex MenuItem
5367 \begin_layout Plain Layout
5373 and permits you to bind keys to accented characters.
5374 You can also turn keys into dead-keys by binding them to something like
5376 \begin_inset Flex Code
5379 \begin_layout Plain Layout
5385 and then binding this symbolic key to the corresponding LyX command.
5389 \begin_layout Plain Layout
5394 : This is exactly what I do in my
5395 \begin_inset Flex Code
5398 \begin_layout Plain Layout
5405 \begin_inset Flex Code
5408 \begin_layout Plain Layout
5416 \begin_inset Flex MenuItem
5419 \begin_layout Plain Layout
5421 \begin_inset space ~
5430 \begin_inset Flex Code
5433 \begin_layout Plain Layout
5439 and a bunch of these
5440 \begin_inset Quotes eld
5444 \begin_inset Flex Code
5447 \begin_layout Plain Layout
5454 \begin_inset Quotes erd
5457 symbolic keys bound such things as
5458 \begin_inset Flex MenuItem
5461 \begin_layout Plain Layout
5463 \begin_inset space ~
5472 \begin_inset Flex MenuItem
5475 \begin_layout Plain Layout
5477 \begin_inset space ~
5486 This is how I produce my accented characters.
5491 You can make just about anything into the
5492 \begin_inset Flex Code
5495 \begin_layout Plain Layout
5502 \begin_inset Flex MenuItem
5505 \begin_layout Plain Layout
5511 keys, a spare function key, etc.
5512 As for the LyX commands that produce accents, check the entry for
5513 \begin_inset Flex Code
5516 \begin_layout Plain Layout
5527 You'll find the complete list there.
5530 \begin_layout Subsection
5531 Saving your Language Configuration
5534 \begin_layout Standard
5535 You can edit your preferences so that your desired language environment
5536 is automatically configured when LyX starts up, via the
5537 \begin_inset Flex MenuItem
5540 \begin_layout Plain Layout
5541 Edit\SpecialChar \menuseparator
5550 \begin_layout Chapter
5551 Installing New Document Classes, Layouts, and Templates
5552 \begin_inset CommandInset label
5554 name "cha:Installing-New-Document"
5559 \begin_inset Argument 1
5562 \begin_layout Plain Layout
5563 Installing New Document Classes
5571 \begin_layout Standard
5572 In this chapter, we describe the procedures for creating and installing
5573 new LyX layout and template files, as well as offer a refresher on correctly
5574 installing new LaTeX document classes.
5578 \begin_layout Standard
5579 First, let us a say a few words about how one ought to think about the relation
5580 between LyX and LaTeX.
5581 The thing to understand is that, in a certain sense, LyX doesn't know anything
5583 Indeed, from LyX's point of view, LaTeX is just one of several
5584 \begin_inset Quotes eld
5588 \begin_inset Quotes erd
5591 in which it is capable of producing output.
5592 Other such formats are DocBook, plaintext, and XHTML.
5593 LaTeX is, of course, a particularly important format, but very little of
5594 the information LyX has about LaTeX is actually contained in the program
5599 \begin_layout Plain Layout
5600 Some commands are sufficiently complex that they are
5601 \begin_inset Quotes eld
5605 \begin_inset Quotes erd
5609 But the developers generally regard this as a Bad Thing.
5614 Rather, that information, even for the standard classes like
5615 \begin_inset Flex Code
5618 \begin_layout Plain Layout
5624 , is contained in `layout files'.
5625 Similarly, LyX itself does not know much about DocBook or XHTML.
5626 What it knows is contained in layout files.
5629 \begin_layout Standard
5630 You can think of the layout file for a given document class as a translation
5631 manual between LyX constructs---paragraphs with their corresponding styles,
5632 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5634 Almost everything LyX knows about
5635 \begin_inset Flex Code
5638 \begin_layout Plain Layout
5644 , for example, is contained in the file
5645 \begin_inset Flex Code
5648 \begin_layout Plain Layout
5654 and in various other files it includes.
5655 For this reason, anyone intending to write layout files should plan to
5656 study the existing files.
5657 A good place to start is with
5658 \begin_inset Flex Code
5661 \begin_layout Plain Layout
5667 , which is included in
5668 \begin_inset Flex Code
5671 \begin_layout Plain Layout
5678 \begin_inset Flex Code
5681 \begin_layout Plain Layout
5687 , and many of the other layout files for document classes.
5688 This file is where sections and the like are defined:
5689 \begin_inset Flex Code
5692 \begin_layout Plain Layout
5698 tells LyX how paragraphs that are marked with the Section, Subsection,
5699 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5702 \begin_inset Flex Code
5705 \begin_layout Plain Layout
5711 file basically just includes several of these
5712 \begin_inset Flex Code
5715 \begin_layout Plain Layout
5724 \begin_layout Standard
5725 Defining the LyX--LaTeX correspondence is not the only thing layout files
5727 Their other job is to define how the LyX constructs themselves will appear
5729 The fact that layout files have these two jobs is often a source of confusion,
5730 because they are completely separate.
5731 Telling LyX how to translate a certain paragraph style into LaTeX does
5732 not tell LyX how to display it; conversely, telling LyX how to display
5733 a certain paragraph style does not tell LyX how to translate it into LaTeX
5734 (let alone tell LaTeX how to display it).
5735 So, in general, when you define a new LyX construct, you must always do
5736 two quite separate things: (i)
5737 \begin_inset space ~
5740 tell LyX how to translate it into LaTeX and (ii)
5741 \begin_inset space ~
5744 tell LyX how to display it.
5747 \begin_layout Standard
5748 Much the same is true, of course, as regards LyX's other backend formats,
5749 though XHTML is in some ways different, because in that case LyX
5753 able, to some extent, to use information about how it should display a
5754 paragraph on the screen to output information (in the form of CSS) about
5755 how the paragraph should be displayed in a browser.
5756 Even in this case, however, the distinction between what LyX does internally
5757 and how things are rendered externally remains in force, and the two can
5758 be controlled separately.
5760 \begin_inset CommandInset ref
5762 reference "sec:Tags-for-XHTML"
5769 \begin_layout Section
5770 Installing new LaTeX files
5773 \begin_layout Standard
5774 Some installations may not include a LaTeX package or class file that you
5775 would like to use within LyX.
5776 For example, you might need FoilTeX, a package for preparing slides for
5777 overhead projectors.
5778 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5779 a user interface for installing such packages.
5780 For example, with MiKTeX, you start the program
5781 \begin_inset Quotes eld
5785 \begin_inset space ~
5789 \begin_inset Quotes erd
5792 to get a list of available packages.
5793 To install one of them, right click on it or use the corresponding toolbar
5797 \begin_layout Standard
5798 If your LaTeX distribution does not provide such a `package manager', or
5799 if the package is not available from your distribution, then follow these
5800 steps to install it manually:
5803 \begin_layout Enumerate
5804 Get the package from
5805 \begin_inset CommandInset href
5808 target "http://www.ctan.org/"
5815 \begin_layout Enumerate
5816 If the package contains a file with the ending
5817 \begin_inset Quotes eld
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5831 \begin_inset Quotes erd
5834 (is the case for FoilTeX) then open a console, change to the folder of
5835 this file and execute the command
5836 \begin_inset Flex Code
5839 \begin_layout Plain Layout
5846 You have now unpacked the package and have all files to install it.
5847 Most LaTeX-packages are not packed and you can skip this step.
5850 \begin_layout Enumerate
5851 Now you need to decide if the package should be available for all users
5856 \begin_layout Enumerate
5857 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5858 for all users on your system, then install it in your `local' TeX tree,
5859 otherwise install it in your own `user' TeX tree.
5860 Where these trees should be created, if they do not already exist, depends
5862 To find this out, look in the file
5863 \begin_inset Flex Code
5866 \begin_layout Plain Layout
5876 \begin_layout Plain Layout
5877 This is usually in the directory
5878 \begin_inset Flex Code
5881 \begin_layout Plain Layout
5887 , though you can execute the command
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 The location of the `local' TeX tree is defined by the
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5912 variable; this is usually somewhere like
5913 \begin_inset Flex Code
5916 \begin_layout Plain Layout
5917 /usr/local/share/texmf
5923 The location of the `user' TeX tree is defined by
5924 \begin_inset Flex Code
5927 \begin_layout Plain Layout
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5944 (If these variables are not predefined, you have to define them.) You'll
5945 probably need root permissions to create or modify the `local' tree, but
5946 not for your `user' tree.
5947 \begin_inset Newline newline
5950 In general, it is recommended to install in the user tree because your user
5951 will not be modified or even overwritten when you upgrade your system.
5952 It will typically also be backed up together with everything else when
5953 you backup your home directory (which, of course, you do on a regular basis).
5956 \begin_layout Enumerate
5957 On Windows, if you want the new package to be available for all users on
5958 your system, change to the folder where LaTeX is installed and then change
5960 \begin_inset Flex Code
5963 \begin_layout Plain Layout
5974 (For MiKTeX, this would be by default the folder
5975 \begin_inset Flex Code
5978 \begin_layout Plain Layout
5996 \begin_layout Plain Layout
5997 Note that this will be the correct path only on English installations.
5998 On a German one, it would be
5999 \begin_inset Flex Code
6002 \begin_layout Plain Layout
6016 , and similarly for other languages.
6021 Create there a new folder
6022 \begin_inset Flex Code
6025 \begin_layout Plain Layout
6031 and copy all files of the package into it.
6033 \begin_inset Newline newline
6036 If the package should only available for you or you don't have admin permissions
6037 , do the same, but in the local LaTeX folder.
6039 \begin_inset space \thinspace{}
6043 \begin_inset space ~
6046 2.8 under Windows XP, this would be the folder:
6047 \begin_inset Newline newline
6053 \begin_inset Flex Code
6056 \begin_layout Plain Layout
6059 Documents and Settings
6071 \begin_inset Newline newline
6077 \begin_inset Phantom HPhantom
6080 \begin_layout Plain Layout
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6107 \begin_inset Newline newline
6110 On Vista, it would be:
6111 \begin_inset Newline newline
6115 \begin_inset Flex Code
6118 \begin_layout Plain Layout
6144 \begin_layout Enumerate
6145 Now one only need to tell LaTeX that there are new files.
6146 This depends on the used LaTeX-Distribution:
6150 \begin_layout Enumerate
6151 For TeXLive execute the command
6152 \begin_inset Flex Code
6155 \begin_layout Plain Layout
6162 If you installed the package for all users, then you will probably need
6163 to have root permissions for that.
6166 \begin_layout Enumerate
6167 For MiKTeX, if you have installed the package for all users, start the program
6169 \begin_inset Quotes eld
6173 \begin_inset space ~
6177 \begin_inset Quotes erd
6180 and press the button marked
6181 \begin_inset Quotes eld
6185 \begin_inset Quotes erd
6189 Otherwise start the program
6190 \begin_inset Quotes eld
6194 \begin_inset Quotes erd
6201 \begin_layout Enumerate
6202 Finally, you need to tell LyX that there are new packages available.
6203 So, in LyX, use the menu
6204 \begin_inset Flex MenuItem
6207 \begin_layout Plain Layout
6210 \SpecialChar \menuseparator
6216 and then restart LyX.
6219 \begin_layout Standard
6220 Now the package is installed.
6221 In our example, the document class
6222 \begin_inset Flex Code
6225 \begin_layout Plain Layout
6227 \begin_inset space ~
6234 \begin_layout Plain Layout
6246 will now be available under
6247 \begin_inset Flex MenuItem
6250 \begin_layout Plain Layout
6251 Document\SpecialChar \menuseparator
6252 Settings\SpecialChar \menuseparator
6262 \begin_layout Standard
6263 If you would like to use a LaTeX document class that is not even listed
6265 \begin_inset Flex MenuItem
6268 \begin_layout Plain Layout
6269 Document\SpecialChar \menuseparator
6270 Settings\SpecialChar \menuseparator
6276 , then you need to create a `layout' file for it.
6277 That is the topic of the next section.
6280 \begin_layout Section
6281 Types of layout files
6284 \begin_layout Standard
6285 This section describes the various sorts of LyX files that contain layout
6287 These files describe various paragraph and character styles, determining
6288 how LyX should display them and how they should be translated into LaTeX,
6289 DocBook, XHTML, or whatever output format is being used.
6293 \begin_layout Standard
6294 We shall try to provide a thorough description of the process of writing
6296 However, there are so many different types of documents supported even
6297 by just LaTeX that we can't hope to cover every different possibility or
6298 problem you might encounter.
6299 The LyX users' list is frequented by people with lots of experience with
6300 layout design who are willing to share what they've learned, so please
6301 feel free to ask questions there.
6304 \begin_layout Standard
6305 As you prepare to write a new layout, it is extremely helpful to look at
6306 the layouts distributed with LyX.
6307 If you write a LyX layout for a LaTeX document class that might also be
6308 used by others, or write a module that might be useful to others, then
6309 you should consider posting your layout to the
6310 \begin_inset CommandInset href
6312 name "layout section on the LyX wiki"
6313 target "http://wiki.lyx.org/Layouts/Layouts"
6317 or even to the LyX developers' list, so that it might be included in LyX
6322 \begin_layout Plain Layout
6323 Note that LyX is licensed under the General Public License, so any material
6324 that is contributed to LyX must be similarly licensed.
6332 \begin_layout Subsection
6334 \begin_inset CommandInset label
6336 name "sub:Layout-modules"
6343 \begin_layout Standard
6344 We have spoken to this point about `layout files'.
6345 But there are different sorts of files that contain layout information.
6346 Layout files, strictly so called, have the
6347 \begin_inset Flex Code
6350 \begin_layout Plain Layout
6356 extension and provide LyX with information about document classes.
6357 Since LyX 1.6 layout information can also be contained in layout
6362 \begin_inset Flex Code
6365 \begin_layout Plain Layout
6372 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6373 some modules—such as the
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6383 module—specifically provide support for one package.
6384 In a sense, layout modules are similar to included
6388 \begin_layout Plain Layout
6389 These can have any extension, but by convention have the
6390 \begin_inset Flex Code
6393 \begin_layout Plain Layout
6405 \begin_inset Flex Code
6408 \begin_layout Plain Layout
6414 —in that modules are not specific to a given document class but may be used
6415 with many different classes.
6416 The difference is that using an included file with
6417 \begin_inset Flex Code
6420 \begin_layout Plain Layout
6426 requires editing that file.
6427 Modules, by contrast, are selected in the
6428 \begin_inset Flex MenuItem
6431 \begin_layout Plain Layout
6432 Document\SpecialChar \menuseparator
6441 \begin_layout Standard
6442 Building modules is the easiest way to get started with layout editing,
6443 since it can be as simple as adding a single new paragraph style or flex
6445 But modules may, in principle, contain anything a layout file can contain.
6448 \begin_layout Standard
6449 After creating a new module and copying it to the
6450 \begin_inset Flex Code
6453 \begin_layout Plain Layout
6459 folder, you will need to reconfigure and then restart LyX for the module
6460 to appear in the menu.
6461 However, changes you make to the module will be seen immediately, if you
6463 \begin_inset Flex MenuItem
6466 \begin_layout Plain Layout
6467 Document\SpecialChar \menuseparator
6473 , highlight something, and then hit
6474 \begin_inset Quotes eld
6478 \begin_inset Quotes erd
6484 It is strongly recommended that you save your work before doing this
6489 it is strongly recommended that you not attempt to edit modules while simultaneo
6490 usly working on actual documents
6493 Though of course the developers strive to keep LyX stable in such situations,
6494 syntax errors and the like in your module file could cause strange behavior.
6497 \begin_layout Subsubsection
6501 \begin_layout Standard
6502 Modules are to LyX as packages are to LaTeX.
6503 Sometimes, however, you find yourself wanting a specific inset or character
6504 style just for one document and writing a module that will also be available
6505 to other documents makes little sense.
6506 What you need is LyX's
6507 \begin_inset Quotes eld
6511 \begin_inset Quotes erd
6517 \begin_layout Standard
6518 You will find it under
6520 Document\SpecialChar \menuseparator
6521 Settings\SpecialChar \menuseparator
6525 The large text box allows you to enter anything that you might enter in
6526 a layout file or module.
6527 You can think of a document's local layout, in fact, as a module that belongs
6529 So, in particular, you must enter a
6530 \begin_inset Flex Code
6533 \begin_layout Plain Layout
6540 Any format is acceptable, but one would normally use the format current
6542 (In LyX 2.1, the current layout format is 35
6543 \change_inserted 2090807402 1370141354
6546 .) You should be aware that local layout is not supported by versions of
6547 LyX prior to 1.6, so you should not use it if you want to be able to export
6548 your document to LyX 1.5 or earlier (without, that is, losing the local
6549 layout information).
6550 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6551 though there is no UI for it---then you should use format 11 and, of course,
6552 use only layout constructs that were available in LyX 1.6.
6555 \begin_layout Standard
6556 When you have entered something in the
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6566 pane, LyX will enable the
6567 \begin_inset Quotes eld
6571 \begin_inset Quotes erd
6574 button at the bottom.
6575 Clicking this button will cause LyX to determine whether what you have
6576 entered is valid layout information for the chosen format.
6577 LyX will report the result but, unfortunately, will not tell you what errors
6578 there might have been.
6579 These will be written to the terminal, however, if LyX is started from
6581 You will not be permitted to save your local layout until you have entered
6585 \begin_layout Standard
6586 The warnings at the end of the previous section apply here, too.
6587 Do not play with local layout while you are actually working, especially
6588 if you have not saved your document.
6589 That said, using local layout with a test document can be a very convenient
6590 way to try out layout ideas, or even to start developing a module.
6593 \begin_layout Subsection
6595 \begin_inset Flex MenuItem
6598 \begin_layout Plain Layout
6607 \begin_layout Standard
6608 There are two situations you are likely to encounter when wanting to support
6609 a new LaTeX document class, involving style (
6610 \begin_inset Flex Code
6613 \begin_layout Plain Layout
6619 ) files and LaTeX2e class (
6620 \begin_inset Flex Code
6623 \begin_layout Plain Layout
6630 Supporting a style file is usually fairly easy.
6631 Supporting a new class file is a bit harder.
6632 We'll discuss the former in this section and the latter in the next.
6633 Similar remarks apply, of course, if you want to support a new DocBook
6637 \begin_layout Standard
6638 The easier case is the one in which your new document class is provided
6639 as a style file that is to be used in conjunction with an already supported
6641 For the sake of the example, we'll assume that the style file is called
6643 \begin_inset Flex MenuItem
6646 \begin_layout Plain Layout
6652 and that it is meant to be used with
6653 \begin_inset Flex MenuItem
6656 \begin_layout Plain Layout
6662 , which is a standard class.
6666 \begin_layout Standard
6667 Start by copying the existing class's layout file into your local directory:
6671 \begin_layout Plain Layout
6672 Of course, which directory is your local directory will vary by platform,
6673 and LyX allows you to specify your local directory on startup, too, using
6675 \begin_inset Flex Code
6678 \begin_layout Plain Layout
6692 \begin_layout LyX-Code
6693 cp report.layout ~/.lyx/layouts/myclass.layout
6696 \begin_layout Standard
6698 \begin_inset Flex Code
6701 \begin_layout Plain Layout
6707 and change the line:
6710 \begin_layout LyX-Code
6713 DeclareLaTeXClass{report}
6716 \begin_layout Standard
6720 \begin_layout LyX-Code
6723 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6726 \begin_layout Standard
6730 \begin_layout LyX-Code
6732 \begin_inset Newline newline
6738 \begin_inset Newline newline
6744 \begin_layout Standard
6745 near the top of the file.
6748 \begin_layout Standard
6749 Start LyX and select
6750 \begin_inset Flex MenuItem
6753 \begin_layout Plain Layout
6754 Tools\SpecialChar \menuseparator
6761 Then restart LyX and try creating a new document.
6763 \begin_inset Flex MenuItem
6766 \begin_layout Plain Layout
6772 " as a document class option in the
6773 \begin_inset Flex MenuItem
6776 \begin_layout Plain Layout
6777 Document\SpecialChar \menuseparator
6784 It is likely that some of the sectioning commands and such in your new
6785 class will work differently from how they worked in the base class—
6786 \begin_inset Flex Code
6789 \begin_layout Plain Layout
6795 in this example—so you can fiddle around with the settings for the different
6796 sections if you wish.
6797 The layout information for sections is contained in
6798 \begin_inset Flex Code
6801 \begin_layout Plain Layout
6807 , but you do not need to copy and change this file.
6808 Instead, you can simply add your changes to your layout file, after the
6810 \begin_inset Flex Code
6813 \begin_layout Plain Layout
6819 , which itself includes
6820 \begin_inset Flex Code
6823 \begin_layout Plain Layout
6830 For example, you might add these lines:
6833 \begin_layout LyX-Code
6837 \begin_layout LyX-Code
6841 \begin_layout LyX-Code
6845 \begin_layout LyX-Code
6849 \begin_layout LyX-Code
6853 \begin_layout Standard
6854 to change the font for chapter headings to sans-serif.
6855 This will override (or, in this case, add to) the existing declaration
6856 for the Chapter style.
6860 \begin_layout Standard
6861 Your new package may also provide commands or environments not present in
6863 In this case, you will want to add these to the layout file.
6865 \begin_inset CommandInset ref
6867 reference "sec:TextClass"
6871 for information on how to do so.
6874 \begin_layout Standard
6876 \begin_inset Flex MenuItem
6879 \begin_layout Plain Layout
6885 can be used with several different document classes, and even if it cannot,
6886 you might find it easiest just to write a module that you can load with
6888 The simplest possible such module would be:
6891 \begin_layout LyX-Code
6894 DeclareLyXModule{My Package}
6897 \begin_layout LyX-Code
6901 \begin_layout LyX-Code
6902 #Support for mypkg.sty.
6905 \begin_layout LyX-Code
6907 \begin_inset Newline newline
6913 \begin_layout LyX-Code
6915 \begin_inset Newline newline
6921 \begin_layout LyX-Code
6923 \begin_inset Newline newline
6929 \begin_inset Newline newline
6935 \begin_layout Standard
6936 A more complex module might modify the behavior of some existing constructs
6937 or define some new ones.
6939 \begin_inset CommandInset ref
6941 reference "sec:TextClass"
6948 \begin_layout Subsection
6950 \begin_inset Flex MenuItem
6953 \begin_layout Plain Layout
6962 \begin_layout Standard
6963 There are two possibilities here.
6964 One is that the class file is itself based upon an existing document class.
6965 For example, many thesis classes are based upon
6966 \begin_inset Flex MenuItem
6969 \begin_layout Plain Layout
6976 To see whether yours is, look for a line like
6979 \begin_layout LyX-Code
6985 \begin_layout Standard
6987 If so, then you may proceed largely as in the previous section, though
6989 \begin_inset Flex Code
6992 \begin_layout Plain Layout
6998 line will be different.
6999 If your new class is
7000 \begin_inset Flex Code
7003 \begin_layout Plain Layout
7009 and it is based upon
7010 \begin_inset Flex Code
7013 \begin_layout Plain Layout
7019 , then the line should read:
7023 \begin_layout Plain Layout
7024 And it will be easiest if you save the file to
7025 \begin_inset Flex Code
7028 \begin_layout Plain Layout
7034 : LyX assumes that the document class has the same name as the layout file.
7043 \begin_layout LyX-Code
7046 DeclareLaTeXClass[thesis,book]{thesis}
7049 \begin_layout Standard
7050 If, on the other hand, the new class is not based upon an existing class,
7051 you will probably have to
7052 \begin_inset Quotes eld
7056 \begin_inset Quotes erd
7060 We strongly suggest copying an existing layout file which uses a similar
7061 LaTeX class and then modifying it, if you can do so.
7062 At least use an existing file as a starting point so you can find out what
7063 items you need to worry about.
7064 Again, the specifics are covered below.
7067 \begin_layout Subsection
7069 \begin_inset CommandInset label
7071 name "sub:Creating-Templates"
7078 \begin_layout Standard
7079 Once you have written a layout file for a new document class, you might
7080 want to consider writing a
7085 A template acts as a kind of tutorial for your layout, showing how it might
7086 be used, though containing dummy content.
7087 You can of course look at the various templates included with LyX for ideas.
7090 \begin_layout Standard
7091 Templates are created just like usual documents: using LyX.
7092 The only difference is that usual documents contain all possible settings,
7093 including the font scheme and the paper size.
7094 Usually a user doesn't want a template to overwrite his preferred settings
7095 for such parameters.
7096 For that reason, the designer of a template should remove the corresponding
7098 \begin_inset Flex Code
7101 \begin_layout Plain Layout
7110 \begin_inset Flex Code
7113 \begin_layout Plain Layout
7121 from the template LyX file.
7122 This can be done with any simple text-editor, for example
7123 \begin_inset Flex Code
7126 \begin_layout Plain Layout
7133 \begin_inset Flex Code
7136 \begin_layout Plain Layout
7145 \begin_layout Standard
7146 Put the edited template files you create in
7147 \begin_inset Flex Code
7150 \begin_layout Plain Layout
7156 , copy the ones you use from the global template directory in
7157 \begin_inset Flex Code
7160 \begin_layout Plain Layout
7166 to the same place, and redefine the template path in the
7167 \begin_inset Flex MenuItem
7170 \begin_layout Plain Layout
7171 Tools\SpecialChar \menuseparator
7172 Preferences\SpecialChar \menuseparator
7181 \begin_layout Standard
7182 Note, by the way, that there is a template which has a particular meaning:
7184 \begin_inset Flex Code
7187 \begin_layout Plain Layout
7194 This template is loaded every time you create a new document with
7195 \begin_inset Flex MenuItem
7198 \begin_layout Plain Layout
7199 File\SpecialChar \menuseparator
7205 in order to provide useful defaults.
7206 To create this template from inside LyX, all you have to do is to open
7207 a document with the correct settings, and use the
7208 \begin_inset Flex MenuItem
7211 \begin_layout Plain Layout
7212 Save as Document Defaults
7220 \begin_layout Subsection
7221 Upgrading old layout files
7224 \begin_layout Standard
7225 The format of layout files changes with each LyX release, so old layout
7226 files need to be converted to the new format.
7227 If LyX reads a layout file in an older format, it automatically calls the
7229 \begin_inset Flex Code
7232 \begin_layout Plain Layout
7238 to convert it to a temporary file in current format.
7239 The original file is left untouched.
7240 If you use the layout file often, then, you may want to convert it permanently,
7241 so that LyX does not have to do so itself every time.
7242 To do this, you can call the converter manually:
7245 \begin_layout Enumerate
7247 \begin_inset Flex Code
7250 \begin_layout Plain Layout
7257 \begin_inset Flex Code
7260 \begin_layout Plain Layout
7269 \begin_layout Enumerate
7271 \begin_inset Newline newline
7275 \begin_inset Flex Code
7278 \begin_layout Plain Layout
7279 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7285 \begin_inset Newline newline
7289 \begin_inset Flex Code
7292 \begin_layout Plain Layout
7298 is the name of your LyX system directory.
7301 \begin_layout Standard
7302 Note that manual conversion does not affect included files, so these will
7303 have to be converted separately.
7306 \begin_layout Section
7307 \begin_inset CommandInset label
7309 name "sec:TextClass"
7313 The layout file format
7316 \begin_layout Standard
7317 The following sections describe how layout files are structured and written.
7318 Our advice is to go slowly, save and test often.
7319 It is really not that hard, except that the multitude of options can become
7320 overwhelming, especially if you try to check out too many at once.
7321 It becomes easier if you use existing layouts of LyX as examples/reference
7322 or if you modify an existing layout to your needs.
7325 \begin_layout Standard
7326 Note that all the tags used in layout files are case-insensitive.
7328 \begin_inset Flex Code
7331 \begin_layout Plain Layout
7338 \begin_inset Flex Code
7341 \begin_layout Plain Layout
7348 \begin_inset Flex Code
7351 \begin_layout Plain Layout
7357 are really the same tag.
7358 The possible arguments are printed in brackets after the tag's name.
7359 The default argument is typeset
7360 \begin_inset Flex Code
7363 \begin_layout Plain Layout
7372 If the argument has a data type like
7373 \begin_inset Quotes eld
7377 \begin_inset Quotes erd
7381 \begin_inset Quotes eld
7385 \begin_inset Quotes erd
7388 , the default is shown like this:
7389 \begin_inset Flex Code
7392 \begin_layout Plain Layout
7403 \begin_layout Subsection
7404 The document class declaration and classification
7407 \begin_layout Standard
7408 Lines in a layout file which begin with
7409 \begin_inset Flex Code
7412 \begin_layout Plain Layout
7419 There is one exception to this rule.
7421 \begin_inset Flex Code
7424 \begin_layout Plain Layout
7430 files should begin with lines like:
7433 \begin_layout LyX-Code
7436 #% Do not delete the line below; configure depends on this
7439 \begin_layout LyX-Code
7450 \begin_layout Plain Layout
7459 eXClass{Article (Standard Class)}
7462 \begin_layout LyX-Code
7467 DeclareCategory{Articles}
7470 \begin_layout Standard
7471 The second and third lines are used when you (re)configure LyX.
7472 The layout file is read by the LaTeX script
7473 \begin_inset Flex Code
7476 \begin_layout Plain Layout
7482 , in a special mode where
7483 \begin_inset Flex Code
7486 \begin_layout Plain Layout
7493 The first line is just a LaTeX comment, the second one contains the mandatory
7494 declaration of the text class and the third line contains the optional
7495 classification of the class.
7496 If these lines appear in a file named
7497 \begin_inset Flex Code
7500 \begin_layout Plain Layout
7506 , then they define a text class of name
7507 \begin_inset Flex Code
7510 \begin_layout Plain Layout
7516 (the name of the layout file) which uses the LaTeX document class
7517 \begin_inset Flex Code
7520 \begin_layout Plain Layout
7526 (the default is to use the same name as the layout).
7528 \begin_inset Quotes eld
7531 Article (Standard Class)
7532 \begin_inset Quotes erd
7535 that appears above is used as a description of the text class in the
7536 \begin_inset Flex MenuItem
7539 \begin_layout Plain Layout
7540 Document\SpecialChar \menuseparator
7548 \begin_inset Quotes eld
7552 \begin_inset Quotes erd
7555 in the example) is also used in the
7556 \begin_inset Flex MenuItem
7559 \begin_layout Plain Layout
7560 Document\SpecialChar \menuseparator
7566 dialog: the text classes are grouped by these categories (which are usually
7567 genres, so typical categories are
7568 \begin_inset Quotes eld
7572 \begin_inset Quotes erd
7576 \begin_inset Quotes eld
7580 \begin_inset Quotes erd
7584 \begin_inset Quotes eld
7588 \begin_inset Quotes erd
7592 \begin_inset Quotes eld
7596 \begin_inset Quotes erd
7600 \begin_inset Quotes eld
7604 \begin_inset Quotes erd
7608 \begin_inset Quotes eld
7612 \begin_inset Quotes erd
7616 If no category has been declared, the class will be put in the
7617 \begin_inset Quotes eld
7621 \begin_inset Quotes erd
7627 \begin_layout Standard
7628 Let's assume that you wrote your own text class that uses the
7629 \begin_inset Flex Code
7632 \begin_layout Plain Layout
7638 document class, but where you changed the appearance of the section headings.
7639 If you put it in a file
7640 \begin_inset Flex Code
7643 \begin_layout Plain Layout
7649 , the header of this file should be:
7652 \begin_layout LyX-Code
7655 #% Do not delete the line below; configure depends on this
7658 \begin_layout LyX-Code
7669 \begin_layout Plain Layout
7678 eXClass[article]{Article (with My Own Headings)}
7681 \begin_layout LyX-Code
7686 DeclareCategory{Articles}
7689 \begin_layout Standard
7690 This declares a text class
7691 \begin_inset Flex Code
7694 \begin_layout Plain Layout
7700 , associated with the LaTeX document class
7701 \begin_inset Flex Code
7704 \begin_layout Plain Layout
7711 \begin_inset Quotes eld
7714 Article (with My Own Headings)
7715 \begin_inset Quotes erd
7719 If your text class depends on several packages, you can declare it as:
7722 \begin_layout LyX-Code
7725 #% Do not delete the line below; configure depends on this
7728 \begin_layout LyX-Code
7739 \begin_layout Plain Layout
7748 eXClass[article,foo.sty]{Article (with My Own Headings)}
7751 \begin_layout LyX-Code
7756 DeclareCategory{Articles}
7759 \begin_layout Standard
7760 This indicates that your text class uses the
7761 \begin_inset Flex Code
7764 \begin_layout Plain Layout
7771 Finally, it is also possible to declare classes for DocBook code.
7772 Typical declarations will look like:
7775 \begin_layout LyX-Code
7778 #% Do not delete the line below; configure depends on this
7781 \begin_layout LyX-Code
7786 DeclareDocBookClass[article]{SGML (DocBook Article)}
7789 \begin_layout LyX-Code
7794 DeclareCategory{Articles (DocBook)}
7797 \begin_layout Standard
7798 Note that these declarations can also be given an optional parameter declaring
7799 the name of the document class (but not a list).
7802 \begin_layout Standard
7803 So, to be as explicit as possible, the form of the layout declaration is:
7806 \begin_layout LyX-Code
7817 \begin_layout Plain Layout
7826 eXClass[class,package.sty]{layout description}
7829 \begin_layout LyX-Code
7834 DeclareCategory{category}
7837 \begin_layout Standard
7838 The class need only be specified if the name of the LaTeX class file and
7839 the name of the layout file are different or if there are packages to load.
7840 If the name of the class file is not specified, then LyX will simply assume
7841 that it is the same as the name of the layout file.
7844 \begin_layout Standard
7845 When the text class has been modified to your taste, all you have to do
7846 is to copy it either to
7847 \begin_inset Flex Code
7850 \begin_layout Plain Layout
7857 \begin_inset Flex Code
7860 \begin_layout Plain Layout
7867 \begin_inset Flex MenuItem
7870 \begin_layout Plain Layout
7871 Tools\SpecialChar \menuseparator
7877 , exit LyX and restart.
7878 Then your new text class should be available along with the others.
7881 \begin_layout Standard
7882 Once the layout file is installed, you can edit it and see your changes
7883 without having to reconfigure or to restart LyX.
7888 \begin_layout Plain Layout
7889 In versions of LyX prior to 1.6, this was not true.
7890 As a result, editing layout files was very time consuming, since you had
7891 constantly to restart LyX to see changes.
7896 You can force a reload of the current layout by using the LyX function
7898 \begin_inset Flex MenuItem
7901 \begin_layout Plain Layout
7908 There is no default binding for this function—though, of course, you can
7909 bind it to a key yourself.
7910 But you will normally use this function simply by entering it in the mini-buffe
7915 \begin_layout Standard
7921 \begin_inset Flex MenuItem
7924 \begin_layout Plain Layout
7930 is very much an `advanced feature'.
7935 recommended that you save your work before using this function.
7940 recommended that you not attempt to edit layout information while simultaneousl
7941 y working on a document that you care about.
7942 Use a test document.
7943 Syntax errors and the like in your layout file could cause peculiar behavior.
7944 In particular, such errors could cause LyX to regard the current layout
7945 as invalid and to attempt to switch to some other layout.
7949 \begin_layout Plain Layout
7950 Really bad syntax errors may even caused LyX to exit.
7951 This is because certain sorts of errors may make LyX unable to read
7961 The LyX team strives to keep LyX stable in such situations, but safe is
7966 \begin_layout Plain Layout
7967 While we're giving advice: make regular backups.
7968 And be nice to your mother.
7976 \begin_layout Subsection
7977 The Module declaration
7980 \begin_layout Standard
7981 A module must begin with a line like the following:
7984 \begin_layout LyX-Code
7991 \begin_layout Plain Layout
7998 yXModule[endnotes.sty]{Endnotes}
8001 \begin_layout Standard
8002 The mandatory argument, in curly brackets, is the name of the module, as
8004 \begin_inset Flex MenuItem
8007 \begin_layout Plain Layout
8008 Document\SpecialChar \menuseparator
8009 Settings\SpecialChar \menuseparator
8016 The argument in square brackets is optional: It declares any LaTeX packages
8017 on which the module depends.
8018 It is also possible to use the form
8019 \begin_inset Flex MenuItem
8022 \begin_layout Plain Layout
8028 as an optional argument, which declares that the module can only be used
8029 when there exists a conversion chain between the formats `
8030 \begin_inset Flex Code
8033 \begin_layout Plain Layout
8040 \begin_inset Flex Code
8043 \begin_layout Plain Layout
8052 \begin_layout Standard
8053 The module declaration should then be followed by lines like the following
8057 \begin_layout Plain Layout
8058 Preferably in English if the module should be published with LyX.
8059 This description will appear in the list of messages to be translated and
8060 will be thus translated with the next interface update.
8068 \begin_layout LyX-Code
8072 \begin_layout LyX-Code
8073 #Adds an endnote command, in addition to footnotes.
8077 \begin_layout LyX-Code
8078 #You will need to add
8080 theendnotes in TeX code where you
8083 \begin_layout LyX-Code
8084 #want the endnotes to appear.
8088 \begin_layout LyX-Code
8092 \begin_layout LyX-Code
8093 #Requires: somemodule | othermodule
8096 \begin_layout LyX-Code
8097 #Excludes: badmodule
8100 \begin_layout Standard
8101 The description is used in
8102 \begin_inset Flex MenuItem
8105 \begin_layout Plain Layout
8106 Document\SpecialChar \menuseparator
8107 Settings\SpecialChar \menuseparator
8113 to provide the user with information about what the module does.
8115 \begin_inset Flex Code
8118 \begin_layout Plain Layout
8124 line is used to identify other modules with which this one must be used;
8126 \begin_inset Flex Code
8129 \begin_layout Plain Layout
8135 line is used to identify modules with which this one may not be used.
8136 Both are optional, and, as shown, multiple modules should be separated
8137 with the pipe symbol: |.
8138 Note that the required modules are treated disjunctively:
8142 of the required modules must be used.
8147 excluded module may be used.
8148 Note that modules are identified here by their filenames without the
8149 \begin_inset Flex Code
8152 \begin_layout Plain Layout
8160 \begin_inset Flex Code
8163 \begin_layout Plain Layout
8170 \begin_inset Flex Code
8173 \begin_layout Plain Layout
8182 \begin_layout Subsection
8186 \begin_layout Standard
8187 The first non-comment line of any layout file, included file, or module
8192 contain the file format number:
8195 \begin_layout Description
8196 \begin_inset Flex Code
8199 \begin_layout Plain Layout
8206 \begin_inset Flex Code
8209 \begin_layout Plain Layout
8215 ] The format number of the layout file.
8218 \begin_layout Standard
8219 This tag was introduced with LyX
8220 \begin_inset space ~
8224 Layout files from older LyX versions do not have an explicit file format
8225 and are considered to have
8226 \begin_inset Flex Code
8229 \begin_layout Plain Layout
8231 \begin_inset space ~
8240 The format for the present version of LyX is format 35.
8241 But each version of LyX is capable of reading earlier versions' layout
8242 files, just as they are capable of reading files produced by earlier versions
8244 There is, however, no provision for converting to earlier formats.
8247 \begin_layout Subsection
8248 \begin_inset CommandInset label
8250 name "sub:General-text-class"
8254 General text class parameters
8257 \begin_layout Standard
8258 These are general parameters that govern the behavior of an entire document
8264 mean that they must appear in
8265 \begin_inset Flex Code
8268 \begin_layout Plain Layout
8274 files rather than in modules.
8275 A module can contain any layout tag.)
8278 \begin_layout Description
8279 \begin_inset Flex Code
8282 \begin_layout Plain Layout
8288 Adds information that will be output in the
8289 \begin_inset Flex Code
8292 \begin_layout Plain Layout
8298 block when the document is output to XHTML.
8299 Typically, this would be used to output CSS style information, but it can
8300 be used for anything that can appear in
8301 \begin_inset Flex Code
8304 \begin_layout Plain Layout
8312 \begin_inset Quotes eld
8316 \begin_inset Flex Code
8319 \begin_layout Plain Layout
8326 \begin_inset Quotes erd
8332 \begin_layout Description
8333 \begin_inset Flex Code
8336 \begin_layout Plain Layout
8342 Adds information to the document preamble.
8344 \begin_inset Newline newline
8348 \begin_inset Quotes eld
8352 \begin_inset Flex Code
8355 \begin_layout Plain Layout
8362 \begin_inset Quotes erd
8368 \begin_layout Description
8369 \begin_inset Flex Code
8372 \begin_layout Plain Layout
8378 Defines formats for use in the display of bibliographic information.
8380 \begin_inset CommandInset ref
8382 reference "sub:Citation-format-description"
8388 \begin_inset Quotes eld
8392 \begin_inset Flex Code
8395 \begin_layout Plain Layout
8402 \begin_inset Quotes erd
8408 \begin_layout Description
8409 \begin_inset Flex Code
8412 \begin_layout Plain Layout
8418 Describes various global options supported by the document class.
8420 \begin_inset CommandInset ref
8422 reference "sub:ClassOptions"
8428 \begin_inset Quotes eld
8432 \begin_inset Flex Code
8435 \begin_layout Plain Layout
8442 \begin_inset Quotes erd
8448 \begin_layout Description
8449 \begin_inset Flex Code
8452 \begin_layout Plain Layout
8459 \begin_inset Flex Code
8462 \begin_layout Plain Layout
8471 \begin_inset space \thinspace{}
8475 \begin_inset Flex Code
8478 \begin_layout Plain Layout
8484 ] Whether the class should
8488 to having one or two columns.
8489 Can be changed in the
8490 \begin_inset Flex MenuItem
8493 \begin_layout Plain Layout
8494 Document\SpecialChar \menuseparator
8503 \begin_layout Description
8504 \begin_inset Flex Code
8507 \begin_layout Plain Layout
8514 \begin_inset Flex Code
8517 \begin_layout Plain Layout
8523 ] This sequence defines the properties for a counter.
8524 If the counter does not yet exist, it is created; if it does exist, it
8527 \begin_inset Quotes eld
8531 \begin_inset Flex Code
8534 \begin_layout Plain Layout
8541 \begin_inset Quotes erd
8545 \begin_inset Newline newline
8549 \begin_inset CommandInset ref
8551 reference "sub:Counters"
8555 for details on counters.
8558 \begin_layout Description
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8568 Sets the default font used to display the document.
8570 \begin_inset CommandInset ref
8572 reference "sub:Font-description"
8576 for how to declare fonts.
8578 \begin_inset Quotes eld
8582 \begin_inset Flex Code
8585 \begin_layout Plain Layout
8592 \begin_inset Quotes erd
8598 \begin_layout Description
8599 \begin_inset Flex Code
8602 \begin_layout Plain Layout
8609 \begin_inset Flex Code
8612 \begin_layout Plain Layout
8618 ] Specifies a module to be included by default with this document class.
8619 The module is specified as filename without the
8620 \begin_inset Flex Code
8623 \begin_layout Plain Layout
8630 The user can still remove the module, but it will be active at the outset.
8631 (This applies only when new files are created, or when this class is chosen
8632 for an existing document.)
8635 \begin_layout Description
8636 \begin_inset Flex Code
8639 \begin_layout Plain Layout
8646 \begin_inset Flex Code
8649 \begin_layout Plain Layout
8655 ] This is the style that will be assigned to new paragraphs, usually
8656 \begin_inset Flex MenuItem
8659 \begin_layout Plain Layout
8666 This will default to the first defined style if not given, but you are
8667 encouraged to use this directive.
8670 \begin_layout Description
8671 \begin_inset Flex Code
8674 \begin_layout Plain Layout
8681 \begin_inset Flex Code
8684 \begin_layout Plain Layout
8690 ] This tag indicates that the module (which is specified by filename without
8692 \begin_inset Flex Code
8695 \begin_layout Plain Layout
8701 extension) cannot be used with this document class.
8702 This might be used in a journal-specific layout file to prevent, say, the
8704 \begin_inset Flex Code
8707 \begin_layout Plain Layout
8713 module that numbers theorems by section.
8718 be used in a module.
8719 Modules have their own way of excluding other modules (see
8720 \begin_inset CommandInset ref
8722 reference "sub:Layout-modules"
8729 \begin_layout Description
8730 \begin_inset Flex Code
8733 \begin_layout Plain Layout
8739 Defines a new float.
8741 \begin_inset CommandInset ref
8743 reference "sub:Floats"
8749 \begin_inset Quotes eld
8753 \begin_inset Flex Code
8756 \begin_layout Plain Layout
8763 \begin_inset Quotes erd
8769 \begin_layout Description
8770 \begin_inset Flex Code
8773 \begin_layout Plain Layout
8779 Sets the information that will be output in the
8780 \begin_inset Flex Code
8783 \begin_layout Plain Layout
8789 block when this document class is output to XHTML.
8790 Note that this will completely override any prior
8791 \begin_inset Flex Code
8794 \begin_layout Plain Layout
8801 \begin_inset Flex Code
8804 \begin_layout Plain Layout
8812 \begin_inset Newline newline
8816 \begin_inset Flex Code
8819 \begin_layout Plain Layout
8825 if you just want to add material to the preamble.) Must end with
8826 \begin_inset Quotes eld
8830 \begin_inset Flex Code
8833 \begin_layout Plain Layout
8840 \begin_inset Quotes erd
8846 \begin_layout Description
8847 \begin_inset Flex Code
8850 \begin_layout Plain Layout
8857 \begin_inset Flex Code
8860 \begin_layout Plain Layout
8866 ] The style to use for the table of contents, bibliography, and so forth,
8867 when the document is output to HTML.
8868 For articles, this should normally be
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8879 \begin_inset Flex Code
8882 \begin_layout Plain Layout
8889 If it is not given, then LyX will attempt to figure out which layout to
8893 \begin_layout Description
8894 \begin_inset Flex Code
8897 \begin_layout Plain Layout
8904 \begin_inset Flex Code
8907 \begin_layout Plain Layout
8913 ] Modifies the properties of the given counter.
8914 If the counter does not exist, the statement is ignored.
8916 \begin_inset Quotes eld
8920 \begin_inset Flex Code
8923 \begin_layout Plain Layout
8930 \begin_inset Quotes erd
8934 \begin_inset Newline newline
8938 \begin_inset CommandInset ref
8940 reference "sub:Counters"
8944 for details on counters.
8947 \begin_layout Description
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8958 \begin_inset Flex Code
8961 \begin_layout Plain Layout
8967 ] Modifies the properties of the given paragraph style.
8968 If the style does not exist, the statement is ignored.
8970 \begin_inset Quotes eld
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8984 \begin_inset Quotes erd
8990 \begin_layout Description
8991 \begin_inset Flex Code
8994 \begin_layout Plain Layout
9001 \begin_inset Flex Code
9004 \begin_layout Plain Layout
9010 ] This allows you to include another layout definition file within yours
9011 to avoid duplicating commands.
9012 Common examples are the standard layout files, for example,
9013 \begin_inset Flex Code
9016 \begin_layout Plain Layout
9022 , which contains most of the basic layouts.
9025 \begin_layout Description
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9036 \begin_inset Flex Code
9039 \begin_layout Plain Layout
9045 ] This section (re-)defines the layout of an inset.
9046 It can be applied to an existing inset or to a new, user-defined inset,
9047 e.g., a new character style.
9049 \begin_inset Quotes eld
9053 \begin_inset Flex Code
9056 \begin_layout Plain Layout
9063 \begin_inset Quotes erd
9067 \begin_inset Newline newline
9071 \begin_inset CommandInset ref
9073 reference "sub:Flex-insets-and"
9077 for more information.
9081 \begin_layout Description
9082 \begin_inset Flex Code
9085 \begin_layout Plain Layout
9092 \begin_inset Flex Code
9095 \begin_layout Plain Layout
9101 ] A string that indicates the width of the left margin on the screen, for
9103 \begin_inset Quotes eld
9107 \begin_inset Flex Code
9110 \begin_layout Plain Layout
9117 \begin_inset Quotes erd
9121 (Note that this is not a `length', like
9122 \begin_inset Quotes eld
9126 \begin_inset Quotes erd
9132 \begin_layout Description
9133 \begin_inset Flex Code
9136 \begin_layout Plain Layout
9143 \begin_inset Flex Code
9146 \begin_layout Plain Layout
9152 ] Deletes an existing counter, usually one defined in an included file.
9155 \begin_layout Description
9156 \begin_inset Flex Code
9159 \begin_layout Plain Layout
9166 \begin_inset Flex Code
9169 \begin_layout Plain Layout
9175 ] Deletes an existing float.
9176 This is particularly useful when you want to suppress a float that has
9177 been defined in an input file.
9180 \begin_layout Description
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9200 ] Deletes an existing style.
9203 \begin_layout Description
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9214 \begin_inset Flex Code
9217 \begin_layout Plain Layout
9223 ] The file format (as defined in the LyX preferences) produced by this document
9225 It is mainly useful when
9226 \begin_inset Flex Code
9229 \begin_layout Plain Layout
9236 \begin_inset Flex Code
9239 \begin_layout Plain Layout
9245 and one wants to define a new type of literate document.
9246 The format is reset to
9247 \begin_inset Quotes eld
9251 \begin_inset Flex Code
9254 \begin_layout Plain Layout
9261 \begin_inset Quotes erd
9265 \begin_inset Quotes eld
9269 \begin_inset Flex Code
9272 \begin_layout Plain Layout
9279 \begin_inset Quotes erd
9282 when the corresponding
9283 \begin_inset Flex Code
9286 \begin_layout Plain Layout
9292 parameter is encountered.
9295 \begin_layout Description
9296 \begin_inset Flex Code
9299 \begin_layout Plain Layout
9306 \begin_inset Flex Code
9309 \begin_layout Plain Layout
9320 \begin_inset Flex Code
9323 \begin_layout Plain Layout
9330 \begin_inset Flex Code
9333 \begin_layout Plain Layout
9339 ] Specifies what sort of output documents using this class will produce.
9342 \begin_layout Description
9343 \begin_inset Flex Code
9346 \begin_layout Plain Layout
9353 \begin_inset Flex Code
9356 \begin_layout Plain Layout
9363 \begin_inset Flex Code
9366 \begin_layout Plain Layout
9372 ] Specifies options, given in the second string, for the package named by
9375 \begin_inset Quotes eld
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9383 PackageOptions natbib square
9389 \begin_inset Quotes erd
9393 \begin_inset Flex Code
9396 \begin_layout Plain Layout
9402 to be loaded with the
9403 \begin_inset Flex Code
9406 \begin_layout Plain Layout
9413 (For TeXperts, this causes LyX to output:
9414 \begin_inset Flex Code
9417 \begin_layout Plain Layout
9420 PassOptionsToPackage{natbib}{square}
9426 \begin_inset Flex Code
9429 \begin_layout Plain Layout
9438 \begin_layout Description
9439 \begin_inset Flex Code
9442 \begin_layout Plain Layout
9449 \begin_inset Flex Code
9452 \begin_layout Plain Layout
9461 \begin_inset Flex Code
9464 \begin_layout Plain Layout
9471 \begin_inset Flex Code
9474 \begin_layout Plain Layout
9480 ] The default pagestyle.
9481 Can be changed in the
9482 \begin_inset Flex MenuItem
9485 \begin_layout Plain Layout
9486 Document\SpecialChar \menuseparator
9495 \begin_layout Description
9496 \begin_inset Flex Code
9499 \begin_layout Plain Layout
9505 Sets the preamble for the LaTeX document.
9506 Note that this will completely override any prior
9507 \begin_inset Flex Code
9510 \begin_layout Plain Layout
9517 \begin_inset Flex Code
9520 \begin_layout Plain Layout
9528 \begin_inset Flex Code
9531 \begin_layout Plain Layout
9537 if you just want to add material to the preamble.) Must end with
9538 \begin_inset Quotes eld
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9552 \begin_inset Quotes erd
9558 \begin_layout Description
9559 \begin_inset Flex Code
9562 \begin_layout Plain Layout
9569 \begin_inset Flex Code
9572 \begin_layout Plain Layout
9579 \begin_inset Flex Code
9582 \begin_layout Plain Layout
9591 \begin_inset space \thinspace{}
9595 \begin_inset Flex Code
9598 \begin_layout Plain Layout
9604 ] Whether the class already provides the feature
9605 \begin_inset Flex Code
9608 \begin_layout Plain Layout
9615 A feature is in general the name of a package (e.
9616 \begin_inset space \thinspace{}
9620 \begin_inset space \space{}
9624 \begin_inset Flex Code
9627 \begin_layout Plain Layout
9634 \begin_inset Flex Code
9637 \begin_layout Plain Layout
9644 \begin_inset space \thinspace{}
9648 \begin_inset space \space{}
9652 \begin_inset Flex Code
9655 \begin_layout Plain Layout
9662 \begin_inset Flex Code
9665 \begin_layout Plain Layout
9673 \begin_inset CommandInset ref
9675 reference "chap:List-of-functions"
9679 for the list of features.
9682 \begin_layout Description
9683 \begin_inset Flex Code
9686 \begin_layout Plain Layout
9693 \begin_inset Flex Code
9696 \begin_layout Plain Layout
9702 ] Indicates that this layout provides the functionality of the module mentioned,
9703 which should be specified by the filename without the
9704 \begin_inset Flex Code
9707 \begin_layout Plain Layout
9714 This will typically be used if the layout includes the module directly,
9715 rather than using the
9716 \begin_inset Flex Code
9719 \begin_layout Plain Layout
9725 tag to indicate that it ought to be used.
9726 It could also be used in a module that provided an alternate implementation
9727 of the same functionality.
9730 \begin_layout Description
9731 \begin_inset Flex Code
9734 \begin_layout Plain Layout
9741 \begin_inset Flex Code
9744 \begin_layout Plain Layout
9750 ] Whether the class requires the feature
9751 \begin_inset Flex Code
9754 \begin_layout Plain Layout
9761 Multiple features must be separated by commas.
9762 Note that you can only request supported features.
9764 \begin_inset CommandInset ref
9766 reference "chap:List-of-functions"
9770 for the list of features.)
9773 \begin_layout Description
9774 \begin_inset Flex Code
9777 \begin_layout Plain Layout
9784 \begin_inset Flex Code
9787 \begin_layout Plain Layout
9793 ] A string that indicates the width of the right margin on the screen, for
9795 \begin_inset Quotes eld
9799 \begin_inset Flex Code
9802 \begin_layout Plain Layout
9809 \begin_inset Quotes erd
9815 \begin_layout Description
9816 \begin_inset Flex Code
9819 \begin_layout Plain Layout
9826 \begin_inset Flex Code
9829 \begin_layout Plain Layout
9835 ] Sets which divisions get numbered.
9837 \begin_inset Newline newline
9841 \begin_inset Flex Code
9844 \begin_layout Plain Layout
9853 \begin_layout Description
9854 \begin_inset Flex Code
9857 \begin_layout Plain Layout
9864 \begin_inset Flex Code
9867 \begin_layout Plain Layout
9876 \begin_inset space \thinspace{}
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9889 ] Whether the class-default should be printing on one or both sides of the
9891 Can be changed in the
9892 \begin_inset Flex MenuItem
9895 \begin_layout Plain Layout
9896 Document\SpecialChar \menuseparator
9905 \begin_layout Description
9906 \begin_inset Flex Code
9909 \begin_layout Plain Layout
9916 \begin_inset Flex Code
9919 \begin_layout Plain Layout
9925 ] This sequence defines a paragraph style.
9926 If the style does not yet exist, it is created; if it does exist, its parameter
9929 \begin_inset Quotes eld
9933 \begin_inset Flex Code
9936 \begin_layout Plain Layout
9943 \begin_inset Quotes erd
9947 \begin_inset Newline newline
9951 \begin_inset CommandInset ref
9953 reference "sub:Paragraph-Styles"
9957 for details on paragraph styles.
9960 \begin_layout Description
9961 \begin_inset Flex Code
9964 \begin_layout Plain Layout
9971 \begin_inset Flex Code
9974 \begin_layout Plain Layout
9980 ] The name of the command or environment to be used with
9981 \begin_inset Flex Code
9984 \begin_layout Plain Layout
9993 \begin_layout Description
9994 \begin_inset Flex Code
9997 \begin_layout Plain Layout
10004 \begin_inset Flex Code
10007 \begin_layout Plain Layout
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10025 ] Indicates what kind of markup is used to define the title of a document.
10027 \begin_inset Flex Code
10030 \begin_layout Plain Layout
10036 means that the macro with name
10037 \begin_inset Flex Code
10040 \begin_layout Plain Layout
10046 will be inserted after the last layout which has
10047 \begin_inset Quotes eld
10051 \begin_inset Flex Code
10054 \begin_layout Plain Layout
10056 \begin_inset space ~
10065 \begin_inset Quotes erd
10070 \begin_inset Flex Code
10073 \begin_layout Plain Layout
10079 corresponds to the case where all layouts which have
10080 \begin_inset Quotes eld
10084 \begin_inset Flex Code
10087 \begin_layout Plain Layout
10089 \begin_inset space ~
10098 \begin_inset Quotes erd
10101 should be enclosed into the
10102 \begin_inset Flex Code
10105 \begin_layout Plain Layout
10114 \begin_layout Description
10115 \begin_inset Flex Code
10118 \begin_layout Plain Layout
10125 \begin_inset Flex Code
10128 \begin_layout Plain Layout
10134 ] Sets which divisions are included in the table of contents.
10136 \begin_inset Flex Code
10139 \begin_layout Plain Layout
10148 \begin_layout Subsection
10149 \begin_inset Flex Code
10152 \begin_layout Plain Layout
10159 \begin_inset CommandInset label
10161 name "sub:ClassOptions"
10168 \begin_layout Standard
10170 \begin_inset Flex Code
10173 \begin_layout Plain Layout
10179 section can contain the following entries:
10182 \begin_layout Description
10183 \begin_inset Flex Code
10186 \begin_layout Plain Layout
10193 \begin_inset Flex Code
10196 \begin_layout Plain Layout
10202 ] The list of available font sizes for the document's main font, separated
10204 \begin_inset Quotes eld
10208 \begin_inset Flex Code
10211 \begin_layout Plain Layout
10218 \begin_inset Quotes erd
10224 \begin_layout Description
10225 \begin_inset Flex Code
10228 \begin_layout Plain Layout
10234 Used to set the DTD line with XML-based output classes.
10236 \begin_inset space \thinspace{}
10240 \begin_inset Quotes eld
10243 -//OASIS//DTD DocBook V4.2//EN
10244 \begin_inset Quotes erd
10250 \begin_layout Description
10251 \begin_inset Flex Code
10254 \begin_layout Plain Layout
10261 \begin_inset Flex Code
10264 \begin_layout Plain Layout
10265 string="empty|plain|headings|fancy"
10270 ] The list of available page sty\SpecialChar \-
10272 \begin_inset Quotes eld
10276 \begin_inset Flex Code
10279 \begin_layout Plain Layout
10286 \begin_inset Quotes erd
10292 \begin_layout Description
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10303 \begin_inset Flex Code
10306 \begin_layout Plain Layout
10312 ] Some document class options, separated by a comma, that will be added
10313 to the optional part of the
10314 \begin_inset Flex Code
10317 \begin_layout Plain Layout
10328 \begin_layout Standard
10330 \begin_inset Flex Code
10333 \begin_layout Plain Layout
10339 section must end with
10340 \begin_inset Quotes eld
10344 \begin_inset Flex Code
10347 \begin_layout Plain Layout
10354 \begin_inset Quotes erd
10360 \begin_layout Subsection
10362 \begin_inset CommandInset label
10364 name "sub:Paragraph-Styles"
10371 \begin_layout Standard
10372 A paragraph style description looks like this:
10376 \begin_layout Plain Layout
10377 Note that this will either define a new style or modify an existing one.
10385 \begin_layout LyX-Code
10392 \begin_layout LyX-Code
10396 \begin_layout LyX-Code
10400 \begin_layout Standard
10401 where the following commands are allowed:
10404 \begin_layout Description
10405 \begin_inset Flex Code
10408 \begin_layout Plain Layout
10415 \begin_inset Flex Code
10418 \begin_layout Plain Layout
10423 , left, right, center
10428 ] Paragraph alignment.
10431 \begin_layout Description
10432 \begin_inset Flex Code
10435 \begin_layout Plain Layout
10442 \begin_inset Flex Code
10445 \begin_layout Plain Layout
10450 , left, right, center
10455 ] A comma separated list of permitted alignments.
10456 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10458 For example a right-aligned or centered enumeration isn't possible.)
10461 \begin_layout Description
10462 \begin_inset Flex Code
10465 \begin_layout Plain Layout
10472 \begin_inset Flex Code
10475 \begin_layout Plain Layout
10481 ] Defines argument number <int> of a command\SpecialChar \slash{}
10482 environment associated with
10484 This is useful for things like section headings, and only makes sense with
10486 Every (optional or required) argument of a command or environment -- except
10487 for the required argument that is associated with the content of the paragraph
10488 itself -- has a separate definition, where the number specifies the order
10490 The definition must end with
10491 \begin_inset Flex Code
10494 \begin_layout Plain Layout
10501 So a command with two optional arguments has:
10505 \begin_layout Quote
10511 \begin_layout Quote
10517 \begin_layout Quote
10523 \begin_layout Quote
10529 \begin_layout Quote
10535 \begin_layout Quote
10541 \begin_layout Standard
10543 \begin_inset Flex Code
10546 \begin_layout Plain Layout
10552 definition, the following specifications are possible:
10555 \begin_layout Itemize
10556 \begin_inset Flex Code
10559 \begin_layout Plain Layout
10566 \begin_inset Flex Code
10569 \begin_layout Plain Layout
10575 The string that will appear both in the menu (to insert this argument)
10576 and on the argument inset button (unless you also specify a separate
10577 \begin_inset Flex Code
10580 \begin_layout Plain Layout
10587 For the menu, you can define an accelerator by appending the respective
10588 character to the string, divided by
10589 \begin_inset Quotes eld
10593 \begin_inset Quotes erd
10597 \begin_inset space \thinspace{}
10601 \begin_inset space \space{}
10605 \begin_inset Quotes eld
10609 \begin_inset Flex Code
10612 \begin_layout Plain Layout
10619 \begin_inset Quotes erd
10625 \begin_layout Itemize
10626 \begin_inset Flex Code
10629 \begin_layout Plain Layout
10636 \begin_inset Flex Code
10639 \begin_layout Plain Layout
10645 A separate string for the menu.
10646 You can define an accelerator by appending the respective character to
10647 the string, divided by
10648 \begin_inset Quotes eld
10652 \begin_inset Quotes erd
10656 \begin_inset space \thinspace{}
10660 \begin_inset space \space{}
10664 \begin_inset Quotes eld
10668 \begin_inset Flex Code
10671 \begin_layout Plain Layout
10678 \begin_inset Quotes erd
10682 This specification is optional.
10683 If it is not given the
10684 \begin_inset Flex Code
10687 \begin_layout Plain Layout
10693 will be used instead for the menu.
10696 \begin_layout Itemize
10697 \begin_inset Flex Code
10700 \begin_layout Plain Layout
10707 \begin_inset Flex Code
10710 \begin_layout Plain Layout
10716 A longer explanatory text that appears in the tooltip when hovering over
10717 the argument inset.
10720 \begin_layout Itemize
10721 \begin_inset Flex Code
10724 \begin_layout Plain Layout
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10743 \begin_inset space \thinspace{}
10747 \begin_inset Flex Code
10750 \begin_layout Plain Layout
10756 ] Declare if this is a mandatory (1) or an optional (0) argument.
10757 Mandatory arguments will be output empty if not given, while optional arguments
10758 will not be output at all.
10759 By default, mandatory arguments are delimited by
10760 \begin_inset Flex Code
10763 \begin_layout Plain Layout
10769 , while optional arguments are delimited by
10770 \begin_inset Flex Code
10773 \begin_layout Plain Layout
10782 \begin_layout Itemize
10783 \begin_inset Flex Code
10786 \begin_layout Plain Layout
10793 \begin_inset Flex Code
10796 \begin_layout Plain Layout
10802 defines another argument (by its number) which this argument requires to
10803 be output if it is itself output.
10805 \begin_inset space \thinspace{}
10808 g., in LaTeX commands, optional arguments often require previous optional
10809 arguments to be output (at least empty), as in
10810 \begin_inset Flex Code
10813 \begin_layout Plain Layout
10816 command[][argument]{text}
10822 This can be achieved by the statement
10823 \begin_inset Flex Code
10826 \begin_layout Plain Layout
10833 \begin_inset Flex Code
10836 \begin_layout Plain Layout
10845 \begin_layout Itemize
10846 \begin_inset Flex Code
10849 \begin_layout Plain Layout
10856 \begin_inset Flex Code
10859 \begin_layout Plain Layout
10865 defines a custom left delimiter (instead of
10866 \begin_inset Flex Code
10869 \begin_layout Plain Layout
10876 \begin_inset Flex Code
10879 \begin_layout Plain Layout
10886 A line break in the output can be indicated by
10887 \begin_inset Flex Code
10890 \begin_layout Plain Layout
10899 \begin_layout Itemize
10900 \begin_inset Flex Code
10903 \begin_layout Plain Layout
10910 \begin_inset Flex Code
10913 \begin_layout Plain Layout
10919 defines a custom right delimiter (instead of
10920 \begin_inset Flex Code
10923 \begin_layout Plain Layout
10930 \begin_inset Flex Code
10933 \begin_layout Plain Layout
10940 A line break in the output can be indicated by
10941 \begin_inset Flex Code
10944 \begin_layout Plain Layout
10953 \begin_layout Itemize
10954 \begin_inset Flex Code
10957 \begin_layout Plain Layout
10964 \begin_inset Flex Code
10967 \begin_layout Plain Layout
10973 defines an argument that is inserted if and only if no user-specified arguments
10975 \begin_inset space \thinspace{}
10979 \begin_inset space \space{}
10982 if no argument inset has been inserted (note that also an empty argument
10983 inset omits the DefaultArg).
10984 Multiple arguments need to be separated by comma.
10987 \begin_layout Itemize
10988 \begin_inset Flex Code
10991 \begin_layout Plain Layout
10998 \begin_inset Flex Code
11001 \begin_layout Plain Layout
11007 defines an argument that is inserted in any case (alone or in addition
11008 to user-specified arguments).
11009 Multiple arguments need to be separated by comma.
11012 \begin_layout Itemize
11013 \begin_inset Flex Code
11016 \begin_layout Plain Layout
11022 The font used for the argument content, see
11023 \begin_inset CommandInset ref
11025 reference "sub:Font-description"
11032 \begin_layout Itemize
11033 \begin_inset Flex Code
11036 \begin_layout Plain Layout
11042 The font used for the label; see
11043 \begin_inset CommandInset ref
11045 reference "sub:Font-description"
11052 \begin_layout Itemize
11053 \begin_inset Flex Code
11056 \begin_layout Plain Layout
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11071 , Minimalistic, Conglomerate
11076 ] describes the rendering style used for the inset's frame and buttons.
11079 \begin_layout Itemize
11080 \begin_inset Flex Code
11083 \begin_layout Plain Layout
11090 \begin_inset Flex Code
11093 \begin_layout Plain Layout
11100 \begin_inset Flex Code
11103 \begin_layout Plain Layout
11109 , this argument is automatically inserted when the respective style is selected.
11110 Currently, only one argument per style\SpecialChar \slash{}
11111 layout can be automatically inserted.
11114 \begin_layout Standard
11115 By default, the text entered in the LyX workarea in the respective layout
11116 is the last (mandatory) argument of a command if the
11117 \begin_inset Flex Code
11120 \begin_layout Plain Layout
11127 \begin_inset Flex Code
11130 \begin_layout Plain Layout
11137 However, arguments with the prefix
11138 \begin_inset Flex Code
11141 \begin_layout Plain Layout
11147 are output after this workarea argument.
11148 Note that post-argument numbering restarts at 1, so the first argument
11149 following the workarea argument is
11150 \begin_inset Flex Code
11153 \begin_layout Plain Layout
11160 Post-arguments are ignored in any other
11161 \begin_inset Flex Code
11164 \begin_layout Plain Layout
11171 \begin_inset Flex Code
11174 \begin_layout Plain Layout
11183 \begin_layout Standard
11185 \begin_inset Flex Code
11188 \begin_layout Plain Layout
11197 \begin_inset Flex Code
11200 \begin_layout Plain Layout
11209 \begin_inset Flex Code
11212 \begin_layout Plain Layout
11218 followed by the number (e.
11219 \begin_inset space \thinspace{}
11223 \begin_inset space \space{}
11227 \begin_inset Flex Code
11230 \begin_layout Plain Layout
11240 \begin_layout Description
11241 \begin_inset Flex Code
11244 \begin_layout Plain Layout
11250 Note that this will completely override any prior
11251 \begin_inset Flex Code
11254 \begin_layout Plain Layout
11260 declaration for this style.
11262 \begin_inset Quotes eld
11266 \begin_inset Flex Code
11269 \begin_layout Plain Layout
11276 \begin_inset Quotes erd
11281 \begin_inset CommandInset ref
11283 reference "sub:I18n"
11287 for details on its use.
11290 \begin_layout Description
11291 \begin_inset Flex Code
11294 \begin_layout Plain Layout
11301 \begin_inset Flex Code
11304 \begin_layout Plain Layout
11314 \begin_layout Plain Layout
11315 Note that a `float' here is a real number, such as: 1.5.
11320 The vertical space with which the last of a chain of paragraphs with this
11321 style is separated from the following paragraph.
11322 If the next paragraph has another style, the separations are not simply
11323 added, but the maximum is taken.
11326 \begin_layout Description
11327 \begin_inset Flex Code
11330 \begin_layout Plain Layout
11337 \begin_inset Flex Code
11340 \begin_layout Plain Layout
11346 ] The category for this style.
11347 This is used to group related styles in the style combobox on the toolbar.
11348 Any string can be used, but you may want to use existing categories with
11353 \begin_layout Description
11354 \begin_inset Flex Code
11357 \begin_layout Plain Layout
11363 Depth of XML command.
11364 Used only with XML-type formats.
11367 \begin_layout Description
11368 \begin_inset Flex Code
11371 \begin_layout Plain Layout
11378 \begin_inset Flex Code
11381 \begin_layout Plain Layout
11387 ] Copies all the features of an existing style into the current one.
11391 \begin_layout Description
11392 \begin_inset Flex Code
11395 \begin_layout Plain Layout
11402 \begin_inset Flex Code
11405 \begin_layout Plain Layout
11411 ] The name of a style whose preamble should be output
11416 This allows to ensure some ordering of the preamble snippets when macros
11417 definitions depend on one another.
11421 \begin_layout Plain Layout
11422 Note that, besides that functionality, there is no way to ensure any ordering
11424 The ordering that you see in a given version of LyX may change without
11425 warning in later versions.
11433 \begin_layout Description
11434 \begin_inset Flex Code
11437 \begin_layout Plain Layout
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11452 , Box, Filled_Box, Static
11457 ] The type of label that stands at the end of the paragraph (or sequence
11459 \begin_inset Flex Code
11462 \begin_layout Plain Layout
11469 \begin_inset Newline newline
11473 \begin_inset Flex Code
11476 \begin_layout Plain Layout
11483 \begin_inset Flex Code
11486 \begin_layout Plain Layout
11493 \begin_inset Flex Code
11496 \begin_layout Plain Layout
11504 \begin_inset Flex Code
11507 \begin_layout Plain Layout
11514 \begin_inset Quotes eld
11518 \begin_inset Quotes erd
11522 \begin_inset Flex Code
11525 \begin_layout Plain Layout
11532 \begin_inset space \space{}
11536 \begin_inset Flex Code
11539 \begin_layout Plain Layout
11545 ) is a white (resp.
11546 \begin_inset space ~
11549 black) square suitable for end of proof markers,
11550 \begin_inset Flex Code
11553 \begin_layout Plain Layout
11559 is an explicit text string.
11562 \begin_layout Description
11563 \begin_inset Flex Code
11566 \begin_layout Plain Layout
11573 \begin_inset Flex Code
11576 \begin_layout Plain Layout
11582 ] The string used for a label with a
11583 \begin_inset Flex Code
11586 \begin_layout Plain Layout
11593 \begin_inset Newline newline
11597 \begin_inset Flex Code
11600 \begin_layout Plain Layout
11610 \begin_layout Description
11611 \begin_inset Flex Code
11614 \begin_layout Plain Layout
11620 The font used for both the text body
11626 \begin_inset CommandInset ref
11628 reference "sub:Font-description"
11633 Note that defining this font automatically defines the
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11644 So you should define this one first if you also want to define
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11657 \begin_layout Description
11658 \begin_inset Flex Code
11661 \begin_layout Plain Layout
11668 \begin_inset Flex Code
11671 \begin_layout Plain Layout
11677 ] Used for backporting new styles to stable LyX versions.
11678 The first stable version that supports this tag is LyX 2.1.0.
11679 The argment is a number which may either be 0, -1 or any value greater
11682 \begin_inset Flex Code
11685 \begin_layout Plain Layout
11691 flag of a style is greater than zero, it will always be written to the
11693 If a .lyx file is read, the style definitions from the document header are
11694 added to the document class.
11695 Therefore even older versions can handle the style.
11697 \begin_inset Flex Code
11700 \begin_layout Plain Layout
11706 is a version number: If such a style is read, and the version number is
11707 less than the version number of the already existing style in the document
11708 class, the new style is ignored.
11709 If the version number is higher, the new style replaces the existing style.
11710 A value of -1 means an infinite version number, i.
11711 \begin_inset space \thinspace{}
11715 \begin_inset space \space{}
11721 \begin_layout Description
11722 \begin_inset Flex Code
11725 \begin_layout Plain Layout
11732 \begin_inset Flex Code
11735 \begin_layout Plain Layout
11744 \begin_inset space \thinspace{}
11748 \begin_inset Flex Code
11751 \begin_layout Plain Layout
11757 ] Usually LyX does not allow you to insert more than one space between words,
11758 since a space is considered as the separation between two words, not a
11759 character or symbol of its own.
11760 This is a very fine thing but sometimes annoying, for example, when typing
11761 program code or plain LaTeX code.
11763 \begin_inset Flex Code
11766 \begin_layout Plain Layout
11773 Note that LyX will create protected blanks for the additional blanks when
11774 in another mode than LaTeX-mode.
11777 \begin_layout Description
11778 \begin_inset Flex Code
11781 \begin_layout Plain Layout
11787 These tags are used with XHTML output.
11789 \begin_inset CommandInset ref
11791 reference "sub:Paragraph-Style-XHTML"
11798 \begin_layout Description
11799 \begin_inset Flex Code
11802 \begin_layout Plain Layout
11808 [FIXME] (Used only with XML-type formats.)
11811 \begin_layout Description
11812 \begin_inset Flex Code
11815 \begin_layout Plain Layout
11822 \begin_inset Flex Code
11825 \begin_layout Plain Layout
11834 \begin_inset space \thinspace{}
11838 \begin_inset Flex Code
11841 \begin_layout Plain Layout
11848 \begin_inset Flex Code
11851 \begin_layout Plain Layout
11857 , marks the style as to be included in the document preamble and not in
11859 This is useful for document classes that want such information as the title
11860 and author to appear in the preamble.
11861 Note that this works only for styles for which the
11862 \begin_inset Flex Code
11865 \begin_layout Plain Layout
11872 \begin_inset Flex Code
11875 \begin_layout Plain Layout
11882 \begin_inset Flex Code
11885 \begin_layout Plain Layout
11894 \begin_layout Description
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11905 \begin_inset Flex Code
11908 \begin_layout Plain Layout
11917 \begin_inset space \thinspace{}
11921 \begin_inset Flex Code
11924 \begin_layout Plain Layout
11931 \begin_inset Flex Code
11934 \begin_layout Plain Layout
11940 , marks the style as being part of a title block (see also the
11941 \begin_inset Flex Code
11944 \begin_layout Plain Layout
11951 \begin_inset Flex Code
11954 \begin_layout Plain Layout
11963 \begin_layout Description
11964 \begin_inset Flex Code
11967 \begin_layout Plain Layout
11974 \begin_inset Flex Code
11977 \begin_layout Plain Layout
11983 ] The LaTeX command sequence declaring an item in a list.
11984 The command is to be defined without the preceding backslash (the default
11986 \begin_inset Quotes eld
11990 \begin_inset Quotes erd
11994 \begin_inset Flex Code
11997 \begin_layout Plain Layout
12005 in the LaTeX output).
12008 \begin_layout Description
12009 \begin_inset Flex Code
12012 \begin_layout Plain Layout
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12028 ] This provides extra space between paragraphs that have the same style.
12029 If you put other styles into an environment, each is separated with the
12031 \begin_inset Flex Code
12034 \begin_layout Plain Layout
12041 But the whole items of the environment are additionally separated with
12043 \begin_inset Flex Code
12046 \begin_layout Plain Layout
12053 Note that this is a
12058 \begin_layout Description
12059 \begin_inset Flex Code
12062 \begin_layout Plain Layout
12068 [FIXME] (Used only with XML-type formats.)
12071 \begin_layout Description
12072 \begin_inset Flex Code
12075 \begin_layout Plain Layout
12082 \begin_inset Flex Code
12085 \begin_layout Plain Layout
12094 \begin_inset space \thinspace{}
12098 \begin_inset Flex Code
12101 \begin_layout Plain Layout
12107 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12108 lead to empty LaTeX output.
12109 There are some cases where this could be desirable however: in a letter
12110 template, the required fields can be provided as empty fields, so that
12111 people do not forget them; in some special classes, a style can be used
12112 as some kind of break, which does not contain actual text.
12115 \begin_layout Description
12116 \begin_inset Flex Code
12119 \begin_layout Plain Layout
12126 \begin_inset Flex Code
12129 \begin_layout Plain Layout
12135 ] The vertical space between the label and the text body.
12136 Only used for labels that are above the text body (
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 \begin_inset Newline newline
12151 \begin_inset Flex Code
12154 \begin_layout Plain Layout
12155 Centered_Top_Environment
12163 \begin_layout Description
12164 \begin_inset Flex Code
12167 \begin_layout Plain Layout
12174 \begin_inset Flex Code
12177 \begin_layout Plain Layout
12183 ] The name of the counter for automatic numbering.
12184 In order to have the counter appear with your label, you will need to reference
12186 \begin_inset Flex Code
12189 \begin_layout Plain Layout
12198 This will work with
12199 \begin_inset Flex Code
12202 \begin_layout Plain Layout
12209 \begin_inset Flex Code
12212 \begin_layout Plain Layout
12219 \begin_inset Flex Code
12222 \begin_layout Plain Layout
12229 \begin_inset Flex Code
12232 \begin_layout Plain Layout
12239 \begin_inset Newline newline
12247 \begin_inset Flex Code
12250 \begin_layout Plain Layout
12257 \begin_inset Flex Code
12260 \begin_layout Plain Layout
12266 , though this case is a bit complicated.
12267 Suppose you declare
12268 \begin_inset Quotes eld
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12276 LabelCounter myenum
12282 \begin_inset Quotes erd
12286 Then the actual counters used are
12287 \begin_inset Flex Code
12290 \begin_layout Plain Layout
12297 \begin_inset Flex Code
12300 \begin_layout Plain Layout
12307 \begin_inset Flex Code
12310 \begin_layout Plain Layout
12317 \begin_inset Flex Code
12320 \begin_layout Plain Layout
12326 , much as in LaTeX.
12327 These counters must all be declared separately.
12328 \begin_inset Newline newline
12332 \begin_inset CommandInset ref
12334 reference "sub:Counters"
12338 for details on counters.
12341 \begin_layout Description
12342 \begin_inset Flex Code
12345 \begin_layout Plain Layout
12351 The font used for the label.
12353 \begin_inset CommandInset ref
12355 reference "sub:Font-description"
12362 \begin_layout Description
12363 \begin_inset Flex Code
12366 \begin_layout Plain Layout
12373 \begin_inset Flex Code
12376 \begin_layout Plain Layout
12382 ] Text that indicates how far a label should be indented.
12385 \begin_layout Description
12386 \begin_inset Flex Code
12389 \begin_layout Plain Layout
12396 \begin_inset Flex Code
12399 \begin_layout Plain Layout
12405 ] Text that indicates the amount of horizontal space between the label and
12407 Only used for labels that are not above the text body.
12410 \begin_layout Description
12411 \begin_inset Flex Code
12414 \begin_layout Plain Layout
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12430 ] The string used for the label.
12432 \begin_inset Flex Code
12435 \begin_layout Plain Layout
12441 is set, this string can be contain the special formatting commands described
12443 \begin_inset CommandInset ref
12445 reference "sub:Counters"
12452 \begin_layout Description
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12457 LabelStringAppendix
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12472 ] This is used inside the appendix instead of
12473 \begin_inset Newline newline
12477 \begin_inset Flex Code
12480 \begin_layout Plain Layout
12488 \begin_inset Flex Code
12491 \begin_layout Plain Layout
12498 \begin_inset Newline newline
12502 \begin_inset Flex Code
12505 \begin_layout Plain Layout
12506 LabelStringAppendix
12514 \begin_layout Description
12515 \begin_inset Flex Code
12518 \begin_layout Plain Layout
12524 [FIXME] (Used only with XML-type formats.)
12527 \begin_layout Description
12528 \begin_inset Flex Code
12531 \begin_layout Plain Layout
12538 \begin_inset Flex Code
12541 \begin_layout Plain Layout
12546 , Manual, Static, Above,
12547 \begin_inset Newline newline
12550 Centered, Sensitive, Enumerate,
12551 \begin_inset Newline newline
12554 Itemize, Bibliography
12563 \begin_layout Description
12564 \begin_inset Flex Code
12567 \begin_layout Plain Layout
12573 means the label is the very first word (up to the first real blank).
12574 Use protected spaces if you want more than one word as the label.
12578 \begin_layout Description
12579 \begin_inset Flex Code
12582 \begin_layout Plain Layout
12588 means the label is simply what is declared as
12589 \begin_inset Flex Code
12592 \begin_layout Plain Layout
12599 This will be displayed
12600 \begin_inset Quotes eld
12604 \begin_inset Quotes erd
12607 , at the beginning of the paragraph.
12609 \begin_inset Flex Code
12612 \begin_layout Plain Layout
12619 \begin_inset Flex Code
12622 \begin_layout Plain Layout
12628 , then it will be displayed only in the first paragraph of any sequence
12629 of paragraphs with the same
12630 \begin_inset Flex Code
12633 \begin_layout Plain Layout
12642 \begin_layout Description
12643 \begin_inset Flex Code
12646 \begin_layout Plain Layout
12653 \begin_inset space ~
12657 \begin_inset space ~
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12670 are special cases of
12671 \begin_inset Flex Code
12674 \begin_layout Plain Layout
12681 The label will be printed above the paragraph either at the beginning of
12682 the line or centered.
12685 \begin_layout Description
12686 \begin_inset Flex Code
12689 \begin_layout Plain Layout
12695 is a special case for the caption-labels
12696 \begin_inset Quotes eld
12700 \begin_inset Quotes erd
12704 \begin_inset Quotes eld
12708 \begin_inset Quotes erd
12712 \begin_inset Newline newline
12716 \begin_inset Flex Code
12719 \begin_layout Plain Layout
12725 means the (hardcoded) label string depends on the kind of float: It is
12726 hardcoded to be `FloatType N', where N is the value of the counter associated
12728 For the case that a caption is inserted outside of a float the
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12739 \begin_inset Quotes eld
12743 \begin_inset Quotes erd
12749 \begin_layout Description
12750 \begin_inset Flex Code
12753 \begin_layout Plain Layout
12759 produces the usual sort of enumeration labels.
12760 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12761 small Roman numerals, and uppercase letters for the four possible depths.
12764 \begin_layout Description
12765 \begin_inset Flex Code
12768 \begin_layout Plain Layout
12774 produces various bullets at the different levels.
12775 It is also hardcoded.
12778 \begin_layout Description
12779 \begin_inset Flex Code
12782 \begin_layout Plain Layout
12788 should be used only with
12789 \begin_inset Flex Code
12792 \begin_layout Plain Layout
12793 LatexType BibEnvironment
12802 \begin_layout Description
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12812 Note that this will completely override any prior
12813 \begin_inset Flex Code
12816 \begin_layout Plain Layout
12822 declaration for this style.
12824 \begin_inset Quotes eld
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12838 \begin_inset Quotes erd
12843 \begin_inset CommandInset ref
12845 reference "sub:I18n"
12849 for details on its use.
12852 \begin_layout Description
12853 \begin_inset Flex Code
12856 \begin_layout Plain Layout
12863 \begin_inset Flex Code
12866 \begin_layout Plain Layout
12872 ] The name of the corresponding LaTeX stuff.
12873 Either the environment or command name.
12876 \begin_layout Description
12877 \begin_inset Flex Code
12880 \begin_layout Plain Layout
12887 \begin_inset Flex Code
12890 \begin_layout Plain Layout
12896 ] An optional parameter for the corresponding
12897 \begin_inset Flex Code
12900 \begin_layout Plain Layout
12907 This parameter cannot be changed from within LyX (use
12908 \begin_inset Flex Code
12911 \begin_layout Plain Layout
12917 for customizable parameters).
12918 This will be output as is after all LaTeX
12919 \begin_inset Flex Code
12922 \begin_layout Plain Layout
12931 \begin_layout Description
12932 \begin_inset Flex Code
12935 \begin_layout Plain Layout
12942 \begin_inset Flex Code
12945 \begin_layout Plain Layout
12950 , Command, Environment, Item_Environment,
12951 \begin_inset Newline newline
12954 List_Environment, Bib_Environment
12959 ] How the style should be translated into LaTeX.
12963 \begin_layout Plain Layout
12964 \begin_inset Flex Code
12967 \begin_layout Plain Layout
12973 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12974 Visit the SGML class files for specific examples.
12983 \begin_layout Description
12984 \begin_inset Flex Code
12987 \begin_layout Plain Layout
12993 means nothing special.
12996 \begin_layout Description
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13007 \begin_inset Flex Code
13010 \begin_layout Plain Layout
13017 {\SpecialChar \ldots{}
13026 \begin_layout Description
13027 \begin_inset Flex Code
13030 \begin_layout Plain Layout
13037 \begin_inset Flex Code
13040 \begin_layout Plain Layout
13047 }\SpecialChar \ldots{}
13063 \begin_layout Description
13064 \begin_inset Flex Code
13067 \begin_layout Plain Layout
13074 \begin_inset Flex Code
13077 \begin_layout Plain Layout
13084 \begin_inset Flex Code
13087 \begin_layout Plain Layout
13095 is generated for each paragraph of this environment.
13099 \begin_layout Description
13100 \begin_inset Flex Code
13103 \begin_layout Plain Layout
13110 \begin_inset Flex Code
13113 \begin_layout Plain Layout
13120 \begin_inset Newline newline
13124 \begin_inset Flex Code
13127 \begin_layout Plain Layout
13133 is passed as an argument to the environment.
13134 \begin_inset Newline newline
13138 \begin_inset Flex Code
13141 \begin_layout Plain Layout
13147 can be defined in the
13148 \begin_inset Flex MenuItem
13151 \begin_layout Plain Layout
13152 Edit\SpecialChar \menuseparator
13154 \begin_inset space ~
13165 \begin_layout Description
13166 \begin_inset Flex Code
13169 \begin_layout Plain Layout
13176 \begin_inset Flex Code
13179 \begin_layout Plain Layout
13185 but adds additionally the necessary mandatory argument (the longest label)
13186 to the begin statement of the bibliography environment:
13187 \begin_inset Newline newline
13191 \begin_inset Flex Code
13194 \begin_layout Plain Layout
13197 begin{thebibliography}{99}
13202 It is therefore only useful for bibliography environments.
13203 The default longest label
13204 \begin_inset Quotes eld
13208 \begin_inset Quotes erd
13211 can be changed by the user in the paragraph settings of a bibliography
13215 \begin_layout Standard
13216 Putting the last few things together, the LaTeX output will be either:
13219 \begin_layout LyX-Code
13222 LatexName[LatexParam]{\SpecialChar \ldots{}
13226 \begin_layout Standard
13230 \begin_layout LyX-Code
13233 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13239 \begin_layout Standard
13240 depending upon the LaTeX type.
13244 \begin_layout Description
13245 \begin_inset Flex Code
13248 \begin_layout Plain Layout
13255 \begin_inset Flex Code
13258 \begin_layout Plain Layout
13264 ] A string that is put at the beginning of the style content.
13265 A line break in the output can be indicated by
13266 \begin_inset Flex Code
13269 \begin_layout Plain Layout
13278 \begin_layout Description
13279 \begin_inset Flex Code
13282 \begin_layout Plain Layout
13289 \begin_inset Flex Code
13292 \begin_layout Plain Layout
13298 ] If you put styles into environments, the different
13299 \begin_inset Flex Code
13302 \begin_layout Plain Layout
13308 are not simply added, but added with a factor
13309 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13313 Note that this parameter is also used when
13314 \begin_inset Flex Code
13317 \begin_layout Plain Layout
13324 \begin_inset Flex Code
13327 \begin_layout Plain Layout
13334 \begin_inset Flex Code
13337 \begin_layout Plain Layout
13344 Then it is added to the manual or dynamic margin.
13345 \begin_inset Newline newline
13349 \begin_inset Quotes eld
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13363 \begin_inset Quotes erd
13366 means that the paragraph is indented with the width of
13367 \begin_inset Quotes eld
13371 \begin_inset Flex Code
13374 \begin_layout Plain Layout
13381 \begin_inset Quotes erd
13384 in the normal font.
13385 You can get a negative width by prefixing the string with
13386 \begin_inset Quotes eld
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 \begin_inset Quotes erd
13404 This way was chosen so that the look is the same with each used screen
13408 \begin_layout Description
13409 \begin_inset Flex Code
13412 \begin_layout Plain Layout
13419 \begin_inset Flex Code
13422 \begin_layout Plain Layout
13427 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13433 \begin_inset Newline newline
13436 The kind of margin that the style has on the left side.
13440 \begin_layout Description
13441 \begin_inset Flex Code
13444 \begin_layout Plain Layout
13450 just means a fixed margin.
13453 \begin_layout Description
13454 \begin_inset Flex Code
13457 \begin_layout Plain Layout
13463 means that the left margin depends on the string entered in the
13464 \begin_inset Flex MenuItem
13467 \begin_layout Plain Layout
13468 Edit\SpecialChar \menuseparator
13470 \begin_inset space ~
13479 This is used to typeset nice lists without tabulators.
13482 \begin_layout Description
13483 \begin_inset Flex Code
13486 \begin_layout Plain Layout
13492 means that the margin depends on the size of the label.
13493 This is used for automatic enumerated headlines.
13494 It is obvious that the headline
13495 \begin_inset Quotes eld
13498 5.4.3.2.1 Very long headline
13499 \begin_inset Quotes erd
13502 must have a wider left margin (as wide as
13503 \begin_inset Quotes eld
13507 \begin_inset Quotes erd
13510 plus the space) than
13511 \begin_inset Quotes eld
13514 3.2 Very long headline
13515 \begin_inset Quotes erd
13519 \begin_inset Quotes eld
13523 \begin_inset Quotes erd
13526 are not able to do this.
13529 \begin_layout Description
13530 \begin_inset Flex Code
13533 \begin_layout Plain Layout
13539 is similar, but only the very first row of the paragraph is dynamic, while
13540 the others are static; this is used, for example, for descriptions.
13543 \begin_layout Description
13544 \begin_inset Flex Code
13547 \begin_layout Plain Layout
13553 means the margin is chosen in a way that the longest row of this paragraph
13554 fits to the right margin.
13555 This is used to typeset an address on the right edge of the page.
13559 \begin_layout Description
13560 \begin_inset Flex Code
13563 \begin_layout Plain Layout
13570 \begin_inset Flex Code
13573 \begin_layout Plain Layout
13582 \begin_inset space \thinspace{}
13586 \begin_inset Flex Code
13589 \begin_layout Plain Layout
13595 ] Whether fragile commands in this style should be
13596 \begin_inset Flex Code
13599 \begin_layout Plain Layout
13612 whether this command should itself be protected.)
13615 \begin_layout Description
13616 \begin_inset Flex Code
13619 \begin_layout Plain Layout
13626 \begin_inset Flex Code
13629 \begin_layout Plain Layout
13636 \begin_inset space \thinspace{}
13640 \begin_inset Flex Code
13643 \begin_layout Plain Layout
13651 ] Whether newlines are translated into LaTeX newlines (
13652 \begin_inset Flex Code
13655 \begin_layout Plain Layout
13666 The translation can be switched off to allow more comfortable LaTeX editing
13670 \begin_layout Description
13671 \begin_inset Flex Code
13674 \begin_layout Plain Layout
13681 \begin_inset Flex Code
13684 \begin_layout Plain Layout
13693 \begin_inset space \thinspace{}
13697 \begin_inset Flex Code
13700 \begin_layout Plain Layout
13706 ] If set to true, and if
13707 \begin_inset Flex Code
13710 \begin_layout Plain Layout
13717 \begin_inset Flex Code
13720 \begin_layout Plain Layout
13726 ) paragraphs are being indented, then the indentation of such a paragraph
13727 following one of this type will be suppressed.
13728 (So this will not affect the display of non-default paragraphs.)
13731 \begin_layout Description
13732 \begin_inset Flex Code
13735 \begin_layout Plain Layout
13742 \begin_inset Flex Code
13745 \begin_layout Plain Layout
13751 ] Name of a style that has replaced this style.
13752 This is used to rename a style, while keeping backward compatibility.
13755 \begin_layout Description
13756 \begin_inset Flex Code
13759 \begin_layout Plain Layout
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13778 \begin_inset space \thinspace{}
13782 \begin_inset Flex Code
13785 \begin_layout Plain Layout
13791 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13792 output, but only by a line break; together with
13793 \begin_inset Flex Code
13796 \begin_layout Plain Layout
13802 , this allows to emulate a plain text editor (like the ERT inset).
13805 \begin_layout Description
13806 \begin_inset Flex Code
13809 \begin_layout Plain Layout
13816 \begin_inset Flex Code
13819 \begin_layout Plain Layout
13825 ] The indent of the very first line of a paragraph.
13827 \begin_inset Newline newline
13831 \begin_inset Flex Code
13834 \begin_layout Plain Layout
13840 will be fixed for a certain style.
13841 The exception is the default style, since the indentation for these paragraphs
13842 can be prohibited with
13843 \begin_inset Flex Code
13846 \begin_layout Plain Layout
13854 \begin_inset Flex Code
13857 \begin_layout Plain Layout
13863 style paragraphs inside environments use the
13864 \begin_inset Flex Code
13867 \begin_layout Plain Layout
13873 of the environment, not their native one.
13875 \begin_inset Flex Code
13878 \begin_layout Plain Layout
13884 paragraphs inside an enumeration are not indented.
13887 \begin_layout Description
13888 \begin_inset Flex Code
13891 \begin_layout Plain Layout
13898 \begin_inset Flex Code
13901 \begin_layout Plain Layout
13907 ] The vertical space between two paragraphs of this style.
13910 \begin_layout Description
13911 \begin_inset Flex Code
13914 \begin_layout Plain Layout
13921 \begin_inset Flex Code
13924 \begin_layout Plain Layout
13930 ] LyX allows the user to choose either
13931 \begin_inset Quotes eld
13935 \begin_inset Quotes erd
13939 \begin_inset Quotes eld
13943 \begin_inset Quotes erd
13946 to separate paragraphs.
13948 \begin_inset Quotes eld
13952 \begin_inset Quotes erd
13956 \begin_inset Flex Code
13959 \begin_layout Plain Layout
13967 \begin_inset Quotes eld
13971 \begin_inset Quotes erd
13975 \begin_inset Flex Code
13978 \begin_layout Plain Layout
13984 is ignored and all paragraphs are separated by the
13985 \begin_inset Flex Code
13988 \begin_layout Plain Layout
13995 The vertical space is calculated with
13996 \begin_inset Flex Code
13999 \begin_layout Plain Layout
14001 \begin_inset space ~
14010 \begin_inset Flex Code
14013 \begin_layout Plain Layout
14019 is the height of a row with the normal font.
14020 This way, the look stays the same with different screen fonts.
14023 \begin_layout Description
14024 \begin_inset Flex Code
14027 \begin_layout Plain Layout
14034 \begin_inset Flex Code
14037 \begin_layout Plain Layout
14046 \begin_inset space \thinspace{}
14050 \begin_inset Flex Code
14053 \begin_layout Plain Layout
14059 ] Whether the contents of this paragraph should be output in raw form, meaning
14060 without special translations that LaTeX would require.
14063 \begin_layout Description
14064 \begin_inset Flex Code
14067 \begin_layout Plain Layout
14073 Information to be included in the LaTeX preamble when this style is used.
14074 Used to define macros, load packages, etc., required by this particular
14077 \begin_inset Quotes eld
14081 \begin_inset Flex Code
14084 \begin_layout Plain Layout
14091 \begin_inset Quotes erd
14097 \begin_layout Description
14098 \begin_inset Flex Code
14101 \begin_layout Plain Layout
14108 \begin_inset Flex Code
14111 \begin_layout Plain Layout
14117 ] The prefix to use when creating labels referring to paragraphs of this
14119 This allows the use of formatted references.
14122 \begin_layout Description
14123 \begin_inset Flex Code
14126 \begin_layout Plain Layout
14133 \begin_inset Flex Code
14136 \begin_layout Plain Layout
14142 ] Whether the style requires the feature
14143 \begin_inset Flex Code
14146 \begin_layout Plain Layout
14153 See the description of
14154 \begin_inset Flex Code
14157 \begin_layout Plain Layout
14164 \begin_inset CommandInset ref
14166 reference "sub:General-text-class"
14170 ) for information on `features'.
14173 \begin_layout Description
14174 \begin_inset Flex Code
14177 \begin_layout Plain Layout
14184 \begin_inset Flex Code
14187 \begin_layout Plain Layout
14196 \begin_inset Flex Code
14199 \begin_layout Plain Layout
14205 ] Resets the LaTeX arguments of this style (as defined via the
14206 \begin_inset Flex Code
14209 \begin_layout Plain Layout
14216 This is useful if you have copied a style via
14217 \begin_inset Flex Code
14220 \begin_layout Plain Layout
14226 , but you do not want to inherit its (required and optional) arguments.
14229 \begin_layout Description
14230 \begin_inset Flex Code
14233 \begin_layout Plain Layout
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14249 ] A string that is put at the end of the layout content.
14250 A line break in the output can be indicated by
14251 \begin_inset Flex Code
14254 \begin_layout Plain Layout
14263 \begin_layout Description
14264 \begin_inset Flex Code
14267 \begin_layout Plain Layout
14274 \begin_inset Flex Code
14277 \begin_layout Plain Layout
14284 \begin_inset Flex Code
14287 \begin_layout Plain Layout
14296 \begin_layout Description
14297 \begin_inset Flex Code
14300 \begin_layout Plain Layout
14307 \begin_inset Flex Code
14310 \begin_layout Plain Layout
14319 \begin_inset Flex Code
14322 \begin_layout Plain Layout
14329 \begin_inset Flex Code
14332 \begin_layout Plain Layout
14339 \begin_inset Flex Code
14342 \begin_layout Plain Layout
14344 \begin_inset space ~
14352 ] This defines what the default spacing should be in the style.
14354 \begin_inset Flex Code
14357 \begin_layout Plain Layout
14364 \begin_inset Flex Code
14367 \begin_layout Plain Layout
14374 \begin_inset Flex Code
14377 \begin_layout Plain Layout
14383 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14384 If you specify the argument
14385 \begin_inset Flex Code
14388 \begin_layout Plain Layout
14394 , then you must also provide a value argument which will be the actual multiplie
14396 Note that, contrary to other parameters,
14397 \begin_inset Flex Code
14400 \begin_layout Plain Layout
14406 implies the generation of specific LaTeX code, using the LaTeX package
14410 \begin_inset Flex Code
14413 \begin_layout Plain Layout
14422 \begin_layout Description
14423 \begin_inset Flex Code
14426 \begin_layout Plain Layout
14433 \begin_inset Flex Code
14436 \begin_layout Plain Layout
14443 \begin_inset space \thinspace{}
14447 \begin_inset Flex Code
14450 \begin_layout Plain Layout
14458 ] Allow spell-checking paragraphs of this style.
14462 \begin_layout Description
14463 \begin_inset Flex Code
14466 \begin_layout Plain Layout
14472 The font used for the text body .
14474 \begin_inset CommandInset ref
14476 reference "sub:Font-description"
14483 \begin_layout Description
14484 \begin_inset Flex Code
14487 \begin_layout Plain Layout
14496 \begin_inset Flex Code
14499 \begin_layout Plain Layout
14509 The level of the style in the table of contents.
14510 This is used for automatic numbering of section headings.
14513 \begin_layout Description
14514 \begin_inset Flex Code
14517 \begin_layout Plain Layout
14524 \begin_inset Flex Code
14527 \begin_layout Plain Layout
14533 ] The vertical space with which the very first of a chain of paragraphs
14534 with this style is separated from the previous paragraph.
14535 If the previous paragraph has another style, the separations are not simply
14536 added, but the maximum is taken.
14539 \begin_layout Subsection
14540 \begin_inset CommandInset label
14546 Internationalization of Paragraph Styles
14549 \begin_layout Standard
14550 LyX has long supported internationalization of layout information, but,
14551 until version 2.0, this applied only to the user interface and not to, say,
14553 Thus, French authors were forced to resort to ugly hacks if they wanted
14558 1' instead of `Theorem 1'.
14559 Thanks to Georg Baum, that is no longer the case.
14562 \begin_layout Standard
14564 \begin_inset Flex Code
14567 \begin_layout Plain Layout
14573 defines text that is to appear in the typeset document, it may use
14574 \begin_inset Flex Code
14577 \begin_layout Plain Layout
14584 \begin_inset Flex Code
14587 \begin_layout Plain Layout
14593 to support non-English and even multi-language documents correctly.
14594 The following excerpt (from the
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14604 file) shows how this works:
14607 \begin_layout LyX-Code
14612 \begin_layout LyX-Code
14615 theoremstyle{remark}
14618 \begin_layout LyX-Code
14621 newtheorem{claim}[thm]{
14628 \begin_layout LyX-Code
14632 \begin_layout LyX-Code
14636 \begin_layout LyX-Code
14641 claimname}{_(Claim)}
14644 \begin_layout LyX-Code
14648 \begin_layout LyX-Code
14652 \begin_layout LyX-Code
14661 claimname}{_(Claim)}}
14664 \begin_layout LyX-Code
14669 \begin_layout Standard
14670 In principle, any legal LaTeX may appear in the
14671 \begin_inset Flex Code
14674 \begin_layout Plain Layout
14681 \begin_inset Flex Code
14684 \begin_layout Plain Layout
14690 tags, but in practice they will typically look as they do here.
14691 The key to correct translation of the typeset text is the definition of
14693 \begin_inset Flex Code
14696 \begin_layout Plain Layout
14705 \begin_inset Flex Code
14708 \begin_layout Plain Layout
14720 \begin_layout Standard
14722 \begin_inset Flex Code
14725 \begin_layout Plain Layout
14731 tag provides for internationalization based upon the overall language of
14733 The contents of the tag will be included in the preamble, just as with
14735 \begin_inset Flex Code
14738 \begin_layout Plain Layout
14745 What makes it special is the use of the
14746 \begin_inset Quotes eld
14750 \begin_inset Quotes erd
14754 \begin_inset Flex Code
14757 \begin_layout Plain Layout
14763 , which will be replaced, when LyX produces LaTeX output, with the translation
14764 of its argument into the document language.
14767 \begin_layout Standard
14769 \begin_inset Flex Code
14772 \begin_layout Plain Layout
14778 tag is more complex, since it is meant to provide support for multi-language
14779 documents and so offers an interface to the
14780 \begin_inset Flex Code
14783 \begin_layout Plain Layout
14790 Its contents will be added to the preamble once for each language that
14791 appears in the document.
14792 In this case, the argument to
14793 \begin_inset Flex Code
14796 \begin_layout Plain Layout
14802 will be replaced with its translation into the language in question; the
14804 \begin_inset Flex Code
14807 \begin_layout Plain Layout
14813 is replaced by the language name (as used by the babel package).
14816 \begin_layout Standard
14817 A German document that also included a French section would thus have the
14818 following in the preamble:
14821 \begin_layout LyX-Code
14830 claimname}{Affirmation}}
14831 \begin_inset Newline newline
14842 claimname}{Behauptung}}
14843 \begin_inset Newline newline
14850 claimname}{Behauptung}
14853 \begin_layout Standard
14855 \begin_inset Flex Code
14858 \begin_layout Plain Layout
14864 will then conspire to produce the correct text in the output.
14867 \begin_layout Standard
14868 One important point to note here is that the translations are provided by
14869 LyX itself, through the
14870 \change_inserted -195340706 1334775793
14872 \begin_inset Flex Code
14875 \begin_layout Plain Layout
14877 \change_inserted -195340706 1334775793
14884 \change_deleted -195340706 1334775793
14885 same mechanism it uses for internationalization of the user interface
14888 This means, in effect, that
14889 \begin_inset Flex Code
14892 \begin_layout Plain Layout
14899 \begin_inset Flex Code
14902 \begin_layout Plain Layout
14908 are really only of use in layout files that are provided with LyX, since
14909 text entered in user-created layout files will not be seen by LyX's internation
14911 \change_inserted -195340706 1334775793
14913 \begin_inset Flex Code
14916 \begin_layout Plain Layout
14918 \change_inserted -195340706 1334775793
14924 file is modified accordingly
14927 That said, however, any layout created with the intention that it will
14928 be included with LyX should use these tags where appropriate.
14930 \change_inserted -195340706 1334775793
14931 Please note that the paragraph style translations provided by LyX will
14932 never change with a minor update (
14935 \begin_inset space \thinspace{}
14939 \begin_inset space \space{}
14943 \change_inserted -195340706 1334775793
14944 from version 2.1.x to 2.1.y).
14945 It is however quite likely that a major update (
14948 \begin_inset space \thinspace{}
14952 \begin_inset space \space{}
14956 \change_inserted -195340706 1334775793
14957 from 2.0.x to 2.1.y) will introduce new translations or corrections.
14962 \begin_layout Subsection
14964 \begin_inset CommandInset label
14973 \begin_layout Standard
14974 It is necessary to define the floats (
14975 \begin_inset Flex MenuItem
14978 \begin_layout Plain Layout
14985 \begin_inset Flex MenuItem
14988 \begin_layout Plain Layout
14994 , \SpecialChar \ldots{}
14995 ) in the text class itself.
14996 Standard floats are included in the file
14997 \begin_inset Flex Code
15000 \begin_layout Plain Layout
15006 , so you may have to do no more than add
15009 \begin_layout LyX-Code
15010 Input stdfloats.inc
15013 \begin_layout Standard
15014 to your layout file.
15015 If you want to implement a text class that proposes some other float types
15016 (like the AGU class bundled with LyX), the information below will hopefully
15020 \begin_layout Description
15021 \begin_inset Flex Code
15024 \begin_layout Plain Layout
15031 \begin_inset Flex Code
15034 \begin_layout Plain Layout
15041 \begin_inset Quotes erd
15045 \begin_inset Quotes erd
15048 ] The file name extension of an auxiliary file for the list of figures (or
15050 LaTeX writes the captions to this file.
15053 \begin_layout Description
15054 \begin_inset Flex Code
15057 \begin_layout Plain Layout
15064 \begin_inset Flex Code
15067 \begin_layout Plain Layout
15074 \begin_inset Quotes erd
15078 \begin_inset Quotes erd
15081 ] The string that will be used in the menus and also for the caption.
15082 This is translated to the current language if babel is used.
15085 \begin_layout Description
15086 \begin_inset Flex Code
15089 \begin_layout Plain Layout
15095 These tags control the XHTML output.
15097 \begin_inset CommandInset ref
15099 reference "sec:Tags-for-XHTML"
15106 \begin_layout Description
15107 \begin_inset Flex Code
15110 \begin_layout Plain Layout
15119 \begin_inset Flex Code
15122 \begin_layout Plain Layout
15131 \begin_inset space \thinspace{}
15135 \begin_inset Flex Code
15138 \begin_layout Plain Layout
15144 ] Indicates whether the float is already defined in the document class or
15145 if instead the LaTeX package
15146 \begin_inset Flex Code
15149 \begin_layout Plain Layout
15155 needs to be loaded to define it on-the-fly.
15157 \begin_inset Flex Code
15160 \begin_layout Plain Layout
15167 \begin_inset Flex Code
15170 \begin_layout Plain Layout
15177 It should be set to
15178 \begin_inset Flex Code
15181 \begin_layout Plain Layout
15187 if the float is already defined by the LaTeX document class.
15190 \begin_layout Description
15191 \begin_inset Flex Code
15194 \begin_layout Plain Layout
15201 \begin_inset Flex Code
15204 \begin_layout Plain Layout
15211 \begin_inset Quotes erd
15215 \begin_inset Quotes erd
15218 ] The command used to generate a list of floats of this type; the leading
15227 \begin_inset Flex Code
15230 \begin_layout Plain Layout
15236 is false, since there is no standard way to generate this command.
15238 \begin_inset Flex Code
15241 \begin_layout Plain Layout
15247 is true, since in that case there is a standard way to define the command.
15250 \begin_layout Description
15251 \begin_inset Flex Code
15254 \begin_layout Plain Layout
15261 \begin_inset Flex Code
15264 \begin_layout Plain Layout
15271 \begin_inset Quotes erd
15275 \begin_inset Quotes erd
15278 ] A title for a list of floats of this kind (list of figures, tables, or
15280 It is used for the screen label within LyX, it is used by LaTeX for the
15281 title and it is used as the title in the XHTML output.
15282 It will be translated to the document language.
15285 \begin_layout Description
15286 \begin_inset Flex Code
15289 \begin_layout Plain Layout
15296 \begin_inset Flex Code
15299 \begin_layout Plain Layout
15306 \begin_inset Quotes erd
15310 \begin_inset Quotes erd
15313 ] This (optional) argument determines whether floats of this class will
15314 be numbered within some sectional unit of the document.
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15326 \begin_inset Quotes eld
15330 \begin_inset Flex Code
15333 \begin_layout Plain Layout
15340 \begin_inset Quotes erd
15343 , the floats will be numbered within chapters.
15347 \begin_layout Description
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15358 \begin_inset Flex Code
15361 \begin_layout Plain Layout
15368 \begin_inset Quotes erd
15372 \begin_inset Quotes erd
15375 ] The default placement for the given class of floats.
15376 The string should be as in standard LaTeX:
15377 \begin_inset Flex Code
15380 \begin_layout Plain Layout
15387 \begin_inset Flex Code
15390 \begin_layout Plain Layout
15397 \begin_inset Flex Code
15400 \begin_layout Plain Layout
15407 \begin_inset Flex Code
15410 \begin_layout Plain Layout
15416 for top, bottom, page, and here, respectively.
15420 \begin_layout Plain Layout
15421 Note that the order of these letters in the string is irrelevant, like in
15427 On top of that there is a new type,
15428 \begin_inset Flex Code
15431 \begin_layout Plain Layout
15437 , which does not really correspond to a float, since it means: put it
15438 \begin_inset Quotes eld
15442 \begin_inset Quotes erd
15446 Note however that the
15447 \begin_inset Flex Code
15450 \begin_layout Plain Layout
15456 specifier is special and, because of implementation details, cannot be
15457 used in non-built in float types.
15458 If you do not understand what this means, just use
15459 \begin_inset Quotes eld
15463 \begin_inset Flex Code
15466 \begin_layout Plain Layout
15473 \begin_inset Quotes erd
15479 \begin_layout Description
15480 \begin_inset Flex Code
15483 \begin_layout Plain Layout
15490 \begin_inset Flex Code
15493 \begin_layout Plain Layout
15499 ] The prefix to use when creating labels referring to floats of this type.
15500 This allows the use of formatted references.
15501 Note that you can remove any
15502 \begin_inset Flex Code
15505 \begin_layout Plain Layout
15511 set by a copied style by using the special value
15512 \begin_inset Quotes eld
15516 \begin_inset Quotes erd
15519 , which must be all caps.
15522 \begin_layout Description
15523 \begin_inset Flex Code
15526 \begin_layout Plain Layout
15533 \begin_inset Flex Code
15536 \begin_layout Plain Layout
15543 \begin_inset Quotes erd
15547 \begin_inset Quotes erd
15550 ] The style used when defining the float using
15551 \begin_inset Flex Code
15554 \begin_layout Plain Layout
15565 \begin_layout Description
15566 \begin_inset Flex Code
15569 \begin_layout Plain Layout
15576 \begin_inset Flex Code
15579 \begin_layout Plain Layout
15586 \begin_inset Quotes erd
15590 \begin_inset Quotes erd
15594 \begin_inset Quotes eld
15598 \begin_inset Quotes erd
15601 of the new class of floats, like program or algorithm.
15602 After the appropriate
15603 \begin_inset Flex Code
15606 \begin_layout Plain Layout
15615 \begin_inset Flex Code
15618 \begin_layout Plain Layout
15627 \begin_inset Flex Code
15630 \begin_layout Plain Layout
15641 \begin_layout Description
15642 \begin_inset Flex Code
15645 \begin_layout Plain Layout
15652 \begin_inset Flex Code
15655 \begin_layout Plain Layout
15662 \begin_inset space \thinspace{}
15666 \begin_inset Flex Code
15669 \begin_layout Plain Layout
15677 ] Specifies whether this float is defined using the LaTeX package
15678 \begin_inset Flex Code
15681 \begin_layout Plain Layout
15687 , either by the class file, another package or on-the-fly by LyX itself.
15690 \begin_layout Standard
15691 Note that defining a float with type
15692 \begin_inset Flex Code
15695 \begin_layout Plain Layout
15703 automatically defines the corresponding counter with name
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15718 \begin_layout Subsection
15719 Flex insets and InsetLayout
15720 \begin_inset CommandInset label
15722 name "sub:Flex-insets-and"
15729 \begin_layout Standard
15730 Flex insets come in three different kinds:
15733 \begin_layout Itemize
15735 \begin_inset Flex Code
15738 \begin_layout Plain Layout
15744 ): These define semantic markup corresponding to such LaTeX commands as
15746 \begin_inset Flex Code
15749 \begin_layout Plain Layout
15758 \begin_inset Flex Code
15761 \begin_layout Plain Layout
15772 \begin_layout Itemize
15774 \begin_inset Flex Code
15777 \begin_layout Plain Layout
15783 ): These can be used to define custom collapsible insets, similar to TeX
15784 code, footnote, and the like.
15785 An obvious example is an endnote inset, which is defined in the
15786 \begin_inset Flex Code
15789 \begin_layout Plain Layout
15798 \begin_layout Itemize
15800 \begin_inset Flex Code
15803 \begin_layout Plain Layout
15809 ): For use with DocBook classes.
15812 \begin_layout Standard
15813 Flex insets are defined using the
15814 \begin_inset Flex Code
15817 \begin_layout Plain Layout
15823 tag, which shall be explained in a moment.
15826 \begin_layout Standard
15828 \begin_inset Flex Code
15831 \begin_layout Plain Layout
15837 tag also serves another function: It can be used to customize the general
15838 layout of many different types of insets.
15840 \begin_inset Flex Code
15843 \begin_layout Plain Layout
15849 can be used to customize the layout parameters for footnotes, marginal
15850 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15851 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15855 \begin_layout Standard
15857 \begin_inset Flex Code
15860 \begin_layout Plain Layout
15866 definition must begin with a line of the form:
15869 \begin_layout LyX-Code
15873 \begin_layout Standard
15875 \begin_inset Flex Code
15878 \begin_layout Plain Layout
15884 indicates the inset whose layout is being defined, and here there are four
15888 \begin_layout Enumerate
15889 The layout for a pre-existing inset is being modified.
15890 In this case, can be
15891 \begin_inset Flex Code
15894 \begin_layout Plain Layout
15900 any one of the following:
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15911 \begin_inset Flex Code
15914 \begin_layout Plain Layout
15921 \begin_inset Flex Code
15924 \begin_layout Plain Layout
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15941 \begin_inset Flex Code
15944 \begin_layout Plain Layout
15951 \begin_inset Flex Code
15954 \begin_layout Plain Layout
15961 \begin_inset Flex Code
15964 \begin_layout Plain Layout
15971 \begin_inset Flex Code
15974 \begin_layout Plain Layout
15981 \begin_inset Flex Code
15984 \begin_layout Plain Layout
15991 \begin_inset Flex Code
15994 \begin_layout Plain Layout
16001 \begin_inset Flex Code
16004 \begin_layout Plain Layout
16011 \begin_inset Flex Code
16014 \begin_layout Plain Layout
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16031 \begin_inset Flex Code
16034 \begin_layout Plain Layout
16041 \begin_inset Flex Code
16044 \begin_layout Plain Layout
16051 \begin_inset Flex Code
16054 \begin_layout Plain Layout
16061 \begin_inset Flex Code
16064 \begin_layout Plain Layout
16071 \begin_inset Flex Code
16074 \begin_layout Plain Layout
16081 \begin_inset Flex Code
16084 \begin_layout Plain Layout
16091 \begin_inset Flex Code
16094 \begin_layout Plain Layout
16103 \begin_layout Enumerate
16104 The layout for a Flex inset is being defined.
16106 \begin_inset Flex Code
16109 \begin_layout Plain Layout
16115 must be of the form
16116 \begin_inset Quotes eld
16120 \begin_inset Flex Code
16123 \begin_layout Plain Layout
16130 \begin_inset Quotes erd
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16143 may be be any valid identifier not used by a pre-existing Flex inset.
16144 The identifier may include spaces, but in that case the whole thing must
16145 be wrapped in quotes.
16146 Note that the definition of a flex inset
16151 \begin_inset Flex Code
16154 \begin_layout Plain Layout
16160 entry, declaring which type of inset it defines.
16163 \begin_layout Enumerate
16164 The layout for user specific branch is being defined.
16166 \begin_inset Flex Code
16169 \begin_layout Plain Layout
16175 must be of the form
16176 \begin_inset Quotes eld
16180 \begin_inset Flex Code
16183 \begin_layout Plain Layout
16190 \begin_inset Quotes erd
16194 \begin_inset Flex Code
16197 \begin_layout Plain Layout
16203 may be be any valid identifier of branch defined in user's document.
16204 The identifier may include spaces, but in that case the whole thing must
16205 be wrapped in quotes.
16206 The main purpose of this feature is to allow LaTeX wrapping around specific
16207 branches as user needs.
16210 \begin_layout Enumerate
16211 The layout of a user (or class) specific caption is being defined.
16213 \begin_inset Flex Code
16216 \begin_layout Plain Layout
16222 must be of the form
16223 \begin_inset Quotes eld
16227 \begin_inset Flex Code
16230 \begin_layout Plain Layout
16237 \begin_inset Quotes erd
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16250 specifies the name of the caption as it appears in the menu.
16251 Have a look at the standard caption (
16252 \begin_inset Flex Code
16255 \begin_layout Plain Layout
16261 ), the specific captions of the KOMA-Script classes (
16262 \begin_inset Flex Code
16265 \begin_layout Plain Layout
16272 \begin_inset Flex Code
16275 \begin_layout Plain Layout
16284 \begin_inset space ~
16290 \begin_inset Flex Code
16293 \begin_layout Plain Layout
16299 ) for applications.
16302 \begin_layout Standard
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16313 definition can contain the following entries:
16316 \begin_layout Description
16317 \begin_inset Flex Code
16320 \begin_layout Plain Layout
16327 \begin_inset Flex Code
16330 \begin_layout Plain Layout
16336 ] Defines argument number of a command\SpecialChar \slash{}
16337 environment associated with the current
16339 The definition must end with
16340 \begin_inset Flex Code
16343 \begin_layout Plain Layout
16351 \begin_inset CommandInset ref
16353 reference "sub:Paragraph-Styles"
16360 \begin_layout Description
16361 \begin_inset Flex Code
16364 \begin_layout Plain Layout
16370 Preamble for changing language commands; see
16371 \begin_inset CommandInset ref
16373 reference "sub:I18n"
16380 \begin_layout Description
16381 \begin_inset Flex Code
16384 \begin_layout Plain Layout
16391 \begin_inset Flex Code
16394 \begin_layout Plain Layout
16400 ] The color for the inset's background.
16402 \begin_inset CommandInset ref
16404 reference "chap:Names-of-colors"
16408 for a list of the available color names.
16411 \begin_layout Description
16412 \begin_inset Flex Code
16415 \begin_layout Plain Layout
16422 \begin_inset Flex Code
16425 \begin_layout Plain Layout
16434 \begin_inset space \thinspace{}
16438 \begin_inset Flex Code
16441 \begin_layout Plain Layout
16447 ] Whether to use the content of the inset as the label, when the inset is
16452 \begin_layout Description
16453 \begin_inset Flex Code
16456 \begin_layout Plain Layout
16463 \begin_inset Flex Code
16466 \begin_layout Plain Layout
16472 ] As with paragraph styles, see
16473 \begin_inset CommandInset ref
16475 reference "sub:Paragraph-Styles"
16480 Note that you need to specify the complete type, e.
16481 \begin_inset space \thinspace{}
16485 \begin_inset space ~
16489 \begin_inset Flex Code
16492 \begin_layout Plain Layout
16493 CopyStyle Flex:<name>
16501 \begin_layout Description
16502 \begin_inset Flex Code
16505 \begin_layout Plain Layout
16512 \begin_inset Flex Code
16515 \begin_layout Plain Layout
16524 \begin_inset space \thinspace{}
16528 \begin_inset Flex Code
16531 \begin_layout Plain Layout
16537 ] Indicates whether the user may employ the Paragraph Settings dialog to
16538 customize the paragraph.
16541 \begin_layout Description
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16552 \begin_inset Flex Code
16555 \begin_layout Plain Layout
16562 \begin_inset Flex Code
16565 \begin_layout Plain Layout
16572 \begin_inset Flex Code
16575 \begin_layout Plain Layout
16581 , describing the rendering style used for the inset's frame and buttons.
16582 Footnotes generally use
16583 \begin_inset Flex Code
16586 \begin_layout Plain Layout
16592 , ERT insets generally
16593 \begin_inset Flex Code
16596 \begin_layout Plain Layout
16602 , and character styles
16603 \begin_inset Flex Code
16606 \begin_layout Plain Layout
16615 \begin_layout Description
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16626 \begin_inset Flex Code
16629 \begin_layout Plain Layout
16638 \begin_inset space \thinspace{}
16644 \begin_inset Flex Code
16647 \begin_layout Plain Layout
16656 \begin_inset Flex Code
16659 \begin_layout Plain Layout
16666 \begin_inset Flex Code
16669 \begin_layout Plain Layout
16676 Indicates whether the environment will stand on its own in the output or
16677 will appear inline with the surrounding text.
16678 If set to false, it is supposed that the LaTeX environment ignores white
16679 space (including one newline character) after the
16680 \begin_inset Flex Code
16683 \begin_layout Plain Layout
16696 \begin_inset Flex Code
16699 \begin_layout Plain Layout
16715 \begin_layout Description
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16725 Required at the end of the
16726 \begin_inset Flex Code
16729 \begin_layout Plain Layout
16738 \begin_layout Description
16739 \begin_inset Flex Code
16742 \begin_layout Plain Layout
16748 The font used for both the text body
16754 \begin_inset CommandInset ref
16756 reference "sub:Font-description"
16761 Note that defining this font automatically defines the
16762 \begin_inset Flex Code
16765 \begin_layout Plain Layout
16771 to the same value, so define this first and define
16772 \begin_inset Flex Code
16775 \begin_layout Plain Layout
16781 later if you want them to be different.
16784 \begin_layout Description
16785 \begin_inset Flex Code
16788 \begin_layout Plain Layout
16789 ForceLocalFontSwitch
16795 \begin_inset Flex Code
16798 \begin_layout Plain Layout
16807 \begin_inset space \thinspace{}
16811 \begin_inset Flex Code
16814 \begin_layout Plain Layout
16820 ] When using babel, always use a local font switch (
16821 \begin_inset Flex Code
16824 \begin_layout Plain Layout
16832 ), never a global one (such as
16833 \begin_inset Flex Code
16836 \begin_layout Plain Layout
16847 \begin_layout Description
16848 \begin_inset Flex Code
16851 \begin_layout Plain Layout
16858 \begin_inset Flex Code
16861 \begin_layout Plain Layout
16870 \begin_inset space \thinspace{}
16874 \begin_inset Flex Code
16877 \begin_layout Plain Layout
16884 \begin_inset Quotes eld
16888 \begin_inset Quotes erd
16891 language, leading to Left-to-Right (Latin) output, e.
16892 \begin_inset space \thinspace{}
16896 \begin_inset space \space{}
16899 in TeX code or URL.
16903 \begin_layout Description
16904 \begin_inset Flex Code
16907 \begin_layout Plain Layout
16914 \begin_inset Flex Code
16917 \begin_layout Plain Layout
16926 \begin_inset space \thinspace{}
16930 \begin_inset Flex Code
16933 \begin_layout Plain Layout
16939 ] Indicates whether the
16940 \begin_inset Flex Code
16943 \begin_layout Plain Layout
16949 should be used or, instead, the user can change the paragraph style used
16954 \begin_layout Description
16955 \begin_inset Flex Code
16958 \begin_layout Plain Layout
16965 \begin_inset Flex Code
16968 \begin_layout Plain Layout
16977 \begin_inset space \thinspace{}
16981 \begin_inset Flex Code
16984 \begin_layout Plain Layout
16990 ] As with paragraph styles, see
16991 \begin_inset CommandInset ref
16993 reference "sub:Paragraph-Styles"
17000 \begin_layout Description
17001 \begin_inset Flex Code
17004 \begin_layout Plain Layout
17010 These tags control the XHTML output.
17012 \begin_inset CommandInset ref
17014 reference "sec:Tags-for-XHTML"
17021 \begin_layout Description
17022 \begin_inset Flex Code
17025 \begin_layout Plain Layout
17032 \begin_inset Flex Code
17035 \begin_layout Plain Layout
17044 \begin_inset space \thinspace{}
17048 \begin_inset Flex Code
17051 \begin_layout Plain Layout
17057 ] Whether to include the contents of this inset in the strings generated
17058 for the `Outline' pane.
17059 One would not, for example, want the content of a footnote in a section
17060 header to be included in the TOC displayed in the outline, but one would
17061 normally want the content of a character style displayed.
17062 Default is false: not to include.
17065 \begin_layout Description
17066 \begin_inset Flex Code
17069 \begin_layout Plain Layout
17078 \begin_inset Flex Code
17081 \begin_layout Plain Layout
17090 \begin_inset space \thinspace{}
17094 \begin_inset Flex Code
17097 \begin_layout Plain Layout
17103 ] As with paragraph styles, see
17104 \begin_inset CommandInset ref
17106 reference "sub:Paragraph-Styles"
17113 \begin_layout Description
17114 \begin_inset Flex Code
17117 \begin_layout Plain Layout
17123 The font used for the label.
17125 \begin_inset CommandInset ref
17127 reference "sub:Font-description"
17132 Note that this definition can never appear before
17133 \begin_inset Flex Code
17136 \begin_layout Plain Layout
17142 , lest it be ineffective.
17145 \begin_layout Description
17146 \begin_inset Flex Code
17149 \begin_layout Plain Layout
17156 \begin_inset Flex Code
17159 \begin_layout Plain Layout
17166 \begin_inset Quotes erd
17170 \begin_inset Quotes erd
17173 ] What will be displayed on the button or elsewhere as the inset label.
17175 \begin_inset Flex Code
17178 \begin_layout Plain Layout
17185 \begin_inset Flex Code
17188 \begin_layout Plain Layout
17194 ) modify this label on the fly.
17197 \begin_layout Description
17198 \begin_inset Flex Code
17201 \begin_layout Plain Layout
17207 Language dependent preamble; see
17208 \begin_inset CommandInset ref
17210 reference "sub:I18n"
17217 \begin_layout Description
17218 \begin_inset Flex Code
17221 \begin_layout Plain Layout
17228 \begin_inset Flex Code
17231 \begin_layout Plain Layout
17237 ] The name of the corresponding LaTeX stuff.
17238 Either the environment or command name.
17241 \begin_layout Description
17242 \begin_inset Flex Code
17245 \begin_layout Plain Layout
17252 \begin_inset Flex Code
17255 \begin_layout Plain Layout
17261 ] The optional parameter for the corresponding
17262 \begin_inset Flex Code
17265 \begin_layout Plain Layout
17271 stuff, including possible bracket pairs like
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17282 This parameter cannot be changed from within LyX (use
17283 \begin_inset Flex Code
17286 \begin_layout Plain Layout
17292 for customizable parameters).
17293 It will be output as is after all LaTeX
17294 \begin_inset Flex Code
17297 \begin_layout Plain Layout
17306 \begin_layout Description
17307 \begin_inset Flex Code
17310 \begin_layout Plain Layout
17317 \begin_inset Flex Code
17320 \begin_layout Plain Layout
17321 Command, Environment, None
17326 ] How the style should be translated into LaTeX.
17330 \begin_layout Plain Layout
17331 \begin_inset Flex Code
17334 \begin_layout Plain Layout
17340 is perhaps a bit misleading, since these rules apply to SGML classes too.
17341 Visit the SGML class files for specific examples.
17350 \begin_layout Description
17351 \begin_inset Flex Code
17354 \begin_layout Plain Layout
17360 means nothing special
17363 \begin_layout Description
17364 \begin_inset Flex Code
17367 \begin_layout Plain Layout
17374 \begin_inset Flex Code
17377 \begin_layout Plain Layout
17384 {\SpecialChar \ldots{}
17393 \begin_layout Description
17394 \begin_inset Flex Code
17397 \begin_layout Plain Layout
17404 \begin_inset Flex Code
17407 \begin_layout Plain Layout
17414 }\SpecialChar \ldots{}
17429 \begin_layout Standard
17430 Putting the last few things together, the LaTeX output will be either:
17433 \begin_layout LyX-Code
17436 LatexName[LatexParam]{\SpecialChar \ldots{}
17440 \begin_layout Standard
17444 \begin_layout LyX-Code
17447 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17453 \begin_layout Standard
17454 depending upon the LaTeX type.
17458 \begin_layout Description
17459 \begin_inset Flex Code
17462 \begin_layout Plain Layout
17469 \begin_inset Flex Code
17472 \begin_layout Plain Layout
17478 ] A string that is put at the beginning of the layout content.
17479 A line break in the output can be indicated by
17480 \begin_inset Flex Code
17483 \begin_layout Plain Layout
17492 \begin_layout Description
17493 \begin_inset Flex Code
17496 \begin_layout Plain Layout
17503 \begin_inset Flex Code
17506 \begin_layout Plain Layout
17513 \begin_inset Flex Code
17516 \begin_layout Plain Layout
17523 \begin_inset Flex Code
17526 \begin_layout Plain Layout
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17542 (indicating a dummy definition ending definitions of charstyles, etc).
17543 This entry is required in and is only meaningful for Flex insets.
17544 Among other things, it determines on which menu this inset will appear.
17546 \begin_inset Flex Code
17549 \begin_layout Plain Layout
17556 \begin_inset Flex Code
17559 \begin_layout Plain Layout
17565 will automatically set
17566 \begin_inset Flex Code
17569 \begin_layout Plain Layout
17577 \begin_inset Flex Code
17580 \begin_layout Plain Layout
17586 can be set to true for
17587 \begin_inset Flex Code
17590 \begin_layout Plain Layout
17596 insets by setting it
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17613 \begin_layout Description
17614 \begin_inset Flex Code
17617 \begin_layout Plain Layout
17624 \begin_inset Flex Code
17627 \begin_layout Plain Layout
17636 \begin_inset space \thinspace{}
17640 \begin_inset Flex Code
17643 \begin_layout Plain Layout
17649 ] Whether multiple paragraphs are permitted in this inset.
17651 \begin_inset Flex Code
17654 \begin_layout Plain Layout
17660 to the same value and
17661 \begin_inset Flex Code
17664 \begin_layout Plain Layout
17670 to the opposite value.
17671 These can be reset to other values, if they are used
17676 \begin_inset Flex Code
17679 \begin_layout Plain Layout
17689 \begin_layout Description
17690 \begin_inset Flex Code
17693 \begin_layout Plain Layout
17700 \begin_inset Flex Code
17703 \begin_layout Plain Layout
17712 \begin_inset space \thinspace{}
17716 \begin_inset Flex Code
17719 \begin_layout Plain Layout
17725 ] Whether fragile commands in this inset should be
17726 \begin_inset Flex Code
17729 \begin_layout Plain Layout
17742 whether the command should itself be protected.) Default is false.
17745 \begin_layout Description
17746 \begin_inset Flex Code
17749 \begin_layout Plain Layout
17756 \begin_inset Flex Code
17759 \begin_layout Plain Layout
17765 ] Deletes an existing
17766 \begin_inset Flex Code
17769 \begin_layout Plain Layout
17778 \begin_layout Description
17779 \begin_inset Flex Code
17782 \begin_layout Plain Layout
17789 \begin_inset Flex Code
17792 \begin_layout Plain Layout
17801 \begin_inset space \thinspace{}
17805 \begin_inset Flex Code
17808 \begin_layout Plain Layout
17814 ] As with paragraph styles, see
17815 \begin_inset CommandInset ref
17817 reference "sub:Paragraph-Styles"
17825 \begin_layout Description
17826 \begin_inset Flex Code
17829 \begin_layout Plain Layout
17836 \begin_inset Flex Code
17839 \begin_layout Plain Layout
17848 \begin_inset space \thinspace{}
17852 \begin_inset Flex Code
17855 \begin_layout Plain Layout
17861 ] As with paragraph styles, see
17862 \begin_inset CommandInset ref
17864 reference "sub:Paragraph-Styles"
17872 \begin_layout Description
17873 \begin_inset Flex Code
17876 \begin_layout Plain Layout
17882 As with paragraph styles, see
17883 \begin_inset CommandInset ref
17885 reference "sub:Paragraph-Styles"
17892 \begin_layout Description
17893 \begin_inset Flex Code
17896 \begin_layout Plain Layout
17903 \begin_inset Flex Code
17906 \begin_layout Plain Layout
17912 ] The prefix to use when creating labels referring to insets of this type.
17913 This allows the use of formatted references.
17916 \begin_layout Description
17917 \begin_inset Flex Code
17920 \begin_layout Plain Layout
17927 \begin_inset Flex Code
17930 \begin_layout Plain Layout
17936 ] As with paragraph styles, see
17937 \begin_inset CommandInset ref
17939 reference "sub:Paragraph-Styles"
17946 \begin_layout Description
17947 \begin_inset Flex Code
17950 \begin_layout Plain Layout
17957 \begin_inset Flex Code
17960 \begin_layout Plain Layout
17969 \begin_inset space \thinspace{}
17973 \begin_inset Flex Code
17976 \begin_layout Plain Layout
17982 ] Resets the LaTeX arguments of this layout (as defined via the
17983 \begin_inset Flex Code
17986 \begin_layout Plain Layout
17993 This is useful if you have copied a style via
17994 \begin_inset Flex Code
17997 \begin_layout Plain Layout
18003 , but you do not want to inherit its (required and optional) arguments.
18006 \begin_layout Description
18007 \begin_inset Flex Code
18010 \begin_layout Plain Layout
18017 \begin_inset Flex Code
18020 \begin_layout Plain Layout
18027 \begin_inset space \thinspace{}
18031 \begin_inset Flex Code
18034 \begin_layout Plain Layout
18042 ] Whether this inset should use the font of its surrounding environment
18044 Default is true: uses its own.
18047 \begin_layout Description
18048 \begin_inset Flex Code
18051 \begin_layout Plain Layout
18058 \begin_inset Flex Code
18061 \begin_layout Plain Layout
18067 ] A string that is put at the end of the layout content.
18068 A line break in the output can be indicated by
18069 \begin_inset Flex Code
18072 \begin_layout Plain Layout
18081 \begin_layout Description
18082 \begin_inset Flex Code
18085 \begin_layout Plain Layout
18092 \begin_inset Flex Code
18095 \begin_layout Plain Layout
18102 \begin_inset space \thinspace{}
18106 \begin_inset Flex Code
18109 \begin_layout Plain Layout
18117 ] Allow spell-checking the contents of this inset.
18121 \begin_layout Subsection
18123 \begin_inset CommandInset label
18125 name "sub:Counters"
18132 \begin_layout Standard
18133 It is necessary to define the counters (
18134 \begin_inset Flex MenuItem
18137 \begin_layout Plain Layout
18144 \begin_inset Flex MenuItem
18147 \begin_layout Plain Layout
18153 , \SpecialChar \ldots{}
18154 ) in the text class itself.
18155 The standard counters are defined in the file
18156 \begin_inset Flex Code
18159 \begin_layout Plain Layout
18165 , so you may have to do no more than add
18168 \begin_layout LyX-Code
18169 Input stdcounters.inc
18172 \begin_layout Standard
18173 to your layout file to get them to work.
18174 But if you want to define custom counters, then you can do so.
18175 The counter declaration must begin with:
18178 \begin_layout LyX-Code
18179 Counter CounterName
18182 \begin_layout Standard
18184 \begin_inset Flex Code
18187 \begin_layout Plain Layout
18193 ' is replaced by the name of the counter.
18194 And it must end with
18195 \begin_inset Quotes eld
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18209 \begin_inset Quotes erd
18213 The following parameters can also be used:
18216 \begin_layout Description
18217 \begin_inset Flex Code
18220 \begin_layout Plain Layout
18227 \begin_inset Flex Code
18230 \begin_layout Plain Layout
18236 ] Sets the initial value for the counter, to which it will be reset whenever
18238 Normally, one will want the default, 1.
18241 \begin_layout Description
18242 \begin_inset Flex Code
18245 \begin_layout Plain Layout
18252 \begin_inset Flex Code
18255 \begin_layout Plain Layout
18262 \begin_inset Quotes erd
18266 \begin_inset Quotes erd
18269 ] When defined, this string defines how the counter is displayed.
18270 Setting this value sets
18271 \begin_inset Flex Code
18274 \begin_layout Plain Layout
18275 LabelStringAppendix
18281 The following special constructs can be used in the string:
18285 \begin_layout Itemize
18286 \begin_inset Flex Code
18289 \begin_layout Plain Layout
18297 will be replaced by the expansion of the
18298 \begin_inset Flex Code
18301 \begin_layout Plain Layout
18308 \begin_inset Flex Code
18311 \begin_layout Plain Layout
18312 LabelStringAppendix
18318 \begin_inset Flex Code
18321 \begin_layout Plain Layout
18331 \begin_layout Itemize
18332 counter values can be expressed using LaTeX-like macros
18333 \begin_inset Newline newline
18337 \begin_inset Flex Code
18340 \begin_layout Plain Layout
18357 \begin_inset Flex Code
18360 \begin_layout Plain Layout
18372 \begin_layout Plain Layout
18382 Actually, the situation is a bit more complicated: any
18401 other than those described below will produce arabic numerals.
18402 It would not be surprising to see this change in the future.
18408 \begin_inset Flex Code
18411 \begin_layout Plain Layout
18417 : 1, 2, 3,\SpecialChar \ldots{}
18419 \begin_inset Flex Code
18422 \begin_layout Plain Layout
18428 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18430 \begin_inset Flex Code
18433 \begin_layout Plain Layout
18439 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18450 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18452 \begin_inset Flex Code
18455 \begin_layout Plain Layout
18461 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18463 \begin_inset Flex Code
18466 \begin_layout Plain Layout
18472 for hebrew numerals.
18476 \begin_layout Standard
18477 If LabelString is not defined, a default value is constructed as follows:
18478 if the counter has a master counter
18479 \begin_inset Flex Code
18482 \begin_layout Plain Layout
18489 \begin_inset Flex Code
18492 \begin_layout Plain Layout
18499 \begin_inset Newline newline
18503 \begin_inset Flex Code
18506 \begin_layout Plain Layout
18516 is used; otherwise the string
18517 \begin_inset Flex Code
18520 \begin_layout Plain Layout
18531 \begin_layout Description
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18536 LabelStringAppendix
18542 \begin_inset Flex Code
18545 \begin_layout Plain Layout
18552 \begin_inset Quotes erd
18556 \begin_inset Quotes erd
18560 \begin_inset Flex Code
18563 \begin_layout Plain Layout
18569 , but for use in the Appendix.
18572 \begin_layout Description
18573 \begin_inset Flex Code
18576 \begin_layout Plain Layout
18583 \begin_inset Flex Code
18586 \begin_layout Plain Layout
18593 \begin_inset Quotes erd
18597 \begin_inset Quotes erd
18600 ] A format for use with formatted references to this counter.
18601 For example, one might want to have references to section numbers appear
18603 \begin_inset Quotes eld
18607 \begin_inset Quotes erd
18611 The string should contain
18612 \begin_inset Quotes eld
18616 \begin_inset Quotes erd
18620 This will be replaced by the counter number itself.
18621 So, for sections, it would be: Section ##.
18624 \begin_layout Description
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18645 \begin_inset Quotes erd
18649 \begin_inset Quotes erd
18652 ] If this is set to the name of another counter, the present counter will
18653 be reset every time the other one is increased.
18655 \begin_inset Flex Code
18658 \begin_layout Plain Layout
18665 \begin_inset Flex Code
18668 \begin_layout Plain Layout
18677 \begin_layout Subsection
18679 \begin_inset CommandInset label
18681 name "sub:Font-description"
18688 \begin_layout Standard
18689 A font description looks like this:
18692 \begin_layout LyX-Code
18706 \begin_layout LyX-Code
18710 \begin_layout LyX-Code
18714 \begin_layout Standard
18715 The following commands are available:
18718 \begin_layout Description
18719 \begin_inset Flex Code
18722 \begin_layout Plain Layout
18729 \begin_inset Flex Code
18732 \begin_layout Plain Layout
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18751 \begin_inset Flex Code
18754 \begin_layout Plain Layout
18761 \begin_inset Flex Code
18764 \begin_layout Plain Layout
18771 \begin_inset Flex Code
18774 \begin_layout Plain Layout
18781 \begin_inset Flex Code
18784 \begin_layout Plain Layout
18791 \begin_inset Flex Code
18794 \begin_layout Plain Layout
18801 \begin_inset Flex Code
18804 \begin_layout Plain Layout
18811 \begin_inset Flex Code
18814 \begin_layout Plain Layout
18823 \begin_layout Description
18824 \begin_inset Flex Code
18827 \begin_layout Plain Layout
18834 \begin_inset Flex Code
18837 \begin_layout Plain Layout
18846 \begin_inset Flex Code
18849 \begin_layout Plain Layout
18856 \begin_inset Flex Code
18859 \begin_layout Plain Layout
18868 \begin_layout Description
18869 \begin_inset Flex Code
18872 \begin_layout Plain Layout
18879 \begin_inset Flex Code
18882 \begin_layout Plain Layout
18888 ] Valid arguments are:
18889 \begin_inset Flex Code
18892 \begin_layout Plain Layout
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18909 \begin_inset Flex Code
18912 \begin_layout Plain Layout
18919 \begin_inset Flex Code
18922 \begin_layout Plain Layout
18929 \begin_inset Flex Code
18932 \begin_layout Plain Layout
18939 \begin_inset Flex Code
18942 \begin_layout Plain Layout
18949 \begin_inset Flex Code
18952 \begin_layout Plain Layout
18959 \begin_inset Flex Code
18962 \begin_layout Plain Layout
18969 \begin_inset Flex Code
18972 \begin_layout Plain Layout
18979 \begin_inset Flex Code
18982 \begin_layout Plain Layout
18989 \begin_inset Flex Code
18992 \begin_layout Plain Layout
18999 \begin_inset Flex Code
19002 \begin_layout Plain Layout
19009 Each of these turns on or off the corresponding attribute.
19011 \begin_inset Flex Code
19014 \begin_layout Plain Layout
19020 turns on emphasis, and
19021 \begin_inset Flex Code
19024 \begin_layout Plain Layout
19032 \begin_inset Newline newline
19035 If the latter seems puzzling, remember that the font settings for the present
19036 context are generally inherited from the surrounding context.
19038 \begin_inset Flex Code
19041 \begin_layout Plain Layout
19047 would turn off the emphasis that was anyway in effect, say, in a theorem
19051 \begin_layout Description
19052 \begin_inset Flex Code
19055 \begin_layout Plain Layout
19062 \begin_inset Flex Code
19065 \begin_layout Plain Layout
19074 \begin_inset Flex Code
19077 \begin_layout Plain Layout
19086 \begin_layout Description
19087 \begin_inset Flex Code
19090 \begin_layout Plain Layout
19097 \begin_inset Flex Code
19100 \begin_layout Plain Layout
19109 \begin_inset Flex Code
19112 \begin_layout Plain Layout
19119 \begin_inset Flex Code
19122 \begin_layout Plain Layout
19129 \begin_inset Flex Code
19132 \begin_layout Plain Layout
19141 \begin_layout Description
19142 \begin_inset Flex Code
19145 \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
19184 \begin_inset Flex Code
19187 \begin_layout Plain Layout
19194 \begin_inset Flex Code
19197 \begin_layout Plain Layout
19204 \begin_inset Flex Code
19207 \begin_layout Plain Layout
19214 \begin_inset Flex Code
19217 \begin_layout Plain Layout
19224 \begin_inset Flex Code
19227 \begin_layout Plain Layout
19236 \begin_layout Subsection
19237 \begin_inset CommandInset label
19239 name "sub:Citation-format-description"
19243 Citation format description
19246 \begin_layout Standard
19248 \begin_inset Flex Code
19251 \begin_layout Plain Layout
19257 blocks are used to describe how bibliographic information should be displayed,
19258 both within LyX itself (in the citation dialog and in tooltips, for example)
19259 and in XHTML output.
19260 Such a block might look like this:
19263 \begin_layout LyX-Code
19267 \begin_layout LyX-Code
19271 \begin_layout LyX-Code
19275 \begin_layout LyX-Code
19279 \begin_layout Standard
19280 The individual lines define how the bibliographic information associated
19281 with an article or book, respectively, is to be displayed, and such a definitio
19282 n can be given for any `entry type' that might be present in a BibTeX file.
19283 LyX defines a default format in the source code that will be used if no
19284 specific definition has been given.
19285 LyX predefines several formats in the file
19286 \begin_inset Flex Code
19289 \begin_layout Plain Layout
19295 , which is included in most of LyX's document classes.
19298 \begin_layout Standard
19299 The definitions use a simple language that allows BibTeX keys to be replaced
19301 Keys should be enclosed in
19302 \begin_inset Flex Code
19305 \begin_layout Plain Layout
19312 \begin_inset Flex Code
19315 \begin_layout Plain Layout
19322 So a simple definition might look like this:
19325 \begin_layout LyX-Code
19327 \begin_inset Quotes eld
19331 \begin_inset Quotes erd
19337 \begin_layout Standard
19338 This would print the author, followed by a comma, followed by the title,
19339 in quotes, followed by a period.
19342 \begin_layout Standard
19343 Of course, sometimes you may want to print a key only if it exists.
19344 This can be done by using a conditional construction, such as:
19345 \begin_inset Flex Code
19348 \begin_layout Plain Layout
19350 \begin_inset space ~
19360 \begin_inset Flex Code
19363 \begin_layout Plain Layout
19369 key exists, then print
19370 \begin_inset Quotes eld
19374 \begin_inset space ~
19378 \begin_inset Quotes erd
19381 followed by the volume key.
19382 It is also possible to have an else clause in the conditional, such as:
19383 \begin_inset Newline newline
19387 \begin_inset Flex Code
19390 \begin_layout Plain Layout
19391 {%author%[[%author%]][[%editor%, ed.]]}
19397 \begin_inset Newline newline
19401 \begin_inset Flex Code
19404 \begin_layout Plain Layout
19410 key is printed if it exists; otherwise, the editor key is printed, followed
19412 \begin_inset Quotes eld
19416 \begin_inset space ~
19420 \begin_inset Quotes erd
19423 Note that the key is again enclosed in
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19433 signs; the entire conditional is enclosed in braces; and the if and else
19434 clauses are enclosed in double brackets,
19435 \begin_inset Quotes eld
19439 \begin_inset Flex Code
19442 \begin_layout Plain Layout
19449 \begin_inset Quotes eld
19453 \begin_inset Quotes eld
19457 \begin_inset Flex Code
19460 \begin_layout Plain Layout
19467 \begin_inset Quotes erd
19471 There must be no space between any of these.
19474 \begin_layout Standard
19475 There is one other piece of syntax available in definitions, which looks
19477 \begin_inset Flex Code
19480 \begin_layout Plain Layout
19487 This defines a piece of formatting information that is to be used when
19489 \begin_inset Quotes eld
19493 \begin_inset Quotes erd
19497 Obviously, we do not want to output HTML tags when writing plain text,
19498 so they should be wrapped in
19499 \begin_inset Quotes eld
19503 \begin_inset Quotes erd
19507 \begin_inset Quotes eld
19511 \begin_inset Quotes erd
19517 \begin_layout Standard
19518 Two special sorts of definitions are also possible in a
19519 \begin_inset Flex Code
19522 \begin_layout Plain Layout
19529 An example of the first would be:
19532 \begin_layout LyX-Code
19534 \begin_inset Quotes eld
19538 \begin_inset Quotes erd
19544 \begin_layout Standard
19545 This is an abbreviation, or macro, and it can be used by treating it as
19547 \begin_inset Flex Code
19550 \begin_layout Plain Layout
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19567 exactly as it would treat its definition.
19568 So, let us issue the obvious
19576 \begin_layout LyX-Code
19580 \begin_layout Standard
19581 or anything like it.
19582 LyX shouldn't go into an infinite loop, but it may go into a long one before
19586 \begin_layout Standard
19587 The second sort of special definition might look like this:
19590 \begin_layout LyX-Code
19594 \begin_layout Standard
19595 This defines a translatable piece of text, which allows relevant parts of
19596 the bibliography to be translated.
19597 It can be included in a definition by treating it as a key:
19598 \begin_inset Flex Code
19601 \begin_layout Plain Layout
19608 Several of these are predefined in
19609 \begin_inset Flex Code
19612 \begin_layout Plain Layout
19619 Note that these are not macros, in the sense just defined.
19620 They will not be expanded.
19623 \begin_layout Standard
19624 So here then is an example that use all these features:
19625 \begin_inset VSpace defskip
19631 \begin_layout Standard
19635 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19638 \begin_layout Standard
19639 \begin_inset VSpace defskip
19642 This defines a macro that prints the author, followed by a comma, if the
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19653 key is defined, or else prints the name of the editor, followed by the
19655 \begin_inset Flex Code
19658 \begin_layout Plain Layout
19664 or its translation (it is by default
19665 \begin_inset Quotes eld
19669 \begin_inset Quotes erd
19673 \begin_inset Flex Code
19676 \begin_layout Plain Layout
19683 Note that this is in fact defined in
19684 \begin_inset Flex Code
19687 \begin_layout Plain Layout
19693 , so you can use it in your own definitions, or re-definitions, if you load
19697 \begin_layout Section
19698 \begin_inset CommandInset label
19700 name "sec:Tags-for-XHTML"
19704 Tags for XHTML output
19707 \begin_layout Standard
19708 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19709 by layout information.
19710 In general, LyX provides sensible defaults and, as mentioned earlier, it
19711 will even construct default CSS style rules from the other layout tags.
19712 For example, LyX will attempt to use the information provided in the
19713 \begin_inset Flex Code
19716 \begin_layout Plain Layout
19722 declaration for the Chapter style to write CSS that will appropriately
19723 format chapter headings.
19726 \begin_layout Standard
19727 In many cases, then, you may not have to do anything at all to get acceptable
19728 XHTML output for your own environments, custom insets, and so forth.
19729 But in some cases you will, and so LyX provides a number of layout tags
19730 that can be used to customize the XHTML and CSS that are generated.
19733 \begin_layout Standard
19734 Note that there are two tags,
19735 \begin_inset Flex Code
19738 \begin_layout Plain Layout
19745 \begin_inset Flex Code
19748 \begin_layout Plain Layout
19754 that may appear outside style and inset declarations.
19756 \begin_inset CommandInset ref
19758 reference "sub:General-text-class"
19762 for details on these.
19765 \begin_layout Subsection
19766 \begin_inset CommandInset label
19768 name "sub:Paragraph-Style-XHTML"
19775 \begin_layout Standard
19776 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19777 dealing with a normal paragraph, a command, or an environment, where this
19778 is itself determined by the contents of the corresponding
19779 \begin_inset Flex Code
19782 \begin_layout Plain Layout
19792 \begin_layout Standard
19793 For a command or normal paragraph, the output XHTML has the following form:
19796 \begin_layout LyX-Code
19798 \begin_inset Quotes erd
19802 \begin_inset Quotes erd
19808 \begin_layout LyX-Code
19810 \begin_inset Quotes erd
19814 \begin_inset Quotes erd
19820 \begin_layout LyX-Code
19821 Contents of the paragraph.
19824 \begin_layout LyX-Code
19828 \begin_layout Standard
19829 The label tags are of course omitted if the paragraph does not have a label.
19832 \begin_layout Standard
19833 For an environment that is not some sort of list, the XHTML takes this form:
19836 \begin_layout LyX-Code
19838 \begin_inset Quotes erd
19842 \begin_inset Quotes erd
19848 \begin_layout LyX-Code
19850 \begin_inset Quotes erd
19854 \begin_inset Quotes erd
19858 \begin_inset Quotes erd
19862 \begin_inset Quotes erd
19865 >Environment Label</labeltag>First paragraph.</itemtag>
19868 \begin_layout LyX-Code
19869 <itemtag>Second paragraph.</itemtag>
19872 \begin_layout LyX-Code
19876 \begin_layout Standard
19877 Note that the label is output only for the first paragraph, as it should
19878 be for a theorem, for example.
19882 \begin_layout Standard
19883 For a list, we have one of these forms:
19886 \begin_layout LyX-Code
19888 \begin_inset Quotes erd
19892 \begin_inset Quotes erd
19898 \begin_layout LyX-Code
19900 \begin_inset Quotes erd
19904 \begin_inset Quotes erd
19908 \begin_inset Quotes erd
19912 \begin_inset Quotes erd
19915 >List Label</labeltag>First item.</itemtag>
19918 \begin_layout LyX-Code
19920 \begin_inset Quotes erd
19924 \begin_inset Quotes erd
19928 \begin_inset Quotes erd
19932 \begin_inset Quotes erd
19935 >List Label</labeltag>Second item.</itemtag>
19938 \begin_layout LyX-Code
19942 \begin_layout LyX-Code
19946 \begin_layout LyX-Code
19948 \begin_inset Quotes erd
19952 \begin_inset Quotes erd
19958 \begin_layout LyX-Code
19960 \begin_inset Quotes erd
19964 \begin_inset Quotes erd
19967 >List Label</labeltag><itemtag attr=
19968 \begin_inset Quotes erd
19972 \begin_inset Quotes erd
19975 >First item.</itemtag>
19978 \begin_layout LyX-Code
19980 \begin_inset Quotes erd
19984 \begin_inset Quotes erd
19987 >List Label</labeltag><itemtag attr=
19988 \begin_inset Quotes erd
19992 \begin_inset Quotes erd
19995 >Second item.</itemtag>
19998 \begin_layout LyX-Code
20002 \begin_layout Standard
20003 Note the different orders of
20004 \begin_inset Flex Code
20007 \begin_layout Plain Layout
20014 \begin_inset Flex Code
20017 \begin_layout Plain Layout
20024 Which order we get depends upon the setting of
20025 \begin_inset Flex Code
20028 \begin_layout Plain Layout
20035 \begin_inset Flex Code
20038 \begin_layout Plain Layout
20044 is false (the default), you get the first of these, with the label within
20045 the item; if true, you get the second, with the label outside the item.
20048 \begin_layout Standard
20049 The specific tags and attributes output for each paragraph type can be controlle
20050 d by means of the layout tags we are about to describe.
20051 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20052 so you often may not need to do very much to get good XHTML output.
20053 Think of the available tags as there so you can tweak things to your liking.
20056 \begin_layout Description
20057 \begin_inset Flex Code
20060 \begin_layout Plain Layout
20067 \begin_inset Flex Code
20070 \begin_layout Plain Layout
20076 ] Specifies attribute information to be output with the main tag.
20078 \begin_inset Quotes eld
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20092 \begin_inset Quotes erd
20096 By default, LyX will output
20097 \begin_inset Quotes eld
20101 \begin_inset Flex Code
20104 \begin_layout Plain Layout
20111 \begin_inset Quotes erd
20115 \begin_inset Flex Code
20118 \begin_layout Plain Layout
20124 is the LyX name of the layout, made lowercase, for example: chapter.
20129 contain any style information.
20131 \begin_inset Flex Code
20134 \begin_layout Plain Layout
20143 \begin_layout Description
20144 \begin_inset Flex Code
20147 \begin_layout Plain Layout
20154 \begin_inset Flex Code
20157 \begin_layout Plain Layout
20167 ] Whether to output the default CSS information LyX generates for this layout,
20168 even if additional information is explicitly provided via
20169 \begin_inset Flex Code
20172 \begin_layout Plain Layout
20180 \begin_inset Flex Code
20183 \begin_layout Plain Layout
20189 allows you to alter or augment the generated CSS, rather than to override
20192 \begin_inset Flex Code
20195 \begin_layout Plain Layout
20204 \begin_layout Description
20205 \begin_inset Flex Code
20208 \begin_layout Plain Layout
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20224 ] The tag to be used for individual paragraphs of environments, replacing
20226 \begin_inset Flex Code
20229 \begin_layout Plain Layout
20235 in the examples above.
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20249 \begin_layout Description
20250 \begin_inset Flex Code
20253 \begin_layout Plain Layout
20260 \begin_inset Flex Code
20263 \begin_layout Plain Layout
20269 ] Attributes for the item tag.
20271 \begin_inset Quotes eld
20275 \begin_inset Flex Code
20278 \begin_layout Plain Layout
20279 class=`layoutname_item'
20285 \begin_inset Quotes erd
20293 contain any style information.
20295 \begin_inset Flex Code
20298 \begin_layout Plain Layout
20307 \begin_layout Description
20308 \begin_inset Flex Code
20311 \begin_layout Plain Layout
20318 \begin_inset Flex Code
20321 \begin_layout Plain Layout
20327 ] The tag to be used for paragraph and item labels, replacing
20328 \begin_inset Flex Code
20331 \begin_layout Plain Layout
20337 in the examples above.
20339 \begin_inset Flex Code
20342 \begin_layout Plain Layout
20349 \begin_inset Flex Code
20352 \begin_layout Plain Layout
20359 \begin_inset Flex Code
20362 \begin_layout Plain Layout
20369 \begin_inset Flex Code
20372 \begin_layout Plain Layout
20373 Centered_Top_Environment
20378 , in which case it defaults to
20379 \begin_inset Flex Code
20382 \begin_layout Plain Layout
20391 \begin_layout Description
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20411 ] Attributes for the label tag.
20413 \begin_inset Quotes eld
20417 \begin_inset Flex Code
20420 \begin_layout Plain Layout
20421 class=`layoutname_label'
20427 \begin_inset Quotes erd
20435 contain any style information.
20437 \begin_inset Flex Code
20440 \begin_layout Plain Layout
20449 \begin_layout Description
20450 \begin_inset Flex Code
20453 \begin_layout Plain Layout
20460 \begin_inset Flex Code
20463 \begin_layout Plain Layout
20473 ] Meaningful only for list-like environments, this tag controls whether
20474 the label tag is output before or inside the item tag.
20475 This is used, for example, in the description environment, where we want
20477 \begin_inset Flex Code
20480 \begin_layout Plain Layout
20481 <dt>\SpecialChar \ldots{}
20482 </dt><dd>\SpecialChar \ldots{}
20490 \begin_inset Flex Code
20493 \begin_layout Plain Layout
20499 : The label tag is output inside the item tag.
20502 \begin_layout Description
20503 \begin_inset Flex Code
20506 \begin_layout Plain Layout
20512 Information to be output in the
20513 \begin_inset Flex Code
20516 \begin_layout Plain Layout
20522 section when this style is used.
20523 This might, for example, be used to include a
20524 \begin_inset Flex Code
20527 \begin_layout Plain Layout
20534 \begin_inset Flex Code
20537 \begin_layout Plain Layout
20546 \begin_layout Description
20547 \begin_inset Flex Code
20550 \begin_layout Plain Layout
20556 CSS style information to be included when this style is used.
20557 Note that this will automatically be wrapped in a layout-generated
20558 \begin_inset Flex Code
20561 \begin_layout Plain Layout
20567 block, so only the CSS itself need be included.
20569 \begin_inset Flex Code
20572 \begin_layout Plain Layout
20581 \begin_layout Description
20582 \begin_inset Flex Code
20585 \begin_layout Plain Layout
20592 \begin_inset Flex Code
20595 \begin_layout Plain Layout
20601 ] The tag to be used for the main label, replacing
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20611 in the examples above.
20613 \begin_inset Flex Code
20616 \begin_layout Plain Layout
20625 \begin_layout Description
20626 \begin_inset Flex Code
20629 \begin_layout Plain Layout
20636 \begin_inset Flex Code
20639 \begin_layout Plain Layout
20649 ] Marks this style as the one to be used to generate the
20650 \begin_inset Flex Code
20653 \begin_layout Plain Layout
20659 tag for the XHTML file.
20660 By default, it is false.
20662 \begin_inset Flex Code
20665 \begin_layout Plain Layout
20671 file sets it to true for the
20672 \begin_inset Flex Code
20675 \begin_layout Plain Layout
20685 \begin_layout Subsection
20689 \begin_layout Standard
20690 The XHTML output of insets can also be controlled by information in layout
20695 \begin_layout Plain Layout
20696 At present, this is true only for
20697 \begin_inset Quotes eld
20701 \begin_inset Quotes erd
20704 insets (insets you can type into) and is not true for
20705 \begin_inset Quotes eld
20709 \begin_inset Quotes erd
20712 insets (insets that are associated with dialog boxes).
20717 Here, too, LyX tries to provide sensible defaults, and it constructs default
20719 But everything can be customized.
20722 \begin_layout Standard
20723 The XHTML LyX outputs for an inset has the following form:
20726 \begin_layout LyX-Code
20728 \begin_inset Quotes erd
20732 \begin_inset Quotes erd
20738 \begin_layout LyX-Code
20739 <labeltag>Label</labeltag>
20742 \begin_layout LyX-Code
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20751 >Contents of the inset.</innertag>
20754 \begin_layout LyX-Code
20758 \begin_layout Standard
20759 If the inset permits multiple paragraphs---that is, if
20760 \begin_inset Flex Code
20763 \begin_layout Plain Layout
20769 is true---then the contents of the inset will itself be output as paragraphs
20770 formatted according to the styles used for those paragraphs (standard,
20771 quote, and the like).
20772 The label tag is of course omitted if the paragraph does not have a label
20773 and, at present, is always
20774 \begin_inset Flex Code
20777 \begin_layout Plain Layout
20784 The inner tag is optional and, by default, does not appear.
20787 \begin_layout Standard
20788 The specific tags and attributes output for each inset can be controlled
20789 by means of the following layout tags.
20792 \begin_layout Description
20793 \begin_inset Flex Code
20796 \begin_layout Plain Layout
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20812 ] Specifies attribute information to be output with the main tag.
20814 \begin_inset Quotes eld
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20822 class=`myinset' onclick=`\SpecialChar \ldots{}
20829 \begin_inset Quotes erd
20833 By default, LyX will output
20834 \begin_inset Quotes eld
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20848 \begin_inset Quotes erd
20852 \begin_inset Flex Code
20855 \begin_layout Plain Layout
20861 is the LyX name of the inset, made lowercase and with non-alphanumeric
20862 characters converted to underscores, for example: footnote.
20865 \begin_layout Description
20866 \begin_inset Flex Code
20869 \begin_layout Plain Layout
20876 \begin_inset Flex Code
20879 \begin_layout Plain Layout
20889 ] Whether to output the default CSS information LyX generates for this layout,
20890 even if additional information is explicitly provided via
20891 \begin_inset Flex Code
20894 \begin_layout Plain Layout
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20911 allows you to alter or augment the generated CSS, rather than to override
20916 \begin_layout Description
20917 \begin_inset Flex Code
20920 \begin_layout Plain Layout
20927 \begin_inset Flex Code
20930 \begin_layout Plain Layout
20936 ] Attributes for the inner tag.
20938 \begin_inset Quotes eld
20942 \begin_inset Flex Code
20945 \begin_layout Plain Layout
20946 class=`insetname_inner'
20952 \begin_inset Quotes erd
20958 \begin_layout Description
20959 \begin_inset Flex Code
20962 \begin_layout Plain Layout
20969 \begin_inset Flex Code
20972 \begin_layout Plain Layout
20978 ] The inner tag, replacing
20979 \begin_inset Flex Code
20982 \begin_layout Plain Layout
20988 in the examples above.
20989 By default, there is none.
20992 \begin_layout Description
20993 \begin_inset Flex Code
20996 \begin_layout Plain Layout
21003 \begin_inset Flex Code
21006 \begin_layout Plain Layout
21014 ] Whether this inset represents a standalone block of text (such as a footnote)
21015 or instead represents material that is included in the surrounding text
21016 (such as a branch).
21020 \begin_layout Description
21021 \begin_inset Flex Code
21024 \begin_layout Plain Layout
21031 \begin_inset Flex Code
21034 \begin_layout Plain Layout
21040 ] A label for this inset, possibly including a reference to a counter.
21041 For example, for footnote, it might be:
21042 \begin_inset Flex Code
21045 \begin_layout Plain Layout
21054 This is optional, and there is no default.
21057 \begin_layout Description
21058 \begin_inset Flex Code
21061 \begin_layout Plain Layout
21067 Information to be output in the
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21077 section when this style is used.
21078 This might, for example, be used to include a
21079 \begin_inset Flex Code
21082 \begin_layout Plain Layout
21089 \begin_inset Flex Code
21092 \begin_layout Plain Layout
21101 \begin_layout Description
21102 \begin_inset Flex Code
21105 \begin_layout Plain Layout
21111 CSS style information to be included when this style is used.
21112 Note that this will automatically be wrapped in a layout-generated
21113 \begin_inset Flex Code
21116 \begin_layout Plain Layout
21122 block, so only the CSS itself need be included.
21125 \begin_layout Description
21126 \begin_inset Flex Code
21129 \begin_layout Plain Layout
21136 \begin_inset Flex Code
21139 \begin_layout Plain Layout
21145 ] The tag to be used for the main label, replacing
21146 \begin_inset Flex Code
21149 \begin_layout Plain Layout
21155 in the examples above.
21156 The default depends upon the setting of
21157 \begin_inset Flex Code
21160 \begin_layout Plain Layout
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21176 is true, the default is
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21186 ; if it is false, the default is
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21199 \begin_layout Subsection
21203 \begin_layout Standard
21204 The XHTML output for floats too can be controlled by layout information.
21205 The output has the following form:
21208 \begin_layout LyX-Code
21210 \begin_inset Quotes erd
21214 \begin_inset Quotes erd
21220 \begin_layout LyX-Code
21221 Contents of the float.
21224 \begin_layout LyX-Code
21228 \begin_layout Standard
21229 The caption, if there is one, is a separate inset and will be output as
21231 Its appearance can be controlled via the InsetLayout for caption insets.
21235 \begin_layout Description
21236 \begin_inset Flex Code
21239 \begin_layout Plain Layout
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21255 ] Specifies attribute information to be output with the main tag.
21257 \begin_inset Quotes eld
21261 \begin_inset Flex Code
21264 \begin_layout Plain Layout
21265 class=`myfloat' onclick=`\SpecialChar \ldots{}
21272 \begin_inset Quotes erd
21276 By default, LyX will output
21277 \begin_inset Quotes eld
21281 \begin_inset Flex Code
21284 \begin_layout Plain Layout
21285 class=`float float-floattype'
21291 \begin_inset Quotes erd
21295 \begin_inset Flex Code
21298 \begin_layout Plain Layout
21304 is LyX's name for this type of float, as determined by the float declaration
21306 \begin_inset CommandInset ref
21308 reference "sub:Floats"
21312 ), though made lowercase and with non-alphanumeric characters converted
21313 to underscores, for example: float-table.
21316 \begin_layout Description
21317 \begin_inset Flex Code
21320 \begin_layout Plain Layout
21326 CSS style information to be included when this float is used.
21327 Note that this will automatically be wrapped in a layout-generated
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21337 block, so only the CSS itself need be included.
21340 \begin_layout Description
21341 \begin_inset Flex Code
21344 \begin_layout Plain Layout
21351 \begin_inset Flex Code
21354 \begin_layout Plain Layout
21360 ] The tag to be used for this float, replacing
21361 \begin_inset Quotes eld
21365 \begin_inset Flex Code
21368 \begin_layout Plain Layout
21375 \begin_inset Quotes erd
21378 in the example above.
21380 \begin_inset Flex Code
21383 \begin_layout Plain Layout
21389 and will rarely need changing.
21392 \begin_layout Subsection
21393 Bibliography formatting
21396 \begin_layout Standard
21397 The bibliography can be formatted using
21398 \begin_inset Flex Code
21401 \begin_layout Plain Layout
21409 \begin_inset CommandInset ref
21411 reference "sub:Citation-format-description"
21418 \begin_layout Subsection
21422 \begin_layout Standard
21423 We have several times mentioned that LyX will generate default CSS style
21424 rules for both insets and paragraph styles, based upon the other layout
21425 information that is provided.
21426 In this section, we shall say a word about which layout information LyX
21430 \begin_layout Standard
21431 At present, LyX auto-generates CSS only for font information, making use
21433 \begin_inset Flex Code
21436 \begin_layout Plain Layout
21443 \begin_inset Flex Code
21446 \begin_layout Plain Layout
21453 \begin_inset Flex Code
21456 \begin_layout Plain Layout
21463 \begin_inset Flex Code
21466 \begin_layout Plain Layout
21473 \begin_inset Flex Code
21476 \begin_layout Plain Layout
21483 \begin_inset CommandInset ref
21485 reference "sub:Font-description"
21490 The translation is mostly straightforward and obvious.
21492 \begin_inset Quotes eld
21496 \begin_inset Flex Code
21499 \begin_layout Plain Layout
21506 \begin_inset Quotes erd
21510 \begin_inset Quotes eld
21514 \begin_inset Flex Code
21517 \begin_layout Plain Layout
21518 font-family: sans-serif;
21524 \begin_inset Quotes erd
21528 The correspondence of LyX sizes and CSS sizes is a little less obvious
21529 but nonetheless intuitive.
21531 \begin_inset Flex Code
21534 \begin_layout Plain Layout
21541 \begin_inset Flex URL
21544 \begin_layout Plain Layout
21554 \begin_layout Chapter
21555 Including External Material
21556 \begin_inset CommandInset label
21558 name "chap:Including-External-Material"
21565 \begin_layout Standard
21566 \begin_inset Box Shadowbox
21576 height_special "totalheight"
21579 \begin_layout Plain Layout
21580 WARNING: This portion of the documentation has not been updated for some
21582 We certainly hope that it is still accurate, but there are no guarantees.
21590 \begin_layout Standard
21591 The use of material from sources external to LyX is covered in detail in
21597 This part of the manual covers what needs to happen behind the scenes for
21598 new sorts of material to be included.
21601 \begin_layout Section
21605 \begin_layout Standard
21606 The external material feature is based on the concept of a
21611 A template is a specification of how LyX should interface with a certain
21613 As bundled, LyX comes with predefined templates for Xfig figures, various
21614 raster format images, chess diagrams, and LilyPond music notation.
21615 You can check the actual list by using the menu
21616 \begin_inset Flex MenuItem
21619 \begin_layout Plain Layout
21620 Insert\SpecialChar \menuseparator
21621 File\SpecialChar \menuseparator
21628 Furthermore, it is possible to roll your own template to support a specific
21630 Later we'll describe in more detail what is involved, and hopefully you
21631 will submit all the templates you create so we can include them in a later
21635 \begin_layout Standard
21636 Another basic idea of the external material feature is to distinguish between
21637 the original file that serves as a base for final material and the produced
21638 file that is included in your exported or printed document.
21639 For example, consider the case of a figure produced with
21640 \begin_inset Flex Code
21643 \begin_layout Plain Layout
21650 The Xfig application itself works on an original file with the
21651 \begin_inset Flex Code
21654 \begin_layout Plain Layout
21661 Within Xfig, you create and change your figure, and when you are done,
21663 \begin_inset Flex Code
21666 \begin_layout Plain Layout
21673 When you want to include the figure in your document, you invoke
21674 \begin_inset Flex Code
21677 \begin_layout Plain Layout
21683 in order to create a PostScript file that can readily be included in your
21686 \begin_inset Flex Code
21689 \begin_layout Plain Layout
21695 file is the original file, and the PostScript file is the produced file.
21698 \begin_layout Standard
21699 This distinction is important in order to allow updating of the material
21700 while you are in the process of writing the document.
21701 Furthermore, it provides us with the flexibility that is needed to support
21702 multiple export formats.
21703 For instance, in the case of a plain text file, it is not exactly an award-winn
21704 ing idea to include the figure as raw PostScript.
21705 Instead, you would either prefer to just include a reference to the figure
21706 or try to invoke some graphics to ASCII converter to make the final result
21707 look similar to the real graphics.
21708 The external material management allows you to do this, because it is parametri
21709 zed on the different export formats that LyX supports.
21712 \begin_layout Standard
21713 Besides supporting the production of different products according to the
21714 exported format, it supports tight integration with editing and viewing
21716 In the case of an Xfig figure, you are able to invoke Xfig on the original
21717 file with a single click from within the external material dialog in LyX,
21718 and also preview the produced PostScript file with Ghostview with another
21720 No more fiddling around with the command line and/or file browsers to locate
21721 and manipulate the original or produced files.
21722 In this way, you are finally able to take full advantage of the many different
21723 applications that are relevant to use when you write your documents, and
21724 ultimately be more productive.
21727 \begin_layout Section
21728 The external template configuration file
21731 \begin_layout Standard
21732 It is relatively easy to add custom external template definitions to LyX.
21733 However, be aware that doing this in an careless manner most probably
21737 introduce an easily exploitable security hole.
21738 So before you do this, please read the discussion about security in
21739 \begin_inset CommandInset ref
21741 reference "sec:Security-discussion"
21748 \begin_layout Standard
21749 Having said that, we encourage you to submit any interesting templates that
21754 \begin_layout Standard
21755 The external templates are defined in the
21756 \begin_inset Flex Code
21759 \begin_layout Plain Layout
21760 LyXDir/lib/external_templates
21766 You can place your own version in
21767 \begin_inset Flex Code
21770 \begin_layout Plain Layout
21771 UserDir/external_templates
21779 \begin_layout Standard
21780 A typical template looks like this:
21783 \begin_layout LyX-Code
21787 \begin_layout LyX-Code
21788 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21791 \begin_layout LyX-Code
21795 \begin_layout LyX-Code
21799 \begin_layout LyX-Code
21803 \begin_layout LyX-Code
21807 \begin_layout LyX-Code
21811 \begin_layout LyX-Code
21812 AutomaticProduction true
21815 \begin_layout LyX-Code
21819 \begin_layout LyX-Code
21823 \begin_layout LyX-Code
21827 \begin_layout LyX-Code
21828 TransformCommand Rotate RotationLatexCommand
21831 \begin_layout LyX-Code
21832 TransformCommand Resize ResizeLatexCommand
21835 \begin_layout LyX-Code
21836 Product "$$RotateFront$$ResizeFront
21839 \begin_layout LyX-Code
21844 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21847 \begin_layout LyX-Code
21848 $$ResizeBack$$RotateBack"
21851 \begin_layout LyX-Code
21855 \begin_layout LyX-Code
21856 UpdateResult "$$AbsPath$$Basename.pstex_t"
21859 \begin_layout LyX-Code
21860 Requirement "graphicx"
21863 \begin_layout LyX-Code
21864 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21867 \begin_layout LyX-Code
21868 ReferencedFile latex "$$AbsPath$$Basename.eps"
21871 \begin_layout LyX-Code
21872 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21875 \begin_layout LyX-Code
21879 \begin_layout LyX-Code
21883 \begin_layout LyX-Code
21884 TransformCommand Rotate RotationLatexCommand
21887 \begin_layout LyX-Code
21888 TransformCommand Resize ResizeLatexCommand
21891 \begin_layout LyX-Code
21892 Product "$$RotateFront$$ResizeFront
21895 \begin_layout LyX-Code
21900 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21903 \begin_layout LyX-Code
21904 $$ResizeBack$$RotateBack"
21907 \begin_layout LyX-Code
21908 UpdateFormat pdftex
21911 \begin_layout LyX-Code
21912 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21915 \begin_layout LyX-Code
21916 Requirement "graphicx"
21919 \begin_layout LyX-Code
21920 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21923 \begin_layout LyX-Code
21924 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21927 \begin_layout LyX-Code
21931 \begin_layout LyX-Code
21935 \begin_layout LyX-Code
21936 Product "$$Contents(
21938 "$$AbsPath$$Basename.asc
21943 \begin_layout LyX-Code
21944 UpdateFormat asciixfig
21947 \begin_layout LyX-Code
21948 UpdateResult "$$AbsPath$$Basename.asc"
21951 \begin_layout LyX-Code
21955 \begin_layout LyX-Code
21959 \begin_layout LyX-Code
21960 Product "<graphic fileref=
21962 "$$AbsOrRelPathMaster$$Basename.eps
21967 \begin_layout LyX-Code
21971 \begin_layout LyX-Code
21975 \begin_layout LyX-Code
21976 UpdateResult "$$AbsPath$$Basename.eps"
21979 \begin_layout LyX-Code
21980 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21983 \begin_layout LyX-Code
21984 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21987 \begin_layout LyX-Code
21991 \begin_layout LyX-Code
21992 Product "[XFig: $$FName]"
21995 \begin_layout LyX-Code
21999 \begin_layout LyX-Code
22003 \begin_layout Standard
22004 As you can see, the template is enclosed in
22005 \begin_inset Flex Code
22008 \begin_layout Plain Layout
22014 \SpecialChar \ldots{}
22016 \begin_inset Flex Code
22019 \begin_layout Plain Layout
22026 It contains a header specifying some general settings and, for each supported
22027 primary document file format, a section
22028 \begin_inset Flex Code
22031 \begin_layout Plain Layout
22037 \SpecialChar \ldots{}
22039 \begin_inset Flex Code
22042 \begin_layout Plain Layout
22051 \begin_layout Subsection
22052 The template header
22055 \begin_layout Description
22056 \begin_inset Flex Code
22059 \begin_layout Plain Layout
22060 AutomaticProduction
22061 \begin_inset space ~
22069 Whether the file represented by the template must be generated by LyX.
22070 This command must occur exactly once.
22073 \begin_layout Description
22074 \begin_inset Flex Code
22077 \begin_layout Plain Layout
22079 \begin_inset space ~
22087 A glob pattern that is used in the file dialog to filter out the desired
22089 If there is more than one possible file extension (e.
22090 \begin_inset space \thinspace{}
22094 \begin_inset space \space{}
22098 \begin_inset Flex Code
22101 \begin_layout Plain Layout
22108 \begin_inset Flex Code
22111 \begin_layout Plain Layout
22117 ), use something like
22118 \begin_inset Flex Code
22121 \begin_layout Plain Layout
22128 This command must occur exactly once.
22131 \begin_layout Description
22132 \begin_inset Flex Code
22135 \begin_layout Plain Layout
22137 \begin_inset space ~
22145 The text that is displayed on the button.
22146 This command must occur exactly once.
22149 \begin_layout Description
22150 \begin_inset Flex Code
22153 \begin_layout Plain Layout
22155 \begin_inset space ~
22159 \begin_inset space ~
22167 The help text that is used in the External dialog.
22168 Provide enough information to explain to the user just what the template
22169 can provide him with.
22170 This command must occur exactly once.
22173 \begin_layout Description
22174 \begin_inset Flex Code
22177 \begin_layout Plain Layout
22179 \begin_inset space ~
22187 The file format of the original file.
22188 This must be the name of a format that is known to LyX (see
22189 \begin_inset CommandInset ref
22191 reference "sec:Formats"
22197 \begin_inset Quotes eld
22201 \begin_inset Flex Code
22204 \begin_layout Plain Layout
22211 \begin_inset Quotes erd
22214 if the template can handle original files of more than one format.
22215 LyX will attempt to interrogate the file itself in order to deduce its
22216 format in this case.
22217 This command must occur exactly once.
22220 \begin_layout Description
22221 \begin_inset Flex Code
22224 \begin_layout Plain Layout
22226 \begin_inset space ~
22234 A unique name for the template.
22235 It must not contain substitution macros (see below).
22238 \begin_layout Description
22239 \begin_inset Flex Code
22242 \begin_layout Plain Layout
22244 \begin_inset space ~
22247 Rotate|Resize|Clip|Extra
22252 This command specifies which transformations are supported by this template.
22253 It may occur zero or more times.
22254 This command enables the corresponding tabs in the external dialog.
22256 \begin_inset Flex Code
22259 \begin_layout Plain Layout
22265 command must have either a corresponding
22266 \begin_inset Flex Code
22269 \begin_layout Plain Layout
22276 \begin_inset Flex Code
22279 \begin_layout Plain Layout
22286 \begin_inset Flex Code
22289 \begin_layout Plain Layout
22296 Otherwise the transformation will not be supported by that format.
22299 \begin_layout Subsection
22303 \begin_layout Description
22304 \begin_inset Flex Code
22307 \begin_layout Plain Layout
22309 \begin_inset space ~
22312 LaTeX|PDFLaTeX|PlainText|DocBook
22317 The primary document file format that this format definition is for.
22318 Not every template has a sensible representation in all document file formats.
22319 Please define nevertheless a
22320 \begin_inset Flex Code
22323 \begin_layout Plain Layout
22329 section for all templates.
22330 Use a dummy text when no representation is available.
22331 Then you can at least see a reference to the external material in the exported
22335 \begin_layout Description
22336 \begin_inset Flex Code
22339 \begin_layout Plain Layout
22341 \begin_inset space ~
22345 \begin_inset space ~
22353 This command defines an additional macro
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22363 for substitution in
22364 \begin_inset Flex Code
22367 \begin_layout Plain Layout
22375 \begin_inset Flex Code
22378 \begin_layout Plain Layout
22384 itself may contain substitution macros.
22385 The advantage over using
22386 \begin_inset Flex Code
22389 \begin_layout Plain Layout
22396 \begin_inset Flex Code
22399 \begin_layout Plain Layout
22405 is that the substituted value of
22406 \begin_inset Flex Code
22409 \begin_layout Plain Layout
22415 is sanitized so that it is a valid optional argument in the document format.
22416 This command may occur zero or more times.
22419 \begin_layout Description
22420 \begin_inset Flex Code
22423 \begin_layout Plain Layout
22425 \begin_inset space ~
22433 The text that is inserted in the exported document.
22434 This is actually the most important command and can be quite complex.
22435 This command must occur exactly once.
22438 \begin_layout Description
22439 \begin_inset Flex Code
22442 \begin_layout Plain Layout
22444 \begin_inset space ~
22452 This command specifies a preamble snippet that will be included in the
22454 It has to be defined using
22455 \begin_inset Flex Code
22458 \begin_layout Plain Layout
22464 \SpecialChar \ldots{}
22466 \begin_inset Flex Code
22469 \begin_layout Plain Layout
22476 This command may occur zero or more times.
22479 \begin_layout Description
22480 \begin_inset Flex Code
22483 \begin_layout Plain Layout
22485 \begin_inset space ~
22489 \begin_inset space ~
22497 This command denotes files that are created by the conversion process and
22498 are needed for a particular export format.
22499 If the filename is relative, it is interpreted relative to the master document.
22500 This command may be given zero or more times.
22503 \begin_layout Description
22504 \begin_inset Flex Code
22507 \begin_layout Plain Layout
22509 \begin_inset space ~
22517 The name of a required LaTeX package.
22518 The package is included via
22519 \begin_inset Flex Code
22522 \begin_layout Plain Layout
22530 in the LaTeX preamble.
22531 This command may occur zero or more times.
22534 \begin_layout Description
22535 \begin_inset Flex Code
22538 \begin_layout Plain Layout
22540 \begin_inset space ~
22544 \begin_inset space ~
22547 RotationLatexCommand
22552 This command specifies that the built in LaTeX command should be used for
22554 This command may occur once or not at all.
22557 \begin_layout Description
22558 \begin_inset Flex Code
22561 \begin_layout Plain Layout
22563 \begin_inset space ~
22567 \begin_inset space ~
22575 This command specifies that the built in LaTeX command should be used for
22577 This command may occur once or not at all.
22580 \begin_layout Description
22581 \begin_inset Flex Code
22584 \begin_layout Plain Layout
22586 \begin_inset space ~
22590 \begin_inset space ~
22593 RotationLatexOption
22598 This command specifies that rotation is done via an optional argument.
22599 This command may occur once or not at all.
22602 \begin_layout Description
22603 \begin_inset Flex Code
22606 \begin_layout Plain Layout
22608 \begin_inset space ~
22612 \begin_inset space ~
22620 This command specifies that resizing is done via an optional argument.
22621 This command may occur once or not at all.
22624 \begin_layout Description
22625 \begin_inset Flex Code
22628 \begin_layout Plain Layout
22630 \begin_inset space ~
22634 \begin_inset space ~
22642 This command specifies that clipping is done via an optional argument.
22643 This command may occur once or not at all.
22646 \begin_layout Description
22647 \begin_inset Flex Code
22650 \begin_layout Plain Layout
22652 \begin_inset space ~
22656 \begin_inset space ~
22664 This command specifies that an extra optional argument is used.
22665 This command may occur once or not at all.
22668 \begin_layout Description
22669 \begin_inset Flex Code
22672 \begin_layout Plain Layout
22674 \begin_inset space ~
22682 The file format of the converted file.
22683 This must be the name of a format that is known to LyX (see the
22684 \begin_inset Flex MenuItem
22687 \begin_layout Plain Layout
22688 Tools\SpecialChar \menuseparator
22689 Preferences\SpecialChar \menuseparator
22690 File Handling\SpecialChar \menuseparator
22697 This command must occur exactly once.
22698 If the resulting file format is PDF, you need to specify the format
22699 \begin_inset Flex Code
22702 \begin_layout Plain Layout
22709 This is the PDF format used for including graphics.
22710 The other defined PDF formats are for document export.
22713 \begin_layout Description
22714 \begin_inset Flex Code
22717 \begin_layout Plain Layout
22719 \begin_inset space ~
22727 The file name of the converted file.
22728 The file name must be absolute.
22729 This command must occur exactly once.
22732 \begin_layout Subsection
22733 Preamble definitions
22736 \begin_layout Standard
22737 The external template configuration file may contain additional preamble
22738 definitions enclosed by
22739 \begin_inset Flex Code
22742 \begin_layout Plain Layout
22748 \SpecialChar \ldots{}
22750 \begin_inset Flex Code
22753 \begin_layout Plain Layout
22760 They can be used by the templates in the
22761 \begin_inset Flex Code
22764 \begin_layout Plain Layout
22773 \begin_layout Section
22774 The substitution mechanism
22777 \begin_layout Standard
22778 When the external material facility invokes an external program, it is done
22779 on the basis of a command defined in the template configuration file.
22780 These commands can contain various macros that are expanded before execution.
22781 Execution always take place in the directory of the containing document.
22784 \begin_layout Standard
22785 Also, whenever external material is to be displayed, the name will be produced
22786 by the substitution mechanism, and most other commands in the template
22787 definition support substitution as well.
22790 \begin_layout Standard
22791 The available macros are the following:
22794 \begin_layout Description
22795 \begin_inset Flex Code
22798 \begin_layout Plain Layout
22799 $$AbsOrRelPathMaster
22804 The file path, absolute or relative to the master LyX document.
22807 \begin_layout Description
22808 \begin_inset Flex Code
22811 \begin_layout Plain Layout
22812 $$AbsOrRelPathParent
22817 The file path, absolute or relative to the LyX document.
22820 \begin_layout Description
22821 \begin_inset Flex Code
22824 \begin_layout Plain Layout
22830 The absolute file path.
22833 \begin_layout Description
22834 \begin_inset Flex Code
22837 \begin_layout Plain Layout
22843 The filename without path and without the extension.
22846 \begin_layout Description
22847 \begin_inset Flex Code
22850 \begin_layout Plain Layout
22852 \begin_inset Quotes eld
22856 \begin_inset Quotes erd
22864 This macro will expand to the contents of the file with the name
22865 \begin_inset Flex Code
22868 \begin_layout Plain Layout
22877 \begin_layout Description
22878 \begin_inset Flex Code
22881 \begin_layout Plain Layout
22887 The file extension (including the dot).
22890 \begin_layout Description
22891 \begin_inset Flex Code
22894 \begin_layout Plain Layout
22900 The filename of the file specified in the external material dialog.
22901 This is either an absolute name, or it is relative to the LyX document.
22904 \begin_layout Description
22905 \begin_inset Flex Code
22908 \begin_layout Plain Layout
22915 \begin_inset Flex Code
22918 \begin_layout Plain Layout
22924 (absolute name or relative to the LyX document).
22927 \begin_layout Description
22928 \begin_inset Flex Code
22931 \begin_layout Plain Layout
22937 The file path, relative to the master LyX document.
22940 \begin_layout Description
22941 \begin_inset Flex Code
22944 \begin_layout Plain Layout
22950 The file path, relative to the LyX document.
22953 \begin_layout Description
22954 \begin_inset Flex Code
22957 \begin_layout Plain Layout
22963 This macro will expand to the absolute path of the system directory.
22964 This is typically used to point to the various helper scripts that are
22968 \begin_layout Description
22969 \begin_inset Flex Code
22972 \begin_layout Plain Layout
22978 A name and full path to a temporary file which will be automatically deleted
22979 whenever the containing document is closed, or the external material insertion
22983 \begin_layout Standard
22984 All path macros contain a trailing directory separator, so you can construct
22986 \begin_inset space \thinspace{}
22990 \begin_inset space \space{}
22993 the absolute filename with
22994 \begin_inset Flex Code
22997 \begin_layout Plain Layout
22998 $$AbsPath$$Basename$$Extension
23006 \begin_layout Standard
23007 The macros above are substituted in all commands unless otherwise noted.
23009 \begin_inset Flex Code
23012 \begin_layout Plain Layout
23018 supports additionally the following substitutions if they are enabled by
23020 \begin_inset Flex Code
23023 \begin_layout Plain Layout
23030 \begin_inset Flex Code
23033 \begin_layout Plain Layout
23042 \begin_layout Description
23043 \begin_inset Flex Code
23046 \begin_layout Plain Layout
23052 The front part of the resize command.
23055 \begin_layout Description
23056 \begin_inset Flex Code
23059 \begin_layout Plain Layout
23065 The back part of the resize command.
23068 \begin_layout Description
23069 \begin_inset Flex Code
23072 \begin_layout Plain Layout
23078 The front part of the rotation command.
23081 \begin_layout Description
23082 \begin_inset Flex Code
23085 \begin_layout Plain Layout
23091 The back part of the rotation command.
23094 \begin_layout Standard
23095 The value string of the
23096 \begin_inset Flex Code
23099 \begin_layout Plain Layout
23105 command supports additionally the following substitutions if they are enabled
23107 \begin_inset Flex Code
23110 \begin_layout Plain Layout
23117 \begin_inset Flex Code
23120 \begin_layout Plain Layout
23129 \begin_layout Description
23130 \begin_inset Flex Code
23133 \begin_layout Plain Layout
23142 \begin_layout Description
23143 \begin_inset Flex Code
23146 \begin_layout Plain Layout
23155 \begin_layout Description
23156 \begin_inset Flex Code
23159 \begin_layout Plain Layout
23168 \begin_layout Description
23169 \begin_inset Flex Code
23172 \begin_layout Plain Layout
23178 The rotation option.
23181 \begin_layout Standard
23182 You may ask why there are so many path macros.
23183 There are mainly two reasons:
23186 \begin_layout Enumerate
23187 Relative and absolute file names should remain relative or absolute, respectivel
23189 Users may have reasons to prefer either form.
23190 Relative names are useful for portable documents that should work on different
23191 machines, for example.
23192 Absolute names may be required by some programs.
23195 \begin_layout Enumerate
23196 LaTeX treats relative file names differently than LyX and other programs
23197 in nested included files.
23198 For LyX, a relative file name is always relative to the document that contains
23200 For LaTeX, it is always relative to the master document.
23201 These two definitions are identical if you have only one document, but
23202 differ if you have a master document that includes part documents.
23203 That means that relative filenames must be transformed when presented to
23205 Fortunately LyX does this automatically for you if you choose the right
23209 \begin_layout Standard
23210 So which path macro should be used in new template definitions? The rule
23214 \begin_layout Itemize
23216 \begin_inset Flex Code
23219 \begin_layout Plain Layout
23225 if an absolute path is required.
23228 \begin_layout Itemize
23230 \begin_inset Flex Code
23233 \begin_layout Plain Layout
23234 $$AbsOrRelPathMaster
23239 if the substituted string is some kind of LaTeX input.
23242 \begin_layout Itemize
23244 \begin_inset Flex Code
23247 \begin_layout Plain Layout
23248 $$AbsOrRelPathParent
23253 in order to preserve the user's choice.
23256 \begin_layout Standard
23257 There are special cases where this rule does not work and e.
23258 \begin_inset space \thinspace{}
23262 \begin_inset space \space{}
23265 relative names are needed, but normally it will work just fine.
23266 One example for such a case is the command
23267 \begin_inset Flex Code
23270 \begin_layout Plain Layout
23271 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23276 in the XFig template above: We can't use the absolute name because the
23278 \begin_inset Flex Code
23281 \begin_layout Plain Layout
23287 files needs the relative name in order to rewrite the file content.
23290 \begin_layout Section
23291 Security discussion
23292 \begin_inset CommandInset label
23294 name "sec:Security-discussion"
23301 \begin_layout Standard
23302 The external material feature interfaces with a lot of external programs
23303 and does so automatically, so we have to consider the security implications
23305 In particular, since you have the option of including your own filenames
23306 and/or parameter strings and those are expanded into a command, it seems
23307 that it would be possible to create a malicious document which executes
23308 arbitrary commands when a user views or prints the document.
23309 This is something we definitely want to avoid.
23312 \begin_layout Standard
23313 However, since the external program commands are specified in the template
23314 configuration file only, there are no security issues if LyX is properly
23315 configured with safe templates only.
23316 This is so because the external programs are invoked with the
23317 \begin_inset Flex Code
23320 \begin_layout Plain Layout
23326 -system call rather than the
23327 \begin_inset Flex Code
23330 \begin_layout Plain Layout
23336 system-call, so it's not possible to execute arbitrary commands from the
23337 filename or parameter section via the shell.
23340 \begin_layout Standard
23341 This also implies that you are restricted in what command strings you can
23342 use in the external material templates.
23343 In particular, pipes and redirection are not readily available.
23344 This has to be so if LyX should remain safe.
23345 If you want to use some of the shell features, you should write a safe
23346 script to do this in a controlled manner, and then invoke the script from
23347 the command string.
23351 \begin_layout Standard
23352 It is possible to design a template that interacts directly with the shell,
23353 but since this would allow a malicious user to execute arbitrary commands
23354 by writing clever filenames and/or parameters, we generally recommend that
23355 you only use safe scripts that work with the
23356 \begin_inset Flex Code
23359 \begin_layout Plain Layout
23365 system call in a controlled manner.
23366 Of course, for use in a controlled environment, it can be tempting to just
23367 fall back to use ordinary shell scripts.
23368 If you do so, be aware that you
23372 provide an easily exploitable security hole in your system.
23373 Of course it stands to reason that such unsafe templates will never be
23374 included in the standard LyX distribution, although we do encourage people
23375 to submit new templates in the open source tradition.
23376 But LyX as shipped from the official distribution channels will never have
23380 \begin_layout Standard
23381 Including external material provides a lot of power, and you have to be
23382 careful not to introduce security hazards with this power.
23383 A subtle error in a single line in an innocent looking script can open
23384 the door to huge security problems.
23385 So if you do not fully understand the issues, we recommend that you consult
23386 a knowledgeable security professional or the LyX development team if you
23387 have any questions about whether a given template is safe or not.
23388 And do this before you use it in an uncontrolled environment.
23391 \begin_layout Chapter
23393 List of supported LyX functions to be used in layouts
23394 \begin_inset CommandInset label
23396 name "chap:List-of-functions"
23403 \begin_layout Standard
23405 \begin_inset Tabular
23406 <lyxtabular version="3" rows="11" columns="8">
23407 <features rotate="0" tabularvalignment="middle">
23408 <column alignment="left" valignment="top">
23409 <column alignment="left" valignment="top">
23410 <column alignment="left" valignment="top">
23411 <column alignment="left" valignment="top">
23412 <column alignment="left" valignment="top">
23413 <column alignment="left" valignment="top">
23414 <column alignment="left" valignment="top">
23415 <column alignment="left" valignment="top">
23417 <cell alignment="left" valignment="top" usebox="none">
23420 \begin_layout Plain Layout
23426 <cell alignment="left" valignment="top" usebox="none">
23429 \begin_layout Plain Layout
23435 <cell alignment="left" valignment="top" usebox="none">
23438 \begin_layout Plain Layout
23444 <cell alignment="left" valignment="top" usebox="none">
23447 \begin_layout Plain Layout
23453 <cell alignment="center" valignment="top" usebox="none">
23456 \begin_layout Plain Layout
23462 <cell alignment="center" valignment="top" usebox="none">
23465 \begin_layout Plain Layout
23471 <cell alignment="center" valignment="top" usebox="none">
23474 \begin_layout Plain Layout
23480 <cell alignment="center" valignment="top" usebox="none">
23483 \begin_layout Plain Layout
23491 <cell alignment="left" valignment="top" usebox="none">
23494 \begin_layout Plain Layout
23500 <cell alignment="left" valignment="top" usebox="none">
23503 \begin_layout Plain Layout
23509 <cell alignment="left" valignment="top" usebox="none">
23512 \begin_layout Plain Layout
23518 <cell alignment="left" valignment="top" usebox="none">
23521 \begin_layout Plain Layout
23527 <cell alignment="center" valignment="top" usebox="none">
23530 \begin_layout Plain Layout
23536 <cell alignment="center" valignment="top" usebox="none">
23539 \begin_layout Plain Layout
23545 <cell alignment="center" valignment="top" usebox="none">
23548 \begin_layout Plain Layout
23554 <cell alignment="center" valignment="top" usebox="none">
23557 \begin_layout Plain Layout
23565 <cell alignment="left" valignment="top" usebox="none">
23568 \begin_layout Plain Layout
23574 <cell alignment="left" valignment="top" usebox="none">
23577 \begin_layout Plain Layout
23583 <cell alignment="left" valignment="top" usebox="none">
23586 \begin_layout Plain Layout
23592 <cell alignment="left" valignment="top" usebox="none">
23595 \begin_layout Plain Layout
23601 <cell alignment="center" valignment="top" usebox="none">
23604 \begin_layout Plain Layout
23610 <cell alignment="center" valignment="top" usebox="none">
23613 \begin_layout Plain Layout
23619 <cell alignment="center" valignment="top" usebox="none">
23622 \begin_layout Plain Layout
23628 <cell alignment="center" valignment="top" usebox="none">
23631 \begin_layout Plain Layout
23639 <cell alignment="left" valignment="top" usebox="none">
23642 \begin_layout Plain Layout
23648 <cell alignment="left" valignment="top" usebox="none">
23651 \begin_layout Plain Layout
23657 <cell alignment="left" valignment="top" usebox="none">
23660 \begin_layout Plain Layout
23666 <cell alignment="left" valignment="top" usebox="none">
23669 \begin_layout Plain Layout
23675 <cell alignment="center" valignment="top" usebox="none">
23678 \begin_layout Plain Layout
23684 <cell alignment="center" valignment="top" usebox="none">
23687 \begin_layout Plain Layout
23693 <cell alignment="center" valignment="top" usebox="none">
23696 \begin_layout Plain Layout
23702 <cell alignment="center" valignment="top" usebox="none">
23705 \begin_layout Plain Layout
23713 <cell alignment="left" valignment="top" usebox="none">
23716 \begin_layout Plain Layout
23722 <cell alignment="left" valignment="top" usebox="none">
23725 \begin_layout Plain Layout
23731 <cell alignment="left" valignment="top" usebox="none">
23734 \begin_layout Plain Layout
23740 <cell alignment="left" valignment="top" usebox="none">
23743 \begin_layout Plain Layout
23749 <cell alignment="center" valignment="top" usebox="none">
23752 \begin_layout Plain Layout
23758 <cell alignment="center" valignment="top" usebox="none">
23761 \begin_layout Plain Layout
23767 <cell alignment="center" valignment="top" usebox="none">
23770 \begin_layout Plain Layout
23776 <cell alignment="center" valignment="top" usebox="none">
23779 \begin_layout Plain Layout
23787 <cell alignment="left" valignment="top" usebox="none">
23790 \begin_layout Plain Layout
23796 <cell alignment="left" valignment="top" usebox="none">
23799 \begin_layout Plain Layout
23805 <cell alignment="left" valignment="top" usebox="none">
23808 \begin_layout Plain Layout
23814 <cell alignment="left" valignment="top" usebox="none">
23817 \begin_layout Plain Layout
23823 <cell alignment="center" valignment="top" usebox="none">
23826 \begin_layout Plain Layout
23832 <cell alignment="center" valignment="top" usebox="none">
23835 \begin_layout Plain Layout
23841 <cell alignment="center" valignment="top" usebox="none">
23844 \begin_layout Plain Layout
23850 <cell alignment="center" valignment="top" usebox="none">
23853 \begin_layout Plain Layout
23861 <cell alignment="left" valignment="top" usebox="none">
23864 \begin_layout Plain Layout
23870 <cell alignment="left" valignment="top" usebox="none">
23873 \begin_layout Plain Layout
23879 <cell alignment="left" valignment="top" usebox="none">
23882 \begin_layout Plain Layout
23888 <cell alignment="left" valignment="top" usebox="none">
23891 \begin_layout Plain Layout
23897 <cell alignment="center" valignment="top" usebox="none">
23900 \begin_layout Plain Layout
23906 <cell alignment="center" valignment="top" usebox="none">
23909 \begin_layout Plain Layout
23915 <cell alignment="center" valignment="top" usebox="none">
23918 \begin_layout Plain Layout
23924 <cell alignment="center" valignment="top" usebox="none">
23927 \begin_layout Plain Layout
23935 <cell alignment="left" valignment="top" usebox="none">
23938 \begin_layout Plain Layout
23944 <cell alignment="left" valignment="top" usebox="none">
23947 \begin_layout Plain Layout
23953 <cell alignment="left" valignment="top" usebox="none">
23956 \begin_layout Plain Layout
23962 <cell alignment="left" valignment="top" usebox="none">
23965 \begin_layout Plain Layout
23971 <cell alignment="center" valignment="top" usebox="none">
23974 \begin_layout Plain Layout
23980 <cell alignment="center" valignment="top" usebox="none">
23983 \begin_layout Plain Layout
23989 <cell alignment="center" valignment="top" usebox="none">
23992 \begin_layout Plain Layout
23998 <cell alignment="center" valignment="top" usebox="none">
24001 \begin_layout Plain Layout
24009 <cell alignment="left" valignment="top" usebox="none">
24012 \begin_layout Plain Layout
24018 <cell alignment="left" valignment="top" usebox="none">
24021 \begin_layout Plain Layout
24027 <cell alignment="left" valignment="top" usebox="none">
24030 \begin_layout Plain Layout
24036 <cell alignment="left" valignment="top" usebox="none">
24039 \begin_layout Plain Layout
24045 <cell alignment="center" valignment="top" usebox="none">
24048 \begin_layout Plain Layout
24054 <cell alignment="center" valignment="top" usebox="none">
24057 \begin_layout Plain Layout
24063 <cell alignment="center" valignment="top" usebox="none">
24066 \begin_layout Plain Layout
24072 <cell alignment="center" valignment="top" usebox="none">
24075 \begin_layout Plain Layout
24083 <cell alignment="left" valignment="top" usebox="none">
24086 \begin_layout Plain Layout
24092 <cell alignment="left" valignment="top" usebox="none">
24095 \begin_layout Plain Layout
24101 <cell alignment="left" valignment="top" usebox="none">
24104 \begin_layout Plain Layout
24110 <cell alignment="left" valignment="top" usebox="none">
24113 \begin_layout Plain Layout
24119 <cell alignment="center" valignment="top" usebox="none">
24122 \begin_layout Plain Layout
24128 <cell alignment="center" valignment="top" usebox="none">
24131 \begin_layout Plain Layout
24137 <cell alignment="center" valignment="top" usebox="none">
24140 \begin_layout Plain Layout
24146 <cell alignment="center" valignment="top" usebox="none">
24149 \begin_layout Plain Layout
24157 <cell alignment="center" valignment="top" usebox="none">
24160 \begin_layout Plain Layout
24166 <cell alignment="center" valignment="top" usebox="none">
24169 \begin_layout Plain Layout
24175 <cell alignment="center" valignment="top" usebox="none">
24178 \begin_layout Plain Layout
24184 <cell alignment="center" valignment="top" usebox="none">
24187 \begin_layout Plain Layout
24193 <cell alignment="center" valignment="top" usebox="none">
24196 \begin_layout Plain Layout
24202 <cell alignment="center" valignment="top" usebox="none">
24205 \begin_layout Plain Layout
24211 <cell alignment="center" valignment="top" usebox="none">
24214 \begin_layout Plain Layout
24220 <cell alignment="center" valignment="top" usebox="none">
24223 \begin_layout Plain Layout
24237 \begin_layout Chapter
24238 Names of available colors to be used in layouts
24239 \begin_inset CommandInset label
24241 name "chap:Names-of-colors"
24248 \begin_layout Standard
24249 The colors listed here are the standard colors and the those that you can
24250 adjust in the LyX preferences.
24253 \begin_layout Description
24266 No particular color -- clear or default
24267 \change_inserted 2090807402 1370139663
24269 \begin_inset Note Note
24272 \begin_layout Plain Layout
24274 \change_inserted 2090807402 1370139674
24287 update this list for LyX 2.1!
24299 \begin_layout Description
24303 \begin_layout Description
24307 \begin_layout Description
24311 \begin_layout Description
24315 \begin_layout Description
24319 \begin_layout Description
24323 \begin_layout Description
24327 \begin_layout Description
24331 \begin_layout Description
24332 cursor Cursor color
24335 \begin_layout Description
24336 background Background color
24339 \begin_layout Description
24340 foreground Foreground color
24343 \begin_layout Description
24344 selection Background color of selected text
24347 \begin_layout Description
24348 selectiontext Foreground color of selected text
24351 \begin_layout Description
24352 latex Text color in LaTeX mode
24355 \begin_layout Description
24356 preview The color used for previews
24359 \begin_layout Description
24360 inlinecompletion Inline completion color
24363 \begin_layout Description
24364 nonunique_inlinecompletion Inline completion color for the non-unique part
24367 \begin_layout Description
24368 notelabel Label color for notes
24371 \begin_layout Description
24372 notebg Background color of notes
24375 \begin_layout Description
24376 commentlabel Label color for comments
24379 \begin_layout Description
24380 commentbg Background color of comments
24383 \begin_layout Description
24384 greyedoutlabel Label color for greyedout insets
24387 \begin_layout Description
24388 greyedouttext Color for greyedout inset text
24391 \begin_layout Description
24392 greyedoutbg Background color of greyedout inset
24395 \begin_layout Description
24396 shadedbg Background color of shaded box
24399 \begin_layout Description
24400 listingsbg Background color of listings inset
24403 \begin_layout Description
24404 branchlabel Label color for branches
24407 \begin_layout Description
24408 footlabel Label color for footnotes
24411 \begin_layout Description
24412 indexlabel Label color for index insets
24415 \begin_layout Description
24416 marginlabel Label color for margin notes
24419 \begin_layout Description
24420 phantomtext Text color for phantom insets
24423 \begin_layout Description
24424 urllabel Label color for URL insets
24427 \begin_layout Description
24428 urltext Color for URL inset text
24431 \begin_layout Description
24432 depthbar Color for the depth bars in the margin
24435 \begin_layout Description
24436 language Color for marking foreign language words
24439 \begin_layout Description
24440 command Text color for command insets
24443 \begin_layout Description
24444 commandbg Background color for command insets
24447 \begin_layout Description
24448 commandframe Frame color for command insets
24451 \begin_layout Description
24452 special Special chars text color
24455 \begin_layout Description
24456 graphicsbg Graphics inset background color
24459 \begin_layout Description
24460 math Math inset text color
24463 \begin_layout Description
24464 mathbg Math inset background color
24467 \begin_layout Description
24468 mathmacrobg Macro math inset background color
24471 \begin_layout Description
24472 mathmacrohoverbg Macro math inset background color hovered
24475 \begin_layout Description
24476 mathmacrolabel Macro math label color
24479 \begin_layout Description
24480 mathmacroframe Macro math frame color
24483 \begin_layout Description
24484 mathmacroblend Macro math blended color
24487 \begin_layout Description
24488 mathmacrooldarg Macro template color for old parameters
24491 \begin_layout Description
24492 mathmacronewarg Macro template color for new parameters
24495 \begin_layout Description
24496 mathframe Math inset frame color under focus
24499 \begin_layout Description
24500 mathcorners Math inset frame color not under focus
24503 \begin_layout Description
24504 mathline Math line color
24507 \begin_layout Description
24508 collapsable Collapsable insets text
24511 \begin_layout Description
24512 collapsableframe Collapsable insets frame
24515 \begin_layout Description
24516 insetbg Inset marker background color
24519 \begin_layout Description
24520 insetframe Inset marker frame color
24523 \begin_layout Description
24524 error Error box text color
24527 \begin_layout Description
24528 eolmarker End of line marker color
24531 \begin_layout Description
24532 added_space Added space colour
24535 \begin_layout Description
24536 appendix Appendix marker color
24539 \begin_layout Description
24540 changebar Changebar color
24543 \begin_layout Description
24544 deletedtext Deleted text color
24547 \begin_layout Description
24548 addedtext Added text color
24551 \begin_layout Description
24552 changedtextauthor1 Changed text color author 1
24555 \begin_layout Description
24556 changedtextauthor2 Changed text color author 2
24559 \begin_layout Description
24560 changedtextauthor3 Changed text color author 3
24563 \begin_layout Description
24564 changedtextauthor4 Changed text color author 4
24567 \begin_layout Description
24568 changedtextauthor5 Changed text color author 5
24571 \begin_layout Description
24572 deletedtextmodifier Deleted text modifying color
24575 \begin_layout Description
24576 tabularline Table line color
24579 \begin_layout Description
24580 tabularonoffline Table line color
24583 \begin_layout Description
24584 bottomarea Bottom area color
24587 \begin_layout Description
24588 newpage New page color
24591 \begin_layout Description
24592 pagebreak Page break color
24595 \begin_layout Description
24596 buttonframe Color used for button frame
24599 \begin_layout Description
24600 buttonbg Color used for bottom background
24603 \begin_layout Description
24604 buttonhoverbg Color used for buttom under focus
24607 \begin_layout Description
24608 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24612 \begin_layout Description
24613 previewframe Preview frame color
24616 \begin_layout Description
24617 inherit Color is inherited
24620 \begin_layout Description
24621 regexpframe Color for regexp frame
24624 \begin_layout Description
24625 ignore For ignoring updates of a color