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 CommandInset ref
6792 reference "sec:TextClass"
6796 for information on how to do so.
6799 \begin_layout Standard
6801 \begin_inset Flex MenuItem
6804 \begin_layout Plain Layout
6810 can be used with several different document classes, and even if it cannot,
6811 you might find it easiest just to write a module that you can load with
6813 The simplest possible such module would be:
6816 \begin_layout LyX-Code
6819 DeclareLyXModule{My Package}
6822 \begin_layout LyX-Code
6826 \begin_layout LyX-Code
6827 #Support for mypkg.sty.
6830 \begin_layout LyX-Code
6832 \begin_inset Newline newline
6838 \begin_layout LyX-Code
6840 \begin_inset Newline newline
6846 \begin_layout LyX-Code
6848 \begin_inset Newline newline
6854 \begin_inset Newline newline
6860 \begin_layout Standard
6861 A more complex module might modify the behavior of some existing constructs
6862 or define some new ones.
6864 \begin_inset CommandInset ref
6866 reference "sec:TextClass"
6873 \begin_layout Subsection
6875 \begin_inset Flex MenuItem
6878 \begin_layout Plain Layout
6887 \begin_layout Standard
6888 There are two possibilities here.
6889 One is that the class file is itself based upon an existing document class.
6890 For example, many thesis classes are based upon
6891 \begin_inset Flex MenuItem
6894 \begin_layout Plain Layout
6901 To see whether yours is, look for a line like
6904 \begin_layout LyX-Code
6910 \begin_layout Standard
6912 If so, then you may proceed largely as in the previous section, though
6914 \begin_inset Flex Code
6917 \begin_layout Plain Layout
6923 line will be different.
6924 If your new class is
6925 \begin_inset Flex Code
6928 \begin_layout Plain Layout
6934 and it is based upon
6935 \begin_inset Flex Code
6938 \begin_layout Plain Layout
6944 , then the line should read:
6948 \begin_layout Plain Layout
6949 And it will be easiest if you save the file to
6950 \begin_inset Flex Code
6953 \begin_layout Plain Layout
6959 : LyX assumes that the document class has the same name as the layout file.
6968 \begin_layout LyX-Code
6971 DeclareLaTeXClass[thesis,book]{thesis}
6974 \begin_layout Standard
6975 If, on the other hand, the new class is not based upon an existing class,
6976 you will probably have to
6977 \begin_inset Quotes eld
6981 \begin_inset Quotes erd
6985 We strongly suggest copying an existing layout file which uses a similar
6986 LaTeX class and then modifying it, if you can do so.
6987 At least use an existing file as a starting point so you can find out what
6988 items you need to worry about.
6989 Again, the specifics are covered below.
6992 \begin_layout Subsection
6994 \begin_inset CommandInset label
6996 name "sub:Creating-Templates"
7003 \begin_layout Standard
7004 Once you have written a layout file for a new document class, you might
7005 want to consider writing a
7010 A template acts as a kind of tutorial for your layout, showing how it might
7011 be used, though containing dummy content.
7012 You can of course look at the various templates included with LyX for ideas.
7015 \begin_layout Standard
7016 Templates are created just like usual documents: using LyX.
7017 The only difference is that usual documents contain all possible settings,
7018 including the font scheme and the paper size.
7019 Usually a user doesn't want a template to overwrite his preferred settings
7020 for such parameters.
7021 For that reason, the designer of a template should remove the corresponding
7023 \begin_inset Flex Code
7026 \begin_layout Plain Layout
7035 \begin_inset Flex Code
7038 \begin_layout Plain Layout
7046 from the template LyX file.
7047 This can be done with any simple text-editor, for example
7048 \begin_inset Flex Code
7051 \begin_layout Plain Layout
7058 \begin_inset Flex Code
7061 \begin_layout Plain Layout
7071 \begin_layout Standard
7072 Put the edited template files you create in
7073 \begin_inset Flex Code
7076 \begin_layout Plain Layout
7082 , copy the ones you use from the global template directory in
7083 \begin_inset Flex Code
7086 \begin_layout Plain Layout
7092 to the same place, and redefine the template path in the
7093 \begin_inset Flex MenuItem
7096 \begin_layout Plain Layout
7097 Tools\SpecialChar \menuseparator
7098 Preferences\SpecialChar \menuseparator
7107 \begin_layout Standard
7108 Note, by the way, that there is a template which has a particular meaning:
7110 \begin_inset Flex Code
7113 \begin_layout Plain Layout
7120 This template is loaded every time you create a new document with
7121 \begin_inset Flex MenuItem
7124 \begin_layout Plain Layout
7125 File\SpecialChar \menuseparator
7131 in order to provide useful defaults.
7132 To create this template from inside LyX, all you have to do is to open
7133 a document with the correct settings, and use the
7134 \begin_inset Flex MenuItem
7137 \begin_layout Plain Layout
7138 Save as Document Defaults
7146 \begin_layout Subsection
7147 Upgrading old layout files
7150 \begin_layout Standard
7151 The format of layout files changes with each LyX release, so old layout
7152 files need to be converted to the new format.
7153 This process has been automated since LyX 1.4: If LyX reads a layout file
7154 in an older format, it automatically calls the script
7155 \begin_inset Flex Code
7158 \begin_layout Plain Layout
7164 to convert it to a temporary file in current format.
7165 The original file is left untouched.
7166 If you use the layout file often, then, you may want to convert it permanently,
7167 so that LyX does not have to do so itself every time.
7168 To do this, you can call the converter manually:
7171 \begin_layout LyX-Code
7172 mv myclass.layout myclass.old
7175 \begin_layout LyX-Code
7176 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7179 \begin_layout Standard
7181 \begin_inset Flex Code
7184 \begin_layout Plain Layout
7190 with the name of your LyX system directory, of course.
7193 \begin_layout Standard
7194 Note that manual conversion does not affect included files, so these will
7195 have to be converted separately.
7198 \begin_layout Section
7199 \begin_inset CommandInset label
7201 name "sec:TextClass"
7205 The layout file format
7208 \begin_layout Standard
7209 When it's finally time to get your hands dirty and create or edit your own
7210 layout file, the following sections describe what you're up against.
7211 Our advice is to go slowly, save and test often, listen to soothing music,
7212 and enjoy one or two of your favorite adult beverages; more if you are
7213 getting particularly stuck.
7214 It's really not that hard, except that the multitude of options can become
7215 overwhelming if you try to do too much in one sitting.
7216 Go have another adult beverage, just for good measure.
7219 \begin_layout Standard
7220 Note that all the tags used in layout files are case-insensitive.
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7232 \begin_inset Flex Code
7235 \begin_layout Plain Layout
7242 \begin_inset Flex Code
7245 \begin_layout Plain Layout
7251 are really the same tag.
7252 The possible values are printed in brackets after the feature's name.
7253 The default value if a feature isn't specified inside a text class-description
7255 \begin_inset Flex Code
7258 \begin_layout Plain Layout
7267 If the argument has a data type like
7268 \begin_inset Quotes eld
7272 \begin_inset Quotes erd
7276 \begin_inset Quotes eld
7280 \begin_inset Quotes erd
7283 , the default is shown like this:
7284 \begin_inset Flex Code
7287 \begin_layout Plain Layout
7298 \begin_layout Subsection
7299 The document class declaration
7300 \change_inserted -712698321 1349766602
7306 \begin_layout Standard
7307 Lines in a layout file which begin with
7308 \begin_inset Flex Code
7311 \begin_layout Plain Layout
7318 There is one exception to this rule.
7320 \begin_inset Flex Code
7323 \begin_layout Plain Layout
7329 files should begin with
7330 \change_deleted -712698321 1349766533
7334 \change_inserted -712698321 1349766536
7340 \begin_layout LyX-Code
7343 #% Do not delete the line below; configure depends on this
7346 \begin_layout LyX-Code
7352 \change_deleted -712698321 1349766193
7354 \change_inserted -712698321 1349766201
7355 Article (Standard Class)
7358 \change_inserted -712698321 1349766538
7362 \begin_layout LyX-Code
7364 \change_inserted -712698321 1349766581
7369 DeclareCategory{Articles}
7374 \begin_layout Standard
7376 \change_inserted -712698321 1349766695
7380 \change_inserted -712698321 1349766626
7384 \change_deleted -712698321 1349766628
7386 \change_inserted -712698321 1349766628
7389 used when you (re)configure LyX.
7390 The layout file is read by the LaTeX script
7391 \begin_inset Flex Code
7394 \begin_layout Plain Layout
7400 , in a special mode where
7401 \begin_inset Flex Code
7404 \begin_layout Plain Layout
7411 The first line is just a LaTeX comment,
7412 \change_deleted -712698321 1349766656
7415 the second one contains the
7416 \change_inserted -712698321 1349766650
7419 declaration of the text class
7420 \change_inserted -712698321 1349766689
7421 , and the third line contains the optional classification of the class
7424 If these lines appear in a file named
7425 \begin_inset Flex Code
7428 \begin_layout Plain Layout
7434 , then they define a text class of name
7435 \begin_inset Flex Code
7438 \begin_layout Plain Layout
7444 (the name of the layout file) which uses the LaTeX document class
7445 \begin_inset Flex Code
7448 \begin_layout Plain Layout
7454 (the default is to use the same name as the layout).
7456 \begin_inset Quotes eld
7460 \change_deleted -712698321 1349766253
7462 \change_inserted -712698321 1349766260
7463 Article (Standard Class)
7466 \begin_inset Quotes erd
7469 that appears above is used as a description of the text class in the
7470 \begin_inset Flex MenuItem
7473 \begin_layout Plain Layout
7474 Document\SpecialChar \menuseparator
7482 \change_inserted -712698321 1349767097
7484 \begin_inset Quotes eld
7488 \begin_inset Quotes erd
7491 in the example) is also used in the
7492 \begin_inset Flex MenuItem
7495 \begin_layout Plain Layout
7497 \change_inserted -712698321 1349766801
7498 Document\SpecialChar \menuseparator
7504 dialog: the text classes are grouped by these categories (which are usually
7505 genres, so typical categories are
7506 \begin_inset Quotes eld
7510 \begin_inset Quotes erd
7514 \begin_inset Quotes eld
7518 \begin_inset Quotes erd
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7530 \begin_inset Quotes eld
7534 \begin_inset Quotes erd
7538 \begin_inset Quotes eld
7542 \begin_inset Quotes erd
7546 \begin_inset Quotes eld
7550 \begin_inset Quotes erd
7554 If no category has been declared, the class will be put in the
7555 \begin_inset Quotes eld
7559 \begin_inset Quotes erd
7567 \begin_layout Standard
7568 Let's assume that you wrote your own text class that uses the
7569 \begin_inset Flex Code
7572 \begin_layout Plain Layout
7578 document class, but where you changed the appearance of the section headings.
7579 If you put it in a file
7580 \begin_inset Flex Code
7583 \begin_layout Plain Layout
7589 , the header of this file should be:
7592 \begin_layout LyX-Code
7595 #% Do not delete the line below; configure depends on this
7598 \begin_layout LyX-Code
7603 DeclareLaTeXClass[article]{
7604 \change_deleted -712698321 1349766303
7606 \change_inserted -712698321 1349766303
7610 \change_deleted -712698321 1349766338
7612 \change_inserted -712698321 1349766338
7616 \change_deleted -712698321 1349766340
7618 \change_inserted -712698321 1349766340
7622 \change_deleted -712698321 1349766343
7624 \change_inserted -712698321 1349766343
7628 \change_inserted -712698321 1349767223
7632 \begin_layout LyX-Code
7634 \change_inserted -712698321 1349767223
7639 DeclareCategory{Articles}
7644 \begin_layout Standard
7645 This declares a text class
7646 \begin_inset Flex Code
7649 \begin_layout Plain Layout
7655 , associated with the LaTeX document class
7656 \begin_inset Flex Code
7659 \begin_layout Plain Layout
7666 \begin_inset Quotes eld
7670 \change_deleted -712698321 1349766329
7672 \change_inserted -712698321 1349766329
7676 \change_deleted -712698321 1349766347
7678 \change_inserted -712698321 1349766347
7682 \change_deleted -712698321 1349766350
7684 \change_inserted -712698321 1349766350
7688 \change_deleted -712698321 1349766352
7690 \change_inserted -712698321 1349766352
7694 \begin_inset Quotes erd
7698 If your text class depends on several packages, you can declare it as:
7701 \begin_layout LyX-Code
7704 #% Do not delete the line below; configure depends on this
7707 \begin_layout LyX-Code
7712 DeclareLaTeXClass[article,foo.sty]{
7713 \change_deleted -712698321 1349766366
7715 \change_inserted -712698321 1349766366
7719 \change_deleted -712698321 1349766369
7721 \change_inserted -712698321 1349766369
7725 \change_deleted -712698321 1349766371
7727 \change_inserted -712698321 1349766371
7731 \change_deleted -712698321 1349766374
7733 \change_inserted -712698321 1349766374
7737 \change_inserted -712698321 1349767240
7741 \begin_layout LyX-Code
7743 \change_inserted -712698321 1349767240
7748 DeclareCategory{Articles}
7753 \begin_layout Standard
7754 This indicates that your text class uses the
7755 \begin_inset Flex Code
7758 \begin_layout Plain Layout
7765 Finally, it is also possible to declare classes for DocBook code.
7766 Typical declarations will look like:
7769 \begin_layout LyX-Code
7772 #% Do not delete the line below; configure depends on this
7775 \begin_layout LyX-Code
7780 DeclareDocBookClass[article]{SGML (DocBook
7781 \change_deleted -712698321 1349766387
7783 \change_inserted -712698321 1349766387
7787 \change_inserted -712698321 1349767247
7791 \begin_layout LyX-Code
7793 \change_inserted -712698321 1349767302
7798 DeclareCategory{Articles (DocBook)}
7803 \begin_layout Standard
7804 Note that these declarations can also be given an optional parameter declaring
7805 the name of the document class (but not a list).
7808 \begin_layout Standard
7809 So, to be as explicit as possible, the form of the layout declaration is:
7812 \begin_layout LyX-Code
7817 DeclareLaTeXClass[class,package.sty]{layout description}
7818 \change_inserted -712698321 1349767329
7822 \begin_layout LyX-Code
7824 \change_inserted -712698321 1349767339
7829 DeclareCategory{category}
7834 \begin_layout Standard
7835 The class need only be specified if the name of the LaTeX class file and
7836 the name of the layout file are different or if there are packages to load.
7837 If the name of the class file is not specified, then LyX will simply assume
7838 that it is the same as the name of the layout file.
7841 \begin_layout Standard
7842 When the text class has been modified to your taste, all you have to do
7843 is to copy it either to
7844 \begin_inset Flex Code
7847 \begin_layout Plain Layout
7854 \begin_inset Flex Code
7857 \begin_layout Plain Layout
7864 \begin_inset Flex MenuItem
7867 \begin_layout Plain Layout
7868 Tools\SpecialChar \menuseparator
7874 , exit LyX and restart.
7875 Then your new text class should be available along with the others.
7878 \begin_layout Standard
7879 Once the layout file is installed, you can edit it and see your changes
7880 without having to reconfigure or to restart LyX.
7885 \begin_layout Plain Layout
7886 In versions of LyX prior to 1.6, this was not true.
7887 As a result, editing layout files was very time consuming, since you had
7888 constantly to restart LyX to see changes.
7893 You can force a reload of the current layout by using the LyX function
7895 \begin_inset Flex MenuItem
7898 \begin_layout Plain Layout
7905 There is no default binding for this function—though, of course, you can
7906 bind it to a key yourself.
7907 But you will normally use this function simply by entering it in the mini-buffe
7912 \begin_layout Standard
7918 \begin_inset Flex MenuItem
7921 \begin_layout Plain Layout
7927 is very much an `advanced feature'.
7932 recommended that you save your work before using this function.
7937 recommended that you not attempt to edit layout information while simultaneousl
7938 y working on a document that you care about.
7939 Use a test document.
7940 Syntax errors and the like in your layout file could cause peculiar behavior.
7941 In particular, such errors could cause LyX to regard the current layout
7942 as invalid and to attempt to switch to some other layout.
7946 \begin_layout Plain Layout
7947 Really bad syntax errors may even caused LyX to exit.
7948 This is because certain sorts of errors may make LyX unable to read
7958 The LyX team strives to keep LyX stable in such situations, but safe is
7963 \begin_layout Plain Layout
7964 While we're giving advice: make regular backups.
7965 And be nice to your mother.
7973 \begin_layout Subsection
7974 The Module declaration
7977 \begin_layout Standard
7978 A module must begin with a line like the following:
7981 \begin_layout LyX-Code
7984 DeclareLyXModule[endnotes.sty]{Endnotes}
7987 \begin_layout Standard
7988 The mandatory argument, in curly brackets, is the name of the module, as
7990 \begin_inset Flex MenuItem
7993 \begin_layout Plain Layout
7994 Document\SpecialChar \menuseparator
7995 Settings\SpecialChar \menuseparator
8002 The argument in square brackets is optional: It declares any LaTeX packages
8003 on which the module depends.
8004 It is also possible to use the form
8005 \begin_inset Flex MenuItem
8008 \begin_layout Plain Layout
8014 as an optional argument, which declares that the module can only be used
8015 when there exists a conversion chain between the formats `
8016 \begin_inset Flex Code
8019 \begin_layout Plain Layout
8026 \begin_inset Flex Code
8029 \begin_layout Plain Layout
8038 \begin_layout Standard
8039 The module declaration should then be followed by lines like the following
8043 \begin_layout Plain Layout
8044 Preferably in English if the module should be published with LyX.
8045 This description will appear in the list of messages to be translated and
8046 will be thus translated with the next interface update.
8054 \begin_layout LyX-Code
8058 \begin_layout LyX-Code
8059 #Adds an endnote command, in addition to footnotes.
8063 \begin_layout LyX-Code
8064 #You will need to add
8066 theendnotes in TeX code where you
8069 \begin_layout LyX-Code
8070 #want the endnotes to appear.
8074 \begin_layout LyX-Code
8078 \begin_layout LyX-Code
8079 #Requires: somemodule | othermodule
8082 \begin_layout LyX-Code
8083 #Excludes: badmodule
8086 \begin_layout Standard
8087 The description is used in
8088 \begin_inset Flex MenuItem
8091 \begin_layout Plain Layout
8092 Document\SpecialChar \menuseparator
8093 Settings\SpecialChar \menuseparator
8099 to provide the user with information about what the module does.
8101 \begin_inset Flex Code
8104 \begin_layout Plain Layout
8110 line is used to identify other modules with which this one must be used;
8112 \begin_inset Flex Code
8115 \begin_layout Plain Layout
8121 line is used to identify modules with which this one may not be used.
8122 Both are optional, and, as shown, multiple modules should be separated
8123 with the pipe symbol: |.
8124 Note that the required modules are treated disjunctively:
8128 of the required modules must be used.
8133 excluded module may be used.
8134 Note that modules are identified here by their filenames without the
8135 \begin_inset Flex Code
8138 \begin_layout Plain Layout
8146 \begin_inset Flex Code
8149 \begin_layout Plain Layout
8156 \begin_inset Flex Code
8159 \begin_layout Plain Layout
8168 \begin_layout Subsection
8172 \begin_layout Standard
8173 The first non-comment line of any layout file, included file, or module
8178 contain the file format number:
8181 \begin_layout Description
8182 \begin_inset Flex Code
8185 \begin_layout Plain Layout
8192 \begin_inset Flex Code
8195 \begin_layout Plain Layout
8201 ] The format number of the layout file.
8204 \begin_layout Standard
8205 This tag was introduced with LyX
8206 \begin_inset space ~
8210 Layout files from older LyX versions do not have an explicit file format
8211 and are considered to have
8212 \begin_inset Flex Code
8215 \begin_layout Plain Layout
8217 \begin_inset space ~
8226 The format for the present version of LyX is format 35.
8227 But each version of LyX is capable of reading earlier versions' layout
8228 files, just as they are capable of reading files produced by earlier versions
8230 There is, however, no provision for converting to earlier formats.
8233 \begin_layout Subsection
8234 \begin_inset CommandInset label
8236 name "sub:General-text-class"
8240 General text class parameters
8243 \begin_layout Standard
8244 These are general parameters that govern the behavior of an entire document
8250 mean that they must appear in
8251 \begin_inset Flex Code
8254 \begin_layout Plain Layout
8260 files rather than in modules.
8261 A module can contain any layout tag.)
8264 \begin_layout Description
8265 \begin_inset Flex Code
8268 \begin_layout Plain Layout
8274 Adds information that will be output in the
8275 \begin_inset Flex Code
8278 \begin_layout Plain Layout
8284 block when the document is output to XHTML.
8285 Typically, this would be used to output CSS style information, but it can
8286 be used for anything that can appear in
8287 \begin_inset Flex Code
8290 \begin_layout Plain Layout
8298 \begin_inset Quotes eld
8302 \begin_inset Flex Code
8305 \begin_layout Plain Layout
8312 \begin_inset Quotes erd
8318 \begin_layout Description
8319 \begin_inset Flex Code
8322 \begin_layout Plain Layout
8328 Adds information to the document preamble.
8330 \begin_inset Newline newline
8334 \begin_inset Quotes eld
8338 \begin_inset Flex Code
8341 \begin_layout Plain Layout
8348 \begin_inset Quotes erd
8354 \begin_layout Description
8355 \begin_inset Flex Code
8358 \begin_layout Plain Layout
8364 Defines formats for use in the display of bibliographic information.
8366 \begin_inset CommandInset ref
8368 reference "sub:Citation-format-description"
8374 \begin_inset Quotes eld
8378 \begin_inset Flex Code
8381 \begin_layout Plain Layout
8388 \begin_inset Quotes erd
8394 \begin_layout Description
8395 \begin_inset Flex Code
8398 \begin_layout Plain Layout
8404 Describes various global options supported by the document class.
8406 \begin_inset space ~
8410 \begin_inset CommandInset ref
8412 reference "sub:ClassOptions"
8418 \begin_inset Quotes eld
8422 \begin_inset Flex Code
8425 \begin_layout Plain Layout
8432 \begin_inset Quotes erd
8438 \begin_layout Description
8439 \begin_inset Flex Code
8442 \begin_layout Plain Layout
8449 \begin_inset Flex Code
8452 \begin_layout Plain Layout
8461 \begin_inset space \thinspace{}
8465 \begin_inset Flex Code
8468 \begin_layout Plain Layout
8474 ] Whether the class should
8478 to having one or two columns.
8479 Can be changed in the
8480 \begin_inset Flex MenuItem
8483 \begin_layout Plain Layout
8484 Document\SpecialChar \menuseparator
8493 \begin_layout Description
8494 \begin_inset Flex Code
8497 \begin_layout Plain Layout
8504 \begin_inset Flex Code
8507 \begin_layout Plain Layout
8513 ] This sequence defines the properties for a counter.
8514 If the counter does not yet exist, it is created; if it does exist, it
8517 \begin_inset Quotes eld
8521 \begin_inset Flex Code
8524 \begin_layout Plain Layout
8531 \begin_inset Quotes erd
8535 \begin_inset Newline newline
8539 \begin_inset space ~
8543 \begin_inset CommandInset ref
8545 reference "sub:Counters"
8549 for details on counters.
8552 \begin_layout Description
8553 \begin_inset Flex Code
8556 \begin_layout Plain Layout
8562 Sets the default font used to display the document.
8564 \begin_inset space ~
8568 \begin_inset CommandInset ref
8570 reference "sub:Font-description"
8574 for how to declare fonts.
8576 \begin_inset Quotes eld
8580 \begin_inset Flex Code
8583 \begin_layout Plain Layout
8590 \begin_inset Quotes erd
8596 \begin_layout Description
8597 \begin_inset Flex Code
8600 \begin_layout Plain Layout
8607 \begin_inset Flex Code
8610 \begin_layout Plain Layout
8616 ] Specifies a module to be included by default with this document class.
8617 The module is specified as filename without the
8618 \begin_inset Flex Code
8621 \begin_layout Plain Layout
8628 The user can still remove the module, but it will be active at the outset.
8629 (This applies only when new files are created, or when this class is chosen
8630 for an existing document.)
8633 \begin_layout Description
8634 \begin_inset Flex Code
8637 \begin_layout Plain Layout
8644 \begin_inset Flex Code
8647 \begin_layout Plain Layout
8653 ] This is the style that will be assigned to new paragraphs, usually
8654 \begin_inset Flex MenuItem
8657 \begin_layout Plain Layout
8664 This will default to the first defined style if not given, but you are
8665 encouraged to use this directive.
8668 \begin_layout Description
8669 \begin_inset Flex Code
8672 \begin_layout Plain Layout
8679 \begin_inset Flex Code
8682 \begin_layout Plain Layout
8688 ] This tag indicates that the module (which is specified by filename without
8690 \begin_inset Flex Code
8693 \begin_layout Plain Layout
8699 extension) cannot be used with this document class.
8700 This might be used in a journal-specific layout file to prevent, say, the
8702 \begin_inset Flex Code
8705 \begin_layout Plain Layout
8711 module that numbers theorems by section.
8716 be used in a module.
8717 Modules have their own way of excluding other modules (see section
8718 \begin_inset space ~
8722 \begin_inset CommandInset ref
8724 reference "sub:Layout-modules"
8731 \begin_layout Description
8732 \begin_inset Flex Code
8735 \begin_layout Plain Layout
8741 Defines a new float.
8743 \begin_inset space ~
8747 \begin_inset CommandInset ref
8749 reference "sub:Floats"
8755 \begin_inset Quotes eld
8759 \begin_inset Flex Code
8762 \begin_layout Plain Layout
8769 \begin_inset Quotes erd
8775 \begin_layout Description
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8785 Sets the information that will be output in the
8786 \begin_inset Flex Code
8789 \begin_layout Plain Layout
8795 block when this document class is output to XHTML.
8796 Note that this will completely override any prior
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Flex Code
8810 \begin_layout Plain Layout
8818 \begin_inset Newline newline
8822 \begin_inset Flex Code
8825 \begin_layout Plain Layout
8831 if you just want to add material to the preamble.) Must end with
8832 \begin_inset Quotes eld
8836 \begin_inset Flex Code
8839 \begin_layout Plain Layout
8846 \begin_inset Quotes erd
8852 \begin_layout Description
8853 \begin_inset Flex Code
8856 \begin_layout Plain Layout
8863 \begin_inset Flex Code
8866 \begin_layout Plain Layout
8872 ] The style to use for the table of contents, bibliography, and so forth,
8873 when the document is output to HTML.
8874 For articles, this should normally be
8875 \begin_inset Flex Code
8878 \begin_layout Plain Layout
8885 \begin_inset Flex Code
8888 \begin_layout Plain Layout
8895 If it is not given, then LyX will attempt to figure out which layout to
8899 \begin_layout Description
8900 \begin_inset Flex Code
8903 \begin_layout Plain Layout
8910 \begin_inset Flex Code
8913 \begin_layout Plain Layout
8919 ] Modifies the properties of the given counter.
8920 If the counter does not exist, the statement is ignored.
8922 \begin_inset Quotes eld
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8936 \begin_inset Quotes erd
8940 \begin_inset Newline newline
8944 \begin_inset space ~
8948 \begin_inset CommandInset ref
8950 reference "sub:Counters"
8954 for details on counters.
8957 \begin_layout Description
8958 \begin_inset Flex Code
8961 \begin_layout Plain Layout
8968 \begin_inset Flex Code
8971 \begin_layout Plain Layout
8977 ] Modifies the properties of the given paragraph style.
8978 If the style does not exist, the statement is ignored.
8980 \begin_inset Quotes eld
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8994 \begin_inset Quotes erd
9000 \begin_layout Description
9001 \begin_inset Flex Code
9004 \begin_layout Plain Layout
9011 \begin_inset Flex Code
9014 \begin_layout Plain Layout
9020 ] This allows you to include another layout definition file within yours
9021 to avoid duplicating commands.
9022 Common examples are the standard layout files, for example,
9023 \begin_inset Flex Code
9026 \begin_layout Plain Layout
9032 , which contains most of the basic layouts.
9035 \begin_layout Description
9036 \begin_inset Flex Code
9039 \begin_layout Plain Layout
9046 \begin_inset Flex Code
9049 \begin_layout Plain Layout
9055 ] This section (re-)defines the layout of an inset.
9056 It can be applied to an existing inset or to a new, user-defined inset,
9057 e.g., a new character style.
9059 \begin_inset Quotes eld
9063 \begin_inset Flex Code
9066 \begin_layout Plain Layout
9073 \begin_inset Quotes erd
9077 \begin_inset Newline newline
9081 \begin_inset space ~
9085 \begin_inset CommandInset ref
9087 reference "sub:Flex-insets-and"
9091 for more information.
9095 \begin_layout Description
9096 \begin_inset Flex Code
9099 \begin_layout Plain Layout
9106 \begin_inset Flex Code
9109 \begin_layout Plain Layout
9115 ] A string that indicates the width of the left margin on the screen, for
9117 \begin_inset Quotes eld
9121 \begin_inset Flex Code
9124 \begin_layout Plain Layout
9131 \begin_inset Quotes erd
9135 (Note that this is not a `length', like
9136 \begin_inset Quotes eld
9140 \begin_inset Quotes erd
9146 \begin_layout Description
9147 \begin_inset Flex Code
9150 \begin_layout Plain Layout
9157 \begin_inset Flex Code
9160 \begin_layout Plain Layout
9166 ] Deletes an existing counter, usually one defined in an included file.
9169 \begin_layout Description
9170 \begin_inset Flex Code
9173 \begin_layout Plain Layout
9180 \begin_inset Flex Code
9183 \begin_layout Plain Layout
9189 ] Deletes an existing float.
9190 This is particularly useful when you want to suppress a float that has
9191 been defined in an input file.
9194 \begin_layout Description
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9205 \begin_inset Flex Code
9208 \begin_layout Plain Layout
9214 ] Deletes an existing style.
9217 \begin_layout Description
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9228 \begin_inset Flex Code
9231 \begin_layout Plain Layout
9237 ] The file format (as defined in the LyX preferences) produced by this document
9239 It is mainly useful when
9240 \begin_inset Flex Code
9243 \begin_layout Plain Layout
9250 \begin_inset Flex Code
9253 \begin_layout Plain Layout
9259 and one wants to define a new type of literate document.
9260 The format is reset to
9261 \begin_inset Quotes eld
9265 \begin_inset Flex Code
9268 \begin_layout Plain Layout
9275 \begin_inset Quotes erd
9279 \begin_inset Quotes eld
9283 \begin_inset Flex Code
9286 \begin_layout Plain Layout
9293 \begin_inset Quotes erd
9296 when the corresponding
9297 \begin_inset Flex Code
9300 \begin_layout Plain Layout
9306 parameter is encountered.
9309 \begin_layout Description
9310 \begin_inset Flex Code
9313 \begin_layout Plain Layout
9320 \begin_inset Flex Code
9323 \begin_layout Plain Layout
9334 \begin_inset Flex Code
9337 \begin_layout Plain Layout
9344 \begin_inset Flex Code
9347 \begin_layout Plain Layout
9353 ] Specifies what sort of output documents using this class will produce.
9356 \begin_layout Description
9357 \begin_inset Flex Code
9360 \begin_layout Plain Layout
9367 \begin_inset Flex Code
9370 \begin_layout Plain Layout
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9389 \begin_inset Flex Code
9392 \begin_layout Plain Layout
9398 ] The default pagestyle.
9399 Can be changed in the
9400 \begin_inset Flex MenuItem
9403 \begin_layout Plain Layout
9404 Document\SpecialChar \menuseparator
9413 \begin_layout Description
9414 \begin_inset Flex Code
9417 \begin_layout Plain Layout
9423 Sets the preamble for the LaTeX document.
9424 Note that this will completely override any prior
9425 \begin_inset Flex Code
9428 \begin_layout Plain Layout
9435 \begin_inset Flex Code
9438 \begin_layout Plain Layout
9446 \begin_inset Flex Code
9449 \begin_layout Plain Layout
9455 if you just want to add material to the preamble.) Must end with
9456 \begin_inset Quotes eld
9460 \begin_inset Flex Code
9463 \begin_layout Plain Layout
9470 \begin_inset Quotes erd
9476 \begin_layout Description
9477 \begin_inset Flex Code
9480 \begin_layout Plain Layout
9487 \begin_inset Flex Code
9490 \begin_layout Plain Layout
9497 \begin_inset Flex Code
9500 \begin_layout Plain Layout
9509 \begin_inset space \thinspace{}
9513 \begin_inset Flex Code
9516 \begin_layout Plain Layout
9522 ] Whether the class already provides the feature
9523 \begin_inset Flex Code
9526 \begin_layout Plain Layout
9533 A feature is in general the name of a package (e.
9534 \begin_inset space \thinspace{}
9538 \begin_inset space \space{}
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9552 \begin_inset Flex Code
9555 \begin_layout Plain Layout
9562 \begin_inset space \thinspace{}
9566 \begin_inset space \space{}
9570 \begin_inset Flex Code
9573 \begin_layout Plain Layout
9580 \begin_inset Flex Code
9583 \begin_layout Plain Layout
9591 \begin_inset space ~
9595 \begin_inset CommandInset ref
9597 reference "chap:List-of-functions"
9601 for the list of features.
9604 \begin_layout Description
9605 \begin_inset Flex Code
9608 \begin_layout Plain Layout
9615 \begin_inset Flex Code
9618 \begin_layout Plain Layout
9624 ] Indicates that this layout provides the functionality of the module mentioned,
9625 which should be specified by the filename without the
9626 \begin_inset Flex Code
9629 \begin_layout Plain Layout
9636 This will typically be used if the layout includes the module directly,
9637 rather than using the
9638 \begin_inset Flex Code
9641 \begin_layout Plain Layout
9647 tag to indicate that it ought to be used.
9648 It could also be used in a module that provided an alternate implementation
9649 of the same functionality.
9652 \begin_layout Description
9653 \begin_inset Flex Code
9656 \begin_layout Plain Layout
9663 \begin_inset Flex Code
9666 \begin_layout Plain Layout
9672 ] Whether the class requires the feature
9673 \begin_inset Flex Code
9676 \begin_layout Plain Layout
9683 Multiple features must be separated by commas.
9684 Note that you can only request supported features.
9686 \begin_inset space ~
9690 \begin_inset CommandInset ref
9692 reference "chap:List-of-functions"
9696 for the list of features.)
9699 \begin_layout Description
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9710 \begin_inset Flex Code
9713 \begin_layout Plain Layout
9719 ] A string that indicates the width of the right margin on the screen, for
9721 \begin_inset Quotes eld
9725 \begin_inset Flex Code
9728 \begin_layout Plain Layout
9735 \begin_inset Quotes erd
9741 \begin_layout Description
9742 \begin_inset Flex Code
9745 \begin_layout Plain Layout
9752 \begin_inset Flex Code
9755 \begin_layout Plain Layout
9761 ] Sets which divisions get numbered.
9763 \begin_inset Newline newline
9767 \begin_inset Flex Code
9770 \begin_layout Plain Layout
9779 \begin_layout Description
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9802 \begin_inset space \thinspace{}
9806 \begin_inset Flex Code
9809 \begin_layout Plain Layout
9815 ] Whether the class-default should be printing on one or both sides of the
9817 Can be changed in the
9818 \begin_inset Flex MenuItem
9821 \begin_layout Plain Layout
9822 Document\SpecialChar \menuseparator
9831 \begin_layout Description
9832 \begin_inset Flex Code
9835 \begin_layout Plain Layout
9842 \begin_inset Flex Code
9845 \begin_layout Plain Layout
9851 ] This sequence defines a paragraph style.
9852 If the style does not yet exist, it is created; if it does exist, its parameter
9855 \begin_inset Quotes eld
9859 \begin_inset Flex Code
9862 \begin_layout Plain Layout
9869 \begin_inset Quotes erd
9873 \begin_inset Newline newline
9877 \begin_inset space ~
9881 \begin_inset CommandInset ref
9883 reference "sub:Paragraph-Styles"
9887 for details on paragraph styles.
9890 \begin_layout Description
9891 \begin_inset Flex Code
9894 \begin_layout Plain Layout
9901 \begin_inset Flex Code
9904 \begin_layout Plain Layout
9910 ] The name of the command or environment to be used with
9911 \begin_inset Flex Code
9914 \begin_layout Plain Layout
9923 \begin_layout Description
9924 \begin_inset Flex Code
9927 \begin_layout Plain Layout
9934 \begin_inset Flex Code
9937 \begin_layout Plain Layout
9946 \begin_inset Flex Code
9949 \begin_layout Plain Layout
9955 ] Indicates what kind of markup is used to define the title of a document.
9957 \begin_inset Flex Code
9960 \begin_layout Plain Layout
9966 means that the macro with name
9967 \begin_inset Flex Code
9970 \begin_layout Plain Layout
9976 will be inserted after the last layout which has
9977 \begin_inset Quotes eld
9981 \begin_inset Flex Code
9984 \begin_layout Plain Layout
9986 \begin_inset space ~
9995 \begin_inset Quotes erd
10000 \begin_inset Flex Code
10003 \begin_layout Plain Layout
10009 corresponds to the case where all layouts which have
10010 \begin_inset Quotes eld
10014 \begin_inset Flex Code
10017 \begin_layout Plain Layout
10019 \begin_inset space ~
10028 \begin_inset Quotes erd
10031 should be enclosed into the
10032 \begin_inset Flex Code
10035 \begin_layout Plain Layout
10044 \begin_layout Description
10045 \begin_inset Flex Code
10048 \begin_layout Plain Layout
10055 \begin_inset Flex Code
10058 \begin_layout Plain Layout
10064 ] Sets which divisions are included in the table of contents.
10066 \begin_inset Flex Code
10069 \begin_layout Plain Layout
10078 \begin_layout Subsection
10079 \begin_inset Flex Code
10082 \begin_layout Plain Layout
10089 \begin_inset CommandInset label
10091 name "sub:ClassOptions"
10098 \begin_layout Standard
10100 \begin_inset Flex Code
10103 \begin_layout Plain Layout
10109 section can contain the following entries:
10112 \begin_layout Description
10113 \begin_inset Flex Code
10116 \begin_layout Plain Layout
10123 \begin_inset Flex Code
10126 \begin_layout Plain Layout
10132 ] The list of available font sizes for the document's main font, separated
10134 \begin_inset Quotes eld
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10148 \begin_inset Quotes erd
10154 \begin_layout Description
10155 \begin_inset Flex Code
10158 \begin_layout Plain Layout
10164 Used to set the DTD line with XML-based output classes.
10166 \begin_inset space \thinspace{}
10170 \begin_inset Quotes eld
10173 -//OASIS//DTD DocBook V4.2//EN
10174 \begin_inset Quotes erd
10180 \begin_layout Description
10181 \begin_inset Flex Code
10184 \begin_layout Plain Layout
10191 \begin_inset Flex Code
10194 \begin_layout Plain Layout
10195 string="empty|plain|headings|fancy"
10200 ] The list of available page sty\SpecialChar \-
10202 \begin_inset Quotes eld
10206 \begin_inset Flex Code
10209 \begin_layout Plain Layout
10216 \begin_inset Quotes erd
10222 \begin_layout Description
10223 \begin_inset Flex Code
10226 \begin_layout Plain Layout
10233 \begin_inset Flex Code
10236 \begin_layout Plain Layout
10242 ] Some document class options, separated by a comma, that will be added
10243 to the optional part of the
10244 \begin_inset Flex Code
10247 \begin_layout Plain Layout
10258 \begin_layout Standard
10260 \begin_inset Flex Code
10263 \begin_layout Plain Layout
10269 section must end with
10270 \begin_inset Quotes eld
10274 \begin_inset Flex Code
10277 \begin_layout Plain Layout
10284 \begin_inset Quotes erd
10290 \begin_layout Subsection
10292 \begin_inset CommandInset label
10294 name "sub:Paragraph-Styles"
10301 \begin_layout Standard
10302 A paragraph style description looks like this:
10306 \begin_layout Plain Layout
10307 Note that this will either define a new style or modify an existing one.
10315 \begin_layout LyX-Code
10322 \begin_layout LyX-Code
10326 \begin_layout LyX-Code
10330 \begin_layout Standard
10331 where the following commands are allowed:
10334 \begin_layout Description
10335 \begin_inset Flex Code
10338 \begin_layout Plain Layout
10345 \begin_inset Flex Code
10348 \begin_layout Plain Layout
10353 , left, right, center
10358 ] Paragraph alignment.
10361 \begin_layout Description
10362 \begin_inset Flex Code
10365 \begin_layout Plain Layout
10372 \begin_inset Flex Code
10375 \begin_layout Plain Layout
10380 , left, right, center
10385 ] A comma separated list of permitted alignments.
10386 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10388 For example a right-aligned or centered enumeration isn't possible.)
10389 \change_inserted -712698321 1353679769
10393 \begin_layout Description
10395 \change_inserted -712698321 1353680268
10396 \begin_inset Flex Code
10399 \begin_layout Plain Layout
10401 \change_inserted -712698321 1353679781
10408 \begin_inset Flex Code
10411 \begin_layout Plain Layout
10413 \change_inserted -712698321 1353679772
10419 ] Defines argument number <int> of a command\SpecialChar \slash{}
10420 environment associated with
10422 This is useful for things like section headings, and only makes sense with
10424 Every (optional or required) argument of a command or environment -- except
10425 for the required argument that is associated with the content of the paragraph
10426 itself -- has a separate definition, where the number specifies the order
10428 The definition must end with
10429 \begin_inset Flex Code
10432 \begin_layout Plain Layout
10434 \change_inserted -712698321 1353680069
10441 So a command with two optional arguments has:
10445 \begin_layout Quote
10447 \change_inserted -712698321 1353680127
10453 \begin_layout Quote
10455 \change_inserted -712698321 1353680195
10461 \begin_layout Quote
10463 \change_inserted -712698321 1353680135
10469 \begin_layout Quote
10471 \change_inserted -712698321 1353680140
10477 \begin_layout Quote
10479 \change_inserted -712698321 1353680197
10485 \begin_layout Quote
10487 \change_inserted -712698321 1353680147
10493 \begin_layout Standard
10495 \change_inserted -712698321 1353680528
10497 \begin_inset Flex Code
10500 \begin_layout Plain Layout
10502 \change_inserted -712698321 1353680412
10508 definition, the following specifications are possible:
10511 \begin_layout Itemize
10513 \change_inserted -712698321 1355076779
10514 \begin_inset Flex Code
10517 \begin_layout Plain Layout
10519 \change_inserted -712698321 1353680543
10528 \begin_inset Flex Code
10531 \begin_layout Plain Layout
10533 \change_inserted -712698321 1353680567
10539 The string that will appear both in the menu (to insert this argument)
10540 and on the argument inset button (unless you also specify a separate
10541 \begin_inset Flex Code
10544 \begin_layout Plain Layout
10546 \change_inserted -712698321 1355076779
10553 For the menu, you can define an accelerator by appending the respective
10554 character to the string, divided by
10555 \begin_inset Quotes eld
10559 \begin_inset Quotes erd
10563 \begin_inset space \thinspace{}
10568 \begin_inset Flex Code
10571 \begin_layout Plain Layout
10573 \change_inserted -712698321 1353691482
10574 \begin_inset Quotes eld
10578 \begin_inset Quotes erd
10591 \begin_layout Itemize
10593 \change_inserted -712698321 1355076754
10594 \begin_inset Flex Code
10597 \begin_layout Plain Layout
10599 \change_inserted -712698321 1355076658
10606 \begin_inset Flex Code
10609 \begin_layout Plain Layout
10611 \change_inserted -712698321 1355076654
10617 A separate string for the menu.
10618 You can define an accelerator by appending the respective character to
10619 the string, divided by
10620 \begin_inset Quotes eld
10624 \begin_inset Quotes erd
10628 \begin_inset space \thinspace{}
10633 \begin_inset Flex Code
10636 \begin_layout Plain Layout
10638 \change_inserted -712698321 1355076654
10639 \begin_inset Quotes eld
10643 \begin_inset Quotes erd
10652 This specification is optional.
10653 If it is not given the
10654 \begin_inset Flex Code
10657 \begin_layout Plain Layout
10659 \change_inserted -712698321 1355076736
10667 will be used instead for the menu.
10670 \begin_layout Itemize
10672 \change_inserted -712698321 1353680665
10673 \begin_inset Flex Code
10676 \begin_layout Plain Layout
10678 \change_inserted -712698321 1353680616
10685 \begin_inset Flex Code
10688 \begin_layout Plain Layout
10690 \change_inserted -712698321 1353680623
10696 A longer explanatory text that appears in the tooltip when hovering over
10697 the argument inset.
10700 \begin_layout Itemize
10702 \change_inserted -712698321 1353680874
10703 \begin_inset Flex Code
10706 \begin_layout Plain Layout
10708 \change_inserted -712698321 1353680732
10715 \begin_inset Flex Code
10718 \begin_layout Plain Layout
10720 \change_inserted -712698321 1353680738
10726 Declare if this is a mandatory
10727 \change_inserted 2090807402 1353765594
10729 \change_inserted -712698321 1353680874
10731 \change_inserted 2090807402 1353765599
10733 \change_inserted -712698321 1353680874
10735 Mandatory arguments will be output empty if not given, while optional arguments
10736 will not be output at all.
10737 By default, mandatory arguments are delimited by
10738 \begin_inset Flex Code
10741 \begin_layout Plain Layout
10743 \change_inserted -712698321 1353680808
10751 , while optional arguments are delimited by
10752 \begin_inset Flex Code
10755 \begin_layout Plain Layout
10757 \change_inserted -712698321 1353680833
10766 \begin_layout Itemize
10768 \change_inserted -712698321 1353917199
10769 \begin_inset Flex Code
10772 \begin_layout Plain Layout
10774 \change_inserted -712698321 1353680879
10781 \begin_inset Flex Code
10784 \begin_layout Plain Layout
10786 \change_inserted -712698321 1353680874
10792 defines another argument (by its number) which this argument requires to
10793 be output if it is itself output.
10795 \begin_inset space \thinspace{}
10798 g., in LaTeX commands, optional arguments often require previous optional
10799 arguments to be output (at least empty), as in
10800 \begin_inset Flex Code
10803 \begin_layout Plain Layout
10805 \change_inserted -712698321 1353688183
10808 command[][arg]{text}
10816 This can be achieved by the statement
10817 \begin_inset Flex Code
10820 \begin_layout Plain Layout
10822 \change_inserted -712698321 1353681031
10831 \begin_inset Flex Code
10834 \begin_layout Plain Layout
10836 \change_inserted -712698321 1353681045
10847 \begin_layout Itemize
10849 \change_inserted -712698321 1354263104
10850 \begin_inset Flex Code
10853 \begin_layout Plain Layout
10855 \change_inserted -712698321 1353681072
10864 \begin_inset Flex Code
10867 \begin_layout Plain Layout
10869 \change_inserted -712698321 1353681067
10875 defines a custom left delimiter (instead of
10876 \begin_inset Flex Code
10879 \begin_layout Plain Layout
10881 \change_inserted -712698321 1353681127
10890 \begin_inset Flex Code
10893 \begin_layout Plain Layout
10895 \change_inserted -712698321 1353681133
10904 A line break in the output can be indicated by
10905 \begin_inset Flex Code
10908 \begin_layout Plain Layout
10910 \change_inserted -712698321 1354263104
10921 \begin_layout Itemize
10923 \change_inserted -712698321 1355144479
10924 \begin_inset Flex Code
10927 \begin_layout Plain Layout
10929 \change_inserted -712698321 1353681149
10936 \begin_inset Flex Code
10939 \begin_layout Plain Layout
10941 \change_inserted -712698321 1353681146
10947 defines a custom right delimiter (instead of
10948 \begin_inset Flex Code
10951 \begin_layout Plain Layout
10953 \change_inserted -712698321 1353681158
10960 \begin_inset Flex Code
10963 \begin_layout Plain Layout
10965 \change_inserted -712698321 1353681161
10972 A line break in the output can be indicated by
10973 \begin_inset Flex Code
10976 \begin_layout Plain Layout
10978 \change_inserted -712698321 1354263106
10987 \begin_layout Itemize
10989 \change_inserted -712698321 1355144578
10990 \begin_inset Flex Code
10993 \begin_layout Plain Layout
10995 \change_inserted -712698321 1355144487
11004 \begin_inset Flex Code
11007 \begin_layout Plain Layout
11009 \change_inserted -712698321 1355144500
11015 defines an argument that is inserted in any case (alone or in addition
11016 to user-specified arguments).
11017 Multiple arguments need to be separated by comma.
11022 \begin_layout Itemize
11024 \change_inserted -712698321 1353917320
11025 \begin_inset Flex Code
11028 \begin_layout Plain Layout
11030 \change_inserted -712698321 1353917320
11036 The font used for the argument content.
11038 \begin_inset space ~
11042 \begin_inset CommandInset ref
11044 reference "sub:Font-description"
11051 \begin_layout Itemize
11053 \change_inserted -712698321 1353917320
11054 \begin_inset Flex Code
11057 \begin_layout Plain Layout
11059 \change_inserted -712698321 1353917320
11065 The font used for the label.
11067 \begin_inset space ~
11071 \begin_inset CommandInset ref
11073 reference "sub:Font-description"
11080 \begin_layout Itemize
11082 \change_inserted -712698321 1355661048
11083 \begin_inset Flex Code
11086 \begin_layout Plain Layout
11088 \change_inserted -712698321 1353917320
11095 \begin_inset Flex Code
11098 \begin_layout Plain Layout
11100 \change_inserted -712698321 1353917320
11107 \begin_inset Flex Code
11110 \begin_layout Plain Layout
11112 \change_inserted -712698321 1353917320
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11124 \change_inserted -712698321 1353917320
11130 , describing the rendering style used for the inset's frame and buttons.
11132 \begin_inset Flex Code
11135 \begin_layout Plain Layout
11137 \change_inserted -712698321 1353917320
11146 \begin_layout Itemize
11148 \change_inserted -712698321 1355747298
11149 \begin_inset Flex Code
11152 \begin_layout Plain Layout
11154 \change_inserted -712698321 1355661057
11161 \begin_inset Flex Code
11164 \begin_layout Plain Layout
11166 \change_inserted -712698321 1355661049
11173 \begin_inset Flex Code
11176 \begin_layout Plain Layout
11178 \change_inserted -712698321 1355661077
11186 , this argument is automatically inserted when the respective style is selected.
11187 Currently, only one argument per style\SpecialChar \slash{}
11188 layout can be automatically inserted.
11189 \change_inserted 155139281 1354198988
11193 \begin_layout Standard
11195 \change_inserted -712698321 1356689813
11196 By default, the text entered in the LyX workarea in the respective layout
11197 is the last (mandatory) argument of a command if the
11198 \begin_inset Flex Code
11201 \begin_layout Plain Layout
11203 \change_inserted -712698321 1356689619
11212 \begin_inset Flex Code
11215 \begin_layout Plain Layout
11217 \change_inserted -712698321 1356689629
11226 However, arguments with the prefix
11227 \begin_inset Flex Code
11230 \begin_layout Plain Layout
11232 \change_inserted -712698321 1356689679
11240 are output after this workarea argument.
11241 Note that post-argument numbering restarts at 1, so the first argument
11242 following the workarea argument is
11243 \begin_inset Flex Code
11246 \begin_layout Plain Layout
11248 \change_inserted -712698321 1356689813
11257 Post-arguments are ignored in any other
11258 \begin_inset Flex Code
11261 \begin_layout Plain Layout
11263 \change_inserted -712698321 1356689801
11270 \begin_inset Flex Code
11273 \begin_layout Plain Layout
11275 \change_inserted -712698321 1356689801
11286 \begin_layout Standard
11288 \change_inserted 155139281 1354199102
11290 \begin_inset Flex Code
11293 \begin_layout Plain Layout
11295 \change_inserted 155139281 1354199013
11306 \begin_inset Flex Code
11309 \begin_layout Plain Layout
11311 \change_inserted 155139281 1354199102
11322 \begin_inset Flex Code
11325 \begin_layout Plain Layout
11327 \change_inserted 155139281 1354199044
11335 followed by the number (e.
11336 \begin_inset space \thinspace{}
11341 \begin_inset Flex Code
11344 \begin_layout Plain Layout
11346 \change_inserted 155139281 1354199064
11360 \begin_layout Description
11361 \begin_inset Flex Code
11364 \begin_layout Plain Layout
11370 Note that this will completely override any prior
11371 \begin_inset Flex Code
11374 \begin_layout Plain Layout
11380 declaration for this style.
11382 \begin_inset Quotes eld
11386 \begin_inset Flex Code
11389 \begin_layout Plain Layout
11396 \begin_inset Quotes erd
11401 \begin_inset space ~
11405 \begin_inset CommandInset ref
11407 reference "sub:I18n"
11411 for details on its use.
11414 \begin_layout Description
11415 \begin_inset Flex Code
11418 \begin_layout Plain Layout
11425 \begin_inset Flex Code
11428 \begin_layout Plain Layout
11438 \begin_layout Plain Layout
11439 Note that a `float' here is a real number, such as: 1.5.
11444 The vertical space with which the last of a chain of paragraphs with this
11445 style is separated from the following paragraph.
11446 If the next paragraph has another style, the separations are not simply
11447 added, but the maximum is taken.
11450 \begin_layout Description
11451 \begin_inset Flex Code
11454 \begin_layout Plain Layout
11461 \begin_inset Flex Code
11464 \begin_layout Plain Layout
11470 ] The category for this style.
11471 This is used to group related styles in the style combobox on the toolbar.
11472 Any string can be used, but you may want to use existing categories with
11477 \begin_layout Description
11478 \begin_inset Flex Code
11481 \begin_layout Plain Layout
11487 Depth of XML command.
11488 Used only with XML-type formats.
11491 \begin_layout Description
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11502 \begin_inset Flex Code
11505 \begin_layout Plain Layout
11511 ] Copies all the features of an existing style into the current one.
11515 \begin_layout Description
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11526 \begin_inset Flex Code
11529 \begin_layout Plain Layout
11535 ] The name of a style whose preamble should be output
11540 This allows to ensure some ordering of the preamble snippets when macros
11541 definitions depend on one another.
11545 \begin_layout Plain Layout
11546 Note that, besides that functionality, there is no way to ensure any ordering
11548 The ordering that you see in a given version of LyX may change without
11549 warning in later versions.
11557 \begin_layout Description
11558 \begin_inset Flex Code
11561 \begin_layout Plain Layout
11568 \begin_inset Flex Code
11571 \begin_layout Plain Layout
11576 , Box, Filled_Box, Static
11581 ] The type of label that stands at the end of the paragraph (or sequence
11583 \begin_inset Flex Code
11586 \begin_layout Plain Layout
11593 \begin_inset Newline newline
11597 \begin_inset Flex Code
11600 \begin_layout Plain Layout
11607 \begin_inset Flex Code
11610 \begin_layout Plain Layout
11617 \begin_inset Flex Code
11620 \begin_layout Plain Layout
11628 \begin_inset Flex Code
11631 \begin_layout Plain Layout
11638 \begin_inset Quotes eld
11642 \begin_inset Quotes erd
11646 \begin_inset Flex Code
11649 \begin_layout Plain Layout
11656 \begin_inset space \space{}
11660 \begin_inset Flex Code
11663 \begin_layout Plain Layout
11669 ) is a white (resp.
11670 \begin_inset space ~
11673 black) square suitable for end of proof markers,
11674 \begin_inset Flex Code
11677 \begin_layout Plain Layout
11683 is an explicit text string.
11686 \begin_layout Description
11687 \begin_inset Flex Code
11690 \begin_layout Plain Layout
11697 \begin_inset Flex Code
11700 \begin_layout Plain Layout
11706 ] The string used for a label with a
11707 \begin_inset Flex Code
11710 \begin_layout Plain Layout
11717 \begin_inset Newline newline
11721 \begin_inset Flex Code
11724 \begin_layout Plain Layout
11734 \begin_layout Description
11735 \begin_inset Flex Code
11738 \begin_layout Plain Layout
11744 The font used for both the text body
11750 \begin_inset space ~
11754 \begin_inset CommandInset ref
11756 reference "sub:Font-description"
11761 Note that defining this font automatically defines the
11762 \begin_inset Flex Code
11765 \begin_layout Plain Layout
11772 So you should define this one first if you also want to define
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11785 \begin_layout Description
11786 \begin_inset Flex Code
11789 \begin_layout Plain Layout
11796 \begin_inset Flex Code
11799 \begin_layout Plain Layout
11808 \begin_inset space \thinspace{}
11812 \begin_inset Flex Code
11815 \begin_layout Plain Layout
11821 ] Usually LyX does not allow you to insert more than one space between words,
11822 since a space is considered as the separation between two words, not a
11823 character or symbol of its own.
11824 This is a very fine thing but sometimes annoying, for example, when typing
11825 program code or plain LaTeX code.
11827 \begin_inset Flex Code
11830 \begin_layout Plain Layout
11837 Note that LyX will create protected blanks for the additional blanks when
11838 in another mode than LaTeX-mode.
11841 \begin_layout Description
11842 \begin_inset Flex Code
11845 \begin_layout Plain Layout
11851 These tags are used with XHTML output.
11853 \begin_inset CommandInset ref
11855 reference "sub:Paragraph-Style-XHTML"
11862 \begin_layout Description
11863 \begin_inset Flex Code
11866 \begin_layout Plain Layout
11872 [FIXME] (Used only with XML-type formats.)
11875 \begin_layout Description
11876 \begin_inset Flex Code
11879 \begin_layout Plain Layout
11886 \begin_inset Flex Code
11889 \begin_layout Plain Layout
11898 \begin_inset space \thinspace{}
11902 \begin_inset Flex Code
11905 \begin_layout Plain Layout
11912 \begin_inset Flex Code
11915 \begin_layout Plain Layout
11921 , marks the style as to be included in the document preamble and not in
11923 This is useful for document classes that want such information as the title
11924 and author to appear in the preamble.
11925 Note that this works only for styles for which the
11926 \begin_inset Flex Code
11929 \begin_layout Plain Layout
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11946 \begin_inset Flex Code
11949 \begin_layout Plain Layout
11958 \begin_layout Description
11959 \begin_inset Flex Code
11962 \begin_layout Plain Layout
11969 \begin_inset Flex Code
11972 \begin_layout Plain Layout
11981 \begin_inset space \thinspace{}
11985 \begin_inset Flex Code
11988 \begin_layout Plain Layout
11995 \begin_inset Flex Code
11998 \begin_layout Plain Layout
12004 , marks the style as being part of a title block (see also the
12005 \begin_inset Flex Code
12008 \begin_layout Plain Layout
12015 \begin_inset Flex Code
12018 \begin_layout Plain Layout
12027 \begin_layout Description
12029 \change_inserted -712698321 1355932296
12030 \begin_inset Flex Code
12033 \begin_layout Plain Layout
12035 \change_inserted -712698321 1355932178
12042 \begin_inset Flex Code
12045 \begin_layout Plain Layout
12047 \change_inserted -712698321 1355932181
12053 ] The LaTeX command sequence declaring an item in a list.
12054 The command is to be defined without the preceding backslash (the default
12056 \begin_inset Quotes eld
12060 \begin_inset Quotes erd
12064 \begin_inset Flex Code
12067 \begin_layout Plain Layout
12069 \change_inserted -712698321 1355932279
12079 in the LaTeX output).
12082 \begin_layout Description
12083 \begin_inset Flex Code
12086 \begin_layout Plain Layout
12093 \begin_inset Flex Code
12096 \begin_layout Plain Layout
12102 ] This provides extra space between paragraphs that have the same style.
12103 If you put other styles into an environment, each is separated with the
12105 \begin_inset Flex Code
12108 \begin_layout Plain Layout
12115 But the whole items of the environment are additionally separated with
12117 \begin_inset Flex Code
12120 \begin_layout Plain Layout
12127 Note that this is a
12132 \begin_layout Description
12133 \begin_inset Flex Code
12136 \begin_layout Plain Layout
12142 [FIXME] (Used only with XML-type formats.)
12145 \begin_layout Description
12146 \begin_inset Flex Code
12149 \begin_layout Plain Layout
12156 \begin_inset Flex Code
12159 \begin_layout Plain Layout
12168 \begin_inset space \thinspace{}
12172 \begin_inset Flex Code
12175 \begin_layout Plain Layout
12181 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12182 lead to empty LaTeX output.
12183 There are some cases where this could be desirable however: in a letter
12184 template, the required fields can be provided as empty fields, so that
12185 people do not forget them; in some special classes, a style can be used
12186 as some kind of break, which does not contain actual text.
12189 \begin_layout Description
12190 \begin_inset Flex Code
12193 \begin_layout Plain Layout
12200 \begin_inset Flex Code
12203 \begin_layout Plain Layout
12209 ] The vertical space between the label and the text body.
12210 Only used for labels that are above the text body (
12211 \begin_inset Flex Code
12214 \begin_layout Plain Layout
12221 \begin_inset Newline newline
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12229 Centered_Top_Environment
12237 \begin_layout Description
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 \begin_inset Flex Code
12251 \begin_layout Plain Layout
12257 ] The name of the counter for automatic numbering.
12258 \begin_inset Newline newline
12266 \begin_inset Flex Code
12269 \begin_layout Plain Layout
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12286 In that case, the counter will be stepped each time the style appears.
12287 \begin_inset Newline newline
12295 \begin_inset Flex Code
12298 \begin_layout Plain Layout
12305 \begin_inset Flex Code
12308 \begin_layout Plain Layout
12314 , though this case is a bit complicated.
12315 Suppose you declare
12316 \begin_inset Quotes eld
12320 \begin_inset Flex Code
12323 \begin_layout Plain Layout
12324 LabelCounter myenum
12330 \begin_inset Quotes erd
12334 Then the actual counters used are
12335 \begin_inset Flex Code
12338 \begin_layout Plain Layout
12345 \begin_inset Flex Code
12348 \begin_layout Plain Layout
12355 \begin_inset Flex Code
12358 \begin_layout Plain Layout
12365 \begin_inset Flex Code
12368 \begin_layout Plain Layout
12374 , much as in LaTeX.
12375 These counters must all be declared separately.
12376 \begin_inset Newline newline
12380 \begin_inset CommandInset ref
12382 reference "sub:Counters"
12386 for details on counters.
12389 \begin_layout Description
12390 \begin_inset Flex Code
12393 \begin_layout Plain Layout
12399 The font used for the label.
12401 \begin_inset space ~
12405 \begin_inset CommandInset ref
12407 reference "sub:Font-description"
12414 \begin_layout Description
12415 \begin_inset Flex Code
12418 \begin_layout Plain Layout
12425 \begin_inset Flex Code
12428 \begin_layout Plain Layout
12434 ] Text that indicates how far a label should be indented.
12437 \begin_layout Description
12438 \begin_inset Flex Code
12441 \begin_layout Plain Layout
12448 \begin_inset Flex Code
12451 \begin_layout Plain Layout
12457 ] Text that indicates the amount of horizontal space between the label and
12459 Only used for labels that are not above the text body.
12462 \begin_layout Description
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12482 ] The string used for a label with a
12483 \begin_inset Flex Code
12486 \begin_layout Plain Layout
12493 \begin_inset Flex Code
12496 \begin_layout Plain Layout
12504 \begin_inset Flex Code
12507 \begin_layout Plain Layout
12513 is set, this string can be contain the special formatting commands described
12515 \begin_inset CommandInset ref
12517 reference "sub:Counters"
12524 \begin_layout Description
12525 \begin_inset Flex Code
12528 \begin_layout Plain Layout
12529 LabelStringAppendix
12535 \begin_inset Flex Code
12538 \begin_layout Plain Layout
12544 ] This is used inside the appendix instead of
12545 \begin_inset Newline newline
12549 \begin_inset Flex Code
12552 \begin_layout Plain Layout
12560 \begin_inset Flex Code
12563 \begin_layout Plain Layout
12570 \begin_inset Newline newline
12574 \begin_inset Flex Code
12577 \begin_layout Plain Layout
12578 LabelStringAppendix
12586 \begin_layout Description
12587 \begin_inset Flex Code
12590 \begin_layout Plain Layout
12596 [FIXME] (Used only with XML-type formats.)
12599 \begin_layout Description
12600 \begin_inset Flex Code
12603 \begin_layout Plain Layout
12610 \begin_inset Flex Code
12613 \begin_layout Plain Layout
12618 , Manual, Static, Top_Environment,
12619 \begin_inset Newline newline
12622 Centered_Top_Environment, Counter, Sensitive, Enumerate,
12623 \begin_inset Newline newline
12626 Itemize, Bibliography
12635 \begin_layout Description
12636 \begin_inset Flex Code
12639 \begin_layout Plain Layout
12645 means the label is the very first word (up to the first real blank).
12646 Use protected spaces if you want more than one word as the label.
12650 \begin_layout Description
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12660 means the label is simply what is declared as
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12671 Note that this really is `static'.
12674 \begin_layout Description
12675 \begin_inset Flex Code
12678 \begin_layout Plain Layout
12685 \begin_inset space ~
12689 \begin_inset space ~
12693 \begin_inset Flex Code
12696 \begin_layout Plain Layout
12697 Centered_Top_Environment
12702 are special cases of
12703 \begin_inset Flex Code
12706 \begin_layout Plain Layout
12713 The label will be printed above the paragraph, but only at the top of an
12714 environment or the top of a chain of paragraphs with this style.
12715 This might be used with the
12716 \begin_inset Flex MenuItem
12719 \begin_layout Plain Layout
12725 style, for example.
12728 \begin_layout Description
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12738 is a special case for the caption-labels
12739 \begin_inset Quotes eld
12743 \begin_inset Quotes erd
12747 \begin_inset Quotes eld
12751 \begin_inset Quotes erd
12755 \begin_inset Newline newline
12759 \begin_inset Flex Code
12762 \begin_layout Plain Layout
12768 means the (hardcoded) label string depends on the kind of float: It is
12769 hardcoded to be `FloatType N', where N is the value of the counter associated
12771 For the case that a caption is inserted outside of a float
12772 \begin_inset Flex Code
12775 \begin_layout Plain Layout
12781 should be set to e.
12782 \begin_inset space \thinspace{}
12786 \begin_inset space \space{}
12790 \begin_inset Quotes eld
12794 \begin_inset Quotes erd
12800 \begin_layout Description
12801 \begin_inset Flex Code
12804 \begin_layout Plain Layout
12810 defines automatically numbered labels.
12812 \begin_inset Flex Code
12815 \begin_layout Plain Layout
12821 will be expanded to contain any counters: So the result will for example
12823 \begin_inset Quotes eld
12827 \begin_inset Flex Code
12830 \begin_layout Plain Layout
12841 \begin_inset Quotes erd
12846 \begin_inset space ~
12850 \begin_inset CommandInset ref
12852 reference "sub:Counters"
12856 for more information on counters.
12859 \begin_layout Description
12860 \begin_inset Flex Code
12863 \begin_layout Plain Layout
12869 produces the usual sort of enumeration labels.
12870 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12871 small Roman numerals, and uppercase letters for the four possible depths.
12874 \begin_layout Description
12875 \begin_inset Flex Code
12878 \begin_layout Plain Layout
12884 produces various bullets at the different levels.
12885 It is also hardcoded.
12888 \begin_layout Description
12889 \begin_inset Flex Code
12892 \begin_layout Plain Layout
12898 is used internally by LyX and should be used only with
12899 \begin_inset Flex Code
12902 \begin_layout Plain Layout
12903 LatexType BibEnvironment
12912 \begin_layout Description
12913 \begin_inset Flex Code
12916 \begin_layout Plain Layout
12922 Note that this will completely override any prior
12923 \begin_inset Flex Code
12926 \begin_layout Plain Layout
12932 declaration for this style.
12934 \begin_inset Quotes eld
12938 \begin_inset Flex Code
12941 \begin_layout Plain Layout
12948 \begin_inset Quotes erd
12953 \begin_inset CommandInset ref
12955 reference "sub:I18n"
12959 for details on its use.
12962 \begin_layout Description
12963 \begin_inset Flex Code
12966 \begin_layout Plain Layout
12973 \begin_inset Flex Code
12976 \begin_layout Plain Layout
12982 ] The name of the corresponding LaTeX stuff.
12983 Either the environment or command name.
12986 \begin_layout Description
12987 \begin_inset Flex Code
12990 \begin_layout Plain Layout
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13006 ] An optional parameter for the corresponding
13007 \begin_inset Flex Code
13010 \begin_layout Plain Layout
13017 This parameter cannot be changed from within LyX
13018 \change_inserted -712698321 1355144804
13020 \begin_inset Flex Code
13023 \begin_layout Plain Layout
13025 \change_inserted -712698321 1355144804
13031 for customizable parameters)
13035 \change_inserted -712698321 1355144804
13036 This will be output as is after all LaTeX
13037 \begin_inset Flex Code
13040 \begin_layout Plain Layout
13042 \change_inserted -712698321 1355144658
13055 \begin_layout Description
13056 \begin_inset Flex Code
13059 \begin_layout Plain Layout
13066 \begin_inset Flex Code
13069 \begin_layout Plain Layout
13074 , Command, Environment, Item_Environment,
13075 \begin_inset Newline newline
13078 List_Environment, Bib_Environment
13083 ] How the style should be translated into LaTeX.
13087 \begin_layout Plain Layout
13088 \begin_inset Flex Code
13091 \begin_layout Plain Layout
13097 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13098 Visit the SGML class files for specific examples.
13107 \begin_layout Description
13108 \begin_inset Flex Code
13111 \begin_layout Plain Layout
13117 means nothing special.
13120 \begin_layout Description
13121 \begin_inset Flex Code
13124 \begin_layout Plain Layout
13131 \begin_inset Flex Code
13134 \begin_layout Plain Layout
13141 {\SpecialChar \ldots{}
13150 \begin_layout Description
13151 \begin_inset Flex Code
13154 \begin_layout Plain Layout
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13171 }\SpecialChar \ldots{}
13187 \begin_layout Description
13188 \begin_inset Flex Code
13191 \begin_layout Plain Layout
13198 \begin_inset Flex Code
13201 \begin_layout Plain Layout
13208 \begin_inset Flex Code
13211 \begin_layout Plain Layout
13219 is generated for each paragraph of this environment.
13223 \begin_layout Description
13224 \begin_inset Flex Code
13227 \begin_layout Plain Layout
13234 \begin_inset Flex Code
13237 \begin_layout Plain Layout
13244 \begin_inset Newline newline
13248 \begin_inset Flex Code
13251 \begin_layout Plain Layout
13257 is passed as an argument to the environment.
13258 \begin_inset Newline newline
13262 \begin_inset Flex Code
13265 \begin_layout Plain Layout
13271 can be defined in the
13272 \begin_inset Flex MenuItem
13275 \begin_layout Plain Layout
13276 Edit\SpecialChar \menuseparator
13278 \begin_inset space ~
13289 \begin_layout Description
13290 \begin_inset Flex Code
13293 \begin_layout Plain Layout
13300 \begin_inset Flex Code
13303 \begin_layout Plain Layout
13309 but adds additionally the necessary mandatory argument (the longest label)
13310 to the begin statement of the bibliography environment:
13311 \begin_inset Newline newline
13315 \begin_inset Flex Code
13318 \begin_layout Plain Layout
13321 begin{thebibliography}{99}
13326 It is therefore only useful for bibliography environments.
13327 The default longest label
13328 \begin_inset Quotes eld
13332 \begin_inset Quotes erd
13335 can be changed by the user in the paragraph settings of a bibliography
13339 \begin_layout Standard
13340 Putting the last few things together, the LaTeX output will be either:
13343 \begin_layout LyX-Code
13346 LatexName[LatexParam]{\SpecialChar \ldots{}
13350 \begin_layout Standard
13354 \begin_layout LyX-Code
13357 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13363 \begin_layout Standard
13364 depending upon the LaTeX type.
13368 \begin_layout Description
13370 \change_inserted -712698321 1354263086
13371 \begin_inset Flex Code
13374 \begin_layout Plain Layout
13376 \change_inserted -712698321 1353866852
13383 \begin_inset Flex Code
13386 \begin_layout Plain Layout
13388 \change_inserted -712698321 1353866852
13394 ] A string that is put at the beginning of the style content.
13395 A line break in the output can be indicated by
13396 \begin_inset Flex Code
13399 \begin_layout Plain Layout
13401 \change_inserted -712698321 1354263086
13412 \begin_layout Description
13413 \begin_inset Flex Code
13416 \begin_layout Plain Layout
13423 \begin_inset Flex Code
13426 \begin_layout Plain Layout
13432 ] If you put styles into environments, the different
13433 \begin_inset Flex Code
13436 \begin_layout Plain Layout
13442 are not simply added, but added with a factor
13443 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13447 Note that this parameter is also used when
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13478 Then it is added to the manual or dynamic margin.
13479 \begin_inset Newline newline
13483 \begin_inset Quotes eld
13487 \begin_inset Flex Code
13490 \begin_layout Plain Layout
13497 \begin_inset Quotes erd
13500 means that the paragraph is indented with the width of
13501 \begin_inset Quotes eld
13505 \begin_inset Flex Code
13508 \begin_layout Plain Layout
13515 \begin_inset Quotes erd
13518 in the normal font.
13519 You can get a negative width by prefixing the string with
13520 \begin_inset Quotes eld
13524 \begin_inset Flex Code
13527 \begin_layout Plain Layout
13534 \begin_inset Quotes erd
13538 This way was chosen so that the look is the same with each used screen
13542 \begin_layout Description
13543 \begin_inset Flex Code
13546 \begin_layout Plain Layout
13553 \begin_inset Flex Code
13556 \begin_layout Plain Layout
13561 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13567 \begin_inset Newline newline
13570 The kind of margin that the style has on the left side.
13574 \begin_layout Description
13575 \begin_inset Flex Code
13578 \begin_layout Plain Layout
13584 just means a fixed margin.
13587 \begin_layout Description
13588 \begin_inset Flex Code
13591 \begin_layout Plain Layout
13597 means that the left margin depends on the string entered in the
13598 \begin_inset Flex MenuItem
13601 \begin_layout Plain Layout
13602 Edit\SpecialChar \menuseparator
13604 \begin_inset space ~
13613 This is used to typeset nice lists without tabulators.
13616 \begin_layout Description
13617 \begin_inset Flex Code
13620 \begin_layout Plain Layout
13626 means that the margin depends on the size of the label.
13627 This is used for automatic enumerated headlines.
13628 It is obvious that the headline
13629 \begin_inset Quotes eld
13632 5.4.3.2.1 Very long headline
13633 \begin_inset Quotes erd
13636 must have a wider left margin (as wide as
13637 \begin_inset Quotes eld
13641 \begin_inset Quotes erd
13644 plus the space) than
13645 \begin_inset Quotes eld
13648 3.2 Very long headline
13649 \begin_inset Quotes erd
13653 \begin_inset Quotes eld
13657 \begin_inset Quotes erd
13660 are not able to do this.
13663 \begin_layout Description
13664 \begin_inset Flex Code
13667 \begin_layout Plain Layout
13673 is similar, but only the very first row of the paragraph is dynamic, while
13674 the others are static; this is used, for example, for descriptions.
13677 \begin_layout Description
13678 \begin_inset Flex Code
13681 \begin_layout Plain Layout
13687 means the margin is chosen in a way that the longest row of this paragraph
13688 fits to the right margin.
13689 This is used to typeset an address on the right edge of the page.
13693 \begin_layout Description
13694 \begin_inset Flex Code
13697 \begin_layout Plain Layout
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13716 \begin_inset space \thinspace{}
13720 \begin_inset Flex Code
13723 \begin_layout Plain Layout
13729 ] Whether fragile commands in this style should be
13730 \begin_inset Flex Code
13733 \begin_layout Plain Layout
13746 whether this command should itself be protected.)
13749 \begin_layout Description
13750 \begin_inset Flex Code
13753 \begin_layout Plain Layout
13760 \begin_inset Flex Code
13763 \begin_layout Plain Layout
13770 \begin_inset space \thinspace{}
13774 \begin_inset Flex Code
13777 \begin_layout Plain Layout
13785 ] Whether newlines are translated into LaTeX newlines (
13786 \begin_inset Flex Code
13789 \begin_layout Plain Layout
13800 The translation can be switched off to allow more comfortable LaTeX editing
13804 \begin_layout Description
13805 \begin_inset Flex Code
13808 \begin_layout Plain Layout
13815 \begin_inset Flex Code
13818 \begin_layout Plain Layout
13827 \begin_inset space \thinspace{}
13831 \begin_inset Flex Code
13834 \begin_layout Plain Layout
13840 ] If set to true, and if
13841 \begin_inset Flex Code
13844 \begin_layout Plain Layout
13851 \begin_inset Flex Code
13854 \begin_layout Plain Layout
13860 ) paragraphs are being indented, then the indentation of such a paragraph
13861 following one of this type will be suppressed.
13862 (So this will not affect the display of non-default paragraphs.)
13865 \begin_layout Description
13866 \begin_inset Flex Code
13869 \begin_layout Plain Layout
13876 \begin_inset Flex Code
13879 \begin_layout Plain Layout
13885 ] Name of a style that has replaced this style.
13886 This is used to rename a style, while keeping backward compatibility.
13889 \begin_layout Description
13891 \change_deleted -712698321 1353679722
13892 \begin_inset Flex Code
13895 \begin_layout Plain Layout
13902 \begin_inset Flex Code
13905 \begin_layout Plain Layout
13911 ] The number of optional arguments that can be used with this style.
13912 This is useful for things like section headings, and only makes sense with
13914 Note that, on output, the optional arguments will all precede any required
13915 arguments (see below).
13916 So one can have constructs like:
13920 \begin_layout LyX-Code
13922 \change_deleted -712698321 1353679722
13925 mycmd[opt1]{req1}{contents of paragraph}
13928 \begin_layout Standard
13930 \change_deleted -712698321 1353679722
13931 but one cannot have things like:
13934 \begin_layout LyX-Code
13936 \change_deleted -712698321 1353679722
13939 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13942 \begin_layout Standard
13944 \change_deleted -712698321 1353679722
13945 at least, not without ERT (with which you can have anything).
13952 \begin_layout Description
13953 \begin_inset Flex Code
13956 \begin_layout Plain Layout
13963 \begin_inset Flex Code
13966 \begin_layout Plain Layout
13975 \begin_inset space \thinspace{}
13979 \begin_inset Flex Code
13982 \begin_layout Plain Layout
13988 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13989 output, but only by a line break; together with
13990 \begin_inset Flex Code
13993 \begin_layout Plain Layout
13999 , this allows to emulate a plain text editor (like the ERT inset).
14002 \begin_layout Description
14003 \begin_inset Flex Code
14006 \begin_layout Plain Layout
14013 \begin_inset Flex Code
14016 \begin_layout Plain Layout
14022 ] The indent of the very first line of a paragraph.
14024 \begin_inset Newline newline
14028 \begin_inset Flex Code
14031 \begin_layout Plain Layout
14037 will be fixed for a certain style.
14038 The exception is the default style, since the indentation for these paragraphs
14039 can be prohibited with
14040 \begin_inset Flex Code
14043 \begin_layout Plain Layout
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14060 style paragraphs inside environments use the
14061 \begin_inset Flex Code
14064 \begin_layout Plain Layout
14070 of the environment, not their native one.
14072 \begin_inset Flex Code
14075 \begin_layout Plain Layout
14081 paragraphs inside an enumeration are not indented.
14084 \begin_layout Description
14085 \begin_inset Flex Code
14088 \begin_layout Plain Layout
14095 \begin_inset Flex Code
14098 \begin_layout Plain Layout
14104 ] The vertical space between two paragraphs of this style.
14107 \begin_layout Description
14108 \begin_inset Flex Code
14111 \begin_layout Plain Layout
14118 \begin_inset Flex Code
14121 \begin_layout Plain Layout
14127 ] LyX allows the user to choose either
14128 \begin_inset Quotes eld
14132 \begin_inset Quotes erd
14136 \begin_inset Quotes eld
14140 \begin_inset Quotes erd
14143 to separate paragraphs.
14145 \begin_inset Quotes eld
14149 \begin_inset Quotes erd
14153 \begin_inset Flex Code
14156 \begin_layout Plain Layout
14164 \begin_inset Quotes eld
14168 \begin_inset Quotes erd
14172 \begin_inset Flex Code
14175 \begin_layout Plain Layout
14181 is ignored and all paragraphs are separated by the
14182 \begin_inset Flex Code
14185 \begin_layout Plain Layout
14192 The vertical space is calculated with
14193 \begin_inset Flex Code
14196 \begin_layout Plain Layout
14198 \begin_inset space ~
14207 \begin_inset Flex Code
14210 \begin_layout Plain Layout
14216 is the height of a row with the normal font.
14217 This way, the look stays the same with different screen fonts.
14220 \begin_layout Description
14221 \begin_inset Flex Code
14224 \begin_layout Plain Layout
14231 \begin_inset Flex Code
14234 \begin_layout Plain Layout
14243 \begin_inset space \thinspace{}
14247 \begin_inset Flex Code
14250 \begin_layout Plain Layout
14256 ] Whether the contents of this paragraph should be output in raw form, meaning
14257 without special translations that LaTeX would require.
14260 \begin_layout Description
14261 \begin_inset Flex Code
14264 \begin_layout Plain Layout
14270 Information to be included in the LaTeX preamble when this style is used.
14271 Used to define macros, load packages, etc., required by this particular
14274 \begin_inset Quotes eld
14278 \begin_inset Flex Code
14281 \begin_layout Plain Layout
14288 \begin_inset Quotes erd
14294 \begin_layout Description
14295 \begin_inset Flex Code
14298 \begin_layout Plain Layout
14305 \begin_inset Flex Code
14308 \begin_layout Plain Layout
14314 ] The prefix to use when creating labels referring to paragraphs of this
14316 This allows the use of formatted references.
14319 \begin_layout Description
14321 \change_deleted -712698321 1353681258
14322 \begin_inset Flex Code
14325 \begin_layout Plain Layout
14332 \begin_inset Flex Code
14335 \begin_layout Plain Layout
14341 ] The number of required arguments that the LaTeX command or environment
14342 corresponding to this style expects.
14343 In the case of a command, these are required arguments
14347 that associated with the content of the paragraph itself.
14348 These do not actually have to be provided: LyX will output empty arguments
14350 Note that optional arguments will be output before required arguments.
14351 See the discussion of the
14352 \begin_inset Flex Code
14355 \begin_layout Plain Layout
14361 tag above for more information.
14366 \begin_layout Description
14367 \begin_inset Flex Code
14370 \begin_layout Plain Layout
14377 \begin_inset Flex Code
14380 \begin_layout Plain Layout
14386 ] Whether the style requires the feature
14387 \begin_inset Flex Code
14390 \begin_layout Plain Layout
14397 See the description of
14398 \begin_inset Flex Code
14401 \begin_layout Plain Layout
14408 \begin_inset space ~
14412 \begin_inset CommandInset ref
14414 reference "sub:General-text-class"
14418 ) for information on `features'.
14421 \begin_layout Description
14423 \change_inserted -712698321 1353693371
14424 \begin_inset Flex Code
14427 \begin_layout Plain Layout
14429 \change_inserted -712698321 1353693146
14438 \begin_inset Flex Code
14441 \begin_layout Plain Layout
14443 \change_inserted -712698321 1353693235
14452 \begin_inset Flex Code
14455 \begin_layout Plain Layout
14457 \change_inserted -712698321 1353693235
14463 ] Resets the LaTeX arguments of this style (as defined via the
14464 \begin_inset Flex Code
14467 \begin_layout Plain Layout
14469 \change_inserted -712698321 1353693371
14478 This is useful if you have copied a style via
14479 \begin_inset Flex Code
14482 \begin_layout Plain Layout
14484 \change_inserted -712698321 1353693302
14492 , but you do not want to inherit its (required and optional) arguments.
14497 \begin_layout Description
14499 \change_inserted -712698321 1354263074
14500 \begin_inset Flex Code
14503 \begin_layout Plain Layout
14505 \change_inserted -712698321 1353866876
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14517 \change_inserted -712698321 1353866873
14523 ] A string that is put at the end of the layout content.
14524 A line break in the output can be indicated by
14525 \begin_inset Flex Code
14528 \begin_layout Plain Layout
14530 \change_inserted -712698321 1354263069
14541 \begin_layout Description
14542 \begin_inset Flex Code
14545 \begin_layout Plain Layout
14552 \begin_inset Flex Code
14555 \begin_layout Plain Layout
14562 \begin_inset Flex Code
14565 \begin_layout Plain Layout
14574 \begin_layout Description
14575 \begin_inset Flex Code
14578 \begin_layout Plain Layout
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14597 \begin_inset Flex Code
14600 \begin_layout Plain Layout
14607 \begin_inset Flex Code
14610 \begin_layout Plain Layout
14617 \begin_inset Flex Code
14620 \begin_layout Plain Layout
14622 \begin_inset space ~
14630 ] This defines what the default spacing should be in the style.
14632 \begin_inset Flex Code
14635 \begin_layout Plain Layout
14642 \begin_inset Flex Code
14645 \begin_layout Plain Layout
14652 \begin_inset Flex Code
14655 \begin_layout Plain Layout
14661 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14662 If you specify the argument
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14672 , then you must also provide a value argument which will be the actual multiplie
14674 Note that, contrary to other parameters,
14675 \begin_inset Flex Code
14678 \begin_layout Plain Layout
14684 implies the generation of specific LaTeX code, using the LaTeX package
14688 \begin_inset Flex Code
14691 \begin_layout Plain Layout
14700 \begin_layout Description
14701 \begin_inset Flex Code
14704 \begin_layout Plain Layout
14711 \begin_inset Flex Code
14714 \begin_layout Plain Layout
14721 \begin_inset space \thinspace{}
14725 \begin_inset Flex Code
14728 \begin_layout Plain Layout
14736 ] Allow spell-checking paragraphs of this style.
14740 \begin_layout Description
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14750 The font used for the text body .
14752 \begin_inset CommandInset ref
14754 reference "sub:Font-description"
14761 \begin_layout Description
14762 \begin_inset Flex Code
14765 \begin_layout Plain Layout
14774 \begin_inset Flex Code
14777 \begin_layout Plain Layout
14787 The level of the style in the table of contents.
14788 This is used for automatic numbering of section headings.
14791 \begin_layout Description
14792 \begin_inset Flex Code
14795 \begin_layout Plain Layout
14802 \begin_inset Flex Code
14805 \begin_layout Plain Layout
14811 ] The vertical space with which the very first of a chain of paragraphs
14812 with this style is separated from the previous paragraph.
14813 If the previous paragraph has another style, the separations are not simply
14814 added, but the maximum is taken.
14817 \begin_layout Subsection
14818 \begin_inset CommandInset label
14824 Internationalization of Paragraph Styles
14827 \begin_layout Standard
14828 LyX has long supported internationalization of layout information, but,
14829 until version 2.0, this applied only to the user interface and not to, say,
14831 Thus, French authors were forced to resort to ugly hacks if they wanted
14836 1' instead of `Theorem 1'.
14837 Thanks to Georg Baum, that is no longer the case.
14840 \begin_layout Standard
14842 \begin_inset Flex Code
14845 \begin_layout Plain Layout
14851 defines text that is to appear in the typeset document, it may use
14852 \begin_inset Flex Code
14855 \begin_layout Plain Layout
14862 \begin_inset Flex Code
14865 \begin_layout Plain Layout
14871 to support non-English and even multi-language documents correctly.
14872 The following excerpt (from the
14873 \begin_inset Flex Code
14876 \begin_layout Plain Layout
14882 file) shows how this works:
14885 \begin_layout LyX-Code
14890 \begin_layout LyX-Code
14893 theoremstyle{remark}
14896 \begin_layout LyX-Code
14899 newtheorem{claim}[thm]{
14906 \begin_layout LyX-Code
14910 \begin_layout LyX-Code
14914 \begin_layout LyX-Code
14919 claimname}{_(Claim)}
14922 \begin_layout LyX-Code
14926 \begin_layout LyX-Code
14930 \begin_layout LyX-Code
14939 claimname}{_(Claim)}}
14942 \begin_layout LyX-Code
14947 \begin_layout Standard
14948 In principle, any legal LaTeX may appear in the
14949 \begin_inset Flex Code
14952 \begin_layout Plain Layout
14959 \begin_inset Flex Code
14962 \begin_layout Plain Layout
14968 tags, but in practice they will typically look as they do here.
14969 The key to correct translation of the typeset text is the definition of
14971 \begin_inset Flex Code
14974 \begin_layout Plain Layout
14983 \begin_inset Flex Code
14986 \begin_layout Plain Layout
14998 \begin_layout Standard
15000 \begin_inset Flex Code
15003 \begin_layout Plain Layout
15009 tag provides for internationalization based upon the overall language of
15011 The contents of the tag will be included in the preamble, just as with
15013 \begin_inset Flex Code
15016 \begin_layout Plain Layout
15023 What makes it special is the use of the
15024 \begin_inset Quotes eld
15028 \begin_inset Quotes erd
15032 \begin_inset Flex Code
15035 \begin_layout Plain Layout
15041 , which will be replaced, when LyX produces LaTeX output, with the translation
15042 of its argument into the document language.
15045 \begin_layout Standard
15047 \begin_inset Flex Code
15050 \begin_layout Plain Layout
15056 tag is more complex, since it is meant to provide support for multi-language
15057 documents and so offers an interface to the
15058 \begin_inset Flex Code
15061 \begin_layout Plain Layout
15068 Its contents will be added to the preamble once for each language that
15069 appears in the document.
15070 In this case, the argument to
15071 \begin_inset Flex Code
15074 \begin_layout Plain Layout
15080 will be replaced with its translation into the language in question; the
15082 \begin_inset Flex Code
15085 \begin_layout Plain Layout
15091 is replaced by the language name (as used by the babel package).
15094 \begin_layout Standard
15095 A German document that also included a French section would thus have the
15096 following in the preamble:
15099 \begin_layout LyX-Code
15108 claimname}{Affirmation}}
15109 \begin_inset Newline newline
15120 claimname}{Behauptung}}
15121 \begin_inset Newline newline
15128 claimname}{Behauptung}
15131 \begin_layout Standard
15133 \begin_inset Flex Code
15136 \begin_layout Plain Layout
15142 will then conspire to produce the correct text in the output.
15145 \begin_layout Standard
15146 One important point to note here is that the translations are provided by
15147 LyX itself, through the
15148 \change_inserted -195340706 1334775793
15150 \begin_inset Flex Code
15153 \begin_layout Plain Layout
15155 \change_inserted -195340706 1334775793
15162 \change_deleted -195340706 1334775793
15163 same mechanism it uses for internationalization of the user interface
15166 This means, in effect, that
15167 \begin_inset Flex Code
15170 \begin_layout Plain Layout
15177 \begin_inset Flex Code
15180 \begin_layout Plain Layout
15186 are really only of use in layout files that are provided with LyX, since
15187 text entered in user-created layout files will not be seen by LyX's internation
15189 \change_inserted -195340706 1334775793
15191 \begin_inset Flex Code
15194 \begin_layout Plain Layout
15196 \change_inserted -195340706 1334775793
15202 file is modified accordingly
15205 That said, however, any layout created with the intention that it will
15206 be included with LyX should use these tags where appropriate.
15208 \change_inserted -195340706 1334775793
15209 Please note that the paragraph style translations provided by LyX will
15210 never change with a minor update (e.g.
15211 from version 2.1.x to 2.1.y).
15212 It is however quite likely that a major update (e.g.
15213 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15218 \begin_layout Subsection
15220 \begin_inset CommandInset label
15229 \begin_layout Standard
15230 It is necessary to define the floats (
15231 \begin_inset Flex MenuItem
15234 \begin_layout Plain Layout
15241 \begin_inset Flex MenuItem
15244 \begin_layout Plain Layout
15250 , \SpecialChar \ldots{}
15251 ) in the text class itself.
15252 Standard floats are included in the file
15253 \begin_inset Flex Code
15256 \begin_layout Plain Layout
15262 , so you may have to do no more than add
15265 \begin_layout LyX-Code
15266 Input stdfloats.inc
15269 \begin_layout Standard
15270 to your layout file.
15271 If you want to implement a text class that proposes some other float types
15272 (like the AGU class bundled with LyX), the information below will hopefully
15276 \begin_layout Description
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15287 \begin_inset Flex Code
15290 \begin_layout Plain Layout
15297 \begin_inset Quotes erd
15301 \begin_inset Quotes erd
15304 ] The file name extension of an auxiliary file for the list of figures (or
15306 LaTeX writes the captions to this file.
15309 \begin_layout Description
15310 \begin_inset Flex Code
15313 \begin_layout Plain Layout
15320 \begin_inset Flex Code
15323 \begin_layout Plain Layout
15330 \begin_inset Quotes erd
15334 \begin_inset Quotes erd
15337 ] The string that will be used in the menus and also for the caption.
15338 This is translated to the current language if babel is used.
15341 \begin_layout Description
15342 \begin_inset Flex Code
15345 \begin_layout Plain Layout
15351 These tags control the XHTML output.
15353 \begin_inset space ~
15357 \begin_inset CommandInset ref
15359 reference "sec:Tags-for-XHTML"
15366 \begin_layout Description
15367 \begin_inset Flex Code
15370 \begin_layout Plain Layout
15379 \begin_inset Flex Code
15382 \begin_layout Plain Layout
15391 \begin_inset space \thinspace{}
15395 \begin_inset Flex Code
15398 \begin_layout Plain Layout
15404 ] Indicates whether the float is already defined in the document class or
15405 if instead the LaTeX package
15406 \begin_inset Flex Code
15409 \begin_layout Plain Layout
15415 needs to be loaded to define it on-the-fly.
15417 \begin_inset Flex Code
15420 \begin_layout Plain Layout
15427 \begin_inset Flex Code
15430 \begin_layout Plain Layout
15437 It should be set to
15438 \begin_inset Flex Code
15441 \begin_layout Plain Layout
15447 if the float is already defined by the LaTeX document class.
15450 \begin_layout Description
15451 \begin_inset Flex Code
15454 \begin_layout Plain Layout
15461 \begin_inset Flex Code
15464 \begin_layout Plain Layout
15471 \begin_inset Quotes erd
15475 \begin_inset Quotes erd
15478 ] The command used to generate a list of floats of this type; the leading
15487 \begin_inset Flex Code
15490 \begin_layout Plain Layout
15496 is false, since there is no standard way to generate this command.
15498 \begin_inset Flex Code
15501 \begin_layout Plain Layout
15507 is true, since in that case there is a standard way to define the command.
15510 \begin_layout Description
15511 \begin_inset Flex Code
15514 \begin_layout Plain Layout
15521 \begin_inset Flex Code
15524 \begin_layout Plain Layout
15531 \begin_inset Quotes erd
15535 \begin_inset Quotes erd
15538 ] A title for a list of floats of this kind (list of figures, tables, or
15540 It is used for the screen label within LyX, it is used by LaTeX for the
15541 title and it is used as the title in the XHTML output.
15542 It will be translated to the document language.
15545 \begin_layout Description
15546 \begin_inset Flex Code
15549 \begin_layout Plain Layout
15556 \begin_inset Flex Code
15559 \begin_layout Plain Layout
15566 \begin_inset Quotes erd
15570 \begin_inset Quotes erd
15573 ] This (optional) argument determines whether floats of this class will
15574 be numbered within some sectional unit of the document.
15576 \begin_inset Flex Code
15579 \begin_layout Plain Layout
15586 \begin_inset Quotes eld
15590 \begin_inset Flex Code
15593 \begin_layout Plain Layout
15600 \begin_inset Quotes erd
15603 , the floats will be numbered within chapters.
15607 \begin_layout Description
15608 \begin_inset Flex Code
15611 \begin_layout Plain Layout
15618 \begin_inset Flex Code
15621 \begin_layout Plain Layout
15628 \begin_inset Quotes erd
15632 \begin_inset Quotes erd
15635 ] The default placement for the given class of floats.
15636 The string should be as in standard LaTeX:
15637 \begin_inset Flex Code
15640 \begin_layout Plain Layout
15647 \begin_inset Flex Code
15650 \begin_layout Plain Layout
15657 \begin_inset Flex Code
15660 \begin_layout Plain Layout
15667 \begin_inset Flex Code
15670 \begin_layout Plain Layout
15676 for top, bottom, page, and here, respectively.
15680 \begin_layout Plain Layout
15681 Note that the order of these letters in the string is irrelevant, like in
15687 On top of that there is a new type,
15688 \begin_inset Flex Code
15691 \begin_layout Plain Layout
15697 , which does not really correspond to a float, since it means: put it
15698 \begin_inset Quotes eld
15702 \begin_inset Quotes erd
15706 Note however that the
15707 \begin_inset Flex Code
15710 \begin_layout Plain Layout
15716 specifier is special and, because of implementation details, cannot be
15717 used in non-built in float types.
15718 If you do not understand what this means, just use
15719 \begin_inset Quotes eld
15723 \begin_inset Flex Code
15726 \begin_layout Plain Layout
15733 \begin_inset Quotes erd
15739 \begin_layout Description
15740 \begin_inset Flex Code
15743 \begin_layout Plain Layout
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15759 ] The prefix to use when creating labels referring to floats of this type.
15760 This allows the use of formatted references.
15761 Note that you can remove any
15762 \begin_inset Flex Code
15765 \begin_layout Plain Layout
15771 set by a copied style by using the special value
15772 \begin_inset Quotes eld
15776 \begin_inset Quotes erd
15779 , which must be all caps.
15782 \begin_layout Description
15783 \begin_inset Flex Code
15786 \begin_layout Plain Layout
15793 \begin_inset Flex Code
15796 \begin_layout Plain Layout
15803 \begin_inset Quotes erd
15807 \begin_inset Quotes erd
15810 ] The style used when defining the float using
15811 \begin_inset Flex Code
15814 \begin_layout Plain Layout
15825 \begin_layout Description
15826 \begin_inset Flex Code
15829 \begin_layout Plain Layout
15836 \begin_inset Flex Code
15839 \begin_layout Plain Layout
15846 \begin_inset Quotes erd
15850 \begin_inset Quotes erd
15854 \begin_inset Quotes eld
15858 \begin_inset Quotes erd
15861 of the new class of floats, like program or algorithm.
15862 After the appropriate
15863 \begin_inset Flex Code
15866 \begin_layout Plain Layout
15875 \begin_inset Flex Code
15878 \begin_layout Plain Layout
15887 \begin_inset Flex Code
15890 \begin_layout Plain Layout
15901 \begin_layout Description
15902 \begin_inset Flex Code
15905 \begin_layout Plain Layout
15912 \begin_inset Flex Code
15915 \begin_layout Plain Layout
15922 \begin_inset space \thinspace{}
15926 \begin_inset Flex Code
15929 \begin_layout Plain Layout
15937 ] Specifies whether this float is defined using the LaTeX package
15938 \begin_inset Flex Code
15941 \begin_layout Plain Layout
15947 , either by the class file, another package or on-the-fly by LyX itself.
15950 \begin_layout Standard
15951 Note that defining a float with type
15952 \begin_inset Flex Code
15955 \begin_layout Plain Layout
15963 automatically defines the corresponding counter with name
15964 \begin_inset Flex Code
15967 \begin_layout Plain Layout
15978 \begin_layout Subsection
15979 Flex insets and InsetLayout
15980 \begin_inset CommandInset label
15982 name "sub:Flex-insets-and"
15989 \begin_layout Standard
15990 Flex insets come in three different kinds:
15993 \begin_layout Itemize
15995 \begin_inset Flex Code
15998 \begin_layout Plain Layout
16004 ): These define semantic markup corresponding to such LaTeX commands as
16006 \begin_inset Flex Code
16009 \begin_layout Plain Layout
16018 \begin_inset Flex Code
16021 \begin_layout Plain Layout
16032 \begin_layout Itemize
16034 \begin_inset Flex Code
16037 \begin_layout Plain Layout
16043 ): These can be used to define custom collapsible insets, similar to TeX
16044 code, footnote, and the like.
16045 An obvious example is an endnote inset, which is defined in the
16046 \begin_inset Flex Code
16049 \begin_layout Plain Layout
16058 \begin_layout Itemize
16060 \begin_inset Flex Code
16063 \begin_layout Plain Layout
16069 ): For use with DocBook classes.
16072 \begin_layout Standard
16073 Flex insets are defined using the
16074 \begin_inset Flex Code
16077 \begin_layout Plain Layout
16083 tag, which shall be explained in a moment.
16086 \begin_layout Standard
16088 \begin_inset Flex Code
16091 \begin_layout Plain Layout
16097 tag also serves another function: It can be used to customize the general
16098 layout of many different types of insets.
16100 \begin_inset Flex Code
16103 \begin_layout Plain Layout
16109 can be used to customize the layout parameters for footnotes, marginal
16110 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16111 boxes, tables, algorithms, URLs, and
16112 \change_deleted -712698321 1356964515
16114 \change_inserted -712698321 1356964516
16117 s, as well as to define Flex insets.
16120 \begin_layout Standard
16122 \begin_inset Flex Code
16125 \begin_layout Plain Layout
16131 definition must begin with a line of the form:
16134 \begin_layout LyX-Code
16138 \begin_layout Standard
16140 \begin_inset Flex Code
16143 \begin_layout Plain Layout
16149 indicates the inset whose layout is being defined, and here there are
16150 \change_deleted -712698321 1356964888
16152 \change_inserted -712698321 1356964888
16154 \change_deleted 5863208 1334489267
16160 \begin_layout Enumerate
16161 The layout for a pre-existing inset is being modified.
16162 In this case, can be
16163 \begin_inset Flex Code
16166 \begin_layout Plain Layout
16172 any one of the following:
16173 \begin_inset Flex Code
16176 \begin_layout Plain Layout
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16193 \begin_inset Flex Code
16196 \begin_layout Plain Layout
16203 \begin_inset Flex Code
16206 \begin_layout Plain Layout
16213 \change_inserted -712698321 1356964563
16215 \begin_inset Flex Code
16218 \begin_layout Plain Layout
16220 \change_inserted -712698321 1356964560
16231 \begin_inset Flex Code
16234 \begin_layout Plain Layout
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16251 \begin_inset Flex Code
16254 \begin_layout Plain Layout
16261 \begin_inset Flex Code
16264 \begin_layout Plain Layout
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16281 \begin_inset Flex Code
16284 \begin_layout Plain Layout
16291 \begin_inset Flex Code
16294 \begin_layout Plain Layout
16301 \begin_inset Flex Code
16304 \begin_layout Plain Layout
16311 \begin_inset Flex Code
16314 \begin_layout Plain Layout
16321 \begin_inset Flex Code
16324 \begin_layout Plain Layout
16331 \begin_inset Flex Code
16334 \begin_layout Plain Layout
16341 \begin_inset Flex Code
16344 \begin_layout Plain Layout
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16361 \change_deleted -712698321 1356964592
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16368 \change_deleted -712698321 1353866704
16372 \change_inserted -712698321 1353866707
16383 \begin_inset Flex Code
16386 \begin_layout Plain Layout
16393 \begin_inset Flex Code
16396 \begin_layout Plain Layout
16405 \begin_layout Enumerate
16406 The layout for a Flex inset is being defined.
16408 \begin_inset Flex Code
16411 \begin_layout Plain Layout
16417 must be of the form
16418 \begin_inset Quotes eld
16422 \begin_inset Flex Code
16425 \begin_layout Plain Layout
16432 \begin_inset Quotes erd
16436 \begin_inset Flex Code
16439 \begin_layout Plain Layout
16445 may be be any valid identifier not used by a pre-existing Flex inset.
16446 The identifier may include spaces, but in that case the whole thing must
16447 be wrapped in quotes.
16448 Note that the definition of a flex inset
16453 \begin_inset Flex Code
16456 \begin_layout Plain Layout
16462 entry, declaring which type of inset it defines.
16463 \change_inserted 5863208 1334489312
16467 \begin_layout Enumerate
16469 \change_inserted 5863208 1334492248
16470 The layout for user specific branch is being defined.
16472 \begin_inset Flex Code
16475 \begin_layout Plain Layout
16477 \change_inserted 5863208 1334489384
16483 must be of the form
16484 \begin_inset Quotes eld
16488 \begin_inset Flex Code
16491 \begin_layout Plain Layout
16493 \change_inserted 5863208 1334489392
16500 \begin_inset Quotes erd
16504 \begin_inset Flex Code
16507 \begin_layout Plain Layout
16509 \change_inserted 5863208 1334489384
16515 may be be any valid identifier of branch defined in user's document.
16516 The identifier may include spaces, but in that case the whole thing must
16517 be wrapped in quotes.
16518 The main purpose of this feature is to allow LaTeX wrapping around specific
16519 branches as user needs.
16520 \change_inserted -712698321 1356964893
16524 \begin_layout Enumerate
16526 \change_inserted -712698321 1356965125
16527 The layout of a user (or class) specific caption is being defined.
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16534 \change_inserted -712698321 1356964939
16540 must be of the form
16541 \begin_inset Quotes eld
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16550 \change_inserted -712698321 1356964943
16557 \begin_inset Quotes erd
16561 \begin_inset Flex Code
16564 \begin_layout Plain Layout
16566 \change_inserted -712698321 1356964939
16572 specifies the name of the caption as it appears in the menu.
16573 Have a look at the standard caption (
16574 \begin_inset Flex Code
16577 \begin_layout Plain Layout
16579 \change_inserted -712698321 1356964987
16585 ), the specific captions of the KOMA-Script classes (
16586 \begin_inset Flex Code
16589 \begin_layout Plain Layout
16591 \change_inserted -712698321 1356965018
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16603 \change_inserted -712698321 1356965021
16614 \begin_inset Flex Code
16617 \begin_layout Plain Layout
16619 \change_inserted -712698321 1356965045
16625 ) for applications.
16630 \begin_layout Standard
16632 \begin_inset Flex Code
16635 \begin_layout Plain Layout
16641 definition can contain the following entries:
16644 \begin_layout Description
16646 \change_inserted -712698321 1353681390
16647 \begin_inset Flex Code
16650 \begin_layout Plain Layout
16652 \change_inserted -712698321 1353681344
16659 \begin_inset Flex Code
16662 \begin_layout Plain Layout
16664 \change_inserted -712698321 1353681344
16670 ] Defines argument number <int> of a command\SpecialChar \slash{}
16671 environment associated with
16672 the current layout.
16673 The definition must end with
16674 \begin_inset Flex Code
16677 \begin_layout Plain Layout
16679 \change_inserted -712698321 1353681344
16687 \begin_inset space ~
16691 \begin_inset CommandInset ref
16693 reference "sub:Paragraph-Styles"
16700 \begin_layout Description
16702 \change_inserted -195340706 1333913893
16703 \begin_inset Flex Code
16706 \begin_layout Plain Layout
16712 Preamble for changing languages.
16714 \begin_inset space ~
16718 \begin_inset CommandInset ref
16720 reference "sub:I18n"
16727 \begin_layout Description
16728 \begin_inset Flex Code
16731 \begin_layout Plain Layout
16738 \begin_inset Flex Code
16741 \begin_layout Plain Layout
16747 ] The color for the inset's background.
16749 \begin_inset space ~
16753 \begin_inset CommandInset ref
16755 reference "chap:Names-of-colors"
16759 for a list of the available color names.
16762 \begin_layout Description
16763 \begin_inset Flex Code
16766 \begin_layout Plain Layout
16773 \begin_inset Flex Code
16776 \begin_layout Plain Layout
16785 \begin_inset space \thinspace{}
16789 \begin_inset Flex Code
16792 \begin_layout Plain Layout
16798 ] Whether to use the content of the inset as the label, when the inset is
16803 \begin_layout Description
16804 \begin_inset Flex Code
16807 \begin_layout Plain Layout
16814 \begin_inset Flex Code
16817 \begin_layout Plain Layout
16823 ] As with paragraph styles, see sec.
16824 \begin_inset space ~
16828 \begin_inset CommandInset ref
16830 reference "sub:Paragraph-Styles"
16835 Note that you need to specify the complete type, e.
16836 \begin_inset space \thinspace{}
16840 \begin_inset space ~
16844 \begin_inset Flex Code
16847 \begin_layout Plain Layout
16848 CopyStyle Flex:<name>
16856 \begin_layout Description
16857 \begin_inset Flex Code
16860 \begin_layout Plain Layout
16867 \begin_inset Flex Code
16870 \begin_layout Plain Layout
16879 \begin_inset space \thinspace{}
16883 \begin_inset Flex Code
16886 \begin_layout Plain Layout
16892 ] Indicates whether the user may employ the Paragraph Settings dialog to
16893 customize the paragraph.
16896 \begin_layout Description
16897 \begin_inset Flex Code
16900 \begin_layout Plain Layout
16907 \begin_inset Flex Code
16910 \begin_layout Plain Layout
16917 \begin_inset Flex Code
16920 \begin_layout Plain Layout
16927 \begin_inset Flex Code
16930 \begin_layout Plain Layout
16936 , describing the rendering style used for the inset's frame and buttons.
16937 Footnotes generally use
16938 \begin_inset Flex Code
16941 \begin_layout Plain Layout
16947 , ERT insets generally
16948 \begin_inset Flex Code
16951 \begin_layout Plain Layout
16957 , and character styles
16958 \begin_inset Flex Code
16961 \begin_layout Plain Layout
16970 \begin_layout Description
16971 \begin_inset Flex Code
16974 \begin_layout Plain Layout
16981 \begin_inset Flex Code
16984 \begin_layout Plain Layout
16993 \begin_inset space \thinspace{}
16999 \begin_inset Flex Code
17002 \begin_layout Plain Layout
17011 \begin_inset Flex Code
17014 \begin_layout Plain Layout
17021 \begin_inset Flex Code
17024 \begin_layout Plain Layout
17031 Indicates whether the environment will stand on its own in the output or
17032 will appear inline with the surrounding text.
17033 If set to false, it is supposed that the LaTeX environment ignores white
17034 space (including one newline character) after the
17035 \begin_inset Flex Code
17038 \begin_layout Plain Layout
17051 \begin_inset Flex Code
17054 \begin_layout Plain Layout
17070 \begin_layout Description
17071 \begin_inset Flex Code
17074 \begin_layout Plain Layout
17080 Required at the end of the
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17093 \begin_layout Description
17094 \begin_inset Flex Code
17097 \begin_layout Plain Layout
17103 The font used for both the text body
17109 \begin_inset space ~
17113 \begin_inset CommandInset ref
17115 reference "sub:Font-description"
17120 Note that defining this font automatically defines the
17121 \begin_inset Flex Code
17124 \begin_layout Plain Layout
17130 to the same value, so define this first and define
17131 \begin_inset Flex Code
17134 \begin_layout Plain Layout
17140 later if you want them to be different.
17141 \change_inserted 155139281 1354130923
17145 \begin_layout Description
17147 \change_inserted 155139281 1354130923
17148 \begin_inset Flex Code
17151 \begin_layout Plain Layout
17153 \change_inserted 155139281 1354130923
17154 ForceLocalFontSwitch
17160 \begin_inset Flex Code
17163 \begin_layout Plain Layout
17165 \change_inserted 155139281 1354130923
17174 \begin_inset Flex Code
17177 \begin_layout Plain Layout
17179 \change_inserted 155139281 1354130923
17185 ] When using babel, always use a local font switch (
17186 \begin_inset Flex Code
17189 \begin_layout Plain Layout
17191 \change_inserted 155139281 1354130923
17199 ), never a global one (such as
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17205 \change_inserted 155139281 1354130923
17218 \begin_layout Description
17219 \begin_inset Flex Code
17222 \begin_layout Plain Layout
17229 \begin_inset Flex Code
17232 \begin_layout Plain Layout
17241 \begin_inset space \thinspace{}
17245 \begin_inset Flex Code
17248 \begin_layout Plain Layout
17255 \begin_inset Quotes eld
17259 \begin_inset Quotes erd
17262 language, leading to Left-to-Right (Latin) output, e.
17263 \begin_inset space \thinspace{}
17267 \begin_inset space \space{}
17270 in TeX code or URL.
17274 \begin_layout Description
17275 \begin_inset Flex Code
17278 \begin_layout Plain Layout
17285 \begin_inset Flex Code
17288 \begin_layout Plain Layout
17297 \begin_inset space \thinspace{}
17301 \begin_inset Flex Code
17304 \begin_layout Plain Layout
17310 ] Indicates whether the
17311 \begin_inset Flex Code
17314 \begin_layout Plain Layout
17320 should be used or, instead, the user can change the paragraph style used
17325 \begin_layout Description
17326 \begin_inset Flex Code
17329 \begin_layout Plain Layout
17336 \begin_inset Flex Code
17339 \begin_layout Plain Layout
17348 \begin_inset space \thinspace{}
17352 \begin_inset Flex Code
17355 \begin_layout Plain Layout
17361 ] As with paragraph styles, see sec.
17362 \begin_inset space ~
17366 \begin_inset CommandInset ref
17368 reference "sub:Paragraph-Styles"
17375 \begin_layout Description
17376 \begin_inset Flex Code
17379 \begin_layout Plain Layout
17385 These tags control the XHTML output.
17387 \begin_inset space ~
17391 \begin_inset CommandInset ref
17393 reference "sec:Tags-for-XHTML"
17400 \begin_layout Description
17401 \begin_inset Flex Code
17404 \begin_layout Plain Layout
17411 \begin_inset Flex Code
17414 \begin_layout Plain Layout
17423 \begin_inset space \thinspace{}
17427 \begin_inset Flex Code
17430 \begin_layout Plain Layout
17436 ] Whether to include the contents of this inset in the strings generated
17437 for the `Outline' pane.
17438 One would not, for example, want the content of a footnote in a section
17439 header to be included in the TOC displayed in the outline, but one would
17440 normally want the content of a character style displayed.
17441 Default is false: not to include.
17444 \begin_layout Description
17445 \begin_inset Flex Code
17448 \begin_layout Plain Layout
17457 \begin_inset Flex Code
17460 \begin_layout Plain Layout
17469 \begin_inset space \thinspace{}
17473 \begin_inset Flex Code
17476 \begin_layout Plain Layout
17482 ] As with paragraph styles, see sec.
17483 \begin_inset space ~
17487 \begin_inset CommandInset ref
17489 reference "sub:Paragraph-Styles"
17496 \begin_layout Description
17497 \begin_inset Flex Code
17500 \begin_layout Plain Layout
17506 The font used for the label.
17508 \begin_inset space ~
17512 \begin_inset CommandInset ref
17514 reference "sub:Font-description"
17519 Note that this definition can never appear before
17520 \begin_inset Flex Code
17523 \begin_layout Plain Layout
17529 , lest it be ineffective.
17532 \begin_layout Description
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17543 \begin_inset Flex Code
17546 \begin_layout Plain Layout
17553 \begin_inset Quotes erd
17557 \begin_inset Quotes erd
17560 ] What will be displayed on the button or elsewhere as the inset label.
17562 \begin_inset Flex Code
17565 \begin_layout Plain Layout
17572 \begin_inset Flex Code
17575 \begin_layout Plain Layout
17581 ) modify this label on the fly.
17584 \begin_layout Description
17586 \change_inserted -195340706 1333913893
17587 \begin_inset Flex Code
17590 \begin_layout Plain Layout
17596 Language dependent preamble.
17598 \begin_inset space ~
17602 \begin_inset CommandInset ref
17604 reference "sub:I18n"
17611 \begin_layout Description
17612 \begin_inset Flex Code
17615 \begin_layout Plain Layout
17622 \begin_inset Flex Code
17625 \begin_layout Plain Layout
17631 ] The name of the corresponding LaTeX stuff.
17632 Either the environment or command name.
17635 \begin_layout Description
17636 \begin_inset Flex Code
17639 \begin_layout Plain Layout
17646 \begin_inset Flex Code
17649 \begin_layout Plain Layout
17655 ] The optional parameter for the corresponding
17656 \begin_inset Flex Code
17659 \begin_layout Plain Layout
17665 stuff, including possible bracket pairs like
17666 \begin_inset Flex Code
17669 \begin_layout Plain Layout
17677 \change_inserted -712698321 1355144715
17678 This will be output as is after all LaTeX
17679 \begin_inset Flex Code
17682 \begin_layout Plain Layout
17684 \change_inserted -712698321 1355144713
17693 This parameter cannot be changed from within LyX
17694 \change_inserted -712698321 1355144775
17696 \begin_inset Flex Code
17699 \begin_layout Plain Layout
17701 \change_inserted -712698321 1355144747
17707 for customizable parameters)
17712 \begin_layout Description
17713 \begin_inset Flex Code
17716 \begin_layout Plain Layout
17723 \begin_inset Flex Code
17726 \begin_layout Plain Layout
17728 \change_deleted -712698321 1353867544
17735 Command, Environment,
17736 \change_inserted -712698321 1353867573
17738 \change_deleted -712698321 1353867557
17747 \begin_inset Flex Code
17750 \begin_layout Plain Layout
17752 \change_deleted -712698321 1353867564
17756 \change_deleted -712698321 1353867569
17764 ] How the style should be translated into LaTeX.
17768 \begin_layout Plain Layout
17769 \begin_inset Flex Code
17772 \begin_layout Plain Layout
17778 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17779 Visit the SGML class files for specific examples.
17788 \begin_layout Description
17789 \begin_inset Flex Code
17792 \begin_layout Plain Layout
17794 \change_deleted -712698321 1353867582
17796 \change_inserted -712698321 1353867583
17804 means nothing special.
17808 \begin_layout Description
17809 \begin_inset Flex Code
17812 \begin_layout Plain Layout
17819 \begin_inset Flex Code
17822 \begin_layout Plain Layout
17829 {\SpecialChar \ldots{}
17838 \begin_layout Description
17839 \begin_inset Flex Code
17842 \begin_layout Plain Layout
17849 \begin_inset Flex Code
17852 \begin_layout Plain Layout
17859 }\SpecialChar \ldots{}
17875 \begin_layout Description
17877 \change_deleted -712698321 1353867600
17878 \begin_inset Flex Code
17881 \begin_layout Plain Layout
17888 \begin_inset Flex Code
17891 \begin_layout Plain Layout
17898 \begin_inset Flex Code
17901 \begin_layout Plain Layout
17909 is generated for each paragraph of this environment.
17913 \begin_layout Description
17915 \change_deleted -712698321 1353867600
17916 \begin_inset Flex Code
17919 \begin_layout Plain Layout
17926 \begin_inset Flex Code
17929 \begin_layout Plain Layout
17936 \begin_inset Flex Code
17939 \begin_layout Plain Layout
17945 is passed as an argument to the environment.
17947 \begin_inset Flex Code
17950 \begin_layout Plain Layout
17956 can be defined in the
17957 \begin_inset Flex MenuItem
17960 \begin_layout Plain Layout
17965 \SpecialChar \menuseparator
17971 \begin_inset space ~
17985 \begin_layout Standard
17986 Putting the last few things together, the LaTeX output will be either:
17989 \begin_layout LyX-Code
17993 \change_deleted 2090807402 1356919073
17995 \change_inserted 2090807402 1356919073
17999 \change_deleted 2090807402 1356919073
18001 \change_inserted 2090807402 1356919002
18004 ]{\SpecialChar \ldots{}
18008 \begin_layout Standard
18012 \begin_layout LyX-Code
18016 \change_deleted 2090807402 1356919013
18018 \change_inserted 2090807402 1356919014
18022 \change_deleted 2090807402 1356919013
18024 \change_inserted 2090807402 1356919008
18027 ] \SpecialChar \ldots{}
18031 \change_deleted 2090807402 1356919016
18033 \change_inserted 2090807402 1356919016
18039 \begin_layout Standard
18040 depending upon the LaTeX type.
18044 \begin_layout Description
18046 \change_inserted -712698321 1354263128
18047 \begin_inset Flex Code
18050 \begin_layout Plain Layout
18052 \change_inserted -712698321 1353866742
18061 \begin_inset Flex Code
18064 \begin_layout Plain Layout
18066 \change_inserted -712698321 1353866752
18072 ] A string that is put at the beginning of the layout content.
18073 A line break in the output can be indicated by
18074 \begin_inset Flex Code
18077 \begin_layout Plain Layout
18079 \change_inserted -712698321 1354263128
18090 \begin_layout Description
18091 \begin_inset Flex Code
18094 \begin_layout Plain Layout
18101 \begin_inset Flex Code
18104 \begin_layout Plain Layout
18111 \begin_inset Flex Code
18114 \begin_layout Plain Layout
18121 \begin_inset Flex Code
18124 \begin_layout Plain Layout
18131 \begin_inset Flex Code
18134 \begin_layout Plain Layout
18140 (indicating a dummy definition ending definitions of charstyles, etc).
18141 This entry is required in and is only meaningful for Flex insets.
18142 Among other things, it determines on which menu this inset will appear.
18144 \begin_inset Flex Code
18147 \begin_layout Plain Layout
18154 \begin_inset Flex Code
18157 \begin_layout Plain Layout
18163 will automatically set
18164 \begin_inset Flex Code
18167 \begin_layout Plain Layout
18175 \begin_inset Flex Code
18178 \begin_layout Plain Layout
18184 can be set to true for
18185 \begin_inset Flex Code
18188 \begin_layout Plain Layout
18194 insets by setting it
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18211 \begin_layout Description
18212 \begin_inset Flex Code
18215 \begin_layout Plain Layout
18222 \begin_inset Flex Code
18225 \begin_layout Plain Layout
18234 \begin_inset space \thinspace{}
18238 \begin_inset Flex Code
18241 \begin_layout Plain Layout
18247 ] Whether multiple paragraphs are permitted in this inset.
18249 \begin_inset Flex Code
18252 \begin_layout Plain Layout
18258 to the same value and
18259 \begin_inset Flex Code
18262 \begin_layout Plain Layout
18268 to the opposite value.
18269 These can be reset to other values, if they are used
18274 \begin_inset Flex Code
18277 \begin_layout Plain Layout
18287 \begin_layout Description
18288 \begin_inset Flex Code
18291 \begin_layout Plain Layout
18298 \begin_inset Flex Code
18301 \begin_layout Plain Layout
18310 \begin_inset space \thinspace{}
18314 \begin_inset Flex Code
18317 \begin_layout Plain Layout
18323 ] Whether fragile commands in this inset should be
18324 \begin_inset Flex Code
18327 \begin_layout Plain Layout
18340 whether the command should itself be protected.) Default is false.
18343 \begin_layout Description
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18354 \begin_inset Flex Code
18357 \begin_layout Plain Layout
18366 \begin_inset space \thinspace{}
18370 \begin_inset Flex Code
18373 \begin_layout Plain Layout
18379 ] As with paragraph styles, see sec.
18380 \begin_inset space ~
18384 \begin_inset CommandInset ref
18386 reference "sub:Paragraph-Styles"
18394 \begin_layout Description
18395 \begin_inset Flex Code
18398 \begin_layout Plain Layout
18405 \begin_inset Flex Code
18408 \begin_layout Plain Layout
18417 \begin_inset space \thinspace{}
18421 \begin_inset Flex Code
18424 \begin_layout Plain Layout
18430 ] As with paragraph styles, see sec.
18431 \begin_inset space ~
18435 \begin_inset CommandInset ref
18437 reference "sub:Paragraph-Styles"
18445 \begin_layout Description
18446 \begin_inset Flex Code
18449 \begin_layout Plain Layout
18455 As with paragraph styles, see sec.
18456 \begin_inset space ~
18460 \begin_inset CommandInset ref
18462 reference "sub:Paragraph-Styles"
18469 \begin_layout Description
18470 \begin_inset Flex Code
18473 \begin_layout Plain Layout
18480 \begin_inset Flex Code
18483 \begin_layout Plain Layout
18489 ] The prefix to use when creating labels referring to insets of this type.
18490 This allows the use of formatted references.
18493 \begin_layout Description
18494 \begin_inset Flex Code
18497 \begin_layout Plain Layout
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18513 ] As with paragraph styles, see sec.
18514 \begin_inset space ~
18518 \begin_inset CommandInset ref
18520 reference "sub:Paragraph-Styles"
18525 \change_inserted -712698321 1354439699
18529 \begin_layout Description
18531 \change_inserted -712698321 1354439705
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18537 \change_inserted -712698321 1354439699
18544 \begin_inset Flex Code
18547 \begin_layout Plain Layout
18549 \change_inserted -712698321 1354439699
18558 \begin_inset Flex Code
18561 \begin_layout Plain Layout
18563 \change_inserted -712698321 1354439699
18569 ] Resets the LaTeX arguments of this layout (as defined via the
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18575 \change_inserted -712698321 1354439699
18582 This is useful if you have copied a style via
18583 \begin_inset Flex Code
18586 \begin_layout Plain Layout
18588 \change_inserted -712698321 1354439699
18594 , but you do not want to inherit its (required and optional) arguments.
18596 \change_deleted -712698321 1354439698
18602 \begin_layout Description
18603 \begin_inset Flex Code
18606 \begin_layout Plain Layout
18613 \begin_inset Flex Code
18616 \begin_layout Plain Layout
18623 \begin_inset space \thinspace{}
18627 \begin_inset Flex Code
18630 \begin_layout Plain Layout
18638 ] Whether this inset should use the font of its surrounding environment
18640 Default is true: uses its own.
18643 \begin_layout Description
18645 \change_inserted -712698321 1354263134
18646 \begin_inset Flex Code
18649 \begin_layout Plain Layout
18651 \change_inserted -712698321 1353866810
18658 \begin_inset Flex Code
18661 \begin_layout Plain Layout
18663 \change_inserted -712698321 1353866806
18669 ] A string that is put at the end of the layout content.
18670 A line break in the output can be indicated by
18671 \begin_inset Flex Code
18674 \begin_layout Plain Layout
18676 \change_inserted -712698321 1354263134
18687 \begin_layout Description
18688 \begin_inset Flex Code
18691 \begin_layout Plain Layout
18698 \begin_inset Flex Code
18701 \begin_layout Plain Layout
18708 \begin_inset space \thinspace{}
18712 \begin_inset Flex Code
18715 \begin_layout Plain Layout
18723 ] Allow spell-checking the contents of this inset.
18727 \begin_layout Subsection
18729 \begin_inset CommandInset label
18731 name "sub:Counters"
18738 \begin_layout Standard
18739 It is necessary to define the counters (
18740 \begin_inset Flex MenuItem
18743 \begin_layout Plain Layout
18750 \begin_inset Flex MenuItem
18753 \begin_layout Plain Layout
18759 , \SpecialChar \ldots{}
18760 ) in the text class itself.
18761 The standard counters are defined in the file
18762 \begin_inset Flex Code
18765 \begin_layout Plain Layout
18771 , so you may have to do no more than add
18774 \begin_layout LyX-Code
18775 Input stdcounters.inc
18778 \begin_layout Standard
18779 to your layout file to get them to work.
18780 But if you want to define custom counters, then you can do so.
18781 The counter declaration must begin with:
18784 \begin_layout LyX-Code
18785 Counter CounterName
18788 \begin_layout Standard
18790 \begin_inset Flex Code
18793 \begin_layout Plain Layout
18799 ' is replaced by the name of the counter.
18800 And it must end with
18801 \begin_inset Quotes eld
18805 \begin_inset Flex Code
18808 \begin_layout Plain Layout
18815 \begin_inset Quotes erd
18819 The following parameters can also be used:
18822 \begin_layout Description
18823 \begin_inset Flex Code
18826 \begin_layout Plain Layout
18833 \begin_inset Flex Code
18836 \begin_layout Plain Layout
18843 \begin_inset Quotes erd
18847 \begin_inset Quotes erd
18850 ] When defined, this string defines how the counter is displayed.
18851 Setting this value sets
18852 \begin_inset Flex Code
18855 \begin_layout Plain Layout
18856 LabelStringAppendix
18862 The following special constructs can be used in the string:
18866 \begin_layout Itemize
18867 \begin_inset Flex Code
18870 \begin_layout Plain Layout
18878 will be replaced by the expansion of the
18879 \begin_inset Flex Code
18882 \begin_layout Plain Layout
18889 \begin_inset Flex Code
18892 \begin_layout Plain Layout
18893 LabelStringAppendix
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18912 \begin_layout Itemize
18913 counter values can be expressed using LaTeX-like macros
18914 \begin_inset Newline newline
18918 \begin_inset Flex Code
18921 \begin_layout Plain Layout
18938 \begin_inset Flex Code
18941 \begin_layout Plain Layout
18953 \begin_layout Plain Layout
18963 Actually, the situation is a bit more complicated: any
18982 other than those described below will produce arabic numerals.
18983 It would not be surprising to see this change in the future.
18989 \begin_inset Flex Code
18992 \begin_layout Plain Layout
18998 : 1, 2, 3,\SpecialChar \ldots{}
19000 \begin_inset Flex Code
19003 \begin_layout Plain Layout
19009 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19011 \begin_inset Flex Code
19014 \begin_layout Plain Layout
19020 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19022 \begin_inset Flex Code
19025 \begin_layout Plain Layout
19031 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19033 \begin_inset Flex Code
19036 \begin_layout Plain Layout
19042 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19044 \begin_inset Flex Code
19047 \begin_layout Plain Layout
19053 for hebrew numerals.
19057 \begin_layout Standard
19058 If LabelString is not defined, a default value is constructed as follows:
19059 if the counter has a master counter
19060 \begin_inset Flex Code
19063 \begin_layout Plain Layout
19070 \begin_inset Flex Code
19073 \begin_layout Plain Layout
19080 \begin_inset Newline newline
19084 \begin_inset Flex Code
19087 \begin_layout Plain Layout
19097 is used; otherwise the string
19098 \begin_inset Flex Code
19101 \begin_layout Plain Layout
19112 \begin_layout Description
19113 \begin_inset Flex Code
19116 \begin_layout Plain Layout
19117 LabelStringAppendix
19123 \begin_inset Flex Code
19126 \begin_layout Plain Layout
19133 \begin_inset Quotes erd
19137 \begin_inset Quotes erd
19141 \begin_inset Flex Code
19144 \begin_layout Plain Layout
19150 , but for use in the Appendix.
19153 \begin_layout Description
19154 \begin_inset Flex Code
19157 \begin_layout Plain Layout
19164 \begin_inset Flex Code
19167 \begin_layout Plain Layout
19174 \begin_inset Quotes erd
19178 \begin_inset Quotes erd
19181 ] A format for use with formatted references to this counter.
19182 For example, one might want to have references to section numbers appear
19184 \begin_inset Quotes eld
19188 \begin_inset Quotes erd
19192 The string should contain
19193 \begin_inset Quotes eld
19197 \begin_inset Quotes erd
19201 This will be replaced by the counter number itself.
19202 So, for sections, it would be: Section ##.
19205 \begin_layout Description
19206 \begin_inset Flex Code
19209 \begin_layout Plain Layout
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19226 \begin_inset Quotes erd
19230 \begin_inset Quotes erd
19233 ] If this is set to the name of another counter, the present counter will
19234 be reset every time the other one is increased.
19236 \begin_inset Flex Code
19239 \begin_layout Plain Layout
19246 \begin_inset Flex Code
19249 \begin_layout Plain Layout
19258 \begin_layout Subsection
19260 \begin_inset CommandInset label
19262 name "sub:Font-description"
19269 \begin_layout Standard
19270 A font description looks like this:
19273 \begin_layout LyX-Code
19287 \begin_layout LyX-Code
19291 \begin_layout LyX-Code
19295 \begin_layout Standard
19296 The following commands are available:
19299 \begin_layout Description
19300 \begin_inset Flex Code
19303 \begin_layout Plain Layout
19310 \begin_inset Flex Code
19313 \begin_layout Plain Layout
19322 \begin_inset Flex Code
19325 \begin_layout Plain Layout
19332 \begin_inset Flex Code
19335 \begin_layout Plain Layout
19342 \begin_inset Flex Code
19345 \begin_layout Plain Layout
19352 \begin_inset Flex Code
19355 \begin_layout Plain Layout
19362 \begin_inset Flex Code
19365 \begin_layout Plain Layout
19372 \begin_inset Flex Code
19375 \begin_layout Plain Layout
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19404 \begin_layout Description
19405 \begin_inset Flex Code
19408 \begin_layout Plain Layout
19415 \begin_inset Flex Code
19418 \begin_layout Plain Layout
19427 \begin_inset Flex Code
19430 \begin_layout Plain Layout
19437 \begin_inset Flex Code
19440 \begin_layout Plain Layout
19449 \begin_layout Description
19450 \begin_inset Flex Code
19453 \begin_layout Plain Layout
19460 \begin_inset Flex Code
19463 \begin_layout Plain Layout
19469 ] Valid arguments are:
19470 \begin_inset Flex Code
19473 \begin_layout Plain Layout
19480 \begin_inset Flex Code
19483 \begin_layout Plain Layout
19490 \begin_inset Flex Code
19493 \begin_layout Plain Layout
19500 \begin_inset Flex Code
19503 \begin_layout Plain Layout
19510 \begin_inset Flex Code
19513 \begin_layout Plain Layout
19520 \begin_inset Flex Code
19523 \begin_layout Plain Layout
19530 \begin_inset Flex Code
19533 \begin_layout Plain Layout
19540 \begin_inset Flex Code
19543 \begin_layout Plain Layout
19550 \begin_inset Flex Code
19553 \begin_layout Plain Layout
19560 \begin_inset Flex Code
19563 \begin_layout Plain Layout
19570 \begin_inset Flex Code
19573 \begin_layout Plain Layout
19580 \begin_inset Flex Code
19583 \begin_layout Plain Layout
19590 Each of these turns on or off the corresponding attribute.
19592 \begin_inset Flex Code
19595 \begin_layout Plain Layout
19601 turns on emphasis, and
19602 \begin_inset Flex Code
19605 \begin_layout Plain Layout
19613 \begin_inset Newline newline
19616 If the latter seems puzzling, remember that the font settings for the present
19617 context are generally inherited from the surrounding context.
19619 \begin_inset Flex Code
19622 \begin_layout Plain Layout
19628 would turn off the emphasis that was anyway in effect, say, in a theorem
19632 \begin_layout Description
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19655 \begin_inset Flex Code
19658 \begin_layout Plain Layout
19667 \begin_layout Description
19668 \begin_inset Flex Code
19671 \begin_layout Plain Layout
19678 \begin_inset Flex Code
19681 \begin_layout Plain Layout
19690 \begin_inset Flex Code
19693 \begin_layout Plain Layout
19700 \begin_inset Flex Code
19703 \begin_layout Plain Layout
19710 \begin_inset Flex Code
19713 \begin_layout Plain Layout
19722 \begin_layout Description
19723 \begin_inset Flex Code
19726 \begin_layout Plain Layout
19733 \begin_inset Flex Code
19736 \begin_layout Plain Layout
19743 \begin_inset Flex Code
19746 \begin_layout Plain Layout
19753 \begin_inset Flex Code
19756 \begin_layout Plain Layout
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19785 \begin_inset Flex Code
19788 \begin_layout Plain Layout
19795 \begin_inset Flex Code
19798 \begin_layout Plain Layout
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19817 \begin_layout Subsection
19818 \begin_inset CommandInset label
19820 name "sub:Citation-format-description"
19824 Citation format description
19827 \begin_layout Standard
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19838 blocks are used to describe how bibliographic information should be displayed,
19839 both within LyX itself (in the citation dialog and in tooltips, for example)
19840 and in XHTML output.
19841 Such a block might look like this:
19844 \begin_layout LyX-Code
19848 \begin_layout LyX-Code
19852 \begin_layout LyX-Code
19856 \begin_layout LyX-Code
19860 \begin_layout Standard
19861 The individual lines define how the bibliographic information associated
19862 with an article or book, respectively, is to be displayed, and such a definitio
19863 n can be given for any `entry type' that might be present in a BibTeX file.
19864 LyX defines a default format in the source code that will be used if no
19865 specific definition has been given.
19866 LyX predefines several formats in the file
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19876 , which is included in most of LyX's document classes.
19879 \begin_layout Standard
19880 The definitions use a simple language that allows BibTeX keys to be replaced
19882 Keys should be enclosed in
19883 \begin_inset Flex Code
19886 \begin_layout Plain Layout
19893 \begin_inset Flex Code
19896 \begin_layout Plain Layout
19903 So a simple definition might look like this:
19906 \begin_layout LyX-Code
19908 \begin_inset Quotes eld
19912 \begin_inset Quotes erd
19918 \begin_layout Standard
19919 This would print the author, followed by a comma, followed by the title,
19920 in quotes, followed by a period.
19923 \begin_layout Standard
19924 Of course, sometimes you may want to print a key only if it exists.
19925 This can be done by using a conditional construction, such as:
19926 \begin_inset Flex Code
19929 \begin_layout Plain Layout
19931 \begin_inset space ~
19941 \begin_inset Flex Code
19944 \begin_layout Plain Layout
19950 key exists, then print
19951 \begin_inset Quotes eld
19955 \begin_inset space ~
19959 \begin_inset Quotes erd
19962 followed by the volume key.
19963 It is also possible to have an else clause in the conditional, such as:
19964 \begin_inset Newline newline
19968 \begin_inset Flex Code
19971 \begin_layout Plain Layout
19972 {%author%[[%author%]][[%editor%, ed.]]}
19978 \begin_inset Newline newline
19982 \begin_inset Flex Code
19985 \begin_layout Plain Layout
19991 key is printed if it exists; otherwise, the editor key is printed, followed
19993 \begin_inset Quotes eld
19997 \begin_inset space ~
20001 \begin_inset Quotes erd
20004 Note that the key is again enclosed in
20005 \begin_inset Flex Code
20008 \begin_layout Plain Layout
20014 signs; the entire conditional is enclosed in braces; and the if and else
20015 clauses are enclosed in double brackets,
20016 \begin_inset Quotes eld
20020 \begin_inset Flex Code
20023 \begin_layout Plain Layout
20030 \begin_inset Quotes eld
20034 \begin_inset Quotes eld
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20048 \begin_inset Quotes erd
20052 There must be no space between any of these.
20055 \begin_layout Standard
20056 There is one other piece of syntax available in definitions, which looks
20058 \begin_inset Flex Code
20061 \begin_layout Plain Layout
20068 This defines a piece of formatting information that is to be used when
20070 \begin_inset Quotes eld
20074 \begin_inset Quotes erd
20078 Obviously, we do not want to output HTML tags when writing plain text,
20079 so they should be wrapped in
20080 \begin_inset Quotes eld
20084 \begin_inset Quotes erd
20088 \begin_inset Quotes eld
20092 \begin_inset Quotes erd
20098 \begin_layout Standard
20099 Two special sorts of definitions are also possible in a
20100 \begin_inset Flex Code
20103 \begin_layout Plain Layout
20110 An example of the first would be:
20113 \begin_layout LyX-Code
20115 \begin_inset Quotes eld
20119 \begin_inset Quotes erd
20125 \begin_layout Standard
20126 This is an abbreviation, or macro, and it can be used by treating it as
20128 \begin_inset Flex Code
20131 \begin_layout Plain Layout
20139 \begin_inset Flex Code
20142 \begin_layout Plain Layout
20148 exactly as it would treat its definition.
20149 So, let us issue the obvious
20157 \begin_layout LyX-Code
20161 \begin_layout Standard
20162 or anything like it.
20163 LyX shouldn't go into an infinite loop, but it may go into a long one before
20167 \begin_layout Standard
20168 The second sort of special definition might look like this:
20171 \begin_layout LyX-Code
20175 \begin_layout Standard
20176 This defines a translatable piece of text, which allows relevant parts of
20177 the bibliography to be translated.
20178 It can be included in a definition by treating it as a key:
20179 \begin_inset Flex Code
20182 \begin_layout Plain Layout
20189 Several of these are predefined in
20190 \begin_inset Flex Code
20193 \begin_layout Plain Layout
20200 Note that these are not macros, in the sense just defined.
20201 They will not be expanded.
20204 \begin_layout Standard
20205 So here then is an example that use all these features:
20206 \begin_inset VSpace defskip
20212 \begin_layout Standard
20216 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20219 \begin_layout Standard
20220 \begin_inset VSpace defskip
20223 This defines a macro that prints the author, followed by a comma, if the
20225 \begin_inset Flex Code
20228 \begin_layout Plain Layout
20234 key is defined, or else prints the name of the editor, followed by the
20236 \begin_inset Flex Code
20239 \begin_layout Plain Layout
20245 or its translation (it is by default
20246 \begin_inset Quotes eld
20250 \begin_inset Quotes erd
20254 \begin_inset Flex Code
20257 \begin_layout Plain Layout
20264 Note that this is in fact defined in
20265 \begin_inset Flex Code
20268 \begin_layout Plain Layout
20274 , so you can use it in your own definitions, or re-definitions, if you load
20278 \begin_layout Section
20279 \begin_inset CommandInset label
20281 name "sec:Tags-for-XHTML"
20285 Tags for XHTML output
20288 \begin_layout Standard
20289 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20290 by layout information.
20291 In general, LyX provides sensible defaults and, as mentioned earlier, it
20292 will even construct default CSS style rules from the other layout tags.
20293 For example, LyX will attempt to use the information provided in the
20294 \begin_inset Flex Code
20297 \begin_layout Plain Layout
20303 declaration for the Chapter style to write CSS that will appropriately
20304 format chapter headings.
20307 \begin_layout Standard
20308 In many cases, then, you may not have to do anything at all to get acceptable
20309 XHTML output for your own environments, custom insets, and so forth.
20310 But in some cases you will, and so LyX provides a number of layout tags
20311 that can be used to customize the XHTML and CSS that are generated.
20314 \begin_layout Standard
20315 Note that there are two tags,
20316 \begin_inset Flex Code
20319 \begin_layout Plain Layout
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20335 that may appear outside style and inset declarations.
20337 \begin_inset CommandInset ref
20339 reference "sub:General-text-class"
20343 for details on these.
20346 \begin_layout Subsection
20347 \begin_inset CommandInset label
20349 name "sub:Paragraph-Style-XHTML"
20356 \begin_layout Standard
20357 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20358 dealing with a normal paragraph, a command, or an environment, where this
20359 is itself determined by the contents of the corresponding
20360 \begin_inset Flex Code
20363 \begin_layout Plain Layout
20373 \begin_layout Standard
20374 For a command or normal paragraph, the output XHTML has the following form:
20377 \begin_layout LyX-Code
20379 \begin_inset Quotes erd
20383 \begin_inset Quotes erd
20389 \begin_layout LyX-Code
20391 \begin_inset Quotes erd
20395 \begin_inset Quotes erd
20401 \begin_layout LyX-Code
20402 Contents of the paragraph.
20405 \begin_layout LyX-Code
20409 \begin_layout Standard
20410 The label tags are of course omitted if the paragraph does not have a label.
20413 \begin_layout Standard
20414 For an environment that is not some sort of list, the XHTML takes this form:
20417 \begin_layout LyX-Code
20419 \begin_inset Quotes erd
20423 \begin_inset Quotes erd
20429 \begin_layout LyX-Code
20431 \begin_inset Quotes erd
20435 \begin_inset Quotes erd
20439 \begin_inset Quotes erd
20443 \begin_inset Quotes erd
20446 >Environment Label</labeltag>First paragraph.</itemtag>
20449 \begin_layout LyX-Code
20450 <itemtag>Second paragraph.</itemtag>
20453 \begin_layout LyX-Code
20457 \begin_layout Standard
20458 Note that the label is output only for the first paragraph, as it should
20459 be for a theorem, for example.
20463 \begin_layout Standard
20464 For a list, we have one of these forms:
20467 \begin_layout LyX-Code
20469 \begin_inset Quotes erd
20473 \begin_inset Quotes erd
20479 \begin_layout LyX-Code
20481 \begin_inset Quotes erd
20485 \begin_inset Quotes erd
20489 \begin_inset Quotes erd
20493 \begin_inset Quotes erd
20496 >List Label</labeltag>First item.</itemtag>
20499 \begin_layout LyX-Code
20501 \begin_inset Quotes erd
20505 \begin_inset Quotes erd
20509 \begin_inset Quotes erd
20513 \begin_inset Quotes erd
20516 >List Label</labeltag>Second item.</itemtag>
20519 \begin_layout LyX-Code
20523 \begin_layout LyX-Code
20527 \begin_layout LyX-Code
20529 \begin_inset Quotes erd
20533 \begin_inset Quotes erd
20539 \begin_layout LyX-Code
20541 \begin_inset Quotes erd
20545 \begin_inset Quotes erd
20548 >List Label</labeltag><itemtag attr=
20549 \begin_inset Quotes erd
20553 \begin_inset Quotes erd
20556 >First item.</itemtag>
20559 \begin_layout LyX-Code
20561 \begin_inset Quotes erd
20565 \begin_inset Quotes erd
20568 >List Label</labeltag><itemtag attr=
20569 \begin_inset Quotes erd
20573 \begin_inset Quotes erd
20576 >Second item.</itemtag>
20579 \begin_layout LyX-Code
20583 \begin_layout Standard
20584 Note the different orders of
20585 \begin_inset Flex Code
20588 \begin_layout Plain Layout
20595 \begin_inset Flex Code
20598 \begin_layout Plain Layout
20605 Which order we get depends upon the setting of
20606 \begin_inset Flex Code
20609 \begin_layout Plain Layout
20616 \begin_inset Flex Code
20619 \begin_layout Plain Layout
20625 is false (the default), you get the first of these, with the label within
20626 the item; if true, you get the second, with the label outside the item.
20629 \begin_layout Standard
20630 The specific tags and attributes output for each paragraph type can be controlle
20631 d by means of the layout tags we are about to describe.
20632 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20633 so you often may not need to do very much to get good XHTML output.
20634 Think of the available tags as there so you can tweak things to your liking.
20637 \begin_layout Description
20638 \begin_inset Flex Code
20641 \begin_layout Plain Layout
20648 \begin_inset Flex Code
20651 \begin_layout Plain Layout
20657 ] Specifies attribute information to be output with the main tag.
20659 \begin_inset Quotes eld
20663 \begin_inset Flex Code
20666 \begin_layout Plain Layout
20673 \begin_inset Quotes erd
20677 By default, LyX will output
20678 \begin_inset Quotes eld
20682 \begin_inset Flex Code
20685 \begin_layout Plain Layout
20692 \begin_inset Quotes erd
20696 \begin_inset Flex Code
20699 \begin_layout Plain Layout
20705 is the LyX name of the layout, made lowercase, for example: chapter.
20710 contain any style information.
20712 \begin_inset Flex Code
20715 \begin_layout Plain Layout
20724 \begin_layout Description
20725 \begin_inset Flex Code
20728 \begin_layout Plain Layout
20735 \begin_inset Flex Code
20738 \begin_layout Plain Layout
20748 ] Whether to output the default CSS information LyX generates for this layout,
20749 even if additional information is explicitly provided via
20750 \begin_inset Flex Code
20753 \begin_layout Plain Layout
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20770 allows you to alter or augment the generated CSS, rather than to override
20773 \begin_inset Flex Code
20776 \begin_layout Plain Layout
20785 \begin_layout Description
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20796 \begin_inset Flex Code
20799 \begin_layout Plain Layout
20805 ] The tag to be used for individual paragraphs of environments, replacing
20807 \begin_inset Flex Code
20810 \begin_layout Plain Layout
20816 in the examples above.
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20830 \begin_layout Description
20831 \begin_inset Flex Code
20834 \begin_layout Plain Layout
20841 \begin_inset Flex Code
20844 \begin_layout Plain Layout
20850 ] Attributes for the item tag.
20852 \begin_inset Quotes eld
20856 \begin_inset Flex Code
20859 \begin_layout Plain Layout
20860 class=`layoutname_item'
20866 \begin_inset Quotes erd
20874 contain any style information.
20876 \begin_inset Flex Code
20879 \begin_layout Plain Layout
20888 \begin_layout Description
20889 \begin_inset Flex Code
20892 \begin_layout Plain Layout
20899 \begin_inset Flex Code
20902 \begin_layout Plain Layout
20908 ] The tag to be used for paragraph and item labels, replacing
20909 \begin_inset Flex Code
20912 \begin_layout Plain Layout
20918 in the examples above.
20920 \begin_inset Flex Code
20923 \begin_layout Plain Layout
20930 \begin_inset Flex Code
20933 \begin_layout Plain Layout
20940 \begin_inset Flex Code
20943 \begin_layout Plain Layout
20950 \begin_inset Flex Code
20953 \begin_layout Plain Layout
20954 Centered_Top_Environment
20959 , in which case it defaults to
20960 \begin_inset Flex Code
20963 \begin_layout Plain Layout
20972 \begin_layout Description
20973 \begin_inset Flex Code
20976 \begin_layout Plain Layout
20983 \begin_inset Flex Code
20986 \begin_layout Plain Layout
20992 ] Attributes for the label tag.
20994 \begin_inset Quotes eld
20998 \begin_inset Flex Code
21001 \begin_layout Plain Layout
21002 class=`layoutname_label'
21008 \begin_inset Quotes erd
21016 contain any style information.
21018 \begin_inset Flex Code
21021 \begin_layout Plain Layout
21030 \begin_layout Description
21031 \begin_inset Flex Code
21034 \begin_layout Plain Layout
21041 \begin_inset Flex Code
21044 \begin_layout Plain Layout
21054 ] Meaningful only for list-like environments, this tag controls whether
21055 the label tag is output before or inside the item tag.
21056 This is used, for example, in the description environment, where we want
21058 \begin_inset Flex Code
21061 \begin_layout Plain Layout
21062 <dt>\SpecialChar \ldots{}
21063 </dt><dd>\SpecialChar \ldots{}
21071 \begin_inset Flex Code
21074 \begin_layout Plain Layout
21080 : The label tag is output inside the item tag.
21083 \begin_layout Description
21084 \begin_inset Flex Code
21087 \begin_layout Plain Layout
21093 Information to be output in the
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21103 section when this style is used.
21104 This might, for example, be used to include a
21105 \begin_inset Flex Code
21108 \begin_layout Plain Layout
21115 \begin_inset Flex Code
21118 \begin_layout Plain Layout
21127 \begin_layout Description
21128 \begin_inset Flex Code
21131 \begin_layout Plain Layout
21137 CSS style information to be included when this style is used.
21138 Note that this will automatically be wrapped in a layout-generated
21139 \begin_inset Flex Code
21142 \begin_layout Plain Layout
21148 block, so only the CSS itself need be included.
21151 \begin_layout Description
21152 \begin_inset Flex Code
21155 \begin_layout Plain Layout
21162 \begin_inset Flex Code
21165 \begin_layout Plain Layout
21171 ] The tag to be used for the main label, replacing
21172 \begin_inset Flex Code
21175 \begin_layout Plain Layout
21181 in the examples above.
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21195 \begin_layout Description
21196 \begin_inset Flex Code
21199 \begin_layout Plain Layout
21206 \begin_inset Flex Code
21209 \begin_layout Plain Layout
21219 ] Marks this style as the one to be used to generate the
21220 \begin_inset Flex Code
21223 \begin_layout Plain Layout
21229 tag for the XHTML file.
21230 By default, it is false.
21232 \begin_inset Flex Code
21235 \begin_layout Plain Layout
21241 file sets it to true for the
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21255 \begin_layout Subsection
21259 \begin_layout Standard
21260 The XHTML output of insets can also be controlled by information in layout
21265 \begin_layout Plain Layout
21266 At present, this is true only for
21267 \begin_inset Quotes eld
21271 \begin_inset Quotes erd
21274 insets (insets you can type into) and is not true for
21275 \begin_inset Quotes eld
21279 \begin_inset Quotes erd
21282 insets (insets that are associated with dialog boxes).
21287 Here, too, LyX tries to provide sensible defaults, and it constructs default
21289 But everything can be customized.
21292 \begin_layout Standard
21293 The XHTML LyX outputs for an inset has the following form:
21296 \begin_layout LyX-Code
21298 \begin_inset Quotes erd
21302 \begin_inset Quotes erd
21308 \begin_layout LyX-Code
21309 <labeltag>Label</labeltag>
21312 \begin_layout LyX-Code
21314 \begin_inset Quotes erd
21318 \begin_inset Quotes erd
21321 >Contents of the inset.</innertag>
21324 \begin_layout LyX-Code
21328 \begin_layout Standard
21329 If the inset permits multiple paragraphs---that is, if
21330 \begin_inset Flex Code
21333 \begin_layout Plain Layout
21339 is true---then the contents of the inset will itself be output as paragraphs
21340 formatted according to the styles used for those paragraphs (standard,
21341 quote, and the like).
21342 The label tag is of course omitted if the paragraph does not have a label
21343 and, at present, is always
21344 \begin_inset Flex Code
21347 \begin_layout Plain Layout
21354 The inner tag is optional and, by default, does not appear.
21357 \begin_layout Standard
21358 The specific tags and attributes output for each inset can be controlled
21359 by means of the following layout tags.
21362 \begin_layout Description
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21373 \begin_inset Flex Code
21376 \begin_layout Plain Layout
21382 ] Specifies attribute information to be output with the main tag.
21384 \begin_inset Quotes eld
21388 \begin_inset Flex Code
21391 \begin_layout Plain Layout
21392 class=`myinset' onclick=`\SpecialChar \ldots{}
21399 \begin_inset Quotes erd
21403 By default, LyX will output
21404 \begin_inset Quotes eld
21408 \begin_inset Flex Code
21411 \begin_layout Plain Layout
21418 \begin_inset Quotes erd
21422 \begin_inset Flex Code
21425 \begin_layout Plain Layout
21431 is the LyX name of the inset, made lowercase and with non-alphanumeric
21432 characters converted to underscores, for example: footnote.
21435 \begin_layout Description
21436 \begin_inset Flex Code
21439 \begin_layout Plain Layout
21446 \begin_inset Flex Code
21449 \begin_layout Plain Layout
21459 ] Whether to output the default CSS information LyX generates for this layout,
21460 even if additional information is explicitly provided via
21461 \begin_inset Flex Code
21464 \begin_layout Plain Layout
21472 \begin_inset Flex Code
21475 \begin_layout Plain Layout
21481 allows you to alter or augment the generated CSS, rather than to override
21486 \begin_layout Description
21487 \begin_inset Flex Code
21490 \begin_layout Plain Layout
21497 \begin_inset Flex Code
21500 \begin_layout Plain Layout
21506 ] Attributes for the inner tag.
21508 \begin_inset Quotes eld
21512 \begin_inset Flex Code
21515 \begin_layout Plain Layout
21516 class=`insetname_inner'
21522 \begin_inset Quotes erd
21528 \begin_layout Description
21529 \begin_inset Flex Code
21532 \begin_layout Plain Layout
21539 \begin_inset Flex Code
21542 \begin_layout Plain Layout
21548 ] The inner tag, replacing
21549 \begin_inset Flex Code
21552 \begin_layout Plain Layout
21558 in the examples above.
21559 By default, there is none.
21562 \begin_layout Description
21563 \begin_inset Flex Code
21566 \begin_layout Plain Layout
21573 \begin_inset Flex Code
21576 \begin_layout Plain Layout
21584 ] Whether this inset represents a standalone block of text (such as a footnote)
21585 or instead represents material that is included in the surrounding text
21586 (such as a branch).
21590 \begin_layout Description
21591 \begin_inset Flex Code
21594 \begin_layout Plain Layout
21601 \begin_inset Flex Code
21604 \begin_layout Plain Layout
21610 ] A label for this inset, possibly including a reference to a counter.
21611 For example, for footnote, it might be:
21612 \begin_inset Flex Code
21615 \begin_layout Plain Layout
21624 This is optional, and there is no default.
21627 \begin_layout Description
21628 \begin_inset Flex Code
21631 \begin_layout Plain Layout
21637 Information to be output in the
21638 \begin_inset Flex Code
21641 \begin_layout Plain Layout
21647 section when this style is used.
21648 This might, for example, be used to include a
21649 \begin_inset Flex Code
21652 \begin_layout Plain Layout
21659 \begin_inset Flex Code
21662 \begin_layout Plain Layout
21671 \begin_layout Description
21672 \begin_inset Flex Code
21675 \begin_layout Plain Layout
21681 CSS style information to be included when this style is used.
21682 Note that this will automatically be wrapped in a layout-generated
21683 \begin_inset Flex Code
21686 \begin_layout Plain Layout
21692 block, so only the CSS itself need be included.
21695 \begin_layout Description
21696 \begin_inset Flex Code
21699 \begin_layout Plain Layout
21706 \begin_inset Flex Code
21709 \begin_layout Plain Layout
21715 ] The tag to be used for the main label, replacing
21716 \begin_inset Flex Code
21719 \begin_layout Plain Layout
21725 in the examples above.
21726 The default depends upon the setting of
21727 \begin_inset Flex Code
21730 \begin_layout Plain Layout
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21746 is true, the default is
21747 \begin_inset Flex Code
21750 \begin_layout Plain Layout
21756 ; if it is false, the default is
21757 \begin_inset Flex Code
21760 \begin_layout Plain Layout
21769 \begin_layout Subsection
21773 \begin_layout Standard
21774 The XHTML output for floats too can be controlled by layout information.
21775 The output has the following form:
21778 \begin_layout LyX-Code
21780 \begin_inset Quotes erd
21784 \begin_inset Quotes erd
21790 \begin_layout LyX-Code
21791 Contents of the float.
21794 \begin_layout LyX-Code
21798 \begin_layout Standard
21799 The caption, if there is one, is a separate inset and will be output as
21801 Its appearance can be controlled via the InsetLayout for caption insets.
21805 \begin_layout Description
21806 \begin_inset Flex Code
21809 \begin_layout Plain Layout
21816 \begin_inset Flex Code
21819 \begin_layout Plain Layout
21825 ] Specifies attribute information to be output with the main tag.
21827 \begin_inset Quotes eld
21831 \begin_inset Flex Code
21834 \begin_layout Plain Layout
21835 class=`myfloat' onclick=`\SpecialChar \ldots{}
21842 \begin_inset Quotes erd
21846 By default, LyX will output
21847 \begin_inset Quotes eld
21851 \begin_inset Flex Code
21854 \begin_layout Plain Layout
21855 class=`float float-floattype'
21861 \begin_inset Quotes erd
21865 \begin_inset Flex Code
21868 \begin_layout Plain Layout
21874 is LyX's name for this type of float, as determined by the float declaration
21876 \begin_inset CommandInset ref
21878 reference "sub:Floats"
21882 ), though made lowercase and with non-alphanumeric characters converted
21883 to underscores, for example: float-table.
21886 \begin_layout Description
21887 \begin_inset Flex Code
21890 \begin_layout Plain Layout
21896 CSS style information to be included when this float is used.
21897 Note that this will automatically be wrapped in a layout-generated
21898 \begin_inset Flex Code
21901 \begin_layout Plain Layout
21907 block, so only the CSS itself need be included.
21910 \begin_layout Description
21911 \begin_inset Flex Code
21914 \begin_layout Plain Layout
21921 \begin_inset Flex Code
21924 \begin_layout Plain Layout
21930 ] The tag to be used for this float, replacing
21931 \begin_inset Quotes eld
21935 \begin_inset Flex Code
21938 \begin_layout Plain Layout
21945 \begin_inset Quotes erd
21948 in the example above.
21950 \begin_inset Flex Code
21953 \begin_layout Plain Layout
21959 and will rarely need changing.
21962 \begin_layout Subsection
21963 Bibliography formatting
21966 \begin_layout Standard
21967 The bibliography can be formatted using
21968 \begin_inset Flex Code
21971 \begin_layout Plain Layout
21979 \begin_inset CommandInset ref
21981 reference "sub:Citation-format-description"
21988 \begin_layout Subsection
21992 \begin_layout Standard
21993 We have several times mentioned that LyX will generate default CSS style
21994 rules for both insets and paragraph styles, based upon the other layout
21995 information that is provided.
21996 In this section, we shall say a word about which layout information LyX
22000 \begin_layout Standard
22001 At present, LyX auto-generates CSS only for font information, making use
22003 \begin_inset Flex Code
22006 \begin_layout Plain Layout
22013 \begin_inset Flex Code
22016 \begin_layout Plain Layout
22023 \begin_inset Flex Code
22026 \begin_layout Plain Layout
22033 \begin_inset Flex Code
22036 \begin_layout Plain Layout
22043 \begin_inset Flex Code
22046 \begin_layout Plain Layout
22054 \begin_inset CommandInset ref
22056 reference "sub:Font-description"
22060 .) The translation is mostly straightforward and obvious.
22062 \begin_inset Quotes eld
22066 \begin_inset Flex Code
22069 \begin_layout Plain Layout
22076 \begin_inset Quotes erd
22080 \begin_inset Quotes eld
22084 \begin_inset Flex Code
22087 \begin_layout Plain Layout
22088 font-family: sans-serif;
22094 \begin_inset Quotes erd
22098 The correspondence of LyX sizes and CSS sizes is a little less obvious
22099 but nonetheless intuitive.
22101 \begin_inset Flex Code
22104 \begin_layout Plain Layout
22111 \begin_inset Flex URL
22114 \begin_layout Plain Layout
22124 \begin_layout Chapter
22125 Including External Material
22128 \begin_layout Standard
22129 \begin_inset Box Shadowbox
22139 height_special "totalheight"
22142 \begin_layout Plain Layout
22143 WARNING: This portion of the documentation has not been updated for some
22145 We certainly hope that it is still accurate, but there are no guarantees.
22153 \begin_layout Standard
22154 The use of material from sources external to LyX is covered in detail in
22160 This part of the manual covers what needs to happen behind the scenes for
22161 new sorts of material to be included.
22164 \begin_layout Section
22168 \begin_layout Standard
22169 The external material feature is based on the concept of a
22174 A template is a specification of how LyX should interface with a certain
22176 As bundled, LyX comes with predefined templates for Xfig figures, various
22177 raster format images, chess diagrams, and LilyPond music notation.
22178 You can check the actual list by using the menu
22179 \begin_inset Flex MenuItem
22182 \begin_layout Plain Layout
22183 Insert\SpecialChar \menuseparator
22184 File\SpecialChar \menuseparator
22191 Furthermore, it is possible to roll your own template to support a specific
22193 Later we'll describe in more detail what is involved, and hopefully you
22194 will submit all the templates you create so we can include them in a later
22198 \begin_layout Standard
22199 Another basic idea of the external material feature is to distinguish between
22200 the original file that serves as a base for final material and the produced
22201 file that is included in your exported or printed document.
22202 For example, consider the case of a figure produced with
22203 \begin_inset Flex Code
22206 \begin_layout Plain Layout
22213 The Xfig application itself works on an original file with the
22214 \begin_inset Flex Code
22217 \begin_layout Plain Layout
22224 Within Xfig, you create and change your figure, and when you are done,
22226 \begin_inset Flex Code
22229 \begin_layout Plain Layout
22236 When you want to include the figure in your document, you invoke
22237 \begin_inset Flex Code
22240 \begin_layout Plain Layout
22246 in order to create a PostScript file that can readily be included in your
22249 \begin_inset Flex Code
22252 \begin_layout Plain Layout
22258 file is the original file, and the PostScript file is the produced file.
22261 \begin_layout Standard
22262 This distinction is important in order to allow updating of the material
22263 while you are in the process of writing the document.
22264 Furthermore, it provides us with the flexibility that is needed to support
22265 multiple export formats.
22266 For instance, in the case of a plain text file, it is not exactly an award-winn
22267 ing idea to include the figure as raw PostScript.
22268 Instead, you would either prefer to just include a reference to the figure
22269 or try to invoke some graphics to ASCII converter to make the final result
22270 look similar to the real graphics.
22271 The external material management allows you to do this, because it is parametri
22272 zed on the different export formats that LyX supports.
22275 \begin_layout Standard
22276 Besides supporting the production of different products according to the
22277 exported format, it supports tight integration with editing and viewing
22279 In the case of an Xfig figure, you are able to invoke Xfig on the original
22280 file with a single click from within the external material dialog in LyX,
22281 and also preview the produced PostScript file with Ghostview with another
22283 No more fiddling around with the command line and/or file browsers to locate
22284 and manipulate the original or produced files.
22285 In this way, you are finally able to take full advantage of the many different
22286 applications that are relevant to use when you write your documents, and
22287 ultimately be more productive.
22290 \begin_layout Section
22291 The external template configuration file
22294 \begin_layout Standard
22295 It is relatively easy to add custom external template definitions to LyX.
22296 However, be aware that doing this in an careless manner most probably
22300 introduce an easily exploitable security hole.
22301 So before you do this, please read the discussion about security in section
22303 \begin_inset CommandInset ref
22305 reference "sec:Security-discussion"
22312 \begin_layout Standard
22313 Having said that, we encourage you to submit any interesting templates that
22318 \begin_layout Standard
22319 The external templates are defined in the
22320 \begin_inset Flex Code
22323 \begin_layout Plain Layout
22324 LyXDir/lib/external_templates
22330 You can place your own version in
22331 \begin_inset Flex Code
22334 \begin_layout Plain Layout
22335 UserDir/external_templates
22343 \begin_layout Standard
22344 A typical template looks like this:
22347 \begin_layout LyX-Code
22351 \begin_layout LyX-Code
22352 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22355 \begin_layout LyX-Code
22359 \begin_layout LyX-Code
22363 \begin_layout LyX-Code
22367 \begin_layout LyX-Code
22371 \begin_layout LyX-Code
22375 \begin_layout LyX-Code
22376 AutomaticProduction true
22379 \begin_layout LyX-Code
22383 \begin_layout LyX-Code
22387 \begin_layout LyX-Code
22391 \begin_layout LyX-Code
22392 TransformCommand Rotate RotationLatexCommand
22395 \begin_layout LyX-Code
22396 TransformCommand Resize ResizeLatexCommand
22399 \begin_layout LyX-Code
22400 Product "$$RotateFront$$ResizeFront
22403 \begin_layout LyX-Code
22408 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22411 \begin_layout LyX-Code
22412 $$ResizeBack$$RotateBack"
22415 \begin_layout LyX-Code
22419 \begin_layout LyX-Code
22420 UpdateResult "$$AbsPath$$Basename.pstex_t"
22423 \begin_layout LyX-Code
22424 Requirement "graphicx"
22427 \begin_layout LyX-Code
22428 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22431 \begin_layout LyX-Code
22432 ReferencedFile latex "$$AbsPath$$Basename.eps"
22435 \begin_layout LyX-Code
22436 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22439 \begin_layout LyX-Code
22443 \begin_layout LyX-Code
22447 \begin_layout LyX-Code
22448 TransformCommand Rotate RotationLatexCommand
22451 \begin_layout LyX-Code
22452 TransformCommand Resize ResizeLatexCommand
22455 \begin_layout LyX-Code
22456 Product "$$RotateFront$$ResizeFront
22459 \begin_layout LyX-Code
22464 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22467 \begin_layout LyX-Code
22468 $$ResizeBack$$RotateBack"
22471 \begin_layout LyX-Code
22472 UpdateFormat pdftex
22475 \begin_layout LyX-Code
22476 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22479 \begin_layout LyX-Code
22480 Requirement "graphicx"
22483 \begin_layout LyX-Code
22484 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22487 \begin_layout LyX-Code
22488 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22491 \begin_layout LyX-Code
22495 \begin_layout LyX-Code
22499 \begin_layout LyX-Code
22500 Product "$$Contents(
22502 "$$AbsPath$$Basename.asc
22507 \begin_layout LyX-Code
22508 UpdateFormat asciixfig
22511 \begin_layout LyX-Code
22512 UpdateResult "$$AbsPath$$Basename.asc"
22515 \begin_layout LyX-Code
22519 \begin_layout LyX-Code
22523 \begin_layout LyX-Code
22524 Product "<graphic fileref=
22526 "$$AbsOrRelPathMaster$$Basename.eps
22531 \begin_layout LyX-Code
22535 \begin_layout LyX-Code
22539 \begin_layout LyX-Code
22540 UpdateResult "$$AbsPath$$Basename.eps"
22543 \begin_layout LyX-Code
22544 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22547 \begin_layout LyX-Code
22548 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22551 \begin_layout LyX-Code
22555 \begin_layout LyX-Code
22556 Product "[XFig: $$FName]"
22559 \begin_layout LyX-Code
22563 \begin_layout LyX-Code
22567 \begin_layout Standard
22568 As you can see, the template is enclosed in
22569 \begin_inset Flex Code
22572 \begin_layout Plain Layout
22578 \SpecialChar \ldots{}
22580 \begin_inset Flex Code
22583 \begin_layout Plain Layout
22590 It contains a header specifying some general settings and, for each supported
22591 primary document file format, a section
22592 \begin_inset Flex Code
22595 \begin_layout Plain Layout
22601 \SpecialChar \ldots{}
22603 \begin_inset Flex Code
22606 \begin_layout Plain Layout
22615 \begin_layout Subsection
22616 The template header
22619 \begin_layout Description
22620 \begin_inset Flex Code
22623 \begin_layout Plain Layout
22624 AutomaticProduction
22625 \begin_inset space ~
22633 Whether the file represented by the template must be generated by LyX.
22634 This command must occur exactly once.
22637 \begin_layout Description
22638 \begin_inset Flex Code
22641 \begin_layout Plain Layout
22643 \begin_inset space ~
22651 A glob pattern that is used in the file dialog to filter out the desired
22653 If there is more than one possible file extension (e.
22654 \begin_inset space \thinspace{}
22658 \begin_inset space \space{}
22662 \begin_inset Flex Code
22665 \begin_layout Plain Layout
22672 \begin_inset Flex Code
22675 \begin_layout Plain Layout
22681 ), use something like
22682 \begin_inset Flex Code
22685 \begin_layout Plain Layout
22692 This command must occur exactly once.
22695 \begin_layout Description
22696 \begin_inset Flex Code
22699 \begin_layout Plain Layout
22701 \begin_inset space ~
22709 The text that is displayed on the button.
22710 This command must occur exactly once.
22713 \begin_layout Description
22714 \begin_inset Flex Code
22717 \begin_layout Plain Layout
22719 \begin_inset space ~
22723 \begin_inset space ~
22731 The help text that is used in the External dialog.
22732 Provide enough information to explain to the user just what the template
22733 can provide him with.
22734 This command must occur exactly once.
22737 \begin_layout Description
22738 \begin_inset Flex Code
22741 \begin_layout Plain Layout
22743 \begin_inset space ~
22751 The file format of the original file.
22752 This must be the name of a format that is known to LyX (see section
22753 \begin_inset space ~
22757 \begin_inset CommandInset ref
22759 reference "sec:Formats"
22765 \begin_inset Quotes eld
22769 \begin_inset Flex Code
22772 \begin_layout Plain Layout
22779 \begin_inset Quotes erd
22782 if the template can handle original files of more than one format.
22783 LyX will attempt to interrogate the file itself in order to deduce its
22784 format in this case.
22785 This command must occur exactly once.
22788 \begin_layout Description
22789 \begin_inset Flex Code
22792 \begin_layout Plain Layout
22794 \begin_inset space ~
22802 A unique name for the template.
22803 It must not contain substitution macros (see below).
22806 \begin_layout Description
22807 \begin_inset Flex Code
22810 \begin_layout Plain Layout
22812 \begin_inset space ~
22815 Rotate|Resize|Clip|Extra
22820 This command specifies which transformations are supported by this template.
22821 It may occur zero or more times.
22822 This command enables the corresponding tabs in the external dialog.
22824 \begin_inset Flex Code
22827 \begin_layout Plain Layout
22833 command must have either a corresponding
22834 \begin_inset Flex Code
22837 \begin_layout Plain Layout
22844 \begin_inset Flex Code
22847 \begin_layout Plain Layout
22854 \begin_inset Flex Code
22857 \begin_layout Plain Layout
22864 Otherwise the transformation will not be supported by that format.
22867 \begin_layout Subsection
22871 \begin_layout Description
22872 \begin_inset Flex Code
22875 \begin_layout Plain Layout
22877 \begin_inset space ~
22880 LaTeX|PDFLaTeX|PlainText|DocBook
22885 The primary document file format that this format definition is for.
22886 Not every template has a sensible representation in all document file formats.
22887 Please define nevertheless a
22888 \begin_inset Flex Code
22891 \begin_layout Plain Layout
22897 section for all templates.
22898 Use a dummy text when no representation is available.
22899 Then you can at least see a reference to the external material in the exported
22903 \begin_layout Description
22904 \begin_inset Flex Code
22907 \begin_layout Plain Layout
22909 \begin_inset space ~
22913 \begin_inset space ~
22921 This command defines an additional macro
22922 \begin_inset Flex Code
22925 \begin_layout Plain Layout
22931 for substitution in
22932 \begin_inset Flex Code
22935 \begin_layout Plain Layout
22943 \begin_inset Flex Code
22946 \begin_layout Plain Layout
22952 itself may contain substitution macros.
22953 The advantage over using
22954 \begin_inset Flex Code
22957 \begin_layout Plain Layout
22964 \begin_inset Flex Code
22967 \begin_layout Plain Layout
22973 is that the substituted value of
22974 \begin_inset Flex Code
22977 \begin_layout Plain Layout
22983 is sanitized so that it is a valid optional argument in the document format.
22984 This command may occur zero or more times.
22987 \begin_layout Description
22988 \begin_inset Flex Code
22991 \begin_layout Plain Layout
22993 \begin_inset space ~
23001 The text that is inserted in the exported document.
23002 This is actually the most important command and can be quite complex.
23003 This command must occur exactly once.
23006 \begin_layout Description
23007 \begin_inset Flex Code
23010 \begin_layout Plain Layout
23012 \begin_inset space ~
23020 This command specifies a preamble snippet that will be included in the
23022 It has to be defined using
23023 \begin_inset Flex Code
23026 \begin_layout Plain Layout
23032 \SpecialChar \ldots{}
23034 \begin_inset Flex Code
23037 \begin_layout Plain Layout
23044 This command may occur zero or more times.
23047 \begin_layout Description
23048 \begin_inset Flex Code
23051 \begin_layout Plain Layout
23053 \begin_inset space ~
23057 \begin_inset space ~
23065 This command denotes files that are created by the conversion process and
23066 are needed for a particular export format.
23067 If the filename is relative, it is interpreted relative to the master document.
23068 This command may be given zero or more times.
23071 \begin_layout Description
23072 \begin_inset Flex Code
23075 \begin_layout Plain Layout
23077 \begin_inset space ~
23085 The name of a required LaTeX package.
23086 The package is included via
23087 \begin_inset Flex Code
23090 \begin_layout Plain Layout
23098 in the LaTeX preamble.
23099 This command may occur zero or more times.
23102 \begin_layout Description
23103 \begin_inset Flex Code
23106 \begin_layout Plain Layout
23108 \begin_inset space ~
23112 \begin_inset space ~
23115 RotationLatexCommand
23120 This command specifies that the built in LaTeX command should be used for
23122 This command may occur once or not at all.
23125 \begin_layout Description
23126 \begin_inset Flex Code
23129 \begin_layout Plain Layout
23131 \begin_inset space ~
23135 \begin_inset space ~
23143 This command specifies that the built in LaTeX command should be used for
23145 This command may occur once or not at all.
23148 \begin_layout Description
23149 \begin_inset Flex Code
23152 \begin_layout Plain Layout
23154 \begin_inset space ~
23158 \begin_inset space ~
23161 RotationLatexOption
23166 This command specifies that rotation is done via an optional argument.
23167 This command may occur once or not at all.
23170 \begin_layout Description
23171 \begin_inset Flex Code
23174 \begin_layout Plain Layout
23176 \begin_inset space ~
23180 \begin_inset space ~
23188 This command specifies that resizing is done via an optional argument.
23189 This command may occur once or not at all.
23192 \begin_layout Description
23193 \begin_inset Flex Code
23196 \begin_layout Plain Layout
23198 \begin_inset space ~
23202 \begin_inset space ~
23210 This command specifies that clipping is done via an optional argument.
23211 This command may occur once or not at all.
23214 \begin_layout Description
23215 \begin_inset Flex Code
23218 \begin_layout Plain Layout
23220 \begin_inset space ~
23224 \begin_inset space ~
23232 This command specifies that an extra optional argument is used.
23233 This command may occur once or not at all.
23236 \begin_layout Description
23237 \begin_inset Flex Code
23240 \begin_layout Plain Layout
23242 \begin_inset space ~
23250 The file format of the converted file.
23251 This must be the name of a format that is known to LyX (see the
23252 \begin_inset Flex MenuItem
23255 \begin_layout Plain Layout
23260 ools\SpecialChar \menuseparator
23265 references\SpecialChar \menuseparator
23266 File Handling\SpecialChar \menuseparator
23273 This command must occur exactly once.
23276 \begin_layout Description
23277 \begin_inset Flex Code
23280 \begin_layout Plain Layout
23282 \begin_inset space ~
23290 The file name of the converted file.
23291 The file name must be absolute.
23292 This command must occur exactly once.
23295 \begin_layout Subsection
23296 Preamble definitions
23299 \begin_layout Standard
23300 The external template configuration file may contain additional preamble
23301 definitions enclosed by
23302 \begin_inset Flex Code
23305 \begin_layout Plain Layout
23311 \SpecialChar \ldots{}
23313 \begin_inset Flex Code
23316 \begin_layout Plain Layout
23323 They can be used by the templates in the
23324 \begin_inset Flex Code
23327 \begin_layout Plain Layout
23336 \begin_layout Section
23337 The substitution mechanism
23340 \begin_layout Standard
23341 When the external material facility invokes an external program, it is done
23342 on the basis of a command defined in the template configuration file.
23343 These commands can contain various macros that are expanded before execution.
23344 Execution always take place in the directory of the containing document.
23347 \begin_layout Standard
23348 Also, whenever external material is to be displayed, the name will be produced
23349 by the substitution mechanism, and most other commands in the template
23350 definition support substitution as well.
23353 \begin_layout Standard
23354 The available macros are the following:
23357 \begin_layout Description
23358 \begin_inset Flex Code
23361 \begin_layout Plain Layout
23362 $$AbsOrRelPathMaster
23367 The file path, absolute or relative to the master LyX document.
23370 \begin_layout Description
23371 \begin_inset Flex Code
23374 \begin_layout Plain Layout
23375 $$AbsOrRelPathParent
23380 The file path, absolute or relative to the LyX document.
23383 \begin_layout Description
23384 \begin_inset Flex Code
23387 \begin_layout Plain Layout
23393 The absolute file path.
23396 \begin_layout Description
23397 \begin_inset Flex Code
23400 \begin_layout Plain Layout
23406 The filename without path and without the extension.
23409 \begin_layout Description
23410 \begin_inset Flex Code
23413 \begin_layout Plain Layout
23415 \begin_inset Quotes eld
23419 \begin_inset Quotes erd
23427 This macro will expand to the contents of the file with the name
23428 \begin_inset Flex Code
23431 \begin_layout Plain Layout
23440 \begin_layout Description
23441 \begin_inset Flex Code
23444 \begin_layout Plain Layout
23450 The file extension (including the dot).
23453 \begin_layout Description
23454 \begin_inset Flex Code
23457 \begin_layout Plain Layout
23463 The filename of the file specified in the external material dialog.
23464 This is either an absolute name, or it is relative to the LyX document.
23467 \begin_layout Description
23468 \begin_inset Flex Code
23471 \begin_layout Plain Layout
23478 \begin_inset Flex Code
23481 \begin_layout Plain Layout
23487 (absolute name or relative to the LyX document).
23490 \begin_layout Description
23491 \begin_inset Flex Code
23494 \begin_layout Plain Layout
23500 The file path, relative to the master LyX document.
23503 \begin_layout Description
23504 \begin_inset Flex Code
23507 \begin_layout Plain Layout
23513 The file path, relative to the LyX document.
23516 \begin_layout Description
23517 \begin_inset Flex Code
23520 \begin_layout Plain Layout
23526 This macro will expand to the absolute path of the system directory.
23527 This is typically used to point to the various helper scripts that are
23531 \begin_layout Description
23532 \begin_inset Flex Code
23535 \begin_layout Plain Layout
23541 A name and full path to a temporary file which will be automatically deleted
23542 whenever the containing document is closed, or the external material insertion
23546 \begin_layout Standard
23547 All path macros contain a trailing directory separator, so you can construct
23549 \begin_inset space \thinspace{}
23553 \begin_inset space \space{}
23556 the absolute filename with
23557 \begin_inset Flex Code
23560 \begin_layout Plain Layout
23561 $$AbsPath$$Basename$$Extension
23569 \begin_layout Standard
23570 The macros above are substituted in all commands unless otherwise noted.
23572 \begin_inset Flex Code
23575 \begin_layout Plain Layout
23581 supports additionally the following substitutions if they are enabled by
23583 \begin_inset Flex Code
23586 \begin_layout Plain Layout
23593 \begin_inset Flex Code
23596 \begin_layout Plain Layout
23605 \begin_layout Description
23606 \begin_inset Flex Code
23609 \begin_layout Plain Layout
23615 The front part of the resize command.
23618 \begin_layout Description
23619 \begin_inset Flex Code
23622 \begin_layout Plain Layout
23628 The back part of the resize command.
23631 \begin_layout Description
23632 \begin_inset Flex Code
23635 \begin_layout Plain Layout
23641 The front part of the rotation command.
23644 \begin_layout Description
23645 \begin_inset Flex Code
23648 \begin_layout Plain Layout
23654 The back part of the rotation command.
23657 \begin_layout Standard
23658 The value string of the
23659 \begin_inset Flex Code
23662 \begin_layout Plain Layout
23668 command supports additionally the following substitutions if they are enabled
23670 \begin_inset Flex Code
23673 \begin_layout Plain Layout
23680 \begin_inset Flex Code
23683 \begin_layout Plain Layout
23692 \begin_layout Description
23693 \begin_inset Flex Code
23696 \begin_layout Plain Layout
23705 \begin_layout Description
23706 \begin_inset Flex Code
23709 \begin_layout Plain Layout
23718 \begin_layout Description
23719 \begin_inset Flex Code
23722 \begin_layout Plain Layout
23731 \begin_layout Description
23732 \begin_inset Flex Code
23735 \begin_layout Plain Layout
23741 The rotation option.
23744 \begin_layout Standard
23745 You may ask why there are so many path macros.
23746 There are mainly two reasons:
23749 \begin_layout Enumerate
23750 Relative and absolute file names should remain relative or absolute, respectivel
23752 Users may have reasons to prefer either form.
23753 Relative names are useful for portable documents that should work on different
23754 machines, for example.
23755 Absolute names may be required by some programs.
23758 \begin_layout Enumerate
23759 LaTeX treats relative file names differently than LyX and other programs
23760 in nested included files.
23761 For LyX, a relative file name is always relative to the document that contains
23763 For LaTeX, it is always relative to the master document.
23764 These two definitions are identical if you have only one document, but
23765 differ if you have a master document that includes part documents.
23766 That means that relative filenames must be transformed when presented to
23768 Fortunately LyX does this automatically for you if you choose the right
23772 \begin_layout Standard
23773 So which path macro should be used in new template definitions? The rule
23777 \begin_layout Itemize
23779 \begin_inset Flex Code
23782 \begin_layout Plain Layout
23788 if an absolute path is required.
23791 \begin_layout Itemize
23793 \begin_inset Flex Code
23796 \begin_layout Plain Layout
23797 $$AbsOrRelPathMaster
23802 if the substituted string is some kind of LaTeX input.
23805 \begin_layout Itemize
23807 \begin_inset Flex Code
23810 \begin_layout Plain Layout
23811 $$AbsOrRelPathParent
23816 in order to preserve the user's choice.
23819 \begin_layout Standard
23820 There are special cases where this rule does not work and e.
23821 \begin_inset space \thinspace{}
23825 \begin_inset space \space{}
23828 relative names are needed, but normally it will work just fine.
23829 One example for such a case is the command
23830 \begin_inset Flex Code
23833 \begin_layout Plain Layout
23834 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23839 in the XFig template above: We can't use the absolute name because the
23841 \begin_inset Flex Code
23844 \begin_layout Plain Layout
23850 files needs the relative name in order to rewrite the file content.
23853 \begin_layout Section
23854 Security discussion
23855 \begin_inset CommandInset label
23857 name "sec:Security-discussion"
23864 \begin_layout Standard
23865 The external material feature interfaces with a lot of external programs
23866 and does so automatically, so we have to consider the security implications
23868 In particular, since you have the option of including your own filenames
23869 and/or parameter strings and those are expanded into a command, it seems
23870 that it would be possible to create a malicious document which executes
23871 arbitrary commands when a user views or prints the document.
23872 This is something we definitely want to avoid.
23875 \begin_layout Standard
23876 However, since the external program commands are specified in the template
23877 configuration file only, there are no security issues if LyX is properly
23878 configured with safe templates only.
23879 This is so because the external programs are invoked with the
23880 \begin_inset Flex Code
23883 \begin_layout Plain Layout
23889 -system call rather than the
23890 \begin_inset Flex Code
23893 \begin_layout Plain Layout
23899 system-call, so it's not possible to execute arbitrary commands from the
23900 filename or parameter section via the shell.
23903 \begin_layout Standard
23904 This also implies that you are restricted in what command strings you can
23905 use in the external material templates.
23906 In particular, pipes and redirection are not readily available.
23907 This has to be so if LyX should remain safe.
23908 If you want to use some of the shell features, you should write a safe
23909 script to do this in a controlled manner, and then invoke the script from
23910 the command string.
23914 \begin_layout Standard
23915 It is possible to design a template that interacts directly with the shell,
23916 but since this would allow a malicious user to execute arbitrary commands
23917 by writing clever filenames and/or parameters, we generally recommend that
23918 you only use safe scripts that work with the
23919 \begin_inset Flex Code
23922 \begin_layout Plain Layout
23928 system call in a controlled manner.
23929 Of course, for use in a controlled environment, it can be tempting to just
23930 fall back to use ordinary shell scripts.
23931 If you do so, be aware that you
23935 provide an easily exploitable security hole in your system.
23936 Of course it stands to reason that such unsafe templates will never be
23937 included in the standard LyX distribution, although we do encourage people
23938 to submit new templates in the open source tradition.
23939 But LyX as shipped from the official distribution channels will never have
23943 \begin_layout Standard
23944 Including external material provides a lot of power, and you have to be
23945 careful not to introduce security hazards with this power.
23946 A subtle error in a single line in an innocent looking script can open
23947 the door to huge security problems.
23948 So if you do not fully understand the issues, we recommend that you consult
23949 a knowledgeable security professional or the LyX development team if you
23950 have any questions about whether a given template is safe or not.
23951 And do this before you use it in an uncontrolled environment.
23954 \begin_layout Chapter
23956 List of functions to be used in layouts
23957 \begin_inset CommandInset label
23959 name "chap:List-of-functions"
23966 \begin_layout Standard
23968 \begin_inset Tabular
23969 <lyxtabular version="3" rows="10" columns="6">
23970 <features rotate="0" tabularvalignment="middle">
23971 <column alignment="left" valignment="top" width="14col%">
23972 <column alignment="left" valignment="top" width="14col%">
23973 <column alignment="left" valignment="top" width="14col%">
23974 <column alignment="left" valignment="top" width="14col%">
23975 <column alignment="left" valignment="top" width="14col%">
23976 <column alignment="left" valignment="top" width="14col%">
23978 <cell alignment="left" valignment="top" usebox="none">
23981 \begin_layout Plain Layout
23987 <cell alignment="left" valignment="top" usebox="none">
23990 \begin_layout Plain Layout
23996 <cell alignment="left" valignment="top" usebox="none">
23999 \begin_layout Plain Layout
24005 <cell alignment="left" valignment="top" usebox="none">
24008 \begin_layout Plain Layout
24014 <cell alignment="left" valignment="top" usebox="none">
24017 \begin_layout Plain Layout
24023 <cell alignment="left" valignment="top" usebox="none">
24026 \begin_layout Plain Layout
24034 <cell alignment="left" valignment="top" usebox="none">
24037 \begin_layout Plain Layout
24043 <cell alignment="left" valignment="top" usebox="none">
24046 \begin_layout Plain Layout
24052 <cell alignment="left" valignment="top" usebox="none">
24055 \begin_layout Plain Layout
24061 <cell alignment="left" valignment="top" usebox="none">
24064 \begin_layout Plain Layout
24070 <cell alignment="left" valignment="top" usebox="none">
24073 \begin_layout Plain Layout
24079 <cell alignment="left" valignment="top" usebox="none">
24082 \begin_layout Plain Layout
24090 <cell alignment="left" valignment="top" usebox="none">
24093 \begin_layout Plain Layout
24099 <cell alignment="left" valignment="top" usebox="none">
24102 \begin_layout Plain Layout
24108 <cell alignment="left" valignment="top" usebox="none">
24111 \begin_layout Plain Layout
24117 <cell alignment="left" valignment="top" usebox="none">
24120 \begin_layout Plain Layout
24126 <cell alignment="left" valignment="top" usebox="none">
24129 \begin_layout Plain Layout
24135 <cell alignment="left" valignment="top" usebox="none">
24138 \begin_layout Plain Layout
24146 <cell alignment="left" valignment="top" usebox="none">
24149 \begin_layout Plain Layout
24155 <cell alignment="left" valignment="top" usebox="none">
24158 \begin_layout Plain Layout
24164 <cell alignment="left" valignment="top" usebox="none">
24167 \begin_layout Plain Layout
24173 <cell alignment="left" valignment="top" usebox="none">
24176 \begin_layout Plain Layout
24182 <cell alignment="left" valignment="top" usebox="none">
24185 \begin_layout Plain Layout
24191 <cell alignment="left" valignment="top" usebox="none">
24194 \begin_layout Plain Layout
24202 <cell alignment="left" valignment="top" usebox="none">
24205 \begin_layout Plain Layout
24211 <cell alignment="left" valignment="top" usebox="none">
24214 \begin_layout Plain Layout
24220 <cell alignment="left" valignment="top" usebox="none">
24223 \begin_layout Plain Layout
24229 <cell alignment="left" valignment="top" usebox="none">
24232 \begin_layout Plain Layout
24238 <cell alignment="left" valignment="top" usebox="none">
24241 \begin_layout Plain Layout
24247 <cell alignment="left" valignment="top" usebox="none">
24250 \begin_layout Plain Layout
24258 <cell alignment="left" valignment="top" usebox="none">
24261 \begin_layout Plain Layout
24267 <cell alignment="left" valignment="top" usebox="none">
24270 \begin_layout Plain Layout
24276 <cell alignment="left" valignment="top" usebox="none">
24279 \begin_layout Plain Layout
24285 <cell alignment="left" valignment="top" usebox="none">
24288 \begin_layout Plain Layout
24294 <cell alignment="left" valignment="top" usebox="none">
24297 \begin_layout Plain Layout
24303 <cell alignment="left" valignment="top" usebox="none">
24306 \begin_layout Plain Layout
24314 <cell alignment="left" valignment="top" usebox="none">
24317 \begin_layout Plain Layout
24323 <cell alignment="left" valignment="top" usebox="none">
24326 \begin_layout Plain Layout
24332 <cell alignment="left" valignment="top" usebox="none">
24335 \begin_layout Plain Layout
24341 <cell alignment="left" valignment="top" usebox="none">
24344 \begin_layout Plain Layout
24350 <cell alignment="left" valignment="top" usebox="none">
24353 \begin_layout Plain Layout
24359 <cell alignment="left" valignment="top" usebox="none">
24362 \begin_layout Plain Layout
24370 <cell alignment="left" valignment="top" usebox="none">
24373 \begin_layout Plain Layout
24379 <cell alignment="left" valignment="top" usebox="none">
24382 \begin_layout Plain Layout
24388 <cell alignment="left" valignment="top" usebox="none">
24391 \begin_layout Plain Layout
24397 <cell alignment="left" valignment="top" usebox="none">
24400 \begin_layout Plain Layout
24406 <cell alignment="left" valignment="top" usebox="none">
24409 \begin_layout Plain Layout
24415 <cell alignment="left" valignment="top" usebox="none">
24418 \begin_layout Plain Layout
24426 <cell alignment="left" valignment="top" usebox="none">
24429 \begin_layout Plain Layout
24435 <cell alignment="left" valignment="top" usebox="none">
24438 \begin_layout Plain Layout
24444 <cell alignment="left" valignment="top" usebox="none">
24447 \begin_layout Plain Layout
24453 <cell alignment="left" valignment="top" usebox="none">
24456 \begin_layout Plain Layout
24462 <cell alignment="left" valignment="top" usebox="none">
24465 \begin_layout Plain Layout
24471 <cell alignment="left" valignment="top" usebox="none">
24474 \begin_layout Plain Layout
24482 <cell alignment="left" valignment="top" usebox="none">
24485 \begin_layout Plain Layout
24491 <cell alignment="left" valignment="top" usebox="none">
24494 \begin_layout Plain Layout
24500 <cell alignment="left" valignment="top" usebox="none">
24503 \begin_layout Plain Layout
24509 <cell alignment="left" valignment="top" usebox="none">
24512 \begin_layout Plain Layout
24518 <cell alignment="left" valignment="top" usebox="none">
24521 \begin_layout Plain Layout
24527 <cell alignment="left" valignment="top" usebox="none">
24530 \begin_layout Plain Layout
24544 \begin_layout Standard
24546 \begin_inset Tabular
24547 <lyxtabular version="3" rows="10" columns="6">
24548 <features rotate="0" tabularvalignment="middle">
24549 <column alignment="left" valignment="top" width="14col%">
24550 <column alignment="left" valignment="top" width="14col%">
24551 <column alignment="left" valignment="top" width="14col%">
24552 <column alignment="left" valignment="top" width="14col%">
24553 <column alignment="left" valignment="top" width="14col%">
24554 <column alignment="left" valignment="top" width="14col%">
24556 <cell alignment="left" valignment="top" usebox="none">
24559 \begin_layout Plain Layout
24565 <cell alignment="left" valignment="top" usebox="none">
24568 \begin_layout Plain Layout
24574 <cell alignment="left" valignment="top" usebox="none">
24577 \begin_layout Plain Layout
24583 <cell alignment="left" valignment="top" usebox="none">
24586 \begin_layout Plain Layout
24592 <cell alignment="left" valignment="top" usebox="none">
24595 \begin_layout Plain Layout
24601 <cell alignment="left" valignment="top" usebox="none">
24604 \begin_layout Plain Layout
24612 <cell alignment="left" valignment="top" usebox="none">
24615 \begin_layout Plain Layout
24621 <cell alignment="left" valignment="top" usebox="none">
24624 \begin_layout Plain Layout
24630 <cell alignment="left" valignment="top" usebox="none">
24633 \begin_layout Plain Layout
24639 <cell alignment="left" valignment="top" usebox="none">
24642 \begin_layout Plain Layout
24648 <cell alignment="left" valignment="top" usebox="none">
24651 \begin_layout Plain Layout
24657 <cell alignment="left" valignment="top" usebox="none">
24660 \begin_layout Plain Layout
24668 <cell alignment="left" valignment="top" usebox="none">
24671 \begin_layout Plain Layout
24677 <cell alignment="left" valignment="top" usebox="none">
24680 \begin_layout Plain Layout
24686 <cell alignment="left" valignment="top" usebox="none">
24689 \begin_layout Plain Layout
24695 <cell alignment="left" valignment="top" usebox="none">
24698 \begin_layout Plain Layout
24704 <cell alignment="left" valignment="top" usebox="none">
24707 \begin_layout Plain Layout
24713 <cell alignment="left" valignment="top" usebox="none">
24716 \begin_layout Plain Layout
24724 <cell alignment="left" valignment="top" usebox="none">
24727 \begin_layout Plain Layout
24733 <cell alignment="left" valignment="top" usebox="none">
24736 \begin_layout Plain Layout
24742 <cell alignment="left" valignment="top" usebox="none">
24745 \begin_layout Plain Layout
24751 <cell alignment="left" valignment="top" usebox="none">
24754 \begin_layout Plain Layout
24760 <cell alignment="left" valignment="top" usebox="none">
24763 \begin_layout Plain Layout
24769 <cell alignment="left" valignment="top" usebox="none">
24772 \begin_layout Plain Layout
24780 <cell alignment="left" valignment="top" usebox="none">
24783 \begin_layout Plain Layout
24789 <cell alignment="left" valignment="top" usebox="none">
24792 \begin_layout Plain Layout
24798 <cell alignment="left" valignment="top" usebox="none">
24801 \begin_layout Plain Layout
24807 <cell alignment="left" valignment="top" usebox="none">
24810 \begin_layout Plain Layout
24816 <cell alignment="left" valignment="top" usebox="none">
24819 \begin_layout Plain Layout
24825 <cell alignment="left" valignment="top" usebox="none">
24828 \begin_layout Plain Layout
24836 <cell alignment="left" valignment="top" usebox="none">
24839 \begin_layout Plain Layout
24845 <cell alignment="left" valignment="top" usebox="none">
24848 \begin_layout Plain Layout
24854 <cell alignment="left" valignment="top" usebox="none">
24857 \begin_layout Plain Layout
24863 <cell alignment="left" valignment="top" usebox="none">
24866 \begin_layout Plain Layout
24872 <cell alignment="left" valignment="top" usebox="none">
24875 \begin_layout Plain Layout
24881 <cell alignment="left" valignment="top" usebox="none">
24884 \begin_layout Plain Layout
24892 <cell alignment="left" valignment="top" usebox="none">
24895 \begin_layout Plain Layout
24901 <cell alignment="left" valignment="top" usebox="none">
24904 \begin_layout Plain Layout
24910 <cell alignment="left" valignment="top" usebox="none">
24913 \begin_layout Plain Layout
24919 <cell alignment="left" valignment="top" usebox="none">
24922 \begin_layout Plain Layout
24928 <cell alignment="left" valignment="top" usebox="none">
24931 \begin_layout Plain Layout
24937 <cell alignment="left" valignment="top" usebox="none">
24940 \begin_layout Plain Layout
24948 <cell alignment="left" valignment="top" usebox="none">
24951 \begin_layout Plain Layout
24957 <cell alignment="left" valignment="top" usebox="none">
24960 \begin_layout Plain Layout
24966 <cell alignment="left" valignment="top" usebox="none">
24969 \begin_layout Plain Layout
24975 <cell alignment="left" valignment="top" usebox="none">
24978 \begin_layout Plain Layout
24984 <cell alignment="left" valignment="top" usebox="none">
24987 \begin_layout Plain Layout
24993 <cell alignment="left" valignment="top" usebox="none">
24996 \begin_layout Plain Layout
25004 <cell alignment="left" valignment="top" usebox="none">
25007 \begin_layout Plain Layout
25013 <cell alignment="left" valignment="top" usebox="none">
25016 \begin_layout Plain Layout
25022 <cell alignment="left" valignment="top" usebox="none">
25025 \begin_layout Plain Layout
25031 <cell alignment="left" valignment="top" usebox="none">
25034 \begin_layout Plain Layout
25040 <cell alignment="left" valignment="top" usebox="none">
25043 \begin_layout Plain Layout
25049 <cell alignment="left" valignment="top" usebox="none">
25052 \begin_layout Plain Layout
25060 <cell alignment="left" valignment="top" usebox="none">
25063 \begin_layout Plain Layout
25069 <cell alignment="left" valignment="top" usebox="none">
25072 \begin_layout Plain Layout
25078 <cell alignment="left" valignment="top" usebox="none">
25081 \begin_layout Plain Layout
25087 <cell alignment="left" valignment="top" usebox="none">
25090 \begin_layout Plain Layout
25096 <cell alignment="left" valignment="top" usebox="none">
25099 \begin_layout Plain Layout
25105 <cell alignment="left" valignment="top" usebox="none">
25108 \begin_layout Plain Layout
25122 \begin_layout Chapter
25123 List of supported LyX functions to be used in layouts
25126 \begin_layout Standard
25128 \begin_inset Tabular
25129 <lyxtabular version="3" rows="10" columns="8">
25130 <features rotate="0" tabularvalignment="middle">
25131 <column alignment="left" valignment="top" width="0">
25132 <column alignment="left" valignment="top" width="0">
25133 <column alignment="left" valignment="top" width="0">
25134 <column alignment="left" valignment="top" width="0">
25135 <column alignment="left" valignment="top" width="0">
25136 <column alignment="left" valignment="top" width="0">
25137 <column alignment="left" valignment="top" width="0">
25138 <column alignment="left" valignment="top" width="0">
25140 <cell alignment="left" valignment="top" usebox="none">
25143 \begin_layout Plain Layout
25149 <cell alignment="left" valignment="top" usebox="none">
25152 \begin_layout Plain Layout
25158 <cell alignment="left" valignment="top" usebox="none">
25161 \begin_layout Plain Layout
25167 <cell alignment="left" valignment="top" usebox="none">
25170 \begin_layout Plain Layout
25176 <cell alignment="center" valignment="top" usebox="none">
25179 \begin_layout Plain Layout
25185 <cell alignment="center" valignment="top" usebox="none">
25188 \begin_layout Plain Layout
25194 <cell alignment="center" valignment="top" usebox="none">
25197 \begin_layout Plain Layout
25203 <cell alignment="center" valignment="top" usebox="none">
25206 \begin_layout Plain Layout
25214 <cell alignment="left" valignment="top" usebox="none">
25217 \begin_layout Plain Layout
25223 <cell alignment="left" valignment="top" usebox="none">
25226 \begin_layout Plain Layout
25232 <cell alignment="left" valignment="top" usebox="none">
25235 \begin_layout Plain Layout
25241 <cell alignment="left" valignment="top" usebox="none">
25244 \begin_layout Plain Layout
25250 <cell alignment="center" valignment="top" usebox="none">
25253 \begin_layout Plain Layout
25259 <cell alignment="center" valignment="top" usebox="none">
25262 \begin_layout Plain Layout
25268 <cell alignment="center" valignment="top" usebox="none">
25271 \begin_layout Plain Layout
25277 <cell alignment="center" valignment="top" usebox="none">
25280 \begin_layout Plain Layout
25288 <cell alignment="left" valignment="top" usebox="none">
25291 \begin_layout Plain Layout
25297 <cell alignment="left" valignment="top" usebox="none">
25300 \begin_layout Plain Layout
25306 <cell alignment="left" valignment="top" usebox="none">
25309 \begin_layout Plain Layout
25315 <cell alignment="left" valignment="top" usebox="none">
25318 \begin_layout Plain Layout
25324 <cell alignment="center" valignment="top" usebox="none">
25327 \begin_layout Plain Layout
25333 <cell alignment="center" valignment="top" usebox="none">
25336 \begin_layout Plain Layout
25342 <cell alignment="center" valignment="top" usebox="none">
25345 \begin_layout Plain Layout
25351 <cell alignment="center" valignment="top" usebox="none">
25354 \begin_layout Plain Layout
25362 <cell alignment="left" valignment="top" usebox="none">
25365 \begin_layout Plain Layout
25371 <cell alignment="left" valignment="top" usebox="none">
25374 \begin_layout Plain Layout
25380 <cell alignment="left" valignment="top" usebox="none">
25383 \begin_layout Plain Layout
25389 <cell alignment="left" valignment="top" usebox="none">
25392 \begin_layout Plain Layout
25398 <cell alignment="center" valignment="top" usebox="none">
25401 \begin_layout Plain Layout
25407 <cell alignment="center" valignment="top" usebox="none">
25410 \begin_layout Plain Layout
25416 <cell alignment="center" valignment="top" usebox="none">
25419 \begin_layout Plain Layout
25425 <cell alignment="center" valignment="top" usebox="none">
25428 \begin_layout Plain Layout
25436 <cell alignment="left" valignment="top" usebox="none">
25439 \begin_layout Plain Layout
25445 <cell alignment="left" valignment="top" usebox="none">
25448 \begin_layout Plain Layout
25454 <cell alignment="left" valignment="top" usebox="none">
25457 \begin_layout Plain Layout
25463 <cell alignment="left" valignment="top" usebox="none">
25466 \begin_layout Plain Layout
25472 <cell alignment="center" valignment="top" usebox="none">
25475 \begin_layout Plain Layout
25481 <cell alignment="center" valignment="top" usebox="none">
25484 \begin_layout Plain Layout
25490 <cell alignment="center" valignment="top" usebox="none">
25493 \begin_layout Plain Layout
25499 <cell alignment="center" valignment="top" usebox="none">
25502 \begin_layout Plain Layout
25510 <cell alignment="left" valignment="top" usebox="none">
25513 \begin_layout Plain Layout
25519 <cell alignment="left" valignment="top" usebox="none">
25522 \begin_layout Plain Layout
25528 <cell alignment="left" valignment="top" usebox="none">
25531 \begin_layout Plain Layout
25537 <cell alignment="left" valignment="top" usebox="none">
25540 \begin_layout Plain Layout
25546 <cell alignment="center" valignment="top" usebox="none">
25549 \begin_layout Plain Layout
25555 <cell alignment="center" valignment="top" usebox="none">
25558 \begin_layout Plain Layout
25564 <cell alignment="center" valignment="top" usebox="none">
25567 \begin_layout Plain Layout
25573 <cell alignment="center" valignment="top" usebox="none">
25576 \begin_layout Plain Layout
25584 <cell alignment="left" valignment="top" usebox="none">
25587 \begin_layout Plain Layout
25593 <cell alignment="left" valignment="top" usebox="none">
25596 \begin_layout Plain Layout
25602 <cell alignment="left" valignment="top" usebox="none">
25605 \begin_layout Plain Layout
25611 <cell alignment="left" valignment="top" usebox="none">
25614 \begin_layout Plain Layout
25620 <cell alignment="center" valignment="top" usebox="none">
25623 \begin_layout Plain Layout
25629 <cell alignment="center" valignment="top" usebox="none">
25632 \begin_layout Plain Layout
25638 <cell alignment="center" valignment="top" usebox="none">
25641 \begin_layout Plain Layout
25647 <cell alignment="center" valignment="top" usebox="none">
25650 \begin_layout Plain Layout
25658 <cell alignment="left" valignment="top" usebox="none">
25661 \begin_layout Plain Layout
25667 <cell alignment="left" valignment="top" usebox="none">
25670 \begin_layout Plain Layout
25676 <cell alignment="left" valignment="top" usebox="none">
25679 \begin_layout Plain Layout
25685 <cell alignment="left" valignment="top" usebox="none">
25688 \begin_layout Plain Layout
25694 <cell alignment="center" valignment="top" usebox="none">
25697 \begin_layout Plain Layout
25703 <cell alignment="center" valignment="top" usebox="none">
25706 \begin_layout Plain Layout
25712 <cell alignment="center" valignment="top" usebox="none">
25715 \begin_layout Plain Layout
25721 <cell alignment="center" valignment="top" usebox="none">
25724 \begin_layout Plain Layout
25732 <cell alignment="left" valignment="top" usebox="none">
25735 \begin_layout Plain Layout
25741 <cell alignment="left" valignment="top" usebox="none">
25744 \begin_layout Plain Layout
25750 <cell alignment="left" valignment="top" usebox="none">
25753 \begin_layout Plain Layout
25759 <cell alignment="left" valignment="top" usebox="none">
25762 \begin_layout Plain Layout
25768 <cell alignment="center" valignment="top" usebox="none">
25771 \begin_layout Plain Layout
25777 <cell alignment="center" valignment="top" usebox="none">
25780 \begin_layout Plain Layout
25786 <cell alignment="center" valignment="top" usebox="none">
25789 \begin_layout Plain Layout
25795 <cell alignment="center" valignment="top" usebox="none">
25798 \begin_layout Plain Layout
25806 <cell alignment="left" valignment="top" usebox="none">
25809 \begin_layout Plain Layout
25815 <cell alignment="left" valignment="top" usebox="none">
25818 \begin_layout Plain Layout
25824 <cell alignment="left" valignment="top" usebox="none">
25827 \begin_layout Plain Layout
25833 <cell alignment="left" valignment="top" usebox="none">
25836 \begin_layout Plain Layout
25842 <cell alignment="center" valignment="top" usebox="none">
25845 \begin_layout Plain Layout
25851 <cell alignment="center" valignment="top" usebox="none">
25854 \begin_layout Plain Layout
25860 <cell alignment="center" valignment="top" usebox="none">
25863 \begin_layout Plain Layout
25869 <cell alignment="center" valignment="top" usebox="none">
25872 \begin_layout Plain Layout
25886 \begin_layout Standard
25887 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
25888 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
25889 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
25890 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
25891 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
25892 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
25893 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
25894 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
25895 xargs xcolor xy yhmath
25898 \begin_layout Chapter
25899 Names of available colors to be used in layouts
25900 \begin_inset CommandInset label
25902 name "chap:Names-of-colors"
25909 \begin_layout Standard
25910 The colors listed here are the standard colors and the those that you can
25911 adjust in the LyX preferences.
25914 \begin_layout Description
25927 No particular color -- clear or default
25930 \begin_layout Description
25934 \begin_layout Description
25938 \begin_layout Description
25942 \begin_layout Description
25946 \begin_layout Description
25950 \begin_layout Description
25954 \begin_layout Description
25958 \begin_layout Description
25962 \begin_layout Description
25963 cursor Cursor color
25966 \begin_layout Description
25967 background Background color
25970 \begin_layout Description
25971 foreground Foreground color
25974 \begin_layout Description
25975 selection Background color of selected text
25978 \begin_layout Description
25979 selectiontext Foreground color of selected text
25982 \begin_layout Description
25983 latex Text color in LaTeX mode
25986 \begin_layout Description
25987 preview The color used for previews
25990 \begin_layout Description
25991 inlinecompletion Inline completion color
25994 \begin_layout Description
25995 nonunique_inlinecompletion Inline completion color for the non-unique part
25998 \begin_layout Description
25999 notelabel Label color for notes
26002 \begin_layout Description
26003 notebg Background color of notes
26006 \begin_layout Description
26007 commentlabel Label color for comments
26010 \begin_layout Description
26011 commentbg Background color of comments
26014 \begin_layout Description
26015 greyedoutlabel Label color for greyedout insets
26018 \begin_layout Description
26019 greyedouttext Color for greyedout inset text
26022 \begin_layout Description
26023 greyedoutbg Background color of greyedout inset
26026 \begin_layout Description
26027 shadedbg Background color of shaded box
26030 \begin_layout Description
26031 listingsbg Background color of listings inset
26034 \begin_layout Description
26035 branchlabel Label color for branches
26038 \begin_layout Description
26039 footlabel Label color for footnotes
26042 \begin_layout Description
26043 indexlabel Label color for index insets
26046 \begin_layout Description
26047 marginlabel Label color for margin notes
26050 \begin_layout Description
26051 phantomtext Text color for phantom insets
26054 \begin_layout Description
26055 urllabel Label color for URL insets
26058 \begin_layout Description
26059 urltext Color for URL inset text
26062 \begin_layout Description
26063 depthbar Color for the depth bars in the margin
26066 \begin_layout Description
26067 language Color for marking foreign language words
26070 \begin_layout Description
26071 command Text color for command insets
26074 \begin_layout Description
26075 commandbg Background color for command insets
26078 \begin_layout Description
26079 commandframe Frame color for command insets
26082 \begin_layout Description
26083 special Special chars text color
26086 \begin_layout Description
26087 graphicsbg Graphics inset background color
26090 \begin_layout Description
26091 math Math inset text color
26094 \begin_layout Description
26095 mathbg Math inset background color
26098 \begin_layout Description
26099 mathmacrobg Macro math inset background color
26102 \begin_layout Description
26103 mathmacrohoverbg Macro math inset background color hovered
26106 \begin_layout Description
26107 mathmacrolabel Macro math label color
26110 \begin_layout Description
26111 mathmacroframe Macro math frame color
26114 \begin_layout Description
26115 mathmacroblend Macro math blended color
26118 \begin_layout Description
26119 mathmacrooldarg Macro template color for old parameters
26122 \begin_layout Description
26123 mathmacronewarg Macro template color for new parameters
26126 \begin_layout Description
26127 mathframe Math inset frame color under focus
26130 \begin_layout Description
26131 mathcorners Math inset frame color not under focus
26134 \begin_layout Description
26135 mathline Math line color
26138 \begin_layout Description
26139 collapsable Collapsable insets text
26142 \begin_layout Description
26143 collapsableframe Collapsable insets frame
26146 \begin_layout Description
26147 insetbg Inset marker background color
26150 \begin_layout Description
26151 insetframe Inset marker frame color
26154 \begin_layout Description
26155 error Error box text color
26158 \begin_layout Description
26159 eolmarker End of line marker color
26162 \begin_layout Description
26163 added_space Added space colour
26166 \begin_layout Description
26167 appendix Appendix marker color
26170 \begin_layout Description
26171 changebar Changebar color
26174 \begin_layout Description
26175 deletedtext Deleted text color
26178 \begin_layout Description
26179 addedtext Added text color
26182 \begin_layout Description
26183 changedtextauthor1 Changed text color author 1
26186 \begin_layout Description
26187 changedtextauthor2 Changed text color author 2
26190 \begin_layout Description
26191 changedtextauthor3 Changed text color author 3
26194 \begin_layout Description
26195 changedtextauthor4 Changed text color author 4
26198 \begin_layout Description
26199 changedtextauthor5 Changed text color author 5
26202 \begin_layout Description
26203 deletedtextmodifier Deleted text modifying color
26206 \begin_layout Description
26207 tabularline Table line color
26210 \begin_layout Description
26211 tabularonoffline Table line color
26214 \begin_layout Description
26215 bottomarea Bottom area color
26218 \begin_layout Description
26219 newpage New page color
26222 \begin_layout Description
26223 pagebreak Page break color
26226 \begin_layout Description
26227 buttonframe Color used for button frame
26230 \begin_layout Description
26231 buttonbg Color used for bottom background
26234 \begin_layout Description
26235 buttonhoverbg Color used for buttom under focus
26238 \begin_layout Description
26239 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26243 \begin_layout Description
26244 previewframe Preview frame color
26247 \begin_layout Description
26248 inherit Color is inherited
26251 \begin_layout Description
26252 regexpframe Color for regexp frame
26255 \begin_layout Description
26256 ignore For ignoring updates of a color