1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
136 \paperpagestyle headings
137 \tracking_changes true
138 \output_changes false
142 \author -712698321 "Jürgen Spitzmüller"
143 \author -195340706 "Georg Baum"
145 \author 155139281 "Jrgen Spitzmller"
146 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
147 \author 1414654397 "Richard Heck"
148 \author 2090807402 "usti"
154 Customizing LyX: Features for the Advanced User
162 \begin_layout Plain Layout
164 If you have comments or error corrections, please send them to the LyX Documenta
166 \begin_inset CommandInset href
168 target "lyx-docs@lists.lyx.org"
175 \begin_inset Quotes eld
179 \begin_inset Quotes erd
182 in the subject header, and please cc the current maintainer of this file,
183 Richard Heck <rgheck@comcast.net>.
189 \begin_inset Newline newline
193 \begin_inset Newline newline
197 \change_deleted -712698321 1357054389
199 \change_inserted -712698321 1357054389
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
656 \begin_inset CommandInset ref
658 reference "cha:Internationalizing-LyX"
665 \begin_layout Labeling
666 \labelwidthstring 00.00.0000
667 \begin_inset Flex Code
670 \begin_layout Plain Layout
676 contains example files that explain how to use some features.
677 In the file browser, press the
678 \begin_inset Flex MenuItem
681 \begin_layout Plain Layout
690 \begin_layout Labeling
691 \labelwidthstring 00.00.0000
692 \begin_inset Flex Code
695 \begin_layout Plain Layout
701 contains image files that are used by the
702 \begin_inset Flex MenuItem
705 \begin_layout Plain Layout
712 In addition, it also contains the individual icons used in the toolbar
713 and the banners that can be shown when LyX is launched.
716 \begin_layout Labeling
717 \labelwidthstring 00.00.0000
718 \begin_inset Flex Code
721 \begin_layout Plain Layout
727 contains keyboard keymapping files.
733 \begin_inset CommandInset ref
735 reference "sec:International-Keymap-Stuff"
742 \begin_layout Labeling
743 \labelwidthstring 00.00.0000
744 \begin_inset Flex Code
747 \begin_layout Plain Layout
753 contains the text class and module files described in Chapter
758 \begin_inset CommandInset ref
760 reference "cha:Installing-New-Document"
767 \begin_layout Labeling
768 \labelwidthstring 00.00.0000
769 \begin_inset Flex Code
772 \begin_layout Plain Layout
779 \begin_inset Flex Code
782 \begin_layout Plain Layout
788 Python scripts used to convert between LyX versions.
789 These can be run from the command line if, say, you want to batch-convert
793 \begin_layout Labeling
794 \labelwidthstring 00.00.0000
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
804 contains some files that demonstrate the capabilities of the
805 \begin_inset Flex MenuItem
808 \begin_layout Plain Layout
819 Also contains some scripts used by LyX itself.
822 \begin_layout Labeling
823 \labelwidthstring 00.00.0000
824 \begin_inset Flex Code
827 \begin_layout Plain Layout
833 contains the standard LyX template files described in Chapter
838 \begin_inset CommandInset ref
840 reference "sub:Creating-Templates"
847 \begin_layout Labeling
848 \labelwidthstring 00.00.0000
849 \begin_inset Flex Code
852 \begin_layout Plain Layout
858 contains files with the extension
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 that define the user interface to LyX.
869 That is, the files define which items appear in which menus and the items
870 appearing on the toolbar.
873 \begin_layout Subsection
874 Files you don't want to modify
877 \begin_layout Standard
878 These files are used internally by LyX and you generally do not need to
879 modify them unless you are a developer.
882 \begin_layout Labeling
883 \labelwidthstring 00.00.0000
884 \begin_inset Flex Code
887 \begin_layout Plain Layout
893 this file contains the list of LyX developers.
894 The contents are displayed with the menu entry
895 \begin_inset Flex MenuItem
898 \begin_layout Plain Layout
899 Help\SpecialChar \menuseparator
912 \begin_layout Labeling
913 \labelwidthstring 00.00.0000
914 \begin_inset Flex Code
917 \begin_layout Plain Layout
923 this is a LaTeX script used during the configuration process.
927 \begin_layout Labeling
928 \labelwidthstring 00.00.0000
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
938 this is the script that is used to re-configure LyX.
939 It creates configuration files in the directory it was run from.
942 \begin_layout Subsection
943 Other files needing a line or two
944 \change_deleted -712698321 1357054454
946 \change_inserted -712698321 1357054454
947 \SpecialChar \ldots{}
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
964 this contains tables describing how different character encodings can be
968 \begin_layout Labeling
969 \labelwidthstring 00.00.0000
970 \begin_inset Flex Code
973 \begin_layout Plain Layout
979 this file contains the templates available to the new
980 \begin_inset Flex MenuItem
983 \begin_layout Plain Layout
996 \begin_layout Labeling
997 \labelwidthstring 00.00.0000
998 \begin_inset Flex Code
1001 \begin_layout Plain Layout
1007 this file contains a list of all the languages currently supported by LyX.
1008 \change_inserted -712698321 1357054565
1012 \begin_layout Labeling
1013 \labelwidthstring 00.00.0000
1015 \change_inserted -712698321 1357054669
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1021 \change_inserted -712698321 1357054669
1029 contains information about the supported fonts.
1030 \change_inserted -195340706 1334775793
1034 \begin_layout Labeling
1035 \labelwidthstring 00.00.0000
1037 \change_inserted -195340706 1334775793
1038 \begin_inset Flex Code
1041 \begin_layout Plain Layout
1043 \change_inserted -195340706 1334775793
1049 this file contains translations for internationalized paragraph styles
1051 \begin_inset space \thinspace{}
1055 \begin_inset CommandInset ref
1057 reference "sub:I18n"
1062 \change_inserted -712698321 1357054494
1066 \begin_layout Labeling
1067 \labelwidthstring 00.00.0000
1069 \change_inserted -712698321 1357054554
1070 \begin_inset Flex Code
1073 \begin_layout Plain Layout
1075 \change_inserted -712698321 1357054508
1083 this file contains information about unicode-encoded glyphs and the way
1084 they are supported by LyX via LaTeX.
1089 \begin_layout Section
1090 Your local configuration directory
1093 \begin_layout Standard
1094 Even if you are using LyX as an unprivileged user, you might want to change
1095 LyX configuration for your own use.
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 directory contains all your personal configuration files.
1107 This is the directory described as
1108 \begin_inset Quotes eld
1112 \begin_inset Quotes erd
1116 \begin_inset Flex MenuItem
1119 \begin_layout Plain Layout
1120 Help\SpecialChar \menuseparator
1122 \begin_inset space ~
1131 This directory is used as a mirror of
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1141 , which means that every file in
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1151 is a replacement for the corresponding file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 Any configuration file described in the above sections can be placed either
1163 in the system-wide directory, in which case it will affect all users, or
1164 in your local directory for your own use.
1167 \begin_layout Standard
1168 To make things clearer, let's provide a few examples:
1171 \begin_layout Itemize
1172 The preferences set in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Tools\SpecialChar \menuseparator
1183 dialog are saved to a file
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_layout Itemize
1207 When you reconfigure using
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1212 Tools\SpecialChar \menuseparator
1219 \begin_inset Flex Code
1222 \begin_layout Plain Layout
1228 script, and the resulting files are written in your local configuration
1230 This means that any additional text class file that you might have added
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1241 will be added to the list of classes in the
1242 \begin_inset Flex MenuItem
1245 \begin_layout Plain Layout
1246 Document\SpecialChar \menuseparator
1255 \begin_layout Itemize
1256 If you get some updated documentation from LyX ftp site and cannot install
1257 it because you do not have sysadmin rights on your system, you can just
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1268 and the items in the
1269 \begin_inset Flex MenuItem
1272 \begin_layout Plain Layout
1278 menu will open them!
1281 \begin_layout Section
1282 Running LyX with multiple configurations
1285 \begin_layout Standard
1286 The configuration freedom of the local configuration directory may not suffice
1287 if you want to have more than one configuration at your disposal.
1288 For example, you may want to be use different key bindings or printer settings
1290 You can achieve this by having several such directories.
1291 You then specify which directory to use at run-time.
1294 \begin_layout Standard
1295 Invoking LyX with the command line switch
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1309 instructs the program to read the configuration from that directory, and
1310 not from the default directory.
1311 (You can determine the default directory by running LyX without the
1312 \begin_inset Flex Code
1315 \begin_layout Plain Layout
1321 switch.) If the specified directory does not exist, LyX offers to create
1322 it for you, just like it does for the default directory on the first time
1323 you run the program.
1324 You can modify the configuration options in this additional user directory
1325 exactly as you would for the default directory.
1326 These directories are completely independent (but read on).
1327 Note that setting the environment variable
1328 \begin_inset Flex Code
1331 \begin_layout Plain Layout
1337 to some value has exactly the same effect.
1340 \begin_layout Standard
1341 Having several configurations also requires more maintenance: if you want
1342 to add a new layout to
1343 \begin_inset Flex Code
1346 \begin_layout Plain Layout
1352 which you want available from all your configurations, you must add it
1353 to each directory separately.
1354 You can avoid this with the following trick: after LyX creates the additional
1355 directory, most of the subdirectories (see above) are empty.
1356 If you want the new configuration to mirror an existing one, replace the
1357 empty subdirectory with a symbolic link to the matching subdirectory in
1358 the existing configuration.
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1369 subdirectory, however, since it contains a file written by the configuration
1370 script (also accessible through
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1381 ) which is configuration-specific.
1384 \begin_layout Chapter
1385 The Preferences dialog
1388 \begin_layout Standard
1389 All options of the preferences dialog are described in the Appendix
1391 The Preferences Dialog
1398 For some options you might find here more details.
1401 \begin_layout Section
1403 \begin_inset CommandInset label
1412 \begin_layout Standard
1413 The first step is to define your file formats if they are not already defined.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1419 Tools\SpecialChar \menuseparator
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1431 File Handling\SpecialChar \menuseparator
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1442 New\SpecialChar \ldots{}
1448 button to define your new format.
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1459 field contains the name used to identify the format in the GUI.
1461 \begin_inset Flex MenuItem
1464 \begin_layout Plain Layout
1470 is used to identify the format internally.
1471 You will also need to enter a file extension.
1472 These are all required.
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1483 field is used to provide a keyboard shortcut on the menus.
1484 (For example, pressing
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1495 \begin_inset Flex MenuItem
1498 \begin_layout Plain Layout
1499 View\SpecialChar \menuseparator
1500 View (Other Formats)\SpecialChar \menuseparator
1509 \begin_layout Standard
1511 \begin_inset Flex MenuItem
1514 \begin_layout Plain Layout
1521 \begin_inset Flex MenuItem
1524 \begin_layout Plain Layout
1531 For example, you might want to use
1532 \begin_inset Flex MenuItem
1535 \begin_layout Plain Layout
1541 to view PostScript files.
1542 You can enter the command needed to start the program in the corresponding
1544 In defining this command, you can use the four variables listed in the
1546 The viewer is launched when you view an image in LyX or use the
1547 \begin_inset Flex MenuItem
1550 \begin_layout Plain Layout
1557 The editor is for example launched when you right-click on an image and
1559 \begin_inset Flex MenuItem
1562 \begin_layout Plain Layout
1568 in the appearing context menu.
1571 \begin_layout Standard
1573 \change_inserted -195340706 1329851811
1575 \begin_inset Flex MenuItem
1578 \begin_layout Plain Layout
1584 type of a format is optional, but if it is specified, it must be unique
1586 It is used to detect files of this format from the file contents.
1587 For some important file formats there is no MIME type officially registered
1589 \begin_inset CommandInset href
1592 target "http://www.iana.org/assignments/media-types/"
1597 Therefore LyX uses the extended list of MIME types as specified by
1598 \begin_inset CommandInset href
1600 name "freedesktop.org"
1601 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1608 \begin_layout Standard
1610 \begin_inset Flex MenuItem
1613 \begin_layout Plain Layout
1619 option tells LyX that a format is suitable for document export.
1620 If this is set and if a suitable conversion route exists (see sec.
1621 \begin_inset space \thinspace{}
1625 \begin_inset CommandInset ref
1627 reference "sec:Converters"
1631 ), the format will appear in the
1632 \begin_inset Flex MenuItem
1635 \begin_layout Plain Layout
1636 File\SpecialChar \menuseparator
1643 The format will also appear in the
1644 \begin_inset Flex MenuItem
1647 \begin_layout Plain Layout
1653 menu if a viewer is specified for the format.
1654 Pure image formats, such as
1655 \begin_inset Flex Code
1658 \begin_layout Plain Layout
1664 , should not use this option.
1665 Formats that can both represent vector graphics and documents like
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1678 \begin_layout Standard
1680 \begin_inset Flex MenuItem
1683 \begin_layout Plain Layout
1684 Vector graphics format
1689 tells LyX that a format can contain vector graphics.
1690 This information is used to determine the target format of included graphics
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 Included graphics may need to be converted to either
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1742 cannot handle other image formats.
1743 If an included graphic is not already in
1744 \begin_inset Flex MenuItem
1747 \begin_layout Plain Layout
1754 \begin_inset Flex MenuItem
1757 \begin_layout Plain Layout
1764 \begin_inset Flex MenuItem
1767 \begin_layout Plain Layout
1773 format, it is converted to
1774 \begin_inset Flex MenuItem
1777 \begin_layout Plain Layout
1783 if the vector format option is set, and otherwise to
1784 \begin_inset Flex MenuItem
1787 \begin_layout Plain Layout
1796 \begin_layout Section
1800 \begin_layout Standard
1801 Since all conversions from one format to another take place in LyX's temporary
1802 directory, it is sometimes necessary to modify a file before copying it
1803 to the temporary directory in order that the conversion may be performed.
1807 \begin_layout Plain Layout
1808 For example, the file may refer to other files—images, for example—using
1809 relative file names, and these may become invalid when the file is copied
1810 to the temporary directory.
1815 This is done by a Copier: It copies a file to (or from) the temporary directory
1816 and may modify it in the process.
1819 \begin_layout Standard
1820 The definitions of the copiers may use four variables:
1823 \begin_layout Labeling
1824 \labelwidthstring 00.00.0000
1825 \begin_inset Flex Code
1828 \begin_layout Plain Layout
1834 The LyX system directory (e.
1835 \begin_inset space \thinspace{}
1839 \begin_inset space \space{}
1843 \begin_inset Flex MenuItem
1846 \begin_layout Plain Layout
1855 \begin_layout Labeling
1856 \labelwidthstring 00.00.0000
1857 \begin_inset Flex Code
1860 \begin_layout Plain Layout
1869 \begin_layout Labeling
1870 \labelwidthstring 00.00.0000
1871 \begin_inset Flex Code
1874 \begin_layout Plain Layout
1881 \change_inserted 1082167584 1348453985
1885 \begin_layout Labeling
1886 \labelwidthstring 00.00.0000
1888 \change_inserted 1082167584 1348453986
1889 $$b The base name (without filename extension) in the LyX temporary directory
1892 \begin_layout Labeling
1893 \labelwidthstring 00.00.0000
1895 \change_inserted 1082167584 1348453986
1896 $$p The full directory path of the LyX temporary directory
1899 \begin_layout Labeling
1900 \labelwidthstring 00.00.0000
1902 \change_inserted 1082167584 1348453986
1903 $$r The full pathname to the original LyX file being processed
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1909 \change_inserted 1082167584 1348453986
1910 $$f The filename (without any directory path) of the LyX file.
1913 \begin_layout Labeling
1914 \labelwidthstring 00.00.0000
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1925 \change_inserted 1082167584 1348453720
1929 \begin_layout Standard
1930 The latter should be the filename as it would be used in a LaTeX's
1937 It is relevant only when exporting files suitable for such inclusion.
1940 \begin_layout Standard
1941 Copiers can be used to do almost anything with output files.
1942 For example, suppose you want generated pdf files to be copied to a special
1944 \begin_inset Flex Code
1947 \begin_layout Plain Layout
1954 Then you could write a shell script such as this one:
1957 \begin_layout Standard
1958 \begin_inset listings
1962 \begin_layout Plain Layout
1967 \begin_layout Plain Layout
1972 \begin_layout Plain Layout
1974 TOFILE=`basename $2`
1977 \begin_layout Plain Layout
1979 cp $FROMFILE /home/you/pdf/$TOFILE
1984 Save it in your local LyX directory—say,
1985 \begin_inset Flex Code
1988 \begin_layout Plain Layout
1989 /home/you/.lyx/scripts/pdfcopier.sh
1994 —and make it executable, if you need to do so on your platform.
1996 \begin_inset Flex MenuItem
1999 \begin_layout Plain Layout
2000 Tools\SpecialChar \menuseparator
2006 dialog, select under
2007 \begin_inset Flex MenuItem
2010 \begin_layout Plain Layout
2011 File Handling\SpecialChar \menuseparator
2018 \begin_inset Flex MenuItem
2021 \begin_layout Plain Layout
2027 format—or one of the other pdf formats—and enter
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2032 pdfcopier.sh $$i $$o
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2051 \begin_layout Standard
2052 Copiers are used by LyX in various of its own conversions.
2053 For example, if appropriate programs are found, LyX will automatically
2054 install copiers for the
2055 \begin_inset Flex MenuItem
2058 \begin_layout Plain Layout
2065 \begin_inset Flex MenuItem
2068 \begin_layout Plain Layout
2070 \begin_inset space ~
2079 When these formats are exported, the copier sees that not just the main
2080 HTML file but various associated files (style files, images, etc.) are also
2082 All these files are written to a subdirectory of the directory in which
2083 the original LyX file was found.
2087 \begin_layout Plain Layout
2088 This copier can be customized.
2090 \begin_inset Quotes eld
2094 \begin_inset Quotes erd
2097 argument takes a comma-separated list of extensions to be copied; if it
2098 is omitted, all files will be copied.
2100 \begin_inset Quotes eld
2104 \begin_inset Quotes erd
2107 argument determines the extension added to the generated directory.
2109 \begin_inset Quotes eld
2113 \begin_inset Flex MenuItem
2116 \begin_layout Plain Layout
2123 \begin_inset Quotes erd
2126 , so HTML generated from
2127 \begin_inset Flex MenuItem
2130 \begin_layout Plain Layout
2131 /path/to/filename.lyx
2137 \begin_inset Flex MenuItem
2140 \begin_layout Plain Layout
2141 /path/to/filename.html.LyXconv
2155 \begin_layout Section
2157 \begin_inset CommandInset label
2159 name "sec:Converters"
2166 \begin_layout Standard
2167 You can define your own Converters to convert files between different formats.
2169 \begin_inset Flex MenuItem
2172 \begin_layout Plain Layout
2173 Tools\SpecialChar \menuseparator
2174 Preferences\SpecialChar \menuseparator
2175 File Handling\SpecialChar \menuseparator
2184 \begin_layout Standard
2185 To define a new converter, select the
2186 \begin_inset Flex MenuItem
2189 \begin_layout Plain Layout
2191 \begin_inset space ~
2200 \begin_inset Flex MenuItem
2203 \begin_layout Plain Layout
2205 \begin_inset space ~
2213 from the drop-down lists, enter the command needed for the conversion,
2215 \begin_inset Flex MenuItem
2218 \begin_layout Plain Layout
2225 Several variables can be used in the definition of converters:
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2239 The LyX system directory
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2247 \begin_layout Plain Layout
2256 \begin_layout Labeling
2257 \labelwidthstring 00.00.0000
2258 \begin_inset Flex Code
2261 \begin_layout Plain Layout
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2281 The base filename of the input file (i.
2282 \begin_inset space \thinspace{}
2285 g., without the extension)
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The path to the input file
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2313 The path to the original input file (this is different from $$p when a
2314 chain of converters is called)
2317 \begin_layout Labeling
2318 \labelwidthstring 00.00.0000
2319 \begin_inset Flex Code
2322 \begin_layout Plain Layout
2328 The iconv name for the encoding of the document.
2331 \begin_layout Standard
2333 \begin_inset Flex MenuItem
2336 \begin_layout Plain Layout
2338 \begin_inset space ~
2346 field you can enter the following flags, separated by commas:
2349 \begin_layout Labeling
2350 \labelwidthstring 00.00.0000
2351 \begin_inset Flex Code
2354 \begin_layout Plain Layout
2360 This converter runs some form of LaTeX.
2361 This will make LyX's LaTeX error logs available.
2364 \begin_layout Labeling
2365 \labelwidthstring 00.00.0000
2366 \begin_inset Flex Code
2369 \begin_layout Plain Layout
2376 \begin_inset Flex MenuItem
2379 \begin_layout Plain Layout
2385 file for the conversion.
2386 \change_inserted 1414654397 1337693117
2390 \begin_layout Labeling
2391 \labelwidthstring 00.00.0000
2393 \change_inserted 1414654397 1337693188
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2399 \change_inserted 1414654397 1337693129
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2415 file from the backend, which in practice means a LaTeX file like the one
2416 we would export, without
2417 \begin_inset Flex Code
2420 \begin_layout Plain Layout
2422 \change_inserted 1414654397 1337693184
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2449 \begin_layout Standard
2450 The following three flags are not really flags at all because they take
2452 \begin_inset Flex MenuItem
2455 \begin_layout Plain Layout
2457 \begin_inset space ~
2461 \begin_inset space ~
2472 \begin_layout Labeling
2473 \labelwidthstring 00.00.0000
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 If set, the converter's standard error will be redirected to a file
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2493 , and the script given as argument will be run as:
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2498 script < infile.out > infile.log
2504 The argument may contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2517 \begin_layout Labeling
2518 \labelwidthstring 00.00.0000
2519 \begin_inset Flex Code
2522 \begin_layout Plain Layout
2528 The name of the directory in which the converter will dump the generated
2530 LyX will not create this directory, and it does not copy anything into
2531 it, though it will copy this directory to the destination.
2532 The argument may contain
2533 \begin_inset Flex Code
2536 \begin_layout Plain Layout
2542 , which will be replaced by the base name of the input and output files,
2543 respectively, when the directory is copied.
2544 \begin_inset Newline newline
2547 Note that resultdir and usetempdir make no sense together.
2548 The latter will be ignored if the former is given.
2551 \begin_layout Labeling
2552 \labelwidthstring 00.00.0000
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 Determines the output file name and may, contain
2563 \begin_inset Flex Code
2566 \begin_layout Plain Layout
2573 Sensible only with resultdir and optional even then; if not given, it defaults
2577 \begin_layout Standard
2578 None of these last three are presently used in any of the converters that
2579 are installed with LyX.
2583 \begin_layout Standard
2584 You do not have to define converters for all formats between which you want
2586 For example, you will note that there is no `LyX to PostScript' converter,
2587 but LyX will export PostScript.
2588 It does so by first creating a LaTeX file (no converter needs to be defined
2589 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2590 and finally converting the resulting DVI file to PostScript.
2591 LyX finds such `chains' of converters automatically, and it will always
2592 choose the shortest possible chain.
2593 You can, though, still define multiple conversion methods between file
2595 For example, the standard LyX configuration provides three ways to convert
2596 LaTeX to PDF: Directly, using
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2606 ; via (DVI and) PostScript, using
2607 \begin_inset Flex MenuItem
2610 \begin_layout Plain Layout
2617 \begin_inset Flex MenuItem
2620 \begin_layout Plain Layout
2627 To define such alternate chains, you must define multiple target `file
2628 formats', as described in section
2629 \begin_inset CommandInset ref
2631 reference "sec:Formats"
2636 For example, in the standard configuration, the formats named
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2666 are defined, all of which share the extension
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2676 , and which correspond to the conversion methods just mentioned.
2679 \begin_layout Chapter
2680 Internationalizing LyX
2681 \begin_inset CommandInset label
2683 name "cha:Internationalizing-LyX"
2690 \begin_layout Standard
2691 LyX supports using a translated interface.
2692 Last time we checked, LyX provided text in thirty languages.
2693 The language of choice is called your
2698 (For further reading on locale settings, see also the documentation for
2699 locale that comes with your operating system.
2700 For Linux, the manual page for
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2710 could be a good place to start).
2713 \begin_layout Standard
2714 Notice that these translations will work, but do contain a few flaws.
2715 In particular, all dialogs have been designed with the English text in
2716 mind, which means that some of the translated text will be too large to
2717 fit within the space allocated.
2718 This is only a display problem and will not cause any harm.
2719 Also, you will find that some of the translations do not define shortcut
2720 keys for everything.
2721 Sometimes, there are simply not enough free letters to do it.
2722 Other times, the translator just hasn't got around to doing it yet.
2723 Our localization team, which you may wish to join,
2727 \begin_layout Plain Layout
2728 If you are a fluent speaker of a language other than English, joining these
2729 teams is a great way to give back to the LyX community!
2734 will of course try to fix these shortcomings in future versions of LyX.
2737 \begin_layout Section
2741 \begin_layout Subsection
2742 Translating the graphical user interface (text messages).
2745 \begin_layout Standard
2747 \begin_inset Flex Code
2750 \begin_layout Plain Layout
2756 library to handle the internationalization of the interface.
2757 To have LyX speak your favorite language in all menus and dialogs, you
2759 \begin_inset Flex Code
2762 \begin_layout Plain Layout
2768 -file for that language.
2769 When this is available, you'll have to generate a
2770 \begin_inset Flex Code
2773 \begin_layout Plain Layout
2779 -file from it and install the
2780 \begin_inset Flex Code
2783 \begin_layout Plain Layout
2790 The process of doing all of this is explained in the documentation for
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2802 It is possible to do this just for yourself, but if you're going to do
2803 it, you might as well share the results of your labors with the rest of
2805 Send a message to the LyX developers' list for more information about how
2809 \begin_layout Standard
2810 In short, this is what you should do (xx denotes the language code):
2813 \begin_layout Itemize
2814 Check out the LyX source code.
2816 \begin_inset CommandInset href
2818 name "information on the web"
2819 target "http://www.lyx.org/HowToUseSVN"
2826 \begin_layout Itemize
2828 \begin_inset Flex Code
2831 \begin_layout Plain Layout
2837 to the folder of the
2838 \begin_inset Flex Code
2841 \begin_layout Plain Layout
2849 \begin_inset Flex Code
2852 \begin_layout Plain Layout
2860 \begin_inset Flex Code
2863 \begin_layout Plain Layout
2869 doesn't exist anywhere, it can be remade with the console command
2870 \begin_inset Flex Code
2873 \begin_layout Plain Layout
2879 in that directory, or you can use an existing po-file for some other language
2883 \begin_layout Itemize
2885 \begin_inset Flex Code
2888 \begin_layout Plain Layout
2898 \begin_layout Plain Layout
2899 This is just a text file, so it can be edited in any text editor.
2900 But there are also specialized programs that support such editing, such
2905 (for all platforms) or
2914 contains a `mode' for editing
2915 \begin_inset Flex Code
2918 \begin_layout Plain Layout
2929 For some menu- and widget-labels, there are also shortcut keys that should
2931 Those keys are marked after a `|', and should be translated according to
2932 the words and phrases of the language.
2933 You should also fill also out the information at the beginning of the new
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 -file with your email-address, etc., so people know where to reach you with
2945 suggestions and entertaining flames.
2948 \begin_layout Standard
2949 If you are just doing this on your own, then:
2952 \begin_layout Itemize
2954 \begin_inset Flex Code
2957 \begin_layout Plain Layout
2964 This can be done with
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2969 msgfmt -o xx.mo < xx.po
2977 \begin_layout Itemize
2979 \begin_inset Flex Code
2982 \begin_layout Plain Layout
2988 -file to your locale-tree, at the correct directory for application messages
2993 xx, and under the name
2994 \begin_inset Flex Code
2997 \begin_layout Plain Layout
3004 \begin_inset space \thinspace{}
3008 \begin_inset space \space{}
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3016 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3026 \begin_layout Standard
3027 As said, however, it would be best if the new
3028 \begin_inset Flex Code
3031 \begin_layout Plain Layout
3037 -file could be added to the LyX distribution, so others can use it.
3038 Adding it involves making additional changes to LyX.
3039 So send an email to the developers' mailing list if you're interested in
3043 \begin_layout Subsubsection
3047 \begin_layout Standard
3048 Sometimes it turns out that one English message needs to be translated into
3049 different messages in the target language.
3050 One example is the message
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 which has the German translation
3068 , depending upon exactly what the English
3069 \begin_inset Quotes eld
3073 \begin_inset Quotes erd
3078 \begin_inset Flex Code
3081 \begin_layout Plain Layout
3087 does not handle such ambiguous translations.
3088 Therefore you have to add some context information to the message: Instead
3090 \begin_inset Flex Code
3093 \begin_layout Plain Layout
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3104 To[[as in 'From format x to format y']]
3110 \begin_inset Flex Code
3113 \begin_layout Plain Layout
3114 To[[as in 'From page x to page y']].
3119 Now the two occurrences of
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3130 \begin_inset Flex Code
3133 \begin_layout Plain Layout
3139 and can be translated correctly to
3150 \begin_layout Standard
3151 Of course the context information needs to be stripped off the original
3152 message when no translation is used.
3153 Therefore you have to put it in double square brackets at the end of the
3154 message (see the example above).
3155 The translation mechanism of LyX ensures that everything in double square
3156 brackets at the end of messages is removed before displaying the message.
3159 \begin_layout Subsection
3160 Translating the documentation.
3163 \begin_layout Standard
3164 The online documentation (in the
3165 \begin_inset Flex MenuItem
3168 \begin_layout Plain Layout
3174 -menu) can (and should!) be translated.
3175 If there are translated versions of the documentation available
3179 \begin_layout Plain Layout
3180 As of March 2008, at least some of the documents have been translated into
3181 fourteen languages, with the Tutorial available in a few more.
3186 and the locale is set accordingly, these will be used automagically by
3188 LyX looks for translated versions as
3189 \begin_inset Flex Code
3192 \begin_layout Plain Layout
3193 LyXDir/doc/xx/DocName.lyx
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 is the code for the language currently in use.
3209 If there are no translated documents, the default English versions will
3211 Note that the translated versions must have the same filenames (
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3221 above) as the original.
3222 If you feel up to translating the documentation (an excellent way to proof-read
3223 the original documentation by the way!), there are a few things you should
3227 \begin_layout Itemize
3228 Check out the documentation translation web page at
3229 \begin_inset CommandInset href
3231 name "http://www.lyx.org/Translation"
3232 target "http://www.lyx.org/Translation"
3237 That way, you can find out which (if any) documents have already been translate
3238 d into your language.
3239 You can also find out who (if anyone) is organizing the effort to translate
3240 the documentation into your language.
3241 If no one is organizing the effort, please let us know that you're interested.
3244 \begin_layout Standard
3245 Once you get to actually translating, here's a few hints for you that may
3249 \begin_layout Itemize
3250 Join the documentation team! There is information on how to do that in
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3261 \begin_inset Flex MenuItem
3264 \begin_layout Plain Layout
3265 Help\SpecialChar \menuseparator
3271 ), which by the way is the first document you should translate.
3274 \begin_layout Itemize
3275 Learn the typographic conventions for the language you are translating to.
3276 Typography is an ancient art and over the centuries, a great variety of
3277 conventions have developed throughout different parts of the world.
3278 Also study the professional terminology amongst typographers in your country.
3279 Inventing your own terminology will only confuse the users.
3282 (Warning! Typography is addictive!)
3285 \begin_layout Itemize
3286 Make a copy of the document.
3287 This will be your working copy.
3288 You can use this as your personal translated help-file by placing it in
3290 \begin_inset Flex Code
3293 \begin_layout Plain Layout
3302 \begin_layout Itemize
3303 Sometimes the original document (from the LyX-team) will be updated.
3304 Use the source viewer at
3305 \begin_inset CommandInset href
3307 name "http://www.lyx.org/trac/timeline"
3308 target "http://www.lyx.org/trac/timeline"
3312 to see what has been changed.
3313 That way you can easily see which parts of the translated document need
3317 \begin_layout Standard
3318 If you ever find an error in the original document, fix it and notify the
3319 rest of the documentation team of the changes! (You didn't forget to join
3320 the documentation team, did you?)
3323 \begin_layout Standard
3324 \begin_inset Branch OutDated
3327 \begin_layout Section
3328 International Keyboard Support
3331 \begin_layout Standard
3334 [Editor's Note: The following section is by
3342 It needs to be fixed to conform to the new Documentation Style sheet and
3343 to make use of the new v1.0 features.
3344 The whole thing also needs to be merged with the section following it.-jw
3345 It may also be badly out of date.-rh (2008)]
3348 \begin_layout Subsection
3349 Defining Own Keymaps: Keymap File Format
3352 \begin_layout Standard
3353 Let's look at a keyboard definition file a little closer.
3354 It is a plain text file defining
3357 \begin_layout Itemize
3358 key-to-key or key-to-string translations
3361 \begin_layout Itemize
3365 \begin_layout Itemize
3366 dead keys exceptions
3369 \begin_layout Standard
3370 To define key-to-key or key-to-string translation, use this command:
3373 \begin_layout Quotation
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_layout Standard
3400 \begin_inset Flex Code
3403 \begin_layout Plain Layout
3409 is the key to be translated and
3410 \begin_inset Flex Code
3413 \begin_layout Plain Layout
3419 is the string to be inserted into the document.
3420 To define dead keys, use:
3423 \begin_layout Quotation
3424 \begin_inset Flex Code
3427 \begin_layout Plain Layout
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_layout Standard
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3459 is a keyboard key and
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3470 The following dead keys are supported (shortcut name is in parentheses):
3473 \begin_layout Quotation
3477 \begin_inset space \hfill{}
3483 \begin_layout Quotation
3485 \begin_inset space \hfill{}
3491 \begin_layout Quotation
3493 \begin_inset space \hfill{}
3499 \begin_layout Quotation
3501 \begin_inset space \hfill{}
3507 \begin_layout Quotation
3509 \begin_inset space \hfill{}
3515 \begin_layout Quotation
3517 \begin_inset space \hfill{}
3524 \begin_layout Plain Layout
3536 \begin_layout Quotation
3538 \begin_inset space \hfill{}
3544 \begin_layout Quotation
3546 \begin_inset space \hfill{}
3553 \begin_layout Plain Layout
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3590 \begin_layout Plain Layout
3602 \begin_layout Quotation
3604 \begin_inset space \hfill{}
3611 \begin_layout Plain Layout
3623 \begin_layout Quotation
3625 \begin_inset space \hfill{}
3631 \begin_layout Quotation
3632 hungarian umlaut (hug)
3633 \begin_inset space \hfill{}
3639 \begin_layout Quotation
3641 \begin_inset space \hfill{}
3647 \begin_layout Quotation
3649 \begin_inset space \hfill{}
3656 \begin_layout Plain Layout
3668 \begin_layout Standard
3669 Since in many international keyboards there are exceptions to what some
3670 dead keys should do, you can define them using
3673 \begin_layout Quotation
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3685 deadkey key outstring
3688 \begin_layout Standard
3689 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3693 \begin_layout Quotation
3694 \begin_inset Flex Code
3697 \begin_layout Plain Layout
3710 \begin_layout Standard
3711 to make it work correctly.
3712 Also, you have to define as exceptions dead keys over i and j, to remove
3713 the dot from them before inserting an accent mark.
3714 I will change this when the time comes, but so far I haven't had time.
3717 \begin_layout Standard
3718 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3721 \begin_inset Flex Code
3724 \begin_layout Plain Layout
3730 have different meaning.
3732 \begin_inset Flex Code
3735 \begin_layout Plain Layout
3741 marks comments, quotes start and end LaTeX-style commands.
3742 To enter quote, you'll need to use
3743 \begin_inset Flex Code
3746 \begin_layout Plain Layout
3755 \begin_inset Flex Code
3758 \begin_layout Plain Layout
3765 \begin_inset Flex Code
3768 \begin_layout Plain Layout
3779 \begin_layout Standard
3780 If you make a keyboard description file that works for your language, please
3781 mail it to me, so I can include it in the next keymap distribution.
3784 \begin_layout Standard
3785 More keywords will be supported in keymap configuration file in future,
3789 \begin_layout Itemize
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3804 \begin_inset space \hfill{}
3808 \begin_inset Flex Code
3811 \begin_layout Plain Layout
3820 \begin_layout Itemize
3821 \begin_inset Flex Code
3824 \begin_layout Plain Layout
3835 \begin_inset space \hfill{}
3839 \begin_inset Flex Code
3842 \begin_layout Plain Layout
3848 an external keymap translation program
3851 \begin_layout Standard
3852 Also, it should look into
3853 \begin_inset Flex Code
3856 \begin_layout Plain Layout
3862 file for defaults, too (for example, a
3863 \begin_inset Flex Code
3866 \begin_layout Plain Layout
3874 option to include default keyboard).
3882 \begin_layout Section
3883 International Keymap Stuff
3884 \begin_inset CommandInset label
3886 name "sec:International-Keymap-Stuff"
3893 \begin_layout Standard
3894 \begin_inset Note Note
3897 \begin_layout Plain Layout
3898 In doing the revisions on this document in March 2008, I did not look over
3899 this stuff, as I do not understand it.
3900 It would be good if someone else could do so.
3909 \begin_layout Standard
3910 The next two sections describe the
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3934 file syntax in detail.
3935 These sections should help you design your own key map if the ones provided
3936 do not meet your needs.
3939 \begin_layout Subsection
3943 \begin_layout Standard
3947 \begin_inset Flex Code
3950 \begin_layout Plain Layout
3956 file maps keystrokes to characters or strings.
3957 As the name suggests, it sets a keyboard mapping.
3959 \begin_inset Flex Code
3962 \begin_layout Plain Layout
3973 \begin_inset Flex Code
3976 \begin_layout Plain Layout
3991 \begin_inset Flex Code
3994 \begin_layout Plain Layout
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4030 are described in this section.
4033 \begin_layout Labeling
4034 \labelwidthstring 00.00.0000
4035 \begin_inset Flex Code
4038 \begin_layout Plain Layout
4046 Map a character to a string
4049 \begin_layout LyX-Code
4064 \begin_layout Standard
4097 the double-quote (")
4114 must be escaped with a preceding backslash (
4125 \begin_layout Standard
4127 \begin_inset Flex MenuItem
4130 \begin_layout Plain Layout
4138 statement to cause the symbol
4139 \begin_inset Flex MenuItem
4142 \begin_layout Plain Layout
4150 to be output for the keystroke
4151 \begin_inset Flex MenuItem
4154 \begin_layout Plain Layout
4165 \begin_layout LyX-Code
4171 \begin_layout Labeling
4172 \labelwidthstring 00.00.0000
4173 \begin_inset Flex Code
4176 \begin_layout Plain Layout
4184 Specify an accent character
4187 \begin_layout LyX-Code
4196 \begin_layout Standard
4197 This will make the cha
4235 This is the dead key
4239 \begin_layout Plain Layout
4246 refers to a key that does not produce a character by itself, but when followed
4247 with another key, produces the desired accent character.
4248 For example, a German characte
4250 r with an umlaut like
4260 can be produced in this manner.
4269 \begin_layout Standard
4282 and then another key not in
4299 followed by the other, not allowed key, as output.
4303 \begin_inset Flex MenuItem
4306 \begin_layout Plain Layout
4314 cancels a dead key, so if
4325 \begin_inset Flex MenuItem
4328 \begin_layout Plain Layout
4337 , the cursor will not go one position backwards but will instead cancel
4353 might have had on the next keystroke.
4357 \begin_layout Standard
4358 The following example specifies that the character ' is to be an acute accent,
4359 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4362 \begin_layout LyX-Code
4365 kmod ' acute aeiouAEIOU
4368 \begin_layout Labeling
4369 \labelwidthstring 00.00.0000
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 Specify an exception to the accent character
4382 \begin_layout LyX-Code
4391 \begin_layout Standard
4392 This defines an exce
4433 have been assigned a keystroke with a previous
4436 \begin_inset Flex Code
4439 \begin_layout Plain Layout
4463 must not belong in the
4510 If such a declaration does not exist in
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4555 \begin_inset Flex Code
4558 \begin_layout Plain Layout
4572 \begin_layout Standard
4573 The following command produces causes äi to be produced when you enter acute-i
4577 \begin_layout LyX-Code
4591 \begin_layout Labeling
4592 \labelwidthstring 00.00.0000
4593 \begin_inset Flex Code
4596 \begin_layout Plain Layout
4602 Combine two accent characters
4605 \begin_layout LyX-Code
4611 accent1 accent2 allowed
4614 \begin_layout Standard
4615 This one is getting pretty esoteric.
4616 It allows you to combine the effect
4672 \begin_inset Flex Code
4675 \begin_layout Plain Layout
4703 \begin_layout Standard
4704 Consider this example from the
4705 \begin_inset Flex Code
4708 \begin_layout Plain Layout
4719 \begin_layout LyX-Code
4722 kmod ; acute aeioyvhAEIOYVH
4726 kcomb acute umlaut iyIY
4729 \begin_layout Standard
4730 This allows you to press
4731 \begin_inset Flex MenuItem
4734 \begin_layout Plain Layout
4742 and get the effect of
4743 \begin_inset Flex Code
4746 \begin_layout Plain Layout
4765 in this case cancels the last dead key, so if you press
4766 \begin_inset Flex MenuItem
4769 \begin_layout Plain Layout
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4794 \begin_layout Subsection
4798 \begin_layout Standard
4800 \begin_inset Flex Code
4803 \begin_layout Plain Layout
4811 mapping is performed, a
4812 \begin_inset Flex Code
4815 \begin_layout Plain Layout
4825 file maps the strings that the symbols generate to characters in the current
4827 The LyX distribution currently includes at least the
4828 \begin_inset Flex Code
4831 \begin_layout Plain Layout
4840 \begin_inset Flex Code
4843 \begin_layout Plain Layout
4854 \begin_layout Standard
4856 \begin_inset Flex Code
4859 \begin_layout Plain Layout
4867 file is a sequence of declarations of the form
4870 \begin_layout LyX-Code
4883 \begin_layout Standard
4884 For example, in order to map
4885 \begin_inset Flex MenuItem
4888 \begin_layout Plain Layout
4898 to the corresponding character in the iso-8859-1 set (233), the following
4902 \begin_layout LyX-Code
4910 \begin_layout Standard
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4924 \begin_inset Flex Code
4927 \begin_layout Plain Layout
4945 the same character can apply to more than one string.
4947 \begin_inset Flex Code
4950 \begin_layout Plain Layout
4961 \begin_layout LyX-Code
4973 \begin_inset Newline newline
4989 \begin_layout Standard
4990 If LyX cannot find a mapping for the string produced by the keystroke or
4991 a deadkey sequence, it will check if it looks like an accented char and
4992 try to draw an accent over the character on screen.
4995 \begin_layout Subsection
4999 \begin_layout Standard
5000 There is a second way to add support for international characters through
5001 so-called dead-keys.
5002 A dead-key works in combination with a letter to produce an accented character.
5003 Here, we'll explain how to create a really simple dead-key to illustrate
5007 \begin_layout Standard
5008 Suppose you happen to need the circumflex character,
5009 \begin_inset Quotes eld
5013 \begin_inset Quotes erd
5018 \begin_inset Flex MenuItem
5021 \begin_layout Plain Layout
5028 \begin_inset space ~
5032 \begin_inset Flex MenuItem
5035 \begin_layout Plain Layout
5041 ] to the LyX command
5042 \begin_inset Flex Code
5045 \begin_layout Plain Layout
5052 \begin_inset Flex Code
5055 \begin_layout Plain Layout
5062 Now, whenever you type the
5063 \begin_inset Flex MenuItem
5066 \begin_layout Plain Layout
5072 -key followed by a letter, that letter will have a circumflex accent on
5074 For example, the sequence
5075 \begin_inset Quotes eld
5079 \begin_inset Flex MenuItem
5082 \begin_layout Plain Layout
5089 \begin_inset Quotes erd
5092 produces the letter:
5093 \begin_inset Quotes eld
5097 \begin_inset Quotes erd
5101 If you tried to type
5102 \begin_inset Quotes eld
5106 \begin_inset Flex MenuItem
5109 \begin_layout Plain Layout
5116 \begin_inset Quotes erd
5119 , however, LyX will complain with a beep, since a
5120 \begin_inset Quotes eld
5124 \begin_inset Flex MenuItem
5127 \begin_layout Plain Layout
5134 \begin_inset Quotes erd
5137 never takes a circumflex accent.
5139 \begin_inset Flex MenuItem
5142 \begin_layout Plain Layout
5148 after a dead-key produces the bare-accent.
5149 Please note this last point! If you bind a key to a dead-key, you'll need
5150 to rebind the character on that key to yet another key.
5152 \begin_inset Flex MenuItem
5155 \begin_layout Plain Layout
5161 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5164 \begin_layout Standard
5165 One common way to bind dead-keys is to use
5166 \begin_inset Flex MenuItem
5169 \begin_layout Plain Layout
5176 \begin_inset Flex MenuItem
5179 \begin_layout Plain Layout
5186 \begin_inset Flex MenuItem
5189 \begin_layout Plain Layout
5195 in combination with an accent, like
5196 \begin_inset Quotes eld
5200 \begin_inset Flex MenuItem
5203 \begin_layout Plain Layout
5210 \begin_inset Quotes erd
5214 \begin_inset Quotes eld
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5228 \begin_inset Quotes erd
5232 \begin_inset Quotes eld
5236 \begin_inset Flex MenuItem
5239 \begin_layout Plain Layout
5246 \begin_inset Quotes erd
5250 Another way involves using
5251 \begin_inset Flex Code
5254 \begin_layout Plain Layout
5261 \begin_inset Flex Code
5264 \begin_layout Plain Layout
5270 to set up the special
5271 \begin_inset Flex Code
5274 \begin_layout Plain Layout
5282 \begin_inset Flex Code
5285 \begin_layout Plain Layout
5291 acts in some ways just like
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5301 and permits you to bind keys to accented characters.
5302 You can also turn keys into dead-keys by binding them to something like
5304 \begin_inset Flex Code
5307 \begin_layout Plain Layout
5313 and then binding this symbolic key to the corresponding LyX command.
5317 \begin_layout Plain Layout
5322 : This is exactly what I do in my
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5344 \begin_inset Flex MenuItem
5347 \begin_layout Plain Layout
5349 \begin_inset space ~
5358 \begin_inset Flex Code
5361 \begin_layout Plain Layout
5367 and a bunch of these
5368 \begin_inset Quotes eld
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5382 \begin_inset Quotes erd
5385 symbolic keys bound such things as
5386 \begin_inset Flex MenuItem
5389 \begin_layout Plain Layout
5391 \begin_inset space ~
5400 \begin_inset Flex MenuItem
5403 \begin_layout Plain Layout
5405 \begin_inset space ~
5414 This is how I produce my accented characters.
5419 You can make just about anything into the
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5430 \begin_inset Flex MenuItem
5433 \begin_layout Plain Layout
5439 keys, a spare function key, etc.
5440 As for the LyX commands that produce accents, check the entry for
5441 \begin_inset Flex Code
5444 \begin_layout Plain Layout
5455 You'll find the complete list there.
5458 \begin_layout Subsection
5459 Saving your Language Configuration
5462 \begin_layout Standard
5463 You can edit your preferences so that your desired language environment
5464 is automatically configured when LyX starts up, via the
5465 \begin_inset Flex MenuItem
5468 \begin_layout Plain Layout
5469 Edit\SpecialChar \menuseparator
5478 \begin_layout Chapter
5479 Installing New Document Classes, Layouts, and Templates
5480 \begin_inset CommandInset label
5482 name "cha:Installing-New-Document"
5487 \begin_inset Argument 1
5490 \begin_layout Plain Layout
5491 Installing New Document Classes
5499 \begin_layout Standard
5500 In this chapter, we describe the procedures for creating and installing
5501 new LyX layout and template files, as well as offer a refresher on correctly
5502 installing new LaTeX document classes.
5506 \begin_layout Standard
5507 First, let us a say a few words about how one ought to think about the relation
5508 between LyX and LaTeX.
5509 The thing to understand is that, in a certain sense, LyX doesn't know anything
5511 Indeed, from LyX's point of view, LaTeX is just one of several
5512 \begin_inset Quotes eld
5516 \begin_inset Quotes erd
5519 in which it is capable of producing output.
5520 Other such formats are DocBook, plaintext, and XHTML.
5521 LaTeX is, of course, a particularly important format, but very little of
5522 the information LyX has about LaTeX is actually contained in the program
5527 \begin_layout Plain Layout
5528 Some commands are sufficiently complex that they are
5529 \begin_inset Quotes eld
5533 \begin_inset Quotes erd
5537 But the developers generally regard this as a Bad Thing.
5542 Rather, that information, even for the standard classes like
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5552 , is contained in `layout files'.
5553 Similarly, LyX itself does not know much about DocBook or XHTML.
5554 What it knows is contained in layout files.
5557 \begin_layout Standard
5558 You can think of the layout file for a given document class as a translation
5559 manual between LyX constructs---paragraphs with their corresponding styles,
5560 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5562 Almost everything LyX knows about
5563 \begin_inset Flex Code
5566 \begin_layout Plain Layout
5572 , for example, is contained in the file
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5582 and in various other files it includes.
5583 For this reason, anyone intending to write layout files should plan to
5584 study the existing files.
5585 A good place to start is with
5586 \begin_inset Flex Code
5589 \begin_layout Plain Layout
5595 , which is included in
5596 \begin_inset Flex Code
5599 \begin_layout Plain Layout
5606 \begin_inset Flex Code
5609 \begin_layout Plain Layout
5615 , and many of the other layout files for document classes.
5616 This file is where sections and the like are defined:
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5626 tells LyX how paragraphs that are marked with the Section, Subsection,
5627 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5630 \begin_inset Flex Code
5633 \begin_layout Plain Layout
5639 file basically just includes several of these
5640 \begin_inset Flex Code
5643 \begin_layout Plain Layout
5652 \begin_layout Standard
5653 Defining the LyX--LaTeX correspondence is not the only thing layout files
5655 Their other job is to define how the LyX constructs themselves will appear
5657 The fact that layout files have these two jobs is often a source of confusion,
5658 because they are completely separate.
5659 Telling LyX how to translate a certain paragraph style into LaTeX does
5660 not tell LyX how to display it; conversely, telling LyX how to display
5661 a certain paragraph style does not tell LyX how to translate it into LaTeX
5662 (let alone tell LaTeX how to display it).
5663 So, in general, when you define a new LyX construct, you must always do
5664 two quite separate things: (i)
5665 \begin_inset space ~
5668 tell LyX how to translate it into LaTeX and (ii)
5669 \begin_inset space ~
5672 tell LyX how to display it.
5675 \begin_layout Standard
5676 Much the same is true, of course, as regards LyX's other backend formats,
5677 though XHTML is in some ways different, because in that case LyX
5681 able, to some extent, to use information about how it should display a
5682 paragraph on the screen to output information (in the form of CSS) about
5683 how the paragraph should be displayed in a browser.
5684 Even in this case, however, the distinction between what LyX does internally
5685 and how things are rendered externally remains in force, and the two can
5686 be controlled separately.
5688 \begin_inset CommandInset ref
5690 reference "sec:Tags-for-XHTML"
5697 \begin_layout Section
5698 Installing new LaTeX files
5701 \begin_layout Standard
5702 Some installations may not include a LaTeX package or class file that you
5703 would like to use within LyX.
5704 For example, you might need FoilTeX, a package for preparing slides for
5705 overhead projectors.
5706 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5707 a user interface for installing such packages.
5708 For example, with MiKTeX, you start the program
5709 \begin_inset Quotes eld
5713 \begin_inset space ~
5717 \begin_inset Quotes erd
5720 to get a list of available packages.
5721 To install one of them, right click on it or use the corresponding toolbar
5725 \begin_layout Standard
5726 If your LaTeX distribution does not provide such a `package manager', or
5727 if the package is not available from your distribution, then follow these
5728 steps to install it manually:
5731 \begin_layout Enumerate
5732 Get the package from
5733 \begin_inset CommandInset href
5736 target "http://www.ctan.org/"
5743 \begin_layout Enumerate
5744 If the package contains a file with the ending
5745 \begin_inset Quotes eld
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5759 \begin_inset Quotes erd
5762 (is the case for FoilTeX) then open a console, change to the folder of
5763 this file and execute the command
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5774 You have now unpacked the package and have all files to install it.
5775 Most LaTeX-packages are not packed and you can skip this step.
5778 \begin_layout Enumerate
5779 Now you need to decide if the package should be available for all users
5784 \begin_layout Enumerate
5785 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5786 for all users on your system, then install it in your `local' TeX tree,
5787 otherwise install it in your own `user' TeX tree.
5788 Where these trees should be created, if they do not already exist, depends
5790 To find this out, look in the file
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5804 \begin_layout Plain Layout
5805 This is usually in the directory
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5815 , though you can execute the command
5816 \begin_inset Flex Code
5819 \begin_layout Plain Layout
5830 The location of the `local' TeX tree is defined by the
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 variable; this is usually somewhere like
5841 \begin_inset Flex Code
5844 \begin_layout Plain Layout
5845 /usr/local/share/texmf
5851 The location of the `user' TeX tree is defined by
5852 \begin_inset Flex Code
5855 \begin_layout Plain Layout
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5872 (If these variables are not predefined, you have to define them.) You'll
5873 probably need root permissions to create or modify the `local' tree, but
5874 not for your `user' tree.
5875 \begin_inset Newline newline
5878 In general, it is recommended to install in the user tree because your user
5879 will not be modified or even overwritten when you upgrade your system.
5880 It will typically also be backed up together with everything else when
5881 you backup your home directory (which, of course, you do on a regular basis).
5884 \begin_layout Enumerate
5885 On Windows, if you want the new package to be available for all users on
5886 your system, change to the folder where LaTeX is installed and then change
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 (For MiKTeX, this would be by default the folder
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5924 \begin_layout Plain Layout
5925 Note that this will be the correct path only on English installations.
5926 On a German one, it would be
5927 \begin_inset Flex Code
5930 \begin_layout Plain Layout
5944 , and similarly for other languages.
5949 Create there a new folder
5950 \begin_inset Flex Code
5953 \begin_layout Plain Layout
5959 and copy all files of the package into it.
5961 \begin_inset Newline newline
5964 If the package should only available for you or you don't have admin permissions
5965 , do the same, but in the local LaTeX folder.
5967 \begin_inset space \thinspace{}
5971 \begin_inset space ~
5974 2.8 under Windows XP, this would be the folder:
5975 \begin_inset Newline newline
5981 \begin_inset Flex Code
5984 \begin_layout Plain Layout
5987 Documents and Settings
5999 \begin_inset Newline newline
6005 \begin_inset Phantom HPhantom
6008 \begin_layout Plain Layout
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6035 \begin_inset Newline newline
6038 On Vista, it would be:
6039 \begin_inset Newline newline
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6072 \begin_layout Enumerate
6073 Now one only need to tell LaTeX that there are new files.
6074 This depends on the used LaTeX-Distribution:
6078 \begin_layout Enumerate
6079 For TeXLive execute the command
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6090 If you installed the package for all users, then you will probably need
6091 to have root permissions for that.
6094 \begin_layout Enumerate
6095 For MiKTeX, if you have installed the package for all users, start the program
6097 \begin_inset Quotes eld
6101 \begin_inset space ~
6105 \begin_inset Quotes erd
6108 and press the button marked
6109 \begin_inset Quotes eld
6113 \begin_inset Quotes erd
6117 Otherwise start the program
6118 \begin_inset Quotes eld
6122 \begin_inset Quotes erd
6129 \begin_layout Enumerate
6130 Finally, you need to tell LyX that there are new packages available.
6131 So, in LyX, use the menu
6132 \begin_inset Flex MenuItem
6135 \begin_layout Plain Layout
6138 \SpecialChar \menuseparator
6144 and then restart LyX.
6147 \begin_layout Standard
6148 Now the package is installed.
6149 In our example, the document class
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6155 \begin_inset space ~
6162 \begin_layout Plain Layout
6174 will now be available under
6175 \begin_inset Flex MenuItem
6178 \begin_layout Plain Layout
6179 Document\SpecialChar \menuseparator
6180 Settings\SpecialChar \menuseparator
6190 \begin_layout Standard
6191 If you would like to use a LaTeX document class that is not even listed
6193 \begin_inset Flex MenuItem
6196 \begin_layout Plain Layout
6197 Document\SpecialChar \menuseparator
6198 Settings\SpecialChar \menuseparator
6204 , then you need to create a `layout' file for it.
6205 That is the topic of the next section.
6208 \begin_layout Section
6209 Types of layout files
6212 \begin_layout Standard
6213 This section describes the various sorts of LyX files that contain layout
6215 These files describe various paragraph and character styles, determining
6216 how LyX should display them and how they should be translated into LaTeX,
6217 DocBook, XHTML, or whatever output format is being used.
6221 \begin_layout Standard
6222 We shall try to provide a thorough description of the process of writing
6224 However, there are so many different types of documents supported even
6225 by just LaTeX that we can't hope to cover every different possibility or
6226 problem you might encounter.
6227 The LyX users' list is frequented by people with lots of experience with
6228 layout design who are willing to share what they've learned, so please
6229 feel free to ask questions there.
6232 \begin_layout Standard
6233 As you prepare to write a new layout, it is extremely helpful to look at
6234 the layouts distributed with LyX.
6235 If you write a LyX layout for a LaTeX document class that might also be
6236 used by others, or write a module that might be useful to others, then
6237 you should consider posting your layout to the
6238 \begin_inset CommandInset href
6240 name "layout section on the LyX wiki"
6241 target "http://wiki.lyx.org/Layouts/Layouts"
6245 or even to the LyX developers' list, so that it might be included in LyX
6250 \begin_layout Plain Layout
6251 Note that LyX is licensed under the General Public License, so any material
6252 that is contributed to LyX must be similarly licensed.
6260 \begin_layout Subsection
6262 \begin_inset CommandInset label
6264 name "sub:Layout-modules"
6271 \begin_layout Standard
6272 We have spoken to this point about `layout files'.
6273 But there are different sorts of files that contain layout information.
6274 Layout files, strictly so called, have the
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 extension and provide LyX with information about document classes.
6285 As of LyX 1.6, however, layout information can also be contained in layout
6291 \begin_inset Flex Code
6294 \begin_layout Plain Layout
6301 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6302 some modules—such as the
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6312 module—specifically provide support for one package.
6313 In a sense, layout modules are similar to included
6317 \begin_layout Plain Layout
6318 These can have any extension, but by convention have the
6319 \begin_inset Flex Code
6322 \begin_layout Plain Layout
6334 \begin_inset Flex Code
6337 \begin_layout Plain Layout
6343 —in that modules are not specific to a given document class but may be used
6344 with many different classes.
6345 The difference is that using an included file with
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6355 requires editing that file.
6356 Modules, by contrast, are selected in the
6357 \begin_inset Flex MenuItem
6360 \begin_layout Plain Layout
6361 Document\SpecialChar \menuseparator
6370 \begin_layout Standard
6371 Building modules is the easiest way to get started with layout editing,
6372 since it can be as simple as adding a single new paragraph style or flex
6374 But modules may, in principle, contain anything a layout file can contain.
6377 \begin_layout Standard
6378 After creating a new module and copying it to the
6379 \begin_inset Flex Code
6382 \begin_layout Plain Layout
6388 folder, you will need to reconfigure and then restart LyX for the module
6389 to appear in the menu.
6390 However, changes you make to the module will be seen immediately, if you
6392 \begin_inset Flex MenuItem
6395 \begin_layout Plain Layout
6396 Document\SpecialChar \menuseparator
6402 , highlight something, and then hit
6403 \begin_inset Quotes eld
6407 \begin_inset Quotes erd
6413 It is strongly recommended that you save your work before doing this
6418 it is strongly recommended that you not attempt to edit modules while simultaneo
6419 usly working on actual documents
6422 Though of course the developers strive to keep LyX stable in such situations,
6423 syntax errors and the like in your module file could cause strange behavior.
6426 \begin_layout Subsubsection
6430 \begin_layout Standard
6431 Modules are to LyX as packages are to LaTeX.
6432 Sometimes, however, you find yourself wanting a specific inset or character
6433 style just for one document and writing a module that will also be available
6434 to other documents makes little sense.
6435 What you need is LyX's
6436 \begin_inset Quotes eld
6440 \begin_inset Quotes erd
6446 \begin_layout Standard
6447 You will find it under
6449 Document\SpecialChar \menuseparator
6450 Settings\SpecialChar \menuseparator
6454 The large text box allows you to enter anything that you might enter in
6455 a layout file or module.
6456 You can think of a document's local layout, in fact, as a module that belongs
6458 So, in particular, you must enter a
6459 \begin_inset Flex Code
6462 \begin_layout Plain Layout
6469 Any format is acceptable, but one would normally use the format current
6471 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6472 layout is not supported by versions of LyX prior to 1.6, so you should not
6473 use it if you want to be able to export your document to LyX 1.5 or earlier
6474 (without, that is, losing the local layout information).
6475 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6476 though there is no UI for it---then you should use format 11 and, of course,
6477 use only layout constructs that were available in LyX 1.6.
6480 \begin_layout Standard
6481 When you have entered something in the
6482 \begin_inset Flex Code
6485 \begin_layout Plain Layout
6491 pane, LyX will enable the
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6499 button at the bottom.
6500 Clicking this button will cause LyX to determine whether what you have
6501 entered is valid layout information for the chosen format.
6502 LyX will report the result but, unfortunately, will not tell you what errors
6503 there might have been.
6504 These will be written to the terminal, however, if LyX is started from
6506 You will not be permitted to save your local layout until you have entered
6510 \begin_layout Standard
6511 The warnings at the end of the previous section apply here, too.
6512 Do not play with local layout while you are actually working, especially
6513 if you have not saved your document.
6514 That said, using local layout with a test document can be a very convenient
6515 way to try out layout ideas, or even to start developing a module.
6518 \begin_layout Subsection
6520 \begin_inset Flex MenuItem
6523 \begin_layout Plain Layout
6532 \begin_layout Standard
6533 There are two situations you are likely to encounter when wanting to support
6534 a new LaTeX document class, involving style (
6535 \begin_inset Flex Code
6538 \begin_layout Plain Layout
6544 ) files and LaTeX2e class (
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6555 Supporting a style file is usually fairly easy.
6556 Supporting a new class file is a bit harder.
6557 We'll discuss the former in this section and the latter in the next.
6558 Similar remarks apply, of course, if you want to support a new DocBook
6562 \begin_layout Standard
6563 The easier case is the one in which your new document class is provided
6564 as a style file that is to be used in conjunction with an already supported
6566 For the sake of the example, we'll assume that the style file is called
6568 \begin_inset Flex MenuItem
6571 \begin_layout Plain Layout
6577 and that it is meant to be used with
6578 \begin_inset Flex MenuItem
6581 \begin_layout Plain Layout
6587 , which is a standard class.
6591 \begin_layout Standard
6592 Start by copying the existing class's layout file into your local directory:
6596 \begin_layout Plain Layout
6597 Of course, which directory is your local directory will vary by platform,
6598 and LyX allows you to specify your local directory on startup, too, using
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6617 \begin_layout LyX-Code
6618 cp report.layout ~/.lyx/layouts/myclass.layout
6621 \begin_layout Standard
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 and change the line:
6635 \begin_layout LyX-Code
6638 DeclareLaTeXClass{report}
6641 \begin_layout Standard
6645 \begin_layout LyX-Code
6648 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6651 \begin_layout Standard
6655 \begin_layout LyX-Code
6657 \begin_inset Newline newline
6663 \begin_inset Newline newline
6669 \begin_layout Standard
6670 near the top of the file.
6673 \begin_layout Standard
6674 Start LyX and select
6675 \begin_inset Flex MenuItem
6678 \begin_layout Plain Layout
6679 Tools\SpecialChar \menuseparator
6686 Then restart LyX and try creating a new document.
6688 \begin_inset Flex MenuItem
6691 \begin_layout Plain Layout
6697 " as a document class option in the
6698 \begin_inset Flex MenuItem
6701 \begin_layout Plain Layout
6702 Document\SpecialChar \menuseparator
6709 It is likely that some of the sectioning commands and such in your new
6710 class will work differently from how they worked in the base class—
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6720 in this example—so you can fiddle around with the settings for the different
6721 sections if you wish.
6722 The layout information for sections is contained in
6723 \begin_inset Flex Code
6726 \begin_layout Plain Layout
6732 , but you do not need to copy and change this file.
6733 Instead, you can simply add your changes to your layout file, after the
6735 \begin_inset Flex Code
6738 \begin_layout Plain Layout
6744 , which itself includes
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6755 For example, you might add these lines:
6758 \begin_layout LyX-Code
6762 \begin_layout LyX-Code
6766 \begin_layout LyX-Code
6770 \begin_layout LyX-Code
6774 \begin_layout LyX-Code
6778 \begin_layout Standard
6779 to change the font for chapter headings to sans-serif.
6780 This will override (or, in this case, add to) the existing declaration
6781 for the Chapter style.
6785 \begin_layout Standard
6786 Your new package may also provide commands or environments not present in
6788 In this case, you will want to add these to the layout file.
6790 \begin_inset space ~
6794 \begin_inset CommandInset ref
6796 reference "sec:TextClass"
6800 for information on how to do so.
6803 \begin_layout Standard
6805 \begin_inset Flex MenuItem
6808 \begin_layout Plain Layout
6814 can be used with several different document classes, and even if it cannot,
6815 you might find it easiest just to write a module that you can load with
6817 The simplest possible such module would be:
6820 \begin_layout LyX-Code
6823 DeclareLyXModule{My Package}
6826 \begin_layout LyX-Code
6830 \begin_layout LyX-Code
6831 #Support for mypkg.sty.
6834 \begin_layout LyX-Code
6836 \begin_inset Newline newline
6842 \begin_layout LyX-Code
6844 \begin_inset Newline newline
6850 \begin_layout LyX-Code
6852 \begin_inset Newline newline
6858 \begin_inset Newline newline
6864 \begin_layout Standard
6865 A more complex module might modify the behavior of some existing constructs
6866 or define some new ones.
6868 \begin_inset space ~
6872 \begin_inset CommandInset ref
6874 reference "sec:TextClass"
6881 \begin_layout Subsection
6883 \begin_inset Flex MenuItem
6886 \begin_layout Plain Layout
6895 \begin_layout Standard
6896 There are two possibilities here.
6897 One is that the class file is itself based upon an existing document class.
6898 For example, many thesis classes are based upon
6899 \begin_inset Flex MenuItem
6902 \begin_layout Plain Layout
6909 To see whether yours is, look for a line like
6912 \begin_layout LyX-Code
6918 \begin_layout Standard
6920 If so, then you may proceed largely as in the previous section, though
6922 \begin_inset Flex Code
6925 \begin_layout Plain Layout
6931 line will be different.
6932 If your new class is
6933 \begin_inset Flex Code
6936 \begin_layout Plain Layout
6942 and it is based upon
6943 \begin_inset Flex Code
6946 \begin_layout Plain Layout
6952 , then the line should read:
6956 \begin_layout Plain Layout
6957 And it will be easiest if you save the file to
6958 \begin_inset Flex Code
6961 \begin_layout Plain Layout
6967 : LyX assumes that the document class has the same name as the layout file.
6976 \begin_layout LyX-Code
6979 DeclareLaTeXClass[thesis,book]{thesis}
6982 \begin_layout Standard
6983 If, on the other hand, the new class is not based upon an existing class,
6984 you will probably have to
6985 \begin_inset Quotes eld
6989 \begin_inset Quotes erd
6993 We strongly suggest copying an existing layout file which uses a similar
6994 LaTeX class and then modifying it, if you can do so.
6995 At least use an existing file as a starting point so you can find out what
6996 items you need to worry about.
6997 Again, the specifics are covered below.
7000 \begin_layout Subsection
7002 \begin_inset CommandInset label
7004 name "sub:Creating-Templates"
7011 \begin_layout Standard
7012 Once you have written a layout file for a new document class, you might
7013 want to consider writing a
7018 A template acts as a kind of tutorial for your layout, showing how it might
7019 be used, though containing dummy content.
7020 You can of course look at the various templates included with LyX for ideas.
7023 \begin_layout Standard
7024 Templates are created just like usual documents: using LyX.
7025 The only difference is that usual documents contain all possible settings,
7026 including the font scheme and the paper size.
7027 Usually a user doesn't want a template to overwrite his preferred settings
7028 for such parameters.
7029 For that reason, the designer of a template should remove the corresponding
7031 \begin_inset Flex Code
7034 \begin_layout Plain Layout
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7054 from the template LyX file.
7055 This can be done with any simple text-editor, for example
7056 \begin_inset Flex Code
7059 \begin_layout Plain Layout
7066 \begin_inset Flex Code
7069 \begin_layout Plain Layout
7078 \begin_layout Standard
7079 Put the edited template files you create in
7080 \begin_inset Flex Code
7083 \begin_layout Plain Layout
7089 , copy the ones you use from the global template directory in
7090 \begin_inset Flex Code
7093 \begin_layout Plain Layout
7099 to the same place, and redefine the template path in the
7100 \begin_inset Flex MenuItem
7103 \begin_layout Plain Layout
7104 Tools\SpecialChar \menuseparator
7105 Preferences\SpecialChar \menuseparator
7114 \begin_layout Standard
7115 Note, by the way, that there is a template which has a particular meaning:
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7127 This template is loaded every time you create a new document with
7128 \begin_inset Flex MenuItem
7131 \begin_layout Plain Layout
7132 File\SpecialChar \menuseparator
7138 in order to provide useful defaults.
7139 To create this template from inside LyX, all you have to do is to open
7140 a document with the correct settings, and use the
7141 \begin_inset Flex MenuItem
7144 \begin_layout Plain Layout
7145 Save as Document Defaults
7153 \begin_layout Subsection
7154 Upgrading old layout files
7157 \begin_layout Standard
7158 The format of layout files changes with each LyX release, so old layout
7159 files need to be converted to the new format.
7160 If LyX reads a layout file in an older format, it automatically calls the
7162 \begin_inset Flex Code
7165 \begin_layout Plain Layout
7171 to convert it to a temporary file in current format.
7172 The original file is left untouched.
7173 If you use the layout file often, then, you may want to convert it permanently,
7174 so that LyX does not have to do so itself every time.
7175 To do this, you can call the converter manually:
7178 \begin_layout Enumerate
7180 \begin_inset Flex Code
7183 \begin_layout Plain Layout
7190 \begin_inset Flex Code
7193 \begin_layout Plain Layout
7202 \begin_layout Enumerate
7204 \begin_inset Newline newline
7208 \begin_inset Flex Code
7211 \begin_layout Plain Layout
7212 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7218 \begin_inset Newline newline
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7231 is the name of your LyX system directory.
7234 \begin_layout Standard
7235 Note that manual conversion does not affect included files, so these will
7236 have to be converted separately.
7239 \begin_layout Section
7240 \begin_inset CommandInset label
7242 name "sec:TextClass"
7246 The layout file format
7249 \begin_layout Standard
7250 The following sections describe how layout files are structured and written.
7251 Our advice is to go slowly, save and test often.
7252 It is really not that hard, except that the multitude of options can become
7253 overwhelming, especially if you try to check out too many at once.
7254 It becomes easier if you use existing layouts of LyX as examples/reference
7255 or if you modify an existing layout to your needs.
7258 \begin_layout Standard
7259 Note that all the tags used in layout files are case-insensitive.
7261 \begin_inset Flex Code
7264 \begin_layout Plain Layout
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7281 \begin_inset Flex Code
7284 \begin_layout Plain Layout
7290 are really the same tag.
7291 The possible arguments are printed in brackets after the tag's name.
7292 The default argument is typeset
7293 \begin_inset Flex Code
7296 \begin_layout Plain Layout
7305 If the argument has a data type like
7306 \begin_inset Quotes eld
7310 \begin_inset Quotes erd
7314 \begin_inset Quotes eld
7318 \begin_inset Quotes erd
7321 , the default is shown like this:
7322 \begin_inset Flex Code
7325 \begin_layout Plain Layout
7336 \begin_layout Subsection
7337 The document class declaration
7338 \change_inserted -712698321 1349766602
7344 \begin_layout Standard
7345 Lines in a layout file which begin with
7346 \begin_inset Flex Code
7349 \begin_layout Plain Layout
7356 There is one exception to this rule.
7358 \begin_inset Flex Code
7361 \begin_layout Plain Layout
7367 files should begin with
7368 \change_deleted -712698321 1349766533
7372 \change_inserted -712698321 1349766536
7378 \begin_layout LyX-Code
7381 #% Do not delete the line below; configure depends on this
7384 \begin_layout LyX-Code
7390 \change_deleted -712698321 1349766193
7392 \change_inserted -712698321 1349766201
7393 Article (Standard Class)
7396 \change_inserted -712698321 1349766538
7400 \begin_layout LyX-Code
7402 \change_inserted -712698321 1349766581
7407 DeclareCategory{Articles}
7412 \begin_layout Standard
7414 \change_inserted -712698321 1349766695
7418 \change_inserted -712698321 1349766626
7422 \change_deleted -712698321 1349766628
7424 \change_inserted -712698321 1349766628
7427 used when you (re)configure LyX.
7428 The layout file is read by the LaTeX script
7429 \begin_inset Flex Code
7432 \begin_layout Plain Layout
7438 , in a special mode where
7439 \begin_inset Flex Code
7442 \begin_layout Plain Layout
7449 The first line is just a LaTeX comment,
7450 \change_deleted -712698321 1349766656
7453 the second one contains the
7454 \change_inserted -712698321 1349766650
7457 declaration of the text class
7458 \change_inserted -712698321 1349766689
7459 , and the third line contains the optional classification of the class
7462 If these lines appear in a file named
7463 \begin_inset Flex Code
7466 \begin_layout Plain Layout
7472 , then they define a text class of name
7473 \begin_inset Flex Code
7476 \begin_layout Plain Layout
7482 (the name of the layout file) which uses the LaTeX document class
7483 \begin_inset Flex Code
7486 \begin_layout Plain Layout
7492 (the default is to use the same name as the layout).
7494 \begin_inset Quotes eld
7498 \change_deleted -712698321 1349766253
7500 \change_inserted -712698321 1349766260
7501 Article (Standard Class)
7504 \begin_inset Quotes erd
7507 that appears above is used as a description of the text class in the
7508 \begin_inset Flex MenuItem
7511 \begin_layout Plain Layout
7512 Document\SpecialChar \menuseparator
7520 \change_inserted -712698321 1349767097
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7529 in the example) is also used in the
7530 \begin_inset Flex MenuItem
7533 \begin_layout Plain Layout
7535 \change_inserted -712698321 1349766801
7536 Document\SpecialChar \menuseparator
7542 dialog: the text classes are grouped by these categories (which are usually
7543 genres, so typical categories are
7544 \begin_inset Quotes eld
7548 \begin_inset Quotes erd
7552 \begin_inset Quotes eld
7556 \begin_inset Quotes erd
7560 \begin_inset Quotes eld
7564 \begin_inset Quotes erd
7568 \begin_inset Quotes eld
7572 \begin_inset Quotes erd
7576 \begin_inset Quotes eld
7580 \begin_inset Quotes erd
7584 \begin_inset Quotes eld
7588 \begin_inset Quotes erd
7592 If no category has been declared, the class will be put in the
7593 \begin_inset Quotes eld
7597 \begin_inset Quotes erd
7605 \begin_layout Standard
7606 Let's assume that you wrote your own text class that uses the
7607 \begin_inset Flex Code
7610 \begin_layout Plain Layout
7616 document class, but where you changed the appearance of the section headings.
7617 If you put it in a file
7618 \begin_inset Flex Code
7621 \begin_layout Plain Layout
7627 , the header of this file should be:
7630 \begin_layout LyX-Code
7633 #% Do not delete the line below; configure depends on this
7636 \begin_layout LyX-Code
7641 DeclareLaTeXClass[article]{
7642 \change_deleted -712698321 1349766303
7644 \change_inserted -712698321 1349766303
7648 \change_deleted -712698321 1349766338
7650 \change_inserted -712698321 1349766338
7654 \change_deleted -712698321 1349766340
7656 \change_inserted -712698321 1349766340
7660 \change_deleted -712698321 1349766343
7662 \change_inserted -712698321 1349766343
7666 \change_inserted -712698321 1349767223
7670 \begin_layout LyX-Code
7672 \change_inserted -712698321 1349767223
7677 DeclareCategory{Articles}
7682 \begin_layout Standard
7683 This declares a text class
7684 \begin_inset Flex Code
7687 \begin_layout Plain Layout
7693 , associated with the LaTeX document class
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7704 \begin_inset Quotes eld
7708 \change_deleted -712698321 1349766329
7710 \change_inserted -712698321 1349766329
7714 \change_deleted -712698321 1349766347
7716 \change_inserted -712698321 1349766347
7720 \change_deleted -712698321 1349766350
7722 \change_inserted -712698321 1349766350
7726 \change_deleted -712698321 1349766352
7728 \change_inserted -712698321 1349766352
7732 \begin_inset Quotes erd
7736 If your text class depends on several packages, you can declare it as:
7739 \begin_layout LyX-Code
7742 #% Do not delete the line below; configure depends on this
7745 \begin_layout LyX-Code
7750 DeclareLaTeXClass[article,foo.sty]{
7751 \change_deleted -712698321 1349766366
7753 \change_inserted -712698321 1349766366
7757 \change_deleted -712698321 1349766369
7759 \change_inserted -712698321 1349766369
7763 \change_deleted -712698321 1349766371
7765 \change_inserted -712698321 1349766371
7769 \change_deleted -712698321 1349766374
7771 \change_inserted -712698321 1349766374
7775 \change_inserted -712698321 1349767240
7779 \begin_layout LyX-Code
7781 \change_inserted -712698321 1349767240
7786 DeclareCategory{Articles}
7791 \begin_layout Standard
7792 This indicates that your text class uses the
7793 \begin_inset Flex Code
7796 \begin_layout Plain Layout
7803 Finally, it is also possible to declare classes for DocBook code.
7804 Typical declarations will look like:
7807 \begin_layout LyX-Code
7810 #% Do not delete the line below; configure depends on this
7813 \begin_layout LyX-Code
7818 DeclareDocBookClass[article]{SGML (DocBook
7819 \change_deleted -712698321 1349766387
7821 \change_inserted -712698321 1349766387
7825 \change_inserted -712698321 1349767247
7829 \begin_layout LyX-Code
7831 \change_inserted -712698321 1349767302
7836 DeclareCategory{Articles (DocBook)}
7841 \begin_layout Standard
7842 Note that these declarations can also be given an optional parameter declaring
7843 the name of the document class (but not a list).
7846 \begin_layout Standard
7847 So, to be as explicit as possible, the form of the layout declaration is:
7850 \begin_layout LyX-Code
7855 DeclareLaTeXClass[class,package.sty]{layout description}
7856 \change_inserted -712698321 1349767329
7860 \begin_layout LyX-Code
7862 \change_inserted -712698321 1349767339
7867 DeclareCategory{category}
7872 \begin_layout Standard
7873 The class need only be specified if the name of the LaTeX class file and
7874 the name of the layout file are different or if there are packages to load.
7875 If the name of the class file is not specified, then LyX will simply assume
7876 that it is the same as the name of the layout file.
7879 \begin_layout Standard
7880 When the text class has been modified to your taste, all you have to do
7881 is to copy it either to
7882 \begin_inset Flex Code
7885 \begin_layout Plain Layout
7892 \begin_inset Flex Code
7895 \begin_layout Plain Layout
7902 \begin_inset Flex MenuItem
7905 \begin_layout Plain Layout
7906 Tools\SpecialChar \menuseparator
7912 , exit LyX and restart.
7913 Then your new text class should be available along with the others.
7916 \begin_layout Standard
7917 Once the layout file is installed, you can edit it and see your changes
7918 without having to reconfigure or to restart LyX.
7923 \begin_layout Plain Layout
7924 In versions of LyX prior to 1.6, this was not true.
7925 As a result, editing layout files was very time consuming, since you had
7926 constantly to restart LyX to see changes.
7931 You can force a reload of the current layout by using the LyX function
7933 \begin_inset Flex MenuItem
7936 \begin_layout Plain Layout
7943 There is no default binding for this function—though, of course, you can
7944 bind it to a key yourself.
7945 But you will normally use this function simply by entering it in the mini-buffe
7950 \begin_layout Standard
7956 \begin_inset Flex MenuItem
7959 \begin_layout Plain Layout
7965 is very much an `advanced feature'.
7970 recommended that you save your work before using this function.
7975 recommended that you not attempt to edit layout information while simultaneousl
7976 y working on a document that you care about.
7977 Use a test document.
7978 Syntax errors and the like in your layout file could cause peculiar behavior.
7979 In particular, such errors could cause LyX to regard the current layout
7980 as invalid and to attempt to switch to some other layout.
7984 \begin_layout Plain Layout
7985 Really bad syntax errors may even caused LyX to exit.
7986 This is because certain sorts of errors may make LyX unable to read
7996 The LyX team strives to keep LyX stable in such situations, but safe is
8001 \begin_layout Plain Layout
8002 While we're giving advice: make regular backups.
8003 And be nice to your mother.
8011 \begin_layout Subsection
8012 The Module declaration
8015 \begin_layout Standard
8016 A module must begin with a line like the following:
8019 \begin_layout LyX-Code
8022 DeclareLyXModule[endnotes.sty]{Endnotes}
8025 \begin_layout Standard
8026 The mandatory argument, in curly brackets, is the name of the module, as
8028 \begin_inset Flex MenuItem
8031 \begin_layout Plain Layout
8032 Document\SpecialChar \menuseparator
8033 Settings\SpecialChar \menuseparator
8040 The argument in square brackets is optional: It declares any LaTeX packages
8041 on which the module depends.
8042 It is also possible to use the form
8043 \begin_inset Flex MenuItem
8046 \begin_layout Plain Layout
8052 as an optional argument, which declares that the module can only be used
8053 when there exists a conversion chain between the formats `
8054 \begin_inset Flex Code
8057 \begin_layout Plain Layout
8064 \begin_inset Flex Code
8067 \begin_layout Plain Layout
8076 \begin_layout Standard
8077 The module declaration should then be followed by lines like the following
8081 \begin_layout Plain Layout
8082 Preferably in English if the module should be published with LyX.
8083 This description will appear in the list of messages to be translated and
8084 will be thus translated with the next interface update.
8092 \begin_layout LyX-Code
8096 \begin_layout LyX-Code
8097 #Adds an endnote command, in addition to footnotes.
8101 \begin_layout LyX-Code
8102 #You will need to add
8104 theendnotes in TeX code where you
8107 \begin_layout LyX-Code
8108 #want the endnotes to appear.
8112 \begin_layout LyX-Code
8116 \begin_layout LyX-Code
8117 #Requires: somemodule | othermodule
8120 \begin_layout LyX-Code
8121 #Excludes: badmodule
8124 \begin_layout Standard
8125 The description is used in
8126 \begin_inset Flex MenuItem
8129 \begin_layout Plain Layout
8130 Document\SpecialChar \menuseparator
8131 Settings\SpecialChar \menuseparator
8137 to provide the user with information about what the module does.
8139 \begin_inset Flex Code
8142 \begin_layout Plain Layout
8148 line is used to identify other modules with which this one must be used;
8150 \begin_inset Flex Code
8153 \begin_layout Plain Layout
8159 line is used to identify modules with which this one may not be used.
8160 Both are optional, and, as shown, multiple modules should be separated
8161 with the pipe symbol: |.
8162 Note that the required modules are treated disjunctively:
8166 of the required modules must be used.
8171 excluded module may be used.
8172 Note that modules are identified here by their filenames without the
8173 \begin_inset Flex Code
8176 \begin_layout Plain Layout
8184 \begin_inset Flex Code
8187 \begin_layout Plain Layout
8194 \begin_inset Flex Code
8197 \begin_layout Plain Layout
8206 \begin_layout Subsection
8210 \begin_layout Standard
8211 The first non-comment line of any layout file, included file, or module
8216 contain the file format number:
8219 \begin_layout Description
8220 \begin_inset Flex Code
8223 \begin_layout Plain Layout
8230 \begin_inset Flex Code
8233 \begin_layout Plain Layout
8239 ] The format number of the layout file.
8242 \begin_layout Standard
8243 This tag was introduced with LyX
8244 \begin_inset space ~
8248 Layout files from older LyX versions do not have an explicit file format
8249 and are considered to have
8250 \begin_inset Flex Code
8253 \begin_layout Plain Layout
8255 \begin_inset space ~
8264 The format for the present version of LyX is format 35.
8265 But each version of LyX is capable of reading earlier versions' layout
8266 files, just as they are capable of reading files produced by earlier versions
8268 There is, however, no provision for converting to earlier formats.
8271 \begin_layout Subsection
8272 \begin_inset CommandInset label
8274 name "sub:General-text-class"
8278 General text class parameters
8281 \begin_layout Standard
8282 These are general parameters that govern the behavior of an entire document
8288 mean that they must appear in
8289 \begin_inset Flex Code
8292 \begin_layout Plain Layout
8298 files rather than in modules.
8299 A module can contain any layout tag.)
8302 \begin_layout Description
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8312 Adds information that will be output in the
8313 \begin_inset Flex Code
8316 \begin_layout Plain Layout
8322 block when the document is output to XHTML.
8323 Typically, this would be used to output CSS style information, but it can
8324 be used for anything that can appear in
8325 \begin_inset Flex Code
8328 \begin_layout Plain Layout
8336 \begin_inset Quotes eld
8340 \begin_inset Flex Code
8343 \begin_layout Plain Layout
8350 \begin_inset Quotes erd
8356 \begin_layout Description
8357 \begin_inset Flex Code
8360 \begin_layout Plain Layout
8366 Adds information to the document preamble.
8368 \begin_inset Newline newline
8372 \begin_inset Quotes eld
8376 \begin_inset Flex Code
8379 \begin_layout Plain Layout
8386 \begin_inset Quotes erd
8392 \begin_layout Description
8393 \begin_inset Flex Code
8396 \begin_layout Plain Layout
8402 Defines formats for use in the display of bibliographic information.
8404 \begin_inset CommandInset ref
8406 reference "sub:Citation-format-description"
8412 \begin_inset Quotes eld
8416 \begin_inset Flex Code
8419 \begin_layout Plain Layout
8426 \begin_inset Quotes erd
8432 \begin_layout Description
8433 \begin_inset Flex Code
8436 \begin_layout Plain Layout
8442 Describes various global options supported by the document class.
8444 \begin_inset space ~
8448 \begin_inset CommandInset ref
8450 reference "sub:ClassOptions"
8456 \begin_inset Quotes eld
8460 \begin_inset Flex Code
8463 \begin_layout Plain Layout
8470 \begin_inset Quotes erd
8476 \begin_layout Description
8477 \begin_inset Flex Code
8480 \begin_layout Plain Layout
8487 \begin_inset Flex Code
8490 \begin_layout Plain Layout
8499 \begin_inset space \thinspace{}
8503 \begin_inset Flex Code
8506 \begin_layout Plain Layout
8512 ] Whether the class should
8516 to having one or two columns.
8517 Can be changed in the
8518 \begin_inset Flex MenuItem
8521 \begin_layout Plain Layout
8522 Document\SpecialChar \menuseparator
8531 \begin_layout Description
8532 \begin_inset Flex Code
8535 \begin_layout Plain Layout
8542 \begin_inset Flex Code
8545 \begin_layout Plain Layout
8551 ] This sequence defines the properties for a counter.
8552 If the counter does not yet exist, it is created; if it does exist, it
8555 \begin_inset Quotes eld
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8569 \begin_inset Quotes erd
8573 \begin_inset Newline newline
8577 \begin_inset space ~
8581 \begin_inset CommandInset ref
8583 reference "sub:Counters"
8587 for details on counters.
8590 \begin_layout Description
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8600 Sets the default font used to display the document.
8602 \begin_inset space ~
8606 \begin_inset CommandInset ref
8608 reference "sub:Font-description"
8612 for how to declare fonts.
8614 \begin_inset Quotes eld
8618 \begin_inset Flex Code
8621 \begin_layout Plain Layout
8628 \begin_inset Quotes erd
8634 \begin_layout Description
8635 \begin_inset Flex Code
8638 \begin_layout Plain Layout
8645 \begin_inset Flex Code
8648 \begin_layout Plain Layout
8654 ] Specifies a module to be included by default with this document class.
8655 The module is specified as filename without the
8656 \begin_inset Flex Code
8659 \begin_layout Plain Layout
8666 The user can still remove the module, but it will be active at the outset.
8667 (This applies only when new files are created, or when this class is chosen
8668 for an existing document.)
8671 \begin_layout Description
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8682 \begin_inset Flex Code
8685 \begin_layout Plain Layout
8691 ] This is the style that will be assigned to new paragraphs, usually
8692 \begin_inset Flex MenuItem
8695 \begin_layout Plain Layout
8702 This will default to the first defined style if not given, but you are
8703 encouraged to use this directive.
8706 \begin_layout Description
8707 \begin_inset Flex Code
8710 \begin_layout Plain Layout
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8726 ] This tag indicates that the module (which is specified by filename without
8728 \begin_inset Flex Code
8731 \begin_layout Plain Layout
8737 extension) cannot be used with this document class.
8738 This might be used in a journal-specific layout file to prevent, say, the
8740 \begin_inset Flex Code
8743 \begin_layout Plain Layout
8749 module that numbers theorems by section.
8754 be used in a module.
8755 Modules have their own way of excluding other modules (see section
8756 \begin_inset space ~
8760 \begin_inset CommandInset ref
8762 reference "sub:Layout-modules"
8769 \begin_layout Description
8770 \begin_inset Flex Code
8773 \begin_layout Plain Layout
8779 Defines a new float.
8781 \begin_inset space ~
8785 \begin_inset CommandInset ref
8787 reference "sub:Floats"
8793 \begin_inset Quotes eld
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Quotes erd
8813 \begin_layout Description
8814 \begin_inset Flex Code
8817 \begin_layout Plain Layout
8823 Sets the information that will be output in the
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8833 block when this document class is output to XHTML.
8834 Note that this will completely override any prior
8835 \begin_inset Flex Code
8838 \begin_layout Plain Layout
8845 \begin_inset Flex Code
8848 \begin_layout Plain Layout
8856 \begin_inset Newline newline
8860 \begin_inset Flex Code
8863 \begin_layout Plain Layout
8869 if you just want to add material to the preamble.) Must end with
8870 \begin_inset Quotes eld
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8884 \begin_inset Quotes erd
8890 \begin_layout Description
8891 \begin_inset Flex Code
8894 \begin_layout Plain Layout
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8910 ] The style to use for the table of contents, bibliography, and so forth,
8911 when the document is output to HTML.
8912 For articles, this should normally be
8913 \begin_inset Flex Code
8916 \begin_layout Plain Layout
8923 \begin_inset Flex Code
8926 \begin_layout Plain Layout
8933 If it is not given, then LyX will attempt to figure out which layout to
8937 \begin_layout Description
8938 \begin_inset Flex Code
8941 \begin_layout Plain Layout
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 ] Modifies the properties of the given counter.
8958 If the counter does not exist, the statement is ignored.
8960 \begin_inset Quotes eld
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8974 \begin_inset Quotes erd
8978 \begin_inset Newline newline
8982 \begin_inset space ~
8986 \begin_inset CommandInset ref
8988 reference "sub:Counters"
8992 for details on counters.
8995 \begin_layout Description
8996 \begin_inset Flex Code
8999 \begin_layout Plain Layout
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 ] Modifies the properties of the given paragraph style.
9016 If the style does not exist, the statement is ignored.
9018 \begin_inset Quotes eld
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Quotes erd
9038 \begin_layout Description
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9058 ] This allows you to include another layout definition file within yours
9059 to avoid duplicating commands.
9060 Common examples are the standard layout files, for example,
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9070 , which contains most of the basic layouts.
9073 \begin_layout Description
9074 \begin_inset Flex Code
9077 \begin_layout Plain Layout
9084 \begin_inset Flex Code
9087 \begin_layout Plain Layout
9093 ] This section (re-)defines the layout of an inset.
9094 It can be applied to an existing inset or to a new, user-defined inset,
9095 e.g., a new character style.
9097 \begin_inset Quotes eld
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9111 \begin_inset Quotes erd
9115 \begin_inset Newline newline
9119 \begin_inset space ~
9123 \begin_inset CommandInset ref
9125 reference "sub:Flex-insets-and"
9129 for more information.
9133 \begin_layout Description
9134 \begin_inset Flex Code
9137 \begin_layout Plain Layout
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9153 ] A string that indicates the width of the left margin on the screen, for
9155 \begin_inset Quotes eld
9159 \begin_inset Flex Code
9162 \begin_layout Plain Layout
9169 \begin_inset Quotes erd
9173 (Note that this is not a `length', like
9174 \begin_inset Quotes eld
9178 \begin_inset Quotes erd
9184 \begin_layout Description
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9204 ] Deletes an existing counter, usually one defined in an included file.
9207 \begin_layout Description
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9227 ] Deletes an existing float.
9228 This is particularly useful when you want to suppress a float that has
9229 been defined in an input file.
9232 \begin_layout Description
9233 \begin_inset Flex Code
9236 \begin_layout Plain Layout
9243 \begin_inset Flex Code
9246 \begin_layout Plain Layout
9252 ] Deletes an existing style.
9255 \begin_layout Description
9256 \begin_inset Flex Code
9259 \begin_layout Plain Layout
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9275 ] The file format (as defined in the LyX preferences) produced by this document
9277 It is mainly useful when
9278 \begin_inset Flex Code
9281 \begin_layout Plain Layout
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9297 and one wants to define a new type of literate document.
9298 The format is reset to
9299 \begin_inset Quotes eld
9303 \begin_inset Flex Code
9306 \begin_layout Plain Layout
9313 \begin_inset Quotes erd
9317 \begin_inset Quotes eld
9321 \begin_inset Flex Code
9324 \begin_layout Plain Layout
9331 \begin_inset Quotes erd
9334 when the corresponding
9335 \begin_inset Flex Code
9338 \begin_layout Plain Layout
9344 parameter is encountered.
9347 \begin_layout Description
9348 \begin_inset Flex Code
9351 \begin_layout Plain Layout
9358 \begin_inset Flex Code
9361 \begin_layout Plain Layout
9372 \begin_inset Flex Code
9375 \begin_layout Plain Layout
9382 \begin_inset Flex Code
9385 \begin_layout Plain Layout
9391 ] Specifies what sort of output documents using this class will produce.
9394 \begin_layout Description
9395 \begin_inset Flex Code
9398 \begin_layout Plain Layout
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9417 \begin_inset Flex Code
9420 \begin_layout Plain Layout
9427 \begin_inset Flex Code
9430 \begin_layout Plain Layout
9436 ] The default pagestyle.
9437 Can be changed in the
9438 \begin_inset Flex MenuItem
9441 \begin_layout Plain Layout
9442 Document\SpecialChar \menuseparator
9451 \begin_layout Description
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9461 Sets the preamble for the LaTeX document.
9462 Note that this will completely override any prior
9463 \begin_inset Flex Code
9466 \begin_layout Plain Layout
9473 \begin_inset Flex Code
9476 \begin_layout Plain Layout
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9493 if you just want to add material to the preamble.) Must end with
9494 \begin_inset Quotes eld
9498 \begin_inset Flex Code
9501 \begin_layout Plain Layout
9508 \begin_inset Quotes erd
9514 \begin_layout Description
9515 \begin_inset Flex Code
9518 \begin_layout Plain Layout
9525 \begin_inset Flex Code
9528 \begin_layout Plain Layout
9535 \begin_inset Flex Code
9538 \begin_layout Plain Layout
9547 \begin_inset space \thinspace{}
9551 \begin_inset Flex Code
9554 \begin_layout Plain Layout
9560 ] Whether the class already provides the feature
9561 \begin_inset Flex Code
9564 \begin_layout Plain Layout
9571 A feature is in general the name of a package (e.
9572 \begin_inset space \thinspace{}
9576 \begin_inset space \space{}
9580 \begin_inset Flex Code
9583 \begin_layout Plain Layout
9590 \begin_inset Flex Code
9593 \begin_layout Plain Layout
9600 \begin_inset space \thinspace{}
9604 \begin_inset space \space{}
9608 \begin_inset Flex Code
9611 \begin_layout Plain Layout
9618 \begin_inset Flex Code
9621 \begin_layout Plain Layout
9629 \begin_inset space ~
9633 \begin_inset CommandInset ref
9635 reference "chap:List-of-functions"
9639 for the list of features.
9642 \begin_layout Description
9643 \begin_inset Flex Code
9646 \begin_layout Plain Layout
9653 \begin_inset Flex Code
9656 \begin_layout Plain Layout
9662 ] Indicates that this layout provides the functionality of the module mentioned,
9663 which should be specified by the filename without the
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9674 This will typically be used if the layout includes the module directly,
9675 rather than using the
9676 \begin_inset Flex Code
9679 \begin_layout Plain Layout
9685 tag to indicate that it ought to be used.
9686 It could also be used in a module that provided an alternate implementation
9687 of the same functionality.
9690 \begin_layout Description
9691 \begin_inset Flex Code
9694 \begin_layout Plain Layout
9701 \begin_inset Flex Code
9704 \begin_layout Plain Layout
9710 ] Whether the class requires the feature
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9721 Multiple features must be separated by commas.
9722 Note that you can only request supported features.
9724 \begin_inset space ~
9728 \begin_inset CommandInset ref
9730 reference "chap:List-of-functions"
9734 for the list of features.)
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 ] A string that indicates the width of the right margin on the screen, for
9759 \begin_inset Quotes eld
9763 \begin_inset Flex Code
9766 \begin_layout Plain Layout
9773 \begin_inset Quotes erd
9779 \begin_layout Description
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9799 ] Sets which divisions get numbered.
9801 \begin_inset Newline newline
9805 \begin_inset Flex Code
9808 \begin_layout Plain Layout
9817 \begin_layout Description
9818 \begin_inset Flex Code
9821 \begin_layout Plain Layout
9828 \begin_inset Flex Code
9831 \begin_layout Plain Layout
9840 \begin_inset space \thinspace{}
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9853 ] Whether the class-default should be printing on one or both sides of the
9855 Can be changed in the
9856 \begin_inset Flex MenuItem
9859 \begin_layout Plain Layout
9860 Document\SpecialChar \menuseparator
9869 \begin_layout Description
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9889 ] This sequence defines a paragraph style.
9890 If the style does not yet exist, it is created; if it does exist, its parameter
9893 \begin_inset Quotes eld
9897 \begin_inset Flex Code
9900 \begin_layout Plain Layout
9907 \begin_inset Quotes erd
9911 \begin_inset Newline newline
9915 \begin_inset space ~
9919 \begin_inset CommandInset ref
9921 reference "sub:Paragraph-Styles"
9925 for details on paragraph styles.
9928 \begin_layout Description
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9948 ] The name of the command or environment to be used with
9949 \begin_inset Flex Code
9952 \begin_layout Plain Layout
9961 \begin_layout Description
9962 \begin_inset Flex Code
9965 \begin_layout Plain Layout
9972 \begin_inset Flex Code
9975 \begin_layout Plain Layout
9984 \begin_inset Flex Code
9987 \begin_layout Plain Layout
9993 ] Indicates what kind of markup is used to define the title of a document.
9995 \begin_inset Flex Code
9998 \begin_layout Plain Layout
10004 means that the macro with name
10005 \begin_inset Flex Code
10008 \begin_layout Plain Layout
10014 will be inserted after the last layout which has
10015 \begin_inset Quotes eld
10019 \begin_inset Flex Code
10022 \begin_layout Plain Layout
10024 \begin_inset space ~
10033 \begin_inset Quotes erd
10038 \begin_inset Flex Code
10041 \begin_layout Plain Layout
10047 corresponds to the case where all layouts which have
10048 \begin_inset Quotes eld
10052 \begin_inset Flex Code
10055 \begin_layout Plain Layout
10057 \begin_inset space ~
10066 \begin_inset Quotes erd
10069 should be enclosed into the
10070 \begin_inset Flex Code
10073 \begin_layout Plain Layout
10082 \begin_layout Description
10083 \begin_inset Flex Code
10086 \begin_layout Plain Layout
10093 \begin_inset Flex Code
10096 \begin_layout Plain Layout
10102 ] Sets which divisions are included in the table of contents.
10104 \begin_inset Flex Code
10107 \begin_layout Plain Layout
10116 \begin_layout Subsection
10117 \begin_inset Flex Code
10120 \begin_layout Plain Layout
10127 \begin_inset CommandInset label
10129 name "sub:ClassOptions"
10136 \begin_layout Standard
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10147 section can contain the following entries:
10150 \begin_layout Description
10151 \begin_inset Flex Code
10154 \begin_layout Plain Layout
10161 \begin_inset Flex Code
10164 \begin_layout Plain Layout
10170 ] The list of available font sizes for the document's main font, separated
10172 \begin_inset Quotes eld
10176 \begin_inset Flex Code
10179 \begin_layout Plain Layout
10186 \begin_inset Quotes erd
10192 \begin_layout Description
10193 \begin_inset Flex Code
10196 \begin_layout Plain Layout
10202 Used to set the DTD line with XML-based output classes.
10204 \begin_inset space \thinspace{}
10208 \begin_inset Quotes eld
10211 -//OASIS//DTD DocBook V4.2//EN
10212 \begin_inset Quotes erd
10218 \begin_layout Description
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10229 \begin_inset Flex Code
10232 \begin_layout Plain Layout
10233 string="empty|plain|headings|fancy"
10238 ] The list of available page sty\SpecialChar \-
10240 \begin_inset Quotes eld
10244 \begin_inset Flex Code
10247 \begin_layout Plain Layout
10254 \begin_inset Quotes erd
10260 \begin_layout Description
10261 \begin_inset Flex Code
10264 \begin_layout Plain Layout
10271 \begin_inset Flex Code
10274 \begin_layout Plain Layout
10280 ] Some document class options, separated by a comma, that will be added
10281 to the optional part of the
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10296 \begin_layout Standard
10298 \begin_inset Flex Code
10301 \begin_layout Plain Layout
10307 section must end with
10308 \begin_inset Quotes eld
10312 \begin_inset Flex Code
10315 \begin_layout Plain Layout
10322 \begin_inset Quotes erd
10328 \begin_layout Subsection
10330 \begin_inset CommandInset label
10332 name "sub:Paragraph-Styles"
10339 \begin_layout Standard
10340 A paragraph style description looks like this:
10344 \begin_layout Plain Layout
10345 Note that this will either define a new style or modify an existing one.
10353 \begin_layout LyX-Code
10360 \begin_layout LyX-Code
10364 \begin_layout LyX-Code
10368 \begin_layout Standard
10369 where the following commands are allowed:
10372 \begin_layout Description
10373 \begin_inset Flex Code
10376 \begin_layout Plain Layout
10383 \begin_inset Flex Code
10386 \begin_layout Plain Layout
10391 , left, right, center
10396 ] Paragraph alignment.
10399 \begin_layout Description
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10418 , left, right, center
10423 ] A comma separated list of permitted alignments.
10424 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10426 For example a right-aligned or centered enumeration isn't possible.)
10427 \change_inserted -712698321 1353679769
10431 \begin_layout Description
10433 \change_inserted -712698321 1353680268
10434 \begin_inset Flex Code
10437 \begin_layout Plain Layout
10439 \change_inserted -712698321 1353679781
10446 \begin_inset Flex Code
10449 \begin_layout Plain Layout
10451 \change_inserted -712698321 1353679772
10457 ] Defines argument number <int> of a command\SpecialChar \slash{}
10458 environment associated with
10460 This is useful for things like section headings, and only makes sense with
10462 Every (optional or required) argument of a command or environment -- except
10463 for the required argument that is associated with the content of the paragraph
10464 itself -- has a separate definition, where the number specifies the order
10466 The definition must end with
10467 \begin_inset Flex Code
10470 \begin_layout Plain Layout
10472 \change_inserted -712698321 1353680069
10479 So a command with two optional arguments has:
10483 \begin_layout Quote
10485 \change_inserted -712698321 1353680127
10491 \begin_layout Quote
10493 \change_inserted -712698321 1353680195
10499 \begin_layout Quote
10501 \change_inserted -712698321 1353680135
10507 \begin_layout Quote
10509 \change_inserted -712698321 1353680140
10515 \begin_layout Quote
10517 \change_inserted -712698321 1353680197
10523 \begin_layout Quote
10525 \change_inserted -712698321 1353680147
10531 \begin_layout Standard
10533 \change_inserted -712698321 1353680528
10535 \begin_inset Flex Code
10538 \begin_layout Plain Layout
10540 \change_inserted -712698321 1353680412
10546 definition, the following specifications are possible:
10549 \begin_layout Itemize
10551 \change_inserted -712698321 1355076779
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10557 \change_inserted -712698321 1353680543
10566 \begin_inset Flex Code
10569 \begin_layout Plain Layout
10571 \change_inserted -712698321 1353680567
10577 The string that will appear both in the menu (to insert this argument)
10578 and on the argument inset button (unless you also specify a separate
10579 \begin_inset Flex Code
10582 \begin_layout Plain Layout
10584 \change_inserted -712698321 1355076779
10591 For the menu, you can define an accelerator by appending the respective
10592 character to the string, divided by
10593 \begin_inset Quotes eld
10597 \begin_inset Quotes erd
10601 \begin_inset space \thinspace{}
10606 \begin_inset Flex Code
10609 \begin_layout Plain Layout
10611 \change_inserted -712698321 1353691482
10612 \begin_inset Quotes eld
10616 \begin_inset Quotes erd
10629 \begin_layout Itemize
10631 \change_inserted -712698321 1355076754
10632 \begin_inset Flex Code
10635 \begin_layout Plain Layout
10637 \change_inserted -712698321 1355076658
10644 \begin_inset Flex Code
10647 \begin_layout Plain Layout
10649 \change_inserted -712698321 1355076654
10655 A separate string for the menu.
10656 You can define an accelerator by appending the respective character to
10657 the string, divided by
10658 \begin_inset Quotes eld
10662 \begin_inset Quotes erd
10666 \begin_inset space \thinspace{}
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10676 \change_inserted -712698321 1355076654
10677 \begin_inset Quotes eld
10681 \begin_inset Quotes erd
10690 This specification is optional.
10691 If it is not given the
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10697 \change_inserted -712698321 1355076736
10705 will be used instead for the menu.
10708 \begin_layout Itemize
10710 \change_inserted -712698321 1353680665
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10716 \change_inserted -712698321 1353680616
10723 \begin_inset Flex Code
10726 \begin_layout Plain Layout
10728 \change_inserted -712698321 1353680623
10734 A longer explanatory text that appears in the tooltip when hovering over
10735 the argument inset.
10738 \begin_layout Itemize
10740 \change_inserted -712698321 1353680874
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10746 \change_inserted -712698321 1353680732
10753 \begin_inset Flex Code
10756 \begin_layout Plain Layout
10758 \change_inserted -712698321 1353680738
10764 Declare if this is a mandatory
10765 \change_inserted 2090807402 1353765594
10767 \change_inserted -712698321 1353680874
10769 \change_inserted 2090807402 1353765599
10771 \change_inserted -712698321 1353680874
10773 Mandatory arguments will be output empty if not given, while optional arguments
10774 will not be output at all.
10775 By default, mandatory arguments are delimited by
10776 \begin_inset Flex Code
10779 \begin_layout Plain Layout
10781 \change_inserted -712698321 1353680808
10789 , while optional arguments are delimited by
10790 \begin_inset Flex Code
10793 \begin_layout Plain Layout
10795 \change_inserted -712698321 1353680833
10804 \begin_layout Itemize
10806 \change_inserted -712698321 1353917199
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10812 \change_inserted -712698321 1353680879
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10824 \change_inserted -712698321 1353680874
10830 defines another argument (by its number) which this argument requires to
10831 be output if it is itself output.
10833 \begin_inset space \thinspace{}
10836 g., in LaTeX commands, optional arguments often require previous optional
10837 arguments to be output (at least empty), as in
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10843 \change_inserted -712698321 1353688183
10846 command[][arg]{text}
10854 This can be achieved by the statement
10855 \begin_inset Flex Code
10858 \begin_layout Plain Layout
10860 \change_inserted -712698321 1353681031
10869 \begin_inset Flex Code
10872 \begin_layout Plain Layout
10874 \change_inserted -712698321 1353681045
10885 \begin_layout Itemize
10887 \change_inserted -712698321 1354263104
10888 \begin_inset Flex Code
10891 \begin_layout Plain Layout
10893 \change_inserted -712698321 1353681072
10902 \begin_inset Flex Code
10905 \begin_layout Plain Layout
10907 \change_inserted -712698321 1353681067
10913 defines a custom left delimiter (instead of
10914 \begin_inset Flex Code
10917 \begin_layout Plain Layout
10919 \change_inserted -712698321 1353681127
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10933 \change_inserted -712698321 1353681133
10942 A line break in the output can be indicated by
10943 \begin_inset Flex Code
10946 \begin_layout Plain Layout
10948 \change_inserted -712698321 1354263104
10959 \begin_layout Itemize
10961 \change_inserted -712698321 1355144479
10962 \begin_inset Flex Code
10965 \begin_layout Plain Layout
10967 \change_inserted -712698321 1353681149
10974 \begin_inset Flex Code
10977 \begin_layout Plain Layout
10979 \change_inserted -712698321 1353681146
10985 defines a custom right delimiter (instead of
10986 \begin_inset Flex Code
10989 \begin_layout Plain Layout
10991 \change_inserted -712698321 1353681158
10998 \begin_inset Flex Code
11001 \begin_layout Plain Layout
11003 \change_inserted -712698321 1353681161
11010 A line break in the output can be indicated by
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11016 \change_inserted -712698321 1354263106
11025 \begin_layout Itemize
11027 \change_inserted -712698321 1361701444
11028 \begin_inset Flex Code
11031 \begin_layout Plain Layout
11033 \change_inserted -712698321 1361701356
11040 \begin_inset Flex Code
11043 \begin_layout Plain Layout
11045 \change_inserted -712698321 1361701356
11051 defines an argument that is inserted if and only if no user-specified arguments
11053 \begin_inset space \thinspace{}
11057 if no argument inset has been inserted (note that also an empty argument
11058 inset omits the DefaultArg).
11059 Multiple arguments need to be separated by comma.
11062 \begin_layout Itemize
11064 \change_inserted -712698321 1361701337
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11070 \change_inserted -712698321 1355144487
11079 \begin_inset Flex Code
11082 \begin_layout Plain Layout
11084 \change_inserted -712698321 1355144500
11090 defines an argument that is inserted in any case (alone or in addition
11091 to user-specified arguments).
11092 Multiple arguments need to be separated by comma.
11095 \begin_layout Itemize
11097 \change_inserted -712698321 1353917320
11098 \begin_inset Flex Code
11101 \begin_layout Plain Layout
11103 \change_inserted -712698321 1353917320
11109 The font used for the argument content.
11111 \begin_inset space ~
11115 \begin_inset CommandInset ref
11117 reference "sub:Font-description"
11124 \begin_layout Itemize
11126 \change_inserted -712698321 1353917320
11127 \begin_inset Flex Code
11130 \begin_layout Plain Layout
11132 \change_inserted -712698321 1353917320
11138 The font used for the label.
11140 \begin_inset space ~
11144 \begin_inset CommandInset ref
11146 reference "sub:Font-description"
11153 \begin_layout Itemize
11155 \change_inserted -712698321 1355661048
11156 \begin_inset Flex Code
11159 \begin_layout Plain Layout
11161 \change_inserted -712698321 1353917320
11168 \begin_inset Flex Code
11171 \begin_layout Plain Layout
11173 \change_inserted -712698321 1353917320
11180 \begin_inset Flex Code
11183 \begin_layout Plain Layout
11185 \change_inserted -712698321 1353917320
11192 \begin_inset Flex Code
11195 \begin_layout Plain Layout
11197 \change_inserted -712698321 1353917320
11203 , describing the rendering style used for the inset's frame and buttons.
11205 \begin_inset Flex Code
11208 \begin_layout Plain Layout
11210 \change_inserted -712698321 1353917320
11219 \begin_layout Itemize
11221 \change_inserted -712698321 1355747298
11222 \begin_inset Flex Code
11225 \begin_layout Plain Layout
11227 \change_inserted -712698321 1355661057
11234 \begin_inset Flex Code
11237 \begin_layout Plain Layout
11239 \change_inserted -712698321 1355661049
11246 \begin_inset Flex Code
11249 \begin_layout Plain Layout
11251 \change_inserted -712698321 1355661077
11259 , this argument is automatically inserted when the respective style is selected.
11260 Currently, only one argument per style\SpecialChar \slash{}
11261 layout can be automatically inserted.
11262 \change_inserted 155139281 1354198988
11266 \begin_layout Standard
11268 \change_inserted -712698321 1356689813
11269 By default, the text entered in the LyX workarea in the respective layout
11270 is the last (mandatory) argument of a command if the
11271 \begin_inset Flex Code
11274 \begin_layout Plain Layout
11276 \change_inserted -712698321 1356689619
11285 \begin_inset Flex Code
11288 \begin_layout Plain Layout
11290 \change_inserted -712698321 1356689629
11299 However, arguments with the prefix
11300 \begin_inset Flex Code
11303 \begin_layout Plain Layout
11305 \change_inserted -712698321 1356689679
11313 are output after this workarea argument.
11314 Note that post-argument numbering restarts at 1, so the first argument
11315 following the workarea argument is
11316 \begin_inset Flex Code
11319 \begin_layout Plain Layout
11321 \change_inserted -712698321 1356689813
11330 Post-arguments are ignored in any other
11331 \begin_inset Flex Code
11334 \begin_layout Plain Layout
11336 \change_inserted -712698321 1356689801
11343 \begin_inset Flex Code
11346 \begin_layout Plain Layout
11348 \change_inserted -712698321 1356689801
11359 \begin_layout Standard
11361 \change_inserted 155139281 1354199102
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11368 \change_inserted 155139281 1354199013
11379 \begin_inset Flex Code
11382 \begin_layout Plain Layout
11384 \change_inserted 155139281 1354199102
11395 \begin_inset Flex Code
11398 \begin_layout Plain Layout
11400 \change_inserted 155139281 1354199044
11408 followed by the number (e.
11409 \begin_inset space \thinspace{}
11414 \begin_inset Flex Code
11417 \begin_layout Plain Layout
11419 \change_inserted 155139281 1354199064
11433 \begin_layout Description
11434 \begin_inset Flex Code
11437 \begin_layout Plain Layout
11443 Note that this will completely override any prior
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11453 declaration for this style.
11455 \begin_inset Quotes eld
11459 \begin_inset Flex Code
11462 \begin_layout Plain Layout
11469 \begin_inset Quotes erd
11474 \begin_inset space ~
11478 \begin_inset CommandInset ref
11480 reference "sub:I18n"
11484 for details on its use.
11487 \begin_layout Description
11488 \begin_inset Flex Code
11491 \begin_layout Plain Layout
11498 \begin_inset Flex Code
11501 \begin_layout Plain Layout
11511 \begin_layout Plain Layout
11512 Note that a `float' here is a real number, such as: 1.5.
11517 The vertical space with which the last of a chain of paragraphs with this
11518 style is separated from the following paragraph.
11519 If the next paragraph has another style, the separations are not simply
11520 added, but the maximum is taken.
11523 \begin_layout Description
11524 \begin_inset Flex Code
11527 \begin_layout Plain Layout
11534 \begin_inset Flex Code
11537 \begin_layout Plain Layout
11543 ] The category for this style.
11544 This is used to group related styles in the style combobox on the toolbar.
11545 Any string can be used, but you may want to use existing categories with
11550 \begin_layout Description
11551 \begin_inset Flex Code
11554 \begin_layout Plain Layout
11560 Depth of XML command.
11561 Used only with XML-type formats.
11564 \begin_layout Description
11565 \begin_inset Flex Code
11568 \begin_layout Plain Layout
11575 \begin_inset Flex Code
11578 \begin_layout Plain Layout
11584 ] Copies all the features of an existing style into the current one.
11588 \begin_layout Description
11589 \begin_inset Flex Code
11592 \begin_layout Plain Layout
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11608 ] The name of a style whose preamble should be output
11613 This allows to ensure some ordering of the preamble snippets when macros
11614 definitions depend on one another.
11618 \begin_layout Plain Layout
11619 Note that, besides that functionality, there is no way to ensure any ordering
11621 The ordering that you see in a given version of LyX may change without
11622 warning in later versions.
11630 \begin_layout Description
11631 \begin_inset Flex Code
11634 \begin_layout Plain Layout
11641 \begin_inset Flex Code
11644 \begin_layout Plain Layout
11649 , Box, Filled_Box, Static
11654 ] The type of label that stands at the end of the paragraph (or sequence
11656 \begin_inset Flex Code
11659 \begin_layout Plain Layout
11666 \begin_inset Newline newline
11670 \begin_inset Flex Code
11673 \begin_layout Plain Layout
11680 \begin_inset Flex Code
11683 \begin_layout Plain Layout
11690 \begin_inset Flex Code
11693 \begin_layout Plain Layout
11701 \begin_inset Flex Code
11704 \begin_layout Plain Layout
11711 \begin_inset Quotes eld
11715 \begin_inset Quotes erd
11719 \begin_inset Flex Code
11722 \begin_layout Plain Layout
11729 \begin_inset space \space{}
11733 \begin_inset Flex Code
11736 \begin_layout Plain Layout
11742 ) is a white (resp.
11743 \begin_inset space ~
11746 black) square suitable for end of proof markers,
11747 \begin_inset Flex Code
11750 \begin_layout Plain Layout
11756 is an explicit text string.
11759 \begin_layout Description
11760 \begin_inset Flex Code
11763 \begin_layout Plain Layout
11770 \begin_inset Flex Code
11773 \begin_layout Plain Layout
11779 ] The string used for a label with a
11780 \begin_inset Flex Code
11783 \begin_layout Plain Layout
11790 \begin_inset Newline newline
11794 \begin_inset Flex Code
11797 \begin_layout Plain Layout
11807 \begin_layout Description
11808 \begin_inset Flex Code
11811 \begin_layout Plain Layout
11817 The font used for both the text body
11823 \begin_inset space ~
11827 \begin_inset CommandInset ref
11829 reference "sub:Font-description"
11834 Note that defining this font automatically defines the
11835 \begin_inset Flex Code
11838 \begin_layout Plain Layout
11845 So you should define this one first if you also want to define
11846 \begin_inset Flex Code
11849 \begin_layout Plain Layout
11858 \begin_layout Description
11859 \begin_inset Flex Code
11862 \begin_layout Plain Layout
11869 \begin_inset Flex Code
11872 \begin_layout Plain Layout
11881 \begin_inset space \thinspace{}
11885 \begin_inset Flex Code
11888 \begin_layout Plain Layout
11894 ] Usually LyX does not allow you to insert more than one space between words,
11895 since a space is considered as the separation between two words, not a
11896 character or symbol of its own.
11897 This is a very fine thing but sometimes annoying, for example, when typing
11898 program code or plain LaTeX code.
11900 \begin_inset Flex Code
11903 \begin_layout Plain Layout
11910 Note that LyX will create protected blanks for the additional blanks when
11911 in another mode than LaTeX-mode.
11914 \begin_layout Description
11915 \begin_inset Flex Code
11918 \begin_layout Plain Layout
11924 These tags are used with XHTML output.
11926 \begin_inset CommandInset ref
11928 reference "sub:Paragraph-Style-XHTML"
11935 \begin_layout Description
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11945 [FIXME] (Used only with XML-type formats.)
11948 \begin_layout Description
11949 \begin_inset Flex Code
11952 \begin_layout Plain Layout
11959 \begin_inset Flex Code
11962 \begin_layout Plain Layout
11971 \begin_inset space \thinspace{}
11975 \begin_inset Flex Code
11978 \begin_layout Plain Layout
11985 \begin_inset Flex Code
11988 \begin_layout Plain Layout
11994 , marks the style as to be included in the document preamble and not in
11996 This is useful for document classes that want such information as the title
11997 and author to appear in the preamble.
11998 Note that this works only for styles for which the
11999 \begin_inset Flex Code
12002 \begin_layout Plain Layout
12009 \begin_inset Flex Code
12012 \begin_layout Plain Layout
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12031 \begin_layout Description
12032 \begin_inset Flex Code
12035 \begin_layout Plain Layout
12042 \begin_inset Flex Code
12045 \begin_layout Plain Layout
12054 \begin_inset space \thinspace{}
12058 \begin_inset Flex Code
12061 \begin_layout Plain Layout
12068 \begin_inset Flex Code
12071 \begin_layout Plain Layout
12077 , marks the style as being part of a title block (see also the
12078 \begin_inset Flex Code
12081 \begin_layout Plain Layout
12088 \begin_inset Flex Code
12091 \begin_layout Plain Layout
12100 \begin_layout Description
12102 \change_inserted -712698321 1355932296
12103 \begin_inset Flex Code
12106 \begin_layout Plain Layout
12108 \change_inserted -712698321 1355932178
12115 \begin_inset Flex Code
12118 \begin_layout Plain Layout
12120 \change_inserted -712698321 1355932181
12126 ] The LaTeX command sequence declaring an item in a list.
12127 The command is to be defined without the preceding backslash (the default
12129 \begin_inset Quotes eld
12133 \begin_inset Quotes erd
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12142 \change_inserted -712698321 1355932279
12152 in the LaTeX output).
12155 \begin_layout Description
12156 \begin_inset Flex Code
12159 \begin_layout Plain Layout
12166 \begin_inset Flex Code
12169 \begin_layout Plain Layout
12175 ] This provides extra space between paragraphs that have the same style.
12176 If you put other styles into an environment, each is separated with the
12178 \begin_inset Flex Code
12181 \begin_layout Plain Layout
12188 But the whole items of the environment are additionally separated with
12190 \begin_inset Flex Code
12193 \begin_layout Plain Layout
12200 Note that this is a
12205 \begin_layout Description
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12215 [FIXME] (Used only with XML-type formats.)
12218 \begin_layout Description
12219 \begin_inset Flex Code
12222 \begin_layout Plain Layout
12229 \begin_inset Flex Code
12232 \begin_layout Plain Layout
12241 \begin_inset space \thinspace{}
12245 \begin_inset Flex Code
12248 \begin_layout Plain Layout
12254 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12255 lead to empty LaTeX output.
12256 There are some cases where this could be desirable however: in a letter
12257 template, the required fields can be provided as empty fields, so that
12258 people do not forget them; in some special classes, a style can be used
12259 as some kind of break, which does not contain actual text.
12262 \begin_layout Description
12263 \begin_inset Flex Code
12266 \begin_layout Plain Layout
12273 \begin_inset Flex Code
12276 \begin_layout Plain Layout
12282 ] The vertical space between the label and the text body.
12283 Only used for labels that are above the text body (
12284 \begin_inset Flex Code
12287 \begin_layout Plain Layout
12294 \begin_inset Newline newline
12298 \begin_inset Flex Code
12301 \begin_layout Plain Layout
12302 Centered_Top_Environment
12310 \begin_layout Description
12311 \begin_inset Flex Code
12314 \begin_layout Plain Layout
12321 \begin_inset Flex Code
12324 \begin_layout Plain Layout
12330 ] The name of the counter for automatic numbering.
12332 \change_inserted 1414654397 1360434581
12333 In order to have the counter appear with your label, you will need to reference
12334 it in the LabelString.
12335 This will work with
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12341 \change_inserted 1414654397 1360434565
12350 \begin_inset Flex Code
12353 \begin_layout Plain Layout
12355 \change_inserted 1414654397 1360434569
12364 \begin_inset Flex Code
12367 \begin_layout Plain Layout
12369 \change_inserted 1414654397 1360434574
12378 \begin_inset Flex Code
12381 \begin_layout Plain Layout
12383 \change_inserted 1414654397 1360434578
12394 \begin_inset Newline newline
12398 \change_deleted 1414654397 1360434393
12404 \begin_inset Flex Code
12407 \begin_layout Plain Layout
12414 \begin_inset Flex Code
12417 \begin_layout Plain Layout
12424 In that case, the counter will be stepped each time the style appears.
12425 \begin_inset Newline newline
12435 \begin_inset Flex Code
12438 \begin_layout Plain Layout
12445 \begin_inset Flex Code
12448 \begin_layout Plain Layout
12454 , though this case is a bit complicated.
12455 Suppose you declare
12456 \begin_inset Quotes eld
12460 \begin_inset Flex Code
12463 \begin_layout Plain Layout
12464 LabelCounter myenum
12470 \begin_inset Quotes erd
12474 Then the actual counters used are
12475 \begin_inset Flex Code
12478 \begin_layout Plain Layout
12485 \begin_inset Flex Code
12488 \begin_layout Plain Layout
12495 \begin_inset Flex Code
12498 \begin_layout Plain Layout
12505 \begin_inset Flex Code
12508 \begin_layout Plain Layout
12514 , much as in LaTeX.
12515 These counters must all be declared separately.
12516 \begin_inset Newline newline
12520 \begin_inset CommandInset ref
12522 reference "sub:Counters"
12526 for details on counters.
12529 \begin_layout Description
12530 \begin_inset Flex Code
12533 \begin_layout Plain Layout
12539 The font used for the label.
12541 \begin_inset space ~
12545 \begin_inset CommandInset ref
12547 reference "sub:Font-description"
12554 \begin_layout Description
12555 \begin_inset Flex Code
12558 \begin_layout Plain Layout
12565 \begin_inset Flex Code
12568 \begin_layout Plain Layout
12574 ] Text that indicates how far a label should be indented.
12577 \begin_layout Description
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12588 \begin_inset Flex Code
12591 \begin_layout Plain Layout
12597 ] Text that indicates the amount of horizontal space between the label and
12599 Only used for labels that are not above the text body.
12602 \begin_layout Description
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12613 \begin_inset Flex Code
12616 \begin_layout Plain Layout
12622 ] The string used for
12623 \change_inserted 1414654397 1360434358
12625 \change_deleted 1414654397 1360434353
12630 \begin_inset Flex Code
12633 \begin_layout Plain Layout
12639 is set, this string can be contain the special formatting commands described
12641 \begin_inset CommandInset ref
12643 reference "sub:Counters"
12650 \begin_layout Description
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12655 LabelStringAppendix
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12670 ] This is used inside the appendix instead of
12671 \begin_inset Newline newline
12675 \begin_inset Flex Code
12678 \begin_layout Plain Layout
12686 \begin_inset Flex Code
12689 \begin_layout Plain Layout
12696 \begin_inset Newline newline
12700 \begin_inset Flex Code
12703 \begin_layout Plain Layout
12704 LabelStringAppendix
12712 \begin_layout Description
12713 \begin_inset Flex Code
12716 \begin_layout Plain Layout
12722 [FIXME] (Used only with XML-type formats.)
12725 \begin_layout Description
12726 \begin_inset Flex Code
12729 \begin_layout Plain Layout
12736 \begin_inset Flex Code
12739 \begin_layout Plain Layout
12745 \change_inserted 1414654397 1360434611
12747 \change_deleted 1414654397 1360434612
12751 \begin_inset Newline newline
12755 \change_inserted 1414654397 1360434627
12757 \change_deleted 1414654397 1360434623
12758 _Top_Environment, Counter,
12760 Sensitive, Enumerate,
12761 \begin_inset Newline newline
12764 Itemize, Bibliography
12773 \begin_layout Description
12774 \begin_inset Flex Code
12777 \begin_layout Plain Layout
12783 means the label is the very first word (up to the first real blank).
12784 Use protected spaces if you want more than one word as the label.
12788 \begin_layout Description
12789 \begin_inset Flex Code
12792 \begin_layout Plain Layout
12798 means the label is simply what is declared as
12799 \begin_inset Flex Code
12802 \begin_layout Plain Layout
12810 \change_deleted 1414654397 1360434660
12811 Note that this really is `static'.
12813 \change_inserted 1414654397 1360434794
12814 This will be displayed
12815 \begin_inset Quotes eld
12819 \begin_inset Quotes erd
12822 , at the beginning of the paragraph.
12824 \begin_inset Flex Code
12827 \begin_layout Plain Layout
12829 \change_inserted 1414654397 1360434743
12838 \begin_inset Flex Code
12841 \begin_layout Plain Layout
12843 \change_inserted 1414654397 1360434747
12851 , then it will be displayed only in the first paragraph in any sequence
12852 of paragraphs with the same
12853 \begin_inset Flex Code
12856 \begin_layout Plain Layout
12858 \change_inserted 1414654397 1360434794
12871 \begin_layout Description
12872 \begin_inset Flex Code
12875 \begin_layout Plain Layout
12877 \change_deleted 1414654397 1360434641
12879 \change_inserted 1414654397 1360434643
12888 \begin_inset space ~
12892 \begin_inset space ~
12896 \begin_inset Flex Code
12899 \begin_layout Plain Layout
12901 \change_deleted 1414654397 1360434649
12909 are special cases of
12910 \begin_inset Flex Code
12913 \begin_layout Plain Layout
12920 The label will be printed above the paragraph
12921 \change_inserted 1414654397 1360434839
12922 either at the beginning of the line or centered
12923 \change_deleted 1414654397 1360434813
12924 , but only at the top of an environment or the top of a chain of paragraphs
12926 This might be used with the
12927 \begin_inset Flex MenuItem
12930 \begin_layout Plain Layout
12941 \begin_layout Description
12942 \begin_inset Flex Code
12945 \begin_layout Plain Layout
12951 is a special case for the caption-labels
12952 \begin_inset Quotes eld
12956 \begin_inset Quotes erd
12960 \begin_inset Quotes eld
12964 \begin_inset Quotes erd
12968 \begin_inset Newline newline
12972 \begin_inset Flex Code
12975 \begin_layout Plain Layout
12981 means the (hardcoded) label string depends on the kind of float: It is
12982 hardcoded to be `FloatType N', where N is the value of the counter associated
12984 For the case that a caption is inserted outside of a float
12985 \change_inserted 1414654397 1360434861
12989 \begin_inset Flex Code
12992 \begin_layout Plain Layout
12999 \change_inserted 1414654397 1360434866
13001 \change_deleted 1414654397 1360434868
13002 should be set to e.
13003 \begin_inset space \thinspace{}
13007 \begin_inset space \space{}
13013 \begin_inset Quotes eld
13017 \begin_inset Quotes erd
13023 \begin_layout Description
13025 \change_deleted 1414654397 1360434875
13026 \begin_inset Flex Code
13029 \begin_layout Plain Layout
13035 defines automatically numbered labels.
13037 \begin_inset Flex Code
13040 \begin_layout Plain Layout
13046 will be expanded to contain any counters: So the result will for example
13048 \begin_inset Quotes eld
13052 \begin_inset Flex Code
13055 \begin_layout Plain Layout
13066 \begin_inset Quotes erd
13071 \begin_inset space ~
13075 \begin_inset CommandInset ref
13077 reference "sub:Counters"
13081 for more information on counters.
13084 \begin_layout Description
13085 \begin_inset Flex Code
13088 \begin_layout Plain Layout
13094 produces the usual sort of enumeration labels.
13095 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13096 small Roman numerals, and uppercase letters for the four possible depths.
13099 \begin_layout Description
13100 \begin_inset Flex Code
13103 \begin_layout Plain Layout
13109 produces various bullets at the different levels.
13110 It is also hardcoded.
13113 \begin_layout Description
13114 \begin_inset Flex Code
13117 \begin_layout Plain Layout
13124 \change_deleted 1414654397 1360434898
13125 is used internally by LyX and
13127 should be used only with
13128 \begin_inset Flex Code
13131 \begin_layout Plain Layout
13132 LatexType BibEnvironment
13141 \begin_layout Description
13142 \begin_inset Flex Code
13145 \begin_layout Plain Layout
13151 Note that this will completely override any prior
13152 \begin_inset Flex Code
13155 \begin_layout Plain Layout
13161 declaration for this style.
13163 \begin_inset Quotes eld
13167 \begin_inset Flex Code
13170 \begin_layout Plain Layout
13177 \begin_inset Quotes erd
13182 \begin_inset CommandInset ref
13184 reference "sub:I18n"
13188 for details on its use.
13191 \begin_layout Description
13192 \begin_inset Flex Code
13195 \begin_layout Plain Layout
13202 \begin_inset Flex Code
13205 \begin_layout Plain Layout
13211 ] The name of the corresponding LaTeX stuff.
13212 Either the environment or command name.
13215 \begin_layout Description
13216 \begin_inset Flex Code
13219 \begin_layout Plain Layout
13226 \begin_inset Flex Code
13229 \begin_layout Plain Layout
13235 ] An optional parameter for the corresponding
13236 \begin_inset Flex Code
13239 \begin_layout Plain Layout
13246 This parameter cannot be changed from within LyX
13247 \change_inserted -712698321 1355144804
13249 \begin_inset Flex Code
13252 \begin_layout Plain Layout
13254 \change_inserted -712698321 1355144804
13260 for customizable parameters)
13264 \change_inserted -712698321 1355144804
13265 This will be output as is after all LaTeX
13266 \begin_inset Flex Code
13269 \begin_layout Plain Layout
13271 \change_inserted -712698321 1355144658
13284 \begin_layout Description
13285 \begin_inset Flex Code
13288 \begin_layout Plain Layout
13295 \begin_inset Flex Code
13298 \begin_layout Plain Layout
13303 , Command, Environment, Item_Environment,
13304 \begin_inset Newline newline
13307 List_Environment, Bib_Environment
13312 ] How the style should be translated into LaTeX.
13316 \begin_layout Plain Layout
13317 \begin_inset Flex Code
13320 \begin_layout Plain Layout
13326 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13327 Visit the SGML class files for specific examples.
13336 \begin_layout Description
13337 \begin_inset Flex Code
13340 \begin_layout Plain Layout
13346 means nothing special.
13349 \begin_layout Description
13350 \begin_inset Flex Code
13353 \begin_layout Plain Layout
13360 \begin_inset Flex Code
13363 \begin_layout Plain Layout
13370 {\SpecialChar \ldots{}
13379 \begin_layout Description
13380 \begin_inset Flex Code
13383 \begin_layout Plain Layout
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 }\SpecialChar \ldots{}
13416 \begin_layout Description
13417 \begin_inset Flex Code
13420 \begin_layout Plain Layout
13427 \begin_inset Flex Code
13430 \begin_layout Plain Layout
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13448 is generated for each paragraph of this environment.
13452 \begin_layout Description
13453 \begin_inset Flex Code
13456 \begin_layout Plain Layout
13463 \begin_inset Flex Code
13466 \begin_layout Plain Layout
13473 \begin_inset Newline newline
13477 \begin_inset Flex Code
13480 \begin_layout Plain Layout
13486 is passed as an argument to the environment.
13487 \begin_inset Newline newline
13491 \begin_inset Flex Code
13494 \begin_layout Plain Layout
13500 can be defined in the
13501 \begin_inset Flex MenuItem
13504 \begin_layout Plain Layout
13505 Edit\SpecialChar \menuseparator
13507 \begin_inset space ~
13518 \begin_layout Description
13519 \begin_inset Flex Code
13522 \begin_layout Plain Layout
13529 \begin_inset Flex Code
13532 \begin_layout Plain Layout
13538 but adds additionally the necessary mandatory argument (the longest label)
13539 to the begin statement of the bibliography environment:
13540 \begin_inset Newline newline
13544 \begin_inset Flex Code
13547 \begin_layout Plain Layout
13550 begin{thebibliography}{99}
13555 It is therefore only useful for bibliography environments.
13556 The default longest label
13557 \begin_inset Quotes eld
13561 \begin_inset Quotes erd
13564 can be changed by the user in the paragraph settings of a bibliography
13568 \begin_layout Standard
13569 Putting the last few things together, the LaTeX output will be either:
13572 \begin_layout LyX-Code
13575 LatexName[LatexParam]{\SpecialChar \ldots{}
13579 \begin_layout Standard
13583 \begin_layout LyX-Code
13586 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13592 \begin_layout Standard
13593 depending upon the LaTeX type.
13597 \begin_layout Description
13599 \change_inserted -712698321 1354263086
13600 \begin_inset Flex Code
13603 \begin_layout Plain Layout
13605 \change_inserted -712698321 1353866852
13612 \begin_inset Flex Code
13615 \begin_layout Plain Layout
13617 \change_inserted -712698321 1353866852
13623 ] A string that is put at the beginning of the style content.
13624 A line break in the output can be indicated by
13625 \begin_inset Flex Code
13628 \begin_layout Plain Layout
13630 \change_inserted -712698321 1354263086
13641 \begin_layout Description
13642 \begin_inset Flex Code
13645 \begin_layout Plain Layout
13652 \begin_inset Flex Code
13655 \begin_layout Plain Layout
13661 ] If you put styles into environments, the different
13662 \begin_inset Flex Code
13665 \begin_layout Plain Layout
13671 are not simply added, but added with a factor
13672 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13676 Note that this parameter is also used when
13677 \begin_inset Flex Code
13680 \begin_layout Plain Layout
13687 \begin_inset Flex Code
13690 \begin_layout Plain Layout
13697 \begin_inset Flex Code
13700 \begin_layout Plain Layout
13707 Then it is added to the manual or dynamic margin.
13708 \begin_inset Newline newline
13712 \begin_inset Quotes eld
13716 \begin_inset Flex Code
13719 \begin_layout Plain Layout
13726 \begin_inset Quotes erd
13729 means that the paragraph is indented with the width of
13730 \begin_inset Quotes eld
13734 \begin_inset Flex Code
13737 \begin_layout Plain Layout
13744 \begin_inset Quotes erd
13747 in the normal font.
13748 You can get a negative width by prefixing the string with
13749 \begin_inset Quotes eld
13753 \begin_inset Flex Code
13756 \begin_layout Plain Layout
13763 \begin_inset Quotes erd
13767 This way was chosen so that the look is the same with each used screen
13771 \begin_layout Description
13772 \begin_inset Flex Code
13775 \begin_layout Plain Layout
13782 \begin_inset Flex Code
13785 \begin_layout Plain Layout
13790 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13796 \begin_inset Newline newline
13799 The kind of margin that the style has on the left side.
13803 \begin_layout Description
13804 \begin_inset Flex Code
13807 \begin_layout Plain Layout
13813 just means a fixed margin.
13816 \begin_layout Description
13817 \begin_inset Flex Code
13820 \begin_layout Plain Layout
13826 means that the left margin depends on the string entered in the
13827 \begin_inset Flex MenuItem
13830 \begin_layout Plain Layout
13831 Edit\SpecialChar \menuseparator
13833 \begin_inset space ~
13842 This is used to typeset nice lists without tabulators.
13845 \begin_layout Description
13846 \begin_inset Flex Code
13849 \begin_layout Plain Layout
13855 means that the margin depends on the size of the label.
13856 This is used for automatic enumerated headlines.
13857 It is obvious that the headline
13858 \begin_inset Quotes eld
13861 5.4.3.2.1 Very long headline
13862 \begin_inset Quotes erd
13865 must have a wider left margin (as wide as
13866 \begin_inset Quotes eld
13870 \begin_inset Quotes erd
13873 plus the space) than
13874 \begin_inset Quotes eld
13877 3.2 Very long headline
13878 \begin_inset Quotes erd
13882 \begin_inset Quotes eld
13886 \begin_inset Quotes erd
13889 are not able to do this.
13892 \begin_layout Description
13893 \begin_inset Flex Code
13896 \begin_layout Plain Layout
13902 is similar, but only the very first row of the paragraph is dynamic, while
13903 the others are static; this is used, for example, for descriptions.
13906 \begin_layout Description
13907 \begin_inset Flex Code
13910 \begin_layout Plain Layout
13916 means the margin is chosen in a way that the longest row of this paragraph
13917 fits to the right margin.
13918 This is used to typeset an address on the right edge of the page.
13922 \begin_layout Description
13923 \begin_inset Flex Code
13926 \begin_layout Plain Layout
13933 \begin_inset Flex Code
13936 \begin_layout Plain Layout
13945 \begin_inset space \thinspace{}
13949 \begin_inset Flex Code
13952 \begin_layout Plain Layout
13958 ] Whether fragile commands in this style should be
13959 \begin_inset Flex Code
13962 \begin_layout Plain Layout
13975 whether this command should itself be protected.)
13978 \begin_layout Description
13979 \begin_inset Flex Code
13982 \begin_layout Plain Layout
13989 \begin_inset Flex Code
13992 \begin_layout Plain Layout
13999 \begin_inset space \thinspace{}
14003 \begin_inset Flex Code
14006 \begin_layout Plain Layout
14014 ] Whether newlines are translated into LaTeX newlines (
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14029 The translation can be switched off to allow more comfortable LaTeX editing
14033 \begin_layout Description
14034 \begin_inset Flex Code
14037 \begin_layout Plain Layout
14044 \begin_inset Flex Code
14047 \begin_layout Plain Layout
14056 \begin_inset space \thinspace{}
14060 \begin_inset Flex Code
14063 \begin_layout Plain Layout
14069 ] If set to true, and if
14070 \begin_inset Flex Code
14073 \begin_layout Plain Layout
14080 \begin_inset Flex Code
14083 \begin_layout Plain Layout
14089 ) paragraphs are being indented, then the indentation of such a paragraph
14090 following one of this type will be suppressed.
14091 (So this will not affect the display of non-default paragraphs.)
14094 \begin_layout Description
14095 \begin_inset Flex Code
14098 \begin_layout Plain Layout
14105 \begin_inset Flex Code
14108 \begin_layout Plain Layout
14114 ] Name of a style that has replaced this style.
14115 This is used to rename a style, while keeping backward compatibility.
14118 \begin_layout Description
14120 \change_deleted -712698321 1353679722
14121 \begin_inset Flex Code
14124 \begin_layout Plain Layout
14131 \begin_inset Flex Code
14134 \begin_layout Plain Layout
14140 ] The number of optional arguments that can be used with this style.
14141 This is useful for things like section headings, and only makes sense with
14143 Note that, on output, the optional arguments will all precede any required
14144 arguments (see below).
14145 So one can have constructs like:
14149 \begin_layout LyX-Code
14151 \change_deleted -712698321 1353679722
14154 mycmd[opt1]{req1}{contents of paragraph}
14157 \begin_layout Standard
14159 \change_deleted -712698321 1353679722
14160 but one cannot have things like:
14163 \begin_layout LyX-Code
14165 \change_deleted -712698321 1353679722
14168 mycmd[opt1]{req1}[opt2]{contents of paragraph}
14171 \begin_layout Standard
14173 \change_deleted -712698321 1353679722
14174 at least, not without ERT (with which you can have anything).
14181 \begin_layout Description
14182 \begin_inset Flex Code
14185 \begin_layout Plain Layout
14192 \begin_inset Flex Code
14195 \begin_layout Plain Layout
14204 \begin_inset space \thinspace{}
14208 \begin_inset Flex Code
14211 \begin_layout Plain Layout
14217 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14218 output, but only by a line break; together with
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14228 , this allows to emulate a plain text editor (like the ERT inset).
14231 \begin_layout Description
14232 \begin_inset Flex Code
14235 \begin_layout Plain Layout
14242 \begin_inset Flex Code
14245 \begin_layout Plain Layout
14251 ] The indent of the very first line of a paragraph.
14253 \begin_inset Newline newline
14257 \begin_inset Flex Code
14260 \begin_layout Plain Layout
14266 will be fixed for a certain style.
14267 The exception is the default style, since the indentation for these paragraphs
14268 can be prohibited with
14269 \begin_inset Flex Code
14272 \begin_layout Plain Layout
14280 \begin_inset Flex Code
14283 \begin_layout Plain Layout
14289 style paragraphs inside environments use the
14290 \begin_inset Flex Code
14293 \begin_layout Plain Layout
14299 of the environment, not their native one.
14301 \begin_inset Flex Code
14304 \begin_layout Plain Layout
14310 paragraphs inside an enumeration are not indented.
14313 \begin_layout Description
14314 \begin_inset Flex Code
14317 \begin_layout Plain Layout
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14333 ] The vertical space between two paragraphs of this style.
14336 \begin_layout Description
14337 \begin_inset Flex Code
14340 \begin_layout Plain Layout
14347 \begin_inset Flex Code
14350 \begin_layout Plain Layout
14356 ] LyX allows the user to choose either
14357 \begin_inset Quotes eld
14361 \begin_inset Quotes erd
14365 \begin_inset Quotes eld
14369 \begin_inset Quotes erd
14372 to separate paragraphs.
14374 \begin_inset Quotes eld
14378 \begin_inset Quotes erd
14382 \begin_inset Flex Code
14385 \begin_layout Plain Layout
14393 \begin_inset Quotes eld
14397 \begin_inset Quotes erd
14401 \begin_inset Flex Code
14404 \begin_layout Plain Layout
14410 is ignored and all paragraphs are separated by the
14411 \begin_inset Flex Code
14414 \begin_layout Plain Layout
14421 The vertical space is calculated with
14422 \begin_inset Flex Code
14425 \begin_layout Plain Layout
14427 \begin_inset space ~
14436 \begin_inset Flex Code
14439 \begin_layout Plain Layout
14445 is the height of a row with the normal font.
14446 This way, the look stays the same with different screen fonts.
14449 \begin_layout Description
14450 \begin_inset Flex Code
14453 \begin_layout Plain Layout
14460 \begin_inset Flex Code
14463 \begin_layout Plain Layout
14472 \begin_inset space \thinspace{}
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14485 ] Whether the contents of this paragraph should be output in raw form, meaning
14486 without special translations that LaTeX would require.
14489 \begin_layout Description
14490 \begin_inset Flex Code
14493 \begin_layout Plain Layout
14499 Information to be included in the LaTeX preamble when this style is used.
14500 Used to define macros, load packages, etc., required by this particular
14503 \begin_inset Quotes eld
14507 \begin_inset Flex Code
14510 \begin_layout Plain Layout
14517 \begin_inset Quotes erd
14523 \begin_layout Description
14524 \begin_inset Flex Code
14527 \begin_layout Plain Layout
14534 \begin_inset Flex Code
14537 \begin_layout Plain Layout
14543 ] The prefix to use when creating labels referring to paragraphs of this
14545 This allows the use of formatted references.
14548 \begin_layout Description
14550 \change_deleted -712698321 1353681258
14551 \begin_inset Flex Code
14554 \begin_layout Plain Layout
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14570 ] The number of required arguments that the LaTeX command or environment
14571 corresponding to this style expects.
14572 In the case of a command, these are required arguments
14576 that associated with the content of the paragraph itself.
14577 These do not actually have to be provided: LyX will output empty arguments
14579 Note that optional arguments will be output before required arguments.
14580 See the discussion of the
14581 \begin_inset Flex Code
14584 \begin_layout Plain Layout
14590 tag above for more information.
14595 \begin_layout Description
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14606 \begin_inset Flex Code
14609 \begin_layout Plain Layout
14615 ] Whether the style requires the feature
14616 \begin_inset Flex Code
14619 \begin_layout Plain Layout
14626 See the description of
14627 \begin_inset Flex Code
14630 \begin_layout Plain Layout
14637 \begin_inset space ~
14641 \begin_inset CommandInset ref
14643 reference "sub:General-text-class"
14647 ) for information on `features'.
14650 \begin_layout Description
14652 \change_inserted -712698321 1353693371
14653 \begin_inset Flex Code
14656 \begin_layout Plain Layout
14658 \change_inserted -712698321 1353693146
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14672 \change_inserted -712698321 1353693235
14681 \begin_inset Flex Code
14684 \begin_layout Plain Layout
14686 \change_inserted -712698321 1353693235
14692 ] Resets the LaTeX arguments of this style (as defined via the
14693 \begin_inset Flex Code
14696 \begin_layout Plain Layout
14698 \change_inserted -712698321 1353693371
14707 This is useful if you have copied a style via
14708 \begin_inset Flex Code
14711 \begin_layout Plain Layout
14713 \change_inserted -712698321 1353693302
14721 , but you do not want to inherit its (required and optional) arguments.
14726 \begin_layout Description
14728 \change_inserted -712698321 1354263074
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14734 \change_inserted -712698321 1353866876
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14746 \change_inserted -712698321 1353866873
14752 ] A string that is put at the end of the layout content.
14753 A line break in the output can be indicated by
14754 \begin_inset Flex Code
14757 \begin_layout Plain Layout
14759 \change_inserted -712698321 1354263069
14770 \begin_layout Description
14771 \begin_inset Flex Code
14774 \begin_layout Plain Layout
14781 \begin_inset Flex Code
14784 \begin_layout Plain Layout
14791 \begin_inset Flex Code
14794 \begin_layout Plain Layout
14803 \begin_layout Description
14804 \begin_inset Flex Code
14807 \begin_layout Plain Layout
14814 \begin_inset Flex Code
14817 \begin_layout Plain Layout
14826 \begin_inset Flex Code
14829 \begin_layout Plain Layout
14836 \begin_inset Flex Code
14839 \begin_layout Plain Layout
14846 \begin_inset Flex Code
14849 \begin_layout Plain Layout
14851 \begin_inset space ~
14859 ] This defines what the default spacing should be in the style.
14861 \begin_inset Flex Code
14864 \begin_layout Plain Layout
14871 \begin_inset Flex Code
14874 \begin_layout Plain Layout
14881 \begin_inset Flex Code
14884 \begin_layout Plain Layout
14890 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14891 If you specify the argument
14892 \begin_inset Flex Code
14895 \begin_layout Plain Layout
14901 , then you must also provide a value argument which will be the actual multiplie
14903 Note that, contrary to other parameters,
14904 \begin_inset Flex Code
14907 \begin_layout Plain Layout
14913 implies the generation of specific LaTeX code, using the LaTeX package
14917 \begin_inset Flex Code
14920 \begin_layout Plain Layout
14929 \begin_layout Description
14930 \begin_inset Flex Code
14933 \begin_layout Plain Layout
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14950 \begin_inset space \thinspace{}
14954 \begin_inset Flex Code
14957 \begin_layout Plain Layout
14965 ] Allow spell-checking paragraphs of this style.
14969 \begin_layout Description
14970 \begin_inset Flex Code
14973 \begin_layout Plain Layout
14979 The font used for the text body .
14981 \begin_inset CommandInset ref
14983 reference "sub:Font-description"
14990 \begin_layout Description
14991 \begin_inset Flex Code
14994 \begin_layout Plain Layout
15003 \begin_inset Flex Code
15006 \begin_layout Plain Layout
15016 The level of the style in the table of contents.
15017 This is used for automatic numbering of section headings.
15020 \begin_layout Description
15021 \begin_inset Flex Code
15024 \begin_layout Plain Layout
15031 \begin_inset Flex Code
15034 \begin_layout Plain Layout
15040 ] The vertical space with which the very first of a chain of paragraphs
15041 with this style is separated from the previous paragraph.
15042 If the previous paragraph has another style, the separations are not simply
15043 added, but the maximum is taken.
15046 \begin_layout Subsection
15047 \begin_inset CommandInset label
15053 Internationalization of Paragraph Styles
15056 \begin_layout Standard
15057 LyX has long supported internationalization of layout information, but,
15058 until version 2.0, this applied only to the user interface and not to, say,
15060 Thus, French authors were forced to resort to ugly hacks if they wanted
15065 1' instead of `Theorem 1'.
15066 Thanks to Georg Baum, that is no longer the case.
15069 \begin_layout Standard
15071 \begin_inset Flex Code
15074 \begin_layout Plain Layout
15080 defines text that is to appear in the typeset document, it may use
15081 \begin_inset Flex Code
15084 \begin_layout Plain Layout
15091 \begin_inset Flex Code
15094 \begin_layout Plain Layout
15100 to support non-English and even multi-language documents correctly.
15101 The following excerpt (from the
15102 \begin_inset Flex Code
15105 \begin_layout Plain Layout
15111 file) shows how this works:
15114 \begin_layout LyX-Code
15119 \begin_layout LyX-Code
15122 theoremstyle{remark}
15125 \begin_layout LyX-Code
15128 newtheorem{claim}[thm]{
15135 \begin_layout LyX-Code
15139 \begin_layout LyX-Code
15143 \begin_layout LyX-Code
15148 claimname}{_(Claim)}
15151 \begin_layout LyX-Code
15155 \begin_layout LyX-Code
15159 \begin_layout LyX-Code
15168 claimname}{_(Claim)}}
15171 \begin_layout LyX-Code
15176 \begin_layout Standard
15177 In principle, any legal LaTeX may appear in the
15178 \begin_inset Flex Code
15181 \begin_layout Plain Layout
15188 \begin_inset Flex Code
15191 \begin_layout Plain Layout
15197 tags, but in practice they will typically look as they do here.
15198 The key to correct translation of the typeset text is the definition of
15200 \begin_inset Flex Code
15203 \begin_layout Plain Layout
15212 \begin_inset Flex Code
15215 \begin_layout Plain Layout
15227 \begin_layout Standard
15229 \begin_inset Flex Code
15232 \begin_layout Plain Layout
15238 tag provides for internationalization based upon the overall language of
15240 The contents of the tag will be included in the preamble, just as with
15242 \begin_inset Flex Code
15245 \begin_layout Plain Layout
15252 What makes it special is the use of the
15253 \begin_inset Quotes eld
15257 \begin_inset Quotes erd
15261 \begin_inset Flex Code
15264 \begin_layout Plain Layout
15270 , which will be replaced, when LyX produces LaTeX output, with the translation
15271 of its argument into the document language.
15274 \begin_layout Standard
15276 \begin_inset Flex Code
15279 \begin_layout Plain Layout
15285 tag is more complex, since it is meant to provide support for multi-language
15286 documents and so offers an interface to the
15287 \begin_inset Flex Code
15290 \begin_layout Plain Layout
15297 Its contents will be added to the preamble once for each language that
15298 appears in the document.
15299 In this case, the argument to
15300 \begin_inset Flex Code
15303 \begin_layout Plain Layout
15309 will be replaced with its translation into the language in question; the
15311 \begin_inset Flex Code
15314 \begin_layout Plain Layout
15320 is replaced by the language name (as used by the babel package).
15323 \begin_layout Standard
15324 A German document that also included a French section would thus have the
15325 following in the preamble:
15328 \begin_layout LyX-Code
15337 claimname}{Affirmation}}
15338 \begin_inset Newline newline
15349 claimname}{Behauptung}}
15350 \begin_inset Newline newline
15357 claimname}{Behauptung}
15360 \begin_layout Standard
15362 \begin_inset Flex Code
15365 \begin_layout Plain Layout
15371 will then conspire to produce the correct text in the output.
15374 \begin_layout Standard
15375 One important point to note here is that the translations are provided by
15376 LyX itself, through the
15377 \change_inserted -195340706 1334775793
15379 \begin_inset Flex Code
15382 \begin_layout Plain Layout
15384 \change_inserted -195340706 1334775793
15391 \change_deleted -195340706 1334775793
15392 same mechanism it uses for internationalization of the user interface
15395 This means, in effect, that
15396 \begin_inset Flex Code
15399 \begin_layout Plain Layout
15406 \begin_inset Flex Code
15409 \begin_layout Plain Layout
15415 are really only of use in layout files that are provided with LyX, since
15416 text entered in user-created layout files will not be seen by LyX's internation
15418 \change_inserted -195340706 1334775793
15420 \begin_inset Flex Code
15423 \begin_layout Plain Layout
15425 \change_inserted -195340706 1334775793
15431 file is modified accordingly
15434 That said, however, any layout created with the intention that it will
15435 be included with LyX should use these tags where appropriate.
15437 \change_inserted -195340706 1334775793
15438 Please note that the paragraph style translations provided by LyX will
15439 never change with a minor update (e.g.
15440 from version 2.1.x to 2.1.y).
15441 It is however quite likely that a major update (e.g.
15442 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15447 \begin_layout Subsection
15449 \begin_inset CommandInset label
15458 \begin_layout Standard
15459 It is necessary to define the floats (
15460 \begin_inset Flex MenuItem
15463 \begin_layout Plain Layout
15470 \begin_inset Flex MenuItem
15473 \begin_layout Plain Layout
15479 , \SpecialChar \ldots{}
15480 ) in the text class itself.
15481 Standard floats are included in the file
15482 \begin_inset Flex Code
15485 \begin_layout Plain Layout
15491 , so you may have to do no more than add
15494 \begin_layout LyX-Code
15495 Input stdfloats.inc
15498 \begin_layout Standard
15499 to your layout file.
15500 If you want to implement a text class that proposes some other float types
15501 (like the AGU class bundled with LyX), the information below will hopefully
15505 \begin_layout Description
15506 \begin_inset Flex Code
15509 \begin_layout Plain Layout
15516 \begin_inset Flex Code
15519 \begin_layout Plain Layout
15526 \begin_inset Quotes erd
15530 \begin_inset Quotes erd
15533 ] The file name extension of an auxiliary file for the list of figures (or
15535 LaTeX writes the captions to this file.
15538 \begin_layout Description
15539 \begin_inset Flex Code
15542 \begin_layout Plain Layout
15549 \begin_inset Flex Code
15552 \begin_layout Plain Layout
15559 \begin_inset Quotes erd
15563 \begin_inset Quotes erd
15566 ] The string that will be used in the menus and also for the caption.
15567 This is translated to the current language if babel is used.
15570 \begin_layout Description
15571 \begin_inset Flex Code
15574 \begin_layout Plain Layout
15580 These tags control the XHTML output.
15582 \begin_inset space ~
15586 \begin_inset CommandInset ref
15588 reference "sec:Tags-for-XHTML"
15595 \begin_layout Description
15596 \begin_inset Flex Code
15599 \begin_layout Plain Layout
15608 \begin_inset Flex Code
15611 \begin_layout Plain Layout
15620 \begin_inset space \thinspace{}
15624 \begin_inset Flex Code
15627 \begin_layout Plain Layout
15633 ] Indicates whether the float is already defined in the document class or
15634 if instead the LaTeX package
15635 \begin_inset Flex Code
15638 \begin_layout Plain Layout
15644 needs to be loaded to define it on-the-fly.
15646 \begin_inset Flex Code
15649 \begin_layout Plain Layout
15656 \begin_inset Flex Code
15659 \begin_layout Plain Layout
15666 It should be set to
15667 \begin_inset Flex Code
15670 \begin_layout Plain Layout
15676 if the float is already defined by the LaTeX document class.
15679 \begin_layout Description
15680 \begin_inset Flex Code
15683 \begin_layout Plain Layout
15690 \begin_inset Flex Code
15693 \begin_layout Plain Layout
15700 \begin_inset Quotes erd
15704 \begin_inset Quotes erd
15707 ] The command used to generate a list of floats of this type; the leading
15716 \begin_inset Flex Code
15719 \begin_layout Plain Layout
15725 is false, since there is no standard way to generate this command.
15727 \begin_inset Flex Code
15730 \begin_layout Plain Layout
15736 is true, since in that case there is a standard way to define the command.
15739 \begin_layout Description
15740 \begin_inset Flex Code
15743 \begin_layout Plain Layout
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15760 \begin_inset Quotes erd
15764 \begin_inset Quotes erd
15767 ] A title for a list of floats of this kind (list of figures, tables, or
15769 It is used for the screen label within LyX, it is used by LaTeX for the
15770 title and it is used as the title in the XHTML output.
15771 It will be translated to the document language.
15774 \begin_layout Description
15775 \begin_inset Flex Code
15778 \begin_layout Plain Layout
15785 \begin_inset Flex Code
15788 \begin_layout Plain Layout
15795 \begin_inset Quotes erd
15799 \begin_inset Quotes erd
15802 ] This (optional) argument determines whether floats of this class will
15803 be numbered within some sectional unit of the document.
15805 \begin_inset Flex Code
15808 \begin_layout Plain Layout
15815 \begin_inset Quotes eld
15819 \begin_inset Flex Code
15822 \begin_layout Plain Layout
15829 \begin_inset Quotes erd
15832 , the floats will be numbered within chapters.
15836 \begin_layout Description
15837 \begin_inset Flex Code
15840 \begin_layout Plain Layout
15847 \begin_inset Flex Code
15850 \begin_layout Plain Layout
15857 \begin_inset Quotes erd
15861 \begin_inset Quotes erd
15864 ] The default placement for the given class of floats.
15865 The string should be as in standard LaTeX:
15866 \begin_inset Flex Code
15869 \begin_layout Plain Layout
15876 \begin_inset Flex Code
15879 \begin_layout Plain Layout
15886 \begin_inset Flex Code
15889 \begin_layout Plain Layout
15896 \begin_inset Flex Code
15899 \begin_layout Plain Layout
15905 for top, bottom, page, and here, respectively.
15909 \begin_layout Plain Layout
15910 Note that the order of these letters in the string is irrelevant, like in
15916 On top of that there is a new type,
15917 \begin_inset Flex Code
15920 \begin_layout Plain Layout
15926 , which does not really correspond to a float, since it means: put it
15927 \begin_inset Quotes eld
15931 \begin_inset Quotes erd
15935 Note however that the
15936 \begin_inset Flex Code
15939 \begin_layout Plain Layout
15945 specifier is special and, because of implementation details, cannot be
15946 used in non-built in float types.
15947 If you do not understand what this means, just use
15948 \begin_inset Quotes eld
15952 \begin_inset Flex Code
15955 \begin_layout Plain Layout
15962 \begin_inset Quotes erd
15968 \begin_layout Description
15969 \begin_inset Flex Code
15972 \begin_layout Plain Layout
15979 \begin_inset Flex Code
15982 \begin_layout Plain Layout
15988 ] The prefix to use when creating labels referring to floats of this type.
15989 This allows the use of formatted references.
15990 Note that you can remove any
15991 \begin_inset Flex Code
15994 \begin_layout Plain Layout
16000 set by a copied style by using the special value
16001 \begin_inset Quotes eld
16005 \begin_inset Quotes erd
16008 , which must be all caps.
16011 \begin_layout Description
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Quotes erd
16036 \begin_inset Quotes erd
16039 ] The style used when defining the float using
16040 \begin_inset Flex Code
16043 \begin_layout Plain Layout
16054 \begin_layout Description
16055 \begin_inset Flex Code
16058 \begin_layout Plain Layout
16065 \begin_inset Flex Code
16068 \begin_layout Plain Layout
16075 \begin_inset Quotes erd
16079 \begin_inset Quotes erd
16083 \begin_inset Quotes eld
16087 \begin_inset Quotes erd
16090 of the new class of floats, like program or algorithm.
16091 After the appropriate
16092 \begin_inset Flex Code
16095 \begin_layout Plain Layout
16104 \begin_inset Flex Code
16107 \begin_layout Plain Layout
16116 \begin_inset Flex Code
16119 \begin_layout Plain Layout
16130 \begin_layout Description
16131 \begin_inset Flex Code
16134 \begin_layout Plain Layout
16141 \begin_inset Flex Code
16144 \begin_layout Plain Layout
16151 \begin_inset space \thinspace{}
16155 \begin_inset Flex Code
16158 \begin_layout Plain Layout
16166 ] Specifies whether this float is defined using the LaTeX package
16167 \begin_inset Flex Code
16170 \begin_layout Plain Layout
16176 , either by the class file, another package or on-the-fly by LyX itself.
16179 \begin_layout Standard
16180 Note that defining a float with type
16181 \begin_inset Flex Code
16184 \begin_layout Plain Layout
16192 automatically defines the corresponding counter with name
16193 \begin_inset Flex Code
16196 \begin_layout Plain Layout
16207 \begin_layout Subsection
16208 Flex insets and InsetLayout
16209 \begin_inset CommandInset label
16211 name "sub:Flex-insets-and"
16218 \begin_layout Standard
16219 Flex insets come in three different kinds:
16222 \begin_layout Itemize
16224 \begin_inset Flex Code
16227 \begin_layout Plain Layout
16233 ): These define semantic markup corresponding to such LaTeX commands as
16235 \begin_inset Flex Code
16238 \begin_layout Plain Layout
16247 \begin_inset Flex Code
16250 \begin_layout Plain Layout
16261 \begin_layout Itemize
16263 \begin_inset Flex Code
16266 \begin_layout Plain Layout
16272 ): These can be used to define custom collapsible insets, similar to TeX
16273 code, footnote, and the like.
16274 An obvious example is an endnote inset, which is defined in the
16275 \begin_inset Flex Code
16278 \begin_layout Plain Layout
16287 \begin_layout Itemize
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16298 ): For use with DocBook classes.
16301 \begin_layout Standard
16302 Flex insets are defined using the
16303 \begin_inset Flex Code
16306 \begin_layout Plain Layout
16312 tag, which shall be explained in a moment.
16315 \begin_layout Standard
16317 \begin_inset Flex Code
16320 \begin_layout Plain Layout
16326 tag also serves another function: It can be used to customize the general
16327 layout of many different types of insets.
16329 \begin_inset Flex Code
16332 \begin_layout Plain Layout
16338 can be used to customize the layout parameters for footnotes, marginal
16339 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16340 boxes, tables, algorithms, URLs, and
16341 \change_deleted -712698321 1356964515
16343 \change_inserted -712698321 1356964516
16346 s, as well as to define Flex insets.
16349 \begin_layout Standard
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16360 definition must begin with a line of the form:
16363 \begin_layout LyX-Code
16367 \begin_layout Standard
16369 \begin_inset Flex Code
16372 \begin_layout Plain Layout
16378 indicates the inset whose layout is being defined, and here there are
16379 \change_deleted -712698321 1356964888
16381 \change_inserted -712698321 1356964888
16383 \change_deleted 5863208 1334489267
16389 \begin_layout Enumerate
16390 The layout for a pre-existing inset is being modified.
16391 In this case, can be
16392 \begin_inset Flex Code
16395 \begin_layout Plain Layout
16401 any one of the following:
16402 \begin_inset Flex Code
16405 \begin_layout Plain Layout
16412 \begin_inset Flex Code
16415 \begin_layout Plain Layout
16422 \begin_inset Flex Code
16425 \begin_layout Plain Layout
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16442 \change_inserted -712698321 1356964563
16444 \begin_inset Flex Code
16447 \begin_layout Plain Layout
16449 \change_inserted -712698321 1356964560
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16480 \begin_inset Flex Code
16483 \begin_layout Plain Layout
16490 \begin_inset Flex Code
16493 \begin_layout Plain Layout
16500 \begin_inset Flex Code
16503 \begin_layout Plain Layout
16510 \begin_inset Flex Code
16513 \begin_layout Plain Layout
16520 \begin_inset Flex Code
16523 \begin_layout Plain Layout
16530 \begin_inset Flex Code
16533 \begin_layout Plain Layout
16540 \begin_inset Flex Code
16543 \begin_layout Plain Layout
16550 \begin_inset Flex Code
16553 \begin_layout Plain Layout
16560 \begin_inset Flex Code
16563 \begin_layout Plain Layout
16570 \begin_inset Flex Code
16573 \begin_layout Plain Layout
16580 \begin_inset Flex Code
16583 \begin_layout Plain Layout
16590 \change_deleted -712698321 1356964592
16592 \begin_inset Flex Code
16595 \begin_layout Plain Layout
16597 \change_deleted -712698321 1353866704
16601 \change_inserted -712698321 1353866707
16612 \begin_inset Flex Code
16615 \begin_layout Plain Layout
16622 \begin_inset Flex Code
16625 \begin_layout Plain Layout
16634 \begin_layout Enumerate
16635 The layout for a Flex inset is being defined.
16637 \begin_inset Flex Code
16640 \begin_layout Plain Layout
16646 must be of the form
16647 \begin_inset Quotes eld
16651 \begin_inset Flex Code
16654 \begin_layout Plain Layout
16661 \begin_inset Quotes erd
16665 \begin_inset Flex Code
16668 \begin_layout Plain Layout
16674 may be be any valid identifier not used by a pre-existing Flex inset.
16675 The identifier may include spaces, but in that case the whole thing must
16676 be wrapped in quotes.
16677 Note that the definition of a flex inset
16682 \begin_inset Flex Code
16685 \begin_layout Plain Layout
16691 entry, declaring which type of inset it defines.
16692 \change_inserted 5863208 1334489312
16696 \begin_layout Enumerate
16698 \change_inserted 5863208 1334492248
16699 The layout for user specific branch is being defined.
16701 \begin_inset Flex Code
16704 \begin_layout Plain Layout
16706 \change_inserted 5863208 1334489384
16712 must be of the form
16713 \begin_inset Quotes eld
16717 \begin_inset Flex Code
16720 \begin_layout Plain Layout
16722 \change_inserted 5863208 1334489392
16729 \begin_inset Quotes erd
16733 \begin_inset Flex Code
16736 \begin_layout Plain Layout
16738 \change_inserted 5863208 1334489384
16744 may be be any valid identifier of branch defined in user's document.
16745 The identifier may include spaces, but in that case the whole thing must
16746 be wrapped in quotes.
16747 The main purpose of this feature is to allow LaTeX wrapping around specific
16748 branches as user needs.
16749 \change_inserted -712698321 1356964893
16753 \begin_layout Enumerate
16755 \change_inserted -712698321 1356965125
16756 The layout of a user (or class) specific caption is being defined.
16758 \begin_inset Flex Code
16761 \begin_layout Plain Layout
16763 \change_inserted -712698321 1356964939
16769 must be of the form
16770 \begin_inset Quotes eld
16774 \begin_inset Flex Code
16777 \begin_layout Plain Layout
16779 \change_inserted -712698321 1356964943
16786 \begin_inset Quotes erd
16790 \begin_inset Flex Code
16793 \begin_layout Plain Layout
16795 \change_inserted -712698321 1356964939
16801 specifies the name of the caption as it appears in the menu.
16802 Have a look at the standard caption (
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16808 \change_inserted -712698321 1356964987
16814 ), the specific captions of the KOMA-Script classes (
16815 \begin_inset Flex Code
16818 \begin_layout Plain Layout
16820 \change_inserted -712698321 1356965018
16827 \begin_inset Flex Code
16830 \begin_layout Plain Layout
16832 \change_inserted -712698321 1356965021
16843 \begin_inset Flex Code
16846 \begin_layout Plain Layout
16848 \change_inserted -712698321 1356965045
16854 ) for applications.
16859 \begin_layout Standard
16861 \begin_inset Flex Code
16864 \begin_layout Plain Layout
16870 definition can contain the following entries:
16873 \begin_layout Description
16875 \change_inserted -712698321 1353681390
16876 \begin_inset Flex Code
16879 \begin_layout Plain Layout
16881 \change_inserted -712698321 1353681344
16888 \begin_inset Flex Code
16891 \begin_layout Plain Layout
16893 \change_inserted -712698321 1353681344
16899 ] Defines argument number <int> of a command\SpecialChar \slash{}
16900 environment associated with
16901 the current layout.
16902 The definition must end with
16903 \begin_inset Flex Code
16906 \begin_layout Plain Layout
16908 \change_inserted -712698321 1353681344
16916 \begin_inset space ~
16920 \begin_inset CommandInset ref
16922 reference "sub:Paragraph-Styles"
16929 \begin_layout Description
16931 \change_inserted -195340706 1333913893
16932 \begin_inset Flex Code
16935 \begin_layout Plain Layout
16941 Preamble for changing languages.
16943 \begin_inset space ~
16947 \begin_inset CommandInset ref
16949 reference "sub:I18n"
16956 \begin_layout Description
16957 \begin_inset Flex Code
16960 \begin_layout Plain Layout
16967 \begin_inset Flex Code
16970 \begin_layout Plain Layout
16976 ] The color for the inset's background.
16978 \begin_inset space ~
16982 \begin_inset CommandInset ref
16984 reference "chap:Names-of-colors"
16988 for a list of the available color names.
16991 \begin_layout Description
16992 \begin_inset Flex Code
16995 \begin_layout Plain Layout
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17014 \begin_inset space \thinspace{}
17018 \begin_inset Flex Code
17021 \begin_layout Plain Layout
17027 ] Whether to use the content of the inset as the label, when the inset is
17032 \begin_layout Description
17033 \begin_inset Flex Code
17036 \begin_layout Plain Layout
17043 \begin_inset Flex Code
17046 \begin_layout Plain Layout
17052 ] As with paragraph styles, see sec.
17053 \begin_inset space ~
17057 \begin_inset CommandInset ref
17059 reference "sub:Paragraph-Styles"
17064 Note that you need to specify the complete type, e.
17065 \begin_inset space \thinspace{}
17069 \begin_inset space ~
17073 \begin_inset Flex Code
17076 \begin_layout Plain Layout
17077 CopyStyle Flex:<name>
17085 \begin_layout Description
17086 \begin_inset Flex Code
17089 \begin_layout Plain Layout
17096 \begin_inset Flex Code
17099 \begin_layout Plain Layout
17108 \begin_inset space \thinspace{}
17112 \begin_inset Flex Code
17115 \begin_layout Plain Layout
17121 ] Indicates whether the user may employ the Paragraph Settings dialog to
17122 customize the paragraph.
17125 \begin_layout Description
17126 \begin_inset Flex Code
17129 \begin_layout Plain Layout
17136 \begin_inset Flex Code
17139 \begin_layout Plain Layout
17146 \begin_inset Flex Code
17149 \begin_layout Plain Layout
17156 \begin_inset Flex Code
17159 \begin_layout Plain Layout
17165 , describing the rendering style used for the inset's frame and buttons.
17166 Footnotes generally use
17167 \begin_inset Flex Code
17170 \begin_layout Plain Layout
17176 , ERT insets generally
17177 \begin_inset Flex Code
17180 \begin_layout Plain Layout
17186 , and character styles
17187 \begin_inset Flex Code
17190 \begin_layout Plain Layout
17199 \begin_layout Description
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17210 \begin_inset Flex Code
17213 \begin_layout Plain Layout
17222 \begin_inset space \thinspace{}
17228 \begin_inset Flex Code
17231 \begin_layout Plain Layout
17240 \begin_inset Flex Code
17243 \begin_layout Plain Layout
17250 \begin_inset Flex Code
17253 \begin_layout Plain Layout
17260 Indicates whether the environment will stand on its own in the output or
17261 will appear inline with the surrounding text.
17262 If set to false, it is supposed that the LaTeX environment ignores white
17263 space (including one newline character) after the
17264 \begin_inset Flex Code
17267 \begin_layout Plain Layout
17280 \begin_inset Flex Code
17283 \begin_layout Plain Layout
17299 \begin_layout Description
17300 \begin_inset Flex Code
17303 \begin_layout Plain Layout
17309 Required at the end of the
17310 \begin_inset Flex Code
17313 \begin_layout Plain Layout
17322 \begin_layout Description
17323 \begin_inset Flex Code
17326 \begin_layout Plain Layout
17332 The font used for both the text body
17338 \begin_inset space ~
17342 \begin_inset CommandInset ref
17344 reference "sub:Font-description"
17349 Note that defining this font automatically defines the
17350 \begin_inset Flex Code
17353 \begin_layout Plain Layout
17359 to the same value, so define this first and define
17360 \begin_inset Flex Code
17363 \begin_layout Plain Layout
17369 later if you want them to be different.
17370 \change_inserted 155139281 1354130923
17374 \begin_layout Description
17376 \change_inserted 155139281 1354130923
17377 \begin_inset Flex Code
17380 \begin_layout Plain Layout
17382 \change_inserted 155139281 1354130923
17383 ForceLocalFontSwitch
17389 \begin_inset Flex Code
17392 \begin_layout Plain Layout
17394 \change_inserted 155139281 1354130923
17403 \begin_inset Flex Code
17406 \begin_layout Plain Layout
17408 \change_inserted 155139281 1354130923
17414 ] When using babel, always use a local font switch (
17415 \begin_inset Flex Code
17418 \begin_layout Plain Layout
17420 \change_inserted 155139281 1354130923
17428 ), never a global one (such as
17429 \begin_inset Flex Code
17432 \begin_layout Plain Layout
17434 \change_inserted 155139281 1354130923
17447 \begin_layout Description
17448 \begin_inset Flex Code
17451 \begin_layout Plain Layout
17458 \begin_inset Flex Code
17461 \begin_layout Plain Layout
17470 \begin_inset space \thinspace{}
17474 \begin_inset Flex Code
17477 \begin_layout Plain Layout
17484 \begin_inset Quotes eld
17488 \begin_inset Quotes erd
17491 language, leading to Left-to-Right (Latin) output, e.
17492 \begin_inset space \thinspace{}
17496 \begin_inset space \space{}
17499 in TeX code or URL.
17503 \begin_layout Description
17504 \begin_inset Flex Code
17507 \begin_layout Plain Layout
17514 \begin_inset Flex Code
17517 \begin_layout Plain Layout
17526 \begin_inset space \thinspace{}
17530 \begin_inset Flex Code
17533 \begin_layout Plain Layout
17539 ] Indicates whether the
17540 \begin_inset Flex Code
17543 \begin_layout Plain Layout
17549 should be used or, instead, the user can change the paragraph style used
17554 \begin_layout Description
17555 \begin_inset Flex Code
17558 \begin_layout Plain Layout
17565 \begin_inset Flex Code
17568 \begin_layout Plain Layout
17577 \begin_inset space \thinspace{}
17581 \begin_inset Flex Code
17584 \begin_layout Plain Layout
17590 ] As with paragraph styles, see sec.
17591 \begin_inset space ~
17595 \begin_inset CommandInset ref
17597 reference "sub:Paragraph-Styles"
17604 \begin_layout Description
17605 \begin_inset Flex Code
17608 \begin_layout Plain Layout
17614 These tags control the XHTML output.
17616 \begin_inset space ~
17620 \begin_inset CommandInset ref
17622 reference "sec:Tags-for-XHTML"
17629 \begin_layout Description
17630 \begin_inset Flex Code
17633 \begin_layout Plain Layout
17640 \begin_inset Flex Code
17643 \begin_layout Plain Layout
17652 \begin_inset space \thinspace{}
17656 \begin_inset Flex Code
17659 \begin_layout Plain Layout
17665 ] Whether to include the contents of this inset in the strings generated
17666 for the `Outline' pane.
17667 One would not, for example, want the content of a footnote in a section
17668 header to be included in the TOC displayed in the outline, but one would
17669 normally want the content of a character style displayed.
17670 Default is false: not to include.
17673 \begin_layout Description
17674 \begin_inset Flex Code
17677 \begin_layout Plain Layout
17686 \begin_inset Flex Code
17689 \begin_layout Plain Layout
17698 \begin_inset space \thinspace{}
17702 \begin_inset Flex Code
17705 \begin_layout Plain Layout
17711 ] As with paragraph styles, see sec.
17712 \begin_inset space ~
17716 \begin_inset CommandInset ref
17718 reference "sub:Paragraph-Styles"
17725 \begin_layout Description
17726 \begin_inset Flex Code
17729 \begin_layout Plain Layout
17735 The font used for the label.
17737 \begin_inset space ~
17741 \begin_inset CommandInset ref
17743 reference "sub:Font-description"
17748 Note that this definition can never appear before
17749 \begin_inset Flex Code
17752 \begin_layout Plain Layout
17758 , lest it be ineffective.
17761 \begin_layout Description
17762 \begin_inset Flex Code
17765 \begin_layout Plain Layout
17772 \begin_inset Flex Code
17775 \begin_layout Plain Layout
17782 \begin_inset Quotes erd
17786 \begin_inset Quotes erd
17789 ] What will be displayed on the button or elsewhere as the inset label.
17791 \begin_inset Flex Code
17794 \begin_layout Plain Layout
17801 \begin_inset Flex Code
17804 \begin_layout Plain Layout
17810 ) modify this label on the fly.
17813 \begin_layout Description
17815 \change_inserted -195340706 1333913893
17816 \begin_inset Flex Code
17819 \begin_layout Plain Layout
17825 Language dependent preamble.
17827 \begin_inset space ~
17831 \begin_inset CommandInset ref
17833 reference "sub:I18n"
17840 \begin_layout Description
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17851 \begin_inset Flex Code
17854 \begin_layout Plain Layout
17860 ] The name of the corresponding LaTeX stuff.
17861 Either the environment or command name.
17864 \begin_layout Description
17865 \begin_inset Flex Code
17868 \begin_layout Plain Layout
17875 \begin_inset Flex Code
17878 \begin_layout Plain Layout
17884 ] The optional parameter for the corresponding
17885 \begin_inset Flex Code
17888 \begin_layout Plain Layout
17894 stuff, including possible bracket pairs like
17895 \begin_inset Flex Code
17898 \begin_layout Plain Layout
17906 \change_inserted -712698321 1355144715
17907 This will be output as is after all LaTeX
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17913 \change_inserted -712698321 1355144713
17922 This parameter cannot be changed from within LyX
17923 \change_inserted -712698321 1355144775
17925 \begin_inset Flex Code
17928 \begin_layout Plain Layout
17930 \change_inserted -712698321 1355144747
17936 for customizable parameters)
17941 \begin_layout Description
17942 \begin_inset Flex Code
17945 \begin_layout Plain Layout
17952 \begin_inset Flex Code
17955 \begin_layout Plain Layout
17957 \change_deleted -712698321 1353867544
17964 Command, Environment,
17965 \change_inserted -712698321 1353867573
17967 \change_deleted -712698321 1353867557
17976 \begin_inset Flex Code
17979 \begin_layout Plain Layout
17981 \change_deleted -712698321 1353867564
17985 \change_deleted -712698321 1353867569
17993 ] How the style should be translated into LaTeX.
17997 \begin_layout Plain Layout
17998 \begin_inset Flex Code
18001 \begin_layout Plain Layout
18007 is perhaps a bit misleading, since these rules apply to SGML classes, too.
18008 Visit the SGML class files for specific examples.
18017 \begin_layout Description
18018 \begin_inset Flex Code
18021 \begin_layout Plain Layout
18023 \change_deleted -712698321 1353867582
18025 \change_inserted -712698321 1353867583
18033 means nothing special.
18037 \begin_layout Description
18038 \begin_inset Flex Code
18041 \begin_layout Plain Layout
18048 \begin_inset Flex Code
18051 \begin_layout Plain Layout
18058 {\SpecialChar \ldots{}
18067 \begin_layout Description
18068 \begin_inset Flex Code
18071 \begin_layout Plain Layout
18078 \begin_inset Flex Code
18081 \begin_layout Plain Layout
18088 }\SpecialChar \ldots{}
18104 \begin_layout Description
18106 \change_deleted -712698321 1353867600
18107 \begin_inset Flex Code
18110 \begin_layout Plain Layout
18117 \begin_inset Flex Code
18120 \begin_layout Plain Layout
18127 \begin_inset Flex Code
18130 \begin_layout Plain Layout
18138 is generated for each paragraph of this environment.
18142 \begin_layout Description
18144 \change_deleted -712698321 1353867600
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18174 is passed as an argument to the environment.
18176 \begin_inset Flex Code
18179 \begin_layout Plain Layout
18185 can be defined in the
18186 \begin_inset Flex MenuItem
18189 \begin_layout Plain Layout
18194 \SpecialChar \menuseparator
18200 \begin_inset space ~
18214 \begin_layout Standard
18215 Putting the last few things together, the LaTeX output will be either:
18218 \begin_layout LyX-Code
18222 \change_deleted 2090807402 1356919073
18224 \change_inserted 2090807402 1356919073
18228 \change_deleted 2090807402 1356919073
18230 \change_inserted 2090807402 1356919002
18233 ]{\SpecialChar \ldots{}
18237 \begin_layout Standard
18241 \begin_layout LyX-Code
18245 \change_deleted 2090807402 1356919013
18247 \change_inserted 2090807402 1356919014
18251 \change_deleted 2090807402 1356919013
18253 \change_inserted 2090807402 1356919008
18256 ] \SpecialChar \ldots{}
18260 \change_deleted 2090807402 1356919016
18262 \change_inserted 2090807402 1356919016
18268 \begin_layout Standard
18269 depending upon the LaTeX type.
18273 \begin_layout Description
18275 \change_inserted -712698321 1354263128
18276 \begin_inset Flex Code
18279 \begin_layout Plain Layout
18281 \change_inserted -712698321 1353866742
18290 \begin_inset Flex Code
18293 \begin_layout Plain Layout
18295 \change_inserted -712698321 1353866752
18301 ] A string that is put at the beginning of the layout content.
18302 A line break in the output can be indicated by
18303 \begin_inset Flex Code
18306 \begin_layout Plain Layout
18308 \change_inserted -712698321 1354263128
18319 \begin_layout Description
18320 \begin_inset Flex Code
18323 \begin_layout Plain Layout
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18350 \begin_inset Flex Code
18353 \begin_layout Plain Layout
18360 \begin_inset Flex Code
18363 \begin_layout Plain Layout
18369 (indicating a dummy definition ending definitions of charstyles, etc).
18370 This entry is required in and is only meaningful for Flex insets.
18371 Among other things, it determines on which menu this inset will appear.
18373 \begin_inset Flex Code
18376 \begin_layout Plain Layout
18383 \begin_inset Flex Code
18386 \begin_layout Plain Layout
18392 will automatically set
18393 \begin_inset Flex Code
18396 \begin_layout Plain Layout
18404 \begin_inset Flex Code
18407 \begin_layout Plain Layout
18413 can be set to true for
18414 \begin_inset Flex Code
18417 \begin_layout Plain Layout
18423 insets by setting it
18428 \begin_inset Flex Code
18431 \begin_layout Plain Layout
18440 \begin_layout Description
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18451 \begin_inset Flex Code
18454 \begin_layout Plain Layout
18463 \begin_inset space \thinspace{}
18467 \begin_inset Flex Code
18470 \begin_layout Plain Layout
18476 ] Whether multiple paragraphs are permitted in this inset.
18478 \begin_inset Flex Code
18481 \begin_layout Plain Layout
18487 to the same value and
18488 \begin_inset Flex Code
18491 \begin_layout Plain Layout
18497 to the opposite value.
18498 These can be reset to other values, if they are used
18503 \begin_inset Flex Code
18506 \begin_layout Plain Layout
18516 \begin_layout Description
18517 \begin_inset Flex Code
18520 \begin_layout Plain Layout
18527 \begin_inset Flex Code
18530 \begin_layout Plain Layout
18539 \begin_inset space \thinspace{}
18543 \begin_inset Flex Code
18546 \begin_layout Plain Layout
18552 ] Whether fragile commands in this inset should be
18553 \begin_inset Flex Code
18556 \begin_layout Plain Layout
18569 whether the command should itself be protected.) Default is false.
18570 \change_inserted 1414654397 1360681873
18574 \begin_layout Description
18576 \change_inserted 1414654397 1360681892
18577 \begin_inset Flex Code
18580 \begin_layout Plain Layout
18582 \change_inserted 1414654397 1360681880
18589 \begin_inset Flex Code
18592 \begin_layout Plain Layout
18594 \change_inserted 1414654397 1360681883
18600 ] Deletes an existing
18601 \begin_inset Flex Code
18604 \begin_layout Plain Layout
18606 \change_inserted 1414654397 1360681892
18617 \begin_layout Description
18618 \begin_inset Flex Code
18621 \begin_layout Plain Layout
18628 \begin_inset Flex Code
18631 \begin_layout Plain Layout
18640 \begin_inset space \thinspace{}
18644 \begin_inset Flex Code
18647 \begin_layout Plain Layout
18653 ] As with paragraph styles, see sec.
18654 \begin_inset space ~
18658 \begin_inset CommandInset ref
18660 reference "sub:Paragraph-Styles"
18668 \begin_layout Description
18669 \begin_inset Flex Code
18672 \begin_layout Plain Layout
18679 \begin_inset Flex Code
18682 \begin_layout Plain Layout
18691 \begin_inset space \thinspace{}
18695 \begin_inset Flex Code
18698 \begin_layout Plain Layout
18704 ] As with paragraph styles, see sec.
18705 \begin_inset space ~
18709 \begin_inset CommandInset ref
18711 reference "sub:Paragraph-Styles"
18719 \begin_layout Description
18720 \begin_inset Flex Code
18723 \begin_layout Plain Layout
18729 As with paragraph styles, see sec.
18730 \begin_inset space ~
18734 \begin_inset CommandInset ref
18736 reference "sub:Paragraph-Styles"
18743 \begin_layout Description
18744 \begin_inset Flex Code
18747 \begin_layout Plain Layout
18754 \begin_inset Flex Code
18757 \begin_layout Plain Layout
18763 ] The prefix to use when creating labels referring to insets of this type.
18764 This allows the use of formatted references.
18767 \begin_layout Description
18768 \begin_inset Flex Code
18771 \begin_layout Plain Layout
18778 \begin_inset Flex Code
18781 \begin_layout Plain Layout
18787 ] As with paragraph styles, see sec.
18788 \begin_inset space ~
18792 \begin_inset CommandInset ref
18794 reference "sub:Paragraph-Styles"
18799 \change_inserted -712698321 1354439699
18803 \begin_layout Description
18805 \change_inserted -712698321 1354439705
18806 \begin_inset Flex Code
18809 \begin_layout Plain Layout
18811 \change_inserted -712698321 1354439699
18818 \begin_inset Flex Code
18821 \begin_layout Plain Layout
18823 \change_inserted -712698321 1354439699
18832 \begin_inset Flex Code
18835 \begin_layout Plain Layout
18837 \change_inserted -712698321 1354439699
18843 ] Resets the LaTeX arguments of this layout (as defined via the
18844 \begin_inset Flex Code
18847 \begin_layout Plain Layout
18849 \change_inserted -712698321 1354439699
18856 This is useful if you have copied a style via
18857 \begin_inset Flex Code
18860 \begin_layout Plain Layout
18862 \change_inserted -712698321 1354439699
18868 , but you do not want to inherit its (required and optional) arguments.
18870 \change_deleted -712698321 1354439698
18876 \begin_layout Description
18877 \begin_inset Flex Code
18880 \begin_layout Plain Layout
18887 \begin_inset Flex Code
18890 \begin_layout Plain Layout
18897 \begin_inset space \thinspace{}
18901 \begin_inset Flex Code
18904 \begin_layout Plain Layout
18912 ] Whether this inset should use the font of its surrounding environment
18914 Default is true: uses its own.
18917 \begin_layout Description
18919 \change_inserted -712698321 1354263134
18920 \begin_inset Flex Code
18923 \begin_layout Plain Layout
18925 \change_inserted -712698321 1353866810
18932 \begin_inset Flex Code
18935 \begin_layout Plain Layout
18937 \change_inserted -712698321 1353866806
18943 ] A string that is put at the end of the layout content.
18944 A line break in the output can be indicated by
18945 \begin_inset Flex Code
18948 \begin_layout Plain Layout
18950 \change_inserted -712698321 1354263134
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 space \thinspace{}
18986 \begin_inset Flex Code
18989 \begin_layout Plain Layout
18997 ] Allow spell-checking the contents of this inset.
19001 \begin_layout Subsection
19003 \begin_inset CommandInset label
19005 name "sub:Counters"
19012 \begin_layout Standard
19013 It is necessary to define the counters (
19014 \begin_inset Flex MenuItem
19017 \begin_layout Plain Layout
19024 \begin_inset Flex MenuItem
19027 \begin_layout Plain Layout
19033 , \SpecialChar \ldots{}
19034 ) in the text class itself.
19035 The standard counters are defined in the file
19036 \begin_inset Flex Code
19039 \begin_layout Plain Layout
19045 , so you may have to do no more than add
19048 \begin_layout LyX-Code
19049 Input stdcounters.inc
19052 \begin_layout Standard
19053 to your layout file to get them to work.
19054 But if you want to define custom counters, then you can do so.
19055 The counter declaration must begin with:
19058 \begin_layout LyX-Code
19059 Counter CounterName
19062 \begin_layout Standard
19064 \begin_inset Flex Code
19067 \begin_layout Plain Layout
19073 ' is replaced by the name of the counter.
19074 And it must end with
19075 \begin_inset Quotes eld
19079 \begin_inset Flex Code
19082 \begin_layout Plain Layout
19089 \begin_inset Quotes erd
19093 The following parameters can also be used:
19096 \begin_layout Description
19097 \begin_inset Flex Code
19100 \begin_layout Plain Layout
19107 \begin_inset Flex Code
19110 \begin_layout Plain Layout
19117 \begin_inset Quotes erd
19121 \begin_inset Quotes erd
19124 ] When defined, this string defines how the counter is displayed.
19125 Setting this value sets
19126 \begin_inset Flex Code
19129 \begin_layout Plain Layout
19130 LabelStringAppendix
19136 The following special constructs can be used in the string:
19140 \begin_layout Itemize
19141 \begin_inset Flex Code
19144 \begin_layout Plain Layout
19152 will be replaced by the expansion of the
19153 \begin_inset Flex Code
19156 \begin_layout Plain Layout
19163 \begin_inset Flex Code
19166 \begin_layout Plain Layout
19167 LabelStringAppendix
19173 \begin_inset Flex Code
19176 \begin_layout Plain Layout
19186 \begin_layout Itemize
19187 counter values can be expressed using LaTeX-like macros
19188 \begin_inset Newline newline
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19212 \begin_inset Flex Code
19215 \begin_layout Plain Layout
19227 \begin_layout Plain Layout
19237 Actually, the situation is a bit more complicated: any
19256 other than those described below will produce arabic numerals.
19257 It would not be surprising to see this change in the future.
19263 \begin_inset Flex Code
19266 \begin_layout Plain Layout
19272 : 1, 2, 3,\SpecialChar \ldots{}
19274 \begin_inset Flex Code
19277 \begin_layout Plain Layout
19283 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19285 \begin_inset Flex Code
19288 \begin_layout Plain Layout
19294 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19296 \begin_inset Flex Code
19299 \begin_layout Plain Layout
19305 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19307 \begin_inset Flex Code
19310 \begin_layout Plain Layout
19316 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19318 \begin_inset Flex Code
19321 \begin_layout Plain Layout
19327 for hebrew numerals.
19331 \begin_layout Standard
19332 If LabelString is not defined, a default value is constructed as follows:
19333 if the counter has a master counter
19334 \begin_inset Flex Code
19337 \begin_layout Plain Layout
19344 \begin_inset Flex Code
19347 \begin_layout Plain Layout
19354 \begin_inset Newline newline
19358 \begin_inset Flex Code
19361 \begin_layout Plain Layout
19371 is used; otherwise the string
19372 \begin_inset Flex Code
19375 \begin_layout Plain Layout
19386 \begin_layout Description
19387 \begin_inset Flex Code
19390 \begin_layout Plain Layout
19391 LabelStringAppendix
19397 \begin_inset Flex Code
19400 \begin_layout Plain Layout
19407 \begin_inset Quotes erd
19411 \begin_inset Quotes erd
19415 \begin_inset Flex Code
19418 \begin_layout Plain Layout
19424 , but for use in the Appendix.
19427 \begin_layout Description
19428 \begin_inset Flex Code
19431 \begin_layout Plain Layout
19438 \begin_inset Flex Code
19441 \begin_layout Plain Layout
19448 \begin_inset Quotes erd
19452 \begin_inset Quotes erd
19455 ] A format for use with formatted references to this counter.
19456 For example, one might want to have references to section numbers appear
19458 \begin_inset Quotes eld
19462 \begin_inset Quotes erd
19466 The string should contain
19467 \begin_inset Quotes eld
19471 \begin_inset Quotes erd
19475 This will be replaced by the counter number itself.
19476 So, for sections, it would be: Section ##.
19479 \begin_layout Description
19480 \begin_inset Flex Code
19483 \begin_layout Plain Layout
19490 \begin_inset Flex Code
19493 \begin_layout Plain Layout
19500 \begin_inset Quotes erd
19504 \begin_inset Quotes erd
19507 ] If this is set to the name of another counter, the present counter will
19508 be reset every time the other one is increased.
19510 \begin_inset Flex Code
19513 \begin_layout Plain Layout
19520 \begin_inset Flex Code
19523 \begin_layout Plain Layout
19532 \begin_layout Subsection
19534 \begin_inset CommandInset label
19536 name "sub:Font-description"
19543 \begin_layout Standard
19544 A font description looks like this:
19547 \begin_layout LyX-Code
19561 \begin_layout LyX-Code
19565 \begin_layout LyX-Code
19569 \begin_layout Standard
19570 The following commands are available:
19573 \begin_layout Description
19574 \begin_inset Flex Code
19577 \begin_layout Plain Layout
19584 \begin_inset Flex Code
19587 \begin_layout Plain Layout
19596 \begin_inset Flex Code
19599 \begin_layout Plain Layout
19606 \begin_inset Flex Code
19609 \begin_layout Plain Layout
19616 \begin_inset Flex Code
19619 \begin_layout Plain Layout
19626 \begin_inset Flex Code
19629 \begin_layout Plain Layout
19636 \begin_inset Flex Code
19639 \begin_layout Plain Layout
19646 \begin_inset Flex Code
19649 \begin_layout Plain Layout
19656 \begin_inset Flex Code
19659 \begin_layout Plain Layout
19666 \begin_inset Flex Code
19669 \begin_layout Plain Layout
19678 \begin_layout Description
19679 \begin_inset Flex Code
19682 \begin_layout Plain Layout
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19701 \begin_inset Flex Code
19704 \begin_layout Plain Layout
19711 \begin_inset Flex Code
19714 \begin_layout Plain Layout
19723 \begin_layout Description
19724 \begin_inset Flex Code
19727 \begin_layout Plain Layout
19734 \begin_inset Flex Code
19737 \begin_layout Plain Layout
19743 ] Valid arguments are:
19744 \begin_inset Flex Code
19747 \begin_layout Plain Layout
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19774 \begin_inset Flex Code
19777 \begin_layout Plain Layout
19784 \begin_inset Flex Code
19787 \begin_layout Plain Layout
19794 \begin_inset Flex Code
19797 \begin_layout Plain Layout
19804 \begin_inset Flex Code
19807 \begin_layout Plain Layout
19814 \begin_inset Flex Code
19817 \begin_layout Plain Layout
19824 \begin_inset Flex Code
19827 \begin_layout Plain Layout
19834 \begin_inset Flex Code
19837 \begin_layout Plain Layout
19844 \begin_inset Flex Code
19847 \begin_layout Plain Layout
19854 \begin_inset Flex Code
19857 \begin_layout Plain Layout
19864 Each of these turns on or off the corresponding attribute.
19866 \begin_inset Flex Code
19869 \begin_layout Plain Layout
19875 turns on emphasis, and
19876 \begin_inset Flex Code
19879 \begin_layout Plain Layout
19887 \begin_inset Newline newline
19890 If the latter seems puzzling, remember that the font settings for the present
19891 context are generally inherited from the surrounding context.
19893 \begin_inset Flex Code
19896 \begin_layout Plain Layout
19902 would turn off the emphasis that was anyway in effect, say, in a theorem
19906 \begin_layout Description
19907 \begin_inset Flex Code
19910 \begin_layout Plain Layout
19917 \begin_inset Flex Code
19920 \begin_layout Plain Layout
19929 \begin_inset Flex Code
19932 \begin_layout Plain Layout
19941 \begin_layout Description
19942 \begin_inset Flex Code
19945 \begin_layout Plain Layout
19952 \begin_inset Flex Code
19955 \begin_layout Plain Layout
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19996 \begin_layout Description
19997 \begin_inset Flex Code
20000 \begin_layout Plain Layout
20007 \begin_inset Flex Code
20010 \begin_layout Plain Layout
20017 \begin_inset Flex Code
20020 \begin_layout Plain Layout
20027 \begin_inset Flex Code
20030 \begin_layout Plain Layout
20039 \begin_inset Flex Code
20042 \begin_layout Plain Layout
20049 \begin_inset Flex Code
20052 \begin_layout Plain Layout
20059 \begin_inset Flex Code
20062 \begin_layout Plain Layout
20069 \begin_inset Flex Code
20072 \begin_layout Plain Layout
20079 \begin_inset Flex Code
20082 \begin_layout Plain Layout
20091 \begin_layout Subsection
20092 \begin_inset CommandInset label
20094 name "sub:Citation-format-description"
20098 Citation format description
20101 \begin_layout Standard
20103 \begin_inset Flex Code
20106 \begin_layout Plain Layout
20112 blocks are used to describe how bibliographic information should be displayed,
20113 both within LyX itself (in the citation dialog and in tooltips, for example)
20114 and in XHTML output.
20115 Such a block might look like this:
20118 \begin_layout LyX-Code
20122 \begin_layout LyX-Code
20126 \begin_layout LyX-Code
20130 \begin_layout LyX-Code
20134 \begin_layout Standard
20135 The individual lines define how the bibliographic information associated
20136 with an article or book, respectively, is to be displayed, and such a definitio
20137 n can be given for any `entry type' that might be present in a BibTeX file.
20138 LyX defines a default format in the source code that will be used if no
20139 specific definition has been given.
20140 LyX predefines several formats in the file
20141 \begin_inset Flex Code
20144 \begin_layout Plain Layout
20150 , which is included in most of LyX's document classes.
20153 \begin_layout Standard
20154 The definitions use a simple language that allows BibTeX keys to be replaced
20156 Keys should be enclosed in
20157 \begin_inset Flex Code
20160 \begin_layout Plain Layout
20167 \begin_inset Flex Code
20170 \begin_layout Plain Layout
20177 So a simple definition might look like this:
20180 \begin_layout LyX-Code
20182 \begin_inset Quotes eld
20186 \begin_inset Quotes erd
20192 \begin_layout Standard
20193 This would print the author, followed by a comma, followed by the title,
20194 in quotes, followed by a period.
20197 \begin_layout Standard
20198 Of course, sometimes you may want to print a key only if it exists.
20199 This can be done by using a conditional construction, such as:
20200 \begin_inset Flex Code
20203 \begin_layout Plain Layout
20205 \begin_inset space ~
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20224 key exists, then print
20225 \begin_inset Quotes eld
20229 \begin_inset space ~
20233 \begin_inset Quotes erd
20236 followed by the volume key.
20237 It is also possible to have an else clause in the conditional, such as:
20238 \begin_inset Newline newline
20242 \begin_inset Flex Code
20245 \begin_layout Plain Layout
20246 {%author%[[%author%]][[%editor%, ed.]]}
20252 \begin_inset Newline newline
20256 \begin_inset Flex Code
20259 \begin_layout Plain Layout
20265 key is printed if it exists; otherwise, the editor key is printed, followed
20267 \begin_inset Quotes eld
20271 \begin_inset space ~
20275 \begin_inset Quotes erd
20278 Note that the key is again enclosed in
20279 \begin_inset Flex Code
20282 \begin_layout Plain Layout
20288 signs; the entire conditional is enclosed in braces; and the if and else
20289 clauses are enclosed in double brackets,
20290 \begin_inset Quotes eld
20294 \begin_inset Flex Code
20297 \begin_layout Plain Layout
20304 \begin_inset Quotes eld
20308 \begin_inset Quotes eld
20312 \begin_inset Flex Code
20315 \begin_layout Plain Layout
20322 \begin_inset Quotes erd
20326 There must be no space between any of these.
20329 \begin_layout Standard
20330 There is one other piece of syntax available in definitions, which looks
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20342 This defines a piece of formatting information that is to be used when
20344 \begin_inset Quotes eld
20348 \begin_inset Quotes erd
20352 Obviously, we do not want to output HTML tags when writing plain text,
20353 so they should be wrapped in
20354 \begin_inset Quotes eld
20358 \begin_inset Quotes erd
20362 \begin_inset Quotes eld
20366 \begin_inset Quotes erd
20372 \begin_layout Standard
20373 Two special sorts of definitions are also possible in a
20374 \begin_inset Flex Code
20377 \begin_layout Plain Layout
20384 An example of the first would be:
20387 \begin_layout LyX-Code
20389 \begin_inset Quotes eld
20393 \begin_inset Quotes erd
20399 \begin_layout Standard
20400 This is an abbreviation, or macro, and it can be used by treating it as
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20413 \begin_inset Flex Code
20416 \begin_layout Plain Layout
20422 exactly as it would treat its definition.
20423 So, let us issue the obvious
20431 \begin_layout LyX-Code
20435 \begin_layout Standard
20436 or anything like it.
20437 LyX shouldn't go into an infinite loop, but it may go into a long one before
20441 \begin_layout Standard
20442 The second sort of special definition might look like this:
20445 \begin_layout LyX-Code
20449 \begin_layout Standard
20450 This defines a translatable piece of text, which allows relevant parts of
20451 the bibliography to be translated.
20452 It can be included in a definition by treating it as a key:
20453 \begin_inset Flex Code
20456 \begin_layout Plain Layout
20463 Several of these are predefined in
20464 \begin_inset Flex Code
20467 \begin_layout Plain Layout
20474 Note that these are not macros, in the sense just defined.
20475 They will not be expanded.
20478 \begin_layout Standard
20479 So here then is an example that use all these features:
20480 \begin_inset VSpace defskip
20486 \begin_layout Standard
20490 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20493 \begin_layout Standard
20494 \begin_inset VSpace defskip
20497 This defines a macro that prints the author, followed by a comma, if the
20499 \begin_inset Flex Code
20502 \begin_layout Plain Layout
20508 key is defined, or else prints the name of the editor, followed by the
20510 \begin_inset Flex Code
20513 \begin_layout Plain Layout
20519 or its translation (it is by default
20520 \begin_inset Quotes eld
20524 \begin_inset Quotes erd
20528 \begin_inset Flex Code
20531 \begin_layout Plain Layout
20538 Note that this is in fact defined in
20539 \begin_inset Flex Code
20542 \begin_layout Plain Layout
20548 , so you can use it in your own definitions, or re-definitions, if you load
20552 \begin_layout Section
20553 \begin_inset CommandInset label
20555 name "sec:Tags-for-XHTML"
20559 Tags for XHTML output
20562 \begin_layout Standard
20563 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20564 by layout information.
20565 In general, LyX provides sensible defaults and, as mentioned earlier, it
20566 will even construct default CSS style rules from the other layout tags.
20567 For example, LyX will attempt to use the information provided in the
20568 \begin_inset Flex Code
20571 \begin_layout Plain Layout
20577 declaration for the Chapter style to write CSS that will appropriately
20578 format chapter headings.
20581 \begin_layout Standard
20582 In many cases, then, you may not have to do anything at all to get acceptable
20583 XHTML output for your own environments, custom insets, and so forth.
20584 But in some cases you will, and so LyX provides a number of layout tags
20585 that can be used to customize the XHTML and CSS that are generated.
20588 \begin_layout Standard
20589 Note that there are two tags,
20590 \begin_inset Flex Code
20593 \begin_layout Plain Layout
20600 \begin_inset Flex Code
20603 \begin_layout Plain Layout
20609 that may appear outside style and inset declarations.
20611 \begin_inset CommandInset ref
20613 reference "sub:General-text-class"
20617 for details on these.
20620 \begin_layout Subsection
20621 \begin_inset CommandInset label
20623 name "sub:Paragraph-Style-XHTML"
20630 \begin_layout Standard
20631 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20632 dealing with a normal paragraph, a command, or an environment, where this
20633 is itself determined by the contents of the corresponding
20634 \begin_inset Flex Code
20637 \begin_layout Plain Layout
20647 \begin_layout Standard
20648 For a command or normal paragraph, the output XHTML has the following form:
20651 \begin_layout LyX-Code
20653 \begin_inset Quotes erd
20657 \begin_inset Quotes erd
20663 \begin_layout LyX-Code
20665 \begin_inset Quotes erd
20669 \begin_inset Quotes erd
20675 \begin_layout LyX-Code
20676 Contents of the paragraph.
20679 \begin_layout LyX-Code
20683 \begin_layout Standard
20684 The label tags are of course omitted if the paragraph does not have a label.
20687 \begin_layout Standard
20688 For an environment that is not some sort of list, the XHTML takes this form:
20691 \begin_layout LyX-Code
20693 \begin_inset Quotes erd
20697 \begin_inset Quotes erd
20703 \begin_layout LyX-Code
20705 \begin_inset Quotes erd
20709 \begin_inset Quotes erd
20713 \begin_inset Quotes erd
20717 \begin_inset Quotes erd
20720 >Environment Label</labeltag>First paragraph.</itemtag>
20723 \begin_layout LyX-Code
20724 <itemtag>Second paragraph.</itemtag>
20727 \begin_layout LyX-Code
20731 \begin_layout Standard
20732 Note that the label is output only for the first paragraph, as it should
20733 be for a theorem, for example.
20737 \begin_layout Standard
20738 For a list, we have one of these forms:
20741 \begin_layout LyX-Code
20743 \begin_inset Quotes erd
20747 \begin_inset Quotes erd
20753 \begin_layout LyX-Code
20755 \begin_inset Quotes erd
20759 \begin_inset Quotes erd
20763 \begin_inset Quotes erd
20767 \begin_inset Quotes erd
20770 >List Label</labeltag>First item.</itemtag>
20773 \begin_layout LyX-Code
20775 \begin_inset Quotes erd
20779 \begin_inset Quotes erd
20783 \begin_inset Quotes erd
20787 \begin_inset Quotes erd
20790 >List Label</labeltag>Second item.</itemtag>
20793 \begin_layout LyX-Code
20797 \begin_layout LyX-Code
20801 \begin_layout LyX-Code
20803 \begin_inset Quotes erd
20807 \begin_inset Quotes erd
20813 \begin_layout LyX-Code
20815 \begin_inset Quotes erd
20819 \begin_inset Quotes erd
20822 >List Label</labeltag><itemtag attr=
20823 \begin_inset Quotes erd
20827 \begin_inset Quotes erd
20830 >First item.</itemtag>
20833 \begin_layout LyX-Code
20835 \begin_inset Quotes erd
20839 \begin_inset Quotes erd
20842 >List Label</labeltag><itemtag attr=
20843 \begin_inset Quotes erd
20847 \begin_inset Quotes erd
20850 >Second item.</itemtag>
20853 \begin_layout LyX-Code
20857 \begin_layout Standard
20858 Note the different orders of
20859 \begin_inset Flex Code
20862 \begin_layout Plain Layout
20869 \begin_inset Flex Code
20872 \begin_layout Plain Layout
20879 Which order we get depends upon the setting of
20880 \begin_inset Flex Code
20883 \begin_layout Plain Layout
20890 \begin_inset Flex Code
20893 \begin_layout Plain Layout
20899 is false (the default), you get the first of these, with the label within
20900 the item; if true, you get the second, with the label outside the item.
20903 \begin_layout Standard
20904 The specific tags and attributes output for each paragraph type can be controlle
20905 d by means of the layout tags we are about to describe.
20906 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20907 so you often may not need to do very much to get good XHTML output.
20908 Think of the available tags as there so you can tweak things to your liking.
20911 \begin_layout Description
20912 \begin_inset Flex Code
20915 \begin_layout Plain Layout
20922 \begin_inset Flex Code
20925 \begin_layout Plain Layout
20931 ] Specifies attribute information to be output with the main tag.
20933 \begin_inset Quotes eld
20937 \begin_inset Flex Code
20940 \begin_layout Plain Layout
20947 \begin_inset Quotes erd
20951 By default, LyX will output
20952 \begin_inset Quotes eld
20956 \begin_inset Flex Code
20959 \begin_layout Plain Layout
20966 \begin_inset Quotes erd
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20979 is the LyX name of the layout, made lowercase, for example: chapter.
20984 contain any style information.
20986 \begin_inset Flex Code
20989 \begin_layout Plain Layout
20998 \begin_layout Description
20999 \begin_inset Flex Code
21002 \begin_layout Plain Layout
21009 \begin_inset Flex Code
21012 \begin_layout Plain Layout
21022 ] Whether to output the default CSS information LyX generates for this layout,
21023 even if additional information is explicitly provided via
21024 \begin_inset Flex Code
21027 \begin_layout Plain Layout
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21044 allows you to alter or augment the generated CSS, rather than to override
21047 \begin_inset Flex Code
21050 \begin_layout Plain Layout
21059 \begin_layout Description
21060 \begin_inset Flex Code
21063 \begin_layout Plain Layout
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21079 ] The tag to be used for individual paragraphs of environments, replacing
21081 \begin_inset Flex Code
21084 \begin_layout Plain Layout
21090 in the examples above.
21092 \begin_inset Flex Code
21095 \begin_layout Plain Layout
21104 \begin_layout Description
21105 \begin_inset Flex Code
21108 \begin_layout Plain Layout
21115 \begin_inset Flex Code
21118 \begin_layout Plain Layout
21124 ] Attributes for the item tag.
21126 \begin_inset Quotes eld
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21134 class=`layoutname_item'
21140 \begin_inset Quotes erd
21148 contain any style information.
21150 \begin_inset Flex Code
21153 \begin_layout Plain Layout
21162 \begin_layout Description
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21173 \begin_inset Flex Code
21176 \begin_layout Plain Layout
21182 ] The tag to be used for paragraph and item labels, replacing
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21192 in the examples above.
21194 \begin_inset Flex Code
21197 \begin_layout Plain Layout
21204 \begin_inset Flex Code
21207 \begin_layout Plain Layout
21214 \begin_inset Flex Code
21217 \begin_layout Plain Layout
21224 \begin_inset Flex Code
21227 \begin_layout Plain Layout
21228 Centered_Top_Environment
21233 , in which case it defaults to
21234 \begin_inset Flex Code
21237 \begin_layout Plain Layout
21246 \begin_layout Description
21247 \begin_inset Flex Code
21250 \begin_layout Plain Layout
21257 \begin_inset Flex Code
21260 \begin_layout Plain Layout
21266 ] Attributes for the label tag.
21268 \begin_inset Quotes eld
21272 \begin_inset Flex Code
21275 \begin_layout Plain Layout
21276 class=`layoutname_label'
21282 \begin_inset Quotes erd
21290 contain any style information.
21292 \begin_inset Flex Code
21295 \begin_layout Plain Layout
21304 \begin_layout Description
21305 \begin_inset Flex Code
21308 \begin_layout Plain Layout
21315 \begin_inset Flex Code
21318 \begin_layout Plain Layout
21328 ] Meaningful only for list-like environments, this tag controls whether
21329 the label tag is output before or inside the item tag.
21330 This is used, for example, in the description environment, where we want
21332 \begin_inset Flex Code
21335 \begin_layout Plain Layout
21336 <dt>\SpecialChar \ldots{}
21337 </dt><dd>\SpecialChar \ldots{}
21345 \begin_inset Flex Code
21348 \begin_layout Plain Layout
21354 : The label tag is output inside the item tag.
21357 \begin_layout Description
21358 \begin_inset Flex Code
21361 \begin_layout Plain Layout
21367 Information to be output in the
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21377 section when this style is used.
21378 This might, for example, be used to include a
21379 \begin_inset Flex Code
21382 \begin_layout Plain Layout
21389 \begin_inset Flex Code
21392 \begin_layout Plain Layout
21401 \begin_layout Description
21402 \begin_inset Flex Code
21405 \begin_layout Plain Layout
21411 CSS style information to be included when this style is used.
21412 Note that this will automatically be wrapped in a layout-generated
21413 \begin_inset Flex Code
21416 \begin_layout Plain Layout
21422 block, so only the CSS itself need be included.
21425 \begin_layout Description
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21436 \begin_inset Flex Code
21439 \begin_layout Plain Layout
21445 ] The tag to be used for the main label, replacing
21446 \begin_inset Flex Code
21449 \begin_layout Plain Layout
21455 in the examples above.
21457 \begin_inset Flex Code
21460 \begin_layout Plain Layout
21469 \begin_layout Description
21470 \begin_inset Flex Code
21473 \begin_layout Plain Layout
21480 \begin_inset Flex Code
21483 \begin_layout Plain Layout
21493 ] Marks this style as the one to be used to generate the
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21503 tag for the XHTML file.
21504 By default, it is false.
21506 \begin_inset Flex Code
21509 \begin_layout Plain Layout
21515 file sets it to true for the
21516 \begin_inset Flex Code
21519 \begin_layout Plain Layout
21529 \begin_layout Subsection
21533 \begin_layout Standard
21534 The XHTML output of insets can also be controlled by information in layout
21539 \begin_layout Plain Layout
21540 At present, this is true only for
21541 \begin_inset Quotes eld
21545 \begin_inset Quotes erd
21548 insets (insets you can type into) and is not true for
21549 \begin_inset Quotes eld
21553 \begin_inset Quotes erd
21556 insets (insets that are associated with dialog boxes).
21561 Here, too, LyX tries to provide sensible defaults, and it constructs default
21563 But everything can be customized.
21566 \begin_layout Standard
21567 The XHTML LyX outputs for an inset has the following form:
21570 \begin_layout LyX-Code
21572 \begin_inset Quotes erd
21576 \begin_inset Quotes erd
21582 \begin_layout LyX-Code
21583 <labeltag>Label</labeltag>
21586 \begin_layout LyX-Code
21588 \begin_inset Quotes erd
21592 \begin_inset Quotes erd
21595 >Contents of the inset.</innertag>
21598 \begin_layout LyX-Code
21602 \begin_layout Standard
21603 If the inset permits multiple paragraphs---that is, if
21604 \begin_inset Flex Code
21607 \begin_layout Plain Layout
21613 is true---then the contents of the inset will itself be output as paragraphs
21614 formatted according to the styles used for those paragraphs (standard,
21615 quote, and the like).
21616 The label tag is of course omitted if the paragraph does not have a label
21617 and, at present, is always
21618 \begin_inset Flex Code
21621 \begin_layout Plain Layout
21628 The inner tag is optional and, by default, does not appear.
21631 \begin_layout Standard
21632 The specific tags and attributes output for each inset can be controlled
21633 by means of the following layout tags.
21636 \begin_layout Description
21637 \begin_inset Flex Code
21640 \begin_layout Plain Layout
21647 \begin_inset Flex Code
21650 \begin_layout Plain Layout
21656 ] Specifies attribute information to be output with the main tag.
21658 \begin_inset Quotes eld
21662 \begin_inset Flex Code
21665 \begin_layout Plain Layout
21666 class=`myinset' onclick=`\SpecialChar \ldots{}
21673 \begin_inset Quotes erd
21677 By default, LyX will output
21678 \begin_inset Quotes eld
21682 \begin_inset Flex Code
21685 \begin_layout Plain Layout
21692 \begin_inset Quotes erd
21696 \begin_inset Flex Code
21699 \begin_layout Plain Layout
21705 is the LyX name of the inset, made lowercase and with non-alphanumeric
21706 characters converted to underscores, for example: footnote.
21709 \begin_layout Description
21710 \begin_inset Flex Code
21713 \begin_layout Plain Layout
21720 \begin_inset Flex Code
21723 \begin_layout Plain Layout
21733 ] Whether to output the default CSS information LyX generates for this layout,
21734 even if additional information is explicitly provided via
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21746 \begin_inset Flex Code
21749 \begin_layout Plain Layout
21755 allows you to alter or augment the generated CSS, rather than to override
21760 \begin_layout Description
21761 \begin_inset Flex Code
21764 \begin_layout Plain Layout
21771 \begin_inset Flex Code
21774 \begin_layout Plain Layout
21780 ] Attributes for the inner tag.
21782 \begin_inset Quotes eld
21786 \begin_inset Flex Code
21789 \begin_layout Plain Layout
21790 class=`insetname_inner'
21796 \begin_inset Quotes erd
21802 \begin_layout Description
21803 \begin_inset Flex Code
21806 \begin_layout Plain Layout
21813 \begin_inset Flex Code
21816 \begin_layout Plain Layout
21822 ] The inner tag, replacing
21823 \begin_inset Flex Code
21826 \begin_layout Plain Layout
21832 in the examples above.
21833 By default, there is none.
21836 \begin_layout Description
21837 \begin_inset Flex Code
21840 \begin_layout Plain Layout
21847 \begin_inset Flex Code
21850 \begin_layout Plain Layout
21858 ] Whether this inset represents a standalone block of text (such as a footnote)
21859 or instead represents material that is included in the surrounding text
21860 (such as a branch).
21864 \begin_layout Description
21865 \begin_inset Flex Code
21868 \begin_layout Plain Layout
21875 \begin_inset Flex Code
21878 \begin_layout Plain Layout
21884 ] A label for this inset, possibly including a reference to a counter.
21885 For example, for footnote, it might be:
21886 \begin_inset Flex Code
21889 \begin_layout Plain Layout
21898 This is optional, and there is no default.
21901 \begin_layout Description
21902 \begin_inset Flex Code
21905 \begin_layout Plain Layout
21911 Information to be output in the
21912 \begin_inset Flex Code
21915 \begin_layout Plain Layout
21921 section when this style is used.
21922 This might, for example, be used to include a
21923 \begin_inset Flex Code
21926 \begin_layout Plain Layout
21933 \begin_inset Flex Code
21936 \begin_layout Plain Layout
21945 \begin_layout Description
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21955 CSS style information to be included when this style is used.
21956 Note that this will automatically be wrapped in a layout-generated
21957 \begin_inset Flex Code
21960 \begin_layout Plain Layout
21966 block, so only the CSS itself need be included.
21969 \begin_layout Description
21970 \begin_inset Flex Code
21973 \begin_layout Plain Layout
21980 \begin_inset Flex Code
21983 \begin_layout Plain Layout
21989 ] The tag to be used for the main label, replacing
21990 \begin_inset Flex Code
21993 \begin_layout Plain Layout
21999 in the examples above.
22000 The default depends upon the setting of
22001 \begin_inset Flex Code
22004 \begin_layout Plain Layout
22011 \begin_inset Flex Code
22014 \begin_layout Plain Layout
22020 is true, the default is
22021 \begin_inset Flex Code
22024 \begin_layout Plain Layout
22030 ; if it is false, the default is
22031 \begin_inset Flex Code
22034 \begin_layout Plain Layout
22043 \begin_layout Subsection
22047 \begin_layout Standard
22048 The XHTML output for floats too can be controlled by layout information.
22049 The output has the following form:
22052 \begin_layout LyX-Code
22054 \begin_inset Quotes erd
22058 \begin_inset Quotes erd
22064 \begin_layout LyX-Code
22065 Contents of the float.
22068 \begin_layout LyX-Code
22072 \begin_layout Standard
22073 The caption, if there is one, is a separate inset and will be output as
22075 Its appearance can be controlled via the InsetLayout for caption insets.
22079 \begin_layout Description
22080 \begin_inset Flex Code
22083 \begin_layout Plain Layout
22090 \begin_inset Flex Code
22093 \begin_layout Plain Layout
22099 ] Specifies attribute information to be output with the main tag.
22101 \begin_inset Quotes eld
22105 \begin_inset Flex Code
22108 \begin_layout Plain Layout
22109 class=`myfloat' onclick=`\SpecialChar \ldots{}
22116 \begin_inset Quotes erd
22120 By default, LyX will output
22121 \begin_inset Quotes eld
22125 \begin_inset Flex Code
22128 \begin_layout Plain Layout
22129 class=`float float-floattype'
22135 \begin_inset Quotes erd
22139 \begin_inset Flex Code
22142 \begin_layout Plain Layout
22148 is LyX's name for this type of float, as determined by the float declaration
22150 \begin_inset CommandInset ref
22152 reference "sub:Floats"
22156 ), though made lowercase and with non-alphanumeric characters converted
22157 to underscores, for example: float-table.
22160 \begin_layout Description
22161 \begin_inset Flex Code
22164 \begin_layout Plain Layout
22170 CSS style information to be included when this float is used.
22171 Note that this will automatically be wrapped in a layout-generated
22172 \begin_inset Flex Code
22175 \begin_layout Plain Layout
22181 block, so only the CSS itself need be included.
22184 \begin_layout Description
22185 \begin_inset Flex Code
22188 \begin_layout Plain Layout
22195 \begin_inset Flex Code
22198 \begin_layout Plain Layout
22204 ] The tag to be used for this float, replacing
22205 \begin_inset Quotes eld
22209 \begin_inset Flex Code
22212 \begin_layout Plain Layout
22219 \begin_inset Quotes erd
22222 in the example above.
22224 \begin_inset Flex Code
22227 \begin_layout Plain Layout
22233 and will rarely need changing.
22236 \begin_layout Subsection
22237 Bibliography formatting
22240 \begin_layout Standard
22241 The bibliography can be formatted using
22242 \begin_inset Flex Code
22245 \begin_layout Plain Layout
22253 \begin_inset CommandInset ref
22255 reference "sub:Citation-format-description"
22262 \begin_layout Subsection
22266 \begin_layout Standard
22267 We have several times mentioned that LyX will generate default CSS style
22268 rules for both insets and paragraph styles, based upon the other layout
22269 information that is provided.
22270 In this section, we shall say a word about which layout information LyX
22274 \begin_layout Standard
22275 At present, LyX auto-generates CSS only for font information, making use
22277 \begin_inset Flex Code
22280 \begin_layout Plain Layout
22287 \begin_inset Flex Code
22290 \begin_layout Plain Layout
22297 \begin_inset Flex Code
22300 \begin_layout Plain Layout
22307 \begin_inset Flex Code
22310 \begin_layout Plain Layout
22317 \begin_inset Flex Code
22320 \begin_layout Plain Layout
22328 \begin_inset CommandInset ref
22330 reference "sub:Font-description"
22334 .) The translation is mostly straightforward and obvious.
22336 \begin_inset Quotes eld
22340 \begin_inset Flex Code
22343 \begin_layout Plain Layout
22350 \begin_inset Quotes erd
22354 \begin_inset Quotes eld
22358 \begin_inset Flex Code
22361 \begin_layout Plain Layout
22362 font-family: sans-serif;
22368 \begin_inset Quotes erd
22372 The correspondence of LyX sizes and CSS sizes is a little less obvious
22373 but nonetheless intuitive.
22375 \begin_inset Flex Code
22378 \begin_layout Plain Layout
22385 \begin_inset Flex URL
22388 \begin_layout Plain Layout
22398 \begin_layout Chapter
22399 Including External Material
22402 \begin_layout Standard
22403 \begin_inset Box Shadowbox
22413 height_special "totalheight"
22416 \begin_layout Plain Layout
22417 WARNING: This portion of the documentation has not been updated for some
22419 We certainly hope that it is still accurate, but there are no guarantees.
22427 \begin_layout Standard
22428 The use of material from sources external to LyX is covered in detail in
22434 This part of the manual covers what needs to happen behind the scenes for
22435 new sorts of material to be included.
22438 \begin_layout Section
22442 \begin_layout Standard
22443 The external material feature is based on the concept of a
22448 A template is a specification of how LyX should interface with a certain
22450 As bundled, LyX comes with predefined templates for Xfig figures, various
22451 raster format images, chess diagrams, and LilyPond music notation.
22452 You can check the actual list by using the menu
22453 \begin_inset Flex MenuItem
22456 \begin_layout Plain Layout
22457 Insert\SpecialChar \menuseparator
22458 File\SpecialChar \menuseparator
22465 Furthermore, it is possible to roll your own template to support a specific
22467 Later we'll describe in more detail what is involved, and hopefully you
22468 will submit all the templates you create so we can include them in a later
22472 \begin_layout Standard
22473 Another basic idea of the external material feature is to distinguish between
22474 the original file that serves as a base for final material and the produced
22475 file that is included in your exported or printed document.
22476 For example, consider the case of a figure produced with
22477 \begin_inset Flex Code
22480 \begin_layout Plain Layout
22487 The Xfig application itself works on an original file with the
22488 \begin_inset Flex Code
22491 \begin_layout Plain Layout
22498 Within Xfig, you create and change your figure, and when you are done,
22500 \begin_inset Flex Code
22503 \begin_layout Plain Layout
22510 When you want to include the figure in your document, you invoke
22511 \begin_inset Flex Code
22514 \begin_layout Plain Layout
22520 in order to create a PostScript file that can readily be included in your
22523 \begin_inset Flex Code
22526 \begin_layout Plain Layout
22532 file is the original file, and the PostScript file is the produced file.
22535 \begin_layout Standard
22536 This distinction is important in order to allow updating of the material
22537 while you are in the process of writing the document.
22538 Furthermore, it provides us with the flexibility that is needed to support
22539 multiple export formats.
22540 For instance, in the case of a plain text file, it is not exactly an award-winn
22541 ing idea to include the figure as raw PostScript.
22542 Instead, you would either prefer to just include a reference to the figure
22543 or try to invoke some graphics to ASCII converter to make the final result
22544 look similar to the real graphics.
22545 The external material management allows you to do this, because it is parametri
22546 zed on the different export formats that LyX supports.
22549 \begin_layout Standard
22550 Besides supporting the production of different products according to the
22551 exported format, it supports tight integration with editing and viewing
22553 In the case of an Xfig figure, you are able to invoke Xfig on the original
22554 file with a single click from within the external material dialog in LyX,
22555 and also preview the produced PostScript file with Ghostview with another
22557 No more fiddling around with the command line and/or file browsers to locate
22558 and manipulate the original or produced files.
22559 In this way, you are finally able to take full advantage of the many different
22560 applications that are relevant to use when you write your documents, and
22561 ultimately be more productive.
22564 \begin_layout Section
22565 The external template configuration file
22568 \begin_layout Standard
22569 It is relatively easy to add custom external template definitions to LyX.
22570 However, be aware that doing this in an careless manner most probably
22574 introduce an easily exploitable security hole.
22575 So before you do this, please read the discussion about security in section
22577 \begin_inset CommandInset ref
22579 reference "sec:Security-discussion"
22586 \begin_layout Standard
22587 Having said that, we encourage you to submit any interesting templates that
22592 \begin_layout Standard
22593 The external templates are defined in the
22594 \begin_inset Flex Code
22597 \begin_layout Plain Layout
22598 LyXDir/lib/external_templates
22604 You can place your own version in
22605 \begin_inset Flex Code
22608 \begin_layout Plain Layout
22609 UserDir/external_templates
22617 \begin_layout Standard
22618 A typical template looks like this:
22621 \begin_layout LyX-Code
22625 \begin_layout LyX-Code
22626 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22629 \begin_layout LyX-Code
22633 \begin_layout LyX-Code
22637 \begin_layout LyX-Code
22641 \begin_layout LyX-Code
22645 \begin_layout LyX-Code
22649 \begin_layout LyX-Code
22650 AutomaticProduction true
22653 \begin_layout LyX-Code
22657 \begin_layout LyX-Code
22661 \begin_layout LyX-Code
22665 \begin_layout LyX-Code
22666 TransformCommand Rotate RotationLatexCommand
22669 \begin_layout LyX-Code
22670 TransformCommand Resize ResizeLatexCommand
22673 \begin_layout LyX-Code
22674 Product "$$RotateFront$$ResizeFront
22677 \begin_layout LyX-Code
22682 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22685 \begin_layout LyX-Code
22686 $$ResizeBack$$RotateBack"
22689 \begin_layout LyX-Code
22693 \begin_layout LyX-Code
22694 UpdateResult "$$AbsPath$$Basename.pstex_t"
22697 \begin_layout LyX-Code
22698 Requirement "graphicx"
22701 \begin_layout LyX-Code
22702 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22705 \begin_layout LyX-Code
22706 ReferencedFile latex "$$AbsPath$$Basename.eps"
22709 \begin_layout LyX-Code
22710 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22713 \begin_layout LyX-Code
22717 \begin_layout LyX-Code
22721 \begin_layout LyX-Code
22722 TransformCommand Rotate RotationLatexCommand
22725 \begin_layout LyX-Code
22726 TransformCommand Resize ResizeLatexCommand
22729 \begin_layout LyX-Code
22730 Product "$$RotateFront$$ResizeFront
22733 \begin_layout LyX-Code
22738 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22741 \begin_layout LyX-Code
22742 $$ResizeBack$$RotateBack"
22745 \begin_layout LyX-Code
22746 UpdateFormat pdftex
22749 \begin_layout LyX-Code
22750 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22753 \begin_layout LyX-Code
22754 Requirement "graphicx"
22757 \begin_layout LyX-Code
22758 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22761 \begin_layout LyX-Code
22762 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22765 \begin_layout LyX-Code
22769 \begin_layout LyX-Code
22773 \begin_layout LyX-Code
22774 Product "$$Contents(
22776 "$$AbsPath$$Basename.asc
22781 \begin_layout LyX-Code
22782 UpdateFormat asciixfig
22785 \begin_layout LyX-Code
22786 UpdateResult "$$AbsPath$$Basename.asc"
22789 \begin_layout LyX-Code
22793 \begin_layout LyX-Code
22797 \begin_layout LyX-Code
22798 Product "<graphic fileref=
22800 "$$AbsOrRelPathMaster$$Basename.eps
22805 \begin_layout LyX-Code
22809 \begin_layout LyX-Code
22813 \begin_layout LyX-Code
22814 UpdateResult "$$AbsPath$$Basename.eps"
22817 \begin_layout LyX-Code
22818 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22821 \begin_layout LyX-Code
22822 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22825 \begin_layout LyX-Code
22829 \begin_layout LyX-Code
22830 Product "[XFig: $$FName]"
22833 \begin_layout LyX-Code
22837 \begin_layout LyX-Code
22841 \begin_layout Standard
22842 As you can see, the template is enclosed in
22843 \begin_inset Flex Code
22846 \begin_layout Plain Layout
22852 \SpecialChar \ldots{}
22854 \begin_inset Flex Code
22857 \begin_layout Plain Layout
22864 It contains a header specifying some general settings and, for each supported
22865 primary document file format, a section
22866 \begin_inset Flex Code
22869 \begin_layout Plain Layout
22875 \SpecialChar \ldots{}
22877 \begin_inset Flex Code
22880 \begin_layout Plain Layout
22889 \begin_layout Subsection
22890 The template header
22893 \begin_layout Description
22894 \begin_inset Flex Code
22897 \begin_layout Plain Layout
22898 AutomaticProduction
22899 \begin_inset space ~
22907 Whether the file represented by the template must be generated by LyX.
22908 This command must occur exactly once.
22911 \begin_layout Description
22912 \begin_inset Flex Code
22915 \begin_layout Plain Layout
22917 \begin_inset space ~
22925 A glob pattern that is used in the file dialog to filter out the desired
22927 If there is more than one possible file extension (e.
22928 \begin_inset space \thinspace{}
22932 \begin_inset space \space{}
22936 \begin_inset Flex Code
22939 \begin_layout Plain Layout
22946 \begin_inset Flex Code
22949 \begin_layout Plain Layout
22955 ), use something like
22956 \begin_inset Flex Code
22959 \begin_layout Plain Layout
22966 This command must occur exactly once.
22969 \begin_layout Description
22970 \begin_inset Flex Code
22973 \begin_layout Plain Layout
22975 \begin_inset space ~
22983 The text that is displayed on the button.
22984 This command must occur exactly once.
22987 \begin_layout Description
22988 \begin_inset Flex Code
22991 \begin_layout Plain Layout
22993 \begin_inset space ~
22997 \begin_inset space ~
23005 The help text that is used in the External dialog.
23006 Provide enough information to explain to the user just what the template
23007 can provide him with.
23008 This command must occur exactly once.
23011 \begin_layout Description
23012 \begin_inset Flex Code
23015 \begin_layout Plain Layout
23017 \begin_inset space ~
23025 The file format of the original file.
23026 This must be the name of a format that is known to LyX (see section
23027 \begin_inset space ~
23031 \begin_inset CommandInset ref
23033 reference "sec:Formats"
23039 \begin_inset Quotes eld
23043 \begin_inset Flex Code
23046 \begin_layout Plain Layout
23053 \begin_inset Quotes erd
23056 if the template can handle original files of more than one format.
23057 LyX will attempt to interrogate the file itself in order to deduce its
23058 format in this case.
23059 This command must occur exactly once.
23062 \begin_layout Description
23063 \begin_inset Flex Code
23066 \begin_layout Plain Layout
23068 \begin_inset space ~
23076 A unique name for the template.
23077 It must not contain substitution macros (see below).
23080 \begin_layout Description
23081 \begin_inset Flex Code
23084 \begin_layout Plain Layout
23086 \begin_inset space ~
23089 Rotate|Resize|Clip|Extra
23094 This command specifies which transformations are supported by this template.
23095 It may occur zero or more times.
23096 This command enables the corresponding tabs in the external dialog.
23098 \begin_inset Flex Code
23101 \begin_layout Plain Layout
23107 command must have either a corresponding
23108 \begin_inset Flex Code
23111 \begin_layout Plain Layout
23118 \begin_inset Flex Code
23121 \begin_layout Plain Layout
23128 \begin_inset Flex Code
23131 \begin_layout Plain Layout
23138 Otherwise the transformation will not be supported by that format.
23141 \begin_layout Subsection
23145 \begin_layout Description
23146 \begin_inset Flex Code
23149 \begin_layout Plain Layout
23151 \begin_inset space ~
23154 LaTeX|PDFLaTeX|PlainText|DocBook
23159 The primary document file format that this format definition is for.
23160 Not every template has a sensible representation in all document file formats.
23161 Please define nevertheless a
23162 \begin_inset Flex Code
23165 \begin_layout Plain Layout
23171 section for all templates.
23172 Use a dummy text when no representation is available.
23173 Then you can at least see a reference to the external material in the exported
23177 \begin_layout Description
23178 \begin_inset Flex Code
23181 \begin_layout Plain Layout
23183 \begin_inset space ~
23187 \begin_inset space ~
23195 This command defines an additional macro
23196 \begin_inset Flex Code
23199 \begin_layout Plain Layout
23205 for substitution in
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23217 \begin_inset Flex Code
23220 \begin_layout Plain Layout
23226 itself may contain substitution macros.
23227 The advantage over using
23228 \begin_inset Flex Code
23231 \begin_layout Plain Layout
23238 \begin_inset Flex Code
23241 \begin_layout Plain Layout
23247 is that the substituted value of
23248 \begin_inset Flex Code
23251 \begin_layout Plain Layout
23257 is sanitized so that it is a valid optional argument in the document format.
23258 This command may occur zero or more times.
23261 \begin_layout Description
23262 \begin_inset Flex Code
23265 \begin_layout Plain Layout
23267 \begin_inset space ~
23275 The text that is inserted in the exported document.
23276 This is actually the most important command and can be quite complex.
23277 This command must occur exactly once.
23280 \begin_layout Description
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23286 \begin_inset space ~
23294 This command specifies a preamble snippet that will be included in the
23296 It has to be defined using
23297 \begin_inset Flex Code
23300 \begin_layout Plain Layout
23306 \SpecialChar \ldots{}
23308 \begin_inset Flex Code
23311 \begin_layout Plain Layout
23318 This command may occur zero or more times.
23321 \begin_layout Description
23322 \begin_inset Flex Code
23325 \begin_layout Plain Layout
23327 \begin_inset space ~
23331 \begin_inset space ~
23339 This command denotes files that are created by the conversion process and
23340 are needed for a particular export format.
23341 If the filename is relative, it is interpreted relative to the master document.
23342 This command may be given zero or more times.
23345 \begin_layout Description
23346 \begin_inset Flex Code
23349 \begin_layout Plain Layout
23351 \begin_inset space ~
23359 The name of a required LaTeX package.
23360 The package is included via
23361 \begin_inset Flex Code
23364 \begin_layout Plain Layout
23372 in the LaTeX preamble.
23373 This command may occur zero or more times.
23376 \begin_layout Description
23377 \begin_inset Flex Code
23380 \begin_layout Plain Layout
23382 \begin_inset space ~
23386 \begin_inset space ~
23389 RotationLatexCommand
23394 This command specifies that the built in LaTeX command should be used for
23396 This command may occur once or not at all.
23399 \begin_layout Description
23400 \begin_inset Flex Code
23403 \begin_layout Plain Layout
23405 \begin_inset space ~
23409 \begin_inset space ~
23417 This command specifies that the built in LaTeX command should be used for
23419 This command may occur once or not at all.
23422 \begin_layout Description
23423 \begin_inset Flex Code
23426 \begin_layout Plain Layout
23428 \begin_inset space ~
23432 \begin_inset space ~
23435 RotationLatexOption
23440 This command specifies that rotation is done via an optional argument.
23441 This command may occur once or not at all.
23444 \begin_layout Description
23445 \begin_inset Flex Code
23448 \begin_layout Plain Layout
23450 \begin_inset space ~
23454 \begin_inset space ~
23462 This command specifies that resizing is done via an optional argument.
23463 This command may occur once or not at all.
23466 \begin_layout Description
23467 \begin_inset Flex Code
23470 \begin_layout Plain Layout
23472 \begin_inset space ~
23476 \begin_inset space ~
23484 This command specifies that clipping is done via an optional argument.
23485 This command may occur once or not at all.
23488 \begin_layout Description
23489 \begin_inset Flex Code
23492 \begin_layout Plain Layout
23494 \begin_inset space ~
23498 \begin_inset space ~
23506 This command specifies that an extra optional argument is used.
23507 This command may occur once or not at all.
23510 \begin_layout Description
23511 \begin_inset Flex Code
23514 \begin_layout Plain Layout
23516 \begin_inset space ~
23524 The file format of the converted file.
23525 This must be the name of a format that is known to LyX (see the
23526 \begin_inset Flex MenuItem
23529 \begin_layout Plain Layout
23534 ools\SpecialChar \menuseparator
23539 references\SpecialChar \menuseparator
23540 File Handling\SpecialChar \menuseparator
23547 This command must occur exactly once.
23550 \begin_layout Description
23551 \begin_inset Flex Code
23554 \begin_layout Plain Layout
23556 \begin_inset space ~
23564 The file name of the converted file.
23565 The file name must be absolute.
23566 This command must occur exactly once.
23569 \begin_layout Subsection
23570 Preamble definitions
23573 \begin_layout Standard
23574 The external template configuration file may contain additional preamble
23575 definitions enclosed by
23576 \begin_inset Flex Code
23579 \begin_layout Plain Layout
23585 \SpecialChar \ldots{}
23587 \begin_inset Flex Code
23590 \begin_layout Plain Layout
23597 They can be used by the templates in the
23598 \begin_inset Flex Code
23601 \begin_layout Plain Layout
23610 \begin_layout Section
23611 The substitution mechanism
23614 \begin_layout Standard
23615 When the external material facility invokes an external program, it is done
23616 on the basis of a command defined in the template configuration file.
23617 These commands can contain various macros that are expanded before execution.
23618 Execution always take place in the directory of the containing document.
23621 \begin_layout Standard
23622 Also, whenever external material is to be displayed, the name will be produced
23623 by the substitution mechanism, and most other commands in the template
23624 definition support substitution as well.
23627 \begin_layout Standard
23628 The available macros are the following:
23631 \begin_layout Description
23632 \begin_inset Flex Code
23635 \begin_layout Plain Layout
23636 $$AbsOrRelPathMaster
23641 The file path, absolute or relative to the master LyX document.
23644 \begin_layout Description
23645 \begin_inset Flex Code
23648 \begin_layout Plain Layout
23649 $$AbsOrRelPathParent
23654 The file path, absolute or relative to the LyX document.
23657 \begin_layout Description
23658 \begin_inset Flex Code
23661 \begin_layout Plain Layout
23667 The absolute file path.
23670 \begin_layout Description
23671 \begin_inset Flex Code
23674 \begin_layout Plain Layout
23680 The filename without path and without the extension.
23683 \begin_layout Description
23684 \begin_inset Flex Code
23687 \begin_layout Plain Layout
23689 \begin_inset Quotes eld
23693 \begin_inset Quotes erd
23701 This macro will expand to the contents of the file with the name
23702 \begin_inset Flex Code
23705 \begin_layout Plain Layout
23714 \begin_layout Description
23715 \begin_inset Flex Code
23718 \begin_layout Plain Layout
23724 The file extension (including the dot).
23727 \begin_layout Description
23728 \begin_inset Flex Code
23731 \begin_layout Plain Layout
23737 The filename of the file specified in the external material dialog.
23738 This is either an absolute name, or it is relative to the LyX document.
23741 \begin_layout Description
23742 \begin_inset Flex Code
23745 \begin_layout Plain Layout
23752 \begin_inset Flex Code
23755 \begin_layout Plain Layout
23761 (absolute name or relative to the LyX document).
23764 \begin_layout Description
23765 \begin_inset Flex Code
23768 \begin_layout Plain Layout
23774 The file path, relative to the master LyX document.
23777 \begin_layout Description
23778 \begin_inset Flex Code
23781 \begin_layout Plain Layout
23787 The file path, relative to the LyX document.
23790 \begin_layout Description
23791 \begin_inset Flex Code
23794 \begin_layout Plain Layout
23800 This macro will expand to the absolute path of the system directory.
23801 This is typically used to point to the various helper scripts that are
23805 \begin_layout Description
23806 \begin_inset Flex Code
23809 \begin_layout Plain Layout
23815 A name and full path to a temporary file which will be automatically deleted
23816 whenever the containing document is closed, or the external material insertion
23820 \begin_layout Standard
23821 All path macros contain a trailing directory separator, so you can construct
23823 \begin_inset space \thinspace{}
23827 \begin_inset space \space{}
23830 the absolute filename with
23831 \begin_inset Flex Code
23834 \begin_layout Plain Layout
23835 $$AbsPath$$Basename$$Extension
23843 \begin_layout Standard
23844 The macros above are substituted in all commands unless otherwise noted.
23846 \begin_inset Flex Code
23849 \begin_layout Plain Layout
23855 supports additionally the following substitutions if they are enabled by
23857 \begin_inset Flex Code
23860 \begin_layout Plain Layout
23867 \begin_inset Flex Code
23870 \begin_layout Plain Layout
23879 \begin_layout Description
23880 \begin_inset Flex Code
23883 \begin_layout Plain Layout
23889 The front part of the resize command.
23892 \begin_layout Description
23893 \begin_inset Flex Code
23896 \begin_layout Plain Layout
23902 The back part of the resize command.
23905 \begin_layout Description
23906 \begin_inset Flex Code
23909 \begin_layout Plain Layout
23915 The front part of the rotation command.
23918 \begin_layout Description
23919 \begin_inset Flex Code
23922 \begin_layout Plain Layout
23928 The back part of the rotation command.
23931 \begin_layout Standard
23932 The value string of the
23933 \begin_inset Flex Code
23936 \begin_layout Plain Layout
23942 command supports additionally the following substitutions if they are enabled
23944 \begin_inset Flex Code
23947 \begin_layout Plain Layout
23954 \begin_inset Flex Code
23957 \begin_layout Plain Layout
23966 \begin_layout Description
23967 \begin_inset Flex Code
23970 \begin_layout Plain Layout
23979 \begin_layout Description
23980 \begin_inset Flex Code
23983 \begin_layout Plain Layout
23992 \begin_layout Description
23993 \begin_inset Flex Code
23996 \begin_layout Plain Layout
24005 \begin_layout Description
24006 \begin_inset Flex Code
24009 \begin_layout Plain Layout
24015 The rotation option.
24018 \begin_layout Standard
24019 You may ask why there are so many path macros.
24020 There are mainly two reasons:
24023 \begin_layout Enumerate
24024 Relative and absolute file names should remain relative or absolute, respectivel
24026 Users may have reasons to prefer either form.
24027 Relative names are useful for portable documents that should work on different
24028 machines, for example.
24029 Absolute names may be required by some programs.
24032 \begin_layout Enumerate
24033 LaTeX treats relative file names differently than LyX and other programs
24034 in nested included files.
24035 For LyX, a relative file name is always relative to the document that contains
24037 For LaTeX, it is always relative to the master document.
24038 These two definitions are identical if you have only one document, but
24039 differ if you have a master document that includes part documents.
24040 That means that relative filenames must be transformed when presented to
24042 Fortunately LyX does this automatically for you if you choose the right
24046 \begin_layout Standard
24047 So which path macro should be used in new template definitions? The rule
24051 \begin_layout Itemize
24053 \begin_inset Flex Code
24056 \begin_layout Plain Layout
24062 if an absolute path is required.
24065 \begin_layout Itemize
24067 \begin_inset Flex Code
24070 \begin_layout Plain Layout
24071 $$AbsOrRelPathMaster
24076 if the substituted string is some kind of LaTeX input.
24079 \begin_layout Itemize
24081 \begin_inset Flex Code
24084 \begin_layout Plain Layout
24085 $$AbsOrRelPathParent
24090 in order to preserve the user's choice.
24093 \begin_layout Standard
24094 There are special cases where this rule does not work and e.
24095 \begin_inset space \thinspace{}
24099 \begin_inset space \space{}
24102 relative names are needed, but normally it will work just fine.
24103 One example for such a case is the command
24104 \begin_inset Flex Code
24107 \begin_layout Plain Layout
24108 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24113 in the XFig template above: We can't use the absolute name because the
24115 \begin_inset Flex Code
24118 \begin_layout Plain Layout
24124 files needs the relative name in order to rewrite the file content.
24127 \begin_layout Section
24128 Security discussion
24129 \begin_inset CommandInset label
24131 name "sec:Security-discussion"
24138 \begin_layout Standard
24139 The external material feature interfaces with a lot of external programs
24140 and does so automatically, so we have to consider the security implications
24142 In particular, since you have the option of including your own filenames
24143 and/or parameter strings and those are expanded into a command, it seems
24144 that it would be possible to create a malicious document which executes
24145 arbitrary commands when a user views or prints the document.
24146 This is something we definitely want to avoid.
24149 \begin_layout Standard
24150 However, since the external program commands are specified in the template
24151 configuration file only, there are no security issues if LyX is properly
24152 configured with safe templates only.
24153 This is so because the external programs are invoked with the
24154 \begin_inset Flex Code
24157 \begin_layout Plain Layout
24163 -system call rather than the
24164 \begin_inset Flex Code
24167 \begin_layout Plain Layout
24173 system-call, so it's not possible to execute arbitrary commands from the
24174 filename or parameter section via the shell.
24177 \begin_layout Standard
24178 This also implies that you are restricted in what command strings you can
24179 use in the external material templates.
24180 In particular, pipes and redirection are not readily available.
24181 This has to be so if LyX should remain safe.
24182 If you want to use some of the shell features, you should write a safe
24183 script to do this in a controlled manner, and then invoke the script from
24184 the command string.
24188 \begin_layout Standard
24189 It is possible to design a template that interacts directly with the shell,
24190 but since this would allow a malicious user to execute arbitrary commands
24191 by writing clever filenames and/or parameters, we generally recommend that
24192 you only use safe scripts that work with the
24193 \begin_inset Flex Code
24196 \begin_layout Plain Layout
24202 system call in a controlled manner.
24203 Of course, for use in a controlled environment, it can be tempting to just
24204 fall back to use ordinary shell scripts.
24205 If you do so, be aware that you
24209 provide an easily exploitable security hole in your system.
24210 Of course it stands to reason that such unsafe templates will never be
24211 included in the standard LyX distribution, although we do encourage people
24212 to submit new templates in the open source tradition.
24213 But LyX as shipped from the official distribution channels will never have
24217 \begin_layout Standard
24218 Including external material provides a lot of power, and you have to be
24219 careful not to introduce security hazards with this power.
24220 A subtle error in a single line in an innocent looking script can open
24221 the door to huge security problems.
24222 So if you do not fully understand the issues, we recommend that you consult
24223 a knowledgeable security professional or the LyX development team if you
24224 have any questions about whether a given template is safe or not.
24225 And do this before you use it in an uncontrolled environment.
24228 \begin_layout Chapter
24230 List of functions to be used in layouts
24231 \begin_inset CommandInset label
24233 name "chap:List-of-functions"
24240 \begin_layout Standard
24242 \begin_inset Tabular
24243 <lyxtabular version="3" rows="10" columns="6">
24244 <features rotate="0" tabularvalignment="middle">
24245 <column alignment="left" valignment="top" width="14col%">
24246 <column alignment="left" valignment="top" width="14col%">
24247 <column alignment="left" valignment="top" width="14col%">
24248 <column alignment="left" valignment="top" width="14col%">
24249 <column alignment="left" valignment="top" width="14col%">
24250 <column alignment="left" valignment="top" width="14col%">
24252 <cell alignment="left" valignment="top" usebox="none">
24255 \begin_layout Plain Layout
24261 <cell alignment="left" valignment="top" usebox="none">
24264 \begin_layout Plain Layout
24270 <cell alignment="left" valignment="top" usebox="none">
24273 \begin_layout Plain Layout
24279 <cell alignment="left" valignment="top" usebox="none">
24282 \begin_layout Plain Layout
24288 <cell alignment="left" valignment="top" usebox="none">
24291 \begin_layout Plain Layout
24297 <cell alignment="left" valignment="top" usebox="none">
24300 \begin_layout Plain Layout
24308 <cell alignment="left" valignment="top" usebox="none">
24311 \begin_layout Plain Layout
24317 <cell alignment="left" valignment="top" usebox="none">
24320 \begin_layout Plain Layout
24326 <cell alignment="left" valignment="top" usebox="none">
24329 \begin_layout Plain Layout
24335 <cell alignment="left" valignment="top" usebox="none">
24338 \begin_layout Plain Layout
24344 <cell alignment="left" valignment="top" usebox="none">
24347 \begin_layout Plain Layout
24353 <cell alignment="left" valignment="top" usebox="none">
24356 \begin_layout Plain Layout
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="left" valignment="top" usebox="none">
24385 \begin_layout Plain Layout
24391 <cell alignment="left" valignment="top" usebox="none">
24394 \begin_layout Plain Layout
24400 <cell alignment="left" valignment="top" usebox="none">
24403 \begin_layout Plain Layout
24409 <cell alignment="left" 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="left" valignment="top" usebox="none">
24459 \begin_layout Plain Layout
24465 <cell alignment="left" valignment="top" usebox="none">
24468 \begin_layout Plain Layout
24476 <cell alignment="left" valignment="top" usebox="none">
24479 \begin_layout Plain Layout
24485 <cell alignment="left" valignment="top" usebox="none">
24488 \begin_layout Plain Layout
24494 <cell alignment="left" valignment="top" usebox="none">
24497 \begin_layout Plain Layout
24503 <cell alignment="left" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24512 <cell alignment="left" valignment="top" usebox="none">
24515 \begin_layout Plain Layout
24521 <cell alignment="left" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24532 <cell alignment="left" valignment="top" usebox="none">
24535 \begin_layout Plain Layout
24541 <cell alignment="left" valignment="top" usebox="none">
24544 \begin_layout Plain Layout
24550 <cell alignment="left" valignment="top" usebox="none">
24553 \begin_layout Plain Layout
24559 <cell alignment="left" valignment="top" usebox="none">
24562 \begin_layout Plain Layout
24568 <cell alignment="left" valignment="top" usebox="none">
24571 \begin_layout Plain Layout
24577 <cell alignment="left" valignment="top" usebox="none">
24580 \begin_layout Plain Layout
24588 <cell alignment="left" valignment="top" usebox="none">
24591 \begin_layout Plain Layout
24597 <cell alignment="left" valignment="top" usebox="none">
24600 \begin_layout Plain Layout
24606 <cell alignment="left" valignment="top" usebox="none">
24609 \begin_layout Plain Layout
24615 <cell alignment="left" valignment="top" usebox="none">
24618 \begin_layout Plain Layout
24624 <cell alignment="left" valignment="top" usebox="none">
24627 \begin_layout Plain Layout
24633 <cell alignment="left" valignment="top" usebox="none">
24636 \begin_layout Plain Layout
24644 <cell alignment="left" valignment="top" usebox="none">
24647 \begin_layout Plain Layout
24653 <cell alignment="left" valignment="top" usebox="none">
24656 \begin_layout Plain Layout
24662 <cell alignment="left" valignment="top" usebox="none">
24665 \begin_layout Plain Layout
24671 <cell alignment="left" valignment="top" usebox="none">
24674 \begin_layout Plain Layout
24680 <cell alignment="left" valignment="top" usebox="none">
24683 \begin_layout Plain Layout
24689 <cell alignment="left" valignment="top" usebox="none">
24692 \begin_layout Plain Layout
24700 <cell alignment="left" valignment="top" usebox="none">
24703 \begin_layout Plain Layout
24709 <cell alignment="left" valignment="top" usebox="none">
24712 \begin_layout Plain Layout
24718 <cell alignment="left" valignment="top" usebox="none">
24721 \begin_layout Plain Layout
24727 <cell alignment="left" valignment="top" usebox="none">
24730 \begin_layout Plain Layout
24736 <cell alignment="left" valignment="top" usebox="none">
24739 \begin_layout Plain Layout
24745 <cell alignment="left" valignment="top" usebox="none">
24748 \begin_layout Plain Layout
24756 <cell alignment="left" valignment="top" usebox="none">
24759 \begin_layout Plain Layout
24765 <cell alignment="left" valignment="top" usebox="none">
24768 \begin_layout Plain Layout
24774 <cell alignment="left" valignment="top" usebox="none">
24777 \begin_layout Plain Layout
24783 <cell alignment="left" valignment="top" usebox="none">
24786 \begin_layout Plain Layout
24792 <cell alignment="left" valignment="top" usebox="none">
24795 \begin_layout Plain Layout
24801 <cell alignment="left" valignment="top" usebox="none">
24804 \begin_layout Plain Layout
24818 \begin_layout Standard
24820 \begin_inset Tabular
24821 <lyxtabular version="3" rows="10" columns="6">
24822 <features rotate="0" tabularvalignment="middle">
24823 <column alignment="left" valignment="top" width="14col%">
24824 <column alignment="left" valignment="top" width="14col%">
24825 <column alignment="left" valignment="top" width="14col%">
24826 <column alignment="left" valignment="top" width="14col%">
24827 <column alignment="left" valignment="top" width="14col%">
24828 <column alignment="left" valignment="top" width="14col%">
24830 <cell alignment="left" valignment="top" usebox="none">
24833 \begin_layout Plain Layout
24839 <cell alignment="left" valignment="top" usebox="none">
24842 \begin_layout Plain Layout
24848 <cell alignment="left" valignment="top" usebox="none">
24851 \begin_layout Plain Layout
24857 <cell alignment="left" valignment="top" usebox="none">
24860 \begin_layout Plain Layout
24866 <cell alignment="left" valignment="top" usebox="none">
24869 \begin_layout Plain Layout
24875 <cell alignment="left" valignment="top" usebox="none">
24878 \begin_layout Plain Layout
24886 <cell alignment="left" valignment="top" usebox="none">
24889 \begin_layout Plain Layout
24895 <cell alignment="left" valignment="top" usebox="none">
24898 \begin_layout Plain Layout
24904 <cell alignment="left" valignment="top" usebox="none">
24907 \begin_layout Plain Layout
24913 <cell alignment="left" valignment="top" usebox="none">
24916 \begin_layout Plain Layout
24922 <cell alignment="left" valignment="top" usebox="none">
24925 \begin_layout Plain Layout
24931 <cell alignment="left" valignment="top" usebox="none">
24934 \begin_layout Plain Layout
24942 <cell alignment="left" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24951 <cell alignment="left" valignment="top" usebox="none">
24954 \begin_layout Plain Layout
24960 <cell alignment="left" valignment="top" usebox="none">
24963 \begin_layout Plain Layout
24969 <cell alignment="left" valignment="top" usebox="none">
24972 \begin_layout Plain Layout
24978 <cell alignment="left" valignment="top" usebox="none">
24981 \begin_layout Plain Layout
24987 <cell alignment="left" valignment="top" usebox="none">
24990 \begin_layout Plain Layout
24998 <cell alignment="left" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25007 <cell alignment="left" valignment="top" usebox="none">
25010 \begin_layout Plain Layout
25016 <cell alignment="left" valignment="top" usebox="none">
25019 \begin_layout Plain Layout
25025 <cell alignment="left" valignment="top" usebox="none">
25028 \begin_layout Plain Layout
25034 <cell alignment="left" valignment="top" usebox="none">
25037 \begin_layout Plain Layout
25043 <cell alignment="left" valignment="top" usebox="none">
25046 \begin_layout Plain Layout
25054 <cell alignment="left" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25063 <cell alignment="left" valignment="top" usebox="none">
25066 \begin_layout Plain Layout
25072 <cell alignment="left" valignment="top" usebox="none">
25075 \begin_layout Plain Layout
25081 <cell alignment="left" valignment="top" usebox="none">
25084 \begin_layout Plain Layout
25090 <cell alignment="left" valignment="top" usebox="none">
25093 \begin_layout Plain Layout
25099 <cell alignment="left" valignment="top" usebox="none">
25102 \begin_layout Plain Layout
25110 <cell alignment="left" valignment="top" usebox="none">
25113 \begin_layout Plain Layout
25119 <cell alignment="left" valignment="top" usebox="none">
25122 \begin_layout Plain Layout
25128 <cell alignment="left" valignment="top" usebox="none">
25131 \begin_layout Plain Layout
25137 <cell alignment="left" valignment="top" usebox="none">
25140 \begin_layout Plain Layout
25146 <cell alignment="left" valignment="top" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="left" valignment="top" usebox="none">
25158 \begin_layout Plain Layout
25166 <cell alignment="left" valignment="top" usebox="none">
25169 \begin_layout Plain Layout
25175 <cell alignment="left" valignment="top" usebox="none">
25178 \begin_layout Plain Layout
25184 <cell alignment="left" valignment="top" usebox="none">
25187 \begin_layout Plain Layout
25193 <cell alignment="left" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="left" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="left" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25222 <cell alignment="left" valignment="top" usebox="none">
25225 \begin_layout Plain Layout
25231 <cell alignment="left" valignment="top" usebox="none">
25234 \begin_layout Plain Layout
25240 <cell alignment="left" valignment="top" usebox="none">
25243 \begin_layout Plain Layout
25249 <cell alignment="left" valignment="top" usebox="none">
25252 \begin_layout Plain Layout
25258 <cell alignment="left" valignment="top" usebox="none">
25261 \begin_layout Plain Layout
25267 <cell alignment="left" valignment="top" usebox="none">
25270 \begin_layout Plain Layout
25278 <cell alignment="left" valignment="top" usebox="none">
25281 \begin_layout Plain Layout
25287 <cell alignment="left" valignment="top" usebox="none">
25290 \begin_layout Plain Layout
25296 <cell alignment="left" valignment="top" usebox="none">
25299 \begin_layout Plain Layout
25305 <cell alignment="left" valignment="top" usebox="none">
25308 \begin_layout Plain Layout
25314 <cell alignment="left" valignment="top" usebox="none">
25317 \begin_layout Plain Layout
25323 <cell alignment="left" valignment="top" usebox="none">
25326 \begin_layout Plain Layout
25334 <cell alignment="left" valignment="top" usebox="none">
25337 \begin_layout Plain Layout
25343 <cell alignment="left" valignment="top" usebox="none">
25346 \begin_layout Plain Layout
25352 <cell alignment="left" valignment="top" usebox="none">
25355 \begin_layout Plain Layout
25361 <cell alignment="left" valignment="top" usebox="none">
25364 \begin_layout Plain Layout
25370 <cell alignment="left" valignment="top" usebox="none">
25373 \begin_layout Plain Layout
25379 <cell alignment="left" valignment="top" usebox="none">
25382 \begin_layout Plain Layout
25396 \begin_layout Chapter
25397 List of supported LyX functions to be used in layouts
25400 \begin_layout Standard
25402 \begin_inset Tabular
25403 <lyxtabular version="3" rows="10" columns="8">
25404 <features rotate="0" tabularvalignment="middle">
25405 <column alignment="left" valignment="top" width="0">
25406 <column alignment="left" valignment="top" width="0">
25407 <column alignment="left" valignment="top" width="0">
25408 <column alignment="left" valignment="top" width="0">
25409 <column alignment="left" valignment="top" width="0">
25410 <column alignment="left" valignment="top" width="0">
25411 <column alignment="left" valignment="top" width="0">
25412 <column alignment="left" valignment="top" width="0">
25414 <cell alignment="left" valignment="top" usebox="none">
25417 \begin_layout Plain Layout
25423 <cell alignment="left" valignment="top" usebox="none">
25426 \begin_layout Plain Layout
25432 <cell alignment="left" valignment="top" usebox="none">
25435 \begin_layout Plain Layout
25441 <cell alignment="left" valignment="top" usebox="none">
25444 \begin_layout Plain Layout
25450 <cell alignment="center" valignment="top" usebox="none">
25453 \begin_layout Plain Layout
25459 <cell alignment="center" valignment="top" usebox="none">
25462 \begin_layout Plain Layout
25468 <cell alignment="center" valignment="top" usebox="none">
25471 \begin_layout Plain Layout
25477 <cell alignment="center" valignment="top" usebox="none">
25480 \begin_layout Plain Layout
25488 <cell alignment="left" valignment="top" usebox="none">
25491 \begin_layout Plain Layout
25497 <cell alignment="left" valignment="top" usebox="none">
25500 \begin_layout Plain Layout
25506 <cell alignment="left" valignment="top" usebox="none">
25509 \begin_layout Plain Layout
25515 <cell alignment="left" valignment="top" usebox="none">
25518 \begin_layout Plain Layout
25524 <cell alignment="center" valignment="top" usebox="none">
25527 \begin_layout Plain Layout
25533 <cell alignment="center" valignment="top" usebox="none">
25536 \begin_layout Plain Layout
25542 <cell alignment="center" valignment="top" usebox="none">
25545 \begin_layout Plain Layout
25551 <cell alignment="center" valignment="top" usebox="none">
25554 \begin_layout Plain Layout
25562 <cell alignment="left" valignment="top" usebox="none">
25565 \begin_layout Plain Layout
25571 <cell alignment="left" valignment="top" usebox="none">
25574 \begin_layout Plain Layout
25580 <cell alignment="left" valignment="top" usebox="none">
25583 \begin_layout Plain Layout
25589 <cell alignment="left" valignment="top" usebox="none">
25592 \begin_layout Plain Layout
25598 <cell alignment="center" valignment="top" usebox="none">
25601 \begin_layout Plain Layout
25607 <cell alignment="center" valignment="top" usebox="none">
25610 \begin_layout Plain Layout
25616 <cell alignment="center" valignment="top" usebox="none">
25619 \begin_layout Plain Layout
25625 <cell alignment="center" valignment="top" usebox="none">
25628 \begin_layout Plain Layout
25636 <cell alignment="left" valignment="top" usebox="none">
25639 \begin_layout Plain Layout
25645 <cell alignment="left" valignment="top" usebox="none">
25648 \begin_layout Plain Layout
25654 <cell alignment="left" valignment="top" usebox="none">
25657 \begin_layout Plain Layout
25663 <cell alignment="left" valignment="top" usebox="none">
25666 \begin_layout Plain Layout
25672 <cell alignment="center" valignment="top" usebox="none">
25675 \begin_layout Plain Layout
25681 <cell alignment="center" valignment="top" usebox="none">
25684 \begin_layout Plain Layout
25690 <cell alignment="center" valignment="top" usebox="none">
25693 \begin_layout Plain Layout
25699 <cell alignment="center" valignment="top" usebox="none">
25702 \begin_layout Plain Layout
25710 <cell alignment="left" valignment="top" usebox="none">
25713 \begin_layout Plain Layout
25719 <cell alignment="left" valignment="top" usebox="none">
25722 \begin_layout Plain Layout
25728 <cell alignment="left" valignment="top" usebox="none">
25731 \begin_layout Plain Layout
25737 <cell alignment="left" valignment="top" usebox="none">
25740 \begin_layout Plain Layout
25746 <cell alignment="center" valignment="top" usebox="none">
25749 \begin_layout Plain Layout
25755 <cell alignment="center" valignment="top" usebox="none">
25758 \begin_layout Plain Layout
25764 <cell alignment="center" valignment="top" usebox="none">
25767 \begin_layout Plain Layout
25773 <cell alignment="center" valignment="top" usebox="none">
25776 \begin_layout Plain Layout
25784 <cell alignment="left" valignment="top" usebox="none">
25787 \begin_layout Plain Layout
25793 <cell alignment="left" valignment="top" usebox="none">
25796 \begin_layout Plain Layout
25802 <cell alignment="left" valignment="top" usebox="none">
25805 \begin_layout Plain Layout
25811 <cell alignment="left" valignment="top" usebox="none">
25814 \begin_layout Plain Layout
25820 <cell alignment="center" valignment="top" usebox="none">
25823 \begin_layout Plain Layout
25829 <cell alignment="center" valignment="top" usebox="none">
25832 \begin_layout Plain Layout
25838 <cell alignment="center" valignment="top" usebox="none">
25841 \begin_layout Plain Layout
25847 <cell alignment="center" valignment="top" usebox="none">
25850 \begin_layout Plain Layout
25858 <cell alignment="left" valignment="top" usebox="none">
25861 \begin_layout Plain Layout
25867 <cell alignment="left" valignment="top" usebox="none">
25870 \begin_layout Plain Layout
25876 <cell alignment="left" valignment="top" usebox="none">
25879 \begin_layout Plain Layout
25885 <cell alignment="left" valignment="top" usebox="none">
25888 \begin_layout Plain Layout
25894 <cell alignment="center" valignment="top" usebox="none">
25897 \begin_layout Plain Layout
25903 <cell alignment="center" valignment="top" usebox="none">
25906 \begin_layout Plain Layout
25912 <cell alignment="center" valignment="top" usebox="none">
25915 \begin_layout Plain Layout
25921 <cell alignment="center" valignment="top" usebox="none">
25924 \begin_layout Plain Layout
25932 <cell alignment="left" valignment="top" usebox="none">
25935 \begin_layout Plain Layout
25941 <cell alignment="left" valignment="top" usebox="none">
25944 \begin_layout Plain Layout
25950 <cell alignment="left" valignment="top" usebox="none">
25953 \begin_layout Plain Layout
25959 <cell alignment="left" valignment="top" usebox="none">
25962 \begin_layout Plain Layout
25968 <cell alignment="center" valignment="top" usebox="none">
25971 \begin_layout Plain Layout
25977 <cell alignment="center" valignment="top" usebox="none">
25980 \begin_layout Plain Layout
25986 <cell alignment="center" valignment="top" usebox="none">
25989 \begin_layout Plain Layout
25995 <cell alignment="center" valignment="top" usebox="none">
25998 \begin_layout Plain Layout
26006 <cell alignment="left" valignment="top" usebox="none">
26009 \begin_layout Plain Layout
26015 <cell alignment="left" valignment="top" usebox="none">
26018 \begin_layout Plain Layout
26024 <cell alignment="left" valignment="top" usebox="none">
26027 \begin_layout Plain Layout
26033 <cell alignment="left" valignment="top" usebox="none">
26036 \begin_layout Plain Layout
26042 <cell alignment="center" valignment="top" usebox="none">
26045 \begin_layout Plain Layout
26051 <cell alignment="center" valignment="top" usebox="none">
26054 \begin_layout Plain Layout
26060 <cell alignment="center" valignment="top" usebox="none">
26063 \begin_layout Plain Layout
26069 <cell alignment="center" valignment="top" usebox="none">
26072 \begin_layout Plain Layout
26080 <cell alignment="left" valignment="top" usebox="none">
26083 \begin_layout Plain Layout
26089 <cell alignment="left" valignment="top" usebox="none">
26092 \begin_layout Plain Layout
26098 <cell alignment="left" valignment="top" usebox="none">
26101 \begin_layout Plain Layout
26107 <cell alignment="left" valignment="top" usebox="none">
26110 \begin_layout Plain Layout
26116 <cell alignment="center" valignment="top" usebox="none">
26119 \begin_layout Plain Layout
26125 <cell alignment="center" valignment="top" usebox="none">
26128 \begin_layout Plain Layout
26134 <cell alignment="center" valignment="top" usebox="none">
26137 \begin_layout Plain Layout
26143 <cell alignment="center" valignment="top" usebox="none">
26146 \begin_layout Plain Layout
26160 \begin_layout Standard
26161 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
26162 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
26163 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
26164 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
26165 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
26166 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
26167 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
26168 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
26169 xargs xcolor xy yhmath
26172 \begin_layout Chapter
26173 Names of available colors to be used in layouts
26174 \begin_inset CommandInset label
26176 name "chap:Names-of-colors"
26183 \begin_layout Standard
26184 The colors listed here are the standard colors and the those that you can
26185 adjust in the LyX preferences.
26188 \begin_layout Description
26201 No particular color -- clear or default
26204 \begin_layout Description
26208 \begin_layout Description
26212 \begin_layout Description
26216 \begin_layout Description
26220 \begin_layout Description
26224 \begin_layout Description
26228 \begin_layout Description
26232 \begin_layout Description
26236 \begin_layout Description
26237 cursor Cursor color
26240 \begin_layout Description
26241 background Background color
26244 \begin_layout Description
26245 foreground Foreground color
26248 \begin_layout Description
26249 selection Background color of selected text
26252 \begin_layout Description
26253 selectiontext Foreground color of selected text
26256 \begin_layout Description
26257 latex Text color in LaTeX mode
26260 \begin_layout Description
26261 preview The color used for previews
26264 \begin_layout Description
26265 inlinecompletion Inline completion color
26268 \begin_layout Description
26269 nonunique_inlinecompletion Inline completion color for the non-unique part
26272 \begin_layout Description
26273 notelabel Label color for notes
26276 \begin_layout Description
26277 notebg Background color of notes
26280 \begin_layout Description
26281 commentlabel Label color for comments
26284 \begin_layout Description
26285 commentbg Background color of comments
26288 \begin_layout Description
26289 greyedoutlabel Label color for greyedout insets
26292 \begin_layout Description
26293 greyedouttext Color for greyedout inset text
26296 \begin_layout Description
26297 greyedoutbg Background color of greyedout inset
26300 \begin_layout Description
26301 shadedbg Background color of shaded box
26304 \begin_layout Description
26305 listingsbg Background color of listings inset
26308 \begin_layout Description
26309 branchlabel Label color for branches
26312 \begin_layout Description
26313 footlabel Label color for footnotes
26316 \begin_layout Description
26317 indexlabel Label color for index insets
26320 \begin_layout Description
26321 marginlabel Label color for margin notes
26324 \begin_layout Description
26325 phantomtext Text color for phantom insets
26328 \begin_layout Description
26329 urllabel Label color for URL insets
26332 \begin_layout Description
26333 urltext Color for URL inset text
26336 \begin_layout Description
26337 depthbar Color for the depth bars in the margin
26340 \begin_layout Description
26341 language Color for marking foreign language words
26344 \begin_layout Description
26345 command Text color for command insets
26348 \begin_layout Description
26349 commandbg Background color for command insets
26352 \begin_layout Description
26353 commandframe Frame color for command insets
26356 \begin_layout Description
26357 special Special chars text color
26360 \begin_layout Description
26361 graphicsbg Graphics inset background color
26364 \begin_layout Description
26365 math Math inset text color
26368 \begin_layout Description
26369 mathbg Math inset background color
26372 \begin_layout Description
26373 mathmacrobg Macro math inset background color
26376 \begin_layout Description
26377 mathmacrohoverbg Macro math inset background color hovered
26380 \begin_layout Description
26381 mathmacrolabel Macro math label color
26384 \begin_layout Description
26385 mathmacroframe Macro math frame color
26388 \begin_layout Description
26389 mathmacroblend Macro math blended color
26392 \begin_layout Description
26393 mathmacrooldarg Macro template color for old parameters
26396 \begin_layout Description
26397 mathmacronewarg Macro template color for new parameters
26400 \begin_layout Description
26401 mathframe Math inset frame color under focus
26404 \begin_layout Description
26405 mathcorners Math inset frame color not under focus
26408 \begin_layout Description
26409 mathline Math line color
26412 \begin_layout Description
26413 collapsable Collapsable insets text
26416 \begin_layout Description
26417 collapsableframe Collapsable insets frame
26420 \begin_layout Description
26421 insetbg Inset marker background color
26424 \begin_layout Description
26425 insetframe Inset marker frame color
26428 \begin_layout Description
26429 error Error box text color
26432 \begin_layout Description
26433 eolmarker End of line marker color
26436 \begin_layout Description
26437 added_space Added space colour
26440 \begin_layout Description
26441 appendix Appendix marker color
26444 \begin_layout Description
26445 changebar Changebar color
26448 \begin_layout Description
26449 deletedtext Deleted text color
26452 \begin_layout Description
26453 addedtext Added text color
26456 \begin_layout Description
26457 changedtextauthor1 Changed text color author 1
26460 \begin_layout Description
26461 changedtextauthor2 Changed text color author 2
26464 \begin_layout Description
26465 changedtextauthor3 Changed text color author 3
26468 \begin_layout Description
26469 changedtextauthor4 Changed text color author 4
26472 \begin_layout Description
26473 changedtextauthor5 Changed text color author 5
26476 \begin_layout Description
26477 deletedtextmodifier Deleted text modifying color
26480 \begin_layout Description
26481 tabularline Table line color
26484 \begin_layout Description
26485 tabularonoffline Table line color
26488 \begin_layout Description
26489 bottomarea Bottom area color
26492 \begin_layout Description
26493 newpage New page color
26496 \begin_layout Description
26497 pagebreak Page break color
26500 \begin_layout Description
26501 buttonframe Color used for button frame
26504 \begin_layout Description
26505 buttonbg Color used for bottom background
26508 \begin_layout Description
26509 buttonhoverbg Color used for buttom under focus
26512 \begin_layout Description
26513 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26517 \begin_layout Description
26518 previewframe Preview frame color
26521 \begin_layout Description
26522 inherit Color is inherited
26525 \begin_layout Description
26526 regexpframe Color for regexp frame
26529 \begin_layout Description
26530 ignore For ignoring updates of a color