1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
136 \paperpagestyle headings
137 \tracking_changes true
138 \output_changes false
142 \author -712698321 "Jürgen Spitzmüller"
143 \author -195340706 "Georg Baum"
145 \author 155139281 "Jrgen Spitzmller"
146 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
147 \author 1414654397 "Richard Heck"
148 \author 2090807402 "usti"
154 Customizing LyX: Features for the Advanced User
162 \begin_layout Plain Layout
164 If you have comments or error corrections, please send them to the LyX Documenta
166 \begin_inset CommandInset href
168 target "lyx-docs@lists.lyx.org"
175 \begin_inset Quotes eld
179 \begin_inset Quotes erd
182 in the subject header, and please cc the current maintainer of this file,
183 Richard Heck <rgheck@comcast.net>.
189 \begin_inset Newline newline
193 \begin_inset Newline newline
197 \change_deleted -712698321 1357054389
199 \change_inserted -712698321 1357054389
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
656 \begin_inset CommandInset ref
658 reference "cha:Internationalizing-LyX"
665 \begin_layout Labeling
666 \labelwidthstring 00.00.0000
667 \begin_inset Flex Code
670 \begin_layout Plain Layout
676 contains example files that explain how to use some features.
677 In the file browser, press the
678 \begin_inset Flex MenuItem
681 \begin_layout Plain Layout
690 \begin_layout Labeling
691 \labelwidthstring 00.00.0000
692 \begin_inset Flex Code
695 \begin_layout Plain Layout
701 contains image files that are used by the
702 \begin_inset Flex MenuItem
705 \begin_layout Plain Layout
712 In addition, it also contains the individual icons used in the toolbar
713 and the banners that can be shown when LyX is launched.
716 \begin_layout Labeling
717 \labelwidthstring 00.00.0000
718 \begin_inset Flex Code
721 \begin_layout Plain Layout
727 contains keyboard keymapping files.
733 \begin_inset CommandInset ref
735 reference "sec:International-Keymap-Stuff"
742 \begin_layout Labeling
743 \labelwidthstring 00.00.0000
744 \begin_inset Flex Code
747 \begin_layout Plain Layout
753 contains the text class and module files described in Chapter
758 \begin_inset CommandInset ref
760 reference "cha:Installing-New-Document"
767 \begin_layout Labeling
768 \labelwidthstring 00.00.0000
769 \begin_inset Flex Code
772 \begin_layout Plain Layout
779 \begin_inset Flex Code
782 \begin_layout Plain Layout
788 Python scripts used to convert between LyX versions.
789 These can be run from the command line if, say, you want to batch-convert
793 \begin_layout Labeling
794 \labelwidthstring 00.00.0000
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
804 contains some files that demonstrate the capabilities of the
805 \begin_inset Flex MenuItem
808 \begin_layout Plain Layout
819 Also contains some scripts used by LyX itself.
822 \begin_layout Labeling
823 \labelwidthstring 00.00.0000
824 \begin_inset Flex Code
827 \begin_layout Plain Layout
833 contains the standard LyX template files described in Chapter
838 \begin_inset CommandInset ref
840 reference "sub:Creating-Templates"
847 \begin_layout Labeling
848 \labelwidthstring 00.00.0000
849 \begin_inset Flex Code
852 \begin_layout Plain Layout
858 contains files with the extension
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 that define the user interface to LyX.
869 That is, the files define which items appear in which menus and the items
870 appearing on the toolbar.
873 \begin_layout Subsection
874 Files you don't want to modify
877 \begin_layout Standard
878 These files are used internally by LyX and you generally do not need to
879 modify them unless you are a developer.
882 \begin_layout Labeling
883 \labelwidthstring 00.00.0000
884 \begin_inset Flex Code
887 \begin_layout Plain Layout
893 this file contains the list of LyX developers.
894 The contents are displayed with the menu entry
895 \begin_inset Flex MenuItem
898 \begin_layout Plain Layout
899 Help\SpecialChar \menuseparator
912 \begin_layout Labeling
913 \labelwidthstring 00.00.0000
914 \begin_inset Flex Code
917 \begin_layout Plain Layout
923 this is a LaTeX script used during the configuration process.
927 \begin_layout Labeling
928 \labelwidthstring 00.00.0000
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
938 this is the script that is used to re-configure LyX.
939 It creates configuration files in the directory it was run from.
942 \begin_layout Subsection
943 Other files needing a line or two
944 \change_deleted -712698321 1357054454
946 \change_inserted -712698321 1357054454
947 \SpecialChar \ldots{}
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
964 this contains tables describing how different character encodings can be
968 \begin_layout Labeling
969 \labelwidthstring 00.00.0000
970 \begin_inset Flex Code
973 \begin_layout Plain Layout
979 this file contains the templates available to the new
980 \begin_inset Flex MenuItem
983 \begin_layout Plain Layout
996 \begin_layout Labeling
997 \labelwidthstring 00.00.0000
998 \begin_inset Flex Code
1001 \begin_layout Plain Layout
1007 this file contains a list of all the languages currently supported by LyX.
1008 \change_inserted -712698321 1357054565
1012 \begin_layout Labeling
1013 \labelwidthstring 00.00.0000
1015 \change_inserted -712698321 1357054669
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1021 \change_inserted -712698321 1357054669
1029 contains information about the supported fonts.
1030 \change_inserted -195340706 1334775793
1034 \begin_layout Labeling
1035 \labelwidthstring 00.00.0000
1037 \change_inserted -195340706 1334775793
1038 \begin_inset Flex Code
1041 \begin_layout Plain Layout
1043 \change_inserted -195340706 1334775793
1049 this file contains translations for internationalized paragraph styles
1051 \begin_inset space \thinspace{}
1055 \begin_inset CommandInset ref
1057 reference "sub:I18n"
1062 \change_inserted -712698321 1357054494
1066 \begin_layout Labeling
1067 \labelwidthstring 00.00.0000
1069 \change_inserted -712698321 1357054554
1070 \begin_inset Flex Code
1073 \begin_layout Plain Layout
1075 \change_inserted -712698321 1357054508
1083 this file contains information about unicode-encoded glyphs and the way
1084 they are supported by LyX via LaTeX.
1089 \begin_layout Section
1090 Your local configuration directory
1093 \begin_layout Standard
1094 Even if you are using LyX as an unprivileged user, you might want to change
1095 LyX configuration for your own use.
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 directory contains all your personal configuration files.
1107 This is the directory described as
1108 \begin_inset Quotes eld
1112 \begin_inset Quotes erd
1116 \begin_inset Flex MenuItem
1119 \begin_layout Plain Layout
1120 Help\SpecialChar \menuseparator
1122 \begin_inset space ~
1131 This directory is used as a mirror of
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1141 , which means that every file in
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1151 is a replacement for the corresponding file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 Any configuration file described in the above sections can be placed either
1163 in the system-wide directory, in which case it will affect all users, or
1164 in your local directory for your own use.
1167 \begin_layout Standard
1168 To make things clearer, let's provide a few examples:
1171 \begin_layout Itemize
1172 The preferences set in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Tools\SpecialChar \menuseparator
1183 dialog are saved to a file
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_layout Itemize
1207 When you reconfigure using
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1212 Tools\SpecialChar \menuseparator
1219 \begin_inset Flex Code
1222 \begin_layout Plain Layout
1228 script, and the resulting files are written in your local configuration
1230 This means that any additional text class file that you might have added
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1241 will be added to the list of classes in the
1242 \begin_inset Flex MenuItem
1245 \begin_layout Plain Layout
1246 Document\SpecialChar \menuseparator
1255 \begin_layout Itemize
1256 If you get some updated documentation from LyX ftp site and cannot install
1257 it because you do not have sysadmin rights on your system, you can just
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1268 and the items in the
1269 \begin_inset Flex MenuItem
1272 \begin_layout Plain Layout
1278 menu will open them!
1281 \begin_layout Section
1282 Running LyX with multiple configurations
1285 \begin_layout Standard
1286 The configuration freedom of the local configuration directory may not suffice
1287 if you want to have more than one configuration at your disposal.
1288 For example, you may want to be use different key bindings or printer settings
1290 You can achieve this by having several such directories.
1291 You then specify which directory to use at run-time.
1294 \begin_layout Standard
1295 Invoking LyX with the command line switch
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1309 instructs the program to read the configuration from that directory, and
1310 not from the default directory.
1311 (You can determine the default directory by running LyX without the
1312 \begin_inset Flex Code
1315 \begin_layout Plain Layout
1321 switch.) If the specified directory does not exist, LyX offers to create
1322 it for you, just like it does for the default directory on the first time
1323 you run the program.
1324 You can modify the configuration options in this additional user directory
1325 exactly as you would for the default directory.
1326 These directories are completely independent (but read on).
1327 Note that setting the environment variable
1328 \begin_inset Flex Code
1331 \begin_layout Plain Layout
1337 to some value has exactly the same effect.
1340 \begin_layout Standard
1341 Having several configurations also requires more maintenance: if you want
1342 to add a new layout to
1343 \begin_inset Flex Code
1346 \begin_layout Plain Layout
1352 which you want available from all your configurations, you must add it
1353 to each directory separately.
1354 You can avoid this with the following trick: after LyX creates the additional
1355 directory, most of the subdirectories (see above) are empty.
1356 If you want the new configuration to mirror an existing one, replace the
1357 empty subdirectory with a symbolic link to the matching subdirectory in
1358 the existing configuration.
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1369 subdirectory, however, since it contains a file written by the configuration
1370 script (also accessible through
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1381 ) which is configuration-specific.
1384 \begin_layout Chapter
1385 The Preferences dialog
1388 \begin_layout Standard
1389 All options of the preferences dialog are described in the Appendix
1391 The Preferences Dialog
1398 For some options you might find here more details.
1401 \begin_layout Section
1403 \begin_inset CommandInset label
1412 \begin_layout Standard
1413 The first step is to define your file formats if they are not already defined.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1419 Tools\SpecialChar \menuseparator
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1431 File Handling\SpecialChar \menuseparator
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1442 New\SpecialChar \ldots{}
1448 button to define your new format.
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1459 field contains the name used to identify the format in the GUI.
1461 \begin_inset Flex MenuItem
1464 \begin_layout Plain Layout
1470 is used to identify the format internally.
1471 You will also need to enter a file extension.
1472 These are all required.
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1483 field is used to provide a keyboard shortcut on the menus.
1484 (For example, pressing
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1495 \begin_inset Flex MenuItem
1498 \begin_layout Plain Layout
1499 View\SpecialChar \menuseparator
1500 View (Other Formats)\SpecialChar \menuseparator
1509 \begin_layout Standard
1511 \begin_inset Flex MenuItem
1514 \begin_layout Plain Layout
1521 \begin_inset Flex MenuItem
1524 \begin_layout Plain Layout
1531 For example, you might want to use
1532 \begin_inset Flex MenuItem
1535 \begin_layout Plain Layout
1541 to view PostScript files.
1542 You can enter the command needed to start the program in the corresponding
1544 In defining this command, you can use the four variables listed in the
1546 The viewer is launched when you view an image in LyX or use the
1547 \begin_inset Flex MenuItem
1550 \begin_layout Plain Layout
1557 The editor is for example launched when you right-click on an image and
1559 \begin_inset Flex MenuItem
1562 \begin_layout Plain Layout
1568 in the appearing context menu.
1571 \begin_layout Standard
1573 \change_inserted -195340706 1329851811
1575 \begin_inset Flex MenuItem
1578 \begin_layout Plain Layout
1584 type of a format is optional, but if it is specified, it must be unique
1586 It is used to detect files of this format from the file contents.
1587 For some important file formats there is no MIME type officially registered
1589 \begin_inset CommandInset href
1592 target "http://www.iana.org/assignments/media-types/"
1597 Therefore LyX uses the extended list of MIME types as specified by
1598 \begin_inset CommandInset href
1600 name "freedesktop.org"
1601 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1608 \begin_layout Standard
1610 \begin_inset Flex MenuItem
1613 \begin_layout Plain Layout
1619 option tells LyX that a format is suitable for document export.
1620 If this is set and if a suitable conversion route exists (see sec.
1621 \begin_inset space \thinspace{}
1625 \begin_inset CommandInset ref
1627 reference "sec:Converters"
1631 ), the format will appear in the
1632 \begin_inset Flex MenuItem
1635 \begin_layout Plain Layout
1636 File\SpecialChar \menuseparator
1643 The format will also appear in the
1644 \begin_inset Flex MenuItem
1647 \begin_layout Plain Layout
1653 menu if a viewer is specified for the format.
1654 Pure image formats, such as
1655 \begin_inset Flex Code
1658 \begin_layout Plain Layout
1664 , should not use this option.
1665 Formats that can both represent vector graphics and documents like
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1678 \begin_layout Standard
1680 \begin_inset Flex MenuItem
1683 \begin_layout Plain Layout
1684 Vector graphics format
1689 tells LyX that a format can contain vector graphics.
1690 This information is used to determine the target format of included graphics
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 Included graphics may need to be converted to either
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1742 cannot handle other image formats.
1743 If an included graphic is not already in
1744 \begin_inset Flex MenuItem
1747 \begin_layout Plain Layout
1754 \begin_inset Flex MenuItem
1757 \begin_layout Plain Layout
1764 \begin_inset Flex MenuItem
1767 \begin_layout Plain Layout
1773 format, it is converted to
1774 \begin_inset Flex MenuItem
1777 \begin_layout Plain Layout
1783 if the vector format option is set, and otherwise to
1784 \begin_inset Flex MenuItem
1787 \begin_layout Plain Layout
1796 \begin_layout Section
1800 \begin_layout Standard
1801 Since all conversions from one format to another take place in LyX's temporary
1802 directory, it is sometimes necessary to modify a file before copying it
1803 to the temporary directory in order that the conversion may be performed.
1807 \begin_layout Plain Layout
1808 For example, the file may refer to other files—images, for example—using
1809 relative file names, and these may become invalid when the file is copied
1810 to the temporary directory.
1815 This is done by a Copier: It copies a file to (or from) the temporary directory
1816 and may modify it in the process.
1819 \begin_layout Standard
1820 The definitions of the copiers may use four variables:
1823 \begin_layout Labeling
1824 \labelwidthstring 00.00.0000
1825 \begin_inset Flex Code
1828 \begin_layout Plain Layout
1834 The LyX system directory (e.
1835 \begin_inset space \thinspace{}
1839 \begin_inset space \space{}
1843 \begin_inset Flex MenuItem
1846 \begin_layout Plain Layout
1855 \begin_layout Labeling
1856 \labelwidthstring 00.00.0000
1857 \begin_inset Flex Code
1860 \begin_layout Plain Layout
1869 \begin_layout Labeling
1870 \labelwidthstring 00.00.0000
1871 \begin_inset Flex Code
1874 \begin_layout Plain Layout
1881 \change_inserted 1082167584 1348453985
1885 \begin_layout Labeling
1886 \labelwidthstring 00.00.0000
1888 \change_inserted 1082167584 1348453986
1889 $$b The base name (without filename extension) in the LyX temporary directory
1892 \begin_layout Labeling
1893 \labelwidthstring 00.00.0000
1895 \change_inserted 1082167584 1348453986
1896 $$p The full directory path of the LyX temporary directory
1899 \begin_layout Labeling
1900 \labelwidthstring 00.00.0000
1902 \change_inserted 1082167584 1348453986
1903 $$r The full pathname to the original LyX file being processed
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1909 \change_inserted 1082167584 1348453986
1910 $$f The filename (without any directory path) of the LyX file.
1913 \begin_layout Labeling
1914 \labelwidthstring 00.00.0000
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1925 \change_inserted 1082167584 1348453720
1929 \begin_layout Standard
1930 The latter should be the filename as it would be used in a LaTeX's
1937 It is relevant only when exporting files suitable for such inclusion.
1940 \begin_layout Standard
1941 Copiers can be used to do almost anything with output files.
1942 For example, suppose you want generated pdf files to be copied to a special
1944 \begin_inset Flex Code
1947 \begin_layout Plain Layout
1954 Then you could write a shell script such as this one:
1957 \begin_layout Standard
1958 \begin_inset listings
1962 \begin_layout Plain Layout
1967 \begin_layout Plain Layout
1972 \begin_layout Plain Layout
1974 TOFILE=`basename $2`
1977 \begin_layout Plain Layout
1979 cp $FROMFILE /home/you/pdf/$TOFILE
1984 Save it in your local LyX directory—say,
1985 \begin_inset Flex Code
1988 \begin_layout Plain Layout
1989 /home/you/.lyx/scripts/pdfcopier.sh
1994 —and make it executable, if you need to do so on your platform.
1996 \begin_inset Flex MenuItem
1999 \begin_layout Plain Layout
2000 Tools\SpecialChar \menuseparator
2006 dialog, select under
2007 \begin_inset Flex MenuItem
2010 \begin_layout Plain Layout
2011 File Handling\SpecialChar \menuseparator
2018 \begin_inset Flex MenuItem
2021 \begin_layout Plain Layout
2027 format—or one of the other pdf formats—and enter
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2032 pdfcopier.sh $$i $$o
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2051 \begin_layout Standard
2052 Copiers are used by LyX in various of its own conversions.
2053 For example, if appropriate programs are found, LyX will automatically
2054 install copiers for the
2055 \begin_inset Flex MenuItem
2058 \begin_layout Plain Layout
2065 \begin_inset Flex MenuItem
2068 \begin_layout Plain Layout
2070 \begin_inset space ~
2079 When these formats are exported, the copier sees that not just the main
2080 HTML file but various associated files (style files, images, etc.) are also
2082 All these files are written to a subdirectory of the directory in which
2083 the original LyX file was found.
2087 \begin_layout Plain Layout
2088 This copier can be customized.
2090 \begin_inset Quotes eld
2094 \begin_inset Quotes erd
2097 argument takes a comma-separated list of extensions to be copied; if it
2098 is omitted, all files will be copied.
2100 \begin_inset Quotes eld
2104 \begin_inset Quotes erd
2107 argument determines the extension added to the generated directory.
2109 \begin_inset Quotes eld
2113 \begin_inset Flex MenuItem
2116 \begin_layout Plain Layout
2123 \begin_inset Quotes erd
2126 , so HTML generated from
2127 \begin_inset Flex MenuItem
2130 \begin_layout Plain Layout
2131 /path/to/filename.lyx
2137 \begin_inset Flex MenuItem
2140 \begin_layout Plain Layout
2141 /path/to/filename.html.LyXconv
2155 \begin_layout Section
2157 \begin_inset CommandInset label
2159 name "sec:Converters"
2166 \begin_layout Standard
2167 You can define your own Converters to convert files between different formats.
2169 \begin_inset Flex MenuItem
2172 \begin_layout Plain Layout
2173 Tools\SpecialChar \menuseparator
2174 Preferences\SpecialChar \menuseparator
2175 File Handling\SpecialChar \menuseparator
2184 \begin_layout Standard
2185 To define a new converter, select the
2186 \begin_inset Flex MenuItem
2189 \begin_layout Plain Layout
2191 \begin_inset space ~
2200 \begin_inset Flex MenuItem
2203 \begin_layout Plain Layout
2205 \begin_inset space ~
2213 from the drop-down lists, enter the command needed for the conversion,
2215 \begin_inset Flex MenuItem
2218 \begin_layout Plain Layout
2225 Several variables can be used in the definition of converters:
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2239 The LyX system directory
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2247 \begin_layout Plain Layout
2256 \begin_layout Labeling
2257 \labelwidthstring 00.00.0000
2258 \begin_inset Flex Code
2261 \begin_layout Plain Layout
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2281 The base filename of the input file (i.
2282 \begin_inset space \thinspace{}
2285 g., without the extension)
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The path to the input file
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2313 The path to the original input file (this is different from $$p when a
2314 chain of converters is called)
2317 \begin_layout Labeling
2318 \labelwidthstring 00.00.0000
2319 \begin_inset Flex Code
2322 \begin_layout Plain Layout
2328 The iconv name for the encoding of the document.
2331 \begin_layout Standard
2333 \begin_inset Flex MenuItem
2336 \begin_layout Plain Layout
2338 \begin_inset space ~
2346 field you can enter the following flags, separated by commas:
2349 \begin_layout Labeling
2350 \labelwidthstring 00.00.0000
2351 \begin_inset Flex Code
2354 \begin_layout Plain Layout
2360 This converter runs some form of LaTeX.
2361 This will make LyX's LaTeX error logs available.
2364 \begin_layout Labeling
2365 \labelwidthstring 00.00.0000
2366 \begin_inset Flex Code
2369 \begin_layout Plain Layout
2376 \begin_inset Flex MenuItem
2379 \begin_layout Plain Layout
2385 file for the conversion.
2386 \change_inserted 1414654397 1337693117
2390 \begin_layout Labeling
2391 \labelwidthstring 00.00.0000
2393 \change_inserted 1414654397 1337693188
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2399 \change_inserted 1414654397 1337693129
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2415 file from the backend, which in practice means a LaTeX file like the one
2416 we would export, without
2417 \begin_inset Flex Code
2420 \begin_layout Plain Layout
2422 \change_inserted 1414654397 1337693184
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2449 \begin_layout Standard
2450 The following three flags are not really flags at all because they take
2452 \begin_inset Flex MenuItem
2455 \begin_layout Plain Layout
2457 \begin_inset space ~
2461 \begin_inset space ~
2472 \begin_layout Labeling
2473 \labelwidthstring 00.00.0000
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 If set, the converter's standard error will be redirected to a file
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2493 , and the script given as argument will be run as:
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2498 script < infile.out > infile.log
2504 The argument may contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2517 \begin_layout Labeling
2518 \labelwidthstring 00.00.0000
2519 \begin_inset Flex Code
2522 \begin_layout Plain Layout
2528 The name of the directory in which the converter will dump the generated
2530 LyX will not create this directory, and it does not copy anything into
2531 it, though it will copy this directory to the destination.
2532 The argument may contain
2533 \begin_inset Flex Code
2536 \begin_layout Plain Layout
2542 , which will be replaced by the base name of the input and output files,
2543 respectively, when the directory is copied.
2544 \begin_inset Newline newline
2547 Note that resultdir and usetempdir make no sense together.
2548 The latter will be ignored if the former is given.
2551 \begin_layout Labeling
2552 \labelwidthstring 00.00.0000
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 Determines the output file name and may, contain
2563 \begin_inset Flex Code
2566 \begin_layout Plain Layout
2573 Sensible only with resultdir and optional even then; if not given, it defaults
2577 \begin_layout Standard
2578 None of these last three are presently used in any of the converters that
2579 are installed with LyX.
2583 \begin_layout Standard
2584 You do not have to define converters for all formats between which you want
2586 For example, you will note that there is no `LyX to PostScript' converter,
2587 but LyX will export PostScript.
2588 It does so by first creating a LaTeX file (no converter needs to be defined
2589 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2590 and finally converting the resulting DVI file to PostScript.
2591 LyX finds such `chains' of converters automatically, and it will always
2592 choose the shortest possible chain.
2593 You can, though, still define multiple conversion methods between file
2595 For example, the standard LyX configuration provides three ways to convert
2596 LaTeX to PDF: Directly, using
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2606 ; via (DVI and) PostScript, using
2607 \begin_inset Flex MenuItem
2610 \begin_layout Plain Layout
2617 \begin_inset Flex MenuItem
2620 \begin_layout Plain Layout
2627 To define such alternate chains, you must define multiple target `file
2628 formats', as described in section
2629 \begin_inset CommandInset ref
2631 reference "sec:Formats"
2636 For example, in the standard configuration, the formats named
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2666 are defined, all of which share the extension
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2676 , and which correspond to the conversion methods just mentioned.
2679 \begin_layout Chapter
2680 Internationalizing LyX
2681 \begin_inset CommandInset label
2683 name "cha:Internationalizing-LyX"
2690 \begin_layout Standard
2691 LyX supports using a translated interface.
2692 Last time we checked, LyX provided text in thirty languages.
2693 The language of choice is called your
2698 (For further reading on locale settings, see also the documentation for
2699 locale that comes with your operating system.
2700 For Linux, the manual page for
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2710 could be a good place to start).
2713 \begin_layout Standard
2714 Notice that these translations will work, but do contain a few flaws.
2715 In particular, all dialogs have been designed with the English text in
2716 mind, which means that some of the translated text will be too large to
2717 fit within the space allocated.
2718 This is only a display problem and will not cause any harm.
2719 Also, you will find that some of the translations do not define shortcut
2720 keys for everything.
2721 Sometimes, there are simply not enough free letters to do it.
2722 Other times, the translator just hasn't got around to doing it yet.
2723 Our localization team, which you may wish to join,
2727 \begin_layout Plain Layout
2728 If you are a fluent speaker of a language other than English, joining these
2729 teams is a great way to give back to the LyX community!
2734 will of course try to fix these shortcomings in future versions of LyX.
2737 \begin_layout Section
2741 \begin_layout Subsection
2742 Translating the graphical user interface (text messages).
2745 \begin_layout Standard
2747 \begin_inset Flex Code
2750 \begin_layout Plain Layout
2756 library to handle the internationalization of the interface.
2757 To have LyX speak your favorite language in all menus and dialogs, you
2759 \begin_inset Flex Code
2762 \begin_layout Plain Layout
2768 -file for that language.
2769 When this is available, you'll have to generate a
2770 \begin_inset Flex Code
2773 \begin_layout Plain Layout
2779 -file from it and install the
2780 \begin_inset Flex Code
2783 \begin_layout Plain Layout
2790 The process of doing all of this is explained in the documentation for
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2802 It is possible to do this just for yourself, but if you're going to do
2803 it, you might as well share the results of your labors with the rest of
2805 Send a message to the LyX developers' list for more information about how
2809 \begin_layout Standard
2810 In short, this is what you should do (xx denotes the language code):
2813 \begin_layout Itemize
2814 Check out the LyX source code.
2816 \begin_inset CommandInset href
2818 name "information on the web"
2819 target "http://www.lyx.org/HowToUseSVN"
2826 \begin_layout Itemize
2828 \begin_inset Flex Code
2831 \begin_layout Plain Layout
2837 to the folder of the
2838 \begin_inset Flex Code
2841 \begin_layout Plain Layout
2849 \begin_inset Flex Code
2852 \begin_layout Plain Layout
2860 \begin_inset Flex Code
2863 \begin_layout Plain Layout
2869 doesn't exist anywhere, it can be remade with the console command
2870 \begin_inset Flex Code
2873 \begin_layout Plain Layout
2879 in that directory, or you can use an existing po-file for some other language
2883 \begin_layout Itemize
2885 \begin_inset Flex Code
2888 \begin_layout Plain Layout
2898 \begin_layout Plain Layout
2899 This is just a text file, so it can be edited in any text editor.
2900 But there are also specialized programs that support such editing, such
2905 (for all platforms) or
2914 contains a `mode' for editing
2915 \begin_inset Flex Code
2918 \begin_layout Plain Layout
2929 For some menu- and widget-labels, there are also shortcut keys that should
2931 Those keys are marked after a `|', and should be translated according to
2932 the words and phrases of the language.
2933 You should also fill also out the information at the beginning of the new
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 -file with your email-address, etc., so people know where to reach you with
2945 suggestions and entertaining flames.
2948 \begin_layout Standard
2949 If you are just doing this on your own, then:
2952 \begin_layout Itemize
2954 \begin_inset Flex Code
2957 \begin_layout Plain Layout
2964 This can be done with
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2969 msgfmt -o xx.mo < xx.po
2977 \begin_layout Itemize
2979 \begin_inset Flex Code
2982 \begin_layout Plain Layout
2988 -file to your locale-tree, at the correct directory for application messages
2993 xx, and under the name
2994 \begin_inset Flex Code
2997 \begin_layout Plain Layout
3004 \begin_inset space \thinspace{}
3008 \begin_inset space \space{}
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3016 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3026 \begin_layout Standard
3027 As said, however, it would be best if the new
3028 \begin_inset Flex Code
3031 \begin_layout Plain Layout
3037 -file could be added to the LyX distribution, so others can use it.
3038 Adding it involves making additional changes to LyX.
3039 So send an email to the developers' mailing list if you're interested in
3043 \begin_layout Subsubsection
3047 \begin_layout Standard
3048 Sometimes it turns out that one English message needs to be translated into
3049 different messages in the target language.
3050 One example is the message
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 which has the German translation
3068 , depending upon exactly what the English
3069 \begin_inset Quotes eld
3073 \begin_inset Quotes erd
3078 \begin_inset Flex Code
3081 \begin_layout Plain Layout
3087 does not handle such ambiguous translations.
3088 Therefore you have to add some context information to the message: Instead
3090 \begin_inset Flex Code
3093 \begin_layout Plain Layout
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3104 To[[as in 'From format x to format y']]
3110 \begin_inset Flex Code
3113 \begin_layout Plain Layout
3114 To[[as in 'From page x to page y']].
3119 Now the two occurrences of
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3130 \begin_inset Flex Code
3133 \begin_layout Plain Layout
3139 and can be translated correctly to
3150 \begin_layout Standard
3151 Of course the context information needs to be stripped off the original
3152 message when no translation is used.
3153 Therefore you have to put it in double square brackets at the end of the
3154 message (see the example above).
3155 The translation mechanism of LyX ensures that everything in double square
3156 brackets at the end of messages is removed before displaying the message.
3159 \begin_layout Subsection
3160 Translating the documentation.
3163 \begin_layout Standard
3164 The online documentation (in the
3165 \begin_inset Flex MenuItem
3168 \begin_layout Plain Layout
3174 -menu) can (and should!) be translated.
3175 If there are translated versions of the documentation available
3179 \begin_layout Plain Layout
3180 As of March 2008, at least some of the documents have been translated into
3181 fourteen languages, with the Tutorial available in a few more.
3186 and the locale is set accordingly, these will be used automagically by
3188 LyX looks for translated versions as
3189 \begin_inset Flex Code
3192 \begin_layout Plain Layout
3193 LyXDir/doc/xx/DocName.lyx
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 is the code for the language currently in use.
3209 If there are no translated documents, the default English versions will
3211 Note that the translated versions must have the same filenames (
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3221 above) as the original.
3222 If you feel up to translating the documentation (an excellent way to proof-read
3223 the original documentation by the way!), there are a few things you should
3227 \begin_layout Itemize
3228 Check out the documentation translation web page at
3229 \begin_inset CommandInset href
3231 name "http://www.lyx.org/Translation"
3232 target "http://www.lyx.org/Translation"
3237 That way, you can find out which (if any) documents have already been translate
3238 d into your language.
3239 You can also find out who (if anyone) is organizing the effort to translate
3240 the documentation into your language.
3241 If no one is organizing the effort, please let us know that you're interested.
3244 \begin_layout Standard
3245 Once you get to actually translating, here's a few hints for you that may
3249 \begin_layout Itemize
3250 Join the documentation team! There is information on how to do that in
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3261 \begin_inset Flex MenuItem
3264 \begin_layout Plain Layout
3265 Help\SpecialChar \menuseparator
3271 ), which by the way is the first document you should translate.
3274 \begin_layout Itemize
3275 Learn the typographic conventions for the language you are translating to.
3276 Typography is an ancient art and over the centuries, a great variety of
3277 conventions have developed throughout different parts of the world.
3278 Also study the professional terminology amongst typographers in your country.
3279 Inventing your own terminology will only confuse the users.
3282 (Warning! Typography is addictive!)
3285 \begin_layout Itemize
3286 Make a copy of the document.
3287 This will be your working copy.
3288 You can use this as your personal translated help-file by placing it in
3290 \begin_inset Flex Code
3293 \begin_layout Plain Layout
3302 \begin_layout Itemize
3303 Sometimes the original document (from the LyX-team) will be updated.
3304 Use the source viewer at
3305 \begin_inset CommandInset href
3307 name "http://www.lyx.org/trac/timeline"
3308 target "http://www.lyx.org/trac/timeline"
3312 to see what has been changed.
3313 That way you can easily see which parts of the translated document need
3317 \begin_layout Standard
3318 If you ever find an error in the original document, fix it and notify the
3319 rest of the documentation team of the changes! (You didn't forget to join
3320 the documentation team, did you?)
3323 \begin_layout Standard
3324 \begin_inset Branch OutDated
3327 \begin_layout Section
3328 International Keyboard Support
3331 \begin_layout Standard
3334 [Editor's Note: The following section is by
3342 It needs to be fixed to conform to the new Documentation Style sheet and
3343 to make use of the new v1.0 features.
3344 The whole thing also needs to be merged with the section following it.-jw
3345 It may also be badly out of date.-rh (2008)]
3348 \begin_layout Subsection
3349 Defining Own Keymaps: Keymap File Format
3352 \begin_layout Standard
3353 Let's look at a keyboard definition file a little closer.
3354 It is a plain text file defining
3357 \begin_layout Itemize
3358 key-to-key or key-to-string translations
3361 \begin_layout Itemize
3365 \begin_layout Itemize
3366 dead keys exceptions
3369 \begin_layout Standard
3370 To define key-to-key or key-to-string translation, use this command:
3373 \begin_layout Quotation
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_layout Standard
3400 \begin_inset Flex Code
3403 \begin_layout Plain Layout
3409 is the key to be translated and
3410 \begin_inset Flex Code
3413 \begin_layout Plain Layout
3419 is the string to be inserted into the document.
3420 To define dead keys, use:
3423 \begin_layout Quotation
3424 \begin_inset Flex Code
3427 \begin_layout Plain Layout
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_layout Standard
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3459 is a keyboard key and
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3470 The following dead keys are supported (shortcut name is in parentheses):
3473 \begin_layout Quotation
3477 \begin_inset space \hfill{}
3483 \begin_layout Quotation
3485 \begin_inset space \hfill{}
3491 \begin_layout Quotation
3493 \begin_inset space \hfill{}
3499 \begin_layout Quotation
3501 \begin_inset space \hfill{}
3507 \begin_layout Quotation
3509 \begin_inset space \hfill{}
3515 \begin_layout Quotation
3517 \begin_inset space \hfill{}
3524 \begin_layout Plain Layout
3536 \begin_layout Quotation
3538 \begin_inset space \hfill{}
3544 \begin_layout Quotation
3546 \begin_inset space \hfill{}
3553 \begin_layout Plain Layout
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3590 \begin_layout Plain Layout
3602 \begin_layout Quotation
3604 \begin_inset space \hfill{}
3611 \begin_layout Plain Layout
3623 \begin_layout Quotation
3625 \begin_inset space \hfill{}
3631 \begin_layout Quotation
3632 hungarian umlaut (hug)
3633 \begin_inset space \hfill{}
3639 \begin_layout Quotation
3641 \begin_inset space \hfill{}
3647 \begin_layout Quotation
3649 \begin_inset space \hfill{}
3656 \begin_layout Plain Layout
3668 \begin_layout Standard
3669 Since in many international keyboards there are exceptions to what some
3670 dead keys should do, you can define them using
3673 \begin_layout Quotation
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3685 deadkey key outstring
3688 \begin_layout Standard
3689 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3693 \begin_layout Quotation
3694 \begin_inset Flex Code
3697 \begin_layout Plain Layout
3710 \begin_layout Standard
3711 to make it work correctly.
3712 Also, you have to define as exceptions dead keys over i and j, to remove
3713 the dot from them before inserting an accent mark.
3714 I will change this when the time comes, but so far I haven't had time.
3717 \begin_layout Standard
3718 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3721 \begin_inset Flex Code
3724 \begin_layout Plain Layout
3730 have different meaning.
3732 \begin_inset Flex Code
3735 \begin_layout Plain Layout
3741 marks comments, quotes start and end LaTeX-style commands.
3742 To enter quote, you'll need to use
3743 \begin_inset Flex Code
3746 \begin_layout Plain Layout
3755 \begin_inset Flex Code
3758 \begin_layout Plain Layout
3765 \begin_inset Flex Code
3768 \begin_layout Plain Layout
3779 \begin_layout Standard
3780 If you make a keyboard description file that works for your language, please
3781 mail it to me, so I can include it in the next keymap distribution.
3784 \begin_layout Standard
3785 More keywords will be supported in keymap configuration file in future,
3789 \begin_layout Itemize
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3804 \begin_inset space \hfill{}
3808 \begin_inset Flex Code
3811 \begin_layout Plain Layout
3820 \begin_layout Itemize
3821 \begin_inset Flex Code
3824 \begin_layout Plain Layout
3835 \begin_inset space \hfill{}
3839 \begin_inset Flex Code
3842 \begin_layout Plain Layout
3848 an external keymap translation program
3851 \begin_layout Standard
3852 Also, it should look into
3853 \begin_inset Flex Code
3856 \begin_layout Plain Layout
3862 file for defaults, too (for example, a
3863 \begin_inset Flex Code
3866 \begin_layout Plain Layout
3874 option to include default keyboard).
3882 \begin_layout Section
3883 International Keymap Stuff
3884 \begin_inset CommandInset label
3886 name "sec:International-Keymap-Stuff"
3893 \begin_layout Standard
3894 \begin_inset Note Note
3897 \begin_layout Plain Layout
3898 In doing the revisions on this document in March 2008, I did not look over
3899 this stuff, as I do not understand it.
3900 It would be good if someone else could do so.
3909 \begin_layout Standard
3910 The next two sections describe the
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3934 file syntax in detail.
3935 These sections should help you design your own key map if the ones provided
3936 do not meet your needs.
3939 \begin_layout Subsection
3943 \begin_layout Standard
3947 \begin_inset Flex Code
3950 \begin_layout Plain Layout
3956 file maps keystrokes to characters or strings.
3957 As the name suggests, it sets a keyboard mapping.
3959 \begin_inset Flex Code
3962 \begin_layout Plain Layout
3973 \begin_inset Flex Code
3976 \begin_layout Plain Layout
3991 \begin_inset Flex Code
3994 \begin_layout Plain Layout
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4030 are described in this section.
4033 \begin_layout Labeling
4034 \labelwidthstring 00.00.0000
4035 \begin_inset Flex Code
4038 \begin_layout Plain Layout
4046 Map a character to a string
4049 \begin_layout LyX-Code
4064 \begin_layout Standard
4097 the double-quote (")
4114 must be escaped with a preceding backslash (
4125 \begin_layout Standard
4127 \begin_inset Flex MenuItem
4130 \begin_layout Plain Layout
4138 statement to cause the symbol
4139 \begin_inset Flex MenuItem
4142 \begin_layout Plain Layout
4150 to be output for the keystroke
4151 \begin_inset Flex MenuItem
4154 \begin_layout Plain Layout
4165 \begin_layout LyX-Code
4171 \begin_layout Labeling
4172 \labelwidthstring 00.00.0000
4173 \begin_inset Flex Code
4176 \begin_layout Plain Layout
4184 Specify an accent character
4187 \begin_layout LyX-Code
4196 \begin_layout Standard
4197 This will make the cha
4235 This is the dead key
4239 \begin_layout Plain Layout
4246 refers to a key that does not produce a character by itself, but when followed
4247 with another key, produces the desired accent character.
4248 For example, a German characte
4250 r with an umlaut like
4260 can be produced in this manner.
4269 \begin_layout Standard
4282 and then another key not in
4299 followed by the other, not allowed key, as output.
4303 \begin_inset Flex MenuItem
4306 \begin_layout Plain Layout
4314 cancels a dead key, so if
4325 \begin_inset Flex MenuItem
4328 \begin_layout Plain Layout
4337 , the cursor will not go one position backwards but will instead cancel
4353 might have had on the next keystroke.
4357 \begin_layout Standard
4358 The following example specifies that the character ' is to be an acute accent,
4359 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4362 \begin_layout LyX-Code
4365 kmod ' acute aeiouAEIOU
4368 \begin_layout Labeling
4369 \labelwidthstring 00.00.0000
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 Specify an exception to the accent character
4382 \begin_layout LyX-Code
4391 \begin_layout Standard
4392 This defines an exce
4433 have been assigned a keystroke with a previous
4436 \begin_inset Flex Code
4439 \begin_layout Plain Layout
4463 must not belong in the
4510 If such a declaration does not exist in
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4555 \begin_inset Flex Code
4558 \begin_layout Plain Layout
4572 \begin_layout Standard
4573 The following command produces causes äi to be produced when you enter acute-i
4577 \begin_layout LyX-Code
4591 \begin_layout Labeling
4592 \labelwidthstring 00.00.0000
4593 \begin_inset Flex Code
4596 \begin_layout Plain Layout
4602 Combine two accent characters
4605 \begin_layout LyX-Code
4611 accent1 accent2 allowed
4614 \begin_layout Standard
4615 This one is getting pretty esoteric.
4616 It allows you to combine the effect
4672 \begin_inset Flex Code
4675 \begin_layout Plain Layout
4703 \begin_layout Standard
4704 Consider this example from the
4705 \begin_inset Flex Code
4708 \begin_layout Plain Layout
4719 \begin_layout LyX-Code
4722 kmod ; acute aeioyvhAEIOYVH
4726 kcomb acute umlaut iyIY
4729 \begin_layout Standard
4730 This allows you to press
4731 \begin_inset Flex MenuItem
4734 \begin_layout Plain Layout
4742 and get the effect of
4743 \begin_inset Flex Code
4746 \begin_layout Plain Layout
4765 in this case cancels the last dead key, so if you press
4766 \begin_inset Flex MenuItem
4769 \begin_layout Plain Layout
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4794 \begin_layout Subsection
4798 \begin_layout Standard
4800 \begin_inset Flex Code
4803 \begin_layout Plain Layout
4811 mapping is performed, a
4812 \begin_inset Flex Code
4815 \begin_layout Plain Layout
4825 file maps the strings that the symbols generate to characters in the current
4827 The LyX distribution currently includes at least the
4828 \begin_inset Flex Code
4831 \begin_layout Plain Layout
4840 \begin_inset Flex Code
4843 \begin_layout Plain Layout
4854 \begin_layout Standard
4856 \begin_inset Flex Code
4859 \begin_layout Plain Layout
4867 file is a sequence of declarations of the form
4870 \begin_layout LyX-Code
4883 \begin_layout Standard
4884 For example, in order to map
4885 \begin_inset Flex MenuItem
4888 \begin_layout Plain Layout
4898 to the corresponding character in the iso-8859-1 set (233), the following
4902 \begin_layout LyX-Code
4910 \begin_layout Standard
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4924 \begin_inset Flex Code
4927 \begin_layout Plain Layout
4945 the same character can apply to more than one string.
4947 \begin_inset Flex Code
4950 \begin_layout Plain Layout
4961 \begin_layout LyX-Code
4973 \begin_inset Newline newline
4989 \begin_layout Standard
4990 If LyX cannot find a mapping for the string produced by the keystroke or
4991 a deadkey sequence, it will check if it looks like an accented char and
4992 try to draw an accent over the character on screen.
4995 \begin_layout Subsection
4999 \begin_layout Standard
5000 There is a second way to add support for international characters through
5001 so-called dead-keys.
5002 A dead-key works in combination with a letter to produce an accented character.
5003 Here, we'll explain how to create a really simple dead-key to illustrate
5007 \begin_layout Standard
5008 Suppose you happen to need the circumflex character,
5009 \begin_inset Quotes eld
5013 \begin_inset Quotes erd
5018 \begin_inset Flex MenuItem
5021 \begin_layout Plain Layout
5028 \begin_inset space ~
5032 \begin_inset Flex MenuItem
5035 \begin_layout Plain Layout
5041 ] to the LyX command
5042 \begin_inset Flex Code
5045 \begin_layout Plain Layout
5052 \begin_inset Flex Code
5055 \begin_layout Plain Layout
5062 Now, whenever you type the
5063 \begin_inset Flex MenuItem
5066 \begin_layout Plain Layout
5072 -key followed by a letter, that letter will have a circumflex accent on
5074 For example, the sequence
5075 \begin_inset Quotes eld
5079 \begin_inset Flex MenuItem
5082 \begin_layout Plain Layout
5089 \begin_inset Quotes erd
5092 produces the letter:
5093 \begin_inset Quotes eld
5097 \begin_inset Quotes erd
5101 If you tried to type
5102 \begin_inset Quotes eld
5106 \begin_inset Flex MenuItem
5109 \begin_layout Plain Layout
5116 \begin_inset Quotes erd
5119 , however, LyX will complain with a beep, since a
5120 \begin_inset Quotes eld
5124 \begin_inset Flex MenuItem
5127 \begin_layout Plain Layout
5134 \begin_inset Quotes erd
5137 never takes a circumflex accent.
5139 \begin_inset Flex MenuItem
5142 \begin_layout Plain Layout
5148 after a dead-key produces the bare-accent.
5149 Please note this last point! If you bind a key to a dead-key, you'll need
5150 to rebind the character on that key to yet another key.
5152 \begin_inset Flex MenuItem
5155 \begin_layout Plain Layout
5161 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5164 \begin_layout Standard
5165 One common way to bind dead-keys is to use
5166 \begin_inset Flex MenuItem
5169 \begin_layout Plain Layout
5176 \begin_inset Flex MenuItem
5179 \begin_layout Plain Layout
5186 \begin_inset Flex MenuItem
5189 \begin_layout Plain Layout
5195 in combination with an accent, like
5196 \begin_inset Quotes eld
5200 \begin_inset Flex MenuItem
5203 \begin_layout Plain Layout
5210 \begin_inset Quotes erd
5214 \begin_inset Quotes eld
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5228 \begin_inset Quotes erd
5232 \begin_inset Quotes eld
5236 \begin_inset Flex MenuItem
5239 \begin_layout Plain Layout
5246 \begin_inset Quotes erd
5250 Another way involves using
5251 \begin_inset Flex Code
5254 \begin_layout Plain Layout
5261 \begin_inset Flex Code
5264 \begin_layout Plain Layout
5270 to set up the special
5271 \begin_inset Flex Code
5274 \begin_layout Plain Layout
5282 \begin_inset Flex Code
5285 \begin_layout Plain Layout
5291 acts in some ways just like
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5301 and permits you to bind keys to accented characters.
5302 You can also turn keys into dead-keys by binding them to something like
5304 \begin_inset Flex Code
5307 \begin_layout Plain Layout
5313 and then binding this symbolic key to the corresponding LyX command.
5317 \begin_layout Plain Layout
5322 : This is exactly what I do in my
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5344 \begin_inset Flex MenuItem
5347 \begin_layout Plain Layout
5349 \begin_inset space ~
5358 \begin_inset Flex Code
5361 \begin_layout Plain Layout
5367 and a bunch of these
5368 \begin_inset Quotes eld
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5382 \begin_inset Quotes erd
5385 symbolic keys bound such things as
5386 \begin_inset Flex MenuItem
5389 \begin_layout Plain Layout
5391 \begin_inset space ~
5400 \begin_inset Flex MenuItem
5403 \begin_layout Plain Layout
5405 \begin_inset space ~
5414 This is how I produce my accented characters.
5419 You can make just about anything into the
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5430 \begin_inset Flex MenuItem
5433 \begin_layout Plain Layout
5439 keys, a spare function key, etc.
5440 As for the LyX commands that produce accents, check the entry for
5441 \begin_inset Flex Code
5444 \begin_layout Plain Layout
5455 You'll find the complete list there.
5458 \begin_layout Subsection
5459 Saving your Language Configuration
5462 \begin_layout Standard
5463 You can edit your preferences so that your desired language environment
5464 is automatically configured when LyX starts up, via the
5465 \begin_inset Flex MenuItem
5468 \begin_layout Plain Layout
5469 Edit\SpecialChar \menuseparator
5478 \begin_layout Chapter
5479 Installing New Document Classes, Layouts, and Templates
5480 \begin_inset CommandInset label
5482 name "cha:Installing-New-Document"
5487 \begin_inset Argument 1
5490 \begin_layout Plain Layout
5491 Installing New Document Classes
5499 \begin_layout Standard
5500 In this chapter, we describe the procedures for creating and installing
5501 new LyX layout and template files, as well as offer a refresher on correctly
5502 installing new LaTeX document classes.
5506 \begin_layout Standard
5507 First, let us a say a few words about how one ought to think about the relation
5508 between LyX and LaTeX.
5509 The thing to understand is that, in a certain sense, LyX doesn't know anything
5511 Indeed, from LyX's point of view, LaTeX is just one of several
5512 \begin_inset Quotes eld
5516 \begin_inset Quotes erd
5519 in which it is capable of producing output.
5520 Other such formats are DocBook, plaintext, and XHTML.
5521 LaTeX is, of course, a particularly important format, but very little of
5522 the information LyX has about LaTeX is actually contained in the program
5527 \begin_layout Plain Layout
5528 Some commands are sufficiently complex that they are
5529 \begin_inset Quotes eld
5533 \begin_inset Quotes erd
5537 But the developers generally regard this as a Bad Thing.
5542 Rather, that information, even for the standard classes like
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5552 , is contained in `layout files'.
5553 Similarly, LyX itself does not know much about DocBook or XHTML.
5554 What it knows is contained in layout files.
5557 \begin_layout Standard
5558 You can think of the layout file for a given document class as a translation
5559 manual between LyX constructs---paragraphs with their corresponding styles,
5560 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5562 Almost everything LyX knows about
5563 \begin_inset Flex Code
5566 \begin_layout Plain Layout
5572 , for example, is contained in the file
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5582 and in various other files it includes.
5583 For this reason, anyone intending to write layout files should plan to
5584 study the existing files.
5585 A good place to start is with
5586 \begin_inset Flex Code
5589 \begin_layout Plain Layout
5595 , which is included in
5596 \begin_inset Flex Code
5599 \begin_layout Plain Layout
5606 \begin_inset Flex Code
5609 \begin_layout Plain Layout
5615 , and many of the other layout files for document classes.
5616 This file is where sections and the like are defined:
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5626 tells LyX how paragraphs that are marked with the Section, Subsection,
5627 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5630 \begin_inset Flex Code
5633 \begin_layout Plain Layout
5639 file basically just includes several of these
5640 \begin_inset Flex Code
5643 \begin_layout Plain Layout
5652 \begin_layout Standard
5653 Defining the LyX--LaTeX correspondence is not the only thing layout files
5655 Their other job is to define how the LyX constructs themselves will appear
5657 The fact that layout files have these two jobs is often a source of confusion,
5658 because they are completely separate.
5659 Telling LyX how to translate a certain paragraph style into LaTeX does
5660 not tell LyX how to display it; conversely, telling LyX how to display
5661 a certain paragraph style does not tell LyX how to translate it into LaTeX
5662 (let alone tell LaTeX how to display it).
5663 So, in general, when you define a new LyX construct, you must always do
5664 two quite separate things: (i)
5665 \begin_inset space ~
5668 tell LyX how to translate it into LaTeX and (ii)
5669 \begin_inset space ~
5672 tell LyX how to display it.
5675 \begin_layout Standard
5676 Much the same is true, of course, as regards LyX's other backend formats,
5677 though XHTML is in some ways different, because in that case LyX
5681 able, to some extent, to use information about how it should display a
5682 paragraph on the screen to output information (in the form of CSS) about
5683 how the paragraph should be displayed in a browser.
5684 Even in this case, however, the distinction between what LyX does internally
5685 and how things are rendered externally remains in force, and the two can
5686 be controlled separately.
5688 \begin_inset CommandInset ref
5690 reference "sec:Tags-for-XHTML"
5697 \begin_layout Section
5698 Installing new LaTeX files
5701 \begin_layout Standard
5702 Some installations may not include a LaTeX package or class file that you
5703 would like to use within LyX.
5704 For example, you might need FoilTeX, a package for preparing slides for
5705 overhead projectors.
5706 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5707 a user interface for installing such packages.
5708 For example, with MiKTeX, you start the program
5709 \begin_inset Quotes eld
5713 \begin_inset space ~
5717 \begin_inset Quotes erd
5720 to get a list of available packages.
5721 To install one of them, right click on it or use the corresponding toolbar
5725 \begin_layout Standard
5726 If your LaTeX distribution does not provide such a `package manager', or
5727 if the package is not available from your distribution, then follow these
5728 steps to install it manually:
5731 \begin_layout Enumerate
5732 Get the package from
5733 \begin_inset CommandInset href
5736 target "http://www.ctan.org/"
5743 \begin_layout Enumerate
5744 If the package contains a file with the ending
5745 \begin_inset Quotes eld
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5759 \begin_inset Quotes erd
5762 (is the case for FoilTeX) then open a console, change to the folder of
5763 this file and execute the command
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5774 You have now unpacked the package and have all files to install it.
5775 Most LaTeX-packages are not packed and you can skip this step.
5778 \begin_layout Enumerate
5779 Now you need to decide if the package should be available for all users
5784 \begin_layout Enumerate
5785 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5786 for all users on your system, then install it in your `local' TeX tree,
5787 otherwise install it in your own `user' TeX tree.
5788 Where these trees should be created, if they do not already exist, depends
5790 To find this out, look in the file
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5804 \begin_layout Plain Layout
5805 This is usually in the directory
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5815 , though you can execute the command
5816 \begin_inset Flex Code
5819 \begin_layout Plain Layout
5830 The location of the `local' TeX tree is defined by the
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 variable; this is usually somewhere like
5841 \begin_inset Flex Code
5844 \begin_layout Plain Layout
5845 /usr/local/share/texmf
5851 The location of the `user' TeX tree is defined by
5852 \begin_inset Flex Code
5855 \begin_layout Plain Layout
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5872 (If these variables are not predefined, you have to define them.) You'll
5873 probably need root permissions to create or modify the `local' tree, but
5874 not for your `user' tree.
5875 \begin_inset Newline newline
5878 In general, it is recommended to install in the user tree because your user
5879 will not be modified or even overwritten when you upgrade your system.
5880 It will typically also be backed up together with everything else when
5881 you backup your home directory (which, of course, you do on a regular basis).
5884 \begin_layout Enumerate
5885 On Windows, if you want the new package to be available for all users on
5886 your system, change to the folder where LaTeX is installed and then change
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 (For MiKTeX, this would be by default the folder
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5924 \begin_layout Plain Layout
5925 Note that this will be the correct path only on English installations.
5926 On a German one, it would be
5927 \begin_inset Flex Code
5930 \begin_layout Plain Layout
5944 , and similarly for other languages.
5949 Create there a new folder
5950 \begin_inset Flex Code
5953 \begin_layout Plain Layout
5959 and copy all files of the package into it.
5961 \begin_inset Newline newline
5964 If the package should only available for you or you don't have admin permissions
5965 , do the same, but in the local LaTeX folder.
5967 \begin_inset space \thinspace{}
5971 \begin_inset space ~
5974 2.8 under Windows XP, this would be the folder:
5975 \begin_inset Newline newline
5981 \begin_inset Flex Code
5984 \begin_layout Plain Layout
5987 Documents and Settings
5999 \begin_inset Newline newline
6005 \begin_inset Phantom HPhantom
6008 \begin_layout Plain Layout
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6035 \begin_inset Newline newline
6038 On Vista, it would be:
6039 \begin_inset Newline newline
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6072 \begin_layout Enumerate
6073 Now one only need to tell LaTeX that there are new files.
6074 This depends on the used LaTeX-Distribution:
6078 \begin_layout Enumerate
6079 For TeXLive execute the command
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6090 If you installed the package for all users, then you will probably need
6091 to have root permissions for that.
6094 \begin_layout Enumerate
6095 For MiKTeX, if you have installed the package for all users, start the program
6097 \begin_inset Quotes eld
6101 \begin_inset space ~
6105 \begin_inset Quotes erd
6108 and press the button marked
6109 \begin_inset Quotes eld
6113 \begin_inset Quotes erd
6117 Otherwise start the program
6118 \begin_inset Quotes eld
6122 \begin_inset Quotes erd
6129 \begin_layout Enumerate
6130 Finally, you need to tell LyX that there are new packages available.
6131 So, in LyX, use the menu
6132 \begin_inset Flex MenuItem
6135 \begin_layout Plain Layout
6138 \SpecialChar \menuseparator
6144 and then restart LyX.
6147 \begin_layout Standard
6148 Now the package is installed.
6149 In our example, the document class
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6155 \begin_inset space ~
6162 \begin_layout Plain Layout
6174 will now be available under
6175 \begin_inset Flex MenuItem
6178 \begin_layout Plain Layout
6179 Document\SpecialChar \menuseparator
6180 Settings\SpecialChar \menuseparator
6190 \begin_layout Standard
6191 If you would like to use a LaTeX document class that is not even listed
6193 \begin_inset Flex MenuItem
6196 \begin_layout Plain Layout
6197 Document\SpecialChar \menuseparator
6198 Settings\SpecialChar \menuseparator
6204 , then you need to create a `layout' file for it.
6205 That is the topic of the next section.
6208 \begin_layout Section
6209 Types of layout files
6212 \begin_layout Standard
6213 This section describes the various sorts of LyX files that contain layout
6215 These files describe various paragraph and character styles, determining
6216 how LyX should display them and how they should be translated into LaTeX,
6217 DocBook, XHTML, or whatever output format is being used.
6221 \begin_layout Standard
6222 We shall try to provide a thorough description of the process of writing
6224 However, there are so many different types of documents supported even
6225 by just LaTeX that we can't hope to cover every different possibility or
6226 problem you might encounter.
6227 The LyX users' list is frequented by people with lots of experience with
6228 layout design who are willing to share what they've learned, so please
6229 feel free to ask questions there.
6232 \begin_layout Standard
6233 As you prepare to write a new layout, it is extremely helpful to look at
6234 the layouts distributed with LyX.
6235 If you write a LyX layout for a LaTeX document class that might also be
6236 used by others, or write a module that might be useful to others, then
6237 you should consider posting your layout to the
6238 \begin_inset CommandInset href
6240 name "layout section on the LyX wiki"
6241 target "http://wiki.lyx.org/Layouts/Layouts"
6245 or even to the LyX developers' list, so that it might be included in LyX
6250 \begin_layout Plain Layout
6251 Note that LyX is licensed under the General Public License, so any material
6252 that is contributed to LyX must be similarly licensed.
6260 \begin_layout Subsection
6262 \begin_inset CommandInset label
6264 name "sub:Layout-modules"
6271 \begin_layout Standard
6272 We have spoken to this point about `layout files'.
6273 But there are different sorts of files that contain layout information.
6274 Layout files, strictly so called, have the
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 extension and provide LyX with information about document classes.
6285 As of LyX 1.6, however, layout information can also be contained in layout
6291 \begin_inset Flex Code
6294 \begin_layout Plain Layout
6301 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6302 some modules—such as the
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6312 module—specifically provide support for one package.
6313 In a sense, layout modules are similar to included
6317 \begin_layout Plain Layout
6318 These can have any extension, but by convention have the
6319 \begin_inset Flex Code
6322 \begin_layout Plain Layout
6334 \begin_inset Flex Code
6337 \begin_layout Plain Layout
6343 —in that modules are not specific to a given document class but may be used
6344 with many different classes.
6345 The difference is that using an included file with
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6355 requires editing that file.
6356 Modules, by contrast, are selected in the
6357 \begin_inset Flex MenuItem
6360 \begin_layout Plain Layout
6361 Document\SpecialChar \menuseparator
6370 \begin_layout Standard
6371 Building modules is the easiest way to get started with layout editing,
6372 since it can be as simple as adding a single new paragraph style or flex
6374 But modules may, in principle, contain anything a layout file can contain.
6377 \begin_layout Standard
6378 After creating a new module and copying it to the
6379 \begin_inset Flex Code
6382 \begin_layout Plain Layout
6388 folder, you will need to reconfigure and then restart LyX for the module
6389 to appear in the menu.
6390 However, changes you make to the module will be seen immediately, if you
6392 \begin_inset Flex MenuItem
6395 \begin_layout Plain Layout
6396 Document\SpecialChar \menuseparator
6402 , highlight something, and then hit
6403 \begin_inset Quotes eld
6407 \begin_inset Quotes erd
6413 It is strongly recommended that you save your work before doing this
6418 it is strongly recommended that you not attempt to edit modules while simultaneo
6419 usly working on actual documents
6422 Though of course the developers strive to keep LyX stable in such situations,
6423 syntax errors and the like in your module file could cause strange behavior.
6426 \begin_layout Subsubsection
6430 \begin_layout Standard
6431 Modules are to LyX as packages are to LaTeX.
6432 Sometimes, however, you find yourself wanting a specific inset or character
6433 style just for one document and writing a module that will also be available
6434 to other documents makes little sense.
6435 What you need is LyX's
6436 \begin_inset Quotes eld
6440 \begin_inset Quotes erd
6446 \begin_layout Standard
6447 You will find it under
6449 Document\SpecialChar \menuseparator
6450 Settings\SpecialChar \menuseparator
6454 The large text box allows you to enter anything that you might enter in
6455 a layout file or module.
6456 You can think of a document's local layout, in fact, as a module that belongs
6458 So, in particular, you must enter a
6459 \begin_inset Flex Code
6462 \begin_layout Plain Layout
6469 Any format is acceptable, but one would normally use the format current
6471 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6472 layout is not supported by versions of LyX prior to 1.6, so you should not
6473 use it if you want to be able to export your document to LyX 1.5 or earlier
6474 (without, that is, losing the local layout information).
6475 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6476 though there is no UI for it---then you should use format 11 and, of course,
6477 use only layout constructs that were available in LyX 1.6.
6480 \begin_layout Standard
6481 When you have entered something in the
6482 \begin_inset Flex Code
6485 \begin_layout Plain Layout
6491 pane, LyX will enable the
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6499 button at the bottom.
6500 Clicking this button will cause LyX to determine whether what you have
6501 entered is valid layout information for the chosen format.
6502 LyX will report the result but, unfortunately, will not tell you what errors
6503 there might have been.
6504 These will be written to the terminal, however, if LyX is started from
6506 You will not be permitted to save your local layout until you have entered
6510 \begin_layout Standard
6511 The warnings at the end of the previous section apply here, too.
6512 Do not play with local layout while you are actually working, especially
6513 if you have not saved your document.
6514 That said, using local layout with a test document can be a very convenient
6515 way to try out layout ideas, or even to start developing a module.
6518 \begin_layout Subsection
6520 \begin_inset Flex MenuItem
6523 \begin_layout Plain Layout
6532 \begin_layout Standard
6533 There are two situations you are likely to encounter when wanting to support
6534 a new LaTeX document class, involving style (
6535 \begin_inset Flex Code
6538 \begin_layout Plain Layout
6544 ) files and LaTeX2e class (
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6555 Supporting a style file is usually fairly easy.
6556 Supporting a new class file is a bit harder.
6557 We'll discuss the former in this section and the latter in the next.
6558 Similar remarks apply, of course, if you want to support a new DocBook
6562 \begin_layout Standard
6563 The easier case is the one in which your new document class is provided
6564 as a style file that is to be used in conjunction with an already supported
6566 For the sake of the example, we'll assume that the style file is called
6568 \begin_inset Flex MenuItem
6571 \begin_layout Plain Layout
6577 and that it is meant to be used with
6578 \begin_inset Flex MenuItem
6581 \begin_layout Plain Layout
6587 , which is a standard class.
6591 \begin_layout Standard
6592 Start by copying the existing class's layout file into your local directory:
6596 \begin_layout Plain Layout
6597 Of course, which directory is your local directory will vary by platform,
6598 and LyX allows you to specify your local directory on startup, too, using
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6617 \begin_layout LyX-Code
6618 cp report.layout ~/.lyx/layouts/myclass.layout
6621 \begin_layout Standard
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 and change the line:
6635 \begin_layout LyX-Code
6638 DeclareLaTeXClass{report}
6641 \begin_layout Standard
6645 \begin_layout LyX-Code
6648 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6651 \begin_layout Standard
6655 \begin_layout LyX-Code
6657 \begin_inset Newline newline
6663 \begin_inset Newline newline
6669 \begin_layout Standard
6670 near the top of the file.
6673 \begin_layout Standard
6674 Start LyX and select
6675 \begin_inset Flex MenuItem
6678 \begin_layout Plain Layout
6679 Tools\SpecialChar \menuseparator
6686 Then restart LyX and try creating a new document.
6688 \begin_inset Flex MenuItem
6691 \begin_layout Plain Layout
6697 " as a document class option in the
6698 \begin_inset Flex MenuItem
6701 \begin_layout Plain Layout
6702 Document\SpecialChar \menuseparator
6709 It is likely that some of the sectioning commands and such in your new
6710 class will work differently from how they worked in the base class—
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6720 in this example—so you can fiddle around with the settings for the different
6721 sections if you wish.
6722 The layout information for sections is contained in
6723 \begin_inset Flex Code
6726 \begin_layout Plain Layout
6732 , but you do not need to copy and change this file.
6733 Instead, you can simply add your changes to your layout file, after the
6735 \begin_inset Flex Code
6738 \begin_layout Plain Layout
6744 , which itself includes
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6755 For example, you might add these lines:
6758 \begin_layout LyX-Code
6762 \begin_layout LyX-Code
6766 \begin_layout LyX-Code
6770 \begin_layout LyX-Code
6774 \begin_layout LyX-Code
6778 \begin_layout Standard
6779 to change the font for chapter headings to sans-serif.
6780 This will override (or, in this case, add to) the existing declaration
6781 for the Chapter style.
6785 \begin_layout Standard
6786 Your new package may also provide commands or environments not present in
6788 In this case, you will want to add these to the layout file.
6790 \begin_inset space ~
6794 \begin_inset CommandInset ref
6796 reference "sec:TextClass"
6800 for information on how to do so.
6803 \begin_layout Standard
6805 \begin_inset Flex MenuItem
6808 \begin_layout Plain Layout
6814 can be used with several different document classes, and even if it cannot,
6815 you might find it easiest just to write a module that you can load with
6817 The simplest possible such module would be:
6820 \begin_layout LyX-Code
6823 DeclareLyXModule{My Package}
6826 \begin_layout LyX-Code
6830 \begin_layout LyX-Code
6831 #Support for mypkg.sty.
6834 \begin_layout LyX-Code
6836 \begin_inset Newline newline
6842 \begin_layout LyX-Code
6844 \begin_inset Newline newline
6850 \begin_layout LyX-Code
6852 \begin_inset Newline newline
6858 \begin_inset Newline newline
6864 \begin_layout Standard
6865 A more complex module might modify the behavior of some existing constructs
6866 or define some new ones.
6868 \begin_inset space ~
6872 \begin_inset CommandInset ref
6874 reference "sec:TextClass"
6881 \begin_layout Subsection
6883 \begin_inset Flex MenuItem
6886 \begin_layout Plain Layout
6895 \begin_layout Standard
6896 There are two possibilities here.
6897 One is that the class file is itself based upon an existing document class.
6898 For example, many thesis classes are based upon
6899 \begin_inset Flex MenuItem
6902 \begin_layout Plain Layout
6909 To see whether yours is, look for a line like
6912 \begin_layout LyX-Code
6918 \begin_layout Standard
6920 If so, then you may proceed largely as in the previous section, though
6922 \begin_inset Flex Code
6925 \begin_layout Plain Layout
6931 line will be different.
6932 If your new class is
6933 \begin_inset Flex Code
6936 \begin_layout Plain Layout
6942 and it is based upon
6943 \begin_inset Flex Code
6946 \begin_layout Plain Layout
6952 , then the line should read:
6956 \begin_layout Plain Layout
6957 And it will be easiest if you save the file to
6958 \begin_inset Flex Code
6961 \begin_layout Plain Layout
6967 : LyX assumes that the document class has the same name as the layout file.
6976 \begin_layout LyX-Code
6979 DeclareLaTeXClass[thesis,book]{thesis}
6982 \begin_layout Standard
6983 If, on the other hand, the new class is not based upon an existing class,
6984 you will probably have to
6985 \begin_inset Quotes eld
6989 \begin_inset Quotes erd
6993 We strongly suggest copying an existing layout file which uses a similar
6994 LaTeX class and then modifying it, if you can do so.
6995 At least use an existing file as a starting point so you can find out what
6996 items you need to worry about.
6997 Again, the specifics are covered below.
7000 \begin_layout Subsection
7002 \begin_inset CommandInset label
7004 name "sub:Creating-Templates"
7011 \begin_layout Standard
7012 Once you have written a layout file for a new document class, you might
7013 want to consider writing a
7018 A template acts as a kind of tutorial for your layout, showing how it might
7019 be used, though containing dummy content.
7020 You can of course look at the various templates included with LyX for ideas.
7023 \begin_layout Standard
7024 Templates are created just like usual documents: using LyX.
7025 The only difference is that usual documents contain all possible settings,
7026 including the font scheme and the paper size.
7027 Usually a user doesn't want a template to overwrite his preferred settings
7028 for such parameters.
7029 For that reason, the designer of a template should remove the corresponding
7031 \begin_inset Flex Code
7034 \begin_layout Plain Layout
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7054 from the template LyX file.
7055 This can be done with any simple text-editor, for example
7056 \begin_inset Flex Code
7059 \begin_layout Plain Layout
7066 \begin_inset Flex Code
7069 \begin_layout Plain Layout
7078 \begin_layout Standard
7079 Put the edited template files you create in
7080 \begin_inset Flex Code
7083 \begin_layout Plain Layout
7089 , copy the ones you use from the global template directory in
7090 \begin_inset Flex Code
7093 \begin_layout Plain Layout
7099 to the same place, and redefine the template path in the
7100 \begin_inset Flex MenuItem
7103 \begin_layout Plain Layout
7104 Tools\SpecialChar \menuseparator
7105 Preferences\SpecialChar \menuseparator
7114 \begin_layout Standard
7115 Note, by the way, that there is a template which has a particular meaning:
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7127 This template is loaded every time you create a new document with
7128 \begin_inset Flex MenuItem
7131 \begin_layout Plain Layout
7132 File\SpecialChar \menuseparator
7138 in order to provide useful defaults.
7139 To create this template from inside LyX, all you have to do is to open
7140 a document with the correct settings, and use the
7141 \begin_inset Flex MenuItem
7144 \begin_layout Plain Layout
7145 Save as Document Defaults
7153 \begin_layout Subsection
7154 Upgrading old layout files
7157 \begin_layout Standard
7158 The format of layout files changes with each LyX release, so old layout
7159 files need to be converted to the new format.
7160 If LyX reads a layout file in an older format, it automatically calls the
7162 \begin_inset Flex Code
7165 \begin_layout Plain Layout
7171 to convert it to a temporary file in current format.
7172 The original file is left untouched.
7173 If you use the layout file often, then, you may want to convert it permanently,
7174 so that LyX does not have to do so itself every time.
7175 To do this, you can call the converter manually:
7178 \begin_layout Enumerate
7180 \begin_inset Flex Code
7183 \begin_layout Plain Layout
7190 \begin_inset Flex Code
7193 \begin_layout Plain Layout
7202 \begin_layout Enumerate
7204 \begin_inset Newline newline
7208 \begin_inset Flex Code
7211 \begin_layout Plain Layout
7212 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7218 \begin_inset Newline newline
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7231 is the name of your LyX system directory.
7234 \begin_layout Standard
7235 Note that manual conversion does not affect included files, so these will
7236 have to be converted separately.
7239 \begin_layout Section
7240 \begin_inset CommandInset label
7242 name "sec:TextClass"
7246 The layout file format
7249 \begin_layout Standard
7250 The following sections describe how layout files are structured and written.
7251 Our advice is to go slowly, save and test often.
7252 It is really not that hard, except that the multitude of options can become
7253 overwhelming, especially if you try to check out too many at once.
7254 It becomes easier if you use existing layouts of LyX as examples/reference
7255 or if you modify an existing layout to your needs.
7258 \begin_layout Standard
7259 Note that all the tags used in layout files are case-insensitive.
7261 \begin_inset Flex Code
7264 \begin_layout Plain Layout
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7281 \begin_inset Flex Code
7284 \begin_layout Plain Layout
7290 are really the same tag.
7291 The possible arguments are printed in brackets after the tag's name.
7292 The default argument is typeset
7293 \begin_inset Flex Code
7296 \begin_layout Plain Layout
7305 If the argument has a data type like
7306 \begin_inset Quotes eld
7310 \begin_inset Quotes erd
7314 \begin_inset Quotes eld
7318 \begin_inset Quotes erd
7321 , the default is shown like this:
7322 \begin_inset Flex Code
7325 \begin_layout Plain Layout
7336 \begin_layout Subsection
7337 The document class declaration
7338 \change_inserted -712698321 1349766602
7344 \begin_layout Standard
7345 Lines in a layout file which begin with
7346 \begin_inset Flex Code
7349 \begin_layout Plain Layout
7356 There is one exception to this rule.
7358 \begin_inset Flex Code
7361 \begin_layout Plain Layout
7367 files should begin with
7368 \change_deleted -712698321 1349766533
7372 \change_inserted -712698321 1349766536
7378 \begin_layout LyX-Code
7381 #% Do not delete the line below; configure depends on this
7384 \begin_layout LyX-Code
7390 \change_deleted -712698321 1349766193
7392 \change_inserted -712698321 1349766201
7393 Article (Standard Class)
7396 \change_inserted -712698321 1349766538
7400 \begin_layout LyX-Code
7402 \change_inserted -712698321 1349766581
7407 DeclareCategory{Articles}
7412 \begin_layout Standard
7414 \change_inserted -712698321 1349766695
7418 \change_inserted -712698321 1349766626
7422 \change_deleted -712698321 1349766628
7424 \change_inserted -712698321 1349766628
7427 used when you (re)configure LyX.
7428 The layout file is read by the LaTeX script
7429 \begin_inset Flex Code
7432 \begin_layout Plain Layout
7438 , in a special mode where
7439 \begin_inset Flex Code
7442 \begin_layout Plain Layout
7449 The first line is just a LaTeX comment,
7450 \change_deleted -712698321 1349766656
7453 the second one contains the
7454 \change_inserted -712698321 1349766650
7457 declaration of the text class
7458 \change_inserted -712698321 1349766689
7459 , and the third line contains the optional classification of the class
7462 If these lines appear in a file named
7463 \begin_inset Flex Code
7466 \begin_layout Plain Layout
7472 , then they define a text class of name
7473 \begin_inset Flex Code
7476 \begin_layout Plain Layout
7482 (the name of the layout file) which uses the LaTeX document class
7483 \begin_inset Flex Code
7486 \begin_layout Plain Layout
7492 (the default is to use the same name as the layout).
7494 \begin_inset Quotes eld
7498 \change_deleted -712698321 1349766253
7500 \change_inserted -712698321 1349766260
7501 Article (Standard Class)
7504 \begin_inset Quotes erd
7507 that appears above is used as a description of the text class in the
7508 \begin_inset Flex MenuItem
7511 \begin_layout Plain Layout
7512 Document\SpecialChar \menuseparator
7520 \change_inserted -712698321 1349767097
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7529 in the example) is also used in the
7530 \begin_inset Flex MenuItem
7533 \begin_layout Plain Layout
7535 \change_inserted -712698321 1349766801
7536 Document\SpecialChar \menuseparator
7542 dialog: the text classes are grouped by these categories (which are usually
7543 genres, so typical categories are
7544 \begin_inset Quotes eld
7548 \begin_inset Quotes erd
7552 \begin_inset Quotes eld
7556 \begin_inset Quotes erd
7560 \begin_inset Quotes eld
7564 \begin_inset Quotes erd
7568 \begin_inset Quotes eld
7572 \begin_inset Quotes erd
7576 \begin_inset Quotes eld
7580 \begin_inset Quotes erd
7584 \begin_inset Quotes eld
7588 \begin_inset Quotes erd
7592 If no category has been declared, the class will be put in the
7593 \begin_inset Quotes eld
7597 \begin_inset Quotes erd
7605 \begin_layout Standard
7606 Let's assume that you wrote your own text class that uses the
7607 \begin_inset Flex Code
7610 \begin_layout Plain Layout
7616 document class, but where you changed the appearance of the section headings.
7617 If you put it in a file
7618 \begin_inset Flex Code
7621 \begin_layout Plain Layout
7627 , the header of this file should be:
7630 \begin_layout LyX-Code
7633 #% Do not delete the line below; configure depends on this
7636 \begin_layout LyX-Code
7641 DeclareLaTeXClass[article]{
7642 \change_deleted -712698321 1349766303
7644 \change_inserted -712698321 1349766303
7648 \change_deleted -712698321 1349766338
7650 \change_inserted -712698321 1349766338
7654 \change_deleted -712698321 1349766340
7656 \change_inserted -712698321 1349766340
7660 \change_deleted -712698321 1349766343
7662 \change_inserted -712698321 1349766343
7666 \change_inserted -712698321 1349767223
7670 \begin_layout LyX-Code
7672 \change_inserted -712698321 1349767223
7677 DeclareCategory{Articles}
7682 \begin_layout Standard
7683 This declares a text class
7684 \begin_inset Flex Code
7687 \begin_layout Plain Layout
7693 , associated with the LaTeX document class
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7704 \begin_inset Quotes eld
7708 \change_deleted -712698321 1349766329
7710 \change_inserted -712698321 1349766329
7714 \change_deleted -712698321 1349766347
7716 \change_inserted -712698321 1349766347
7720 \change_deleted -712698321 1349766350
7722 \change_inserted -712698321 1349766350
7726 \change_deleted -712698321 1349766352
7728 \change_inserted -712698321 1349766352
7732 \begin_inset Quotes erd
7736 If your text class depends on several packages, you can declare it as:
7739 \begin_layout LyX-Code
7742 #% Do not delete the line below; configure depends on this
7745 \begin_layout LyX-Code
7750 DeclareLaTeXClass[article,foo.sty]{
7751 \change_deleted -712698321 1349766366
7753 \change_inserted -712698321 1349766366
7757 \change_deleted -712698321 1349766369
7759 \change_inserted -712698321 1349766369
7763 \change_deleted -712698321 1349766371
7765 \change_inserted -712698321 1349766371
7769 \change_deleted -712698321 1349766374
7771 \change_inserted -712698321 1349766374
7775 \change_inserted -712698321 1349767240
7779 \begin_layout LyX-Code
7781 \change_inserted -712698321 1349767240
7786 DeclareCategory{Articles}
7791 \begin_layout Standard
7792 This indicates that your text class uses the
7793 \begin_inset Flex Code
7796 \begin_layout Plain Layout
7803 Finally, it is also possible to declare classes for DocBook code.
7804 Typical declarations will look like:
7807 \begin_layout LyX-Code
7810 #% Do not delete the line below; configure depends on this
7813 \begin_layout LyX-Code
7818 DeclareDocBookClass[article]{SGML (DocBook
7819 \change_deleted -712698321 1349766387
7821 \change_inserted -712698321 1349766387
7825 \change_inserted -712698321 1349767247
7829 \begin_layout LyX-Code
7831 \change_inserted -712698321 1349767302
7836 DeclareCategory{Articles (DocBook)}
7841 \begin_layout Standard
7842 Note that these declarations can also be given an optional parameter declaring
7843 the name of the document class (but not a list).
7846 \begin_layout Standard
7847 So, to be as explicit as possible, the form of the layout declaration is:
7850 \begin_layout LyX-Code
7855 DeclareLaTeXClass[class,package.sty]{layout description}
7856 \change_inserted -712698321 1349767329
7860 \begin_layout LyX-Code
7862 \change_inserted -712698321 1349767339
7867 DeclareCategory{category}
7872 \begin_layout Standard
7873 The class need only be specified if the name of the LaTeX class file and
7874 the name of the layout file are different or if there are packages to load.
7875 If the name of the class file is not specified, then LyX will simply assume
7876 that it is the same as the name of the layout file.
7879 \begin_layout Standard
7880 When the text class has been modified to your taste, all you have to do
7881 is to copy it either to
7882 \begin_inset Flex Code
7885 \begin_layout Plain Layout
7892 \begin_inset Flex Code
7895 \begin_layout Plain Layout
7902 \begin_inset Flex MenuItem
7905 \begin_layout Plain Layout
7906 Tools\SpecialChar \menuseparator
7912 , exit LyX and restart.
7913 Then your new text class should be available along with the others.
7916 \begin_layout Standard
7917 Once the layout file is installed, you can edit it and see your changes
7918 without having to reconfigure or to restart LyX.
7923 \begin_layout Plain Layout
7924 In versions of LyX prior to 1.6, this was not true.
7925 As a result, editing layout files was very time consuming, since you had
7926 constantly to restart LyX to see changes.
7931 You can force a reload of the current layout by using the LyX function
7933 \begin_inset Flex MenuItem
7936 \begin_layout Plain Layout
7943 There is no default binding for this function—though, of course, you can
7944 bind it to a key yourself.
7945 But you will normally use this function simply by entering it in the mini-buffe
7950 \begin_layout Standard
7956 \begin_inset Flex MenuItem
7959 \begin_layout Plain Layout
7965 is very much an `advanced feature'.
7970 recommended that you save your work before using this function.
7975 recommended that you not attempt to edit layout information while simultaneousl
7976 y working on a document that you care about.
7977 Use a test document.
7978 Syntax errors and the like in your layout file could cause peculiar behavior.
7979 In particular, such errors could cause LyX to regard the current layout
7980 as invalid and to attempt to switch to some other layout.
7984 \begin_layout Plain Layout
7985 Really bad syntax errors may even caused LyX to exit.
7986 This is because certain sorts of errors may make LyX unable to read
7996 The LyX team strives to keep LyX stable in such situations, but safe is
8001 \begin_layout Plain Layout
8002 While we're giving advice: make regular backups.
8003 And be nice to your mother.
8011 \begin_layout Subsection
8012 The Module declaration
8015 \begin_layout Standard
8016 A module must begin with a line like the following:
8019 \begin_layout LyX-Code
8022 DeclareLyXModule[endnotes.sty]{Endnotes}
8025 \begin_layout Standard
8026 The mandatory argument, in curly brackets, is the name of the module, as
8028 \begin_inset Flex MenuItem
8031 \begin_layout Plain Layout
8032 Document\SpecialChar \menuseparator
8033 Settings\SpecialChar \menuseparator
8040 The argument in square brackets is optional: It declares any LaTeX packages
8041 on which the module depends.
8042 It is also possible to use the form
8043 \begin_inset Flex MenuItem
8046 \begin_layout Plain Layout
8052 as an optional argument, which declares that the module can only be used
8053 when there exists a conversion chain between the formats `
8054 \begin_inset Flex Code
8057 \begin_layout Plain Layout
8064 \begin_inset Flex Code
8067 \begin_layout Plain Layout
8076 \begin_layout Standard
8077 The module declaration should then be followed by lines like the following
8081 \begin_layout Plain Layout
8082 Preferably in English if the module should be published with LyX.
8083 This description will appear in the list of messages to be translated and
8084 will be thus translated with the next interface update.
8092 \begin_layout LyX-Code
8096 \begin_layout LyX-Code
8097 #Adds an endnote command, in addition to footnotes.
8101 \begin_layout LyX-Code
8102 #You will need to add
8104 theendnotes in TeX code where you
8107 \begin_layout LyX-Code
8108 #want the endnotes to appear.
8112 \begin_layout LyX-Code
8116 \begin_layout LyX-Code
8117 #Requires: somemodule | othermodule
8120 \begin_layout LyX-Code
8121 #Excludes: badmodule
8124 \begin_layout Standard
8125 The description is used in
8126 \begin_inset Flex MenuItem
8129 \begin_layout Plain Layout
8130 Document\SpecialChar \menuseparator
8131 Settings\SpecialChar \menuseparator
8137 to provide the user with information about what the module does.
8139 \begin_inset Flex Code
8142 \begin_layout Plain Layout
8148 line is used to identify other modules with which this one must be used;
8150 \begin_inset Flex Code
8153 \begin_layout Plain Layout
8159 line is used to identify modules with which this one may not be used.
8160 Both are optional, and, as shown, multiple modules should be separated
8161 with the pipe symbol: |.
8162 Note that the required modules are treated disjunctively:
8166 of the required modules must be used.
8171 excluded module may be used.
8172 Note that modules are identified here by their filenames without the
8173 \begin_inset Flex Code
8176 \begin_layout Plain Layout
8184 \begin_inset Flex Code
8187 \begin_layout Plain Layout
8194 \begin_inset Flex Code
8197 \begin_layout Plain Layout
8206 \begin_layout Subsection
8210 \begin_layout Standard
8211 The first non-comment line of any layout file, included file, or module
8216 contain the file format number:
8219 \begin_layout Description
8220 \begin_inset Flex Code
8223 \begin_layout Plain Layout
8230 \begin_inset Flex Code
8233 \begin_layout Plain Layout
8239 ] The format number of the layout file.
8242 \begin_layout Standard
8243 This tag was introduced with LyX
8244 \begin_inset space ~
8248 Layout files from older LyX versions do not have an explicit file format
8249 and are considered to have
8250 \begin_inset Flex Code
8253 \begin_layout Plain Layout
8255 \begin_inset space ~
8264 The format for the present version of LyX is format 35.
8265 But each version of LyX is capable of reading earlier versions' layout
8266 files, just as they are capable of reading files produced by earlier versions
8268 There is, however, no provision for converting to earlier formats.
8271 \begin_layout Subsection
8272 \begin_inset CommandInset label
8274 name "sub:General-text-class"
8278 General text class parameters
8281 \begin_layout Standard
8282 These are general parameters that govern the behavior of an entire document
8288 mean that they must appear in
8289 \begin_inset Flex Code
8292 \begin_layout Plain Layout
8298 files rather than in modules.
8299 A module can contain any layout tag.)
8302 \begin_layout Description
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8312 Adds information that will be output in the
8313 \begin_inset Flex Code
8316 \begin_layout Plain Layout
8322 block when the document is output to XHTML.
8323 Typically, this would be used to output CSS style information, but it can
8324 be used for anything that can appear in
8325 \begin_inset Flex Code
8328 \begin_layout Plain Layout
8336 \begin_inset Quotes eld
8340 \begin_inset Flex Code
8343 \begin_layout Plain Layout
8350 \begin_inset Quotes erd
8356 \begin_layout Description
8357 \begin_inset Flex Code
8360 \begin_layout Plain Layout
8366 Adds information to the document preamble.
8368 \begin_inset Newline newline
8372 \begin_inset Quotes eld
8376 \begin_inset Flex Code
8379 \begin_layout Plain Layout
8386 \begin_inset Quotes erd
8392 \begin_layout Description
8393 \begin_inset Flex Code
8396 \begin_layout Plain Layout
8402 Defines formats for use in the display of bibliographic information.
8404 \begin_inset CommandInset ref
8406 reference "sub:Citation-format-description"
8412 \begin_inset Quotes eld
8416 \begin_inset Flex Code
8419 \begin_layout Plain Layout
8426 \begin_inset Quotes erd
8432 \begin_layout Description
8433 \begin_inset Flex Code
8436 \begin_layout Plain Layout
8442 Describes various global options supported by the document class.
8444 \begin_inset space ~
8448 \begin_inset CommandInset ref
8450 reference "sub:ClassOptions"
8456 \begin_inset Quotes eld
8460 \begin_inset Flex Code
8463 \begin_layout Plain Layout
8470 \begin_inset Quotes erd
8476 \begin_layout Description
8477 \begin_inset Flex Code
8480 \begin_layout Plain Layout
8487 \begin_inset Flex Code
8490 \begin_layout Plain Layout
8499 \begin_inset space \thinspace{}
8503 \begin_inset Flex Code
8506 \begin_layout Plain Layout
8512 ] Whether the class should
8516 to having one or two columns.
8517 Can be changed in the
8518 \begin_inset Flex MenuItem
8521 \begin_layout Plain Layout
8522 Document\SpecialChar \menuseparator
8531 \begin_layout Description
8532 \begin_inset Flex Code
8535 \begin_layout Plain Layout
8542 \begin_inset Flex Code
8545 \begin_layout Plain Layout
8551 ] This sequence defines the properties for a counter.
8552 If the counter does not yet exist, it is created; if it does exist, it
8555 \begin_inset Quotes eld
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8569 \begin_inset Quotes erd
8573 \begin_inset Newline newline
8577 \begin_inset space ~
8581 \begin_inset CommandInset ref
8583 reference "sub:Counters"
8587 for details on counters.
8590 \begin_layout Description
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8600 Sets the default font used to display the document.
8602 \begin_inset space ~
8606 \begin_inset CommandInset ref
8608 reference "sub:Font-description"
8612 for how to declare fonts.
8614 \begin_inset Quotes eld
8618 \begin_inset Flex Code
8621 \begin_layout Plain Layout
8628 \begin_inset Quotes erd
8634 \begin_layout Description
8635 \begin_inset Flex Code
8638 \begin_layout Plain Layout
8645 \begin_inset Flex Code
8648 \begin_layout Plain Layout
8654 ] Specifies a module to be included by default with this document class.
8655 The module is specified as filename without the
8656 \begin_inset Flex Code
8659 \begin_layout Plain Layout
8666 The user can still remove the module, but it will be active at the outset.
8667 (This applies only when new files are created, or when this class is chosen
8668 for an existing document.)
8671 \begin_layout Description
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8682 \begin_inset Flex Code
8685 \begin_layout Plain Layout
8691 ] This is the style that will be assigned to new paragraphs, usually
8692 \begin_inset Flex MenuItem
8695 \begin_layout Plain Layout
8702 This will default to the first defined style if not given, but you are
8703 encouraged to use this directive.
8706 \begin_layout Description
8707 \begin_inset Flex Code
8710 \begin_layout Plain Layout
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8726 ] This tag indicates that the module (which is specified by filename without
8728 \begin_inset Flex Code
8731 \begin_layout Plain Layout
8737 extension) cannot be used with this document class.
8738 This might be used in a journal-specific layout file to prevent, say, the
8740 \begin_inset Flex Code
8743 \begin_layout Plain Layout
8749 module that numbers theorems by section.
8754 be used in a module.
8755 Modules have their own way of excluding other modules (see section
8756 \begin_inset space ~
8760 \begin_inset CommandInset ref
8762 reference "sub:Layout-modules"
8769 \begin_layout Description
8770 \begin_inset Flex Code
8773 \begin_layout Plain Layout
8779 Defines a new float.
8781 \begin_inset space ~
8785 \begin_inset CommandInset ref
8787 reference "sub:Floats"
8793 \begin_inset Quotes eld
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Quotes erd
8813 \begin_layout Description
8814 \begin_inset Flex Code
8817 \begin_layout Plain Layout
8823 Sets the information that will be output in the
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8833 block when this document class is output to XHTML.
8834 Note that this will completely override any prior
8835 \begin_inset Flex Code
8838 \begin_layout Plain Layout
8845 \begin_inset Flex Code
8848 \begin_layout Plain Layout
8856 \begin_inset Newline newline
8860 \begin_inset Flex Code
8863 \begin_layout Plain Layout
8869 if you just want to add material to the preamble.) Must end with
8870 \begin_inset Quotes eld
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8884 \begin_inset Quotes erd
8890 \begin_layout Description
8891 \begin_inset Flex Code
8894 \begin_layout Plain Layout
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8910 ] The style to use for the table of contents, bibliography, and so forth,
8911 when the document is output to HTML.
8912 For articles, this should normally be
8913 \begin_inset Flex Code
8916 \begin_layout Plain Layout
8923 \begin_inset Flex Code
8926 \begin_layout Plain Layout
8933 If it is not given, then LyX will attempt to figure out which layout to
8937 \begin_layout Description
8938 \begin_inset Flex Code
8941 \begin_layout Plain Layout
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 ] Modifies the properties of the given counter.
8958 If the counter does not exist, the statement is ignored.
8960 \begin_inset Quotes eld
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8974 \begin_inset Quotes erd
8978 \begin_inset Newline newline
8982 \begin_inset space ~
8986 \begin_inset CommandInset ref
8988 reference "sub:Counters"
8992 for details on counters.
8995 \begin_layout Description
8996 \begin_inset Flex Code
8999 \begin_layout Plain Layout
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 ] Modifies the properties of the given paragraph style.
9016 If the style does not exist, the statement is ignored.
9018 \begin_inset Quotes eld
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Quotes erd
9038 \begin_layout Description
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9058 ] This allows you to include another layout definition file within yours
9059 to avoid duplicating commands.
9060 Common examples are the standard layout files, for example,
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9070 , which contains most of the basic layouts.
9073 \begin_layout Description
9074 \begin_inset Flex Code
9077 \begin_layout Plain Layout
9084 \begin_inset Flex Code
9087 \begin_layout Plain Layout
9093 ] This section (re-)defines the layout of an inset.
9094 It can be applied to an existing inset or to a new, user-defined inset,
9095 e.g., a new character style.
9097 \begin_inset Quotes eld
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9111 \begin_inset Quotes erd
9115 \begin_inset Newline newline
9119 \begin_inset space ~
9123 \begin_inset CommandInset ref
9125 reference "sub:Flex-insets-and"
9129 for more information.
9133 \begin_layout Description
9134 \begin_inset Flex Code
9137 \begin_layout Plain Layout
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9153 ] A string that indicates the width of the left margin on the screen, for
9155 \begin_inset Quotes eld
9159 \begin_inset Flex Code
9162 \begin_layout Plain Layout
9169 \begin_inset Quotes erd
9173 (Note that this is not a `length', like
9174 \begin_inset Quotes eld
9178 \begin_inset Quotes erd
9184 \begin_layout Description
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9204 ] Deletes an existing counter, usually one defined in an included file.
9207 \begin_layout Description
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9227 ] Deletes an existing float.
9228 This is particularly useful when you want to suppress a float that has
9229 been defined in an input file.
9232 \begin_layout Description
9233 \begin_inset Flex Code
9236 \begin_layout Plain Layout
9243 \begin_inset Flex Code
9246 \begin_layout Plain Layout
9252 ] Deletes an existing style.
9255 \begin_layout Description
9256 \begin_inset Flex Code
9259 \begin_layout Plain Layout
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9275 ] The file format (as defined in the LyX preferences) produced by this document
9277 It is mainly useful when
9278 \begin_inset Flex Code
9281 \begin_layout Plain Layout
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9297 and one wants to define a new type of literate document.
9298 The format is reset to
9299 \begin_inset Quotes eld
9303 \begin_inset Flex Code
9306 \begin_layout Plain Layout
9313 \begin_inset Quotes erd
9317 \begin_inset Quotes eld
9321 \begin_inset Flex Code
9324 \begin_layout Plain Layout
9331 \begin_inset Quotes erd
9334 when the corresponding
9335 \begin_inset Flex Code
9338 \begin_layout Plain Layout
9344 parameter is encountered.
9347 \begin_layout Description
9348 \begin_inset Flex Code
9351 \begin_layout Plain Layout
9358 \begin_inset Flex Code
9361 \begin_layout Plain Layout
9372 \begin_inset Flex Code
9375 \begin_layout Plain Layout
9382 \begin_inset Flex Code
9385 \begin_layout Plain Layout
9391 ] Specifies what sort of output documents using this class will produce.
9394 \begin_layout Description
9395 \begin_inset Flex Code
9398 \begin_layout Plain Layout
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9417 \begin_inset Flex Code
9420 \begin_layout Plain Layout
9427 \begin_inset Flex Code
9430 \begin_layout Plain Layout
9436 ] The default pagestyle.
9437 Can be changed in the
9438 \begin_inset Flex MenuItem
9441 \begin_layout Plain Layout
9442 Document\SpecialChar \menuseparator
9451 \begin_layout Description
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9461 Sets the preamble for the LaTeX document.
9462 Note that this will completely override any prior
9463 \begin_inset Flex Code
9466 \begin_layout Plain Layout
9473 \begin_inset Flex Code
9476 \begin_layout Plain Layout
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9493 if you just want to add material to the preamble.) Must end with
9494 \begin_inset Quotes eld
9498 \begin_inset Flex Code
9501 \begin_layout Plain Layout
9508 \begin_inset Quotes erd
9514 \begin_layout Description
9515 \begin_inset Flex Code
9518 \begin_layout Plain Layout
9525 \begin_inset Flex Code
9528 \begin_layout Plain Layout
9535 \begin_inset Flex Code
9538 \begin_layout Plain Layout
9547 \begin_inset space \thinspace{}
9551 \begin_inset Flex Code
9554 \begin_layout Plain Layout
9560 ] Whether the class already provides the feature
9561 \begin_inset Flex Code
9564 \begin_layout Plain Layout
9571 A feature is in general the name of a package (e.
9572 \begin_inset space \thinspace{}
9576 \begin_inset space \space{}
9580 \begin_inset Flex Code
9583 \begin_layout Plain Layout
9590 \begin_inset Flex Code
9593 \begin_layout Plain Layout
9600 \begin_inset space \thinspace{}
9604 \begin_inset space \space{}
9608 \begin_inset Flex Code
9611 \begin_layout Plain Layout
9618 \begin_inset Flex Code
9621 \begin_layout Plain Layout
9629 \begin_inset space ~
9633 \begin_inset CommandInset ref
9635 reference "chap:List-of-functions"
9639 for the list of features.
9642 \begin_layout Description
9643 \begin_inset Flex Code
9646 \begin_layout Plain Layout
9653 \begin_inset Flex Code
9656 \begin_layout Plain Layout
9662 ] Indicates that this layout provides the functionality of the module mentioned,
9663 which should be specified by the filename without the
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9674 This will typically be used if the layout includes the module directly,
9675 rather than using the
9676 \begin_inset Flex Code
9679 \begin_layout Plain Layout
9685 tag to indicate that it ought to be used.
9686 It could also be used in a module that provided an alternate implementation
9687 of the same functionality.
9690 \begin_layout Description
9691 \begin_inset Flex Code
9694 \begin_layout Plain Layout
9701 \begin_inset Flex Code
9704 \begin_layout Plain Layout
9710 ] Whether the class requires the feature
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9721 Multiple features must be separated by commas.
9722 Note that you can only request supported features.
9724 \begin_inset space ~
9728 \begin_inset CommandInset ref
9730 reference "chap:List-of-functions"
9734 for the list of features.)
9737 \begin_layout Description
9738 \begin_inset Flex Code
9741 \begin_layout Plain Layout
9748 \begin_inset Flex Code
9751 \begin_layout Plain Layout
9757 ] A string that indicates the width of the right margin on the screen, for
9759 \begin_inset Quotes eld
9763 \begin_inset Flex Code
9766 \begin_layout Plain Layout
9773 \begin_inset Quotes erd
9779 \begin_layout Description
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9799 ] Sets which divisions get numbered.
9801 \begin_inset Newline newline
9805 \begin_inset Flex Code
9808 \begin_layout Plain Layout
9817 \begin_layout Description
9818 \begin_inset Flex Code
9821 \begin_layout Plain Layout
9828 \begin_inset Flex Code
9831 \begin_layout Plain Layout
9840 \begin_inset space \thinspace{}
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9853 ] Whether the class-default should be printing on one or both sides of the
9855 Can be changed in the
9856 \begin_inset Flex MenuItem
9859 \begin_layout Plain Layout
9860 Document\SpecialChar \menuseparator
9869 \begin_layout Description
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9889 ] This sequence defines a paragraph style.
9890 If the style does not yet exist, it is created; if it does exist, its parameter
9893 \begin_inset Quotes eld
9897 \begin_inset Flex Code
9900 \begin_layout Plain Layout
9907 \begin_inset Quotes erd
9911 \begin_inset Newline newline
9915 \begin_inset space ~
9919 \begin_inset CommandInset ref
9921 reference "sub:Paragraph-Styles"
9925 for details on paragraph styles.
9928 \begin_layout Description
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9948 ] The name of the command or environment to be used with
9949 \begin_inset Flex Code
9952 \begin_layout Plain Layout
9961 \begin_layout Description
9962 \begin_inset Flex Code
9965 \begin_layout Plain Layout
9972 \begin_inset Flex Code
9975 \begin_layout Plain Layout
9984 \begin_inset Flex Code
9987 \begin_layout Plain Layout
9993 ] Indicates what kind of markup is used to define the title of a document.
9995 \begin_inset Flex Code
9998 \begin_layout Plain Layout
10004 means that the macro with name
10005 \begin_inset Flex Code
10008 \begin_layout Plain Layout
10014 will be inserted after the last layout which has
10015 \begin_inset Quotes eld
10019 \begin_inset Flex Code
10022 \begin_layout Plain Layout
10024 \begin_inset space ~
10033 \begin_inset Quotes erd
10038 \begin_inset Flex Code
10041 \begin_layout Plain Layout
10047 corresponds to the case where all layouts which have
10048 \begin_inset Quotes eld
10052 \begin_inset Flex Code
10055 \begin_layout Plain Layout
10057 \begin_inset space ~
10066 \begin_inset Quotes erd
10069 should be enclosed into the
10070 \begin_inset Flex Code
10073 \begin_layout Plain Layout
10082 \begin_layout Description
10083 \begin_inset Flex Code
10086 \begin_layout Plain Layout
10093 \begin_inset Flex Code
10096 \begin_layout Plain Layout
10102 ] Sets which divisions are included in the table of contents.
10104 \begin_inset Flex Code
10107 \begin_layout Plain Layout
10116 \begin_layout Subsection
10117 \begin_inset Flex Code
10120 \begin_layout Plain Layout
10127 \begin_inset CommandInset label
10129 name "sub:ClassOptions"
10136 \begin_layout Standard
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10147 section can contain the following entries:
10150 \begin_layout Description
10151 \begin_inset Flex Code
10154 \begin_layout Plain Layout
10161 \begin_inset Flex Code
10164 \begin_layout Plain Layout
10170 ] The list of available font sizes for the document's main font, separated
10172 \begin_inset Quotes eld
10176 \begin_inset Flex Code
10179 \begin_layout Plain Layout
10186 \begin_inset Quotes erd
10192 \begin_layout Description
10193 \begin_inset Flex Code
10196 \begin_layout Plain Layout
10202 Used to set the DTD line with XML-based output classes.
10204 \begin_inset space \thinspace{}
10208 \begin_inset Quotes eld
10211 -//OASIS//DTD DocBook V4.2//EN
10212 \begin_inset Quotes erd
10218 \begin_layout Description
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10229 \begin_inset Flex Code
10232 \begin_layout Plain Layout
10233 string="empty|plain|headings|fancy"
10238 ] The list of available page sty\SpecialChar \-
10240 \begin_inset Quotes eld
10244 \begin_inset Flex Code
10247 \begin_layout Plain Layout
10254 \begin_inset Quotes erd
10260 \begin_layout Description
10261 \begin_inset Flex Code
10264 \begin_layout Plain Layout
10271 \begin_inset Flex Code
10274 \begin_layout Plain Layout
10280 ] Some document class options, separated by a comma, that will be added
10281 to the optional part of the
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10296 \begin_layout Standard
10298 \begin_inset Flex Code
10301 \begin_layout Plain Layout
10307 section must end with
10308 \begin_inset Quotes eld
10312 \begin_inset Flex Code
10315 \begin_layout Plain Layout
10322 \begin_inset Quotes erd
10328 \begin_layout Subsection
10330 \begin_inset CommandInset label
10332 name "sub:Paragraph-Styles"
10339 \begin_layout Standard
10340 A paragraph style description looks like this:
10344 \begin_layout Plain Layout
10345 Note that this will either define a new style or modify an existing one.
10353 \begin_layout LyX-Code
10360 \begin_layout LyX-Code
10364 \begin_layout LyX-Code
10368 \begin_layout Standard
10369 where the following commands are allowed:
10372 \begin_layout Description
10373 \begin_inset Flex Code
10376 \begin_layout Plain Layout
10383 \begin_inset Flex Code
10386 \begin_layout Plain Layout
10391 , left, right, center
10396 ] Paragraph alignment.
10399 \begin_layout Description
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10418 , left, right, center
10423 ] A comma separated list of permitted alignments.
10424 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10426 For example a right-aligned or centered enumeration isn't possible.)
10427 \change_inserted -712698321 1353679769
10431 \begin_layout Description
10433 \change_inserted -712698321 1353680268
10434 \begin_inset Flex Code
10437 \begin_layout Plain Layout
10439 \change_inserted -712698321 1353679781
10446 \begin_inset Flex Code
10449 \begin_layout Plain Layout
10451 \change_inserted -712698321 1353679772
10457 ] Defines argument number <int> of a command\SpecialChar \slash{}
10458 environment associated with
10460 This is useful for things like section headings, and only makes sense with
10462 Every (optional or required) argument of a command or environment -- except
10463 for the required argument that is associated with the content of the paragraph
10464 itself -- has a separate definition, where the number specifies the order
10466 The definition must end with
10467 \begin_inset Flex Code
10470 \begin_layout Plain Layout
10472 \change_inserted -712698321 1353680069
10479 So a command with two optional arguments has:
10483 \begin_layout Quote
10485 \change_inserted -712698321 1353680127
10491 \begin_layout Quote
10493 \change_inserted -712698321 1353680195
10499 \begin_layout Quote
10501 \change_inserted -712698321 1353680135
10507 \begin_layout Quote
10509 \change_inserted -712698321 1353680140
10515 \begin_layout Quote
10517 \change_inserted -712698321 1353680197
10523 \begin_layout Quote
10525 \change_inserted -712698321 1353680147
10531 \begin_layout Standard
10533 \change_inserted -712698321 1353680528
10535 \begin_inset Flex Code
10538 \begin_layout Plain Layout
10540 \change_inserted -712698321 1353680412
10546 definition, the following specifications are possible:
10549 \begin_layout Itemize
10551 \change_inserted -712698321 1355076779
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10557 \change_inserted -712698321 1353680543
10566 \begin_inset Flex Code
10569 \begin_layout Plain Layout
10571 \change_inserted -712698321 1353680567
10577 The string that will appear both in the menu (to insert this argument)
10578 and on the argument inset button (unless you also specify a separate
10579 \begin_inset Flex Code
10582 \begin_layout Plain Layout
10584 \change_inserted -712698321 1355076779
10591 For the menu, you can define an accelerator by appending the respective
10592 character to the string, divided by
10593 \begin_inset Quotes eld
10597 \begin_inset Quotes erd
10601 \begin_inset space \thinspace{}
10606 \begin_inset Flex Code
10609 \begin_layout Plain Layout
10611 \change_inserted -712698321 1353691482
10612 \begin_inset Quotes eld
10616 \begin_inset Quotes erd
10629 \begin_layout Itemize
10631 \change_inserted -712698321 1355076754
10632 \begin_inset Flex Code
10635 \begin_layout Plain Layout
10637 \change_inserted -712698321 1355076658
10644 \begin_inset Flex Code
10647 \begin_layout Plain Layout
10649 \change_inserted -712698321 1355076654
10655 A separate string for the menu.
10656 You can define an accelerator by appending the respective character to
10657 the string, divided by
10658 \begin_inset Quotes eld
10662 \begin_inset Quotes erd
10666 \begin_inset space \thinspace{}
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10676 \change_inserted -712698321 1355076654
10677 \begin_inset Quotes eld
10681 \begin_inset Quotes erd
10690 This specification is optional.
10691 If it is not given the
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10697 \change_inserted -712698321 1355076736
10705 will be used instead for the menu.
10708 \begin_layout Itemize
10710 \change_inserted -712698321 1353680665
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10716 \change_inserted -712698321 1353680616
10723 \begin_inset Flex Code
10726 \begin_layout Plain Layout
10728 \change_inserted -712698321 1353680623
10734 A longer explanatory text that appears in the tooltip when hovering over
10735 the argument inset.
10738 \begin_layout Itemize
10740 \change_inserted -712698321 1353680874
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10746 \change_inserted -712698321 1353680732
10753 \begin_inset Flex Code
10756 \begin_layout Plain Layout
10758 \change_inserted -712698321 1353680738
10764 Declare if this is a mandatory
10765 \change_inserted 2090807402 1353765594
10767 \change_inserted -712698321 1353680874
10769 \change_inserted 2090807402 1353765599
10771 \change_inserted -712698321 1353680874
10773 Mandatory arguments will be output empty if not given, while optional arguments
10774 will not be output at all.
10775 By default, mandatory arguments are delimited by
10776 \begin_inset Flex Code
10779 \begin_layout Plain Layout
10781 \change_inserted -712698321 1353680808
10789 , while optional arguments are delimited by
10790 \begin_inset Flex Code
10793 \begin_layout Plain Layout
10795 \change_inserted -712698321 1353680833
10804 \begin_layout Itemize
10806 \change_inserted -712698321 1353917199
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10812 \change_inserted -712698321 1353680879
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10824 \change_inserted -712698321 1353680874
10830 defines another argument (by its number) which this argument requires to
10831 be output if it is itself output.
10833 \begin_inset space \thinspace{}
10836 g., in LaTeX commands, optional arguments often require previous optional
10837 arguments to be output (at least empty), as in
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10843 \change_inserted -712698321 1353688183
10846 command[][arg]{text}
10854 This can be achieved by the statement
10855 \begin_inset Flex Code
10858 \begin_layout Plain Layout
10860 \change_inserted -712698321 1353681031
10869 \begin_inset Flex Code
10872 \begin_layout Plain Layout
10874 \change_inserted -712698321 1353681045
10885 \begin_layout Itemize
10887 \change_inserted -712698321 1354263104
10888 \begin_inset Flex Code
10891 \begin_layout Plain Layout
10893 \change_inserted -712698321 1353681072
10902 \begin_inset Flex Code
10905 \begin_layout Plain Layout
10907 \change_inserted -712698321 1353681067
10913 defines a custom left delimiter (instead of
10914 \begin_inset Flex Code
10917 \begin_layout Plain Layout
10919 \change_inserted -712698321 1353681127
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10933 \change_inserted -712698321 1353681133
10942 A line break in the output can be indicated by
10943 \begin_inset Flex Code
10946 \begin_layout Plain Layout
10948 \change_inserted -712698321 1354263104
10959 \begin_layout Itemize
10961 \change_inserted -712698321 1355144479
10962 \begin_inset Flex Code
10965 \begin_layout Plain Layout
10967 \change_inserted -712698321 1353681149
10974 \begin_inset Flex Code
10977 \begin_layout Plain Layout
10979 \change_inserted -712698321 1353681146
10985 defines a custom right delimiter (instead of
10986 \begin_inset Flex Code
10989 \begin_layout Plain Layout
10991 \change_inserted -712698321 1353681158
10998 \begin_inset Flex Code
11001 \begin_layout Plain Layout
11003 \change_inserted -712698321 1353681161
11010 A line break in the output can be indicated by
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11016 \change_inserted -712698321 1354263106
11025 \begin_layout Itemize
11027 \change_inserted -712698321 1355144578
11028 \begin_inset Flex Code
11031 \begin_layout Plain Layout
11033 \change_inserted -712698321 1355144487
11042 \begin_inset Flex Code
11045 \begin_layout Plain Layout
11047 \change_inserted -712698321 1355144500
11053 defines an argument that is inserted in any case (alone or in addition
11054 to user-specified arguments).
11055 Multiple arguments need to be separated by comma.
11060 \begin_layout Itemize
11062 \change_inserted -712698321 1353917320
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11068 \change_inserted -712698321 1353917320
11074 The font used for the argument content.
11076 \begin_inset space ~
11080 \begin_inset CommandInset ref
11082 reference "sub:Font-description"
11089 \begin_layout Itemize
11091 \change_inserted -712698321 1353917320
11092 \begin_inset Flex Code
11095 \begin_layout Plain Layout
11097 \change_inserted -712698321 1353917320
11103 The font used for the label.
11105 \begin_inset space ~
11109 \begin_inset CommandInset ref
11111 reference "sub:Font-description"
11118 \begin_layout Itemize
11120 \change_inserted -712698321 1355661048
11121 \begin_inset Flex Code
11124 \begin_layout Plain Layout
11126 \change_inserted -712698321 1353917320
11133 \begin_inset Flex Code
11136 \begin_layout Plain Layout
11138 \change_inserted -712698321 1353917320
11145 \begin_inset Flex Code
11148 \begin_layout Plain Layout
11150 \change_inserted -712698321 1353917320
11157 \begin_inset Flex Code
11160 \begin_layout Plain Layout
11162 \change_inserted -712698321 1353917320
11168 , describing the rendering style used for the inset's frame and buttons.
11170 \begin_inset Flex Code
11173 \begin_layout Plain Layout
11175 \change_inserted -712698321 1353917320
11184 \begin_layout Itemize
11186 \change_inserted -712698321 1355747298
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11192 \change_inserted -712698321 1355661057
11199 \begin_inset Flex Code
11202 \begin_layout Plain Layout
11204 \change_inserted -712698321 1355661049
11211 \begin_inset Flex Code
11214 \begin_layout Plain Layout
11216 \change_inserted -712698321 1355661077
11224 , this argument is automatically inserted when the respective style is selected.
11225 Currently, only one argument per style\SpecialChar \slash{}
11226 layout can be automatically inserted.
11227 \change_inserted 155139281 1354198988
11231 \begin_layout Standard
11233 \change_inserted -712698321 1356689813
11234 By default, the text entered in the LyX workarea in the respective layout
11235 is the last (mandatory) argument of a command if the
11236 \begin_inset Flex Code
11239 \begin_layout Plain Layout
11241 \change_inserted -712698321 1356689619
11250 \begin_inset Flex Code
11253 \begin_layout Plain Layout
11255 \change_inserted -712698321 1356689629
11264 However, arguments with the prefix
11265 \begin_inset Flex Code
11268 \begin_layout Plain Layout
11270 \change_inserted -712698321 1356689679
11278 are output after this workarea argument.
11279 Note that post-argument numbering restarts at 1, so the first argument
11280 following the workarea argument is
11281 \begin_inset Flex Code
11284 \begin_layout Plain Layout
11286 \change_inserted -712698321 1356689813
11295 Post-arguments are ignored in any other
11296 \begin_inset Flex Code
11299 \begin_layout Plain Layout
11301 \change_inserted -712698321 1356689801
11308 \begin_inset Flex Code
11311 \begin_layout Plain Layout
11313 \change_inserted -712698321 1356689801
11324 \begin_layout Standard
11326 \change_inserted 155139281 1354199102
11328 \begin_inset Flex Code
11331 \begin_layout Plain Layout
11333 \change_inserted 155139281 1354199013
11344 \begin_inset Flex Code
11347 \begin_layout Plain Layout
11349 \change_inserted 155139281 1354199102
11360 \begin_inset Flex Code
11363 \begin_layout Plain Layout
11365 \change_inserted 155139281 1354199044
11373 followed by the number (e.
11374 \begin_inset space \thinspace{}
11379 \begin_inset Flex Code
11382 \begin_layout Plain Layout
11384 \change_inserted 155139281 1354199064
11398 \begin_layout Description
11399 \begin_inset Flex Code
11402 \begin_layout Plain Layout
11408 Note that this will completely override any prior
11409 \begin_inset Flex Code
11412 \begin_layout Plain Layout
11418 declaration for this style.
11420 \begin_inset Quotes eld
11424 \begin_inset Flex Code
11427 \begin_layout Plain Layout
11434 \begin_inset Quotes erd
11439 \begin_inset space ~
11443 \begin_inset CommandInset ref
11445 reference "sub:I18n"
11449 for details on its use.
11452 \begin_layout Description
11453 \begin_inset Flex Code
11456 \begin_layout Plain Layout
11463 \begin_inset Flex Code
11466 \begin_layout Plain Layout
11476 \begin_layout Plain Layout
11477 Note that a `float' here is a real number, such as: 1.5.
11482 The vertical space with which the last of a chain of paragraphs with this
11483 style is separated from the following paragraph.
11484 If the next paragraph has another style, the separations are not simply
11485 added, but the maximum is taken.
11488 \begin_layout Description
11489 \begin_inset Flex Code
11492 \begin_layout Plain Layout
11499 \begin_inset Flex Code
11502 \begin_layout Plain Layout
11508 ] The category for this style.
11509 This is used to group related styles in the style combobox on the toolbar.
11510 Any string can be used, but you may want to use existing categories with
11515 \begin_layout Description
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11525 Depth of XML command.
11526 Used only with XML-type formats.
11529 \begin_layout Description
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11540 \begin_inset Flex Code
11543 \begin_layout Plain Layout
11549 ] Copies all the features of an existing style into the current one.
11553 \begin_layout Description
11554 \begin_inset Flex Code
11557 \begin_layout Plain Layout
11564 \begin_inset Flex Code
11567 \begin_layout Plain Layout
11573 ] The name of a style whose preamble should be output
11578 This allows to ensure some ordering of the preamble snippets when macros
11579 definitions depend on one another.
11583 \begin_layout Plain Layout
11584 Note that, besides that functionality, there is no way to ensure any ordering
11586 The ordering that you see in a given version of LyX may change without
11587 warning in later versions.
11595 \begin_layout Description
11596 \begin_inset Flex Code
11599 \begin_layout Plain Layout
11606 \begin_inset Flex Code
11609 \begin_layout Plain Layout
11614 , Box, Filled_Box, Static
11619 ] The type of label that stands at the end of the paragraph (or sequence
11621 \begin_inset Flex Code
11624 \begin_layout Plain Layout
11631 \begin_inset Newline newline
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11655 \begin_inset Flex Code
11658 \begin_layout Plain Layout
11666 \begin_inset Flex Code
11669 \begin_layout Plain Layout
11676 \begin_inset Quotes eld
11680 \begin_inset Quotes erd
11684 \begin_inset Flex Code
11687 \begin_layout Plain Layout
11694 \begin_inset space \space{}
11698 \begin_inset Flex Code
11701 \begin_layout Plain Layout
11707 ) is a white (resp.
11708 \begin_inset space ~
11711 black) square suitable for end of proof markers,
11712 \begin_inset Flex Code
11715 \begin_layout Plain Layout
11721 is an explicit text string.
11724 \begin_layout Description
11725 \begin_inset Flex Code
11728 \begin_layout Plain Layout
11735 \begin_inset Flex Code
11738 \begin_layout Plain Layout
11744 ] The string used for a label with a
11745 \begin_inset Flex Code
11748 \begin_layout Plain Layout
11755 \begin_inset Newline newline
11759 \begin_inset Flex Code
11762 \begin_layout Plain Layout
11772 \begin_layout Description
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11782 The font used for both the text body
11788 \begin_inset space ~
11792 \begin_inset CommandInset ref
11794 reference "sub:Font-description"
11799 Note that defining this font automatically defines the
11800 \begin_inset Flex Code
11803 \begin_layout Plain Layout
11810 So you should define this one first if you also want to define
11811 \begin_inset Flex Code
11814 \begin_layout Plain Layout
11823 \begin_layout Description
11824 \begin_inset Flex Code
11827 \begin_layout Plain Layout
11834 \begin_inset Flex Code
11837 \begin_layout Plain Layout
11846 \begin_inset space \thinspace{}
11850 \begin_inset Flex Code
11853 \begin_layout Plain Layout
11859 ] Usually LyX does not allow you to insert more than one space between words,
11860 since a space is considered as the separation between two words, not a
11861 character or symbol of its own.
11862 This is a very fine thing but sometimes annoying, for example, when typing
11863 program code or plain LaTeX code.
11865 \begin_inset Flex Code
11868 \begin_layout Plain Layout
11875 Note that LyX will create protected blanks for the additional blanks when
11876 in another mode than LaTeX-mode.
11879 \begin_layout Description
11880 \begin_inset Flex Code
11883 \begin_layout Plain Layout
11889 These tags are used with XHTML output.
11891 \begin_inset CommandInset ref
11893 reference "sub:Paragraph-Style-XHTML"
11900 \begin_layout Description
11901 \begin_inset Flex Code
11904 \begin_layout Plain Layout
11910 [FIXME] (Used only with XML-type formats.)
11913 \begin_layout Description
11914 \begin_inset Flex Code
11917 \begin_layout Plain Layout
11924 \begin_inset Flex Code
11927 \begin_layout Plain Layout
11936 \begin_inset space \thinspace{}
11940 \begin_inset Flex Code
11943 \begin_layout Plain Layout
11950 \begin_inset Flex Code
11953 \begin_layout Plain Layout
11959 , marks the style as to be included in the document preamble and not in
11961 This is useful for document classes that want such information as the title
11962 and author to appear in the preamble.
11963 Note that this works only for styles for which the
11964 \begin_inset Flex Code
11967 \begin_layout Plain Layout
11974 \begin_inset Flex Code
11977 \begin_layout Plain Layout
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11996 \begin_layout Description
11997 \begin_inset Flex Code
12000 \begin_layout Plain Layout
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12019 \begin_inset space \thinspace{}
12023 \begin_inset Flex Code
12026 \begin_layout Plain Layout
12033 \begin_inset Flex Code
12036 \begin_layout Plain Layout
12042 , marks the style as being part of a title block (see also the
12043 \begin_inset Flex Code
12046 \begin_layout Plain Layout
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12065 \begin_layout Description
12067 \change_inserted -712698321 1355932296
12068 \begin_inset Flex Code
12071 \begin_layout Plain Layout
12073 \change_inserted -712698321 1355932178
12080 \begin_inset Flex Code
12083 \begin_layout Plain Layout
12085 \change_inserted -712698321 1355932181
12091 ] The LaTeX command sequence declaring an item in a list.
12092 The command is to be defined without the preceding backslash (the default
12094 \begin_inset Quotes eld
12098 \begin_inset Quotes erd
12102 \begin_inset Flex Code
12105 \begin_layout Plain Layout
12107 \change_inserted -712698321 1355932279
12117 in the LaTeX output).
12120 \begin_layout Description
12121 \begin_inset Flex Code
12124 \begin_layout Plain Layout
12131 \begin_inset Flex Code
12134 \begin_layout Plain Layout
12140 ] This provides extra space between paragraphs that have the same style.
12141 If you put other styles into an environment, each is separated with the
12143 \begin_inset Flex Code
12146 \begin_layout Plain Layout
12153 But the whole items of the environment are additionally separated with
12155 \begin_inset Flex Code
12158 \begin_layout Plain Layout
12165 Note that this is a
12170 \begin_layout Description
12171 \begin_inset Flex Code
12174 \begin_layout Plain Layout
12180 [FIXME] (Used only with XML-type formats.)
12183 \begin_layout Description
12184 \begin_inset Flex Code
12187 \begin_layout Plain Layout
12194 \begin_inset Flex Code
12197 \begin_layout Plain Layout
12206 \begin_inset space \thinspace{}
12210 \begin_inset Flex Code
12213 \begin_layout Plain Layout
12219 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12220 lead to empty LaTeX output.
12221 There are some cases where this could be desirable however: in a letter
12222 template, the required fields can be provided as empty fields, so that
12223 people do not forget them; in some special classes, a style can be used
12224 as some kind of break, which does not contain actual text.
12227 \begin_layout Description
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12247 ] The vertical space between the label and the text body.
12248 Only used for labels that are above the text body (
12249 \begin_inset Flex Code
12252 \begin_layout Plain Layout
12259 \begin_inset Newline newline
12263 \begin_inset Flex Code
12266 \begin_layout Plain Layout
12267 Centered_Top_Environment
12275 \begin_layout Description
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12295 ] The name of the counter for automatic numbering.
12296 \begin_inset Newline newline
12304 \begin_inset Flex Code
12307 \begin_layout Plain Layout
12314 \begin_inset Flex Code
12317 \begin_layout Plain Layout
12324 In that case, the counter will be stepped each time the style appears.
12325 \begin_inset Newline newline
12333 \begin_inset Flex Code
12336 \begin_layout Plain Layout
12343 \begin_inset Flex Code
12346 \begin_layout Plain Layout
12352 , though this case is a bit complicated.
12353 Suppose you declare
12354 \begin_inset Quotes eld
12358 \begin_inset Flex Code
12361 \begin_layout Plain Layout
12362 LabelCounter myenum
12368 \begin_inset Quotes erd
12372 Then the actual counters used are
12373 \begin_inset Flex Code
12376 \begin_layout Plain Layout
12383 \begin_inset Flex Code
12386 \begin_layout Plain Layout
12393 \begin_inset Flex Code
12396 \begin_layout Plain Layout
12403 \begin_inset Flex Code
12406 \begin_layout Plain Layout
12412 , much as in LaTeX.
12413 These counters must all be declared separately.
12414 \begin_inset Newline newline
12418 \begin_inset CommandInset ref
12420 reference "sub:Counters"
12424 for details on counters.
12427 \begin_layout Description
12428 \begin_inset Flex Code
12431 \begin_layout Plain Layout
12437 The font used for the label.
12439 \begin_inset space ~
12443 \begin_inset CommandInset ref
12445 reference "sub:Font-description"
12452 \begin_layout Description
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12472 ] Text that indicates how far a label should be indented.
12475 \begin_layout Description
12476 \begin_inset Flex Code
12479 \begin_layout Plain Layout
12486 \begin_inset Flex Code
12489 \begin_layout Plain Layout
12495 ] Text that indicates the amount of horizontal space between the label and
12497 Only used for labels that are not above the text body.
12500 \begin_layout Description
12501 \begin_inset Flex Code
12504 \begin_layout Plain Layout
12511 \begin_inset Flex Code
12514 \begin_layout Plain Layout
12520 ] The string used for a label with a
12521 \begin_inset Flex Code
12524 \begin_layout Plain Layout
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12542 \begin_inset Flex Code
12545 \begin_layout Plain Layout
12551 is set, this string can be contain the special formatting commands described
12553 \begin_inset CommandInset ref
12555 reference "sub:Counters"
12562 \begin_layout Description
12563 \begin_inset Flex Code
12566 \begin_layout Plain Layout
12567 LabelStringAppendix
12573 \begin_inset Flex Code
12576 \begin_layout Plain Layout
12582 ] This is used inside the appendix instead of
12583 \begin_inset Newline newline
12587 \begin_inset Flex Code
12590 \begin_layout Plain Layout
12598 \begin_inset Flex Code
12601 \begin_layout Plain Layout
12608 \begin_inset Newline newline
12612 \begin_inset Flex Code
12615 \begin_layout Plain Layout
12616 LabelStringAppendix
12624 \begin_layout Description
12625 \begin_inset Flex Code
12628 \begin_layout Plain Layout
12634 [FIXME] (Used only with XML-type formats.)
12637 \begin_layout Description
12638 \begin_inset Flex Code
12641 \begin_layout Plain Layout
12648 \begin_inset Flex Code
12651 \begin_layout Plain Layout
12656 , Manual, Static, Top_Environment,
12657 \begin_inset Newline newline
12660 Centered_Top_Environment, Counter, Sensitive, Enumerate,
12661 \begin_inset Newline newline
12664 Itemize, Bibliography
12673 \begin_layout Description
12674 \begin_inset Flex Code
12677 \begin_layout Plain Layout
12683 means the label is the very first word (up to the first real blank).
12684 Use protected spaces if you want more than one word as the label.
12688 \begin_layout Description
12689 \begin_inset Flex Code
12692 \begin_layout Plain Layout
12698 means the label is simply what is declared as
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12709 Note that this really is `static'.
12712 \begin_layout Description
12713 \begin_inset Flex Code
12716 \begin_layout Plain Layout
12723 \begin_inset space ~
12727 \begin_inset space ~
12731 \begin_inset Flex Code
12734 \begin_layout Plain Layout
12735 Centered_Top_Environment
12740 are special cases of
12741 \begin_inset Flex Code
12744 \begin_layout Plain Layout
12751 The label will be printed above the paragraph, but only at the top of an
12752 environment or the top of a chain of paragraphs with this style.
12753 This might be used with the
12754 \begin_inset Flex MenuItem
12757 \begin_layout Plain Layout
12763 style, for example.
12766 \begin_layout Description
12767 \begin_inset Flex Code
12770 \begin_layout Plain Layout
12776 is a special case for the caption-labels
12777 \begin_inset Quotes eld
12781 \begin_inset Quotes erd
12785 \begin_inset Quotes eld
12789 \begin_inset Quotes erd
12793 \begin_inset Newline newline
12797 \begin_inset Flex Code
12800 \begin_layout Plain Layout
12806 means the (hardcoded) label string depends on the kind of float: It is
12807 hardcoded to be `FloatType N', where N is the value of the counter associated
12809 For the case that a caption is inserted outside of a float
12810 \begin_inset Flex Code
12813 \begin_layout Plain Layout
12819 should be set to e.
12820 \begin_inset space \thinspace{}
12824 \begin_inset space \space{}
12828 \begin_inset Quotes eld
12832 \begin_inset Quotes erd
12838 \begin_layout Description
12839 \begin_inset Flex Code
12842 \begin_layout Plain Layout
12848 defines automatically numbered labels.
12850 \begin_inset Flex Code
12853 \begin_layout Plain Layout
12859 will be expanded to contain any counters: So the result will for example
12861 \begin_inset Quotes eld
12865 \begin_inset Flex Code
12868 \begin_layout Plain Layout
12879 \begin_inset Quotes erd
12884 \begin_inset space ~
12888 \begin_inset CommandInset ref
12890 reference "sub:Counters"
12894 for more information on counters.
12897 \begin_layout Description
12898 \begin_inset Flex Code
12901 \begin_layout Plain Layout
12907 produces the usual sort of enumeration labels.
12908 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12909 small Roman numerals, and uppercase letters for the four possible depths.
12912 \begin_layout Description
12913 \begin_inset Flex Code
12916 \begin_layout Plain Layout
12922 produces various bullets at the different levels.
12923 It is also hardcoded.
12926 \begin_layout Description
12927 \begin_inset Flex Code
12930 \begin_layout Plain Layout
12936 is used internally by LyX and should be used only with
12937 \begin_inset Flex Code
12940 \begin_layout Plain Layout
12941 LatexType BibEnvironment
12950 \begin_layout Description
12951 \begin_inset Flex Code
12954 \begin_layout Plain Layout
12960 Note that this will completely override any prior
12961 \begin_inset Flex Code
12964 \begin_layout Plain Layout
12970 declaration for this style.
12972 \begin_inset Quotes eld
12976 \begin_inset Flex Code
12979 \begin_layout Plain Layout
12986 \begin_inset Quotes erd
12991 \begin_inset CommandInset ref
12993 reference "sub:I18n"
12997 for details on its use.
13000 \begin_layout Description
13001 \begin_inset Flex Code
13004 \begin_layout Plain Layout
13011 \begin_inset Flex Code
13014 \begin_layout Plain Layout
13020 ] The name of the corresponding LaTeX stuff.
13021 Either the environment or command name.
13024 \begin_layout Description
13025 \begin_inset Flex Code
13028 \begin_layout Plain Layout
13035 \begin_inset Flex Code
13038 \begin_layout Plain Layout
13044 ] An optional parameter for the corresponding
13045 \begin_inset Flex Code
13048 \begin_layout Plain Layout
13055 This parameter cannot be changed from within LyX
13056 \change_inserted -712698321 1355144804
13058 \begin_inset Flex Code
13061 \begin_layout Plain Layout
13063 \change_inserted -712698321 1355144804
13069 for customizable parameters)
13073 \change_inserted -712698321 1355144804
13074 This will be output as is after all LaTeX
13075 \begin_inset Flex Code
13078 \begin_layout Plain Layout
13080 \change_inserted -712698321 1355144658
13093 \begin_layout Description
13094 \begin_inset Flex Code
13097 \begin_layout Plain Layout
13104 \begin_inset Flex Code
13107 \begin_layout Plain Layout
13112 , Command, Environment, Item_Environment,
13113 \begin_inset Newline newline
13116 List_Environment, Bib_Environment
13121 ] How the style should be translated into LaTeX.
13125 \begin_layout Plain Layout
13126 \begin_inset Flex Code
13129 \begin_layout Plain Layout
13135 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13136 Visit the SGML class files for specific examples.
13145 \begin_layout Description
13146 \begin_inset Flex Code
13149 \begin_layout Plain Layout
13155 means nothing special.
13158 \begin_layout Description
13159 \begin_inset Flex Code
13162 \begin_layout Plain Layout
13169 \begin_inset Flex Code
13172 \begin_layout Plain Layout
13179 {\SpecialChar \ldots{}
13188 \begin_layout Description
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13199 \begin_inset Flex Code
13202 \begin_layout Plain Layout
13209 }\SpecialChar \ldots{}
13225 \begin_layout Description
13226 \begin_inset Flex Code
13229 \begin_layout Plain Layout
13236 \begin_inset Flex Code
13239 \begin_layout Plain Layout
13246 \begin_inset Flex Code
13249 \begin_layout Plain Layout
13257 is generated for each paragraph of this environment.
13261 \begin_layout Description
13262 \begin_inset Flex Code
13265 \begin_layout Plain Layout
13272 \begin_inset Flex Code
13275 \begin_layout Plain Layout
13282 \begin_inset Newline newline
13286 \begin_inset Flex Code
13289 \begin_layout Plain Layout
13295 is passed as an argument to the environment.
13296 \begin_inset Newline newline
13300 \begin_inset Flex Code
13303 \begin_layout Plain Layout
13309 can be defined in the
13310 \begin_inset Flex MenuItem
13313 \begin_layout Plain Layout
13314 Edit\SpecialChar \menuseparator
13316 \begin_inset space ~
13327 \begin_layout Description
13328 \begin_inset Flex Code
13331 \begin_layout Plain Layout
13338 \begin_inset Flex Code
13341 \begin_layout Plain Layout
13347 but adds additionally the necessary mandatory argument (the longest label)
13348 to the begin statement of the bibliography environment:
13349 \begin_inset Newline newline
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13359 begin{thebibliography}{99}
13364 It is therefore only useful for bibliography environments.
13365 The default longest label
13366 \begin_inset Quotes eld
13370 \begin_inset Quotes erd
13373 can be changed by the user in the paragraph settings of a bibliography
13377 \begin_layout Standard
13378 Putting the last few things together, the LaTeX output will be either:
13381 \begin_layout LyX-Code
13384 LatexName[LatexParam]{\SpecialChar \ldots{}
13388 \begin_layout Standard
13392 \begin_layout LyX-Code
13395 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13401 \begin_layout Standard
13402 depending upon the LaTeX type.
13406 \begin_layout Description
13408 \change_inserted -712698321 1354263086
13409 \begin_inset Flex Code
13412 \begin_layout Plain Layout
13414 \change_inserted -712698321 1353866852
13421 \begin_inset Flex Code
13424 \begin_layout Plain Layout
13426 \change_inserted -712698321 1353866852
13432 ] A string that is put at the beginning of the style content.
13433 A line break in the output can be indicated by
13434 \begin_inset Flex Code
13437 \begin_layout Plain Layout
13439 \change_inserted -712698321 1354263086
13450 \begin_layout Description
13451 \begin_inset Flex Code
13454 \begin_layout Plain Layout
13461 \begin_inset Flex Code
13464 \begin_layout Plain Layout
13470 ] If you put styles into environments, the different
13471 \begin_inset Flex Code
13474 \begin_layout Plain Layout
13480 are not simply added, but added with a factor
13481 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13485 Note that this parameter is also used when
13486 \begin_inset Flex Code
13489 \begin_layout Plain Layout
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13506 \begin_inset Flex Code
13509 \begin_layout Plain Layout
13516 Then it is added to the manual or dynamic margin.
13517 \begin_inset Newline newline
13521 \begin_inset Quotes eld
13525 \begin_inset Flex Code
13528 \begin_layout Plain Layout
13535 \begin_inset Quotes erd
13538 means that the paragraph is indented with the width of
13539 \begin_inset Quotes eld
13543 \begin_inset Flex Code
13546 \begin_layout Plain Layout
13553 \begin_inset Quotes erd
13556 in the normal font.
13557 You can get a negative width by prefixing the string with
13558 \begin_inset Quotes eld
13562 \begin_inset Flex Code
13565 \begin_layout Plain Layout
13572 \begin_inset Quotes erd
13576 This way was chosen so that the look is the same with each used screen
13580 \begin_layout Description
13581 \begin_inset Flex Code
13584 \begin_layout Plain Layout
13591 \begin_inset Flex Code
13594 \begin_layout Plain Layout
13599 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13605 \begin_inset Newline newline
13608 The kind of margin that the style has on the left side.
13612 \begin_layout Description
13613 \begin_inset Flex Code
13616 \begin_layout Plain Layout
13622 just means a fixed margin.
13625 \begin_layout Description
13626 \begin_inset Flex Code
13629 \begin_layout Plain Layout
13635 means that the left margin depends on the string entered in the
13636 \begin_inset Flex MenuItem
13639 \begin_layout Plain Layout
13640 Edit\SpecialChar \menuseparator
13642 \begin_inset space ~
13651 This is used to typeset nice lists without tabulators.
13654 \begin_layout Description
13655 \begin_inset Flex Code
13658 \begin_layout Plain Layout
13664 means that the margin depends on the size of the label.
13665 This is used for automatic enumerated headlines.
13666 It is obvious that the headline
13667 \begin_inset Quotes eld
13670 5.4.3.2.1 Very long headline
13671 \begin_inset Quotes erd
13674 must have a wider left margin (as wide as
13675 \begin_inset Quotes eld
13679 \begin_inset Quotes erd
13682 plus the space) than
13683 \begin_inset Quotes eld
13686 3.2 Very long headline
13687 \begin_inset Quotes erd
13691 \begin_inset Quotes eld
13695 \begin_inset Quotes erd
13698 are not able to do this.
13701 \begin_layout Description
13702 \begin_inset Flex Code
13705 \begin_layout Plain Layout
13711 is similar, but only the very first row of the paragraph is dynamic, while
13712 the others are static; this is used, for example, for descriptions.
13715 \begin_layout Description
13716 \begin_inset Flex Code
13719 \begin_layout Plain Layout
13725 means the margin is chosen in a way that the longest row of this paragraph
13726 fits to the right margin.
13727 This is used to typeset an address on the right edge of the page.
13731 \begin_layout Description
13732 \begin_inset Flex Code
13735 \begin_layout Plain Layout
13742 \begin_inset Flex Code
13745 \begin_layout Plain Layout
13754 \begin_inset space \thinspace{}
13758 \begin_inset Flex Code
13761 \begin_layout Plain Layout
13767 ] Whether fragile commands in this style should be
13768 \begin_inset Flex Code
13771 \begin_layout Plain Layout
13784 whether this command should itself be protected.)
13787 \begin_layout Description
13788 \begin_inset Flex Code
13791 \begin_layout Plain Layout
13798 \begin_inset Flex Code
13801 \begin_layout Plain Layout
13808 \begin_inset space \thinspace{}
13812 \begin_inset Flex Code
13815 \begin_layout Plain Layout
13823 ] Whether newlines are translated into LaTeX newlines (
13824 \begin_inset Flex Code
13827 \begin_layout Plain Layout
13838 The translation can be switched off to allow more comfortable LaTeX editing
13842 \begin_layout Description
13843 \begin_inset Flex Code
13846 \begin_layout Plain Layout
13853 \begin_inset Flex Code
13856 \begin_layout Plain Layout
13865 \begin_inset space \thinspace{}
13869 \begin_inset Flex Code
13872 \begin_layout Plain Layout
13878 ] If set to true, and if
13879 \begin_inset Flex Code
13882 \begin_layout Plain Layout
13889 \begin_inset Flex Code
13892 \begin_layout Plain Layout
13898 ) paragraphs are being indented, then the indentation of such a paragraph
13899 following one of this type will be suppressed.
13900 (So this will not affect the display of non-default paragraphs.)
13903 \begin_layout Description
13904 \begin_inset Flex Code
13907 \begin_layout Plain Layout
13914 \begin_inset Flex Code
13917 \begin_layout Plain Layout
13923 ] Name of a style that has replaced this style.
13924 This is used to rename a style, while keeping backward compatibility.
13927 \begin_layout Description
13929 \change_deleted -712698321 1353679722
13930 \begin_inset Flex Code
13933 \begin_layout Plain Layout
13940 \begin_inset Flex Code
13943 \begin_layout Plain Layout
13949 ] The number of optional arguments that can be used with this style.
13950 This is useful for things like section headings, and only makes sense with
13952 Note that, on output, the optional arguments will all precede any required
13953 arguments (see below).
13954 So one can have constructs like:
13958 \begin_layout LyX-Code
13960 \change_deleted -712698321 1353679722
13963 mycmd[opt1]{req1}{contents of paragraph}
13966 \begin_layout Standard
13968 \change_deleted -712698321 1353679722
13969 but one cannot have things like:
13972 \begin_layout LyX-Code
13974 \change_deleted -712698321 1353679722
13977 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13980 \begin_layout Standard
13982 \change_deleted -712698321 1353679722
13983 at least, not without ERT (with which you can have anything).
13990 \begin_layout Description
13991 \begin_inset Flex Code
13994 \begin_layout Plain Layout
14001 \begin_inset Flex Code
14004 \begin_layout Plain Layout
14013 \begin_inset space \thinspace{}
14017 \begin_inset Flex Code
14020 \begin_layout Plain Layout
14026 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14027 output, but only by a line break; together with
14028 \begin_inset Flex Code
14031 \begin_layout Plain Layout
14037 , this allows to emulate a plain text editor (like the ERT inset).
14040 \begin_layout Description
14041 \begin_inset Flex Code
14044 \begin_layout Plain Layout
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14060 ] The indent of the very first line of a paragraph.
14062 \begin_inset Newline newline
14066 \begin_inset Flex Code
14069 \begin_layout Plain Layout
14075 will be fixed for a certain style.
14076 The exception is the default style, since the indentation for these paragraphs
14077 can be prohibited with
14078 \begin_inset Flex Code
14081 \begin_layout Plain Layout
14089 \begin_inset Flex Code
14092 \begin_layout Plain Layout
14098 style paragraphs inside environments use the
14099 \begin_inset Flex Code
14102 \begin_layout Plain Layout
14108 of the environment, not their native one.
14110 \begin_inset Flex Code
14113 \begin_layout Plain Layout
14119 paragraphs inside an enumeration are not indented.
14122 \begin_layout Description
14123 \begin_inset Flex Code
14126 \begin_layout Plain Layout
14133 \begin_inset Flex Code
14136 \begin_layout Plain Layout
14142 ] The vertical space between two paragraphs of this style.
14145 \begin_layout Description
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14156 \begin_inset Flex Code
14159 \begin_layout Plain Layout
14165 ] LyX allows the user to choose either
14166 \begin_inset Quotes eld
14170 \begin_inset Quotes erd
14174 \begin_inset Quotes eld
14178 \begin_inset Quotes erd
14181 to separate paragraphs.
14183 \begin_inset Quotes eld
14187 \begin_inset Quotes erd
14191 \begin_inset Flex Code
14194 \begin_layout Plain Layout
14202 \begin_inset Quotes eld
14206 \begin_inset Quotes erd
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14219 is ignored and all paragraphs are separated by the
14220 \begin_inset Flex Code
14223 \begin_layout Plain Layout
14230 The vertical space is calculated with
14231 \begin_inset Flex Code
14234 \begin_layout Plain Layout
14236 \begin_inset space ~
14245 \begin_inset Flex Code
14248 \begin_layout Plain Layout
14254 is the height of a row with the normal font.
14255 This way, the look stays the same with different screen fonts.
14258 \begin_layout Description
14259 \begin_inset Flex Code
14262 \begin_layout Plain Layout
14269 \begin_inset Flex Code
14272 \begin_layout Plain Layout
14281 \begin_inset space \thinspace{}
14285 \begin_inset Flex Code
14288 \begin_layout Plain Layout
14294 ] Whether the contents of this paragraph should be output in raw form, meaning
14295 without special translations that LaTeX would require.
14298 \begin_layout Description
14299 \begin_inset Flex Code
14302 \begin_layout Plain Layout
14308 Information to be included in the LaTeX preamble when this style is used.
14309 Used to define macros, load packages, etc., required by this particular
14312 \begin_inset Quotes eld
14316 \begin_inset Flex Code
14319 \begin_layout Plain Layout
14326 \begin_inset Quotes erd
14332 \begin_layout Description
14333 \begin_inset Flex Code
14336 \begin_layout Plain Layout
14343 \begin_inset Flex Code
14346 \begin_layout Plain Layout
14352 ] The prefix to use when creating labels referring to paragraphs of this
14354 This allows the use of formatted references.
14357 \begin_layout Description
14359 \change_deleted -712698321 1353681258
14360 \begin_inset Flex Code
14363 \begin_layout Plain Layout
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14379 ] The number of required arguments that the LaTeX command or environment
14380 corresponding to this style expects.
14381 In the case of a command, these are required arguments
14385 that associated with the content of the paragraph itself.
14386 These do not actually have to be provided: LyX will output empty arguments
14388 Note that optional arguments will be output before required arguments.
14389 See the discussion of the
14390 \begin_inset Flex Code
14393 \begin_layout Plain Layout
14399 tag above for more information.
14404 \begin_layout Description
14405 \begin_inset Flex Code
14408 \begin_layout Plain Layout
14415 \begin_inset Flex Code
14418 \begin_layout Plain Layout
14424 ] Whether the style requires the feature
14425 \begin_inset Flex Code
14428 \begin_layout Plain Layout
14435 See the description of
14436 \begin_inset Flex Code
14439 \begin_layout Plain Layout
14446 \begin_inset space ~
14450 \begin_inset CommandInset ref
14452 reference "sub:General-text-class"
14456 ) for information on `features'.
14459 \begin_layout Description
14461 \change_inserted -712698321 1353693371
14462 \begin_inset Flex Code
14465 \begin_layout Plain Layout
14467 \change_inserted -712698321 1353693146
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14481 \change_inserted -712698321 1353693235
14490 \begin_inset Flex Code
14493 \begin_layout Plain Layout
14495 \change_inserted -712698321 1353693235
14501 ] Resets the LaTeX arguments of this style (as defined via the
14502 \begin_inset Flex Code
14505 \begin_layout Plain Layout
14507 \change_inserted -712698321 1353693371
14516 This is useful if you have copied a style via
14517 \begin_inset Flex Code
14520 \begin_layout Plain Layout
14522 \change_inserted -712698321 1353693302
14530 , but you do not want to inherit its (required and optional) arguments.
14535 \begin_layout Description
14537 \change_inserted -712698321 1354263074
14538 \begin_inset Flex Code
14541 \begin_layout Plain Layout
14543 \change_inserted -712698321 1353866876
14550 \begin_inset Flex Code
14553 \begin_layout Plain Layout
14555 \change_inserted -712698321 1353866873
14561 ] A string that is put at the end of the layout content.
14562 A line break in the output can be indicated by
14563 \begin_inset Flex Code
14566 \begin_layout Plain Layout
14568 \change_inserted -712698321 1354263069
14579 \begin_layout Description
14580 \begin_inset Flex Code
14583 \begin_layout Plain Layout
14590 \begin_inset Flex Code
14593 \begin_layout Plain Layout
14600 \begin_inset Flex Code
14603 \begin_layout Plain Layout
14612 \begin_layout Description
14613 \begin_inset Flex Code
14616 \begin_layout Plain Layout
14623 \begin_inset Flex Code
14626 \begin_layout Plain Layout
14635 \begin_inset Flex Code
14638 \begin_layout Plain Layout
14645 \begin_inset Flex Code
14648 \begin_layout Plain Layout
14655 \begin_inset Flex Code
14658 \begin_layout Plain Layout
14660 \begin_inset space ~
14668 ] This defines what the default spacing should be in the style.
14670 \begin_inset Flex Code
14673 \begin_layout Plain Layout
14680 \begin_inset Flex Code
14683 \begin_layout Plain Layout
14690 \begin_inset Flex Code
14693 \begin_layout Plain Layout
14699 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14700 If you specify the argument
14701 \begin_inset Flex Code
14704 \begin_layout Plain Layout
14710 , then you must also provide a value argument which will be the actual multiplie
14712 Note that, contrary to other parameters,
14713 \begin_inset Flex Code
14716 \begin_layout Plain Layout
14722 implies the generation of specific LaTeX code, using the LaTeX package
14726 \begin_inset Flex Code
14729 \begin_layout Plain Layout
14738 \begin_layout Description
14739 \begin_inset Flex Code
14742 \begin_layout Plain Layout
14749 \begin_inset Flex Code
14752 \begin_layout Plain Layout
14759 \begin_inset space \thinspace{}
14763 \begin_inset Flex Code
14766 \begin_layout Plain Layout
14774 ] Allow spell-checking paragraphs of this style.
14778 \begin_layout Description
14779 \begin_inset Flex Code
14782 \begin_layout Plain Layout
14788 The font used for the text body .
14790 \begin_inset CommandInset ref
14792 reference "sub:Font-description"
14799 \begin_layout Description
14800 \begin_inset Flex Code
14803 \begin_layout Plain Layout
14812 \begin_inset Flex Code
14815 \begin_layout Plain Layout
14825 The level of the style in the table of contents.
14826 This is used for automatic numbering of section headings.
14829 \begin_layout Description
14830 \begin_inset Flex Code
14833 \begin_layout Plain Layout
14840 \begin_inset Flex Code
14843 \begin_layout Plain Layout
14849 ] The vertical space with which the very first of a chain of paragraphs
14850 with this style is separated from the previous paragraph.
14851 If the previous paragraph has another style, the separations are not simply
14852 added, but the maximum is taken.
14855 \begin_layout Subsection
14856 \begin_inset CommandInset label
14862 Internationalization of Paragraph Styles
14865 \begin_layout Standard
14866 LyX has long supported internationalization of layout information, but,
14867 until version 2.0, this applied only to the user interface and not to, say,
14869 Thus, French authors were forced to resort to ugly hacks if they wanted
14874 1' instead of `Theorem 1'.
14875 Thanks to Georg Baum, that is no longer the case.
14878 \begin_layout Standard
14880 \begin_inset Flex Code
14883 \begin_layout Plain Layout
14889 defines text that is to appear in the typeset document, it may use
14890 \begin_inset Flex Code
14893 \begin_layout Plain Layout
14900 \begin_inset Flex Code
14903 \begin_layout Plain Layout
14909 to support non-English and even multi-language documents correctly.
14910 The following excerpt (from the
14911 \begin_inset Flex Code
14914 \begin_layout Plain Layout
14920 file) shows how this works:
14923 \begin_layout LyX-Code
14928 \begin_layout LyX-Code
14931 theoremstyle{remark}
14934 \begin_layout LyX-Code
14937 newtheorem{claim}[thm]{
14944 \begin_layout LyX-Code
14948 \begin_layout LyX-Code
14952 \begin_layout LyX-Code
14957 claimname}{_(Claim)}
14960 \begin_layout LyX-Code
14964 \begin_layout LyX-Code
14968 \begin_layout LyX-Code
14977 claimname}{_(Claim)}}
14980 \begin_layout LyX-Code
14985 \begin_layout Standard
14986 In principle, any legal LaTeX may appear in the
14987 \begin_inset Flex Code
14990 \begin_layout Plain Layout
14997 \begin_inset Flex Code
15000 \begin_layout Plain Layout
15006 tags, but in practice they will typically look as they do here.
15007 The key to correct translation of the typeset text is the definition of
15009 \begin_inset Flex Code
15012 \begin_layout Plain Layout
15021 \begin_inset Flex Code
15024 \begin_layout Plain Layout
15036 \begin_layout Standard
15038 \begin_inset Flex Code
15041 \begin_layout Plain Layout
15047 tag provides for internationalization based upon the overall language of
15049 The contents of the tag will be included in the preamble, just as with
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15061 What makes it special is the use of the
15062 \begin_inset Quotes eld
15066 \begin_inset Quotes erd
15070 \begin_inset Flex Code
15073 \begin_layout Plain Layout
15079 , which will be replaced, when LyX produces LaTeX output, with the translation
15080 of its argument into the document language.
15083 \begin_layout Standard
15085 \begin_inset Flex Code
15088 \begin_layout Plain Layout
15094 tag is more complex, since it is meant to provide support for multi-language
15095 documents and so offers an interface to the
15096 \begin_inset Flex Code
15099 \begin_layout Plain Layout
15106 Its contents will be added to the preamble once for each language that
15107 appears in the document.
15108 In this case, the argument to
15109 \begin_inset Flex Code
15112 \begin_layout Plain Layout
15118 will be replaced with its translation into the language in question; the
15120 \begin_inset Flex Code
15123 \begin_layout Plain Layout
15129 is replaced by the language name (as used by the babel package).
15132 \begin_layout Standard
15133 A German document that also included a French section would thus have the
15134 following in the preamble:
15137 \begin_layout LyX-Code
15146 claimname}{Affirmation}}
15147 \begin_inset Newline newline
15158 claimname}{Behauptung}}
15159 \begin_inset Newline newline
15166 claimname}{Behauptung}
15169 \begin_layout Standard
15171 \begin_inset Flex Code
15174 \begin_layout Plain Layout
15180 will then conspire to produce the correct text in the output.
15183 \begin_layout Standard
15184 One important point to note here is that the translations are provided by
15185 LyX itself, through the
15186 \change_inserted -195340706 1334775793
15188 \begin_inset Flex Code
15191 \begin_layout Plain Layout
15193 \change_inserted -195340706 1334775793
15200 \change_deleted -195340706 1334775793
15201 same mechanism it uses for internationalization of the user interface
15204 This means, in effect, that
15205 \begin_inset Flex Code
15208 \begin_layout Plain Layout
15215 \begin_inset Flex Code
15218 \begin_layout Plain Layout
15224 are really only of use in layout files that are provided with LyX, since
15225 text entered in user-created layout files will not be seen by LyX's internation
15227 \change_inserted -195340706 1334775793
15229 \begin_inset Flex Code
15232 \begin_layout Plain Layout
15234 \change_inserted -195340706 1334775793
15240 file is modified accordingly
15243 That said, however, any layout created with the intention that it will
15244 be included with LyX should use these tags where appropriate.
15246 \change_inserted -195340706 1334775793
15247 Please note that the paragraph style translations provided by LyX will
15248 never change with a minor update (e.g.
15249 from version 2.1.x to 2.1.y).
15250 It is however quite likely that a major update (e.g.
15251 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15256 \begin_layout Subsection
15258 \begin_inset CommandInset label
15267 \begin_layout Standard
15268 It is necessary to define the floats (
15269 \begin_inset Flex MenuItem
15272 \begin_layout Plain Layout
15279 \begin_inset Flex MenuItem
15282 \begin_layout Plain Layout
15288 , \SpecialChar \ldots{}
15289 ) in the text class itself.
15290 Standard floats are included in the file
15291 \begin_inset Flex Code
15294 \begin_layout Plain Layout
15300 , so you may have to do no more than add
15303 \begin_layout LyX-Code
15304 Input stdfloats.inc
15307 \begin_layout Standard
15308 to your layout file.
15309 If you want to implement a text class that proposes some other float types
15310 (like the AGU class bundled with LyX), the information below will hopefully
15314 \begin_layout Description
15315 \begin_inset Flex Code
15318 \begin_layout Plain Layout
15325 \begin_inset Flex Code
15328 \begin_layout Plain Layout
15335 \begin_inset Quotes erd
15339 \begin_inset Quotes erd
15342 ] The file name extension of an auxiliary file for the list of figures (or
15344 LaTeX writes the captions to this file.
15347 \begin_layout Description
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15358 \begin_inset Flex Code
15361 \begin_layout Plain Layout
15368 \begin_inset Quotes erd
15372 \begin_inset Quotes erd
15375 ] The string that will be used in the menus and also for the caption.
15376 This is translated to the current language if babel is used.
15379 \begin_layout Description
15380 \begin_inset Flex Code
15383 \begin_layout Plain Layout
15389 These tags control the XHTML output.
15391 \begin_inset space ~
15395 \begin_inset CommandInset ref
15397 reference "sec:Tags-for-XHTML"
15404 \begin_layout Description
15405 \begin_inset Flex Code
15408 \begin_layout Plain Layout
15417 \begin_inset Flex Code
15420 \begin_layout Plain Layout
15429 \begin_inset space \thinspace{}
15433 \begin_inset Flex Code
15436 \begin_layout Plain Layout
15442 ] Indicates whether the float is already defined in the document class or
15443 if instead the LaTeX package
15444 \begin_inset Flex Code
15447 \begin_layout Plain Layout
15453 needs to be loaded to define it on-the-fly.
15455 \begin_inset Flex Code
15458 \begin_layout Plain Layout
15465 \begin_inset Flex Code
15468 \begin_layout Plain Layout
15475 It should be set to
15476 \begin_inset Flex Code
15479 \begin_layout Plain Layout
15485 if the float is already defined by the LaTeX document class.
15488 \begin_layout Description
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15499 \begin_inset Flex Code
15502 \begin_layout Plain Layout
15509 \begin_inset Quotes erd
15513 \begin_inset Quotes erd
15516 ] The command used to generate a list of floats of this type; the leading
15525 \begin_inset Flex Code
15528 \begin_layout Plain Layout
15534 is false, since there is no standard way to generate this command.
15536 \begin_inset Flex Code
15539 \begin_layout Plain Layout
15545 is true, since in that case there is a standard way to define the command.
15548 \begin_layout Description
15549 \begin_inset Flex Code
15552 \begin_layout Plain Layout
15559 \begin_inset Flex Code
15562 \begin_layout Plain Layout
15569 \begin_inset Quotes erd
15573 \begin_inset Quotes erd
15576 ] A title for a list of floats of this kind (list of figures, tables, or
15578 It is used for the screen label within LyX, it is used by LaTeX for the
15579 title and it is used as the title in the XHTML output.
15580 It will be translated to the document language.
15583 \begin_layout Description
15584 \begin_inset Flex Code
15587 \begin_layout Plain Layout
15594 \begin_inset Flex Code
15597 \begin_layout Plain Layout
15604 \begin_inset Quotes erd
15608 \begin_inset Quotes erd
15611 ] This (optional) argument determines whether floats of this class will
15612 be numbered within some sectional unit of the document.
15614 \begin_inset Flex Code
15617 \begin_layout Plain Layout
15624 \begin_inset Quotes eld
15628 \begin_inset Flex Code
15631 \begin_layout Plain Layout
15638 \begin_inset Quotes erd
15641 , the floats will be numbered within chapters.
15645 \begin_layout Description
15646 \begin_inset Flex Code
15649 \begin_layout Plain Layout
15656 \begin_inset Flex Code
15659 \begin_layout Plain Layout
15666 \begin_inset Quotes erd
15670 \begin_inset Quotes erd
15673 ] The default placement for the given class of floats.
15674 The string should be as in standard LaTeX:
15675 \begin_inset Flex Code
15678 \begin_layout Plain Layout
15685 \begin_inset Flex Code
15688 \begin_layout Plain Layout
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15714 for top, bottom, page, and here, respectively.
15718 \begin_layout Plain Layout
15719 Note that the order of these letters in the string is irrelevant, like in
15725 On top of that there is a new type,
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15735 , which does not really correspond to a float, since it means: put it
15736 \begin_inset Quotes eld
15740 \begin_inset Quotes erd
15744 Note however that the
15745 \begin_inset Flex Code
15748 \begin_layout Plain Layout
15754 specifier is special and, because of implementation details, cannot be
15755 used in non-built in float types.
15756 If you do not understand what this means, just use
15757 \begin_inset Quotes eld
15761 \begin_inset Flex Code
15764 \begin_layout Plain Layout
15771 \begin_inset Quotes erd
15777 \begin_layout Description
15778 \begin_inset Flex Code
15781 \begin_layout Plain Layout
15788 \begin_inset Flex Code
15791 \begin_layout Plain Layout
15797 ] The prefix to use when creating labels referring to floats of this type.
15798 This allows the use of formatted references.
15799 Note that you can remove any
15800 \begin_inset Flex Code
15803 \begin_layout Plain Layout
15809 set by a copied style by using the special value
15810 \begin_inset Quotes eld
15814 \begin_inset Quotes erd
15817 , which must be all caps.
15820 \begin_layout Description
15821 \begin_inset Flex Code
15824 \begin_layout Plain Layout
15831 \begin_inset Flex Code
15834 \begin_layout Plain Layout
15841 \begin_inset Quotes erd
15845 \begin_inset Quotes erd
15848 ] The style used when defining the float using
15849 \begin_inset Flex Code
15852 \begin_layout Plain Layout
15863 \begin_layout Description
15864 \begin_inset Flex Code
15867 \begin_layout Plain Layout
15874 \begin_inset Flex Code
15877 \begin_layout Plain Layout
15884 \begin_inset Quotes erd
15888 \begin_inset Quotes erd
15892 \begin_inset Quotes eld
15896 \begin_inset Quotes erd
15899 of the new class of floats, like program or algorithm.
15900 After the appropriate
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15913 \begin_inset Flex Code
15916 \begin_layout Plain Layout
15925 \begin_inset Flex Code
15928 \begin_layout Plain Layout
15939 \begin_layout Description
15940 \begin_inset Flex Code
15943 \begin_layout Plain Layout
15950 \begin_inset Flex Code
15953 \begin_layout Plain Layout
15960 \begin_inset space \thinspace{}
15964 \begin_inset Flex Code
15967 \begin_layout Plain Layout
15975 ] Specifies whether this float is defined using the LaTeX package
15976 \begin_inset Flex Code
15979 \begin_layout Plain Layout
15985 , either by the class file, another package or on-the-fly by LyX itself.
15988 \begin_layout Standard
15989 Note that defining a float with type
15990 \begin_inset Flex Code
15993 \begin_layout Plain Layout
16001 automatically defines the corresponding counter with name
16002 \begin_inset Flex Code
16005 \begin_layout Plain Layout
16016 \begin_layout Subsection
16017 Flex insets and InsetLayout
16018 \begin_inset CommandInset label
16020 name "sub:Flex-insets-and"
16027 \begin_layout Standard
16028 Flex insets come in three different kinds:
16031 \begin_layout Itemize
16033 \begin_inset Flex Code
16036 \begin_layout Plain Layout
16042 ): These define semantic markup corresponding to such LaTeX commands as
16044 \begin_inset Flex Code
16047 \begin_layout Plain Layout
16056 \begin_inset Flex Code
16059 \begin_layout Plain Layout
16070 \begin_layout Itemize
16072 \begin_inset Flex Code
16075 \begin_layout Plain Layout
16081 ): These can be used to define custom collapsible insets, similar to TeX
16082 code, footnote, and the like.
16083 An obvious example is an endnote inset, which is defined in the
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16096 \begin_layout Itemize
16098 \begin_inset Flex Code
16101 \begin_layout Plain Layout
16107 ): For use with DocBook classes.
16110 \begin_layout Standard
16111 Flex insets are defined using the
16112 \begin_inset Flex Code
16115 \begin_layout Plain Layout
16121 tag, which shall be explained in a moment.
16124 \begin_layout Standard
16126 \begin_inset Flex Code
16129 \begin_layout Plain Layout
16135 tag also serves another function: It can be used to customize the general
16136 layout of many different types of insets.
16138 \begin_inset Flex Code
16141 \begin_layout Plain Layout
16147 can be used to customize the layout parameters for footnotes, marginal
16148 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16149 boxes, tables, algorithms, URLs, and
16150 \change_deleted -712698321 1356964515
16152 \change_inserted -712698321 1356964516
16155 s, as well as to define Flex insets.
16158 \begin_layout Standard
16160 \begin_inset Flex Code
16163 \begin_layout Plain Layout
16169 definition must begin with a line of the form:
16172 \begin_layout LyX-Code
16176 \begin_layout Standard
16178 \begin_inset Flex Code
16181 \begin_layout Plain Layout
16187 indicates the inset whose layout is being defined, and here there are
16188 \change_deleted -712698321 1356964888
16190 \change_inserted -712698321 1356964888
16192 \change_deleted 5863208 1334489267
16198 \begin_layout Enumerate
16199 The layout for a pre-existing inset is being modified.
16200 In this case, can be
16201 \begin_inset Flex Code
16204 \begin_layout Plain Layout
16210 any one of the following:
16211 \begin_inset Flex Code
16214 \begin_layout Plain Layout
16221 \begin_inset Flex Code
16224 \begin_layout Plain Layout
16231 \begin_inset Flex Code
16234 \begin_layout Plain Layout
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16251 \change_inserted -712698321 1356964563
16253 \begin_inset Flex Code
16256 \begin_layout Plain Layout
16258 \change_inserted -712698321 1356964560
16269 \begin_inset Flex Code
16272 \begin_layout Plain Layout
16279 \begin_inset Flex Code
16282 \begin_layout Plain Layout
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16299 \begin_inset Flex Code
16302 \begin_layout Plain Layout
16309 \begin_inset Flex Code
16312 \begin_layout Plain Layout
16319 \begin_inset Flex Code
16322 \begin_layout Plain Layout
16329 \begin_inset Flex Code
16332 \begin_layout Plain Layout
16339 \begin_inset Flex Code
16342 \begin_layout Plain Layout
16349 \begin_inset Flex Code
16352 \begin_layout Plain Layout
16359 \begin_inset Flex Code
16362 \begin_layout Plain Layout
16369 \begin_inset Flex Code
16372 \begin_layout Plain Layout
16379 \begin_inset Flex Code
16382 \begin_layout Plain Layout
16389 \begin_inset Flex Code
16392 \begin_layout Plain Layout
16399 \change_deleted -712698321 1356964592
16401 \begin_inset Flex Code
16404 \begin_layout Plain Layout
16406 \change_deleted -712698321 1353866704
16410 \change_inserted -712698321 1353866707
16421 \begin_inset Flex Code
16424 \begin_layout Plain Layout
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16443 \begin_layout Enumerate
16444 The layout for a Flex inset is being defined.
16446 \begin_inset Flex Code
16449 \begin_layout Plain Layout
16455 must be of the form
16456 \begin_inset Quotes eld
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16470 \begin_inset Quotes erd
16474 \begin_inset Flex Code
16477 \begin_layout Plain Layout
16483 may be be any valid identifier not used by a pre-existing Flex inset.
16484 The identifier may include spaces, but in that case the whole thing must
16485 be wrapped in quotes.
16486 Note that the definition of a flex inset
16491 \begin_inset Flex Code
16494 \begin_layout Plain Layout
16500 entry, declaring which type of inset it defines.
16501 \change_inserted 5863208 1334489312
16505 \begin_layout Enumerate
16507 \change_inserted 5863208 1334492248
16508 The layout for user specific branch is being defined.
16510 \begin_inset Flex Code
16513 \begin_layout Plain Layout
16515 \change_inserted 5863208 1334489384
16521 must be of the form
16522 \begin_inset Quotes eld
16526 \begin_inset Flex Code
16529 \begin_layout Plain Layout
16531 \change_inserted 5863208 1334489392
16538 \begin_inset Quotes erd
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16547 \change_inserted 5863208 1334489384
16553 may be be any valid identifier of branch defined in user's document.
16554 The identifier may include spaces, but in that case the whole thing must
16555 be wrapped in quotes.
16556 The main purpose of this feature is to allow LaTeX wrapping around specific
16557 branches as user needs.
16558 \change_inserted -712698321 1356964893
16562 \begin_layout Enumerate
16564 \change_inserted -712698321 1356965125
16565 The layout of a user (or class) specific caption is being defined.
16567 \begin_inset Flex Code
16570 \begin_layout Plain Layout
16572 \change_inserted -712698321 1356964939
16578 must be of the form
16579 \begin_inset Quotes eld
16583 \begin_inset Flex Code
16586 \begin_layout Plain Layout
16588 \change_inserted -712698321 1356964943
16595 \begin_inset Quotes erd
16599 \begin_inset Flex Code
16602 \begin_layout Plain Layout
16604 \change_inserted -712698321 1356964939
16610 specifies the name of the caption as it appears in the menu.
16611 Have a look at the standard caption (
16612 \begin_inset Flex Code
16615 \begin_layout Plain Layout
16617 \change_inserted -712698321 1356964987
16623 ), the specific captions of the KOMA-Script classes (
16624 \begin_inset Flex Code
16627 \begin_layout Plain Layout
16629 \change_inserted -712698321 1356965018
16636 \begin_inset Flex Code
16639 \begin_layout Plain Layout
16641 \change_inserted -712698321 1356965021
16652 \begin_inset Flex Code
16655 \begin_layout Plain Layout
16657 \change_inserted -712698321 1356965045
16663 ) for applications.
16668 \begin_layout Standard
16670 \begin_inset Flex Code
16673 \begin_layout Plain Layout
16679 definition can contain the following entries:
16682 \begin_layout Description
16684 \change_inserted -712698321 1353681390
16685 \begin_inset Flex Code
16688 \begin_layout Plain Layout
16690 \change_inserted -712698321 1353681344
16697 \begin_inset Flex Code
16700 \begin_layout Plain Layout
16702 \change_inserted -712698321 1353681344
16708 ] Defines argument number <int> of a command\SpecialChar \slash{}
16709 environment associated with
16710 the current layout.
16711 The definition must end with
16712 \begin_inset Flex Code
16715 \begin_layout Plain Layout
16717 \change_inserted -712698321 1353681344
16725 \begin_inset space ~
16729 \begin_inset CommandInset ref
16731 reference "sub:Paragraph-Styles"
16738 \begin_layout Description
16740 \change_inserted -195340706 1333913893
16741 \begin_inset Flex Code
16744 \begin_layout Plain Layout
16750 Preamble for changing languages.
16752 \begin_inset space ~
16756 \begin_inset CommandInset ref
16758 reference "sub:I18n"
16765 \begin_layout Description
16766 \begin_inset Flex Code
16769 \begin_layout Plain Layout
16776 \begin_inset Flex Code
16779 \begin_layout Plain Layout
16785 ] The color for the inset's background.
16787 \begin_inset space ~
16791 \begin_inset CommandInset ref
16793 reference "chap:Names-of-colors"
16797 for a list of the available color names.
16800 \begin_layout Description
16801 \begin_inset Flex Code
16804 \begin_layout Plain Layout
16811 \begin_inset Flex Code
16814 \begin_layout Plain Layout
16823 \begin_inset space \thinspace{}
16827 \begin_inset Flex Code
16830 \begin_layout Plain Layout
16836 ] Whether to use the content of the inset as the label, when the inset is
16841 \begin_layout Description
16842 \begin_inset Flex Code
16845 \begin_layout Plain Layout
16852 \begin_inset Flex Code
16855 \begin_layout Plain Layout
16861 ] As with paragraph styles, see sec.
16862 \begin_inset space ~
16866 \begin_inset CommandInset ref
16868 reference "sub:Paragraph-Styles"
16873 Note that you need to specify the complete type, e.
16874 \begin_inset space \thinspace{}
16878 \begin_inset space ~
16882 \begin_inset Flex Code
16885 \begin_layout Plain Layout
16886 CopyStyle Flex:<name>
16894 \begin_layout Description
16895 \begin_inset Flex Code
16898 \begin_layout Plain Layout
16905 \begin_inset Flex Code
16908 \begin_layout Plain Layout
16917 \begin_inset space \thinspace{}
16921 \begin_inset Flex Code
16924 \begin_layout Plain Layout
16930 ] Indicates whether the user may employ the Paragraph Settings dialog to
16931 customize the paragraph.
16934 \begin_layout Description
16935 \begin_inset Flex Code
16938 \begin_layout Plain Layout
16945 \begin_inset Flex Code
16948 \begin_layout Plain Layout
16955 \begin_inset Flex Code
16958 \begin_layout Plain Layout
16965 \begin_inset Flex Code
16968 \begin_layout Plain Layout
16974 , describing the rendering style used for the inset's frame and buttons.
16975 Footnotes generally use
16976 \begin_inset Flex Code
16979 \begin_layout Plain Layout
16985 , ERT insets generally
16986 \begin_inset Flex Code
16989 \begin_layout Plain Layout
16995 , and character styles
16996 \begin_inset Flex Code
16999 \begin_layout Plain Layout
17008 \begin_layout Description
17009 \begin_inset Flex Code
17012 \begin_layout Plain Layout
17019 \begin_inset Flex Code
17022 \begin_layout Plain Layout
17031 \begin_inset space \thinspace{}
17037 \begin_inset Flex Code
17040 \begin_layout Plain Layout
17049 \begin_inset Flex Code
17052 \begin_layout Plain Layout
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17069 Indicates whether the environment will stand on its own in the output or
17070 will appear inline with the surrounding text.
17071 If set to false, it is supposed that the LaTeX environment ignores white
17072 space (including one newline character) after the
17073 \begin_inset Flex Code
17076 \begin_layout Plain Layout
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17108 \begin_layout Description
17109 \begin_inset Flex Code
17112 \begin_layout Plain Layout
17118 Required at the end of the
17119 \begin_inset Flex Code
17122 \begin_layout Plain Layout
17131 \begin_layout Description
17132 \begin_inset Flex Code
17135 \begin_layout Plain Layout
17141 The font used for both the text body
17147 \begin_inset space ~
17151 \begin_inset CommandInset ref
17153 reference "sub:Font-description"
17158 Note that defining this font automatically defines the
17159 \begin_inset Flex Code
17162 \begin_layout Plain Layout
17168 to the same value, so define this first and define
17169 \begin_inset Flex Code
17172 \begin_layout Plain Layout
17178 later if you want them to be different.
17179 \change_inserted 155139281 1354130923
17183 \begin_layout Description
17185 \change_inserted 155139281 1354130923
17186 \begin_inset Flex Code
17189 \begin_layout Plain Layout
17191 \change_inserted 155139281 1354130923
17192 ForceLocalFontSwitch
17198 \begin_inset Flex Code
17201 \begin_layout Plain Layout
17203 \change_inserted 155139281 1354130923
17212 \begin_inset Flex Code
17215 \begin_layout Plain Layout
17217 \change_inserted 155139281 1354130923
17223 ] When using babel, always use a local font switch (
17224 \begin_inset Flex Code
17227 \begin_layout Plain Layout
17229 \change_inserted 155139281 1354130923
17237 ), never a global one (such as
17238 \begin_inset Flex Code
17241 \begin_layout Plain Layout
17243 \change_inserted 155139281 1354130923
17256 \begin_layout Description
17257 \begin_inset Flex Code
17260 \begin_layout Plain Layout
17267 \begin_inset Flex Code
17270 \begin_layout Plain Layout
17279 \begin_inset space \thinspace{}
17283 \begin_inset Flex Code
17286 \begin_layout Plain Layout
17293 \begin_inset Quotes eld
17297 \begin_inset Quotes erd
17300 language, leading to Left-to-Right (Latin) output, e.
17301 \begin_inset space \thinspace{}
17305 \begin_inset space \space{}
17308 in TeX code or URL.
17312 \begin_layout Description
17313 \begin_inset Flex Code
17316 \begin_layout Plain Layout
17323 \begin_inset Flex Code
17326 \begin_layout Plain Layout
17335 \begin_inset space \thinspace{}
17339 \begin_inset Flex Code
17342 \begin_layout Plain Layout
17348 ] Indicates whether the
17349 \begin_inset Flex Code
17352 \begin_layout Plain Layout
17358 should be used or, instead, the user can change the paragraph style used
17363 \begin_layout Description
17364 \begin_inset Flex Code
17367 \begin_layout Plain Layout
17374 \begin_inset Flex Code
17377 \begin_layout Plain Layout
17386 \begin_inset space \thinspace{}
17390 \begin_inset Flex Code
17393 \begin_layout Plain Layout
17399 ] As with paragraph styles, see sec.
17400 \begin_inset space ~
17404 \begin_inset CommandInset ref
17406 reference "sub:Paragraph-Styles"
17413 \begin_layout Description
17414 \begin_inset Flex Code
17417 \begin_layout Plain Layout
17423 These tags control the XHTML output.
17425 \begin_inset space ~
17429 \begin_inset CommandInset ref
17431 reference "sec:Tags-for-XHTML"
17438 \begin_layout Description
17439 \begin_inset Flex Code
17442 \begin_layout Plain Layout
17449 \begin_inset Flex Code
17452 \begin_layout Plain Layout
17461 \begin_inset space \thinspace{}
17465 \begin_inset Flex Code
17468 \begin_layout Plain Layout
17474 ] Whether to include the contents of this inset in the strings generated
17475 for the `Outline' pane.
17476 One would not, for example, want the content of a footnote in a section
17477 header to be included in the TOC displayed in the outline, but one would
17478 normally want the content of a character style displayed.
17479 Default is false: not to include.
17482 \begin_layout Description
17483 \begin_inset Flex Code
17486 \begin_layout Plain Layout
17495 \begin_inset Flex Code
17498 \begin_layout Plain Layout
17507 \begin_inset space \thinspace{}
17511 \begin_inset Flex Code
17514 \begin_layout Plain Layout
17520 ] As with paragraph styles, see sec.
17521 \begin_inset space ~
17525 \begin_inset CommandInset ref
17527 reference "sub:Paragraph-Styles"
17534 \begin_layout Description
17535 \begin_inset Flex Code
17538 \begin_layout Plain Layout
17544 The font used for the label.
17546 \begin_inset space ~
17550 \begin_inset CommandInset ref
17552 reference "sub:Font-description"
17557 Note that this definition can never appear before
17558 \begin_inset Flex Code
17561 \begin_layout Plain Layout
17567 , lest it be ineffective.
17570 \begin_layout Description
17571 \begin_inset Flex Code
17574 \begin_layout Plain Layout
17581 \begin_inset Flex Code
17584 \begin_layout Plain Layout
17591 \begin_inset Quotes erd
17595 \begin_inset Quotes erd
17598 ] What will be displayed on the button or elsewhere as the inset label.
17600 \begin_inset Flex Code
17603 \begin_layout Plain Layout
17610 \begin_inset Flex Code
17613 \begin_layout Plain Layout
17619 ) modify this label on the fly.
17622 \begin_layout Description
17624 \change_inserted -195340706 1333913893
17625 \begin_inset Flex Code
17628 \begin_layout Plain Layout
17634 Language dependent preamble.
17636 \begin_inset space ~
17640 \begin_inset CommandInset ref
17642 reference "sub:I18n"
17649 \begin_layout Description
17650 \begin_inset Flex Code
17653 \begin_layout Plain Layout
17660 \begin_inset Flex Code
17663 \begin_layout Plain Layout
17669 ] The name of the corresponding LaTeX stuff.
17670 Either the environment or command name.
17673 \begin_layout Description
17674 \begin_inset Flex Code
17677 \begin_layout Plain Layout
17684 \begin_inset Flex Code
17687 \begin_layout Plain Layout
17693 ] The optional parameter for the corresponding
17694 \begin_inset Flex Code
17697 \begin_layout Plain Layout
17703 stuff, including possible bracket pairs like
17704 \begin_inset Flex Code
17707 \begin_layout Plain Layout
17715 \change_inserted -712698321 1355144715
17716 This will be output as is after all LaTeX
17717 \begin_inset Flex Code
17720 \begin_layout Plain Layout
17722 \change_inserted -712698321 1355144713
17731 This parameter cannot be changed from within LyX
17732 \change_inserted -712698321 1355144775
17734 \begin_inset Flex Code
17737 \begin_layout Plain Layout
17739 \change_inserted -712698321 1355144747
17745 for customizable parameters)
17750 \begin_layout Description
17751 \begin_inset Flex Code
17754 \begin_layout Plain Layout
17761 \begin_inset Flex Code
17764 \begin_layout Plain Layout
17766 \change_deleted -712698321 1353867544
17773 Command, Environment,
17774 \change_inserted -712698321 1353867573
17776 \change_deleted -712698321 1353867557
17785 \begin_inset Flex Code
17788 \begin_layout Plain Layout
17790 \change_deleted -712698321 1353867564
17794 \change_deleted -712698321 1353867569
17802 ] How the style should be translated into LaTeX.
17806 \begin_layout Plain Layout
17807 \begin_inset Flex Code
17810 \begin_layout Plain Layout
17816 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17817 Visit the SGML class files for specific examples.
17826 \begin_layout Description
17827 \begin_inset Flex Code
17830 \begin_layout Plain Layout
17832 \change_deleted -712698321 1353867582
17834 \change_inserted -712698321 1353867583
17842 means nothing special.
17846 \begin_layout Description
17847 \begin_inset Flex Code
17850 \begin_layout Plain Layout
17857 \begin_inset Flex Code
17860 \begin_layout Plain Layout
17867 {\SpecialChar \ldots{}
17876 \begin_layout Description
17877 \begin_inset Flex Code
17880 \begin_layout Plain Layout
17887 \begin_inset Flex Code
17890 \begin_layout Plain Layout
17897 }\SpecialChar \ldots{}
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
17947 is generated for each paragraph of this environment.
17951 \begin_layout Description
17953 \change_deleted -712698321 1353867600
17954 \begin_inset Flex Code
17957 \begin_layout Plain Layout
17964 \begin_inset Flex Code
17967 \begin_layout Plain Layout
17974 \begin_inset Flex Code
17977 \begin_layout Plain Layout
17983 is passed as an argument to the environment.
17985 \begin_inset Flex Code
17988 \begin_layout Plain Layout
17994 can be defined in the
17995 \begin_inset Flex MenuItem
17998 \begin_layout Plain Layout
18003 \SpecialChar \menuseparator
18009 \begin_inset space ~
18023 \begin_layout Standard
18024 Putting the last few things together, the LaTeX output will be either:
18027 \begin_layout LyX-Code
18031 \change_deleted 2090807402 1356919073
18033 \change_inserted 2090807402 1356919073
18037 \change_deleted 2090807402 1356919073
18039 \change_inserted 2090807402 1356919002
18042 ]{\SpecialChar \ldots{}
18046 \begin_layout Standard
18050 \begin_layout LyX-Code
18054 \change_deleted 2090807402 1356919013
18056 \change_inserted 2090807402 1356919014
18060 \change_deleted 2090807402 1356919013
18062 \change_inserted 2090807402 1356919008
18065 ] \SpecialChar \ldots{}
18069 \change_deleted 2090807402 1356919016
18071 \change_inserted 2090807402 1356919016
18077 \begin_layout Standard
18078 depending upon the LaTeX type.
18082 \begin_layout Description
18084 \change_inserted -712698321 1354263128
18085 \begin_inset Flex Code
18088 \begin_layout Plain Layout
18090 \change_inserted -712698321 1353866742
18099 \begin_inset Flex Code
18102 \begin_layout Plain Layout
18104 \change_inserted -712698321 1353866752
18110 ] A string that is put at the beginning of the layout content.
18111 A line break in the output can be indicated by
18112 \begin_inset Flex Code
18115 \begin_layout Plain Layout
18117 \change_inserted -712698321 1354263128
18128 \begin_layout Description
18129 \begin_inset Flex Code
18132 \begin_layout Plain Layout
18139 \begin_inset Flex Code
18142 \begin_layout Plain Layout
18149 \begin_inset Flex Code
18152 \begin_layout Plain Layout
18159 \begin_inset Flex Code
18162 \begin_layout Plain Layout
18169 \begin_inset Flex Code
18172 \begin_layout Plain Layout
18178 (indicating a dummy definition ending definitions of charstyles, etc).
18179 This entry is required in and is only meaningful for Flex insets.
18180 Among other things, it determines on which menu this inset will appear.
18182 \begin_inset Flex Code
18185 \begin_layout Plain Layout
18192 \begin_inset Flex Code
18195 \begin_layout Plain Layout
18201 will automatically set
18202 \begin_inset Flex Code
18205 \begin_layout Plain Layout
18213 \begin_inset Flex Code
18216 \begin_layout Plain Layout
18222 can be set to true for
18223 \begin_inset Flex Code
18226 \begin_layout Plain Layout
18232 insets by setting it
18237 \begin_inset Flex Code
18240 \begin_layout Plain Layout
18249 \begin_layout Description
18250 \begin_inset Flex Code
18253 \begin_layout Plain Layout
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18272 \begin_inset space \thinspace{}
18276 \begin_inset Flex Code
18279 \begin_layout Plain Layout
18285 ] Whether multiple paragraphs are permitted in this inset.
18287 \begin_inset Flex Code
18290 \begin_layout Plain Layout
18296 to the same value and
18297 \begin_inset Flex Code
18300 \begin_layout Plain Layout
18306 to the opposite value.
18307 These can be reset to other values, if they are used
18312 \begin_inset Flex Code
18315 \begin_layout Plain Layout
18325 \begin_layout Description
18326 \begin_inset Flex Code
18329 \begin_layout Plain Layout
18336 \begin_inset Flex Code
18339 \begin_layout Plain Layout
18348 \begin_inset space \thinspace{}
18352 \begin_inset Flex Code
18355 \begin_layout Plain Layout
18361 ] Whether fragile commands in this inset should be
18362 \begin_inset Flex Code
18365 \begin_layout Plain Layout
18378 whether the command should itself be protected.) Default is false.
18381 \begin_layout Description
18382 \begin_inset Flex Code
18385 \begin_layout Plain Layout
18392 \begin_inset Flex Code
18395 \begin_layout Plain Layout
18404 \begin_inset space \thinspace{}
18408 \begin_inset Flex Code
18411 \begin_layout Plain Layout
18417 ] As with paragraph styles, see sec.
18418 \begin_inset space ~
18422 \begin_inset CommandInset ref
18424 reference "sub:Paragraph-Styles"
18432 \begin_layout Description
18433 \begin_inset Flex Code
18436 \begin_layout Plain Layout
18443 \begin_inset Flex Code
18446 \begin_layout Plain Layout
18455 \begin_inset space \thinspace{}
18459 \begin_inset Flex Code
18462 \begin_layout Plain Layout
18468 ] As with paragraph styles, see sec.
18469 \begin_inset space ~
18473 \begin_inset CommandInset ref
18475 reference "sub:Paragraph-Styles"
18483 \begin_layout Description
18484 \begin_inset Flex Code
18487 \begin_layout Plain Layout
18493 As with paragraph styles, see sec.
18494 \begin_inset space ~
18498 \begin_inset CommandInset ref
18500 reference "sub:Paragraph-Styles"
18507 \begin_layout Description
18508 \begin_inset Flex Code
18511 \begin_layout Plain Layout
18518 \begin_inset Flex Code
18521 \begin_layout Plain Layout
18527 ] The prefix to use when creating labels referring to insets of this type.
18528 This allows the use of formatted references.
18531 \begin_layout Description
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18542 \begin_inset Flex Code
18545 \begin_layout Plain Layout
18551 ] As with paragraph styles, see sec.
18552 \begin_inset space ~
18556 \begin_inset CommandInset ref
18558 reference "sub:Paragraph-Styles"
18563 \change_inserted -712698321 1354439699
18567 \begin_layout Description
18569 \change_inserted -712698321 1354439705
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18575 \change_inserted -712698321 1354439699
18582 \begin_inset Flex Code
18585 \begin_layout Plain Layout
18587 \change_inserted -712698321 1354439699
18596 \begin_inset Flex Code
18599 \begin_layout Plain Layout
18601 \change_inserted -712698321 1354439699
18607 ] Resets the LaTeX arguments of this layout (as defined via the
18608 \begin_inset Flex Code
18611 \begin_layout Plain Layout
18613 \change_inserted -712698321 1354439699
18620 This is useful if you have copied a style via
18621 \begin_inset Flex Code
18624 \begin_layout Plain Layout
18626 \change_inserted -712698321 1354439699
18632 , but you do not want to inherit its (required and optional) arguments.
18634 \change_deleted -712698321 1354439698
18640 \begin_layout Description
18641 \begin_inset Flex Code
18644 \begin_layout Plain Layout
18651 \begin_inset Flex Code
18654 \begin_layout Plain Layout
18661 \begin_inset space \thinspace{}
18665 \begin_inset Flex Code
18668 \begin_layout Plain Layout
18676 ] Whether this inset should use the font of its surrounding environment
18678 Default is true: uses its own.
18681 \begin_layout Description
18683 \change_inserted -712698321 1354263134
18684 \begin_inset Flex Code
18687 \begin_layout Plain Layout
18689 \change_inserted -712698321 1353866810
18696 \begin_inset Flex Code
18699 \begin_layout Plain Layout
18701 \change_inserted -712698321 1353866806
18707 ] A string that is put at the end of the layout content.
18708 A line break in the output can be indicated by
18709 \begin_inset Flex Code
18712 \begin_layout Plain Layout
18714 \change_inserted -712698321 1354263134
18725 \begin_layout Description
18726 \begin_inset Flex Code
18729 \begin_layout Plain Layout
18736 \begin_inset Flex Code
18739 \begin_layout Plain Layout
18746 \begin_inset space \thinspace{}
18750 \begin_inset Flex Code
18753 \begin_layout Plain Layout
18761 ] Allow spell-checking the contents of this inset.
18765 \begin_layout Subsection
18767 \begin_inset CommandInset label
18769 name "sub:Counters"
18776 \begin_layout Standard
18777 It is necessary to define the counters (
18778 \begin_inset Flex MenuItem
18781 \begin_layout Plain Layout
18788 \begin_inset Flex MenuItem
18791 \begin_layout Plain Layout
18797 , \SpecialChar \ldots{}
18798 ) in the text class itself.
18799 The standard counters are defined in the file
18800 \begin_inset Flex Code
18803 \begin_layout Plain Layout
18809 , so you may have to do no more than add
18812 \begin_layout LyX-Code
18813 Input stdcounters.inc
18816 \begin_layout Standard
18817 to your layout file to get them to work.
18818 But if you want to define custom counters, then you can do so.
18819 The counter declaration must begin with:
18822 \begin_layout LyX-Code
18823 Counter CounterName
18826 \begin_layout Standard
18828 \begin_inset Flex Code
18831 \begin_layout Plain Layout
18837 ' is replaced by the name of the counter.
18838 And it must end with
18839 \begin_inset Quotes eld
18843 \begin_inset Flex Code
18846 \begin_layout Plain Layout
18853 \begin_inset Quotes erd
18857 The following parameters can also be used:
18860 \begin_layout Description
18861 \begin_inset Flex Code
18864 \begin_layout Plain Layout
18871 \begin_inset Flex Code
18874 \begin_layout Plain Layout
18881 \begin_inset Quotes erd
18885 \begin_inset Quotes erd
18888 ] When defined, this string defines how the counter is displayed.
18889 Setting this value sets
18890 \begin_inset Flex Code
18893 \begin_layout Plain Layout
18894 LabelStringAppendix
18900 The following special constructs can be used in the string:
18904 \begin_layout Itemize
18905 \begin_inset Flex Code
18908 \begin_layout Plain Layout
18916 will be replaced by the expansion of the
18917 \begin_inset Flex Code
18920 \begin_layout Plain Layout
18927 \begin_inset Flex Code
18930 \begin_layout Plain Layout
18931 LabelStringAppendix
18937 \begin_inset Flex Code
18940 \begin_layout Plain Layout
18950 \begin_layout Itemize
18951 counter values can be expressed using LaTeX-like macros
18952 \begin_inset Newline newline
18956 \begin_inset Flex Code
18959 \begin_layout Plain Layout
18976 \begin_inset Flex Code
18979 \begin_layout Plain Layout
18991 \begin_layout Plain Layout
19001 Actually, the situation is a bit more complicated: any
19020 other than those described below will produce arabic numerals.
19021 It would not be surprising to see this change in the future.
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19036 : 1, 2, 3,\SpecialChar \ldots{}
19038 \begin_inset Flex Code
19041 \begin_layout Plain Layout
19047 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19049 \begin_inset Flex Code
19052 \begin_layout Plain Layout
19058 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19060 \begin_inset Flex Code
19063 \begin_layout Plain Layout
19069 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19071 \begin_inset Flex Code
19074 \begin_layout Plain Layout
19080 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19082 \begin_inset Flex Code
19085 \begin_layout Plain Layout
19091 for hebrew numerals.
19095 \begin_layout Standard
19096 If LabelString is not defined, a default value is constructed as follows:
19097 if the counter has a master counter
19098 \begin_inset Flex Code
19101 \begin_layout Plain Layout
19108 \begin_inset Flex Code
19111 \begin_layout Plain Layout
19118 \begin_inset Newline newline
19122 \begin_inset Flex Code
19125 \begin_layout Plain Layout
19135 is used; otherwise the string
19136 \begin_inset Flex Code
19139 \begin_layout Plain Layout
19150 \begin_layout Description
19151 \begin_inset Flex Code
19154 \begin_layout Plain Layout
19155 LabelStringAppendix
19161 \begin_inset Flex Code
19164 \begin_layout Plain Layout
19171 \begin_inset Quotes erd
19175 \begin_inset Quotes erd
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19188 , but for use in the Appendix.
19191 \begin_layout Description
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19202 \begin_inset Flex Code
19205 \begin_layout Plain Layout
19212 \begin_inset Quotes erd
19216 \begin_inset Quotes erd
19219 ] A format for use with formatted references to this counter.
19220 For example, one might want to have references to section numbers appear
19222 \begin_inset Quotes eld
19226 \begin_inset Quotes erd
19230 The string should contain
19231 \begin_inset Quotes eld
19235 \begin_inset Quotes erd
19239 This will be replaced by the counter number itself.
19240 So, for sections, it would be: Section ##.
19243 \begin_layout Description
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19254 \begin_inset Flex Code
19257 \begin_layout Plain Layout
19264 \begin_inset Quotes erd
19268 \begin_inset Quotes erd
19271 ] If this is set to the name of another counter, the present counter will
19272 be reset every time the other one is increased.
19274 \begin_inset Flex Code
19277 \begin_layout Plain Layout
19284 \begin_inset Flex Code
19287 \begin_layout Plain Layout
19296 \begin_layout Subsection
19298 \begin_inset CommandInset label
19300 name "sub:Font-description"
19307 \begin_layout Standard
19308 A font description looks like this:
19311 \begin_layout LyX-Code
19325 \begin_layout LyX-Code
19329 \begin_layout LyX-Code
19333 \begin_layout Standard
19334 The following commands are available:
19337 \begin_layout Description
19338 \begin_inset Flex Code
19341 \begin_layout Plain Layout
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19360 \begin_inset Flex Code
19363 \begin_layout Plain Layout
19370 \begin_inset Flex Code
19373 \begin_layout Plain Layout
19380 \begin_inset Flex Code
19383 \begin_layout Plain Layout
19390 \begin_inset Flex Code
19393 \begin_layout Plain Layout
19400 \begin_inset Flex Code
19403 \begin_layout Plain Layout
19410 \begin_inset Flex Code
19413 \begin_layout Plain Layout
19420 \begin_inset Flex Code
19423 \begin_layout Plain Layout
19430 \begin_inset Flex Code
19433 \begin_layout Plain Layout
19442 \begin_layout Description
19443 \begin_inset Flex Code
19446 \begin_layout Plain Layout
19453 \begin_inset Flex Code
19456 \begin_layout Plain Layout
19465 \begin_inset Flex Code
19468 \begin_layout Plain Layout
19475 \begin_inset Flex Code
19478 \begin_layout Plain Layout
19487 \begin_layout Description
19488 \begin_inset Flex Code
19491 \begin_layout Plain Layout
19498 \begin_inset Flex Code
19501 \begin_layout Plain Layout
19507 ] Valid arguments are:
19508 \begin_inset Flex Code
19511 \begin_layout Plain Layout
19518 \begin_inset Flex Code
19521 \begin_layout Plain Layout
19528 \begin_inset Flex Code
19531 \begin_layout Plain Layout
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19548 \begin_inset Flex Code
19551 \begin_layout Plain Layout
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19578 \begin_inset Flex Code
19581 \begin_layout Plain Layout
19588 \begin_inset Flex Code
19591 \begin_layout Plain Layout
19598 \begin_inset Flex Code
19601 \begin_layout Plain Layout
19608 \begin_inset Flex Code
19611 \begin_layout Plain Layout
19618 \begin_inset Flex Code
19621 \begin_layout Plain Layout
19628 Each of these turns on or off the corresponding attribute.
19630 \begin_inset Flex Code
19633 \begin_layout Plain Layout
19639 turns on emphasis, and
19640 \begin_inset Flex Code
19643 \begin_layout Plain Layout
19651 \begin_inset Newline newline
19654 If the latter seems puzzling, remember that the font settings for the present
19655 context are generally inherited from the surrounding context.
19657 \begin_inset Flex Code
19660 \begin_layout Plain Layout
19666 would turn off the emphasis that was anyway in effect, say, in a theorem
19670 \begin_layout Description
19671 \begin_inset Flex Code
19674 \begin_layout Plain Layout
19681 \begin_inset Flex Code
19684 \begin_layout Plain Layout
19693 \begin_inset Flex Code
19696 \begin_layout Plain Layout
19705 \begin_layout Description
19706 \begin_inset Flex Code
19709 \begin_layout Plain Layout
19716 \begin_inset Flex Code
19719 \begin_layout Plain Layout
19728 \begin_inset Flex Code
19731 \begin_layout Plain Layout
19738 \begin_inset Flex Code
19741 \begin_layout Plain Layout
19748 \begin_inset Flex Code
19751 \begin_layout Plain Layout
19760 \begin_layout Description
19761 \begin_inset Flex Code
19764 \begin_layout Plain Layout
19771 \begin_inset Flex Code
19774 \begin_layout Plain Layout
19781 \begin_inset Flex Code
19784 \begin_layout Plain Layout
19791 \begin_inset Flex Code
19794 \begin_layout Plain Layout
19803 \begin_inset Flex Code
19806 \begin_layout Plain Layout
19813 \begin_inset Flex Code
19816 \begin_layout Plain Layout
19823 \begin_inset Flex Code
19826 \begin_layout Plain Layout
19833 \begin_inset Flex Code
19836 \begin_layout Plain Layout
19843 \begin_inset Flex Code
19846 \begin_layout Plain Layout
19855 \begin_layout Subsection
19856 \begin_inset CommandInset label
19858 name "sub:Citation-format-description"
19862 Citation format description
19865 \begin_layout Standard
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19876 blocks are used to describe how bibliographic information should be displayed,
19877 both within LyX itself (in the citation dialog and in tooltips, for example)
19878 and in XHTML output.
19879 Such a block might look like this:
19882 \begin_layout LyX-Code
19886 \begin_layout LyX-Code
19890 \begin_layout LyX-Code
19894 \begin_layout LyX-Code
19898 \begin_layout Standard
19899 The individual lines define how the bibliographic information associated
19900 with an article or book, respectively, is to be displayed, and such a definitio
19901 n can be given for any `entry type' that might be present in a BibTeX file.
19902 LyX defines a default format in the source code that will be used if no
19903 specific definition has been given.
19904 LyX predefines several formats in the file
19905 \begin_inset Flex Code
19908 \begin_layout Plain Layout
19914 , which is included in most of LyX's document classes.
19917 \begin_layout Standard
19918 The definitions use a simple language that allows BibTeX keys to be replaced
19920 Keys should be enclosed in
19921 \begin_inset Flex Code
19924 \begin_layout Plain Layout
19931 \begin_inset Flex Code
19934 \begin_layout Plain Layout
19941 So a simple definition might look like this:
19944 \begin_layout LyX-Code
19946 \begin_inset Quotes eld
19950 \begin_inset Quotes erd
19956 \begin_layout Standard
19957 This would print the author, followed by a comma, followed by the title,
19958 in quotes, followed by a period.
19961 \begin_layout Standard
19962 Of course, sometimes you may want to print a key only if it exists.
19963 This can be done by using a conditional construction, such as:
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19969 \begin_inset space ~
19979 \begin_inset Flex Code
19982 \begin_layout Plain Layout
19988 key exists, then print
19989 \begin_inset Quotes eld
19993 \begin_inset space ~
19997 \begin_inset Quotes erd
20000 followed by the volume key.
20001 It is also possible to have an else clause in the conditional, such as:
20002 \begin_inset Newline newline
20006 \begin_inset Flex Code
20009 \begin_layout Plain Layout
20010 {%author%[[%author%]][[%editor%, ed.]]}
20016 \begin_inset Newline newline
20020 \begin_inset Flex Code
20023 \begin_layout Plain Layout
20029 key is printed if it exists; otherwise, the editor key is printed, followed
20031 \begin_inset Quotes eld
20035 \begin_inset space ~
20039 \begin_inset Quotes erd
20042 Note that the key is again enclosed in
20043 \begin_inset Flex Code
20046 \begin_layout Plain Layout
20052 signs; the entire conditional is enclosed in braces; and the if and else
20053 clauses are enclosed in double brackets,
20054 \begin_inset Quotes eld
20058 \begin_inset Flex Code
20061 \begin_layout Plain Layout
20068 \begin_inset Quotes eld
20072 \begin_inset Quotes eld
20076 \begin_inset Flex Code
20079 \begin_layout Plain Layout
20086 \begin_inset Quotes erd
20090 There must be no space between any of these.
20093 \begin_layout Standard
20094 There is one other piece of syntax available in definitions, which looks
20096 \begin_inset Flex Code
20099 \begin_layout Plain Layout
20106 This defines a piece of formatting information that is to be used when
20108 \begin_inset Quotes eld
20112 \begin_inset Quotes erd
20116 Obviously, we do not want to output HTML tags when writing plain text,
20117 so they should be wrapped in
20118 \begin_inset Quotes eld
20122 \begin_inset Quotes erd
20126 \begin_inset Quotes eld
20130 \begin_inset Quotes erd
20136 \begin_layout Standard
20137 Two special sorts of definitions are also possible in a
20138 \begin_inset Flex Code
20141 \begin_layout Plain Layout
20148 An example of the first would be:
20151 \begin_layout LyX-Code
20153 \begin_inset Quotes eld
20157 \begin_inset Quotes erd
20163 \begin_layout Standard
20164 This is an abbreviation, or macro, and it can be used by treating it as
20166 \begin_inset Flex Code
20169 \begin_layout Plain Layout
20177 \begin_inset Flex Code
20180 \begin_layout Plain Layout
20186 exactly as it would treat its definition.
20187 So, let us issue the obvious
20195 \begin_layout LyX-Code
20199 \begin_layout Standard
20200 or anything like it.
20201 LyX shouldn't go into an infinite loop, but it may go into a long one before
20205 \begin_layout Standard
20206 The second sort of special definition might look like this:
20209 \begin_layout LyX-Code
20213 \begin_layout Standard
20214 This defines a translatable piece of text, which allows relevant parts of
20215 the bibliography to be translated.
20216 It can be included in a definition by treating it as a key:
20217 \begin_inset Flex Code
20220 \begin_layout Plain Layout
20227 Several of these are predefined in
20228 \begin_inset Flex Code
20231 \begin_layout Plain Layout
20238 Note that these are not macros, in the sense just defined.
20239 They will not be expanded.
20242 \begin_layout Standard
20243 So here then is an example that use all these features:
20244 \begin_inset VSpace defskip
20250 \begin_layout Standard
20254 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20257 \begin_layout Standard
20258 \begin_inset VSpace defskip
20261 This defines a macro that prints the author, followed by a comma, if the
20263 \begin_inset Flex Code
20266 \begin_layout Plain Layout
20272 key is defined, or else prints the name of the editor, followed by the
20274 \begin_inset Flex Code
20277 \begin_layout Plain Layout
20283 or its translation (it is by default
20284 \begin_inset Quotes eld
20288 \begin_inset Quotes erd
20292 \begin_inset Flex Code
20295 \begin_layout Plain Layout
20302 Note that this is in fact defined in
20303 \begin_inset Flex Code
20306 \begin_layout Plain Layout
20312 , so you can use it in your own definitions, or re-definitions, if you load
20316 \begin_layout Section
20317 \begin_inset CommandInset label
20319 name "sec:Tags-for-XHTML"
20323 Tags for XHTML output
20326 \begin_layout Standard
20327 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20328 by layout information.
20329 In general, LyX provides sensible defaults and, as mentioned earlier, it
20330 will even construct default CSS style rules from the other layout tags.
20331 For example, LyX will attempt to use the information provided in the
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20341 declaration for the Chapter style to write CSS that will appropriately
20342 format chapter headings.
20345 \begin_layout Standard
20346 In many cases, then, you may not have to do anything at all to get acceptable
20347 XHTML output for your own environments, custom insets, and so forth.
20348 But in some cases you will, and so LyX provides a number of layout tags
20349 that can be used to customize the XHTML and CSS that are generated.
20352 \begin_layout Standard
20353 Note that there are two tags,
20354 \begin_inset Flex Code
20357 \begin_layout Plain Layout
20364 \begin_inset Flex Code
20367 \begin_layout Plain Layout
20373 that may appear outside style and inset declarations.
20375 \begin_inset CommandInset ref
20377 reference "sub:General-text-class"
20381 for details on these.
20384 \begin_layout Subsection
20385 \begin_inset CommandInset label
20387 name "sub:Paragraph-Style-XHTML"
20394 \begin_layout Standard
20395 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20396 dealing with a normal paragraph, a command, or an environment, where this
20397 is itself determined by the contents of the corresponding
20398 \begin_inset Flex Code
20401 \begin_layout Plain Layout
20411 \begin_layout Standard
20412 For a command or normal paragraph, the output XHTML has the following form:
20415 \begin_layout LyX-Code
20417 \begin_inset Quotes erd
20421 \begin_inset Quotes erd
20427 \begin_layout LyX-Code
20429 \begin_inset Quotes erd
20433 \begin_inset Quotes erd
20439 \begin_layout LyX-Code
20440 Contents of the paragraph.
20443 \begin_layout LyX-Code
20447 \begin_layout Standard
20448 The label tags are of course omitted if the paragraph does not have a label.
20451 \begin_layout Standard
20452 For an environment that is not some sort of list, the XHTML takes this form:
20455 \begin_layout LyX-Code
20457 \begin_inset Quotes erd
20461 \begin_inset Quotes erd
20467 \begin_layout LyX-Code
20469 \begin_inset Quotes erd
20473 \begin_inset Quotes erd
20477 \begin_inset Quotes erd
20481 \begin_inset Quotes erd
20484 >Environment Label</labeltag>First paragraph.</itemtag>
20487 \begin_layout LyX-Code
20488 <itemtag>Second paragraph.</itemtag>
20491 \begin_layout LyX-Code
20495 \begin_layout Standard
20496 Note that the label is output only for the first paragraph, as it should
20497 be for a theorem, for example.
20501 \begin_layout Standard
20502 For a list, we have one of these forms:
20505 \begin_layout LyX-Code
20507 \begin_inset Quotes erd
20511 \begin_inset Quotes erd
20517 \begin_layout LyX-Code
20519 \begin_inset Quotes erd
20523 \begin_inset Quotes erd
20527 \begin_inset Quotes erd
20531 \begin_inset Quotes erd
20534 >List Label</labeltag>First item.</itemtag>
20537 \begin_layout LyX-Code
20539 \begin_inset Quotes erd
20543 \begin_inset Quotes erd
20547 \begin_inset Quotes erd
20551 \begin_inset Quotes erd
20554 >List Label</labeltag>Second item.</itemtag>
20557 \begin_layout LyX-Code
20561 \begin_layout LyX-Code
20565 \begin_layout LyX-Code
20567 \begin_inset Quotes erd
20571 \begin_inset Quotes erd
20577 \begin_layout LyX-Code
20579 \begin_inset Quotes erd
20583 \begin_inset Quotes erd
20586 >List Label</labeltag><itemtag attr=
20587 \begin_inset Quotes erd
20591 \begin_inset Quotes erd
20594 >First item.</itemtag>
20597 \begin_layout LyX-Code
20599 \begin_inset Quotes erd
20603 \begin_inset Quotes erd
20606 >List Label</labeltag><itemtag attr=
20607 \begin_inset Quotes erd
20611 \begin_inset Quotes erd
20614 >Second item.</itemtag>
20617 \begin_layout LyX-Code
20621 \begin_layout Standard
20622 Note the different orders of
20623 \begin_inset Flex Code
20626 \begin_layout Plain Layout
20633 \begin_inset Flex Code
20636 \begin_layout Plain Layout
20643 Which order we get depends upon the setting of
20644 \begin_inset Flex Code
20647 \begin_layout Plain Layout
20654 \begin_inset Flex Code
20657 \begin_layout Plain Layout
20663 is false (the default), you get the first of these, with the label within
20664 the item; if true, you get the second, with the label outside the item.
20667 \begin_layout Standard
20668 The specific tags and attributes output for each paragraph type can be controlle
20669 d by means of the layout tags we are about to describe.
20670 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20671 so you often may not need to do very much to get good XHTML output.
20672 Think of the available tags as there so you can tweak things to your liking.
20675 \begin_layout Description
20676 \begin_inset Flex Code
20679 \begin_layout Plain Layout
20686 \begin_inset Flex Code
20689 \begin_layout Plain Layout
20695 ] Specifies attribute information to be output with the main tag.
20697 \begin_inset Quotes eld
20701 \begin_inset Flex Code
20704 \begin_layout Plain Layout
20711 \begin_inset Quotes erd
20715 By default, LyX will output
20716 \begin_inset Quotes eld
20720 \begin_inset Flex Code
20723 \begin_layout Plain Layout
20730 \begin_inset Quotes erd
20734 \begin_inset Flex Code
20737 \begin_layout Plain Layout
20743 is the LyX name of the layout, made lowercase, for example: chapter.
20748 contain any style information.
20750 \begin_inset Flex Code
20753 \begin_layout Plain Layout
20762 \begin_layout Description
20763 \begin_inset Flex Code
20766 \begin_layout Plain Layout
20773 \begin_inset Flex Code
20776 \begin_layout Plain Layout
20786 ] Whether to output the default CSS information LyX generates for this layout,
20787 even if additional information is explicitly provided via
20788 \begin_inset Flex Code
20791 \begin_layout Plain Layout
20799 \begin_inset Flex Code
20802 \begin_layout Plain Layout
20808 allows you to alter or augment the generated CSS, rather than to override
20811 \begin_inset Flex Code
20814 \begin_layout Plain Layout
20823 \begin_layout Description
20824 \begin_inset Flex Code
20827 \begin_layout Plain Layout
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20843 ] The tag to be used for individual paragraphs of environments, replacing
20845 \begin_inset Flex Code
20848 \begin_layout Plain Layout
20854 in the examples above.
20856 \begin_inset Flex Code
20859 \begin_layout Plain Layout
20868 \begin_layout Description
20869 \begin_inset Flex Code
20872 \begin_layout Plain Layout
20879 \begin_inset Flex Code
20882 \begin_layout Plain Layout
20888 ] Attributes for the item tag.
20890 \begin_inset Quotes eld
20894 \begin_inset Flex Code
20897 \begin_layout Plain Layout
20898 class=`layoutname_item'
20904 \begin_inset Quotes erd
20912 contain any style information.
20914 \begin_inset Flex Code
20917 \begin_layout Plain Layout
20926 \begin_layout Description
20927 \begin_inset Flex Code
20930 \begin_layout Plain Layout
20937 \begin_inset Flex Code
20940 \begin_layout Plain Layout
20946 ] The tag to be used for paragraph and item labels, replacing
20947 \begin_inset Flex Code
20950 \begin_layout Plain Layout
20956 in the examples above.
20958 \begin_inset Flex Code
20961 \begin_layout Plain Layout
20968 \begin_inset Flex Code
20971 \begin_layout Plain Layout
20978 \begin_inset Flex Code
20981 \begin_layout Plain Layout
20988 \begin_inset Flex Code
20991 \begin_layout Plain Layout
20992 Centered_Top_Environment
20997 , in which case it defaults to
20998 \begin_inset Flex Code
21001 \begin_layout Plain Layout
21010 \begin_layout Description
21011 \begin_inset Flex Code
21014 \begin_layout Plain Layout
21021 \begin_inset Flex Code
21024 \begin_layout Plain Layout
21030 ] Attributes for the label tag.
21032 \begin_inset Quotes eld
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21040 class=`layoutname_label'
21046 \begin_inset Quotes erd
21054 contain any style information.
21056 \begin_inset Flex Code
21059 \begin_layout Plain Layout
21068 \begin_layout Description
21069 \begin_inset Flex Code
21072 \begin_layout Plain Layout
21079 \begin_inset Flex Code
21082 \begin_layout Plain Layout
21092 ] Meaningful only for list-like environments, this tag controls whether
21093 the label tag is output before or inside the item tag.
21094 This is used, for example, in the description environment, where we want
21096 \begin_inset Flex Code
21099 \begin_layout Plain Layout
21100 <dt>\SpecialChar \ldots{}
21101 </dt><dd>\SpecialChar \ldots{}
21109 \begin_inset Flex Code
21112 \begin_layout Plain Layout
21118 : The label tag is output inside the item tag.
21121 \begin_layout Description
21122 \begin_inset Flex Code
21125 \begin_layout Plain Layout
21131 Information to be output in the
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21141 section when this style is used.
21142 This might, for example, be used to include a
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21153 \begin_inset Flex Code
21156 \begin_layout Plain Layout
21165 \begin_layout Description
21166 \begin_inset Flex Code
21169 \begin_layout Plain Layout
21175 CSS style information to be included when this style is used.
21176 Note that this will automatically be wrapped in a layout-generated
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21186 block, so only the CSS itself need be included.
21189 \begin_layout Description
21190 \begin_inset Flex Code
21193 \begin_layout Plain Layout
21200 \begin_inset Flex Code
21203 \begin_layout Plain Layout
21209 ] The tag to be used for the main label, replacing
21210 \begin_inset Flex Code
21213 \begin_layout Plain Layout
21219 in the examples above.
21221 \begin_inset Flex Code
21224 \begin_layout Plain Layout
21233 \begin_layout Description
21234 \begin_inset Flex Code
21237 \begin_layout Plain Layout
21244 \begin_inset Flex Code
21247 \begin_layout Plain Layout
21257 ] Marks this style as the one to be used to generate the
21258 \begin_inset Flex Code
21261 \begin_layout Plain Layout
21267 tag for the XHTML file.
21268 By default, it is false.
21270 \begin_inset Flex Code
21273 \begin_layout Plain Layout
21279 file sets it to true for the
21280 \begin_inset Flex Code
21283 \begin_layout Plain Layout
21293 \begin_layout Subsection
21297 \begin_layout Standard
21298 The XHTML output of insets can also be controlled by information in layout
21303 \begin_layout Plain Layout
21304 At present, this is true only for
21305 \begin_inset Quotes eld
21309 \begin_inset Quotes erd
21312 insets (insets you can type into) and is not true for
21313 \begin_inset Quotes eld
21317 \begin_inset Quotes erd
21320 insets (insets that are associated with dialog boxes).
21325 Here, too, LyX tries to provide sensible defaults, and it constructs default
21327 But everything can be customized.
21330 \begin_layout Standard
21331 The XHTML LyX outputs for an inset has the following form:
21334 \begin_layout LyX-Code
21336 \begin_inset Quotes erd
21340 \begin_inset Quotes erd
21346 \begin_layout LyX-Code
21347 <labeltag>Label</labeltag>
21350 \begin_layout LyX-Code
21352 \begin_inset Quotes erd
21356 \begin_inset Quotes erd
21359 >Contents of the inset.</innertag>
21362 \begin_layout LyX-Code
21366 \begin_layout Standard
21367 If the inset permits multiple paragraphs---that is, if
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21377 is true---then the contents of the inset will itself be output as paragraphs
21378 formatted according to the styles used for those paragraphs (standard,
21379 quote, and the like).
21380 The label tag is of course omitted if the paragraph does not have a label
21381 and, at present, is always
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21392 The inner tag is optional and, by default, does not appear.
21395 \begin_layout Standard
21396 The specific tags and attributes output for each inset can be controlled
21397 by means of the following layout tags.
21400 \begin_layout Description
21401 \begin_inset Flex Code
21404 \begin_layout Plain Layout
21411 \begin_inset Flex Code
21414 \begin_layout Plain Layout
21420 ] Specifies attribute information to be output with the main tag.
21422 \begin_inset Quotes eld
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21430 class=`myinset' onclick=`\SpecialChar \ldots{}
21437 \begin_inset Quotes erd
21441 By default, LyX will output
21442 \begin_inset Quotes eld
21446 \begin_inset Flex Code
21449 \begin_layout Plain Layout
21456 \begin_inset Quotes erd
21460 \begin_inset Flex Code
21463 \begin_layout Plain Layout
21469 is the LyX name of the inset, made lowercase and with non-alphanumeric
21470 characters converted to underscores, for example: footnote.
21473 \begin_layout Description
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21497 ] Whether to output the default CSS information LyX generates for this layout,
21498 even if additional information is explicitly provided via
21499 \begin_inset Flex Code
21502 \begin_layout Plain Layout
21510 \begin_inset Flex Code
21513 \begin_layout Plain Layout
21519 allows you to alter or augment the generated CSS, rather than to override
21524 \begin_layout Description
21525 \begin_inset Flex Code
21528 \begin_layout Plain Layout
21535 \begin_inset Flex Code
21538 \begin_layout Plain Layout
21544 ] Attributes for the inner tag.
21546 \begin_inset Quotes eld
21550 \begin_inset Flex Code
21553 \begin_layout Plain Layout
21554 class=`insetname_inner'
21560 \begin_inset Quotes erd
21566 \begin_layout Description
21567 \begin_inset Flex Code
21570 \begin_layout Plain Layout
21577 \begin_inset Flex Code
21580 \begin_layout Plain Layout
21586 ] The inner tag, replacing
21587 \begin_inset Flex Code
21590 \begin_layout Plain Layout
21596 in the examples above.
21597 By default, there is none.
21600 \begin_layout Description
21601 \begin_inset Flex Code
21604 \begin_layout Plain Layout
21611 \begin_inset Flex Code
21614 \begin_layout Plain Layout
21622 ] Whether this inset represents a standalone block of text (such as a footnote)
21623 or instead represents material that is included in the surrounding text
21624 (such as a branch).
21628 \begin_layout Description
21629 \begin_inset Flex Code
21632 \begin_layout Plain Layout
21639 \begin_inset Flex Code
21642 \begin_layout Plain Layout
21648 ] A label for this inset, possibly including a reference to a counter.
21649 For example, for footnote, it might be:
21650 \begin_inset Flex Code
21653 \begin_layout Plain Layout
21662 This is optional, and there is no default.
21665 \begin_layout Description
21666 \begin_inset Flex Code
21669 \begin_layout Plain Layout
21675 Information to be output in the
21676 \begin_inset Flex Code
21679 \begin_layout Plain Layout
21685 section when this style is used.
21686 This might, for example, be used to include a
21687 \begin_inset Flex Code
21690 \begin_layout Plain Layout
21697 \begin_inset Flex Code
21700 \begin_layout Plain Layout
21709 \begin_layout Description
21710 \begin_inset Flex Code
21713 \begin_layout Plain Layout
21719 CSS style information to be included when this style is used.
21720 Note that this will automatically be wrapped in a layout-generated
21721 \begin_inset Flex Code
21724 \begin_layout Plain Layout
21730 block, so only the CSS itself need be included.
21733 \begin_layout Description
21734 \begin_inset Flex Code
21737 \begin_layout Plain Layout
21744 \begin_inset Flex Code
21747 \begin_layout Plain Layout
21753 ] The tag to be used for the main label, replacing
21754 \begin_inset Flex Code
21757 \begin_layout Plain Layout
21763 in the examples above.
21764 The default depends upon the setting of
21765 \begin_inset Flex Code
21768 \begin_layout Plain Layout
21775 \begin_inset Flex Code
21778 \begin_layout Plain Layout
21784 is true, the default is
21785 \begin_inset Flex Code
21788 \begin_layout Plain Layout
21794 ; if it is false, the default is
21795 \begin_inset Flex Code
21798 \begin_layout Plain Layout
21807 \begin_layout Subsection
21811 \begin_layout Standard
21812 The XHTML output for floats too can be controlled by layout information.
21813 The output has the following form:
21816 \begin_layout LyX-Code
21818 \begin_inset Quotes erd
21822 \begin_inset Quotes erd
21828 \begin_layout LyX-Code
21829 Contents of the float.
21832 \begin_layout LyX-Code
21836 \begin_layout Standard
21837 The caption, if there is one, is a separate inset and will be output as
21839 Its appearance can be controlled via the InsetLayout for caption insets.
21843 \begin_layout Description
21844 \begin_inset Flex Code
21847 \begin_layout Plain Layout
21854 \begin_inset Flex Code
21857 \begin_layout Plain Layout
21863 ] Specifies attribute information to be output with the main tag.
21865 \begin_inset Quotes eld
21869 \begin_inset Flex Code
21872 \begin_layout Plain Layout
21873 class=`myfloat' onclick=`\SpecialChar \ldots{}
21880 \begin_inset Quotes erd
21884 By default, LyX will output
21885 \begin_inset Quotes eld
21889 \begin_inset Flex Code
21892 \begin_layout Plain Layout
21893 class=`float float-floattype'
21899 \begin_inset Quotes erd
21903 \begin_inset Flex Code
21906 \begin_layout Plain Layout
21912 is LyX's name for this type of float, as determined by the float declaration
21914 \begin_inset CommandInset ref
21916 reference "sub:Floats"
21920 ), though made lowercase and with non-alphanumeric characters converted
21921 to underscores, for example: float-table.
21924 \begin_layout Description
21925 \begin_inset Flex Code
21928 \begin_layout Plain Layout
21934 CSS style information to be included when this float is used.
21935 Note that this will automatically be wrapped in a layout-generated
21936 \begin_inset Flex Code
21939 \begin_layout Plain Layout
21945 block, so only the CSS itself need be included.
21948 \begin_layout Description
21949 \begin_inset Flex Code
21952 \begin_layout Plain Layout
21959 \begin_inset Flex Code
21962 \begin_layout Plain Layout
21968 ] The tag to be used for this float, replacing
21969 \begin_inset Quotes eld
21973 \begin_inset Flex Code
21976 \begin_layout Plain Layout
21983 \begin_inset Quotes erd
21986 in the example above.
21988 \begin_inset Flex Code
21991 \begin_layout Plain Layout
21997 and will rarely need changing.
22000 \begin_layout Subsection
22001 Bibliography formatting
22004 \begin_layout Standard
22005 The bibliography can be formatted using
22006 \begin_inset Flex Code
22009 \begin_layout Plain Layout
22017 \begin_inset CommandInset ref
22019 reference "sub:Citation-format-description"
22026 \begin_layout Subsection
22030 \begin_layout Standard
22031 We have several times mentioned that LyX will generate default CSS style
22032 rules for both insets and paragraph styles, based upon the other layout
22033 information that is provided.
22034 In this section, we shall say a word about which layout information LyX
22038 \begin_layout Standard
22039 At present, LyX auto-generates CSS only for font information, making use
22041 \begin_inset Flex Code
22044 \begin_layout Plain Layout
22051 \begin_inset Flex Code
22054 \begin_layout Plain Layout
22061 \begin_inset Flex Code
22064 \begin_layout Plain Layout
22071 \begin_inset Flex Code
22074 \begin_layout Plain Layout
22081 \begin_inset Flex Code
22084 \begin_layout Plain Layout
22092 \begin_inset CommandInset ref
22094 reference "sub:Font-description"
22098 .) The translation is mostly straightforward and obvious.
22100 \begin_inset Quotes eld
22104 \begin_inset Flex Code
22107 \begin_layout Plain Layout
22114 \begin_inset Quotes erd
22118 \begin_inset Quotes eld
22122 \begin_inset Flex Code
22125 \begin_layout Plain Layout
22126 font-family: sans-serif;
22132 \begin_inset Quotes erd
22136 The correspondence of LyX sizes and CSS sizes is a little less obvious
22137 but nonetheless intuitive.
22139 \begin_inset Flex Code
22142 \begin_layout Plain Layout
22149 \begin_inset Flex URL
22152 \begin_layout Plain Layout
22162 \begin_layout Chapter
22163 Including External Material
22166 \begin_layout Standard
22167 \begin_inset Box Shadowbox
22177 height_special "totalheight"
22180 \begin_layout Plain Layout
22181 WARNING: This portion of the documentation has not been updated for some
22183 We certainly hope that it is still accurate, but there are no guarantees.
22191 \begin_layout Standard
22192 The use of material from sources external to LyX is covered in detail in
22198 This part of the manual covers what needs to happen behind the scenes for
22199 new sorts of material to be included.
22202 \begin_layout Section
22206 \begin_layout Standard
22207 The external material feature is based on the concept of a
22212 A template is a specification of how LyX should interface with a certain
22214 As bundled, LyX comes with predefined templates for Xfig figures, various
22215 raster format images, chess diagrams, and LilyPond music notation.
22216 You can check the actual list by using the menu
22217 \begin_inset Flex MenuItem
22220 \begin_layout Plain Layout
22221 Insert\SpecialChar \menuseparator
22222 File\SpecialChar \menuseparator
22229 Furthermore, it is possible to roll your own template to support a specific
22231 Later we'll describe in more detail what is involved, and hopefully you
22232 will submit all the templates you create so we can include them in a later
22236 \begin_layout Standard
22237 Another basic idea of the external material feature is to distinguish between
22238 the original file that serves as a base for final material and the produced
22239 file that is included in your exported or printed document.
22240 For example, consider the case of a figure produced with
22241 \begin_inset Flex Code
22244 \begin_layout Plain Layout
22251 The Xfig application itself works on an original file with the
22252 \begin_inset Flex Code
22255 \begin_layout Plain Layout
22262 Within Xfig, you create and change your figure, and when you are done,
22264 \begin_inset Flex Code
22267 \begin_layout Plain Layout
22274 When you want to include the figure in your document, you invoke
22275 \begin_inset Flex Code
22278 \begin_layout Plain Layout
22284 in order to create a PostScript file that can readily be included in your
22287 \begin_inset Flex Code
22290 \begin_layout Plain Layout
22296 file is the original file, and the PostScript file is the produced file.
22299 \begin_layout Standard
22300 This distinction is important in order to allow updating of the material
22301 while you are in the process of writing the document.
22302 Furthermore, it provides us with the flexibility that is needed to support
22303 multiple export formats.
22304 For instance, in the case of a plain text file, it is not exactly an award-winn
22305 ing idea to include the figure as raw PostScript.
22306 Instead, you would either prefer to just include a reference to the figure
22307 or try to invoke some graphics to ASCII converter to make the final result
22308 look similar to the real graphics.
22309 The external material management allows you to do this, because it is parametri
22310 zed on the different export formats that LyX supports.
22313 \begin_layout Standard
22314 Besides supporting the production of different products according to the
22315 exported format, it supports tight integration with editing and viewing
22317 In the case of an Xfig figure, you are able to invoke Xfig on the original
22318 file with a single click from within the external material dialog in LyX,
22319 and also preview the produced PostScript file with Ghostview with another
22321 No more fiddling around with the command line and/or file browsers to locate
22322 and manipulate the original or produced files.
22323 In this way, you are finally able to take full advantage of the many different
22324 applications that are relevant to use when you write your documents, and
22325 ultimately be more productive.
22328 \begin_layout Section
22329 The external template configuration file
22332 \begin_layout Standard
22333 It is relatively easy to add custom external template definitions to LyX.
22334 However, be aware that doing this in an careless manner most probably
22338 introduce an easily exploitable security hole.
22339 So before you do this, please read the discussion about security in section
22341 \begin_inset CommandInset ref
22343 reference "sec:Security-discussion"
22350 \begin_layout Standard
22351 Having said that, we encourage you to submit any interesting templates that
22356 \begin_layout Standard
22357 The external templates are defined in the
22358 \begin_inset Flex Code
22361 \begin_layout Plain Layout
22362 LyXDir/lib/external_templates
22368 You can place your own version in
22369 \begin_inset Flex Code
22372 \begin_layout Plain Layout
22373 UserDir/external_templates
22381 \begin_layout Standard
22382 A typical template looks like this:
22385 \begin_layout LyX-Code
22389 \begin_layout LyX-Code
22390 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22393 \begin_layout LyX-Code
22397 \begin_layout LyX-Code
22401 \begin_layout LyX-Code
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22413 \begin_layout LyX-Code
22414 AutomaticProduction true
22417 \begin_layout LyX-Code
22421 \begin_layout LyX-Code
22425 \begin_layout LyX-Code
22429 \begin_layout LyX-Code
22430 TransformCommand Rotate RotationLatexCommand
22433 \begin_layout LyX-Code
22434 TransformCommand Resize ResizeLatexCommand
22437 \begin_layout LyX-Code
22438 Product "$$RotateFront$$ResizeFront
22441 \begin_layout LyX-Code
22446 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22449 \begin_layout LyX-Code
22450 $$ResizeBack$$RotateBack"
22453 \begin_layout LyX-Code
22457 \begin_layout LyX-Code
22458 UpdateResult "$$AbsPath$$Basename.pstex_t"
22461 \begin_layout LyX-Code
22462 Requirement "graphicx"
22465 \begin_layout LyX-Code
22466 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22469 \begin_layout LyX-Code
22470 ReferencedFile latex "$$AbsPath$$Basename.eps"
22473 \begin_layout LyX-Code
22474 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22477 \begin_layout LyX-Code
22481 \begin_layout LyX-Code
22485 \begin_layout LyX-Code
22486 TransformCommand Rotate RotationLatexCommand
22489 \begin_layout LyX-Code
22490 TransformCommand Resize ResizeLatexCommand
22493 \begin_layout LyX-Code
22494 Product "$$RotateFront$$ResizeFront
22497 \begin_layout LyX-Code
22502 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22505 \begin_layout LyX-Code
22506 $$ResizeBack$$RotateBack"
22509 \begin_layout LyX-Code
22510 UpdateFormat pdftex
22513 \begin_layout LyX-Code
22514 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22517 \begin_layout LyX-Code
22518 Requirement "graphicx"
22521 \begin_layout LyX-Code
22522 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22525 \begin_layout LyX-Code
22526 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22529 \begin_layout LyX-Code
22533 \begin_layout LyX-Code
22537 \begin_layout LyX-Code
22538 Product "$$Contents(
22540 "$$AbsPath$$Basename.asc
22545 \begin_layout LyX-Code
22546 UpdateFormat asciixfig
22549 \begin_layout LyX-Code
22550 UpdateResult "$$AbsPath$$Basename.asc"
22553 \begin_layout LyX-Code
22557 \begin_layout LyX-Code
22561 \begin_layout LyX-Code
22562 Product "<graphic fileref=
22564 "$$AbsOrRelPathMaster$$Basename.eps
22569 \begin_layout LyX-Code
22573 \begin_layout LyX-Code
22577 \begin_layout LyX-Code
22578 UpdateResult "$$AbsPath$$Basename.eps"
22581 \begin_layout LyX-Code
22582 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22585 \begin_layout LyX-Code
22586 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22589 \begin_layout LyX-Code
22593 \begin_layout LyX-Code
22594 Product "[XFig: $$FName]"
22597 \begin_layout LyX-Code
22601 \begin_layout LyX-Code
22605 \begin_layout Standard
22606 As you can see, the template is enclosed in
22607 \begin_inset Flex Code
22610 \begin_layout Plain Layout
22616 \SpecialChar \ldots{}
22618 \begin_inset Flex Code
22621 \begin_layout Plain Layout
22628 It contains a header specifying some general settings and, for each supported
22629 primary document file format, a section
22630 \begin_inset Flex Code
22633 \begin_layout Plain Layout
22639 \SpecialChar \ldots{}
22641 \begin_inset Flex Code
22644 \begin_layout Plain Layout
22653 \begin_layout Subsection
22654 The template header
22657 \begin_layout Description
22658 \begin_inset Flex Code
22661 \begin_layout Plain Layout
22662 AutomaticProduction
22663 \begin_inset space ~
22671 Whether the file represented by the template must be generated by LyX.
22672 This command must occur exactly once.
22675 \begin_layout Description
22676 \begin_inset Flex Code
22679 \begin_layout Plain Layout
22681 \begin_inset space ~
22689 A glob pattern that is used in the file dialog to filter out the desired
22691 If there is more than one possible file extension (e.
22692 \begin_inset space \thinspace{}
22696 \begin_inset space \space{}
22700 \begin_inset Flex Code
22703 \begin_layout Plain Layout
22710 \begin_inset Flex Code
22713 \begin_layout Plain Layout
22719 ), use something like
22720 \begin_inset Flex Code
22723 \begin_layout Plain Layout
22730 This command must occur exactly once.
22733 \begin_layout Description
22734 \begin_inset Flex Code
22737 \begin_layout Plain Layout
22739 \begin_inset space ~
22747 The text that is displayed on the button.
22748 This command must occur exactly once.
22751 \begin_layout Description
22752 \begin_inset Flex Code
22755 \begin_layout Plain Layout
22757 \begin_inset space ~
22761 \begin_inset space ~
22769 The help text that is used in the External dialog.
22770 Provide enough information to explain to the user just what the template
22771 can provide him with.
22772 This command must occur exactly once.
22775 \begin_layout Description
22776 \begin_inset Flex Code
22779 \begin_layout Plain Layout
22781 \begin_inset space ~
22789 The file format of the original file.
22790 This must be the name of a format that is known to LyX (see section
22791 \begin_inset space ~
22795 \begin_inset CommandInset ref
22797 reference "sec:Formats"
22803 \begin_inset Quotes eld
22807 \begin_inset Flex Code
22810 \begin_layout Plain Layout
22817 \begin_inset Quotes erd
22820 if the template can handle original files of more than one format.
22821 LyX will attempt to interrogate the file itself in order to deduce its
22822 format in this case.
22823 This command must occur exactly once.
22826 \begin_layout Description
22827 \begin_inset Flex Code
22830 \begin_layout Plain Layout
22832 \begin_inset space ~
22840 A unique name for the template.
22841 It must not contain substitution macros (see below).
22844 \begin_layout Description
22845 \begin_inset Flex Code
22848 \begin_layout Plain Layout
22850 \begin_inset space ~
22853 Rotate|Resize|Clip|Extra
22858 This command specifies which transformations are supported by this template.
22859 It may occur zero or more times.
22860 This command enables the corresponding tabs in the external dialog.
22862 \begin_inset Flex Code
22865 \begin_layout Plain Layout
22871 command must have either a corresponding
22872 \begin_inset Flex Code
22875 \begin_layout Plain Layout
22882 \begin_inset Flex Code
22885 \begin_layout Plain Layout
22892 \begin_inset Flex Code
22895 \begin_layout Plain Layout
22902 Otherwise the transformation will not be supported by that format.
22905 \begin_layout Subsection
22909 \begin_layout Description
22910 \begin_inset Flex Code
22913 \begin_layout Plain Layout
22915 \begin_inset space ~
22918 LaTeX|PDFLaTeX|PlainText|DocBook
22923 The primary document file format that this format definition is for.
22924 Not every template has a sensible representation in all document file formats.
22925 Please define nevertheless a
22926 \begin_inset Flex Code
22929 \begin_layout Plain Layout
22935 section for all templates.
22936 Use a dummy text when no representation is available.
22937 Then you can at least see a reference to the external material in the exported
22941 \begin_layout Description
22942 \begin_inset Flex Code
22945 \begin_layout Plain Layout
22947 \begin_inset space ~
22951 \begin_inset space ~
22959 This command defines an additional macro
22960 \begin_inset Flex Code
22963 \begin_layout Plain Layout
22969 for substitution in
22970 \begin_inset Flex Code
22973 \begin_layout Plain Layout
22981 \begin_inset Flex Code
22984 \begin_layout Plain Layout
22990 itself may contain substitution macros.
22991 The advantage over using
22992 \begin_inset Flex Code
22995 \begin_layout Plain Layout
23002 \begin_inset Flex Code
23005 \begin_layout Plain Layout
23011 is that the substituted value of
23012 \begin_inset Flex Code
23015 \begin_layout Plain Layout
23021 is sanitized so that it is a valid optional argument in the document format.
23022 This command may occur zero or more times.
23025 \begin_layout Description
23026 \begin_inset Flex Code
23029 \begin_layout Plain Layout
23031 \begin_inset space ~
23039 The text that is inserted in the exported document.
23040 This is actually the most important command and can be quite complex.
23041 This command must occur exactly once.
23044 \begin_layout Description
23045 \begin_inset Flex Code
23048 \begin_layout Plain Layout
23050 \begin_inset space ~
23058 This command specifies a preamble snippet that will be included in the
23060 It has to be defined using
23061 \begin_inset Flex Code
23064 \begin_layout Plain Layout
23070 \SpecialChar \ldots{}
23072 \begin_inset Flex Code
23075 \begin_layout Plain Layout
23082 This command may occur zero or more times.
23085 \begin_layout Description
23086 \begin_inset Flex Code
23089 \begin_layout Plain Layout
23091 \begin_inset space ~
23095 \begin_inset space ~
23103 This command denotes files that are created by the conversion process and
23104 are needed for a particular export format.
23105 If the filename is relative, it is interpreted relative to the master document.
23106 This command may be given zero or more times.
23109 \begin_layout Description
23110 \begin_inset Flex Code
23113 \begin_layout Plain Layout
23115 \begin_inset space ~
23123 The name of a required LaTeX package.
23124 The package is included via
23125 \begin_inset Flex Code
23128 \begin_layout Plain Layout
23136 in the LaTeX preamble.
23137 This command may occur zero or more times.
23140 \begin_layout Description
23141 \begin_inset Flex Code
23144 \begin_layout Plain Layout
23146 \begin_inset space ~
23150 \begin_inset space ~
23153 RotationLatexCommand
23158 This command specifies that the built in LaTeX command should be used for
23160 This command may occur once or not at all.
23163 \begin_layout Description
23164 \begin_inset Flex Code
23167 \begin_layout Plain Layout
23169 \begin_inset space ~
23173 \begin_inset space ~
23181 This command specifies that the built in LaTeX command should be used for
23183 This command may occur once or not at all.
23186 \begin_layout Description
23187 \begin_inset Flex Code
23190 \begin_layout Plain Layout
23192 \begin_inset space ~
23196 \begin_inset space ~
23199 RotationLatexOption
23204 This command specifies that rotation is done via an optional argument.
23205 This command may occur once or not at all.
23208 \begin_layout Description
23209 \begin_inset Flex Code
23212 \begin_layout Plain Layout
23214 \begin_inset space ~
23218 \begin_inset space ~
23226 This command specifies that resizing is done via an optional argument.
23227 This command may occur once or not at all.
23230 \begin_layout Description
23231 \begin_inset Flex Code
23234 \begin_layout Plain Layout
23236 \begin_inset space ~
23240 \begin_inset space ~
23248 This command specifies that clipping is done via an optional argument.
23249 This command may occur once or not at all.
23252 \begin_layout Description
23253 \begin_inset Flex Code
23256 \begin_layout Plain Layout
23258 \begin_inset space ~
23262 \begin_inset space ~
23270 This command specifies that an extra optional argument is used.
23271 This command may occur once or not at all.
23274 \begin_layout Description
23275 \begin_inset Flex Code
23278 \begin_layout Plain Layout
23280 \begin_inset space ~
23288 The file format of the converted file.
23289 This must be the name of a format that is known to LyX (see the
23290 \begin_inset Flex MenuItem
23293 \begin_layout Plain Layout
23298 ools\SpecialChar \menuseparator
23303 references\SpecialChar \menuseparator
23304 File Handling\SpecialChar \menuseparator
23311 This command must occur exactly once.
23314 \begin_layout Description
23315 \begin_inset Flex Code
23318 \begin_layout Plain Layout
23320 \begin_inset space ~
23328 The file name of the converted file.
23329 The file name must be absolute.
23330 This command must occur exactly once.
23333 \begin_layout Subsection
23334 Preamble definitions
23337 \begin_layout Standard
23338 The external template configuration file may contain additional preamble
23339 definitions enclosed by
23340 \begin_inset Flex Code
23343 \begin_layout Plain Layout
23349 \SpecialChar \ldots{}
23351 \begin_inset Flex Code
23354 \begin_layout Plain Layout
23361 They can be used by the templates in the
23362 \begin_inset Flex Code
23365 \begin_layout Plain Layout
23374 \begin_layout Section
23375 The substitution mechanism
23378 \begin_layout Standard
23379 When the external material facility invokes an external program, it is done
23380 on the basis of a command defined in the template configuration file.
23381 These commands can contain various macros that are expanded before execution.
23382 Execution always take place in the directory of the containing document.
23385 \begin_layout Standard
23386 Also, whenever external material is to be displayed, the name will be produced
23387 by the substitution mechanism, and most other commands in the template
23388 definition support substitution as well.
23391 \begin_layout Standard
23392 The available macros are the following:
23395 \begin_layout Description
23396 \begin_inset Flex Code
23399 \begin_layout Plain Layout
23400 $$AbsOrRelPathMaster
23405 The file path, absolute or relative to the master LyX document.
23408 \begin_layout Description
23409 \begin_inset Flex Code
23412 \begin_layout Plain Layout
23413 $$AbsOrRelPathParent
23418 The file path, absolute or relative to the LyX document.
23421 \begin_layout Description
23422 \begin_inset Flex Code
23425 \begin_layout Plain Layout
23431 The absolute file path.
23434 \begin_layout Description
23435 \begin_inset Flex Code
23438 \begin_layout Plain Layout
23444 The filename without path and without the extension.
23447 \begin_layout Description
23448 \begin_inset Flex Code
23451 \begin_layout Plain Layout
23453 \begin_inset Quotes eld
23457 \begin_inset Quotes erd
23465 This macro will expand to the contents of the file with the name
23466 \begin_inset Flex Code
23469 \begin_layout Plain Layout
23478 \begin_layout Description
23479 \begin_inset Flex Code
23482 \begin_layout Plain Layout
23488 The file extension (including the dot).
23491 \begin_layout Description
23492 \begin_inset Flex Code
23495 \begin_layout Plain Layout
23501 The filename of the file specified in the external material dialog.
23502 This is either an absolute name, or it is relative to the LyX document.
23505 \begin_layout Description
23506 \begin_inset Flex Code
23509 \begin_layout Plain Layout
23516 \begin_inset Flex Code
23519 \begin_layout Plain Layout
23525 (absolute name or relative to the LyX document).
23528 \begin_layout Description
23529 \begin_inset Flex Code
23532 \begin_layout Plain Layout
23538 The file path, relative to the master LyX document.
23541 \begin_layout Description
23542 \begin_inset Flex Code
23545 \begin_layout Plain Layout
23551 The file path, relative to the LyX document.
23554 \begin_layout Description
23555 \begin_inset Flex Code
23558 \begin_layout Plain Layout
23564 This macro will expand to the absolute path of the system directory.
23565 This is typically used to point to the various helper scripts that are
23569 \begin_layout Description
23570 \begin_inset Flex Code
23573 \begin_layout Plain Layout
23579 A name and full path to a temporary file which will be automatically deleted
23580 whenever the containing document is closed, or the external material insertion
23584 \begin_layout Standard
23585 All path macros contain a trailing directory separator, so you can construct
23587 \begin_inset space \thinspace{}
23591 \begin_inset space \space{}
23594 the absolute filename with
23595 \begin_inset Flex Code
23598 \begin_layout Plain Layout
23599 $$AbsPath$$Basename$$Extension
23607 \begin_layout Standard
23608 The macros above are substituted in all commands unless otherwise noted.
23610 \begin_inset Flex Code
23613 \begin_layout Plain Layout
23619 supports additionally the following substitutions if they are enabled by
23621 \begin_inset Flex Code
23624 \begin_layout Plain Layout
23631 \begin_inset Flex Code
23634 \begin_layout Plain Layout
23643 \begin_layout Description
23644 \begin_inset Flex Code
23647 \begin_layout Plain Layout
23653 The front part of the resize command.
23656 \begin_layout Description
23657 \begin_inset Flex Code
23660 \begin_layout Plain Layout
23666 The back part of the resize command.
23669 \begin_layout Description
23670 \begin_inset Flex Code
23673 \begin_layout Plain Layout
23679 The front part of the rotation command.
23682 \begin_layout Description
23683 \begin_inset Flex Code
23686 \begin_layout Plain Layout
23692 The back part of the rotation command.
23695 \begin_layout Standard
23696 The value string of the
23697 \begin_inset Flex Code
23700 \begin_layout Plain Layout
23706 command supports additionally the following substitutions if they are enabled
23708 \begin_inset Flex Code
23711 \begin_layout Plain Layout
23718 \begin_inset Flex Code
23721 \begin_layout Plain Layout
23730 \begin_layout Description
23731 \begin_inset Flex Code
23734 \begin_layout Plain Layout
23743 \begin_layout Description
23744 \begin_inset Flex Code
23747 \begin_layout Plain Layout
23756 \begin_layout Description
23757 \begin_inset Flex Code
23760 \begin_layout Plain Layout
23769 \begin_layout Description
23770 \begin_inset Flex Code
23773 \begin_layout Plain Layout
23779 The rotation option.
23782 \begin_layout Standard
23783 You may ask why there are so many path macros.
23784 There are mainly two reasons:
23787 \begin_layout Enumerate
23788 Relative and absolute file names should remain relative or absolute, respectivel
23790 Users may have reasons to prefer either form.
23791 Relative names are useful for portable documents that should work on different
23792 machines, for example.
23793 Absolute names may be required by some programs.
23796 \begin_layout Enumerate
23797 LaTeX treats relative file names differently than LyX and other programs
23798 in nested included files.
23799 For LyX, a relative file name is always relative to the document that contains
23801 For LaTeX, it is always relative to the master document.
23802 These two definitions are identical if you have only one document, but
23803 differ if you have a master document that includes part documents.
23804 That means that relative filenames must be transformed when presented to
23806 Fortunately LyX does this automatically for you if you choose the right
23810 \begin_layout Standard
23811 So which path macro should be used in new template definitions? The rule
23815 \begin_layout Itemize
23817 \begin_inset Flex Code
23820 \begin_layout Plain Layout
23826 if an absolute path is required.
23829 \begin_layout Itemize
23831 \begin_inset Flex Code
23834 \begin_layout Plain Layout
23835 $$AbsOrRelPathMaster
23840 if the substituted string is some kind of LaTeX input.
23843 \begin_layout Itemize
23845 \begin_inset Flex Code
23848 \begin_layout Plain Layout
23849 $$AbsOrRelPathParent
23854 in order to preserve the user's choice.
23857 \begin_layout Standard
23858 There are special cases where this rule does not work and e.
23859 \begin_inset space \thinspace{}
23863 \begin_inset space \space{}
23866 relative names are needed, but normally it will work just fine.
23867 One example for such a case is the command
23868 \begin_inset Flex Code
23871 \begin_layout Plain Layout
23872 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23877 in the XFig template above: We can't use the absolute name because the
23879 \begin_inset Flex Code
23882 \begin_layout Plain Layout
23888 files needs the relative name in order to rewrite the file content.
23891 \begin_layout Section
23892 Security discussion
23893 \begin_inset CommandInset label
23895 name "sec:Security-discussion"
23902 \begin_layout Standard
23903 The external material feature interfaces with a lot of external programs
23904 and does so automatically, so we have to consider the security implications
23906 In particular, since you have the option of including your own filenames
23907 and/or parameter strings and those are expanded into a command, it seems
23908 that it would be possible to create a malicious document which executes
23909 arbitrary commands when a user views or prints the document.
23910 This is something we definitely want to avoid.
23913 \begin_layout Standard
23914 However, since the external program commands are specified in the template
23915 configuration file only, there are no security issues if LyX is properly
23916 configured with safe templates only.
23917 This is so because the external programs are invoked with the
23918 \begin_inset Flex Code
23921 \begin_layout Plain Layout
23927 -system call rather than the
23928 \begin_inset Flex Code
23931 \begin_layout Plain Layout
23937 system-call, so it's not possible to execute arbitrary commands from the
23938 filename or parameter section via the shell.
23941 \begin_layout Standard
23942 This also implies that you are restricted in what command strings you can
23943 use in the external material templates.
23944 In particular, pipes and redirection are not readily available.
23945 This has to be so if LyX should remain safe.
23946 If you want to use some of the shell features, you should write a safe
23947 script to do this in a controlled manner, and then invoke the script from
23948 the command string.
23952 \begin_layout Standard
23953 It is possible to design a template that interacts directly with the shell,
23954 but since this would allow a malicious user to execute arbitrary commands
23955 by writing clever filenames and/or parameters, we generally recommend that
23956 you only use safe scripts that work with the
23957 \begin_inset Flex Code
23960 \begin_layout Plain Layout
23966 system call in a controlled manner.
23967 Of course, for use in a controlled environment, it can be tempting to just
23968 fall back to use ordinary shell scripts.
23969 If you do so, be aware that you
23973 provide an easily exploitable security hole in your system.
23974 Of course it stands to reason that such unsafe templates will never be
23975 included in the standard LyX distribution, although we do encourage people
23976 to submit new templates in the open source tradition.
23977 But LyX as shipped from the official distribution channels will never have
23981 \begin_layout Standard
23982 Including external material provides a lot of power, and you have to be
23983 careful not to introduce security hazards with this power.
23984 A subtle error in a single line in an innocent looking script can open
23985 the door to huge security problems.
23986 So if you do not fully understand the issues, we recommend that you consult
23987 a knowledgeable security professional or the LyX development team if you
23988 have any questions about whether a given template is safe or not.
23989 And do this before you use it in an uncontrolled environment.
23992 \begin_layout Chapter
23994 List of functions to be used in layouts
23995 \begin_inset CommandInset label
23997 name "chap:List-of-functions"
24004 \begin_layout Standard
24006 \begin_inset Tabular
24007 <lyxtabular version="3" rows="10" columns="6">
24008 <features rotate="0" tabularvalignment="middle">
24009 <column alignment="left" valignment="top" width="14col%">
24010 <column alignment="left" valignment="top" width="14col%">
24011 <column alignment="left" valignment="top" width="14col%">
24012 <column alignment="left" valignment="top" width="14col%">
24013 <column alignment="left" valignment="top" width="14col%">
24014 <column alignment="left" valignment="top" width="14col%">
24016 <cell alignment="left" valignment="top" usebox="none">
24019 \begin_layout Plain Layout
24025 <cell alignment="left" valignment="top" usebox="none">
24028 \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
24072 <cell alignment="left" valignment="top" usebox="none">
24075 \begin_layout Plain Layout
24081 <cell alignment="left" valignment="top" usebox="none">
24084 \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
24128 <cell alignment="left" valignment="top" usebox="none">
24131 \begin_layout Plain Layout
24137 <cell alignment="left" valignment="top" usebox="none">
24140 \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
24184 <cell alignment="left" valignment="top" usebox="none">
24187 \begin_layout Plain Layout
24193 <cell alignment="left" valignment="top" usebox="none">
24196 \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
24240 <cell alignment="left" valignment="top" usebox="none">
24243 \begin_layout Plain Layout
24249 <cell alignment="left" valignment="top" usebox="none">
24252 \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
24296 <cell alignment="left" valignment="top" usebox="none">
24299 \begin_layout Plain Layout
24305 <cell alignment="left" valignment="top" usebox="none">
24308 \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
24352 <cell alignment="left" valignment="top" usebox="none">
24355 \begin_layout Plain Layout
24361 <cell alignment="left" valignment="top" usebox="none">
24364 \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
24408 <cell alignment="left" valignment="top" usebox="none">
24411 \begin_layout Plain Layout
24417 <cell alignment="left" valignment="top" usebox="none">
24420 \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
24464 <cell alignment="left" valignment="top" usebox="none">
24467 \begin_layout Plain Layout
24473 <cell alignment="left" valignment="top" usebox="none">
24476 \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
24520 <cell alignment="left" valignment="top" usebox="none">
24523 \begin_layout Plain Layout
24529 <cell alignment="left" valignment="top" usebox="none">
24532 \begin_layout Plain Layout
24538 <cell alignment="left" valignment="top" usebox="none">
24541 \begin_layout Plain Layout
24547 <cell alignment="left" valignment="top" usebox="none">
24550 \begin_layout Plain Layout
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
24582 \begin_layout Standard
24584 \begin_inset Tabular
24585 <lyxtabular version="3" rows="10" columns="6">
24586 <features rotate="0" tabularvalignment="middle">
24587 <column alignment="left" valignment="top" width="14col%">
24588 <column alignment="left" valignment="top" width="14col%">
24589 <column alignment="left" valignment="top" width="14col%">
24590 <column alignment="left" valignment="top" width="14col%">
24591 <column alignment="left" valignment="top" width="14col%">
24592 <column alignment="left" valignment="top" width="14col%">
24594 <cell alignment="left" valignment="top" usebox="none">
24597 \begin_layout Plain Layout
24603 <cell alignment="left" valignment="top" usebox="none">
24606 \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
24650 <cell alignment="left" valignment="top" usebox="none">
24653 \begin_layout Plain Layout
24659 <cell alignment="left" valignment="top" usebox="none">
24662 \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
24706 <cell alignment="left" valignment="top" usebox="none">
24709 \begin_layout Plain Layout
24715 <cell alignment="left" valignment="top" usebox="none">
24718 \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
24762 <cell alignment="left" valignment="top" usebox="none">
24765 \begin_layout Plain Layout
24771 <cell alignment="left" valignment="top" usebox="none">
24774 \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
24818 <cell alignment="left" valignment="top" usebox="none">
24821 \begin_layout Plain Layout
24827 <cell alignment="left" valignment="top" usebox="none">
24830 \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
24874 <cell alignment="left" valignment="top" usebox="none">
24877 \begin_layout Plain Layout
24883 <cell alignment="left" valignment="top" usebox="none">
24886 \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
24930 <cell alignment="left" valignment="top" usebox="none">
24933 \begin_layout Plain Layout
24939 <cell alignment="left" valignment="top" usebox="none">
24942 \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
24986 <cell alignment="left" valignment="top" usebox="none">
24989 \begin_layout Plain Layout
24995 <cell alignment="left" valignment="top" usebox="none">
24998 \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
25042 <cell alignment="left" valignment="top" usebox="none">
25045 \begin_layout Plain Layout
25051 <cell alignment="left" valignment="top" usebox="none">
25054 \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
25098 <cell alignment="left" valignment="top" usebox="none">
25101 \begin_layout Plain Layout
25107 <cell alignment="left" valignment="top" usebox="none">
25110 \begin_layout Plain Layout
25116 <cell alignment="left" valignment="top" usebox="none">
25119 \begin_layout Plain Layout
25125 <cell alignment="left" valignment="top" usebox="none">
25128 \begin_layout Plain Layout
25134 <cell alignment="left" valignment="top" usebox="none">
25137 \begin_layout Plain Layout
25143 <cell alignment="left" valignment="top" usebox="none">
25146 \begin_layout Plain Layout
25160 \begin_layout Chapter
25161 List of supported LyX functions to be used in layouts
25164 \begin_layout Standard
25166 \begin_inset Tabular
25167 <lyxtabular version="3" rows="10" columns="8">
25168 <features rotate="0" tabularvalignment="middle">
25169 <column alignment="left" valignment="top" width="0">
25170 <column alignment="left" valignment="top" width="0">
25171 <column alignment="left" valignment="top" width="0">
25172 <column alignment="left" valignment="top" width="0">
25173 <column alignment="left" valignment="top" width="0">
25174 <column alignment="left" valignment="top" width="0">
25175 <column alignment="left" valignment="top" width="0">
25176 <column alignment="left" valignment="top" width="0">
25178 <cell alignment="left" valignment="top" usebox="none">
25181 \begin_layout Plain Layout
25187 <cell alignment="left" valignment="top" usebox="none">
25190 \begin_layout Plain Layout
25196 <cell alignment="left" valignment="top" usebox="none">
25199 \begin_layout Plain Layout
25205 <cell alignment="left" valignment="top" usebox="none">
25208 \begin_layout Plain Layout
25214 <cell alignment="center" valignment="top" usebox="none">
25217 \begin_layout Plain Layout
25223 <cell alignment="center" valignment="top" usebox="none">
25226 \begin_layout Plain Layout
25232 <cell alignment="center" valignment="top" usebox="none">
25235 \begin_layout Plain Layout
25241 <cell alignment="center" valignment="top" usebox="none">
25244 \begin_layout Plain Layout
25252 <cell alignment="left" valignment="top" usebox="none">
25255 \begin_layout Plain Layout
25261 <cell alignment="left" valignment="top" usebox="none">
25264 \begin_layout Plain Layout
25270 <cell alignment="left" valignment="top" usebox="none">
25273 \begin_layout Plain Layout
25279 <cell alignment="left" valignment="top" usebox="none">
25282 \begin_layout Plain Layout
25288 <cell alignment="center" valignment="top" usebox="none">
25291 \begin_layout Plain Layout
25297 <cell alignment="center" valignment="top" usebox="none">
25300 \begin_layout Plain Layout
25306 <cell alignment="center" valignment="top" usebox="none">
25309 \begin_layout Plain Layout
25315 <cell alignment="center" valignment="top" usebox="none">
25318 \begin_layout Plain Layout
25326 <cell alignment="left" valignment="top" usebox="none">
25329 \begin_layout Plain Layout
25335 <cell alignment="left" valignment="top" usebox="none">
25338 \begin_layout Plain Layout
25344 <cell alignment="left" valignment="top" usebox="none">
25347 \begin_layout Plain Layout
25353 <cell alignment="left" valignment="top" usebox="none">
25356 \begin_layout Plain Layout
25362 <cell alignment="center" valignment="top" usebox="none">
25365 \begin_layout Plain Layout
25371 <cell alignment="center" valignment="top" usebox="none">
25374 \begin_layout Plain Layout
25380 <cell alignment="center" valignment="top" usebox="none">
25383 \begin_layout Plain Layout
25389 <cell alignment="center" valignment="top" usebox="none">
25392 \begin_layout Plain Layout
25400 <cell alignment="left" valignment="top" usebox="none">
25403 \begin_layout Plain Layout
25409 <cell alignment="left" valignment="top" usebox="none">
25412 \begin_layout Plain Layout
25418 <cell alignment="left" valignment="top" usebox="none">
25421 \begin_layout Plain Layout
25427 <cell alignment="left" valignment="top" usebox="none">
25430 \begin_layout Plain Layout
25436 <cell alignment="center" valignment="top" usebox="none">
25439 \begin_layout Plain Layout
25445 <cell alignment="center" valignment="top" usebox="none">
25448 \begin_layout Plain Layout
25454 <cell alignment="center" valignment="top" usebox="none">
25457 \begin_layout Plain Layout
25463 <cell alignment="center" valignment="top" usebox="none">
25466 \begin_layout Plain Layout
25474 <cell alignment="left" valignment="top" usebox="none">
25477 \begin_layout Plain Layout
25483 <cell alignment="left" valignment="top" usebox="none">
25486 \begin_layout Plain Layout
25492 <cell alignment="left" valignment="top" usebox="none">
25495 \begin_layout Plain Layout
25501 <cell alignment="left" valignment="top" usebox="none">
25504 \begin_layout Plain Layout
25510 <cell alignment="center" valignment="top" usebox="none">
25513 \begin_layout Plain Layout
25519 <cell alignment="center" valignment="top" usebox="none">
25522 \begin_layout Plain Layout
25528 <cell alignment="center" valignment="top" usebox="none">
25531 \begin_layout Plain Layout
25537 <cell alignment="center" valignment="top" usebox="none">
25540 \begin_layout Plain Layout
25548 <cell alignment="left" valignment="top" usebox="none">
25551 \begin_layout Plain Layout
25557 <cell alignment="left" valignment="top" usebox="none">
25560 \begin_layout Plain Layout
25566 <cell alignment="left" valignment="top" usebox="none">
25569 \begin_layout Plain Layout
25575 <cell alignment="left" valignment="top" usebox="none">
25578 \begin_layout Plain Layout
25584 <cell alignment="center" valignment="top" usebox="none">
25587 \begin_layout Plain Layout
25593 <cell alignment="center" valignment="top" usebox="none">
25596 \begin_layout Plain Layout
25602 <cell alignment="center" valignment="top" usebox="none">
25605 \begin_layout Plain Layout
25611 <cell alignment="center" valignment="top" usebox="none">
25614 \begin_layout Plain Layout
25622 <cell alignment="left" valignment="top" usebox="none">
25625 \begin_layout Plain Layout
25631 <cell alignment="left" valignment="top" usebox="none">
25634 \begin_layout Plain Layout
25640 <cell alignment="left" valignment="top" usebox="none">
25643 \begin_layout Plain Layout
25649 <cell alignment="left" valignment="top" usebox="none">
25652 \begin_layout Plain Layout
25658 <cell alignment="center" valignment="top" usebox="none">
25661 \begin_layout Plain Layout
25667 <cell alignment="center" valignment="top" usebox="none">
25670 \begin_layout Plain Layout
25676 <cell alignment="center" valignment="top" usebox="none">
25679 \begin_layout Plain Layout
25685 <cell alignment="center" valignment="top" usebox="none">
25688 \begin_layout Plain Layout
25696 <cell alignment="left" valignment="top" usebox="none">
25699 \begin_layout Plain Layout
25705 <cell alignment="left" valignment="top" usebox="none">
25708 \begin_layout Plain Layout
25714 <cell alignment="left" valignment="top" usebox="none">
25717 \begin_layout Plain Layout
25723 <cell alignment="left" valignment="top" usebox="none">
25726 \begin_layout Plain Layout
25732 <cell alignment="center" valignment="top" usebox="none">
25735 \begin_layout Plain Layout
25741 <cell alignment="center" valignment="top" usebox="none">
25744 \begin_layout Plain Layout
25750 <cell alignment="center" valignment="top" usebox="none">
25753 \begin_layout Plain Layout
25759 <cell alignment="center" valignment="top" usebox="none">
25762 \begin_layout Plain Layout
25770 <cell alignment="left" valignment="top" usebox="none">
25773 \begin_layout Plain Layout
25779 <cell alignment="left" valignment="top" usebox="none">
25782 \begin_layout Plain Layout
25788 <cell alignment="left" valignment="top" usebox="none">
25791 \begin_layout Plain Layout
25797 <cell alignment="left" valignment="top" usebox="none">
25800 \begin_layout Plain Layout
25806 <cell alignment="center" valignment="top" usebox="none">
25809 \begin_layout Plain Layout
25815 <cell alignment="center" valignment="top" usebox="none">
25818 \begin_layout Plain Layout
25824 <cell alignment="center" valignment="top" usebox="none">
25827 \begin_layout Plain Layout
25833 <cell alignment="center" valignment="top" usebox="none">
25836 \begin_layout Plain Layout
25844 <cell alignment="left" valignment="top" usebox="none">
25847 \begin_layout Plain Layout
25853 <cell alignment="left" valignment="top" usebox="none">
25856 \begin_layout Plain Layout
25862 <cell alignment="left" valignment="top" usebox="none">
25865 \begin_layout Plain Layout
25871 <cell alignment="left" valignment="top" usebox="none">
25874 \begin_layout Plain Layout
25880 <cell alignment="center" valignment="top" usebox="none">
25883 \begin_layout Plain Layout
25889 <cell alignment="center" valignment="top" usebox="none">
25892 \begin_layout Plain Layout
25898 <cell alignment="center" valignment="top" usebox="none">
25901 \begin_layout Plain Layout
25907 <cell alignment="center" valignment="top" usebox="none">
25910 \begin_layout Plain Layout
25924 \begin_layout Standard
25925 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
25926 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
25927 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
25928 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
25929 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
25930 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
25931 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
25932 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
25933 xargs xcolor xy yhmath
25936 \begin_layout Chapter
25937 Names of available colors to be used in layouts
25938 \begin_inset CommandInset label
25940 name "chap:Names-of-colors"
25947 \begin_layout Standard
25948 The colors listed here are the standard colors and the those that you can
25949 adjust in the LyX preferences.
25952 \begin_layout Description
25965 No particular color -- clear or default
25968 \begin_layout Description
25972 \begin_layout Description
25976 \begin_layout Description
25980 \begin_layout Description
25984 \begin_layout Description
25988 \begin_layout Description
25992 \begin_layout Description
25996 \begin_layout Description
26000 \begin_layout Description
26001 cursor Cursor color
26004 \begin_layout Description
26005 background Background color
26008 \begin_layout Description
26009 foreground Foreground color
26012 \begin_layout Description
26013 selection Background color of selected text
26016 \begin_layout Description
26017 selectiontext Foreground color of selected text
26020 \begin_layout Description
26021 latex Text color in LaTeX mode
26024 \begin_layout Description
26025 preview The color used for previews
26028 \begin_layout Description
26029 inlinecompletion Inline completion color
26032 \begin_layout Description
26033 nonunique_inlinecompletion Inline completion color for the non-unique part
26036 \begin_layout Description
26037 notelabel Label color for notes
26040 \begin_layout Description
26041 notebg Background color of notes
26044 \begin_layout Description
26045 commentlabel Label color for comments
26048 \begin_layout Description
26049 commentbg Background color of comments
26052 \begin_layout Description
26053 greyedoutlabel Label color for greyedout insets
26056 \begin_layout Description
26057 greyedouttext Color for greyedout inset text
26060 \begin_layout Description
26061 greyedoutbg Background color of greyedout inset
26064 \begin_layout Description
26065 shadedbg Background color of shaded box
26068 \begin_layout Description
26069 listingsbg Background color of listings inset
26072 \begin_layout Description
26073 branchlabel Label color for branches
26076 \begin_layout Description
26077 footlabel Label color for footnotes
26080 \begin_layout Description
26081 indexlabel Label color for index insets
26084 \begin_layout Description
26085 marginlabel Label color for margin notes
26088 \begin_layout Description
26089 phantomtext Text color for phantom insets
26092 \begin_layout Description
26093 urllabel Label color for URL insets
26096 \begin_layout Description
26097 urltext Color for URL inset text
26100 \begin_layout Description
26101 depthbar Color for the depth bars in the margin
26104 \begin_layout Description
26105 language Color for marking foreign language words
26108 \begin_layout Description
26109 command Text color for command insets
26112 \begin_layout Description
26113 commandbg Background color for command insets
26116 \begin_layout Description
26117 commandframe Frame color for command insets
26120 \begin_layout Description
26121 special Special chars text color
26124 \begin_layout Description
26125 graphicsbg Graphics inset background color
26128 \begin_layout Description
26129 math Math inset text color
26132 \begin_layout Description
26133 mathbg Math inset background color
26136 \begin_layout Description
26137 mathmacrobg Macro math inset background color
26140 \begin_layout Description
26141 mathmacrohoverbg Macro math inset background color hovered
26144 \begin_layout Description
26145 mathmacrolabel Macro math label color
26148 \begin_layout Description
26149 mathmacroframe Macro math frame color
26152 \begin_layout Description
26153 mathmacroblend Macro math blended color
26156 \begin_layout Description
26157 mathmacrooldarg Macro template color for old parameters
26160 \begin_layout Description
26161 mathmacronewarg Macro template color for new parameters
26164 \begin_layout Description
26165 mathframe Math inset frame color under focus
26168 \begin_layout Description
26169 mathcorners Math inset frame color not under focus
26172 \begin_layout Description
26173 mathline Math line color
26176 \begin_layout Description
26177 collapsable Collapsable insets text
26180 \begin_layout Description
26181 collapsableframe Collapsable insets frame
26184 \begin_layout Description
26185 insetbg Inset marker background color
26188 \begin_layout Description
26189 insetframe Inset marker frame color
26192 \begin_layout Description
26193 error Error box text color
26196 \begin_layout Description
26197 eolmarker End of line marker color
26200 \begin_layout Description
26201 added_space Added space colour
26204 \begin_layout Description
26205 appendix Appendix marker color
26208 \begin_layout Description
26209 changebar Changebar color
26212 \begin_layout Description
26213 deletedtext Deleted text color
26216 \begin_layout Description
26217 addedtext Added text color
26220 \begin_layout Description
26221 changedtextauthor1 Changed text color author 1
26224 \begin_layout Description
26225 changedtextauthor2 Changed text color author 2
26228 \begin_layout Description
26229 changedtextauthor3 Changed text color author 3
26232 \begin_layout Description
26233 changedtextauthor4 Changed text color author 4
26236 \begin_layout Description
26237 changedtextauthor5 Changed text color author 5
26240 \begin_layout Description
26241 deletedtextmodifier Deleted text modifying color
26244 \begin_layout Description
26245 tabularline Table line color
26248 \begin_layout Description
26249 tabularonoffline Table line color
26252 \begin_layout Description
26253 bottomarea Bottom area color
26256 \begin_layout Description
26257 newpage New page color
26260 \begin_layout Description
26261 pagebreak Page break color
26264 \begin_layout Description
26265 buttonframe Color used for button frame
26268 \begin_layout Description
26269 buttonbg Color used for bottom background
26272 \begin_layout Description
26273 buttonhoverbg Color used for buttom under focus
26276 \begin_layout Description
26277 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26281 \begin_layout Description
26282 previewframe Preview frame color
26285 \begin_layout Description
26286 inherit Color is inherited
26289 \begin_layout Description
26290 regexpframe Color for regexp frame
26293 \begin_layout Description
26294 ignore For ignoring updates of a color