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 2090807402 "usti"
159 Customizing LyX: Features for the Advanced User
167 \begin_layout Plain Layout
169 If you have comments or error corrections, please send them to the LyX Documenta
171 \begin_inset CommandInset href
173 target "lyx-docs@lists.lyx.org"
180 \begin_inset Quotes eld
184 \begin_inset Quotes erd
187 in the subject header, and please cc the current maintainer of this file,
188 Richard Heck <rgheck@comcast.net>.
194 \begin_inset Newline newline
198 \begin_inset Newline newline
204 \begin_layout Standard
205 \begin_inset CommandInset toc
206 LatexCommand tableofcontents
213 \begin_layout Standard
214 \begin_inset Note Note
217 \begin_layout Plain Layout
218 Please use change tracking when modifying this document.
219 This makes it easier for our translators to recognize things that have
220 been changed, and it helps the maintainer keep up-to-date with what's been
229 \begin_layout Chapter
233 \begin_layout Standard
234 This manual covers the customization features present in LyX.
235 In it, we discuss issues like keyboard shortcuts, screen previewing options,
236 printer options, sending commands to LyX via the LyX Server, internationalizati
237 on, installing new LaTeX classes and LyX layouts, etc.
238 We can't possibly hope to touch on everything you can change—our developers
239 add new features faster than we can document them—but we will explain the
240 most common customizations and hopefully point you in the right direction
241 for some of the more obscure ones.
244 \begin_layout Standard
245 \begin_inset Branch OutDated
248 \begin_layout Standard
249 Information from previous versions of this document that now seems to be
250 outdated is contained in the OutDated branch of this document.
251 By default, this information will not appear in the LaTeX output.
259 \begin_layout Chapter
260 LyX configuration files
263 \begin_layout Standard
264 This chapter aims to help you to find your way through the LyX configuration
266 Before continuing to read this chapter, you should find out where your
267 LyX library and user directories are by using
268 \begin_inset Flex MenuItem
271 \begin_layout Plain Layout
272 Help\SpecialChar \menuseparator
283 The library directory is the place where LyX places its system-wide configurati
284 on files; the user directory is where you can place your modified versions.
285 We will call the former
286 \begin_inset Flex Code
289 \begin_layout Plain Layout
296 \begin_inset Flex MenuItem
299 \begin_layout Plain Layout
305 in the remainder of this document.
309 \begin_layout Section
311 \begin_inset Flex Code
314 \begin_layout Plain Layout
323 \begin_layout Standard
324 \begin_inset Flex Code
327 \begin_layout Plain Layout
333 and its sub-directories contain a number of files and that can be used
334 to customize LyX's behavior.
335 You can change many of these files from within LyX itself through the
336 \begin_inset Flex MenuItem
339 \begin_layout Plain Layout
340 Tools\SpecialChar \menuseparator
347 Most customization that you will want to do in LyX is possible through
349 However, many other inner aspects of LyX can be customized by modifying
351 \begin_inset Flex Code
354 \begin_layout Plain Layout
361 These files fall in different categories, described in the following subsection
365 \begin_layout Subsection
366 Automatically generated files
369 \begin_layout Standard
370 The files, which are to be found in
371 \begin_inset Flex MenuItem
374 \begin_layout Plain Layout
380 , are generated when you configure LyX.
381 They contain various default values that are guessed by inspection.
382 In general, it is not a good idea to modify them, since they might be overwritt
386 \begin_layout Labeling
387 \labelwidthstring 00.00.0000
388 \begin_inset Flex Code
391 \begin_layout Plain Layout
397 contains defaults for various commands.
400 \begin_layout Labeling
401 \labelwidthstring 00.00.0000
402 \begin_inset Flex Code
405 \begin_layout Plain Layout
411 contains the list of packages that have been recognized by LyX.
412 It is currently unused by the LyX program itself, but the information extracted
413 , and more, is made available with
414 \begin_inset Flex MenuItem
417 \begin_layout Plain Layout
418 Help\SpecialChar \menuseparator
431 \begin_layout Labeling
432 \labelwidthstring 00.00.0000
433 \begin_inset Flex Code
436 \begin_layout Plain Layout
442 the list of text classes that have been found in your
443 \begin_inset Flex Code
446 \begin_layout Plain Layout
452 directories, along with the associated LaTeX document class and their descripti
456 \begin_layout Labeling
457 \labelwidthstring 00.00.0000
458 \begin_inset Flex Code
461 \begin_layout Plain Layout
467 the list of layout modules found in your
468 \begin_inset Flex Code
471 \begin_layout Plain Layout
480 \begin_layout Labeling
481 \labelwidthstring 00.00.0000
482 \begin_inset Flex Code
485 \begin_layout Plain Layout
491 lists of various sorts of LaTeX-related files found on your system
494 \begin_layout Labeling
495 \labelwidthstring 00.00.0000
496 \begin_inset Flex Code
499 \begin_layout Plain Layout
505 is automatically generated during configuration from the file
506 \begin_inset Flex Code
509 \begin_layout Plain Layout
516 It contains information on your LaTeX configuration.
519 \begin_layout Subsection
523 \begin_layout Standard
524 These directories are duplicated between
525 \begin_inset Flex Code
528 \begin_layout Plain Layout
535 \begin_inset Flex Code
538 \begin_layout Plain Layout
545 If a particular files exists in both places, the one in
546 \begin_inset Flex Code
549 \begin_layout Plain Layout
558 \begin_layout Labeling
559 \labelwidthstring 00.00.0000
560 \begin_inset Flex Code
563 \begin_layout Plain Layout
569 this directory contains files with the extension
570 \begin_inset Flex Code
573 \begin_layout Plain Layout
579 that define the keybindings used in LyX.
580 If there exists an internationalized version of the bind file named
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
590 , that will be used first.
593 \begin_layout Labeling
594 \labelwidthstring 00.00.0000
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
604 contains graphics files that can be included in documents.
608 \begin_layout Labeling
609 \labelwidthstring 00.00.0000
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 contains LyX documentation files (including the one you are currently reading).
621 \begin_inset Flex Code
624 \begin_layout Plain Layout
630 deserves special attention, as noted above.
631 The internationalized help docs are in subdirectories
632 \begin_inset Flex Code
635 \begin_layout Plain Layout
642 \begin_inset Quotes eld
646 \begin_inset Quotes erd
649 is the ISO language code.
651 \begin_inset CommandInset ref
653 reference "cha:Internationalizing-LyX"
660 \begin_layout Labeling
661 \labelwidthstring 00.00.0000
662 \begin_inset Flex Code
665 \begin_layout Plain Layout
671 contains example files that explain how to use some features.
672 In the file browser, press the
673 \begin_inset Flex MenuItem
676 \begin_layout Plain Layout
685 \begin_layout Labeling
686 \labelwidthstring 00.00.0000
687 \begin_inset Flex Code
690 \begin_layout Plain Layout
696 contains image files that are used by the
697 \begin_inset Flex MenuItem
700 \begin_layout Plain Layout
707 In addition, it also contains the individual icons used in the toolbar
708 and the banners that can be shown when LyX is launched.
711 \begin_layout Labeling
712 \labelwidthstring 00.00.0000
713 \begin_inset Flex Code
716 \begin_layout Plain Layout
722 contains keyboard keymapping files.
724 \begin_inset CommandInset ref
726 reference "sec:International-Keymap-Stuff"
733 \begin_layout Labeling
734 \labelwidthstring 00.00.0000
735 \begin_inset Flex Code
738 \begin_layout Plain Layout
744 contains the text class and module files described in
745 \begin_inset CommandInset ref
747 reference "cha:Installing-New-Document"
754 \begin_layout Labeling
755 \labelwidthstring 00.00.0000
756 \begin_inset Flex Code
759 \begin_layout Plain Layout
766 \begin_inset Flex Code
769 \begin_layout Plain Layout
775 Python scripts used to convert between LyX versions.
776 These can be run from the command line if, say, you want to batch-convert
780 \begin_layout Labeling
781 \labelwidthstring 00.00.0000
782 \begin_inset Flex Code
785 \begin_layout Plain Layout
791 contains some files that demonstrate the capabilities of the
792 \begin_inset Flex MenuItem
795 \begin_layout Plain Layout
806 Also contains some scripts used by LyX itself.
809 \begin_layout Labeling
810 \labelwidthstring 00.00.0000
811 \begin_inset Flex Code
814 \begin_layout Plain Layout
820 contains the standard LyX template files described in
821 \begin_inset CommandInset ref
823 reference "sub:Creating-Templates"
830 \begin_layout Labeling
831 \labelwidthstring 00.00.0000
832 \begin_inset Flex Code
835 \begin_layout Plain Layout
841 contains files with the extension
842 \begin_inset Flex Code
845 \begin_layout Plain Layout
851 that define the user interface to LyX.
852 That is, the files define which items appear in which menus and the items
853 appearing on the toolbar.
856 \begin_layout Subsection
857 Files you don't want to modify
860 \begin_layout Standard
861 These files are used internally by LyX and you generally do not need to
862 modify them unless you are a developer.
865 \begin_layout Labeling
866 \labelwidthstring 00.00.0000
867 \begin_inset Flex Code
870 \begin_layout Plain Layout
876 this file contains the list of LyX developers.
877 The contents are displayed with the menu entry
878 \begin_inset Flex MenuItem
881 \begin_layout Plain Layout
882 Help\SpecialChar \menuseparator
895 \begin_layout Labeling
896 \labelwidthstring 00.00.0000
897 \begin_inset Flex Code
900 \begin_layout Plain Layout
906 this is a LaTeX script used during the configuration process.
910 \begin_layout Labeling
911 \labelwidthstring 00.00.0000
912 \begin_inset Flex Code
915 \begin_layout Plain Layout
921 this is the script that is used to re-configure LyX.
922 It creates configuration files in the directory it was run from.
925 \begin_layout Subsection
926 Other files needing a line or two
929 \begin_layout Labeling
930 \labelwidthstring 00.00.0000
931 \begin_inset Flex Code
934 \begin_layout Plain Layout
940 this contains tables describing how different character encodings can be
944 \begin_layout Labeling
945 \labelwidthstring 00.00.0000
946 \begin_inset Flex Code
949 \begin_layout Plain Layout
955 this file contains the templates available to the new
956 \begin_inset Flex MenuItem
959 \begin_layout Plain Layout
970 \begin_inset CommandInset ref
972 reference "chap:Including-External-Material"
979 \begin_layout Labeling
980 \labelwidthstring 00.00.0000
981 \begin_inset Flex Code
984 \begin_layout Plain Layout
990 this file contains a list of all the languages currently supported by LyX.
993 \begin_layout Labeling
994 \labelwidthstring 00.00.0000
995 \begin_inset Flex Code
998 \begin_layout Plain Layout
1004 contains information about the supported fonts.
1007 \begin_layout Labeling
1008 \labelwidthstring 00.00.0000
1009 \begin_inset Flex Code
1012 \begin_layout Plain Layout
1018 this file contains translations for internationalized paragraph styles
1020 \begin_inset CommandInset ref
1022 reference "sub:I18n"
1029 \begin_layout Labeling
1030 \labelwidthstring 00.00.0000
1031 \begin_inset Flex Code
1034 \begin_layout Plain Layout
1040 this file contains information about unicode-encoded glyphs and the way
1041 they are supported by LyX via LaTeX.
1044 \begin_layout Section
1045 Your local configuration directory
1048 \begin_layout Standard
1049 Even if you are using LyX as an unprivileged user, you might want to change
1050 LyX configuration for your own use.
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1061 directory contains all your personal configuration files.
1062 This is the directory described as
1063 \begin_inset Quotes eld
1067 \begin_inset Quotes erd
1071 \begin_inset Flex MenuItem
1074 \begin_layout Plain Layout
1075 Help\SpecialChar \menuseparator
1077 \begin_inset space ~
1086 This directory is used as a mirror of
1087 \begin_inset Flex Code
1090 \begin_layout Plain Layout
1096 , which means that every file in
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 is a replacement for the corresponding file in
1107 \begin_inset Flex Code
1110 \begin_layout Plain Layout
1117 Any configuration file described in the above sections can be placed either
1118 in the system-wide directory, in which case it will affect all users, or
1119 in your local directory for your own use.
1122 \begin_layout Standard
1123 To make things clearer, let's provide a few examples:
1126 \begin_layout Itemize
1127 The preferences set in the
1128 \begin_inset Flex MenuItem
1131 \begin_layout Plain Layout
1132 Tools\SpecialChar \menuseparator
1138 dialog are saved to a file
1139 \begin_inset Flex Code
1142 \begin_layout Plain Layout
1149 \begin_inset Flex Code
1152 \begin_layout Plain Layout
1161 \begin_layout Itemize
1162 When you reconfigure using
1163 \begin_inset Flex MenuItem
1166 \begin_layout Plain Layout
1167 Tools\SpecialChar \menuseparator
1174 \begin_inset Flex Code
1177 \begin_layout Plain Layout
1183 script, and the resulting files are written in your local configuration
1185 This means that any additional text class file that you might have added
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1196 will be added to the list of classes in the
1197 \begin_inset Flex MenuItem
1200 \begin_layout Plain Layout
1201 Document\SpecialChar \menuseparator
1210 \begin_layout Itemize
1211 If you get some updated documentation from LyX ftp site and cannot install
1212 it because you do not have sysadmin rights on your system, you can just
1214 \begin_inset Flex Code
1217 \begin_layout Plain Layout
1223 and the items in the
1224 \begin_inset Flex MenuItem
1227 \begin_layout Plain Layout
1233 menu will open them!
1236 \begin_layout Section
1237 Running LyX with multiple configurations
1240 \begin_layout Standard
1241 The configuration freedom of the local configuration directory may not suffice
1242 if you want to have more than one configuration at your disposal.
1243 For example, you may want to be use different key bindings or printer settings
1245 You can achieve this by having several such directories.
1246 You then specify which directory to use at run-time.
1249 \begin_layout Standard
1250 Invoking LyX with the command line switch
1251 \begin_inset Flex Code
1254 \begin_layout Plain Layout
1264 instructs the program to read the configuration from that directory, and
1265 not from the default directory.
1266 (You can determine the default directory by running LyX without the
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1276 switch.) If the specified directory does not exist, LyX offers to create
1277 it for you, just like it does for the default directory on the first time
1278 you run the program.
1279 You can modify the configuration options in this additional user directory
1280 exactly as you would for the default directory.
1281 These directories are completely independent (but read on).
1282 Note that setting the environment variable
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1292 to some value has exactly the same effect.
1295 \begin_layout Standard
1296 Having several configurations also requires more maintenance: if you want
1297 to add a new layout to
1298 \begin_inset Flex Code
1301 \begin_layout Plain Layout
1307 which you want available from all your configurations, you must add it
1308 to each directory separately.
1309 You can avoid this with the following trick: after LyX creates the additional
1310 directory, most of the subdirectories (see above) are empty.
1311 If you want the new configuration to mirror an existing one, replace the
1312 empty subdirectory with a symbolic link to the matching subdirectory in
1313 the existing configuration.
1315 \begin_inset Flex Code
1318 \begin_layout Plain Layout
1324 subdirectory, however, since it contains a file written by the configuration
1325 script (also accessible through
1326 \begin_inset Flex MenuItem
1329 \begin_layout Plain Layout
1330 Tools\SpecialChar \menuseparator
1336 ) which is configuration-specific.
1339 \begin_layout Chapter
1340 The Preferences dialog
1343 \begin_layout Standard
1344 All options of the preferences dialog are described in the Appendix
1346 The Preferences Dialog
1353 For some options you might find here more details.
1356 \begin_layout Section
1358 \begin_inset CommandInset label
1367 \begin_layout Standard
1368 The first step is to define your file formats if they are not already defined.
1370 \begin_inset Flex MenuItem
1373 \begin_layout Plain Layout
1374 Tools\SpecialChar \menuseparator
1382 \begin_inset Flex MenuItem
1385 \begin_layout Plain Layout
1386 File Handling\SpecialChar \menuseparator
1393 \begin_inset Flex MenuItem
1396 \begin_layout Plain Layout
1402 button to define your new format.
1404 \begin_inset Flex MenuItem
1407 \begin_layout Plain Layout
1413 field contains the name used to identify the format in the GUI.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1424 is used to identify the format internally.
1425 You will also need to enter a file extension.
1426 These are all required.
1428 \begin_inset Flex MenuItem
1431 \begin_layout Plain Layout
1437 field is used to provide a keyboard shortcut on the menus.
1438 (For example, pressing
1439 \begin_inset Flex MenuItem
1442 \begin_layout Plain Layout
1449 \begin_inset Flex MenuItem
1452 \begin_layout Plain Layout
1453 View\SpecialChar \menuseparator
1454 View (Other Formats)\SpecialChar \menuseparator
1463 \begin_layout Standard
1465 \begin_inset Flex MenuItem
1468 \begin_layout Plain Layout
1475 \begin_inset Flex MenuItem
1478 \begin_layout Plain Layout
1485 For example, you might want to use
1486 \begin_inset Flex MenuItem
1489 \begin_layout Plain Layout
1495 to view PostScript files.
1496 You can enter the command needed to start the program in the corresponding
1498 In defining this command, you can use the four variables listed in the
1500 The viewer is launched when you view an image in LyX or use the
1501 \begin_inset Flex MenuItem
1504 \begin_layout Plain Layout
1511 The editor is for example launched when you right-click on an image and
1513 \begin_inset Flex MenuItem
1516 \begin_layout Plain Layout
1522 in the appearing context menu.
1525 \begin_layout Standard
1527 \begin_inset Flex MenuItem
1530 \begin_layout Plain Layout
1536 type of a format is optional, but if it is specified, it must be unique
1538 It is used to detect files of this format from the file contents.
1539 For some important file formats there is no MIME type officially registered
1541 \begin_inset CommandInset href
1544 target "http://www.iana.org/assignments/media-types/"
1549 Therefore LyX uses the extended list of MIME types as specified by
1550 \begin_inset CommandInset href
1552 name "freedesktop.org"
1553 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1560 \begin_layout Standard
1562 \begin_inset Flex MenuItem
1565 \begin_layout Plain Layout
1571 option tells LyX that a format is suitable for document export.
1572 If this is set and if a suitable conversion route exists (see
1573 \begin_inset CommandInset ref
1575 reference "sec:Converters"
1579 ), the format will appear in the
1580 \begin_inset Flex MenuItem
1583 \begin_layout Plain Layout
1584 File\SpecialChar \menuseparator
1591 The format will also appear in the
1592 \begin_inset Flex MenuItem
1595 \begin_layout Plain Layout
1601 menu if a viewer is specified for the format.
1602 Pure image formats, such as
1603 \begin_inset Flex Code
1606 \begin_layout Plain Layout
1612 , should not use this option.
1613 Formats that can both represent vector graphics and documents like
1614 \begin_inset Flex Code
1617 \begin_layout Plain Layout
1626 \begin_layout Standard
1628 \begin_inset Flex MenuItem
1631 \begin_layout Plain Layout
1632 Vector graphics format
1637 tells LyX that a format can contain vector graphics.
1638 This information is used to determine the target format of included graphics
1640 \begin_inset Flex MenuItem
1643 \begin_layout Plain Layout
1650 Included graphics may need to be converted to either
1651 \begin_inset Flex MenuItem
1654 \begin_layout Plain Layout
1661 \begin_inset Flex MenuItem
1664 \begin_layout Plain Layout
1671 \begin_inset Flex MenuItem
1674 \begin_layout Plain Layout
1681 \begin_inset Flex MenuItem
1684 \begin_layout Plain Layout
1690 cannot handle other image formats.
1691 If an included graphic is not already in
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 \begin_inset Flex MenuItem
1705 \begin_layout Plain Layout
1712 \begin_inset Flex MenuItem
1715 \begin_layout Plain Layout
1721 format, it is converted to
1722 \begin_inset Flex MenuItem
1725 \begin_layout Plain Layout
1731 if the vector format option is set, and otherwise to
1732 \begin_inset Flex MenuItem
1735 \begin_layout Plain Layout
1744 \begin_layout Section
1748 \begin_layout Standard
1749 Since all conversions from one format to another take place in LyX's temporary
1750 directory, it is sometimes necessary to modify a file before copying it
1751 to the temporary directory in order that the conversion may be performed.
1755 \begin_layout Plain Layout
1756 For example, the file may refer to other files—images, for example—using
1757 relative file names, and these may become invalid when the file is copied
1758 to the temporary directory.
1763 This is done by a Copier: It copies a file to (or from) the temporary directory
1764 and may modify it in the process.
1767 \begin_layout Standard
1768 The definitions of the copiers may use four variables:
1771 \begin_layout Labeling
1772 \labelwidthstring 00.00.0000
1773 \begin_inset Flex Code
1776 \begin_layout Plain Layout
1782 The LyX system directory (e.
1783 \begin_inset space \thinspace{}
1787 \begin_inset space \space{}
1791 \begin_inset Flex MenuItem
1794 \begin_layout Plain Layout
1803 \begin_layout Labeling
1804 \labelwidthstring 00.00.0000
1805 \begin_inset Flex Code
1808 \begin_layout Plain Layout
1817 \begin_layout Labeling
1818 \labelwidthstring 00.00.0000
1819 \begin_inset Flex Code
1822 \begin_layout Plain Layout
1831 \begin_layout Labeling
1832 \labelwidthstring 00.00.0000
1833 \begin_inset Flex Code
1836 \begin_layout Plain Layout
1842 The base name (without filename extension) in the LyX temporary directory
1845 \begin_layout Labeling
1846 \labelwidthstring 00.00.0000
1847 \begin_inset Flex Code
1850 \begin_layout Plain Layout
1856 The full directory path of the LyX temporary directory
1859 \begin_layout Labeling
1860 \labelwidthstring 00.00.0000
1861 \begin_inset Flex Code
1864 \begin_layout Plain Layout
1870 The full pathname to the original LyX file being processed
1873 \begin_layout Labeling
1874 \labelwidthstring 00.00.0000
1875 \begin_inset Flex Code
1878 \begin_layout Plain Layout
1884 The filename (without any directory path) of the LyX file.
1887 \begin_layout Labeling
1888 \labelwidthstring 00.00.0000
1889 \begin_inset Flex Code
1892 \begin_layout Plain Layout
1901 \begin_layout Standard
1902 The latter should be the filename as it would be used in a LaTeX's
1909 It is relevant only when exporting files suitable for such inclusion.
1912 \begin_layout Standard
1913 Copiers can be used to do almost anything with output files.
1914 For example, suppose you want generated pdf files to be copied to a special
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1926 Then you could write a shell script such as this one:
1929 \begin_layout Standard
1930 \begin_inset listings
1934 \begin_layout Plain Layout
1939 \begin_layout Plain Layout
1944 \begin_layout Plain Layout
1946 TOFILE=`basename $2`
1949 \begin_layout Plain Layout
1951 cp $FROMFILE /home/you/pdf/$TOFILE
1956 Save it in your local LyX directory—say,
1957 \begin_inset Flex Code
1960 \begin_layout Plain Layout
1961 /home/you/.lyx/scripts/pdfcopier.sh
1966 —and make it executable, if you need to do so on your platform.
1968 \begin_inset Flex MenuItem
1971 \begin_layout Plain Layout
1972 Tools\SpecialChar \menuseparator
1978 dialog, select under
1979 \begin_inset Flex MenuItem
1982 \begin_layout Plain Layout
1983 File Handling\SpecialChar \menuseparator
1990 \begin_inset Flex MenuItem
1993 \begin_layout Plain Layout
1999 format—or one of the other pdf formats—and enter
2000 \begin_inset Flex Code
2003 \begin_layout Plain Layout
2004 pdfcopier.sh $$i $$o
2010 \begin_inset Flex MenuItem
2013 \begin_layout Plain Layout
2023 \begin_layout Standard
2024 Copiers are used by LyX in various of its own conversions.
2025 For example, if appropriate programs are found, LyX will automatically
2026 install copiers for the
2027 \begin_inset Flex MenuItem
2030 \begin_layout Plain Layout
2037 \begin_inset Flex MenuItem
2040 \begin_layout Plain Layout
2042 \begin_inset space ~
2051 When these formats are exported, the copier sees that not just the main
2052 HTML file but various associated files (style files, images, etc.) are also
2054 All these files are written to a subdirectory of the directory in which
2055 the original LyX file was found.
2059 \begin_layout Plain Layout
2060 This copier can be customized.
2062 \begin_inset Quotes eld
2066 \begin_inset Quotes erd
2069 argument takes a comma-separated list of extensions to be copied; if it
2070 is omitted, all files will be copied.
2072 \begin_inset Quotes eld
2076 \begin_inset Quotes erd
2079 argument determines the extension added to the generated directory.
2081 \begin_inset Quotes eld
2085 \begin_inset Flex MenuItem
2088 \begin_layout Plain Layout
2095 \begin_inset Quotes erd
2098 , so HTML generated from
2099 \begin_inset Flex MenuItem
2102 \begin_layout Plain Layout
2103 /path/to/filename.lyx
2109 \begin_inset Flex MenuItem
2112 \begin_layout Plain Layout
2113 /path/to/filename.html.LyXconv
2127 \begin_layout Section
2129 \begin_inset CommandInset label
2131 name "sec:Converters"
2138 \begin_layout Standard
2139 You can define your own Converters to convert files between different formats.
2141 \begin_inset Flex MenuItem
2144 \begin_layout Plain Layout
2145 Tools\SpecialChar \menuseparator
2146 Preferences\SpecialChar \menuseparator
2147 File Handling\SpecialChar \menuseparator
2156 \begin_layout Standard
2157 To define a new converter, select the
2158 \begin_inset Flex MenuItem
2161 \begin_layout Plain Layout
2163 \begin_inset space ~
2172 \begin_inset Flex MenuItem
2175 \begin_layout Plain Layout
2177 \begin_inset space ~
2185 from the drop-down lists, enter the command needed for the conversion,
2187 \begin_inset Flex MenuItem
2190 \begin_layout Plain Layout
2197 Several variables can be used in the definition of converters:
2200 \begin_layout Labeling
2201 \labelwidthstring 00.00.0000
2202 \begin_inset Flex Code
2205 \begin_layout Plain Layout
2211 The LyX system directory
2214 \begin_layout Labeling
2215 \labelwidthstring 00.00.0000
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2247 \begin_layout Plain Layout
2253 The base filename of the input file (i.
2254 \begin_inset space \thinspace{}
2257 g., without the extension)
2260 \begin_layout Labeling
2261 \labelwidthstring 00.00.0000
2262 \begin_inset Flex Code
2265 \begin_layout Plain Layout
2271 The path to the input file
2274 \begin_layout Labeling
2275 \labelwidthstring 00.00.0000
2276 \begin_inset Flex Code
2279 \begin_layout Plain Layout
2285 The path to the original input file (this is different from $$p when a
2286 chain of converters is called)
2289 \begin_layout Labeling
2290 \labelwidthstring 00.00.0000
2291 \begin_inset Flex Code
2294 \begin_layout Plain Layout
2300 The iconv name for the encoding of the document.
2303 \begin_layout Standard
2305 \begin_inset Flex MenuItem
2308 \begin_layout Plain Layout
2310 \begin_inset space ~
2318 field you can enter the following flags, separated by commas:
2321 \begin_layout Labeling
2322 \labelwidthstring 00.00.0000
2323 \begin_inset Flex Code
2326 \begin_layout Plain Layout
2332 This converter runs some form of LaTeX.
2333 This will make LyX's LaTeX error logs available.
2336 \begin_layout Labeling
2337 \labelwidthstring 00.00.0000
2338 \begin_inset Flex Code
2341 \begin_layout Plain Layout
2348 \begin_inset Flex MenuItem
2351 \begin_layout Plain Layout
2357 file for the conversion.
2360 \begin_layout Labeling
2361 \labelwidthstring 00.00.0000
2362 \begin_inset Flex Code
2365 \begin_layout Plain Layout
2372 \begin_inset Quotes eld
2376 \begin_inset Quotes erd
2379 file from the backend, which in practice means a LaTeX file like the one
2380 we would export, without
2381 \begin_inset Flex Code
2384 \begin_layout Plain Layout
2393 \begin_layout Labeling
2394 \labelwidthstring 00.00.0000
2395 \begin_inset Flex Code
2398 \begin_layout Plain Layout
2407 \begin_layout Standard
2408 The following three flags are not really flags at all because they take
2410 \begin_inset Flex MenuItem
2413 \begin_layout Plain Layout
2415 \begin_inset space ~
2419 \begin_inset space ~
2430 \begin_layout Labeling
2431 \labelwidthstring 00.00.0000
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2441 If set, the converter's standard error will be redirected to a file
2442 \begin_inset Flex Code
2445 \begin_layout Plain Layout
2451 , and the script given as argument will be run as:
2452 \begin_inset Flex Code
2455 \begin_layout Plain Layout
2456 script < infile.out > infile.log
2462 The argument may contain
2463 \begin_inset Flex Code
2466 \begin_layout Plain Layout
2475 \begin_layout Labeling
2476 \labelwidthstring 00.00.0000
2477 \begin_inset Flex Code
2480 \begin_layout Plain Layout
2486 The name of the directory in which the converter will dump the generated
2488 LyX will not create this directory, and it does not copy anything into
2489 it, though it will copy this directory to the destination.
2490 The argument may contain
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2500 , which will be replaced by the base name of the input and output files,
2501 respectively, when the directory is copied.
2502 \begin_inset Newline newline
2505 Note that resultdir and usetempdir make no sense together.
2506 The latter will be ignored if the former is given.
2509 \begin_layout Labeling
2510 \labelwidthstring 00.00.0000
2511 \begin_inset Flex Code
2514 \begin_layout Plain Layout
2520 Determines the output file name and may, contain
2521 \begin_inset Flex Code
2524 \begin_layout Plain Layout
2531 Sensible only with resultdir and optional even then; if not given, it defaults
2535 \begin_layout Standard
2536 None of these last three are presently used in any of the converters that
2537 are installed with LyX.
2541 \begin_layout Standard
2542 You do not have to define converters for all formats between which you want
2544 For example, you will note that there is no `LyX to PostScript' converter,
2545 but LyX will export PostScript.
2546 It does so by first creating a LaTeX file (no converter needs to be defined
2547 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2548 and finally converting the resulting DVI file to PostScript.
2549 LyX finds such `chains' of converters automatically, and it will always
2550 choose the shortest possible chain.
2551 You can, though, still define multiple conversion methods between file
2553 For example, the standard LyX configuration provides five ways to convert
2557 \begin_layout Enumerate
2559 \begin_inset Flex MenuItem
2562 \begin_layout Plain Layout
2571 \begin_layout Enumerate
2572 via (DVI and) PostScript, using
2573 \begin_inset Flex MenuItem
2576 \begin_layout Plain Layout
2585 \begin_layout Enumerate
2587 \begin_inset Flex MenuItem
2590 \begin_layout Plain Layout
2599 \begin_layout Enumerate
2601 \begin_inset Flex MenuItem
2604 \begin_layout Plain Layout
2613 \begin_layout Enumerate
2615 \begin_inset Flex MenuItem
2618 \begin_layout Plain Layout
2627 \begin_layout Standard
2628 To define such alternate chains, you must define multiple target `file formats',
2630 \begin_inset CommandInset ref
2632 reference "sec:Formats"
2637 For example, in the standard configuration, the formats named
2638 \begin_inset Flex MenuItem
2641 \begin_layout Plain Layout
2648 \begin_inset Flex MenuItem
2651 \begin_layout Plain Layout
2658 \begin_inset Flex MenuItem
2661 \begin_layout Plain Layout
2668 \begin_inset Flex MenuItem
2671 \begin_layout Plain Layout
2678 \begin_inset Flex MenuItem
2681 \begin_layout Plain Layout
2688 \begin_inset Flex MenuItem
2691 \begin_layout Plain Layout
2698 \begin_inset Flex MenuItem
2701 \begin_layout Plain Layout
2708 \begin_inset Flex MenuItem
2711 \begin_layout Plain Layout
2718 \begin_inset Flex MenuItem
2721 \begin_layout Plain Layout
2728 \begin_inset Flex MenuItem
2731 \begin_layout Plain Layout
2737 ) are defined, all of which share the extension
2738 \begin_inset Flex MenuItem
2741 \begin_layout Plain Layout
2747 , and which correspond to the conversion methods just mentioned.
2750 \begin_layout Chapter
2751 Internationalizing LyX
2752 \begin_inset CommandInset label
2754 name "cha:Internationalizing-LyX"
2761 \begin_layout Standard
2762 LyX supports using a translated interface.
2763 Last time we checked, LyX provided text in thirty languages.
2764 The language of choice is called your
2769 (For further reading on locale settings, see also the documentation for
2770 locale that comes with your operating system.
2771 For Linux, the manual page for
2772 \begin_inset Flex Code
2775 \begin_layout Plain Layout
2781 could be a good place to start).
2784 \begin_layout Standard
2785 Notice that these translations will work, but do contain a few flaws.
2786 In particular, all dialogs have been designed with the English text in
2787 mind, which means that some of the translated text will be too large to
2788 fit within the space allocated.
2789 This is only a display problem and will not cause any harm.
2790 Also, you will find that some of the translations do not define shortcut
2791 keys for everything.
2792 Sometimes, there are simply not enough free letters to do it.
2793 Other times, the translator just hasn't got around to doing it yet.
2794 Our localization team, which you may wish to join,
2798 \begin_layout Plain Layout
2799 If you are a fluent speaker of a language other than English, joining these
2800 teams is a great way to give back to the LyX community!
2805 will of course try to fix these shortcomings in future versions of LyX.
2808 \begin_layout Section
2812 \begin_layout Subsection
2813 Translating the graphical user interface (text messages).
2816 \begin_layout Standard
2818 \begin_inset Flex Code
2821 \begin_layout Plain Layout
2827 library to handle the internationalization of the interface.
2828 To have LyX speak your favorite language in all menus and dialogs, you
2830 \begin_inset Flex Code
2833 \begin_layout Plain Layout
2839 -file for that language.
2840 When this is available, you'll have to generate a
2841 \begin_inset Flex Code
2844 \begin_layout Plain Layout
2850 -file from it and install the
2851 \begin_inset Flex Code
2854 \begin_layout Plain Layout
2861 The process of doing all of this is explained in the documentation for
2863 \begin_inset Flex Code
2866 \begin_layout Plain Layout
2873 It is possible to do this just for yourself, but if you're going to do
2874 it, you might as well share the results of your labors with the rest of
2876 Send a message to the LyX developers' list for more information about how
2880 \begin_layout Standard
2881 In short, this is what you should do (xx denotes the language code):
2884 \begin_layout Itemize
2885 Check out the LyX source code.
2887 \begin_inset CommandInset href
2889 name "information on the web"
2890 target "http://www.lyx.org/HowToUseSVN"
2897 \begin_layout Itemize
2899 \begin_inset Flex Code
2902 \begin_layout Plain Layout
2908 to the folder of the
2909 \begin_inset Flex Code
2912 \begin_layout Plain Layout
2920 \begin_inset Flex Code
2923 \begin_layout Plain Layout
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 doesn't exist anywhere, it can be remade with the console command
2941 \begin_inset Flex Code
2944 \begin_layout Plain Layout
2950 in that directory, or you can use an existing po-file for some other language
2954 \begin_layout Itemize
2956 \begin_inset Flex Code
2959 \begin_layout Plain Layout
2969 \begin_layout Plain Layout
2970 This is just a text file, so it can be edited in any text editor.
2971 But there are also specialized programs that support such editing, such
2976 (for all platforms) or
2985 contains a `mode' for editing
2986 \begin_inset Flex Code
2989 \begin_layout Plain Layout
3000 For some menu- and widget-labels, there are also shortcut keys that should
3002 Those keys are marked after a `|', and should be translated according to
3003 the words and phrases of the language.
3004 You should also fill also out the information at the beginning of the new
3006 \begin_inset Flex Code
3009 \begin_layout Plain Layout
3015 -file with your email-address, etc., so people know where to reach you with
3016 suggestions and entertaining flames.
3019 \begin_layout Standard
3020 If you are just doing this on your own, then:
3023 \begin_layout Itemize
3025 \begin_inset Flex Code
3028 \begin_layout Plain Layout
3035 This can be done with
3036 \begin_inset Flex Code
3039 \begin_layout Plain Layout
3040 msgfmt -o xx.mo < xx.po
3048 \begin_layout Itemize
3050 \begin_inset Flex Code
3053 \begin_layout Plain Layout
3059 -file to your locale-tree, at the correct directory for application messages
3064 xx, and under the name
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3075 \begin_inset space \thinspace{}
3079 \begin_inset space \space{}
3083 \begin_inset Flex Code
3086 \begin_layout Plain Layout
3087 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3097 \begin_layout Standard
3098 As said, however, it would be best if the new
3099 \begin_inset Flex Code
3102 \begin_layout Plain Layout
3108 -file could be added to the LyX distribution, so others can use it.
3109 Adding it involves making additional changes to LyX.
3110 So send an email to the developers' mailing list if you're interested in
3114 \begin_layout Subsubsection
3118 \begin_layout Standard
3119 Sometimes it turns out that one English message needs to be translated into
3120 different messages in the target language.
3121 One example is the message
3122 \begin_inset Flex Code
3125 \begin_layout Plain Layout
3131 which has the German translation
3139 , depending upon exactly what the English
3140 \begin_inset Quotes eld
3144 \begin_inset Quotes erd
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3158 does not handle such ambiguous translations.
3159 Therefore you have to add some context information to the message: Instead
3161 \begin_inset Flex Code
3164 \begin_layout Plain Layout
3171 \begin_inset Flex Code
3174 \begin_layout Plain Layout
3175 To[[as in 'From format x to format y']]
3181 \begin_inset Flex Code
3184 \begin_layout Plain Layout
3185 To[[as in 'From page x to page y']].
3190 Now the two occurrences of
3191 \begin_inset Flex Code
3194 \begin_layout Plain Layout
3201 \begin_inset Flex Code
3204 \begin_layout Plain Layout
3210 and can be translated correctly to
3221 \begin_layout Standard
3222 Of course the context information needs to be stripped off the original
3223 message when no translation is used.
3224 Therefore you have to put it in double square brackets at the end of the
3225 message (see the example above).
3226 The translation mechanism of LyX ensures that everything in double square
3227 brackets at the end of messages is removed before displaying the message.
3230 \begin_layout Subsection
3231 Translating the documentation.
3234 \begin_layout Standard
3235 The online documentation (in the
3236 \begin_inset Flex MenuItem
3239 \begin_layout Plain Layout
3245 -menu) can (and should!) be translated.
3246 If there are translated versions of the documentation available
3250 \begin_layout Plain Layout
3251 As of March 2008, at least some of the documents have been translated into
3252 fourteen languages, with the Tutorial available in a few more.
3257 and the locale is set accordingly, these will be used automagically by
3259 LyX looks for translated versions as
3260 \begin_inset Flex Code
3263 \begin_layout Plain Layout
3264 LyXDir/doc/xx/DocName.lyx
3270 \begin_inset Flex Code
3273 \begin_layout Plain Layout
3279 is the code for the language currently in use.
3280 If there are no translated documents, the default English versions will
3282 Note that the translated versions must have the same filenames (
3283 \begin_inset Flex Code
3286 \begin_layout Plain Layout
3292 above) as the original.
3293 If you feel up to translating the documentation (an excellent way to proof-read
3294 the original documentation by the way!), there are a few things you should
3298 \begin_layout Itemize
3299 Check out the documentation translation web page at
3300 \begin_inset CommandInset href
3302 name "http://www.lyx.org/Translation"
3303 target "http://www.lyx.org/Translation"
3308 That way, you can find out which (if any) documents have already been translate
3309 d into your language.
3310 You can also find out who (if anyone) is organizing the effort to translate
3311 the documentation into your language.
3312 If no one is organizing the effort, please let us know that you're interested.
3315 \begin_layout Standard
3316 Once you get to actually translating, here's a few hints for you that may
3320 \begin_layout Itemize
3321 Join the documentation team! There is information on how to do that in
3322 \begin_inset Flex Code
3325 \begin_layout Plain Layout
3332 \begin_inset Flex MenuItem
3335 \begin_layout Plain Layout
3336 Help\SpecialChar \menuseparator
3342 ), which by the way is the first document you should translate.
3345 \begin_layout Itemize
3346 Learn the typographic conventions for the language you are translating to.
3347 Typography is an ancient art and over the centuries, a great variety of
3348 conventions have developed throughout different parts of the world.
3349 Also study the professional terminology amongst typographers in your country.
3350 Inventing your own terminology will only confuse the users.
3353 (Warning! Typography is addictive!)
3356 \begin_layout Itemize
3357 Make a copy of the document.
3358 This will be your working copy.
3359 You can use this as your personal translated help-file by placing it in
3361 \begin_inset Flex Code
3364 \begin_layout Plain Layout
3373 \begin_layout Itemize
3374 Sometimes the original document (from the LyX-team) will be updated.
3375 Use the source viewer at
3376 \begin_inset CommandInset href
3378 name "http://www.lyx.org/trac/timeline"
3379 target "http://www.lyx.org/trac/timeline"
3383 to see what has been changed.
3384 That way you can easily see which parts of the translated document need
3388 \begin_layout Standard
3389 If you ever find an error in the original document, fix it and notify the
3390 rest of the documentation team of the changes! (You didn't forget to join
3391 the documentation team, did you?)
3394 \begin_layout Standard
3395 \begin_inset Branch OutDated
3398 \begin_layout Section
3399 International Keyboard Support
3402 \begin_layout Standard
3405 [Editor's Note: The following section is by
3413 It needs to be fixed to conform to the new Documentation Style sheet and
3414 to make use of the new v1.0 features.
3415 The whole thing also needs to be merged with the section following it.-jw
3416 It may also be badly out of date.-rh (2008)]
3419 \begin_layout Subsection
3420 Defining Own Keymaps: Keymap File Format
3423 \begin_layout Standard
3424 Let's look at a keyboard definition file a little closer.
3425 It is a plain text file defining
3428 \begin_layout Itemize
3429 key-to-key or key-to-string translations
3432 \begin_layout Itemize
3436 \begin_layout Itemize
3437 dead keys exceptions
3440 \begin_layout Standard
3441 To define key-to-key or key-to-string translation, use this command:
3444 \begin_layout Quotation
3445 \begin_inset Flex Code
3448 \begin_layout Plain Layout
3457 \begin_inset Flex Code
3460 \begin_layout Plain Layout
3469 \begin_layout Standard
3471 \begin_inset Flex Code
3474 \begin_layout Plain Layout
3480 is the key to be translated and
3481 \begin_inset Flex Code
3484 \begin_layout Plain Layout
3490 is the string to be inserted into the document.
3491 To define dead keys, use:
3494 \begin_layout Quotation
3495 \begin_inset Flex Code
3498 \begin_layout Plain Layout
3507 \begin_inset Flex Code
3510 \begin_layout Plain Layout
3519 \begin_layout Standard
3521 \begin_inset Flex Code
3524 \begin_layout Plain Layout
3530 is a keyboard key and
3531 \begin_inset Flex Code
3534 \begin_layout Plain Layout
3541 The following dead keys are supported (shortcut name is in parentheses):
3544 \begin_layout Quotation
3548 \begin_inset space \hfill{}
3554 \begin_layout Quotation
3556 \begin_inset space \hfill{}
3562 \begin_layout Quotation
3564 \begin_inset space \hfill{}
3570 \begin_layout Quotation
3572 \begin_inset space \hfill{}
3578 \begin_layout Quotation
3580 \begin_inset space \hfill{}
3586 \begin_layout Quotation
3588 \begin_inset space \hfill{}
3595 \begin_layout Plain Layout
3607 \begin_layout Quotation
3609 \begin_inset space \hfill{}
3615 \begin_layout Quotation
3617 \begin_inset space \hfill{}
3624 \begin_layout Plain Layout
3636 \begin_layout Quotation
3638 \begin_inset space \hfill{}
3644 \begin_layout Quotation
3646 \begin_inset space \hfill{}
3652 \begin_layout Quotation
3654 \begin_inset space \hfill{}
3661 \begin_layout Plain Layout
3673 \begin_layout Quotation
3675 \begin_inset space \hfill{}
3682 \begin_layout Plain Layout
3694 \begin_layout Quotation
3696 \begin_inset space \hfill{}
3702 \begin_layout Quotation
3703 hungarian umlaut (hug)
3704 \begin_inset space \hfill{}
3710 \begin_layout Quotation
3712 \begin_inset space \hfill{}
3718 \begin_layout Quotation
3720 \begin_inset space \hfill{}
3727 \begin_layout Plain Layout
3739 \begin_layout Standard
3740 Since in many international keyboards there are exceptions to what some
3741 dead keys should do, you can define them using
3744 \begin_layout Quotation
3745 \begin_inset Flex Code
3748 \begin_layout Plain Layout
3756 deadkey key outstring
3759 \begin_layout Standard
3760 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3764 \begin_layout Quotation
3765 \begin_inset Flex Code
3768 \begin_layout Plain Layout
3781 \begin_layout Standard
3782 to make it work correctly.
3783 Also, you have to define as exceptions dead keys over i and j, to remove
3784 the dot from them before inserting an accent mark.
3785 I will change this when the time comes, but so far I haven't had time.
3788 \begin_layout Standard
3789 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3792 \begin_inset Flex Code
3795 \begin_layout Plain Layout
3801 have different meaning.
3803 \begin_inset Flex Code
3806 \begin_layout Plain Layout
3812 marks comments, quotes start and end LaTeX-style commands.
3813 To enter quote, you'll need to use
3814 \begin_inset Flex Code
3817 \begin_layout Plain Layout
3826 \begin_inset Flex Code
3829 \begin_layout Plain Layout
3836 \begin_inset Flex Code
3839 \begin_layout Plain Layout
3850 \begin_layout Standard
3851 If you make a keyboard description file that works for your language, please
3852 mail it to me, so I can include it in the next keymap distribution.
3855 \begin_layout Standard
3856 More keywords will be supported in keymap configuration file in future,
3860 \begin_layout Itemize
3861 \begin_inset Flex Code
3864 \begin_layout Plain Layout
3875 \begin_inset space \hfill{}
3879 \begin_inset Flex Code
3882 \begin_layout Plain Layout
3891 \begin_layout Itemize
3892 \begin_inset Flex Code
3895 \begin_layout Plain Layout
3906 \begin_inset space \hfill{}
3910 \begin_inset Flex Code
3913 \begin_layout Plain Layout
3919 an external keymap translation program
3922 \begin_layout Standard
3923 Also, it should look into
3924 \begin_inset Flex Code
3927 \begin_layout Plain Layout
3933 file for defaults, too (for example, a
3934 \begin_inset Flex Code
3937 \begin_layout Plain Layout
3945 option to include default keyboard).
3953 \begin_layout Section
3954 International Keymap Stuff
3955 \begin_inset CommandInset label
3957 name "sec:International-Keymap-Stuff"
3964 \begin_layout Standard
3965 \begin_inset Note Note
3968 \begin_layout Plain Layout
3969 In doing the revisions on this document in March 2008, I did not look over
3970 this stuff, as I do not understand it.
3971 It would be good if someone else could do so.
3980 \begin_layout Standard
3981 The next two sections describe the
3982 \begin_inset Flex Code
3985 \begin_layout Plain Layout
3994 \begin_inset Flex Code
3997 \begin_layout Plain Layout
4005 file syntax in detail.
4006 These sections should help you design your own key map if the ones provided
4007 do not meet your needs.
4010 \begin_layout Subsection
4014 \begin_layout Standard
4018 \begin_inset Flex Code
4021 \begin_layout Plain Layout
4027 file maps keystrokes to characters or strings.
4028 As the name suggests, it sets a keyboard mapping.
4030 \begin_inset Flex Code
4033 \begin_layout Plain Layout
4044 \begin_inset Flex Code
4047 \begin_layout Plain Layout
4062 \begin_inset Flex Code
4065 \begin_layout Plain Layout
4078 \begin_inset Flex Code
4081 \begin_layout Plain Layout
4090 \begin_inset Flex Code
4093 \begin_layout Plain Layout
4101 are described in this section.
4104 \begin_layout Labeling
4105 \labelwidthstring 00.00.0000
4106 \begin_inset Flex Code
4109 \begin_layout Plain Layout
4117 Map a character to a string
4120 \begin_layout LyX-Code
4135 \begin_layout Standard
4168 the double-quote (")
4185 must be escaped with a preceding backslash (
4196 \begin_layout Standard
4198 \begin_inset Flex MenuItem
4201 \begin_layout Plain Layout
4209 statement to cause the symbol
4210 \begin_inset Flex MenuItem
4213 \begin_layout Plain Layout
4221 to be output for the keystroke
4222 \begin_inset Flex MenuItem
4225 \begin_layout Plain Layout
4236 \begin_layout LyX-Code
4242 \begin_layout Labeling
4243 \labelwidthstring 00.00.0000
4244 \begin_inset Flex Code
4247 \begin_layout Plain Layout
4255 Specify an accent character
4258 \begin_layout LyX-Code
4267 \begin_layout Standard
4268 This will make the cha
4306 This is the dead key
4310 \begin_layout Plain Layout
4317 refers to a key that does not produce a character by itself, but when followed
4318 with another key, produces the desired accent character.
4319 For example, a German characte
4321 r with an umlaut like
4331 can be produced in this manner.
4340 \begin_layout Standard
4353 and then another key not in
4370 followed by the other, not allowed key, as output.
4374 \begin_inset Flex MenuItem
4377 \begin_layout Plain Layout
4385 cancels a dead key, so if
4396 \begin_inset Flex MenuItem
4399 \begin_layout Plain Layout
4408 , the cursor will not go one position backwards but will instead cancel
4424 might have had on the next keystroke.
4428 \begin_layout Standard
4429 The following example specifies that the character ' is to be an acute accent,
4430 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4433 \begin_layout LyX-Code
4436 kmod ' acute aeiouAEIOU
4439 \begin_layout Labeling
4440 \labelwidthstring 00.00.0000
4441 \begin_inset Flex Code
4444 \begin_layout Plain Layout
4450 Specify an exception to the accent character
4453 \begin_layout LyX-Code
4462 \begin_layout Standard
4463 This defines an exce
4504 have been assigned a keystroke with a previous
4507 \begin_inset Flex Code
4510 \begin_layout Plain Layout
4534 must not belong in the
4581 If such a declaration does not exist in
4589 \begin_inset Flex Code
4592 \begin_layout Plain Layout
4626 \begin_inset Flex Code
4629 \begin_layout Plain Layout
4643 \begin_layout Standard
4644 The following command produces causes äi to be produced when you enter acute-i
4648 \begin_layout LyX-Code
4662 \begin_layout Labeling
4663 \labelwidthstring 00.00.0000
4664 \begin_inset Flex Code
4667 \begin_layout Plain Layout
4673 Combine two accent characters
4676 \begin_layout LyX-Code
4682 accent1 accent2 allowed
4685 \begin_layout Standard
4686 This one is getting pretty esoteric.
4687 It allows you to combine the effect
4743 \begin_inset Flex Code
4746 \begin_layout Plain Layout
4774 \begin_layout Standard
4775 Consider this example from the
4776 \begin_inset Flex Code
4779 \begin_layout Plain Layout
4790 \begin_layout LyX-Code
4793 kmod ; acute aeioyvhAEIOYVH
4797 kcomb acute umlaut iyIY
4800 \begin_layout Standard
4801 This allows you to press
4802 \begin_inset Flex MenuItem
4805 \begin_layout Plain Layout
4813 and get the effect of
4814 \begin_inset Flex Code
4817 \begin_layout Plain Layout
4836 in this case cancels the last dead key, so if you press
4837 \begin_inset Flex MenuItem
4840 \begin_layout Plain Layout
4849 \begin_inset Flex Code
4852 \begin_layout Plain Layout
4865 \begin_layout Subsection
4869 \begin_layout Standard
4871 \begin_inset Flex Code
4874 \begin_layout Plain Layout
4882 mapping is performed, a
4883 \begin_inset Flex Code
4886 \begin_layout Plain Layout
4896 file maps the strings that the symbols generate to characters in the current
4898 The LyX distribution currently includes at least the
4899 \begin_inset Flex Code
4902 \begin_layout Plain Layout
4911 \begin_inset Flex Code
4914 \begin_layout Plain Layout
4925 \begin_layout Standard
4927 \begin_inset Flex Code
4930 \begin_layout Plain Layout
4938 file is a sequence of declarations of the form
4941 \begin_layout LyX-Code
4954 \begin_layout Standard
4955 For example, in order to map
4956 \begin_inset Flex MenuItem
4959 \begin_layout Plain Layout
4969 to the corresponding character in the iso-8859-1 set (233), the following
4973 \begin_layout LyX-Code
4981 \begin_layout Standard
4983 \begin_inset Flex Code
4986 \begin_layout Plain Layout
4995 \begin_inset Flex Code
4998 \begin_layout Plain Layout
5016 the same character can apply to more than one string.
5018 \begin_inset Flex Code
5021 \begin_layout Plain Layout
5032 \begin_layout LyX-Code
5044 \begin_inset Newline newline
5060 \begin_layout Standard
5061 If LyX cannot find a mapping for the string produced by the keystroke or
5062 a deadkey sequence, it will check if it looks like an accented char and
5063 try to draw an accent over the character on screen.
5066 \begin_layout Subsection
5070 \begin_layout Standard
5071 There is a second way to add support for international characters through
5072 so-called dead-keys.
5073 A dead-key works in combination with a letter to produce an accented character.
5074 Here, we'll explain how to create a really simple dead-key to illustrate
5078 \begin_layout Standard
5079 Suppose you happen to need the circumflex character,
5080 \begin_inset Quotes eld
5084 \begin_inset Quotes erd
5089 \begin_inset Flex MenuItem
5092 \begin_layout Plain Layout
5099 \begin_inset space ~
5103 \begin_inset Flex MenuItem
5106 \begin_layout Plain Layout
5112 ] to the LyX command
5113 \begin_inset Flex Code
5116 \begin_layout Plain Layout
5123 \begin_inset Flex Code
5126 \begin_layout Plain Layout
5133 Now, whenever you type the
5134 \begin_inset Flex MenuItem
5137 \begin_layout Plain Layout
5143 -key followed by a letter, that letter will have a circumflex accent on
5145 For example, the sequence
5146 \begin_inset Quotes eld
5150 \begin_inset Flex MenuItem
5153 \begin_layout Plain Layout
5160 \begin_inset Quotes erd
5163 produces the letter:
5164 \begin_inset Quotes eld
5168 \begin_inset Quotes erd
5172 If you tried to type
5173 \begin_inset Quotes eld
5177 \begin_inset Flex MenuItem
5180 \begin_layout Plain Layout
5187 \begin_inset Quotes erd
5190 , however, LyX will complain with a beep, since a
5191 \begin_inset Quotes eld
5195 \begin_inset Flex MenuItem
5198 \begin_layout Plain Layout
5205 \begin_inset Quotes erd
5208 never takes a circumflex accent.
5210 \begin_inset Flex MenuItem
5213 \begin_layout Plain Layout
5219 after a dead-key produces the bare-accent.
5220 Please note this last point! If you bind a key to a dead-key, you'll need
5221 to rebind the character on that key to yet another key.
5223 \begin_inset Flex MenuItem
5226 \begin_layout Plain Layout
5232 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5235 \begin_layout Standard
5236 One common way to bind dead-keys is to use
5237 \begin_inset Flex MenuItem
5240 \begin_layout Plain Layout
5247 \begin_inset Flex MenuItem
5250 \begin_layout Plain Layout
5257 \begin_inset Flex MenuItem
5260 \begin_layout Plain Layout
5266 in combination with an accent, like
5267 \begin_inset Quotes eld
5271 \begin_inset Flex MenuItem
5274 \begin_layout Plain Layout
5281 \begin_inset Quotes erd
5285 \begin_inset Quotes eld
5289 \begin_inset Flex MenuItem
5292 \begin_layout Plain Layout
5299 \begin_inset Quotes erd
5303 \begin_inset Quotes eld
5307 \begin_inset Flex MenuItem
5310 \begin_layout Plain Layout
5317 \begin_inset Quotes erd
5321 Another way involves using
5322 \begin_inset Flex Code
5325 \begin_layout Plain Layout
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5341 to set up the special
5342 \begin_inset Flex Code
5345 \begin_layout Plain Layout
5353 \begin_inset Flex Code
5356 \begin_layout Plain Layout
5362 acts in some ways just like
5363 \begin_inset Flex MenuItem
5366 \begin_layout Plain Layout
5372 and permits you to bind keys to accented characters.
5373 You can also turn keys into dead-keys by binding them to something like
5375 \begin_inset Flex Code
5378 \begin_layout Plain Layout
5384 and then binding this symbolic key to the corresponding LyX command.
5388 \begin_layout Plain Layout
5393 : This is exactly what I do in my
5394 \begin_inset Flex Code
5397 \begin_layout Plain Layout
5404 \begin_inset Flex Code
5407 \begin_layout Plain Layout
5415 \begin_inset Flex MenuItem
5418 \begin_layout Plain Layout
5420 \begin_inset space ~
5429 \begin_inset Flex Code
5432 \begin_layout Plain Layout
5438 and a bunch of these
5439 \begin_inset Quotes eld
5443 \begin_inset Flex Code
5446 \begin_layout Plain Layout
5453 \begin_inset Quotes erd
5456 symbolic keys bound such things as
5457 \begin_inset Flex MenuItem
5460 \begin_layout Plain Layout
5462 \begin_inset space ~
5471 \begin_inset Flex MenuItem
5474 \begin_layout Plain Layout
5476 \begin_inset space ~
5485 This is how I produce my accented characters.
5490 You can make just about anything into the
5491 \begin_inset Flex Code
5494 \begin_layout Plain Layout
5501 \begin_inset Flex MenuItem
5504 \begin_layout Plain Layout
5510 keys, a spare function key, etc.
5511 As for the LyX commands that produce accents, check the entry for
5512 \begin_inset Flex Code
5515 \begin_layout Plain Layout
5526 You'll find the complete list there.
5529 \begin_layout Subsection
5530 Saving your Language Configuration
5533 \begin_layout Standard
5534 You can edit your preferences so that your desired language environment
5535 is automatically configured when LyX starts up, via the
5536 \begin_inset Flex MenuItem
5539 \begin_layout Plain Layout
5540 Edit\SpecialChar \menuseparator
5549 \begin_layout Chapter
5550 Installing New Document Classes, Layouts, and Templates
5551 \begin_inset CommandInset label
5553 name "cha:Installing-New-Document"
5558 \begin_inset Argument 1
5561 \begin_layout Plain Layout
5562 Installing New Document Classes
5570 \begin_layout Standard
5571 In this chapter, we describe the procedures for creating and installing
5572 new LyX layout and template files, as well as offer a refresher on correctly
5573 installing new LaTeX document classes.
5577 \begin_layout Standard
5578 First, let us a say a few words about how one ought to think about the relation
5579 between LyX and LaTeX.
5580 The thing to understand is that, in a certain sense, LyX doesn't know anything
5582 Indeed, from LyX's point of view, LaTeX is just one of several
5583 \begin_inset Quotes eld
5587 \begin_inset Quotes erd
5590 in which it is capable of producing output.
5591 Other such formats are DocBook, plaintext, and XHTML.
5592 LaTeX is, of course, a particularly important format, but very little of
5593 the information LyX has about LaTeX is actually contained in the program
5598 \begin_layout Plain Layout
5599 Some commands are sufficiently complex that they are
5600 \begin_inset Quotes eld
5604 \begin_inset Quotes erd
5608 But the developers generally regard this as a Bad Thing.
5613 Rather, that information, even for the standard classes like
5614 \begin_inset Flex Code
5617 \begin_layout Plain Layout
5623 , is contained in `layout files'.
5624 Similarly, LyX itself does not know much about DocBook or XHTML.
5625 What it knows is contained in layout files.
5628 \begin_layout Standard
5629 You can think of the layout file for a given document class as a translation
5630 manual between LyX constructs---paragraphs with their corresponding styles,
5631 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5633 Almost everything LyX knows about
5634 \begin_inset Flex Code
5637 \begin_layout Plain Layout
5643 , for example, is contained in the file
5644 \begin_inset Flex Code
5647 \begin_layout Plain Layout
5653 and in various other files it includes.
5654 For this reason, anyone intending to write layout files should plan to
5655 study the existing files.
5656 A good place to start is with
5657 \begin_inset Flex Code
5660 \begin_layout Plain Layout
5666 , which is included in
5667 \begin_inset Flex Code
5670 \begin_layout Plain Layout
5677 \begin_inset Flex Code
5680 \begin_layout Plain Layout
5686 , and many of the other layout files for document classes.
5687 This file is where sections and the like are defined:
5688 \begin_inset Flex Code
5691 \begin_layout Plain Layout
5697 tells LyX how paragraphs that are marked with the Section, Subsection,
5698 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5701 \begin_inset Flex Code
5704 \begin_layout Plain Layout
5710 file basically just includes several of these
5711 \begin_inset Flex Code
5714 \begin_layout Plain Layout
5723 \begin_layout Standard
5724 Defining the LyX--LaTeX correspondence is not the only thing layout files
5726 Their other job is to define how the LyX constructs themselves will appear
5728 The fact that layout files have these two jobs is often a source of confusion,
5729 because they are completely separate.
5730 Telling LyX how to translate a certain paragraph style into LaTeX does
5731 not tell LyX how to display it; conversely, telling LyX how to display
5732 a certain paragraph style does not tell LyX how to translate it into LaTeX
5733 (let alone tell LaTeX how to display it).
5734 So, in general, when you define a new LyX construct, you must always do
5735 two quite separate things: (i)
5736 \begin_inset space ~
5739 tell LyX how to translate it into LaTeX and (ii)
5740 \begin_inset space ~
5743 tell LyX how to display it.
5746 \begin_layout Standard
5747 Much the same is true, of course, as regards LyX's other backend formats,
5748 though XHTML is in some ways different, because in that case LyX
5752 able, to some extent, to use information about how it should display a
5753 paragraph on the screen to output information (in the form of CSS) about
5754 how the paragraph should be displayed in a browser.
5755 Even in this case, however, the distinction between what LyX does internally
5756 and how things are rendered externally remains in force, and the two can
5757 be controlled separately.
5759 \begin_inset CommandInset ref
5761 reference "sec:Tags-for-XHTML"
5768 \begin_layout Section
5769 Installing new LaTeX files
5772 \begin_layout Standard
5773 Some installations may not include a LaTeX package or class file that you
5774 would like to use within LyX.
5775 For example, you might need FoilTeX, a package for preparing slides for
5776 overhead projectors.
5777 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5778 a user interface for installing such packages.
5779 For example, with MiKTeX, you start the program
5780 \begin_inset Quotes eld
5784 \begin_inset space ~
5788 \begin_inset Quotes erd
5791 to get a list of available packages.
5792 To install one of them, right click on it or use the corresponding toolbar
5796 \begin_layout Standard
5797 If your LaTeX distribution does not provide such a `package manager', or
5798 if the package is not available from your distribution, then follow these
5799 steps to install it manually:
5802 \begin_layout Enumerate
5803 Get the package from
5804 \begin_inset CommandInset href
5807 target "http://www.ctan.org/"
5814 \begin_layout Enumerate
5815 If the package contains a file with the ending
5816 \begin_inset Quotes eld
5820 \begin_inset Flex Code
5823 \begin_layout Plain Layout
5830 \begin_inset Quotes erd
5833 (is the case for FoilTeX) then open a console, change to the folder of
5834 this file and execute the command
5835 \begin_inset Flex Code
5838 \begin_layout Plain Layout
5845 You have now unpacked the package and have all files to install it.
5846 Most LaTeX-packages are not packed and you can skip this step.
5849 \begin_layout Enumerate
5850 Now you need to decide if the package should be available for all users
5855 \begin_layout Enumerate
5856 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5857 for all users on your system, then install it in your `local' TeX tree,
5858 otherwise install it in your own `user' TeX tree.
5859 Where these trees should be created, if they do not already exist, depends
5861 To find this out, look in the file
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5875 \begin_layout Plain Layout
5876 This is usually in the directory
5877 \begin_inset Flex Code
5880 \begin_layout Plain Layout
5886 , though you can execute the command
5887 \begin_inset Flex Code
5890 \begin_layout Plain Layout
5901 The location of the `local' TeX tree is defined by the
5902 \begin_inset Flex Code
5905 \begin_layout Plain Layout
5911 variable; this is usually somewhere like
5912 \begin_inset Flex Code
5915 \begin_layout Plain Layout
5916 /usr/local/share/texmf
5922 The location of the `user' TeX tree is defined by
5923 \begin_inset Flex Code
5926 \begin_layout Plain Layout
5933 \begin_inset Flex Code
5936 \begin_layout Plain Layout
5943 (If these variables are not predefined, you have to define them.) You'll
5944 probably need root permissions to create or modify the `local' tree, but
5945 not for your `user' tree.
5946 \begin_inset Newline newline
5949 In general, it is recommended to install in the user tree because your user
5950 will not be modified or even overwritten when you upgrade your system.
5951 It will typically also be backed up together with everything else when
5952 you backup your home directory (which, of course, you do on a regular basis).
5955 \begin_layout Enumerate
5956 On Windows, if you want the new package to be available for all users on
5957 your system, change to the folder where LaTeX is installed and then change
5959 \begin_inset Flex Code
5962 \begin_layout Plain Layout
5973 (For MiKTeX, this would be by default the folder
5974 \begin_inset Flex Code
5977 \begin_layout Plain Layout
5995 \begin_layout Plain Layout
5996 Note that this will be the correct path only on English installations.
5997 On a German one, it would be
5998 \begin_inset Flex Code
6001 \begin_layout Plain Layout
6015 , and similarly for other languages.
6020 Create there a new folder
6021 \begin_inset Flex Code
6024 \begin_layout Plain Layout
6030 and copy all files of the package into it.
6032 \begin_inset Newline newline
6035 If the package should only available for you or you don't have admin permissions
6036 , do the same, but in the local LaTeX folder.
6038 \begin_inset space \thinspace{}
6042 \begin_inset space ~
6045 2.8 under Windows XP, this would be the folder:
6046 \begin_inset Newline newline
6052 \begin_inset Flex Code
6055 \begin_layout Plain Layout
6058 Documents and Settings
6070 \begin_inset Newline newline
6076 \begin_inset Phantom HPhantom
6079 \begin_layout Plain Layout
6090 \begin_inset Flex Code
6093 \begin_layout Plain Layout
6106 \begin_inset Newline newline
6109 On Vista, it would be:
6110 \begin_inset Newline newline
6114 \begin_inset Flex Code
6117 \begin_layout Plain Layout
6143 \begin_layout Enumerate
6144 Now one only need to tell LaTeX that there are new files.
6145 This depends on the used LaTeX-Distribution:
6149 \begin_layout Enumerate
6150 For TeXLive execute the command
6151 \begin_inset Flex Code
6154 \begin_layout Plain Layout
6161 If you installed the package for all users, then you will probably need
6162 to have root permissions for that.
6165 \begin_layout Enumerate
6166 For MiKTeX, if you have installed the package for all users, start the program
6168 \begin_inset Quotes eld
6172 \begin_inset space ~
6176 \begin_inset Quotes erd
6179 and press the button marked
6180 \begin_inset Quotes eld
6184 \begin_inset Quotes erd
6188 Otherwise start the program
6189 \begin_inset Quotes eld
6193 \begin_inset Quotes erd
6200 \begin_layout Enumerate
6201 Finally, you need to tell LyX that there are new packages available.
6202 So, in LyX, use the menu
6203 \begin_inset Flex MenuItem
6206 \begin_layout Plain Layout
6209 \SpecialChar \menuseparator
6215 and then restart LyX.
6218 \begin_layout Standard
6219 Now the package is installed.
6220 In our example, the document class
6221 \begin_inset Flex Code
6224 \begin_layout Plain Layout
6226 \begin_inset space ~
6233 \begin_layout Plain Layout
6245 will now be available under
6246 \begin_inset Flex MenuItem
6249 \begin_layout Plain Layout
6250 Document\SpecialChar \menuseparator
6251 Settings\SpecialChar \menuseparator
6261 \begin_layout Standard
6262 If you would like to use a LaTeX document class that is not even listed
6264 \begin_inset Flex MenuItem
6267 \begin_layout Plain Layout
6268 Document\SpecialChar \menuseparator
6269 Settings\SpecialChar \menuseparator
6275 , then you need to create a `layout' file for it.
6276 That is the topic of the next section.
6279 \begin_layout Section
6280 Types of layout files
6283 \begin_layout Standard
6284 This section describes the various sorts of LyX files that contain layout
6286 These files describe various paragraph and character styles, determining
6287 how LyX should display them and how they should be translated into LaTeX,
6288 DocBook, XHTML, or whatever output format is being used.
6292 \begin_layout Standard
6293 We shall try to provide a thorough description of the process of writing
6295 However, there are so many different types of documents supported even
6296 by just LaTeX that we can't hope to cover every different possibility or
6297 problem you might encounter.
6298 The LyX users' list is frequented by people with lots of experience with
6299 layout design who are willing to share what they've learned, so please
6300 feel free to ask questions there.
6303 \begin_layout Standard
6304 As you prepare to write a new layout, it is extremely helpful to look at
6305 the layouts distributed with LyX.
6306 If you write a LyX layout for a LaTeX document class that might also be
6307 used by others, or write a module that might be useful to others, then
6308 you should consider posting your layout to the
6309 \begin_inset CommandInset href
6311 name "layout section on the LyX wiki"
6312 target "http://wiki.lyx.org/Layouts/Layouts"
6316 or even to the LyX developers' list, so that it might be included in LyX
6321 \begin_layout Plain Layout
6322 Note that LyX is licensed under the General Public License, so any material
6323 that is contributed to LyX must be similarly licensed.
6331 \begin_layout Subsection
6333 \begin_inset CommandInset label
6335 name "sub:Layout-modules"
6342 \begin_layout Standard
6343 We have spoken to this point about `layout files'.
6344 But there are different sorts of files that contain layout information.
6345 Layout files, strictly so called, have the
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6355 extension and provide LyX with information about document classes.
6356 Since LyX 1.6 layout information can also be contained in layout
6361 \begin_inset Flex Code
6364 \begin_layout Plain Layout
6371 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6372 some modules—such as the
6373 \begin_inset Flex Code
6376 \begin_layout Plain Layout
6382 module—specifically provide support for one package.
6383 In a sense, layout modules are similar to included
6387 \begin_layout Plain Layout
6388 These can have any extension, but by convention have the
6389 \begin_inset Flex Code
6392 \begin_layout Plain Layout
6404 \begin_inset Flex Code
6407 \begin_layout Plain Layout
6413 —in that modules are not specific to a given document class but may be used
6414 with many different classes.
6415 The difference is that using an included file with
6416 \begin_inset Flex Code
6419 \begin_layout Plain Layout
6425 requires editing that file.
6426 Modules, by contrast, are selected in the
6427 \begin_inset Flex MenuItem
6430 \begin_layout Plain Layout
6431 Document\SpecialChar \menuseparator
6440 \begin_layout Standard
6441 Building modules is the easiest way to get started with layout editing,
6442 since it can be as simple as adding a single new paragraph style or flex
6444 But modules may, in principle, contain anything a layout file can contain.
6447 \begin_layout Standard
6448 After creating a new module and copying it to the
6449 \begin_inset Flex Code
6452 \begin_layout Plain Layout
6458 folder, you will need to reconfigure and then restart LyX for the module
6459 to appear in the menu.
6460 However, changes you make to the module will be seen immediately, if you
6462 \begin_inset Flex MenuItem
6465 \begin_layout Plain Layout
6466 Document\SpecialChar \menuseparator
6472 , highlight something, and then hit
6473 \begin_inset Quotes eld
6477 \begin_inset Quotes erd
6483 It is strongly recommended that you save your work before doing this
6488 it is strongly recommended that you not attempt to edit modules while simultaneo
6489 usly working on actual documents
6492 Though of course the developers strive to keep LyX stable in such situations,
6493 syntax errors and the like in your module file could cause strange behavior.
6496 \begin_layout Subsubsection
6500 \begin_layout Standard
6501 Modules are to LyX as packages are to LaTeX.
6502 Sometimes, however, you find yourself wanting a specific inset or character
6503 style just for one document and writing a module that will also be available
6504 to other documents makes little sense.
6505 What you need is LyX's
6506 \begin_inset Quotes eld
6510 \begin_inset Quotes erd
6516 \begin_layout Standard
6517 You will find it under
6519 Document\SpecialChar \menuseparator
6520 Settings\SpecialChar \menuseparator
6524 The large text box allows you to enter anything that you might enter in
6525 a layout file or module.
6526 You can think of a document's local layout, in fact, as a module that belongs
6528 So, in particular, you must enter a
6529 \begin_inset Flex Code
6532 \begin_layout Plain Layout
6539 Any format is acceptable, but one would normally use the format current
6541 (In LyX 2.1, the current layout format is 35
6542 \change_inserted 2090807402 1370196336
6544 \begin_inset Note Note
6547 \begin_layout Plain Layout
6549 \change_inserted 2090807402 1370196343
6550 update this for LyX 2.1 final
6559 .) You should be aware that local layout is not supported by versions of
6560 LyX prior to 1.6, so you should not use it if you want to be able to export
6561 your document to LyX 1.5 or earlier (without, that is, losing the local
6562 layout information).
6563 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6564 though there is no UI for it---then you should use format 11 and, of course,
6565 use only layout constructs that were available in LyX 1.6.
6568 \begin_layout Standard
6569 When you have entered something in the
6570 \begin_inset Flex Code
6573 \begin_layout Plain Layout
6579 pane, LyX will enable the
6580 \begin_inset Quotes eld
6584 \begin_inset Quotes erd
6587 button at the bottom.
6588 Clicking this button will cause LyX to determine whether what you have
6589 entered is valid layout information for the chosen format.
6590 LyX will report the result but, unfortunately, will not tell you what errors
6591 there might have been.
6592 These will be written to the terminal, however, if LyX is started from
6594 You will not be permitted to save your local layout until you have entered
6598 \begin_layout Standard
6599 The warnings at the end of the previous section apply here, too.
6600 Do not play with local layout while you are actually working, especially
6601 if you have not saved your document.
6602 That said, using local layout with a test document can be a very convenient
6603 way to try out layout ideas, or even to start developing a module.
6606 \begin_layout Subsection
6608 \begin_inset Flex MenuItem
6611 \begin_layout Plain Layout
6620 \begin_layout Standard
6621 There are two situations you are likely to encounter when wanting to support
6622 a new LaTeX document class, involving style (
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 ) files and LaTeX2e class (
6633 \begin_inset Flex Code
6636 \begin_layout Plain Layout
6643 Supporting a style file is usually fairly easy.
6644 Supporting a new class file is a bit harder.
6645 We'll discuss the former in this section and the latter in the next.
6646 Similar remarks apply, of course, if you want to support a new DocBook
6650 \begin_layout Standard
6651 The easier case is the one in which your new document class is provided
6652 as a style file that is to be used in conjunction with an already supported
6654 For the sake of the example, we'll assume that the style file is called
6656 \begin_inset Flex MenuItem
6659 \begin_layout Plain Layout
6665 and that it is meant to be used with
6666 \begin_inset Flex MenuItem
6669 \begin_layout Plain Layout
6675 , which is a standard class.
6679 \begin_layout Standard
6680 Start by copying the existing class's layout file into your local directory:
6684 \begin_layout Plain Layout
6685 Of course, which directory is your local directory will vary by platform,
6686 and LyX allows you to specify your local directory on startup, too, using
6688 \begin_inset Flex Code
6691 \begin_layout Plain Layout
6705 \begin_layout LyX-Code
6706 cp report.layout ~/.lyx/layouts/myclass.layout
6709 \begin_layout Standard
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6720 and change the line:
6723 \begin_layout LyX-Code
6726 DeclareLaTeXClass{report}
6729 \begin_layout Standard
6733 \begin_layout LyX-Code
6736 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6739 \begin_layout Standard
6743 \begin_layout LyX-Code
6745 \begin_inset Newline newline
6751 \begin_inset Newline newline
6757 \begin_layout Standard
6758 near the top of the file.
6761 \begin_layout Standard
6762 Start LyX and select
6763 \begin_inset Flex MenuItem
6766 \begin_layout Plain Layout
6767 Tools\SpecialChar \menuseparator
6774 Then restart LyX and try creating a new document.
6776 \begin_inset Flex MenuItem
6779 \begin_layout Plain Layout
6785 " as a document class option in the
6786 \begin_inset Flex MenuItem
6789 \begin_layout Plain Layout
6790 Document\SpecialChar \menuseparator
6797 It is likely that some of the sectioning commands and such in your new
6798 class will work differently from how they worked in the base class—
6799 \begin_inset Flex Code
6802 \begin_layout Plain Layout
6808 in this example—so you can fiddle around with the settings for the different
6809 sections if you wish.
6810 The layout information for sections is contained in
6811 \begin_inset Flex Code
6814 \begin_layout Plain Layout
6820 , but you do not need to copy and change this file.
6821 Instead, you can simply add your changes to your layout file, after the
6823 \begin_inset Flex Code
6826 \begin_layout Plain Layout
6832 , which itself includes
6833 \begin_inset Flex Code
6836 \begin_layout Plain Layout
6843 For example, you might add these lines:
6846 \begin_layout LyX-Code
6850 \begin_layout LyX-Code
6854 \begin_layout LyX-Code
6858 \begin_layout LyX-Code
6862 \begin_layout LyX-Code
6866 \begin_layout Standard
6867 to change the font for chapter headings to sans-serif.
6868 This will override (or, in this case, add to) the existing declaration
6869 for the Chapter style.
6873 \begin_layout Standard
6874 Your new package may also provide commands or environments not present in
6876 In this case, you will want to add these to the layout file.
6878 \begin_inset CommandInset ref
6880 reference "sec:TextClass"
6884 for information on how to do so.
6887 \begin_layout Standard
6889 \begin_inset Flex MenuItem
6892 \begin_layout Plain Layout
6898 can be used with several different document classes, and even if it cannot,
6899 you might find it easiest just to write a module that you can load with
6901 The simplest possible such module would be:
6904 \begin_layout LyX-Code
6907 DeclareLyXModule{My Package}
6910 \begin_layout LyX-Code
6914 \begin_layout LyX-Code
6915 #Support for mypkg.sty.
6918 \begin_layout LyX-Code
6920 \begin_inset Newline newline
6926 \begin_layout LyX-Code
6928 \begin_inset Newline newline
6934 \begin_layout LyX-Code
6936 \begin_inset Newline newline
6942 \begin_inset Newline newline
6948 \begin_layout Standard
6949 A more complex module might modify the behavior of some existing constructs
6950 or define some new ones.
6952 \begin_inset CommandInset ref
6954 reference "sec:TextClass"
6961 \begin_layout Subsection
6963 \begin_inset Flex MenuItem
6966 \begin_layout Plain Layout
6975 \begin_layout Standard
6976 There are two possibilities here.
6977 One is that the class file is itself based upon an existing document class.
6978 For example, many thesis classes are based upon
6979 \begin_inset Flex MenuItem
6982 \begin_layout Plain Layout
6989 To see whether yours is, look for a line like
6992 \begin_layout LyX-Code
6998 \begin_layout Standard
7000 If so, then you may proceed largely as in the previous section, though
7002 \begin_inset Flex Code
7005 \begin_layout Plain Layout
7011 line will be different.
7012 If your new class is
7013 \begin_inset Flex Code
7016 \begin_layout Plain Layout
7022 and it is based upon
7023 \begin_inset Flex Code
7026 \begin_layout Plain Layout
7032 , then the line should read:
7036 \begin_layout Plain Layout
7037 And it will be easiest if you save the file to
7038 \begin_inset Flex Code
7041 \begin_layout Plain Layout
7047 : LyX assumes that the document class has the same name as the layout file.
7056 \begin_layout LyX-Code
7059 DeclareLaTeXClass[thesis,book]{thesis}
7062 \begin_layout Standard
7063 If, on the other hand, the new class is not based upon an existing class,
7064 you will probably have to
7065 \begin_inset Quotes eld
7069 \begin_inset Quotes erd
7073 We strongly suggest copying an existing layout file which uses a similar
7074 LaTeX class and then modifying it, if you can do so.
7075 At least use an existing file as a starting point so you can find out what
7076 items you need to worry about.
7077 Again, the specifics are covered below.
7080 \begin_layout Subsection
7082 \begin_inset CommandInset label
7084 name "sub:Creating-Templates"
7091 \begin_layout Standard
7092 Once you have written a layout file for a new document class, you might
7093 want to consider writing a
7098 A template acts as a kind of tutorial for your layout, showing how it might
7099 be used, though containing dummy content.
7100 You can of course look at the various templates included with LyX for ideas.
7103 \begin_layout Standard
7104 Templates are created just like usual documents: using LyX.
7105 The only difference is that usual documents contain all possible settings,
7106 including the font scheme and the paper size.
7107 Usually a user doesn't want a template to overwrite his preferred settings
7108 for such parameters.
7109 For that reason, the designer of a template should remove the corresponding
7111 \begin_inset Flex Code
7114 \begin_layout Plain Layout
7123 \begin_inset Flex Code
7126 \begin_layout Plain Layout
7134 from the template LyX file.
7135 This can be done with any simple text-editor, for example
7136 \begin_inset Flex Code
7139 \begin_layout Plain Layout
7146 \begin_inset Flex Code
7149 \begin_layout Plain Layout
7158 \begin_layout Standard
7159 Put the edited template files you create in
7160 \begin_inset Flex Code
7163 \begin_layout Plain Layout
7169 , copy the ones you use from the global template directory in
7170 \begin_inset Flex Code
7173 \begin_layout Plain Layout
7179 to the same place, and redefine the template path in the
7180 \begin_inset Flex MenuItem
7183 \begin_layout Plain Layout
7184 Tools\SpecialChar \menuseparator
7185 Preferences\SpecialChar \menuseparator
7194 \begin_layout Standard
7195 Note, by the way, that there is a template which has a particular meaning:
7197 \begin_inset Flex Code
7200 \begin_layout Plain Layout
7207 This template is loaded every time you create a new document with
7208 \begin_inset Flex MenuItem
7211 \begin_layout Plain Layout
7212 File\SpecialChar \menuseparator
7218 in order to provide useful defaults.
7219 To create this template from inside LyX, all you have to do is to open
7220 a document with the correct settings, and use the
7221 \begin_inset Flex MenuItem
7224 \begin_layout Plain Layout
7225 Save as Document Defaults
7233 \begin_layout Subsection
7234 Upgrading old layout files
7237 \begin_layout Standard
7238 The format of layout files changes with each LyX release, so old layout
7239 files need to be converted to the new format.
7240 If LyX reads a layout file in an older format, it automatically calls the
7242 \begin_inset Flex Code
7245 \begin_layout Plain Layout
7251 to convert it to a temporary file in current format.
7252 The original file is left untouched.
7253 If you use the layout file often, then, you may want to convert it permanently,
7254 so that LyX does not have to do so itself every time.
7255 To do this, you can call the converter manually:
7258 \begin_layout Enumerate
7260 \begin_inset Flex Code
7263 \begin_layout Plain Layout
7270 \begin_inset Flex Code
7273 \begin_layout Plain Layout
7282 \begin_layout Enumerate
7284 \begin_inset Newline newline
7288 \begin_inset Flex Code
7291 \begin_layout Plain Layout
7292 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7298 \begin_inset Newline newline
7302 \begin_inset Flex Code
7305 \begin_layout Plain Layout
7311 is the name of your LyX system directory.
7314 \begin_layout Standard
7315 Note that manual conversion does not affect included files, so these will
7316 have to be converted separately.
7319 \begin_layout Section
7320 \begin_inset CommandInset label
7322 name "sec:TextClass"
7326 The layout file format
7329 \begin_layout Standard
7330 The following sections describe how layout files are structured and written.
7331 Our advice is to go slowly, save and test often.
7332 It is really not that hard, except that the multitude of options can become
7333 overwhelming, especially if you try to check out too many at once.
7334 It becomes easier if you use existing layouts of LyX as examples/reference
7335 or if you modify an existing layout to your needs.
7338 \begin_layout Standard
7339 Note that all the tags used in layout files are case-insensitive.
7341 \begin_inset Flex Code
7344 \begin_layout Plain Layout
7351 \begin_inset Flex Code
7354 \begin_layout Plain Layout
7361 \begin_inset Flex Code
7364 \begin_layout Plain Layout
7370 are really the same tag.
7371 The possible arguments are printed in brackets after the tag's name.
7372 The default argument is typeset
7373 \begin_inset Flex Code
7376 \begin_layout Plain Layout
7385 If the argument has a data type like
7386 \begin_inset Quotes eld
7390 \begin_inset Quotes erd
7394 \begin_inset Quotes eld
7398 \begin_inset Quotes erd
7401 , the default is shown like this:
7402 \begin_inset Flex Code
7405 \begin_layout Plain Layout
7416 \begin_layout Subsection
7417 The document class declaration and classification
7420 \begin_layout Standard
7421 Lines in a layout file which begin with
7422 \begin_inset Flex Code
7425 \begin_layout Plain Layout
7432 There is one exception to this rule.
7434 \begin_inset Flex Code
7437 \begin_layout Plain Layout
7443 files should begin with lines like:
7446 \begin_layout LyX-Code
7449 #% Do not delete the line below; configure depends on this
7452 \begin_layout LyX-Code
7463 \begin_layout Plain Layout
7472 eXClass{Article (Standard Class)}
7475 \begin_layout LyX-Code
7480 DeclareCategory{Articles}
7483 \begin_layout Standard
7484 The second and third lines are used when you (re)configure LyX.
7485 The layout file is read by the LaTeX script
7486 \begin_inset Flex Code
7489 \begin_layout Plain Layout
7495 , in a special mode where
7496 \begin_inset Flex Code
7499 \begin_layout Plain Layout
7506 The first line is just a LaTeX comment, the second one contains the mandatory
7507 declaration of the text class and the third line contains the optional
7508 classification of the class.
7509 If these lines appear in a file named
7510 \begin_inset Flex Code
7513 \begin_layout Plain Layout
7519 , then they define a text class of name
7520 \begin_inset Flex Code
7523 \begin_layout Plain Layout
7529 (the name of the layout file) which uses the LaTeX document class
7530 \begin_inset Flex Code
7533 \begin_layout Plain Layout
7539 (the default is to use the same name as the layout).
7541 \begin_inset Quotes eld
7544 Article (Standard Class)
7545 \begin_inset Quotes erd
7548 that appears above is used as a description of the text class in the
7549 \begin_inset Flex MenuItem
7552 \begin_layout Plain Layout
7553 Document\SpecialChar \menuseparator
7561 \begin_inset Quotes eld
7565 \begin_inset Quotes erd
7568 in the example) is also used in the
7569 \begin_inset Flex MenuItem
7572 \begin_layout Plain Layout
7573 Document\SpecialChar \menuseparator
7579 dialog: the text classes are grouped by these categories (which are usually
7580 genres, so typical categories are
7581 \begin_inset Quotes eld
7585 \begin_inset Quotes erd
7589 \begin_inset Quotes eld
7593 \begin_inset Quotes erd
7597 \begin_inset Quotes eld
7601 \begin_inset Quotes erd
7605 \begin_inset Quotes eld
7609 \begin_inset Quotes erd
7613 \begin_inset Quotes eld
7617 \begin_inset Quotes erd
7621 \begin_inset Quotes eld
7625 \begin_inset Quotes erd
7629 If no category has been declared, the class will be put in the
7630 \begin_inset Quotes eld
7634 \begin_inset Quotes erd
7640 \begin_layout Standard
7641 Let's assume that you wrote your own text class that uses the
7642 \begin_inset Flex Code
7645 \begin_layout Plain Layout
7651 document class, but where you changed the appearance of the section headings.
7652 If you put it in a file
7653 \begin_inset Flex Code
7656 \begin_layout Plain Layout
7662 , the header of this file should be:
7665 \begin_layout LyX-Code
7668 #% Do not delete the line below; configure depends on this
7671 \begin_layout LyX-Code
7682 \begin_layout Plain Layout
7691 eXClass[article]{Article (with My Own Headings)}
7694 \begin_layout LyX-Code
7699 DeclareCategory{Articles}
7702 \begin_layout Standard
7703 This declares a text class
7704 \begin_inset Flex Code
7707 \begin_layout Plain Layout
7713 , associated with the LaTeX document class
7714 \begin_inset Flex Code
7717 \begin_layout Plain Layout
7724 \begin_inset Quotes eld
7727 Article (with My Own Headings)
7728 \begin_inset Quotes erd
7732 If your text class depends on several packages, you can declare it as:
7735 \begin_layout LyX-Code
7738 #% Do not delete the line below; configure depends on this
7741 \begin_layout LyX-Code
7752 \begin_layout Plain Layout
7761 eXClass[article,foo.sty]{Article (with My Own Headings)}
7764 \begin_layout LyX-Code
7769 DeclareCategory{Articles}
7772 \begin_layout Standard
7773 This indicates that your text class uses the
7774 \begin_inset Flex Code
7777 \begin_layout Plain Layout
7784 Finally, it is also possible to declare classes for DocBook code.
7785 Typical declarations will look like:
7788 \begin_layout LyX-Code
7791 #% Do not delete the line below; configure depends on this
7794 \begin_layout LyX-Code
7799 DeclareDocBookClass[article]{SGML (DocBook Article)}
7802 \begin_layout LyX-Code
7807 DeclareCategory{Articles (DocBook)}
7810 \begin_layout Standard
7811 Note that these declarations can also be given an optional parameter declaring
7812 the name of the document class (but not a list).
7815 \begin_layout Standard
7816 So, to be as explicit as possible, the form of the layout declaration is:
7819 \begin_layout LyX-Code
7830 \begin_layout Plain Layout
7839 eXClass[class,package.sty]{layout description}
7842 \begin_layout LyX-Code
7847 DeclareCategory{category}
7850 \begin_layout Standard
7851 The class need only be specified if the name of the LaTeX class file and
7852 the name of the layout file are different or if there are packages to load.
7853 If the name of the class file is not specified, then LyX will simply assume
7854 that it is the same as the name of the layout file.
7857 \begin_layout Standard
7858 When the text class has been modified to your taste, all you have to do
7859 is to copy it either to
7860 \begin_inset Flex Code
7863 \begin_layout Plain Layout
7870 \begin_inset Flex Code
7873 \begin_layout Plain Layout
7880 \begin_inset Flex MenuItem
7883 \begin_layout Plain Layout
7884 Tools\SpecialChar \menuseparator
7890 , exit LyX and restart.
7891 Then your new text class should be available along with the others.
7894 \begin_layout Standard
7895 Once the layout file is installed, you can edit it and see your changes
7896 without having to reconfigure or to restart LyX.
7901 \begin_layout Plain Layout
7902 In versions of LyX prior to 1.6, this was not true.
7903 As a result, editing layout files was very time consuming, since you had
7904 constantly to restart LyX to see changes.
7909 You can force a reload of the current layout by using the LyX function
7911 \begin_inset Flex MenuItem
7914 \begin_layout Plain Layout
7921 There is no default binding for this function—though, of course, you can
7922 bind it to a key yourself.
7923 But you will normally use this function simply by entering it in the mini-buffe
7928 \begin_layout Standard
7934 \begin_inset Flex MenuItem
7937 \begin_layout Plain Layout
7943 is very much an `advanced feature'.
7948 recommended that you save your work before using this function.
7953 recommended that you not attempt to edit layout information while simultaneousl
7954 y working on a document that you care about.
7955 Use a test document.
7956 Syntax errors and the like in your layout file could cause peculiar behavior.
7957 In particular, such errors could cause LyX to regard the current layout
7958 as invalid and to attempt to switch to some other layout.
7962 \begin_layout Plain Layout
7963 Really bad syntax errors may even caused LyX to exit.
7964 This is because certain sorts of errors may make LyX unable to read
7974 The LyX team strives to keep LyX stable in such situations, but safe is
7979 \begin_layout Plain Layout
7980 While we're giving advice: make regular backups.
7981 And be nice to your mother.
7989 \begin_layout Subsection
7990 The Module declaration
7993 \begin_layout Standard
7994 A module must begin with a line like the following:
7997 \begin_layout LyX-Code
8004 \begin_layout Plain Layout
8011 yXModule[endnotes.sty]{Endnotes}
8014 \begin_layout Standard
8015 The mandatory argument, in curly brackets, is the name of the module, as
8017 \begin_inset Flex MenuItem
8020 \begin_layout Plain Layout
8021 Document\SpecialChar \menuseparator
8022 Settings\SpecialChar \menuseparator
8029 The argument in square brackets is optional: It declares any LaTeX packages
8030 on which the module depends.
8031 It is also possible to use the form
8032 \begin_inset Flex MenuItem
8035 \begin_layout Plain Layout
8041 as an optional argument, which declares that the module can only be used
8042 when there exists a conversion chain between the formats `
8043 \begin_inset Flex Code
8046 \begin_layout Plain Layout
8053 \begin_inset Flex Code
8056 \begin_layout Plain Layout
8065 \begin_layout Standard
8066 The module declaration should then be followed by lines like the following
8070 \begin_layout Plain Layout
8071 Preferably in English if the module should be published with LyX.
8072 This description will appear in the list of messages to be translated and
8073 will be thus translated with the next interface update.
8081 \begin_layout LyX-Code
8085 \begin_layout LyX-Code
8086 #Adds an endnote command, in addition to footnotes.
8090 \begin_layout LyX-Code
8091 #You will need to add
8093 theendnotes in TeX code where you
8096 \begin_layout LyX-Code
8097 #want the endnotes to appear.
8101 \begin_layout LyX-Code
8105 \begin_layout LyX-Code
8106 #Requires: somemodule | othermodule
8109 \begin_layout LyX-Code
8110 #Excludes: badmodule
8113 \begin_layout Standard
8114 The description is used in
8115 \begin_inset Flex MenuItem
8118 \begin_layout Plain Layout
8119 Document\SpecialChar \menuseparator
8120 Settings\SpecialChar \menuseparator
8126 to provide the user with information about what the module does.
8128 \begin_inset Flex Code
8131 \begin_layout Plain Layout
8137 line is used to identify other modules with which this one must be used;
8139 \begin_inset Flex Code
8142 \begin_layout Plain Layout
8148 line is used to identify modules with which this one may not be used.
8149 Both are optional, and, as shown, multiple modules should be separated
8150 with the pipe symbol: |.
8151 Note that the required modules are treated disjunctively:
8155 of the required modules must be used.
8160 excluded module may be used.
8161 Note that modules are identified here by their filenames without the
8162 \begin_inset Flex Code
8165 \begin_layout Plain Layout
8173 \begin_inset Flex Code
8176 \begin_layout Plain Layout
8183 \begin_inset Flex Code
8186 \begin_layout Plain Layout
8195 \begin_layout Subsection
8199 \begin_layout Standard
8200 The first non-comment line of any layout file, included file, or module
8205 contain the file format number:
8208 \begin_layout Description
8209 \begin_inset Flex Code
8212 \begin_layout Plain Layout
8219 \begin_inset Flex Code
8222 \begin_layout Plain Layout
8228 ] The format number of the layout file.
8231 \begin_layout Standard
8232 This tag was introduced with LyX
8233 \begin_inset space ~
8237 Layout files from older LyX versions do not have an explicit file format
8238 and are considered to have
8239 \begin_inset Flex Code
8242 \begin_layout Plain Layout
8244 \begin_inset space ~
8253 The format for the present version of LyX is format 35.
8254 But each version of LyX is capable of reading earlier versions' layout
8255 files, just as they are capable of reading files produced by earlier versions
8257 There is, however, no provision for converting to earlier formats.
8260 \begin_layout Subsection
8261 \begin_inset CommandInset label
8263 name "sub:General-text-class"
8267 General text class parameters
8270 \begin_layout Standard
8271 These are general parameters that govern the behavior of an entire document
8277 mean that they must appear in
8278 \begin_inset Flex Code
8281 \begin_layout Plain Layout
8287 files rather than in modules.
8288 A module can contain any layout tag.)
8291 \begin_layout Description
8292 \begin_inset Flex Code
8295 \begin_layout Plain Layout
8301 Adds information that will be output in the
8302 \begin_inset Flex Code
8305 \begin_layout Plain Layout
8311 block when the document is output to XHTML.
8312 Typically, this would be used to output CSS style information, but it can
8313 be used for anything that can appear in
8314 \begin_inset Flex Code
8317 \begin_layout Plain Layout
8325 \begin_inset Quotes eld
8329 \begin_inset Flex Code
8332 \begin_layout Plain Layout
8339 \begin_inset Quotes erd
8345 \begin_layout Description
8346 \begin_inset Flex Code
8349 \begin_layout Plain Layout
8355 Adds information to the document preamble.
8357 \begin_inset Newline newline
8361 \begin_inset Quotes eld
8365 \begin_inset Flex Code
8368 \begin_layout Plain Layout
8375 \begin_inset Quotes erd
8381 \begin_layout Description
8382 \begin_inset Flex Code
8385 \begin_layout Plain Layout
8391 Defines formats for use in the display of bibliographic information.
8393 \begin_inset CommandInset ref
8395 reference "sub:Citation-format-description"
8401 \begin_inset Quotes eld
8405 \begin_inset Flex Code
8408 \begin_layout Plain Layout
8415 \begin_inset Quotes erd
8421 \begin_layout Description
8422 \begin_inset Flex Code
8425 \begin_layout Plain Layout
8431 Describes various global options supported by the document class.
8433 \begin_inset CommandInset ref
8435 reference "sub:ClassOptions"
8441 \begin_inset Quotes eld
8445 \begin_inset Flex Code
8448 \begin_layout Plain Layout
8455 \begin_inset Quotes erd
8461 \begin_layout Description
8462 \begin_inset Flex Code
8465 \begin_layout Plain Layout
8472 \begin_inset Flex Code
8475 \begin_layout Plain Layout
8484 \begin_inset space \thinspace{}
8488 \begin_inset Flex Code
8491 \begin_layout Plain Layout
8497 ] Whether the class should
8501 to having one or two columns.
8502 Can be changed in the
8503 \begin_inset Flex MenuItem
8506 \begin_layout Plain Layout
8507 Document\SpecialChar \menuseparator
8516 \begin_layout Description
8517 \begin_inset Flex Code
8520 \begin_layout Plain Layout
8527 \begin_inset Flex Code
8530 \begin_layout Plain Layout
8536 ] This sequence defines the properties for a counter.
8537 If the counter does not yet exist, it is created; if it does exist, it
8540 \begin_inset Quotes eld
8544 \begin_inset Flex Code
8547 \begin_layout Plain Layout
8554 \begin_inset Quotes erd
8558 \begin_inset Newline newline
8562 \begin_inset CommandInset ref
8564 reference "sub:Counters"
8568 for details on counters.
8571 \begin_layout Description
8572 \begin_inset Flex Code
8575 \begin_layout Plain Layout
8581 Sets the default font used to display the document.
8583 \begin_inset CommandInset ref
8585 reference "sub:Font-description"
8589 for how to declare fonts.
8591 \begin_inset Quotes eld
8595 \begin_inset Flex Code
8598 \begin_layout Plain Layout
8605 \begin_inset Quotes erd
8611 \begin_layout Description
8612 \begin_inset Flex Code
8615 \begin_layout Plain Layout
8622 \begin_inset Flex Code
8625 \begin_layout Plain Layout
8631 ] Specifies a module to be included by default with this document class.
8632 The module is specified as filename without the
8633 \begin_inset Flex Code
8636 \begin_layout Plain Layout
8643 The user can still remove the module, but it will be active at the outset.
8644 (This applies only when new files are created, or when this class is chosen
8645 for an existing document.)
8648 \begin_layout Description
8649 \begin_inset Flex Code
8652 \begin_layout Plain Layout
8659 \begin_inset Flex Code
8662 \begin_layout Plain Layout
8668 ] This is the style that will be assigned to new paragraphs, usually
8669 \begin_inset Flex MenuItem
8672 \begin_layout Plain Layout
8679 This will default to the first defined style if not given, but you are
8680 encouraged to use this directive.
8683 \begin_layout Description
8684 \begin_inset Flex Code
8687 \begin_layout Plain Layout
8694 \begin_inset Flex Code
8697 \begin_layout Plain Layout
8703 ] This tag indicates that the module (which is specified by filename without
8705 \begin_inset Flex Code
8708 \begin_layout Plain Layout
8714 extension) cannot be used with this document class.
8715 This might be used in a journal-specific layout file to prevent, say, the
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8726 module that numbers theorems by section.
8731 be used in a module.
8732 Modules have their own way of excluding other modules (see
8733 \begin_inset CommandInset ref
8735 reference "sub:Layout-modules"
8742 \begin_layout Description
8743 \begin_inset Flex Code
8746 \begin_layout Plain Layout
8752 Defines a new float.
8754 \begin_inset CommandInset ref
8756 reference "sub:Floats"
8762 \begin_inset Quotes eld
8766 \begin_inset Flex Code
8769 \begin_layout Plain Layout
8776 \begin_inset Quotes erd
8782 \begin_layout Description
8783 \begin_inset Flex Code
8786 \begin_layout Plain Layout
8792 Sets the information that will be output in the
8793 \begin_inset Flex Code
8796 \begin_layout Plain Layout
8802 block when this document class is output to XHTML.
8803 Note that this will completely override any prior
8804 \begin_inset Flex Code
8807 \begin_layout Plain Layout
8814 \begin_inset Flex Code
8817 \begin_layout Plain Layout
8825 \begin_inset Newline newline
8829 \begin_inset Flex Code
8832 \begin_layout Plain Layout
8838 if you just want to add material to the preamble.) Must end with
8839 \begin_inset Quotes eld
8843 \begin_inset Flex Code
8846 \begin_layout Plain Layout
8853 \begin_inset Quotes erd
8859 \begin_layout Description
8860 \begin_inset Flex Code
8863 \begin_layout Plain Layout
8870 \begin_inset Flex Code
8873 \begin_layout Plain Layout
8879 ] The style to use for the table of contents, bibliography, and so forth,
8880 when the document is output to HTML.
8881 For articles, this should normally be
8882 \begin_inset Flex Code
8885 \begin_layout Plain Layout
8892 \begin_inset Flex Code
8895 \begin_layout Plain Layout
8902 If it is not given, then LyX will attempt to figure out which layout to
8906 \begin_layout Description
8907 \begin_inset Flex Code
8910 \begin_layout Plain Layout
8917 \begin_inset Flex Code
8920 \begin_layout Plain Layout
8926 ] Modifies the properties of the given counter.
8927 If the counter does not exist, the statement is ignored.
8929 \begin_inset Quotes eld
8933 \begin_inset Flex Code
8936 \begin_layout Plain Layout
8943 \begin_inset Quotes erd
8947 \begin_inset Newline newline
8951 \begin_inset CommandInset ref
8953 reference "sub:Counters"
8957 for details on counters.
8960 \begin_layout Description
8961 \begin_inset Flex Code
8964 \begin_layout Plain Layout
8971 \begin_inset Flex Code
8974 \begin_layout Plain Layout
8980 ] Modifies the properties of the given paragraph style.
8981 If the style does not exist, the statement is ignored.
8983 \begin_inset Quotes eld
8987 \begin_inset Flex Code
8990 \begin_layout Plain Layout
8997 \begin_inset Quotes erd
9003 \begin_layout Description
9004 \begin_inset Flex Code
9007 \begin_layout Plain Layout
9014 \begin_inset Flex Code
9017 \begin_layout Plain Layout
9023 ] This allows you to include another layout definition file within yours
9024 to avoid duplicating commands.
9025 Common examples are the standard layout files, for example,
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9035 , which contains most of the basic layouts.
9038 \begin_layout Description
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9058 ] This section (re-)defines the layout of an inset.
9059 It can be applied to an existing inset or to a new, user-defined inset,
9060 e.g., a new character style.
9062 \begin_inset Quotes eld
9066 \begin_inset Flex Code
9069 \begin_layout Plain Layout
9076 \begin_inset Quotes erd
9080 \begin_inset Newline newline
9084 \begin_inset CommandInset ref
9086 reference "sub:Flex-insets-and"
9090 for more information.
9094 \begin_layout Description
9095 \begin_inset Flex Code
9098 \begin_layout Plain Layout
9105 \begin_inset Flex Code
9108 \begin_layout Plain Layout
9114 ] A string that indicates the width of the left margin on the screen, for
9116 \begin_inset Quotes eld
9120 \begin_inset Flex Code
9123 \begin_layout Plain Layout
9130 \begin_inset Quotes erd
9134 (Note that this is not a `length', like
9135 \begin_inset Quotes eld
9139 \begin_inset Quotes erd
9145 \begin_layout Description
9146 \begin_inset Flex Code
9149 \begin_layout Plain Layout
9156 \begin_inset Flex Code
9159 \begin_layout Plain Layout
9165 ] Deletes an existing counter, usually one defined in an included file.
9168 \begin_layout Description
9169 \begin_inset Flex Code
9172 \begin_layout Plain Layout
9179 \begin_inset Flex Code
9182 \begin_layout Plain Layout
9188 ] Deletes an existing float.
9189 This is particularly useful when you want to suppress a float that has
9190 been defined in an input file.
9193 \begin_layout Description
9194 \begin_inset Flex Code
9197 \begin_layout Plain Layout
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9213 ] Deletes an existing style.
9216 \begin_layout Description
9217 \begin_inset Flex Code
9220 \begin_layout Plain Layout
9227 \begin_inset Flex Code
9230 \begin_layout Plain Layout
9236 ] The file format (as defined in the LyX preferences) produced by this document
9238 It is mainly useful when
9239 \begin_inset Flex Code
9242 \begin_layout Plain Layout
9249 \begin_inset Flex Code
9252 \begin_layout Plain Layout
9258 and one wants to define a new type of literate document.
9259 The format is reset to
9260 \begin_inset Quotes eld
9264 \begin_inset Flex Code
9267 \begin_layout Plain Layout
9274 \begin_inset Quotes erd
9278 \begin_inset Quotes eld
9282 \begin_inset Flex Code
9285 \begin_layout Plain Layout
9292 \begin_inset Quotes erd
9295 when the corresponding
9296 \begin_inset Flex Code
9299 \begin_layout Plain Layout
9305 parameter is encountered.
9308 \begin_layout Description
9309 \begin_inset Flex Code
9312 \begin_layout Plain Layout
9319 \begin_inset Flex Code
9322 \begin_layout Plain Layout
9333 \begin_inset Flex Code
9336 \begin_layout Plain Layout
9343 \begin_inset Flex Code
9346 \begin_layout Plain Layout
9352 ] Specifies what sort of output documents using this class will produce.
9355 \begin_layout Description
9356 \begin_inset Flex Code
9359 \begin_layout Plain Layout
9366 \begin_inset Flex Code
9369 \begin_layout Plain Layout
9376 \begin_inset Flex Code
9379 \begin_layout Plain Layout
9385 ] Specifies options, given in the second string, for the package named by
9388 \begin_inset Quotes eld
9392 \begin_inset Flex Code
9395 \begin_layout Plain Layout
9396 PackageOptions natbib square
9402 \begin_inset Quotes erd
9406 \begin_inset Flex Code
9409 \begin_layout Plain Layout
9415 to be loaded with the
9416 \begin_inset Flex Code
9419 \begin_layout Plain Layout
9426 (For TeXperts, this causes LyX to output:
9427 \begin_inset Flex Code
9430 \begin_layout Plain Layout
9433 PassOptionsToPackage{natbib}{square}
9439 \begin_inset Flex Code
9442 \begin_layout Plain Layout
9451 \begin_layout Description
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9474 \begin_inset Flex Code
9477 \begin_layout Plain Layout
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9493 ] The default pagestyle.
9494 Can be changed in the
9495 \begin_inset Flex MenuItem
9498 \begin_layout Plain Layout
9499 Document\SpecialChar \menuseparator
9508 \begin_layout Description
9509 \begin_inset Flex Code
9512 \begin_layout Plain Layout
9518 Sets the preamble for the LaTeX document.
9519 Note that this will completely override any prior
9520 \begin_inset Flex Code
9523 \begin_layout Plain Layout
9530 \begin_inset Flex Code
9533 \begin_layout Plain Layout
9541 \begin_inset Flex Code
9544 \begin_layout Plain Layout
9550 if you just want to add material to the preamble.) Must end with
9551 \begin_inset Quotes eld
9555 \begin_inset Flex Code
9558 \begin_layout Plain Layout
9565 \begin_inset Quotes erd
9571 \begin_layout Description
9572 \begin_inset Flex Code
9575 \begin_layout Plain Layout
9582 \begin_inset Flex Code
9585 \begin_layout Plain Layout
9592 \begin_inset Flex Code
9595 \begin_layout Plain Layout
9604 \begin_inset space \thinspace{}
9608 \begin_inset Flex Code
9611 \begin_layout Plain Layout
9617 ] Whether the class already provides the feature
9618 \begin_inset Flex Code
9621 \begin_layout Plain Layout
9628 A feature is in general the name of a package (e.
9629 \begin_inset space \thinspace{}
9633 \begin_inset space \space{}
9637 \begin_inset Flex Code
9640 \begin_layout Plain Layout
9647 \begin_inset Flex Code
9650 \begin_layout Plain Layout
9657 \begin_inset space \thinspace{}
9661 \begin_inset space \space{}
9665 \begin_inset Flex Code
9668 \begin_layout Plain Layout
9675 \begin_inset Flex Code
9678 \begin_layout Plain Layout
9686 \begin_inset CommandInset ref
9688 reference "chap:List-of-functions"
9692 for the list of features.
9695 \begin_layout Description
9696 \begin_inset Flex Code
9699 \begin_layout Plain Layout
9706 \begin_inset Flex Code
9709 \begin_layout Plain Layout
9715 ] Indicates that this layout provides the functionality of the module mentioned,
9716 which should be specified by the filename without the
9717 \begin_inset Flex Code
9720 \begin_layout Plain Layout
9727 This will typically be used if the layout includes the module directly,
9728 rather than using the
9729 \begin_inset Flex Code
9732 \begin_layout Plain Layout
9738 tag to indicate that it ought to be used.
9739 It could also be used in a module that provided an alternate implementation
9740 of the same functionality.
9743 \begin_layout Description
9744 \begin_inset Flex Code
9747 \begin_layout Plain Layout
9754 \begin_inset Flex Code
9757 \begin_layout Plain Layout
9763 ] Whether the class requires the feature
9764 \begin_inset Flex Code
9767 \begin_layout Plain Layout
9774 Multiple features must be separated by commas.
9775 Note that you can only request supported features.
9777 \begin_inset CommandInset ref
9779 reference "chap:List-of-functions"
9783 for the list of features.)
9786 \begin_layout Description
9787 \begin_inset Flex Code
9790 \begin_layout Plain Layout
9797 \begin_inset Flex Code
9800 \begin_layout Plain Layout
9806 ] A string that indicates the width of the right margin on the screen, for
9808 \begin_inset Quotes eld
9812 \begin_inset Flex Code
9815 \begin_layout Plain Layout
9822 \begin_inset Quotes erd
9828 \begin_layout Description
9829 \begin_inset Flex Code
9832 \begin_layout Plain Layout
9839 \begin_inset Flex Code
9842 \begin_layout Plain Layout
9848 ] Sets which divisions get numbered.
9850 \begin_inset Newline newline
9854 \begin_inset Flex Code
9857 \begin_layout Plain Layout
9866 \begin_layout Description
9867 \begin_inset Flex Code
9870 \begin_layout Plain Layout
9877 \begin_inset Flex Code
9880 \begin_layout Plain Layout
9889 \begin_inset space \thinspace{}
9893 \begin_inset Flex Code
9896 \begin_layout Plain Layout
9902 ] Whether the class-default should be printing on one or both sides of the
9904 Can be changed in the
9905 \begin_inset Flex MenuItem
9908 \begin_layout Plain Layout
9909 Document\SpecialChar \menuseparator
9918 \begin_layout Description
9919 \begin_inset Flex Code
9922 \begin_layout Plain Layout
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9938 ] This sequence defines a paragraph style.
9939 If the style does not yet exist, it is created; if it does exist, its parameter
9942 \begin_inset Quotes eld
9946 \begin_inset Flex Code
9949 \begin_layout Plain Layout
9956 \begin_inset Quotes erd
9960 \begin_inset Newline newline
9964 \begin_inset CommandInset ref
9966 reference "sub:Paragraph-Styles"
9970 for details on paragraph styles.
9973 \begin_layout Description
9974 \begin_inset Flex Code
9977 \begin_layout Plain Layout
9984 \begin_inset Flex Code
9987 \begin_layout Plain Layout
9993 ] The name of the command or environment to be used with
9994 \begin_inset Flex Code
9997 \begin_layout Plain Layout
10006 \begin_layout Description
10007 \begin_inset Flex Code
10010 \begin_layout Plain Layout
10017 \begin_inset Flex Code
10020 \begin_layout Plain Layout
10029 \begin_inset Flex Code
10032 \begin_layout Plain Layout
10038 ] Indicates what kind of markup is used to define the title of a document.
10040 \begin_inset Flex Code
10043 \begin_layout Plain Layout
10049 means that the macro with name
10050 \begin_inset Flex Code
10053 \begin_layout Plain Layout
10059 will be inserted after the last layout which has
10060 \begin_inset Quotes eld
10064 \begin_inset Flex Code
10067 \begin_layout Plain Layout
10069 \begin_inset space ~
10078 \begin_inset Quotes erd
10083 \begin_inset Flex Code
10086 \begin_layout Plain Layout
10092 corresponds to the case where all layouts which have
10093 \begin_inset Quotes eld
10097 \begin_inset Flex Code
10100 \begin_layout Plain Layout
10102 \begin_inset space ~
10111 \begin_inset Quotes erd
10114 should be enclosed into the
10115 \begin_inset Flex Code
10118 \begin_layout Plain Layout
10127 \begin_layout Description
10128 \begin_inset Flex Code
10131 \begin_layout Plain Layout
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10147 ] Sets which divisions are included in the table of contents.
10149 \begin_inset Flex Code
10152 \begin_layout Plain Layout
10161 \begin_layout Subsection
10162 \begin_inset Flex Code
10165 \begin_layout Plain Layout
10172 \begin_inset CommandInset label
10174 name "sub:ClassOptions"
10181 \begin_layout Standard
10183 \begin_inset Flex Code
10186 \begin_layout Plain Layout
10192 section can contain the following entries:
10195 \begin_layout Description
10196 \begin_inset Flex Code
10199 \begin_layout Plain Layout
10206 \begin_inset Flex Code
10209 \begin_layout Plain Layout
10215 ] The list of available font sizes for the document's main font, separated
10217 \begin_inset Quotes eld
10221 \begin_inset Flex Code
10224 \begin_layout Plain Layout
10231 \begin_inset Quotes erd
10237 \begin_layout Description
10238 \begin_inset Flex Code
10241 \begin_layout Plain Layout
10247 Used to set the DTD line with XML-based output classes.
10249 \begin_inset space \thinspace{}
10253 \begin_inset Quotes eld
10256 -//OASIS//DTD DocBook V4.2//EN
10257 \begin_inset Quotes erd
10263 \begin_layout Description
10264 \begin_inset Flex Code
10267 \begin_layout Plain Layout
10274 \begin_inset Flex Code
10277 \begin_layout Plain Layout
10278 string="empty|plain|headings|fancy"
10283 ] The list of available page sty\SpecialChar \-
10285 \begin_inset Quotes eld
10289 \begin_inset Flex Code
10292 \begin_layout Plain Layout
10299 \begin_inset Quotes erd
10305 \begin_layout Description
10306 \begin_inset Flex Code
10309 \begin_layout Plain Layout
10316 \begin_inset Flex Code
10319 \begin_layout Plain Layout
10325 ] Some document class options, separated by a comma, that will be added
10326 to the optional part of the
10327 \begin_inset Flex Code
10330 \begin_layout Plain Layout
10341 \begin_layout Standard
10343 \begin_inset Flex Code
10346 \begin_layout Plain Layout
10352 section must end with
10353 \begin_inset Quotes eld
10357 \begin_inset Flex Code
10360 \begin_layout Plain Layout
10367 \begin_inset Quotes erd
10373 \begin_layout Subsection
10375 \begin_inset CommandInset label
10377 name "sub:Paragraph-Styles"
10384 \begin_layout Standard
10385 A paragraph style description looks like this:
10389 \begin_layout Plain Layout
10390 Note that this will either define a new style or modify an existing one.
10398 \begin_layout LyX-Code
10405 \begin_layout LyX-Code
10409 \begin_layout LyX-Code
10413 \begin_layout Standard
10414 where the following commands are allowed:
10417 \begin_layout Description
10418 \begin_inset Flex Code
10421 \begin_layout Plain Layout
10428 \begin_inset Flex Code
10431 \begin_layout Plain Layout
10436 , left, right, center
10441 ] Paragraph alignment.
10444 \begin_layout Description
10445 \begin_inset Flex Code
10448 \begin_layout Plain Layout
10455 \begin_inset Flex Code
10458 \begin_layout Plain Layout
10463 , left, right, center
10468 ] A comma separated list of permitted alignments.
10469 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10471 For example a right-aligned or centered enumeration isn't possible.)
10474 \begin_layout Description
10475 \begin_inset Flex Code
10478 \begin_layout Plain Layout
10485 \begin_inset Flex Code
10488 \begin_layout Plain Layout
10494 ] Defines argument number <int> of a command\SpecialChar \slash{}
10495 environment associated with
10497 This is useful for things like section headings, and only makes sense with
10499 Every (optional or required) argument of a command or environment -- except
10500 for the required argument that is associated with the content of the paragraph
10501 itself -- has a separate definition, where the number specifies the order
10503 The definition must end with
10504 \begin_inset Flex Code
10507 \begin_layout Plain Layout
10514 So a command with two optional arguments has:
10518 \begin_layout Quote
10524 \begin_layout Quote
10530 \begin_layout Quote
10536 \begin_layout Quote
10542 \begin_layout Quote
10548 \begin_layout Quote
10554 \begin_layout Standard
10556 \begin_inset Flex Code
10559 \begin_layout Plain Layout
10565 definition, the following specifications are possible:
10568 \begin_layout Itemize
10569 \begin_inset Flex Code
10572 \begin_layout Plain Layout
10579 \begin_inset Flex Code
10582 \begin_layout Plain Layout
10588 The string that will appear both in the menu (to insert this argument)
10589 and on the argument inset button (unless you also specify a separate
10590 \begin_inset Flex Code
10593 \begin_layout Plain Layout
10600 For the menu, you can define an accelerator by appending the respective
10601 character to the string, divided by
10602 \begin_inset Quotes eld
10606 \begin_inset Quotes erd
10610 \begin_inset space \thinspace{}
10614 \begin_inset space \space{}
10618 \begin_inset Quotes eld
10622 \begin_inset Flex Code
10625 \begin_layout Plain Layout
10632 \begin_inset Quotes erd
10638 \begin_layout Itemize
10639 \begin_inset Flex Code
10642 \begin_layout Plain Layout
10649 \begin_inset Flex Code
10652 \begin_layout Plain Layout
10658 A separate string for the menu.
10659 You can define an accelerator by appending the respective character to
10660 the string, divided by
10661 \begin_inset Quotes eld
10665 \begin_inset Quotes erd
10669 \begin_inset space \thinspace{}
10673 \begin_inset space \space{}
10677 \begin_inset Quotes eld
10681 \begin_inset Flex Code
10684 \begin_layout Plain Layout
10691 \begin_inset Quotes erd
10695 This specification is optional.
10696 If it is not given the
10697 \begin_inset Flex Code
10700 \begin_layout Plain Layout
10706 will be used instead for the menu.
10709 \begin_layout Itemize
10710 \begin_inset Flex Code
10713 \begin_layout Plain Layout
10720 \begin_inset Flex Code
10723 \begin_layout Plain Layout
10729 A longer explanatory text that appears in the tooltip when hovering over
10730 the argument inset.
10733 \begin_layout Itemize
10734 \begin_inset Flex Code
10737 \begin_layout Plain Layout
10744 \begin_inset Flex Code
10747 \begin_layout Plain Layout
10756 \begin_inset space \thinspace{}
10760 \begin_inset Flex Code
10763 \begin_layout Plain Layout
10769 ] Declare if this is a mandatory (1) or an optional (0) argument.
10770 Mandatory arguments will be output empty if not given, while optional arguments
10771 will not be output at all.
10772 By default, mandatory arguments are delimited by
10773 \begin_inset Flex Code
10776 \begin_layout Plain Layout
10782 , while optional arguments are delimited by
10783 \begin_inset Flex Code
10786 \begin_layout Plain Layout
10795 \begin_layout Itemize
10796 \begin_inset Flex Code
10799 \begin_layout Plain Layout
10806 \begin_inset Flex Code
10809 \begin_layout Plain Layout
10815 defines another argument (by its number) which this argument requires to
10816 be output if it is itself output.
10818 \begin_inset space \thinspace{}
10821 g., in LaTeX commands, optional arguments often require previous optional
10822 arguments to be output (at least empty), as in
10823 \begin_inset Flex Code
10826 \begin_layout Plain Layout
10829 command[][argument]{text}
10835 This can be achieved by the statement
10836 \begin_inset Flex Code
10839 \begin_layout Plain Layout
10846 \begin_inset Flex Code
10849 \begin_layout Plain Layout
10858 \begin_layout Itemize
10859 \begin_inset Flex Code
10862 \begin_layout Plain Layout
10869 \begin_inset Flex Code
10872 \begin_layout Plain Layout
10878 defines a custom left delimiter (instead of
10879 \begin_inset Flex Code
10882 \begin_layout Plain Layout
10889 \begin_inset Flex Code
10892 \begin_layout Plain Layout
10899 A line break in the output can be indicated by
10900 \begin_inset Flex Code
10903 \begin_layout Plain Layout
10912 \begin_layout Itemize
10913 \begin_inset Flex Code
10916 \begin_layout Plain Layout
10923 \begin_inset Flex Code
10926 \begin_layout Plain Layout
10932 defines a custom right delimiter (instead of
10933 \begin_inset Flex Code
10936 \begin_layout Plain Layout
10943 \begin_inset Flex Code
10946 \begin_layout Plain Layout
10953 A line break in the output can be indicated by
10954 \begin_inset Flex Code
10957 \begin_layout Plain Layout
10966 \begin_layout Itemize
10967 \begin_inset Flex Code
10970 \begin_layout Plain Layout
10977 \begin_inset Flex Code
10980 \begin_layout Plain Layout
10986 defines an argument that is inserted if and only if no user-specified arguments
10988 \begin_inset space \thinspace{}
10992 \begin_inset space \space{}
10995 if no argument inset has been inserted (note that also an empty argument
10996 inset omits the DefaultArg).
10997 Multiple arguments need to be separated by comma.
11000 \begin_layout Itemize
11001 \begin_inset Flex Code
11004 \begin_layout Plain Layout
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11020 defines an argument that is inserted in any case (alone or in addition
11021 to user-specified arguments).
11022 Multiple arguments need to be separated by comma.
11025 \begin_layout Itemize
11026 \begin_inset Flex Code
11029 \begin_layout Plain Layout
11035 The font used for the argument content, see
11036 \begin_inset CommandInset ref
11038 reference "sub:Font-description"
11045 \begin_layout Itemize
11046 \begin_inset Flex Code
11049 \begin_layout Plain Layout
11055 The font used for the label; see
11056 \begin_inset CommandInset ref
11058 reference "sub:Font-description"
11065 \begin_layout Itemize
11066 \begin_inset Flex Code
11069 \begin_layout Plain Layout
11076 \begin_inset Flex Code
11079 \begin_layout Plain Layout
11084 , Minimalistic, Conglomerate
11089 ] describes the rendering style used for the inset's frame and buttons.
11092 \begin_layout Itemize
11093 \begin_inset Flex Code
11096 \begin_layout Plain Layout
11103 \begin_inset Flex Code
11106 \begin_layout Plain Layout
11113 \begin_inset Flex Code
11116 \begin_layout Plain Layout
11122 , this argument is automatically inserted when the respective style is selected.
11123 Currently, only one argument per style\SpecialChar \slash{}
11124 layout can be automatically inserted.
11127 \begin_layout Standard
11128 By default, the text entered in the LyX workarea in the respective layout
11129 is the last (mandatory) argument of a command if the
11130 \begin_inset Flex Code
11133 \begin_layout Plain Layout
11140 \begin_inset Flex Code
11143 \begin_layout Plain Layout
11150 However, arguments with the prefix
11151 \begin_inset Flex Code
11154 \begin_layout Plain Layout
11160 are output after this workarea argument.
11161 Note that post-argument numbering restarts at 1, so the first argument
11162 following the workarea argument is
11163 \begin_inset Flex Code
11166 \begin_layout Plain Layout
11173 Post-arguments are ignored in any other
11174 \begin_inset Flex Code
11177 \begin_layout Plain Layout
11184 \begin_inset Flex Code
11187 \begin_layout Plain Layout
11196 \begin_layout Standard
11198 \begin_inset Flex Code
11201 \begin_layout Plain Layout
11210 \begin_inset Flex Code
11213 \begin_layout Plain Layout
11222 \begin_inset Flex Code
11225 \begin_layout Plain Layout
11231 followed by the number (e.
11232 \begin_inset space \thinspace{}
11236 \begin_inset space \space{}
11240 \begin_inset Flex Code
11243 \begin_layout Plain Layout
11253 \begin_layout Description
11254 \begin_inset Flex Code
11257 \begin_layout Plain Layout
11263 Note that this will completely override any prior
11264 \begin_inset Flex Code
11267 \begin_layout Plain Layout
11273 declaration for this style.
11275 \begin_inset Quotes eld
11279 \begin_inset Flex Code
11282 \begin_layout Plain Layout
11289 \begin_inset Quotes erd
11294 \begin_inset CommandInset ref
11296 reference "sub:I18n"
11300 for details on its use.
11303 \begin_layout Description
11304 \begin_inset Flex Code
11307 \begin_layout Plain Layout
11314 \begin_inset Flex Code
11317 \begin_layout Plain Layout
11327 \begin_layout Plain Layout
11328 Note that a `float' here is a real number, such as: 1.5.
11333 The vertical space with which the last of a chain of paragraphs with this
11334 style is separated from the following paragraph.
11335 If the next paragraph has another style, the separations are not simply
11336 added, but the maximum is taken.
11339 \begin_layout Description
11340 \begin_inset Flex Code
11343 \begin_layout Plain Layout
11350 \begin_inset Flex Code
11353 \begin_layout Plain Layout
11359 ] The category for this style.
11360 This is used to group related styles in the style combobox on the toolbar.
11361 Any string can be used, but you may want to use existing categories with
11366 \begin_layout Description
11367 \begin_inset Flex Code
11370 \begin_layout Plain Layout
11376 Depth of XML command.
11377 Used only with XML-type formats.
11380 \begin_layout Description
11381 \begin_inset Flex Code
11384 \begin_layout Plain Layout
11391 \begin_inset Flex Code
11394 \begin_layout Plain Layout
11400 ] Copies all the features of an existing style into the current one.
11404 \begin_layout Description
11405 \begin_inset Flex Code
11408 \begin_layout Plain Layout
11415 \begin_inset Flex Code
11418 \begin_layout Plain Layout
11424 ] The name of a style whose preamble should be output
11429 This allows to ensure some ordering of the preamble snippets when macros
11430 definitions depend on one another.
11434 \begin_layout Plain Layout
11435 Note that, besides that functionality, there is no way to ensure any ordering
11437 The ordering that you see in a given version of LyX may change without
11438 warning in later versions.
11446 \begin_layout Description
11447 \begin_inset Flex Code
11450 \begin_layout Plain Layout
11457 \begin_inset Flex Code
11460 \begin_layout Plain Layout
11465 , Box, Filled_Box, Static
11470 ] The type of label that stands at the end of the paragraph (or sequence
11472 \begin_inset Flex Code
11475 \begin_layout Plain Layout
11482 \begin_inset Newline newline
11486 \begin_inset Flex Code
11489 \begin_layout Plain Layout
11496 \begin_inset Flex Code
11499 \begin_layout Plain Layout
11506 \begin_inset Flex Code
11509 \begin_layout Plain Layout
11517 \begin_inset Flex Code
11520 \begin_layout Plain Layout
11527 \begin_inset Quotes eld
11531 \begin_inset Quotes erd
11535 \begin_inset Flex Code
11538 \begin_layout Plain Layout
11545 \begin_inset space \space{}
11549 \begin_inset Flex Code
11552 \begin_layout Plain Layout
11558 ) is a white (resp.
11559 \begin_inset space ~
11562 black) square suitable for end of proof markers,
11563 \begin_inset Flex Code
11566 \begin_layout Plain Layout
11572 is an explicit text string.
11575 \begin_layout Description
11576 \begin_inset Flex Code
11579 \begin_layout Plain Layout
11586 \begin_inset Flex Code
11589 \begin_layout Plain Layout
11595 ] The string used for a label with a
11596 \begin_inset Flex Code
11599 \begin_layout Plain Layout
11606 \begin_inset Newline newline
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11623 \begin_layout Description
11624 \begin_inset Flex Code
11627 \begin_layout Plain Layout
11633 The font used for both the text body
11639 \begin_inset CommandInset ref
11641 reference "sub:Font-description"
11646 Note that defining this font automatically defines the
11647 \begin_inset Flex Code
11650 \begin_layout Plain Layout
11657 So you should define this one first if you also want to define
11658 \begin_inset Flex Code
11661 \begin_layout Plain Layout
11670 \begin_layout Description
11671 \begin_inset Flex Code
11674 \begin_layout Plain Layout
11681 \begin_inset Flex Code
11684 \begin_layout Plain Layout
11690 ] Used for backporting new styles to stable LyX versions.
11691 The first stable version that supports this tag is LyX 2.1.0.
11692 The argment is a number which may either be 0, -1 or any value greater
11695 \begin_inset Flex Code
11698 \begin_layout Plain Layout
11704 flag of a style is greater than zero, it will always be written to the
11706 If a .lyx file is read, the style definitions from the document header are
11707 added to the document class.
11708 Therefore even older versions can handle the style.
11710 \begin_inset Flex Code
11713 \begin_layout Plain Layout
11719 is a version number: If such a style is read, and the version number is
11720 less than the version number of the already existing style in the document
11721 class, the new style is ignored.
11722 If the version number is higher, the new style replaces the existing style.
11723 A value of -1 means an infinite version number, i.
11724 \begin_inset space \thinspace{}
11728 \begin_inset space \space{}
11734 \begin_layout Description
11735 \begin_inset Flex Code
11738 \begin_layout Plain Layout
11745 \begin_inset Flex Code
11748 \begin_layout Plain Layout
11757 \begin_inset space \thinspace{}
11761 \begin_inset Flex Code
11764 \begin_layout Plain Layout
11770 ] Usually LyX does not allow you to insert more than one space between words,
11771 since a space is considered as the separation between two words, not a
11772 character or symbol of its own.
11773 This is a very fine thing but sometimes annoying, for example, when typing
11774 program code or plain LaTeX code.
11776 \begin_inset Flex Code
11779 \begin_layout Plain Layout
11786 Note that LyX will create protected blanks for the additional blanks when
11787 in another mode than LaTeX-mode.
11790 \begin_layout Description
11791 \begin_inset Flex Code
11794 \begin_layout Plain Layout
11800 These tags are used with XHTML output.
11802 \begin_inset CommandInset ref
11804 reference "sub:Paragraph-Style-XHTML"
11811 \begin_layout Description
11812 \begin_inset Flex Code
11815 \begin_layout Plain Layout
11821 [FIXME] (Used only with XML-type formats.)
11824 \begin_layout Description
11825 \begin_inset Flex Code
11828 \begin_layout Plain Layout
11835 \begin_inset Flex Code
11838 \begin_layout Plain Layout
11847 \begin_inset space \thinspace{}
11851 \begin_inset Flex Code
11854 \begin_layout Plain Layout
11861 \begin_inset Flex Code
11864 \begin_layout Plain Layout
11870 , marks the style as to be included in the document preamble and not in
11872 This is useful for document classes that want such information as the title
11873 and author to appear in the preamble.
11874 Note that this works only for styles for which the
11875 \begin_inset Flex Code
11878 \begin_layout Plain Layout
11885 \begin_inset Flex Code
11888 \begin_layout Plain Layout
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11907 \begin_layout Description
11908 \begin_inset Flex Code
11911 \begin_layout Plain Layout
11918 \begin_inset Flex Code
11921 \begin_layout Plain Layout
11930 \begin_inset space \thinspace{}
11934 \begin_inset Flex Code
11937 \begin_layout Plain Layout
11944 \begin_inset Flex Code
11947 \begin_layout Plain Layout
11953 , marks the style as being part of a title block (see also the
11954 \begin_inset Flex Code
11957 \begin_layout Plain Layout
11964 \begin_inset Flex Code
11967 \begin_layout Plain Layout
11976 \begin_layout Description
11977 \begin_inset Flex Code
11980 \begin_layout Plain Layout
11987 \begin_inset Flex Code
11990 \begin_layout Plain Layout
11996 ] The LaTeX command sequence declaring an item in a list.
11997 The command is to be defined without the preceding backslash (the default
11999 \begin_inset Quotes eld
12003 \begin_inset Quotes erd
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12018 in the LaTeX output).
12021 \begin_layout Description
12022 \begin_inset Flex Code
12025 \begin_layout Plain Layout
12032 \begin_inset Flex Code
12035 \begin_layout Plain Layout
12041 ] This provides extra space between paragraphs that have the same style.
12042 If you put other styles into an environment, each is separated with the
12044 \begin_inset Flex Code
12047 \begin_layout Plain Layout
12054 But the whole items of the environment are additionally separated with
12056 \begin_inset Flex Code
12059 \begin_layout Plain Layout
12066 Note that this is a
12071 \begin_layout Description
12072 \begin_inset Flex Code
12075 \begin_layout Plain Layout
12081 [FIXME] (Used only with XML-type formats.)
12084 \begin_layout Description
12085 \begin_inset Flex Code
12088 \begin_layout Plain Layout
12095 \begin_inset Flex Code
12098 \begin_layout Plain Layout
12107 \begin_inset space \thinspace{}
12111 \begin_inset Flex Code
12114 \begin_layout Plain Layout
12120 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12121 lead to empty LaTeX output.
12122 There are some cases where this could be desirable however: in a letter
12123 template, the required fields can be provided as empty fields, so that
12124 people do not forget them; in some special classes, a style can be used
12125 as some kind of break, which does not contain actual text.
12128 \begin_layout Description
12129 \begin_inset Flex Code
12132 \begin_layout Plain Layout
12139 \begin_inset Flex Code
12142 \begin_layout Plain Layout
12148 ] The vertical space between the label and the text body.
12149 Only used for labels that are above the text body (
12150 \begin_inset Flex Code
12153 \begin_layout Plain Layout
12160 \begin_inset Newline newline
12164 \begin_inset Flex Code
12167 \begin_layout Plain Layout
12168 Centered_Top_Environment
12176 \begin_layout Description
12177 \begin_inset Flex Code
12180 \begin_layout Plain Layout
12187 \begin_inset Flex Code
12190 \begin_layout Plain Layout
12196 ] The name of the counter for automatic numbering.
12197 In order to have the counter appear with your label, you will need to reference
12199 \begin_inset Flex Code
12202 \begin_layout Plain Layout
12211 This will work with
12212 \begin_inset Flex Code
12215 \begin_layout Plain Layout
12222 \begin_inset Flex Code
12225 \begin_layout Plain Layout
12232 \begin_inset Flex Code
12235 \begin_layout Plain Layout
12242 \begin_inset Flex Code
12245 \begin_layout Plain Layout
12252 \begin_inset Newline newline
12260 \begin_inset Flex Code
12263 \begin_layout Plain Layout
12270 \begin_inset Flex Code
12273 \begin_layout Plain Layout
12279 , though this case is a bit complicated.
12280 Suppose you declare
12281 \begin_inset Quotes eld
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12289 LabelCounter myenum
12295 \begin_inset Quotes erd
12299 Then the actual counters used are
12300 \begin_inset Flex Code
12303 \begin_layout Plain Layout
12310 \begin_inset Flex Code
12313 \begin_layout Plain Layout
12320 \begin_inset Flex Code
12323 \begin_layout Plain Layout
12330 \begin_inset Flex Code
12333 \begin_layout Plain Layout
12339 , much as in LaTeX.
12340 These counters must all be declared separately.
12341 \begin_inset Newline newline
12345 \begin_inset CommandInset ref
12347 reference "sub:Counters"
12351 for details on counters.
12354 \begin_layout Description
12355 \begin_inset Flex Code
12358 \begin_layout Plain Layout
12364 The font used for the label.
12366 \begin_inset CommandInset ref
12368 reference "sub:Font-description"
12375 \begin_layout Description
12376 \begin_inset Flex Code
12379 \begin_layout Plain Layout
12386 \begin_inset Flex Code
12389 \begin_layout Plain Layout
12395 ] Text that indicates how far a label should be indented.
12398 \begin_layout Description
12399 \begin_inset Flex Code
12402 \begin_layout Plain Layout
12409 \begin_inset Flex Code
12412 \begin_layout Plain Layout
12418 ] Text that indicates the amount of horizontal space between the label and
12420 Only used for labels that are not above the text body.
12423 \begin_layout Description
12424 \begin_inset Flex Code
12427 \begin_layout Plain Layout
12434 \begin_inset Flex Code
12437 \begin_layout Plain Layout
12443 ] The string used for the label.
12445 \begin_inset Flex Code
12448 \begin_layout Plain Layout
12454 is set, this string can be contain the special formatting commands described
12456 \begin_inset CommandInset ref
12458 reference "sub:Counters"
12465 \begin_layout Description
12466 \begin_inset Flex Code
12469 \begin_layout Plain Layout
12470 LabelStringAppendix
12476 \begin_inset Flex Code
12479 \begin_layout Plain Layout
12485 ] This is used inside the appendix instead of
12486 \begin_inset Newline newline
12490 \begin_inset Flex Code
12493 \begin_layout Plain Layout
12501 \begin_inset Flex Code
12504 \begin_layout Plain Layout
12511 \begin_inset Newline newline
12515 \begin_inset Flex Code
12518 \begin_layout Plain Layout
12519 LabelStringAppendix
12527 \begin_layout Description
12528 \begin_inset Flex Code
12531 \begin_layout Plain Layout
12537 [FIXME] (Used only with XML-type formats.)
12540 \begin_layout Description
12541 \begin_inset Flex Code
12544 \begin_layout Plain Layout
12551 \begin_inset Flex Code
12554 \begin_layout Plain Layout
12559 , Manual, Static, Above,
12560 \begin_inset Newline newline
12563 Centered, Sensitive, Enumerate,
12564 \begin_inset Newline newline
12567 Itemize, Bibliography
12576 \begin_layout Description
12577 \begin_inset Flex Code
12580 \begin_layout Plain Layout
12586 means the label is the very first word (up to the first real blank).
12587 Use protected spaces if you want more than one word as the label.
12591 \begin_layout Description
12592 \begin_inset Flex Code
12595 \begin_layout Plain Layout
12601 means the label is simply what is declared as
12602 \begin_inset Flex Code
12605 \begin_layout Plain Layout
12612 This will be displayed
12613 \begin_inset Quotes eld
12617 \begin_inset Quotes erd
12620 , at the beginning of the paragraph.
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12641 , then it will be displayed only in the first paragraph of any sequence
12642 of paragraphs with the same
12643 \begin_inset Flex Code
12646 \begin_layout Plain Layout
12655 \begin_layout Description
12656 \begin_inset Flex Code
12659 \begin_layout Plain Layout
12666 \begin_inset space ~
12670 \begin_inset space ~
12674 \begin_inset Flex Code
12677 \begin_layout Plain Layout
12683 are special cases of
12684 \begin_inset Flex Code
12687 \begin_layout Plain Layout
12694 The label will be printed above the paragraph either at the beginning of
12695 the line or centered.
12698 \begin_layout Description
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12708 is a special case for the caption-labels
12709 \begin_inset Quotes eld
12713 \begin_inset Quotes erd
12717 \begin_inset Quotes eld
12721 \begin_inset Quotes erd
12725 \begin_inset Newline newline
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12738 means the (hardcoded) label string depends on the kind of float: It is
12739 hardcoded to be `FloatType N', where N is the value of the counter associated
12741 For the case that a caption is inserted outside of a float the
12742 \begin_inset Flex Code
12745 \begin_layout Plain Layout
12752 \begin_inset Quotes eld
12756 \begin_inset Quotes erd
12762 \begin_layout Description
12763 \begin_inset Flex Code
12766 \begin_layout Plain Layout
12772 produces the usual sort of enumeration labels.
12773 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12774 small Roman numerals, and uppercase letters for the four possible depths.
12777 \begin_layout Description
12778 \begin_inset Flex Code
12781 \begin_layout Plain Layout
12787 produces various bullets at the different levels.
12788 It is also hardcoded.
12791 \begin_layout Description
12792 \begin_inset Flex Code
12795 \begin_layout Plain Layout
12801 should be used only with
12802 \begin_inset Flex Code
12805 \begin_layout Plain Layout
12806 LatexType BibEnvironment
12815 \begin_layout Description
12816 \begin_inset Flex Code
12819 \begin_layout Plain Layout
12825 Note that this will completely override any prior
12826 \begin_inset Flex Code
12829 \begin_layout Plain Layout
12835 declaration for this style.
12837 \begin_inset Quotes eld
12841 \begin_inset Flex Code
12844 \begin_layout Plain Layout
12851 \begin_inset Quotes erd
12856 \begin_inset CommandInset ref
12858 reference "sub:I18n"
12862 for details on its use.
12865 \begin_layout Description
12866 \begin_inset Flex Code
12869 \begin_layout Plain Layout
12876 \begin_inset Flex Code
12879 \begin_layout Plain Layout
12885 ] The name of the corresponding LaTeX stuff.
12886 Either the environment or command name.
12889 \begin_layout Description
12890 \begin_inset Flex Code
12893 \begin_layout Plain Layout
12900 \begin_inset Flex Code
12903 \begin_layout Plain Layout
12909 ] An optional parameter for the corresponding
12910 \begin_inset Flex Code
12913 \begin_layout Plain Layout
12920 This parameter cannot be changed from within LyX (use
12921 \begin_inset Flex Code
12924 \begin_layout Plain Layout
12930 for customizable parameters).
12931 This will be output as is after all LaTeX
12932 \begin_inset Flex Code
12935 \begin_layout Plain Layout
12944 \begin_layout Description
12945 \begin_inset Flex Code
12948 \begin_layout Plain Layout
12955 \begin_inset Flex Code
12958 \begin_layout Plain Layout
12963 , Command, Environment, Item_Environment,
12964 \begin_inset Newline newline
12967 List_Environment, Bib_Environment
12972 ] How the style should be translated into LaTeX.
12976 \begin_layout Plain Layout
12977 \begin_inset Flex Code
12980 \begin_layout Plain Layout
12986 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12987 Visit the SGML class files for specific examples.
12996 \begin_layout Description
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13006 means nothing special.
13009 \begin_layout Description
13010 \begin_inset Flex Code
13013 \begin_layout Plain Layout
13020 \begin_inset Flex Code
13023 \begin_layout Plain Layout
13030 {\SpecialChar \ldots{}
13039 \begin_layout Description
13040 \begin_inset Flex Code
13043 \begin_layout Plain Layout
13050 \begin_inset Flex Code
13053 \begin_layout Plain Layout
13060 }\SpecialChar \ldots{}
13076 \begin_layout Description
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13087 \begin_inset Flex Code
13090 \begin_layout Plain Layout
13097 \begin_inset Flex Code
13100 \begin_layout Plain Layout
13108 is generated for each paragraph of this environment.
13112 \begin_layout Description
13113 \begin_inset Flex Code
13116 \begin_layout Plain Layout
13123 \begin_inset Flex Code
13126 \begin_layout Plain Layout
13133 \begin_inset Newline newline
13137 \begin_inset Flex Code
13140 \begin_layout Plain Layout
13146 is passed as an argument to the environment.
13147 \begin_inset Newline newline
13151 \begin_inset Flex Code
13154 \begin_layout Plain Layout
13160 can be defined in the
13161 \begin_inset Flex MenuItem
13164 \begin_layout Plain Layout
13165 Edit\SpecialChar \menuseparator
13167 \begin_inset space ~
13178 \begin_layout Description
13179 \begin_inset Flex Code
13182 \begin_layout Plain Layout
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13198 but adds additionally the necessary mandatory argument (the longest label)
13199 to the begin statement of the bibliography environment:
13200 \begin_inset Newline newline
13204 \begin_inset Flex Code
13207 \begin_layout Plain Layout
13210 begin{thebibliography}{99}
13215 It is therefore only useful for bibliography environments.
13216 The default longest label
13217 \begin_inset Quotes eld
13221 \begin_inset Quotes erd
13224 can be changed by the user in the paragraph settings of a bibliography
13228 \begin_layout Standard
13229 Putting the last few things together, the LaTeX output will be either:
13232 \begin_layout LyX-Code
13235 LatexName[LatexParam]{\SpecialChar \ldots{}
13239 \begin_layout Standard
13243 \begin_layout LyX-Code
13246 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13252 \begin_layout Standard
13253 depending upon the LaTeX type.
13257 \begin_layout Description
13258 \begin_inset Flex Code
13261 \begin_layout Plain Layout
13268 \begin_inset Flex Code
13271 \begin_layout Plain Layout
13277 ] A string that is put at the beginning of the style content.
13278 A line break in the output can be indicated by
13279 \begin_inset Flex Code
13282 \begin_layout Plain Layout
13291 \begin_layout Description
13292 \begin_inset Flex Code
13295 \begin_layout Plain Layout
13302 \begin_inset Flex Code
13305 \begin_layout Plain Layout
13311 ] If you put styles into environments, the different
13312 \begin_inset Flex Code
13315 \begin_layout Plain Layout
13321 are not simply added, but added with a factor
13322 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13326 Note that this parameter is also used when
13327 \begin_inset Flex Code
13330 \begin_layout Plain Layout
13337 \begin_inset Flex Code
13340 \begin_layout Plain Layout
13347 \begin_inset Flex Code
13350 \begin_layout Plain Layout
13357 Then it is added to the manual or dynamic margin.
13358 \begin_inset Newline newline
13362 \begin_inset Quotes eld
13366 \begin_inset Flex Code
13369 \begin_layout Plain Layout
13376 \begin_inset Quotes erd
13379 means that the paragraph is indented with the width of
13380 \begin_inset Quotes eld
13384 \begin_inset Flex Code
13387 \begin_layout Plain Layout
13394 \begin_inset Quotes erd
13397 in the normal font.
13398 You can get a negative width by prefixing the string with
13399 \begin_inset Quotes eld
13403 \begin_inset Flex Code
13406 \begin_layout Plain Layout
13413 \begin_inset Quotes erd
13417 This way was chosen so that the look is the same with each used screen
13421 \begin_layout Description
13422 \begin_inset Flex Code
13425 \begin_layout Plain Layout
13432 \begin_inset Flex Code
13435 \begin_layout Plain Layout
13440 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13446 \begin_inset Newline newline
13449 The kind of margin that the style has on the left side.
13453 \begin_layout Description
13454 \begin_inset Flex Code
13457 \begin_layout Plain Layout
13463 just means a fixed margin.
13466 \begin_layout Description
13467 \begin_inset Flex Code
13470 \begin_layout Plain Layout
13476 means that the left margin depends on the string entered in the
13477 \begin_inset Flex MenuItem
13480 \begin_layout Plain Layout
13481 Edit\SpecialChar \menuseparator
13483 \begin_inset space ~
13492 This is used to typeset nice lists without tabulators.
13495 \begin_layout Description
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13505 means that the margin depends on the size of the label.
13506 This is used for automatic enumerated headlines.
13507 It is obvious that the headline
13508 \begin_inset Quotes eld
13511 5.4.3.2.1 Very long headline
13512 \begin_inset Quotes erd
13515 must have a wider left margin (as wide as
13516 \begin_inset Quotes eld
13520 \begin_inset Quotes erd
13523 plus the space) than
13524 \begin_inset Quotes eld
13527 3.2 Very long headline
13528 \begin_inset Quotes erd
13532 \begin_inset Quotes eld
13536 \begin_inset Quotes erd
13539 are not able to do this.
13542 \begin_layout Description
13543 \begin_inset Flex Code
13546 \begin_layout Plain Layout
13552 is similar, but only the very first row of the paragraph is dynamic, while
13553 the others are static; this is used, for example, for descriptions.
13556 \begin_layout Description
13557 \begin_inset Flex Code
13560 \begin_layout Plain Layout
13566 means the margin is chosen in a way that the longest row of this paragraph
13567 fits to the right margin.
13568 This is used to typeset an address on the right edge of the page.
13572 \begin_layout Description
13573 \begin_inset Flex Code
13576 \begin_layout Plain Layout
13583 \begin_inset Flex Code
13586 \begin_layout Plain Layout
13595 \begin_inset space \thinspace{}
13599 \begin_inset Flex Code
13602 \begin_layout Plain Layout
13608 ] Whether fragile commands in this style should be
13609 \begin_inset Flex Code
13612 \begin_layout Plain Layout
13625 whether this command should itself be protected.)
13628 \begin_layout Description
13629 \begin_inset Flex Code
13632 \begin_layout Plain Layout
13639 \begin_inset Flex Code
13642 \begin_layout Plain Layout
13649 \begin_inset space \thinspace{}
13653 \begin_inset Flex Code
13656 \begin_layout Plain Layout
13664 ] Whether newlines are translated into LaTeX newlines (
13665 \begin_inset Flex Code
13668 \begin_layout Plain Layout
13679 The translation can be switched off to allow more comfortable LaTeX editing
13683 \begin_layout Description
13684 \begin_inset Flex Code
13687 \begin_layout Plain Layout
13694 \begin_inset Flex Code
13697 \begin_layout Plain Layout
13706 \begin_inset space \thinspace{}
13710 \begin_inset Flex Code
13713 \begin_layout Plain Layout
13719 ] If set to true, and if
13720 \begin_inset Flex Code
13723 \begin_layout Plain Layout
13730 \begin_inset Flex Code
13733 \begin_layout Plain Layout
13739 ) paragraphs are being indented, then the indentation of such a paragraph
13740 following one of this type will be suppressed.
13741 (So this will not affect the display of non-default paragraphs.)
13744 \begin_layout Description
13745 \begin_inset Flex Code
13748 \begin_layout Plain Layout
13755 \begin_inset Flex Code
13758 \begin_layout Plain Layout
13764 ] Name of a style that has replaced this style.
13765 This is used to rename a style, while keeping backward compatibility.
13768 \begin_layout Description
13769 \begin_inset Flex Code
13772 \begin_layout Plain Layout
13779 \begin_inset Flex Code
13782 \begin_layout Plain Layout
13791 \begin_inset space \thinspace{}
13795 \begin_inset Flex Code
13798 \begin_layout Plain Layout
13804 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13805 output, but only by a line break; together with
13806 \begin_inset Flex Code
13809 \begin_layout Plain Layout
13815 , this allows to emulate a plain text editor (like the ERT inset).
13818 \begin_layout Description
13819 \begin_inset Flex Code
13822 \begin_layout Plain Layout
13829 \begin_inset Flex Code
13832 \begin_layout Plain Layout
13838 ] The indent of the very first line of a paragraph.
13840 \begin_inset Newline newline
13844 \begin_inset Flex Code
13847 \begin_layout Plain Layout
13853 will be fixed for a certain style.
13854 The exception is the default style, since the indentation for these paragraphs
13855 can be prohibited with
13856 \begin_inset Flex Code
13859 \begin_layout Plain Layout
13867 \begin_inset Flex Code
13870 \begin_layout Plain Layout
13876 style paragraphs inside environments use the
13877 \begin_inset Flex Code
13880 \begin_layout Plain Layout
13886 of the environment, not their native one.
13888 \begin_inset Flex Code
13891 \begin_layout Plain Layout
13897 paragraphs inside an enumeration are not indented.
13900 \begin_layout Description
13901 \begin_inset Flex Code
13904 \begin_layout Plain Layout
13911 \begin_inset Flex Code
13914 \begin_layout Plain Layout
13920 ] The vertical space between two paragraphs of this style.
13923 \begin_layout Description
13924 \begin_inset Flex Code
13927 \begin_layout Plain Layout
13934 \begin_inset Flex Code
13937 \begin_layout Plain Layout
13943 ] LyX allows the user to choose either
13944 \begin_inset Quotes eld
13948 \begin_inset Quotes erd
13952 \begin_inset Quotes eld
13956 \begin_inset Quotes erd
13959 to separate paragraphs.
13961 \begin_inset Quotes eld
13965 \begin_inset Quotes erd
13969 \begin_inset Flex Code
13972 \begin_layout Plain Layout
13980 \begin_inset Quotes eld
13984 \begin_inset Quotes erd
13988 \begin_inset Flex Code
13991 \begin_layout Plain Layout
13997 is ignored and all paragraphs are separated by the
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14008 The vertical space is calculated with
14009 \begin_inset Flex Code
14012 \begin_layout Plain Layout
14014 \begin_inset space ~
14023 \begin_inset Flex Code
14026 \begin_layout Plain Layout
14032 is the height of a row with the normal font.
14033 This way, the look stays the same with different screen fonts.
14036 \begin_layout Description
14037 \begin_inset Flex Code
14040 \begin_layout Plain Layout
14047 \begin_inset Flex Code
14050 \begin_layout Plain Layout
14059 \begin_inset space \thinspace{}
14063 \begin_inset Flex Code
14066 \begin_layout Plain Layout
14072 ] Whether the contents of this paragraph should be output in raw form, meaning
14073 without special translations that LaTeX would require.
14076 \begin_layout Description
14077 \begin_inset Flex Code
14080 \begin_layout Plain Layout
14086 Information to be included in the LaTeX preamble when this style is used.
14087 Used to define macros, load packages, etc., required by this particular
14090 \begin_inset Quotes eld
14094 \begin_inset Flex Code
14097 \begin_layout Plain Layout
14104 \begin_inset Quotes erd
14110 \begin_layout Description
14111 \begin_inset Flex Code
14114 \begin_layout Plain Layout
14121 \begin_inset Flex Code
14124 \begin_layout Plain Layout
14130 ] The prefix to use when creating labels referring to paragraphs of this
14132 This allows the use of formatted references.
14135 \begin_layout Description
14136 \begin_inset Flex Code
14139 \begin_layout Plain Layout
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14155 ] Whether the style requires the feature
14156 \begin_inset Flex Code
14159 \begin_layout Plain Layout
14166 See the description of
14167 \begin_inset Flex Code
14170 \begin_layout Plain Layout
14177 \begin_inset CommandInset ref
14179 reference "sub:General-text-class"
14183 ) for information on `features'.
14186 \begin_layout Description
14187 \begin_inset Flex Code
14190 \begin_layout Plain Layout
14197 \begin_inset Flex Code
14200 \begin_layout Plain Layout
14209 \begin_inset Flex Code
14212 \begin_layout Plain Layout
14218 ] Resets the LaTeX arguments of this style (as defined via the
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14229 This is useful if you have copied a style via
14230 \begin_inset Flex Code
14233 \begin_layout Plain Layout
14239 , but you do not want to inherit its (required and optional) arguments.
14242 \begin_layout Description
14243 \begin_inset Flex Code
14246 \begin_layout Plain Layout
14253 \begin_inset Flex Code
14256 \begin_layout Plain Layout
14262 ] A string that is put at the end of the layout content.
14263 A line break in the output can be indicated by
14264 \begin_inset Flex Code
14267 \begin_layout Plain Layout
14276 \begin_layout Description
14277 \begin_inset Flex Code
14280 \begin_layout Plain Layout
14287 \begin_inset Flex Code
14290 \begin_layout Plain Layout
14297 \begin_inset Flex Code
14300 \begin_layout Plain Layout
14309 \begin_layout Description
14310 \begin_inset Flex Code
14313 \begin_layout Plain Layout
14320 \begin_inset Flex Code
14323 \begin_layout Plain Layout
14332 \begin_inset Flex Code
14335 \begin_layout Plain Layout
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14352 \begin_inset Flex Code
14355 \begin_layout Plain Layout
14357 \begin_inset space ~
14365 ] This defines what the default spacing should be in the style.
14367 \begin_inset Flex Code
14370 \begin_layout Plain Layout
14377 \begin_inset Flex Code
14380 \begin_layout Plain Layout
14387 \begin_inset Flex Code
14390 \begin_layout Plain Layout
14396 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14397 If you specify the argument
14398 \begin_inset Flex Code
14401 \begin_layout Plain Layout
14407 , then you must also provide a value argument which will be the actual multiplie
14409 Note that, contrary to other parameters,
14410 \begin_inset Flex Code
14413 \begin_layout Plain Layout
14419 implies the generation of specific LaTeX code, using the LaTeX package
14423 \begin_inset Flex Code
14426 \begin_layout Plain Layout
14435 \begin_layout Description
14436 \begin_inset Flex Code
14439 \begin_layout Plain Layout
14446 \begin_inset Flex Code
14449 \begin_layout Plain Layout
14456 \begin_inset space \thinspace{}
14460 \begin_inset Flex Code
14463 \begin_layout Plain Layout
14471 ] Allow spell-checking paragraphs of this style.
14475 \begin_layout Description
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14485 The font used for the text body .
14487 \begin_inset CommandInset ref
14489 reference "sub:Font-description"
14496 \begin_layout Description
14497 \begin_inset Flex Code
14500 \begin_layout Plain Layout
14509 \begin_inset Flex Code
14512 \begin_layout Plain Layout
14522 The level of the style in the table of contents.
14523 This is used for automatic numbering of section headings.
14526 \begin_layout Description
14527 \begin_inset Flex Code
14530 \begin_layout Plain Layout
14537 \begin_inset Flex Code
14540 \begin_layout Plain Layout
14546 ] The vertical space with which the very first of a chain of paragraphs
14547 with this style is separated from the previous paragraph.
14548 If the previous paragraph has another style, the separations are not simply
14549 added, but the maximum is taken.
14552 \begin_layout Subsection
14553 \begin_inset CommandInset label
14559 Internationalization of Paragraph Styles
14562 \begin_layout Standard
14563 LyX has long supported internationalization of layout information, but,
14564 until version 2.0, this applied only to the user interface and not to, say,
14566 Thus, French authors were forced to resort to ugly hacks if they wanted
14571 1' instead of `Theorem 1'.
14572 Thanks to Georg Baum, that is no longer the case.
14575 \begin_layout Standard
14577 \begin_inset Flex Code
14580 \begin_layout Plain Layout
14586 defines text that is to appear in the typeset document, it may use
14587 \begin_inset Flex Code
14590 \begin_layout Plain Layout
14597 \begin_inset Flex Code
14600 \begin_layout Plain Layout
14606 to support non-English and even multi-language documents correctly.
14607 The following excerpt (from the
14608 \begin_inset Flex Code
14611 \begin_layout Plain Layout
14617 file) shows how this works:
14620 \begin_layout LyX-Code
14625 \begin_layout LyX-Code
14628 theoremstyle{remark}
14631 \begin_layout LyX-Code
14634 newtheorem{claim}[thm]{
14641 \begin_layout LyX-Code
14645 \begin_layout LyX-Code
14649 \begin_layout LyX-Code
14654 claimname}{_(Claim)}
14657 \begin_layout LyX-Code
14661 \begin_layout LyX-Code
14665 \begin_layout LyX-Code
14674 claimname}{_(Claim)}}
14677 \begin_layout LyX-Code
14682 \begin_layout Standard
14683 In principle, any legal LaTeX may appear in the
14684 \begin_inset Flex Code
14687 \begin_layout Plain Layout
14694 \begin_inset Flex Code
14697 \begin_layout Plain Layout
14703 tags, but in practice they will typically look as they do here.
14704 The key to correct translation of the typeset text is the definition of
14706 \begin_inset Flex Code
14709 \begin_layout Plain Layout
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14733 \begin_layout Standard
14735 \begin_inset Flex Code
14738 \begin_layout Plain Layout
14744 tag provides for internationalization based upon the overall language of
14746 The contents of the tag will be included in the preamble, just as with
14748 \begin_inset Flex Code
14751 \begin_layout Plain Layout
14758 What makes it special is the use of the
14759 \begin_inset Quotes eld
14763 \begin_inset Quotes erd
14767 \begin_inset Flex Code
14770 \begin_layout Plain Layout
14776 , which will be replaced, when LyX produces LaTeX output, with the translation
14777 of its argument into the document language.
14780 \begin_layout Standard
14782 \begin_inset Flex Code
14785 \begin_layout Plain Layout
14791 tag is more complex, since it is meant to provide support for multi-language
14792 documents and so offers an interface to the
14793 \begin_inset Flex Code
14796 \begin_layout Plain Layout
14803 Its contents will be added to the preamble once for each language that
14804 appears in the document.
14805 In this case, the argument to
14806 \begin_inset Flex Code
14809 \begin_layout Plain Layout
14815 will be replaced with its translation into the language in question; the
14817 \begin_inset Flex Code
14820 \begin_layout Plain Layout
14826 is replaced by the language name (as used by the babel package).
14829 \begin_layout Standard
14830 A German document that also included a French section would thus have the
14831 following in the preamble:
14834 \begin_layout LyX-Code
14843 claimname}{Affirmation}}
14844 \begin_inset Newline newline
14855 claimname}{Behauptung}}
14856 \begin_inset Newline newline
14863 claimname}{Behauptung}
14866 \begin_layout Standard
14868 \begin_inset Flex Code
14871 \begin_layout Plain Layout
14877 will then conspire to produce the correct text in the output.
14880 \begin_layout Standard
14881 One important point to note here is that the translations are provided by
14882 LyX itself, through the file
14883 \begin_inset Flex Code
14886 \begin_layout Plain Layout
14893 This means, in effect, that
14894 \begin_inset Flex Code
14897 \begin_layout Plain Layout
14904 \begin_inset Flex Code
14907 \begin_layout Plain Layout
14913 are really only of use in layout files that are provided with LyX, since
14914 text entered in user-created layout files will not be seen by LyX's internation
14915 alization routines unless the
14916 \begin_inset Flex Code
14919 \begin_layout Plain Layout
14925 file is modified accordingly.
14926 That said, however, any layout created with the intention that it will
14927 be included with LyX should use these tags where appropriate.
14928 Please note that the paragraph style translations provided by LyX will
14929 never change with a minor update (e.
14930 \begin_inset space \thinspace{}
14934 \begin_inset space \space{}
14937 from version 2.1.x to 2.1.y).
14938 It is however quite likely that a major update (e.
14939 \begin_inset space \thinspace{}
14943 \begin_inset space \space{}
14946 from 2.0.x to 2.1.y) will introduce new translations or corrections.
14949 \begin_layout Subsection
14951 \begin_inset CommandInset label
14960 \begin_layout Standard
14961 It is necessary to define the floats (
14962 \begin_inset Flex MenuItem
14965 \begin_layout Plain Layout
14972 \begin_inset Flex MenuItem
14975 \begin_layout Plain Layout
14981 , \SpecialChar \ldots{}
14982 ) in the text class itself.
14983 Standard floats are included in the file
14984 \begin_inset Flex Code
14987 \begin_layout Plain Layout
14993 , so you may have to do no more than add
14996 \begin_layout LyX-Code
14997 Input stdfloats.inc
15000 \begin_layout Standard
15001 to your layout file.
15002 If you want to implement a text class that proposes some other float types
15003 (like the AGU class bundled with LyX), the information below will hopefully
15007 \begin_layout Description
15008 \begin_inset Flex Code
15011 \begin_layout Plain Layout
15018 \begin_inset Flex Code
15021 \begin_layout Plain Layout
15028 \begin_inset Quotes erd
15032 \begin_inset Quotes erd
15035 ] The file name extension of an auxiliary file for the list of figures (or
15037 LaTeX writes the captions to this file.
15040 \begin_layout Description
15041 \begin_inset Flex Code
15044 \begin_layout Plain Layout
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15061 \begin_inset Quotes erd
15065 \begin_inset Quotes erd
15068 ] The string that will be used in the menus and also for the caption.
15069 This is translated to the current language if babel is used.
15072 \begin_layout Description
15073 \begin_inset Flex Code
15076 \begin_layout Plain Layout
15082 These tags control the XHTML output.
15084 \begin_inset CommandInset ref
15086 reference "sec:Tags-for-XHTML"
15093 \begin_layout Description
15094 \begin_inset Flex Code
15097 \begin_layout Plain Layout
15106 \begin_inset Flex Code
15109 \begin_layout Plain Layout
15118 \begin_inset space \thinspace{}
15122 \begin_inset Flex Code
15125 \begin_layout Plain Layout
15131 ] Indicates whether the float is already defined in the document class or
15132 if instead the LaTeX package
15133 \begin_inset Flex Code
15136 \begin_layout Plain Layout
15142 needs to be loaded to define it on-the-fly.
15144 \begin_inset Flex Code
15147 \begin_layout Plain Layout
15154 \begin_inset Flex Code
15157 \begin_layout Plain Layout
15164 It should be set to
15165 \begin_inset Flex Code
15168 \begin_layout Plain Layout
15174 if the float is already defined by the LaTeX document class.
15177 \begin_layout Description
15178 \begin_inset Flex Code
15181 \begin_layout Plain Layout
15188 \begin_inset Flex Code
15191 \begin_layout Plain Layout
15198 \begin_inset Quotes erd
15202 \begin_inset Quotes erd
15205 ] The command used to generate a list of floats of this type; the leading
15214 \begin_inset Flex Code
15217 \begin_layout Plain Layout
15223 is false, since there is no standard way to generate this command.
15225 \begin_inset Flex Code
15228 \begin_layout Plain Layout
15234 is true, since in that case there is a standard way to define the command.
15237 \begin_layout Description
15238 \begin_inset Flex Code
15241 \begin_layout Plain Layout
15248 \begin_inset Flex Code
15251 \begin_layout Plain Layout
15258 \begin_inset Quotes erd
15262 \begin_inset Quotes erd
15265 ] A title for a list of floats of this kind (list of figures, tables, or
15267 It is used for the screen label within LyX, it is used by LaTeX for the
15268 title and it is used as the title in the XHTML output.
15269 It will be translated to the document language.
15272 \begin_layout Description
15273 \begin_inset Flex Code
15276 \begin_layout Plain Layout
15283 \begin_inset Flex Code
15286 \begin_layout Plain Layout
15293 \begin_inset Quotes erd
15297 \begin_inset Quotes erd
15300 ] This (optional) argument determines whether floats of this class will
15301 be numbered within some sectional unit of the document.
15303 \begin_inset Flex Code
15306 \begin_layout Plain Layout
15313 \begin_inset Quotes eld
15317 \begin_inset Flex Code
15320 \begin_layout Plain Layout
15327 \begin_inset Quotes erd
15330 , the floats will be numbered within chapters.
15334 \begin_layout Description
15335 \begin_inset Flex Code
15338 \begin_layout Plain Layout
15345 \begin_inset Flex Code
15348 \begin_layout Plain Layout
15355 \begin_inset Quotes erd
15359 \begin_inset Quotes erd
15362 ] The default placement for the given class of floats.
15363 The string should be as in standard LaTeX:
15364 \begin_inset Flex Code
15367 \begin_layout Plain Layout
15374 \begin_inset Flex Code
15377 \begin_layout Plain Layout
15384 \begin_inset Flex Code
15387 \begin_layout Plain Layout
15394 \begin_inset Flex Code
15397 \begin_layout Plain Layout
15403 for top, bottom, page, and here, respectively.
15407 \begin_layout Plain Layout
15408 Note that the order of these letters in the string is irrelevant, like in
15414 On top of that there is a new type,
15415 \begin_inset Flex Code
15418 \begin_layout Plain Layout
15424 , which does not really correspond to a float, since it means: put it
15425 \begin_inset Quotes eld
15429 \begin_inset Quotes erd
15433 Note however that the
15434 \begin_inset Flex Code
15437 \begin_layout Plain Layout
15443 specifier is special and, because of implementation details, cannot be
15444 used in non-built in float types.
15445 If you do not understand what this means, just use
15446 \begin_inset Quotes eld
15450 \begin_inset Flex Code
15453 \begin_layout Plain Layout
15460 \begin_inset Quotes erd
15466 \begin_layout Description
15467 \begin_inset Flex Code
15470 \begin_layout Plain Layout
15477 \begin_inset Flex Code
15480 \begin_layout Plain Layout
15486 ] The prefix to use when creating labels referring to floats of this type.
15487 This allows the use of formatted references.
15488 Note that you can remove any
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15498 set by a copied style by using the special value
15499 \begin_inset Quotes eld
15503 \begin_inset Quotes erd
15506 , which must be all caps.
15509 \begin_layout Description
15510 \begin_inset Flex Code
15513 \begin_layout Plain Layout
15520 \begin_inset Flex Code
15523 \begin_layout Plain Layout
15530 \begin_inset Quotes erd
15534 \begin_inset Quotes erd
15537 ] The style used when defining the float using
15538 \begin_inset Flex Code
15541 \begin_layout Plain Layout
15552 \begin_layout Description
15553 \begin_inset Flex Code
15556 \begin_layout Plain Layout
15563 \begin_inset Flex Code
15566 \begin_layout Plain Layout
15573 \begin_inset Quotes erd
15577 \begin_inset Quotes erd
15581 \begin_inset Quotes eld
15585 \begin_inset Quotes erd
15588 of the new class of floats, like program or algorithm.
15589 After the appropriate
15590 \begin_inset Flex Code
15593 \begin_layout Plain Layout
15602 \begin_inset Flex Code
15605 \begin_layout Plain Layout
15614 \begin_inset Flex Code
15617 \begin_layout Plain Layout
15628 \begin_layout Description
15629 \begin_inset Flex Code
15632 \begin_layout Plain Layout
15639 \begin_inset Flex Code
15642 \begin_layout Plain Layout
15649 \begin_inset space \thinspace{}
15653 \begin_inset Flex Code
15656 \begin_layout Plain Layout
15664 ] Specifies whether this float is defined using the LaTeX package
15665 \begin_inset Flex Code
15668 \begin_layout Plain Layout
15674 , either by the class file, another package or on-the-fly by LyX itself.
15677 \begin_layout Standard
15678 Note that defining a float with type
15679 \begin_inset Flex Code
15682 \begin_layout Plain Layout
15690 automatically defines the corresponding counter with name
15691 \begin_inset Flex Code
15694 \begin_layout Plain Layout
15705 \begin_layout Subsection
15706 Flex insets and InsetLayout
15707 \begin_inset CommandInset label
15709 name "sub:Flex-insets-and"
15716 \begin_layout Standard
15717 Flex insets come in three different kinds:
15720 \begin_layout Itemize
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15731 ): These define semantic markup corresponding to such LaTeX commands as
15733 \begin_inset Flex Code
15736 \begin_layout Plain Layout
15745 \begin_inset Flex Code
15748 \begin_layout Plain Layout
15759 \begin_layout Itemize
15761 \begin_inset Flex Code
15764 \begin_layout Plain Layout
15770 ): These can be used to define custom collapsible insets, similar to TeX
15771 code, footnote, and the like.
15772 An obvious example is an endnote inset, which is defined in the
15773 \begin_inset Flex Code
15776 \begin_layout Plain Layout
15785 \begin_layout Itemize
15787 \begin_inset Flex Code
15790 \begin_layout Plain Layout
15796 ): For use with DocBook classes.
15799 \begin_layout Standard
15800 Flex insets are defined using the
15801 \begin_inset Flex Code
15804 \begin_layout Plain Layout
15810 tag, which shall be explained in a moment.
15813 \begin_layout Standard
15815 \begin_inset Flex Code
15818 \begin_layout Plain Layout
15824 tag also serves another function: It can be used to customize the general
15825 layout of many different types of insets.
15827 \begin_inset Flex Code
15830 \begin_layout Plain Layout
15836 can be used to customize the layout parameters for footnotes, marginal
15837 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15838 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15842 \begin_layout Standard
15844 \begin_inset Flex Code
15847 \begin_layout Plain Layout
15853 definition must begin with a line of the form:
15856 \begin_layout LyX-Code
15860 \begin_layout Standard
15862 \begin_inset Flex Code
15865 \begin_layout Plain Layout
15871 indicates the inset whose layout is being defined, and here there are four
15875 \begin_layout Enumerate
15876 The layout for a pre-existing inset is being modified.
15877 In this case, can be
15878 \begin_inset Flex Code
15881 \begin_layout Plain Layout
15887 any one of the following:
15888 \begin_inset Flex Code
15891 \begin_layout Plain Layout
15898 \begin_inset Flex Code
15901 \begin_layout Plain Layout
15908 \begin_inset Flex Code
15911 \begin_layout Plain Layout
15918 \begin_inset Flex Code
15921 \begin_layout Plain Layout
15928 \begin_inset Flex Code
15931 \begin_layout Plain Layout
15938 \begin_inset Flex Code
15941 \begin_layout Plain Layout
15948 \begin_inset Flex Code
15951 \begin_layout Plain Layout
15958 \begin_inset Flex Code
15961 \begin_layout Plain Layout
15968 \begin_inset Flex Code
15971 \begin_layout Plain Layout
15978 \begin_inset Flex Code
15981 \begin_layout Plain Layout
15988 \begin_inset Flex Code
15991 \begin_layout Plain Layout
15998 \begin_inset Flex Code
16001 \begin_layout Plain Layout
16008 \begin_inset Flex Code
16011 \begin_layout Plain Layout
16018 \begin_inset Flex Code
16021 \begin_layout Plain Layout
16028 \begin_inset Flex Code
16031 \begin_layout Plain Layout
16038 \begin_inset Flex Code
16041 \begin_layout Plain Layout
16048 \begin_inset Flex Code
16051 \begin_layout Plain Layout
16058 \begin_inset Flex Code
16061 \begin_layout Plain Layout
16068 \begin_inset Flex Code
16071 \begin_layout Plain Layout
16078 \begin_inset Flex Code
16081 \begin_layout Plain Layout
16090 \begin_layout Enumerate
16091 The layout for a Flex inset is being defined.
16093 \begin_inset Flex Code
16096 \begin_layout Plain Layout
16102 must be of the form
16103 \begin_inset Quotes eld
16107 \begin_inset Flex Code
16110 \begin_layout Plain Layout
16117 \begin_inset Quotes erd
16121 \begin_inset Flex Code
16124 \begin_layout Plain Layout
16130 may be be any valid identifier not used by a pre-existing Flex inset.
16131 The identifier may include spaces, but in that case the whole thing must
16132 be wrapped in quotes.
16133 Note that the definition of a flex inset
16138 \begin_inset Flex Code
16141 \begin_layout Plain Layout
16147 entry, declaring which type of inset it defines.
16150 \begin_layout Enumerate
16151 The layout for user specific branch is being defined.
16153 \begin_inset Flex Code
16156 \begin_layout Plain Layout
16162 must be of the form
16163 \begin_inset Quotes eld
16167 \begin_inset Flex Code
16170 \begin_layout Plain Layout
16177 \begin_inset Quotes erd
16181 \begin_inset Flex Code
16184 \begin_layout Plain Layout
16190 may be be any valid identifier of branch defined in user's document.
16191 The identifier may include spaces, but in that case the whole thing must
16192 be wrapped in quotes.
16193 The main purpose of this feature is to allow LaTeX wrapping around specific
16194 branches as user needs.
16197 \begin_layout Enumerate
16198 The layout of a user (or class) specific caption is being defined.
16200 \begin_inset Flex Code
16203 \begin_layout Plain Layout
16209 must be of the form
16210 \begin_inset Quotes eld
16214 \begin_inset Flex Code
16217 \begin_layout Plain Layout
16224 \begin_inset Quotes erd
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16237 specifies the name of the caption as it appears in the menu.
16238 Have a look at the standard caption (
16239 \begin_inset Flex Code
16242 \begin_layout Plain Layout
16248 ), the specific captions of the KOMA-Script classes (
16249 \begin_inset Flex Code
16252 \begin_layout Plain Layout
16259 \begin_inset Flex Code
16262 \begin_layout Plain Layout
16271 \begin_inset space ~
16277 \begin_inset Flex Code
16280 \begin_layout Plain Layout
16286 ) for applications.
16289 \begin_layout Standard
16291 \begin_inset Flex Code
16294 \begin_layout Plain Layout
16300 definition can contain the following entries:
16303 \begin_layout Description
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16314 \begin_inset Flex Code
16317 \begin_layout Plain Layout
16323 ] Defines argument number of a command\SpecialChar \slash{}
16324 environment associated with the current
16326 The definition must end with
16327 \begin_inset Flex Code
16330 \begin_layout Plain Layout
16338 \begin_inset CommandInset ref
16340 reference "sub:Paragraph-Styles"
16347 \begin_layout Description
16348 \begin_inset Flex Code
16351 \begin_layout Plain Layout
16357 Preamble for changing language commands; see
16358 \begin_inset CommandInset ref
16360 reference "sub:I18n"
16367 \begin_layout Description
16368 \begin_inset Flex Code
16371 \begin_layout Plain Layout
16378 \begin_inset Flex Code
16381 \begin_layout Plain Layout
16387 ] The color for the inset's background.
16389 \begin_inset CommandInset ref
16391 reference "chap:Names-of-colors"
16395 for a list of the available color names.
16398 \begin_layout Description
16399 \begin_inset Flex Code
16402 \begin_layout Plain Layout
16409 \begin_inset Flex Code
16412 \begin_layout Plain Layout
16421 \begin_inset space \thinspace{}
16425 \begin_inset Flex Code
16428 \begin_layout Plain Layout
16434 ] Whether to use the content of the inset as the label, when the inset is
16439 \begin_layout Description
16440 \begin_inset Flex Code
16443 \begin_layout Plain Layout
16450 \begin_inset Flex Code
16453 \begin_layout Plain Layout
16459 ] As with paragraph styles, see
16460 \begin_inset CommandInset ref
16462 reference "sub:Paragraph-Styles"
16467 Note that you need to specify the complete type, e.
16468 \begin_inset space \thinspace{}
16472 \begin_inset space ~
16476 \begin_inset Flex Code
16479 \begin_layout Plain Layout
16480 CopyStyle Flex:<name>
16488 \begin_layout Description
16489 \begin_inset Flex Code
16492 \begin_layout Plain Layout
16499 \begin_inset Flex Code
16502 \begin_layout Plain Layout
16511 \begin_inset space \thinspace{}
16515 \begin_inset Flex Code
16518 \begin_layout Plain Layout
16524 ] Indicates whether the user may employ the Paragraph Settings dialog to
16525 customize the paragraph.
16528 \begin_layout Description
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16539 \begin_inset Flex Code
16542 \begin_layout Plain Layout
16549 \begin_inset Flex Code
16552 \begin_layout Plain Layout
16559 \begin_inset Flex Code
16562 \begin_layout Plain Layout
16568 , describing the rendering style used for the inset's frame and buttons.
16569 Footnotes generally use
16570 \begin_inset Flex Code
16573 \begin_layout Plain Layout
16579 , ERT insets generally
16580 \begin_inset Flex Code
16583 \begin_layout Plain Layout
16589 , and character styles
16590 \begin_inset Flex Code
16593 \begin_layout Plain Layout
16602 \begin_layout Description
16603 \begin_inset Flex Code
16606 \begin_layout Plain Layout
16613 \begin_inset Flex Code
16616 \begin_layout Plain Layout
16625 \begin_inset space \thinspace{}
16631 \begin_inset Flex Code
16634 \begin_layout Plain Layout
16643 \begin_inset Flex Code
16646 \begin_layout Plain Layout
16653 \begin_inset Flex Code
16656 \begin_layout Plain Layout
16663 Indicates whether the environment will stand on its own in the output or
16664 will appear inline with the surrounding text.
16665 If set to false, it is supposed that the LaTeX environment ignores white
16666 space (including one newline character) after the
16667 \begin_inset Flex Code
16670 \begin_layout Plain Layout
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16702 \begin_layout Description
16703 \begin_inset Flex Code
16706 \begin_layout Plain Layout
16712 Required at the end of the
16713 \begin_inset Flex Code
16716 \begin_layout Plain Layout
16725 \begin_layout Description
16726 \begin_inset Flex Code
16729 \begin_layout Plain Layout
16735 The font used for both the text body
16741 \begin_inset CommandInset ref
16743 reference "sub:Font-description"
16748 Note that defining this font automatically defines the
16749 \begin_inset Flex Code
16752 \begin_layout Plain Layout
16758 to the same value, so define this first and define
16759 \begin_inset Flex Code
16762 \begin_layout Plain Layout
16768 later if you want them to be different.
16771 \begin_layout Description
16772 \begin_inset Flex Code
16775 \begin_layout Plain Layout
16776 ForceLocalFontSwitch
16782 \begin_inset Flex Code
16785 \begin_layout Plain Layout
16794 \begin_inset space \thinspace{}
16798 \begin_inset Flex Code
16801 \begin_layout Plain Layout
16807 ] When using babel, always use a local font switch (
16808 \begin_inset Flex Code
16811 \begin_layout Plain Layout
16819 ), never a global one (such as
16820 \begin_inset Flex Code
16823 \begin_layout Plain Layout
16834 \begin_layout Description
16835 \begin_inset Flex Code
16838 \begin_layout Plain Layout
16845 \begin_inset Flex Code
16848 \begin_layout Plain Layout
16857 \begin_inset space \thinspace{}
16861 \begin_inset Flex Code
16864 \begin_layout Plain Layout
16871 \begin_inset Quotes eld
16875 \begin_inset Quotes erd
16878 language, leading to Left-to-Right (Latin) output, e.
16879 \begin_inset space \thinspace{}
16883 \begin_inset space \space{}
16886 in TeX code or URL.
16890 \begin_layout Description
16891 \begin_inset Flex Code
16894 \begin_layout Plain Layout
16901 \begin_inset Flex Code
16904 \begin_layout Plain Layout
16913 \begin_inset space \thinspace{}
16917 \begin_inset Flex Code
16920 \begin_layout Plain Layout
16926 ] Indicates whether the
16927 \begin_inset Flex Code
16930 \begin_layout Plain Layout
16936 should be used or, instead, the user can change the paragraph style used
16941 \begin_layout Description
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16952 \begin_inset Flex Code
16955 \begin_layout Plain Layout
16964 \begin_inset space \thinspace{}
16968 \begin_inset Flex Code
16971 \begin_layout Plain Layout
16977 ] As with paragraph styles, see
16978 \begin_inset CommandInset ref
16980 reference "sub:Paragraph-Styles"
16987 \begin_layout Description
16988 \begin_inset Flex Code
16991 \begin_layout Plain Layout
16997 These tags control the XHTML output.
16999 \begin_inset CommandInset ref
17001 reference "sec:Tags-for-XHTML"
17008 \begin_layout Description
17009 \begin_inset Flex Code
17012 \begin_layout Plain Layout
17019 \begin_inset Flex Code
17022 \begin_layout Plain Layout
17031 \begin_inset space \thinspace{}
17035 \begin_inset Flex Code
17038 \begin_layout Plain Layout
17044 ] Whether to include the contents of this inset in the strings generated
17045 for the `Outline' pane.
17046 One would not, for example, want the content of a footnote in a section
17047 header to be included in the TOC displayed in the outline, but one would
17048 normally want the content of a character style displayed.
17049 Default is false: not to include.
17052 \begin_layout Description
17053 \begin_inset Flex Code
17056 \begin_layout Plain Layout
17065 \begin_inset Flex Code
17068 \begin_layout Plain Layout
17077 \begin_inset space \thinspace{}
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17090 ] As with paragraph styles, see
17091 \begin_inset CommandInset ref
17093 reference "sub:Paragraph-Styles"
17100 \begin_layout Description
17101 \begin_inset Flex Code
17104 \begin_layout Plain Layout
17110 The font used for the label.
17112 \begin_inset CommandInset ref
17114 reference "sub:Font-description"
17119 Note that this definition can never appear before
17120 \begin_inset Flex Code
17123 \begin_layout Plain Layout
17129 , lest it be ineffective.
17132 \begin_layout Description
17133 \begin_inset Flex Code
17136 \begin_layout Plain Layout
17143 \begin_inset Flex Code
17146 \begin_layout Plain Layout
17153 \begin_inset Quotes erd
17157 \begin_inset Quotes erd
17160 ] What will be displayed on the button or elsewhere as the inset label.
17162 \begin_inset Flex Code
17165 \begin_layout Plain Layout
17172 \begin_inset Flex Code
17175 \begin_layout Plain Layout
17181 ) modify this label on the fly.
17184 \begin_layout Description
17185 \begin_inset Flex Code
17188 \begin_layout Plain Layout
17194 Language dependent preamble; see
17195 \begin_inset CommandInset ref
17197 reference "sub:I18n"
17204 \begin_layout Description
17205 \begin_inset Flex Code
17208 \begin_layout Plain Layout
17215 \begin_inset Flex Code
17218 \begin_layout Plain Layout
17224 ] The name of the corresponding LaTeX stuff.
17225 Either the environment or command name.
17228 \begin_layout Description
17229 \begin_inset Flex Code
17232 \begin_layout Plain Layout
17239 \begin_inset Flex Code
17242 \begin_layout Plain Layout
17248 ] The optional parameter for the corresponding
17249 \begin_inset Flex Code
17252 \begin_layout Plain Layout
17258 stuff, including possible bracket pairs like
17259 \begin_inset Flex Code
17262 \begin_layout Plain Layout
17269 This parameter cannot be changed from within LyX (use
17270 \begin_inset Flex Code
17273 \begin_layout Plain Layout
17279 for customizable parameters).
17280 It will be output as is after all LaTeX
17281 \begin_inset Flex Code
17284 \begin_layout Plain Layout
17293 \begin_layout Description
17294 \begin_inset Flex Code
17297 \begin_layout Plain Layout
17304 \begin_inset Flex Code
17307 \begin_layout Plain Layout
17308 Command, Environment, None
17313 ] How the style should be translated into LaTeX.
17317 \begin_layout Plain Layout
17318 \begin_inset Flex Code
17321 \begin_layout Plain Layout
17327 is perhaps a bit misleading, since these rules apply to SGML classes too.
17328 Visit the SGML class files for specific examples.
17337 \begin_layout Description
17338 \begin_inset Flex Code
17341 \begin_layout Plain Layout
17347 means nothing special
17350 \begin_layout Description
17351 \begin_inset Flex Code
17354 \begin_layout Plain Layout
17361 \begin_inset Flex Code
17364 \begin_layout Plain Layout
17371 {\SpecialChar \ldots{}
17380 \begin_layout Description
17381 \begin_inset Flex Code
17384 \begin_layout Plain Layout
17391 \begin_inset Flex Code
17394 \begin_layout Plain Layout
17401 }\SpecialChar \ldots{}
17416 \begin_layout Standard
17417 Putting the last few things together, the LaTeX output will be either:
17420 \begin_layout LyX-Code
17423 LatexName[LatexParam]{\SpecialChar \ldots{}
17427 \begin_layout Standard
17431 \begin_layout LyX-Code
17434 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17440 \begin_layout Standard
17441 depending upon the LaTeX type.
17445 \begin_layout Description
17446 \begin_inset Flex Code
17449 \begin_layout Plain Layout
17456 \begin_inset Flex Code
17459 \begin_layout Plain Layout
17465 ] A string that is put at the beginning of the layout content.
17466 A line break in the output can be indicated by
17467 \begin_inset Flex Code
17470 \begin_layout Plain Layout
17479 \begin_layout Description
17480 \begin_inset Flex Code
17483 \begin_layout Plain Layout
17490 \begin_inset Flex Code
17493 \begin_layout Plain Layout
17500 \begin_inset Flex Code
17503 \begin_layout Plain Layout
17510 \begin_inset Flex Code
17513 \begin_layout Plain Layout
17520 \begin_inset Flex Code
17523 \begin_layout Plain Layout
17529 (indicating a dummy definition ending definitions of charstyles, etc).
17530 This entry is required in and is only meaningful for Flex insets.
17531 Among other things, it determines on which menu this inset will appear.
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17543 \begin_inset Flex Code
17546 \begin_layout Plain Layout
17552 will automatically set
17553 \begin_inset Flex Code
17556 \begin_layout Plain Layout
17564 \begin_inset Flex Code
17567 \begin_layout Plain Layout
17573 can be set to true for
17574 \begin_inset Flex Code
17577 \begin_layout Plain Layout
17583 insets by setting it
17588 \begin_inset Flex Code
17591 \begin_layout Plain Layout
17600 \begin_layout Description
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17611 \begin_inset Flex Code
17614 \begin_layout Plain Layout
17623 \begin_inset space \thinspace{}
17627 \begin_inset Flex Code
17630 \begin_layout Plain Layout
17636 ] Whether multiple paragraphs are permitted in this inset.
17638 \begin_inset Flex Code
17641 \begin_layout Plain Layout
17647 to the same value and
17648 \begin_inset Flex Code
17651 \begin_layout Plain Layout
17657 to the opposite value.
17658 These can be reset to other values, if they are used
17663 \begin_inset Flex Code
17666 \begin_layout Plain Layout
17676 \begin_layout Description
17677 \begin_inset Flex Code
17680 \begin_layout Plain Layout
17687 \begin_inset Flex Code
17690 \begin_layout Plain Layout
17699 \begin_inset space \thinspace{}
17703 \begin_inset Flex Code
17706 \begin_layout Plain Layout
17712 ] Whether fragile commands in this inset should be
17713 \begin_inset Flex Code
17716 \begin_layout Plain Layout
17729 whether the command should itself be protected.) Default is false.
17732 \begin_layout Description
17733 \begin_inset Flex Code
17736 \begin_layout Plain Layout
17743 \begin_inset Flex Code
17746 \begin_layout Plain Layout
17752 ] Deletes an existing
17753 \begin_inset Flex Code
17756 \begin_layout Plain Layout
17765 \begin_layout Description
17766 \begin_inset Flex Code
17769 \begin_layout Plain Layout
17776 \begin_inset Flex Code
17779 \begin_layout Plain Layout
17788 \begin_inset space \thinspace{}
17792 \begin_inset Flex Code
17795 \begin_layout Plain Layout
17801 ] As with paragraph styles, see
17802 \begin_inset CommandInset ref
17804 reference "sub:Paragraph-Styles"
17812 \begin_layout Description
17813 \begin_inset Flex Code
17816 \begin_layout Plain Layout
17823 \begin_inset Flex Code
17826 \begin_layout Plain Layout
17835 \begin_inset space \thinspace{}
17839 \begin_inset Flex Code
17842 \begin_layout Plain Layout
17848 ] As with paragraph styles, see
17849 \begin_inset CommandInset ref
17851 reference "sub:Paragraph-Styles"
17859 \begin_layout Description
17860 \begin_inset Flex Code
17863 \begin_layout Plain Layout
17869 As with paragraph styles, see
17870 \begin_inset CommandInset ref
17872 reference "sub:Paragraph-Styles"
17879 \begin_layout Description
17880 \begin_inset Flex Code
17883 \begin_layout Plain Layout
17890 \begin_inset Flex Code
17893 \begin_layout Plain Layout
17899 ] The prefix to use when creating labels referring to insets of this type.
17900 This allows the use of formatted references.
17903 \begin_layout Description
17904 \begin_inset Flex Code
17907 \begin_layout Plain Layout
17914 \begin_inset Flex Code
17917 \begin_layout Plain Layout
17923 ] As with paragraph styles, see
17924 \begin_inset CommandInset ref
17926 reference "sub:Paragraph-Styles"
17933 \begin_layout Description
17934 \begin_inset Flex Code
17937 \begin_layout Plain Layout
17944 \begin_inset Flex Code
17947 \begin_layout Plain Layout
17956 \begin_inset space \thinspace{}
17960 \begin_inset Flex Code
17963 \begin_layout Plain Layout
17969 ] Resets the LaTeX arguments of this layout (as defined via the
17970 \begin_inset Flex Code
17973 \begin_layout Plain Layout
17980 This is useful if you have copied a style via
17981 \begin_inset Flex Code
17984 \begin_layout Plain Layout
17990 , but you do not want to inherit its (required and optional) arguments.
17993 \begin_layout Description
17994 \begin_inset Flex Code
17997 \begin_layout Plain Layout
18004 \begin_inset Flex Code
18007 \begin_layout Plain Layout
18014 \begin_inset space \thinspace{}
18018 \begin_inset Flex Code
18021 \begin_layout Plain Layout
18029 ] Whether this inset should use the font of its surrounding environment
18031 Default is true: uses its own.
18034 \begin_layout Description
18035 \begin_inset Flex Code
18038 \begin_layout Plain Layout
18045 \begin_inset Flex Code
18048 \begin_layout Plain Layout
18054 ] A string that is put at the end of the layout content.
18055 A line break in the output can be indicated by
18056 \begin_inset Flex Code
18059 \begin_layout Plain Layout
18068 \begin_layout Description
18069 \begin_inset Flex Code
18072 \begin_layout Plain Layout
18079 \begin_inset Flex Code
18082 \begin_layout Plain Layout
18089 \begin_inset space \thinspace{}
18093 \begin_inset Flex Code
18096 \begin_layout Plain Layout
18104 ] Allow spell-checking the contents of this inset.
18108 \begin_layout Subsection
18110 \begin_inset CommandInset label
18112 name "sub:Counters"
18119 \begin_layout Standard
18120 It is necessary to define the counters (
18121 \begin_inset Flex MenuItem
18124 \begin_layout Plain Layout
18131 \begin_inset Flex MenuItem
18134 \begin_layout Plain Layout
18140 , \SpecialChar \ldots{}
18141 ) in the text class itself.
18142 The standard counters are defined in the file
18143 \begin_inset Flex Code
18146 \begin_layout Plain Layout
18152 , so you may have to do no more than add
18155 \begin_layout LyX-Code
18156 Input stdcounters.inc
18159 \begin_layout Standard
18160 to your layout file to get them to work.
18161 But if you want to define custom counters, then you can do so.
18162 The counter declaration must begin with:
18165 \begin_layout LyX-Code
18166 Counter CounterName
18169 \begin_layout Standard
18171 \begin_inset Flex Code
18174 \begin_layout Plain Layout
18180 ' is replaced by the name of the counter.
18181 And it must end with
18182 \begin_inset Quotes eld
18186 \begin_inset Flex Code
18189 \begin_layout Plain Layout
18196 \begin_inset Quotes erd
18200 The following parameters can also be used:
18203 \begin_layout Description
18204 \begin_inset Flex Code
18207 \begin_layout Plain Layout
18214 \begin_inset Flex Code
18217 \begin_layout Plain Layout
18223 ] Sets the initial value for the counter, to which it will be reset whenever
18225 Normally, one will want the default, 1.
18228 \begin_layout Description
18229 \begin_inset Flex Code
18232 \begin_layout Plain Layout
18239 \begin_inset Flex Code
18242 \begin_layout Plain Layout
18249 \begin_inset Quotes erd
18253 \begin_inset Quotes erd
18256 ] When defined, this string defines how the counter is displayed.
18257 Setting this value sets
18258 \begin_inset Flex Code
18261 \begin_layout Plain Layout
18262 LabelStringAppendix
18268 The following special constructs can be used in the string:
18272 \begin_layout Itemize
18273 \begin_inset Flex Code
18276 \begin_layout Plain Layout
18284 will be replaced by the expansion of the
18285 \begin_inset Flex Code
18288 \begin_layout Plain Layout
18295 \begin_inset Flex Code
18298 \begin_layout Plain Layout
18299 LabelStringAppendix
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18318 \begin_layout Itemize
18319 counter values can be expressed using LaTeX-like macros
18320 \begin_inset Newline newline
18324 \begin_inset Flex Code
18327 \begin_layout Plain Layout
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18359 \begin_layout Plain Layout
18369 Actually, the situation is a bit more complicated: any
18388 other than those described below will produce arabic numerals.
18389 It would not be surprising to see this change in the future.
18395 \begin_inset Flex Code
18398 \begin_layout Plain Layout
18404 : 1, 2, 3,\SpecialChar \ldots{}
18406 \begin_inset Flex Code
18409 \begin_layout Plain Layout
18415 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18417 \begin_inset Flex Code
18420 \begin_layout Plain Layout
18426 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18428 \begin_inset Flex Code
18431 \begin_layout Plain Layout
18437 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18439 \begin_inset Flex Code
18442 \begin_layout Plain Layout
18448 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18450 \begin_inset Flex Code
18453 \begin_layout Plain Layout
18459 for hebrew numerals.
18463 \begin_layout Standard
18464 If LabelString is not defined, a default value is constructed as follows:
18465 if the counter has a master counter
18466 \begin_inset Flex Code
18469 \begin_layout Plain Layout
18476 \begin_inset Flex Code
18479 \begin_layout Plain Layout
18486 \begin_inset Newline newline
18490 \begin_inset Flex Code
18493 \begin_layout Plain Layout
18503 is used; otherwise the string
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18518 \begin_layout Description
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18523 LabelStringAppendix
18529 \begin_inset Flex Code
18532 \begin_layout Plain Layout
18539 \begin_inset Quotes erd
18543 \begin_inset Quotes erd
18547 \begin_inset Flex Code
18550 \begin_layout Plain Layout
18556 , but for use in the Appendix.
18559 \begin_layout Description
18560 \begin_inset Flex Code
18563 \begin_layout Plain Layout
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18580 \begin_inset Quotes erd
18584 \begin_inset Quotes erd
18587 ] A format for use with formatted references to this counter.
18588 For example, one might want to have references to section numbers appear
18590 \begin_inset Quotes eld
18594 \begin_inset Quotes erd
18598 The string should contain
18599 \begin_inset Quotes eld
18603 \begin_inset Quotes erd
18607 This will be replaced by the counter number itself.
18608 So, for sections, it would be: Section ##.
18611 \begin_layout Description
18612 \begin_inset Flex Code
18615 \begin_layout Plain Layout
18622 \begin_inset Flex Code
18625 \begin_layout Plain Layout
18632 \begin_inset Quotes erd
18636 \begin_inset Quotes erd
18639 ] If this is set to the name of another counter, the present counter will
18640 be reset every time the other one is increased.
18642 \begin_inset Flex Code
18645 \begin_layout Plain Layout
18652 \begin_inset Flex Code
18655 \begin_layout Plain Layout
18664 \begin_layout Subsection
18666 \begin_inset CommandInset label
18668 name "sub:Font-description"
18675 \begin_layout Standard
18676 A font description looks like this:
18679 \begin_layout LyX-Code
18693 \begin_layout LyX-Code
18697 \begin_layout LyX-Code
18701 \begin_layout Standard
18702 The following commands are available:
18705 \begin_layout Description
18706 \begin_inset Flex Code
18709 \begin_layout Plain Layout
18716 \begin_inset Flex Code
18719 \begin_layout Plain Layout
18728 \begin_inset Flex Code
18731 \begin_layout Plain Layout
18738 \begin_inset Flex Code
18741 \begin_layout Plain Layout
18748 \begin_inset Flex Code
18751 \begin_layout Plain Layout
18758 \begin_inset Flex Code
18761 \begin_layout Plain Layout
18768 \begin_inset Flex Code
18771 \begin_layout Plain Layout
18778 \begin_inset Flex Code
18781 \begin_layout Plain Layout
18788 \begin_inset Flex Code
18791 \begin_layout Plain Layout
18798 \begin_inset Flex Code
18801 \begin_layout Plain Layout
18810 \begin_layout Description
18811 \begin_inset Flex Code
18814 \begin_layout Plain Layout
18821 \begin_inset Flex Code
18824 \begin_layout Plain Layout
18833 \begin_inset Flex Code
18836 \begin_layout Plain Layout
18843 \begin_inset Flex Code
18846 \begin_layout Plain Layout
18855 \begin_layout Description
18856 \begin_inset Flex Code
18859 \begin_layout Plain Layout
18866 \begin_inset Flex Code
18869 \begin_layout Plain Layout
18875 ] Valid arguments are:
18876 \begin_inset Flex Code
18879 \begin_layout Plain Layout
18886 \begin_inset Flex Code
18889 \begin_layout Plain Layout
18896 \begin_inset Flex Code
18899 \begin_layout Plain Layout
18906 \begin_inset Flex Code
18909 \begin_layout Plain Layout
18916 \begin_inset Flex Code
18919 \begin_layout Plain Layout
18926 \begin_inset Flex Code
18929 \begin_layout Plain Layout
18936 \begin_inset Flex Code
18939 \begin_layout Plain Layout
18946 \begin_inset Flex Code
18949 \begin_layout Plain Layout
18956 \begin_inset Flex Code
18959 \begin_layout Plain Layout
18966 \begin_inset Flex Code
18969 \begin_layout Plain Layout
18976 \begin_inset Flex Code
18979 \begin_layout Plain Layout
18986 \begin_inset Flex Code
18989 \begin_layout Plain Layout
18996 Each of these turns on or off the corresponding attribute.
18998 \begin_inset Flex Code
19001 \begin_layout Plain Layout
19007 turns on emphasis, and
19008 \begin_inset Flex Code
19011 \begin_layout Plain Layout
19019 \begin_inset Newline newline
19022 If the latter seems puzzling, remember that the font settings for the present
19023 context are generally inherited from the surrounding context.
19025 \begin_inset Flex Code
19028 \begin_layout Plain Layout
19034 would turn off the emphasis that was anyway in effect, say, in a theorem
19038 \begin_layout Description
19039 \begin_inset Flex Code
19042 \begin_layout Plain Layout
19049 \begin_inset Flex Code
19052 \begin_layout Plain Layout
19061 \begin_inset Flex Code
19064 \begin_layout Plain Layout
19073 \begin_layout Description
19074 \begin_inset Flex Code
19077 \begin_layout Plain Layout
19084 \begin_inset Flex Code
19087 \begin_layout Plain Layout
19096 \begin_inset Flex Code
19099 \begin_layout Plain Layout
19106 \begin_inset Flex Code
19109 \begin_layout Plain Layout
19116 \begin_inset Flex Code
19119 \begin_layout Plain Layout
19128 \begin_layout Description
19129 \begin_inset Flex Code
19132 \begin_layout Plain Layout
19139 \begin_inset Flex Code
19142 \begin_layout Plain Layout
19149 \begin_inset Flex Code
19152 \begin_layout Plain Layout
19159 \begin_inset Flex Code
19162 \begin_layout Plain Layout
19171 \begin_inset Flex Code
19174 \begin_layout Plain Layout
19181 \begin_inset Flex Code
19184 \begin_layout Plain Layout
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19201 \begin_inset Flex Code
19204 \begin_layout Plain Layout
19211 \begin_inset Flex Code
19214 \begin_layout Plain Layout
19223 \begin_layout Subsection
19224 \begin_inset CommandInset label
19226 name "sub:Citation-format-description"
19230 Citation format description
19233 \begin_layout Standard
19235 \begin_inset Flex Code
19238 \begin_layout Plain Layout
19244 blocks are used to describe how bibliographic information should be displayed,
19245 both within LyX itself (in the citation dialog and in tooltips, for example)
19246 and in XHTML output.
19247 Such a block might look like this:
19250 \begin_layout LyX-Code
19254 \begin_layout LyX-Code
19258 \begin_layout LyX-Code
19262 \begin_layout LyX-Code
19266 \begin_layout Standard
19267 The individual lines define how the bibliographic information associated
19268 with an article or book, respectively, is to be displayed, and such a definitio
19269 n can be given for any `entry type' that might be present in a BibTeX file.
19270 LyX defines a default format in the source code that will be used if no
19271 specific definition has been given.
19272 LyX predefines several formats in the file
19273 \begin_inset Flex Code
19276 \begin_layout Plain Layout
19282 , which is included in most of LyX's document classes.
19285 \begin_layout Standard
19286 The definitions use a simple language that allows BibTeX keys to be replaced
19288 Keys should be enclosed in
19289 \begin_inset Flex Code
19292 \begin_layout Plain Layout
19299 \begin_inset Flex Code
19302 \begin_layout Plain Layout
19309 So a simple definition might look like this:
19312 \begin_layout LyX-Code
19314 \begin_inset Quotes eld
19318 \begin_inset Quotes erd
19324 \begin_layout Standard
19325 This would print the author, followed by a comma, followed by the title,
19326 in quotes, followed by a period.
19329 \begin_layout Standard
19330 Of course, sometimes you may want to print a key only if it exists.
19331 This can be done by using a conditional construction, such as:
19332 \begin_inset Flex Code
19335 \begin_layout Plain Layout
19337 \begin_inset space ~
19347 \begin_inset Flex Code
19350 \begin_layout Plain Layout
19356 key exists, then print
19357 \begin_inset Quotes eld
19361 \begin_inset space ~
19365 \begin_inset Quotes erd
19368 followed by the volume key.
19369 It is also possible to have an else clause in the conditional, such as:
19370 \begin_inset Newline newline
19374 \begin_inset Flex Code
19377 \begin_layout Plain Layout
19378 {%author%[[%author%]][[%editor%, ed.]]}
19384 \begin_inset Newline newline
19388 \begin_inset Flex Code
19391 \begin_layout Plain Layout
19397 key is printed if it exists; otherwise, the editor key is printed, followed
19399 \begin_inset Quotes eld
19403 \begin_inset space ~
19407 \begin_inset Quotes erd
19410 Note that the key is again enclosed in
19411 \begin_inset Flex Code
19414 \begin_layout Plain Layout
19420 signs; the entire conditional is enclosed in braces; and the if and else
19421 clauses are enclosed in double brackets,
19422 \begin_inset Quotes eld
19426 \begin_inset Flex Code
19429 \begin_layout Plain Layout
19436 \begin_inset Quotes eld
19440 \begin_inset Quotes eld
19444 \begin_inset Flex Code
19447 \begin_layout Plain Layout
19454 \begin_inset Quotes erd
19458 There must be no space between any of these.
19461 \begin_layout Standard
19462 There is one other piece of syntax available in definitions, which looks
19464 \begin_inset Flex Code
19467 \begin_layout Plain Layout
19474 This defines a piece of formatting information that is to be used when
19476 \begin_inset Quotes eld
19480 \begin_inset Quotes erd
19484 Obviously, we do not want to output HTML tags when writing plain text,
19485 so they should be wrapped in
19486 \begin_inset Quotes eld
19490 \begin_inset Quotes erd
19494 \begin_inset Quotes eld
19498 \begin_inset Quotes erd
19504 \begin_layout Standard
19505 Two special sorts of definitions are also possible in a
19506 \begin_inset Flex Code
19509 \begin_layout Plain Layout
19516 An example of the first would be:
19519 \begin_layout LyX-Code
19521 \begin_inset Quotes eld
19525 \begin_inset Quotes erd
19531 \begin_layout Standard
19532 This is an abbreviation, or macro, and it can be used by treating it as
19534 \begin_inset Flex Code
19537 \begin_layout Plain Layout
19545 \begin_inset Flex Code
19548 \begin_layout Plain Layout
19554 exactly as it would treat its definition.
19555 So, let us issue the obvious
19563 \begin_layout LyX-Code
19567 \begin_layout Standard
19568 or anything like it.
19569 LyX shouldn't go into an infinite loop, but it may go into a long one before
19573 \begin_layout Standard
19574 The second sort of special definition might look like this:
19577 \begin_layout LyX-Code
19581 \begin_layout Standard
19582 This defines a translatable piece of text, which allows relevant parts of
19583 the bibliography to be translated.
19584 It can be included in a definition by treating it as a key:
19585 \begin_inset Flex Code
19588 \begin_layout Plain Layout
19595 Several of these are predefined in
19596 \begin_inset Flex Code
19599 \begin_layout Plain Layout
19606 Note that these are not macros, in the sense just defined.
19607 They will not be expanded.
19610 \begin_layout Standard
19611 So here then is an example that use all these features:
19612 \begin_inset VSpace defskip
19618 \begin_layout Standard
19622 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19625 \begin_layout Standard
19626 \begin_inset VSpace defskip
19629 This defines a macro that prints the author, followed by a comma, if the
19631 \begin_inset Flex Code
19634 \begin_layout Plain Layout
19640 key is defined, or else prints the name of the editor, followed by the
19642 \begin_inset Flex Code
19645 \begin_layout Plain Layout
19651 or its translation (it is by default
19652 \begin_inset Quotes eld
19656 \begin_inset Quotes erd
19660 \begin_inset Flex Code
19663 \begin_layout Plain Layout
19670 Note that this is in fact defined in
19671 \begin_inset Flex Code
19674 \begin_layout Plain Layout
19680 , so you can use it in your own definitions, or re-definitions, if you load
19684 \begin_layout Section
19685 \begin_inset CommandInset label
19687 name "sec:Tags-for-XHTML"
19691 Tags for XHTML output
19694 \begin_layout Standard
19695 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
19696 by layout information.
19697 In general, LyX provides sensible defaults and, as mentioned earlier, it
19698 will even construct default CSS style rules from the other layout tags.
19699 For example, LyX will attempt to use the information provided in the
19700 \begin_inset Flex Code
19703 \begin_layout Plain Layout
19709 declaration for the Chapter style to write CSS that will appropriately
19710 format chapter headings.
19713 \begin_layout Standard
19714 In many cases, then, you may not have to do anything at all to get acceptable
19715 XHTML output for your own environments, custom insets, and so forth.
19716 But in some cases you will, and so LyX provides a number of layout tags
19717 that can be used to customize the XHTML and CSS that are generated.
19720 \begin_layout Standard
19721 Note that there are two tags,
19722 \begin_inset Flex Code
19725 \begin_layout Plain Layout
19732 \begin_inset Flex Code
19735 \begin_layout Plain Layout
19741 that may appear outside style and inset declarations.
19743 \begin_inset CommandInset ref
19745 reference "sub:General-text-class"
19749 for details on these.
19752 \begin_layout Subsection
19753 \begin_inset CommandInset label
19755 name "sub:Paragraph-Style-XHTML"
19762 \begin_layout Standard
19763 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
19764 dealing with a normal paragraph, a command, or an environment, where this
19765 is itself determined by the contents of the corresponding
19766 \begin_inset Flex Code
19769 \begin_layout Plain Layout
19779 \begin_layout Standard
19780 For a command or normal paragraph, the output XHTML has the following form:
19783 \begin_layout LyX-Code
19785 \begin_inset Quotes erd
19789 \begin_inset Quotes erd
19795 \begin_layout LyX-Code
19797 \begin_inset Quotes erd
19801 \begin_inset Quotes erd
19807 \begin_layout LyX-Code
19808 Contents of the paragraph.
19811 \begin_layout LyX-Code
19815 \begin_layout Standard
19816 The label tags are of course omitted if the paragraph does not have a label.
19819 \begin_layout Standard
19820 For an environment that is not some sort of list, the XHTML takes this form:
19823 \begin_layout LyX-Code
19825 \begin_inset Quotes erd
19829 \begin_inset Quotes erd
19835 \begin_layout LyX-Code
19837 \begin_inset Quotes erd
19841 \begin_inset Quotes erd
19845 \begin_inset Quotes erd
19849 \begin_inset Quotes erd
19852 >Environment Label</labeltag>First paragraph.</itemtag>
19855 \begin_layout LyX-Code
19856 <itemtag>Second paragraph.</itemtag>
19859 \begin_layout LyX-Code
19863 \begin_layout Standard
19864 Note that the label is output only for the first paragraph, as it should
19865 be for a theorem, for example.
19869 \begin_layout Standard
19870 For a list, we have one of these forms:
19873 \begin_layout LyX-Code
19875 \begin_inset Quotes erd
19879 \begin_inset Quotes erd
19885 \begin_layout LyX-Code
19887 \begin_inset Quotes erd
19891 \begin_inset Quotes erd
19895 \begin_inset Quotes erd
19899 \begin_inset Quotes erd
19902 >List Label</labeltag>First item.</itemtag>
19905 \begin_layout LyX-Code
19907 \begin_inset Quotes erd
19911 \begin_inset Quotes erd
19915 \begin_inset Quotes erd
19919 \begin_inset Quotes erd
19922 >List Label</labeltag>Second item.</itemtag>
19925 \begin_layout LyX-Code
19929 \begin_layout LyX-Code
19933 \begin_layout LyX-Code
19935 \begin_inset Quotes erd
19939 \begin_inset Quotes erd
19945 \begin_layout LyX-Code
19947 \begin_inset Quotes erd
19951 \begin_inset Quotes erd
19954 >List Label</labeltag><itemtag attr=
19955 \begin_inset Quotes erd
19959 \begin_inset Quotes erd
19962 >First item.</itemtag>
19965 \begin_layout LyX-Code
19967 \begin_inset Quotes erd
19971 \begin_inset Quotes erd
19974 >List Label</labeltag><itemtag attr=
19975 \begin_inset Quotes erd
19979 \begin_inset Quotes erd
19982 >Second item.</itemtag>
19985 \begin_layout LyX-Code
19989 \begin_layout Standard
19990 Note the different orders of
19991 \begin_inset Flex Code
19994 \begin_layout Plain Layout
20001 \begin_inset Flex Code
20004 \begin_layout Plain Layout
20011 Which order we get depends upon the setting of
20012 \begin_inset Flex Code
20015 \begin_layout Plain Layout
20022 \begin_inset Flex Code
20025 \begin_layout Plain Layout
20031 is false (the default), you get the first of these, with the label within
20032 the item; if true, you get the second, with the label outside the item.
20035 \begin_layout Standard
20036 The specific tags and attributes output for each paragraph type can be controlle
20037 d by means of the layout tags we are about to describe.
20038 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20039 so you often may not need to do very much to get good XHTML output.
20040 Think of the available tags as there so you can tweak things to your liking.
20043 \begin_layout Description
20044 \begin_inset Flex Code
20047 \begin_layout Plain Layout
20054 \begin_inset Flex Code
20057 \begin_layout Plain Layout
20063 ] Specifies attribute information to be output with the main tag.
20065 \begin_inset Quotes eld
20069 \begin_inset Flex Code
20072 \begin_layout Plain Layout
20079 \begin_inset Quotes erd
20083 By default, LyX will output
20084 \begin_inset Quotes eld
20088 \begin_inset Flex Code
20091 \begin_layout Plain Layout
20098 \begin_inset Quotes erd
20102 \begin_inset Flex Code
20105 \begin_layout Plain Layout
20111 is the LyX name of the layout, made lowercase, for example: chapter.
20116 contain any style information.
20118 \begin_inset Flex Code
20121 \begin_layout Plain Layout
20130 \begin_layout Description
20131 \begin_inset Flex Code
20134 \begin_layout Plain Layout
20141 \begin_inset Flex Code
20144 \begin_layout Plain Layout
20154 ] Whether to output the default CSS information LyX generates for this layout,
20155 even if additional information is explicitly provided via
20156 \begin_inset Flex Code
20159 \begin_layout Plain Layout
20167 \begin_inset Flex Code
20170 \begin_layout Plain Layout
20176 allows you to alter or augment the generated CSS, rather than to override
20179 \begin_inset Flex Code
20182 \begin_layout Plain Layout
20191 \begin_layout Description
20192 \begin_inset Flex Code
20195 \begin_layout Plain Layout
20202 \begin_inset Flex Code
20205 \begin_layout Plain Layout
20211 ] The tag to be used for individual paragraphs of environments, replacing
20213 \begin_inset Flex Code
20216 \begin_layout Plain Layout
20222 in the examples above.
20224 \begin_inset Flex Code
20227 \begin_layout Plain Layout
20236 \begin_layout Description
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20247 \begin_inset Flex Code
20250 \begin_layout Plain Layout
20256 ] Attributes for the item tag.
20258 \begin_inset Quotes eld
20262 \begin_inset Flex Code
20265 \begin_layout Plain Layout
20266 class=`layoutname_item'
20272 \begin_inset Quotes erd
20280 contain any style information.
20282 \begin_inset Flex Code
20285 \begin_layout Plain Layout
20294 \begin_layout Description
20295 \begin_inset Flex Code
20298 \begin_layout Plain Layout
20305 \begin_inset Flex Code
20308 \begin_layout Plain Layout
20314 ] The tag to be used for paragraph and item labels, replacing
20315 \begin_inset Flex Code
20318 \begin_layout Plain Layout
20324 in the examples above.
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20336 \begin_inset Flex Code
20339 \begin_layout Plain Layout
20346 \begin_inset Flex Code
20349 \begin_layout Plain Layout
20356 \begin_inset Flex Code
20359 \begin_layout Plain Layout
20360 Centered_Top_Environment
20365 , in which case it defaults to
20366 \begin_inset Flex Code
20369 \begin_layout Plain Layout
20378 \begin_layout Description
20379 \begin_inset Flex Code
20382 \begin_layout Plain Layout
20389 \begin_inset Flex Code
20392 \begin_layout Plain Layout
20398 ] Attributes for the label tag.
20400 \begin_inset Quotes eld
20404 \begin_inset Flex Code
20407 \begin_layout Plain Layout
20408 class=`layoutname_label'
20414 \begin_inset Quotes erd
20422 contain any style information.
20424 \begin_inset Flex Code
20427 \begin_layout Plain Layout
20436 \begin_layout Description
20437 \begin_inset Flex Code
20440 \begin_layout Plain Layout
20447 \begin_inset Flex Code
20450 \begin_layout Plain Layout
20460 ] Meaningful only for list-like environments, this tag controls whether
20461 the label tag is output before or inside the item tag.
20462 This is used, for example, in the description environment, where we want
20464 \begin_inset Flex Code
20467 \begin_layout Plain Layout
20468 <dt>\SpecialChar \ldots{}
20469 </dt><dd>\SpecialChar \ldots{}
20477 \begin_inset Flex Code
20480 \begin_layout Plain Layout
20486 : The label tag is output inside the item tag.
20489 \begin_layout Description
20490 \begin_inset Flex Code
20493 \begin_layout Plain Layout
20499 Information to be output in the
20500 \begin_inset Flex Code
20503 \begin_layout Plain Layout
20509 section when this style is used.
20510 This might, for example, be used to include a
20511 \begin_inset Flex Code
20514 \begin_layout Plain Layout
20521 \begin_inset Flex Code
20524 \begin_layout Plain Layout
20533 \begin_layout Description
20534 \begin_inset Flex Code
20537 \begin_layout Plain Layout
20543 CSS style information to be included when this style is used.
20544 Note that this will automatically be wrapped in a layout-generated
20545 \begin_inset Flex Code
20548 \begin_layout Plain Layout
20554 block, so only the CSS itself need be included.
20556 \begin_inset Flex Code
20559 \begin_layout Plain Layout
20568 \begin_layout Description
20569 \begin_inset Flex Code
20572 \begin_layout Plain Layout
20579 \begin_inset Flex Code
20582 \begin_layout Plain Layout
20588 ] The tag to be used for the main label, replacing
20589 \begin_inset Flex Code
20592 \begin_layout Plain Layout
20598 in the examples above.
20600 \begin_inset Flex Code
20603 \begin_layout Plain Layout
20612 \begin_layout Description
20613 \begin_inset Flex Code
20616 \begin_layout Plain Layout
20623 \begin_inset Flex Code
20626 \begin_layout Plain Layout
20636 ] Marks this style as the one to be used to generate the
20637 \begin_inset Flex Code
20640 \begin_layout Plain Layout
20646 tag for the XHTML file.
20647 By default, it is false.
20649 \begin_inset Flex Code
20652 \begin_layout Plain Layout
20658 file sets it to true for the
20659 \begin_inset Flex Code
20662 \begin_layout Plain Layout
20672 \begin_layout Subsection
20676 \begin_layout Standard
20677 The XHTML output of insets can also be controlled by information in layout
20682 \begin_layout Plain Layout
20683 At present, this is true only for
20684 \begin_inset Quotes eld
20688 \begin_inset Quotes erd
20691 insets (insets you can type into) and is not true for
20692 \begin_inset Quotes eld
20696 \begin_inset Quotes erd
20699 insets (insets that are associated with dialog boxes).
20704 Here, too, LyX tries to provide sensible defaults, and it constructs default
20706 But everything can be customized.
20709 \begin_layout Standard
20710 The XHTML LyX outputs for an inset has the following form:
20713 \begin_layout LyX-Code
20715 \begin_inset Quotes erd
20719 \begin_inset Quotes erd
20725 \begin_layout LyX-Code
20726 <labeltag>Label</labeltag>
20729 \begin_layout LyX-Code
20731 \begin_inset Quotes erd
20735 \begin_inset Quotes erd
20738 >Contents of the inset.</innertag>
20741 \begin_layout LyX-Code
20745 \begin_layout Standard
20746 If the inset permits multiple paragraphs---that is, if
20747 \begin_inset Flex Code
20750 \begin_layout Plain Layout
20756 is true---then the contents of the inset will itself be output as paragraphs
20757 formatted according to the styles used for those paragraphs (standard,
20758 quote, and the like).
20759 The label tag is of course omitted if the paragraph does not have a label
20760 and, at present, is always
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20771 The inner tag is optional and, by default, does not appear.
20774 \begin_layout Standard
20775 The specific tags and attributes output for each inset can be controlled
20776 by means of the following layout tags.
20779 \begin_layout Description
20780 \begin_inset Flex Code
20783 \begin_layout Plain Layout
20790 \begin_inset Flex Code
20793 \begin_layout Plain Layout
20799 ] Specifies attribute information to be output with the main tag.
20801 \begin_inset Quotes eld
20805 \begin_inset Flex Code
20808 \begin_layout Plain Layout
20809 class=`myinset' onclick=`\SpecialChar \ldots{}
20816 \begin_inset Quotes erd
20820 By default, LyX will output
20821 \begin_inset Quotes eld
20825 \begin_inset Flex Code
20828 \begin_layout Plain Layout
20835 \begin_inset Quotes erd
20839 \begin_inset Flex Code
20842 \begin_layout Plain Layout
20848 is the LyX name of the inset, made lowercase and with non-alphanumeric
20849 characters converted to underscores, for example: footnote.
20852 \begin_layout Description
20853 \begin_inset Flex Code
20856 \begin_layout Plain Layout
20863 \begin_inset Flex Code
20866 \begin_layout Plain Layout
20876 ] Whether to output the default CSS information LyX generates for this layout,
20877 even if additional information is explicitly provided via
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20889 \begin_inset Flex Code
20892 \begin_layout Plain Layout
20898 allows you to alter or augment the generated CSS, rather than to override
20903 \begin_layout Description
20904 \begin_inset Flex Code
20907 \begin_layout Plain Layout
20914 \begin_inset Flex Code
20917 \begin_layout Plain Layout
20923 ] Attributes for the inner tag.
20925 \begin_inset Quotes eld
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20933 class=`insetname_inner'
20939 \begin_inset Quotes erd
20945 \begin_layout Description
20946 \begin_inset Flex Code
20949 \begin_layout Plain Layout
20956 \begin_inset Flex Code
20959 \begin_layout Plain Layout
20965 ] The inner tag, replacing
20966 \begin_inset Flex Code
20969 \begin_layout Plain Layout
20975 in the examples above.
20976 By default, there is none.
20979 \begin_layout Description
20980 \begin_inset Flex Code
20983 \begin_layout Plain Layout
20990 \begin_inset Flex Code
20993 \begin_layout Plain Layout
21001 ] Whether this inset represents a standalone block of text (such as a footnote)
21002 or instead represents material that is included in the surrounding text
21003 (such as a branch).
21007 \begin_layout Description
21008 \begin_inset Flex Code
21011 \begin_layout Plain Layout
21018 \begin_inset Flex Code
21021 \begin_layout Plain Layout
21027 ] A label for this inset, possibly including a reference to a counter.
21028 For example, for footnote, it might be:
21029 \begin_inset Flex Code
21032 \begin_layout Plain Layout
21041 This is optional, and there is no default.
21044 \begin_layout Description
21045 \begin_inset Flex Code
21048 \begin_layout Plain Layout
21054 Information to be output in the
21055 \begin_inset Flex Code
21058 \begin_layout Plain Layout
21064 section when this style is used.
21065 This might, for example, be used to include a
21066 \begin_inset Flex Code
21069 \begin_layout Plain Layout
21076 \begin_inset Flex Code
21079 \begin_layout Plain Layout
21088 \begin_layout Description
21089 \begin_inset Flex Code
21092 \begin_layout Plain Layout
21098 CSS style information to be included when this style is used.
21099 Note that this will automatically be wrapped in a layout-generated
21100 \begin_inset Flex Code
21103 \begin_layout Plain Layout
21109 block, so only the CSS itself need be included.
21112 \begin_layout Description
21113 \begin_inset Flex Code
21116 \begin_layout Plain Layout
21123 \begin_inset Flex Code
21126 \begin_layout Plain Layout
21132 ] The tag to be used for the main label, replacing
21133 \begin_inset Flex Code
21136 \begin_layout Plain Layout
21142 in the examples above.
21143 The default depends upon the setting of
21144 \begin_inset Flex Code
21147 \begin_layout Plain Layout
21154 \begin_inset Flex Code
21157 \begin_layout Plain Layout
21163 is true, the default is
21164 \begin_inset Flex Code
21167 \begin_layout Plain Layout
21173 ; if it is false, the default is
21174 \begin_inset Flex Code
21177 \begin_layout Plain Layout
21186 \begin_layout Subsection
21190 \begin_layout Standard
21191 The XHTML output for floats too can be controlled by layout information.
21192 The output has the following form:
21195 \begin_layout LyX-Code
21197 \begin_inset Quotes erd
21201 \begin_inset Quotes erd
21207 \begin_layout LyX-Code
21208 Contents of the float.
21211 \begin_layout LyX-Code
21215 \begin_layout Standard
21216 The caption, if there is one, is a separate inset and will be output as
21218 Its appearance can be controlled via the InsetLayout for caption insets.
21222 \begin_layout Description
21223 \begin_inset Flex Code
21226 \begin_layout Plain Layout
21233 \begin_inset Flex Code
21236 \begin_layout Plain Layout
21242 ] Specifies attribute information to be output with the main tag.
21244 \begin_inset Quotes eld
21248 \begin_inset Flex Code
21251 \begin_layout Plain Layout
21252 class=`myfloat' onclick=`\SpecialChar \ldots{}
21259 \begin_inset Quotes erd
21263 By default, LyX will output
21264 \begin_inset Quotes eld
21268 \begin_inset Flex Code
21271 \begin_layout Plain Layout
21272 class=`float float-floattype'
21278 \begin_inset Quotes erd
21282 \begin_inset Flex Code
21285 \begin_layout Plain Layout
21291 is LyX's name for this type of float, as determined by the float declaration
21293 \begin_inset CommandInset ref
21295 reference "sub:Floats"
21299 ), though made lowercase and with non-alphanumeric characters converted
21300 to underscores, for example: float-table.
21303 \begin_layout Description
21304 \begin_inset Flex Code
21307 \begin_layout Plain Layout
21313 CSS style information to be included when this float is used.
21314 Note that this will automatically be wrapped in a layout-generated
21315 \begin_inset Flex Code
21318 \begin_layout Plain Layout
21324 block, so only the CSS itself need be included.
21327 \begin_layout Description
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21338 \begin_inset Flex Code
21341 \begin_layout Plain Layout
21347 ] The tag to be used for this float, replacing
21348 \begin_inset Quotes eld
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21362 \begin_inset Quotes erd
21365 in the example above.
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21376 and will rarely need changing.
21379 \begin_layout Subsection
21380 Bibliography formatting
21383 \begin_layout Standard
21384 The bibliography can be formatted using
21385 \begin_inset Flex Code
21388 \begin_layout Plain Layout
21396 \begin_inset CommandInset ref
21398 reference "sub:Citation-format-description"
21405 \begin_layout Subsection
21409 \begin_layout Standard
21410 We have several times mentioned that LyX will generate default CSS style
21411 rules for both insets and paragraph styles, based upon the other layout
21412 information that is provided.
21413 In this section, we shall say a word about which layout information LyX
21417 \begin_layout Standard
21418 At present, LyX auto-generates CSS only for font information, making use
21420 \begin_inset Flex Code
21423 \begin_layout Plain Layout
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21440 \begin_inset Flex Code
21443 \begin_layout Plain Layout
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21460 \begin_inset Flex Code
21463 \begin_layout Plain Layout
21470 \begin_inset CommandInset ref
21472 reference "sub:Font-description"
21477 The translation is mostly straightforward and obvious.
21479 \begin_inset Quotes eld
21483 \begin_inset Flex Code
21486 \begin_layout Plain Layout
21493 \begin_inset Quotes erd
21497 \begin_inset Quotes eld
21501 \begin_inset Flex Code
21504 \begin_layout Plain Layout
21505 font-family: sans-serif;
21511 \begin_inset Quotes erd
21515 The correspondence of LyX sizes and CSS sizes is a little less obvious
21516 but nonetheless intuitive.
21518 \begin_inset Flex Code
21521 \begin_layout Plain Layout
21528 \begin_inset Flex URL
21531 \begin_layout Plain Layout
21541 \begin_layout Chapter
21542 Including External Material
21543 \begin_inset CommandInset label
21545 name "chap:Including-External-Material"
21552 \begin_layout Standard
21553 \begin_inset Box Shadowbox
21563 height_special "totalheight"
21566 \begin_layout Plain Layout
21567 WARNING: This portion of the documentation has not been updated for some
21569 We certainly hope that it is still accurate, but there are no guarantees.
21577 \begin_layout Standard
21578 The use of material from sources external to LyX is covered in detail in
21584 This part of the manual covers what needs to happen behind the scenes for
21585 new sorts of material to be included.
21588 \begin_layout Section
21592 \begin_layout Standard
21593 The external material feature is based on the concept of a
21598 A template is a specification of how LyX should interface with a certain
21600 As bundled, LyX comes with predefined templates for Xfig figures, various
21601 raster format images, chess diagrams, and LilyPond music notation.
21602 You can check the actual list by using the menu
21603 \begin_inset Flex MenuItem
21606 \begin_layout Plain Layout
21607 Insert\SpecialChar \menuseparator
21608 File\SpecialChar \menuseparator
21615 Furthermore, it is possible to roll your own template to support a specific
21617 Later we'll describe in more detail what is involved, and hopefully you
21618 will submit all the templates you create so we can include them in a later
21622 \begin_layout Standard
21623 Another basic idea of the external material feature is to distinguish between
21624 the original file that serves as a base for final material and the produced
21625 file that is included in your exported or printed document.
21626 For example, consider the case of a figure produced with
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21637 The Xfig application itself works on an original file with the
21638 \begin_inset Flex Code
21641 \begin_layout Plain Layout
21648 Within Xfig, you create and change your figure, and when you are done,
21650 \begin_inset Flex Code
21653 \begin_layout Plain Layout
21660 When you want to include the figure in your document, you invoke
21661 \begin_inset Flex Code
21664 \begin_layout Plain Layout
21670 in order to create a PostScript file that can readily be included in your
21673 \begin_inset Flex Code
21676 \begin_layout Plain Layout
21682 file is the original file, and the PostScript file is the produced file.
21685 \begin_layout Standard
21686 This distinction is important in order to allow updating of the material
21687 while you are in the process of writing the document.
21688 Furthermore, it provides us with the flexibility that is needed to support
21689 multiple export formats.
21690 For instance, in the case of a plain text file, it is not exactly an award-winn
21691 ing idea to include the figure as raw PostScript.
21692 Instead, you would either prefer to just include a reference to the figure
21693 or try to invoke some graphics to ASCII converter to make the final result
21694 look similar to the real graphics.
21695 The external material management allows you to do this, because it is parametri
21696 zed on the different export formats that LyX supports.
21699 \begin_layout Standard
21700 Besides supporting the production of different products according to the
21701 exported format, it supports tight integration with editing and viewing
21703 In the case of an Xfig figure, you are able to invoke Xfig on the original
21704 file with a single click from within the external material dialog in LyX,
21705 and also preview the produced PostScript file with Ghostview with another
21707 No more fiddling around with the command line and/or file browsers to locate
21708 and manipulate the original or produced files.
21709 In this way, you are finally able to take full advantage of the many different
21710 applications that are relevant to use when you write your documents, and
21711 ultimately be more productive.
21714 \begin_layout Section
21715 The external template configuration file
21718 \begin_layout Standard
21719 It is relatively easy to add custom external template definitions to LyX.
21720 However, be aware that doing this in an careless manner most probably
21724 introduce an easily exploitable security hole.
21725 So before you do this, please read the discussion about security in
21726 \begin_inset CommandInset ref
21728 reference "sec:Security-discussion"
21735 \begin_layout Standard
21736 Having said that, we encourage you to submit any interesting templates that
21741 \begin_layout Standard
21742 The external templates are defined in the
21743 \begin_inset Flex Code
21746 \begin_layout Plain Layout
21747 LyXDir/lib/external_templates
21753 You can place your own version in
21754 \begin_inset Flex Code
21757 \begin_layout Plain Layout
21758 UserDir/external_templates
21766 \begin_layout Standard
21767 A typical template looks like this:
21770 \begin_layout LyX-Code
21774 \begin_layout LyX-Code
21775 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
21778 \begin_layout LyX-Code
21782 \begin_layout LyX-Code
21786 \begin_layout LyX-Code
21790 \begin_layout LyX-Code
21794 \begin_layout LyX-Code
21798 \begin_layout LyX-Code
21799 AutomaticProduction true
21802 \begin_layout LyX-Code
21806 \begin_layout LyX-Code
21810 \begin_layout LyX-Code
21814 \begin_layout LyX-Code
21815 TransformCommand Rotate RotationLatexCommand
21818 \begin_layout LyX-Code
21819 TransformCommand Resize ResizeLatexCommand
21822 \begin_layout LyX-Code
21823 Product "$$RotateFront$$ResizeFront
21826 \begin_layout LyX-Code
21831 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
21834 \begin_layout LyX-Code
21835 $$ResizeBack$$RotateBack"
21838 \begin_layout LyX-Code
21842 \begin_layout LyX-Code
21843 UpdateResult "$$AbsPath$$Basename.pstex_t"
21846 \begin_layout LyX-Code
21847 Requirement "graphicx"
21850 \begin_layout LyX-Code
21851 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
21854 \begin_layout LyX-Code
21855 ReferencedFile latex "$$AbsPath$$Basename.eps"
21858 \begin_layout LyX-Code
21859 ReferencedFile dvi "$$AbsPath$$Basename.eps"
21862 \begin_layout LyX-Code
21866 \begin_layout LyX-Code
21870 \begin_layout LyX-Code
21871 TransformCommand Rotate RotationLatexCommand
21874 \begin_layout LyX-Code
21875 TransformCommand Resize ResizeLatexCommand
21878 \begin_layout LyX-Code
21879 Product "$$RotateFront$$ResizeFront
21882 \begin_layout LyX-Code
21887 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
21890 \begin_layout LyX-Code
21891 $$ResizeBack$$RotateBack"
21894 \begin_layout LyX-Code
21895 UpdateFormat pdftex
21898 \begin_layout LyX-Code
21899 UpdateResult "$$AbsPath$$Basename.pdftex_t"
21902 \begin_layout LyX-Code
21903 Requirement "graphicx"
21906 \begin_layout LyX-Code
21907 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
21910 \begin_layout LyX-Code
21911 ReferencedFile latex "$$AbsPath$$Basename.pdf"
21914 \begin_layout LyX-Code
21918 \begin_layout LyX-Code
21922 \begin_layout LyX-Code
21923 Product "$$Contents(
21925 "$$AbsPath$$Basename.asc
21930 \begin_layout LyX-Code
21931 UpdateFormat asciixfig
21934 \begin_layout LyX-Code
21935 UpdateResult "$$AbsPath$$Basename.asc"
21938 \begin_layout LyX-Code
21942 \begin_layout LyX-Code
21946 \begin_layout LyX-Code
21947 Product "<graphic fileref=
21949 "$$AbsOrRelPathMaster$$Basename.eps
21954 \begin_layout LyX-Code
21958 \begin_layout LyX-Code
21962 \begin_layout LyX-Code
21963 UpdateResult "$$AbsPath$$Basename.eps"
21966 \begin_layout LyX-Code
21967 ReferencedFile docbook "$$AbsPath$$Basename.eps"
21970 \begin_layout LyX-Code
21971 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
21974 \begin_layout LyX-Code
21978 \begin_layout LyX-Code
21979 Product "[XFig: $$FName]"
21982 \begin_layout LyX-Code
21986 \begin_layout LyX-Code
21990 \begin_layout Standard
21991 As you can see, the template is enclosed in
21992 \begin_inset Flex Code
21995 \begin_layout Plain Layout
22001 \SpecialChar \ldots{}
22003 \begin_inset Flex Code
22006 \begin_layout Plain Layout
22013 It contains a header specifying some general settings and, for each supported
22014 primary document file format, a section
22015 \begin_inset Flex Code
22018 \begin_layout Plain Layout
22024 \SpecialChar \ldots{}
22026 \begin_inset Flex Code
22029 \begin_layout Plain Layout
22038 \begin_layout Subsection
22039 The template header
22042 \begin_layout Description
22043 \begin_inset Flex Code
22046 \begin_layout Plain Layout
22047 AutomaticProduction
22048 \begin_inset space ~
22056 Whether the file represented by the template must be generated by LyX.
22057 This command must occur exactly once.
22060 \begin_layout Description
22061 \begin_inset Flex Code
22064 \begin_layout Plain Layout
22066 \begin_inset space ~
22074 A glob pattern that is used in the file dialog to filter out the desired
22076 If there is more than one possible file extension (e.
22077 \begin_inset space \thinspace{}
22081 \begin_inset space \space{}
22085 \begin_inset Flex Code
22088 \begin_layout Plain Layout
22095 \begin_inset Flex Code
22098 \begin_layout Plain Layout
22104 ), use something like
22105 \begin_inset Flex Code
22108 \begin_layout Plain Layout
22115 This command must occur exactly once.
22118 \begin_layout Description
22119 \begin_inset Flex Code
22122 \begin_layout Plain Layout
22124 \begin_inset space ~
22132 The text that is displayed on the button.
22133 This command must occur exactly once.
22136 \begin_layout Description
22137 \begin_inset Flex Code
22140 \begin_layout Plain Layout
22142 \begin_inset space ~
22146 \begin_inset space ~
22154 The help text that is used in the External dialog.
22155 Provide enough information to explain to the user just what the template
22156 can provide him with.
22157 This command must occur exactly once.
22160 \begin_layout Description
22161 \begin_inset Flex Code
22164 \begin_layout Plain Layout
22166 \begin_inset space ~
22174 The file format of the original file.
22175 This must be the name of a format that is known to LyX (see
22176 \begin_inset CommandInset ref
22178 reference "sec:Formats"
22184 \begin_inset Quotes eld
22188 \begin_inset Flex Code
22191 \begin_layout Plain Layout
22198 \begin_inset Quotes erd
22201 if the template can handle original files of more than one format.
22202 LyX will attempt to interrogate the file itself in order to deduce its
22203 format in this case.
22204 This command must occur exactly once.
22207 \begin_layout Description
22208 \begin_inset Flex Code
22211 \begin_layout Plain Layout
22213 \begin_inset space ~
22221 A unique name for the template.
22222 It must not contain substitution macros (see below).
22225 \begin_layout Description
22226 \begin_inset Flex Code
22229 \begin_layout Plain Layout
22231 \begin_inset space ~
22234 Rotate|Resize|Clip|Extra
22239 This command specifies which transformations are supported by this template.
22240 It may occur zero or more times.
22241 This command enables the corresponding tabs in the external dialog.
22243 \begin_inset Flex Code
22246 \begin_layout Plain Layout
22252 command must have either a corresponding
22253 \begin_inset Flex Code
22256 \begin_layout Plain Layout
22263 \begin_inset Flex Code
22266 \begin_layout Plain Layout
22273 \begin_inset Flex Code
22276 \begin_layout Plain Layout
22283 Otherwise the transformation will not be supported by that format.
22286 \begin_layout Subsection
22290 \begin_layout Description
22291 \begin_inset Flex Code
22294 \begin_layout Plain Layout
22296 \begin_inset space ~
22299 LaTeX|PDFLaTeX|PlainText|DocBook
22304 The primary document file format that this format definition is for.
22305 Not every template has a sensible representation in all document file formats.
22306 Please define nevertheless a
22307 \begin_inset Flex Code
22310 \begin_layout Plain Layout
22316 section for all templates.
22317 Use a dummy text when no representation is available.
22318 Then you can at least see a reference to the external material in the exported
22322 \begin_layout Description
22323 \begin_inset Flex Code
22326 \begin_layout Plain Layout
22328 \begin_inset space ~
22332 \begin_inset space ~
22340 This command defines an additional macro
22341 \begin_inset Flex Code
22344 \begin_layout Plain Layout
22350 for substitution in
22351 \begin_inset Flex Code
22354 \begin_layout Plain Layout
22362 \begin_inset Flex Code
22365 \begin_layout Plain Layout
22371 itself may contain substitution macros.
22372 The advantage over using
22373 \begin_inset Flex Code
22376 \begin_layout Plain Layout
22383 \begin_inset Flex Code
22386 \begin_layout Plain Layout
22392 is that the substituted value of
22393 \begin_inset Flex Code
22396 \begin_layout Plain Layout
22402 is sanitized so that it is a valid optional argument in the document format.
22403 This command may occur zero or more times.
22406 \begin_layout Description
22407 \begin_inset Flex Code
22410 \begin_layout Plain Layout
22412 \begin_inset space ~
22420 The text that is inserted in the exported document.
22421 This is actually the most important command and can be quite complex.
22422 This command must occur exactly once.
22425 \begin_layout Description
22426 \begin_inset Flex Code
22429 \begin_layout Plain Layout
22431 \begin_inset space ~
22439 This command specifies a preamble snippet that will be included in the
22441 It has to be defined using
22442 \begin_inset Flex Code
22445 \begin_layout Plain Layout
22451 \SpecialChar \ldots{}
22453 \begin_inset Flex Code
22456 \begin_layout Plain Layout
22463 This command may occur zero or more times.
22466 \begin_layout Description
22467 \begin_inset Flex Code
22470 \begin_layout Plain Layout
22472 \begin_inset space ~
22476 \begin_inset space ~
22484 This command denotes files that are created by the conversion process and
22485 are needed for a particular export format.
22486 If the filename is relative, it is interpreted relative to the master document.
22487 This command may be given zero or more times.
22490 \begin_layout Description
22491 \begin_inset Flex Code
22494 \begin_layout Plain Layout
22496 \begin_inset space ~
22504 The name of a required LaTeX package.
22505 The package is included via
22506 \begin_inset Flex Code
22509 \begin_layout Plain Layout
22517 in the LaTeX preamble.
22518 This command may occur zero or more times.
22521 \begin_layout Description
22522 \begin_inset Flex Code
22525 \begin_layout Plain Layout
22527 \begin_inset space ~
22531 \begin_inset space ~
22534 RotationLatexCommand
22539 This command specifies that the built in LaTeX command should be used for
22541 This command may occur once or not at all.
22544 \begin_layout Description
22545 \begin_inset Flex Code
22548 \begin_layout Plain Layout
22550 \begin_inset space ~
22554 \begin_inset space ~
22562 This command specifies that the built in LaTeX command should be used for
22564 This command may occur once or not at all.
22567 \begin_layout Description
22568 \begin_inset Flex Code
22571 \begin_layout Plain Layout
22573 \begin_inset space ~
22577 \begin_inset space ~
22580 RotationLatexOption
22585 This command specifies that rotation is done via an optional argument.
22586 This command may occur once or not at all.
22589 \begin_layout Description
22590 \begin_inset Flex Code
22593 \begin_layout Plain Layout
22595 \begin_inset space ~
22599 \begin_inset space ~
22607 This command specifies that resizing is done via an optional argument.
22608 This command may occur once or not at all.
22611 \begin_layout Description
22612 \begin_inset Flex Code
22615 \begin_layout Plain Layout
22617 \begin_inset space ~
22621 \begin_inset space ~
22629 This command specifies that clipping is done via an optional argument.
22630 This command may occur once or not at all.
22633 \begin_layout Description
22634 \begin_inset Flex Code
22637 \begin_layout Plain Layout
22639 \begin_inset space ~
22643 \begin_inset space ~
22651 This command specifies that an extra optional argument is used.
22652 This command may occur once or not at all.
22655 \begin_layout Description
22656 \begin_inset Flex Code
22659 \begin_layout Plain Layout
22661 \begin_inset space ~
22669 The file format of the converted file.
22670 This must be the name of a format that is known to LyX (see the
22671 \begin_inset Flex MenuItem
22674 \begin_layout Plain Layout
22675 Tools\SpecialChar \menuseparator
22676 Preferences\SpecialChar \menuseparator
22677 File Handling\SpecialChar \menuseparator
22684 This command must occur exactly once.
22685 If the resulting file format is PDF, you need to specify the format
22686 \begin_inset Flex Code
22689 \begin_layout Plain Layout
22696 This is the PDF format used for including graphics.
22697 The other defined PDF formats are for document export.
22700 \begin_layout Description
22701 \begin_inset Flex Code
22704 \begin_layout Plain Layout
22706 \begin_inset space ~
22714 The file name of the converted file.
22715 The file name must be absolute.
22716 This command must occur exactly once.
22719 \begin_layout Subsection
22720 Preamble definitions
22723 \begin_layout Standard
22724 The external template configuration file may contain additional preamble
22725 definitions enclosed by
22726 \begin_inset Flex Code
22729 \begin_layout Plain Layout
22735 \SpecialChar \ldots{}
22737 \begin_inset Flex Code
22740 \begin_layout Plain Layout
22747 They can be used by the templates in the
22748 \begin_inset Flex Code
22751 \begin_layout Plain Layout
22760 \begin_layout Section
22761 The substitution mechanism
22764 \begin_layout Standard
22765 When the external material facility invokes an external program, it is done
22766 on the basis of a command defined in the template configuration file.
22767 These commands can contain various macros that are expanded before execution.
22768 Execution always take place in the directory of the containing document.
22771 \begin_layout Standard
22772 Also, whenever external material is to be displayed, the name will be produced
22773 by the substitution mechanism, and most other commands in the template
22774 definition support substitution as well.
22777 \begin_layout Standard
22778 The available macros are the following:
22781 \begin_layout Description
22782 \begin_inset Flex Code
22785 \begin_layout Plain Layout
22786 $$AbsOrRelPathMaster
22791 The file path, absolute or relative to the master LyX document.
22794 \begin_layout Description
22795 \begin_inset Flex Code
22798 \begin_layout Plain Layout
22799 $$AbsOrRelPathParent
22804 The file path, absolute or relative to the LyX document.
22807 \begin_layout Description
22808 \begin_inset Flex Code
22811 \begin_layout Plain Layout
22817 The absolute file path.
22820 \begin_layout Description
22821 \begin_inset Flex Code
22824 \begin_layout Plain Layout
22830 The filename without path and without the extension.
22833 \begin_layout Description
22834 \begin_inset Flex Code
22837 \begin_layout Plain Layout
22839 \begin_inset Quotes eld
22843 \begin_inset Quotes erd
22851 This macro will expand to the contents of the file with the name
22852 \begin_inset Flex Code
22855 \begin_layout Plain Layout
22864 \begin_layout Description
22865 \begin_inset Flex Code
22868 \begin_layout Plain Layout
22874 The file extension (including the dot).
22877 \begin_layout Description
22878 \begin_inset Flex Code
22881 \begin_layout Plain Layout
22887 The filename of the file specified in the external material dialog.
22888 This is either an absolute name, or it is relative to the LyX document.
22891 \begin_layout Description
22892 \begin_inset Flex Code
22895 \begin_layout Plain Layout
22902 \begin_inset Flex Code
22905 \begin_layout Plain Layout
22911 (absolute name or relative to the LyX document).
22914 \begin_layout Description
22915 \begin_inset Flex Code
22918 \begin_layout Plain Layout
22924 The file path, relative to the master LyX document.
22927 \begin_layout Description
22928 \begin_inset Flex Code
22931 \begin_layout Plain Layout
22937 The file path, relative to the LyX document.
22940 \begin_layout Description
22941 \begin_inset Flex Code
22944 \begin_layout Plain Layout
22950 This macro will expand to the absolute path of the system directory.
22951 This is typically used to point to the various helper scripts that are
22955 \begin_layout Description
22956 \begin_inset Flex Code
22959 \begin_layout Plain Layout
22965 A name and full path to a temporary file which will be automatically deleted
22966 whenever the containing document is closed, or the external material insertion
22970 \begin_layout Standard
22971 All path macros contain a trailing directory separator, so you can construct
22973 \begin_inset space \thinspace{}
22977 \begin_inset space \space{}
22980 the absolute filename with
22981 \begin_inset Flex Code
22984 \begin_layout Plain Layout
22985 $$AbsPath$$Basename$$Extension
22993 \begin_layout Standard
22994 The macros above are substituted in all commands unless otherwise noted.
22996 \begin_inset Flex Code
22999 \begin_layout Plain Layout
23005 supports additionally the following substitutions if they are enabled by
23007 \begin_inset Flex Code
23010 \begin_layout Plain Layout
23017 \begin_inset Flex Code
23020 \begin_layout Plain Layout
23029 \begin_layout Description
23030 \begin_inset Flex Code
23033 \begin_layout Plain Layout
23039 The front part of the resize command.
23042 \begin_layout Description
23043 \begin_inset Flex Code
23046 \begin_layout Plain Layout
23052 The back part of the resize command.
23055 \begin_layout Description
23056 \begin_inset Flex Code
23059 \begin_layout Plain Layout
23065 The front part of the rotation command.
23068 \begin_layout Description
23069 \begin_inset Flex Code
23072 \begin_layout Plain Layout
23078 The back part of the rotation command.
23081 \begin_layout Standard
23082 The value string of the
23083 \begin_inset Flex Code
23086 \begin_layout Plain Layout
23092 command supports additionally the following substitutions if they are enabled
23094 \begin_inset Flex Code
23097 \begin_layout Plain Layout
23104 \begin_inset Flex Code
23107 \begin_layout Plain Layout
23116 \begin_layout Description
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
23165 The rotation option.
23168 \begin_layout Standard
23169 You may ask why there are so many path macros.
23170 There are mainly two reasons:
23173 \begin_layout Enumerate
23174 Relative and absolute file names should remain relative or absolute, respectivel
23176 Users may have reasons to prefer either form.
23177 Relative names are useful for portable documents that should work on different
23178 machines, for example.
23179 Absolute names may be required by some programs.
23182 \begin_layout Enumerate
23183 LaTeX treats relative file names differently than LyX and other programs
23184 in nested included files.
23185 For LyX, a relative file name is always relative to the document that contains
23187 For LaTeX, it is always relative to the master document.
23188 These two definitions are identical if you have only one document, but
23189 differ if you have a master document that includes part documents.
23190 That means that relative filenames must be transformed when presented to
23192 Fortunately LyX does this automatically for you if you choose the right
23196 \begin_layout Standard
23197 So which path macro should be used in new template definitions? The rule
23201 \begin_layout Itemize
23203 \begin_inset Flex Code
23206 \begin_layout Plain Layout
23212 if an absolute path is required.
23215 \begin_layout Itemize
23217 \begin_inset Flex Code
23220 \begin_layout Plain Layout
23221 $$AbsOrRelPathMaster
23226 if the substituted string is some kind of LaTeX input.
23229 \begin_layout Itemize
23231 \begin_inset Flex Code
23234 \begin_layout Plain Layout
23235 $$AbsOrRelPathParent
23240 in order to preserve the user's choice.
23243 \begin_layout Standard
23244 There are special cases where this rule does not work and e.
23245 \begin_inset space \thinspace{}
23249 \begin_inset space \space{}
23252 relative names are needed, but normally it will work just fine.
23253 One example for such a case is the command
23254 \begin_inset Flex Code
23257 \begin_layout Plain Layout
23258 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23263 in the XFig template above: We can't use the absolute name because the
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23274 files needs the relative name in order to rewrite the file content.
23277 \begin_layout Section
23278 Security discussion
23279 \begin_inset CommandInset label
23281 name "sec:Security-discussion"
23288 \begin_layout Standard
23289 The external material feature interfaces with a lot of external programs
23290 and does so automatically, so we have to consider the security implications
23292 In particular, since you have the option of including your own filenames
23293 and/or parameter strings and those are expanded into a command, it seems
23294 that it would be possible to create a malicious document which executes
23295 arbitrary commands when a user views or prints the document.
23296 This is something we definitely want to avoid.
23299 \begin_layout Standard
23300 However, since the external program commands are specified in the template
23301 configuration file only, there are no security issues if LyX is properly
23302 configured with safe templates only.
23303 This is so because the external programs are invoked with the
23304 \begin_inset Flex Code
23307 \begin_layout Plain Layout
23313 -system call rather than the
23314 \begin_inset Flex Code
23317 \begin_layout Plain Layout
23323 system-call, so it's not possible to execute arbitrary commands from the
23324 filename or parameter section via the shell.
23327 \begin_layout Standard
23328 This also implies that you are restricted in what command strings you can
23329 use in the external material templates.
23330 In particular, pipes and redirection are not readily available.
23331 This has to be so if LyX should remain safe.
23332 If you want to use some of the shell features, you should write a safe
23333 script to do this in a controlled manner, and then invoke the script from
23334 the command string.
23338 \begin_layout Standard
23339 It is possible to design a template that interacts directly with the shell,
23340 but since this would allow a malicious user to execute arbitrary commands
23341 by writing clever filenames and/or parameters, we generally recommend that
23342 you only use safe scripts that work with the
23343 \begin_inset Flex Code
23346 \begin_layout Plain Layout
23352 system call in a controlled manner.
23353 Of course, for use in a controlled environment, it can be tempting to just
23354 fall back to use ordinary shell scripts.
23355 If you do so, be aware that you
23359 provide an easily exploitable security hole in your system.
23360 Of course it stands to reason that such unsafe templates will never be
23361 included in the standard LyX distribution, although we do encourage people
23362 to submit new templates in the open source tradition.
23363 But LyX as shipped from the official distribution channels will never have
23367 \begin_layout Standard
23368 Including external material provides a lot of power, and you have to be
23369 careful not to introduce security hazards with this power.
23370 A subtle error in a single line in an innocent looking script can open
23371 the door to huge security problems.
23372 So if you do not fully understand the issues, we recommend that you consult
23373 a knowledgeable security professional or the LyX development team if you
23374 have any questions about whether a given template is safe or not.
23375 And do this before you use it in an uncontrolled environment.
23378 \begin_layout Chapter
23380 List of supported LyX functions to be used in layouts
23381 \begin_inset CommandInset label
23383 name "chap:List-of-functions"
23390 \begin_layout Standard
23392 \begin_inset Tabular
23393 <lyxtabular version="3" rows="11" columns="8">
23394 <features rotate="0" tabularvalignment="middle">
23395 <column alignment="left" valignment="top">
23396 <column alignment="left" valignment="top">
23397 <column alignment="left" valignment="top">
23398 <column alignment="left" valignment="top">
23399 <column alignment="left" valignment="top">
23400 <column alignment="left" valignment="top">
23401 <column alignment="left" valignment="top">
23402 <column alignment="left" valignment="top">
23404 <cell alignment="left" valignment="top" usebox="none">
23407 \begin_layout Plain Layout
23413 <cell alignment="left" valignment="top" usebox="none">
23416 \begin_layout Plain Layout
23422 <cell alignment="left" valignment="top" usebox="none">
23425 \begin_layout Plain Layout
23431 <cell alignment="left" valignment="top" usebox="none">
23434 \begin_layout Plain Layout
23440 <cell alignment="center" valignment="top" usebox="none">
23443 \begin_layout Plain Layout
23449 <cell alignment="center" valignment="top" usebox="none">
23452 \begin_layout Plain Layout
23458 <cell alignment="center" valignment="top" usebox="none">
23461 \begin_layout Plain Layout
23467 <cell alignment="center" valignment="top" usebox="none">
23470 \begin_layout Plain Layout
23478 <cell alignment="left" valignment="top" usebox="none">
23481 \begin_layout Plain Layout
23487 <cell alignment="left" valignment="top" usebox="none">
23490 \begin_layout Plain Layout
23496 <cell alignment="left" valignment="top" usebox="none">
23499 \begin_layout Plain Layout
23505 <cell alignment="left" valignment="top" usebox="none">
23508 \begin_layout Plain Layout
23514 <cell alignment="center" valignment="top" usebox="none">
23517 \begin_layout Plain Layout
23523 <cell alignment="center" valignment="top" usebox="none">
23526 \begin_layout Plain Layout
23532 <cell alignment="center" valignment="top" usebox="none">
23535 \begin_layout Plain Layout
23541 <cell alignment="center" valignment="top" usebox="none">
23544 \begin_layout Plain Layout
23552 <cell alignment="left" valignment="top" usebox="none">
23555 \begin_layout Plain Layout
23561 <cell alignment="left" valignment="top" usebox="none">
23564 \begin_layout Plain Layout
23570 <cell alignment="left" valignment="top" usebox="none">
23573 \begin_layout Plain Layout
23579 <cell alignment="left" valignment="top" usebox="none">
23582 \begin_layout Plain Layout
23588 <cell alignment="center" valignment="top" usebox="none">
23591 \begin_layout Plain Layout
23597 <cell alignment="center" valignment="top" usebox="none">
23600 \begin_layout Plain Layout
23606 <cell alignment="center" valignment="top" usebox="none">
23609 \begin_layout Plain Layout
23615 <cell alignment="center" valignment="top" usebox="none">
23618 \begin_layout Plain Layout
23626 <cell alignment="left" valignment="top" usebox="none">
23629 \begin_layout Plain Layout
23635 <cell alignment="left" valignment="top" usebox="none">
23638 \begin_layout Plain Layout
23644 <cell alignment="left" valignment="top" usebox="none">
23647 \begin_layout Plain Layout
23653 <cell alignment="left" valignment="top" usebox="none">
23656 \begin_layout Plain Layout
23662 <cell alignment="center" valignment="top" usebox="none">
23665 \begin_layout Plain Layout
23671 <cell alignment="center" valignment="top" usebox="none">
23674 \begin_layout Plain Layout
23680 <cell alignment="center" valignment="top" usebox="none">
23683 \begin_layout Plain Layout
23689 <cell alignment="center" valignment="top" usebox="none">
23692 \begin_layout Plain Layout
23700 <cell alignment="left" valignment="top" usebox="none">
23703 \begin_layout Plain Layout
23709 <cell alignment="left" valignment="top" usebox="none">
23712 \begin_layout Plain Layout
23718 <cell alignment="left" valignment="top" usebox="none">
23721 \begin_layout Plain Layout
23727 <cell alignment="left" valignment="top" usebox="none">
23730 \begin_layout Plain Layout
23736 <cell alignment="center" valignment="top" usebox="none">
23739 \begin_layout Plain Layout
23745 <cell alignment="center" valignment="top" usebox="none">
23748 \begin_layout Plain Layout
23754 <cell alignment="center" valignment="top" usebox="none">
23757 \begin_layout Plain Layout
23763 <cell alignment="center" valignment="top" usebox="none">
23766 \begin_layout Plain Layout
23774 <cell alignment="left" valignment="top" usebox="none">
23777 \begin_layout Plain Layout
23783 <cell alignment="left" valignment="top" usebox="none">
23786 \begin_layout Plain Layout
23792 <cell alignment="left" valignment="top" usebox="none">
23795 \begin_layout Plain Layout
23801 <cell alignment="left" valignment="top" usebox="none">
23804 \begin_layout Plain Layout
23810 <cell alignment="center" valignment="top" usebox="none">
23813 \begin_layout Plain Layout
23819 <cell alignment="center" valignment="top" usebox="none">
23822 \begin_layout Plain Layout
23828 <cell alignment="center" valignment="top" usebox="none">
23831 \begin_layout Plain Layout
23837 <cell alignment="center" valignment="top" usebox="none">
23840 \begin_layout Plain Layout
23848 <cell alignment="left" valignment="top" usebox="none">
23851 \begin_layout Plain Layout
23857 <cell alignment="left" valignment="top" usebox="none">
23860 \begin_layout Plain Layout
23866 <cell alignment="left" valignment="top" usebox="none">
23869 \begin_layout Plain Layout
23875 <cell alignment="left" valignment="top" usebox="none">
23878 \begin_layout Plain Layout
23884 <cell alignment="center" valignment="top" usebox="none">
23887 \begin_layout Plain Layout
23893 <cell alignment="center" valignment="top" usebox="none">
23896 \begin_layout Plain Layout
23902 <cell alignment="center" valignment="top" usebox="none">
23905 \begin_layout Plain Layout
23911 <cell alignment="center" valignment="top" usebox="none">
23914 \begin_layout Plain Layout
23922 <cell alignment="left" valignment="top" usebox="none">
23925 \begin_layout Plain Layout
23931 <cell alignment="left" valignment="top" usebox="none">
23934 \begin_layout Plain Layout
23940 <cell alignment="left" valignment="top" usebox="none">
23943 \begin_layout Plain Layout
23949 <cell alignment="left" valignment="top" usebox="none">
23952 \begin_layout Plain Layout
23958 <cell alignment="center" valignment="top" usebox="none">
23961 \begin_layout Plain Layout
23967 <cell alignment="center" valignment="top" usebox="none">
23970 \begin_layout Plain Layout
23976 <cell alignment="center" valignment="top" usebox="none">
23979 \begin_layout Plain Layout
23985 <cell alignment="center" valignment="top" usebox="none">
23988 \begin_layout Plain Layout
23996 <cell alignment="left" valignment="top" usebox="none">
23999 \begin_layout Plain Layout
24005 <cell alignment="left" valignment="top" usebox="none">
24008 \begin_layout Plain Layout
24014 <cell alignment="left" valignment="top" usebox="none">
24017 \begin_layout Plain Layout
24023 <cell alignment="left" valignment="top" usebox="none">
24026 \begin_layout Plain Layout
24032 <cell alignment="center" valignment="top" usebox="none">
24035 \begin_layout Plain Layout
24041 <cell alignment="center" valignment="top" usebox="none">
24044 \begin_layout Plain Layout
24050 <cell alignment="center" valignment="top" usebox="none">
24053 \begin_layout Plain Layout
24059 <cell alignment="center" valignment="top" usebox="none">
24062 \begin_layout Plain Layout
24070 <cell alignment="left" valignment="top" usebox="none">
24073 \begin_layout Plain Layout
24079 <cell alignment="left" valignment="top" usebox="none">
24082 \begin_layout Plain Layout
24088 <cell alignment="left" valignment="top" usebox="none">
24091 \begin_layout Plain Layout
24097 <cell alignment="left" valignment="top" usebox="none">
24100 \begin_layout Plain Layout
24106 <cell alignment="center" valignment="top" usebox="none">
24109 \begin_layout Plain Layout
24115 <cell alignment="center" valignment="top" usebox="none">
24118 \begin_layout Plain Layout
24124 <cell alignment="center" valignment="top" usebox="none">
24127 \begin_layout Plain Layout
24133 <cell alignment="center" valignment="top" usebox="none">
24136 \begin_layout Plain Layout
24144 <cell alignment="center" valignment="top" usebox="none">
24147 \begin_layout Plain Layout
24153 <cell alignment="center" valignment="top" usebox="none">
24156 \begin_layout Plain Layout
24162 <cell alignment="center" valignment="top" usebox="none">
24165 \begin_layout Plain Layout
24171 <cell alignment="center" valignment="top" usebox="none">
24174 \begin_layout Plain Layout
24180 <cell alignment="center" valignment="top" usebox="none">
24183 \begin_layout Plain Layout
24189 <cell alignment="center" valignment="top" usebox="none">
24192 \begin_layout Plain Layout
24198 <cell alignment="center" valignment="top" usebox="none">
24201 \begin_layout Plain Layout
24207 <cell alignment="center" valignment="top" usebox="none">
24210 \begin_layout Plain Layout
24224 \begin_layout Chapter
24225 Names of available colors to be used in layouts
24226 \begin_inset CommandInset label
24228 name "chap:Names-of-colors"
24235 \begin_layout Standard
24236 The colors listed here are the standard colors and the those that you can
24237 adjust in the LyX preferences.
24240 \begin_layout Description
24253 No particular color -- clear or default
24256 \begin_layout Description
24260 \begin_layout Description
24264 \begin_layout Description
24268 \begin_layout Description
24272 \begin_layout Description
24276 \begin_layout Description
24280 \begin_layout Description
24284 \begin_layout Description
24288 \begin_layout Description
24289 added_space Added space marker color
24292 \begin_layout Description
24293 addedtext Added text color
24296 \begin_layout Description
24297 appendix Appendix marker color
24300 \begin_layout Description
24301 background Background color
24304 \begin_layout Description
24305 bottomarea Bottom area color
24308 \begin_layout Description
24309 branchlabel Label color for branches
24312 \begin_layout Description
24313 buttonbg Color used for bottom background
24316 \begin_layout Description
24317 buttonhoverbg Color used for button background under focus
24320 \begin_layout Description
24321 buttonframe Color for inset button frames
24324 \begin_layout Description
24325 changebar Changebar color
24328 \begin_layout Description
24329 changedtextauthor1 Changed text color author 1
24332 \begin_layout Description
24333 changedtextauthor2 Changed text color author 2
24336 \begin_layout Description
24337 changedtextauthor3 Changed text color author 3
24340 \begin_layout Description
24341 changedtextauthor4 Changed text color author 4
24344 \begin_layout Description
24345 changedtextauthor5 Changed text color author 5
24348 \begin_layout Description
24349 collapsable_inset_frame Collapsable insets framecolor
24352 \begin_layout Description
24353 collapsable_inset_text Collapsable insets text color
24356 \begin_layout Description
24357 command Text color for command insets
24360 \begin_layout Description
24361 commandbg Background color for command insets
24364 \begin_layout Description
24365 commandframe Frame color for command insets
24368 \begin_layout Description
24369 comment color for comments
24372 \begin_layout Description
24373 commentbg Background color of comments
24376 \begin_layout Description
24377 cursor Cursor color
24380 \begin_layout Description
24381 deletedtext Deleted text color
24384 \begin_layout Description
24385 deletedtextmodifier Deleted text modifying color
24388 \begin_layout Description
24389 depthbar Color for the depth bars in the margin
24392 \begin_layout Description
24393 eolmarker End of line marker color
24396 \begin_layout Description
24397 error Color of the LaTeX error box
24400 \begin_layout Description
24401 footlabel Label color for footnotes
24404 \begin_layout Description
24405 graphicsbg Graphics inset background color
24408 \begin_layout Description
24409 greyedout Label color for greyedout insets
24412 \begin_layout Description
24413 greyedoutbg Background color of greyedout inset
24416 \begin_layout Description
24417 greyedouttext Color for greyedout inset text
24420 \begin_layout Description
24421 indexlabel Label color for index insets
24424 \begin_layout Description
24425 ignore The color is ignored
24428 \begin_layout Description
24429 inherit The color is inherited
24432 \begin_layout Description
24433 inlinecompletion Inline completion color
24436 \begin_layout Description
24437 insetbg Inset marker background color
24440 \begin_layout Description
24441 insetframe Inset marker frame color
24444 \begin_layout Description
24445 language Color for marking foreign language words
24448 \begin_layout Description
24449 latex Text color in LaTeX mode
24452 \begin_layout Description
24453 listingsbg Background color of listings inset
24456 \begin_layout Description
24457 marginlabel Label color for margin notes
24460 \begin_layout Description
24461 math Math inset text color
24464 \begin_layout Description
24465 mathbg Math inset background color
24468 \begin_layout Description
24469 mathcorners Math inset frame color not under focus
24472 \begin_layout Description
24473 mathframe Math inset frame color under focus
24476 \begin_layout Description
24477 mathline Math line color
24480 \begin_layout Description
24481 mathmacrobg Macro math inset background color
24484 \begin_layout Description
24485 mathmacroblend Macro math blended color
24488 \begin_layout Description
24489 mathmacroframe Macro math frame color
24492 \begin_layout Description
24493 mathmacrohoverbg Macro math inset background color hovered
24496 \begin_layout Description
24497 mathmacrolabel Macro math label color
24500 \begin_layout Description
24501 mathmacronewarg Macro template color for new parameters
24504 \begin_layout Description
24505 mathmacrooldarg Macro template color for old parameters
24508 \begin_layout Description
24509 newpage New page color
24512 \begin_layout Description
24513 nonunique_inlinecompletion Inline completion color for the non-unique part
24516 \begin_layout Description
24517 notebg Background color of notes
24520 \begin_layout Description
24521 notelabel Label color for notes
24524 \begin_layout Description
24525 pagebreak Page break/line break color
24528 \begin_layout Description
24529 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24532 \begin_layout Description
24533 phantomtext Text color for phantom insets
24536 \begin_layout Description
24537 preview The color used for previews
24540 \begin_layout Description
24541 previewframe Preview frame color
24544 \begin_layout Description
24545 regexpframe Color for regexp frame
24548 \begin_layout Description
24549 selection Background color of selected text
24552 \begin_layout Description
24553 selectiontext Foreground color of selected text
24556 \begin_layout Description
24557 shadedbg Background color of shaded box
24560 \begin_layout Description
24561 special Special chars text color
24564 \begin_layout Description
24565 tabularline Table line color
24568 \begin_layout Description
24569 tabularonoffline Table line color
24572 \begin_layout Description
24573 urllabel Label color for URL insets
24576 \begin_layout Description
24577 urltext Color for URL inset text