1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % increase link area for cross-references and autoname them,
35 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
36 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
37 \addto\extrasenglish{%
38 \renewcommand*{\equationautorefname}[1]{}%
39 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
40 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout Flex:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 # In case we need to do with sans...
65 #InsetLayout CharStyle:Code
70 #\renewcommand{\code}[1]{{\sffamily #1}}
75 \language_package default
80 \font_typewriter default
82 \font_default_family default
83 \use_non_tex_fonts false
89 \default_output_format default
91 \bibtex_command default
92 \index_command default
96 \pdf_title "LyX Configuration Manual"
97 \pdf_author "LyX Team"
98 \pdf_subject "LyX-documentation Customization"
99 \pdf_keywords "LyX, documentation, customization"
101 \pdf_bookmarksnumbered true
102 \pdf_bookmarksopen true
103 \pdf_bookmarksopenlevel 1
104 \pdf_breaklinks false
108 \pdf_pdfusetitle false
109 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
112 \use_package amsmath 0
113 \use_package amssymb 0
114 \use_package cancel 0
116 \use_package mathdots 1
117 \use_package mathtools 0
118 \use_package mhchem 0
119 \use_package stackrel 0
120 \use_package stmaryrd 0
121 \use_package undertilde 0
123 \cite_engine_type default
127 \paperorientation portrait
142 \paragraph_separation indent
143 \paragraph_indentation default
144 \quotes_language english
147 \paperpagestyle headings
148 \tracking_changes true
149 \output_changes false
153 \author -712698321 "Jürgen Spitzmüller"
154 \author -195340706 "Georg Baum"
155 \author 274215730 "scott"
161 Customizing LyX: Features for the Advanced User
169 \begin_layout Plain Layout
171 If you have comments or error corrections, please send them to the LyX Documenta
173 \begin_inset CommandInset href
175 target "lyx-docs@lists.lyx.org"
182 \begin_inset Quotes eld
186 \begin_inset Quotes erd
189 in the subject header, and please cc the current maintainer of this file,
190 Richard Heck <rgheck@comcast.net>.
196 \begin_inset Newline newline
200 \begin_inset Newline newline
206 \begin_layout Standard
207 \begin_inset CommandInset toc
208 LatexCommand tableofcontents
215 \begin_layout Standard
216 \begin_inset Note Note
219 \begin_layout Plain Layout
220 Please use change tracking when modifying this document.
221 This makes it easier for our translators to recognize things that have
222 been changed, and it helps the maintainer keep up-to-date with what's been
231 \begin_layout Chapter
235 \begin_layout Standard
236 This manual covers the customization features present in LyX.
237 In it, we discuss issues like keyboard shortcuts, screen previewing options,
238 printer options, sending commands to LyX via the LyX Server, internationalizati
239 on, installing new LaTeX classes and LyX layouts, etc.
240 We can't possibly hope to touch on everything you can change—our developers
241 add new features faster than we can document them—but we will explain the
242 most common customizations and hopefully point you in the right direction
243 for some of the more obscure ones.
246 \begin_layout Standard
247 \begin_inset Branch OutDated
250 \begin_layout Standard
251 Information from previous versions of this document that now seems to be
252 outdated is contained in the OutDated branch of this document.
253 By default, this information will not appear in the LaTeX output.
261 \begin_layout Chapter
262 LyX configuration files
265 \begin_layout Standard
266 This chapter aims to help you to find your way through the LyX configuration
268 Before continuing to read this chapter, you should find out where your
269 LyX library and user directories are by using
270 \begin_inset Flex MenuItem
273 \begin_layout Plain Layout
274 Help\SpecialChar \menuseparator
285 The library directory is the place where LyX places its system-wide configurati
286 on files; the user directory is where you can place your modified versions.
287 We will call the former
288 \begin_inset Flex Code
291 \begin_layout Plain Layout
298 \begin_inset Flex MenuItem
301 \begin_layout Plain Layout
307 in the remainder of this document.
311 \begin_layout Section
313 \begin_inset Flex Code
316 \begin_layout Plain Layout
325 \begin_layout Standard
326 \begin_inset Flex Code
329 \begin_layout Plain Layout
335 and its sub-directories contain a number of files and that can be used
336 to customize LyX's behavior.
337 You can change many of these files from within LyX itself through the
338 \begin_inset Flex MenuItem
341 \begin_layout Plain Layout
342 Tools\SpecialChar \menuseparator
349 Most customization that you will want to do in LyX is possible through
351 However, many other inner aspects of LyX can be customized by modifying
353 \begin_inset Flex Code
356 \begin_layout Plain Layout
363 These files fall in different categories, described in the following subsection
367 \begin_layout Subsection
368 Automatically generated files
371 \begin_layout Standard
372 The files, which are to be found in
373 \begin_inset Flex MenuItem
376 \begin_layout Plain Layout
382 , are generated when you configure LyX.
383 They contain various default values that are guessed by inspection.
384 In general, it is not a good idea to modify them, since they might be overwritt
388 \begin_layout Labeling
389 \labelwidthstring 00.00.0000
390 \begin_inset Flex Code
393 \begin_layout Plain Layout
399 contains defaults for various commands.
402 \begin_layout Labeling
403 \labelwidthstring 00.00.0000
404 \begin_inset Flex Code
407 \begin_layout Plain Layout
413 contains the list of packages that have been recognized by LyX.
414 It is currently unused by the LyX program itself, but the information extracted
415 , and more, is made available with
416 \begin_inset Flex MenuItem
419 \begin_layout Plain Layout
420 Help\SpecialChar \menuseparator
433 \begin_layout Labeling
434 \labelwidthstring 00.00.0000
435 \begin_inset Flex Code
438 \begin_layout Plain Layout
444 the list of text classes that have been found in your
445 \begin_inset Flex Code
448 \begin_layout Plain Layout
454 directories, along with the associated LaTeX document class and their descripti
458 \begin_layout Labeling
459 \labelwidthstring 00.00.0000
460 \begin_inset Flex Code
463 \begin_layout Plain Layout
469 the list of layout modules found in your
470 \begin_inset Flex Code
473 \begin_layout Plain Layout
482 \begin_layout Labeling
483 \labelwidthstring 00.00.0000
484 \begin_inset Flex Code
487 \begin_layout Plain Layout
493 lists of various sorts of LaTeX-related files found on your system
496 \begin_layout Labeling
497 \labelwidthstring 00.00.0000
498 \begin_inset Flex Code
501 \begin_layout Plain Layout
507 is automatically generated during configuration from the file
508 \begin_inset Flex Code
511 \begin_layout Plain Layout
518 It contains information on your LaTeX configuration.
521 \begin_layout Subsection
525 \begin_layout Standard
526 These directories are duplicated between
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
537 \begin_inset Flex Code
540 \begin_layout Plain Layout
547 If a particular files exists in both places, the one in
548 \begin_inset Flex Code
551 \begin_layout Plain Layout
560 \begin_layout Labeling
561 \labelwidthstring 00.00.0000
562 \begin_inset Flex Code
565 \begin_layout Plain Layout
571 this directory contains files with the extension
572 \begin_inset Flex Code
575 \begin_layout Plain Layout
581 that define the keybindings used in LyX.
582 If there exists an internationalized version of the bind file named
583 \begin_inset Flex Code
586 \begin_layout Plain Layout
592 , that will be used first.
595 \begin_layout Labeling
596 \labelwidthstring 00.00.0000
597 \begin_inset Flex Code
600 \begin_layout Plain Layout
606 contains graphics files that can be included in documents.
610 \begin_layout Labeling
611 \labelwidthstring 00.00.0000
612 \begin_inset Flex Code
615 \begin_layout Plain Layout
621 contains LyX documentation files (including the one you are currently reading).
623 \begin_inset Flex Code
626 \begin_layout Plain Layout
632 deserves special attention, as noted above.
633 The internationalized help docs are in subdirectories
634 \begin_inset Flex Code
637 \begin_layout Plain Layout
644 \begin_inset Quotes eld
648 \begin_inset Quotes erd
651 is the ISO language code.
653 \begin_inset CommandInset ref
655 reference "cha:Internationalizing-LyX"
662 \begin_layout Labeling
663 \labelwidthstring 00.00.0000
664 \begin_inset Flex Code
667 \begin_layout Plain Layout
673 contains example files that explain how to use some features.
674 In the file browser, press the
675 \begin_inset Flex MenuItem
678 \begin_layout Plain Layout
687 \begin_layout Labeling
688 \labelwidthstring 00.00.0000
689 \begin_inset Flex Code
692 \begin_layout Plain Layout
698 contains image files that are used by the
699 \begin_inset Flex MenuItem
702 \begin_layout Plain Layout
709 In addition, it also contains the individual icons used in the toolbar
710 and the banners that can be shown when LyX is launched.
713 \begin_layout Labeling
714 \labelwidthstring 00.00.0000
715 \begin_inset Flex Code
718 \begin_layout Plain Layout
724 contains keyboard keymapping files.
726 \begin_inset CommandInset ref
728 reference "sec:International-Keymap-Stuff"
735 \begin_layout Labeling
736 \labelwidthstring 00.00.0000
737 \begin_inset Flex Code
740 \begin_layout Plain Layout
746 contains the text class and module files described in
747 \begin_inset CommandInset ref
749 reference "cha:Installing-New-Document"
756 \begin_layout Labeling
757 \labelwidthstring 00.00.0000
758 \begin_inset Flex Code
761 \begin_layout Plain Layout
768 \begin_inset Flex Code
771 \begin_layout Plain Layout
777 Python scripts used to convert between LyX versions.
778 These can be run from the command line if, say, you want to batch-convert
782 \begin_layout Labeling
783 \labelwidthstring 00.00.0000
784 \begin_inset Flex Code
787 \begin_layout Plain Layout
793 contains some files that demonstrate the capabilities of the
794 \begin_inset Flex MenuItem
797 \begin_layout Plain Layout
808 Also contains some scripts used by LyX itself.
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex Code
816 \begin_layout Plain Layout
822 contains the standard LyX template files described in
823 \begin_inset CommandInset ref
825 reference "sub:Creating-Templates"
832 \begin_layout Labeling
833 \labelwidthstring 00.00.0000
834 \begin_inset Flex Code
837 \begin_layout Plain Layout
843 contains files with the extension
844 \begin_inset Flex Code
847 \begin_layout Plain Layout
853 that define the user interface to LyX.
854 That is, the files define which items appear in which menus and the items
855 appearing on the toolbar.
858 \begin_layout Subsection
859 Files you don't want to modify
862 \begin_layout Standard
863 These files are used internally by LyX and you generally do not need to
864 modify them unless you are a developer.
867 \begin_layout Labeling
868 \labelwidthstring 00.00.0000
869 \begin_inset Flex Code
872 \begin_layout Plain Layout
878 this file contains the list of LyX developers.
879 The contents are displayed with the menu entry
880 \begin_inset Flex MenuItem
883 \begin_layout Plain Layout
884 Help\SpecialChar \menuseparator
897 \begin_layout Labeling
898 \labelwidthstring 00.00.0000
899 \begin_inset Flex Code
902 \begin_layout Plain Layout
908 this is a LaTeX script used during the configuration process.
912 \begin_layout Labeling
913 \labelwidthstring 00.00.0000
914 \begin_inset Flex Code
917 \begin_layout Plain Layout
923 this is a Python script that is used to re-configure LyX.
924 It creates configuration files in the directory it was run from.
927 \begin_layout Subsection
928 Other files needing a line or two
931 \begin_layout Labeling
932 \labelwidthstring 00.00.0000
933 \begin_inset Flex Code
936 \begin_layout Plain Layout
942 this contains tables describing how different character encodings can be
946 \begin_layout Labeling
947 \labelwidthstring 00.00.0000
948 \begin_inset Flex Code
951 \begin_layout Plain Layout
957 this file contains the templates available to the new
958 \begin_inset Flex MenuItem
961 \begin_layout Plain Layout
972 \begin_inset CommandInset ref
974 reference "chap:Including-External-Material"
981 \begin_layout Labeling
982 \labelwidthstring 00.00.0000
983 \begin_inset Flex Code
986 \begin_layout Plain Layout
992 this file contains a list of all the languages currently supported by LyX.
995 \begin_layout Labeling
996 \labelwidthstring 00.00.0000
997 \begin_inset Flex Code
1000 \begin_layout Plain Layout
1006 contains information about the supported fonts.
1009 \begin_layout Labeling
1010 \labelwidthstring 00.00.0000
1011 \begin_inset Flex Code
1014 \begin_layout Plain Layout
1020 this file contains translations for internationalized paragraph styles
1022 \begin_inset CommandInset ref
1024 reference "sub:I18n"
1031 \begin_layout Labeling
1032 \labelwidthstring 00.00.0000
1033 \begin_inset Flex Code
1036 \begin_layout Plain Layout
1042 this file contains information about unicode-encoded glyphs and the way
1043 they are supported by LyX via LaTeX.
1046 \begin_layout Section
1047 Your local configuration directory
1050 \begin_layout Standard
1051 Even if you are using LyX as an unprivileged user, you might want to change
1052 LyX configuration for your own use.
1054 \begin_inset Flex Code
1057 \begin_layout Plain Layout
1063 directory contains all your personal configuration files.
1064 This is the directory described as
1065 \begin_inset Quotes eld
1069 \begin_inset Quotes erd
1073 \begin_inset Flex MenuItem
1076 \begin_layout Plain Layout
1077 Help\SpecialChar \menuseparator
1079 \begin_inset space ~
1088 This directory is used as a mirror of
1089 \begin_inset Flex Code
1092 \begin_layout Plain Layout
1098 , which means that every file in
1099 \begin_inset Flex Code
1102 \begin_layout Plain Layout
1108 is a replacement for the corresponding file in
1109 \begin_inset Flex Code
1112 \begin_layout Plain Layout
1119 Any configuration file described in the above sections can be placed either
1120 in the system-wide directory, in which case it will affect all users, or
1121 in your local directory for your own use.
1124 \begin_layout Standard
1125 To make things clearer, let's provide a few examples:
1128 \begin_layout Itemize
1129 The preferences set in the
1130 \begin_inset Flex MenuItem
1133 \begin_layout Plain Layout
1134 Tools\SpecialChar \menuseparator
1140 dialog are saved to a file
1141 \begin_inset Flex Code
1144 \begin_layout Plain Layout
1151 \begin_inset Flex Code
1154 \begin_layout Plain Layout
1163 \begin_layout Itemize
1164 When you reconfigure using
1165 \begin_inset Flex MenuItem
1168 \begin_layout Plain Layout
1169 Tools\SpecialChar \menuseparator
1176 \begin_inset Flex Code
1179 \begin_layout Plain Layout
1185 script, and the resulting files are written in your local configuration
1187 This means that any additional text class file that you might have added
1189 \begin_inset Flex Code
1192 \begin_layout Plain Layout
1198 will be added to the list of classes in the
1199 \begin_inset Flex MenuItem
1202 \begin_layout Plain Layout
1203 Document\SpecialChar \menuseparator
1212 \begin_layout Itemize
1213 If you get some updated documentation from LyX ftp site and cannot install
1214 it because you do not have sysadmin rights on your system, you can just
1216 \begin_inset Flex Code
1219 \begin_layout Plain Layout
1225 and the items in the
1226 \begin_inset Flex MenuItem
1229 \begin_layout Plain Layout
1235 menu will open them!
1238 \begin_layout Section
1239 Running LyX with multiple configurations
1242 \begin_layout Standard
1243 The configuration freedom of the local configuration directory may not suffice
1244 if you want to have more than one configuration at your disposal.
1245 For example, you may want to be use different key bindings or printer settings
1247 You can achieve this by having several such directories.
1248 You then specify which directory to use at run-time.
1251 \begin_layout Standard
1252 Invoking LyX with the command line switch
1253 \begin_inset Flex Code
1256 \begin_layout Plain Layout
1266 instructs the program to read the configuration from that directory, and
1267 not from the default directory.
1268 (You can determine the default directory by running LyX without the
1269 \begin_inset Flex Code
1272 \begin_layout Plain Layout
1278 switch.) If the specified directory does not exist, LyX offers to create
1279 it for you, just like it does for the default directory on the first time
1280 you run the program.
1281 You can modify the configuration options in this additional user directory
1282 exactly as you would for the default directory.
1283 These directories are completely independent (but read on).
1284 Note that setting the environment variable
1285 \begin_inset Flex Code
1288 \begin_layout Plain Layout
1294 to some value has exactly the same effect.
1297 \begin_layout Standard
1298 Having several configurations also requires more maintenance: if you want
1299 to add a new layout to
1300 \begin_inset Flex Code
1303 \begin_layout Plain Layout
1309 which you want available from all your configurations, you must add it
1310 to each directory separately.
1311 You can avoid this with the following trick: after LyX creates the additional
1312 directory, most of the subdirectories (see above) are empty.
1313 If you want the new configuration to mirror an existing one, replace the
1314 empty subdirectory with a symbolic link to the matching subdirectory in
1315 the existing configuration.
1317 \begin_inset Flex Code
1320 \begin_layout Plain Layout
1326 subdirectory, however, since it contains a file written by the configuration
1327 script (also accessible through
1328 \begin_inset Flex MenuItem
1331 \begin_layout Plain Layout
1332 Tools\SpecialChar \menuseparator
1338 ) which is configuration-specific.
1341 \begin_layout Chapter
1342 The Preferences dialog
1345 \begin_layout Standard
1346 All options of the preferences dialog are described in the Appendix
1348 The Preferences Dialog
1355 For some options you might find here more details.
1358 \begin_layout Section
1360 \begin_inset CommandInset label
1369 \begin_layout Standard
1370 The first step is to define your file formats if they are not already defined.
1372 \begin_inset Flex MenuItem
1375 \begin_layout Plain Layout
1376 Tools\SpecialChar \menuseparator
1384 \begin_inset Flex MenuItem
1387 \begin_layout Plain Layout
1388 File Handling\SpecialChar \menuseparator
1395 \begin_inset Flex MenuItem
1398 \begin_layout Plain Layout
1404 button to define your new format.
1406 \begin_inset Flex MenuItem
1409 \begin_layout Plain Layout
1415 field contains the name used to identify the format in the GUI.
1417 \begin_inset Flex MenuItem
1420 \begin_layout Plain Layout
1426 is used to identify the format internally.
1427 You will also need to enter a file extension.
1428 These are all required.
1430 \begin_inset Flex MenuItem
1433 \begin_layout Plain Layout
1439 field is used to provide a keyboard shortcut on the menus.
1440 (For example, pressing
1441 \begin_inset Flex MenuItem
1444 \begin_layout Plain Layout
1451 \begin_inset Flex MenuItem
1454 \begin_layout Plain Layout
1455 Document\SpecialChar \menuseparator
1456 View (Other Formats)\SpecialChar \menuseparator
1465 \begin_layout Standard
1467 \begin_inset Flex MenuItem
1470 \begin_layout Plain Layout
1477 \begin_inset Flex MenuItem
1480 \begin_layout Plain Layout
1487 For example, you might want to use
1488 \begin_inset Flex MenuItem
1491 \begin_layout Plain Layout
1497 to view PostScript files.
1498 You can enter the command needed to start the program in the corresponding
1500 In defining this command, you can use the four variables listed in the
1502 The viewer is launched when you view an image in LyX or use the
1503 \begin_inset Flex MenuItem
1506 \begin_layout Plain Layout
1507 Document\SpecialChar \menuseparator
1514 The editor is for example launched when you right-click on an image and
1516 \begin_inset Flex MenuItem
1519 \begin_layout Plain Layout
1525 in the appearing context menu.
1528 \begin_layout Standard
1530 \begin_inset Flex MenuItem
1533 \begin_layout Plain Layout
1539 type of a format is optional, but if it is specified, it must be unique
1541 It is used to detect files of this format from the file contents.
1542 For some important file formats there is no MIME type officially registered
1544 \begin_inset CommandInset href
1547 target "http://www.iana.org/assignments/media-types/"
1552 Therefore LyX uses the extended list of MIME types as specified by
1553 \begin_inset CommandInset href
1555 name "freedesktop.org"
1556 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1563 \begin_layout Standard
1565 \begin_inset Flex MenuItem
1568 \begin_layout Plain Layout
1574 option tells LyX that a format is suitable for document export.
1575 If this is set and if a suitable conversion route exists (see
1576 \begin_inset CommandInset ref
1578 reference "sec:Converters"
1582 ), the format will appear in the
1583 \begin_inset Flex MenuItem
1586 \begin_layout Plain Layout
1587 File\SpecialChar \menuseparator
1594 The format will also appear in the
1595 \begin_inset Flex MenuItem
1598 \begin_layout Plain Layout
1599 Document\SpecialChar \menuseparator
1605 menu if a viewer is specified for the format.
1606 Pure image formats, such as
1607 \begin_inset Flex Code
1610 \begin_layout Plain Layout
1616 , should not use this option.
1617 Formats that can both represent vector graphics and documents like
1618 \begin_inset Flex Code
1621 \begin_layout Plain Layout
1630 \begin_layout Standard
1632 \begin_inset Flex MenuItem
1635 \begin_layout Plain Layout
1636 Vector graphics format
1641 tells LyX that a format can contain vector graphics.
1642 This information is used to determine the target format of included graphics
1644 \begin_inset Flex MenuItem
1647 \begin_layout Plain Layout
1654 Included graphics may need to be converted to either
1655 \begin_inset Flex MenuItem
1658 \begin_layout Plain Layout
1665 \begin_inset Flex MenuItem
1668 \begin_layout Plain Layout
1675 \begin_inset Flex MenuItem
1678 \begin_layout Plain Layout
1685 \begin_inset Flex MenuItem
1688 \begin_layout Plain Layout
1694 cannot handle other image formats.
1695 If an included graphic is not already in
1696 \begin_inset Flex MenuItem
1699 \begin_layout Plain Layout
1706 \begin_inset Flex MenuItem
1709 \begin_layout Plain Layout
1716 \begin_inset Flex MenuItem
1719 \begin_layout Plain Layout
1725 format, it is converted to
1726 \begin_inset Flex MenuItem
1729 \begin_layout Plain Layout
1735 if the vector format option is set, and otherwise to
1736 \begin_inset Flex MenuItem
1739 \begin_layout Plain Layout
1748 \begin_layout Section
1752 \begin_layout Standard
1753 Since all conversions from one format to another take place in LyX's temporary
1754 directory, it is sometimes necessary to modify a file before copying it
1755 to the temporary directory in order that the conversion may be performed.
1759 \begin_layout Plain Layout
1760 For example, the file may refer to other files—images, for example—using
1761 relative file names, and these may become invalid when the file is copied
1762 to the temporary directory.
1767 This is done by a Copier: It copies a file to (or from) the temporary directory
1768 and may modify it in the process.
1771 \begin_layout Standard
1772 The definitions of the copiers may use four variables:
1775 \begin_layout Labeling
1776 \labelwidthstring 00.00.0000
1777 \begin_inset Flex Code
1780 \begin_layout Plain Layout
1786 The LyX system directory (e.
1787 \begin_inset space \thinspace{}
1791 \begin_inset space \space{}
1795 \begin_inset Flex MenuItem
1798 \begin_layout Plain Layout
1807 \begin_layout Labeling
1808 \labelwidthstring 00.00.0000
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1821 \begin_layout Labeling
1822 \labelwidthstring 00.00.0000
1823 \begin_inset Flex Code
1826 \begin_layout Plain Layout
1835 \begin_layout Labeling
1836 \labelwidthstring 00.00.0000
1837 \begin_inset Flex Code
1840 \begin_layout Plain Layout
1846 The base name (without filename extension) in the LyX temporary directory
1849 \begin_layout Labeling
1850 \labelwidthstring 00.00.0000
1851 \begin_inset Flex Code
1854 \begin_layout Plain Layout
1860 The full directory path of the LyX temporary directory
1863 \begin_layout Labeling
1864 \labelwidthstring 00.00.0000
1865 \begin_inset Flex Code
1868 \begin_layout Plain Layout
1874 The full pathname to the original LyX file being processed
1877 \begin_layout Labeling
1878 \labelwidthstring 00.00.0000
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1888 The filename (without any directory path) of the LyX file.
1891 \begin_layout Labeling
1892 \labelwidthstring 00.00.0000
1893 \begin_inset Flex Code
1896 \begin_layout Plain Layout
1905 \begin_layout Standard
1906 The latter should be the filename as it would be used in a LaTeX's
1913 It is relevant only when exporting files suitable for such inclusion.
1916 \begin_layout Standard
1917 Copiers can be used to do almost anything with output files.
1918 For example, suppose you want generated pdf files to be copied to a special
1920 \begin_inset Flex Code
1923 \begin_layout Plain Layout
1930 Then you could write a shell script such as this one:
1933 \begin_layout Standard
1934 \begin_inset listings
1938 \begin_layout Plain Layout
1943 \begin_layout Plain Layout
1948 \begin_layout Plain Layout
1950 TOFILE=`basename $2`
1953 \begin_layout Plain Layout
1955 cp $FROMFILE /home/you/pdf/$TOFILE
1960 Save it in your local LyX directory—say,
1961 \begin_inset Flex Code
1964 \begin_layout Plain Layout
1965 /home/you/.lyx/scripts/pdfcopier.sh
1970 —and make it executable, if you need to do so on your platform.
1972 \begin_inset Flex MenuItem
1975 \begin_layout Plain Layout
1976 Tools\SpecialChar \menuseparator
1982 dialog, select under
1983 \begin_inset Flex MenuItem
1986 \begin_layout Plain Layout
1987 File Handling\SpecialChar \menuseparator
1994 \begin_inset Flex MenuItem
1997 \begin_layout Plain Layout
2003 format—or one of the other pdf formats—and enter
2004 \begin_inset Flex Code
2007 \begin_layout Plain Layout
2008 pdfcopier.sh $$i $$o
2014 \begin_inset Flex MenuItem
2017 \begin_layout Plain Layout
2027 \begin_layout Standard
2028 Copiers are used by LyX in various of its own conversions.
2029 For example, if appropriate programs are found, LyX will automatically
2030 install copiers for the
2031 \begin_inset Flex MenuItem
2034 \begin_layout Plain Layout
2041 \begin_inset Flex MenuItem
2044 \begin_layout Plain Layout
2046 \begin_inset space ~
2055 When these formats are exported, the copier sees that not just the main
2056 HTML file but various associated files (style files, images, etc.) are also
2058 All these files are written to a subdirectory of the directory in which
2059 the original LyX file was found.
2063 \begin_layout Plain Layout
2064 This copier can be customized.
2066 \begin_inset Quotes eld
2070 \begin_inset Quotes erd
2073 argument takes a comma-separated list of extensions to be copied; if it
2074 is omitted, all files will be copied.
2076 \begin_inset Quotes eld
2080 \begin_inset Quotes erd
2083 argument determines the extension added to the generated directory.
2085 \begin_inset Quotes eld
2089 \begin_inset Flex MenuItem
2092 \begin_layout Plain Layout
2099 \begin_inset Quotes erd
2102 , so HTML generated from
2103 \begin_inset Flex MenuItem
2106 \begin_layout Plain Layout
2107 /path/to/filename.lyx
2113 \begin_inset Flex MenuItem
2116 \begin_layout Plain Layout
2117 /path/to/filename.html.LyXconv
2131 \begin_layout Section
2133 \begin_inset CommandInset label
2135 name "sec:Converters"
2142 \begin_layout Standard
2143 You can define your own Converters to convert files between different formats.
2145 \begin_inset Flex MenuItem
2148 \begin_layout Plain Layout
2149 Tools\SpecialChar \menuseparator
2150 Preferences\SpecialChar \menuseparator
2151 File Handling\SpecialChar \menuseparator
2160 \begin_layout Standard
2161 To define a new converter, select the
2162 \begin_inset Flex MenuItem
2165 \begin_layout Plain Layout
2167 \begin_inset space ~
2176 \begin_inset Flex MenuItem
2179 \begin_layout Plain Layout
2181 \begin_inset space ~
2189 from the drop-down lists, enter the command needed for the conversion,
2191 \begin_inset Flex MenuItem
2194 \begin_layout Plain Layout
2201 Several variables can be used in the definition of converters:
2204 \begin_layout Labeling
2205 \labelwidthstring 00.00.0000
2206 \begin_inset Flex Code
2209 \begin_layout Plain Layout
2215 The LyX system directory
2218 \begin_layout Labeling
2219 \labelwidthstring 00.00.0000
2220 \begin_inset Flex Code
2223 \begin_layout Plain Layout
2232 \begin_layout Labeling
2233 \labelwidthstring 00.00.0000
2234 \begin_inset Flex Code
2237 \begin_layout Plain Layout
2246 \begin_layout Labeling
2247 \labelwidthstring 00.00.0000
2248 \begin_inset Flex Code
2251 \begin_layout Plain Layout
2257 The base filename of the input file (i.
2258 \begin_inset space \thinspace{}
2261 g., without the extension)
2264 \begin_layout Labeling
2265 \labelwidthstring 00.00.0000
2266 \begin_inset Flex Code
2269 \begin_layout Plain Layout
2275 The path to the input file
2278 \begin_layout Labeling
2279 \labelwidthstring 00.00.0000
2280 \begin_inset Flex Code
2283 \begin_layout Plain Layout
2289 The path to the original input file (this is different from $$p when a
2290 chain of converters is called)
2293 \begin_layout Labeling
2294 \labelwidthstring 00.00.0000
2295 \begin_inset Flex Code
2298 \begin_layout Plain Layout
2304 The iconv name for the encoding of the document.
2307 \begin_layout Standard
2309 \begin_inset Flex MenuItem
2312 \begin_layout Plain Layout
2314 \begin_inset space ~
2322 field you can enter the following flags, separated by commas:
2325 \begin_layout Labeling
2326 \labelwidthstring 00.00.0000
2327 \begin_inset Flex Code
2330 \begin_layout Plain Layout
2336 This converter runs some form of LaTeX.
2337 This will make LyX's LaTeX error logs available.
2340 \begin_layout Labeling
2341 \labelwidthstring 00.00.0000
2342 \begin_inset Flex Code
2345 \begin_layout Plain Layout
2352 \begin_inset Flex MenuItem
2355 \begin_layout Plain Layout
2361 file for the conversion.
2364 \begin_layout Labeling
2365 \labelwidthstring 00.00.0000
2366 \begin_inset Flex Code
2369 \begin_layout Plain Layout
2376 \begin_inset Quotes eld
2380 \begin_inset Quotes erd
2383 file from the backend, which in practice means a LaTeX file like the one
2384 we would export, without
2385 \begin_inset Flex Code
2388 \begin_layout Plain Layout
2397 \begin_layout Labeling
2398 \labelwidthstring 00.00.0000
2399 \begin_inset Flex Code
2402 \begin_layout Plain Layout
2411 \begin_layout Standard
2412 The following three flags are not really flags at all because they take
2414 \begin_inset Flex MenuItem
2417 \begin_layout Plain Layout
2419 \begin_inset space ~
2423 \begin_inset space ~
2434 \begin_layout Labeling
2435 \labelwidthstring 00.00.0000
2436 \begin_inset Flex Code
2439 \begin_layout Plain Layout
2445 If set, the converter's standard error will be redirected to a file
2446 \begin_inset Flex Code
2449 \begin_layout Plain Layout
2455 , and the script given as argument will be run as:
2456 \begin_inset Flex Code
2459 \begin_layout Plain Layout
2460 script < infile.out > infile.log
2466 The argument may contain
2467 \begin_inset Flex Code
2470 \begin_layout Plain Layout
2479 \begin_layout Labeling
2480 \labelwidthstring 00.00.0000
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 The name of the directory in which the converter will dump the generated
2492 LyX will not create this directory, and it does not copy anything into
2493 it, though it will copy this directory to the destination.
2494 The argument may contain
2495 \begin_inset Flex Code
2498 \begin_layout Plain Layout
2504 , which will be replaced by the base name of the input and output files,
2505 respectively, when the directory is copied.
2506 \begin_inset Newline newline
2509 Note that resultdir and usetempdir make no sense together.
2510 The latter will be ignored if the former is given.
2513 \begin_layout Labeling
2514 \labelwidthstring 00.00.0000
2515 \begin_inset Flex Code
2518 \begin_layout Plain Layout
2524 Determines the output file name and may, contain
2525 \begin_inset Flex Code
2528 \begin_layout Plain Layout
2535 Sensible only with resultdir and optional even then; if not given, it defaults
2539 \begin_layout Standard
2540 None of these last three are presently used in any of the converters that
2541 are installed with LyX.
2545 \begin_layout Standard
2546 You do not have to define converters for all formats between which you want
2548 For example, you will note that there is no `LyX to PostScript' converter,
2549 but LyX will export PostScript.
2550 It does so by first creating a LaTeX file (no converter needs to be defined
2551 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2552 and finally converting the resulting DVI file to PostScript.
2553 LyX finds such `chains' of converters automatically, and it will always
2554 choose the shortest possible chain.
2555 You can, though, still define multiple conversion methods between file
2557 For example, the standard LyX configuration provides five ways to convert
2561 \begin_layout Enumerate
2563 \begin_inset Flex MenuItem
2566 \begin_layout Plain Layout
2575 \begin_layout Enumerate
2576 via (DVI and) PostScript, using
2577 \begin_inset Flex MenuItem
2580 \begin_layout Plain Layout
2589 \begin_layout Enumerate
2591 \begin_inset Flex MenuItem
2594 \begin_layout Plain Layout
2603 \begin_layout Enumerate
2605 \begin_inset Flex MenuItem
2608 \begin_layout Plain Layout
2617 \begin_layout Enumerate
2619 \begin_inset Flex MenuItem
2622 \begin_layout Plain Layout
2631 \begin_layout Standard
2632 To define such alternate chains, you must define multiple target `file formats',
2634 \begin_inset CommandInset ref
2636 reference "sec:Formats"
2641 For example, in the standard configuration, the formats named
2642 \begin_inset Flex MenuItem
2645 \begin_layout Plain Layout
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2662 \begin_inset Flex MenuItem
2665 \begin_layout Plain Layout
2672 \begin_inset Flex MenuItem
2675 \begin_layout Plain Layout
2682 \begin_inset Flex MenuItem
2685 \begin_layout Plain Layout
2692 \begin_inset Flex MenuItem
2695 \begin_layout Plain Layout
2702 \begin_inset Flex MenuItem
2705 \begin_layout Plain Layout
2712 \begin_inset Flex MenuItem
2715 \begin_layout Plain Layout
2722 \begin_inset Flex MenuItem
2725 \begin_layout Plain Layout
2732 \begin_inset Flex MenuItem
2735 \begin_layout Plain Layout
2741 ) are defined, all of which share the extension
2742 \begin_inset Flex MenuItem
2745 \begin_layout Plain Layout
2751 , and which correspond to the conversion methods just mentioned.
2754 \begin_layout Chapter
2755 Internationalizing LyX
2756 \begin_inset CommandInset label
2758 name "cha:Internationalizing-LyX"
2765 \begin_layout Standard
2766 LyX supports using a translated interface.
2767 Last time we checked, LyX provided text in thirty languages.
2768 The language of choice is called your
2773 (For further reading on locale settings, see also the documentation for
2774 locale that comes with your operating system.
2775 For Linux, the manual page for
2776 \begin_inset Flex Code
2779 \begin_layout Plain Layout
2785 could be a good place to start).
2788 \begin_layout Standard
2789 Notice that these translations will work, but do contain a few flaws.
2790 In particular, all dialogs have been designed with the English text in
2791 mind, which means that some of the translated text will be too large to
2792 fit within the space allocated.
2793 This is only a display problem and will not cause any harm.
2794 Also, you will find that some of the translations do not define shortcut
2795 keys for everything.
2796 Sometimes, there are simply not enough free letters to do it.
2797 Other times, the translator just hasn't got around to doing it yet.
2798 Our localization team, which you may wish to join,
2802 \begin_layout Plain Layout
2803 If you are a fluent speaker of a language other than English, joining these
2804 teams is a great way to give back to the LyX community!
2809 will of course try to fix these shortcomings in future versions of LyX.
2812 \begin_layout Section
2816 \begin_layout Subsection
2817 Translating the graphical user interface (text messages).
2820 \begin_layout Standard
2822 \begin_inset Flex Code
2825 \begin_layout Plain Layout
2831 library to handle the internationalization of the interface.
2832 To have LyX speak your favorite language in all menus and dialogs, you
2834 \begin_inset Flex Code
2837 \begin_layout Plain Layout
2843 -file for that language.
2844 When this is available, you'll have to generate a
2845 \begin_inset Flex Code
2848 \begin_layout Plain Layout
2854 -file from it and install the
2855 \begin_inset Flex Code
2858 \begin_layout Plain Layout
2865 The process of doing all of this is explained in the documentation for
2867 \begin_inset Flex Code
2870 \begin_layout Plain Layout
2877 It is possible to do this just for yourself, but if you're going to do
2878 it, you might as well share the results of your labors with the rest of
2880 Send a message to the LyX developers' list for more information about how
2884 \begin_layout Standard
2885 In short, this is what you should do (xx denotes the language code):
2888 \begin_layout Itemize
2889 Check out the LyX source code.
2891 \begin_inset CommandInset href
2893 name "information on the web"
2894 target "http://www.lyx.org/HowToUseSVN"
2901 \begin_layout Itemize
2903 \begin_inset Flex Code
2906 \begin_layout Plain Layout
2912 to the folder of the
2913 \begin_inset Flex Code
2916 \begin_layout Plain Layout
2924 \begin_inset Flex Code
2927 \begin_layout Plain Layout
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 doesn't exist anywhere, it can be remade with the console command
2945 \begin_inset Flex Code
2948 \begin_layout Plain Layout
2954 in that directory, or you can use an existing po-file for some other language
2958 \begin_layout Itemize
2960 \begin_inset Flex Code
2963 \begin_layout Plain Layout
2973 \begin_layout Plain Layout
2974 This is just a text file, so it can be edited in any text editor.
2975 But there are also specialized programs that support such editing, such
2980 (for all platforms) or
2989 contains a `mode' for editing
2990 \begin_inset Flex Code
2993 \begin_layout Plain Layout
3004 For some menu- and widget-labels, there are also shortcut keys that should
3006 Those keys are marked after a `|', and should be translated according to
3007 the words and phrases of the language.
3008 You should also fill also out the information at the beginning of the new
3010 \begin_inset Flex Code
3013 \begin_layout Plain Layout
3019 -file with your email-address, etc., so people know where to reach you with
3020 suggestions and entertaining flames.
3023 \begin_layout Standard
3024 If you are just doing this on your own, then:
3027 \begin_layout Itemize
3029 \begin_inset Flex Code
3032 \begin_layout Plain Layout
3039 This can be done with
3040 \begin_inset Flex Code
3043 \begin_layout Plain Layout
3044 msgfmt -o xx.mo < xx.po
3052 \begin_layout Itemize
3054 \begin_inset Flex Code
3057 \begin_layout Plain Layout
3063 -file to your locale-tree, at the correct directory for application messages
3068 xx, and under the name
3069 \begin_inset Flex Code
3072 \begin_layout Plain Layout
3079 \begin_inset space \thinspace{}
3083 \begin_inset space \space{}
3087 \begin_inset Flex Code
3090 \begin_layout Plain Layout
3091 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3101 \begin_layout Standard
3102 As said, however, it would be best if the new
3103 \begin_inset Flex Code
3106 \begin_layout Plain Layout
3112 -file could be added to the LyX distribution, so others can use it.
3113 Adding it involves making additional changes to LyX.
3114 So send an email to the developers' mailing list if you're interested in
3118 \begin_layout Subsubsection
3122 \begin_layout Standard
3123 Sometimes it turns out that one English message needs to be translated into
3124 different messages in the target language.
3125 One example is the message
3126 \begin_inset Flex Code
3129 \begin_layout Plain Layout
3135 which has the German translation
3143 , depending upon exactly what the English
3144 \begin_inset Quotes eld
3148 \begin_inset Quotes erd
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3162 does not handle such ambiguous translations.
3163 Therefore you have to add some context information to the message: Instead
3165 \begin_inset Flex Code
3168 \begin_layout Plain Layout
3175 \begin_inset Flex Code
3178 \begin_layout Plain Layout
3179 To[[as in 'From format x to format y']]
3185 \begin_inset Flex Code
3188 \begin_layout Plain Layout
3189 To[[as in 'From page x to page y']].
3194 Now the two occurrences of
3195 \begin_inset Flex Code
3198 \begin_layout Plain Layout
3205 \begin_inset Flex Code
3208 \begin_layout Plain Layout
3214 and can be translated correctly to
3225 \begin_layout Standard
3226 Of course the context information needs to be stripped off the original
3227 message when no translation is used.
3228 Therefore you have to put it in double square brackets at the end of the
3229 message (see the example above).
3230 The translation mechanism of LyX ensures that everything in double square
3231 brackets at the end of messages is removed before displaying the message.
3234 \begin_layout Subsection
3235 Translating the documentation.
3238 \begin_layout Standard
3239 The online documentation (in the
3240 \begin_inset Flex MenuItem
3243 \begin_layout Plain Layout
3249 -menu) can (and should!) be translated.
3250 If there are translated versions of the documentation available
3254 \begin_layout Plain Layout
3255 As of March 2008, at least some of the documents have been translated into
3256 fourteen languages, with the Tutorial available in a few more.
3261 and the locale is set accordingly, these will be used automagically by
3263 LyX looks for translated versions as
3264 \begin_inset Flex Code
3267 \begin_layout Plain Layout
3268 LyXDir/doc/xx/DocName.lyx
3274 \begin_inset Flex Code
3277 \begin_layout Plain Layout
3283 is the code for the language currently in use.
3284 If there are no translated documents, the default English versions will
3286 Note that the translated versions must have the same filenames (
3287 \begin_inset Flex Code
3290 \begin_layout Plain Layout
3296 above) as the original.
3297 If you feel up to translating the documentation (an excellent way to proof-read
3298 the original documentation by the way!), there are a few things you should
3302 \begin_layout Itemize
3303 Check out the documentation translation web page at
3304 \begin_inset CommandInset href
3306 name "http://www.lyx.org/Translation"
3307 target "http://www.lyx.org/Translation"
3312 That way, you can find out which (if any) documents have already been translate
3313 d into your language.
3314 You can also find out who (if anyone) is organizing the effort to translate
3315 the documentation into your language.
3316 If no one is organizing the effort, please let us know that you're interested.
3319 \begin_layout Standard
3320 Once you get to actually translating, here's a few hints for you that may
3324 \begin_layout Itemize
3325 Join the documentation team! There is information on how to do that in
3326 \begin_inset Flex Code
3329 \begin_layout Plain Layout
3336 \begin_inset Flex MenuItem
3339 \begin_layout Plain Layout
3340 Help\SpecialChar \menuseparator
3346 ), which by the way is the first document you should translate.
3349 \begin_layout Itemize
3350 Learn the typographic conventions for the language you are translating to.
3351 Typography is an ancient art and over the centuries, a great variety of
3352 conventions have developed throughout different parts of the world.
3353 Also study the professional terminology amongst typographers in your country.
3354 Inventing your own terminology will only confuse the users.
3357 (Warning! Typography is addictive!)
3360 \begin_layout Itemize
3361 Make a copy of the document.
3362 This will be your working copy.
3363 You can use this as your personal translated help-file by placing it in
3365 \begin_inset Flex Code
3368 \begin_layout Plain Layout
3377 \begin_layout Itemize
3378 Sometimes the original document (from the LyX-team) will be updated.
3379 Use the source viewer at
3380 \begin_inset CommandInset href
3382 name "http://www.lyx.org/trac/timeline"
3383 target "http://www.lyx.org/trac/timeline"
3387 to see what has been changed.
3388 That way you can easily see which parts of the translated document need
3392 \begin_layout Standard
3393 If you ever find an error in the original document, fix it and notify the
3394 rest of the documentation team of the changes! (You didn't forget to join
3395 the documentation team, did you?)
3398 \begin_layout Standard
3399 \begin_inset Branch OutDated
3402 \begin_layout Section
3403 International Keyboard Support
3406 \begin_layout Standard
3409 [Editor's Note: The following section is by
3417 It needs to be fixed to conform to the new Documentation Style sheet and
3418 to make use of the new v1.0 features.
3419 The whole thing also needs to be merged with the section following it.-jw
3420 It may also be badly out of date.-rh (2008)]
3423 \begin_layout Subsection
3424 Defining Own Keymaps: Keymap File Format
3427 \begin_layout Standard
3428 Let's look at a keyboard definition file a little closer.
3429 It is a plain text file defining
3432 \begin_layout Itemize
3433 key-to-key or key-to-string translations
3436 \begin_layout Itemize
3440 \begin_layout Itemize
3441 dead keys exceptions
3444 \begin_layout Standard
3445 To define key-to-key or key-to-string translation, use this command:
3448 \begin_layout Quotation
3449 \begin_inset Flex Code
3452 \begin_layout Plain Layout
3461 \begin_inset Flex Code
3464 \begin_layout Plain Layout
3473 \begin_layout Standard
3475 \begin_inset Flex Code
3478 \begin_layout Plain Layout
3484 is the key to be translated and
3485 \begin_inset Flex Code
3488 \begin_layout Plain Layout
3494 is the string to be inserted into the document.
3495 To define dead keys, use:
3498 \begin_layout Quotation
3499 \begin_inset Flex Code
3502 \begin_layout Plain Layout
3511 \begin_inset Flex Code
3514 \begin_layout Plain Layout
3523 \begin_layout Standard
3525 \begin_inset Flex Code
3528 \begin_layout Plain Layout
3534 is a keyboard key and
3535 \begin_inset Flex Code
3538 \begin_layout Plain Layout
3545 The following dead keys are supported (shortcut name is in parentheses):
3548 \begin_layout Quotation
3552 \begin_inset space \hfill{}
3558 \begin_layout Quotation
3560 \begin_inset space \hfill{}
3566 \begin_layout Quotation
3568 \begin_inset space \hfill{}
3574 \begin_layout Quotation
3576 \begin_inset space \hfill{}
3582 \begin_layout Quotation
3584 \begin_inset space \hfill{}
3590 \begin_layout Quotation
3592 \begin_inset space \hfill{}
3599 \begin_layout Plain Layout
3611 \begin_layout Quotation
3613 \begin_inset space \hfill{}
3619 \begin_layout Quotation
3621 \begin_inset space \hfill{}
3628 \begin_layout Plain Layout
3640 \begin_layout Quotation
3642 \begin_inset space \hfill{}
3648 \begin_layout Quotation
3650 \begin_inset space \hfill{}
3656 \begin_layout Quotation
3658 \begin_inset space \hfill{}
3665 \begin_layout Plain Layout
3677 \begin_layout Quotation
3679 \begin_inset space \hfill{}
3686 \begin_layout Plain Layout
3698 \begin_layout Quotation
3700 \begin_inset space \hfill{}
3706 \begin_layout Quotation
3707 hungarian umlaut (hug)
3708 \begin_inset space \hfill{}
3714 \begin_layout Quotation
3716 \begin_inset space \hfill{}
3722 \begin_layout Quotation
3724 \begin_inset space \hfill{}
3731 \begin_layout Plain Layout
3743 \begin_layout Standard
3744 Since in many international keyboards there are exceptions to what some
3745 dead keys should do, you can define them using
3748 \begin_layout Quotation
3749 \begin_inset Flex Code
3752 \begin_layout Plain Layout
3760 deadkey key outstring
3763 \begin_layout Standard
3764 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3768 \begin_layout Quotation
3769 \begin_inset Flex Code
3772 \begin_layout Plain Layout
3785 \begin_layout Standard
3786 to make it work correctly.
3787 Also, you have to define as exceptions dead keys over i and j, to remove
3788 the dot from them before inserting an accent mark.
3789 I will change this when the time comes, but so far I haven't had time.
3792 \begin_layout Standard
3793 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3796 \begin_inset Flex Code
3799 \begin_layout Plain Layout
3805 have different meaning.
3807 \begin_inset Flex Code
3810 \begin_layout Plain Layout
3816 marks comments, quotes start and end LaTeX-style commands.
3817 To enter quote, you'll need to use
3818 \begin_inset Flex Code
3821 \begin_layout Plain Layout
3830 \begin_inset Flex Code
3833 \begin_layout Plain Layout
3840 \begin_inset Flex Code
3843 \begin_layout Plain Layout
3854 \begin_layout Standard
3855 If you make a keyboard description file that works for your language, please
3856 mail it to me, so I can include it in the next keymap distribution.
3859 \begin_layout Standard
3860 More keywords will be supported in keymap configuration file in future,
3864 \begin_layout Itemize
3865 \begin_inset Flex Code
3868 \begin_layout Plain Layout
3879 \begin_inset space \hfill{}
3883 \begin_inset Flex Code
3886 \begin_layout Plain Layout
3895 \begin_layout Itemize
3896 \begin_inset Flex Code
3899 \begin_layout Plain Layout
3910 \begin_inset space \hfill{}
3914 \begin_inset Flex Code
3917 \begin_layout Plain Layout
3923 an external keymap translation program
3926 \begin_layout Standard
3927 Also, it should look into
3928 \begin_inset Flex Code
3931 \begin_layout Plain Layout
3937 file for defaults, too (for example, a
3938 \begin_inset Flex Code
3941 \begin_layout Plain Layout
3949 option to include default keyboard).
3957 \begin_layout Section
3958 International Keymap Stuff
3959 \begin_inset CommandInset label
3961 name "sec:International-Keymap-Stuff"
3968 \begin_layout Standard
3969 \begin_inset Note Note
3972 \begin_layout Plain Layout
3973 In doing the revisions on this document in March 2008, I did not look over
3974 this stuff, as I do not understand it.
3975 It would be good if someone else could do so.
3984 \begin_layout Standard
3985 The next two sections describe the
3986 \begin_inset Flex Code
3989 \begin_layout Plain Layout
3998 \begin_inset Flex Code
4001 \begin_layout Plain Layout
4009 file syntax in detail.
4010 These sections should help you design your own key map if the ones provided
4011 do not meet your needs.
4014 \begin_layout Subsection
4018 \begin_layout Standard
4022 \begin_inset Flex Code
4025 \begin_layout Plain Layout
4031 file maps keystrokes to characters or strings.
4032 As the name suggests, it sets a keyboard mapping.
4034 \begin_inset Flex Code
4037 \begin_layout Plain Layout
4048 \begin_inset Flex Code
4051 \begin_layout Plain Layout
4066 \begin_inset Flex Code
4069 \begin_layout Plain Layout
4082 \begin_inset Flex Code
4085 \begin_layout Plain Layout
4094 \begin_inset Flex Code
4097 \begin_layout Plain Layout
4105 are described in this section.
4108 \begin_layout Labeling
4109 \labelwidthstring 00.00.0000
4110 \begin_inset Flex Code
4113 \begin_layout Plain Layout
4121 Map a character to a string
4124 \begin_layout LyX-Code
4139 \begin_layout Standard
4172 the double-quote (")
4189 must be escaped with a preceding backslash (
4200 \begin_layout Standard
4202 \begin_inset Flex MenuItem
4205 \begin_layout Plain Layout
4213 statement to cause the symbol
4214 \begin_inset Flex MenuItem
4217 \begin_layout Plain Layout
4225 to be output for the keystroke
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4240 \begin_layout LyX-Code
4246 \begin_layout Labeling
4247 \labelwidthstring 00.00.0000
4248 \begin_inset Flex Code
4251 \begin_layout Plain Layout
4259 Specify an accent character
4262 \begin_layout LyX-Code
4271 \begin_layout Standard
4272 This will make the cha
4310 This is the dead key
4314 \begin_layout Plain Layout
4321 refers to a key that does not produce a character by itself, but when followed
4322 with another key, produces the desired accent character.
4323 For example, a German characte
4325 r with an umlaut like
4335 can be produced in this manner.
4344 \begin_layout Standard
4357 and then another key not in
4374 followed by the other, not allowed key, as output.
4378 \begin_inset Flex MenuItem
4381 \begin_layout Plain Layout
4389 cancels a dead key, so if
4400 \begin_inset Flex MenuItem
4403 \begin_layout Plain Layout
4412 , the cursor will not go one position backwards but will instead cancel
4428 might have had on the next keystroke.
4432 \begin_layout Standard
4433 The following example specifies that the character ' is to be an acute accent,
4434 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4437 \begin_layout LyX-Code
4440 kmod ' acute aeiouAEIOU
4443 \begin_layout Labeling
4444 \labelwidthstring 00.00.0000
4445 \begin_inset Flex Code
4448 \begin_layout Plain Layout
4454 Specify an exception to the accent character
4457 \begin_layout LyX-Code
4466 \begin_layout Standard
4467 This defines an exce
4508 have been assigned a keystroke with a previous
4511 \begin_inset Flex Code
4514 \begin_layout Plain Layout
4538 must not belong in the
4585 If such a declaration does not exist in
4593 \begin_inset Flex Code
4596 \begin_layout Plain Layout
4630 \begin_inset Flex Code
4633 \begin_layout Plain Layout
4647 \begin_layout Standard
4648 The following command produces causes äi to be produced when you enter acute-i
4652 \begin_layout LyX-Code
4666 \begin_layout Labeling
4667 \labelwidthstring 00.00.0000
4668 \begin_inset Flex Code
4671 \begin_layout Plain Layout
4677 Combine two accent characters
4680 \begin_layout LyX-Code
4686 accent1 accent2 allowed
4689 \begin_layout Standard
4690 This one is getting pretty esoteric.
4691 It allows you to combine the effect
4747 \begin_inset Flex Code
4750 \begin_layout Plain Layout
4778 \begin_layout Standard
4779 Consider this example from the
4780 \begin_inset Flex Code
4783 \begin_layout Plain Layout
4794 \begin_layout LyX-Code
4797 kmod ; acute aeioyvhAEIOYVH
4801 kcomb acute umlaut iyIY
4804 \begin_layout Standard
4805 This allows you to press
4806 \begin_inset Flex MenuItem
4809 \begin_layout Plain Layout
4817 and get the effect of
4818 \begin_inset Flex Code
4821 \begin_layout Plain Layout
4840 in this case cancels the last dead key, so if you press
4841 \begin_inset Flex MenuItem
4844 \begin_layout Plain Layout
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4869 \begin_layout Subsection
4873 \begin_layout Standard
4875 \begin_inset Flex Code
4878 \begin_layout Plain Layout
4886 mapping is performed, a
4887 \begin_inset Flex Code
4890 \begin_layout Plain Layout
4900 file maps the strings that the symbols generate to characters in the current
4902 The LyX distribution currently includes at least the
4903 \begin_inset Flex Code
4906 \begin_layout Plain Layout
4915 \begin_inset Flex Code
4918 \begin_layout Plain Layout
4929 \begin_layout Standard
4931 \begin_inset Flex Code
4934 \begin_layout Plain Layout
4942 file is a sequence of declarations of the form
4945 \begin_layout LyX-Code
4958 \begin_layout Standard
4959 For example, in order to map
4960 \begin_inset Flex MenuItem
4963 \begin_layout Plain Layout
4973 to the corresponding character in the iso-8859-1 set (233), the following
4977 \begin_layout LyX-Code
4985 \begin_layout Standard
4987 \begin_inset Flex Code
4990 \begin_layout Plain Layout
4999 \begin_inset Flex Code
5002 \begin_layout Plain Layout
5020 the same character can apply to more than one string.
5022 \begin_inset Flex Code
5025 \begin_layout Plain Layout
5036 \begin_layout LyX-Code
5048 \begin_inset Newline newline
5064 \begin_layout Standard
5065 If LyX cannot find a mapping for the string produced by the keystroke or
5066 a deadkey sequence, it will check if it looks like an accented char and
5067 try to draw an accent over the character on screen.
5070 \begin_layout Subsection
5074 \begin_layout Standard
5075 There is a second way to add support for international characters through
5076 so-called dead-keys.
5077 A dead-key works in combination with a letter to produce an accented character.
5078 Here, we'll explain how to create a really simple dead-key to illustrate
5082 \begin_layout Standard
5083 Suppose you happen to need the circumflex character,
5084 \begin_inset Quotes eld
5088 \begin_inset Quotes erd
5093 \begin_inset Flex MenuItem
5096 \begin_layout Plain Layout
5103 \begin_inset space ~
5107 \begin_inset Flex MenuItem
5110 \begin_layout Plain Layout
5116 ] to the LyX command
5117 \begin_inset Flex Code
5120 \begin_layout Plain Layout
5127 \begin_inset Flex Code
5130 \begin_layout Plain Layout
5137 Now, whenever you type the
5138 \begin_inset Flex MenuItem
5141 \begin_layout Plain Layout
5147 -key followed by a letter, that letter will have a circumflex accent on
5149 For example, the sequence
5150 \begin_inset Quotes eld
5154 \begin_inset Flex MenuItem
5157 \begin_layout Plain Layout
5164 \begin_inset Quotes erd
5167 produces the letter:
5168 \begin_inset Quotes eld
5172 \begin_inset Quotes erd
5176 If you tried to type
5177 \begin_inset Quotes eld
5181 \begin_inset Flex MenuItem
5184 \begin_layout Plain Layout
5191 \begin_inset Quotes erd
5194 , however, LyX will complain with a beep, since a
5195 \begin_inset Quotes eld
5199 \begin_inset Flex MenuItem
5202 \begin_layout Plain Layout
5209 \begin_inset Quotes erd
5212 never takes a circumflex accent.
5214 \begin_inset Flex MenuItem
5217 \begin_layout Plain Layout
5223 after a dead-key produces the bare-accent.
5224 Please note this last point! If you bind a key to a dead-key, you'll need
5225 to rebind the character on that key to yet another key.
5227 \begin_inset Flex MenuItem
5230 \begin_layout Plain Layout
5236 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5239 \begin_layout Standard
5240 One common way to bind dead-keys is to use
5241 \begin_inset Flex MenuItem
5244 \begin_layout Plain Layout
5251 \begin_inset Flex MenuItem
5254 \begin_layout Plain Layout
5261 \begin_inset Flex MenuItem
5264 \begin_layout Plain Layout
5270 in combination with an accent, like
5271 \begin_inset Quotes eld
5275 \begin_inset Flex MenuItem
5278 \begin_layout Plain Layout
5285 \begin_inset Quotes erd
5289 \begin_inset Quotes eld
5293 \begin_inset Flex MenuItem
5296 \begin_layout Plain Layout
5303 \begin_inset Quotes erd
5307 \begin_inset Quotes eld
5311 \begin_inset Flex MenuItem
5314 \begin_layout Plain Layout
5321 \begin_inset Quotes erd
5325 Another way involves using
5326 \begin_inset Flex Code
5329 \begin_layout Plain Layout
5336 \begin_inset Flex Code
5339 \begin_layout Plain Layout
5345 to set up the special
5346 \begin_inset Flex Code
5349 \begin_layout Plain Layout
5357 \begin_inset Flex Code
5360 \begin_layout Plain Layout
5366 acts in some ways just like
5367 \begin_inset Flex MenuItem
5370 \begin_layout Plain Layout
5376 and permits you to bind keys to accented characters.
5377 You can also turn keys into dead-keys by binding them to something like
5379 \begin_inset Flex Code
5382 \begin_layout Plain Layout
5388 and then binding this symbolic key to the corresponding LyX command.
5392 \begin_layout Plain Layout
5397 : This is exactly what I do in my
5398 \begin_inset Flex Code
5401 \begin_layout Plain Layout
5408 \begin_inset Flex Code
5411 \begin_layout Plain Layout
5419 \begin_inset Flex MenuItem
5422 \begin_layout Plain Layout
5424 \begin_inset space ~
5433 \begin_inset Flex Code
5436 \begin_layout Plain Layout
5442 and a bunch of these
5443 \begin_inset Quotes eld
5447 \begin_inset Flex Code
5450 \begin_layout Plain Layout
5457 \begin_inset Quotes erd
5460 symbolic keys bound such things as
5461 \begin_inset Flex MenuItem
5464 \begin_layout Plain Layout
5466 \begin_inset space ~
5475 \begin_inset Flex MenuItem
5478 \begin_layout Plain Layout
5480 \begin_inset space ~
5489 This is how I produce my accented characters.
5494 You can make just about anything into the
5495 \begin_inset Flex Code
5498 \begin_layout Plain Layout
5505 \begin_inset Flex MenuItem
5508 \begin_layout Plain Layout
5514 keys, a spare function key, etc.
5515 As for the LyX commands that produce accents, check the entry for
5516 \begin_inset Flex Code
5519 \begin_layout Plain Layout
5530 You'll find the complete list there.
5533 \begin_layout Subsection
5534 Saving your Language Configuration
5537 \begin_layout Standard
5538 You can edit your preferences so that your desired language environment
5539 is automatically configured when LyX starts up, via the
5540 \begin_inset Flex MenuItem
5543 \begin_layout Plain Layout
5544 Edit\SpecialChar \menuseparator
5553 \begin_layout Chapter
5554 Installing New Document Classes, Layouts, and Templates
5555 \begin_inset CommandInset label
5557 name "cha:Installing-New-Document"
5562 \begin_inset Argument 1
5565 \begin_layout Plain Layout
5566 Installing New Document Classes
5574 \begin_layout Standard
5575 In this chapter, we describe the procedures for creating and installing
5576 new LyX layout and template files, as well as offer a refresher on correctly
5577 installing new LaTeX document classes.
5581 \begin_layout Standard
5582 First, let us a say a few words about how one ought to think about the relation
5583 between LyX and LaTeX.
5584 The thing to understand is that, in a certain sense, LyX doesn't know anything
5586 Indeed, from LyX's point of view, LaTeX is just one of several
5587 \begin_inset Quotes eld
5591 \begin_inset Quotes erd
5594 in which it is capable of producing output.
5595 Other such formats are DocBook, plaintext, and XHTML.
5596 LaTeX is, of course, a particularly important format, but very little of
5597 the information LyX has about LaTeX is actually contained in the program
5602 \begin_layout Plain Layout
5603 Some commands are sufficiently complex that they are
5604 \begin_inset Quotes eld
5608 \begin_inset Quotes erd
5612 But the developers generally regard this as a Bad Thing.
5617 Rather, that information, even for the standard classes like
5618 \begin_inset Flex Code
5621 \begin_layout Plain Layout
5627 , is contained in `layout files'.
5628 Similarly, LyX itself does not know much about DocBook or XHTML.
5629 What it knows is contained in layout files.
5632 \begin_layout Standard
5633 You can think of the layout file for a given document class as a translation
5634 manual between LyX constructs---paragraphs with their corresponding styles,
5635 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5637 Almost everything LyX knows about
5638 \begin_inset Flex Code
5641 \begin_layout Plain Layout
5647 , for example, is contained in the file
5648 \begin_inset Flex Code
5651 \begin_layout Plain Layout
5657 and in various other files it includes.
5658 For this reason, anyone intending to write layout files should plan to
5659 study the existing files.
5660 A good place to start is with
5661 \begin_inset Flex Code
5664 \begin_layout Plain Layout
5670 , which is included in
5671 \begin_inset Flex Code
5674 \begin_layout Plain Layout
5681 \begin_inset Flex Code
5684 \begin_layout Plain Layout
5690 , and many of the other layout files for document classes.
5691 This file is where sections and the like are defined:
5692 \begin_inset Flex Code
5695 \begin_layout Plain Layout
5701 tells LyX how paragraphs that are marked with the Section, Subsection,
5702 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5705 \begin_inset Flex Code
5708 \begin_layout Plain Layout
5714 file basically just includes several of these
5715 \begin_inset Flex Code
5718 \begin_layout Plain Layout
5727 \begin_layout Standard
5728 Defining the LyX--LaTeX correspondence is not the only thing layout files
5730 Their other job is to define how the LyX constructs themselves will appear
5732 The fact that layout files have these two jobs is often a source of confusion,
5733 because they are completely separate.
5734 Telling LyX how to translate a certain paragraph style into LaTeX does
5735 not tell LyX how to display it; conversely, telling LyX how to display
5736 a certain paragraph style does not tell LyX how to translate it into LaTeX
5737 (let alone tell LaTeX how to display it).
5738 So, in general, when you define a new LyX construct, you must always do
5739 two quite separate things: (i)
5740 \begin_inset space ~
5743 tell LyX how to translate it into LaTeX and (ii)
5744 \begin_inset space ~
5747 tell LyX how to display it.
5750 \begin_layout Standard
5751 Much the same is true, of course, as regards LyX's other backend formats,
5752 though XHTML is in some ways different, because in that case LyX
5756 able, to some extent, to use information about how it should display a
5757 paragraph on the screen to output information (in the form of CSS) about
5758 how the paragraph should be displayed in a browser.
5759 Even in this case, however, the distinction between what LyX does internally
5760 and how things are rendered externally remains in force, and the two can
5761 be controlled separately.
5763 \begin_inset CommandInset ref
5765 reference "sec:Tags-for-XHTML"
5772 \begin_layout Section
5773 Installing new LaTeX files
5776 \begin_layout Standard
5777 Some installations may not include a LaTeX package or class file that you
5778 would like to use within LyX.
5779 For example, you might need FoilTeX, a package for preparing slides for
5780 overhead projectors.
5781 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5782 a user interface for installing such packages.
5783 For example, with MiKTeX, you start the program
5784 \begin_inset Quotes eld
5788 \begin_inset space ~
5792 \begin_inset Quotes erd
5795 to get a list of available packages.
5796 To install one of them, right click on it or use the corresponding toolbar
5800 \begin_layout Standard
5801 If your LaTeX distribution does not provide such a `package manager', or
5802 if the package is not available from your distribution, then follow these
5803 steps to install it manually:
5806 \begin_layout Enumerate
5807 Get the package from
5808 \begin_inset CommandInset href
5811 target "http://www.ctan.org/"
5818 \begin_layout Enumerate
5819 If the package contains a file with the ending
5820 \begin_inset Quotes eld
5824 \begin_inset Flex Code
5827 \begin_layout Plain Layout
5834 \begin_inset Quotes erd
5837 (is the case for FoilTeX) then open a console, change to the folder of
5838 this file and execute the command
5839 \begin_inset Flex Code
5842 \begin_layout Plain Layout
5849 You have now unpacked the package and have all files to install it.
5850 Most LaTeX-packages are not packed and you can skip this step.
5853 \begin_layout Enumerate
5854 Now you need to decide if the package should be available for all users
5856 \begin_inset Separator parbreak
5863 \begin_layout Enumerate
5864 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5865 for all users on your system, then install it in your `local' TeX tree,
5866 otherwise install it in your own `user' TeX tree.
5867 Where these trees should be created, if they do not already exist, depends
5869 To find this out, look in the file
5870 \begin_inset Flex Code
5873 \begin_layout Plain Layout
5883 \begin_layout Plain Layout
5884 This is usually in the directory
5885 \begin_inset Flex Code
5888 \begin_layout Plain Layout
5894 , though you can execute the command
5895 \begin_inset Flex Code
5898 \begin_layout Plain Layout
5909 The location of the `local' TeX tree is defined by the
5910 \begin_inset Flex Code
5913 \begin_layout Plain Layout
5919 variable; this is usually somewhere like
5920 \begin_inset Flex Code
5923 \begin_layout Plain Layout
5924 /usr/local/share/texmf
5930 The location of the `user' TeX tree is defined by
5931 \begin_inset Flex Code
5934 \begin_layout Plain Layout
5941 \begin_inset Flex Code
5944 \begin_layout Plain Layout
5951 (If these variables are not predefined, you have to define them.) You'll
5952 probably need root permissions to create or modify the `local' tree, but
5953 not for your `user' tree.
5954 \begin_inset Newline newline
5957 In general, it is recommended to install in the user tree because your user
5958 will not be modified or even overwritten when you upgrade your system.
5959 It will typically also be backed up together with everything else when
5960 you backup your home directory (which, of course, you do on a regular basis).
5963 \begin_layout Enumerate
5964 On Windows, if you want the new package to be available for all users on
5965 your system, change to the folder where LaTeX is installed and then change
5967 \begin_inset Flex Code
5970 \begin_layout Plain Layout
5981 (For MiKTeX, this would be by default the folder
5982 \begin_inset Flex Code
5985 \begin_layout Plain Layout
6003 \begin_layout Plain Layout
6004 Note that this will be the correct path only on English installations.
6005 On a German one, it would be
6006 \begin_inset Flex Code
6009 \begin_layout Plain Layout
6023 , and similarly for other languages.
6028 Create there a new folder
6029 \begin_inset Flex Code
6032 \begin_layout Plain Layout
6038 and copy all files of the package into it.
6040 \begin_inset Newline newline
6043 If the package should only available for you or you don't have admin permissions
6044 , do the same, but in the local LaTeX folder.
6046 \begin_inset space \thinspace{}
6050 \begin_inset space ~
6053 2.8 under Windows XP, this would be the folder:
6054 \begin_inset Newline newline
6060 \begin_inset Flex Code
6063 \begin_layout Plain Layout
6066 Documents and Settings
6078 \begin_inset Newline newline
6084 \begin_inset Phantom HPhantom
6087 \begin_layout Plain Layout
6098 \begin_inset Flex Code
6101 \begin_layout Plain Layout
6114 \begin_inset Newline newline
6117 On Vista, it would be:
6118 \begin_inset Newline newline
6122 \begin_inset Flex Code
6125 \begin_layout Plain Layout
6151 \begin_layout Enumerate
6152 Now one only need to tell LaTeX that there are new files.
6153 This depends on the used LaTeX-Distribution:
6154 \begin_inset Separator parbreak
6161 \begin_layout Enumerate
6162 For TeXLive execute the command
6163 \begin_inset Flex Code
6166 \begin_layout Plain Layout
6173 If you installed the package for all users, then you will probably need
6174 to have root permissions for that.
6177 \begin_layout Enumerate
6178 For MiKTeX, if you have installed the package for all users, start the program
6180 \begin_inset Quotes eld
6184 \begin_inset space ~
6188 \begin_inset Quotes erd
6191 and press the button marked
6192 \begin_inset Quotes eld
6196 \begin_inset Quotes erd
6200 Otherwise start the program
6201 \begin_inset Quotes eld
6205 \begin_inset Quotes erd
6212 \begin_layout Enumerate
6213 Finally, you need to tell LyX that there are new packages available.
6214 So, in LyX, use the menu
6215 \begin_inset Flex MenuItem
6218 \begin_layout Plain Layout
6221 \SpecialChar \menuseparator
6227 and then restart LyX.
6230 \begin_layout Standard
6231 Now the package is installed.
6232 In our example, the document class
6233 \begin_inset Flex Code
6236 \begin_layout Plain Layout
6238 \begin_inset space ~
6245 \begin_layout Plain Layout
6257 will now be available under
6258 \begin_inset Flex MenuItem
6261 \begin_layout Plain Layout
6262 Document\SpecialChar \menuseparator
6263 Settings\SpecialChar \menuseparator
6273 \begin_layout Standard
6274 If you would like to use a LaTeX document class that is not even listed
6276 \begin_inset Flex MenuItem
6279 \begin_layout Plain Layout
6280 Document\SpecialChar \menuseparator
6281 Settings\SpecialChar \menuseparator
6287 , then you need to create a `layout' file for it.
6288 That is the topic of the next section.
6291 \begin_layout Section
6292 Types of layout files
6295 \begin_layout Standard
6296 This section describes the various sorts of LyX files that contain layout
6298 These files describe various paragraph and character styles, determining
6299 how LyX should display them and how they should be translated into LaTeX,
6300 DocBook, XHTML, or whatever output format is being used.
6304 \begin_layout Standard
6305 We shall try to provide a thorough description of the process of writing
6307 However, there are so many different types of documents supported even
6308 by just LaTeX that we can't hope to cover every different possibility or
6309 problem you might encounter.
6310 The LyX users' list is frequented by people with lots of experience with
6311 layout design who are willing to share what they've learned, so please
6312 feel free to ask questions there.
6315 \begin_layout Standard
6316 As you prepare to write a new layout, it is extremely helpful to look at
6317 the layouts distributed with LyX.
6318 If you write a LyX layout for a LaTeX document class that might also be
6319 used by others, or write a module that might be useful to others, then
6320 you should consider posting your layout to the
6321 \begin_inset CommandInset href
6323 name "layout section on the LyX wiki"
6324 target "http://wiki.lyx.org/Layouts/Layouts"
6328 or even to the LyX developers' list, so that it might be included in LyX
6333 \begin_layout Plain Layout
6334 Note that LyX is licensed under the General Public License, so any material
6335 that is contributed to LyX must be similarly licensed.
6343 \begin_layout Subsection
6345 \begin_inset CommandInset label
6347 name "sub:Layout-modules"
6354 \begin_layout Standard
6355 We have spoken to this point about `layout files'.
6356 But there are different sorts of files that contain layout information.
6357 Layout files, strictly so called, have the
6358 \begin_inset Flex Code
6361 \begin_layout Plain Layout
6367 extension and provide LyX with information about document classes.
6368 Since LyX 1.6 layout information can also be contained in layout
6373 \begin_inset Flex Code
6376 \begin_layout Plain Layout
6383 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6384 some modules—such as the
6385 \begin_inset Flex Code
6388 \begin_layout Plain Layout
6394 module—specifically provide support for one package.
6395 In a sense, layout modules are similar to included
6399 \begin_layout Plain Layout
6400 These can have any extension, but by convention have the
6401 \begin_inset Flex Code
6404 \begin_layout Plain Layout
6416 \begin_inset Flex Code
6419 \begin_layout Plain Layout
6425 —in that modules are not specific to a given document class but may be used
6426 with many different classes.
6427 The difference is that using an included file with
6428 \begin_inset Flex Code
6431 \begin_layout Plain Layout
6437 requires editing that file.
6438 Modules, by contrast, are selected in the
6439 \begin_inset Flex MenuItem
6442 \begin_layout Plain Layout
6443 Document\SpecialChar \menuseparator
6452 \begin_layout Standard
6453 Building modules is the easiest way to get started with layout editing,
6454 since it can be as simple as adding a single new paragraph style or flex
6456 But modules may, in principle, contain anything a layout file can contain.
6459 \begin_layout Standard
6460 After creating a new module and copying it to the
6461 \begin_inset Flex Code
6464 \begin_layout Plain Layout
6470 folder, you will need to reconfigure and then restart LyX for the module
6471 to appear in the menu.
6472 However, changes you make to the module will be seen immediately, if you
6474 \begin_inset Flex MenuItem
6477 \begin_layout Plain Layout
6478 Document\SpecialChar \menuseparator
6484 , highlight something, and then hit
6485 \begin_inset Quotes eld
6489 \begin_inset Quotes erd
6495 It is strongly recommended that you save your work before doing this
6500 it is strongly recommended that you not attempt to edit modules while simultaneo
6501 usly working on actual documents
6504 Though of course the developers strive to keep LyX stable in such situations,
6505 syntax errors and the like in your module file could cause strange behavior.
6508 \begin_layout Subsubsection
6512 \begin_layout Standard
6513 Modules are to LyX as packages are to LaTeX.
6514 Sometimes, however, you find yourself wanting a specific inset or character
6515 style just for one document and writing a module that will also be available
6516 to other documents makes little sense.
6517 What you need is LyX's
6518 \begin_inset Quotes eld
6522 \begin_inset Quotes erd
6528 \begin_layout Standard
6529 You will find it under
6531 Document\SpecialChar \menuseparator
6532 Settings\SpecialChar \menuseparator
6536 The large text box allows you to enter anything that you might enter in
6537 a layout file or module.
6538 You can think of a document's local layout, in fact, as a module that belongs
6540 So, in particular, you must enter a
6541 \begin_inset Flex Code
6544 \begin_layout Plain Layout
6551 Any format is acceptable, but one would normally use the format current
6553 (In LyX 2.1, the current layout format is 48.) You should be aware that local
6554 layout is not supported by versions of LyX prior to 1.6, so you should not
6555 use it if you want to be able to export your document to LyX 1.5 or earlier
6556 (without, that is, losing the local layout information).
6557 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6558 though there is no UI for it---then you should use format 11 and, of course,
6559 use only layout constructs that were available in LyX 1.6.
6562 \begin_layout Standard
6563 When you have entered something in the
6564 \begin_inset Flex Code
6567 \begin_layout Plain Layout
6573 pane, LyX will enable the
6574 \begin_inset Quotes eld
6578 \begin_inset Quotes erd
6581 button at the bottom.
6582 Clicking this button will cause LyX to determine whether what you have
6583 entered is valid layout information for the chosen format.
6584 LyX will report the result but, unfortunately, will not tell you what errors
6585 there might have been.
6586 These will be written to the terminal, however, if LyX is started from
6588 You will not be permitted to save your local layout until you have entered
6592 \begin_layout Standard
6593 The warnings at the end of the previous section apply here, too.
6594 Do not play with local layout while you are actually working, especially
6595 if you have not saved your document.
6596 That said, using local layout with a test document can be a very convenient
6597 way to try out layout ideas, or even to start developing a module.
6600 \begin_layout Subsection
6602 \begin_inset Flex MenuItem
6605 \begin_layout Plain Layout
6614 \begin_layout Standard
6615 There are two situations you are likely to encounter when wanting to support
6616 a new LaTeX document class, involving style (
6617 \begin_inset Flex Code
6620 \begin_layout Plain Layout
6626 ) files and LaTeX2e class (
6627 \begin_inset Flex Code
6630 \begin_layout Plain Layout
6637 Supporting a style file is usually fairly easy.
6638 Supporting a new class file is a bit harder.
6639 We'll discuss the former in this section and the latter in the next.
6640 Similar remarks apply, of course, if you want to support a new DocBook
6644 \begin_layout Standard
6645 The easier case is the one in which your new document class is provided
6646 as a style file that is to be used in conjunction with an already supported
6648 For the sake of the example, we'll assume that the style file is called
6650 \begin_inset Flex MenuItem
6653 \begin_layout Plain Layout
6659 and that it is meant to be used with
6660 \begin_inset Flex MenuItem
6663 \begin_layout Plain Layout
6669 , which is a standard class.
6673 \begin_layout Standard
6674 Start by copying the existing class's layout file into your local directory:
6678 \begin_layout Plain Layout
6679 Of course, which directory is your local directory will vary by platform,
6680 and LyX allows you to specify your local directory on startup, too, using
6682 \begin_inset Flex Code
6685 \begin_layout Plain Layout
6699 \begin_layout LyX-Code
6700 cp report.layout ~/.lyx/layouts/myclass.layout
6703 \begin_layout Standard
6705 \begin_inset Flex Code
6708 \begin_layout Plain Layout
6714 and change the line:
6717 \begin_layout LyX-Code
6720 DeclareLaTeXClass{report}
6723 \begin_layout Standard
6727 \begin_layout LyX-Code
6730 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6733 \begin_layout Standard
6737 \begin_layout LyX-Code
6739 \begin_inset Newline newline
6745 \begin_inset Newline newline
6751 \begin_layout Standard
6752 near the top of the file.
6755 \begin_layout Standard
6756 Start LyX and select
6757 \begin_inset Flex MenuItem
6760 \begin_layout Plain Layout
6761 Tools\SpecialChar \menuseparator
6768 Then restart LyX and try creating a new document.
6770 \begin_inset Flex MenuItem
6773 \begin_layout Plain Layout
6779 " as a document class option in the
6780 \begin_inset Flex MenuItem
6783 \begin_layout Plain Layout
6784 Document\SpecialChar \menuseparator
6791 It is likely that some of the sectioning commands and such in your new
6792 class will work differently from how they worked in the base class—
6793 \begin_inset Flex Code
6796 \begin_layout Plain Layout
6802 in this example—so you can fiddle around with the settings for the different
6803 sections if you wish.
6804 The layout information for sections is contained in
6805 \begin_inset Flex Code
6808 \begin_layout Plain Layout
6814 , but you do not need to copy and change this file.
6815 Instead, you can simply add your changes to your layout file, after the
6817 \begin_inset Flex Code
6820 \begin_layout Plain Layout
6826 , which itself includes
6827 \begin_inset Flex Code
6830 \begin_layout Plain Layout
6837 For example, you might add these lines:
6840 \begin_layout LyX-Code
6844 \begin_layout LyX-Code
6848 \begin_layout LyX-Code
6852 \begin_layout LyX-Code
6856 \begin_layout LyX-Code
6860 \begin_layout Standard
6861 to change the font for chapter headings to sans-serif.
6862 This will override (or, in this case, add to) the existing declaration
6863 for the Chapter style.
6867 \begin_layout Standard
6868 Your new package may also provide commands or environments not present in
6870 In this case, you will want to add these to the layout file.
6872 \begin_inset CommandInset ref
6874 reference "sec:TextClass"
6878 for information on how to do so.
6881 \begin_layout Standard
6883 \begin_inset Flex MenuItem
6886 \begin_layout Plain Layout
6892 can be used with several different document classes, and even if it cannot,
6893 you might find it easiest just to write a module that you can load with
6895 The simplest possible such module would be:
6898 \begin_layout LyX-Code
6901 DeclareLyXModule{My Package}
6904 \begin_layout LyX-Code
6908 \begin_layout LyX-Code
6909 #Support for mypkg.sty.
6912 \begin_layout LyX-Code
6914 \begin_inset Newline newline
6920 \begin_layout LyX-Code
6922 \begin_inset Newline newline
6928 \begin_layout LyX-Code
6930 \begin_inset Newline newline
6936 \begin_inset Newline newline
6942 \begin_layout Standard
6943 A more complex module might modify the behavior of some existing constructs
6944 or define some new ones.
6946 \begin_inset CommandInset ref
6948 reference "sec:TextClass"
6955 \begin_layout Subsection
6957 \begin_inset Flex MenuItem
6960 \begin_layout Plain Layout
6969 \begin_layout Standard
6970 There are two possibilities here.
6971 One is that the class file is itself based upon an existing document class.
6972 For example, many thesis classes are based upon
6973 \begin_inset Flex MenuItem
6976 \begin_layout Plain Layout
6983 To see whether yours is, look for a line like
6986 \begin_layout LyX-Code
6992 \begin_layout Standard
6994 If so, then you may proceed largely as in the previous section, though
6996 \begin_inset Flex Code
6999 \begin_layout Plain Layout
7005 line will be different.
7006 If your new class is
7007 \begin_inset Flex Code
7010 \begin_layout Plain Layout
7016 and it is based upon
7017 \begin_inset Flex Code
7020 \begin_layout Plain Layout
7026 , then the line should read:
7030 \begin_layout Plain Layout
7031 And it will be easiest if you save the file to
7032 \begin_inset Flex Code
7035 \begin_layout Plain Layout
7041 : LyX assumes that the document class has the same name as the layout file.
7050 \begin_layout LyX-Code
7053 DeclareLaTeXClass[thesis,book]{thesis}
7056 \begin_layout Standard
7057 If, on the other hand, the new class is not based upon an existing class,
7058 you will probably have to
7059 \begin_inset Quotes eld
7063 \begin_inset Quotes erd
7067 We strongly suggest copying an existing layout file which uses a similar
7068 LaTeX class and then modifying it, if you can do so.
7069 At least use an existing file as a starting point so you can find out what
7070 items you need to worry about.
7071 Again, the specifics are covered below.
7074 \begin_layout Subsection
7076 \begin_inset CommandInset label
7078 name "sub:Creating-Templates"
7085 \begin_layout Standard
7086 Once you have written a layout file for a new document class, you might
7087 want to consider writing a
7092 A template acts as a kind of tutorial for your layout, showing how it might
7093 be used, though containing dummy content.
7094 You can of course look at the various templates included with LyX for ideas.
7097 \begin_layout Standard
7098 Templates are created just like usual documents: using LyX.
7099 The only difference is that usual documents contain all possible settings,
7100 including the font scheme and the paper size.
7101 Usually a user doesn't want a template to overwrite his preferred settings
7102 for such parameters.
7103 For that reason, the designer of a template should remove the corresponding
7105 \begin_inset Flex Code
7108 \begin_layout Plain Layout
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7128 from the template LyX file.
7129 This can be done with any simple text-editor, for example
7130 \begin_inset Flex Code
7133 \begin_layout Plain Layout
7140 \begin_inset Flex Code
7143 \begin_layout Plain Layout
7152 \begin_layout Standard
7153 Put the edited template files you create in
7154 \begin_inset Flex Code
7157 \begin_layout Plain Layout
7163 , copy the ones you use from the global template directory in
7164 \begin_inset Flex Code
7167 \begin_layout Plain Layout
7173 to the same place, and redefine the template path in the
7174 \begin_inset Flex MenuItem
7177 \begin_layout Plain Layout
7178 Tools\SpecialChar \menuseparator
7179 Preferences\SpecialChar \menuseparator
7188 \begin_layout Standard
7189 Note, by the way, that there is a template which has a particular meaning:
7191 \begin_inset Flex Code
7194 \begin_layout Plain Layout
7201 This template is loaded every time you create a new document with
7202 \begin_inset Flex MenuItem
7205 \begin_layout Plain Layout
7206 File\SpecialChar \menuseparator
7212 in order to provide useful defaults.
7213 To create this template from inside LyX, all you have to do is to open
7214 a document with the correct settings, and use the
7215 \begin_inset Flex MenuItem
7218 \begin_layout Plain Layout
7219 Save as Document Defaults
7227 \begin_layout Subsection
7228 Upgrading old layout files
7231 \begin_layout Standard
7232 The format of layout files changes with each LyX release, so old layout
7233 files need to be converted to the new format.
7234 If LyX reads a layout file in an older format, it automatically calls the
7236 \begin_inset Flex Code
7239 \begin_layout Plain Layout
7245 to convert it to a temporary file in current format.
7246 The original file is left untouched.
7247 If you use the layout file often, then, you may want to convert it permanently,
7248 so that LyX does not have to do so itself every time.
7249 To do this, you can call the converter manually:
7252 \begin_layout Enumerate
7254 \begin_inset Flex Code
7257 \begin_layout Plain Layout
7264 \begin_inset Flex Code
7267 \begin_layout Plain Layout
7276 \begin_layout Enumerate
7278 \begin_inset Newline newline
7282 \begin_inset Flex Code
7285 \begin_layout Plain Layout
7286 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7292 \begin_inset Newline newline
7296 \begin_inset Flex Code
7299 \begin_layout Plain Layout
7305 is the name of your LyX system directory.
7308 \begin_layout Standard
7309 Note that manual conversion does not affect included files, so these will
7310 have to be converted separately.
7313 \begin_layout Section
7314 \begin_inset CommandInset label
7316 name "sec:TextClass"
7320 The layout file format
7323 \begin_layout Standard
7324 The following sections describe how layout files are structured and written.
7325 Our advice is to go slowly, save and test often.
7326 It is really not that hard, except that the multitude of options can become
7327 overwhelming, especially if you try to check out too many at once.
7328 It becomes easier if you use existing layouts of LyX as examples/reference
7329 or if you modify an existing layout to your needs.
7332 \begin_layout Standard
7333 Note that all the tags used in layout files are case-insensitive.
7335 \begin_inset Flex Code
7338 \begin_layout Plain Layout
7345 \begin_inset Flex Code
7348 \begin_layout Plain Layout
7355 \begin_inset Flex Code
7358 \begin_layout Plain Layout
7364 are really the same tag.
7365 The possible arguments are printed in brackets after the tag's name.
7366 The default argument is typeset
7367 \begin_inset Flex Code
7370 \begin_layout Plain Layout
7379 If the argument has a data type like
7380 \begin_inset Quotes eld
7384 \begin_inset Quotes erd
7388 \begin_inset Quotes eld
7392 \begin_inset Quotes erd
7395 , the default is shown like this:
7396 \begin_inset Flex Code
7399 \begin_layout Plain Layout
7410 \begin_layout Subsection
7411 The document class declaration and classification
7414 \begin_layout Standard
7415 Lines in a layout file which begin with
7416 \begin_inset Flex Code
7419 \begin_layout Plain Layout
7426 There is one exception to this rule.
7428 \begin_inset Flex Code
7431 \begin_layout Plain Layout
7437 files should begin with lines like:
7440 \begin_layout LyX-Code
7443 #% Do not delete the line below; configure depends on this
7446 \begin_layout LyX-Code
7457 \begin_layout Plain Layout
7466 eXClass{Article (Standard Class)}
7469 \begin_layout LyX-Code
7474 DeclareCategory{Articles}
7477 \begin_layout Standard
7478 The second and third lines are used when you (re)configure LyX.
7479 The layout file is read by the LaTeX script
7480 \begin_inset Flex Code
7483 \begin_layout Plain Layout
7489 , in a special mode where
7490 \begin_inset Flex Code
7493 \begin_layout Plain Layout
7500 The first line is just a LaTeX comment, the second one contains the mandatory
7501 declaration of the text class and the third line contains the optional
7502 classification of the class.
7503 If these lines appear in a file named
7504 \begin_inset Flex Code
7507 \begin_layout Plain Layout
7513 , then they define a text class of name
7514 \begin_inset Flex Code
7517 \begin_layout Plain Layout
7523 (the name of the layout file) which uses the LaTeX document class
7524 \begin_inset Flex Code
7527 \begin_layout Plain Layout
7533 (the default is to use the same name as the layout).
7535 \begin_inset Quotes eld
7538 Article (Standard Class)
7539 \begin_inset Quotes erd
7542 that appears above is used as a description of the text class in the
7543 \begin_inset Flex MenuItem
7546 \begin_layout Plain Layout
7547 Document\SpecialChar \menuseparator
7555 \begin_inset Quotes eld
7559 \begin_inset Quotes erd
7562 in the example) is also used in the
7563 \begin_inset Flex MenuItem
7566 \begin_layout Plain Layout
7567 Document\SpecialChar \menuseparator
7573 dialog: the text classes are grouped by these categories (which are usually
7574 genres, so typical categories are
7575 \begin_inset Quotes eld
7579 \begin_inset Quotes erd
7583 \begin_inset Quotes eld
7587 \begin_inset Quotes erd
7591 \begin_inset Quotes eld
7595 \begin_inset Quotes erd
7599 \begin_inset Quotes eld
7603 \begin_inset Quotes erd
7607 \begin_inset Quotes eld
7611 \begin_inset Quotes erd
7615 \begin_inset Quotes eld
7619 \begin_inset Quotes erd
7623 If no category has been declared, the class will be put in the
7624 \begin_inset Quotes eld
7628 \begin_inset Quotes erd
7634 \begin_layout Standard
7635 Let's assume that you wrote your own text class that uses the
7636 \begin_inset Flex Code
7639 \begin_layout Plain Layout
7645 document class, but where you changed the appearance of the section headings.
7646 If you put it in a file
7647 \begin_inset Flex Code
7650 \begin_layout Plain Layout
7656 , the header of this file should be:
7659 \begin_layout LyX-Code
7662 #% Do not delete the line below; configure depends on this
7665 \begin_layout LyX-Code
7676 \begin_layout Plain Layout
7685 eXClass[article]{Article (with My Own Headings)}
7688 \begin_layout LyX-Code
7693 DeclareCategory{Articles}
7696 \begin_layout Standard
7697 This declares a text class
7698 \begin_inset Flex Code
7701 \begin_layout Plain Layout
7707 , associated with the LaTeX document class
7708 \begin_inset Flex Code
7711 \begin_layout Plain Layout
7718 \begin_inset Quotes eld
7721 Article (with My Own Headings)
7722 \begin_inset Quotes erd
7726 If your text class depends on several packages, you can declare it as:
7729 \begin_layout LyX-Code
7732 #% Do not delete the line below; configure depends on this
7735 \begin_layout LyX-Code
7746 \begin_layout Plain Layout
7755 eXClass[article,foo.sty]{Article (with My Own Headings)}
7758 \begin_layout LyX-Code
7763 DeclareCategory{Articles}
7766 \begin_layout Standard
7767 This indicates that your text class uses the
7768 \begin_inset Flex Code
7771 \begin_layout Plain Layout
7778 Finally, it is also possible to declare classes for DocBook code.
7779 Typical declarations will look like:
7782 \begin_layout LyX-Code
7785 #% Do not delete the line below; configure depends on this
7788 \begin_layout LyX-Code
7793 DeclareDocBookClass[article]{SGML (DocBook Article)}
7796 \begin_layout LyX-Code
7801 DeclareCategory{Articles (DocBook)}
7804 \begin_layout Standard
7805 Note that these declarations can also be given an optional parameter declaring
7806 the name of the document class (but not a list).
7809 \begin_layout Standard
7810 So, to be as explicit as possible, the form of the layout declaration is:
7813 \begin_layout LyX-Code
7824 \begin_layout Plain Layout
7833 eXClass[class,package.sty]{layout description}
7836 \begin_layout LyX-Code
7841 DeclareCategory{category}
7844 \begin_layout Standard
7845 The class need only be specified if the name of the LaTeX class file and
7846 the name of the layout file are different or if there are packages to load.
7847 If the name of the class file is not specified, then LyX will simply assume
7848 that it is the same as the name of the layout file.
7851 \begin_layout Standard
7852 When the text class has been modified to your taste, all you have to do
7853 is to copy it either to
7854 \begin_inset Flex Code
7857 \begin_layout Plain Layout
7864 \begin_inset Flex Code
7867 \begin_layout Plain Layout
7874 \begin_inset Flex MenuItem
7877 \begin_layout Plain Layout
7878 Tools\SpecialChar \menuseparator
7884 , exit LyX and restart.
7885 Then your new text class should be available along with the others.
7888 \begin_layout Standard
7889 Once the layout file is installed, you can edit it and see your changes
7890 without having to reconfigure or to restart LyX.
7895 \begin_layout Plain Layout
7896 In versions of LyX prior to 1.6, this was not true.
7897 As a result, editing layout files was very time consuming, since you had
7898 constantly to restart LyX to see changes.
7903 You can force a reload of the current layout by using the LyX function
7905 \begin_inset Flex MenuItem
7908 \begin_layout Plain Layout
7915 There is no default binding for this function—though, of course, you can
7916 bind it to a key yourself.
7917 But you will normally use this function simply by entering it in the mini-buffe
7922 \begin_layout Standard
7928 \begin_inset Flex MenuItem
7931 \begin_layout Plain Layout
7937 is very much an `advanced feature'.
7942 recommended that you save your work before using this function.
7947 recommended that you not attempt to edit layout information while simultaneousl
7948 y working on a document that you care about.
7949 Use a test document.
7950 Syntax errors and the like in your layout file could cause peculiar behavior.
7951 In particular, such errors could cause LyX to regard the current layout
7952 as invalid and to attempt to switch to some other layout.
7956 \begin_layout Plain Layout
7957 Really bad syntax errors may even caused LyX to exit.
7958 This is because certain sorts of errors may make LyX unable to read
7968 The LyX team strives to keep LyX stable in such situations, but safe is
7973 \begin_layout Plain Layout
7974 While we're giving advice: make regular backups.
7975 And be nice to your mother.
7983 \begin_layout Subsection
7984 The Module declaration
7987 \begin_layout Standard
7988 A module must begin with a line like the following:
7991 \begin_layout LyX-Code
7998 \begin_layout Plain Layout
8005 yXModule[endnotes.sty]{Endnotes}
8008 \begin_layout Standard
8009 The mandatory argument, in curly brackets, is the name of the module, as
8011 \begin_inset Flex MenuItem
8014 \begin_layout Plain Layout
8015 Document\SpecialChar \menuseparator
8016 Settings\SpecialChar \menuseparator
8023 The argument in square brackets is optional: It declares any LaTeX packages
8024 on which the module depends.
8025 It is also possible to use the form
8026 \begin_inset Flex MenuItem
8029 \begin_layout Plain Layout
8035 as an optional argument, which declares that the module can only be used
8036 when there exists a conversion chain between the formats `
8037 \begin_inset Flex Code
8040 \begin_layout Plain Layout
8047 \begin_inset Flex Code
8050 \begin_layout Plain Layout
8059 \begin_layout Standard
8060 The module declaration should then be followed by lines like the following
8064 \begin_layout Plain Layout
8065 Preferably in English if the module should be published with LyX.
8066 This description will appear in the list of messages to be translated and
8067 will be thus translated with the next interface update.
8075 \begin_layout LyX-Code
8079 \begin_layout LyX-Code
8080 #Adds an endnote command, in addition to footnotes.
8084 \begin_layout LyX-Code
8085 #You will need to add
8087 theendnotes in TeX code where you
8090 \begin_layout LyX-Code
8091 #want the endnotes to appear.
8095 \begin_layout LyX-Code
8099 \begin_layout LyX-Code
8100 #Requires: somemodule | othermodule
8103 \begin_layout LyX-Code
8104 #Excludes: badmodule
8107 \begin_layout Standard
8108 The description is used in
8109 \begin_inset Flex MenuItem
8112 \begin_layout Plain Layout
8113 Document\SpecialChar \menuseparator
8114 Settings\SpecialChar \menuseparator
8120 to provide the user with information about what the module does.
8122 \begin_inset Flex Code
8125 \begin_layout Plain Layout
8131 line is used to identify other modules with which this one must be used;
8133 \begin_inset Flex Code
8136 \begin_layout Plain Layout
8142 line is used to identify modules with which this one may not be used.
8143 Both are optional, and, as shown, multiple modules should be separated
8144 with the pipe symbol: |.
8145 Note that the required modules are treated disjunctively:
8149 of the required modules must be used.
8154 excluded module may be used.
8155 Note that modules are identified here by their filenames without the
8156 \begin_inset Flex Code
8159 \begin_layout Plain Layout
8167 \begin_inset Flex Code
8170 \begin_layout Plain Layout
8177 \begin_inset Flex Code
8180 \begin_layout Plain Layout
8189 \begin_layout Subsection
8193 \begin_layout Standard
8194 The first non-comment line of any layout file, included file, or module
8199 contain the file format number:
8202 \begin_layout Description
8203 \begin_inset Flex Code
8206 \begin_layout Plain Layout
8213 \begin_inset Flex Code
8216 \begin_layout Plain Layout
8222 ] The format number of the layout file.
8225 \begin_layout Standard
8226 This tag was introduced with LyX
8227 \begin_inset space ~
8231 Layout files from older LyX versions do not have an explicit file format
8232 and are considered to have
8233 \begin_inset Flex Code
8236 \begin_layout Plain Layout
8238 \begin_inset space ~
8247 The format for the present version of LyX is format 35.
8248 But each version of LyX is capable of reading earlier versions' layout
8249 files, just as they are capable of reading files produced by earlier versions
8251 There is, however, no provision for converting to earlier formats.
8254 \begin_layout Subsection
8255 \begin_inset CommandInset label
8257 name "sub:General-text-class"
8261 General text class parameters
8264 \begin_layout Standard
8265 These are general parameters that govern the behavior of an entire document
8271 mean that they must appear in
8272 \begin_inset Flex Code
8275 \begin_layout Plain Layout
8281 files rather than in modules.
8282 A module can contain any layout tag.)
8285 \begin_layout Description
8286 \begin_inset Flex Code
8289 \begin_layout Plain Layout
8295 Adds information that will be output in the
8296 \begin_inset Flex Code
8299 \begin_layout Plain Layout
8305 block when the document is output to XHTML.
8306 Typically, this would be used to output CSS style information, but it can
8307 be used for anything that can appear in
8308 \begin_inset Flex Code
8311 \begin_layout Plain Layout
8319 \begin_inset Quotes eld
8323 \begin_inset Flex Code
8326 \begin_layout Plain Layout
8333 \begin_inset Quotes erd
8339 \begin_layout Description
8340 \begin_inset Flex Code
8343 \begin_layout Plain Layout
8349 Adds information to the document preamble.
8351 \begin_inset Newline newline
8355 \begin_inset Quotes eld
8359 \begin_inset Flex Code
8362 \begin_layout Plain Layout
8369 \begin_inset Quotes erd
8375 \begin_layout Description
8376 \begin_inset Flex Code
8379 \begin_layout Plain Layout
8385 Defines formats for use in the display of bibliographic information.
8387 \begin_inset CommandInset ref
8389 reference "sub:Citation-format-description"
8395 \begin_inset Quotes eld
8399 \begin_inset Flex Code
8402 \begin_layout Plain Layout
8409 \begin_inset Quotes erd
8415 \begin_layout Description
8416 \begin_inset Flex Code
8419 \begin_layout Plain Layout
8425 Describes various global options supported by the document class.
8427 \begin_inset CommandInset ref
8429 reference "sub:ClassOptions"
8435 \begin_inset Quotes eld
8439 \begin_inset Flex Code
8442 \begin_layout Plain Layout
8449 \begin_inset Quotes erd
8455 \begin_layout Description
8456 \begin_inset Flex Code
8459 \begin_layout Plain Layout
8466 \begin_inset Flex Code
8469 \begin_layout Plain Layout
8478 \begin_inset space \thinspace{}
8482 \begin_inset Flex Code
8485 \begin_layout Plain Layout
8491 ] Whether the class should
8495 to having one or two columns.
8496 Can be changed in the
8497 \begin_inset Flex MenuItem
8500 \begin_layout Plain Layout
8501 Document\SpecialChar \menuseparator
8510 \begin_layout Description
8511 \begin_inset Flex Code
8514 \begin_layout Plain Layout
8521 \begin_inset Flex Code
8524 \begin_layout Plain Layout
8530 ] This sequence defines the properties for a counter.
8531 If the counter does not yet exist, it is created; if it does exist, it
8534 \begin_inset Quotes eld
8538 \begin_inset Flex Code
8541 \begin_layout Plain Layout
8548 \begin_inset Quotes erd
8552 \begin_inset Newline newline
8556 \begin_inset CommandInset ref
8558 reference "sub:Counters"
8562 for details on counters.
8565 \begin_layout Description
8566 \begin_inset Flex Code
8569 \begin_layout Plain Layout
8575 Sets the default font used to display the document.
8577 \begin_inset CommandInset ref
8579 reference "sub:Font-description"
8583 for how to declare fonts.
8585 \begin_inset Quotes eld
8589 \begin_inset Flex Code
8592 \begin_layout Plain Layout
8599 \begin_inset Quotes erd
8605 \begin_layout Description
8606 \begin_inset Flex Code
8609 \begin_layout Plain Layout
8616 \begin_inset Flex Code
8619 \begin_layout Plain Layout
8625 ] Specifies a module to be included by default with this document class.
8626 The module is specified as filename without the
8627 \begin_inset Flex Code
8630 \begin_layout Plain Layout
8637 The user can still remove the module, but it will be active at the outset.
8638 (This applies only when new files are created, or when this class is chosen
8639 for an existing document.)
8642 \begin_layout Description
8643 \begin_inset Flex Code
8646 \begin_layout Plain Layout
8653 \begin_inset Flex Code
8656 \begin_layout Plain Layout
8662 ] This is the style that will be assigned to new paragraphs, usually
8663 \begin_inset Flex MenuItem
8666 \begin_layout Plain Layout
8673 This will default to the first defined style if not given, but you are
8674 encouraged to use this directive.
8677 \begin_layout Description
8678 \begin_inset Flex Code
8681 \begin_layout Plain Layout
8688 \begin_inset Flex Code
8691 \begin_layout Plain Layout
8697 ] This tag indicates that the module (which is specified by filename without
8699 \begin_inset Flex Code
8702 \begin_layout Plain Layout
8708 extension) cannot be used with this document class.
8709 This might be used in a journal-specific layout file to prevent, say, the
8711 \begin_inset Flex Code
8714 \begin_layout Plain Layout
8720 module that numbers theorems by section.
8725 be used in a module.
8726 Modules have their own way of excluding other modules (see
8727 \begin_inset CommandInset ref
8729 reference "sub:Layout-modules"
8736 \begin_layout Description
8737 \begin_inset Flex Code
8740 \begin_layout Plain Layout
8746 Defines a new float.
8748 \begin_inset CommandInset ref
8750 reference "sub:Floats"
8756 \begin_inset Quotes eld
8760 \begin_inset Flex Code
8763 \begin_layout Plain Layout
8770 \begin_inset Quotes erd
8776 \begin_layout Description
8777 \begin_inset Flex Code
8780 \begin_layout Plain Layout
8786 Sets the information that will be output in the
8787 \begin_inset Flex Code
8790 \begin_layout Plain Layout
8796 block when this document class is output to XHTML.
8797 Note that this will completely override any prior
8798 \begin_inset Flex Code
8801 \begin_layout Plain Layout
8808 \begin_inset Flex Code
8811 \begin_layout Plain Layout
8819 \begin_inset Newline newline
8823 \begin_inset Flex Code
8826 \begin_layout Plain Layout
8832 if you just want to add material to the preamble.) Must end with
8833 \begin_inset Quotes eld
8837 \begin_inset Flex Code
8840 \begin_layout Plain Layout
8847 \begin_inset Quotes erd
8853 \begin_layout Description
8854 \begin_inset Flex Code
8857 \begin_layout Plain Layout
8864 \begin_inset Flex Code
8867 \begin_layout Plain Layout
8873 ] The style to use for the table of contents, bibliography, and so forth,
8874 when the document is output to HTML.
8875 For articles, this should normally be
8876 \begin_inset Flex Code
8879 \begin_layout Plain Layout
8886 \begin_inset Flex Code
8889 \begin_layout Plain Layout
8896 If it is not given, then LyX will attempt to figure out which layout to
8900 \begin_layout Description
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8911 \begin_inset Flex Code
8914 \begin_layout Plain Layout
8920 ] Modifies the properties of the given counter.
8921 If the counter does not exist, the statement is ignored.
8923 \begin_inset Quotes eld
8927 \begin_inset Flex Code
8930 \begin_layout Plain Layout
8937 \begin_inset Quotes erd
8941 \begin_inset Newline newline
8945 \begin_inset CommandInset ref
8947 reference "sub:Counters"
8951 for details on counters.
8954 \begin_layout Description
8955 \begin_inset Flex Code
8958 \begin_layout Plain Layout
8965 \begin_inset Flex Code
8968 \begin_layout Plain Layout
8974 ] Modifies the properties of the given paragraph style.
8975 If the style does not exist, the statement is ignored.
8977 \begin_inset Quotes eld
8981 \begin_inset Flex Code
8984 \begin_layout Plain Layout
8991 \begin_inset Quotes erd
8997 \begin_layout Description
8998 \begin_inset Flex Code
9001 \begin_layout Plain Layout
9008 \begin_inset Flex Code
9011 \begin_layout Plain Layout
9017 ] This allows you to include another layout definition file within yours
9018 to avoid duplicating commands.
9019 Common examples are the standard layout files, for example,
9020 \begin_inset Flex Code
9023 \begin_layout Plain Layout
9029 , which contains most of the basic layouts.
9032 \begin_layout Description
9033 \begin_inset Flex Code
9036 \begin_layout Plain Layout
9043 \begin_inset Flex Code
9046 \begin_layout Plain Layout
9052 ] This section (re-)defines the layout of an inset.
9053 It can be applied to an existing inset or to a new, user-defined inset,
9054 e.g., a new character style.
9056 \begin_inset Quotes eld
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9070 \begin_inset Quotes erd
9074 \begin_inset Newline newline
9078 \begin_inset CommandInset ref
9080 reference "sub:Flex-insets-and"
9084 for more information.
9088 \begin_layout Description
9089 \begin_inset Flex Code
9092 \begin_layout Plain Layout
9099 \begin_inset Flex Code
9102 \begin_layout Plain Layout
9108 ] A string that indicates the width of the left margin on the screen, for
9110 \begin_inset Quotes eld
9114 \begin_inset Flex Code
9117 \begin_layout Plain Layout
9124 \begin_inset Quotes erd
9128 (Note that this is not a `length', like
9129 \begin_inset Quotes eld
9133 \begin_inset Quotes erd
9139 \begin_layout Description
9140 \begin_inset Flex Code
9143 \begin_layout Plain Layout
9150 \begin_inset Flex Code
9153 \begin_layout Plain Layout
9159 ] Deletes an existing counter, usually one defined in an included file.
9162 \begin_layout Description
9163 \begin_inset Flex Code
9166 \begin_layout Plain Layout
9173 \begin_inset Flex Code
9176 \begin_layout Plain Layout
9182 ] Deletes an existing float.
9183 This is particularly useful when you want to suppress a float that has
9184 been defined in an input file.
9187 \begin_layout Description
9188 \begin_inset Flex Code
9191 \begin_layout Plain Layout
9198 \begin_inset Flex Code
9201 \begin_layout Plain Layout
9207 ] Deletes an existing style.
9210 \begin_layout Description
9211 \begin_inset Flex Code
9214 \begin_layout Plain Layout
9221 \begin_inset Flex Code
9224 \begin_layout Plain Layout
9230 ] The file format (as defined in the LyX preferences) produced by this document
9232 It is mainly useful when
9233 \begin_inset Flex Code
9236 \begin_layout Plain Layout
9243 \begin_inset Flex Code
9246 \begin_layout Plain Layout
9252 and one wants to define a new type of literate document.
9253 The format is reset to
9254 \begin_inset Quotes eld
9258 \begin_inset Flex Code
9261 \begin_layout Plain Layout
9268 \begin_inset Quotes erd
9272 \begin_inset Quotes eld
9276 \begin_inset Flex Code
9279 \begin_layout Plain Layout
9286 \begin_inset Quotes erd
9289 when the corresponding
9290 \begin_inset Flex Code
9293 \begin_layout Plain Layout
9299 parameter is encountered.
9302 \begin_layout Description
9303 \begin_inset Flex Code
9306 \begin_layout Plain Layout
9313 \begin_inset Flex Code
9316 \begin_layout Plain Layout
9327 \begin_inset Flex Code
9330 \begin_layout Plain Layout
9337 \begin_inset Flex Code
9340 \begin_layout Plain Layout
9346 ] Specifies what sort of output documents using this class will produce.
9349 \begin_layout Description
9350 \begin_inset Flex Code
9353 \begin_layout Plain Layout
9360 \begin_inset Flex Code
9363 \begin_layout Plain Layout
9370 \begin_inset Flex Code
9373 \begin_layout Plain Layout
9379 ] Specifies options, given in the second string, for the package named by
9382 \begin_inset Quotes eld
9386 \begin_inset Flex Code
9389 \begin_layout Plain Layout
9390 PackageOptions natbib square
9396 \begin_inset Quotes erd
9400 \begin_inset Flex Code
9403 \begin_layout Plain Layout
9409 to be loaded with the
9410 \begin_inset Flex Code
9413 \begin_layout Plain Layout
9420 (For TeXperts, this causes LyX to output:
9421 \begin_inset Flex Code
9424 \begin_layout Plain Layout
9427 PassOptionsToPackage{natbib}{square}
9433 \begin_inset Flex Code
9436 \begin_layout Plain Layout
9445 \begin_layout Description
9446 \begin_inset Flex Code
9449 \begin_layout Plain Layout
9456 \begin_inset Flex Code
9459 \begin_layout Plain Layout
9468 \begin_inset Flex Code
9471 \begin_layout Plain Layout
9478 \begin_inset Flex Code
9481 \begin_layout Plain Layout
9487 ] The default pagestyle.
9488 Can be changed in the
9489 \begin_inset Flex MenuItem
9492 \begin_layout Plain Layout
9493 Document\SpecialChar \menuseparator
9502 \begin_layout Description
9503 \begin_inset Flex Code
9506 \begin_layout Plain Layout
9512 Sets the preamble for the LaTeX document.
9513 Note that this will completely override any prior
9514 \begin_inset Flex Code
9517 \begin_layout Plain Layout
9524 \begin_inset Flex Code
9527 \begin_layout Plain Layout
9535 \begin_inset Flex Code
9538 \begin_layout Plain Layout
9544 if you just want to add material to the preamble.) Must end with
9545 \begin_inset Quotes eld
9549 \begin_inset Flex Code
9552 \begin_layout Plain Layout
9559 \begin_inset Quotes erd
9565 \begin_layout Description
9566 \begin_inset Flex Code
9569 \begin_layout Plain Layout
9576 \begin_inset Flex Code
9579 \begin_layout Plain Layout
9586 \begin_inset Flex Code
9589 \begin_layout Plain Layout
9598 \begin_inset space \thinspace{}
9602 \begin_inset Flex Code
9605 \begin_layout Plain Layout
9611 ] Whether the class already provides the feature
9612 \begin_inset Flex Code
9615 \begin_layout Plain Layout
9622 A feature is in general the name of a package (e.
9623 \begin_inset space \thinspace{}
9627 \begin_inset space \space{}
9631 \begin_inset Flex Code
9634 \begin_layout Plain Layout
9641 \begin_inset Flex Code
9644 \begin_layout Plain Layout
9651 \begin_inset space \thinspace{}
9655 \begin_inset space \space{}
9659 \begin_inset Flex Code
9662 \begin_layout Plain Layout
9669 \begin_inset Flex Code
9672 \begin_layout Plain Layout
9680 \begin_inset CommandInset ref
9682 reference "chap:List-of-functions"
9686 for the list of features.
9689 \begin_layout Description
9690 \begin_inset Flex Code
9693 \begin_layout Plain Layout
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9709 ] Indicates that this layout provides the functionality of the module mentioned,
9710 which should be specified by the filename without the
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9721 This will typically be used if the layout includes the module directly,
9722 rather than using the
9723 \begin_inset Flex Code
9726 \begin_layout Plain Layout
9732 tag to indicate that it ought to be used.
9733 It could also be used in a module that provided an alternate implementation
9734 of the same functionality.
9737 \begin_layout Description
9738 \begin_inset Flex Code
9741 \begin_layout Plain Layout
9748 \begin_inset Flex Code
9751 \begin_layout Plain Layout
9757 ] Whether the class requires the feature
9758 \begin_inset Flex Code
9761 \begin_layout Plain Layout
9768 Multiple features must be separated by commas.
9769 Note that you can only request supported features.
9771 \begin_inset CommandInset ref
9773 reference "chap:List-of-functions"
9777 for the list of features.)
9780 \begin_layout Description
9781 \begin_inset Flex Code
9784 \begin_layout Plain Layout
9791 \begin_inset Flex Code
9794 \begin_layout Plain Layout
9800 ] A string that indicates the width of the right margin on the screen, for
9802 \begin_inset Quotes eld
9806 \begin_inset Flex Code
9809 \begin_layout Plain Layout
9816 \begin_inset Quotes erd
9822 \begin_layout Description
9823 \begin_inset Flex Code
9826 \begin_layout Plain Layout
9833 \begin_inset Flex Code
9836 \begin_layout Plain Layout
9842 ] Sets which divisions get numbered.
9844 \begin_inset Newline newline
9848 \begin_inset Flex Code
9851 \begin_layout Plain Layout
9860 \begin_layout Description
9861 \begin_inset Flex Code
9864 \begin_layout Plain Layout
9871 \begin_inset Flex Code
9874 \begin_layout Plain Layout
9883 \begin_inset space \thinspace{}
9887 \begin_inset Flex Code
9890 \begin_layout Plain Layout
9896 ] Whether the class-default should be printing on one or both sides of the
9898 Can be changed in the
9899 \begin_inset Flex MenuItem
9902 \begin_layout Plain Layout
9903 Document\SpecialChar \menuseparator
9912 \begin_layout Description
9913 \begin_inset Flex Code
9916 \begin_layout Plain Layout
9923 \begin_inset Flex Code
9926 \begin_layout Plain Layout
9932 ] This sequence defines a paragraph style.
9933 If the style does not yet exist, it is created; if it does exist, its parameter
9936 \begin_inset Quotes eld
9940 \begin_inset Flex Code
9943 \begin_layout Plain Layout
9950 \begin_inset Quotes erd
9954 \begin_inset Newline newline
9958 \begin_inset CommandInset ref
9960 reference "sub:Paragraph-Styles"
9964 for details on paragraph styles.
9967 \begin_layout Description
9968 \begin_inset Flex Code
9971 \begin_layout Plain Layout
9978 \begin_inset Flex Code
9981 \begin_layout Plain Layout
9987 ] The name of the command or environment to be used with
9988 \begin_inset Flex Code
9991 \begin_layout Plain Layout
10000 \begin_layout Description
10001 \begin_inset Flex Code
10004 \begin_layout Plain Layout
10011 \begin_inset Flex Code
10014 \begin_layout Plain Layout
10023 \begin_inset Flex Code
10026 \begin_layout Plain Layout
10032 ] Indicates what kind of markup is used to define the title of a document.
10034 \begin_inset Flex Code
10037 \begin_layout Plain Layout
10043 means that the macro with name
10044 \begin_inset Flex Code
10047 \begin_layout Plain Layout
10053 will be inserted after the last layout which has
10054 \begin_inset Quotes eld
10058 \begin_inset Flex Code
10061 \begin_layout Plain Layout
10063 \begin_inset space ~
10072 \begin_inset Quotes erd
10077 \begin_inset Flex Code
10080 \begin_layout Plain Layout
10086 corresponds to the case where all layouts which have
10087 \begin_inset Quotes eld
10091 \begin_inset Flex Code
10094 \begin_layout Plain Layout
10096 \begin_inset space ~
10105 \begin_inset Quotes erd
10108 should be enclosed into the
10109 \begin_inset Flex Code
10112 \begin_layout Plain Layout
10121 \begin_layout Description
10122 \begin_inset Flex Code
10125 \begin_layout Plain Layout
10132 \begin_inset Flex Code
10135 \begin_layout Plain Layout
10141 ] Sets which divisions are included in the table of contents.
10143 \begin_inset Flex Code
10146 \begin_layout Plain Layout
10155 \begin_layout Subsection
10156 \begin_inset Flex Code
10159 \begin_layout Plain Layout
10166 \begin_inset CommandInset label
10168 name "sub:ClassOptions"
10175 \begin_layout Standard
10177 \begin_inset Flex Code
10180 \begin_layout Plain Layout
10186 section can contain the following entries:
10189 \begin_layout Description
10190 \begin_inset Flex Code
10193 \begin_layout Plain Layout
10200 \begin_inset Flex Code
10203 \begin_layout Plain Layout
10209 ] The list of available font sizes for the document's main font, separated
10211 \begin_inset Quotes eld
10215 \begin_inset Flex Code
10218 \begin_layout Plain Layout
10225 \begin_inset Quotes erd
10231 \begin_layout Description
10232 \begin_inset Flex Code
10235 \begin_layout Plain Layout
10241 Used to set the DTD line with XML-based output classes.
10243 \begin_inset space \thinspace{}
10247 \begin_inset Quotes eld
10250 -//OASIS//DTD DocBook V4.2//EN
10251 \begin_inset Quotes erd
10257 \begin_layout Description
10258 \begin_inset Flex Code
10261 \begin_layout Plain Layout
10268 \begin_inset Flex Code
10271 \begin_layout Plain Layout
10272 string="empty|plain|headings|fancy"
10277 ] The list of available page sty\SpecialChar \-
10279 \begin_inset Quotes eld
10283 \begin_inset Flex Code
10286 \begin_layout Plain Layout
10293 \begin_inset Quotes erd
10299 \begin_layout Description
10300 \begin_inset Flex Code
10303 \begin_layout Plain Layout
10310 \begin_inset Flex Code
10313 \begin_layout Plain Layout
10319 ] Some document class options, separated by a comma, that will be added
10320 to the optional part of the
10321 \begin_inset Flex Code
10324 \begin_layout Plain Layout
10335 \begin_layout Standard
10337 \begin_inset Flex Code
10340 \begin_layout Plain Layout
10346 section must end with
10347 \begin_inset Quotes eld
10351 \begin_inset Flex Code
10354 \begin_layout Plain Layout
10361 \begin_inset Quotes erd
10367 \begin_layout Subsection
10369 \begin_inset CommandInset label
10371 name "sub:Paragraph-Styles"
10378 \begin_layout Standard
10379 A paragraph style description looks like this:
10383 \begin_layout Plain Layout
10384 Note that this will either define a new style or modify an existing one.
10392 \begin_layout LyX-Code
10399 \begin_layout LyX-Code
10403 \begin_layout LyX-Code
10407 \begin_layout Standard
10408 where the following commands are allowed:
10411 \begin_layout Description
10412 \begin_inset Flex Code
10415 \begin_layout Plain Layout
10422 \begin_inset Flex Code
10425 \begin_layout Plain Layout
10430 , left, right, center
10435 ] Paragraph alignment.
10438 \begin_layout Description
10439 \begin_inset Flex Code
10442 \begin_layout Plain Layout
10449 \begin_inset Flex Code
10452 \begin_layout Plain Layout
10457 , left, right, center
10462 ] A comma separated list of permitted alignments.
10463 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10465 For example a right-aligned or centered enumeration isn't possible.)
10468 \begin_layout Description
10469 \begin_inset Flex Code
10472 \begin_layout Plain Layout
10479 \begin_inset Flex Code
10482 \begin_layout Plain Layout
10488 ] Defines argument number <int> of a command\SpecialChar \slash{}
10489 environment associated with
10491 This is useful for things like section headings, and only makes sense with
10493 Every (optional or required) argument of a command or environment -- except
10494 for the required argument that is associated with the content of the paragraph
10495 itself -- has a separate definition, where the number specifies the order
10497 The definition must end with
10498 \begin_inset Flex Code
10501 \begin_layout Plain Layout
10508 So a command with two optional arguments has:
10509 \begin_inset Separator parbreak
10516 \begin_layout Quote
10522 \begin_layout Quote
10528 \begin_layout Quote
10534 \begin_layout Quote
10540 \begin_layout Quote
10546 \begin_layout Quote
10552 \begin_layout Standard
10554 \begin_inset Flex Code
10557 \begin_layout Plain Layout
10563 definition, the following specifications are possible:
10566 \begin_layout Itemize
10567 \begin_inset Flex Code
10570 \begin_layout Plain Layout
10577 \begin_inset Flex Code
10580 \begin_layout Plain Layout
10586 The string that will appear both in the menu (to insert this argument)
10587 and on the argument inset button (unless you also specify a separate
10588 \begin_inset Flex Code
10591 \begin_layout Plain Layout
10598 For the menu, you can define an accelerator by appending the respective
10599 character to the string, divided by
10600 \begin_inset Quotes eld
10604 \begin_inset Quotes erd
10608 \begin_inset space \thinspace{}
10612 \begin_inset space \space{}
10616 \begin_inset Quotes eld
10620 \begin_inset Flex Code
10623 \begin_layout Plain Layout
10630 \begin_inset Quotes erd
10636 \begin_layout Itemize
10637 \begin_inset Flex Code
10640 \begin_layout Plain Layout
10647 \begin_inset Flex Code
10650 \begin_layout Plain Layout
10656 A separate string for the menu.
10657 You can define an accelerator by appending the respective character to
10658 the string, divided by
10659 \begin_inset Quotes eld
10663 \begin_inset Quotes erd
10667 \begin_inset space \thinspace{}
10671 \begin_inset space \space{}
10675 \begin_inset Quotes eld
10679 \begin_inset Flex Code
10682 \begin_layout Plain Layout
10689 \begin_inset Quotes erd
10693 This specification is optional.
10694 If it is not given the
10695 \begin_inset Flex Code
10698 \begin_layout Plain Layout
10704 will be used instead for the menu.
10707 \begin_layout Itemize
10708 \begin_inset Flex Code
10711 \begin_layout Plain Layout
10718 \begin_inset Flex Code
10721 \begin_layout Plain Layout
10727 A longer explanatory text that appears in the tooltip when hovering over
10728 the argument inset.
10731 \begin_layout Itemize
10732 \begin_inset Flex Code
10735 \begin_layout Plain Layout
10742 \begin_inset Flex Code
10745 \begin_layout Plain Layout
10754 \begin_inset space \thinspace{}
10758 \begin_inset Flex Code
10761 \begin_layout Plain Layout
10767 ] Declare if this is a mandatory (1) or an optional (0) argument.
10768 Mandatory arguments will be output empty if not given, while optional arguments
10769 will not be output at all.
10770 By default, mandatory arguments are delimited by
10771 \begin_inset Flex Code
10774 \begin_layout Plain Layout
10780 , while optional arguments are delimited by
10781 \begin_inset Flex Code
10784 \begin_layout Plain Layout
10793 \begin_layout Itemize
10794 \begin_inset Flex Code
10797 \begin_layout Plain Layout
10804 \begin_inset Flex Code
10807 \begin_layout Plain Layout
10813 defines another argument (by its number) which this argument requires to
10814 be output if it is itself output.
10816 \begin_inset space \thinspace{}
10819 g., in LaTeX commands, optional arguments often require previous optional
10820 arguments to be output (at least empty), as in
10821 \begin_inset Flex Code
10824 \begin_layout Plain Layout
10827 command[][argument]{text}
10833 This can be achieved by the statement
10834 \begin_inset Flex Code
10837 \begin_layout Plain Layout
10844 \begin_inset Flex Code
10847 \begin_layout Plain Layout
10856 \begin_layout Itemize
10857 \begin_inset Flex Code
10860 \begin_layout Plain Layout
10867 \begin_inset Flex Code
10870 \begin_layout Plain Layout
10876 defines a custom left delimiter (instead of
10877 \begin_inset Flex Code
10880 \begin_layout Plain Layout
10887 \begin_inset Flex Code
10890 \begin_layout Plain Layout
10897 A line break in the output can be indicated by
10898 \begin_inset Flex Code
10901 \begin_layout Plain Layout
10910 \begin_layout Itemize
10911 \begin_inset Flex Code
10914 \begin_layout Plain Layout
10921 \begin_inset Flex Code
10924 \begin_layout Plain Layout
10930 defines a custom right delimiter (instead of
10931 \begin_inset Flex Code
10934 \begin_layout Plain Layout
10941 \begin_inset Flex Code
10944 \begin_layout Plain Layout
10951 A line break in the output can be indicated by
10952 \begin_inset Flex Code
10955 \begin_layout Plain Layout
10964 \begin_layout Itemize
10965 \begin_inset Flex Code
10968 \begin_layout Plain Layout
10975 \begin_inset Flex Code
10978 \begin_layout Plain Layout
10984 defines an argument that is inserted if and only if no user-specified arguments
10986 \begin_inset space \thinspace{}
10990 \begin_inset space \space{}
10993 if no argument inset has been inserted (note that also an empty argument
10994 inset omits the DefaultArg).
10995 Multiple arguments need to be separated by comma.
10998 \begin_layout Itemize
10999 \begin_inset Flex Code
11002 \begin_layout Plain Layout
11009 \begin_inset Flex Code
11012 \begin_layout Plain Layout
11018 defines an argument that is inserted in any case (alone or in addition
11019 to user-specified arguments).
11020 Multiple arguments need to be separated by comma.
11023 \begin_layout Itemize
11024 \begin_inset Flex Code
11027 \begin_layout Plain Layout
11033 The font used for the argument content, see
11034 \begin_inset CommandInset ref
11036 reference "sub:Font-description"
11043 \begin_layout Itemize
11044 \begin_inset Flex Code
11047 \begin_layout Plain Layout
11053 The font used for the label; see
11054 \begin_inset CommandInset ref
11056 reference "sub:Font-description"
11063 \begin_layout Itemize
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11082 , Minimalistic, Conglomerate
11087 ] describes the rendering style used for the inset's frame and buttons.
11090 \begin_layout Itemize
11091 \begin_inset Flex Code
11094 \begin_layout Plain Layout
11101 \begin_inset Flex Code
11104 \begin_layout Plain Layout
11111 \begin_inset Flex Code
11114 \begin_layout Plain Layout
11120 , this argument is automatically inserted when the respective style is selected.
11121 Currently, only one argument per style\SpecialChar \slash{}
11122 layout can be automatically inserted.
11125 \begin_layout Standard
11126 By default, the text entered in the LyX workarea in the respective layout
11127 is the last (mandatory) argument of a command if the
11128 \begin_inset Flex Code
11131 \begin_layout Plain Layout
11138 \begin_inset Flex Code
11141 \begin_layout Plain Layout
11148 However, arguments with the prefix
11149 \begin_inset Flex Code
11152 \begin_layout Plain Layout
11158 are output after this workarea argument.
11159 Note that post-argument numbering restarts at 1, so the first argument
11160 following the workarea argument is
11161 \begin_inset Flex Code
11164 \begin_layout Plain Layout
11171 Post-arguments are ignored in any other
11172 \begin_inset Flex Code
11175 \begin_layout Plain Layout
11182 \begin_inset Flex Code
11185 \begin_layout Plain Layout
11194 \begin_layout Standard
11196 \begin_inset Flex Code
11199 \begin_layout Plain Layout
11208 \begin_inset Flex Code
11211 \begin_layout Plain Layout
11220 \begin_inset Flex Code
11223 \begin_layout Plain Layout
11229 followed by the number (e.
11230 \begin_inset space \thinspace{}
11234 \begin_inset space \space{}
11238 \begin_inset Flex Code
11241 \begin_layout Plain Layout
11251 \begin_layout Description
11252 \begin_inset Flex Code
11255 \begin_layout Plain Layout
11261 Note that this will completely override any prior
11262 \begin_inset Flex Code
11265 \begin_layout Plain Layout
11271 declaration for this style.
11273 \begin_inset Quotes eld
11277 \begin_inset Flex Code
11280 \begin_layout Plain Layout
11287 \begin_inset Quotes erd
11292 \begin_inset CommandInset ref
11294 reference "sub:I18n"
11298 for details on its use.
11301 \begin_layout Description
11302 \begin_inset Flex Code
11305 \begin_layout Plain Layout
11312 \begin_inset Flex Code
11315 \begin_layout Plain Layout
11325 \begin_layout Plain Layout
11326 Note that a `float' here is a real number, such as: 1.5.
11331 The vertical space with which the last of a chain of paragraphs with this
11332 style is separated from the following paragraph.
11333 If the next paragraph has another style, the separations are not simply
11334 added, but the maximum is taken.
11337 \begin_layout Description
11338 \begin_inset Flex Code
11341 \begin_layout Plain Layout
11348 \begin_inset Flex Code
11351 \begin_layout Plain Layout
11357 ] The category for this style.
11358 This is used to group related styles in the style combobox on the toolbar.
11359 Any string can be used, but you may want to use existing categories with
11364 \begin_layout Description
11365 \begin_inset Flex Code
11368 \begin_layout Plain Layout
11374 Depth of XML command.
11375 Used only with XML-type formats.
11378 \begin_layout Description
11379 \begin_inset Flex Code
11382 \begin_layout Plain Layout
11389 \begin_inset Flex Code
11392 \begin_layout Plain Layout
11398 ] Copies all the features of an existing style into the current one.
11402 \begin_layout Description
11403 \begin_inset Flex Code
11406 \begin_layout Plain Layout
11413 \begin_inset Flex Code
11416 \begin_layout Plain Layout
11422 ] The name of a style whose preamble should be output
11427 This allows to ensure some ordering of the preamble snippets when macros
11428 definitions depend on one another.
11432 \begin_layout Plain Layout
11433 Note that, besides that functionality, there is no way to ensure any ordering
11435 The ordering that you see in a given version of LyX may change without
11436 warning in later versions.
11444 \begin_layout Description
11445 \begin_inset Flex Code
11448 \begin_layout Plain Layout
11455 \begin_inset Flex Code
11458 \begin_layout Plain Layout
11463 , Box, Filled_Box, Static
11468 ] The type of label that stands at the end of the paragraph (or sequence
11470 \begin_inset Flex Code
11473 \begin_layout Plain Layout
11480 \begin_inset Newline newline
11484 \begin_inset Flex Code
11487 \begin_layout Plain Layout
11494 \begin_inset Flex Code
11497 \begin_layout Plain Layout
11504 \begin_inset Flex Code
11507 \begin_layout Plain Layout
11515 \begin_inset Flex Code
11518 \begin_layout Plain Layout
11525 \begin_inset Quotes eld
11529 \begin_inset Quotes erd
11533 \begin_inset Flex Code
11536 \begin_layout Plain Layout
11543 \begin_inset space \space{}
11547 \begin_inset Flex Code
11550 \begin_layout Plain Layout
11556 ) is a white (resp.
11557 \begin_inset space ~
11560 black) square suitable for end of proof markers,
11561 \begin_inset Flex Code
11564 \begin_layout Plain Layout
11570 is an explicit text string.
11573 \begin_layout Description
11574 \begin_inset Flex Code
11577 \begin_layout Plain Layout
11584 \begin_inset Flex Code
11587 \begin_layout Plain Layout
11593 ] The string used for a label with a
11594 \begin_inset Flex Code
11597 \begin_layout Plain Layout
11604 \begin_inset Newline newline
11608 \begin_inset Flex Code
11611 \begin_layout Plain Layout
11621 \begin_layout Description
11622 \begin_inset Flex Code
11625 \begin_layout Plain Layout
11631 The font used for both the text body
11637 \begin_inset CommandInset ref
11639 reference "sub:Font-description"
11644 Note that defining this font automatically defines the
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11655 So you should define this one first if you also want to define
11656 \begin_inset Flex Code
11659 \begin_layout Plain Layout
11668 \begin_layout Description
11669 \begin_inset Flex Code
11672 \begin_layout Plain Layout
11679 \begin_inset Flex Code
11682 \begin_layout Plain Layout
11688 ] Used for backporting new styles to stable LyX versions.
11689 The first stable version that supports this tag is LyX 2.1.0.
11690 The argument is a number which may either be 0, -1 or any value greater
11693 \begin_inset Flex Code
11696 \begin_layout Plain Layout
11702 flag of a style is greater than zero, it will always be written to the
11704 If a .lyx file is read, the style definitions from the document header are
11705 added to the document class.
11706 Therefore even older LyX versions can handle the style.
11708 \begin_inset Flex Code
11711 \begin_layout Plain Layout
11717 is a version number: If the style is read, and the version number is less
11718 than the version number of the already existing style in the document class,
11719 the new style is ignored.
11720 If the version number is greater, the new style replaces the existing style.
11721 A value of -1 means an infinite version number, i.
11722 \begin_inset space \thinspace{}
11726 \begin_inset space \space{}
11729 the style is always used.
11732 \begin_layout Description
11733 \begin_inset Flex Code
11736 \begin_layout Plain Layout
11743 \begin_inset Flex Code
11746 \begin_layout Plain Layout
11755 \begin_inset space \thinspace{}
11759 \begin_inset Flex Code
11762 \begin_layout Plain Layout
11768 ] Usually LyX does not allow you to insert more than one space between words,
11769 since a space is considered as the separation between two words, not a
11770 character or symbol of its own.
11771 This is a very fine thing but sometimes annoying, for example, when typing
11772 program code or plain LaTeX code.
11774 \begin_inset Flex Code
11777 \begin_layout Plain Layout
11784 Note that LyX will create protected blanks for the additional blanks when
11785 in another mode than LaTeX-mode.
11788 \begin_layout Description
11789 \begin_inset Flex Code
11792 \begin_layout Plain Layout
11798 These tags are used with XHTML output.
11800 \begin_inset CommandInset ref
11802 reference "sub:Paragraph-Style-XHTML"
11809 \begin_layout Description
11810 \begin_inset Flex Code
11813 \begin_layout Plain Layout
11819 [FIXME] (Used only with XML-type formats.)
11822 \begin_layout Description
11823 \begin_inset Flex Code
11826 \begin_layout Plain Layout
11833 \begin_inset Flex Code
11836 \begin_layout Plain Layout
11845 \begin_inset space \thinspace{}
11849 \begin_inset Flex Code
11852 \begin_layout Plain Layout
11859 \begin_inset Flex Code
11862 \begin_layout Plain Layout
11868 , marks the style as to be included in the document preamble and not in
11870 This is useful for document classes that want such information as the title
11871 and author to appear in the preamble.
11872 Note that this works only for styles for which the
11873 \begin_inset Flex Code
11876 \begin_layout Plain Layout
11883 \begin_inset Flex Code
11886 \begin_layout Plain Layout
11893 \begin_inset Flex Code
11896 \begin_layout Plain Layout
11905 \begin_layout Description
11906 \begin_inset Flex Code
11909 \begin_layout Plain Layout
11916 \begin_inset Flex Code
11919 \begin_layout Plain Layout
11928 \begin_inset space \thinspace{}
11932 \begin_inset Flex Code
11935 \begin_layout Plain Layout
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11951 , marks the style as being part of a title block (see also the
11952 \begin_inset Flex Code
11955 \begin_layout Plain Layout
11962 \begin_inset Flex Code
11965 \begin_layout Plain Layout
11974 \begin_layout Description
11975 \begin_inset Flex Code
11978 \begin_layout Plain Layout
11985 \begin_inset Flex Code
11988 \begin_layout Plain Layout
11994 ] The LaTeX command sequence declaring an item in a list.
11995 The command is to be defined without the preceding backslash (the default
11997 \begin_inset Quotes eld
12001 \begin_inset Quotes erd
12005 \begin_inset Flex Code
12008 \begin_layout Plain Layout
12016 in the LaTeX output).
12019 \begin_layout Description
12020 \begin_inset Flex Code
12023 \begin_layout Plain Layout
12030 \begin_inset Flex Code
12033 \begin_layout Plain Layout
12039 ] This provides extra space between paragraphs that have the same style.
12040 If you put other styles into an environment, each is separated with the
12042 \begin_inset Flex Code
12045 \begin_layout Plain Layout
12052 But the whole items of the environment are additionally separated with
12054 \begin_inset Flex Code
12057 \begin_layout Plain Layout
12064 Note that this is a
12069 \begin_layout Description
12070 \begin_inset Flex Code
12073 \begin_layout Plain Layout
12079 [FIXME] (Used only with XML-type formats.)
12082 \begin_layout Description
12083 \begin_inset Flex Code
12086 \begin_layout Plain Layout
12093 \begin_inset Flex Code
12096 \begin_layout Plain Layout
12105 \begin_inset space \thinspace{}
12109 \begin_inset Flex Code
12112 \begin_layout Plain Layout
12118 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12119 lead to empty LaTeX output.
12120 There are some cases where this could be desirable however: in a letter
12121 template, the required fields can be provided as empty fields, so that
12122 people do not forget them; in some special classes, a style can be used
12123 as some kind of break, which does not contain actual text.
12126 \begin_layout Description
12127 \begin_inset Flex Code
12130 \begin_layout Plain Layout
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12146 ] The vertical space between the label and the text body.
12147 Only used for labels that are above the text body (
12148 \begin_inset Flex Code
12151 \begin_layout Plain Layout
12158 \begin_inset Newline newline
12162 \begin_inset Flex Code
12165 \begin_layout Plain Layout
12166 Centered_Top_Environment
12174 \begin_layout Description
12175 \begin_inset Flex Code
12178 \begin_layout Plain Layout
12185 \begin_inset Flex Code
12188 \begin_layout Plain Layout
12194 ] The name of the counter for automatic numbering.
12195 In order to have the counter appear with your label, you will need to reference
12197 \begin_inset Flex Code
12200 \begin_layout Plain Layout
12209 This will work with
12210 \begin_inset Flex Code
12213 \begin_layout Plain Layout
12220 \begin_inset Flex Code
12223 \begin_layout Plain Layout
12230 \begin_inset Flex Code
12233 \begin_layout Plain Layout
12240 \begin_inset Flex Code
12243 \begin_layout Plain Layout
12250 \begin_inset Newline newline
12258 \begin_inset Flex Code
12261 \begin_layout Plain Layout
12268 \begin_inset Flex Code
12271 \begin_layout Plain Layout
12277 , though this case is a bit complicated.
12278 Suppose you declare
12279 \begin_inset Quotes eld
12283 \begin_inset Flex Code
12286 \begin_layout Plain Layout
12287 LabelCounter myenum
12293 \begin_inset Quotes erd
12297 Then the actual counters used are
12298 \begin_inset Flex Code
12301 \begin_layout Plain Layout
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12318 \begin_inset Flex Code
12321 \begin_layout Plain Layout
12328 \begin_inset Flex Code
12331 \begin_layout Plain Layout
12337 , much as in LaTeX.
12338 These counters must all be declared separately.
12339 \begin_inset Newline newline
12343 \begin_inset CommandInset ref
12345 reference "sub:Counters"
12349 for details on counters.
12352 \begin_layout Description
12353 \begin_inset Flex Code
12356 \begin_layout Plain Layout
12362 The font used for the label.
12364 \begin_inset CommandInset ref
12366 reference "sub:Font-description"
12373 \begin_layout Description
12374 \begin_inset Flex Code
12377 \begin_layout Plain Layout
12384 \begin_inset Flex Code
12387 \begin_layout Plain Layout
12393 ] Text that indicates how far a label should be indented.
12396 \begin_layout Description
12397 \begin_inset Flex Code
12400 \begin_layout Plain Layout
12407 \begin_inset Flex Code
12410 \begin_layout Plain Layout
12416 ] Text that indicates the amount of horizontal space between the label and
12418 Only used for labels that are not above the text body.
12421 \begin_layout Description
12422 \begin_inset Flex Code
12425 \begin_layout Plain Layout
12432 \begin_inset Flex Code
12435 \begin_layout Plain Layout
12441 ] The string used for the label.
12443 \begin_inset Flex Code
12446 \begin_layout Plain Layout
12452 is set, this string can be contain the special formatting commands described
12454 \begin_inset CommandInset ref
12456 reference "sub:Counters"
12463 \begin_layout Description
12464 \begin_inset Flex Code
12467 \begin_layout Plain Layout
12468 LabelStringAppendix
12474 \begin_inset Flex Code
12477 \begin_layout Plain Layout
12483 ] This is used inside the appendix instead of
12484 \begin_inset Newline newline
12488 \begin_inset Flex Code
12491 \begin_layout Plain Layout
12499 \begin_inset Flex Code
12502 \begin_layout Plain Layout
12509 \begin_inset Newline newline
12513 \begin_inset Flex Code
12516 \begin_layout Plain Layout
12517 LabelStringAppendix
12525 \begin_layout Description
12526 \begin_inset Flex Code
12529 \begin_layout Plain Layout
12535 [FIXME] (Used only with XML-type formats.)
12538 \begin_layout Description
12539 \begin_inset Flex Code
12542 \begin_layout Plain Layout
12549 \begin_inset Flex Code
12552 \begin_layout Plain Layout
12557 , Manual, Static, Above,
12558 \begin_inset Newline newline
12561 Centered, Sensitive, Enumerate,
12562 \begin_inset Newline newline
12565 Itemize, Bibliography
12571 \begin_inset Separator parbreak
12578 \begin_layout Description
12579 \begin_inset Flex Code
12582 \begin_layout Plain Layout
12588 means the label is the very first word (up to the first real blank).
12589 Use protected spaces if you want more than one word as the label.
12593 \begin_layout Description
12594 \begin_inset Flex Code
12597 \begin_layout Plain Layout
12603 means the label is simply what is declared as
12604 \begin_inset Flex Code
12607 \begin_layout Plain Layout
12614 This will be displayed
12615 \begin_inset Quotes eld
12619 \begin_inset Quotes erd
12622 , at the beginning of the paragraph.
12624 \begin_inset Flex Code
12627 \begin_layout Plain Layout
12634 \begin_inset Flex Code
12637 \begin_layout Plain Layout
12643 , then it will be displayed only in the first paragraph of any sequence
12644 of paragraphs with the same
12645 \begin_inset Flex Code
12648 \begin_layout Plain Layout
12657 \begin_layout Description
12658 \begin_inset Flex Code
12661 \begin_layout Plain Layout
12668 \begin_inset space ~
12672 \begin_inset space ~
12676 \begin_inset Flex Code
12679 \begin_layout Plain Layout
12685 are special cases of
12686 \begin_inset Flex Code
12689 \begin_layout Plain Layout
12696 The label will be printed above the paragraph either at the beginning of
12697 the line or centered.
12700 \begin_layout Description
12701 \begin_inset Flex Code
12704 \begin_layout Plain Layout
12710 is a special case for the caption-labels
12711 \begin_inset Quotes eld
12715 \begin_inset Quotes erd
12719 \begin_inset Quotes eld
12723 \begin_inset Quotes erd
12727 \begin_inset Newline newline
12731 \begin_inset Flex Code
12734 \begin_layout Plain Layout
12740 means the (hardcoded) label string depends on the kind of float: It is
12741 hardcoded to be `FloatType N', where N is the value of the counter associated
12743 For the case that a caption is inserted outside of a float the
12744 \begin_inset Flex Code
12747 \begin_layout Plain Layout
12754 \begin_inset Quotes eld
12758 \begin_inset Quotes erd
12764 \begin_layout Description
12765 \begin_inset Flex Code
12768 \begin_layout Plain Layout
12774 produces the usual sort of enumeration labels.
12775 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12776 small Roman numerals, and uppercase letters for the four possible depths.
12779 \begin_layout Description
12780 \begin_inset Flex Code
12783 \begin_layout Plain Layout
12789 produces various bullets at the different levels.
12790 It is also hardcoded.
12793 \begin_layout Description
12794 \begin_inset Flex Code
12797 \begin_layout Plain Layout
12803 should be used only with
12804 \begin_inset Flex Code
12807 \begin_layout Plain Layout
12808 LatexType BibEnvironment
12817 \begin_layout Description
12818 \begin_inset Flex Code
12821 \begin_layout Plain Layout
12827 Note that this will completely override any prior
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12837 declaration for this style.
12839 \begin_inset Quotes eld
12843 \begin_inset Flex Code
12846 \begin_layout Plain Layout
12853 \begin_inset Quotes erd
12858 \begin_inset CommandInset ref
12860 reference "sub:I18n"
12864 for details on its use.
12867 \begin_layout Description
12868 \begin_inset Flex Code
12871 \begin_layout Plain Layout
12878 \begin_inset Flex Code
12881 \begin_layout Plain Layout
12887 ] The name of the corresponding LaTeX stuff.
12888 Either the environment or command name.
12891 \begin_layout Description
12892 \begin_inset Flex Code
12895 \begin_layout Plain Layout
12902 \begin_inset Flex Code
12905 \begin_layout Plain Layout
12911 ] An optional parameter for the corresponding
12912 \begin_inset Flex Code
12915 \begin_layout Plain Layout
12922 This parameter cannot be changed from within LyX (use
12923 \begin_inset Flex Code
12926 \begin_layout Plain Layout
12932 for customizable parameters).
12933 This will be output as is after all LaTeX
12934 \begin_inset Flex Code
12937 \begin_layout Plain Layout
12946 \begin_layout Description
12947 \begin_inset Flex Code
12950 \begin_layout Plain Layout
12957 \begin_inset Flex Code
12960 \begin_layout Plain Layout
12965 , Command, Environment, Item_Environment,
12966 \begin_inset Newline newline
12969 List_Environment, Bib_Environment
12974 ] How the style should be translated into LaTeX.
12978 \begin_layout Plain Layout
12979 \begin_inset Flex Code
12982 \begin_layout Plain Layout
12988 is perhaps a bit misleading, since these rules apply to SGML classes, too.
12989 Visit the SGML class files for specific examples.
12995 \begin_inset Separator parbreak
13002 \begin_layout Description
13003 \begin_inset Flex Code
13006 \begin_layout Plain Layout
13012 means nothing special.
13015 \begin_layout Description
13016 \begin_inset Flex Code
13019 \begin_layout Plain Layout
13026 \begin_inset Flex Code
13029 \begin_layout Plain Layout
13036 {\SpecialChar \ldots{}
13045 \begin_layout Description
13046 \begin_inset Flex Code
13049 \begin_layout Plain Layout
13056 \begin_inset Flex Code
13059 \begin_layout Plain Layout
13066 }\SpecialChar \ldots{}
13082 \begin_layout Description
13083 \begin_inset Flex Code
13086 \begin_layout Plain Layout
13093 \begin_inset Flex Code
13096 \begin_layout Plain Layout
13103 \begin_inset Flex Code
13106 \begin_layout Plain Layout
13114 is generated for each paragraph of this environment.
13118 \begin_layout Description
13119 \begin_inset Flex Code
13122 \begin_layout Plain Layout
13129 \begin_inset Flex Code
13132 \begin_layout Plain Layout
13139 \begin_inset Newline newline
13143 \begin_inset Flex Code
13146 \begin_layout Plain Layout
13152 is passed as an argument to the environment.
13153 \begin_inset Newline newline
13157 \begin_inset Flex Code
13160 \begin_layout Plain Layout
13166 can be defined in the
13167 \begin_inset Flex MenuItem
13170 \begin_layout Plain Layout
13171 Edit\SpecialChar \menuseparator
13173 \begin_inset space ~
13184 \begin_layout Description
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13195 \begin_inset Flex Code
13198 \begin_layout Plain Layout
13204 but adds additionally the necessary mandatory argument (the longest label)
13205 to the begin statement of the bibliography environment:
13206 \begin_inset Newline newline
13210 \begin_inset Flex Code
13213 \begin_layout Plain Layout
13216 begin{thebibliography}{99}
13221 It is therefore only useful for bibliography environments.
13222 The default longest label
13223 \begin_inset Quotes eld
13227 \begin_inset Quotes erd
13230 can be changed by the user in the paragraph settings of a bibliography
13234 \begin_layout Standard
13235 Putting the last few things together, the LaTeX output will be either:
13238 \begin_layout LyX-Code
13241 LatexName[LatexParam]{\SpecialChar \ldots{}
13245 \begin_layout Standard
13249 \begin_layout LyX-Code
13252 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13258 \begin_layout Standard
13259 depending upon the LaTeX type.
13263 \begin_layout Description
13264 \begin_inset Flex Code
13267 \begin_layout Plain Layout
13274 \begin_inset Flex Code
13277 \begin_layout Plain Layout
13283 ] A string that is put at the beginning of the style content.
13284 A line break in the output can be indicated by
13285 \begin_inset Flex Code
13288 \begin_layout Plain Layout
13297 \begin_layout Description
13298 \begin_inset Flex Code
13301 \begin_layout Plain Layout
13308 \begin_inset Flex Code
13311 \begin_layout Plain Layout
13317 ] If you put styles into environments, the different
13318 \begin_inset Flex Code
13321 \begin_layout Plain Layout
13327 are not simply added, but added with a factor
13328 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13332 Note that this parameter is also used when
13333 \begin_inset Flex Code
13336 \begin_layout Plain Layout
13343 \begin_inset Flex Code
13346 \begin_layout Plain Layout
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13363 Then it is added to the manual or dynamic margin.
13364 \begin_inset Newline newline
13368 \begin_inset Quotes eld
13372 \begin_inset Flex Code
13375 \begin_layout Plain Layout
13382 \begin_inset Quotes erd
13385 means that the paragraph is indented with the width of
13386 \begin_inset Quotes eld
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 \begin_inset Quotes erd
13403 in the normal font.
13404 You can get a negative width by prefixing the string with
13405 \begin_inset Quotes eld
13409 \begin_inset Flex Code
13412 \begin_layout Plain Layout
13419 \begin_inset Quotes erd
13423 This way was chosen so that the look is the same with each used screen
13427 \begin_layout Description
13428 \begin_inset Flex Code
13431 \begin_layout Plain Layout
13438 \begin_inset Flex Code
13441 \begin_layout Plain Layout
13446 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13452 \begin_inset Newline newline
13455 The kind of margin that the style has on the left side.
13456 \begin_inset Separator parbreak
13463 \begin_layout Description
13464 \begin_inset Flex Code
13467 \begin_layout Plain Layout
13473 just means a fixed margin.
13476 \begin_layout Description
13477 \begin_inset Flex Code
13480 \begin_layout Plain Layout
13486 means that the left margin depends on the string entered in the
13487 \begin_inset Flex MenuItem
13490 \begin_layout Plain Layout
13491 Edit\SpecialChar \menuseparator
13493 \begin_inset space ~
13502 This is used to typeset nice lists without tabulators.
13505 \begin_layout Description
13506 \begin_inset Flex Code
13509 \begin_layout Plain Layout
13515 means that the margin depends on the size of the label.
13516 This is used for automatic enumerated headlines.
13517 It is obvious that the headline
13518 \begin_inset Quotes eld
13521 5.4.3.2.1 Very long headline
13522 \begin_inset Quotes erd
13525 must have a wider left margin (as wide as
13526 \begin_inset Quotes eld
13530 \begin_inset Quotes erd
13533 plus the space) than
13534 \begin_inset Quotes eld
13537 3.2 Very long headline
13538 \begin_inset Quotes erd
13542 \begin_inset Quotes eld
13546 \begin_inset Quotes erd
13549 are not able to do this.
13552 \begin_layout Description
13553 \begin_inset Flex Code
13556 \begin_layout Plain Layout
13562 is similar, but only the very first row of the paragraph is dynamic, while
13563 the others are static; this is used, for example, for descriptions.
13566 \begin_layout Description
13567 \begin_inset Flex Code
13570 \begin_layout Plain Layout
13576 means the margin is chosen in a way that the longest row of this paragraph
13577 fits to the right margin.
13578 This is used to typeset an address on the right edge of the page.
13582 \begin_layout Description
13583 \begin_inset Flex Code
13586 \begin_layout Plain Layout
13593 \begin_inset Flex Code
13596 \begin_layout Plain Layout
13605 \begin_inset space \thinspace{}
13609 \begin_inset Flex Code
13612 \begin_layout Plain Layout
13618 ] Whether fragile commands in this style should be
13619 \begin_inset Flex Code
13622 \begin_layout Plain Layout
13635 whether this command should itself be protected.)
13638 \begin_layout Description
13639 \begin_inset Flex Code
13642 \begin_layout Plain Layout
13649 \begin_inset Flex Code
13652 \begin_layout Plain Layout
13659 \begin_inset space \thinspace{}
13663 \begin_inset Flex Code
13666 \begin_layout Plain Layout
13674 ] Whether newlines are translated into LaTeX newlines (
13675 \begin_inset Flex Code
13678 \begin_layout Plain Layout
13689 The translation can be switched off to allow more comfortable LaTeX editing
13693 \begin_layout Description
13694 \begin_inset Flex Code
13697 \begin_layout Plain Layout
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13716 \begin_inset space \thinspace{}
13720 \begin_inset Flex Code
13723 \begin_layout Plain Layout
13729 ] If set to true, and if
13730 \begin_inset Flex Code
13733 \begin_layout Plain Layout
13740 \begin_inset Flex Code
13743 \begin_layout Plain Layout
13749 ) paragraphs are being indented, then the indentation of such a paragraph
13750 following one of this type will be suppressed.
13751 (So this will not affect the display of non-default paragraphs.)
13754 \begin_layout Description
13755 \begin_inset Flex Code
13758 \begin_layout Plain Layout
13765 \begin_inset Flex Code
13768 \begin_layout Plain Layout
13774 ] Name of a style that has replaced this style.
13775 This is used to rename a style, while keeping backward compatibility.
13778 \begin_layout Description
13779 \begin_inset Flex Code
13782 \begin_layout Plain Layout
13789 \begin_inset Flex Code
13792 \begin_layout Plain Layout
13801 \begin_inset space \thinspace{}
13805 \begin_inset Flex Code
13808 \begin_layout Plain Layout
13814 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13815 output, but only by a line break; together with
13816 \begin_inset Flex Code
13819 \begin_layout Plain Layout
13825 , this allows to emulate a plain text editor (like the ERT inset).
13828 \begin_layout Description
13829 \begin_inset Flex Code
13832 \begin_layout Plain Layout
13839 \begin_inset Flex Code
13842 \begin_layout Plain Layout
13848 ] The indent of the very first line of a paragraph.
13850 \begin_inset Newline newline
13854 \begin_inset Flex Code
13857 \begin_layout Plain Layout
13863 will be fixed for a certain style.
13864 The exception is the default style, since the indentation for these paragraphs
13865 can be prohibited with
13866 \begin_inset Flex Code
13869 \begin_layout Plain Layout
13877 \begin_inset Flex Code
13880 \begin_layout Plain Layout
13886 style paragraphs inside environments use the
13887 \begin_inset Flex Code
13890 \begin_layout Plain Layout
13896 of the environment, not their native one.
13898 \begin_inset Flex Code
13901 \begin_layout Plain Layout
13907 paragraphs inside an enumeration are not indented.
13910 \begin_layout Description
13911 \begin_inset Flex Code
13914 \begin_layout Plain Layout
13921 \begin_inset Flex Code
13924 \begin_layout Plain Layout
13930 ] The vertical space between two paragraphs of this style.
13933 \begin_layout Description
13934 \begin_inset Flex Code
13937 \begin_layout Plain Layout
13944 \begin_inset Flex Code
13947 \begin_layout Plain Layout
13953 ] LyX allows the user to choose either
13954 \begin_inset Quotes eld
13958 \begin_inset Quotes erd
13962 \begin_inset Quotes eld
13966 \begin_inset Quotes erd
13969 to separate paragraphs.
13971 \begin_inset Quotes eld
13975 \begin_inset Quotes erd
13979 \begin_inset Flex Code
13982 \begin_layout Plain Layout
13990 \begin_inset Quotes eld
13994 \begin_inset Quotes erd
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14007 is ignored and all paragraphs are separated by the
14008 \begin_inset Flex Code
14011 \begin_layout Plain Layout
14018 The vertical space is calculated with
14019 \begin_inset Flex Code
14022 \begin_layout Plain Layout
14024 \begin_inset space ~
14033 \begin_inset Flex Code
14036 \begin_layout Plain Layout
14042 is the height of a row with the normal font.
14043 This way, the look stays the same with different screen fonts.
14046 \begin_layout Description
14047 \begin_inset Flex Code
14050 \begin_layout Plain Layout
14057 \begin_inset Flex Code
14060 \begin_layout Plain Layout
14069 \begin_inset space \thinspace{}
14073 \begin_inset Flex Code
14076 \begin_layout Plain Layout
14082 ] Whether the contents of this paragraph should be output in raw form, meaning
14083 without special translations that LaTeX would require.
14086 \begin_layout Description
14087 \begin_inset Flex Code
14090 \begin_layout Plain Layout
14096 Information to be included in the LaTeX preamble when this style is used.
14097 Used to define macros, load packages, etc., required by this particular
14100 \begin_inset Quotes eld
14104 \begin_inset Flex Code
14107 \begin_layout Plain Layout
14114 \begin_inset Quotes erd
14120 \begin_layout Description
14121 \begin_inset Flex Code
14124 \begin_layout Plain Layout
14131 \begin_inset Flex Code
14134 \begin_layout Plain Layout
14140 ] The prefix to use when creating labels referring to paragraphs of this
14142 This allows the use of formatted references.
14145 \begin_layout Description
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14156 \begin_inset Flex Code
14159 \begin_layout Plain Layout
14165 ] Whether the style requires the feature
14166 \begin_inset Flex Code
14169 \begin_layout Plain Layout
14176 See the description of
14177 \begin_inset Flex Code
14180 \begin_layout Plain Layout
14187 \begin_inset CommandInset ref
14189 reference "sub:General-text-class"
14193 ) for information on `features'.
14196 \begin_layout Description
14197 \begin_inset Flex Code
14200 \begin_layout Plain Layout
14207 \begin_inset Flex Code
14210 \begin_layout Plain Layout
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14228 ] Resets the LaTeX arguments of this style (as defined via the
14229 \begin_inset Flex Code
14232 \begin_layout Plain Layout
14239 This is useful if you have copied a style via
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14249 , but you do not want to inherit its (required and optional) arguments.
14252 \begin_layout Description
14253 \begin_inset Flex Code
14256 \begin_layout Plain Layout
14263 \begin_inset Flex Code
14266 \begin_layout Plain Layout
14272 ] A string that is put at the end of the layout content.
14273 A line break in the output can be indicated by
14274 \begin_inset Flex Code
14277 \begin_layout Plain Layout
14286 \begin_layout Description
14287 \begin_inset Flex Code
14290 \begin_layout Plain Layout
14297 \begin_inset Flex Code
14300 \begin_layout Plain Layout
14307 \begin_inset Flex Code
14310 \begin_layout Plain Layout
14319 \begin_layout Description
14320 \begin_inset Flex Code
14323 \begin_layout Plain Layout
14330 \begin_inset Flex Code
14333 \begin_layout Plain Layout
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14352 \begin_inset Flex Code
14355 \begin_layout Plain Layout
14362 \begin_inset Flex Code
14365 \begin_layout Plain Layout
14367 \begin_inset space ~
14375 ] This defines what the default spacing should be in the style.
14377 \begin_inset Flex Code
14380 \begin_layout Plain Layout
14387 \begin_inset Flex Code
14390 \begin_layout Plain Layout
14397 \begin_inset Flex Code
14400 \begin_layout Plain Layout
14406 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14407 If you specify the argument
14408 \begin_inset Flex Code
14411 \begin_layout Plain Layout
14417 , then you must also provide a value argument which will be the actual multiplie
14419 Note that, contrary to other parameters,
14420 \begin_inset Flex Code
14423 \begin_layout Plain Layout
14429 implies the generation of specific LaTeX code, using the LaTeX package
14433 \begin_inset Flex Code
14436 \begin_layout Plain Layout
14445 \begin_layout Description
14446 \begin_inset Flex Code
14449 \begin_layout Plain Layout
14456 \begin_inset Flex Code
14459 \begin_layout Plain Layout
14466 \begin_inset space \thinspace{}
14470 \begin_inset Flex Code
14473 \begin_layout Plain Layout
14481 ] Allow spell-checking paragraphs of this style.
14485 \begin_layout Description
14486 \begin_inset Flex Code
14489 \begin_layout Plain Layout
14495 The font used for the text body .
14497 \begin_inset CommandInset ref
14499 reference "sub:Font-description"
14506 \begin_layout Description
14507 \begin_inset Flex Code
14510 \begin_layout Plain Layout
14519 \begin_inset Flex Code
14522 \begin_layout Plain Layout
14532 The level of the style in the table of contents.
14533 This is used for automatic numbering of section headings.
14534 \change_inserted -712698321 1401363541
14538 \begin_layout Description
14540 \change_inserted -712698321 1401363906
14541 \begin_inset Flex Code
14544 \begin_layout Plain Layout
14546 \change_inserted -712698321 1401363547
14555 \begin_inset Flex Code
14558 \begin_layout Plain Layout
14560 \change_inserted -712698321 1401363664
14573 \begin_inset Flex Code
14576 \begin_layout Plain Layout
14578 \change_inserted -712698321 1401363669
14587 \begin_inset Flex Code
14590 \begin_layout Plain Layout
14592 \change_inserted -712698321 1401363675
14600 ] This tag determines whether the first line indentation of this paragraph
14601 can be toggled via the Paragraph settings dialog.
14605 \begin_inset Flex Code
14608 \begin_layout Plain Layout
14610 \change_inserted -712698321 1401363761
14620 is set, indentation can be toggled if the document settings use
14621 \begin_inset Quotes eld
14625 \begin_inset Quotes erd
14628 paragraph style, with
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14634 \change_inserted -712698321 1401363844
14640 , indentation can always be toggled, notwithstanding the document settings,
14642 \begin_inset Flex Code
14645 \begin_layout Plain Layout
14647 \change_inserted -712698321 1401363901
14653 , indentation can never be toggled.
14658 \begin_layout Description
14659 \begin_inset Flex Code
14662 \begin_layout Plain Layout
14669 \begin_inset Flex Code
14672 \begin_layout Plain Layout
14678 ] The vertical space with which the very first of a chain of paragraphs
14679 with this style is separated from the previous paragraph.
14680 If the previous paragraph has another style, the separations are not simply
14681 added, but the maximum is taken.
14684 \begin_layout Subsection
14685 \begin_inset CommandInset label
14691 Internationalization of Paragraph Styles
14694 \begin_layout Standard
14695 LyX has long supported internationalization of layout information, but,
14696 until version 2.0, this applied only to the user interface and not to, say,
14698 Thus, French authors were forced to resort to ugly hacks if they wanted
14703 1' instead of `Theorem 1'.
14704 Thanks to Georg Baum, that is no longer the case.
14707 \begin_layout Standard
14709 \begin_inset Flex Code
14712 \begin_layout Plain Layout
14718 defines text that is to appear in the typeset document, it may use
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14738 to support non-English and even multi-language documents correctly.
14739 The following excerpt (from the
14740 \begin_inset Flex Code
14743 \begin_layout Plain Layout
14749 file) shows how this works:
14752 \begin_layout LyX-Code
14754 \begin_inset Separator parbreak
14761 \begin_layout LyX-Code
14764 theoremstyle{remark}
14767 \begin_layout LyX-Code
14770 newtheorem{claim}[thm]{
14777 \begin_layout LyX-Code
14781 \begin_layout LyX-Code
14785 \begin_layout LyX-Code
14790 claimname}{_(Claim)}
14793 \begin_layout LyX-Code
14797 \begin_layout LyX-Code
14801 \begin_layout LyX-Code
14810 claimname}{_(Claim)}}
14813 \begin_layout LyX-Code
14818 \begin_layout Standard
14819 In principle, any legal LaTeX may appear in the
14820 \begin_inset Flex Code
14823 \begin_layout Plain Layout
14830 \begin_inset Flex Code
14833 \begin_layout Plain Layout
14839 tags, but in practice they will typically look as they do here.
14840 The key to correct translation of the typeset text is the definition of
14842 \begin_inset Flex Code
14845 \begin_layout Plain Layout
14854 \begin_inset Flex Code
14857 \begin_layout Plain Layout
14869 \begin_layout Standard
14871 \begin_inset Flex Code
14874 \begin_layout Plain Layout
14880 tag provides for internationalization based upon the overall language of
14882 The contents of the tag will be included in the preamble, just as with
14884 \begin_inset Flex Code
14887 \begin_layout Plain Layout
14894 What makes it special is the use of the
14895 \begin_inset Quotes eld
14899 \begin_inset Quotes erd
14903 \begin_inset Flex Code
14906 \begin_layout Plain Layout
14912 , which will be replaced, when LyX produces LaTeX output, with the translation
14913 of its argument into the document language.
14916 \begin_layout Standard
14918 \begin_inset Flex Code
14921 \begin_layout Plain Layout
14927 tag is more complex, since it is meant to provide support for multi-language
14928 documents and so offers an interface to the
14929 \begin_inset Flex Code
14932 \begin_layout Plain Layout
14939 Its contents will be added to the preamble once for each language that
14940 appears in the document.
14941 In this case, the argument to
14942 \begin_inset Flex Code
14945 \begin_layout Plain Layout
14951 will be replaced with its translation into the language in question; the
14953 \begin_inset Flex Code
14956 \begin_layout Plain Layout
14962 is replaced by the language name (as used by the babel package).
14965 \begin_layout Standard
14966 A German document that also included a French section would thus have the
14967 following in the preamble:
14970 \begin_layout LyX-Code
14979 claimname}{Affirmation}}
14980 \begin_inset Newline newline
14991 claimname}{Behauptung}}
14992 \begin_inset Newline newline
14999 claimname}{Behauptung}
15002 \begin_layout Standard
15004 \begin_inset Flex Code
15007 \begin_layout Plain Layout
15013 will then conspire to produce the correct text in the output.
15016 \begin_layout Standard
15017 One important point to note here is that the translations are provided by
15018 LyX itself, through the file
15019 \begin_inset Flex Code
15022 \begin_layout Plain Layout
15029 This means, in effect, that
15030 \begin_inset Flex Code
15033 \begin_layout Plain Layout
15040 \begin_inset Flex Code
15043 \begin_layout Plain Layout
15049 are really only of use in layout files that are provided with LyX, since
15050 text entered in user-created layout files will not be seen by LyX's internation
15051 alization routines unless the
15052 \begin_inset Flex Code
15055 \begin_layout Plain Layout
15061 file is modified accordingly.
15062 That said, however, any layout created with the intention that it will
15063 be included with LyX should use these tags where appropriate.
15064 Please note that the paragraph style translations provided by LyX will
15065 never change with a minor update (e.
15066 \begin_inset space \thinspace{}
15070 \begin_inset space \space{}
15073 from version 2.1.x to 2.1.y).
15074 It is however quite likely that a major update (e.
15075 \begin_inset space \thinspace{}
15079 \begin_inset space \space{}
15082 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15085 \begin_layout Subsection
15087 \begin_inset CommandInset label
15096 \begin_layout Standard
15097 It is necessary to define the floats (
15098 \begin_inset Flex MenuItem
15101 \begin_layout Plain Layout
15108 \begin_inset Flex MenuItem
15111 \begin_layout Plain Layout
15117 , \SpecialChar \ldots{}
15118 ) in the text class itself.
15119 Standard floats are included in the file
15120 \begin_inset Flex Code
15123 \begin_layout Plain Layout
15129 , so you may have to do no more than add
15132 \begin_layout LyX-Code
15133 Input stdfloats.inc
15136 \begin_layout Standard
15137 to your layout file.
15138 If you want to implement a text class that proposes some other float types
15139 (like the AGU class bundled with LyX), the information below will hopefully
15143 \begin_layout Description
15144 \begin_inset Flex Code
15147 \begin_layout Plain Layout
15154 \begin_inset Flex Code
15157 \begin_layout Plain Layout
15164 \begin_inset Quotes erd
15168 \begin_inset Quotes erd
15171 ] The file name extension of an auxiliary file for the list of figures (or
15173 LaTeX writes the captions to this file.
15176 \begin_layout Description
15177 \begin_inset Flex Code
15180 \begin_layout Plain Layout
15187 \begin_inset Flex Code
15190 \begin_layout Plain Layout
15197 \begin_inset Quotes erd
15201 \begin_inset Quotes erd
15204 ] The string that will be used in the menus and also for the caption.
15205 This is translated to the current language if babel is used.
15208 \begin_layout Description
15209 \begin_inset Flex Code
15212 \begin_layout Plain Layout
15218 These tags control the XHTML output.
15220 \begin_inset CommandInset ref
15222 reference "sec:Tags-for-XHTML"
15229 \begin_layout Description
15230 \begin_inset Flex Code
15233 \begin_layout Plain Layout
15242 \begin_inset Flex Code
15245 \begin_layout Plain Layout
15254 \begin_inset space \thinspace{}
15258 \begin_inset Flex Code
15261 \begin_layout Plain Layout
15267 ] Indicates whether the float is already defined in the document class or
15268 if instead the LaTeX package
15269 \begin_inset Flex Code
15272 \begin_layout Plain Layout
15278 needs to be loaded to define it on-the-fly.
15280 \begin_inset Flex Code
15283 \begin_layout Plain Layout
15290 \begin_inset Flex Code
15293 \begin_layout Plain Layout
15300 It should be set to
15301 \begin_inset Flex Code
15304 \begin_layout Plain Layout
15310 if the float is already defined by the LaTeX document class.
15313 \begin_layout Description
15314 \begin_inset Flex Code
15317 \begin_layout Plain Layout
15324 \begin_inset Flex Code
15327 \begin_layout Plain Layout
15334 \begin_inset Quotes erd
15338 \begin_inset Quotes erd
15341 ] The command used to generate a list of floats of this type; the leading
15350 \begin_inset Flex Code
15353 \begin_layout Plain Layout
15359 is false, since there is no standard way to generate this command.
15361 \begin_inset Flex Code
15364 \begin_layout Plain Layout
15370 is true, since in that case there is a standard way to define the command.
15373 \begin_layout Description
15374 \begin_inset Flex Code
15377 \begin_layout Plain Layout
15384 \begin_inset Flex Code
15387 \begin_layout Plain Layout
15394 \begin_inset Quotes erd
15398 \begin_inset Quotes erd
15401 ] A title for a list of floats of this kind (list of figures, tables, or
15403 It is used for the screen label within LyX, it is used by LaTeX for the
15404 title and it is used as the title in the XHTML output.
15405 It will be translated to the document language.
15408 \begin_layout Description
15409 \begin_inset Flex Code
15412 \begin_layout Plain Layout
15419 \begin_inset Flex Code
15422 \begin_layout Plain Layout
15429 \begin_inset Quotes erd
15433 \begin_inset Quotes erd
15436 ] This (optional) argument determines whether floats of this class will
15437 be numbered within some sectional unit of the document.
15439 \begin_inset Flex Code
15442 \begin_layout Plain Layout
15449 \begin_inset Quotes eld
15453 \begin_inset Flex Code
15456 \begin_layout Plain Layout
15463 \begin_inset Quotes erd
15466 , the floats will be numbered within chapters.
15470 \begin_layout Description
15471 \begin_inset Flex Code
15474 \begin_layout Plain Layout
15481 \begin_inset Flex Code
15484 \begin_layout Plain Layout
15491 \begin_inset Quotes erd
15495 \begin_inset Quotes erd
15498 ] The default placement for the given class of floats.
15499 The string should be as in standard LaTeX:
15500 \begin_inset Flex Code
15503 \begin_layout Plain Layout
15510 \begin_inset Flex Code
15513 \begin_layout Plain Layout
15520 \begin_inset Flex Code
15523 \begin_layout Plain Layout
15530 \begin_inset Flex Code
15533 \begin_layout Plain Layout
15539 for top, bottom, page, and here, respectively.
15543 \begin_layout Plain Layout
15544 Note that the order of these letters in the string is irrelevant, like in
15550 On top of that there is a new type,
15551 \begin_inset Flex Code
15554 \begin_layout Plain Layout
15560 , which does not really correspond to a float, since it means: put it
15561 \begin_inset Quotes eld
15565 \begin_inset Quotes erd
15569 Note however that the
15570 \begin_inset Flex Code
15573 \begin_layout Plain Layout
15579 specifier is special and, because of implementation details, cannot be
15580 used in non-built in float types.
15581 If you do not understand what this means, just use
15582 \begin_inset Quotes eld
15586 \begin_inset Flex Code
15589 \begin_layout Plain Layout
15596 \begin_inset Quotes erd
15602 \begin_layout Description
15603 \begin_inset Flex Code
15606 \begin_layout Plain Layout
15613 \begin_inset Flex Code
15616 \begin_layout Plain Layout
15622 ] The prefix to use when creating labels referring to floats of this type.
15623 This allows the use of formatted references.
15624 Note that you can remove any
15625 \begin_inset Flex Code
15628 \begin_layout Plain Layout
15634 set by a copied style by using the special value
15635 \begin_inset Quotes eld
15639 \begin_inset Quotes erd
15642 , which must be all caps.
15645 \begin_layout Description
15646 \begin_inset Flex Code
15649 \begin_layout Plain Layout
15656 \begin_inset Flex Code
15659 \begin_layout Plain Layout
15666 \begin_inset Quotes erd
15670 \begin_inset Quotes erd
15673 ] The style used when defining the float using
15674 \begin_inset Flex Code
15677 \begin_layout Plain Layout
15688 \begin_layout Description
15689 \begin_inset Flex Code
15692 \begin_layout Plain Layout
15699 \begin_inset Flex Code
15702 \begin_layout Plain Layout
15709 \begin_inset Quotes erd
15713 \begin_inset Quotes erd
15717 \begin_inset Quotes eld
15721 \begin_inset Quotes erd
15724 of the new class of floats, like program or algorithm.
15725 After the appropriate
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15738 \begin_inset Flex Code
15741 \begin_layout Plain Layout
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15764 \begin_layout Description
15765 \begin_inset Flex Code
15768 \begin_layout Plain Layout
15775 \begin_inset Flex Code
15778 \begin_layout Plain Layout
15785 \begin_inset space \thinspace{}
15789 \begin_inset Flex Code
15792 \begin_layout Plain Layout
15800 ] Specifies whether this float is defined using the LaTeX package
15801 \begin_inset Flex Code
15804 \begin_layout Plain Layout
15810 , either by the class file, another package or on-the-fly by LyX itself.
15813 \begin_layout Standard
15814 Note that defining a float with type
15815 \begin_inset Flex Code
15818 \begin_layout Plain Layout
15826 automatically defines the corresponding counter with name
15827 \begin_inset Flex Code
15830 \begin_layout Plain Layout
15841 \begin_layout Subsection
15842 Flex insets and InsetLayout
15843 \begin_inset CommandInset label
15845 name "sub:Flex-insets-and"
15852 \begin_layout Standard
15853 Flex insets come in three different kinds:
15856 \begin_layout Itemize
15858 \begin_inset Flex Code
15861 \begin_layout Plain Layout
15867 ): These define semantic markup corresponding to such LaTeX commands as
15869 \begin_inset Flex Code
15872 \begin_layout Plain Layout
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15895 \begin_layout Itemize
15897 \begin_inset Flex Code
15900 \begin_layout Plain Layout
15906 ): These can be used to define custom collapsible insets, similar to TeX
15907 code, footnote, and the like.
15908 An obvious example is an endnote inset, which is defined in the
15909 \begin_inset Flex Code
15912 \begin_layout Plain Layout
15921 \begin_layout Itemize
15923 \begin_inset Flex Code
15926 \begin_layout Plain Layout
15932 ): For use with DocBook classes.
15935 \begin_layout Standard
15936 Flex insets are defined using the
15937 \begin_inset Flex Code
15940 \begin_layout Plain Layout
15946 tag, which shall be explained in a moment.
15949 \begin_layout Standard
15951 \begin_inset Flex Code
15954 \begin_layout Plain Layout
15960 tag also serves another function: It can be used to customize the general
15961 layout of many different types of insets.
15963 \begin_inset Flex Code
15966 \begin_layout Plain Layout
15972 can be used to customize the layout parameters for footnotes, marginal
15973 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
15974 boxes, tables, algorithms, URLs, and captions, as well as to define Flex
15978 \begin_layout Standard
15980 \begin_inset Flex Code
15983 \begin_layout Plain Layout
15989 definition must begin with a line of the form:
15992 \begin_layout LyX-Code
15996 \begin_layout Standard
15998 \begin_inset Flex Code
16001 \begin_layout Plain Layout
16007 indicates the inset whose layout is being defined, and here there are four
16011 \begin_layout Enumerate
16012 The layout for a pre-existing inset is being modified.
16013 In this case, can be
16014 \begin_inset Flex Code
16017 \begin_layout Plain Layout
16023 any one of the following:
16024 \begin_inset Flex Code
16027 \begin_layout Plain Layout
16034 \begin_inset Flex Code
16037 \begin_layout Plain Layout
16044 \begin_inset Flex Code
16047 \begin_layout Plain Layout
16054 \begin_inset Flex Code
16057 \begin_layout Plain Layout
16064 \begin_inset Flex Code
16067 \begin_layout Plain Layout
16074 \begin_inset Flex Code
16077 \begin_layout Plain Layout
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16094 \begin_inset Flex Code
16097 \begin_layout Plain Layout
16104 \begin_inset Flex Code
16107 \begin_layout Plain Layout
16114 \begin_inset Flex Code
16117 \begin_layout Plain Layout
16124 \begin_inset Flex Code
16127 \begin_layout Plain Layout
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16144 \begin_inset Flex Code
16147 \begin_layout Plain Layout
16154 \begin_inset Flex Code
16157 \begin_layout Plain Layout
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16174 \begin_inset Flex Code
16177 \begin_layout Plain Layout
16184 \begin_inset Flex Code
16187 \begin_layout Plain Layout
16194 \begin_inset Flex Code
16197 \begin_layout Plain Layout
16204 \begin_inset Flex Code
16207 \begin_layout Plain Layout
16214 \begin_inset Flex Code
16217 \begin_layout Plain Layout
16226 \begin_layout Enumerate
16227 The layout for a Flex inset is being defined.
16229 \begin_inset Flex Code
16232 \begin_layout Plain Layout
16238 must be of the form
16239 \begin_inset Quotes eld
16243 \begin_inset Flex Code
16246 \begin_layout Plain Layout
16253 \begin_inset Quotes erd
16257 \begin_inset Flex Code
16260 \begin_layout Plain Layout
16266 may be be any valid identifier not used by a pre-existing Flex inset.
16267 The identifier may include spaces, but in that case the whole thing must
16268 be wrapped in quotes.
16269 Note that the definition of a flex inset
16274 \begin_inset Flex Code
16277 \begin_layout Plain Layout
16283 entry, declaring which type of inset it defines.
16286 \begin_layout Enumerate
16287 The layout for user specific branch is being defined.
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16298 must be of the form
16299 \begin_inset Quotes eld
16303 \begin_inset Flex Code
16306 \begin_layout Plain Layout
16313 \begin_inset Quotes erd
16317 \begin_inset Flex Code
16320 \begin_layout Plain Layout
16326 may be be any valid identifier of branch defined in user's document.
16327 The identifier may include spaces, but in that case the whole thing must
16328 be wrapped in quotes.
16329 The main purpose of this feature is to allow LaTeX wrapping around specific
16330 branches as user needs.
16333 \begin_layout Enumerate
16334 The layout of a user (or class) specific caption is being defined.
16336 \begin_inset Flex Code
16339 \begin_layout Plain Layout
16345 must be of the form
16346 \begin_inset Quotes eld
16350 \begin_inset Flex Code
16353 \begin_layout Plain Layout
16360 \begin_inset Quotes erd
16364 \begin_inset Flex Code
16367 \begin_layout Plain Layout
16373 specifies the name of the caption as it appears in the menu.
16374 Have a look at the standard caption (
16375 \begin_inset Flex Code
16378 \begin_layout Plain Layout
16384 ), the specific captions of the KOMA-Script classes (
16385 \begin_inset Flex Code
16388 \begin_layout Plain Layout
16395 \begin_inset Flex Code
16398 \begin_layout Plain Layout
16407 \begin_inset space ~
16413 \begin_inset Flex Code
16416 \begin_layout Plain Layout
16422 ) for applications.
16425 \begin_layout Standard
16427 \begin_inset Flex Code
16430 \begin_layout Plain Layout
16436 definition can contain the following entries:
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 ] Defines argument number of a command\SpecialChar \slash{}
16460 environment associated with the current
16462 The definition must end with
16463 \begin_inset Flex Code
16466 \begin_layout Plain Layout
16474 \begin_inset CommandInset ref
16476 reference "sub:Paragraph-Styles"
16483 \begin_layout Description
16484 \begin_inset Flex Code
16487 \begin_layout Plain Layout
16493 Preamble for changing language commands; see
16494 \begin_inset CommandInset ref
16496 reference "sub:I18n"
16503 \begin_layout Description
16504 \begin_inset Flex Code
16507 \begin_layout Plain Layout
16514 \begin_inset Flex Code
16517 \begin_layout Plain Layout
16523 ] The color for the inset's background.
16525 \begin_inset CommandInset ref
16527 reference "chap:Names-of-colors"
16531 for a list of the available color names.
16534 \begin_layout Description
16535 \begin_inset Flex Code
16538 \begin_layout Plain Layout
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16557 \begin_inset space \thinspace{}
16561 \begin_inset Flex Code
16564 \begin_layout Plain Layout
16570 ] Whether to use the content of the inset as the label, when the inset is
16575 \begin_layout Description
16576 \begin_inset Flex Code
16579 \begin_layout Plain Layout
16586 \begin_inset Flex Code
16589 \begin_layout Plain Layout
16595 ] As with paragraph styles, see
16596 \begin_inset CommandInset ref
16598 reference "sub:Paragraph-Styles"
16603 Note that you need to specify the complete type, e.
16604 \begin_inset space \thinspace{}
16608 \begin_inset space ~
16612 \begin_inset Flex Code
16615 \begin_layout Plain Layout
16616 CopyStyle Flex:<name>
16624 \begin_layout Description
16625 \begin_inset Flex Code
16628 \begin_layout Plain Layout
16635 \begin_inset Flex Code
16638 \begin_layout Plain Layout
16647 \begin_inset space \thinspace{}
16651 \begin_inset Flex Code
16654 \begin_layout Plain Layout
16660 ] Indicates whether the user may employ the Paragraph Settings dialog to
16661 customize the paragraph.
16664 \begin_layout Description
16665 \begin_inset Flex Code
16668 \begin_layout Plain Layout
16675 \begin_inset Flex Code
16678 \begin_layout Plain Layout
16685 \begin_inset Flex Code
16688 \begin_layout Plain Layout
16695 \begin_inset Flex Code
16698 \begin_layout Plain Layout
16704 , describing the rendering style used for the inset's frame and buttons.
16705 Footnotes generally use
16706 \begin_inset Flex Code
16709 \begin_layout Plain Layout
16715 , ERT insets generally
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16725 , and character styles
16726 \begin_inset Flex Code
16729 \begin_layout Plain Layout
16738 \begin_layout Description
16739 \begin_inset Flex Code
16742 \begin_layout Plain Layout
16749 \begin_inset Flex Code
16752 \begin_layout Plain Layout
16761 \begin_inset space \thinspace{}
16767 \begin_inset Flex Code
16770 \begin_layout Plain Layout
16779 \begin_inset Flex Code
16782 \begin_layout Plain Layout
16789 \begin_inset Flex Code
16792 \begin_layout Plain Layout
16799 Indicates whether the environment will stand on its own in the output or
16800 will appear inline with the surrounding text.
16801 If set to false, it is supposed that the LaTeX environment ignores white
16802 space (including one newline character) after the
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16819 \begin_inset Flex Code
16822 \begin_layout Plain Layout
16838 \begin_layout Description
16839 \begin_inset Flex Code
16842 \begin_layout Plain Layout
16848 Required at the end of the
16849 \begin_inset Flex Code
16852 \begin_layout Plain Layout
16861 \begin_layout Description
16862 \begin_inset Flex Code
16865 \begin_layout Plain Layout
16871 The font used for both the text body
16877 \begin_inset CommandInset ref
16879 reference "sub:Font-description"
16884 Note that defining this font automatically defines the
16885 \begin_inset Flex Code
16888 \begin_layout Plain Layout
16894 to the same value, so define this first and define
16895 \begin_inset Flex Code
16898 \begin_layout Plain Layout
16904 later if you want them to be different.
16905 \change_inserted -195340706 1421002157
16909 \begin_layout Description
16911 \change_inserted -195340706 1421002157
16912 \begin_inset Flex Code
16915 \begin_layout Plain Layout
16917 \change_inserted -195340706 1421002157
16918 FixedWidthPreambleEncoding
16924 \begin_inset Flex Code
16927 \begin_layout Plain Layout
16929 \change_inserted -195340706 1421002157
16938 \begin_inset space \thinspace{}
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16947 \change_inserted -195340706 1421002157
16953 ] Force a fixed width encoding for the translated contents of
16954 \begin_inset Flex Code
16957 \begin_layout Plain Layout
16959 \change_inserted -195340706 1421002157
16966 \begin_inset Flex Code
16969 \begin_layout Plain Layout
16971 \change_inserted -195340706 1421002157
16977 code generated by this layout.
16978 This is needed for special packages like the listings package that do not
16979 work with variable width encodings such as utf8.
16981 This setting is ignored if fully unicode aware LaTeX backends such as XeLaTeX
16987 \begin_layout Description
16988 \begin_inset Flex Code
16991 \begin_layout Plain Layout
16992 ForceLocalFontSwitch
16998 \begin_inset Flex Code
17001 \begin_layout Plain Layout
17010 \begin_inset space \thinspace{}
17014 \begin_inset Flex Code
17017 \begin_layout Plain Layout
17023 ] When using babel, always use a local font switch (
17024 \begin_inset Flex Code
17027 \begin_layout Plain Layout
17035 ), never a global one (such as
17036 \begin_inset Flex Code
17039 \begin_layout Plain Layout
17050 \begin_layout Description
17051 \begin_inset Flex Code
17054 \begin_layout Plain Layout
17061 \begin_inset Flex Code
17064 \begin_layout Plain Layout
17073 \begin_inset space \thinspace{}
17077 \begin_inset Flex Code
17080 \begin_layout Plain Layout
17087 \begin_inset Quotes eld
17091 \begin_inset Quotes erd
17094 language, leading to Left-to-Right (Latin) output, e.
17095 \begin_inset space \thinspace{}
17099 \begin_inset space \space{}
17102 in TeX code or URL.
17104 \change_inserted -712698321 1417441977
17108 \begin_layout Description
17110 \change_inserted -712698321 1417442090
17111 \begin_inset Flex Code
17114 \begin_layout Plain Layout
17116 \change_inserted -712698321 1417441983
17123 \begin_inset Flex Code
17126 \begin_layout Plain Layout
17128 \change_inserted -712698321 1417441978
17137 \begin_inset space \thinspace{}
17141 \begin_inset Flex Code
17144 \begin_layout Plain Layout
17146 \change_inserted -712698321 1417441978
17152 ] Force a a line break in the LaTeX output before the inset starts and after
17154 This assures the inset itself is output on its own lines, for parsing purposes.
17156 \change_inserted 274215730 1419105878
17162 \begin_layout Description
17163 \begin_inset Flex Code
17166 \begin_layout Plain Layout
17173 \begin_inset Flex Code
17176 \begin_layout Plain Layout
17185 \begin_inset space \thinspace{}
17189 \begin_inset Flex Code
17192 \begin_layout Plain Layout
17198 ] Indicates whether the
17199 \begin_inset Flex Code
17202 \begin_layout Plain Layout
17208 should be used or, instead, the user can change the paragraph style used
17213 \begin_layout Description
17214 \begin_inset Flex Code
17217 \begin_layout Plain Layout
17224 \begin_inset Flex Code
17227 \begin_layout Plain Layout
17236 \begin_inset space \thinspace{}
17240 \begin_inset Flex Code
17243 \begin_layout Plain Layout
17249 ] As with paragraph styles, see
17250 \begin_inset CommandInset ref
17252 reference "sub:Paragraph-Styles"
17259 \begin_layout Description
17260 \begin_inset Flex Code
17263 \begin_layout Plain Layout
17269 These tags control the XHTML output.
17271 \begin_inset CommandInset ref
17273 reference "sec:Tags-for-XHTML"
17280 \begin_layout Description
17281 \begin_inset Flex Code
17284 \begin_layout Plain Layout
17291 \begin_inset Flex Code
17294 \begin_layout Plain Layout
17303 \begin_inset space \thinspace{}
17307 \begin_inset Flex Code
17310 \begin_layout Plain Layout
17316 ] Whether to include the contents of this inset in the strings generated
17317 for the `Outline' pane.
17318 One would not, for example, want the content of a footnote in a section
17319 header to be included in the TOC displayed in the outline, but one would
17320 normally want the content of a character style displayed.
17321 Default is false: not to include.
17324 \begin_layout Description
17325 \begin_inset Flex Code
17328 \begin_layout Plain Layout
17337 \begin_inset Flex Code
17340 \begin_layout Plain Layout
17349 \begin_inset space \thinspace{}
17353 \begin_inset Flex Code
17356 \begin_layout Plain Layout
17362 ] As with paragraph styles, see
17363 \begin_inset CommandInset ref
17365 reference "sub:Paragraph-Styles"
17372 \begin_layout Description
17373 \begin_inset Flex Code
17376 \begin_layout Plain Layout
17382 The font used for the label.
17384 \begin_inset CommandInset ref
17386 reference "sub:Font-description"
17391 Note that this definition can never appear before
17392 \begin_inset Flex Code
17395 \begin_layout Plain Layout
17401 , lest it be ineffective.
17404 \begin_layout Description
17405 \begin_inset Flex Code
17408 \begin_layout Plain Layout
17415 \begin_inset Flex Code
17418 \begin_layout Plain Layout
17425 \begin_inset Quotes erd
17429 \begin_inset Quotes erd
17432 ] What will be displayed on the button or elsewhere as the inset label.
17434 \begin_inset Flex Code
17437 \begin_layout Plain Layout
17444 \begin_inset Flex Code
17447 \begin_layout Plain Layout
17453 ) modify this label on the fly.
17456 \begin_layout Description
17457 \begin_inset Flex Code
17460 \begin_layout Plain Layout
17466 Language dependent preamble; see
17467 \begin_inset CommandInset ref
17469 reference "sub:I18n"
17476 \begin_layout Description
17477 \begin_inset Flex Code
17480 \begin_layout Plain Layout
17487 \begin_inset Flex Code
17490 \begin_layout Plain Layout
17496 ] The name of the corresponding LaTeX stuff.
17497 Either the environment or command name.
17500 \begin_layout Description
17501 \begin_inset Flex Code
17504 \begin_layout Plain Layout
17511 \begin_inset Flex Code
17514 \begin_layout Plain Layout
17520 ] The optional parameter for the corresponding
17521 \begin_inset Flex Code
17524 \begin_layout Plain Layout
17530 stuff, including possible bracket pairs like
17531 \begin_inset Flex Code
17534 \begin_layout Plain Layout
17541 This parameter cannot be changed from within LyX (use
17542 \begin_inset Flex Code
17545 \begin_layout Plain Layout
17551 for customizable parameters).
17552 It will be output as is after all LaTeX
17553 \begin_inset Flex Code
17556 \begin_layout Plain Layout
17565 \begin_layout Description
17566 \begin_inset Flex Code
17569 \begin_layout Plain Layout
17576 \begin_inset Flex Code
17579 \begin_layout Plain Layout
17580 Command, Environment, None
17585 ] How the style should be translated into LaTeX.
17589 \begin_layout Plain Layout
17590 \begin_inset Flex Code
17593 \begin_layout Plain Layout
17599 is perhaps a bit misleading, since these rules apply to SGML classes too.
17600 Visit the SGML class files for specific examples.
17606 \begin_inset Separator parbreak
17613 \begin_layout Description
17614 \begin_inset Flex Code
17617 \begin_layout Plain Layout
17623 means nothing special
17626 \begin_layout Description
17627 \begin_inset Flex Code
17630 \begin_layout Plain Layout
17637 \begin_inset Flex Code
17640 \begin_layout Plain Layout
17647 {\SpecialChar \ldots{}
17656 \begin_layout Description
17657 \begin_inset Flex Code
17660 \begin_layout Plain Layout
17667 \begin_inset Flex Code
17670 \begin_layout Plain Layout
17677 }\SpecialChar \ldots{}
17692 \begin_layout Standard
17693 Putting the last few things together, the LaTeX output will be either:
17696 \begin_layout LyX-Code
17699 LatexName[LatexParam]{\SpecialChar \ldots{}
17703 \begin_layout Standard
17707 \begin_layout LyX-Code
17710 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
17716 \begin_layout Standard
17717 depending upon the LaTeX type.
17721 \begin_layout Description
17722 \begin_inset Flex Code
17725 \begin_layout Plain Layout
17732 \begin_inset Flex Code
17735 \begin_layout Plain Layout
17741 ] A string that is put at the beginning of the layout content.
17742 A line break in the output can be indicated by
17743 \begin_inset Flex Code
17746 \begin_layout Plain Layout
17755 \begin_layout Description
17756 \begin_inset Flex Code
17759 \begin_layout Plain Layout
17766 \begin_inset Flex Code
17769 \begin_layout Plain Layout
17776 \begin_inset Flex Code
17779 \begin_layout Plain Layout
17786 \begin_inset Flex Code
17789 \begin_layout Plain Layout
17796 \begin_inset Flex Code
17799 \begin_layout Plain Layout
17805 (indicating a dummy definition ending definitions of charstyles, etc).
17806 This entry is required in and is only meaningful for Flex insets.
17807 Among other things, it determines on which menu this inset will appear.
17809 \begin_inset Flex Code
17812 \begin_layout Plain Layout
17819 \begin_inset Flex Code
17822 \begin_layout Plain Layout
17828 will automatically set
17829 \begin_inset Flex Code
17832 \begin_layout Plain Layout
17840 \begin_inset Flex Code
17843 \begin_layout Plain Layout
17849 can be set to true for
17850 \begin_inset Flex Code
17853 \begin_layout Plain Layout
17859 insets by setting it
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17876 \begin_layout Description
17877 \begin_inset Flex Code
17880 \begin_layout Plain Layout
17887 \begin_inset Flex Code
17890 \begin_layout Plain Layout
17899 \begin_inset space \thinspace{}
17903 \begin_inset Flex Code
17906 \begin_layout Plain Layout
17912 ] Whether multiple paragraphs are permitted in this inset.
17914 \begin_inset Flex Code
17917 \begin_layout Plain Layout
17923 to the same value and
17924 \begin_inset Flex Code
17927 \begin_layout Plain Layout
17933 to the opposite value.
17934 These can be reset to other values, if they are used
17939 \begin_inset Flex Code
17942 \begin_layout Plain Layout
17952 \begin_layout Description
17953 \begin_inset Flex Code
17956 \begin_layout Plain Layout
17963 \begin_inset Flex Code
17966 \begin_layout Plain Layout
17975 \begin_inset space \thinspace{}
17979 \begin_inset Flex Code
17982 \begin_layout Plain Layout
17988 ] Whether fragile commands in this inset should be
17989 \begin_inset Flex Code
17992 \begin_layout Plain Layout
18005 whether the command should itself be protected.) Default is false.
18008 \begin_layout Description
18009 \begin_inset Flex Code
18012 \begin_layout Plain Layout
18019 \begin_inset Flex Code
18022 \begin_layout Plain Layout
18028 ] Deletes an existing
18029 \begin_inset Flex Code
18032 \begin_layout Plain Layout
18039 \change_inserted -712698321 1417953494
18043 \begin_layout Description
18045 \change_inserted -712698321 1417953559
18046 \begin_inset Flex Code
18049 \begin_layout Plain Layout
18051 \change_inserted -712698321 1417953494
18058 \begin_inset Flex Code
18061 \begin_layout Plain Layout
18063 \change_inserted -712698321 1417953574
18070 \begin_inset Flex Code
18073 \begin_layout Plain Layout
18075 \change_inserted -712698321 1417953533
18081 that has replaced this
18082 \begin_inset Flex Code
18085 \begin_layout Plain Layout
18087 \change_inserted -712698321 1417953551
18094 This is used to rename an
18095 \begin_inset Flex Code
18098 \begin_layout Plain Layout
18100 \change_inserted -712698321 1417953559
18106 , while keeping backward compatibility.
18111 \begin_layout Description
18112 \begin_inset Flex Code
18115 \begin_layout Plain Layout
18122 \begin_inset Flex Code
18125 \begin_layout Plain Layout
18134 \begin_inset space \thinspace{}
18138 \begin_inset Flex Code
18141 \begin_layout Plain Layout
18147 ] As with paragraph styles, see
18148 \begin_inset CommandInset ref
18150 reference "sub:Paragraph-Styles"
18158 \begin_layout Description
18159 \begin_inset Flex Code
18162 \begin_layout Plain Layout
18169 \begin_inset Flex Code
18172 \begin_layout Plain Layout
18181 \begin_inset space \thinspace{}
18185 \begin_inset Flex Code
18188 \begin_layout Plain Layout
18194 ] As with paragraph styles, see
18195 \begin_inset CommandInset ref
18197 reference "sub:Paragraph-Styles"
18205 \begin_layout Description
18206 \begin_inset Flex Code
18209 \begin_layout Plain Layout
18215 As with paragraph styles, see
18216 \begin_inset CommandInset ref
18218 reference "sub:Paragraph-Styles"
18225 \begin_layout Description
18226 \begin_inset Flex Code
18229 \begin_layout Plain Layout
18236 \begin_inset Flex Code
18239 \begin_layout Plain Layout
18245 ] The prefix to use when creating labels referring to insets of this type.
18246 This allows the use of formatted references.
18249 \begin_layout Description
18250 \begin_inset Flex Code
18253 \begin_layout Plain Layout
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18269 ] As with paragraph styles, see
18270 \begin_inset CommandInset ref
18272 reference "sub:Paragraph-Styles"
18279 \begin_layout Description
18280 \begin_inset Flex Code
18283 \begin_layout Plain Layout
18290 \begin_inset Flex Code
18293 \begin_layout Plain Layout
18302 \begin_inset space \thinspace{}
18306 \begin_inset Flex Code
18309 \begin_layout Plain Layout
18315 ] Resets the LaTeX arguments of this layout (as defined via the
18316 \begin_inset Flex Code
18319 \begin_layout Plain Layout
18326 This is useful if you have copied a style via
18327 \begin_inset Flex Code
18330 \begin_layout Plain Layout
18336 , but you do not want to inherit its (required and optional) arguments.
18339 \begin_layout Description
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18350 \begin_inset Flex Code
18353 \begin_layout Plain Layout
18360 \begin_inset space \thinspace{}
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18375 ] Whether this inset should use the font of its surrounding environment
18377 Default is false: use the font of the surrounding environment.
18380 \begin_layout Description
18381 \begin_inset Flex Code
18384 \begin_layout Plain Layout
18391 \begin_inset Flex Code
18394 \begin_layout Plain Layout
18400 ] A string that is put at the end of the layout content.
18401 A line break in the output can be indicated by
18402 \begin_inset Flex Code
18405 \begin_layout Plain Layout
18414 \begin_layout Description
18415 \begin_inset Flex Code
18418 \begin_layout Plain Layout
18425 \begin_inset Flex Code
18428 \begin_layout Plain Layout
18435 \begin_inset space \thinspace{}
18439 \begin_inset Flex Code
18442 \begin_layout Plain Layout
18450 ] Allow spell-checking the contents of this inset.
18454 \begin_layout Subsection
18456 \begin_inset CommandInset label
18458 name "sub:Counters"
18465 \begin_layout Standard
18466 It is necessary to define the counters (
18467 \begin_inset Flex MenuItem
18470 \begin_layout Plain Layout
18477 \begin_inset Flex MenuItem
18480 \begin_layout Plain Layout
18486 , \SpecialChar \ldots{}
18487 ) in the text class itself.
18488 The standard counters are defined in the file
18489 \begin_inset Flex Code
18492 \begin_layout Plain Layout
18498 , so you may have to do no more than add
18501 \begin_layout LyX-Code
18502 Input stdcounters.inc
18505 \begin_layout Standard
18506 to your layout file to get them to work.
18507 But if you want to define custom counters, then you can do so.
18508 The counter declaration must begin with:
18511 \begin_layout LyX-Code
18512 Counter CounterName
18515 \begin_layout Standard
18517 \begin_inset Flex Code
18520 \begin_layout Plain Layout
18526 ' is replaced by the name of the counter.
18527 And it must end with
18528 \begin_inset Quotes eld
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18542 \begin_inset Quotes erd
18546 The following parameters can also be used:
18549 \begin_layout Description
18550 \begin_inset Flex Code
18553 \begin_layout Plain Layout
18560 \begin_inset Flex Code
18563 \begin_layout Plain Layout
18569 ] Sets the initial value for the counter, to which it will be reset whenever
18571 Normally, one will want the default, 1.
18574 \begin_layout Description
18575 \begin_inset Flex Code
18578 \begin_layout Plain Layout
18585 \begin_inset Flex Code
18588 \begin_layout Plain Layout
18595 \begin_inset Quotes erd
18599 \begin_inset Quotes erd
18602 ] When defined, this string defines how the counter is displayed.
18603 Setting this value sets
18604 \begin_inset Flex Code
18607 \begin_layout Plain Layout
18608 LabelStringAppendix
18614 The following special constructs can be used in the string:
18615 \begin_inset Separator parbreak
18622 \begin_layout Itemize
18623 \begin_inset Flex Code
18626 \begin_layout Plain Layout
18634 will be replaced by the expansion of the
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18645 \begin_inset Flex Code
18648 \begin_layout Plain Layout
18649 LabelStringAppendix
18655 \begin_inset Flex Code
18658 \begin_layout Plain Layout
18668 \begin_layout Itemize
18669 counter values can be expressed using LaTeX-like macros
18670 \begin_inset Newline newline
18674 \begin_inset Flex Code
18677 \begin_layout Plain Layout
18694 \begin_inset Flex Code
18697 \begin_layout Plain Layout
18709 \begin_layout Plain Layout
18719 Actually, the situation is a bit more complicated: any
18738 other than those described below will produce arabic numerals.
18739 It would not be surprising to see this change in the future.
18745 \begin_inset Flex Code
18748 \begin_layout Plain Layout
18754 : 1, 2, 3,\SpecialChar \ldots{}
18756 \begin_inset Flex Code
18759 \begin_layout Plain Layout
18765 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18767 \begin_inset Flex Code
18770 \begin_layout Plain Layout
18776 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18778 \begin_inset Flex Code
18781 \begin_layout Plain Layout
18787 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18789 \begin_inset Flex Code
18792 \begin_layout Plain Layout
18798 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18800 \begin_inset Flex Code
18803 \begin_layout Plain Layout
18809 for hebrew numerals.
18813 \begin_layout Standard
18814 If LabelString is not defined, a default value is constructed as follows:
18815 if the counter has a master counter
18816 \begin_inset Flex Code
18819 \begin_layout Plain Layout
18826 \begin_inset Flex Code
18829 \begin_layout Plain Layout
18836 \begin_inset Newline newline
18840 \begin_inset Flex Code
18843 \begin_layout Plain Layout
18853 is used; otherwise the string
18854 \begin_inset Flex Code
18857 \begin_layout Plain Layout
18868 \begin_layout Description
18869 \begin_inset Flex Code
18872 \begin_layout Plain Layout
18873 LabelStringAppendix
18879 \begin_inset Flex Code
18882 \begin_layout Plain Layout
18889 \begin_inset Quotes erd
18893 \begin_inset Quotes erd
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18906 , but for use in the Appendix.
18909 \begin_layout Description
18910 \begin_inset Flex Code
18913 \begin_layout Plain Layout
18920 \begin_inset Flex Code
18923 \begin_layout Plain Layout
18930 \begin_inset Quotes erd
18934 \begin_inset Quotes erd
18937 ] A format for use with formatted references to this counter.
18938 For example, one might want to have references to section numbers appear
18940 \begin_inset Quotes eld
18944 \begin_inset Quotes erd
18948 The string should contain
18949 \begin_inset Quotes eld
18953 \begin_inset Quotes erd
18957 This will be replaced by the counter number itself.
18958 So, for sections, it would be: Section ##.
18961 \begin_layout Description
18962 \begin_inset Flex Code
18965 \begin_layout Plain Layout
18972 \begin_inset Flex Code
18975 \begin_layout Plain Layout
18982 \begin_inset Quotes erd
18986 \begin_inset Quotes erd
18989 ] If this is set to the name of another counter, the present counter will
18990 be reset every time the other one is increased.
18992 \begin_inset Flex Code
18995 \begin_layout Plain Layout
19002 \begin_inset Flex Code
19005 \begin_layout Plain Layout
19014 \begin_layout Subsection
19016 \begin_inset CommandInset label
19018 name "sub:Font-description"
19025 \begin_layout Standard
19026 A font description looks like this:
19029 \begin_layout LyX-Code
19043 \begin_layout LyX-Code
19047 \begin_layout LyX-Code
19051 \begin_layout Standard
19052 The following commands are available:
19055 \begin_layout Description
19056 \begin_inset Flex Code
19059 \begin_layout Plain Layout
19066 \begin_inset Flex Code
19069 \begin_layout Plain Layout
19078 \begin_inset Flex Code
19081 \begin_layout Plain Layout
19088 \begin_inset Flex Code
19091 \begin_layout Plain Layout
19098 \begin_inset Flex Code
19101 \begin_layout Plain Layout
19108 \begin_inset Flex Code
19111 \begin_layout Plain Layout
19118 \begin_inset Flex Code
19121 \begin_layout Plain Layout
19128 \begin_inset Flex Code
19131 \begin_layout Plain Layout
19138 \begin_inset Flex Code
19141 \begin_layout Plain Layout
19148 \begin_inset Flex Code
19151 \begin_layout Plain Layout
19160 \begin_layout Description
19161 \begin_inset Flex Code
19164 \begin_layout Plain Layout
19171 \begin_inset Flex Code
19174 \begin_layout Plain Layout
19183 \begin_inset Flex Code
19186 \begin_layout Plain Layout
19193 \begin_inset Flex Code
19196 \begin_layout Plain Layout
19205 \begin_layout Description
19206 \begin_inset Flex Code
19209 \begin_layout Plain Layout
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19225 ] Valid arguments are:
19226 \begin_inset Flex Code
19229 \begin_layout Plain Layout
19236 \begin_inset Flex Code
19239 \begin_layout Plain Layout
19246 \begin_inset Flex Code
19249 \begin_layout Plain Layout
19256 \begin_inset Flex Code
19259 \begin_layout Plain Layout
19266 \begin_inset Flex Code
19269 \begin_layout Plain Layout
19276 \begin_inset Flex Code
19279 \begin_layout Plain Layout
19286 \begin_inset Flex Code
19289 \begin_layout Plain Layout
19296 \begin_inset Flex Code
19299 \begin_layout Plain Layout
19306 \begin_inset Flex Code
19309 \begin_layout Plain Layout
19316 \begin_inset Flex Code
19319 \begin_layout Plain Layout
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19336 \begin_inset Flex Code
19339 \begin_layout Plain Layout
19346 Each of these turns on or off the corresponding attribute.
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19357 turns on emphasis, and
19358 \begin_inset Flex Code
19361 \begin_layout Plain Layout
19369 \begin_inset Newline newline
19372 If the latter seems puzzling, remember that the font settings for the present
19373 context are generally inherited from the surrounding context.
19375 \begin_inset Flex Code
19378 \begin_layout Plain Layout
19384 would turn off the emphasis that was anyway in effect, say, in a theorem
19388 \begin_layout Description
19389 \begin_inset Flex Code
19392 \begin_layout Plain Layout
19399 \begin_inset Flex Code
19402 \begin_layout Plain Layout
19411 \begin_inset Flex Code
19414 \begin_layout Plain Layout
19423 \begin_layout Description
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19434 \begin_inset Flex Code
19437 \begin_layout Plain Layout
19446 \begin_inset Flex Code
19449 \begin_layout Plain Layout
19456 \begin_inset Flex Code
19459 \begin_layout Plain Layout
19466 \begin_inset Flex Code
19469 \begin_layout Plain Layout
19478 \begin_layout Description
19479 \begin_inset Flex Code
19482 \begin_layout Plain Layout
19489 \begin_inset Flex Code
19492 \begin_layout Plain Layout
19499 \begin_inset Flex Code
19502 \begin_layout Plain Layout
19509 \begin_inset Flex Code
19512 \begin_layout Plain Layout
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19551 \begin_inset Flex Code
19554 \begin_layout Plain Layout
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19573 \begin_layout Subsection
19574 \begin_inset CommandInset label
19576 name "sub:Citation-format-description"
19580 Citation format description
19583 \begin_layout Standard
19585 \begin_inset Flex Code
19588 \begin_layout Plain Layout
19594 blocks are used to describe how bibliographic information should be displayed,
19595 both within LyX itself (in the citation dialog and in tooltips, for example)
19596 and in XHTML output.
19597 Such a block might look like this:
19600 \begin_layout LyX-Code
19604 \begin_layout LyX-Code
19608 \begin_layout LyX-Code
19612 \begin_layout LyX-Code
19616 \begin_layout Standard
19617 The individual lines define how the bibliographic information associated
19618 with an article or book, respectively, is to be displayed, and such a definitio
19619 n can be given for any `entry type' that might be present in a BibTeX file.
19620 LyX defines a default format in the source code that will be used if no
19621 specific definition has been given.
19622 LyX predefines several formats in the file
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19632 , which is included in most of LyX's document classes.
19635 \begin_layout Standard
19636 The definitions use a simple language that allows BibTeX keys to be replaced
19638 Keys should be enclosed in
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19649 \begin_inset Flex Code
19652 \begin_layout Plain Layout
19659 So a simple definition might look like this:
19662 \begin_layout LyX-Code
19664 \begin_inset Quotes eld
19668 \begin_inset Quotes erd
19674 \begin_layout Standard
19675 This would print the author, followed by a comma, followed by the title,
19676 in quotes, followed by a period.
19679 \begin_layout Standard
19680 Of course, sometimes you may want to print a key only if it exists.
19681 This can be done by using a conditional construction, such as:
19682 \begin_inset Flex Code
19685 \begin_layout Plain Layout
19687 \begin_inset space ~
19697 \begin_inset Flex Code
19700 \begin_layout Plain Layout
19706 key exists, then print
19707 \begin_inset Quotes eld
19711 \begin_inset space ~
19715 \begin_inset Quotes erd
19718 followed by the volume key.
19719 It is also possible to have an else clause in the conditional, such as:
19720 \begin_inset Newline newline
19724 \begin_inset Flex Code
19727 \begin_layout Plain Layout
19728 {%author%[[%author%]][[%editor%, ed.]]}
19734 \begin_inset Newline newline
19738 \begin_inset Flex Code
19741 \begin_layout Plain Layout
19747 key is printed if it exists; otherwise, the editor key is printed, followed
19749 \begin_inset Quotes eld
19753 \begin_inset space ~
19757 \begin_inset Quotes erd
19760 Note that the key is again enclosed in
19761 \begin_inset Flex Code
19764 \begin_layout Plain Layout
19770 signs; the entire conditional is enclosed in braces; and the if and else
19771 clauses are enclosed in double brackets,
19772 \begin_inset Quotes eld
19776 \begin_inset Flex Code
19779 \begin_layout Plain Layout
19786 \begin_inset Quotes eld
19790 \begin_inset Quotes eld
19794 \begin_inset Flex Code
19797 \begin_layout Plain Layout
19804 \begin_inset Quotes erd
19808 There must be no space between any of these.
19811 \begin_layout Standard
19812 There is one other piece of syntax available in definitions, which looks
19814 \begin_inset Flex Code
19817 \begin_layout Plain Layout
19824 This defines a piece of formatting information that is to be used when
19826 \begin_inset Quotes eld
19830 \begin_inset Quotes erd
19834 Obviously, we do not want to output HTML tags when writing plain text,
19835 so they should be wrapped in
19836 \begin_inset Quotes eld
19840 \begin_inset Quotes erd
19844 \begin_inset Quotes eld
19848 \begin_inset Quotes erd
19854 \begin_layout Standard
19855 Two special sorts of definitions are also possible in a
19856 \begin_inset Flex Code
19859 \begin_layout Plain Layout
19866 An example of the first would be:
19869 \begin_layout LyX-Code
19871 \begin_inset Quotes eld
19875 \begin_inset Quotes erd
19881 \begin_layout Standard
19882 This is an abbreviation, or macro, and it can be used by treating it as
19884 \begin_inset Flex Code
19887 \begin_layout Plain Layout
19895 \begin_inset Flex Code
19898 \begin_layout Plain Layout
19904 exactly as it would treat its definition.
19905 So, let us issue the obvious
19913 \begin_layout LyX-Code
19917 \begin_layout Standard
19918 or anything like it.
19919 LyX shouldn't go into an infinite loop, but it may go into a long one before
19923 \begin_layout Standard
19924 The second sort of special definition might look like this:
19927 \begin_layout LyX-Code
19931 \begin_layout Standard
19932 This defines a translatable piece of text, which allows relevant parts of
19933 the bibliography to be translated.
19934 It can be included in a definition by treating it as a key:
19935 \begin_inset Flex Code
19938 \begin_layout Plain Layout
19945 Several of these are predefined in
19946 \begin_inset Flex Code
19949 \begin_layout Plain Layout
19956 Note that these are not macros, in the sense just defined.
19957 They will not be expanded.
19960 \begin_layout Standard
19961 So here then is an example that use all these features:
19962 \begin_inset VSpace defskip
19968 \begin_layout Standard
19972 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
19975 \begin_layout Standard
19976 \begin_inset VSpace defskip
19979 This defines a macro that prints the author, followed by a comma, if the
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19990 key is defined, or else prints the name of the editor, followed by the
19992 \begin_inset Flex Code
19995 \begin_layout Plain Layout
20001 or its translation (it is by default
20002 \begin_inset Quotes eld
20006 \begin_inset Quotes erd
20010 \begin_inset Flex Code
20013 \begin_layout Plain Layout
20020 Note that this is in fact defined in
20021 \begin_inset Flex Code
20024 \begin_layout Plain Layout
20030 , so you can use it in your own definitions, or re-definitions, if you load
20034 \begin_layout Section
20035 \begin_inset CommandInset label
20037 name "sec:Tags-for-XHTML"
20041 Tags for XHTML output
20044 \begin_layout Standard
20045 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20046 by layout information.
20047 In general, LyX provides sensible defaults and, as mentioned earlier, it
20048 will even construct default CSS style rules from the other layout tags.
20049 For example, LyX will attempt to use the information provided in the
20050 \begin_inset Flex Code
20053 \begin_layout Plain Layout
20059 declaration for the Chapter style to write CSS that will appropriately
20060 format chapter headings.
20063 \begin_layout Standard
20064 In many cases, then, you may not have to do anything at all to get acceptable
20065 XHTML output for your own environments, custom insets, and so forth.
20066 But in some cases you will, and so LyX provides a number of layout tags
20067 that can be used to customize the XHTML and CSS that are generated.
20070 \begin_layout Standard
20071 Note that there are two tags,
20072 \begin_inset Flex Code
20075 \begin_layout Plain Layout
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20091 that may appear outside style and inset declarations.
20093 \begin_inset CommandInset ref
20095 reference "sub:General-text-class"
20099 for details on these.
20102 \begin_layout Subsection
20103 \begin_inset CommandInset label
20105 name "sub:Paragraph-Style-XHTML"
20112 \begin_layout Standard
20113 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20114 dealing with a normal paragraph, a command, or an environment, where this
20115 is itself determined by the contents of the corresponding
20116 \begin_inset Flex Code
20119 \begin_layout Plain Layout
20129 \begin_layout Standard
20130 For a command or normal paragraph, the output XHTML has the following form:
20133 \begin_layout LyX-Code
20135 \begin_inset Quotes erd
20139 \begin_inset Quotes erd
20145 \begin_layout LyX-Code
20147 \begin_inset Quotes erd
20151 \begin_inset Quotes erd
20157 \begin_layout LyX-Code
20158 Contents of the paragraph.
20161 \begin_layout LyX-Code
20165 \begin_layout Standard
20166 The label tags are of course omitted if the paragraph does not have a label.
20169 \begin_layout Standard
20170 For an environment that is not some sort of list, the XHTML takes this form:
20173 \begin_layout LyX-Code
20175 \begin_inset Quotes erd
20179 \begin_inset Quotes erd
20185 \begin_layout LyX-Code
20187 \begin_inset Quotes erd
20191 \begin_inset Quotes erd
20195 \begin_inset Quotes erd
20199 \begin_inset Quotes erd
20202 >Environment Label</labeltag>First paragraph.</itemtag>
20205 \begin_layout LyX-Code
20206 <itemtag>Second paragraph.</itemtag>
20209 \begin_layout LyX-Code
20213 \begin_layout Standard
20214 Note that the label is output only for the first paragraph, as it should
20215 be for a theorem, for example.
20219 \begin_layout Standard
20220 For a list, we have one of these forms:
20223 \begin_layout LyX-Code
20225 \begin_inset Quotes erd
20229 \begin_inset Quotes erd
20235 \begin_layout LyX-Code
20237 \begin_inset Quotes erd
20241 \begin_inset Quotes erd
20245 \begin_inset Quotes erd
20249 \begin_inset Quotes erd
20252 >List Label</labeltag>First item.</itemtag>
20255 \begin_layout LyX-Code
20257 \begin_inset Quotes erd
20261 \begin_inset Quotes erd
20265 \begin_inset Quotes erd
20269 \begin_inset Quotes erd
20272 >List Label</labeltag>Second item.</itemtag>
20275 \begin_layout LyX-Code
20279 \begin_layout LyX-Code
20283 \begin_layout LyX-Code
20285 \begin_inset Quotes erd
20289 \begin_inset Quotes erd
20295 \begin_layout LyX-Code
20297 \begin_inset Quotes erd
20301 \begin_inset Quotes erd
20304 >List Label</labeltag><itemtag attr=
20305 \begin_inset Quotes erd
20309 \begin_inset Quotes erd
20312 >First item.</itemtag>
20315 \begin_layout LyX-Code
20317 \begin_inset Quotes erd
20321 \begin_inset Quotes erd
20324 >List Label</labeltag><itemtag attr=
20325 \begin_inset Quotes erd
20329 \begin_inset Quotes erd
20332 >Second item.</itemtag>
20335 \begin_layout LyX-Code
20339 \begin_layout Standard
20340 Note the different orders of
20341 \begin_inset Flex Code
20344 \begin_layout Plain Layout
20351 \begin_inset Flex Code
20354 \begin_layout Plain Layout
20361 Which order we get depends upon the setting of
20362 \begin_inset Flex Code
20365 \begin_layout Plain Layout
20372 \begin_inset Flex Code
20375 \begin_layout Plain Layout
20381 is false (the default), you get the first of these, with the label within
20382 the item; if true, you get the second, with the label outside the item.
20385 \begin_layout Standard
20386 The specific tags and attributes output for each paragraph type can be controlle
20387 d by means of the layout tags we are about to describe.
20388 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20389 so you often may not need to do very much to get good XHTML output.
20390 Think of the available tags as there so you can tweak things to your liking.
20393 \begin_layout Description
20394 \begin_inset Flex Code
20397 \begin_layout Plain Layout
20404 \begin_inset Flex Code
20407 \begin_layout Plain Layout
20413 ] Specifies attribute information to be output with the main tag.
20415 \begin_inset Quotes eld
20419 \begin_inset Flex Code
20422 \begin_layout Plain Layout
20429 \begin_inset Quotes erd
20433 By default, LyX will output
20434 \begin_inset Quotes eld
20438 \begin_inset Flex Code
20441 \begin_layout Plain Layout
20448 \begin_inset Quotes erd
20452 \begin_inset Flex Code
20455 \begin_layout Plain Layout
20461 is the LyX name of the layout, made lowercase, for example: chapter.
20466 contain any style information.
20468 \begin_inset Flex Code
20471 \begin_layout Plain Layout
20480 \begin_layout Description
20481 \begin_inset Flex Code
20484 \begin_layout Plain Layout
20491 \begin_inset Flex Code
20494 \begin_layout Plain Layout
20504 ] Whether to output the default CSS information LyX generates for this layout,
20505 even if additional information is explicitly provided via
20506 \begin_inset Flex Code
20509 \begin_layout Plain Layout
20517 \begin_inset Flex Code
20520 \begin_layout Plain Layout
20526 allows you to alter or augment the generated CSS, rather than to override
20529 \begin_inset Flex Code
20532 \begin_layout Plain Layout
20541 \begin_layout Description
20542 \begin_inset Flex Code
20545 \begin_layout Plain Layout
20552 \begin_inset Flex Code
20555 \begin_layout Plain Layout
20561 ] The tag to be used for individual paragraphs of environments, replacing
20563 \begin_inset Flex Code
20566 \begin_layout Plain Layout
20572 in the examples above.
20574 \begin_inset Flex Code
20577 \begin_layout Plain Layout
20586 \begin_layout Description
20587 \begin_inset Flex Code
20590 \begin_layout Plain Layout
20597 \begin_inset Flex Code
20600 \begin_layout Plain Layout
20606 ] Attributes for the item tag.
20608 \begin_inset Quotes eld
20612 \begin_inset Flex Code
20615 \begin_layout Plain Layout
20616 class=`layoutname_item'
20622 \begin_inset Quotes erd
20630 contain any style information.
20632 \begin_inset Flex Code
20635 \begin_layout Plain Layout
20644 \begin_layout Description
20645 \begin_inset Flex Code
20648 \begin_layout Plain Layout
20655 \begin_inset Flex Code
20658 \begin_layout Plain Layout
20664 ] The tag to be used for paragraph and item labels, replacing
20665 \begin_inset Flex Code
20668 \begin_layout Plain Layout
20674 in the examples above.
20676 \begin_inset Flex Code
20679 \begin_layout Plain Layout
20686 \begin_inset Flex Code
20689 \begin_layout Plain Layout
20696 \begin_inset Flex Code
20699 \begin_layout Plain Layout
20706 \begin_inset Flex Code
20709 \begin_layout Plain Layout
20710 Centered_Top_Environment
20715 , in which case it defaults to
20716 \begin_inset Flex Code
20719 \begin_layout Plain Layout
20728 \begin_layout Description
20729 \begin_inset Flex Code
20732 \begin_layout Plain Layout
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20748 ] Attributes for the label tag.
20750 \begin_inset Quotes eld
20754 \begin_inset Flex Code
20757 \begin_layout Plain Layout
20758 class=`layoutname_label'
20764 \begin_inset Quotes erd
20772 contain any style information.
20774 \begin_inset Flex Code
20777 \begin_layout Plain Layout
20786 \begin_layout Description
20787 \begin_inset Flex Code
20790 \begin_layout Plain Layout
20797 \begin_inset Flex Code
20800 \begin_layout Plain Layout
20810 ] Meaningful only for list-like environments, this tag controls whether
20811 the label tag is output before or inside the item tag.
20812 This is used, for example, in the description environment, where we want
20814 \begin_inset Flex Code
20817 \begin_layout Plain Layout
20818 <dt>\SpecialChar \ldots{}
20819 </dt><dd>\SpecialChar \ldots{}
20827 \begin_inset Flex Code
20830 \begin_layout Plain Layout
20836 : The label tag is output inside the item tag.
20839 \begin_layout Description
20840 \begin_inset Flex Code
20843 \begin_layout Plain Layout
20849 Information to be output in the
20850 \begin_inset Flex Code
20853 \begin_layout Plain Layout
20859 section when this style is used.
20860 This might, for example, be used to include a
20861 \begin_inset Flex Code
20864 \begin_layout Plain Layout
20871 \begin_inset Flex Code
20874 \begin_layout Plain Layout
20883 \begin_layout Description
20884 \begin_inset Flex Code
20887 \begin_layout Plain Layout
20893 CSS style information to be included when this style is used.
20894 Note that this will automatically be wrapped in a layout-generated
20895 \begin_inset Flex Code
20898 \begin_layout Plain Layout
20904 block, so only the CSS itself need be included.
20906 \begin_inset Flex Code
20909 \begin_layout Plain Layout
20918 \begin_layout Description
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20938 ] The tag to be used for the main label, replacing
20939 \begin_inset Flex Code
20942 \begin_layout Plain Layout
20948 in the examples above.
20950 \begin_inset Flex Code
20953 \begin_layout Plain Layout
20962 \begin_layout Description
20963 \begin_inset Flex Code
20966 \begin_layout Plain Layout
20973 \begin_inset Flex Code
20976 \begin_layout Plain Layout
20986 ] Marks this style as the one to be used to generate the
20987 \begin_inset Flex Code
20990 \begin_layout Plain Layout
20996 tag for the XHTML file.
20997 By default, it is false.
20999 \begin_inset Flex Code
21002 \begin_layout Plain Layout
21008 file sets it to true for the
21009 \begin_inset Flex Code
21012 \begin_layout Plain Layout
21022 \begin_layout Subsection
21026 \begin_layout Standard
21027 The XHTML output of insets can also be controlled by information in layout
21032 \begin_layout Plain Layout
21033 At present, this is true only for
21034 \begin_inset Quotes eld
21038 \begin_inset Quotes erd
21041 insets (insets you can type into) and is not true for
21042 \begin_inset Quotes eld
21046 \begin_inset Quotes erd
21049 insets (insets that are associated with dialog boxes).
21054 Here, too, LyX tries to provide sensible defaults, and it constructs default
21056 But everything can be customized.
21059 \begin_layout Standard
21060 The XHTML LyX outputs for an inset has the following form:
21063 \begin_layout LyX-Code
21065 \begin_inset Quotes erd
21069 \begin_inset Quotes erd
21075 \begin_layout LyX-Code
21076 <labeltag>Label</labeltag>
21079 \begin_layout LyX-Code
21081 \begin_inset Quotes erd
21085 \begin_inset Quotes erd
21088 >Contents of the inset.</innertag>
21091 \begin_layout LyX-Code
21095 \begin_layout Standard
21096 If the inset permits multiple paragraphs---that is, if
21097 \begin_inset Flex Code
21100 \begin_layout Plain Layout
21106 is true---then the contents of the inset will itself be output as paragraphs
21107 formatted according to the styles used for those paragraphs (standard,
21108 quote, and the like).
21109 The label tag is of course omitted if the paragraph does not have a label
21110 and, at present, is always
21111 \begin_inset Flex Code
21114 \begin_layout Plain Layout
21121 The inner tag is optional and, by default, does not appear.
21124 \begin_layout Standard
21125 The specific tags and attributes output for each inset can be controlled
21126 by means of the following layout tags.
21129 \begin_layout Description
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21140 \begin_inset Flex Code
21143 \begin_layout Plain Layout
21149 ] Specifies attribute information to be output with the main tag.
21151 \begin_inset Quotes eld
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21159 class=`myinset' onclick=`\SpecialChar \ldots{}
21166 \begin_inset Quotes erd
21170 By default, LyX will output
21171 \begin_inset Quotes eld
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21185 \begin_inset Quotes erd
21189 \begin_inset Flex Code
21192 \begin_layout Plain Layout
21198 is the LyX name of the inset, made lowercase and with non-alphanumeric
21199 characters converted to underscores, for example: footnote.
21202 \begin_layout Description
21203 \begin_inset Flex Code
21206 \begin_layout Plain Layout
21213 \begin_inset Flex Code
21216 \begin_layout Plain Layout
21226 ] Whether to output the default CSS information LyX generates for this layout,
21227 even if additional information is explicitly provided via
21228 \begin_inset Flex Code
21231 \begin_layout Plain Layout
21239 \begin_inset Flex Code
21242 \begin_layout Plain Layout
21248 allows you to alter or augment the generated CSS, rather than to override
21253 \begin_layout Description
21254 \begin_inset Flex Code
21257 \begin_layout Plain Layout
21264 \begin_inset Flex Code
21267 \begin_layout Plain Layout
21273 ] Attributes for the inner tag.
21275 \begin_inset Quotes eld
21279 \begin_inset Flex Code
21282 \begin_layout Plain Layout
21283 class=`insetname_inner'
21289 \begin_inset Quotes erd
21295 \begin_layout Description
21296 \begin_inset Flex Code
21299 \begin_layout Plain Layout
21306 \begin_inset Flex Code
21309 \begin_layout Plain Layout
21315 ] The inner tag, replacing
21316 \begin_inset Flex Code
21319 \begin_layout Plain Layout
21325 in the examples above.
21326 By default, there is none.
21329 \begin_layout Description
21330 \begin_inset Flex Code
21333 \begin_layout Plain Layout
21340 \begin_inset Flex Code
21343 \begin_layout Plain Layout
21351 ] Whether this inset represents a standalone block of text (such as a footnote)
21352 or instead represents material that is included in the surrounding text
21353 (such as a branch).
21357 \begin_layout Description
21358 \begin_inset Flex Code
21361 \begin_layout Plain Layout
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21377 ] A label for this inset, possibly including a reference to a counter.
21378 For example, for footnote, it might be:
21379 \begin_inset Flex Code
21382 \begin_layout Plain Layout
21391 This is optional, and there is no default.
21394 \begin_layout Description
21395 \begin_inset Flex Code
21398 \begin_layout Plain Layout
21404 Information to be output in the
21405 \begin_inset Flex Code
21408 \begin_layout Plain Layout
21414 section when this style is used.
21415 This might, for example, be used to include a
21416 \begin_inset Flex Code
21419 \begin_layout Plain Layout
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21438 \begin_layout Description
21439 \begin_inset Flex Code
21442 \begin_layout Plain Layout
21448 CSS style information to be included when this style is used.
21449 Note that this will automatically be wrapped in a layout-generated
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21459 block, so only the CSS itself need be included.
21462 \begin_layout Description
21463 \begin_inset Flex Code
21466 \begin_layout Plain Layout
21473 \begin_inset Flex Code
21476 \begin_layout Plain Layout
21482 ] The tag to be used for the main label, replacing
21483 \begin_inset Flex Code
21486 \begin_layout Plain Layout
21492 in the examples above.
21493 The default depends upon the setting of
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21504 \begin_inset Flex Code
21507 \begin_layout Plain Layout
21513 is true, the default is
21514 \begin_inset Flex Code
21517 \begin_layout Plain Layout
21523 ; if it is false, the default is
21524 \begin_inset Flex Code
21527 \begin_layout Plain Layout
21536 \begin_layout Subsection
21540 \begin_layout Standard
21541 The XHTML output for floats too can be controlled by layout information.
21542 The output has the following form:
21545 \begin_layout LyX-Code
21547 \begin_inset Quotes erd
21551 \begin_inset Quotes erd
21557 \begin_layout LyX-Code
21558 Contents of the float.
21561 \begin_layout LyX-Code
21565 \begin_layout Standard
21566 The caption, if there is one, is a separate inset and will be output as
21568 Its appearance can be controlled via the InsetLayout for caption insets.
21572 \begin_layout Description
21573 \begin_inset Flex Code
21576 \begin_layout Plain Layout
21583 \begin_inset Flex Code
21586 \begin_layout Plain Layout
21592 ] Specifies attribute information to be output with the main tag.
21594 \begin_inset Quotes eld
21598 \begin_inset Flex Code
21601 \begin_layout Plain Layout
21602 class=`myfloat' onclick=`\SpecialChar \ldots{}
21609 \begin_inset Quotes erd
21613 By default, LyX will output
21614 \begin_inset Quotes eld
21618 \begin_inset Flex Code
21621 \begin_layout Plain Layout
21622 class=`float float-floattype'
21628 \begin_inset Quotes erd
21632 \begin_inset Flex Code
21635 \begin_layout Plain Layout
21641 is LyX's name for this type of float, as determined by the float declaration
21643 \begin_inset CommandInset ref
21645 reference "sub:Floats"
21649 ), though made lowercase and with non-alphanumeric characters converted
21650 to underscores, for example: float-table.
21653 \begin_layout Description
21654 \begin_inset Flex Code
21657 \begin_layout Plain Layout
21663 CSS style information to be included when this float is used.
21664 Note that this will automatically be wrapped in a layout-generated
21665 \begin_inset Flex Code
21668 \begin_layout Plain Layout
21674 block, so only the CSS itself need be included.
21677 \begin_layout Description
21678 \begin_inset Flex Code
21681 \begin_layout Plain Layout
21688 \begin_inset Flex Code
21691 \begin_layout Plain Layout
21697 ] The tag to be used for this float, replacing
21698 \begin_inset Quotes eld
21702 \begin_inset Flex Code
21705 \begin_layout Plain Layout
21712 \begin_inset Quotes erd
21715 in the example above.
21717 \begin_inset Flex Code
21720 \begin_layout Plain Layout
21726 and will rarely need changing.
21729 \begin_layout Subsection
21730 Bibliography formatting
21733 \begin_layout Standard
21734 The bibliography can be formatted using
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21746 \begin_inset CommandInset ref
21748 reference "sub:Citation-format-description"
21755 \begin_layout Subsection
21759 \begin_layout Standard
21760 We have several times mentioned that LyX will generate default CSS style
21761 rules for both insets and paragraph styles, based upon the other layout
21762 information that is provided.
21763 In this section, we shall say a word about which layout information LyX
21767 \begin_layout Standard
21768 At present, LyX auto-generates CSS only for font information, making use
21770 \begin_inset Flex Code
21773 \begin_layout Plain Layout
21780 \begin_inset Flex Code
21783 \begin_layout Plain Layout
21790 \begin_inset Flex Code
21793 \begin_layout Plain Layout
21800 \begin_inset Flex Code
21803 \begin_layout Plain Layout
21810 \begin_inset Flex Code
21813 \begin_layout Plain Layout
21820 \begin_inset CommandInset ref
21822 reference "sub:Font-description"
21827 The translation is mostly straightforward and obvious.
21829 \begin_inset Quotes eld
21833 \begin_inset Flex Code
21836 \begin_layout Plain Layout
21843 \begin_inset Quotes erd
21847 \begin_inset Quotes eld
21851 \begin_inset Flex Code
21854 \begin_layout Plain Layout
21855 font-family: sans-serif;
21861 \begin_inset Quotes erd
21865 The correspondence of LyX sizes and CSS sizes is a little less obvious
21866 but nonetheless intuitive.
21868 \begin_inset Flex Code
21871 \begin_layout Plain Layout
21878 \begin_inset Flex URL
21881 \begin_layout Plain Layout
21891 \begin_layout Chapter
21892 Including External Material
21893 \begin_inset CommandInset label
21895 name "chap:Including-External-Material"
21902 \begin_layout Standard
21903 \begin_inset Box Shadowbox
21913 height_special "totalheight"
21916 \begin_layout Plain Layout
21917 WARNING: This portion of the documentation has not been updated for some
21919 We certainly hope that it is still accurate, but there are no guarantees.
21927 \begin_layout Standard
21928 The use of material from sources external to LyX is covered in detail in
21934 This part of the manual covers what needs to happen behind the scenes for
21935 new sorts of material to be included.
21938 \begin_layout Section
21942 \begin_layout Standard
21943 The external material feature is based on the concept of a
21948 A template is a specification of how LyX should interface with a certain
21950 As bundled, LyX comes with predefined templates for Xfig figures, various
21951 raster format images, chess diagrams, and LilyPond music notation.
21952 You can check the actual list by using the menu
21953 \begin_inset Flex MenuItem
21956 \begin_layout Plain Layout
21957 Insert\SpecialChar \menuseparator
21958 File\SpecialChar \menuseparator
21965 Furthermore, it is possible to roll your own template to support a specific
21967 Later we'll describe in more detail what is involved, and hopefully you
21968 will submit all the templates you create so we can include them in a later
21972 \begin_layout Standard
21973 Another basic idea of the external material feature is to distinguish between
21974 the original file that serves as a base for final material and the produced
21975 file that is included in your exported or printed document.
21976 For example, consider the case of a figure produced with
21977 \begin_inset Flex Code
21980 \begin_layout Plain Layout
21987 The Xfig application itself works on an original file with the
21988 \begin_inset Flex Code
21991 \begin_layout Plain Layout
21998 Within Xfig, you create and change your figure, and when you are done,
22000 \begin_inset Flex Code
22003 \begin_layout Plain Layout
22010 When you want to include the figure in your document, you invoke
22011 \begin_inset Flex Code
22014 \begin_layout Plain Layout
22020 in order to create a PostScript file that can readily be included in your
22023 \begin_inset Flex Code
22026 \begin_layout Plain Layout
22032 file is the original file, and the PostScript file is the produced file.
22035 \begin_layout Standard
22036 This distinction is important in order to allow updating of the material
22037 while you are in the process of writing the document.
22038 Furthermore, it provides us with the flexibility that is needed to support
22039 multiple export formats.
22040 For instance, in the case of a plain text file, it is not exactly an award-winn
22041 ing idea to include the figure as raw PostScript.
22042 Instead, you would either prefer to just include a reference to the figure
22043 or try to invoke some graphics to ASCII converter to make the final result
22044 look similar to the real graphics.
22045 The external material management allows you to do this, because it is parametri
22046 zed on the different export formats that LyX supports.
22049 \begin_layout Standard
22050 Besides supporting the production of different products according to the
22051 exported format, it supports tight integration with editing and viewing
22053 In the case of an Xfig figure, you are able to invoke Xfig on the original
22054 file with a single click from within the external material dialog in LyX,
22055 and also preview the produced PostScript file with Ghostview with another
22057 No more fiddling around with the command line and/or file browsers to locate
22058 and manipulate the original or produced files.
22059 In this way, you are finally able to take full advantage of the many different
22060 applications that are relevant to use when you write your documents, and
22061 ultimately be more productive.
22064 \begin_layout Section
22065 The external template configuration file
22068 \begin_layout Standard
22069 It is relatively easy to add custom external template definitions to LyX.
22070 However, be aware that doing this in an careless manner most probably
22074 introduce an easily exploitable security hole.
22075 So before you do this, please read the discussion about security in
22076 \begin_inset CommandInset ref
22078 reference "sec:Security-discussion"
22085 \begin_layout Standard
22086 Having said that, we encourage you to submit any interesting templates that
22091 \begin_layout Standard
22092 The external templates are defined in the
22093 \begin_inset Flex Code
22096 \begin_layout Plain Layout
22097 LyXDir/lib/external_templates
22103 You can place your own version in
22104 \begin_inset Flex Code
22107 \begin_layout Plain Layout
22108 UserDir/external_templates
22116 \begin_layout Standard
22117 A typical template looks like this:
22120 \begin_layout LyX-Code
22124 \begin_layout LyX-Code
22125 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22128 \begin_layout LyX-Code
22132 \begin_layout LyX-Code
22136 \begin_layout LyX-Code
22140 \begin_layout LyX-Code
22144 \begin_layout LyX-Code
22148 \begin_layout LyX-Code
22149 AutomaticProduction true
22152 \begin_layout LyX-Code
22156 \begin_layout LyX-Code
22160 \begin_layout LyX-Code
22164 \begin_layout LyX-Code
22165 TransformCommand Rotate RotationLatexCommand
22168 \begin_layout LyX-Code
22169 TransformCommand Resize ResizeLatexCommand
22172 \begin_layout LyX-Code
22173 Product "$$RotateFront$$ResizeFront
22176 \begin_layout LyX-Code
22181 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22184 \begin_layout LyX-Code
22185 $$ResizeBack$$RotateBack"
22188 \begin_layout LyX-Code
22192 \begin_layout LyX-Code
22193 UpdateResult "$$AbsPath$$Basename.pstex_t"
22196 \begin_layout LyX-Code
22197 Requirement "graphicx"
22200 \begin_layout LyX-Code
22201 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22204 \begin_layout LyX-Code
22205 ReferencedFile latex "$$AbsPath$$Basename.eps"
22208 \begin_layout LyX-Code
22209 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22212 \begin_layout LyX-Code
22216 \begin_layout LyX-Code
22220 \begin_layout LyX-Code
22221 TransformCommand Rotate RotationLatexCommand
22224 \begin_layout LyX-Code
22225 TransformCommand Resize ResizeLatexCommand
22228 \begin_layout LyX-Code
22229 Product "$$RotateFront$$ResizeFront
22232 \begin_layout LyX-Code
22237 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22240 \begin_layout LyX-Code
22241 $$ResizeBack$$RotateBack"
22244 \begin_layout LyX-Code
22245 UpdateFormat pdftex
22248 \begin_layout LyX-Code
22249 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22252 \begin_layout LyX-Code
22253 Requirement "graphicx"
22256 \begin_layout LyX-Code
22257 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22260 \begin_layout LyX-Code
22261 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22264 \begin_layout LyX-Code
22268 \begin_layout LyX-Code
22272 \begin_layout LyX-Code
22273 Product "$$Contents(
22275 "$$AbsPath$$Basename.asc
22280 \begin_layout LyX-Code
22281 UpdateFormat asciixfig
22284 \begin_layout LyX-Code
22285 UpdateResult "$$AbsPath$$Basename.asc"
22288 \begin_layout LyX-Code
22292 \begin_layout LyX-Code
22296 \begin_layout LyX-Code
22297 Product "<graphic fileref=
22299 "$$AbsOrRelPathMaster$$Basename.eps
22304 \begin_layout LyX-Code
22308 \begin_layout LyX-Code
22312 \begin_layout LyX-Code
22313 UpdateResult "$$AbsPath$$Basename.eps"
22316 \begin_layout LyX-Code
22317 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22320 \begin_layout LyX-Code
22321 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22324 \begin_layout LyX-Code
22328 \begin_layout LyX-Code
22329 Product "[XFig: $$FName]"
22332 \begin_layout LyX-Code
22336 \begin_layout LyX-Code
22340 \begin_layout Standard
22341 As you can see, the template is enclosed in
22342 \begin_inset Flex Code
22345 \begin_layout Plain Layout
22351 \SpecialChar \ldots{}
22353 \begin_inset Flex Code
22356 \begin_layout Plain Layout
22363 It contains a header specifying some general settings and, for each supported
22364 primary document file format, a section
22365 \begin_inset Flex Code
22368 \begin_layout Plain Layout
22374 \SpecialChar \ldots{}
22376 \begin_inset Flex Code
22379 \begin_layout Plain Layout
22388 \begin_layout Subsection
22389 The template header
22392 \begin_layout Description
22393 \begin_inset Flex Code
22396 \begin_layout Plain Layout
22397 AutomaticProduction
22398 \begin_inset space ~
22406 Whether the file represented by the template must be generated by LyX.
22407 This command must occur exactly once.
22410 \begin_layout Description
22411 \begin_inset Flex Code
22414 \begin_layout Plain Layout
22416 \begin_inset space ~
22424 A glob pattern that is used in the file dialog to filter out the desired
22426 If there is more than one possible file extension (e.
22427 \begin_inset space \thinspace{}
22431 \begin_inset space \space{}
22435 \begin_inset Flex Code
22438 \begin_layout Plain Layout
22445 \begin_inset Flex Code
22448 \begin_layout Plain Layout
22454 ), use something like
22455 \begin_inset Flex Code
22458 \begin_layout Plain Layout
22465 This command must occur exactly once.
22468 \begin_layout Description
22469 \begin_inset Flex Code
22472 \begin_layout Plain Layout
22474 \begin_inset space ~
22482 The text that is displayed on the button.
22483 This command must occur exactly once.
22486 \begin_layout Description
22487 \begin_inset Flex Code
22490 \begin_layout Plain Layout
22492 \begin_inset space ~
22496 \begin_inset space ~
22504 The help text that is used in the External dialog.
22505 Provide enough information to explain to the user just what the template
22506 can provide him with.
22507 This command must occur exactly once.
22510 \begin_layout Description
22511 \begin_inset Flex Code
22514 \begin_layout Plain Layout
22516 \begin_inset space ~
22524 The file format of the original file.
22525 This must be the name of a format that is known to LyX (see
22526 \begin_inset CommandInset ref
22528 reference "sec:Formats"
22534 \begin_inset Quotes eld
22538 \begin_inset Flex Code
22541 \begin_layout Plain Layout
22548 \begin_inset Quotes erd
22551 if the template can handle original files of more than one format.
22552 LyX will attempt to interrogate the file itself in order to deduce its
22553 format in this case.
22554 This command must occur exactly once.
22557 \begin_layout Description
22558 \begin_inset Flex Code
22561 \begin_layout Plain Layout
22563 \begin_inset space ~
22571 A unique name for the template.
22572 It must not contain substitution macros (see below).
22575 \begin_layout Description
22576 \begin_inset Flex Code
22579 \begin_layout Plain Layout
22581 \begin_inset space ~
22584 Rotate|Resize|Clip|Extra
22589 This command specifies which transformations are supported by this template.
22590 It may occur zero or more times.
22591 This command enables the corresponding tabs in the external dialog.
22593 \begin_inset Flex Code
22596 \begin_layout Plain Layout
22602 command must have either a corresponding
22603 \begin_inset Flex Code
22606 \begin_layout Plain Layout
22613 \begin_inset Flex Code
22616 \begin_layout Plain Layout
22623 \begin_inset Flex Code
22626 \begin_layout Plain Layout
22633 Otherwise the transformation will not be supported by that format.
22636 \begin_layout Subsection
22640 \begin_layout Description
22641 \begin_inset Flex Code
22644 \begin_layout Plain Layout
22646 \begin_inset space ~
22649 LaTeX|PDFLaTeX|PlainText|DocBook
22654 The primary document file format that this format definition is for.
22655 Not every template has a sensible representation in all document file formats.
22656 Please define nevertheless a
22657 \begin_inset Flex Code
22660 \begin_layout Plain Layout
22666 section for all templates.
22667 Use a dummy text when no representation is available.
22668 Then you can at least see a reference to the external material in the exported
22672 \begin_layout Description
22673 \begin_inset Flex Code
22676 \begin_layout Plain Layout
22678 \begin_inset space ~
22682 \begin_inset space ~
22690 This command defines an additional macro
22691 \begin_inset Flex Code
22694 \begin_layout Plain Layout
22700 for substitution in
22701 \begin_inset Flex Code
22704 \begin_layout Plain Layout
22712 \begin_inset Flex Code
22715 \begin_layout Plain Layout
22721 itself may contain substitution macros.
22722 The advantage over using
22723 \begin_inset Flex Code
22726 \begin_layout Plain Layout
22733 \begin_inset Flex Code
22736 \begin_layout Plain Layout
22742 is that the substituted value of
22743 \begin_inset Flex Code
22746 \begin_layout Plain Layout
22752 is sanitized so that it is a valid optional argument in the document format.
22753 This command may occur zero or more times.
22756 \begin_layout Description
22757 \begin_inset Flex Code
22760 \begin_layout Plain Layout
22762 \begin_inset space ~
22770 The text that is inserted in the exported document.
22771 This is actually the most important command and can be quite complex.
22772 This command must occur exactly once.
22775 \begin_layout Description
22776 \begin_inset Flex Code
22779 \begin_layout Plain Layout
22781 \begin_inset space ~
22789 This command specifies a preamble snippet that will be included in the
22791 It has to be defined using
22792 \begin_inset Flex Code
22795 \begin_layout Plain Layout
22801 \SpecialChar \ldots{}
22803 \begin_inset Flex Code
22806 \begin_layout Plain Layout
22813 This command may occur zero or more times.
22816 \begin_layout Description
22817 \begin_inset Flex Code
22820 \begin_layout Plain Layout
22822 \begin_inset space ~
22826 \begin_inset space ~
22834 This command denotes files that are created by the conversion process and
22835 are needed for a particular export format.
22836 If the filename is relative, it is interpreted relative to the master document.
22837 This command may be given zero or more times.
22840 \begin_layout Description
22841 \begin_inset Flex Code
22844 \begin_layout Plain Layout
22846 \begin_inset space ~
22854 The name of a required LaTeX package.
22855 The package is included via
22856 \begin_inset Flex Code
22859 \begin_layout Plain Layout
22867 in the LaTeX preamble.
22868 This command may occur zero or more times.
22871 \begin_layout Description
22872 \begin_inset Flex Code
22875 \begin_layout Plain Layout
22877 \begin_inset space ~
22881 \begin_inset space ~
22884 RotationLatexCommand
22889 This command specifies that the built in LaTeX command should be used for
22891 This command may occur once or not at all.
22894 \begin_layout Description
22895 \begin_inset Flex Code
22898 \begin_layout Plain Layout
22900 \begin_inset space ~
22904 \begin_inset space ~
22912 This command specifies that the built in LaTeX command should be used for
22914 This command may occur once or not at all.
22917 \begin_layout Description
22918 \begin_inset Flex Code
22921 \begin_layout Plain Layout
22923 \begin_inset space ~
22927 \begin_inset space ~
22930 RotationLatexOption
22935 This command specifies that rotation is done via an optional argument.
22936 This command may occur once or not at all.
22939 \begin_layout Description
22940 \begin_inset Flex Code
22943 \begin_layout Plain Layout
22945 \begin_inset space ~
22949 \begin_inset space ~
22957 This command specifies that resizing is done via an optional argument.
22958 This command may occur once or not at all.
22961 \begin_layout Description
22962 \begin_inset Flex Code
22965 \begin_layout Plain Layout
22967 \begin_inset space ~
22971 \begin_inset space ~
22979 This command specifies that clipping is done via an optional argument.
22980 This command may occur once or not at all.
22983 \begin_layout Description
22984 \begin_inset Flex Code
22987 \begin_layout Plain Layout
22989 \begin_inset space ~
22993 \begin_inset space ~
23001 This command specifies that an extra optional argument is used.
23002 This command may occur once or not at all.
23005 \begin_layout Description
23006 \begin_inset Flex Code
23009 \begin_layout Plain Layout
23011 \begin_inset space ~
23019 The file format of the converted file.
23020 This must be the name of a format that is known to LyX (see the
23021 \begin_inset Flex MenuItem
23024 \begin_layout Plain Layout
23025 Tools\SpecialChar \menuseparator
23026 Preferences\SpecialChar \menuseparator
23027 File Handling\SpecialChar \menuseparator
23034 This command must occur exactly once.
23035 If the resulting file format is PDF, you need to specify the format
23036 \begin_inset Flex Code
23039 \begin_layout Plain Layout
23046 This is the PDF format used for including graphics.
23047 The other defined PDF formats are for document export.
23050 \begin_layout Description
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23056 \begin_inset space ~
23064 The file name of the converted file.
23065 The file name must be absolute.
23066 This command must occur exactly once.
23069 \begin_layout Subsection
23070 Preamble definitions
23073 \begin_layout Standard
23074 The external template configuration file may contain additional preamble
23075 definitions enclosed by
23076 \begin_inset Flex Code
23079 \begin_layout Plain Layout
23085 \SpecialChar \ldots{}
23087 \begin_inset Flex Code
23090 \begin_layout Plain Layout
23097 They can be used by the templates in the
23098 \begin_inset Flex Code
23101 \begin_layout Plain Layout
23110 \begin_layout Section
23111 The substitution mechanism
23114 \begin_layout Standard
23115 When the external material facility invokes an external program, it is done
23116 on the basis of a command defined in the template configuration file.
23117 These commands can contain various macros that are expanded before execution.
23118 Execution always take place in the directory of the containing document.
23121 \begin_layout Standard
23122 Also, whenever external material is to be displayed, the name will be produced
23123 by the substitution mechanism, and most other commands in the template
23124 definition support substitution as well.
23127 \begin_layout Standard
23128 The available macros are the following:
23131 \begin_layout Description
23132 \begin_inset Flex Code
23135 \begin_layout Plain Layout
23136 $$AbsOrRelPathMaster
23141 The file path, absolute or relative to the master LyX document.
23144 \begin_layout Description
23145 \begin_inset Flex Code
23148 \begin_layout Plain Layout
23149 $$AbsOrRelPathParent
23154 The file path, absolute or relative to the LyX document.
23157 \begin_layout Description
23158 \begin_inset Flex Code
23161 \begin_layout Plain Layout
23167 The absolute file path.
23170 \begin_layout Description
23171 \begin_inset Flex Code
23174 \begin_layout Plain Layout
23180 The filename without path and without the extension.
23183 \begin_layout Description
23184 \begin_inset Flex Code
23187 \begin_layout Plain Layout
23189 \begin_inset Quotes eld
23193 \begin_inset Quotes erd
23201 This macro will expand to the contents of the file with the name
23202 \begin_inset Flex Code
23205 \begin_layout Plain Layout
23214 \begin_layout Description
23215 \begin_inset Flex Code
23218 \begin_layout Plain Layout
23224 The file extension (including the dot).
23227 \begin_layout Description
23228 \begin_inset Flex Code
23231 \begin_layout Plain Layout
23237 The filename of the file specified in the external material dialog.
23238 This is either an absolute name, or it is relative to the LyX document.
23241 \begin_layout Description
23242 \begin_inset Flex Code
23245 \begin_layout Plain Layout
23252 \begin_inset Flex Code
23255 \begin_layout Plain Layout
23261 (absolute name or relative to the LyX document).
23264 \begin_layout Description
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23274 The file path, relative to the master LyX document.
23277 \begin_layout Description
23278 \begin_inset Flex Code
23281 \begin_layout Plain Layout
23287 The file path, relative to the LyX document.
23290 \begin_layout Description
23291 \begin_inset Flex Code
23294 \begin_layout Plain Layout
23300 This macro will expand to the absolute path of the system directory.
23301 This is typically used to point to the various helper scripts that are
23305 \begin_layout Description
23306 \begin_inset Flex Code
23309 \begin_layout Plain Layout
23315 A name and full path to a temporary file which will be automatically deleted
23316 whenever the containing document is closed, or the external material insertion
23320 \begin_layout Standard
23321 All path macros contain a trailing directory separator, so you can construct
23323 \begin_inset space \thinspace{}
23327 \begin_inset space \space{}
23330 the absolute filename with
23331 \begin_inset Flex Code
23334 \begin_layout Plain Layout
23335 $$AbsPath$$Basename$$Extension
23343 \begin_layout Standard
23344 The macros above are substituted in all commands unless otherwise noted.
23346 \begin_inset Flex Code
23349 \begin_layout Plain Layout
23355 supports additionally the following substitutions if they are enabled by
23357 \begin_inset Flex Code
23360 \begin_layout Plain Layout
23367 \begin_inset Flex Code
23370 \begin_layout Plain Layout
23379 \begin_layout Description
23380 \begin_inset Flex Code
23383 \begin_layout Plain Layout
23389 The front part of the resize command.
23392 \begin_layout Description
23393 \begin_inset Flex Code
23396 \begin_layout Plain Layout
23402 The back part of the resize command.
23405 \begin_layout Description
23406 \begin_inset Flex Code
23409 \begin_layout Plain Layout
23415 The front part of the rotation command.
23418 \begin_layout Description
23419 \begin_inset Flex Code
23422 \begin_layout Plain Layout
23428 The back part of the rotation command.
23431 \begin_layout Standard
23432 The value string of the
23433 \begin_inset Flex Code
23436 \begin_layout Plain Layout
23442 command supports additionally the following substitutions if they are enabled
23444 \begin_inset Flex Code
23447 \begin_layout Plain Layout
23454 \begin_inset Flex Code
23457 \begin_layout Plain Layout
23466 \begin_layout Description
23467 \begin_inset Flex Code
23470 \begin_layout Plain Layout
23479 \begin_layout Description
23480 \begin_inset Flex Code
23483 \begin_layout Plain Layout
23492 \begin_layout Description
23493 \begin_inset Flex Code
23496 \begin_layout Plain Layout
23505 \begin_layout Description
23506 \begin_inset Flex Code
23509 \begin_layout Plain Layout
23515 The rotation option.
23518 \begin_layout Standard
23519 You may ask why there are so many path macros.
23520 There are mainly two reasons:
23523 \begin_layout Enumerate
23524 Relative and absolute file names should remain relative or absolute, respectivel
23526 Users may have reasons to prefer either form.
23527 Relative names are useful for portable documents that should work on different
23528 machines, for example.
23529 Absolute names may be required by some programs.
23532 \begin_layout Enumerate
23533 LaTeX treats relative file names differently than LyX and other programs
23534 in nested included files.
23535 For LyX, a relative file name is always relative to the document that contains
23537 For LaTeX, it is always relative to the master document.
23538 These two definitions are identical if you have only one document, but
23539 differ if you have a master document that includes part documents.
23540 That means that relative filenames must be transformed when presented to
23542 Fortunately LyX does this automatically for you if you choose the right
23546 \begin_layout Standard
23547 So which path macro should be used in new template definitions? The rule
23551 \begin_layout Itemize
23553 \begin_inset Flex Code
23556 \begin_layout Plain Layout
23562 if an absolute path is required.
23565 \begin_layout Itemize
23567 \begin_inset Flex Code
23570 \begin_layout Plain Layout
23571 $$AbsOrRelPathMaster
23576 if the substituted string is some kind of LaTeX input.
23579 \begin_layout Itemize
23581 \begin_inset Flex Code
23584 \begin_layout Plain Layout
23585 $$AbsOrRelPathParent
23590 in order to preserve the user's choice.
23593 \begin_layout Standard
23594 There are special cases where this rule does not work and e.
23595 \begin_inset space \thinspace{}
23599 \begin_inset space \space{}
23602 relative names are needed, but normally it will work just fine.
23603 One example for such a case is the command
23604 \begin_inset Flex Code
23607 \begin_layout Plain Layout
23608 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23613 in the XFig template above: We can't use the absolute name because the
23615 \begin_inset Flex Code
23618 \begin_layout Plain Layout
23624 files needs the relative name in order to rewrite the file content.
23627 \begin_layout Section
23628 Security discussion
23629 \begin_inset CommandInset label
23631 name "sec:Security-discussion"
23638 \begin_layout Standard
23639 The external material feature interfaces with a lot of external programs
23640 and does so automatically, so we have to consider the security implications
23642 In particular, since you have the option of including your own filenames
23643 and/or parameter strings and those are expanded into a command, it seems
23644 that it would be possible to create a malicious document which executes
23645 arbitrary commands when a user views or prints the document.
23646 This is something we definitely want to avoid.
23649 \begin_layout Standard
23650 However, since the external program commands are specified in the template
23651 configuration file only, there are no security issues if LyX is properly
23652 configured with safe templates only.
23653 This is so because the external programs are invoked with the
23654 \begin_inset Flex Code
23657 \begin_layout Plain Layout
23663 -system call rather than the
23664 \begin_inset Flex Code
23667 \begin_layout Plain Layout
23673 system-call, so it's not possible to execute arbitrary commands from the
23674 filename or parameter section via the shell.
23677 \begin_layout Standard
23678 This also implies that you are restricted in what command strings you can
23679 use in the external material templates.
23680 In particular, pipes and redirection are not readily available.
23681 This has to be so if LyX should remain safe.
23682 If you want to use some of the shell features, you should write a safe
23683 script to do this in a controlled manner, and then invoke the script from
23684 the command string.
23688 \begin_layout Standard
23689 It is possible to design a template that interacts directly with the shell,
23690 but since this would allow a malicious user to execute arbitrary commands
23691 by writing clever filenames and/or parameters, we generally recommend that
23692 you only use safe scripts that work with the
23693 \begin_inset Flex Code
23696 \begin_layout Plain Layout
23702 system call in a controlled manner.
23703 Of course, for use in a controlled environment, it can be tempting to just
23704 fall back to use ordinary shell scripts.
23705 If you do so, be aware that you
23709 provide an easily exploitable security hole in your system.
23710 Of course it stands to reason that such unsafe templates will never be
23711 included in the standard LyX distribution, although we do encourage people
23712 to submit new templates in the open source tradition.
23713 But LyX as shipped from the official distribution channels will never have
23717 \begin_layout Standard
23718 Including external material provides a lot of power, and you have to be
23719 careful not to introduce security hazards with this power.
23720 A subtle error in a single line in an innocent looking script can open
23721 the door to huge security problems.
23722 So if you do not fully understand the issues, we recommend that you consult
23723 a knowledgeable security professional or the LyX development team if you
23724 have any questions about whether a given template is safe or not.
23725 And do this before you use it in an uncontrolled environment.
23728 \begin_layout Chapter
23730 List of supported LyX functions to be used in layouts
23731 \begin_inset CommandInset label
23733 name "chap:List-of-functions"
23740 \begin_layout Standard
23742 \begin_inset Tabular
23743 <lyxtabular version="3" rows="11" columns="8">
23744 <features tabularvalignment="middle">
23745 <column alignment="left" valignment="top">
23746 <column alignment="left" valignment="top">
23747 <column alignment="left" valignment="top">
23748 <column alignment="left" valignment="top">
23749 <column alignment="left" valignment="top">
23750 <column alignment="left" valignment="top">
23751 <column alignment="left" valignment="top">
23752 <column alignment="left" valignment="top">
23754 <cell alignment="left" valignment="top" usebox="none">
23757 \begin_layout Plain Layout
23763 <cell alignment="left" valignment="top" usebox="none">
23766 \begin_layout Plain Layout
23772 <cell alignment="left" valignment="top" usebox="none">
23775 \begin_layout Plain Layout
23781 <cell alignment="left" valignment="top" usebox="none">
23784 \begin_layout Plain Layout
23790 <cell alignment="center" valignment="top" usebox="none">
23793 \begin_layout Plain Layout
23799 <cell alignment="center" valignment="top" usebox="none">
23802 \begin_layout Plain Layout
23808 <cell alignment="center" valignment="top" usebox="none">
23811 \begin_layout Plain Layout
23817 <cell alignment="center" valignment="top" usebox="none">
23820 \begin_layout Plain Layout
23828 <cell alignment="left" valignment="top" usebox="none">
23831 \begin_layout Plain Layout
23837 <cell alignment="left" valignment="top" usebox="none">
23840 \begin_layout Plain Layout
23846 <cell alignment="left" valignment="top" usebox="none">
23849 \begin_layout Plain Layout
23855 <cell alignment="left" valignment="top" usebox="none">
23858 \begin_layout Plain Layout
23864 <cell alignment="center" valignment="top" usebox="none">
23867 \begin_layout Plain Layout
23873 <cell alignment="center" valignment="top" usebox="none">
23876 \begin_layout Plain Layout
23882 <cell alignment="center" valignment="top" usebox="none">
23885 \begin_layout Plain Layout
23891 <cell alignment="center" valignment="top" usebox="none">
23894 \begin_layout Plain Layout
23902 <cell alignment="left" valignment="top" usebox="none">
23905 \begin_layout Plain Layout
23911 <cell alignment="left" valignment="top" usebox="none">
23914 \begin_layout Plain Layout
23920 <cell alignment="left" valignment="top" usebox="none">
23923 \begin_layout Plain Layout
23929 <cell alignment="left" valignment="top" usebox="none">
23932 \begin_layout Plain Layout
23938 <cell alignment="center" valignment="top" usebox="none">
23941 \begin_layout Plain Layout
23947 <cell alignment="center" valignment="top" usebox="none">
23950 \begin_layout Plain Layout
23956 <cell alignment="center" valignment="top" usebox="none">
23959 \begin_layout Plain Layout
23965 <cell alignment="center" valignment="top" usebox="none">
23968 \begin_layout Plain Layout
23976 <cell alignment="left" valignment="top" usebox="none">
23979 \begin_layout Plain Layout
23985 <cell alignment="left" valignment="top" usebox="none">
23988 \begin_layout Plain Layout
23994 <cell alignment="left" valignment="top" usebox="none">
23997 \begin_layout Plain Layout
24003 <cell alignment="left" valignment="top" usebox="none">
24006 \begin_layout Plain Layout
24012 <cell alignment="center" valignment="top" usebox="none">
24015 \begin_layout Plain Layout
24021 <cell alignment="center" valignment="top" usebox="none">
24024 \begin_layout Plain Layout
24030 <cell alignment="center" valignment="top" usebox="none">
24033 \begin_layout Plain Layout
24039 <cell alignment="center" valignment="top" usebox="none">
24042 \begin_layout Plain Layout
24050 <cell alignment="left" valignment="top" usebox="none">
24053 \begin_layout Plain Layout
24059 <cell alignment="left" valignment="top" usebox="none">
24062 \begin_layout Plain Layout
24068 <cell alignment="left" valignment="top" usebox="none">
24071 \begin_layout Plain Layout
24077 <cell alignment="left" valignment="top" usebox="none">
24080 \begin_layout Plain Layout
24086 <cell alignment="center" valignment="top" usebox="none">
24089 \begin_layout Plain Layout
24095 <cell alignment="center" valignment="top" usebox="none">
24098 \begin_layout Plain Layout
24104 <cell alignment="center" valignment="top" usebox="none">
24107 \begin_layout Plain Layout
24113 <cell alignment="center" valignment="top" usebox="none">
24116 \begin_layout Plain Layout
24124 <cell alignment="left" valignment="top" usebox="none">
24127 \begin_layout Plain Layout
24133 <cell alignment="left" valignment="top" usebox="none">
24136 \begin_layout Plain Layout
24142 <cell alignment="left" valignment="top" usebox="none">
24145 \begin_layout Plain Layout
24151 <cell alignment="left" valignment="top" usebox="none">
24154 \begin_layout Plain Layout
24160 <cell alignment="center" valignment="top" usebox="none">
24163 \begin_layout Plain Layout
24169 <cell alignment="center" valignment="top" usebox="none">
24172 \begin_layout Plain Layout
24178 <cell alignment="center" valignment="top" usebox="none">
24181 \begin_layout Plain Layout
24187 <cell alignment="center" valignment="top" usebox="none">
24190 \begin_layout Plain Layout
24198 <cell alignment="left" valignment="top" usebox="none">
24201 \begin_layout Plain Layout
24207 <cell alignment="left" valignment="top" usebox="none">
24210 \begin_layout Plain Layout
24216 <cell alignment="left" valignment="top" usebox="none">
24219 \begin_layout Plain Layout
24225 <cell alignment="left" valignment="top" usebox="none">
24228 \begin_layout Plain Layout
24234 <cell alignment="center" valignment="top" usebox="none">
24237 \begin_layout Plain Layout
24243 <cell alignment="center" valignment="top" usebox="none">
24246 \begin_layout Plain Layout
24252 <cell alignment="center" valignment="top" usebox="none">
24255 \begin_layout Plain Layout
24261 <cell alignment="center" valignment="top" usebox="none">
24264 \begin_layout Plain Layout
24272 <cell alignment="left" valignment="top" usebox="none">
24275 \begin_layout Plain Layout
24281 <cell alignment="left" valignment="top" usebox="none">
24284 \begin_layout Plain Layout
24290 <cell alignment="left" valignment="top" usebox="none">
24293 \begin_layout Plain Layout
24299 <cell alignment="left" valignment="top" usebox="none">
24302 \begin_layout Plain Layout
24308 <cell alignment="center" valignment="top" usebox="none">
24311 \begin_layout Plain Layout
24317 <cell alignment="center" valignment="top" usebox="none">
24320 \begin_layout Plain Layout
24326 <cell alignment="center" valignment="top" usebox="none">
24329 \begin_layout Plain Layout
24335 <cell alignment="center" valignment="top" usebox="none">
24338 \begin_layout Plain Layout
24346 <cell alignment="left" valignment="top" usebox="none">
24349 \begin_layout Plain Layout
24355 <cell alignment="left" valignment="top" usebox="none">
24358 \begin_layout Plain Layout
24364 <cell alignment="left" valignment="top" usebox="none">
24367 \begin_layout Plain Layout
24373 <cell alignment="left" valignment="top" usebox="none">
24376 \begin_layout Plain Layout
24382 <cell alignment="center" valignment="top" usebox="none">
24385 \begin_layout Plain Layout
24391 <cell alignment="center" valignment="top" usebox="none">
24394 \begin_layout Plain Layout
24400 <cell alignment="center" valignment="top" usebox="none">
24403 \begin_layout Plain Layout
24409 <cell alignment="center" valignment="top" usebox="none">
24412 \begin_layout Plain Layout
24420 <cell alignment="left" valignment="top" usebox="none">
24423 \begin_layout Plain Layout
24429 <cell alignment="left" valignment="top" usebox="none">
24432 \begin_layout Plain Layout
24438 <cell alignment="left" valignment="top" usebox="none">
24441 \begin_layout Plain Layout
24447 <cell alignment="left" valignment="top" usebox="none">
24450 \begin_layout Plain Layout
24456 <cell alignment="center" valignment="top" usebox="none">
24459 \begin_layout Plain Layout
24465 <cell alignment="center" valignment="top" usebox="none">
24468 \begin_layout Plain Layout
24474 <cell alignment="center" valignment="top" usebox="none">
24477 \begin_layout Plain Layout
24483 <cell alignment="center" valignment="top" usebox="none">
24486 \begin_layout Plain Layout
24494 <cell alignment="center" valignment="top" usebox="none">
24497 \begin_layout Plain Layout
24503 <cell alignment="center" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24512 <cell alignment="center" valignment="top" usebox="none">
24515 \begin_layout Plain Layout
24521 <cell alignment="center" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24530 <cell alignment="center" valignment="top" usebox="none">
24533 \begin_layout Plain Layout
24539 <cell alignment="center" valignment="top" usebox="none">
24542 \begin_layout Plain Layout
24548 <cell alignment="center" valignment="top" usebox="none">
24551 \begin_layout Plain Layout
24557 <cell alignment="center" valignment="top" usebox="none">
24560 \begin_layout Plain Layout
24574 \begin_layout Chapter
24575 Names of available colors to be used in layouts
24576 \begin_inset CommandInset label
24578 name "chap:Names-of-colors"
24585 \begin_layout Standard
24586 The colors listed here are the standard colors and the those that you can
24587 adjust in the LyX preferences.
24590 \begin_layout Description
24603 No particular color -- clear or default
24606 \begin_layout Description
24610 \begin_layout Description
24614 \begin_layout Description
24618 \begin_layout Description
24622 \begin_layout Description
24626 \begin_layout Description
24630 \begin_layout Description
24634 \begin_layout Description
24638 \begin_layout Description
24639 added_space Added space marker color
24642 \begin_layout Description
24643 addedtext Added text color
24646 \begin_layout Description
24647 appendix Appendix marker color
24650 \begin_layout Description
24651 background Background color
24654 \begin_layout Description
24655 bottomarea Bottom area color
24658 \begin_layout Description
24659 branchlabel Label color for branches
24662 \begin_layout Description
24663 buttonbg Color used for bottom background
24666 \begin_layout Description
24667 buttonhoverbg Color used for button background under focus
24670 \begin_layout Description
24671 buttonframe Color for inset button frames
24674 \begin_layout Description
24675 changebar Changebar color
24678 \begin_layout Description
24679 changedtextauthor1 Changed text color author 1
24682 \begin_layout Description
24683 changedtextauthor2 Changed text color author 2
24686 \begin_layout Description
24687 changedtextauthor3 Changed text color author 3
24690 \begin_layout Description
24691 changedtextauthor4 Changed text color author 4
24694 \begin_layout Description
24695 changedtextauthor5 Changed text color author 5
24698 \begin_layout Description
24699 collapsable_inset_frame Collapsable insets framecolor
24702 \begin_layout Description
24703 collapsable_inset_text Collapsable insets text color
24706 \begin_layout Description
24707 command Text color for command insets
24710 \begin_layout Description
24711 commandbg Background color for command insets
24714 \begin_layout Description
24715 commandframe Frame color for command insets
24718 \begin_layout Description
24719 comment color for comments
24722 \begin_layout Description
24723 commentbg Background color of comments
24726 \begin_layout Description
24727 cursor Cursor color
24730 \begin_layout Description
24731 deletedtext Deleted text color
24734 \begin_layout Description
24735 deletedtextmodifier Deleted text modifying color
24738 \begin_layout Description
24739 depthbar Color for the depth bars in the margin
24742 \begin_layout Description
24743 eolmarker End of line marker color
24746 \begin_layout Description
24747 error Color of the LaTeX error box
24750 \begin_layout Description
24751 footlabel Label color for footnotes
24754 \begin_layout Description
24755 graphicsbg Graphics inset background color
24758 \begin_layout Description
24759 greyedout Label color for greyedout insets
24762 \begin_layout Description
24763 greyedoutbg Background color of greyedout inset
24766 \begin_layout Description
24767 greyedouttext Color for greyedout inset text
24770 \begin_layout Description
24771 indexlabel Label color for index insets
24774 \begin_layout Description
24775 ignore The color is ignored
24778 \begin_layout Description
24779 inherit The color is inherited
24782 \begin_layout Description
24783 inlinecompletion Inline completion color
24786 \begin_layout Description
24787 insetbg Inset marker background color
24790 \begin_layout Description
24791 insetframe Inset marker frame color
24794 \begin_layout Description
24795 language Color for marking foreign language words
24798 \begin_layout Description
24799 latex Text color in LaTeX mode
24802 \begin_layout Description
24803 listingsbg Background color of listings inset
24806 \begin_layout Description
24807 marginlabel Label color for margin notes
24810 \begin_layout Description
24811 math Math inset text color
24814 \begin_layout Description
24815 mathbg Math inset background color
24818 \begin_layout Description
24819 mathcorners Math inset frame color not under focus
24822 \begin_layout Description
24823 mathframe Math inset frame color under focus
24826 \begin_layout Description
24827 mathline Math line color
24830 \begin_layout Description
24831 mathmacrobg Macro math inset background color
24834 \begin_layout Description
24835 mathmacroblend Macro math blended color
24838 \begin_layout Description
24839 mathmacroframe Macro math frame color
24842 \begin_layout Description
24843 mathmacrohoverbg Macro math inset background color hovered
24846 \begin_layout Description
24847 mathmacrolabel Macro math label color
24850 \begin_layout Description
24851 mathmacronewarg Macro template color for new parameters
24854 \begin_layout Description
24855 mathmacrooldarg Macro template color for old parameters
24858 \begin_layout Description
24859 newpage New page color
24862 \begin_layout Description
24863 nonunique_inlinecompletion Inline completion color for the non-unique part
24866 \begin_layout Description
24867 notebg Background color of notes
24870 \begin_layout Description
24871 notelabel Label color for notes
24874 \begin_layout Description
24875 pagebreak Page break/line break color
24878 \begin_layout Description
24879 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
24882 \begin_layout Description
24883 phantomtext Text color for phantom insets
24886 \begin_layout Description
24887 preview The color used for previews
24890 \begin_layout Description
24891 previewframe Preview frame color
24894 \begin_layout Description
24895 regexpframe Color for regexp frame
24898 \begin_layout Description
24899 selection Background color of selected text
24902 \begin_layout Description
24903 selectiontext Foreground color of selected text
24906 \begin_layout Description
24907 shadedbg Background color of shaded box
24910 \begin_layout Description
24911 special Special chars text color
24914 \begin_layout Description
24915 tabularline Table line color
24918 \begin_layout Description
24919 tabularonoffline Table line color
24922 \begin_layout Description
24923 urllabel Label color for URL insets
24926 \begin_layout Description
24927 urltext Color for URL inset text